bakpakin / Fennel

Lua Lisp Language
https://fennel-lang.org
MIT License
2.42k stars 124 forks source link

No --add-package-cpath option #442

Closed tp86 closed 1 year ago

tp86 commented 1 year ago

I want to use luafilesystem in fennel script. luafilesystem is a C-based Lua module, so only lfs.so file is available. I have installed it in custom location via luarocks and it's not available by default for require.

While I can set LUA_CPATH variable or set package.cpath from code, there should also be an option to add to package.cpath from command-line, similar to the way package.path can be manipulated with --add-package-path option.

Is there any reason why there is no such option?

technomancy commented 1 year ago

No reason; just haven't gotten around to it yet. If you want to add it, that'd be great!

tp86 commented 1 year ago

I have sent patch 39358 to mailing list, let me know if it's ok (this is first time I'm using get-send-email).