vala-extra-vapis icon indicating copy to clipboard operation
vala-extra-vapis copied to clipboard

Local install of repository workflow

Open astavale opened this issue 7 years ago • 1 comments

The current README makes it clear this repository is not intended for packaging or a system wide install. Because Vala uses Environment.get_system_data_dirs () to find the search directories for VAPIs then it is possible to create a workflow with a local install like:

cd ~/.local/share
git clone https://github.com/nemequ/vala-extra-vapis vala/vapi
XDG_DATA_DIRS=~/.local/share/:/usr/local/share/:/usr/share/
export XDG_DATA_DIRS

Then the VAPIs in this repository are found by valac. The setting and export of XDG_DATA_DIRS can be added to .bash_profile to make it persist across re-boots.

I find this useful for editing the VAPIs. The local git clone is of my own GitHub clone. This makes it easy to branch locally, push changes back to my GitHub clone and then create a pull request to the main repository.

I'm hoping this might encourage more contributions back to the repository and think it should be in the README somewhere. Does anyone else think that is a good idea and are there any other uses for such a workflow?

astavale avatar Apr 15 '18 16:04 astavale

The reason this repo isn't intended for system-wide install is that we make no guarantees about backwards compatibility. What you're talking about doesn't really do anything to address that problem; if two projects require different versions of the same VAPI they can't be shared, regardless of whether it's system-wide or for a single user. The right thing to do is copy the VAPI(s) you need into your project, or add v-e-v as a submodule or subtree.

IMHO adding information to the README about this would be a mistake unless you're very clear with the reader about what the pitfalls are. Frankly, the only time I can think of where this would really be appropriate is if you regularly throw together quick little throw-away programs in Vala (basically, use it instead of a scripting language like Bash or Python) which you don't intend to publish or maintain.

nemequ avatar Apr 15 '18 19:04 nemequ