After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780467 - Clicking on Vala error messages, does not open the corresponding file.
Clicking on Vala error messages, does not open the corresponding file.
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
Flatpak Nightly Channel
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-23 17:32 UTC by Felix Häcker
Modified: 2017-03-25 05:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pipeline: fix Entering directory check match (1023 bytes, patch)
2017-03-25 02:51 UTC, Christian Hergert
committed Details | Review
pipeline: translate relative paths for out-of-tree builds (1.33 KB, patch)
2017-03-25 02:51 UTC, Christian Hergert
committed Details | Review
pipeline: check stdout/stderr before performing checks (4.24 KB, patch)
2017-03-25 02:51 UTC, Christian Hergert
committed Details | Review
pipeline: handle relative paths from $builddir (2.09 KB, patch)
2017-03-25 05:03 UTC, Christian Hergert
committed Details | Review

Description Felix Häcker 2017-03-23 17:32:22 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)
Comment 1 Christian Hergert 2017-03-24 23:19:34 UTC
It looks like it is missing your $HOME prefix.
Comment 2 Christian Hergert 2017-03-25 02:51:09 UTC
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.
Comment 3 Christian Hergert 2017-03-25 02:51:13 UTC
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.
Comment 4 Christian Hergert 2017-03-25 02:51:16 UTC
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.
Comment 5 Christian Hergert 2017-03-25 02:52:38 UTC
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
Comment 6 Christian Hergert 2017-03-25 03:17:07 UTC
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.
Comment 7 Christian Hergert 2017-03-25 05:03:07 UTC
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.
Comment 8 Christian Hergert 2017-03-25 05:03:24 UTC
Attachment 348685 [details] pushed as aea2e40 - pipeline: handle relative paths from $builddir