swiftlang / swift-docc-plugin

Swift Package Manager command plugin for Swift-DocC
https://swiftpackageindex.com/swiftlang/swift-docc-plugin/documentation/swiftdoccplugin
Apache License 2.0
326 stars 52 forks source link

Replace os() with canImport(Darwin) #61

Closed o-nnerb closed 1 year ago

o-nnerb commented 1 year ago

Summary

_Provide a description of what your PR addresses, explaining the expected user experience.

I updated the #if os() usage for Apple's platform to a better solution as #if canImport(Darwin). With this solution, there's no need to add one more os(xrOS).

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

I didn't implement anything new, so no documentation is needed to be updated neither implementing additional tests.

o-nnerb commented 1 year ago

As discussed here this solution may not fit well. Since Swift doesn’t isolate packages based on their dependency tree, this code can actually introduce new bugs.

So I'll close this for now, as I understand more about the problem I was trying to solve.