Skip to content

Would you consider replacing SWXMLHash with xylem (pure-Swift XML parser) on Linux? #855

Backlog

Description

@zunda-pixel

On Linux, SourceKittenFramework links libxml2 through SWXMLHash → FoundationXML. Binaries built on one distribution then depend on that distribution's libxml2 soname. For example, SwiftLint's Linux binary built on Ubuntu 24.04 doesn't start on Ubuntu 26.04 because libxml2.so.2 is gone there (realm/SwiftLint#6966).

xylem is an XML parser written in pure Swift with no Foundation, C or system library dependencies. I tried replacing SWXMLHash with it to see whether it would work for SourceKitten.

With it, SourceKitten's XML-related tests pass on Linux (Swift 6.3.3), and SwiftLint built against it no longer links libxml2 and runs on Ubuntu 26.04.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions