ordo-one / package-benchmark

Swift benchmark runner with many performance metrics and great CI support
Apache License 2.0
313 stars 25 forks source link

Warning about visionOS #256

Closed dnadoba closed 1 month ago

dnadoba commented 4 months ago

If visionsOS is not defined we get a warning during building:

13:28:13 warning: 'package-benchmark': /swift-asn1/Benchmarks/.build/checkouts/package-benchmark/Package.swift:119:59: warning: unknown operating system for build configuration 'os'
13:28:13 #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
13:28:13                                                           ^
13:28:13 /swift-asn1/Benchmarks/.build/checkouts/package-benchmark/Package.swift:119:59: note: did you mean 'iOS'?
13:28:13 #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
13:28:13                                                           ^~~~~~~~
13:28:13                                                           iOS
13:28:13 /swift-asn1/Benchmarks/.build/checkouts/package-benchmark/Package.swift:119:59: note: did you mean 'Windows'?
13:28:13 #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
13:28:13                                                           ^~~~~~~~
13:28:13                                                           Windows

https://ci.swiftserver.group/job/swift-asn1-swift510-prb/16/console

Note that it is just a warning, not an error.

Lukasa commented 4 months ago

Our recommendation to avoid this would be to use #if canImport(Darwin).

hassila commented 3 months ago

Thanks, been out of office will have a look. Need to check, iirc there was some issue with checking for Darwin @axelandersson do your remember?

axelandersson commented 3 months ago

@hassila Afraid not, but let's try it.

hassila commented 1 month ago

Fixed by https://github.com/ordo-one/package-benchmark/pull/261