GNOME Bugzilla – Bug 792383
Cannot build the same project with different branches in two different instances
Last modified: 2018-01-11 09:13:09 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.
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.
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.
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.
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
yuju thanks!