-
-
Notifications
You must be signed in to change notification settings - Fork 638
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
Pants should release it's lock on run targets #20642
Comments
See also #7654 |
Sorry for the trouble! #7654 is the "root cause", but there's an extra subtlety here: |
This is certainly not behaviour that I want from pants. Restarting on changes is a reasonable way to ensure that pants does not get inconsistent snapshots of code while running builds, but once a build has been completed, I do not have any desire for pants to decide to rebuild and re-run code. |
Yeah, I think there's two distinct styles of "running a target":
Both seem to be useful at different times. For instance, in my work repo, 1 is very valuable for exactly running an API server, it'd be a non-starter for the usual dev workflow to have to remember to go restart it manually on every change or The only way to get behaviour 1 is with some long-running pants invocation, like the current behaviour of Even without #7654, Pants could be more intelligent: if a Pants is entirely volunteer driven. Is this something you're interested in implementing? If so, please feel free to drop into the #development channel on slack or ask for guidance here. |
I'm unlikely to find cycles for any significant development on pants for a long time. It might be helpful to outline what the simplest solution to having pants work for use case number 2 would look like in case it is easy enough for me to find some cycles or in case someone else wants to take this up. |
I think you're right that they're different behaviors with different expectations. Maybe the restarting behavior could be requested by invoking with |
It would be useful to have Pants launch a |
Yes, I think that is closer to the expected behavior. Without |
Is your feature request related to a problem? Please describe.
pants run is a convenient way to run a single command, but pants continues to holding some sort of lock when running, necessitating passing PANTS_CONCURRENT.
Describe the solution you'd like
Pants should finish up the processing needed to release the lock and then do so when it starts executing run commands so that subsequent pants commands can be run without concern.
Describe alternatives you've considered
pants package && ./dist/.... is a workable alternative, but somewhat defeats the point of the run target.
The text was updated successfully, but these errors were encountered: