Giter VIP home page Giter VIP logo

Comments (7)

angerman avatar angerman commented on July 30, 2024

@AshleyYakeley thank you for this suggestion. I doubt we'd want to relax the cleaning much. We treat packages as singular units as that is how packages from hackage, as well as sdist packaging works. Thus we detect the case of ill specified packages early and not late in the process when releases have to be cut.

Even if we allowed somehow to retain a file outside of the tree, where would that point to after unpacking the package into an isolated location? I'm not sure if hardlinks might help in your situation.

from haskell.nix.

AshleyYakeley avatar AshleyYakeley commented on July 30, 2024

A package from Hackage is indeed a singular unit, but it includes a cabal file. The source directory does not include a cabal file before hpack is run (e.g. via stack).

Another (better?) solution would be to do cleaning only after hpack has generated the cabal file.

Even if we allowed somehow to retain a file outside of the tree, where would that point to after unpacking the package into an isolated location?

It turns out that cleaning a subdirectory retains the subdirectory structure within the isolated location, so there's actually a place for files elsewhere in the tree.

from haskell.nix.

michaelpj avatar michaelpj commented on July 30, 2024

We already don't clean components if they are using hpack, presumably to support this sort of thing: https://github.com/input-output-hk/haskell.nix/blob/master/builder/comp-builder.nix#L106

So something is going wrong there.

from haskell.nix.

AshleyYakeley avatar AshleyYakeley commented on July 30, 2024

I'm examining this with a local copy of haskell.nix. Adding in __trace functions, I can see the canCleanSource flag is correctly false at that point. However, cleanSourceWith gets called in various other places which will omit the file.

from haskell.nix.

AshleyYakeley avatar AshleyYakeley commented on July 30, 2024

@michaelpj, #1925 shows a small hack to work around this issue, just to get an idea of where the problematic cleaning is done.

from haskell.nix.

AshleyYakeley avatar AshleyYakeley commented on July 30, 2024

(my flake.nix)

from haskell.nix.

stale avatar stale commented on July 30, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from haskell.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.