-
Notifications
You must be signed in to change notification settings - Fork 409
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
generate_opam_files seems broken in 2.0 #2927
Comments
I just gave this a try and it worked for me. How are you calling dune? |
Oh! Maybe something to do with my environment then.. I am simply calling I can try again on a fresh switch, and see if I can get some verbose output to help explain what's going on. |
Argh.. frustrating. I can't reproduce on a fresh switch. I thought I'd tried that explicitly before opening this, but I must have had some state complicating things. If I figure out how to reproduce this, I'll reopen. In the meantime, sorry for the noise and thanks for your quick feedback. |
No worries, this kind of things has happened to me as well in the past. One way to be sure it's reproducible is to add a test case to the dune test suite since these are quite well sandboxed. We use a custom version of cram tests so they are easy to write. Just add a directory with a |
Thanks for the tip, @diml. I'll walk through this next time! In fact, do you think it would be helpful to supply guidance on creating these kinds of test cases in the issue submission template for this repo? (If you think this would be useful, but don't have bandwidth to write it up, I'm happen to open a draft PR with an issue template summarizing your points here (and the info in |
Yes! That would definitely be helpful. If issues could come with a reproduction case we could just merge, that would definitely make things easier. A PR for this would be welcome :) |
I have a similar problem, Also
Reproduced with something like:
Could this be reopened? Else I'll create a new issue. |
oh, I got it to work, but only if I call dune with |
Ahha! So I'm not crazy. Thanks for updating with with reproduction steps, @kit-ty-kate. I think this is also what I had done, updating from 1.11 to 2.0 on an existing project. I wonder if something is getting cached in the
Before I opened this ticket I checked the changelog for some sign of breaking changes to opam file generation, and didn't find anything. Moreover, iirc, on a fresh project that starts off using dune 2.0, it seems the file generation is working as expected. (I noticed the |
Alright, I understand what's happening:
That explains the various behaviours observed. And indeed, if you do |
…lugin, dune-private-libs and dune-glob (2.3.0) CHANGES: - Improve validation and error handling of arguments to `dune init` (ocaml/dune#3103, fixes ocaml/dune#3046, @shonfeder) - `dune init exec NAME` now uses the `NAME` argument for private modules (ocaml/dune#3103, fixes ocaml/dune#3088, @shonfeder) - Avoid linear walk to detect children, this should greatly improve performance when a target has a large number of dependencies (ocaml/dune#2959, @ejgallego, @aalekseyev, @Armael) - [coq] Add `(boot)` option to `(coq.theories)` to enable bootstrap of Coq's stdlib (ocaml/dune#3096, @ejgallego) - [coq] Deprecate `public_name` field in favour of `package` (ocaml/dune#2087, @ejgallego) - Better error reporting for "data only" and "vendored" dirs. Using these with anything else than a strict subdirectory or `*` will raise an error. The previous behavior was to just do nothing (ocaml/dune#3056, fixes ocaml/dune#3019, @voodoos) - Fix bootstrap on bytecode only switches on windows or where `-j1` is set. (ocaml/dune#3112, @xclerc, @rgrinberg) - Allow `enabled_if` fields in `executable(s)` stanzas (ocaml/dune#3137, fixes ocaml/dune#1690 @voodoos) - Do not fail if `ocamldep`, `ocamlmklib`, or `ocaml` are absent. Wait for them to be used to fail (ocaml/dune#3138, @rgrinberg) - Introduce a `strict_package_deps` mode that verifies that dependencies between packages in the workspace are specified correctly. (@rgrinberg, ocaml/dune#3117) - Make sure the `@all` alias is defined when no `dune` file is present in a directory (ocaml/dune#2946, fix ocaml/dune#2927, @diml)
…lugin, dune-private-libs and dune-glob (2.3.0) CHANGES: - Improve validation and error handling of arguments to `dune init` (ocaml/dune#3103, fixes ocaml/dune#3046, @shonfeder) - `dune init exec NAME` now uses the `NAME` argument for private modules (ocaml/dune#3103, fixes ocaml/dune#3088, @shonfeder) - Avoid linear walk to detect children, this should greatly improve performance when a target has a large number of dependencies (ocaml/dune#2959, @ejgallego, @aalekseyev, @Armael) - [coq] Add `(boot)` option to `(coq.theories)` to enable bootstrap of Coq's stdlib (ocaml/dune#3096, @ejgallego) - [coq] Deprecate `public_name` field in favour of `package` (ocaml/dune#2087, @ejgallego) - Better error reporting for "data only" and "vendored" dirs. Using these with anything else than a strict subdirectory or `*` will raise an error. The previous behavior was to just do nothing (ocaml/dune#3056, fixes ocaml/dune#3019, @voodoos) - Fix bootstrap on bytecode only switches on windows or where `-j1` is set. (ocaml/dune#3112, @xclerc, @rgrinberg) - Allow `enabled_if` fields in `executable(s)` stanzas (ocaml/dune#3137, fixes ocaml/dune#1690 @voodoos) - Do not fail if `ocamldep`, `ocamlmklib`, or `ocaml` are absent. Wait for them to be used to fail (ocaml/dune#3138, @rgrinberg) - Introduce a `strict_package_deps` mode that verifies that dependencies between packages in the workspace are specified correctly. (@rgrinberg, ocaml/dune#3117) - Make sure the `@all` alias is defined when no `dune` file is present in a directory (ocaml/dune#2946, fix ocaml/dune#2927, @diml)
I have not been able to generate opam files from dune files in 2.0. Here is a minimal example that works to generate an opam file with dune
1.11.4
but does not lead to a generated opam file for dune2.0
:(lang dune 1.11) (name foo) (homepage https://my.home.page) (generate_opam_files true) (package (name foo) )
I'm guessing we also need tests to guard against this regression in the future.
The text was updated successfully, but these errors were encountered: