swiftlang / swift-docc-plugin

Swift Package Manager command plugin for Swift-DocC
https://swiftpackageindex.com/apple/swift-docc-plugin/1.3.0/documentation/swiftdoccplugin
Apache License 2.0
316 stars 54 forks source link

Release 1.4.0 is not building on Linux before Swift 6 #92

Closed vsarunas closed 3 weeks ago

vsarunas commented 3 weeks ago
error: fatalError
/tmp/swift-docc-plugin/Plugins/Swift-DocC Convert/Symbolic Links/SharedPackagePluginExtensions/PackageManager+getSymbolGraphsForDocC.swift:74:64: error: value of type 'NSLock' has no member 'withLock'
        let targetSymbolGraphs = try symbolGraphGenerationLock.withLock {
$ swift --version
Swift version 5.10 (swift-5.10-RELEASE)
Target: x86_64-unknown-linux-gnu
hassila commented 3 weeks ago

Ping @d-ronnqvist

finagolfin commented 3 weeks ago

I'm seeing this on my Android CI too, can confirm that the just-released 1.4.0 tag broke building this plugin with Swift 5.10.1 on linux:

swift-nio/.build/checkouts/swift-docc-plugin/Plugins/Swift-DocC Convert/Symbolic Links/SharedPackagePluginExtensions/PackageManager+getSymbolGraphsForDocC.swift:74:64: error: value of type 'NSLock' has no member 'withLock'
        let targetSymbolGraphs = try symbolGraphGenerationLock.withLock {
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~

It works fine with the upcoming Swift 6 and 6.1.

d-ronnqvist commented 3 weeks ago

This should be resolved in release 1.4.1 now.

hassila commented 3 weeks ago

Super, thanks @d-ronnqvist !

thomasvl commented 3 weeks ago

I think we're still seeing problems with Swift 5.8.1 on linux:

https://github.com/apple/swift-protobuf/actions/runs/10529237017/job/29178134702?pr=1694

d-ronnqvist commented 3 weeks ago

That looks like a different failure than before.

d-ronnqvist commented 3 weeks ago

I'm on vacation next week, away from a computer, but I can look at this when I get back if no one else has fixed this by then.