Giter Club home page Giter Club logo

Comments (3)

florentc avatar florentc commented on September 2, 2024

We could introduce aliases in our dev environment shell to launch cabal test all with or without coverage analysis. For example cooked-test and cooked-test-coverage. Most of the time we don't care about the coverage analysis and we would launch cooked-test, we only check coverage punctually (in which case having excessive output once is not a big deal) and would then launch cooked-test-coverage. (or any better names)

from cooked-validators.

mmontin avatar mmontin commented on September 2, 2024

Is it really buggy though? It works on my environements? Could it be linked to direnv? @florentc

from cooked-validators.

florentc avatar florentc commented on September 2, 2024

Yes it is linked to direnv.

The current shellHook defines and exports a shell function to override cabal. When going in the dev shell with nix develop, you end up in a bash shell where this works.

In my case, I use direnv so I actually stay in the same shell (zsh instead of bash) where for some reason this override does not work (anymore? I remember it used to).

The shellHook does work with direnv and other shells such as zsh usually. I use shell hooks in other projects with direnv + zsh without any issue. Here, if I add an export (e.g export FOO=1), I get 1 as an output to echo $FOO in my environment enhanced by direnv. So I think the issue is just that defining a function then exporting it with export -f is not the way to go in zsh. Even when using zsh compatible syntax it doesn't work. It seems that direnv doesn't make it possible to inherit functions from the shell hook.

We could consider this a non issue because it is: if you play by the rules (nix develop) it works. However, I think my workflow is quite common in practice so if we find some easy fix let's do it.

In any case, this is extremely low priority.

from cooked-validators.

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.