-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elm 0.19 support #14
Comments
Do you think it could be simplified now by simply looking at the direct/indirect dependencies in So:
|
So I implemented the above algorithm here: jb55@faa46d4 I'm going to test it with an elm project I'm converting over to see if it works. |
That looks really good! :) |
so I got pretty close, but this doesn't work because elm expects cached build artifacts in the
This seems obvious in retrospect: elm install fetches and then "builds" the dependencies, storing binary build artifacts into the ~/.elm cache. Right now I'm just fetching the sources. Not sure what to do next, it looks like we'll still need to plug into the elm compiler internals to build the fetched sources... |
The whole idea is for Nix to just prefetch source and then use elm to build them. I think it does download |
Some additional info: gdotdesign/elm-github-install#62 |
I think I know how to implement this, it should make it really fast as hashes are now precalculated: https://package.elm-lang.org/packages/elm/time/latest/endpoint.json Most of the relevant code is in Deps.Website module of the Elm compiler. https://package.elm-lang.org/all-packages is what is turned into versions.dat in Deps.Cache |
Nice, let me know how it goes. I'm currently deploying my 0.19 app with duct tape and glue. |
Yes. Also need to make a proper Nix api out of https://github.com/NixOS/nixpkgs/blob/67f58eee5ee8d21ccd914fbcde18e1be146dd490/pkgs/development/compilers/elm/default.nix#L88 I'll get on with this in a couple of weeks, not before. |
Nix side is done: NixOS/nixpkgs#50653 |
Here's the commit updating my elm project to 0.19: jerith666/elbum@04faada. In particular note that I couldn't reuse the I think @jb55's suggestion of parsing |
There is hope for Elm 0.20 https://discourse.elm-lang.org/t/resolving-dependencies-in-elm-0-19-package-projects/2589 |
@jb55 the error you got was due to caching, just do |
@domenkozar hmm interesting, when I run my branch again after removing elm-stuff, I get this:
getting there... |
sounds like you need to update your deps, it's trying to fetch something it doesn't have. I'll make a PR how I got things to work, although it's not finished yet. |
@domenkozar yeah weird I tried deleting everything, running elm bump, tried again, mine still doesn't work. will try your PR. |
if it's trying to fetch |
yup, I was able to get @domenkozar's PR working by copying |
Merged to master! |
won't have time to work on this soon, but internals changed quite a bit.
The text was updated successfully, but these errors were encountered: