[PackageGraph] Allow unsafe flags in local and branch-based dependencies#2254
Conversation
<rdar://problem/53557659> SR-11225 This will lift the restriction of using unsafe flags from local and branch-based dependencies.
|
@swift-ci smoke test |
| switch dependency.state { | ||
| case .checkout(let checkout): | ||
| if checkout.isBranchOrRevisionBased { | ||
| result.insert(dependency.packageRef) |
There was a problem hiding this comment.
Is this whole function (unsafeAllowedDependencies) applied recursively to all packages starting from the root? If not, how does this handle indirect references through revision/branch dependencies? i.e. if I have Root -> A -> B where both dependencies are branch dependencies, and B has unsafe flags, can they still be used? Or is that not intended?
I might have misread the test case but it looked as if it only used a single direct dependency.
There was a problem hiding this comment.
The "dependencies" here is the entire closure from the inputs so this will work for transitive dependencies as well.
|
Is this in Xcode 11.6? Im still getting: |
|
@eonist If you happen to use unsafe flags for the linker |
|
@bgromov nope, I'm trying to use the package with optimisations enabled. I guess SPM isn't ready for optimised modules yet. Which is strange. As performance should be top of mind IMO |
|
@bgromov I found a solution. Will share soon. Ping me if I forget to write it. |
|
@eonist ping :) |
|
Sorry. For reasons out of my hand. I can't share. |
|
its bad( |
rdar://problem/53557659
SR-11225
This will lift the restriction of using unsafe flags from local and
branch-based dependencies.