Skip to content
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

Unable to resolve placeholders in pyproject.toml #19

Closed
jaraco opened this issue Jun 21, 2024 · 1 comment
Closed

Unable to resolve placeholders in pyproject.toml #19

jaraco opened this issue Jun 21, 2024 · 1 comment

Comments

@jaraco
Copy link
Owner

jaraco commented Jun 21, 2024

While working with the known-merge resolver, when placeholders are in the README, the merge routine works fine to re-substitute the placeholders. But when the conflict is in the pyproject.toml, the routine is unable to load the project metadata because the syntax of that file is broken by the conflict.

And because of the way the merge tool works, the routine is only called after the conflict is already manifest, so there's no great hook point to extract the metadata before the conflict is manifest.

Originally posted by @jaraco in jaraco/skeleton#129 (comment)

@jaraco jaraco changed the title Dang. So when these placeholders are in the README, the [merge routine](https://github.com/jaraco/jaraco.develop/blob/fdeed29219cb2e9104efa5535eb50f73c5b03a58/jaraco/develop/merge.py#L80-L91) works fine to re-substitute the placeholders. But when the conflict is in the pyproject.toml, the routine is unable to load the project metadata because the syntax of that file is broken by the conflict. Unable to resolve placeholders in pyproject.toml Jun 21, 2024
@jaraco
Copy link
Owner Author

jaraco commented Jun 21, 2024

Oh. So I do see that git does provide a reference to the base, local, remote, and merge files, and the "local" copy is presumably the one with the placeholders applied before the patch. It's conceivable that one could copy that file to a temporary directory, build the metadata there, and use it to restore the placeholders.

@jaraco jaraco closed this as completed in cd11d52 Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant