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 792383 - Cannot build the same project with different branches in two different instances
Cannot build the same project with different branches in two different instances
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
Flatpak Stable Channel
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-09 21:15 UTC by Carlos Soriano
Modified: 2018-01-11 09:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flatpak: take current branch into account (2.76 KB, patch)
2018-01-11 05:02 UTC, Christian Hergert
committed Details | Review
buildsystem: use branch in builddir path (2.17 KB, patch)
2018-01-11 05:02 UTC, Christian Hergert
committed Details | Review

Description Carlos Soriano 2018-01-09 21:15:13 UTC
So I need to try Nautilus version 3.24 vs Nautilus 3.26. For that, I have two different folders with each the checkout of the corresponding branch, so I avoid the whole back an forth and build each of the branch everytime I need to try one or the other version.

However seems Builder is putting both of them in the same directory and creating conflicts. In the case of Nautilus I'm getting the error:

Error during basic setup:
Neither directory contains a build file meson.build.
ninja: error: rebuilding 'build.ninja': subcommand failed
FAILED: build.ninja 
/usr/bin/python3 /usr/bin/meson --internal regenerate /home/csoriano/Projects/nautilus /home/csoriano/.var/app/org.gnome.Builder/cache/gnome-builder/builds/Nautilus/org.gnome.Nautilus.json-43269135fbc28090adbbaf24d6009fe7b28c9f56-local-flatpak-org.gnome.Platform-x86_64-master --backend ninja

I'm building Nautilus with Flatpak manifests for both.
Comment 1 Christian Hergert 2018-01-09 23:28:26 UTC
We'll need to take the branch name into account when creating the project key used for directories. We have an API now for this, but we need to make sure plugins/etc aren't caching that information.
Comment 2 Christian Hergert 2018-01-11 05:02:29 UTC
Created attachment 366628 [details] [review]
flatpak: take current branch into account

We need to use the current branch so that we can compartmentalize a build
in case the application is opened with a different branch in another
workbench window.
Comment 3 Christian Hergert 2018-01-11 05:02:33 UTC
Created attachment 366629 [details] [review]
buildsystem: use branch in builddir path

If the build system didn't override the build directory, make sure we take
the branch into account for the builddir. This helps avoid stomping over
each other when two workbench windows are open with different branches.
Comment 4 Christian Hergert 2018-01-11 05:04:49 UTC
It's still possible for ctags/code-index to stomp over each other,
but that shouldn't corrupt anything, just possible to give incorrect
paths when jumping around.

But this at least fixes the issue at hand, which is building.

Attachment 366628 [details] pushed as cf935b5 - flatpak: take current branch into account
Attachment 366629 [details] pushed as 5cd74a0 - buildsystem: use branch in builddir path
Comment 5 Carlos Soriano 2018-01-11 09:13:09 UTC
yuju thanks!