-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
Lockfiles: teach our staleness error message about <default> tool lockfiles #12654
Comments
Eric-Arellano
added a commit
that referenced
this issue
Aug 27, 2021
…activate `./pants generate-lockfiles` by default (#12684) Closes #11898. We now believe tool lockfiles are stable enough to be used without the `--experimental` feature gate and `experimental.python` backend. Some remaining stabilization work: - set `[python-setup].invalid_lockfile_behavior` to default to error - change default for `--lockfile` to `<default>` - rename `[python-setup].experimental_lockfile_custom_regeneration_command` - continue improving error message for stale lockfiles #12654 [ci skip-rust] [ci skip-build-wheels]
Eric-Arellano
added a commit
that referenced
this issue
Aug 29, 2021
…lack, Pytest, and Flake8 (#12689) This is a breaking change: if you have changed the tool's `version` or `extra_requirements`, by default Pants will now error telling you to regenerate a lockfile (#12654). We are consciously breaking the Deprecation Policy because we believe the past of no lockfile (and using `[python-setup].requirement_constraints`) was very broken, and that it's crucial we have a sensible default. We'll try to document this breaking change well. [ci skip-rust] [ci skip-build-wheels]
Eric-Arellano
pushed a commit
that referenced
this issue
Aug 31, 2021
…2699) This changes the lockfile staleness messages to include information on how to reconfigure pants to resolve the error. Language is largely similar to that proposed in #12654, with minor changes: * Language changes to explain the need for action on the user's part (_you can fix this by_ rather than _please change_ ) Closes #12654
chrisjrn
pushed a commit
to chrisjrn/pants
that referenced
this issue
Aug 31, 2021
…ntsbuild#12699) This changes the lockfile staleness messages to include information on how to reconfigure pants to resolve the error. Language is largely similar to that proposed in pantsbuild#12654, with minor changes: * Language changes to explain the need for action on the user's part (_you can fix this by_ rather than _please change_ ) Closes pantsbuild#12654 # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust]
stuhood
pushed a commit
that referenced
this issue
Sep 2, 2021
…errypick of #12699). (#12717) This changes the lockfile staleness messages to include information on how to reconfigure pants to resolve the error. Language is largely similar to that proposed in #12654, with minor changes: * Language changes to explain the need for action on the user's part (_you can fix this by_ rather than _please change_ ) Closes #12654 Cherry-picks `1cfe8dd`. [ci skip-rust]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#12618 improves the error message for when a lockfile is stale/invalid a lot, although it does not handle the edge case where you're trying to use Pants's default lockfile and cannot do so for some reason. That will require special handling.
This may make the code less elegant because we'll need to plumb more information - we should prioritize excellent error messages over code readability.
Proposed messages for
<default>
caseInvalid requirements
It gets tricky for Pylint and MyPy that requirements can also come from first-party plugins!
Interpreter constraints
Sometimes tools set interpreter constraints via an option:
Other times it's calculated from the user's code itself:
Proposed message for tools with custom lockfile
Invalid requirements
(This could be made better by preserving what the previous values were and saying that. But we can do that later, if ever.)
It gets tricky for Pylint and MyPy that requirements can also come from first-party plugins!
Interpreter constraints
Sometimes tools set interpreter constraints via an option:
Other times it's calculated from the user's code itself:
Proposed messages for user lockfiles
TBD. Does not need to be implemented in Pants 2.7
The text was updated successfully, but these errors were encountered: