-
Notifications
You must be signed in to change notification settings - Fork 456
Add available field to package spec in dune-project
#8356
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
Conversation
Signed-off-by: Stephen Sherratt <[email protected]>
This generates the corresponding `available` field when generating the opam file for a package. Signed-off-by: Stephen Sherratt <[email protected]>
|
I discussed the |
|
Yes, in particular, I never understood the necessity for this construct as opposed to plain old dependencies. Why do we write |
|
Given there is no such package yet, I wonder what @kit-ty-kate thinks about this approach. It would be fairly trivial to implement, essentially just |
I'm not sure to understand. How would such a |
|
@kit-ty-kate This is not about removing |
|
To explain my motivation for adding this, I have a side project which doesn't build on some architectures. To release it to opam-repository I need to add an |
|
Also once dune starts doing package management it's going to become really important to keep the dependencies in dune-project the same as the dependencies in opam files and if opam files aren't generated from dune-project then manually synchronizing dependencies between dune-project and opam is another thing I will forget to do when releasing new versions of my library. I guess alternative would be for me to make a separate tool which auto-generates opam files from dune-project and stop checking in the opam files but that seems like a waste of effort since dune can almost do what I need. |
|
Also I get that I could possibly technically simulate
|
|
@gridbugs The other option to use .opam.template and write your I don't think maintaining But I think @kit-ty-kate @rgrinberg and I have come up with a pretty decent idea on our call yesterday. It would be implementing |
|
Here's a list of criteria to consider for adding something to a dune-project:
So in summary, I'm not completely against this feature, but it does raise a few questions with regards to these points that need some consideration. |
|
The criteria makes sense and I can see the argument for using One point of confusion was that in my experience using dune the only reason I've ever added dependencies to dune-project was so that dune could generate an opam file. This along with the fact that many other opam fields can go in dune-project led me to expect With this in mind what if we get dune to recognize the |
My concern with traversing the project to find all its To simplify the behaviour of generating
|
That would be a useful feature. |
|
You're on the right track with your suggestion of deriving
I would lean towards using the same name. It's used for the exact same thing, so why introduce another name? If there are some limitations on the generated Instead of checking the toplevel
We have instances where we follow both schemes in the rules already. |
|
Superseded by #12905 |
This lets you generate an opam file with an
availablefield.