Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package using external Macros package fails to link Swift-Syntax when unit testing #6940

Closed
schwa opened this issue Sep 17, 2023 · 8 comments · Fixed by #6954
Closed

Package using external Macros package fails to link Swift-Syntax when unit testing #6940

schwa opened this issue Sep 17, 2023 · 8 comments · Fixed by #6954
Labels

Comments

@schwa
Copy link

schwa commented Sep 17, 2023

I have a (somewhat experimental) Swift Package ApproximateEquality that exposes a Swift Macro. Everything seems to work fine and the macro works as intended. The macro unit tests all run fine. Yay

I have another project that consumes this package and uses the Macro. It also has a unit test target. This project builds and runs just fine and the unit tests work when run in Xcode. However running the project unit test from the command line via swift test causes a link time failure.

To reproduce this issue I also added an example project to ApproximateEquality that contains a unit test and this too has the same link time error.

Running on macOS 14 (23A339), using Xcode 15 (15A240d) and swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)

To reproduce:

git clone https://github.com/schwa/ApproximateEquality
cd ApproximateEquality
git switch jwight/extended-tests
swift test -v --package-path Examples/ApproximateEqualityExamples

The log out put looks like (you can also see this failure in the project's GitHub actions: https://github.com/schwa/ApproximateEquality/actions/runs/6215234886/job/16867913735)

swift test -v --package-path Examples/ApproximateEqualityExamples

Building for debugging...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -v -L /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug -o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityExamplesPackageTests.xctest/Contents/MacOS/ApproximateEqualityExamplesPackageTests -module-name ApproximateEqualityExamplesPackageTests -Xlinker -bundle -Xlinker -rpath -Xlinker @loader_path/../../../ @/Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityExamplesPackageTests.product/Objects.LinkFileList -Xlinker -rpath -Xlinker /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx -target arm64-apple-macosx13.0 -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEquality.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityMacroImplementation.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityMacros.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityTests.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ComplexModule.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/Numerics.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.swiftmodule -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
Target: arm64-apple-macosx13.0
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEquality.build/ApproximateEquality.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEquality.build/CoreGraphics.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEquality.build/SIMD.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityMacroImplementation.build/DeriveApproximateEquality.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityMacroImplementation.build/Plugin.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityMacroImplementation.build/Support.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityMacros.build/Macros.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityTests.build/ApproximateEqualityTests.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ComplexModule.build/Arithmetic.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ComplexModule.build/Complex.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ComplexModule.build/Differentiable.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ComplexModule.build/ElementaryFunctions.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/Numerics.build/Numerics.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.build/AlgebraicField.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.build/ApproximateEquality.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.build/AugmentedArithmetic.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.build/Double+Real.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.build/ElementaryFunctions.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.build/Float+Real.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.build/Float16+Real.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.build/Float80+Real.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.build/Real.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.build/RealFunctions.swift.o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/_NumericsShims.build/_NumericsShims.c.o -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk --target=arm64-apple-macosx13.0 -force_load /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCompatibilityPacks.a -L /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/lib/swift -L /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib -Xlinker -bundle -Xlinker -rpath -Xlinker @loader_path/../../../ -Xlinker -rpath -Xlinker /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEquality.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityMacroImplementation.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityMacros.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityTests.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ComplexModule.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/Numerics.swiftmodule -Xlinker -add_ast_path -Xlinker /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/RealModule.swiftmodule -o /Users/schwa/Shared/Projects/ApproximateEquality/Examples/ApproximateEqualityExamples/.build/arm64-apple-macosx/debug/ApproximateEqualityExamplesPackageTests.xctest/Contents/MacOS/ApproximateEqualityExamplesPackageTests
ld: Undefined symbols:
  protocol conformance descriptor for SwiftSyntax.MemberBlockSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.MemberBlockSyntax and conformance SwiftSyntax.MemberBlockSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.MemberBlockSyntax, referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.MemberBlockSyntax and conformance SwiftSyntax.MemberBlockSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.DeclModifierSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.DeclModifierSyntax and conformance SwiftSyntax.DeclModifierSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  nominal type descriptor for SwiftSyntax.DeclModifierSyntax, referenced from:
      _symbolic _____ 11SwiftSyntax012DeclModifierB0V in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.DeclModifierSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.DeclModifierSyntax and conformance SwiftSyntax.DeclModifierSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
      key path getter for (extension in SwiftSyntax):SwiftSyntax.SyntaxProtocol.trimmedDescription : Swift.String : SwiftSyntax.DeclModifierSyntax in DeriveApproximateEquality.swift.o
  SwiftSyntax.VariableDeclSyntax.attributes.getter : SwiftSyntax.AttributeListSyntax, referenced from:
      closure apple/swift#2 (SwiftSyntax.VariableDeclSyntax) -> Swift.Bool in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      closure apple/swift#2 (SwiftSyntax.VariableDeclSyntax) -> Swift.Bool in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.VariableDeclSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.VariableDeclSyntax and conformance SwiftSyntax.VariableDeclSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  nominal type descriptor for SwiftSyntax.VariableDeclSyntax, referenced from:
      _symbolic Say_____G 11SwiftSyntax012VariableDeclB0V in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.VariableDeclSyntax, referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.VariableDeclSyntax and conformance SwiftSyntax.VariableDeclSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
      closure apple/swift#1 (SwiftSyntax.SyntaxProtocol) -> SwiftSyntax.VariableDeclSyntax in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      closure apple/swift#3 (SwiftSyntax.VariableDeclSyntax) -> SwiftSyntax.SyntaxProtocol in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.AttributeListSyntax.Element : SwiftSyntax.SyntaxProtocol in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.AttributeListSyntax.Element and conformance SwiftSyntax.AttributeListSyntax.Element : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.AttributeListSyntax.Element, referenced from:
      closure apple/swift#1 (SwiftSyntax.AttributeListSyntax.Element) -> Swift.Bool in closure apple/swift#2 (SwiftSyntax.VariableDeclSyntax) -> Swift.Bool in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.AttributeListSyntax.Element and conformance SwiftSyntax.AttributeListSyntax.Element : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.AttributeListSyntax, referenced from:
      closure apple/swift#2 (SwiftSyntax.VariableDeclSyntax) -> Swift.Bool in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      closure apple/swift#2 (SwiftSyntax.VariableDeclSyntax) -> Swift.Bool in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.AttributeListSyntax and conformance SwiftSyntax.AttributeListSyntax : Swift.Collection in SwiftSyntax in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.AttributeListSyntax and conformance SwiftSyntax.AttributeListSyntax : Swift.Sequence in SwiftSyntax in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.AttributeListSyntax : Swift.Sequence in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.AttributeListSyntax and conformance SwiftSyntax.AttributeListSyntax : Swift.Sequence in SwiftSyntax in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.AttributeListSyntax : Swift.Collection in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.AttributeListSyntax and conformance SwiftSyntax.AttributeListSyntax : Swift.Collection in SwiftSyntax in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.ExtensionDeclSyntax : SwiftSyntaxBuilder.DeclSyntaxParseable in SwiftSyntaxBuilder, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.ExtensionDeclSyntax and conformance SwiftSyntax.ExtensionDeclSyntax : SwiftSyntaxBuilder.DeclSyntaxParseable in SwiftSyntaxBuilder in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.ExtensionDeclSyntax, referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.ExtensionDeclSyntax and conformance SwiftSyntax.ExtensionDeclSyntax : SwiftSyntaxBuilder.DeclSyntaxParseable in SwiftSyntaxBuilder in DeriveApproximateEquality.swift.o
  SwiftSyntax.IdentifierTypeSyntax.name.getter : SwiftSyntax.TokenSyntax, referenced from:
      closure apple/swift#5 (SwiftSyntax.PatternBindingSyntax) -> Swift.String in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.IdentifierTypeSyntax : SwiftSyntax.TypeSyntaxProtocol in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.IdentifierTypeSyntax and conformance SwiftSyntax.IdentifierTypeSyntax : SwiftSyntax.TypeSyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.IdentifierTypeSyntax, referenced from:
      closure apple/swift#5 (SwiftSyntax.PatternBindingSyntax) -> Swift.String in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.IdentifierTypeSyntax and conformance SwiftSyntax.IdentifierTypeSyntax : SwiftSyntax.TypeSyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  SwiftSyntax.PatternBindingSyntax.typeAnnotation.getter : SwiftSyntax.TypeAnnotationSyntax?, referenced from:
      closure apple/swift#5 (SwiftSyntax.PatternBindingSyntax) -> Swift.String in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  SwiftSyntax.PatternBindingSyntax.pattern.getter : SwiftSyntax.PatternSyntax, referenced from:
      closure apple/swift#5 (SwiftSyntax.PatternBindingSyntax) -> Swift.String in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.PatternBindingSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.PatternBindingSyntax and conformance SwiftSyntax.PatternBindingSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  nominal type descriptor for SwiftSyntax.PatternBindingSyntax, referenced from:
      _symbolic Say_____G 11SwiftSyntax014PatternBindingB0V in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.PatternBindingSyntax, referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      closure apple/swift#3 (SwiftSyntax.VariableDeclSyntax) -> SwiftSyntax.SyntaxProtocol in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      closure apple/swift#4 (SwiftSyntax.SyntaxProtocol) -> SwiftSyntax.PatternBindingSyntax in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.PatternBindingSyntax and conformance SwiftSyntax.PatternBindingSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  SwiftSyntax.TypeAnnotationSyntax.type.getter : SwiftSyntax.TypeSyntax, referenced from:
      closure apple/swift#5 (SwiftSyntax.PatternBindingSyntax) -> Swift.String in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.MemberBlockItemSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.MemberBlockItemSyntax and conformance SwiftSyntax.MemberBlockItemSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.MemberBlockItemSyntax, referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.MemberBlockItemSyntax and conformance SwiftSyntax.MemberBlockItemSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.DeclModifierListSyntax, referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.DeclModifierListSyntax and conformance SwiftSyntax.DeclModifierListSyntax : Swift.Collection in SwiftSyntax in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.DeclModifierListSyntax : Swift.Collection in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.DeclModifierListSyntax and conformance SwiftSyntax.DeclModifierListSyntax : Swift.Collection in SwiftSyntax in DeriveApproximateEquality.swift.o
  SwiftSyntax.IdentifierPatternSyntax.identifier.getter : SwiftSyntax.TokenSyntax, referenced from:
      closure apple/swift#5 (SwiftSyntax.PatternBindingSyntax) -> Swift.String in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.IdentifierPatternSyntax : SwiftSyntax.PatternSyntaxProtocol in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.IdentifierPatternSyntax and conformance SwiftSyntax.IdentifierPatternSyntax : SwiftSyntax.PatternSyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.IdentifierPatternSyntax, referenced from:
      closure apple/swift#5 (SwiftSyntax.PatternBindingSyntax) -> Swift.String in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.IdentifierPatternSyntax and conformance SwiftSyntax.IdentifierPatternSyntax : SwiftSyntax.PatternSyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.PatternBindingListSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.PatternBindingListSyntax and conformance SwiftSyntax.PatternBindingListSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.PatternBindingListSyntax, referenced from:
      closure apple/swift#3 (SwiftSyntax.VariableDeclSyntax) -> SwiftSyntax.SyntaxProtocol in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.PatternBindingListSyntax and conformance SwiftSyntax.PatternBindingListSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.MemberBlockItemListSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.MemberBlockItemListSyntax and conformance SwiftSyntax.MemberBlockItemListSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.MemberBlockItemListSyntax, referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.MemberBlockItemListSyntax and conformance SwiftSyntax.MemberBlockItemListSyntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.DeclSyntax, referenced from:
      static ApproximateEqualityMacroImplementation.ApproximateEqualityIgnored.expansion<A, B where A: SwiftSyntax.DeclSyntaxProtocol, B: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, providingPeersOf: A, in: B) throws -> [SwiftSyntax.DeclSyntax] in DeriveApproximateEquality.swift.o
  SwiftSyntax.TypeSyntax.as<A where A: SwiftSyntax.TypeSyntaxProtocol>(A.Type) -> A?, referenced from:
      closure apple/swift#5 (SwiftSyntax.PatternBindingSyntax) -> Swift.String in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  type metadata for SwiftSyntax.TokenSyntax, referenced from:
      closure apple/swift#5 (SwiftSyntax.PatternBindingSyntax) -> Swift.String in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.TokenSyntax and conformance SwiftSyntax.TokenSyntax : Swift.CustomStringConvertible in SwiftSyntax in DeriveApproximateEquality.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.TokenSyntax and conformance SwiftSyntax.TokenSyntax : Swift.TextOutputStreamable in SwiftSyntax in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.TokenSyntax : Swift.TextOutputStreamable in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.TokenSyntax and conformance SwiftSyntax.TokenSyntax : Swift.TextOutputStreamable in SwiftSyntax in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.TokenSyntax : Swift.CustomStringConvertible in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.TokenSyntax and conformance SwiftSyntax.TokenSyntax : Swift.CustomStringConvertible in SwiftSyntax in DeriveApproximateEquality.swift.o
  SwiftSyntax.PatternSyntax.as<A where A: SwiftSyntax.PatternSyntaxProtocol>(A.Type) -> A?, referenced from:
      closure apple/swift#5 (SwiftSyntax.PatternBindingSyntax) -> Swift.String in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  protocol conformance descriptor for SwiftSyntax.Syntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.Syntax and conformance SwiftSyntax.Syntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in Support.swift.o
  type metadata for SwiftSyntax.Syntax, referenced from:
      (extension in ApproximateEqualityMacroImplementation):SwiftSyntax.SyntaxProtocol.match(path: [ApproximateEqualityMacroImplementation.Match], viewMode: SwiftSyntax.SyntaxTreeViewMode) -> [SwiftSyntax.SyntaxProtocol] in Support.swift.o
      (extension in ApproximateEqualityMacroImplementation):SwiftSyntax.SyntaxProtocol.match(path: [ApproximateEqualityMacroImplementation.Match], viewMode: SwiftSyntax.SyntaxTreeViewMode) -> [SwiftSyntax.SyntaxProtocol] in Support.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.Syntax and conformance SwiftSyntax.Syntax : SwiftSyntax.SyntaxProtocol in SwiftSyntax in Support.swift.o
  nominal type descriptor for SwiftSyntax.SyntaxChildren, referenced from:
      _symbolic _____y_____G s16IndexingIteratorV 11SwiftSyntax0D8ChildrenV in Support.swift.o
  type metadata for SwiftSyntax.SyntaxChildren, referenced from:
      (extension in ApproximateEqualityMacroImplementation):SwiftSyntax.SyntaxProtocol.match(path: [ApproximateEqualityMacroImplementation.Match], viewMode: SwiftSyntax.SyntaxTreeViewMode) -> [SwiftSyntax.SyntaxProtocol] in Support.swift.o
      lazy protocol witness table accessor for type SwiftSyntax.SyntaxChildren and conformance SwiftSyntax.SyntaxChildren : Swift.Collection in SwiftSyntax in Support.swift.o
  protocol conformance descriptor for SwiftSyntax.SyntaxChildren : Swift.Collection in SwiftSyntax, referenced from:
      lazy protocol witness table accessor for type SwiftSyntax.SyntaxChildren and conformance SwiftSyntax.SyntaxChildren : Swift.Collection in SwiftSyntax in Support.swift.o
  protocol descriptor for SwiftSyntax.SyntaxProtocol, referenced from:
      _symbolic ______pXp 11SwiftSyntax0B8ProtocolP in DeriveApproximateEquality.swift.o
      _symbolic Say______pG 11SwiftSyntax0B8ProtocolP in DeriveApproximateEquality.swift.o
      _symbolic ______p 11SwiftSyntax0B8ProtocolP in DeriveApproximateEquality.swift.o
      _symbolic Say______pXpG 11SwiftSyntax0B8ProtocolP in Support.swift.o
      _symbolic Sb______pc 11SwiftSyntax0B8ProtocolP in Support.swift.o
  (extension in SwiftSyntax):SwiftSyntax.SyntaxProtocol.syntaxNodeType.getter : SwiftSyntax.SyntaxProtocol.Type, referenced from:
      ApproximateEqualityMacroImplementation.Match.match(SwiftSyntax.SyntaxProtocol) -> Swift.Bool in Support.swift.o
  (extension in SwiftSyntax):SwiftSyntax.SyntaxProtocol.trimmedDescription.getter : Swift.String, referenced from:
      key path getter for (extension in SwiftSyntax):SwiftSyntax.SyntaxProtocol.trimmedDescription : Swift.String : SwiftSyntax.DeclModifierSyntax in DeriveApproximateEquality.swift.o
      closure apple/swift#1 (SwiftSyntax.AttributeListSyntax.Element) -> Swift.Bool in closure apple/swift#2 (SwiftSyntax.VariableDeclSyntax) -> Swift.Bool in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      l_keypath in DeriveApproximateEquality.swift.o
  property descriptor for (extension in SwiftSyntax):SwiftSyntax.SyntaxProtocol.trimmedDescription : Swift.String, referenced from:
      l_got.$s11SwiftSyntax0B8ProtocolPAAE18trimmedDescriptionSSvpMV in DeriveApproximateEquality.swift.o
  (extension in SwiftSyntax):SwiftSyntax.SyntaxProtocol.as<A where A1: SwiftSyntax.SyntaxProtocol>(A1.Type) -> A1?, referenced from:
      closure apple/swift#1 (SwiftSyntax.SyntaxProtocol) -> SwiftSyntax.VariableDeclSyntax in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      closure apple/swift#4 (SwiftSyntax.SyntaxProtocol) -> SwiftSyntax.PatternBindingSyntax in static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  (extension in SwiftSyntax):SwiftSyntax.SyntaxProtocol.children(viewMode: SwiftSyntax.SyntaxTreeViewMode) -> SwiftSyntax.SyntaxChildren, referenced from:
      (extension in ApproximateEqualityMacroImplementation):SwiftSyntax.SyntaxProtocol.match(path: [ApproximateEqualityMacroImplementation.Match], viewMode: SwiftSyntax.SyntaxTreeViewMode) -> [SwiftSyntax.SyntaxProtocol] in Support.swift.o
  protocol descriptor for SwiftSyntaxMacros.AttachedMacro, referenced from:
      l_got.$s17SwiftSyntaxMacros13AttachedMacroMp in DeriveApproximateEquality.swift.o
  protocol descriptor for SwiftSyntaxMacros.ExtensionMacro, referenced from:
      l_got.$s17SwiftSyntaxMacros14ExtensionMacroMp in DeriveApproximateEquality.swift.o
  protocol descriptor for SwiftSyntaxMacros.Macro, referenced from:
      l_got.$s17SwiftSyntaxMacros5MacroMp in DeriveApproximateEquality.swift.o
      _symbolic ______pXp 17SwiftSyntaxMacros5MacroP in Plugin.swift.o
      _symbolic Say______pXpG 17SwiftSyntaxMacros5MacroP in Plugin.swift.o
  static (extension in SwiftSyntaxMacros):SwiftSyntaxMacros.Macro.formatMode.getter : SwiftSyntaxMacros.FormatMode, referenced from:
      protocol witness for static SwiftSyntaxMacros.Macro.formatMode.getter : SwiftSyntaxMacros.FormatMode in conformance ApproximateEqualityMacroImplementation.DeriveApproximateEquality : SwiftSyntaxMacros.Macro in ApproximateEqualityMacroImplementation in DeriveApproximateEquality.swift.o
      protocol witness for static SwiftSyntaxMacros.Macro.formatMode.getter : SwiftSyntaxMacros.FormatMode in conformance ApproximateEqualityMacroImplementation.ApproximateEqualityIgnored : SwiftSyntaxMacros.Macro in ApproximateEqualityMacroImplementation in DeriveApproximateEquality.swift.o
  protocol descriptor for SwiftSyntaxMacros.PeerMacro, referenced from:
      l_got.$s17SwiftSyntaxMacros9PeerMacroMp in DeriveApproximateEquality.swift.o
  (extension in SwiftSyntaxBuilder):SwiftSyntaxBuilder.DeclSyntaxParseable.init(SwiftSyntaxBuilder.SyntaxNodeString) throws -> A, referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  SwiftSyntaxBuilder.SyntaxNodeString.init(stringInterpolation: SwiftSyntaxBuilder.SyntaxStringInterpolation) -> SwiftSyntaxBuilder.SyntaxNodeString, referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  SwiftSyntaxBuilder.SyntaxStringInterpolation.appendInterpolation<A>(raw: A) -> (), referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  SwiftSyntaxBuilder.SyntaxStringInterpolation.appendInterpolation<A where A: SwiftSyntax.SyntaxProtocol>(A) -> (), referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  SwiftSyntaxBuilder.SyntaxStringInterpolation.appendLiteral(Swift.String) -> (), referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  SwiftSyntaxBuilder.SyntaxStringInterpolation.init(literalCapacity: Swift.Int, interpolationCount: Swift.Int) -> SwiftSyntaxBuilder.SyntaxStringInterpolation, referenced from:
      static ApproximateEqualityMacroImplementation.DeriveApproximateEquality.expansion<A, B, C where A: SwiftSyntax.DeclGroupSyntax, B: SwiftSyntax.TypeSyntaxProtocol, C: SwiftSyntaxMacros.MacroExpansionContext>(of: SwiftSyntax.AttributeSyntax, attachedTo: A, providingExtensionsOf: B, conformingTo: [SwiftSyntax.TypeSyntax], in: C) throws -> [SwiftSyntax.ExtensionDeclSyntax] in DeriveApproximateEquality.swift.o
  protocol descriptor for SwiftCompilerPlugin.CompilerPlugin, referenced from:
      l_got.$s19SwiftCompilerPlugin0bC0Mp in Plugin.swift.o
  static (extension in SwiftCompilerPlugin):SwiftCompilerPlugin.CompilerPlugin.main() throws -> (), referenced from:
      static ApproximateEqualityMacroImplementation.MyMacroPlugin.$main() throws -> () in Plugin.swift.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: fatalError

The workaround seem to be to make the Example unit test also link to Swift-Syntax which seems unnecessary.

@schwa schwa added the bug label Sep 17, 2023
schwa referenced this issue in schwa/ApproximateEquality Sep 17, 2023
… directly to SwiftSyntax (and friends just in case).
@schwa
Copy link
Author

schwa commented Sep 17, 2023

Am wondering if this may be to do with mismatched Swift-Syntax version somehow? This project is using Swift-Syntax 509.0.0… 🤷

@gwynne
Copy link

gwynne commented Sep 21, 2023

We've run into the same problem with this package. When the swift-tools-version in the manifest is changed from 5.8 to 5.9, swift build --build-tests abruptly starts failing with missing symbols. Analysis of the specific symbols missing revealed that every single one came from a module that was a transitive dependency of the test target (e.g. PennyTests depends on Penny, which depends on Rendering - and Rendering was one of the modules whose symbols were missing). I re-ran the builds with -Xswiftc -Xlinker -Xswiftc -v to make the linker dump its response file, and analyzed that - every transitive dependency of the test target was no longer being included in the list of object files passed to the linker. All the errors immediately went away once I added the additional dependencies directly to the test target (a total of 13). It looks as though dependency calculation for test targets regressed severely within the last two weeks of the 5.9.0 release cycle; I could not find a pre-Sept 18 nightly which exhibited the same behavior (however, both the 5.10 and main nightlies all show the same issue).

To summarize:

  • This behavior appears when the root package manifest declares a tools version of at least 5.9. It does not manifest when using exactly the same compiler version, dependencies, and source code with a tools version of 5.8.
  • The issue appears to affect only test targets.
  • The effect is failure to include transitive target dependencies during the link of the xctest bundle on Linux.
  • This was verified to happen on Ubuntu 22.04 (aarch64 and x86_64), Ubuntu 20.04 (aarch64 and x86_64), and AmazonLinux2 (again both archs). The issue does NOT appear on any Darwin platform.
  • The issue appears when using the 5.9.0 release compiler or any subsequent nightly on any active branch. I was unable to find a nightly dated from before the release which exhibited the problem, but I will acknowledge I made only a minimal effort.
  • The issue may or may not have something to do with the use of macros and/or SwiftPM plugins; the Penny package does not include any macros or use swift-syntax directly, but several of its dependencies do one or both. I did not successfully reduce the problem to a trivial repro case.
  • Last but not least, to the best of my ability to determine, this issue has nothing whatsoever to do with the changes I made to autolink extraction (to solve the runaway memory use problem); those changes had been active in the 5.9 nightlies for some time, whereas this problem appears to have been very recently introduced.

@gwynne
Copy link

gwynne commented Sep 21, 2023

@neonichu
Copy link
Contributor

Likely caused by #6875

@neonichu
Copy link
Contributor

We should transfer this over to the SwiftPM repo, cc @shahmishal

Feels right we really have to do this

It does feel like eventually we need to get away from computeDependencies(of:) being a computation on the entire package graph and instead let each package produce separate products which we can then just use transitively, but that is a much bigger change to SwiftPM's build system.

Trying to patch the holes in the current logic doesn't seem to work out particularly well...

@neonichu
Copy link
Contributor

Actually if you're seeing this in 5.9.0, it is more likely to be caused by #6726

@shahmishal shahmishal transferred this issue from swiftlang/swift Sep 21, 2023
@neonichu
Copy link
Contributor

#6714 also made changes in this area...

@MaxDesiatov MaxDesiatov changed the title SPM package using external Swift Macros package fails to link Swift-Syntax when unit testing from CLI Package using external Macros package fails to link Swift-Syntax when unit testing Sep 21, 2023
neonichu added a commit that referenced this issue Sep 28, 2023
In #6726, I discovered that an issue I was fixing for macros and plugins could also apply to executables. That fix was incorrect and would drop legitimate linkage of transitive dependencies when testing executables. The logic here is pretty gnarly, so the most reasonable cause of action seems to be to revert that part of the change.

resolves #6940
@neonichu
Copy link
Contributor

OK, lots of confusing information I pasted here last week, let's clarify a bit:

neonichu added a commit that referenced this issue Sep 29, 2023
In #6726, I discovered that an issue I was fixing for macros and plugins could also apply to executables. That fix was incorrect and would drop legitimate linkage of transitive dependencies when testing executables. The logic here is pretty gnarly, so the most reasonable cause of action seems to be to revert that part of the change.

resolves #6940
neonichu added a commit that referenced this issue Sep 29, 2023
In #6726, I discovered that an issue I was fixing for macros and plugins could also apply to executables. That fix was incorrect and would drop legitimate linkage of transitive dependencies when testing executables. The logic here is pretty gnarly, so the most reasonable cause of action seems to be to revert that part of the change.

resolves #6940

(cherry picked from commit 7c1cbeb)
neonichu added a commit that referenced this issue Sep 29, 2023
In #6726, I discovered that an issue I was fixing for macros and plugins could also apply to executables. That fix was incorrect and would drop legitimate linkage of transitive dependencies when testing executables. The logic here is pretty gnarly, so the most reasonable cause of action seems to be to revert that part of the change.

resolves #6940

(cherry picked from commit 7c1cbeb)
ameter added a commit to ameter/template that referenced this issue Mar 27, 2024
0xTim pushed a commit to vapor/template that referenced this issue Apr 9, 2024
* Update various versions, especially Swift to 5.10

* Use better badges in README

* Fix strict concurrency issues

* Bump CI version

* Correctly work around 5.10's Sendable warnings.

* remove workaround for swiftlang/swift-package-manager#6940

* update strict concurrency setting per https://www.swift.org/documentation/concurrency/

---------

Co-authored-by: Gwynne Raskind <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants