Giter Site home page Giter Site logo

Comments (3)

allevato avatar allevato commented on September 24, 2024

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:

https://github.com/apple/swift-syntax/blob/master/Sources/SwiftSyntax/AtomicCounter.swift#L42

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.

@akyrtzi, do you have any insight here?

from swift-format.

akyrtzi avatar akyrtzi commented on September 24, 2024

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

from swift-format.

allevato avatar allevato commented on September 24, 2024

swiftlang/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.

from swift-format.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.