-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add conceptual documentation for dependency mirrors #9540
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
Viditgupta-official
wants to merge
14
commits into
swiftlang:main
Choose a base branch
from
Viditgupta-official:dependency-mirrors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+49
−0
Open
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
38fd10e
Add conceptual documentation for dependency mirrors
Viditgupta-official 9d44049
DocC: curate Dependency mirrors under Adding Dependencies
Viditgupta-official 4b92e65
Refine Dependency Mirrors documentation and add usage guidance
Viditgupta-official f761e42
docs: align dependency mirror documentation with SwiftPM behavior
Viditgupta-official 3ee1c84
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official 798f4ff
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official 4ac3b85
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official 56d7f1c
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official 6f5bf25
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official d74b722
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official 0b5aabc
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official cb8e1e6
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official 8bdfc18
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official 2748c7c
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
Sources/PackageManagerDocs/Documentation.docc/Package/DependencyMirrors.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Dependency Mirrors | ||
Viditgupta-official marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Dependency mirrors allow Swift Package Manager to fetch a dependency from an alternate location without modifying the package manifest. This can be useful in environments where dependencies need to be fetched from internal mirrors, cached repositories, or alternate hosting locations. | ||
Viditgupta-official marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Dependency mirrors are configured locally and affect only the top-level package being built. | ||
|
|
||
| ## When to use dependency mirrors | ||
Viditgupta-official marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Dependency mirrors are commonly used in the following scenarios: | ||
Viditgupta-official marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - Accessing dependencies from internal or corporate-hosted mirrors | ||
| - Working in environments with restricted network access | ||
| - Redirecting dependency URLs without modifying existing package manifests | ||
|
|
||
| ## Configuring dependency mirrors | ||
|
|
||
| Dependency mirrors are configured using Swift Package Manager commands. These commands allow setting, querying, and removing mirror configurations for package dependencies: | ||
Viditgupta-official marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - ``swift package config set-mirror`` | ||
| - ``swift package config get-mirror`` | ||
| - ``swift package config unset-mirror`` | ||
|
|
||
| Mirror configuration is stored locally and is not part of the package manifest. | ||
|
|
||
| ## Scope and safety considerations | ||
Viditgupta-official marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Dependency mirrors apply only to the top-level package being built. Dependencies cannot define or override mirror configurations for downstream packages. | ||
|
|
||
| Because mirror configuration is local and external to the package manifest, it is not shared when a package is published or checked into version control. | ||
|
|
||
| ## Learn more | ||
|
|
||
| For the complete design and behavior details, see the Swift Evolution proposal [SE-0219: Package Manager Dependency Mirroring](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0219-package-manager-dependency-mirroring.md). | ||
Viditgupta-official marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.