code
code copied to clipboard
Allow development builds and stable builds to be installed simultaneously
Problem
When working on elementary Code in elementary Code, you currently need to restart the app whenever you build to see the latest changes.
For people who primarily use elementary Code as their code editor, you lose time restarting the app whenever you would like to preview your changes. Some changes may break the app and will result you in having to use another editor application or revert your changes to get the elementary Code working again.
Proposal
Set the development option in meson to true by default and use a different ID, icon and name to differentiate between stable builds and development builds.
Prior Art (Optional)
GNOME apps for example:
I hard-coded a different app id in the Files Gtk4 branch but this sound more elegant.
My suggestion for implementing this is for the main executable to be just a thin wrapper that launches the default build. For example: $>code could launch /bin/code which in turn would launch /bin/code-bin/code-rel while $>code --use=dev would launch /bin/code --use=dev which in turn would launch /bin/code-bin/code-dev. Any time you create a release you just make a copy of code-dev as code-rel. No complications as a result.
Edit: For distinguishing between code-rel and code-dev during runtime you could just load /proc/self/cmdline I think it was.
You can run a different uninstalled branch of Code by editing meson-options.txt and changing the option development to default to true. If you have the installed (master) version of code already running then launching the rebuilt version of Code from the build directory should open another window . If you enter Multitasking View (<Super>Down) and hover of the Code windows you will see they have different app ids.
To be able to install two version you would have to temporarily change the meson project name so that the executables etc are distinct. However you could end up with lots of versions that would be a pain to uninstall. You could try changing the install directory too I guess. Not sure how much of this could (or should) be automatic.
Be aware that uninstalled versions of Code would use the master versions of any plugins so this method would not be suitable if you were developing a plugin.