-
Notifications
You must be signed in to change notification settings - Fork 27
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
Read package flags from OPAM metadata #328
Read package flags from OPAM metadata #328
Conversation
Could you squash the Also, could you add a test with a non-empty flag? Thanks! |
06e52a9
to
7c9ca58
Compare
This changes the logic from hardcoding the compiler "base packages" to instead read the OPAM flags to check whether the package in question is a compiler in which case it will be considered a base package. It also adds code to check for packages whether they are `conf` packages, which could be used to check for virtual packages. Inspired by tarides#327, this would allow `dkml-base-compiler` to be considered a base package and not accidentally vendor it. However it doesn't yet allow using the DKML compiler, because the name of the `ocaml` conf package is still hardcoded with no way to override it (yet).
The codebase always checks for base and virtual at the same time (sometimes using `is_virtual`, sometimes reimplementing `is_virtual`) so it can be folded into a single function that now also checks for the flags of the package to determine whether it is a compiler.
998dedf
to
37bda09
Compare
Also includes a comment on *why* these packages are excluded. Now with the compiler being auto-detected calling them "base" packages was confusing since it was unclear what makes them "base".
@gridbugs Can you take a look again? I've done some renaming and while thinking about it realized that even to me it was unclear what constituted a "base" package. With the compiler gone from the list it turns out that these are mostly build systems and dependencies of |
CHANGES: ### Changed - Treat packages with no build commands as if they can be built with dune (tarides/opam-monorepo#355, @gridbugs) ### Fixed - Fix resolving refs of locally pinned repositories (tarides/opam-monorepo#326, tarides/opam-monorepo#332, @hannesm, @Leonidas-from-XIV) - Read the `compiler` flag from OPAM metadata thus classifying more packages correctly as base packages (tarides/opam-monorepo#328, @Leonidas-from-XIV) - Fix bug where dev repo urls ending with a "/" would result in `opam monorepo pull` placing package source code directly inside the duniverse directory instead of in a subdirectory of the duniverse directory (tarides/opam-monorepo#359, @gridbugs)
This changes the logic from hardcoding the compiler "base packages" to instead read the OPAM flags to check whether the package in question is a compiler in which case it will be considered a base package.
It also adds code to check for packages whether they are
conf
packages, which could be used to check for virtual packages.Inspired by #327, this would allow
dkml-base-compiler
to be considered a base package and not accidentally vendor it. However it doesn't yet allow using the DKML compiler, because the name of theocaml
conf package is still hardcoded with no way to override it (yet).