Skip to content
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

crystal: refactor and add 0.35.1 #103987

Merged
merged 2 commits into from Nov 17, 2020

Conversation

fabianhjr
Copy link
Member

@fabianhjr fabianhjr commented Nov 16, 2020

Motivation for this change

crystal is currently marked as broken, this is an attempt to fix it and bring it
up to date.

renabled tests by changing from spec to spec_compiler (only compiler tests)
which now pass:

Using compiled compiler at .build/crystal
.build/compiler_spec
.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*..................................................................................................................................................................................................................................................................................................................................................................................................**.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*...................................................................................................................................................................................................................................................................................**.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*...............................................*..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Pending:
  Code gen: lib codegens lib var set and get
  Code gen: primitives codegens pointer of int
  Code gen: primitives sums two numbers out of an [] of Number
  Semantic: cast casts from union to incompatible union gives error
  Semantic: def overload restricts on generic type with free type arg
  Semantic: def overload restricts on generic type without type arg
  Semantic: instance var doesn't infer type to be nilable if using self.class in call in assign
  Semantic: pointer allows using pointer with subclass
  Semantic: primitives types pointer of int

Finished in 6:28 minutes
9102 examples, 0 failures, 0 errors, 9 pending
Things done

Changes:

  • Removed tests spec_stdlib (kept spec_compiler)

  • Add 0.35.1

  • Slit shards versions to bring 0.11.1 and 0.12.0

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)

  • 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 nixpkgs-review --run "nixpkgs-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)

  • Ensured that relevant documentation is up to date

  • Fits CONTRIBUTING.md.

@fabianhjr fabianhjr marked this pull request as draft November 16, 2020 19:43
@fabianhjr fabianhjr force-pushed the refactor-crystal branch 6 times, most recently from 23e0b7f to 484f7eb Compare November 16, 2020 22:58
@fabianhjr fabianhjr marked this pull request as ready for review November 16, 2020 23:00
@fabianhjr
Copy link
Member Author

Supersedes #90038

@peterhoeg
Copy link
Member

This is great! How about shards ref #89863?

@fabianhjr
Copy link
Member Author

Hi @peterhoeg, sure, will take a look. Though, from that PR seems like there is interest on keeping multiple versions or should I just upgrade it to the latest one?

@peterhoeg
Copy link
Member

We need multiple shards versions ref the 0.11 changelog:

Add compatibility with Crystal 0.35. Drop compatibility with < 0.34

Hopefully crystal gets to v1.0 before 21.03 so we can start dropping the old versions.

@fabianhjr
Copy link
Member Author

Hi @peterhoeg, split is done. I think we could also remove crystal-0.32 if scry builds and works on 0.33. (However from their commit log it seems it isn't compatible with 0.34 until next release)

I am currently building shards but since I don't have my previous builds of crystal (0.32-0.34) it will take a while. unu

@peterhoeg
Copy link
Member

The GrandPlan(tm) was to keep the latest version of crystal that made it into a supported NixOS version around in unstable. That's 0.32 for 20.03 and 0.34 for 20.09. 20.03 will soon no longer be actively maintained and we can drop < 0.34

@fabianhjr
Copy link
Member Author

Ah ok, will fixup the commits to keep previous versions, though I dont mind backporting this to 20.09 as a commit that keeps previous versions there.

@fabianhjr
Copy link
Member Author

Everything fixuped to keep crystal-0.32.0 and shards-0.11.0.

@fabianhjr fabianhjr changed the title crystal: refactor and 0.34 -> 0.35.1 crystal: refactor and add 0.35.1 Nov 17, 2020
@peterhoeg
Copy link
Member

@GrahamcOfBorg build crystal_0_34 shards_0_11

@peterhoeg
Copy link
Member

Very nice work @fabianhauser

Is there a particular reason for doing both shards 0.11 and 0.11.1?

@fabianhjr
Copy link
Member Author

Not really, should I drop the 0.11 in favor of 0.11.1?

@peterhoeg
Copy link
Member

Yes, please drop the shards_0_11_1 attribute and have shards_0_11 point at 0.11.1

It's just added maintenance otherwise.

@fabianhjr
Copy link
Member Author

Ok pushed

@peterhoeg peterhoeg merged commit 085da94 into NixOS:master Nov 17, 2020
@peterhoeg
Copy link
Member

Thank you @fabianhjr !

@fabianhjr fabianhjr deleted the refactor-crystal branch November 17, 2020 15:57
@fabianhjr fabianhjr mentioned this pull request Nov 17, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants