-
Notifications
You must be signed in to change notification settings - Fork 22
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
Rework pyproject.toml parsing to never raise under setuptools #107
Conversation
This is super messy and needs a refactor.
The examples seemed to be running against a different version of Incremental (possibly from pip's cache?). Ensure they run against exactly the version of Incremental we're trying to test against by pre-installing it in an isolated environment. Since this introduces an isolated environment, also install coverage-p to enable coverage of the subprocess.
It seems we must rely on heuristics, so let's go all the way.
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.
Hi.
I did a very quick review... mostly just a placehoder review... in the case nobody else will have time for a full review.
Feel free to merge if another review is not provided in time.
Thanks
Thank you for the review @adiroiban! I will proceed to merge and release as I am concerned that the issue this fixes will cause more problems in the ecosystem as the work week gets going. |
This turns out to be a logic bug in how Incremental detects whether it has been enabled under setuptools. To quote the newsfragment:
The blast radius is nasty because many packaging tools use the distutils/setuptools APIs that invoke setuptools hooks.
This PR changes the rules for setuptools. Incremental now only activates itself if all of the following are true:
pyproject.toml
contains a[tool.incremental]
tablepyproject.toml
_version.py
fileIn the Hatch case we continue to treat any configuration problems as errors because the Hatch plugin is only loaded when explicitly configured.
Additionally, this improves the integration test suite to isolate the build of the example projects and patches a coverage hole around
_inf
that brings us to 100% branch coverage.Fixes #106.