z-pattern-matching / z

Pattern Matching for Javascript
https://z-pattern-matching.github.io/
Apache License 2.0
1.72k stars 50 forks source link

Installation on Windows/without git not working due to git checkout #43

Open ptusch opened 6 years ago

ptusch commented 6 years ago

Hello there,

There seems to be an issue in the package.json. Currently, you have a fixed git checkout to js-function-reflector but that requires the user to have git available.

While this is no problem for your all-day developer, this means you need git at install-time. So including z into software that is used by the average software "user" will become difficult (of course, we can question how often the average user uses npm). Also, this makes it hard to use z in environments where you wish to have as few dependencies as possible, such as docker containers or strict production machines. Another argument against having git references is that you might wish to have "the correct" version in your software. Meaning when I create a package today, I want it to behave the same tomorrow to ensure the working of my package.

I can actually not reproduce this but a colleague had this issue. I suppose you can enforce it by removing git from your system and try to install z.

What are your thoughts on this?

leonardiwagner commented 6 years ago

@ptusch you are right, any package should depend on git indeed.

Probably now it's aligned with arrizalamin/js-function-reflector, just need to check it and fix package.json (otherwise,it can be deployed it on another npm package)

ptusch commented 6 years ago

Now I've just had issues with installation in Linux, too.

1216 error /usr/bin/git ls-remote -h -t https://github.com/leonardiwagner/js-function-reflector.git
1216 error
1216 error fatal: unable to access 'https://github.com/leonardiwagner/js-function-reflector.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
1216 error
1216 error exited with error code: 128

So obviously, the network somehow decided to brick. But only for this very dependency. Right now, I'm blocking production because of this and it's not the greatest feeling. Do you plan to fix it or desire a PR for this? (last time I checked, there were some unit test issues - I think like 4 that broke).

(Sorry for the tone; it's hard to reason about a dependency that doesn't want to get installed)