-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
Set a default for [jvm].resolves
and [jvm].default_resolve
(cherrypick of #13925)
#13930
Merged
stuhood
merged 1 commit into
pantsbuild:2.9.x
from
stuhood:stuhood/pick-13925-for-2.9.x
Dec 20, 2021
Merged
Set a default for [jvm].resolves
and [jvm].default_resolve
(cherrypick of #13925)
#13930
stuhood
merged 1 commit into
pantsbuild:2.9.x
from
stuhood:stuhood/pick-13925-for-2.9.x
Dec 20, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…build#13925) Part of pantsbuild#12742. We set a default because it's important to the Pants project that onboarding is as effortless as possible, e.g. via sensible defaults. An additional benefit is that we can now be confident a resolve is set up, as it is impossible to override an option to be `None` (pantsbuild#11719). We decided that we want to require lockfiles when using Pants, so this is seen as a benefit. -- This uses the resolve name `jvm-default` because the namespace will be shared with Python, e.g. `py-default`. It uses the lockfile path `3rdparty/jvm/default.lock`. We use the file extension `.lock` instead of `.json` to better express the semantics, including that you should not hand-edit the file. Using the `3rdparty/jvm` folder is a sensible default for monorepos, and people can override it to where they want. [ci skip-rust] [ci skip-build-wheels]
Eric-Arellano
approved these changes
Dec 20, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Eric-Arellano
added a commit
that referenced
this pull request
Mar 16, 2022
…file.txt` to `3rdparty/python/default.lock` (#14815) ## Problem In Pants 2.11, we add support for Pex lockfiles. While it is not illegal to call a Pex lockfile `default_lockfile.txt`, using `.txt` is a misnomer: it's actually a JSONC file. But we also decided in #13930 that we want to call lockfiles `.lock` to emphasize you should not hand-edit them. ## Solution Use the same naming scheme from #13930 that JVM uses: `3rdparty/python/default.lock`. When changing from Poetry to Pex lockfiles, no need to rename the file. ### Alternative name I personally like `3rdparty/python/user_requirements.lock` more than the `default.lock`. But we already have a convention from JVM and we should not break those users. So the consistency seemed valuable here. There's probably wisdom in using `default.lock`: it works better if you add a second lockfile but keep the normal `python-default`. [ci skip-rust] [ci skip-build-wheels]
Eric-Arellano
added a commit
to Eric-Arellano/pants
that referenced
this pull request
Mar 16, 2022
…file.txt` to `3rdparty/python/default.lock` (Cherry-pick of pantsbuild#14815) ## Problem In Pants 2.11, we add support for Pex lockfiles. While it is not illegal to call a Pex lockfile `default_lockfile.txt`, using `.txt` is a misnomer: it's actually a JSONC file. But we also decided in pantsbuild#13930 that we want to call lockfiles `.lock` to emphasize you should not hand-edit them. ## Solution Use the same naming scheme from pantsbuild#13930 that JVM uses: `3rdparty/python/default.lock`. When changing from Poetry to Pex lockfiles, no need to rename the file. ### Alternative name I personally like `3rdparty/python/user_requirements.lock` more than the `default.lock`. But we already have a convention from JVM and we should not break those users. So the consistency seemed valuable here. There's probably wisdom in using `default.lock`: it works better if you add a second lockfile but keep the normal `python-default`. [ci skip-rust] [ci skip-build-wheels]
Eric-Arellano
added a commit
that referenced
this pull request
Mar 17, 2022
…file.txt` to `3rdparty/python/default.lock` (Cherry-pick of #14815) (#14818) ## Problem In Pants 2.11, we add support for Pex lockfiles. While it is not illegal to call a Pex lockfile `default_lockfile.txt`, using `.txt` is a misnomer: it's actually a JSONC file. But we also decided in #13930 that we want to call lockfiles `.lock` to emphasize you should not hand-edit them. ## Solution Use the same naming scheme from #13930 that JVM uses: `3rdparty/python/default.lock`. When changing from Poetry to Pex lockfiles, no need to rename the file. ### Alternative name I personally like `3rdparty/python/user_requirements.lock` more than the `default.lock`. But we already have a convention from JVM and we should not break those users. So the consistency seemed valuable here. There's probably wisdom in using `default.lock`: it works better if you add a second lockfile but keep the normal `python-default`. [ci skip-rust] [ci skip-build-wheels]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #12742.
We set a default because it's important to the Pants project that onboarding is as effortless as possible, e.g. via sensible defaults.
An additional benefit is that we can now be confident a resolve is set up, as it is impossible to override an option to be
None
(#11719). We decided that we want to require lockfiles when using Pants, so this is seen as a benefit.--
This uses the resolve name
jvm-default
because the namespace will be shared with Python, e.g.py-default
.It uses the lockfile path
3rdparty/jvm/default.lock
. We use the file extension.lock
instead of.json
to better express the semantics, including that you should not hand-edit the file. Using the3rdparty/jvm
folder is a sensible default for monorepos, and people can override it to where they want.[ci skip-rust]
[ci skip-build-wheels]