Comments (3)
I think the solution to this is:
- Use dune to generate the opam files.
- Make sure dune generates them correctly.
Dune knows which libraries go in each package, and which other libraries they depend on. It also knows which opam package those libraries are from. It should therefore be able to warn you if you fail to declare a dependency on an internal or external library.
(dune already added a check for the related problem of depending on another package using its internal name: ocaml/dune#3727)
from ocaml-ci.
For dune to solve this issue completely, it would need to also consider the cases of cyclic dependencies (annotated with post
) and the distinction between test dependencies and normal dependencies. It seems to me that these are ultimately Opam's problem.
Also note that Dune's support for opam
file generation is quite limited at the moment, often requiring us to use the .template
fallback. These limitations would need to be lifted in order for Dune to become the real solution here. (c.f. ocaml/dune#3770, ocaml/dune#3653, ocaml/dune#3497.)
from ocaml-ci.
I've made a separate linter that should help with this: https://github.com/talex5/dune-opam-lint/
It's currently enabled for testing (in #285).
It works by checking that every entry in your dune
file has the corresponding opam package listed in the package's opam file.
It's not quite the same as installing each package separately, but it will catch some cases that doesn't (e.g. a transitive dependency that works today but may disappear later).
It doesn't check internal dependencies at the moment, but dune can do that itself if generating the opam files (strict_package_deps
).
from ocaml-ci.
Related Issues (20)
- OCaml-CI should search for `opam` file names in pin-depends or vendored git submodules
- Spurious CI failures HOT 3
- OCamlformat version makes the analysis fail HOT 10
- 0s in queue, ran for 0s HOT 9
- Job waiting on ocluster resource marked as "Build failed" on github
- "experimental" "variants" HOT 5
- customized compiler distro? HOT 5
- lint-fmt fails on package using dune's "site" feature HOT 2
- `lint-doc` uses lower-bounds for installing dependencies HOT 1
- CI failure HOT 3
- UX HOT 5
- SLA / service outage HOT 5
- EXPERIMENTAL: (lint-opam) (failure: No *.opam files found!)
- Web UI reports "Oops! Internal Server Error" when job hasn't started yet
- Missing `.ocamlformat` version line causes analysis failure HOT 1
- failed: Failed to get head of ocaml/opam-repository:refs/heads/master HOT 1
- CI failure on 5.1 32-bit builders HOT 1
- OCaml 5.2 support HOT 2
- Add additional opam-repository / Dockerfile customization? HOT 3
- Naming of builders
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocaml-ci.