Skip to content
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: catch errors setting up rtp when plugin not installed #1193

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BlueDrink9
Copy link

@BlueDrink9 BlueDrink9 commented Nov 22, 2023

I was getting E5108 sometimes when a plugin that loads on start wasn't installed. That interrupted Lazy's load, preventing me from then using it to install the missing plugin.
On Windows it happened every time, on Linux it was about every 2nd time.

I'm hoping I've figured out enough of the codebase conventions for this to be written appropriately, but it was only a quick skim so apologies if I've missed an internal logging function.

I was getting E5108 .ometimes when a plugin that loads on `start` wasn't
installed. That interrupted Lazy's load, preventing me from then using
it to install the missing plugin.
On Windows it happened every time, on Linux it was about every 2nd time.
@folke
Copy link
Owner

folke commented Jan 21, 2024

I'm a bit hesitant to merge this, since this really should never trigger an error.

What was the exact error you get?

@BlueDrink9
Copy link
Author

That's what I expected too, and yet it happened consistently. I should note that if automatic installation was enabled, I could usually get around this.

I can't recall the exact error, but it was a neovim error relating to an error in setopt while setting rtp.

It may have had something to do with how I set up Lazy, but I'm using it through more or less the lazyvim recommended way, albeit from a custom rtp lua folder stored in dotfiles. Now I think about it.

Welcome back! Hope you had a great vacation, thanks for taking the time to go back and address all these tickets.

@BlueDrink9
Copy link
Author

BlueDrink9 commented Jan 21, 2024

Personally I feel a small error catching line that solves someone's odd problem is a "may as well" merge. However, I recognise that you have your own standards for codebase tidiness and that you can't trust random users, so I'm happy to keep the discussion going about whether you merge. It'd make my use of lazy a lot easier if it is though

@BlueDrink9
Copy link
Author

I hadn't realised how generic E5108 is, oops. I should have included the error message. I'll see if I can repro

@folke
Copy link
Owner

folke commented Jan 21, 2024

Yeah, E5108 is indeed a very general lua error, so would be good to see what the exact message was you got.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants