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
I've also run into this on Linux, but admittedly it's not a platform that I'm regularly able to test on.
This appears to be an issue in swift-syntax; if I remember correctly, the call to dlsym here is returning nil instead of the pointer to the symbol that's statically linked into the executable:
I think the fact that SwiftSyntax uses dlsym to find that C function at runtime might mean that any Linux clients will be forced to pass something like --export-dynamic to the linker.
Whoa, I wasn't aware the `dlsym` trick is not working for linux. The point of this was to avoid needing to add a separate module, that would also have to be present for `import SwiftSyntax` to work, for just a single C function.
But instead of this trick, we could probably be able to use the `@_implementationOnly import` feature that was introduced in swift-5.1
apple/swift-syntax#140 fixes the underlying issue in SwiftSyntax, but I'll wait to close this out until swift-format has been updated to depend on a version that includes that change.
Environment
ubuntu 19.04
swift in my $PATH
Swift version 5.1-dev (LLVM 8d110eebee, Swift 89382f712a)
Target: x86_64-unknown-linux-gnu
Additional Detail from JIRA
md5: aad73f8681deb060cc0a19a6b3c5d9bd
Issue Description:
I cloned swift-format, ran `swift build` and after running `/swift-format/.build/debug/swift-format ./test.swift` I was greeted by
It doesn't happen on macos.
The text was updated successfully, but these errors were encountered: