Skip to content
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

Remove name and version from opam files before publication? #28

Closed
dsheets opened this issue Jun 9, 2015 · 5 comments
Closed

Remove name and version from opam files before publication? #28

dsheets opened this issue Jun 9, 2015 · 5 comments

Comments

@dsheets
Copy link
Collaborator

dsheets commented Jun 9, 2015

opam package files in directory repositories get their name and version from the directory structure rather than the metadata file. opam files in package development repositories use these fields to make pinning easier. There is a gestating policy to have name and version removed in opam files submitted to ocaml/opam-repository. It would be nice to have these fields automatically removed by opam publish.

@dbuenzli
Copy link

dbuenzli commented Jul 5, 2015

This idea doesn't seem to take into account the signing stuff (@hannesm). Rather I would argue that tooling like opam-publish should automatically add these so that the versions we have in the repositories don't get out of sync.

@hannesm
Copy link

hannesm commented Jul 5, 2015

I think while people shouldn't be bothered with manually inserting version numbers and names, opam files should actually contain these (by using some automation, such as opam publish). this would also simplify opam to only have to take a single metadata file into account, and not trying to inferring implicit information from path structures...

@dra27
Copy link
Member

dra27 commented Nov 7, 2015

Cross-referencing ocaml/opam#2320 (comment)

@grayswandyr
Copy link

Hi

regarding this discussion, it seems that opam lint and opam publish do not handle the presence (or not) of these fields in the same way. I don't know how and where it should be addressed, but this is very misleading for beginners.
Thank you.

@rjbou
Copy link
Contributor

rjbou commented Apr 22, 2020

Fixed in current version. Thanks!

@grayswandyr opam lint do some checks, but not all from what is required by opam repository. Linting is more here to ensure that your opam file is well formed, than make it opam repository compatible. cf. #101

@rjbou rjbou closed this as completed Apr 22, 2020
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

No branches or pull requests

6 participants