Confused by unsafe flags being disallowed in dependencies

This was part of the target-specific build settings proposal, see: swift-evolution/0238-package-manager-build-settings.md at master · apple/swift-evolution · GitHub

The initial proposal did have an escape hatch which would bypass this limitation by using a command-line flag (something like --allow-unsafe-flags-in-dependencies). However, we decided to revisit this topic at a later point. I am not sure if using a command-line flag is the best idea. Maybe we should provide a API in the manifest file that allows you explicitly opt-in into using a package with unsafe flags. It'd be great if you wanted to explore this and come up with a proposal.

That said, I do think that this limitation doesn't make sense for local/branch-based package dependencies and I am planning to work on a patch to lift this limitation for those cases. Filed: [SR-11225] Allow 'unsafe' flags in local/branch-based dependencies · Issue #4681 · apple/swift-package-manager · GitHub

5 Likes