Skip to content

Conversation

@benodiwal
Copy link
Contributor

Closes #12868

Copy link
Collaborator

@Sudha247 Sudha247 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 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.

let compiler_package_names =
List.map
~f:Package_name.of_string
[ "ocaml"; "ocaml-base-compiler"; "ocaml-variants"; "ocaml-compiler" ]
Copy link
Collaborator

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:

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
Copy link
Collaborator

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.

@benodiwal benodiwal force-pushed the dev-tool-pinned-compiler branch 2 times, most recently from 21dbbd3 to 8dcce93 Compare December 22, 2025 15:07
@benodiwal
Copy link
Contributor Author

@Sudha247 I have made the suggested changes

@benodiwal benodiwal force-pushed the dev-tool-pinned-compiler branch from fc7ac54 to 2ac1f2b Compare December 22, 2025 16:39
Signed-off-by: Sachin Beniwal <s474996633@gmail.com>
Signed-off-by: Sachin Beniwal <s474996633@gmail.com>
Signed-off-by: Sachin Beniwal <s474996633@gmail.com>
@benodiwal benodiwal force-pushed the dev-tool-pinned-compiler branch from 2ac1f2b to 0c91227 Compare December 23, 2025 12:09

(** [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
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Dev tools and special compiler branches

3 participants