Add Setup.hs command lines to plan.json #2469
Open
+154
−46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the
nix-toolsbuild and planning infrastructure, focusing on enhancements to the install plan JSON output, code cleanup, and development environment improvements. The most significant changes are the addition of detailed build command arguments to the JSON plan output, refactoring for clarity and correctness, and updates to the development shell configuration.Enhancements to install plan JSON output:
configure-args,build-args,copy-args,haddock-args,test-args,benchmark-args, andrepl-argsin the JSON output, providing explicit command-line arguments used for each build step. This helps with debugging and reproducibility.renderFlagshelper function to standardize how command-line arguments are rendered for various Cabal commands in the JSON output.Code refactoring and correctness improvements:
avaialbeTargetToJ→availableTargetToJ) and improved mapping logic for dependencies to ensure correct JSON encoding. [1] [2] [3]ProjectPlanOutput.hsfor clarity and maintainability, and suppressed certain warnings and linting suggestions. [1] [2]Development and build environment updates:
cabal.projectto specifyghc-9.6as the compiler, ensuring consistent builds across environments.overlay.nixto use default tool selections forcabaland addhaskell-language-serverfor improved Haskell development experience.Example output:
{ "type": "configured", "id": "Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27", "pkg-name": "Cabal", "pkg-version": "3.14.2.0", "flags": {}, "style": "global", "pkg-src": { "type": "repo-tar", "repo": { "type": "secure-repo", "uri": "http://hackage.haskell.org/" } }, "pkg-cabal-sha256": "f98aa86a37b9920dc6dfc8d79119a10df69542734f158a1c66ff144592f1d004", "pkg-src-sha256": "a58ca2b17c250472ed4dac0ec0aa2c65173701cbfdfecca104713f73b4429432", "depends": [ "Cabal-syntax-3.14.2.0-be475844da27bcbf1c35aec7937d0c63838b3ad1bd46f667d32703da3106665e", "array-0.5.8.0", "base-4.18.3.0", "bytestring-0.11.5.4", "containers-0.6.7", "deepseq-1.4.8.1", "directory-1.3.8.5", "filepath-1.4.301.0", "mtl-2.3.1", "parsec-3.1.16.1", "pretty-1.1.3.6", "process-1.6.19.0", "time-1.12.2", "transformers-0.6.1.0", "unix-2.8.6.0" ], "exe-depends": [], "component-name": "lib", "configure-args": [ "configure", "--ghc", "--prefix=/home/andrea/.local/state/cabal/store/ghc-9.6.7/Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27", "--bindir=/home/andrea/.local/state/cabal/store/ghc-9.6.7/Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27/bin", "--libdir=/home/andrea/.local/state/cabal/store/ghc-9.6.7/Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27/lib", "--libsubdir=", "--dynlibdir=/home/andrea/.local/state/cabal/store/ghc-9.6.7/Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27/lib", "--libexecdir=/home/andrea/.local/state/cabal/store/ghc-9.6.7/Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27/libexec", "--libexecsubdir=", "--datadir=/home/andrea/.local/state/cabal/store/ghc-9.6.7/Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27/share", "--datasubdir=", "--docdir=/home/andrea/.local/state/cabal/store/ghc-9.6.7/Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27/share/doc", "--htmldir=/home/andrea/.local/state/cabal/store/ghc-9.6.7/Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27/share/doc/html", "--haddockdir=/home/andrea/.local/state/cabal/store/ghc-9.6.7/Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27/share/doc/html", "--sysconfdir=/home/andrea/.local/state/cabal/store/ghc-9.6.7/Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27/etc", "--enable-library-vanilla", "--disable-library-profiling", "--enable-shared", "--disable-static", "--disable-executable-dynamic", "--disable-executable-static", "--disable-profiling", "--disable-profiling-shared", "--profiling-detail=default", "--library-profiling-detail=default", "--enable-optimization", "--disable-debug-info", "--disable-build-info", "--disable-library-for-ghci", "--disable-split-sections", "--disable-split-objs", "--disable-executable-stripping", "--disable-library-stripping", "--package-db=clear", "--package-db=global", "--package-db=/home/andrea/.local/state/cabal/store/ghc-9.6.7/package.db", "--cid=Cabal-3.14.2.0-a95e1e8a8bc5e7fd4098d00c84207458f701bc6be999ca7f9f17247713014b27", "--dependency=Cabal-syntax=Cabal-syntax-3.14.2.0-be475844da27bcbf1c35aec7937d0c63838b3ad1bd46f667d32703da3106665e", "--dependency=array=array-0.5.8.0", "--dependency=base=base-4.18.3.0", "--dependency=bytestring=bytestring-0.11.5.4", "--dependency=containers=containers-0.6.7", "--dependency=deepseq=deepseq-1.4.8.1", "--dependency=directory=directory-1.3.8.5", "--dependency=filepath=filepath-1.4.301.0", "--dependency=mtl=mtl-2.3.1", "--dependency=parsec=parsec-3.1.16.1", "--dependency=pretty=pretty-1.1.3.6", "--dependency=process=process-1.6.19.0", "--dependency=time=time-1.12.2", "--dependency=transformers=transformers-0.6.1.0", "--dependency=unix=unix-2.8.6.0", "--disable-coverage", "--exact-configuration", "--disable-relocatable", "--with-ghc=/home/andrea/.ghcup/bin/ghc-9.6", "--with-ghc-pkg=/home/andrea/.ghcup/ghc/9.6.7/bin/ghc-pkg-9.6.7", "--ghc-option=-hide-all-packages", "lib:Cabal" ], "build-args": [ "build" ], "copy-args": [ "copy" ], "haddock-args": [ "haddock" ], "test-args": [ "test", "--log=$pkgid-$test-suite.log", "--machine-log=$pkgid.log", "--show-details=direct" ], "benchmark-args": [ "bench" ], "repl-args": [ "repl" ] }