Giter Club home page Giter Club logo

Comments (7)

shlevy avatar shlevy commented on July 28, 2024

@peti: Any idea here?

from nixpkgs.

kosmikus avatar kosmikus commented on July 28, 2024

I'm a bit puzzled here. It looks like the assertion is triggered simply because the name-matching tries to evaluate the meta-information of that file, and the platform check fails. However, similar patterns are used all over the place. How would this assertion-check be different from the assertion check in, say, opera?

Two questions: (1) if you install via -iA, does the error go away? (2) does ghc-6.10.1-binary actually get installed on your system as a part of installing cabal2nix?

from nixpkgs.

Davorak avatar Davorak commented on July 28, 2024

It does install with -iA and ghc-6.10.1-binary does not get installed.

In addition an error in 6.10.1-binary.nix being triggered while evaluating ghc.meta.platforms in 6.10.4.nix surprised me:

practice:~ $ nix-env -i cabal2nix --show-trace
error: while evaluating the attribute `ghc.meta.platforms' at
`/Users/<>/code/nixpkgs/pkgs/development/compilers/ghc/6.10.4.nix:26:5':
while evaluating the function at `/Users/<>/code/nixpkgs/pkgs/lib/meta.nix:41:13':
while evaluating the function at `/Users/<>/code/nixpkgs/pkgs/lib/meta.nix:13:28':
while evaluating the function at `/Users/<>/code/nixpkgs/pkgs/lib/customisation.nix:98:35':
while evaluating the function at `/Users/<>/code/nixpkgs/pkgs/lib/customisation.nix:59:24':
while evaluating the builtin function `isAttrs':
while evaluating the function at `/Users/<>/code/nixpkgs/pkgs/development/compilers/ghc/6.10.1-binary.nix:1:1':
assertion failed at `/Users/<>/code/nixpkgs/pkgs/development/compilers/ghc/6.10.1-binary.nix:7:1'

from nixpkgs.

shlevy avatar shlevy commented on July 28, 2024

I think I see the problem. If a derivation's name attribute can be evaluated without an assertion failing but any of the meta attributes cause a failed assertion during evaluation, this issue will occur. So the problem isn't directly the assertion in 6.10.1-binary.nix, but the fact that meta.platforms in 6.10.4.nix and 6.12.3.nix is set to ghc.meta.platforms, where ghc is presumably 6.10.1-binary.nix.

I see two solutions we can implement right away: move the common meta information outside of the assertion and the binary and final derivations reference that same place, or build these versions of ghc with a binary that works on all platforms(which is not a good solution IMO)

Additionally, it's possible some change to nix could ameliorate this, but I'd have to investigate exactly where the AssertionError is being thrown and why. @kosmikus are either of the two solutions above palatable?

from nixpkgs.

shlevy avatar shlevy commented on July 28, 2024

Ok, traced the problem to https://github.com/NixOS/nix/blob/master/src/nix-env/nix-env.cc#L194 . Basically, due to lack of laziness in GetDrvs.cc all of meta gets evaluated to evaluate meta.priority. So I see three solutions in nix itself: a) Make queryMetaInfo more lazy (already implemented as part of PR 31 on nix), so that only if meta.priority tripped a failed assertion would this issue occur, b) handle the AssertionError in queryMetaInfo (presumably just not adding that attribute to the set), or c) handle the AssertionError in getPriority (presumably acting as if the meta attribute weren't set). @edolstra: Thoughts?

from nixpkgs.

peti avatar peti commented on July 28, 2024

@edolstra, do you have an idea how to remedy this issue?

from nixpkgs.

aristidb avatar aristidb commented on July 28, 2024

Can this issue be closed for obsolescence? cabal2nix does now build on OS X, albeit not with GHC 6.10, which isn't supported anymore.

from nixpkgs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.