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

Getting unable to find resource message with 0.9.4 and SQ5.1.2 #676

Closed
sandeepm opened this issue Nov 9, 2015 · 9 comments
Closed

Getting unable to find resource message with 0.9.4 and SQ5.1.2 #676

sandeepm opened this issue Nov 9, 2015 · 9 comments
Assignees
Labels
Milestone

Comments

@sandeepm
Copy link

sandeepm commented Nov 9, 2015

Getting -
13:09:29.131 WARN - Unable to find resource 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\afxdao.h' to create a dependency with 'stdafx.h'
13:09:29.131 WARN - Unable to find resource 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\afxcmn.h' to create a dependency with 'stdafx.h'
13:09:29.131 WARN - Unable to find resource 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\afxext.h' to create a dependency with 'stdafx.h'
13:09:29.131 WARN - Unable to find resource 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\afxdisp.h' to create a dependency with 'stdafx.h'
13:09:29.131 WARN - Unable to find resource 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\afxodlgs.h' to create a dependency with 'stdafx.h'

The files mentioned above do exist in the folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include; also I have included the below property in sonar-project.properties file -
"sonar.cxx.includedirectories=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include"

thanks for your help in advance.

@guwirth guwirth added this to the M 0.9.5 milestone Nov 9, 2015
@guwirth guwirth self-assigned this Nov 9, 2015
@guwirth
Copy link
Collaborator

guwirth commented Nov 9, 2015

Please see https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Path-and-path-separator-issues. Seems to be a path separator issue.

@sandeepm
Copy link
Author

sandeepm commented Nov 9, 2015

Thanks guwirth. I have tried both options below to no avail.

  1. Escaped the path sonar.cxx.includedirectories=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include
  2. Used forward slashes instead of back sonar.cxx.includedirectories=C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/atlmfc/include
    Any other idea, solution?

@guwirth
Copy link
Collaborator

guwirth commented Nov 9, 2015

Are you really sure that the flies are available at this location? For vs you need normally more than one path. On the other hand analysis is working without this includes. Maybe the warning is also wrong because the include is outside of root and anyway ignored.

@sandeepm
Copy link
Author

sandeepm commented Nov 9, 2015

For the sake of the exercise I am just trying out the single path. There are quite a few other paths I will need to include; but no point in adding those yet if I cant get a single path working :-) The include files definitely exist.

@jmecosta
Copy link
Member

jmecosta commented Nov 9, 2015

isn't this coming from the dependency analyser?, i think this is expected because you should not be able to create cycles between files in project and files outside project.

@sandeepm
Copy link
Author

sandeepm commented Nov 9, 2015

Yes I think that is the case. Ran sonar-runner with -X -e options and I can see that these files are referenced in stdafx.h; whereas stdafx.h is referred to in stdafx.cpp as well as in another cpp source file "a.cpp". It looks like the a.cpp is being processed first; which in turn processes stdafx.h in turn processing the above include files. All good so far. Thereafter when stdafx.cpp is being processed; the above include files are also being tried to process again (as they are included via stdafx,h) and thats when start getting messages "skipping already included files" for the above files.

If this is expected behavior then please consider modifying the warning to something like skipping creating a dependency for "abc" with "xyz" as it is already there. Thanks.

@guwirth
Copy link
Collaborator

guwirth commented Nov 28, 2015

If this is expected behavior then please consider modifying the warning to something like skipping creating a dependency for "abc" with "xyz" as it is already there. Thanks.

Change warning text. Current one is confusing.

@schroeca-zz
Copy link

I get also the warning with unable to find resource.

After digging into the debug log messages i found something realy strange.
The same file is found serveral times an for some reason it is not during handling certain files.

E.g.:

10:22:45.840 DEBUG - [D:\tools\coside2.1\lib\scams20_libs\lib\sca_basic_libraries\utilities\convert_tdf2de.h:30]: processing #include <sca_basic_libraries/converters/conv_tdf2de.h>, resolved to file 'D:\tools\coside2.1\lib\scams20_libs\lib\sca_basic_libraries\converters\conv_tdf2de.h'

10:22:48.225 WARN  - Unable to find resource 'D:\tools\coside2.1\lib\scams20_libs\lib\sca_basic_libraries\converters\conv_tdf2de.h' to create a dependency with '__sonarqube_test/schematic_test.cpp'

I have a huge amount of dependencies and includes > 100.
Could this be the problem?

@guwirth guwirth removed this from the 0.9.5 milestone Mar 19, 2016
@guwirth guwirth added this to the 0.9.7 milestone Jul 17, 2016
@guwirth
Copy link
Collaborator

guwirth commented Jul 17, 2016

Dependency analyzer removed with #913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants