-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
enhance configuraiton for dependencies mirrors #3670
Conversation
0364556
to
077919f
Compare
@swift-ci please smoke test |
try localFileSystem.createDirectory(newPath.parentDirectory, recursive: true) | ||
try localFileSystem.move(from: legacyPath, to: newPath) | ||
} | ||
return newPath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattt @neonichu @abertelrud note the code above does the migration from old path to new one. we should carefully integrate that into the clients such as Xcode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Among the other development-oriented documents in SwiftPM, maybe we should have one specifically focused on clients like IDEs that calls out these things. Or maybe a separate section in the change log. Just a thought.
077919f
to
f49db9b
Compare
@swift-ci please smoke test |
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice improvement over what we have right now. I shared some ideas about the API design, but overall things are looking good.
@swift-ci please smoke test linux |
motivation: support both local and global configuraiton, as per SE-0292 changes: * reafactor and seperate out the mirrors data model from the loading/saving mutation utility * use Codable for serialization * add new utility to manage local and shared mirrors configuraiton files * add new CLI flag to set custom shared configuration path * adjust call sites * add tests
3fe1921
to
fc30632
Compare
@swift-ci please smoke test |
fc30632
to
dc0f251
Compare
@swift-ci please smoke test |
@@ -499,43 +520,43 @@ public class SwiftTool { | |||
throw ExitCode.failure | |||
} else { | |||
diagnostics.emit(warning: "Did not find optional .netrc file at \(resolvedPath.pathString).") | |||
return nil | |||
return .none |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed this change a couple of diffs. Is this the recommended style for conditionals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to use .none
when the optional marks a clear functional decision, e.g. let cache = .none
is more semantic in my mind then let cache = nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I'll start doing the same, and if/when we do a swift-format pass on the whole codebase we can do the rest then.
|
@swift-ci please smoke test linux |
motivation: support both local and global configuraiton, as per SE-0292
changes: