-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
@rules to merge Snapshots #5502
Comments
The first use of this should probably be to implement #5634 - this is just being able to introspect snapshots. The second should probably be to remove the explicit The third should be to specify the list of input files for executing After those three things are done, this API is probably sufficiently complete for us to close out this ticket. @cosmicexplorer I suspect you may be interested in picking this up :) |
Also, it's possible that this can change a bit in the presence of #5580, which I've been pushing forward on in my spare time. In particular, I think it would remove the question of whether the API needs to be synchronous or not: it could be implemented like any other intrinsic rule, in theory. It's possible that I will get some non-spare time this week to bring that to a reviewable state. |
That would make me super happy, and I suspect make whoever's implementing this's life significantly easier; in particular, making it easier to experiment with incremental solutions rather than design the whole thing up front :) |
Mentioned on #5784: it's possible that we should differentiate I think that skipping past |
@stuhood Yeah, @dotordogh and I have been discussing this, and will be putting together a more concrete proposal very soon. I think we're leaning towards: Keep everything as a Snapshot until we've got JVM compiles actually implemented (and maybe another thing or two as well), and then see whether we want to pull out a I can imagine worlds in which either is a reasonable default. Picking the cheapest probably makes sense, but isn't critical yet :) |
Any thoughts on |
I've now added this to |
@illicitonion : So, for the purposes of #6003, we really only need the ability to merge Snapshots at the instant when we're about to execute a process. If it would make more sense for this ticket to just change |
I think I'd prefer an @rule to do the merging, just because otherwise we get cache key divergence in the engine (a |
Do you need to merge |
@illicitonion : I think that merging |
Python code needs the ability to manipulate Snapshots in order to pass them to (or interpret them from) things like process execution.
This primarily involves the ability to compose/merge/union snapshots (
union(toolchain_snapshot, sources_snapshot)
).Merging snapshots is already implemented as a rust function here:
pants/src/rust/engine/src/lib.rs
Lines 704 to 728 in 568a581
Following the pattern of
ExecuteProcess(Request|Result)
, this ticket should add input/outputdatatype
s, and add an intrinsic rule to satisfy them:pants/src/rust/engine/src/tasks.rs
Lines 90 to 110 in 568a581
The result should be an API like:
The text was updated successfully, but these errors were encountered: