You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That said, I had still installed poetry and poetry-dynamic-versioning into my venv, and included all other relevant configuration within the pyproject.toml file. This resulted in poetry build commands showing output references to the version I expected from poetry-dynamic-versioning rendering and files under my dist which were a later ("incorrect") version than expected (following I believe setuptools defaults which bumped the patch semver, among other things).
I wondered if it might make sense to inform the user about the potential for this to happen; perhaps as a warning when issuing poetry build or earlier to help state that there is a conflict / unexpected overlap from the configuration. I'm not sure if this is possible because of my erroneous configuration, but I thought it might be since poetry build showed the expected version. Thanks in advance for your thoughts on this (even if it's to say no, this isn't a very good idea or possible under the circumstances)!
The text was updated successfully, but these errors were encountered:
d33bs
changed the title
Idea: warn on pyproject.toml configurations missing
Idea: warn on required pyproject.toml configurations missing
Feb 18, 2025
Hi! On one hand, I agree this would be nice to add, but my concern with enabling it by default would be the risk of false positives, if the user doesn't want the setting or is using a different means to achieve the same effect. For example, I'm not sure if it exists today, but I could imagine someone using a different build backend that can delegate to multiple configured Poetry plugins, since more than one plugin might want its custom build backend activated.
There is the POETRY_DYNAMIC_VERSIONING_DEBUG environment variable that could be enhanced with some checks related to this, but of course the issue there is discoverability.
For now, I'm not sure about a good solution here. I'd probably just recommend that users try running poetry-dynamic-versioning enable and take a look at what it changes - that should have added the missing config in this case.
Thanks @mtkennerly, I can see what you mean. What about following the pattern from Poetry core with a pre-commit-hooks.yaml for something like a pdv-check which can be optionally used to check the configuration? Perhaps this could be as simple as issuing the command you mentioned: poetry-dynamic-versioning enable to check for a non-zero exit.
Thanks for the great work on this project - it's super useful!
I noticed recently that I had somehow forgotten to add the following configuration to my
pyproject.toml
:That said, I had still installed
poetry
andpoetry-dynamic-versioning
into my venv, and included all other relevant configuration within thepyproject.toml
file. This resulted inpoetry build
commands showing output references to the version I expected frompoetry-dynamic-versioning
rendering and files under mydist
which were a later ("incorrect") version than expected (following I believesetuptools
defaults which bumped the patch semver, among other things).I wondered if it might make sense to inform the user about the potential for this to happen; perhaps as a warning when issuing
poetry build
or earlier to help state that there is a conflict / unexpected overlap from the configuration. I'm not sure if this is possible because of my erroneous configuration, but I thought it might be sincepoetry build
showed the expected version. Thanks in advance for your thoughts on this (even if it's to say no, this isn't a very good idea or possible under the circumstances)!The text was updated successfully, but these errors were encountered: