[go: nahoru, domu]

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

lit install - No such package #143

Open
ghost opened this issue Nov 20, 2015 · 1 comment
Open

lit install - No such package #143

ghost opened this issue Nov 20, 2015 · 1 comment

Comments

@ghost
Copy link
ghost commented Nov 20, 2015

lit install fails, if dependencies contains a package that was not yet published, but is available in deps/:

$ cat package.lua 
return {
  ...
  dependencies = {
    ...
    "urzds/date",
  }
}
$ ls deps
date.lua
$ lit install
lit version: 2.2.16
luvi version: v2.4.0
command: install
load config: .../.litconfig
connecting: wss://lit.luvit.io/
fail: [string "bundle:libs/calculate-deps.lua"]:75: No such package: urzds/date
stack traceback:
        [C]: in function 'error'
        [string "bundle:libs/calculate-deps.lua"]:75: in function 'addDep'
        [string "bundle:libs/calculate-deps.lua"]:49: in function 'processDeps'
        [string "bundle:libs/calculate-deps.lua"]:92: in function 'calculateDeps'
        [string "bundle:libs/core.lua"]:513: in function 'installDeps'
        [string "bundle:/commands/install.lua"]:5: in function 'fn'
        [string "bundle:deps/require.lua"]:293: in function 'require'
        [string "bundle:main.lua"]:50: in function <[string "bundle:main.lua"]:38>
        [C]: in function 'xpcall'
        [string "bundle:main.lua"]:38: in function <[string "bundle:main.lua"]:31>

This seems to contradict the docs:

To install your dependencies, simply run lit install and it will grab any missing dependencies from package.lua and install them to deps. This will not touch any existing packages in deps.

I would expect that lit first looks into deps/, before trying to download from http://lit.luvit.io/.

@creationix
Copy link
Member

I know that it will use the local version instead of what's in the upstream server. Perhaps this is an edge case for unpublished packages. I'll see what I can do to fix it when I'm back at work.

My guess is it's unconditionally checking upstream for the latest version even though there is a local version that it will ultimately use.

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

No branches or pull requests

1 participant