-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[PackageBuilder] Fix test target ref in manifest for external packages #620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PackageBuilder] Fix test target ref in manifest for external packages #620
Conversation
@ddunbar Should I write add functional test for this? not sure if this can be unit tested |
I think this is important enough we need to be able to test it. What would it take to be able to mock up a PackageGraph enough to test this? |
// It is unfortunate that test modules has to be constructed even when they are | ||
// not requested by the clients but they might be referenced in the manifest file | ||
// so that needs to be validated. | ||
let testModules = try constructTestModules(modules: modules) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is ok that we construct test modules here, the performance cost should be negligible and I think it is actually better to not have the graph structure change depending on the use case.
0e19712
to
adb8438
Compare
@ddunbar Added a mock package graph tester |
This is great, thanks! LGTM We should use this to check the cross package deps too... I wonder how close we are getting to being able to drop most of the functional tests. I guess we need testing for Build first. |
@swift-ci please test |
I think it should be easily possible to run PackageBuilderTester on this since PackageBuilder is already run by the loader. I'll file a bug for investigating and start migrating cross package deps to unit testing |
adb8438
to
952a9da
Compare
@swift-ci please test |
952a9da
to
1a57084
Compare
LGTM |
1a57084
to
ddb040a
Compare
This was caused due to test targets not being constructed when a package acts as a dependency. <rdar://problem/28038874> SR-2353: Test dependencies block a package for being used downstream
ddb040a
to
7c2828b
Compare
Tested locally |
This was caused due to test targets not being constructed when a package
acts as a dependency.
rdar://problem/28038874 SR-2353: Test dependencies block a package
for being used downstream