elm-lang / elm-platform

Bundle of all core development tools for Elm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The post install hook for npm package fetches the elm binaries every time yarn/npm install is run

m25n opened this issue · comments

The post install hook for the npm package fetches the elm binaries every time, even if they are already downloaded on the local machine. Running the post install hook every time seems to be the way that npm/yarn works, by the way. Because the post install script goes to the network every time, it creates flaky builds when the request fails. This became apparent after the bintray outage on 23 May. It appears that bintray has solved their outage by rate limiting which compounds the issue.

One possible solution is to make install.js check to see if has previously downloaded the binaries before attempting to download them. Another solution is to just publish binaries for the three big platforms (linux, darwin, windows) on npm and have it fallback to downloading.

I think the first solution is more desirable because it keeps the network traffic to a minimum. The second solution would cause people to download more information than they need.

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

This just bit us - our build failed because bintray was down...

I think this is a good idea! Tracking in #225.