Extended project files (conditionals and imports) (#7783)
commit32259a1518d45723b0bbf989088bee61b07d4bb6
authorgbaz <gershomb@gmail.com>
Thu, 31 Mar 2022 21:04:49 +0000 (31 17:04 -0400)
committerGitHub <noreply@github.com>
Thu, 31 Mar 2022 21:04:49 +0000 (31 21:04 +0000)
tree9eaffa92aa08741df60f528d11872c186ee50821
parentebfd8c7270dd603ddbf6ec5302a8145427f2763f
Extended project files (conditionals and imports) (#7783)

* initial parser pass

* first compiling pass

* get more stuff sort of working

* conditional parsing actually works

* error cleanup and downloads

* thread through http transport

* fix merge

* better errors and use extended project parsing uniformly

* elif support, maybe?

* fix outdated cmd, add tests, docs

* fix docs

* use legacyReadFields parser

* changelog

* cyclical import detection

* fix shadowing

* add missing file

* finish merge

* fix outstanding merge issue

* use existing config available when checking for compiler for package flags

* review comments

* add missing test file

* Update pr-7783

Co-authored-by: Gershom Bazerman <gershom@arista.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
26 files changed:
Cabal-syntax/src/Distribution/Fields/ConfVar.hs
Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs
Cabal-syntax/src/Distribution/Types/CondTree.hs
cabal-install/src/Distribution/Client/CmdConfigure.hs
cabal-install/src/Distribution/Client/CmdOutdated.hs
cabal-install/src/Distribution/Client/ParseUtils.hs
cabal-install/src/Distribution/Client/ProjectConfig.hs
cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs
cabal-install/src/Distribution/Client/ProjectOrchestration.hs
cabal-install/src/Distribution/Client/ProjectPlanning.hs
cabal-install/src/Distribution/Client/ScriptUtils.hs
cabal-install/src/Distribution/Deprecated/ParseUtils.hs
cabal-install/tests/IntegrationTests2.hs
cabal-testsuite/PackageTests/ConditionalAndImport/Foo.hs [new file with mode: 0644]
cabal-testsuite/PackageTests/ConditionalAndImport/cabal-bad-conditional.project [new file with mode: 0644]
cabal-testsuite/PackageTests/ConditionalAndImport/cabal-cyclical.project [new file with mode: 0644]
cabal-testsuite/PackageTests/ConditionalAndImport/cabal.out [new file with mode: 0644]
cabal-testsuite/PackageTests/ConditionalAndImport/cabal.project [new file with mode: 0644]
cabal-testsuite/PackageTests/ConditionalAndImport/cabal.test.hs [new file with mode: 0644]
cabal-testsuite/PackageTests/ConditionalAndImport/extra.project [new file with mode: 0644]
cabal-testsuite/PackageTests/ConditionalAndImport/my.cabal [new file with mode: 0644]
cabal-testsuite/PackageTests/ConditionalAndImport/repo/some-exe-0.0.1.0/Main.hs [new file with mode: 0644]
cabal-testsuite/PackageTests/ConditionalAndImport/repo/some-exe-0.0.1.0/some-exe.cabal [new file with mode: 0644]
changelog.d/pr-7783 [new file with mode: 0644]
doc/cabal-package.rst
doc/cabal-project.rst