Closed bonyadmitr closed 3 years ago
i've found doc description: https://github.com/apple/swift-syntax#embedding-swiftsyntax-in-an-application
Added SwiftSyntaxHighlighter using SPM in new macOS project and got error:
When do you get this error? Is it when you try building and running your package executable with Xcode?
Added SwiftSyntaxHighlighter using SPM in new macOS project and got error:
When do you get this error? Is it when you try building and running your package executable with Xcode?
yes, on running with Xcode.
@bonyadmitr Thanks for confirming. This looks like the same issue as https://github.com/SwiftDocOrg/SwiftSemantics/issues/2:
Until a better solution is provided upstream, my suggestion would be to run
swift package generate-xcodeproj
to generate an Xcode project and thenxed <#Package#>.xcodeproj
to open the generated project directly.
@bonyadmitr Thanks for confirming. This looks like the same issue as SwiftDocOrg/SwiftSemantics#2:
Until a better solution is provided upstream, my suggestion would be to run
swift package generate-xcodeproj
to generate an Xcode project and thenxed <#Package#>.xcodeproj
to open the generated project directly.
yea, seems the same.
maybe it should be fixed by doc link: https://github.com/apple/swift-syntax#embedding-swiftsyntax-in-an-application
i tried it but couldn't build it yourself from the Swift repository,
. i got build-parser-lib
script error.
and thanks for answer!
I was able to get this working in Xcode 12.5 using the latest OSS Toolchain. I just updated the README with details about how to do this with 72f1496.
Added SwiftSyntaxHighlighter using SPM in new macOS project and got error:
Also found similar problems in other projects: https://github.com/realm/SwiftLint/issues/3105 https://github.com/uber/mockolo/issues/108
Couldn't find solution.
Xcode Version 11.4.1 (11E503a)