-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
fix: venv should require exec toolchain #194
Conversation
I'll talk about this with @alexeagle tmr |
061e828
to
556e4a2
Compare
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.
I think there's some useful feedback on the slack thread, let's see if someone like @fmeum can provide a more thorough and correct review than I can
This is very interesting. I will need to think this through a bit more before I can provide meaningful comments. |
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.
This appears to be a pretty complicated workaround for an underlying issue with toolchain registration and I am not sure it will work properly in cross-platform setups.
I noticed that your primary toolchain definition at
name = "py_toolchain", |
target_compatible_with
attribute. With that added, you could presumably just define a py_binary
target that serves as the venv
tool and add that as an exec
dep of the venv
rule.
It's possible that I'm missing something and this requires a more complex solution, but a toolchain
without constraints is almost never correct.
eh this bit me again, didn't know this was already here... |
good point.
wouldn't this almost be same as what I do right now with getting the python toolchain for the exec but a level more indirection? Also, i presume auto exec groups ought to fix this, maybe correct solution is to wait for that? |
It's similar, but avoids having to introduce a I don't know auto exec groups well enough to assess whether they could help here. |
We'll solve for this by introducing a new toolchain pair, since we actually need to run a different command in the |
Type of change
Test plan
New test cases added
TODO: add test