Change docs to use --only main
syntax, and add missing argument to Dockerfile example
#8921
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.
This PR describes a suggestion which I believe improves upon two small issues I have with the docs regarding the
--without dev
/--only main
option for thepoetry install
command.The Commands page disagrees with the deprecation warning when using the deprecated
--no-dev
option: the Commands page suggests using--without dev
instead, but the deprecation warning suggests using--only main
here:poetry/src/poetry/console/commands/group_command.py
Line 86 in ed1dcdd
To resolve this, I updated the Commands page to suggest both options. Personally, I think
--only main
is preferrable overall because it works even if the dev dependency group doesn't exist, but it might be helpful for readers to know that both options are viable.The FAQ entry about avoiding Docker cache busting doesn't apply either of the
--without dev
or--only main
options to the first install statement, but rather only the second install statement. Based on my testing, this causes dev dependencies to get installed, which I think is not intended.To resolve this I added
--only main
to the first install statement, and also changed the second install statement to use the--only main
syntax rather than the--without dev
syntax for the reasons described above.