Skip to content

do not scm->registry swizzle by default #6293

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

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Sources/CoreCommands/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public struct ResolverOptions: ParsableArguments {

@Flag(help: "Define automatic transformation of source control based dependencies to registry based ones")
public var sourceControlToRegistryDependencyTransformation: SourceControlToRegistryDependencyTransformation =
.swizzle
.disabled

@Option(help: "Default registry URL to use, instead of the registries.json configuration file")
public var defaultRegistryURL: URL?
Expand Down
5 changes: 1 addition & 4 deletions Sources/Workspace/Workspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,6 @@ public class Workspace {
delegate: WorkspaceRegistryClientDelegate(workspaceDelegate: delegate)
)

// record state before potential mutation
let registryExplicitlyConfigured = registryClient.explicitlyConfigured
// set default registry if not already set by configuration
if registryClient.defaultRegistry == nil, let defaultRegistry = configuration.defaultRegistry {
registryClient.defaultRegistry = defaultRegistry
Expand All @@ -706,8 +704,7 @@ public class Workspace {
// register the registry dependencies downloader with the cancellation handler
cancellator?.register(name: "registry downloads", handler: registryDownloadsManager)

// TODO: activate if users has given an indication they want to use the registry?
if registryExplicitlyConfigured, let transformationMode = RegistryAwareManifestLoader.TransformationMode(configuration.sourceControlToRegistryDependencyTransformation) {
if let transformationMode = RegistryAwareManifestLoader.TransformationMode(configuration.sourceControlToRegistryDependencyTransformation) {
manifestLoader = RegistryAwareManifestLoader(
underlying: manifestLoader,
registryClient: registryClient,
Expand Down