Skip to content
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

Transitive framework import causes release build fail #569

Open
qyang-nj opened this issue Sep 23, 2022 · 5 comments · Fixed by #570
Open

Transitive framework import causes release build fail #569

qyang-nj opened this issue Sep 23, 2022 · 5 comments · Fixed by #570

Comments

@qyang-nj
Copy link
Contributor

qyang-nj commented Sep 23, 2022

If we have an apple_framework transitively depends on framework_import, the build will fail with --compilation_mode=opt. In the following code, Module2 is not able to build. The same error will occur with --features=swift.cacheable_swiftmodules.

apple_dynamic_framework_import(
    name = "PrebuiltFramework",
)

apple_framework(
    name = "Module1",
    deps = [":PrebuiltFramework"],
)

apple_framework(
    name = "Module2",
    deps = [":Module1"],
)

With either --compilation_mode=opt or --features=swift.cacheable_swiftmodules, swift_library will stop passing -serialize-debugging-options to swiftc. Unfortunately, it seems we are relying on the search paths embedded in .swiftmodule for transitive framework imports. We should explicitly provide those search paths to the compiler.

I have sample repro code and steps here.

@qyang-nj
Copy link
Contributor Author

I have a fix in mind and will validate it and submit a PR.

@thiagohmcruz
Copy link
Contributor

thiagohmcruz commented May 9, 2023

I guess we should re-open this give #715? Or should we track in a diff issue instead?

cc @mattrobmattrob @qyang-nj

@mattrobmattrob
Copy link
Collaborator

I guess we should re-open this give #715? Or should we track in a diff issue instead?

cc @mattrobmattrob @qyang-nj

Was going to reach out to @qyang-nj once I confirmed/merged the fix and better test case for validation. But I'm okay with whatever. Reopening this probably makes sense.

@thiagohmcruz thiagohmcruz reopened this May 9, 2023
@mattrobmattrob
Copy link
Collaborator

I'm adding a proper test to catch this regression via #713.

@qyang-nj
Copy link
Contributor Author

qyang-nj commented May 9, 2023

Thanks for adding the tests. I'll take a look at this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants