-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Versions:
Jenkins: 2.150.3
Warnings NG: 5.0.1
-
-
warnings-ng 4.0.0, analysis-model-api 3.0.0
I use CMake to generate Visual Studio solution in a separate directory (out of source build)
For example:
mkdir build
cd build
cmake .. -GNinja
Compiler prints warnings in the following format:
[14/139] Building C object modules\Lib\CMakeFiles\Lib.dir\file.c.obj
..\modules\Lib\file.c(608): warning C4101: 'i': unreferenced local variable
..\modules\Lib\file.c(725): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
And the Warnings-NG plugin, called at the post-build step, cannot find these files and outputs errors:
[MSBuild] [ERROR] Can't resolve absolute paths for some files:
[MSBuild] [ERROR] - ../modules/Lib/file.c
...
[MSBuild] [ERROR] Can't create fingerprints for some files:
[MSBuild] [ERROR] - '../modules/Lib/file.c', IO exception has been thrown: java.nio.file.NoSuchFileException: ..\modules\Lib\file.c
...
[MSBuild] [ERROR] Can't create blame requests for some affected files:
[MSBuild] [ERROR] - Skipping non-workspace file ../modules/Lib/file.c
...
Suggestion:
Add option for path mapping, relative to workspace root.
- depends on
-
JENKINS-56020 Resolving filenames doesn't work with cmake/ninja generator
-
- Resolved
-
-
JENKINS-48802 Possibility to add/change the path that used to display source files
-
- Resolved
-
[JENKINS-56193] Warnings-ng plugin cannot parse messages from MSBuild with relative paths
Description |
Original:
I use CMake to generate Visual Studio solution in a separate directory ([out of source build|https://cgold.readthedocs.io/en/latest/tutorials/out-of-source.html]) For example: {{mkdir build}} {{ cd build }} {{ cmake .. -GNinja}} Compiler prints warnings in the following format: {{[14/139] Building C object modules\Lib\CMakeFiles\Lib.dir\file.c.obj}} {{ ..\modules\Lib\file.c(608): warning C4101: 'i': unreferenced local variable}} {{ ..\modules\Lib\file.c(725): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data}} And the Warnings-NG plugin, called at the post-build step, cannot find these files and outputs errors: {{[MSBuild] [ERROR] Can't resolve absolute paths for some files:}} {{ [MSBuild] [ERROR] - ../modules/Lib/file.c}} {{ ...}} {{ [MSBuild] [ERROR] Can't create fingerprints for some files:}} {{ [MSBuild] [ERROR] - '../modules/Lib/file.c', IO exception has been thrown: java.nio.file.NoSuchFileException: ..\modules\Lib\file.c}} {{ ...}} {{ [MSBuild] [ERROR] Can't create blame requests for some affected files:}} {{ [MSBuild] [ERROR] - Skipping non-workspace file ../modules/Lib/file.c}} {{ ...}} h2. Suggestion: Add option for path mapping, relative to workspace root. |
New:
I use CMake to generate Visual Studio solution in a separate directory ([out of source build|https://cgold.readthedocs.io/en/latest/tutorials/out-of-source.html]) For example: {{{{mkdir build}}}} {{cd build}} {{cmake .. -GNinja}} Compiler prints warnings in the following format: {{{{[14/139] Building C object modules\Lib\CMakeFiles\Lib.dir\file.c.obj}}}} {{ ..\modules\Lib\file.c(608): warning C4101: 'i': unreferenced local variable}} {{ ..\modules\Lib\file.c(725): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data}} And the Warnings-NG plugin, called at the post-build step, cannot find these files and outputs errors: {{{{[MSBuild] [ERROR] Can't resolve absolute paths for some files:}}}} {{[MSBuild] [ERROR] - ../modules/Lib/file.c}} {{ ...}} {{[MSBuild] [ERROR] Can't create fingerprints for some files:}} {{[MSBuild] [ERROR] - '../modules/Lib/file.c', IO exception has been thrown: java.nio.file.NoSuchFileException: ..\modules\Lib\file.c}} {{ ...}} {{[MSBuild] [ERROR] Can't create blame requests for some affected files:}} {{[MSBuild] [ERROR] - Skipping non-workspace file ../modules/Lib/file.c}} {{ ...}} h2. Suggestion: Add option for path mapping, relative to workspace root. |
Description |
Original:
I use CMake to generate Visual Studio solution in a separate directory ([out of source build|https://cgold.readthedocs.io/en/latest/tutorials/out-of-source.html]) For example: {{{{mkdir build}}}} {{cd build}} {{cmake .. -GNinja}} Compiler prints warnings in the following format: {{{{[14/139] Building C object modules\Lib\CMakeFiles\Lib.dir\file.c.obj}}}} {{ ..\modules\Lib\file.c(608): warning C4101: 'i': unreferenced local variable}} {{ ..\modules\Lib\file.c(725): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data}} And the Warnings-NG plugin, called at the post-build step, cannot find these files and outputs errors: {{{{[MSBuild] [ERROR] Can't resolve absolute paths for some files:}}}} {{[MSBuild] [ERROR] - ../modules/Lib/file.c}} {{ ...}} {{[MSBuild] [ERROR] Can't create fingerprints for some files:}} {{[MSBuild] [ERROR] - '../modules/Lib/file.c', IO exception has been thrown: java.nio.file.NoSuchFileException: ..\modules\Lib\file.c}} {{ ...}} {{[MSBuild] [ERROR] Can't create blame requests for some affected files:}} {{[MSBuild] [ERROR] - Skipping non-workspace file ../modules/Lib/file.c}} {{ ...}} h2. Suggestion: Add option for path mapping, relative to workspace root. |
New:
I use CMake to generate Visual Studio solution in a separate directory ([out of source build|https://cgold.readthedocs.io/en/latest/tutorials/out-of-source.html]) For example: {{mkdir build}} {{cd build}} {{cmake .. -GNinja}} Compiler prints warnings in the following format: {{[14/139] Building C object modules\Lib\CMakeFiles\Lib.dir\file.c.obj}} {{ ..\modules\Lib\file.c(608): warning C4101: 'i': unreferenced local variable}} {{ ..\modules\Lib\file.c(725): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data}} And the Warnings-NG plugin, called at the post-build step, cannot find these files and outputs errors: {{[MSBuild] [ERROR] Can't resolve absolute paths for some files:}} {{[MSBuild] [ERROR] - ../modules/Lib/file.c}} {{ ...}} {{[MSBuild] [ERROR] Can't create fingerprints for some files:}} {{[MSBuild] [ERROR] - '../modules/Lib/file.c', IO exception has been thrown: java.nio.file.NoSuchFileException: ..\modules\Lib\file.c}} {{ ...}} {{[MSBuild] [ERROR] Can't create blame requests for some affected files:}} {{[MSBuild] [ERROR] - Skipping non-workspace file ../modules/Lib/file.c}} {{ ...}} h2. Suggestion: Add option for path mapping, relative to workspace root. |
Link |
New:
This issue depends on |
Link |
New:
This issue depends on |
Attachment | New: consoleText.txt [ 46118 ] |
Rank | New: Ranked higher |
Component/s | New: analysis-model [ 23523 ] | |
Component/s | Original: warnings-ng-plugin [ 24526 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Fixed but Unreleased [ 10203 ] |
Released As | New: warnings-ng 4.0.0, analysis-model-api 3.0.0 | |
Status | Original: Fixed but Unreleased [ 10203 ] | New: Resolved [ 5 ] |