Git Product home page Git Product logo

Comments (4)

peti avatar peti commented on July 19, 2024

I don't understand why you consider this an issue with cabal2nix? The utility offers a --no-haddock command line switch you can use to generate a correct expression in such cases. Also, the transformers-compat package we have in Nixpkgs has the noHaddock=true bit set and installs just fine.

What exactly to you want us to do?

from cabal2nix.

Davorak avatar Davorak commented on July 19, 2024

For the vast majority of packages cabal2nix creates a nix expression and it installs perfectly. In this case it required a manual change inorder to install. I am not clear on why I needed to set the noHaddock flag in order for the installation to complete when no other package I have used cabal2nix on in the same system has needed it.

Ideally cabal2nix would be able to detect that noHaddock was needed in order install and add it appropriately. I can not tell weather this is possible or not because I not understand why transformers-compat needed and others did not, but from your response it sound like it is not possible. If it is not possible then the solution is additional documentation, which could be me adding a note to the haskell page on nixos.org/wiki or starting a page for cabal2nix and adding notes there. If it was important enough then it could going the README.md.

If I knew it was not possible to make the detection automatically then I would just add documentation to the wiki directly.

from cabal2nix.

peti avatar peti commented on July 19, 2024

transformers-compat fails the Haddock stage because it doesn't expose any modules to the user, so when Haddock is run, there are no input files for it. I guess, it would be possible to recognize this particular case in cabal2nix. I never thought much about it, though, because cases like transformers-compat (i.e. library package that don't expose any modules) are very rare. Auto-detecting this case simply didn't feel like a siginificant issue. The vast majority of packages that do require noHaddock=true are packages that have syntax errors in their Haddock documentation, and those cases we cannot autodetect.

Anyway, you are right saying that the documentation for cabal2nix should be improved to mention that issue.

from cabal2nix.

peti avatar peti commented on July 19, 2024

It's becoming increasingly common for authors to deprecate their package by releasing an empty version of the library that contains no visible modules, but a comment saying "this package is obsolete, use such-and-such instead". Builds of such packages invariably fail at first because we try to run haddock on them. Cabal2nix could recognize that a package has no contents and set noHaddock = true automatically.

from cabal2nix.

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.