You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed with @illicitonion (and previously on #4289), we will likely want to make some process-specific syntax for rules, since they are guaranteed to need to wrap inputs and outputs (which would otherwise just be Snapshots and Snapshots, or ExecuteProcessRequests and ExecuteProcessResults) in order to disambiguate them from other process executions.
An expanded version of the syntax that we came up with was:
@process(ClasspathEntry, [Select(Javac), SelectProjection(Snapshot, SourcesField, 'source_field', Target)])
def javac(binary, sources_snapshot):
out_dir = "doesnt_matter"
process_request = SnapshottedProcessRequest(args=(binary.name,
'-d', out_dir)+
tuple(f.path for f in sources_snapshot.files),
snapshots=(binary.snapshot, sources_snapshot),
directories_to_create=(out_dir.path,))
process_result = yield process_request
if process_result.exit_code:
raise ...
return ClasspathEntry(process_result.snapshot.re_root(outdir))
I expect that either as-part-of, or immediately-after @ity's current PR, we will want to do something like this. In the meantime though, continuing to have input_conversion and output_conversion functions would likely be ok:
As discussed with @illicitonion (and previously on #4289), we will likely want to make some process-specific syntax for rules, since they are guaranteed to need to wrap inputs and outputs (which would otherwise just be Snapshots and Snapshots, or ExecuteProcessRequests and ExecuteProcessResults) in order to disambiguate them from other process executions.
An expanded version of the syntax that we came up with was:
I expect that either as-part-of, or immediately-after @ity's current PR, we will want to do something like this. In the meantime though, continuing to have
input_conversion
andoutput_conversion
functions would likely be ok:pants/src/python/pants/engine/isolated_process.py
Lines 150 to 167 in 4d64273
The text was updated successfully, but these errors were encountered: