-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experimental portable lockdirs #11489
base: main
Are you sure you want to change the base?
Conversation
See https://github.com/ocaml/dune/pull/11489/files#diff-2d6698a9af755d43a10093ee8248c2f6c9606358252ad453483447bf0d302fc5 for an example of how lockfiles look with this feature enabled. |
59d5fe2
to
beebd21
Compare
The failing lock-directory-selection test on macos is due to the issue fixed in #11497. |
beebd21
to
5319f22
Compare
Adds a feature flag for enabling portable lockdirs. This is a proof of concept implementation of portable lockdirs where the entire solver runs for each of a set of platforms (combinations of architecture, OS, and in some cases the OS distribution) which most people are expected to use. This can easily be extended in the future to add more platforms or to allow projects to specify more platforms. To make lockdirs portable, the build/install commands and dependencies of each package are transformed into match statements, where the appropriate value for each platform is enumerated. At solve-time, the solver runs once for each platform, populating these fields. At build-time, the command/dependencies appropriate for the current platform are used. When the feature flag is not enabled dune's behaviour is unchanged. Signed-off-by: Stephen Sherratt <[email protected]>
5319f22
to
fb43b79
Compare
@rgrinberg can you take a look at this please |
I'll try and get around to this in the next few days. Meanwhile can @art-w or @Leonidas-from-XIV give this a review? |
Is |
Not yet, but that's something I'm thinking of adding in the future. The goal for this PR is to show a proof of concept for portable lockdirs but there's several extensions I want to make to improve usability of this feature once the current PR is merged. |
Adds a feature flag for enabling portable lockdirs. This is a proof of concept implementation of portable lockdirs where the entire solver runs for each of a set of platforms (combinations of architecture, OS, and in some cases the OS distribution) which most people are expected to use. This can easily be extended in the future to add more platforms or to allow projects to specify more platforms.
To make lockdirs portable, the build/install commands and dependencies of each package are transformed into match statements, where the appropriate value for each platform is enumerated. At solve-time, the solver runs once for each platform, populating these fields. At build-time, the command/dependencies appropriate for the current platform are used.
When the feature flag is not enabled dune's behaviour is unchanged.
Related to #11476