Binary Artifact Caching Breaks Dependency Resolution
vpopovyc opened this issue · 0 comments
Is it reproducible with SwiftPM command-line tools: swift build
, swift test
, swift package
etc?
- Confirmed reproduction steps with SwiftPM CLI.
Description
Binary targets with URLs longer than FILENAME_MAX
will fail to resolve in v5.10.
The root cause is how BT's URL is used as a cache key that later is materialized in the directory name.
I've tested the version before these changes(v5.9), and the resolution works fine.
If you need a real-world example of long URLs, please consider distribution pipelines that use pre-signed URLs to an AWS S3 bucket.
Expected behavior
The same behaviour as was on v5.9.
Actual behavior
Resolution failed
Steps to reproduce
- Create a binary target with the URL that has strlen > 255.
- Resolve that package.
Swift Package Manager version/commit hash
5.10
Swift & OS version (output of swift --version ; uname -a
)
swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
Darwin Vladyslavs-MBP 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64