Skip to content

Commit 55faf3c

Browse files
authored
do not scm->registry swizzle by default (#6293)
motivation: swizzling behavior may come surprising, make it the user decision changes: disabe swizzling by default
1 parent c5531b6 commit 55faf3c

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Sources/CoreCommands/Options.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public struct ResolverOptions: ParsableArguments {
257257

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

262262
@Option(help: "Default registry URL to use, instead of the registries.json configuration file")
263263
public var defaultRegistryURL: URL?

Sources/Workspace/Workspace.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -688,8 +688,6 @@ public class Workspace {
688688
delegate: WorkspaceRegistryClientDelegate(workspaceDelegate: delegate)
689689
)
690690

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

709-
// TODO: activate if users has given an indication they want to use the registry?
710-
if registryExplicitlyConfigured, let transformationMode = RegistryAwareManifestLoader.TransformationMode(configuration.sourceControlToRegistryDependencyTransformation) {
707+
if let transformationMode = RegistryAwareManifestLoader.TransformationMode(configuration.sourceControlToRegistryDependencyTransformation) {
711708
manifestLoader = RegistryAwareManifestLoader(
712709
underlying: manifestLoader,
713710
registryClient: registryClient,

0 commit comments

Comments
 (0)