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

make error message for unknown extension version more useful #11407

Open
zapashcanon opened this issue Jan 29, 2025 · 0 comments
Open

make error message for unknown extension version more useful #11407

zapashcanon opened this issue Jan 29, 2025 · 0 comments
Labels
cli Command line related docs Documentation improvements

Comments

@zapashcanon
Copy link
Contributor

Hi,

Here's what happened to me, I wanted to make a library melange-compatible, so I added a:

(modes native melange)

And got the error:

$ dune b @install
File "src/dune", line 4, characters 15-22:
4 |  (modes native melange)
                   ^^^^^^^
Error: 'melange' is available only when melange is enabled in the
dune-project file. You must enable it using (using melange ..) in your
dune-project file.
Note however that the currently selected version of dune (3.0) does not
support this plugin. The first version of this plugin is 0.1 and was
introduced in dune 3.8.

Then, I added the following to my dune-project:

(using melange 1.0)

And here's what happened:

File "dune-project", line 4, characters 15-18:
4 | (using melange 1.0)
                   ^^^
Error: Version 1.0 of the Melange extension is not supported.
There are no supported versions of this extension in version 3.0 of the dune
language.

Both error messages are not helpful enough. I'd like them to list all available versions because I have no idea what they are or how to display them...

(On a related side-note, the first error message is also quite frustrating, it is basically: I understood what you're asking for but I won't do it, it should just offer to add this automatically with whatever version of the extension)

@maiste maiste added docs Documentation improvements cli Command line related labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Command line related docs Documentation improvements
Projects
None yet
Development

No branches or pull requests

2 participants