Code Monkey home page Code Monkey logo

Comments (10)

bgamari avatar bgamari commented on August 16, 2024 2

For the record, I believe the relevant upstream issue is NixOS/nix#5663. This comment from Eelco makes me skeptical that an upstream solution is forthcoming.

from ghc.nix.

bgamari avatar bgamari commented on August 16, 2024

@MangoIV do you have any opinion on how best to do this?

from ghc.nix.

MangoIV avatar MangoIV commented on August 16, 2024

it actually does, see this line:

withIde = true;

from ghc.nix.

MangoIV avatar MangoIV commented on August 16, 2024

how best to do this

the pain here comes from not being able to be able to pass arguments to flake commands, that's why there's this userSettings attrset.

I agree this is not nice, afaik it's worked on on the nix side of things but I can't estimate when that lands.

from ghc.nix.

MangoIV avatar MangoIV commented on August 16, 2024

fwiw I documented the use of userSettings here:

- To change the settings of the `devShell` to your liking, just adjust the `userSettings` attribute-set in the top-level flake.

Perhaps I should highlight this more prominently?

from ghc.nix.

MangoIV avatar MangoIV commented on August 16, 2024

I also thought about a flake template so that people can init a custom flake that takes their settings, but I haven't quite had a deep enough look into it.

from ghc.nix.

MangoIV avatar MangoIV commented on August 16, 2024

another way would be to generate all outputs but that would be quite the hack.

from ghc.nix.

bgamari avatar bgamari commented on August 16, 2024

fwiw I documented the use of userSettings here:

- To change the settings of the `devShell` to your liking, just adjust the `userSettings` attribute-set in the top-level flake.

Perhaps I should highlight this more prominently?

The problem with userSettings is that it's not uncommon for a user to have more than one GHC tree, each using a different devShell. Modifying the flake makes this workflow very error-prone. I suppose we could recommend that users instead have one ghc.nix checkout per GHC working tree, although this seems non-ideal.

I agree this is not nice, afaik it's worked on on the nix side of things but I can't estimate when that lands.

Even worse, as far as I'm aware, it's not even clear that there is upstream consensus that the status quo is even problematic (or, rather, that there is a solution that wouldn't do more harm than good). For this reason, I do wonder whether we wouldn't be better off offering devShells for common cases, letting the "special" cases be handled by userSettings.

another way would be to generate all outputs but that would be quite the hack.

I agree; generating all outputs seems unnecessary. I think merely handling the common cases (for some value of "common") would be sufficient.

CCing @Ericson2314 as I know he has thought about this and is quite involved on the nix side of things.

from ghc.nix.

MangoIV avatar MangoIV commented on August 16, 2024

I think merely handling the common cases (for some value of "common") would be sufficient

if John Ericson doesn't know a good solution I can open a corresponding issue as an intermediate solution and also handle that, if you could perhaps tell what's most used in your experience, that would be great.

from ghc.nix.

MangoIV avatar MangoIV commented on August 16, 2024

@bgamari can you perhaps look whether #172 looks like an intermediate solution for you?

from ghc.nix.

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.