-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add introduction to opam release process #34
Comments
I don't know what you mean by "to set up a package to go into opam" — if you mean how to get something to build with opam, you just create an opam file (which says a few things like what command builds the thing and what versions it's good for) and that's most of the work. The docs are reasonably clear (which is unusual in OCamlland.) Dune doesn't change anything here, you just end up invoking it instead of (say) make. |
I've never done it, and I am not finding the docs sufficiently clear. You'll have to take my word for it that I am reading the docs seriously and trying to figure out the process, and will ask questions when I understand enough to ask questions specific enough to get clear answers. Maybe it will seem simple to me after that. I recognize that there's a difference between sketchy docs and docs that are very thorough and quite understandable if you've already got a sense of how something is supposed to work in general. The latter isn't always enough if you don't already have that prior understanding. This is a recurrent problem with OCaml docs, and it's a hole that Ocamlverse can and should fill. |
OK: I know what "build" means, and I know thaat I get packages installed, along with dependencies when I type I have foo.opam files--jbuilder requires them--but their content doesn't matter for anything I've done in the past, afaics. I also don't know how packages get into the database, and I am trying to learn how to put a package into the database. That's somethimg others will want to understand, and it's the point of the suggested guide. (That's not request for help with opam in an ocamlverse issue, of course. Just an illustration of how this stuff can be confusing if you don't already kind of understand it.) |
Okay, so this isn't really that hard. Have a look at the pull request queue for github.com/ocaml/opam-repository and at the contents of that git repo, and poke around inside your .opam directory, and the rest should become clear. Maybe some of this deserves documenting of course. |
On publishing to opam, I'm thinking that the Packaging guide (and the one for opam2) is quite detailed. It involves creating an opam file (the guide mentioned which fields are important for publishing), test to install it locally with Topkg (topkg-care) will also help with that (and more), with the addition of automatically testing your lib, creating release notes, tagging, creating and publishing your artifacts and docs, substituting version strings, and creating the PR. These steps (which are intended to be a common flow of publishing packages) are documented in the man page, so to find it you must |
Thanks @pmetzger , @bobbypriambodo . I had read the opam 1.2 packaging doc--that's what part of what was confusing, and I was also reading parts of the Dune docs to see if they could help. What's confusing in the opam 1.2 packaging doc is that as the example of what goes in the A similar point applies to what the opam 1.2 packaging doc says about the However, I looked at the opam 2.0 packaging doc last night, and it's much clearer. It doesn't answer the questions I had about the The upshot: The opam 1.2 packaging doc does not explain things fully for a user like me. The opam 2.0 packaging doc does explain things fully for a user like me, I think. I haven't tried it yet. I am using opam 2.0 anyway, so for my own needs, I shouldn't have been reading the opam 1.2 packaging doc. (I do think it's reasonable to expect users to be using Dune for new projects in most cases.) So maybe there is not a need for additional documentation in the long run (since opam 2.0 will presumably be officially released soon, I assume). About I'll look at the PR queue for opam. Thanks for that suggestion, @pmetzger. I would not have that would be a good source for me info at this stage, but given your suggestion, I expect it will be. OK to skip this part: btw what the opam 2.0 packaging doc says should go in the
The Dune docs describe this as "invocation from opam", and I don't know what that means, actually, so maybe the `"-j" jobs" part is irrelevant to what I'm trying to do (see previous post). (Also, in the Dune docs, it took me a while to realize that "name" and "jobs" are actually supposed to be typed in literally. I was supposed to replace thought "name" with some other string that referred to something in my project.) |
This is kind of like #27, but I don' think people who are just starting out should worry about how to set up a package to go into opam.
What I have in mind is a guide that tells you how to release a package in simple cases, but notes likely potential gotchas, and has links to further info for more complex cases and for understaning the process under the hood.
This is something I'm trying to figure out how to do now. My impression is that Dune allows you to avoid many of the steps in the opam docs (in which case they should be left out of the initial presentation in the Ocamlverse guide), but I'm not sure, and in any event after reading relevant pages in the Dune docs, I have questions that neither set of docs answers.
They guide could be linked to from both Learning and Ecosystem.
The text was updated successfully, but these errors were encountered: