File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,10 @@ public struct SwiftToolOptions: ParsableArguments {
332
332
/// - important: Respects `--netrcOptional` option.
333
333
@Option ( name: . customLong( " netrc-file " ) , completion: . file( ) )
334
334
var netrcFilePath : AbsolutePath ?
335
+
336
+ @Flag ( name: . customLong( " enable-package-registry " ) ,
337
+ help: " Enable dependency resolution using package registries when available " )
338
+ var enablePackageRegistry : Bool = false
335
339
336
340
public init ( ) { }
337
341
}
Original file line number Diff line number Diff line change @@ -565,7 +565,8 @@ public class SwiftTool {
565
565
isResolverPrefetchingEnabled: options. shouldEnableResolverPrefetching,
566
566
skipUpdate: options. skipDependencyUpdate,
567
567
enableResolverTrace: options. enableResolverTrace,
568
- cachePath: cachePath
568
+ cachePath: cachePath,
569
+ enablePackageRegistry: options. enablePackageRegistry
569
570
)
570
571
_workspace = workspace
571
572
_workspaceDelegate = delegate
Original file line number Diff line number Diff line change @@ -230,6 +230,8 @@ public class Workspace {
230
230
231
231
fileprivate let additionalFileRules : [ FileRuleDescription ]
232
232
233
+ fileprivate let enablePackageRegistry : Bool
234
+
233
235
/// Create a new package workspace.
234
236
///
235
237
/// This will automatically load the persisted state for the package, if
@@ -266,7 +268,8 @@ public class Workspace {
266
268
enablePubgrubResolver: Bool = false ,
267
269
skipUpdate: Bool = false ,
268
270
enableResolverTrace: Bool = false ,
269
- cachePath: AbsolutePath ? = nil
271
+ cachePath: AbsolutePath ? = nil ,
272
+ enablePackageRegistry: Bool = false
270
273
) {
271
274
self . delegate = delegate
272
275
self . dataPath = dataPath
@@ -302,6 +305,8 @@ public class Workspace {
302
305
cachePath: repositoriesCachePath)
303
306
self . repositoryManager = repositoryManager
304
307
308
+ self . enablePackageRegistry = enablePackageRegistry
309
+
305
310
self . checkoutsPath = self . dataPath. appending ( component: " checkouts " )
306
311
self . artifactsPath = self . dataPath. appending ( component: " artifacts " )
307
312
You can’t perform that action at this time.
0 commit comments