Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to track executable dependencies #6437

Closed
phadej opened this issue Dec 15, 2019 · 1 comment
Closed

How to track executable dependencies #6437

phadej opened this issue Dec 15, 2019 · 1 comment

Comments

@phadej
Copy link
Collaborator

phadej commented Dec 15, 2019

  • When executable components (built-tool-depends) are put into the store, they are just put there.
  • However, when InstallPlan checks for dependencies, it checks that the dependencies of an executable are also in the store
    • This is right thing to do, as there might be library with data-files for example
  • Yet, there is no way to know, by just looking at the store, whether the executable component has all dependencies (and they are unbroken)
    • For libraries, there are .conf files in package.db

This is important for garbage collection of the store:

  • If we look only at ~/.cabal/bin as the roots
  • they will retain the executable component
  • but the executable component won't retain any of its dependencies

Then, if we clean up the dependencies:

  • Executable might stop working if dependencies data files are gone, ... or
  • cabal will error out, when checking the integrity of InstallPlan
phadej added a commit to phadej/cabal that referenced this issue Dec 16, 2019
phadej added a commit to phadej/cabal that referenced this issue Dec 16, 2019
phadej added a commit to phadej/cabal that referenced this issue Dec 16, 2019
@phadej
Copy link
Collaborator Author

phadej commented Dec 16, 2019

And I'm answering my own question: we do track dependencies, in cabal-plan.txt of the component:

pkgid: markdown-unlit-0.5.0
component: ComponentExe (UnqualComponentName "markdown-unlit")
src: e72d0d7b82525e2a2c664012ce9dc35835b3fff91040d9f20897ed82f24ec7bf
pkg-config-deps: 
deps: base-4.12.0.0, base-compat-0.10.5-3b5d3efb11225e77473051317734ad1e9266f98a1ce6336434585878bd100296, markdown-unlit-0.5.0-31c3eb468b531f32d377152c509e7b48d3309f30aef14c6e32c9e61edd97873e
compilerid: ghc-8.6.5
platform: x86_64-linux
shared-lib: True
stripped-exe: False
debug-info: 0

@phadej phadej closed this as completed Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant