-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Allow python protobuf codegen export to coexist with namespace/host package #21665
Conversation
Nice! Unfortunately I think the logging here will not be visible, since it would be coming from a child process launched by Pants if I read this code directly -- and thus eaten and not displayed in the common case. I wonder if using |
Good idea @tgolsson. Done. |
Perfect! Before I unblock CI, I'll have to ask you to add some release notes as well here... otherwise CI will yell at you anyways :) https://github.com/pantsbuild/pants/blob/main/docs/notes/2.25.x.md |
Code expects that after the export codegen_dir is empty.
@tgolsson thanks for walking me through it. I updated the release notes. Also note that I updated the code, because when I tested locally it failed. There is an extra step that cleans up the Note: I was not going to test this locally because I thought the change is small and what could happen the tests are already passing 😅. I forced myself though and it failed. Maybe it's worth to force new authors to do it. |
Thanks for testing! (Even small changes can be larger than they seem ...). (And it means my tests did not hit edge cases of which I was unaware when I wrote this code.) |
I've been erring on whether we should backport this to 2.24.x and even possibly 2.23.x, what do you think? This was new in 2.22, right? |
Backporting to 2.23 seems good to me. The earlier I can use the fix the better. What should I do beside changing the notes? |
@achrafmam2 We have a bot that does the PRs etc. Asked in #development on slack, I'm not sure how we do the notes now. The notes update from this branch also shouldn't be backported. |
…ackage (Cherry-pick of #21665) (#21676) Before this change, if a codegen export clashes with an existing package in the venv the export halts completely. The current change skips the problematic exports. This is sub optimal because not all symbols are exported but better than halting the export. See #21659 --------- Co-authored-by: achrafmam2 <[email protected]> Co-authored-by: Tom Solberg <[email protected]>
…ackage (Cherry-pick of #21665) (#21675) Before this change, if a codegen export clashes with an existing package in the venv the export halts completely. The current change skips the problematic exports. This is sub optimal because not all symbols are exported but better than halting the export. See #21659 --------- Co-authored-by: achrafmam2 <[email protected]> Co-authored-by: Tom Solberg <[email protected]>
Before this change, if a codegen export clashes with an existing package in the venv the export halts completely. The current change skips the problematic exports. This is sub optimal because not all symbols are exported but better than halting the export.
See #21659