-
Notifications
You must be signed in to change notification settings - Fork 456
fix: propagate compiler pins to dev tool solver #13033
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
base: main
Are you sure you want to change the base?
Conversation
Sudha247
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is an improvement over the current situation. However, it would be better not to hardcode the compiler packages. Unfortunately, I don’t currently have a solution for determining this without hardcoding.
bin/lock_dev_tool.ml
Outdated
| let compiler_package_names = | ||
| List.map | ||
| ~f:Package_name.of_string | ||
| [ "ocaml"; "ocaml-base-compiler"; "ocaml-variants"; "ocaml-compiler" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also present in:
dune/src/dune_rules/pkg_toolchain.ml
Lines 54 to 61 in 3b5f1c9
| let compiler_package_names = | |
| (* TODO don't hardcode these names here *) | |
| [ Package_name.of_string "ocaml-base-compiler" | |
| ; Package_name.of_string "ocaml-variants" | |
| ; Package_name.of_string "ocaml-compiler" | |
| (* The [ocaml-compiler] package is required to include all the | |
| packages that might install a compiler, starting from ocaml.5.3.0. | |
| *) |
It would be good to share these to not end up hardcoding the same thing twice, perhaps somewhere in dune_pkg.
| has pinned a custom compiler branch (e.g., OxCaml). | ||
|
|
||
| $ mkdir -p pinned-compiler | ||
| $ cat > pinned-compiler/ocaml.opam <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: I think we should make ocaml-base-compiler or ocaml-variants as the compiler package to reflect how opam does it.
21dbbd3 to
8dcce93
Compare
|
@Sudha247 I have made the suggested changes |
fc7ac54 to
2ac1f2b
Compare
Signed-off-by: Sachin Beniwal <s474996633@gmail.com>
Signed-off-by: Sachin Beniwal <s474996633@gmail.com>
Signed-off-by: Sachin Beniwal <s474996633@gmail.com>
2ac1f2b to
0c91227
Compare
|
|
||
| (** [filter_by_package_names t ~package_names] returns a new pin database | ||
| containing only the pins for packages whose names are in [package_names]. *) | ||
| val filter_by_package_names : t -> package_names:Package_name.t list -> t |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this function being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closes #12868