-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[new release] opam-monorepo (0.3.0) #21236
Conversation
CHANGES: ### Added - Add opam extensions `x-opam-monorepo-opam-repositories` and `x-opam-monorepo-global-opam-vars` to make `lock` fully reproducible. (tarides/opam-monorepo#250, tarides/opam-monorepo#253, @NathanReb) - Show an error message when the solver can't find any version that satisfies the requested version constraint in the user's OPAM file (tarides/opam-monorepo#215, tarides/opam-monorepo#248, @Leonidas-from-XIV) - Allow packages to be marked as being provided by Opam and not to be pulled by `opam-monorepo`. To control this a new optional Opam file field, `x-opam-monorepo-opam-provided` is introduced. Its value is a list of package names that are to be excluded from being pulled (tarides/opam-monorepo#234, @Leonidas-from-XIV) - Show an error message when the OCaml version of the lock file does not match the OCaml version of the switch (tarides/opam-monorepo#267, tarides/opam-monorepo#268, @Leonidas-from-XIV) - Generate a `duniverse/README.md` file to explain the basics of `opam-monorepo` in the vendored directory (tarides/opam-monorepo#272, tarides/opam-monorepo#274, @Leonidas-from-XIV) - Add a `--prefer-cross-compile` flag for the solver to select cross-compiling versions of packages when available. This is determined through the presence of the `"cross-compile"` tag in the opam metadata. ### Changed - Bump lockfile version to 0.3 (tarides/opam-monorepo#285, @NathanReb) - Mark packages to be pulled by opam-monorepo with the `vendor` variable so using OPAM with `opam install --deps-only --locked .` will not install packages that will be installed with `opam-monorepo pull` (tarides/opam-monorepo#237, @Leonidas-from-XIV) ### Deprecated ### Fixed - Fix a bug where a package which had a single version that built with dune and got selected by the solver would be reported has having no version building with dune. (tarides/opam-monorepo#245, @Leonidas-from-XIV) - Fix the solver so it does not select beta versions of the compiler unless forced to by version constraints or `--ocaml-version`. (tarides/opam-monorepo#269, @NathanReb) ### Removed - Drop support for lockfile versions 0.2 and lower (tarides/opam-monorepo#285, @NathanReb) ### Security
Will work on a discuss post for this one as it's a pretty significant release! |
bug-reports: "https://github.com/ocamllabs/opam-monorepo/issues" | ||
depends: [ | ||
"dune" {>= "2.9"} | ||
"ocaml" {>= "4.08.0"} |
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.
"ocaml" {>= "4.08.0"} | |
"ocaml" {>= "4.13"} |
#=== ERROR while compiling opam-monorepo.0.3.0 ================================#
# context 2.1.2 | linux/x86_64 | ocaml-base-compiler.4.12.1 | pinned(https://github.com/ocamllabs/opam-monorepo/releases/download/0.3.0/opam-monorepo-0.3.0.tbz)
# path ~/.opam/4.12/.opam-switch/build/opam-monorepo.0.3.0
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p opam-monorepo -j 31 @install
# exit-code 1
# env-file ~/.opam/log/opam-monorepo-1976-b81551.env
# output-file ~/.opam/log/opam-monorepo-1976-b81551.out
### output ###
# (cd duniverse/0install/src/gui_gtk && /home/opam/.opam/4.12/bin/ocaml -I +compiler-libs /home/opam/.opam/4.12/.opam-switch/build/opam-monorepo.0.3.0/_build/.dune/default/duniverse/0install/src/gui_gtk/dune.ml)
# sh: 1: ocamlfind: not found
# (will skip building the GTK plugin)
# (cd _build/default && /home/opam/.opam/4.12/bin/ocamldep.opt -modules -impl cli/lock.ml) > _build/default/cli/.duniverse_cli.objs/lock.ml.d
# File "cli/lock.ml", line 259, characters 15-17:
# 259 | let* acc in
# ^^
# Error: Syntax error: operator expected.
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.
Argh that's ocamlformat reformatting it this way. I'm afraid we'll have to abort this release and start again!
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.
Is there an issue somewhere tracking this bug?
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.
It is not an ocamlformat-per-se bug. It just defaults to format for the currently active OCaml version (I assume) and we didn't tell it to stay 4.08 compatible: tarides/opam-monorepo#287
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.
ah I see. I was unaware of the ocaml-version
option
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’m still considering this somewhat of a bug personally and I opened a PR here to avoid this issue in the future: ocaml-ppx/ocamlformat#2064
depexts: [ | ||
["devel/pkgconf"] {os = "openbsd"} | ||
["pkg-config"] {os-family = "debian"} | ||
["pkg-config"] {os = "macos" & os-distribution = "homebrew"} | ||
["pkgconf"] {os = "freebsd"} | ||
["pkgconf"] {os-distribution = "alpine"} | ||
["pkgconf"] {os-distribution = "arch"} | ||
["pkgconf-pkg-config"] {os-distribution = "fedora"} | ||
["pkgconf-pkg-config"] {os-distribution = "mageia"} | ||
["pkgconf-pkg-config"] {os-distribution = "centos" & os-version >= "8"} | ||
["pkgconf-pkg-config"] {os-distribution = "ol" & os-version >= "8"} | ||
["pkgconf-pkg-config"] {os-distribution = "rhel" & os-version >= "8"} | ||
["pkgconfig"] {os-distribution = "nixos"} | ||
["pkgconfig"] {os = "macos" & os-distribution = "macports"} | ||
["pkgconfig"] {os-distribution = "centos" & os-version <= "7"} | ||
["pkgconfig"] {os-distribution = "ol" & os-version <= "7"} | ||
["pkgconfig"] {os-distribution = "rhel" & os-version <= "7"} | ||
["system:pkgconf"] {os = "win32" & os-distribution = "cygwinports"} | ||
] |
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.
depexts: [ | |
["devel/pkgconf"] {os = "openbsd"} | |
["pkg-config"] {os-family = "debian"} | |
["pkg-config"] {os = "macos" & os-distribution = "homebrew"} | |
["pkgconf"] {os = "freebsd"} | |
["pkgconf"] {os-distribution = "alpine"} | |
["pkgconf"] {os-distribution = "arch"} | |
["pkgconf-pkg-config"] {os-distribution = "fedora"} | |
["pkgconf-pkg-config"] {os-distribution = "mageia"} | |
["pkgconf-pkg-config"] {os-distribution = "centos" & os-version >= "8"} | |
["pkgconf-pkg-config"] {os-distribution = "ol" & os-version >= "8"} | |
["pkgconf-pkg-config"] {os-distribution = "rhel" & os-version >= "8"} | |
["pkgconfig"] {os-distribution = "nixos"} | |
["pkgconfig"] {os = "macos" & os-distribution = "macports"} | |
["pkgconfig"] {os-distribution = "centos" & os-version <= "7"} | |
["pkgconfig"] {os-distribution = "ol" & os-version <= "7"} | |
["pkgconfig"] {os-distribution = "rhel" & os-version <= "7"} | |
["system:pkgconf"] {os = "win32" & os-distribution = "cygwinports"} | |
] |
depends: [ | ||
"dune" {>= "2.9"} | ||
"ocaml" {>= "4.08.0"} | ||
"odoc" {with-doc} |
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.
"odoc" {with-doc} | |
"odoc" {with-doc} | |
"conf-pkg-config" |
The tests failed with multiple failures, could you have a look as well? |
Assemble and manage fully vendored Dune repositories
CHANGES:
Added
x-opam-monorepo-opam-repositories
andx-opam-monorepo-global-opam-vars
to makelock
fully reproducible.(Allow running a reproducible lock tarides/opam-monorepo#250, Fix explicit repo solver tarides/opam-monorepo#253, @NathanReb)
the requested version constraint in the user's OPAM file (Incorrect error message if attempting to lock a version that doesn't exist tarides/opam-monorepo#215, Better missing version error tarides/opam-monorepo#248,
@Leonidas-from-XIV)
opam-monorepo
. To control this a new optional Opam file field,x-opam-monorepo-opam-provided
is introduced. Its value is a list of packagenames that are to be excluded from being pulled (Allow marking certain packages as "installed via OPAM" tarides/opam-monorepo#234, @Leonidas-from-XIV)
the OCaml version of the switch (Check the compiler version when pulling tarides/opam-monorepo#267, Check OCaml version of lockfile against the switch version tarides/opam-monorepo#268, @Leonidas-from-XIV)
duniverse/README.md
file to explain the basics ofopam-monorepo
in the vendored directory (Generate documentation in theduniverse/
folder tarides/opam-monorepo#272, Write a README.md when pulling a project tarides/opam-monorepo#274, @Leonidas-from-XIV)--prefer-cross-compile
flag for the solver to select cross-compilingversions of packages when available. This is determined through the presence
of the
"cross-compile"
tag in the opam metadata.Changed
vendor
variable sousing OPAM with
opam install --deps-only --locked .
will not installpackages that will be installed with
opam-monorepo pull
(Vendor variable in lockfile tarides/opam-monorepo#237,@Leonidas-from-XIV)
Deprecated
Fixed
would be reported has having no version building with dune. (Only find candidates that can't be built if there is no solution tarides/opam-monorepo#245, @Leonidas-from-XIV)
forced to by version constraints or
--ocaml-version
. (Prevent unecessary selection of beta versions tarides/opam-monorepo#269, @NathanReb)Removed
Security