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

Breaks With Bazel 6.0.0 #19

Open
cjohnstoniv opened this issue Jan 3, 2023 · 3 comments
Open

Breaks With Bazel 6.0.0 #19

cjohnstoniv opened this issue Jan 3, 2023 · 3 comments

Comments

@cjohnstoniv
Copy link

The CC_EXTENSIONS field under 'Constants' has been removed and when using Bazel 6.0.0 with the Bazel sonar extension, it fails with the missing field exception.

Along with CC_EXTENSIONS, Coverage.getOnlyTheseCcSources has been removed.

Since my project doesn't have any C++ projects and is only Java, I tried just removing all of this C++ code and that resulted in Sonar failing to parse the output file due to "Look at SonarQube documentation to know the expected XML format. ParseError at [row,col]:[1,1]". Not sure if it was something I did on my end or if something about the C++ code made this not happen before. I need to investigate further when I have some time.

@Zetten
Copy link
Owner

Zetten commented Jan 3, 2023

I've synced the coverage generator Main class from Bazel 6.0.0 in commit 77044ec. The version in this repo is just a direct copy of the upstream one, but which calls the local SQ-format output printer instead of the lcov one (unfortunately it's not a configurable extension point).

This should fix the issue - let me know if you're still having problems when using this revision.

@cjohnstoniv
Copy link
Author

cjohnstoniv commented Jan 3, 2023

Unfortunately when I use the changes from that commit when Sonar is analyzing the coverage I get:

Look at SonarQube documentation to know the expected XML format. ParseError at [row,col]:[1,1]
[ERROR] Message: Premature end of file.

Only update made is the changes to the class in the commit.

@cjohnstoniv
Copy link
Author

This is actually related to this: bazelbuild/bazel#17165

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

No branches or pull requests

2 participants