Skip to content
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 Dec 24, 2025
9d44049
DocC: curate Dependency mirrors under Adding Dependencies
Viditgupta-official Jan 2, 2026
4b92e65
Refine Dependency Mirrors documentation and add usage guidance
Viditgupta-official Jan 2, 2026
f761e42
docs: align dependency mirror documentation with SwiftPM behavior
Viditgupta-official Jan 5, 2026
3ee1c84
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official Jan 9, 2026
798f4ff
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official Jan 9, 2026
4ac3b85
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official Jan 9, 2026
56d7f1c
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official Jan 9, 2026
6f5bf25
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official Jan 9, 2026
d74b722
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official Jan 9, 2026
0b5aabc
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official Jan 9, 2026
cb8e1e6
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official Jan 9, 2026
8bdfc18
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official Jan 9, 2026
2748c7c
Update Sources/PackageManagerDocs/Documentation.docc/Package/Dependen…
Viditgupta-official Jan 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Dependency Mirrors

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.

Dependency mirrors are configured locally and affect only the top-level package being built.

## When to use dependency mirrors

Dependency mirrors are commonly used in the following scenarios:

- 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:

- ``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

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).

Loading