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

ponyc: update 0.38.1 #98598

Merged
merged 2 commits into from Sep 28, 2020
Merged

ponyc: update 0.38.1 #98598

merged 2 commits into from Sep 28, 2020

Conversation

redvers
Copy link
Member

@redvers redvers commented Sep 23, 2020

This addresses #98376

Motivation for this change

ponyc had been stalled at v0.33.2 for a while for three reasons:

  1. The buildsystem had been changed from make to cmake
  2. A bug was discovered in LLVM 9.x which caused SIGSEGV in the test suite. The fix has been applied to LLVM upstream but is in the 10.x and master branch. Since ponyc currently uses 9.x, the build requires a patched+fixed llvm for the build only
  3. The additional complexity of the (temporary) build-system in use was a real pain to integrate into a nix package.

I believe I have finally tamed this beast.

Things done
  • 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.

Note - I do not own a Mac so I'm going to be reliant on hydra to test against that platform.

Thanks!

(This is a redo of #98568 after I squashed that commit into a mess of 7 commits I couldn't fix - my apologies).

cc: @evanjs

@jasoncarr0
Copy link
Contributor

I can confirm that this build works (still on NixOS though)

@redvers redvers changed the title ponyc: update 0.37.0. [WIP] ponyc: update 0.37.0. Sep 26, 2020
@redvers
Copy link
Member Author

redvers commented Sep 26, 2020

Marking as WIP as upstream has an emergency release this weekend. Will remove WIP and increment when the new release occurs (provisionally 0.38.1)

@redvers redvers changed the title [WIP] ponyc: update 0.37.0. [WIP] ponyc: update 0.38.1 Sep 26, 2020
@redvers redvers changed the title [WIP] ponyc: update 0.38.1 ponyc: update 0.38.1 Sep 26, 2020
@redvers
Copy link
Member Author

redvers commented Sep 26, 2020

Emergency Release as mentioned above.

Fixes a double-free bug.

Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

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

Tested on x86_64-darwin

pkgs/development/compilers/ponyc/default.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/ponyc/default.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/ponyc/default.nix Outdated Show resolved Hide resolved
@redvers
Copy link
Member Author

redvers commented Sep 27, 2020

Oh, that's some great solutions - I'll implement and test them now. Thank you so much for your help thus far!

@redvers
Copy link
Member Author

redvers commented Sep 27, 2020

I'm having problems with the substituteAll suggestion - getting

[red@evil:~/projects]$ nix-shell -I nixpkgs=nixpkgs -p ponyc
error: syntax error, unexpected '{', expecting '.' or '=', at /home/red/projects/nixpkgs/pkgs/development/compilers/ponyc/default.nix:38:17
(use '--show-trace' to show detailed location information)

Line 38: is the first line in:

  substituteAll {
    src = ./make-safe-for-sandbox.patch;
    googletest = fetchurl {
      url = https://github.com/google/googletest/archive/release-1.8.1.tar.gz;
      sha256 = "17147961i01fl099ygxjx4asvjanwdd446nwbq9v8156h98zxwcv";
      name = "release-1.8.1.tar.gz";
    };
  };

I guess I don't know where it should go?

@jasoncarr0
Copy link
Contributor

I think you'll need to use the substituteAll as the expression instead of the original patch? As is it seems like the parse error is coming up because it's just a free-floating expression in the middle of your record

@redvers
Copy link
Member Author

redvers commented Sep 27, 2020

I'm looking through examples in nixpkgs and I think you're right. Lemme try that in patches...

@redvers
Copy link
Member Author

redvers commented Sep 27, 2020

Okay - got it. Testing and pushing

@redvers
Copy link
Member Author

redvers commented Sep 27, 2020

@veprbl - Re-requested a review as I've applied all suggested improvements. Is there anything else you need from me?

@redvers
Copy link
Member Author

redvers commented Sep 27, 2020

@veprbl - this commit should be interesting as I applied all your changes and re-pushed... but the build hash didn't change.

I am both surprised and impressed that s/clangStdenv/stdenv/ in the .nix file and adding stdenv = clangStdenv as an override in all-packages resulted in the same output!

@redvers
Copy link
Member Author

redvers commented Sep 28, 2020

@NixOS/ofborg

@veprbl
Copy link
Member

veprbl commented Sep 28, 2020

@GrahamcOfBorg eval

@redvers The s/clangStdenv/stdenv/ is just a variable rename, it does not change the computed derivation, so should not be too surprising. But I agree, it is quite nice, how it works.

@redvers
Copy link
Member Author

redvers commented Sep 28, 2020

@veprbl - it's still failing, even though that commit to maintainers was reverted. I guess I can change a comment in a patch or something to force a new hash to force it to calculate?

@redvers
Copy link
Member Author

redvers commented Sep 28, 2020

Success!

@tel
Copy link
Contributor

tel commented Sep 28, 2020

Was able to build this as an overlay on MacOS 👍

@veprbl
Copy link
Member

veprbl commented Sep 28, 2020

@GrahamcOfBorg build ponyc pony-stable

@redvers
Copy link
Member Author

redvers commented Sep 28, 2020

@veprbl - stable was the name of the package-manager. It's not a stable version of pony.

It's also being deprecated and replaced by corral.

See: #98601

@redvers
Copy link
Member Author

redvers commented Sep 28, 2020

@veprbl - I have no idea why this is still executing after 6 hours. All the logs appear to be complete.

@cole-h
Copy link
Member

cole-h commented Sep 28, 2020

Our darwin builder is offline right now. I don't know why the "Wait for ofborg" status still hasn't cleared.

@veprbl veprbl merged commit 046c6a7 into NixOS:master Sep 28, 2020
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

5 participants