ancient-vegetable-10556
12/08/2021, 9:47 PMfetch_with_coursier
, it’s clear that the fetch request is for a jvm_artifact
, but we call cs itself with details from the lockfile itself.
I’m considering whether I should swap out the lockfile entries with declared artifacts at this point (if they have a URL or JAR declared). Is there any reason why I shouldn’t be doing that?witty-crayon-22786
12/08/2021, 10:58 PMCoursierResolveKey
(iirc?) and we don’t allow duplicates of a coordinate as input?ancient-vegetable-10556
12/08/2021, 10:59 PMwitty-crayon-22786
12/08/2021, 10:59 PMancient-vegetable-10556
12/08/2021, 11:00 PMCoursierLockfileEntries
with URL- or JAR- specifying artifacts, check if their resolves are compatible, and use the artifact info instead of the lockfile info in that case?witty-crayon-22786
12/08/2021, 11:01 PMbecause the request has a(iirc?)CoursierResolveKey
ancient-vegetable-10556
12/08/2021, 11:01 PMwitty-crayon-22786
12/08/2021, 11:02 PMbecause the request has abut yes: this is true.(iirc?)CoursierResolveKey
CoursierFetchRequest
extends ClasspathEntryRequest
which has a resolve fieldancient-vegetable-10556
12/08/2021, 11:03 PMwitty-crayon-22786
12/08/2021, 11:03 PMancient-vegetable-10556
12/08/2021, 11:03 PMjvm_artifacts
, because the lockfile is not Pants-awarewitty-crayon-22786
12/08/2021, 11:04 PMrequest
though, right?ancient-vegetable-10556
12/08/2021, 11:04 PMwitty-crayon-22786
12/08/2021, 11:04 PMancient-vegetable-10556
12/08/2021, 11:04 PMjvm_artifact
, I need the jvm_artifact
so that I can yoink the file appropriatelywitty-crayon-22786
12/08/2021, 11:05 PMancient-vegetable-10556
12/08/2021, 11:05 PMwitty-crayon-22786
12/08/2021, 11:05 PMancient-vegetable-10556
12/08/2021, 11:06 PMwitty-crayon-22786
12/08/2021, 11:06 PMancient-vegetable-10556
12/08/2021, 11:07 PMwitty-crayon-22786
12/08/2021, 11:07 PMancient-vegetable-10556
12/08/2021, 11:09 PMSourceFilesRequest
witty-crayon-22786
12/08/2021, 11:09 PMancient-vegetable-10556
12/08/2021, 11:09 PMfetch_one_coord
thing makes for very fine-grained caching with minimal fuss, but you’re right, it’s not strictly necessarywitty-crayon-22786
12/08/2021, 11:11 PMfetch_one_coord
could go away, and we could look up the Digest
to use in the report dataclasscoursier_resolve_lockfile
running a fetch
but then not actually capturing the outputs wasancient-vegetable-10556
12/08/2021, 11:13 PMcoursier_resolve_lockfile
writes the lockfile to disk, and that’s infrequentwitty-crayon-22786
12/08/2021, 11:14 PMcoursier_fetch.coursier_resolve_lockfile
, it doesn’t write it to disk: just loads it into memory after running the fetchancient-vegetable-10556
12/08/2021, 11:15 PMwitty-crayon-22786
12/08/2021, 11:15 PMancient-vegetable-10556
12/08/2021, 11:15 PMcoursier_resolve_lockfile
is not run when fetchingwitty-crayon-22786
12/08/2021, 11:15 PMdescription=(
"Running `coursier fetch` against "
f"{pluralize(len(artifact_requirements), 'requirement')}: "
f"{', '.join(req.to_coord_str() for req in artifact_requirements)}"
),
ancient-vegetable-10556
12/08/2021, 11:16 PMcoursier fetch
to resolve the lockfile. Apparently it’s a necessity?witty-crayon-22786
12/08/2021, 11:17 PMancient-vegetable-10556
12/08/2021, 11:17 PMwitty-crayon-22786
12/08/2021, 11:18 PMancient-vegetable-10556
12/08/2021, 11:19 PMcoursier_resolve_lockfile
has access to the jvm_artifacts
, it dumps a serialized lockfile (by way of its calling context), and that serialized lockfile is loaded in fetch_with_coursier
jvm_artifacts
available in fetch_with_coursier
?witty-crayon-22786
12/08/2021, 11:20 PMancient-vegetable-10556
12/08/2021, 11:22 PMSourceFilesRequest
, and the lockfile is not likely to be in a similar location to the BUILD file that brought it into beingwitty-crayon-22786
12/08/2021, 11:22 PMancient-vegetable-10556
12/08/2021, 11:23 PMwitty-crayon-22786
12/08/2021, 11:24 PMancient-vegetable-10556
12/08/2021, 11:24 PMwitty-crayon-22786
12/09/2021, 10:04 PMancient-vegetable-10556
12/09/2021, 10:11 PM