Change docs to use --only main syntax, and add missing argument to Dockerfile example#8921
Merged
radoering merged 2 commits intopython-poetry:masterfrom Jan 30, 2024
Merged
Conversation
Contributor
Author
|
Based on an initial positive response that |
845f51d to
8c8ee85
Compare
|
Deploy preview for website ready! Built with commit 8c8ee85. |
radoering
approved these changes
Jan 30, 2024
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 mainoption for thepoetry installcommand.The Commands page disagrees with the deprecation warning when using the deprecated
--no-devoption: the Commands page suggests using--without devinstead, but the deprecation warning suggests using--only mainhere: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 mainis 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 devor--only mainoptions 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 mainto the first install statement, and also changed the second install statement to use the--only mainsyntax rather than the--without devsyntax for the reasons described above.