-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(installer): use a tmp config dir during lazy setup #4278
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is enough, we should try to fully isolate the problem instead of adding a band-aid that will forget about later on why it even existed.
We should keep this function up to date instead
LunarVim/utils/installer/install.sh
Lines 419 to 425 in 01acdde
function remove_old_cache_files() { | |
local lazy_cache="$LUNARVIM_CACHE_DIR/lazy/cache" | |
if [ -e "$lazy_cache" ]; then | |
msg "Removing old lazy cache file" | |
rm -f "$lazy_cache" | |
fi | |
} |
Also, we're already backing up the config directory, so just nuke it (with a warning!) if you think it's problematic.
the config is no longer moved during the install since #4129 I think the solution here is to during the initial bootstrap start lvim without loading the config, and the only possible way to that is to use a tmp dir as the config dir Unless we remove the update capability of the script and do that differently |
The main problem relates to an old unrecommended behavior that we haven't discouraged enough: the installer should not be used to update an existing config! There are so many edge cases to try to cover, and it almost never works since those who would try that are users migrating major versions 😞
it's pretty hard to get correctly, especially if it's actually a git repo since that wouldn't work all that well with
any other plugins are storing their cache their? also, I'm pretty sure
my plan was always to remove the update from the installer, and it would now especially be a good time that #4270 is getting us closer to a more stable update process. |
we set undodir and shadafile to cache, it was probably needed before NVIM_APPNAME LunarVim/lua/lvim/config/settings.lua Line 7 in 5c7d712
|
do the minimum amount of tweaking necessary until packaging is stable
yeah we need to either use state or not modify them (this is technically a breaking change tho, and I'm not sure if we should handle it manually or not) |
makes the installation more reliable, lazy.nvim lockfile might have caused problems and sometimes plugins would have wrong versions / installations would fail