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

fix: remove duplicate srcs when evaluating clang files #1452

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

karim-alweheshy
Copy link

Copy link
Owner

@cgrindel cgrindel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add the package that exhibits a problem to one of the examples?

@@ -250,7 +250,7 @@ def _collect_files(

modulemap = None
modulemap_orig_path = None
for orig_path in all_srcs:
for orig_path in depset(all_srcs).to_list():
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate how we are getting duplicate sources in the first place?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in Package.swift we have publicHeadersPath: ".", which then extends the lookup into . and into ./yoga both of which generate a duplicated module.modulemap src

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be merged first and then I'll update this PR

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you even need this PR, once the other PR merges?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes the other PR fixes something different related to picking up public headers unrelated to the compiled target

@cgrindel cgrindel changed the title Remove duplicated srcs fix: remove duplicate srcs when evaluating clang files Jan 20, 2025
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding the example. To fully integrate the example with the repo, you will need to add the example to this list. Then, you will need to run bazel run //:tidy. This will update some source files that will need to be added to this PR.

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 this pull request may close these issues.

2 participants