luvit / lit

Toolkit for developing, sharing, and running luvit/lua programs and libraries.
http://lit.luvit.io/
Apache License 2.0
245 stars 58 forks source link

coro-net optionalDependencies metadata? #187

Open squeek502 opened 8 years ago

squeek502 commented 8 years ago

coro-net defines an optionalDependencies key in its metadata, but as far as I can tell that is unsupported by lit. Was this something that there were plans to add support for?

creationix commented 8 years ago

It was an idea. I"m not sure how it would work exactly.

Do you have any ideas how it should work?

squeek502 commented 8 years ago

I guess optional dependencies would be something that could be prompted for during lit install but prompting doesn't seem ideal. Could instead warn during lit install of a package with optionalDependencies and give instructions for how to install the optional ones.

Might also want to throw a more descriptive runtime error like To use tls, 'secure-socket' must be installed. Run 'lit install luvit/secure-socket@1.0.0'

However, it seems like coro-net might not be a good use case for optionalDependencies, as tls seems like something worth supporting generally.

creationix commented 8 years ago

The thing with secure-socket is it depends on openssl which not all luvi builds have. And in many cases, luvi might be used for a web server that sits behind a ssl terminating proxy and not need tls itself.