-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
buildRebar3 and buildMix depend less on hex registry #25655
Conversation
@elitak, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ericbmerritt and @yurrriq to be potential reviewers. |
Quick reply for now: https://github.com/erlang-nix/hex-pm-registry-snapshots |
@yurrriq I don't see the script that emits hex-packages.nix, if that's what you meant to link... |
The script that updates the registry is update.sh. The code that actually creates |
Ok thanks. |
Hex2nix isnt building now because I somehow broke I might just abandon this and port all my projects to Mix, unless someone who's familiar with the rebar3+nix-bootstrap can offer a better solution than my moving |
@elitak rebar3 doesn't want to give up dependency management in any way shape or form. I have had conversations with the maintainers and they are not interested in fixing that problem. We had to do quite a number of hacky things to get it working. You are running into all that stuff. Mix was much simpler. |
Alright, I'm just backing out the rebar3 changes for now, leaving the innocuous |
@GrahamcOfBorg build hexPackages.airbrakify |
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: hexPackages.airbrakify Partial log (click to expand)
|
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: hexPackages.airbrakify Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: hexPackages.airbrakify Partial log (click to expand)
|
@GrahamcOfBorg build beam.packages.erlang.airbrakify |
Failure on x86_64-darwin (full log) Attempted: beam.packages.erlang.airbrakify Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: beam.packages.erlang.airbrakify Partial log (click to expand)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Anyone have objections?
Failure on aarch64-linux (full log) Attempted: beam.packages.erlang.airbrakify Partial log (click to expand)
|
@GrahamcOfBorg eval |
@GrahamcOfBorg build beam.packages.erlang.airbrakify |
None from me. |
Removing --no-deps-check here broke a lot of builds, since it now runs the deps check. Is running the deps check the intended effect? cc: @yegortimoshenko |
Example of a build that doesn't work anymore: {
jason = buildMix rec {
name = "jason";
version = "1.1.2";
src = fetchzip {
url = "https://github.com/michalmuskala/jason/archive/v${version}.tar.gz";
sha256 = "0fh87vrfqsyiaazsangsg992i1azad8cmzyzvg7fdm9z6b3v7lm0";
};
};
} |
Can confirm, |
You can use |
Motivation for this change
I was trying to build one of my own projects using packages newer than those in the hex registry and found it was impossible because both Mix and rebar3 were trying to pull in the updated registry after failing to find the requested versions.
Mix has a new environment flag that fixes the behavior, so that change was easy.
Rebar3, on the other hand, still insists on updating the registry even when the built dependencies are present in
./_build/default/lib
. The best solution I could come up with short of fixing this in upstream (erlang/rebar3#958) was to change the rebar3 bootstrap to have it generate all of what was symlinked said directory to./_checkouts
instead, sanssrc
subdirs, since rebar3 will try to recompile the source (always, because the derivations lack.rebar3/erlcinfo
metadata) into a RO store directory.My changes to the rebar3 bootstrapping could use review and probably more testing, but as it stands,
./pkgs/development/beam-modules/hex-packages.nix
is plenty broken. Does anyone know where is the script that generated this package listing? I need to make a fix there so that packages that depend on broken, elided packages are also elided. It could use a refresh, too.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)