Skip to content

update package deps for custom project root #1412

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vanvoorden
Copy link
Contributor

@vanvoorden vanvoorden commented Jul 9, 2025

Two small improvements to package manifest:

  • We follow the pattern from swift-corelibs-foundation1 to compute the location of dependencies:
    • SWIFTCI_USE_LOCAL_DEPS=1 moves us up one directory when looking for dependencies.
    • Missing or empty SWIFTCI_USE_LOCAL_DEPS pulls dependencies from GitHub.
  • Our swift-collections dependency from GitHub pulls from main. This is consistent with what we choose for swift-foundation-icu2 and swift-syntax3.

Tested locally from my machine:

$ cd ~/Developer/swift-foundation
$ swift build
...
Build complete!

$ SWIFTCI_USE_LOCAL_DEPS=~/Developer swift build
...
Build complete!

$ SWIFTCI_USE_LOCAL_DEPS=~ swift build
...
error: the package at '/Users/rick/swift-collections' cannot be accessed (Error Domain=NSCocoaErrorDomain Code=260 "The folder “swift-collections” doesn’t exist." UserInfo={NSUserStringVariant=(
    Folder
), NSFilePath=/Users/rick/swift-collections, NSURL=file:///Users/rick/swift-collections, NSUnderlyingError=0x6000020b0e40 {Error Domain=NSOSStatusErrorDomain Code=-43 "fnfErr: File not found"}})
error: ExitCode(rawValue: 1)

Footnotes

  1. https://github.com/swiftlang/swift-corelibs-foundation/blob/swift-6.1.2-RELEASE/Package.swift#L155-L181

  2. https://github.com/swiftlang/swift-foundation/pull/802

  3. https://github.com/swiftlang/swift-foundation/pull/1025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant