Skip to content

crystal: init at 0.29.0 #63725

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

Merged
merged 3 commits into from
Jun 25, 2019
Merged

crystal: init at 0.29.0 #63725

merged 3 commits into from
Jun 25, 2019

Conversation

peterhoeg
Copy link
Member

Motivation for this change

Supersedes #63427
Fixes #63039

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 labels Jun 24, 2019
@jonringer
Copy link
Contributor

This seems to break the scry package

builder for '/nix/store/lidci1fs0zfb6h8ypykv1q62bfysx175-scry-0.7.1.20180919.drv' failed with exit code 1; last 10 log lines:

  require "./config"
  ^

  in /nix/store/p9zj24ygr8xr633a6xjrlb7k30gxm7ab-crystal-0.29.0/lib/crystal/compiler/crystal/config.cr:37: undefined constant Crystal::Codegen::Target

      @@default_target : Crystal::Codegen::Target?
                         ^~~~~~~~~~~~~~~~~~~~~~~~
cannot build derivation '/nix/store/1p3z9zp6my9r15d2ny5ml165a74nvmyv-env.drv': 1 dependencies couldn't be built
[10 built (1 failed), 38 copied (1233.4 MiB), 213.1 MiB DL]
error: build of '/nix/store/1p3z9zp6my9r15d2ny5ml165a74nvmyv-env.drv' failed
https://github.com/NixOS/nixpkgs/pull/63725
1 package failed to build:
scry

@jonringer
Copy link
Contributor

I would try updating the scry package to 0.8, see if that fixes anything.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
vbgl Vincent Laporte
@peterhoeg
Copy link
Member Author

I would try updating the scry package to 0.8, see if that fixes anything.

It doesn't - sorry, I had a few different commits here as I am using it on both stable and unstable and not all of it made it over... I have a fix for scry. Coming shortly.

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Jun 25, 2019
@peterhoeg peterhoeg merged commit e3afc85 into NixOS:master Jun 25, 2019
@peterhoeg peterhoeg deleted the u/crystal branch June 25, 2019 05:00
@peterhoeg peterhoeg restored the u/crystal branch June 25, 2019 08:51
@peterhoeg peterhoeg deleted the u/crystal branch June 26, 2019 02:51
# - 0.26.1 can build 0.25.x and 0.26.x but not 0.27.x
# - 0.27.2 can build 0.27.x but not 0.25.x and 0.26.x
# - 0.27.2 can build 0.27.x but not 0.25.x, 0.26.x and 0.29.x
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm intrigued by how crystal is starting to become maintained in nixpkgs.

Is there are stable change to be done once a new version is released?

Usually the last 0.m.p version should be used to build any 0.(m+1).q version. That is how Crystal releases works. That is the rule that should be followed since the compiler is bootstrapped. Although in the past there were some hiccups with this rule.

In brew, when 0.m.p is released we built that tag using the GitHub binary release of the latest 0.m-1.q version.
But from what I "understand" from the formula after a first version of the compiler got into nix the new ones are built after it. Having a new lineage. Am I right?

@peterhoeg
Copy link
Member Author

peterhoeg commented Aug 24, 2019 via email

@bcardiff
Copy link
Contributor

Thanks for the clarifications and porting crystal to nixpkgs.

That is how Crystal releases works. That is the rule that should
be followed since the compiler is bootstrapped.

Is it an issue that we don't do it that way?

It's not necessarily an issue. From the comments, it sounded to me like there was some research on which compiler should be used. It seems like a trial an error procedure is made to check if a bump is needed.

As long as the compiler specs passes and the std passes with the new compiler then the behavior should be good enough. Ideally, the progress of the compiler should be guaranteed (ie: the new compiler can build itself again).

@peterhoeg
Copy link
Member Author

It seems like a trial an error procedure is made to check if a bump is needed.

That's exactly how it was done, so your explanation clears that up. I'll update the comment in there.

As long as the compiler specs passes and the std passes with the new compiler then the behavior should be good enough.

Yeah, that's the problem. It doesn't. We're pretty close but not quite there. It basically has to do path assumptions in the specs that fail when we build using nix.

Ideally, the progress of the compiler should be guaranteed (ie: the new compiler can build itself again).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crystal: Missing YAML dependency
3 participants