-
Notifications
You must be signed in to change notification settings - Fork 460
Handle broken site_config #774
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
Conversation
if not ok then | ||
if type(site_config) ~= "table" then | ||
io.stderr:write("Result of require('luarocks.core.site_config_"..version_suffix.."') was invalid.\n") | ||
site_config = {} |
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.
Maybe it should fail instead of trying to recover here. I'll leave that up to the luarocks maintainers.
Are you guys running |
@hishamhm Yes, until yesterday: neovim/neovim@3029bae Even so, it's worth having some sort of warning about this situation, no? |
Is there a race between the luarocks `make bootstrap` dependencies? reverts f73b4911312b35bfe38ed068672a2f8ba8875ba7 ref luarocks/luarocks#774
Is there a race between the luarocks `make bootstrap` dependencies? reverts f73b4911312b35bfe38ed068672a2f8ba8875ba7 ref luarocks/luarocks#774
The fix should be to have the |
IMO nil reference errors should be handled informatively where possible. Closing this in the meantime. |
@justinmk FYI, with the release of luarocks 3.0, site_config.lua no longer exists. |
On travis CI the Neovim project sometimes sees errors like this:
That "attempt to index local 'site_config' (a boolean value)" error is annoying and requires digging around to find why it might happen.
require()
returnstrue
if the module doesn't return anything, so that's whysite_config
is "a boolean value".Of course, the deeper problem[1] is that the
require()
is being weird. But showing a hint is better than nothing.[1] My guess is that
make bootstrap
is doing things in parallel, maybe the site_config file is not fully written when therequire()
is invoked. Or travis (or the CI cache) is being weird.