GNOME Bugzilla – Bug 780467
Clicking on Vala error messages, does not open the corresponding file.
Last modified: 2017-03-25 05:03:26 UTC
3.25.0+28-gd85f9a2 (flatpak-nightly) GNOME 3.22 Flatpak + Meson + Vala Vala warning and error messages are getting shown in the sidebar, but clicking on them does not open the correct file. For example: main.vala:170:6 syntax error, expected ';' *Click* Opens a new file / Documents / Projects / gradio / src / main.vala (the opened file is empty)
It looks like it is missing your $HOME prefix.
Created attachment 348679 [details] [review] pipeline: fix Entering directory check match We no longer get the newlines from the build log, so we need not check for the trailing \n in the logging output.
Created attachment 348680 [details] [review] pipeline: translate relative paths for out-of-tree builds If we are building out of tree, we will get a path that is based on the build directory. Instead, we need a path that is relative to the project root. This will simply trim off the builddir prefix from the path to get that effect.
Created attachment 348681 [details] [review] pipeline: check stdout/stderr before performing checks We can reduce how much work we do here by first checking which stream we are logging to. No need to do regex checks on stdout, and no need to do directory checks on stderr.
This fixes things for autotools. Since meson doesn't tell us when it switches directories for the build, I can't tell you what directory foo.vala is in. If Vala is coerced into printing the full paths to the target file, that can be fixed. Attachment 348679 [details] pushed as af8b512 - pipeline: fix Entering directory check match Attachment 348680 [details] pushed as 3be2bca - pipeline: translate relative paths for out-of-tree builds Attachment 348681 [details] pushed as 0f49d2e - pipeline: check stdout/stderr before performing checks
After much compiling to test gradio, it looks like i get something like this from the meson branch: ../../../../../Projects/gradio/src/gradio-category-item-provider.vala So that seems like we should be able to make it translate.
Created attachment 348685 [details] [review] pipeline: handle relative paths from $builddir If we get an error and there is no discovered "current directory", we can just use the builddir as the relative path to the file. This fixes ninja output from meson for vala warnings.
Attachment 348685 [details] pushed as aea2e40 - pipeline: handle relative paths from $builddir