You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am having issues getting the output of a path-problem query, namely the alerts. It is a simple query just like this one:
/** * @kind path-problem */import cpp
classStartMethodextendsFunction{StartMethod(){getName()="start"}}classTargetMethodextendsFunction{TargetMethod(){getName()="end"}}querypredicateedges(Functiona,Functionb){a.calls(b)}fromTargetMethodend,StartMethodentryPointwhereedges+(entryPoint,end)selectend,entryPoint,end,"Found a path from start to target."
The issue here is that although the query does succeed, which I can assert by having a look at the #select tab, there is nothing in the alerts tab and it's just the raw results. I saw an issue that seems to be related to this problem and another question that also seems related but it seems like no matter what I try these solutions aren't working out in my case. My understanding is that the alerts "ignore" some parts of the code which aren't considered part of the source root. In my case, I am running the database create command from the root directory of the project's source code so I don't understand why there would be any issues...
When I try to have a look at end.getLocation() or entryPoint.getLocation() I can see that the path is something like file:///app/project/ followed by the relative path of the source file. Do I need to be running these queries from the root directory of the project's source or does it not matter where I run the query from ? Like I said I can see that the query succeeds since I get the results in the #select tab (confirmed by testing functions that can't reach each other vs ones that can). I would appreciate if I could get any help with this or if there was a solution to make sure "alerts" don't ignore paths as I don't know if that could somehow be the problem, perhaps because the build system of the project is complicated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi I am having issues getting the output of a path-problem query, namely the alerts. It is a simple query just like this one:
The issue here is that although the query does succeed, which I can assert by having a look at the
#select
tab, there is nothing in thealerts
tab and it's just the raw results. I saw an issue that seems to be related to this problem and another question that also seems related but it seems like no matter what I try these solutions aren't working out in my case. My understanding is that the alerts "ignore" some parts of the code which aren't considered part of the source root. In my case, I am running thedatabase create
command from the root directory of the project's source code so I don't understand why there would be any issues...When I try to have a look at
end.getLocation()
orentryPoint.getLocation()
I can see that the path is something likefile:///app/project/
followed by the relative path of the source file. Do I need to be running these queries from the root directory of the project's source or does it not matter where I run the query from ? Like I said I can see that the query succeeds since I get the results in the#select
tab (confirmed by testing functions that can't reach each other vs ones that can). I would appreciate if I could get any help with this or if there was a solution to make sure "alerts" don't ignore paths as I don't know if that could somehow be the problem, perhaps because the build system of the project is complicated.Beta Was this translation helpful? Give feedback.
All reactions