Repository navigation
Conversation
f57c531 to
0e3604f
Compare
Merging this PR will not alter performance
|
0e3604f to
45012f1
Compare
e548de8 to
b318cc0
Compare
35312ef to
d4028b3
Compare
d4028b3 to
62a6202
Compare
62a6202 to
fa4a038
Compare
| mut self, | ||
| client: impl FnOnce() -> Result<Client, Error>, | ||
| concurrency: usize, | ||
| output_dir: &Path, |
There was a problem hiding this comment.
[P3] Retain the path base in the pending export
Both constructors already use the supplied directory to encode relative artifact paths, but finish requires callers to supply that same directory again. For a relative artifact needing a hash, a different directory makes hash_source read the wrong file or fail. Both current callers pass matching directories, so this is an API maintenance hazard rather than a current command regression. Store the constructor’s path base in PylockTomlExport and use it during finalization, removing the repeated parameter.
pylock.tomlexporters currently need to callgenerate_missing_hashesseparately, so a future caller could serialize an incomplete export. ReturnPylockTomlExportfrom the export constructors and require its consumingfinishstep before exposing the serializable value. Project export retains lazy client construction, and pip compilation reuses its existing client. Hashing, diagnostics, and import behavior are unchanged. This follows up on the API concern in astral-sh#20146.