Open freename1 opened 3 years ago
Did you try to change the line here: https://github.com/jenkinsci/llvm-cov-plugin/blob/f3f7fc5409c3877a6242210763946e9fa5975956/src/main/java/io/jenkins/plugins/llvm/LLVMCovReportDocumentConverter.java#L21-L23 Maybe the impact from 2.0.0 to 2.0.1 is not that high.
https://reviews.llvm.org/D76763 This review describes the bump to 2.0.1
Yes, I think since only new tags have been introduced this probably should work. It might be reasonable to think that the lowest number indicates non breaking changes? Then we could do:
if (!report.get("version").asText().startsWith("2.0."))
and be compatible with future changes?
Sorry for creating a second pull request. Somehow the build was not triggered. Currently testing the fixes on my jenkins.
Version report
Jenkins and plugins versions report:
Irrelevant
Windows 10
Reproduction steps
Use current llvm release (12) to produce coverage report in json format. The llvm-cov-plugin then will return an error: Publishing Coverage report.... report for llvm-cov has met some errors: Unsupported Json file - version must be 2.0.0
Results
Expected result:
Coverage to be imported
Actual result:
No coverage is imported
Comments: Since the json file version 2.0.1 only introduced additional fields the importer for version 2.0.0 should still be able to work with the file. It would just not recognize the new fields. May be it makes sense as a quick fix to change the check to accept all 2.0.* versions?