From c758eae76535c574370d5c2b8e4058eb780301f1 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 12 Aug 2021 14:49:43 +0200 Subject: [PATCH 01/11] Remove superflous things --- cabal.project | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cabal.project b/cabal.project index 03cca1845b..8fc9dd7b77 100644 --- a/cabal.project +++ b/cabal.project @@ -29,19 +29,9 @@ package * ghc-options: -haddock test-show-details: direct --- ghc-api-compat-8.6 -source-repository-package - type: git - location: https://github.com/hsyl20/ghc-api-compat - tag: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 - write-ghc-environment-files: never -index-state: 2021-08-08T02:21:16Z - constraints: - -- Diagrams doesn't support optparse-applicative >= 0.16 yet - optparse-applicative < 0.16, hyphenation +embed From a7da94c43b30acc6b275064df8cbfc7c61416217 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 13 Aug 2021 12:59:58 +0200 Subject: [PATCH 02/11] Set index-state --- cabal.project | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cabal.project b/cabal.project index 8fc9dd7b77..03459fe1b6 100644 --- a/cabal.project +++ b/cabal.project @@ -31,6 +31,8 @@ package * write-ghc-environment-files: never +index-state: 2021-08-12T12:00:38Z + constraints: hyphenation +embed From e53c0f9d001a6988149165e5e0becf871344c187 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 15 Aug 2021 00:29:04 +0200 Subject: [PATCH 03/11] Add ghc-api-compat and remove shake-bench --- cabal.project | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index 03459fe1b6..ed87fb5a9d 100644 --- a/cabal.project +++ b/cabal.project @@ -1,7 +1,6 @@ packages: ./ ./hie-compat - ./shake-bench ./hls-graph ./ghcide ./hls-plugin-api @@ -23,12 +22,19 @@ packages: ./plugins/hls-module-name-plugin ./plugins/hls-ormolu-plugin ./plugins/hls-call-hierarchy-plugin + tests: true package * ghc-options: -haddock test-show-details: direct +https://gitlab.haskell.org/haskell/ghc-api-compat/-/issues/1#note_371055 +source-repository-package + type: git + location: https://github.com/hsyl20/ghc-api-compat + tag: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + write-ghc-environment-files: never index-state: 2021-08-12T12:00:38Z From 0c9a26b4d3984fcc5b3a561c8124210d51bc5a29 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 15 Aug 2021 16:23:02 +0200 Subject: [PATCH 04/11] Correct comment about ghc-api-compat --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index ed87fb5a9d..dee5b7097a 100644 --- a/cabal.project +++ b/cabal.project @@ -29,7 +29,7 @@ package * ghc-options: -haddock test-show-details: direct -https://gitlab.haskell.org/haskell/ghc-api-compat/-/issues/1#note_371055 +-- see https://gitlab.haskell.org/haskell/ghc-api-compat/-/issues/1#note_371055 source-repository-package type: git location: https://github.com/hsyl20/ghc-api-compat From a02992ec90e3d04f90518b396d69a1e3abb9f9fe Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 15 Aug 2021 16:24:00 +0200 Subject: [PATCH 05/11] Add specific project file for benchs --- cabal-benchmark.project | 59 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 cabal-benchmark.project diff --git a/cabal-benchmark.project b/cabal-benchmark.project new file mode 100644 index 0000000000..0cfbbf582d --- /dev/null +++ b/cabal-benchmark.project @@ -0,0 +1,59 @@ +packages: + ./ + ./hie-compat + ./shake-bench + ./hls-graph + ./ghcide + ./hls-plugin-api + ./hls-test-utils + ./plugins/hls-tactics-plugin + ./plugins/hls-brittany-plugin + ./plugins/hls-stylish-haskell-plugin + ./plugins/hls-fourmolu-plugin + ./plugins/hls-class-plugin + ./plugins/hls-eval-plugin + ./plugins/hls-explicit-imports-plugin + ./plugins/hls-refine-imports-plugin + ./plugins/hls-hlint-plugin + ./plugins/hls-retrie-plugin + ./plugins/hls-haddock-comments-plugin + ./plugins/hls-splice-plugin + ./plugins/hls-floskell-plugin + ./plugins/hls-pragmas-plugin + ./plugins/hls-module-name-plugin + ./plugins/hls-ormolu-plugin + ./plugins/hls-call-hierarchy-plugin + +benchmarks: true + +package * + ghc-options: -haddock + test-show-details: direct + +-- see https://gitlab.haskell.org/haskell/ghc-api-compat/-/issues/1#note_371055 +source-repository-package + type: git + location: https://github.com/hsyl20/ghc-api-compat + tag: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + +write-ghc-environment-files: never + +index-state: 2021-08-12T12:00:38Z + +constraints: + hyphenation +embed + +allow-newer: + diagrams-contrib:base, + diagrams-contrib:lens, + diagrams-contrib:random, + diagrams-core:base, + diagrams-core:lens, + diagrams-lib:base, + diagrams-lib:lens, + diagrams-postscript:base, + diagrams-postscript:lens, + diagrams-svg:base, + diagrams-svg:lens, + dual-tree:base, + svg-builder:base From 3302bdfa857b989e10ec812ad73f0981d449cac6 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 15 Aug 2021 16:28:54 +0200 Subject: [PATCH 06/11] Use specific project file for benchmarks --- .github/workflows/bench.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 91dd562bc5..3b9aa4d877 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -58,17 +58,17 @@ jobs: # max-backjumps is increased as a temporary solution # for dependency resolution failure - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} - run: cabal configure --enable-benchmarks --max-backjumps 12000 + run: cabal configure --enable-benchmarks --max-backjumps 12000 --project-file cabal-benchmark.project - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} name: Build shell: bash - run: cabal build ghcide:benchHist + run: cabal build ghcide:benchHist --project-file cabal-benchmark.project - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} name: Bench init shell: bash - run: cabal bench ghcide:benchHist -j --benchmark-options="all-binaries" + run: cabal bench ghcide:benchHist -j --benchmark-options="all-binaries" --project-file cabal-benchmark.project # tar is required to preserve file permissions # compression speeds up upload/download nicely @@ -142,7 +142,7 @@ jobs: - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} name: Bench shell: bash - run: cabal bench ghcide:benchHist -j --benchmark-options="${{ matrix.example }}" + run: cabal bench ghcide:benchHist -j --benchmark-options="${{ matrix.example }}" --project-file cabal-benchmark.project - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} name: Display results From 07861e9d0b05f41f7c51dc829d2a9fddb5c8554f Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 15 Aug 2021 23:02:29 +0200 Subject: [PATCH 07/11] Ensure we use lsp-1.3.0.1 --- ghcide/ghcide.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index 046a9f0627..debdfc8f0a 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -61,7 +61,7 @@ library hls-plugin-api ^>= 1.2.0.0, lens, hiedb == 0.4.0.*, - lsp-types >= 1.2 && < 1.4, + lsp-types >= 1.3.0.1 && < 1.4, lsp == 1.2.*, mtl, network-uri, From 61d5395951fb30b05892a45cc30ce0e12c43754b Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 15 Aug 2021 23:13:52 +0200 Subject: [PATCH 08/11] Use lsp-types-1.3.0.1 for stack --- stack-8.10.2.yaml | 2 +- stack-8.10.3.yaml | 2 +- stack-8.10.4.yaml | 2 +- stack-8.10.5.yaml | 2 +- stack-8.6.4.yaml | 2 +- stack-8.6.5.yaml | 2 +- stack-8.8.3.yaml | 2 +- stack-8.8.4.yaml | 2 +- stack-9.0.1.yaml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/stack-8.10.2.yaml b/stack-8.10.2.yaml index 893a340c60..0e86582024 100644 --- a/stack-8.10.2.yaml +++ b/stack-8.10.2.yaml @@ -66,7 +66,7 @@ extra-deps: - some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055 - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - lsp-1.2.0.1 - - lsp-types-1.3.0.0 + - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 configure-options: diff --git a/stack-8.10.3.yaml b/stack-8.10.3.yaml index c0d360d3f6..98d3fada74 100644 --- a/stack-8.10.3.yaml +++ b/stack-8.10.3.yaml @@ -66,7 +66,7 @@ extra-deps: - some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055 - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - lsp-1.2.0.1 - - lsp-types-1.3.0.0 + - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 configure-options: diff --git a/stack-8.10.4.yaml b/stack-8.10.4.yaml index b4c06fc578..4f29bcd1a7 100644 --- a/stack-8.10.4.yaml +++ b/stack-8.10.4.yaml @@ -62,7 +62,7 @@ extra-deps: - some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055 - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - lsp-1.2.0.1 - - lsp-types-1.3.0.0 + - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 # Enable these when supported by all formatters diff --git a/stack-8.10.5.yaml b/stack-8.10.5.yaml index 1e9b4281a3..8795b39451 100644 --- a/stack-8.10.5.yaml +++ b/stack-8.10.5.yaml @@ -64,7 +64,7 @@ extra-deps: - some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055 - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - lsp-1.2.0.1 - - lsp-types-1.3.0.0 + - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 # Enable these when supported by all formatters diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index b37a0503b6..75f8903f12 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -103,7 +103,7 @@ extra-deps: - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - resourcet-1.2.3 - lsp-1.2.0.1 - - lsp-types-1.3.0.0 + - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 flags: diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index f012979944..cb9078fcd2 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -104,7 +104,7 @@ extra-deps: - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - resourcet-1.2.3 - lsp-1.2.0.1 - - lsp-types-1.3.0.0 + - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 configure-options: diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index c202d21c82..b6eb8ab1b9 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -83,7 +83,7 @@ extra-deps: - some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055 - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - lsp-1.2.0.1 - - lsp-types-1.3.0.0 + - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 configure-options: diff --git a/stack-8.8.4.yaml b/stack-8.8.4.yaml index 33c01989a6..465f7249f0 100644 --- a/stack-8.8.4.yaml +++ b/stack-8.8.4.yaml @@ -80,7 +80,7 @@ extra-deps: - some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055 - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - lsp-1.2.0.1 - - lsp-types-1.3.0.0 + - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 configure-options: diff --git a/stack-9.0.1.yaml b/stack-9.0.1.yaml index 112dada930..e425811633 100644 --- a/stack-9.0.1.yaml +++ b/stack-9.0.1.yaml @@ -55,7 +55,7 @@ extra-deps: - retrie-1.0.0.0 - some-1.0.2@sha256:3d460998df32ad7b93bf55657aeae988d97070155e71718b4bc75d0997ce9d62,2244 - lsp-1.2.0.1 -- lsp-types-1.3.0.0 +- lsp-types-1.3.0.1 - lsp-test-0.14.0.1 # Upstream patches for ghc-9.0.1 compatability From 37048cec96d4833b8613eb047e667062a2f53dbb Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 16 Aug 2021 00:05:03 +0200 Subject: [PATCH 09/11] Use lsp-types-1.3.0.1 for default stack --- stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack.yaml b/stack.yaml index b9ded8b709..472af005d7 100644 --- a/stack.yaml +++ b/stack.yaml @@ -59,7 +59,7 @@ extra-deps: - some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055 - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - lsp-1.2.0.1 - - lsp-types-1.3.0.0 + - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 configure-options: From d62bd39ef0393da131da3ae734774fc1c9cbdee3 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 16 Aug 2021 11:37:44 +0200 Subject: [PATCH 10/11] Remove some more allow-newer --- cabal-benchmark.project | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cabal-benchmark.project b/cabal-benchmark.project index 0cfbbf582d..926052981c 100644 --- a/cabal-benchmark.project +++ b/cabal-benchmark.project @@ -44,15 +44,10 @@ constraints: hyphenation +embed allow-newer: - diagrams-contrib:base, - diagrams-contrib:lens, - diagrams-contrib:random, diagrams-core:base, diagrams-core:lens, diagrams-lib:base, diagrams-lib:lens, - diagrams-postscript:base, - diagrams-postscript:lens, diagrams-svg:base, diagrams-svg:lens, dual-tree:base, From 19bb487d8f85224e85c2cb67567ac4faad17710b Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 16 Aug 2021 15:21:34 +0200 Subject: [PATCH 11/11] Use one cabal.project --- .github/workflows/bench.yml | 8 +++--- cabal-benchmark.project | 54 ------------------------------------- cabal.project | 28 +------------------ 3 files changed, 5 insertions(+), 85 deletions(-) delete mode 100644 cabal-benchmark.project diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 3b9aa4d877..91dd562bc5 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -58,17 +58,17 @@ jobs: # max-backjumps is increased as a temporary solution # for dependency resolution failure - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} - run: cabal configure --enable-benchmarks --max-backjumps 12000 --project-file cabal-benchmark.project + run: cabal configure --enable-benchmarks --max-backjumps 12000 - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} name: Build shell: bash - run: cabal build ghcide:benchHist --project-file cabal-benchmark.project + run: cabal build ghcide:benchHist - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} name: Bench init shell: bash - run: cabal bench ghcide:benchHist -j --benchmark-options="all-binaries" --project-file cabal-benchmark.project + run: cabal bench ghcide:benchHist -j --benchmark-options="all-binaries" # tar is required to preserve file permissions # compression speeds up upload/download nicely @@ -142,7 +142,7 @@ jobs: - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} name: Bench shell: bash - run: cabal bench ghcide:benchHist -j --benchmark-options="${{ matrix.example }}" --project-file cabal-benchmark.project + run: cabal bench ghcide:benchHist -j --benchmark-options="${{ matrix.example }}" - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} name: Display results diff --git a/cabal-benchmark.project b/cabal-benchmark.project deleted file mode 100644 index 926052981c..0000000000 --- a/cabal-benchmark.project +++ /dev/null @@ -1,54 +0,0 @@ -packages: - ./ - ./hie-compat - ./shake-bench - ./hls-graph - ./ghcide - ./hls-plugin-api - ./hls-test-utils - ./plugins/hls-tactics-plugin - ./plugins/hls-brittany-plugin - ./plugins/hls-stylish-haskell-plugin - ./plugins/hls-fourmolu-plugin - ./plugins/hls-class-plugin - ./plugins/hls-eval-plugin - ./plugins/hls-explicit-imports-plugin - ./plugins/hls-refine-imports-plugin - ./plugins/hls-hlint-plugin - ./plugins/hls-retrie-plugin - ./plugins/hls-haddock-comments-plugin - ./plugins/hls-splice-plugin - ./plugins/hls-floskell-plugin - ./plugins/hls-pragmas-plugin - ./plugins/hls-module-name-plugin - ./plugins/hls-ormolu-plugin - ./plugins/hls-call-hierarchy-plugin - -benchmarks: true - -package * - ghc-options: -haddock - test-show-details: direct - --- see https://gitlab.haskell.org/haskell/ghc-api-compat/-/issues/1#note_371055 -source-repository-package - type: git - location: https://github.com/hsyl20/ghc-api-compat - tag: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 - -write-ghc-environment-files: never - -index-state: 2021-08-12T12:00:38Z - -constraints: - hyphenation +embed - -allow-newer: - diagrams-core:base, - diagrams-core:lens, - diagrams-lib:base, - diagrams-lib:lens, - diagrams-svg:base, - diagrams-svg:lens, - dual-tree:base, - svg-builder:base diff --git a/cabal.project b/cabal.project index dee5b7097a..12055ec9da 100644 --- a/cabal.project +++ b/cabal.project @@ -1,6 +1,7 @@ packages: ./ ./hie-compat + ./shake-bench ./hls-graph ./ghcide ./hls-plugin-api @@ -44,33 +45,6 @@ constraints: allow-newer: - active:base, - assoc:base, - cryptohash-md5:base, - cryptohash-sha1:base, - constraints-extras:template-haskell, - data-tree-print:base, - deepseq:base, - dependent-sum:some, - dependent-sum:constraints, - dual-tree:base, - -- Does this make any sense? - entropy:Cabal, - force-layout:base, - force-layout:lens, - floskell:ghc-prim, - floskell:base, - hashable:base, - hslogger:base, - monoid-extras:base, - newtype-generics:base, - parallel:base, - regex-base:base, - regex-tdfa:base, - statestack:base, - these:base, - time-compat:base, - -- for shake-bench Chart-diagrams:diagrams-core, SVGFonts:diagrams-core