package module shouldn't rely on current directory to detect/enable uninstalled invocation
System information
What is your operating system and version? macOS 10.14.5
What is your version of GJS? 1.56.2
If the bug is related to GNOME Shell, what is your version of GNOME Shell? N/A
Bug information
Current behaviour
To enable running a program without installing it, gjs' built-in package module performs a test. The test is whether programInvocationName
is equal to './src/' + name
where name
is the app's package name. This forces a user/developer to set the CSD before testing the program, which could be very inconvenient, eg if the program is designed to perform a task in its CSD. It's probably also a bad idea to enforce the leafname being equal to the package name due to concerns raised in #90 (closed).
Expected behaviour
I would prefer that the test only requires the directory containing programInvocationName
either to be called src
or to have a subdirectory called src
. I don't think either of these conditions would ever cause a false positive for an installed program in the real world. Additionally, it could test for the presence of a gresource file to decide whether imports should come from there or from the filesystem, instead of using a meson-specific test.