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
Make sure we flush the diagnostics consumers to prevent the new
diagnostic style to buffer the deserialization errors without printing
them. These errors may be printed right before an `abort()`, which would
bypass the actual printing of the errors.
Take advantage of the new style to make these diagnostics more readable
as well.
```
.../LibWithXRef.swiftmodule:1:1: remark: reference to type 'MyType'
broken by a context change; 'MyType' was expected to be in 'A', but now
a candidate is found only in 'A_related'
1 │ A.MyType
│ ├─ remark: reference to type 'MyType' broken by a context change;
'MyType' was expected to be in 'A', but now a candidate is found only in
'A_related'
│ ├─ note: the type was expected to be found in module 'A' at
‘.../A.swiftmodule'
│ ├─ note: or expected to be found in the underlying module 'A'
defined at ‘.../module.modulemap'
│ ├─ note: the type was actually found in module 'A_related' at
‘.../A_related.swiftmodule'
│ ├─ note: the module 'LibWithXRef' was built with a Swift language
version set to 5.10 while the current invocation uses 4.1.50; APINotes
may change how clang declarations are imported
│ ├─ note: the module 'LibWithXRef' has enabled library-evolution; the
following file may need to be deleted if the SDK was modified:
‘.../LibWithXRef.swiftmodule'
│ ├─ note: declarations in the underlying clang module 'A' may be
hidden by clang preprocessor macros
│ ├─ note: the distributed module 'LibWithXRef' refers to the local
module 'A'; this may be caused by header maps or search paths
│ ╰─ note: the type 'MyType' moved between related modules; clang
preprocessor macros may affect headers shared between these modules
.../LibWithXRef.swiftmodule:1:1: note: could not deserialize type for
'foo()'
1 │ A.MyType
│ ╰─ note: could not deserialize type for 'foo()'
```
rdar://124700605
Copy file name to clipboardExpand all lines: test/Serialization/Recovery/module-recovery-remarks.swift
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -17,38 +17,38 @@
17
17
// CHECK-MOVED: LibWithXRef.swiftmodule:1:1: remark: reference to type 'MyType' broken by a context change; 'MyType' was expected to be in 'A', but now a candidate is found only in 'A_related'
18
18
19
19
/// Contextual notes about the modules involved.
20
-
// CHECK-MOVED: <unknown>:0: note: the type was expected to be found in module 'A' at '
20
+
// CHECK-MOVED: note: the type was expected to be found in module 'A' at '
21
21
// CHECK-MOVED-SAME: A.swiftmodule'
22
-
// CHECK-MOVED: <unknown>:0: note: or expected to be found in the underlying module 'A' defined at '
22
+
// CHECK-MOVED: note: or expected to be found in the underlying module 'A' defined at '
23
23
// CHECK-MOVED-SAME: module.modulemap'
24
-
// CHECK-MOVED: <unknown>:0: note: the type was actually found in module 'A_related' at '
24
+
// CHECK-MOVED: note: the type was actually found in module 'A_related' at '
25
25
// CHECK-MOVED-SAME: A_related.swiftmodule'
26
26
27
27
/// More notes depending on the context
28
-
// CHECK-MOVED: <unknown>:0: note: the module 'LibWithXRef' was built with a Swift language version set to 5
28
+
// CHECK-MOVED: note: the module 'LibWithXRef' was built with a Swift language version set to 5
29
29
// CHECK-MOVED-SAME: while the current invocation uses 4
30
30
31
-
// CHECK-MOVED: <unknown>:0: note: the module 'LibWithXRef' has enabled library-evolution; the following file may need to be deleted if the SDK was modified: '
31
+
// CHECK-MOVED: note: the module 'LibWithXRef' has enabled library-evolution; the following file may need to be deleted if the SDK was modified: '
32
32
// CHECK-MOVED-SAME: LibWithXRef.swiftmodule'
33
-
// CHECK-MOVED: <unknown>:0: note: declarations in the underlying clang module 'A' may be hidden by clang preprocessor macros
34
-
// CHECK-MOVED: <unknown>:0: note: the distributed module 'LibWithXRef' refers to the local module 'A'; this may be caused by header maps or search paths
35
-
// CHECK-MOVED: <unknown>:0: note: the type 'MyType' moved between related modules; clang preprocessor macros may affect headers shared between these modules
33
+
// CHECK-MOVED: note: declarations in the underlying clang module 'A' may be hidden by clang preprocessor macros
34
+
// CHECK-MOVED: note: the distributed module 'LibWithXRef' refers to the local module 'A'; this may be caused by header maps or search paths
35
+
// CHECK-MOVED: note: the type 'MyType' moved between related modules; clang preprocessor macros may affect headers shared between these modules
36
36
// CHECK-MOVED: note: could not deserialize type for 'foo()'
37
37
// CHECK-MOVED: error: cannot find 'foo' in scope
38
38
39
39
/// Move A to the SDK, triggering a different note about layering.
// CHECK-LAYERING-FOUND: <unknown>:0: note: the reference may break layering; the candidate was found in the local module 'A_related' for a reference from the distributed module 'LibWithXRef'
43
+
// CHECK-LAYERING-FOUND: note: the reference may break layering; the candidate was found in the local module 'A_related' for a reference from the distributed module 'LibWithXRef'
44
44
// CHECK-LAYERING-FOUND: error: cannot find 'foo' in scope
45
45
46
46
/// Delete A, keep only the underlying clangmodule for notes about clang modules.
Copy file name to clipboardExpand all lines: test/Serialization/modularization-error.swift
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,11 @@
21
21
// CHECK-WORKAROUND: LibWithXRef.swiftmodule:1:1: warning: reference to type 'MyType' broken by a context change; 'MyType' was expected to be in 'A', but now a candidate is found only in 'B'
22
22
// CHECK-WORKAROUND-NEXT: A.MyType
23
23
// CHECK-WORKAROUND-NEXT: ^
24
-
// CHECK-WORKAROUND: <unknown>:0: note: the type was expected to be found in module 'A' at '
24
+
// CHECK-WORKAROUND: note: the type was expected to be found in module 'A' at '
25
25
// CHECK-WORKAROUND-SAME: A.swiftmodule'
26
-
// CHECK-WORKAROUND: <unknown>:0: note: the type was actually found in module 'B' at '
26
+
// CHECK-WORKAROUND: note: the type was actually found in module 'B' at '
27
27
// CHECK-WORKAROUND-SAME: B.swiftmodule'
28
-
// CHECK-WORKAROUND: <unknown>:0: note: attempting forced recovery enabled by -experimental-force-workaround-broken-modules
28
+
// CHECK-WORKAROUND: note: attempting forced recovery enabled by -experimental-force-workaround-broken-modules
0 commit comments