theme/liquidprompt: stop vendoring GPL code, detect existing install instead - #2406
theme/liquidprompt: stop vendoring GPL code, detect existing install instead#2406seefood wants to merge 2 commits into
Conversation
…instead Liquidprompt is GPL-licensed and bash-it is MIT-licensed, so the theme should not auto-clone it into vendor/ at runtime. Replace that logic with a thin oh-my-posh-style wrapper that only activates liquidprompt if the user already has it on their PATH, and add a README explaining why. This also drops the theme's overrides of liquidprompt internals (_lp_git_branch, _lp_time, _lp_temp_*, the --no-activate shim) that had gone stale against upstream's renamed/private functions, fixing the broken git-branch display and repeated _lp_escape errors from Bash-it#2390. Closes Bash-it#2390
…-gpl/001-remove-vendoring-clean * 'master' of github.com:Bash-it/bash-it: lint: fix shfmt v3.14.0 formatting in liquidprompt theme lint: fix shellcheck findings from prek run --all-files ci: download shfmt binary instead of installing via go
|
@akinomyoga thoughts? I feel like there's no other clean way to keep it. |
|
also resolves the discussion at #2048 |
Sorry, I haven't noticed the mention. Since I'm subscribed to the entire repository, an explicit mention and other notifications are delivered to me in a non-distinguishable appearance at a glance, and I'm not reading through all the notifications. If there are any other mentions that I didn't notice, please feel free to tell me that.
As another option, a part of Bash-it can be distributed under the GPL license, by explicitly stating that. If the core part of Bash-it were relying on a piece of GPL-licensed code, the entire Bash-it would probably have had to be licensed under the GPL license. However, the situation is opposite in the present case.
I'm not sure whether to automatically clone the source tree of GPL-licensed dependency or let the user clone the GPL-licensed dependency would be relevant. If the GPL requirements could be avoided by just letting the user download the GPL code, any software relying on a GPL library can easily avoid GPL requirements by not including the source code of the library in its distribution.
I think this is important when one wants to resolve the subtlety about the GPL license. The original code seems to try to overwrite the internal API of |
|
Well, I am pretty sure the overwriting of LP's function is an issue (both with bit-rot and license mix), but maybe just offering the user to clone and install it for them is OK. I could ask a few of my fellow GPL-loving friends for their opinions. |
Yeah, I agree.
I also think so, though this area should be somewhat controversial. In the first place, GPL appears to be written primarily for programs that are compiled into a binary, and it seems subtle how we should judge whether a project written in a script language is tightly bound to GPL-licensed external code. |
Summary
git cloneit intovendor/at runtime as it previously did.PATH, otherwise print a warning. Nothing is downloaded, installed, or vendored.themes/liquidprompt/README.mdexplaining the licensing situation and pointing users at the upstream project for installation._lp_git_branch,_lp_time,_lp_temp_*, the--no-activateshim) which had gone stale against upstream's renamed/private functions — fixing the repeated_lp_escape()errors and broken git-branch display reported in [Bug]: Liquidprompt (LP) theme has fallen out-of-sync with the Liquidprompt project #2390.Closes #2390
Test plan
shellcheck themes/liquidprompt/liquidprompt.theme.bashshfmt -d themes/liquidprompt/liquidprompt.theme.bashpre-commit runon the changed files (viagit commit, hooks passed)PATH(not done — no liquidprompt binary available in this environment)