Skip to content

Mirrors config migration should not modify user's file#3901

Merged
tomerd merged 1 commit into
swiftlang:mainfrom
yim-lee:mirrors-migrate
Dec 2, 2021
Merged

Mirrors config migration should not modify user's file#3901
tomerd merged 1 commit into
swiftlang:mainfrom
yim-lee:mirrors-migrate

Conversation

@yim-lee

@yim-lee yim-lee commented Dec 2, 2021

Copy link
Copy Markdown
Contributor

Motivation:
The migration from .swiftpm/config to .swiftpm/configuration/mirrors.json moves .swiftpm/config and leads user to think that the file gets deleted. (rdar://85917746)

Modifications:

  • Copy .swiftpm/config to .swiftpm/configuration/mirrors.json instead of moving it.
  • Emit warning that .swiftpm/config has been deprecated.
  • Don't perform the migration if .swiftpm/configuration/mirrors.json already exists to prevent error. (rdar://85917836)

Motivation:
The migration from `.swiftpm/config` to `.swiftpm/configuration/mirrors.json` moves `.swiftpm/config` and leads user to think that the file gets deleted. (rdar://85917746)

Modifications:
- Copy `.swiftpm/config` to `.swiftpm/configuration/mirrors.json` instead of moving it.
- Emit warning that `.swiftpm/config` has been deprecated.
- Don't perform the migration if `.swiftpm/configuration/mirrors.json` already exists to prevent error. (rdar://85917836)
@yim-lee

yim-lee commented Dec 2, 2021

Copy link
Copy Markdown
Contributor Author

@swift-ci please smoke test

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.

2 participants