Skip to content

Conversation

@Alizter
Copy link
Collaborator

@Alizter Alizter commented Oct 29, 2025

We add support for autolocking. This works when (pkg enabled) is present in the dune-workspace and allows users to build package dependencies without having to go through dune pkg lock.

If a lock file is present, it will continue to build using that as is currently the case.

This started as a rough draft of the working parts of #11775 and my branch that built on that. The advantage of this approach is that we don't touch dev tools or dune pkg lock.

@Alizter Alizter force-pushed the push-skrkpmlkomsw branch 2 times, most recently from c8b556f to 901b00e Compare October 30, 2025 11:43
@shonfeder
Copy link
Member

shonfeder commented Oct 30, 2025

I'm excited to see this landing :D I'm reporting on an attempt to use it:

I have tried using a build from this branch to build cohttp. I have set (pkg enabled) in the dune-workspace and deleting the lock dir I was previously working with. Then trying to run with dune build fails with

$ dune build
Error: Program ocamlc not found in the tree or in PATH
 (context: default)
-> required by loading the OCaml compiler for context "default"

is it an instance of #11038 ?

@Alizter

This comment was marked as resolved.

@Alizter

This comment was marked as resolved.

@Alizter Alizter force-pushed the push-skrkpmlkomsw branch 9 times, most recently from 2084d26 to 093bdf9 Compare November 5, 2025 13:05
@Alizter Alizter marked this pull request as ready for review November 5, 2025 13:08
Copy link
Collaborator

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am very excited to see this finally come to a close. This will unblock a lot of things that we have going forward.

@Alizter Alizter force-pushed the push-skrkpmlkomsw branch 2 times, most recently from 1410922 to 35d5716 Compare November 6, 2025 16:52
@Alizter Alizter force-pushed the push-skrkpmlkomsw branch 3 times, most recently from 7a4c0e6 to 9f0cd93 Compare November 11, 2025 14:23
Copy link
Collaborator

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's pretty much there, some minor comments about the code but overall seems fine.

@Alizter Alizter force-pushed the push-skrkpmlkomsw branch 6 times, most recently from 19bf821 to 6ab3e62 Compare November 11, 2025 16:22
Copy link
Collaborator

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion this is ready to merge.

Signed-off-by: Ali Caglayan <[email protected]>
@Alizter Alizter enabled auto-merge November 12, 2025 09:32
@Alizter Alizter merged commit d87f4a7 into ocaml:main Nov 12, 2025
25 checks passed
@Alizter Alizter deleted the push-skrkpmlkomsw branch November 12, 2025 09:48
in
let combined_pins = Pin.DB.combine_exn workspace_pins_db project_pins_db in
Memo.return combined_pins
>>| resolve_project_pins
Copy link
Member

@rgrinberg rgrinberg Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this code not shared with the non watch mode locking code? Why would we handle pins differently here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not shared on purpose so that we don't break existing code. Will be shared in the future under more scrutiny. Comments added in #12713.

@@ -0,0 +1,14 @@
open Import
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this module into Lock_rules?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #12714

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pkg: make lock files targets pkg: dune watch mode with autolocking

5 participants