twostraws / Ignite

A static site generator for Swift developers.
MIT License
1.64k stars 84 forks source link

Build Error on Linux #104

Open 0xTim opened 1 month ago

0xTim commented 1 month ago

When running a build on a Linux (Swift 5.10.1) it fails because Ignite is using URL functions that are not currently available on Linux. E.g.

/home/runner/work/iOSDevHappyHourSite/iOSDevHappyHourSite/.build/checkouts/Ignite/Sources/Ignite/Publishing/PublishingContext.swift:376:21: error: cannot infer contextual base in reference to member 'reverse'
            order: .reverse
                   ~^~~~~~~
/home/runner/work/iOSDevHappyHourSite/iOSDevHappyHourSite/.build/checkouts/Ignite/Sources/Ignite/Publishing/PublishingContext.swift:383:49: error: value of type 'URL' has no member 'appending'
            let destinationURL = buildDirectory.appending(path: site.feedConfiguration.path)
                                 ~~~~~~~~~~~~~~ ^~~~~~~~~
/home/runner/work/iOSDevHappyHourSite/iOSDevHappyHourSite/.build/checkouts/Ignite/Sources/Ignite/Publishing/PublishingContext.swift:384:79: error: cannot infer contextual base in reference to member 'utf8'
            try result.write(to: destinationURL, atomically: true, encoding: .utf8)
                                                                             ~^~~~
/home/runner/work/iOSDevHappyHourSite/iOSDevHappyHourSite/.build/checkouts/Ignite/Sources/Ignite/Publishing/PublishingContext.swift:396:49: error: value of type 'URL' has no member 'appending'
            let destinationURL = buildDirectory.appending(path: "robots.txt")
                                 ~~~~~~~~~~~~~~ ^~~~~~~~~
/home/runner/work/iOSDevHappyHourSite/iOSDevHappyHourSite/.build/checkouts/Ignite/Sources/Ignite/Publishing/PublishingContext.swift:413:51: error: value of type 'URL' has no member 'appending'
        let destinationDirectory = buildDirectory.appending(path: destination)
                                   ~~~~~~~~~~~~~~ ^~~~~~~~~
/home/runner/work/iOSDevHappyHourSite/iOSDevHappyHourSite/.build/checkouts/Ignite/Sources/Ignite/Publishing/PublishingContext.swift:431:49: error: value of type 'URL' has no member 'appending'
            let destinationURL = buildDirectory.appending(path: "js/syntax-highlighting.js")
                                 ~~~~~~~~~~~~~~ ^~~~~~~~~

This is more for tracking and notifying as this should be fixed in Swift 6 (which will require #81 to be solved)

twostraws commented 1 month ago

Hello! Yes, I talked to one of the team at the Swift anniversary thing during WWDC, because I was confused and considering going back to the older APIs! I'm looking forward to this one being resolved.

Haibo-Zhou commented 1 month ago

Hello! Yes, I talked to one of the team at the Swift anniversary thing during WWDC, because I was confused and considering going back to the older APIs! I'm looking forward to this one being resolved.

Thanks from Twitter :)