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

Luapak dependency analysis feedback #2

Open
Alloyed opened this issue Mar 21, 2018 · 1 comment
Open

Luapak dependency analysis feedback #2

Alloyed opened this issue Mar 21, 2018 · 1 comment

Comments

@Alloyed
Copy link

Alloyed commented Mar 21, 2018

Sorry about the issue spam but as you can probably tell I'm working through using luapak in a practical way and I figure too much feedback is better than no feedback.

I do appreciate that luapak will try to statically analyze the modules my project requires, but because my package is nontrivial and includes dependencies that themselves have dependencies it's hard to tell where missing dependencies are used and why.

For example, here is the output from using luapak on lua-lsp:

luapak: Resolving dependencies...
luapak: warn: The following modules are required, but not found:
luapak: warn:    debug
luapak: warn:    lpeg
luapak: warn:    lua-lsp.formatting
luapak: warn:    luacheck
  • I have no idea where lpeg is used and I'm not sure how I'd find out. It'd be nice for luapak itself to track the source of these dependencies and then report them to me as a quick list next to the dependency name.
  • debug should(?) be the default lua debug module? With some knowledge of the source of this I could probably say for sure, but I don't have that info as of right now.
  • lua-lsp.formatting here is a straightforward mistake on my part: my source directory includes it but not my rockspec file. Still, if it's easy to do so It'd be nice to have a message for exactly this case.
  • I know for a fact I depend on luacheck, but since it's optional it's not listed as a dependency in the rockspec. It'd be nice to have an alternate way to specify luarocks dependencies to support this too.
@spc476
Copy link

spc476 commented May 7, 2018

Some more feedback. I'm running this over a project I've written, and a list of missing modules popped up, including

  • coroutine
  • debug
  • io
  • math
  • os
  • string
  • table

(Yes, I do local math = require "math" in my code as a form of documentation and intent). It would be nice if I could tell luapak to assume standard modules, or it did that by default.

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

No branches or pull requests

3 participants