feat: Integrates precedence with command-line options, needs documentation.
All checks were successful
CI / Ubuntu (push) Successful in 2m31s
All checks were successful
CI / Ubuntu (push) Successful in 2m31s
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Dependencies
|
||||
import FileClient
|
||||
import Foundation
|
||||
import LoggingExtensions
|
||||
|
||||
@_spi(Internal)
|
||||
public extension Configuration {
|
||||
@@ -44,8 +45,12 @@ public extension Configuration.Branch {
|
||||
@_spi(Internal)
|
||||
public extension Configuration.SemVar {
|
||||
func merging(_ other: Self?) -> Self {
|
||||
.init(
|
||||
@Dependency(\.logger) var logger
|
||||
logger.dump(other, level: .trace) { "Merging semvar:\n\($0)" }
|
||||
|
||||
return .init(
|
||||
allowPreRelease: other?.allowPreRelease ?? allowPreRelease,
|
||||
precedence: other?.precedence ?? precedence,
|
||||
preRelease: preRelease == nil ? other?.preRelease : preRelease!.merging(other?.preRelease),
|
||||
requireExistingFile: other?.requireExistingFile ?? requireExistingFile,
|
||||
requireExistingSemVar: other?.requireExistingSemVar ?? requireExistingSemVar,
|
||||
|
||||
Reference in New Issue
Block a user