Coder Social home page Coder Social logo

loverboy's Issues

Loverboy doesn't explain about mfiles

On first install, if you've forgotten to setup the mfiles, you get a stacktrace:

$ loverboy help
/usr/local/opt/lua/bin/lua5.3: /usr/local/share/lua/5.3/loverboy/util.lua:10: cannot open ~/.local/share/loverboy/mfiles: No such file or directory
stack traceback:
    [C]: in function 'lfs.dir'
    /usr/local/share/lua/5.3/loverboy/util.lua:10: in local 'load_mfiles'
    /usr/local/share/lua/5.3/loverboy/util.lua:19: in main chunk
    [C]: in function 'require'
    /usr/local/share/lua/5.3/loverboy.lua:4: in main chunk
    [C]: in function 'require'
    ...cal/lib/luarocks/rocks-5.3/loverboy/0.1.0-1/bin/loverboy:3: in main chunk
    [C]: in ?

Instead, it'd be nice to tell the user what to do:

$ loverboy help
cannot open ~/.local/share/loverboy/mfiles: No such file or directory

To get mfiles, run:
    git clone https://github.com/ngscheurich/loverboy-mfiles.git ~/.local/share/loverboy

repos with folders aren't supported

As far as I can tell, repos with folders aren't supported. The current windfield has two problems:

  1. windfield has all its code in a folder
  2. mlib is incorrectly spelled mib in the mfiles

So if you try to install it, it looks successful:

$ mkdir lib
$ loverboy add windfield
==> Adding windfield (master)...
  * lib/init.lua
  * lib/mlib/mib.lua
Done!

But actually, it was not:

$ find lib -type f -exec head -n2 {} +
==> lib/mlib/mib.lua <==
404: Not Found

==> lib/init.lua <==
404: Not Found

Fixing the typo doesn't make things better. I tried a couple methods of describing the path to download in the mfiles

Tested on loverboy version 0.1.0 and ngscheurich/loverboy-mfiles@f45fcbf

I think a remapping syntax like this would make sense:

files = {
  -- structure of table defines desired folder structure
  windfield = {
    "windfield/init.lua", -- path of string defines folder structure in git
  }
}

Loverboy doesn't create lib folder for you or explain that you must create it

After installing loverboy and creating a new empty project folder, loverboy fails to add a library.

$ mkdir puppypark
$ cd puppypark
$ loverboy add baton
==> Adding baton (v1.0)...
* lib/baton.lua
/usr/local/opt/lua/bin/lua5.3: /usr/local/share/lua/5.3/loverboy/util.lua:74: lib/baton.lua: No such file or directory
stack traceback:
    [C]: in function 'assert'
    /usr/local/share/lua/5.3/loverboy/util.lua:74: in function 'loverboy.util.download'
    /usr/local/share/lua/5.3/loverboy/add.lua:21: in local 'recursiveDownload'
    /usr/local/share/lua/5.3/loverboy/add.lua:50: in main chunk
    /usr/local/share/lua/5.3/cliargs/parser.lua:54: in function </usr/local/share/lua/5.3/cliargs/parser.lua:51>
    (...tail calls...)
    /usr/local/share/lua/5.3/cliargs.lua:13: in method 'parse'
    /usr/local/share/lua/5.3/loverboy.lua:24: in main chunk
    [C]: in function 'require'
    ...cal/lib/luarocks/rocks-5.3/loverboy/0.1.0-1/bin/loverboy:3: in main chunk
    [C]: in ?

Creating a lib/ directory fixes the problem, but the output doesn't clearly indicate that's the solution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.