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

lang stanza of dune-package should be the same as in dune-project #2216

Closed
Khady opened this issue May 30, 2019 · 1 comment
Closed

lang stanza of dune-package should be the same as in dune-project #2216

Khady opened this issue May 30, 2019 · 1 comment

Comments

@Khady
Copy link
Contributor

Khady commented May 30, 2019

The dune-package file generated during the installation of a package contains a lang stanza. The version in this stanza is the version of the dune used to compile the package. But the version of dune might be different from the version specified in dune-project.

This is a problem when one wants to downgrade dune in an opam switch. For example if one:

  • create a switch with dune 1.9.3 and install devkit
  • compile a project
  • downgrade dune to 1.8.2 (opam install dune.1.8.2)
  • try to compile again the same project

Then one will get an error that looks like:

File "/home/louis/.opam/a/lib/devkit/dune-package", line 1, characters 11-14:
1 | (lang dune 1.9)
              ^^^
Error: Version 1.9 of dune is not supported.
Supported versions:
- 0.0
- 1.0 to 1.8

At this point there is no good solution but to run opam switch reinstall.

The dune-project file of devkit looks like this:

(lang dune 1.5)
(name devkit)

I took devkit as an example, but it is exactly the same thing with any other package using dune as a build system.

@rgrinberg
Copy link
Member

I think this is a duplicate of #2147

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

2 participants