-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
_validate_pyproject has inconsistent provenance #4472
Comments
Thanks, Jason. I can have a look at this when I am back another week. The only difference here would be to distribute the precompiled code in a separated package if I understood correctly.
Most code is generated. The only files that are copied are the |
Thanks for the clarification. In that case, I feel less strongly about it, though I still think it would be nice to move the generated code into its own library or repo for better clarity. I'd like to explore the prospect of using a git submodule. I'll explore this possibility. Thanks for the insight and it's fine to consider this issue low priority. |
Hi @jaraco , sorry for the delay these days to reply (I am currently away from my computer). My preferred approach is something like #4364. The reason is the following: By collocating the JSON schemas inside the setuptools project, we make the development process more agile and more accessible for contributors. Currently, if we want to add a new configuration or fix a bug, I need to do it in the I would still keep the compilation step and keep the generated artifacts in the source tree because they simplify dependencies and allow us to bypass the complication of vendoring (which would introduce transient dependencies). |
Does #4364 make it more clear what is the provenance of the I hope it separates the concerns that come from Since the |
Yes. That helps a lot. Let's see how that goes. |
The code in
_validate_pyproject
is generated, so includes vendored copies of the validate-pyproject project and its dependencies, but it doesn't follow the pattern for vendored dependencies, leading to confusion when users suggest changes to that code. It's unclear to me, even after reviewing the technique for generating the package, which code is generated and which code is copied (I haven't gone as far as to review the pre_compile logic).I'd like to move this code out of setuptools or treat it like any other vendored dependency, for clarity and consistency.
In #2825 (comment), @mgorny proposed to create a new, distinct package that contains the generated code. That approach seems suitable to me. Something like
setuptools-validate-pyproject
. That dependency could then be vendored just like any other.An alternative to consider would be to move the generated code into a separate git repo and use git submodules to link it in. That would create the separation, encapsulate the generated code, and provide a clear custodial trail (users couldn't link the code in this repo and wouldn't be inclined to provide PRs to it here), but it would still be integrated into the release (as it is today). I'm not confident about this approach or what pitfalls it might entail, so I'm inclined to focus on vendoring instead.
Another option could be to avoid the static generation and instead have
validate-pyproject
generate the code on demand. Then setuptools could simply depend onvalidate-pyproject
or maybevalidate-pyproject[setuptools,distutils]
(again, vendored per Setuptools' vendoring scheme).@abravalheri How do you feel about having a new, separate package for the validator?
The text was updated successfully, but these errors were encountered: