File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Tests/PackageLoadingTests Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -979,7 +979,12 @@ extension TSCBasic.Diagnostic.Message {
979
979
}
980
980
981
981
static func unknownPackageInTargetDependencies( targetName: String , packageName: String ) -> Self {
982
- . error( " unknown package ' \( packageName) ' in dependencies of target ' \( targetName) ' " )
982
+ . error( """
983
+ unknown package ' \( packageName) ' in dependencies of target ' \( targetName) '; if the package is named \
984
+ differently from the product, either use '.product(name: " \( packageName) " , package: <package-name>)' to \
985
+ specify the package name or give the package the ' \( packageName) ' name using '.package(name: \
986
+ " \( packageName) " , ...)'
987
+ """ )
983
988
}
984
989
985
990
static func invalidBinaryLocation( targetName: String ) -> Self {
Original file line number Diff line number Diff line change @@ -110,7 +110,11 @@ class PackageDescription5_2LoadingTests: PackageDescriptionLoadingTests {
110
110
"""
111
111
112
112
XCTAssertManifestLoadThrows ( stream. bytes) { _, diagnostics in
113
- diagnostics. check ( diagnostic: " unknown package 'foo1' in dependencies of target 'foo' " , behavior: . error)
113
+ diagnostics. check ( diagnostic: """
114
+ unknown package 'foo1' in dependencies of target 'foo'; if the package is named differently from \
115
+ the product, either use '.product(name: " foo1 " , package: <package-name>)' to specify the package \
116
+ name or give the package the 'foo1' name using '.package(name: " foo1 " , ...)'
117
+ """ , behavior: . error)
114
118
}
115
119
}
116
120
@@ -133,7 +137,11 @@ class PackageDescription5_2LoadingTests: PackageDescriptionLoadingTests {
133
137
"""
134
138
135
139
XCTAssertManifestLoadThrows ( stream. bytes) { _, diagnostics in
136
- diagnostics. check ( diagnostic: " unknown package 'bar' in dependencies of target 'foo' " , behavior: . error)
140
+ diagnostics. check ( diagnostic: """
141
+ unknown package 'bar' in dependencies of target 'foo'; if the package is named differently from \
142
+ the product, either use '.product(name: " bar " , package: <package-name>)' to specify the package \
143
+ name or give the package the 'bar' name using '.package(name: " bar " , ...)'
144
+ """ , behavior: . error)
137
145
}
138
146
}
139
147
}
You can’t perform that action at this time.
0 commit comments