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

Improve error message for overriding acceptable compiler version #343

Closed
klntsky opened this issue Jul 29, 2019 · 1 comment

Comments

@klntsky
Copy link
Collaborator

commented Jul 29, 2019

  • if you know what you're doing and you want to void this check, you can override the version of the metadata package in the packages.dhall

It is not clear that the user should put the actual compiler version to the version field of the package. I think the UX can be improved by giving a concrete example in the error message.

Consider the following:

  • if you know what you're doing and you want to void this check, you can override the version of the metadata package in the packages.dhall:
    let overrides = { metadata = upstream.metadata ⫽ { version = "..." } }

Where "..." stands for the actual version. Or maybe describing the process in plain English would be better.

Also, I think that some special version value like "any" could be used to silence the compiler version check completely (useful to simplify the process of checking the code against multiple compiler versions).

@f-f

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

@klntsky

Consider the following: ...

Yep, the change you proposed sounds great!

Also, I think that some special version value like "any" could be used to silence the compiler version check completely (useful to simplify the process of checking the code against multiple compiler versions)

I'm not too keen on this as it feels like a slippery slope - e.g. if we do this why not do also wildcards, etc. Note that there already is a level of magic to this: e.g. if you're on a package set with 0.13.4, but on purs version 0.13.6, then Spago will totally let you run the thing. I.e. the one in the package set is the "minimum version up to the next semver multiple" (or something like that)

In the case of "checking the code against multiple compiler versions" I assume the whole process is automated and probably happening in CI, so having some automation to generate the right overrides for the packages.dhall for every purs you install should not be a big deal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.