cgrindel / rules_swift_package_manager

Collection of utilities and Bazel rules to aid in the development and maintenance of Swift repositories using Bazel.
Apache License 2.0
74 stars 26 forks source link

Decide how to support `cxxLanguageStandard` in a Swift manifest. #166

Open cgrindel opened 1 year ago

cgrindel commented 1 year ago

The problem is that we do not want to add it to the cxxopts for each target. It would override the values in the .bazelrc. Also, I think that you do not want modules linked with different standards.

Example:

keith commented 1 year ago

I think you probably do want to override the global ones for each target as this could be saying "it's only compatible with this version". At the very least that's likely the only version it's tested with.

If that became a big issue cargo raze has a clever system for overriding things like this

cgrindel commented 1 year ago

Interesting. I thought it best practice to specify -std=XXX once for the whole project. It definitely would not be difficult to specify it at the target level.

keith commented 1 year ago

I agree with that for all your own code but yea I think for third parties like this it's more complicated. I think many bazel libraries just throw this in their Copts as well for the same reason but I'd have to double check in envoy how many do