nicolas.frisby at gmail.com
Fri Mar 19 20:20:24 UTC 2021
Hi all. Without show-build-info yet and without a cabal-install library, a
hobby project relies on parsing plan.json to access eg the list of .cabal
files and their flags as configured during the most recent cabal-install
I haven't found much documentation about plan.json. I'm particularly
curious what are its current semantics and intended use, and if these are
intended to remain stable going forward.
Some example specific questions:
* Would show-build-info supplant plan.json? If so, would there be a
* The docs say "A JSON serialization of the computed install plan
intended for integrating cabal with external tooling." It seems likely that
answering my questions will involve explaining what an "install plan" is.
(I'm unfortunately unfamiliar with Cabal internals, and ReadTheDocs search
doesn't seem to support phrases as queries.)
* What determines which packages have entries in the plan.json file after
a particular cabal-install invocation? Will it always include all local
.cabal files? (🤞)
* Is there enough information in the plan.json file in order to map an
entry there for source repository package to the corresponding path under
the builddir's `src` directory? There seems to be some sort of hash
involved in that path and I haven't figured what its inputs are and whether
the plan.json file includes them all.
Thank you for your time. -Nick
PS - My hobby project driving this question is based on wanting to parse
all local source files without having to typecheck/build any of them
(ideally nor their non-local dependencies). I need each source file path
and corresponding language extensions etc in order to invoke the parser.
(hie-bios doesn't suffice because its solution to this problem involves
building dependencies, possibly including local packages.)
If you see a more direct path that doesn't involve plan.json, please say
so. Thanks again!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cabal-devel