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

ci: Disable clang-tidy for external dependencies #3477

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

stephenswat
Copy link
Member

@stephenswat stephenswat commented Aug 5, 2024

When using CMake's FetchContent mechanism, the source code for those dependencies ends up in the build/_deps/ directory, which was previously subject to analysis by clang-tidy, which can lead to errors rooted in external projects. This commit disables clang-tidy for that directory, resolving the issue.

This commit comes from #3117.

When using CMake's FetchContent mechanism, the source code for those
dependencies ends up in the `build/_deps/` directory, which was
previously subject to analysis by clang-tidy, which can lead to errors
rooted in external projects. This commit disables clang-tidy for that
directory, resolving the issue.

Co-authored-by: Stephen Nicholas Swatman <[email protected]>
Copy link
Contributor

@andiwand andiwand left a comment

Choose a reason for hiding this comment

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

LGTM - the other way would be to tweak the thirdparty dependencies to be handled as an external

@andiwand andiwand added this to the next milestone Aug 5, 2024
@stephenswat
Copy link
Member Author

LGTM - the other way would be to tweak the thirdparty dependencies to be handled as an external

Do you mean adding the SYSTEM flag in the FetchContent call, or do we have some machinery for this that I'm not aware of?

Copy link

sonarqubecloud bot commented Aug 5, 2024

@andiwand
Copy link
Contributor

andiwand commented Aug 5, 2024

I think the system flag is too new for what we require as a minimum version. But I think it would already be enough to build the dependencies externally instead of basically doing FetchContent which will do add_subdirectory. Then we directly couple two CMake projects

@stephenswat
Copy link
Member Author

Yeah, FetchContent is a crime against programming; but don't we use it for other dependencies already?

@stephenswat
Copy link
Member Author

FWIW: I'd be extremely excited to get rid of the FetchContent because, as you say, the way it intertwines the build systems of projects is basically unmanageable for any non-trivial software.

@andiwand
Copy link
Contributor

andiwand commented Aug 5, 2024

Yeah sorry to open up that can here. No need to change anything on this PR. Just one more example why FetchContent is awful as I also rediscovered in the other PR as well

@kodiakhq kodiakhq bot merged commit 9d520f2 into acts-project:main Aug 5, 2024
49 checks passed
@github-actions github-actions bot removed the automerge label Aug 5, 2024
@acts-project-service
Copy link
Collaborator

🔴 Athena integration test results [9d520f2]

Build job with this PR failed!

Please investigate the build job for the pipeline!

@acts-project-service acts-project-service added the Breaks Athena build This PR breaks the Athena build label Aug 5, 2024
@paulgessinger
Copy link
Member

paulgessinger commented Aug 6, 2024

I like FetchContent much better than any alternative I've seen so far, which is bash scripts or some package manager.

I'd argue the problem isn't FetchContent but the complexity of our web of dependencies.

@andiwand
Copy link
Contributor

andiwand commented Aug 6, 2024

What I think is problematic about it is that we share variables transparently with another project. Calling external build with the flags we actually want to transmit would be much better in my opinion. How we want to download stuff is a different story. To me it just seems like we are using a build system as a package manager which it is not really built for

@paulgessinger paulgessinger modified the milestones: next, v36.1.0 Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaks Athena build This PR breaks the Athena build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants