You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
motivation: new package location validation is a pure string comparison which is not subtle enough to address how git URLs can be expressed
changes:
* use the canonical location facilities to compare package locations
* add more tests
diagnostics.emit(.warning(error.description +". this will be upgraded to an error in future versions of SwiftPM."), location:package.diagnosticLocation)
272
+
diagnostics.emit(.warning(error.description +". this will be escalated to an error in future versions of SwiftPM."), location:package.diagnosticLocation)
@@ -6398,11 +6398,11 @@ final class WorkspaceTests: XCTestCase {
6398
6398
)
6399
6399
6400
6400
// 9/2021 this is currently emitting a warning only to support backwards compatibility
6401
-
// we will upgrade this to an error in a few versions to tighten up the validation
6401
+
// we will escalate this to an error in a few versions to tighten up the validation
6402
6402
workspace.checkPackageGraph(roots:["Root"]){ graph, diagnostics in
6403
6403
DiagnosticsEngineTester(diagnostics){ result in
6404
6404
result.check(
6405
-
diagnostic:"'bar' dependency on '/tmp/ws/pkgs/other-foo/utility' conflicts with dependency on '/tmp/ws/pkgs/foo/utility' which has the same identity 'utility'. this will be upgraded to an error in future versions of SwiftPM.",
6405
+
diagnostic:"'bar' dependency on '/tmp/ws/pkgs/other-foo/utility' conflicts with dependency on '/tmp/ws/pkgs/foo/utility' which has the same identity 'utility'. this will be escalated to an error in future versions of SwiftPM.",
6406
6406
behavior:.warning,
6407
6407
location:"'BarPackage' /tmp/ws/pkgs/bar"
6408
6408
)
@@ -6417,7 +6417,151 @@ final class WorkspaceTests: XCTestCase {
@@ -6484,15 +6628,80 @@ final class WorkspaceTests: XCTestCase {
6484
6628
]
6485
6629
)
6486
6630
6487
-
// FIXME: this should not emit an error/warning - we should reconcile the URLS styles
6488
6631
workspace.checkPackageGraph(roots:["Root"]){ graph, diagnostics in
6489
-
DiagnosticsEngineTester(diagnostics){ result in
6490
-
result.check(
6491
-
diagnostic:"'bar' dependency on 'git@github.com:foo/foo.git' conflicts with dependency on 'https://github.com/foo/foo.git' which has the same identity 'foo'. this will be upgraded to an error in future versions of SwiftPM.",
workspace.checkPackageGraph(roots:["Root"]){ graph, diagnostics in
6704
+
XCTAssertNoDiagnostics(diagnostics)
6496
6705
}
6497
6706
}
6498
6707
@@ -6564,11 +6773,11 @@ final class WorkspaceTests: XCTestCase {
6564
6773
)
6565
6774
6566
6775
// 9/2021 this is currently emitting a warning only to support backwards compatibility
6567
-
// we will upgrade this to an error in a few versions to tighten up the validation
6776
+
// we will escalate this to an error in a few versions to tighten up the validation
6568
6777
workspace.checkPackageGraph(roots:["Root"]){ graph, diagnostics in
6569
6778
DiagnosticsEngineTester(diagnostics){ result in
6570
6779
result.check(
6571
-
diagnostic:"'bar' dependency on 'https://github.com/foo-moved/foo.git' conflicts with dependency on 'https://github.com/foo/foo.git' which has the same identity 'foo'. this will be upgraded to an error in future versions of SwiftPM.",
6780
+
diagnostic:"'bar' dependency on 'https://github.com/foo-moved/foo.git' conflicts with dependency on 'https://github.com/foo/foo.git' which has the same identity 'foo'. this will be escalated to an error in future versions of SwiftPM.",
0 commit comments