-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Issue #5923] Fix resource-related build failure for package containing Objective-C and C sources #5924
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
Conversation
@swift-ci please smoke test |
According to build logs, |
@MaxDesiatov, could you share any relevant info from the build logs? I get a 403 forbidden when trying to see the CI failures myself. I could just remove the test since it's not directly related to this PR's change, but think it'd be nice to have if I can get it working. |
@ncooke3 ci.swift.org is up after some downtime, can you see the logs now? |
yep– now I can. Will take a look... |
Hi @MaxDesiatov, could you kick off CI again? |
@swift-ci please smoke test |
- The order of the Arrays being compared seems to be non-deterministic. To work around this sort them before comparing them.
In one of the tests I added, the order of two arrays I'm comparing seems to be non-deterministic. My latest commit should fix the CI failure by sorting both before comparing. Please kick off another round of CI. |
@swift-ci please smoke test |
@swift-ci please smoke test |
@swift-ci please smoke test |
Fix issue where adding a resource to a package containing Objective-C and C sources causes a build failure. Note: This only occurs when using
swift build
via the package manager CLI.Motivation:
Please see #5923 for the context regarding the issue. The package manager will add the
resource_bundle_accessor.h
as an input when compiling C sources. This causes a build failure because of the Foundation import inresource_bundle_accessor.h
.This PR fixes this issue.
Modifications:
-include /path/to/resource_bundle_accessor.h
compile argument when compiling a C source.testClangBundleAccessor
inBuildPlanTests.swift
. I wrote this with intention of testing the fix but it doesn't actually test anything because those tests don't actually build anything. I was going to delete it, but noticed that resource bundle generation in Clang targets hasn't been tested so maybe it's a good test to keep?testResourcesInMixedClangPackage
inTestToolTests.swift
to test this fix and potential regressions.Result:
This fix enables packages to contain mixed Clang sources (e.g. Objective-C and C) and resources.
Fixes #5923.