-
-
Notifications
You must be signed in to change notification settings - Fork 387
Remove Cabal dependency from hls-cabal-plugin #3383
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
Conversation
Love the idea, but you will need further adjustments to stack.yaml. I am curious whether this is feasible |
@fendor what modifications to stack.yaml are necessary? The stackage resolvers used by this project include Cabal-syntax. |
If you make it work, great! Last time I checked, it was rather difficult to make it use a different Cabal version. (not sure whether we need a different one) |
I think this is resolved by use of cabal-syntax and thus cabal version of the toolchain should be possible to ignore, ideally? Needs trying, regardless. |
I'm trying to build this branch with stack, will let you know how it goes. |
|
From 777d681cb1f6a10a6fb7532bc97d9e87ebf31068 Mon Sep 17 00:00:00 2001
From: Jade Lovelace <jadel@mercury.com>
Date: Mon, 12 Dec 2022 12:29:32 -0800
Subject: [PATCH] Fix the stack build
---
plugins/hls-cabal-plugin/hls-cabal-plugin.cabal | 2 +-
stack-lts19.yaml | 2 +-
stack.yaml | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal b/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal
index eb331283..24ca74bc 100644
--- a/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal
+++ b/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal
@@ -33,7 +33,7 @@ library
build-depends:
, base >=4.12 && <5
, bytestring
- , Cabal-syntax ^>= 3.6 || ^>= 3.8
+ , Cabal-syntax ^>= 3.8
, deepseq
, directory
, extra >=1.7.4
diff --git a/stack-lts19.yaml b/stack-lts19.yaml
index 74d90c33..a46e62f5 100644
--- a/stack-lts19.yaml
+++ b/stack-lts19.yaml
@@ -42,7 +42,7 @@ ghc-options:
"$everything": -haddock
extra-deps:
-- Cabal-3.6.0.0
+- Cabal-syntax-3.8.1.0
# needed for tests of hls-cabal-fmt-plugin
- cabal-fmt-0.1.6@sha256:54041d50c8148c32d1e0a67aef7edeebac50ae33571bef22312f6815908eac19,3626
- floskell-0.10.6@sha256:e77d194189e8540abe2ace2c7cb8efafc747ca35881a2fefcbd2d40a1292e036,3819
diff --git a/stack.yaml b/stack.yaml
index b9244827..7863d00d 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -52,6 +52,7 @@ extra-deps:
- lsp-types-1.6.0.0
- lsp-test-0.14.1.0
- hie-bios-0.11.0
+- Cabal-syntax-3.8.1.0
# currently needed for ghcide>extra, etc.
allow-newer: true
--
2.38.1 This patch fixes the stack build on your branch. I would push to your branch but don't have write access (don't want to accidentally become a HLS maintainer). You can copy paste it into a file then do |
497d284
to
095a628
Compare
This is due to the removal of the
Fixed in commercialhaskell/stack#5886 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, if stack CI is green :)
note that this is an opposite to haskell#3383, to prioritize CI fix first.
* fix fourmolu with -f-fixity-th in nix env * ci failure test * bump nix file. * disable cachix action * further comment out * revive cachix action. * remove commented-out * fix hls-cabal-plugin by removing Cabal-syntax. note that this is an opposite to #3383, to prioritize CI fix first. * limit implicit-hie < 0.1.3 * added a small comment and link to the issue. * put implicit-hie to ghcide dep * bump CI
…3317) * Set buildable on GHC 9.4 * Start work on GHC 9.4 compat * Use patched `retrie` * update retrie with github address. circumvent nix-prefetch-url. * handle ExactPrint * fix ghc 9.0 env. * unwrap big CPP conditional for GHC 9.4 * GHC 9.4 buildable by disabling a few suggest.. functions * enable disabled suggest...! * hls-fourmolu-plugin is buildable * hls-splice-plugin is buildable * hls-hlint-plugin is buildable * Enable plugins on GHC 9.4 * Add fourmolu for GHC 9.4 * fourmolu tweawk * Fix `hls-hlint-plugin` build - Build against GHC 9.4 API - Increase upper bound on `hlint` * Fix build of `hls-splice-plugin` * annotation on close parenthesis. still need more work. * found where closing parenthesis were missing * examine internal annotation information. * make use of makeDeltaAst. This fixes most of test failures in GHC 9.4 * remove dead code * update apply-refact and hlint deps * temporarily comment out hls-fourmolu-plugin. * comment out build-tool-depends. then hls-fourmolu-plugin build succeeds with cabal v2-build * remove unused fourmolu flake inputs * fix ghc 9.0 build again. * hlint and fourmolu for GHC 9.2! * fix mistakenly overriden nix exp. * remove unused hlint-3.3.6 * Fix CPP in hls-refactor-plugin * Fix build error in hls-refactor-plugin * Fix import * Use `showErrors` instead of `showBag` * fix initialization test error in refactor plugin. * alternateNumberFormat and explicitFixity don't build on GHC 9.4 * force demoteIfDefer = id in typecheckModule for GHC 9.4. * ignore tests which were already ignored with GHC 9.2 * fix extractDoesNotExportModuleName for GHC 9.4 by adjusting regex match * use makeDeltaAst in removeRedundantConstraints * fix addTypeAnnotationsToLiteralsTest * Revert "alternateNumberFormat and explicitFixity don't build on GHC 9.4" This reverts commit 4903092. * Update flake lockfile * Use upstream `retrie` * Use upstream `retrie` * Update lockfile * Use upstream fourmolu * fix arrow annotation on ghc 9.4 * fix flake.nix issue * revert demoteIfDefer change for GHC 9.4. * fix hls-splice-plugin build on GHC 9.0.2 * disable tracy on darwin. * disable fourmolu plugin and ekg-json for now. * fourmolu update to 0.10.1.0 * build fix for hls-refactor-plugin after merge * update index-state. * downgrade fourmolu to 0.9 for ghc 9.2 and 9.0 * remove unnecessary problematic Cabal-syntax dependency. * update Cabal for ormolu in ghc 9.0 nix env. * use custom apply-refact for now for both ghc 9.2 and 9.4 * added ghc >= 9.2 condition * fix fourmolu with -f-fixity-th in nix env * limit implicit-hie < 0.1.3 * add fourmolu back to build-tools-depends * mark GHC92-failing tests to be failed on GHC 9.4 * ci failure test * bump nix file. * disable cachix action * further comment out * revive cachix action. * remove commented-out * fix hls-cabal-plugin by removing Cabal-syntax. note that this is an opposite to #3383, to prioritize CI fix first. * limit implicit-hie < 0.1.3 * added a small comment and link to the issue. * put implicit-hie to ghcide dep * update apply-refact rev * use apply-refact-0.11.0.0 on hackage. * 9.4 support for gadt and retrie plugins Co-authored-by: Ian-Woo Kim <ianwookim@gmail.com> Co-authored-by: Gabriella Gonzalez <gabriella@mercury.com> Co-authored-by: Zubin Duggal <zubin.duggal@gmail.com>
Cabal-syntax is no longer a dependency: f5db150#diff-5e8d34349db491632161012cabc6a29aa032853e30534abb7e36d9462a0b1df2L48 |
Only Cabal-syntax is needed. I was unable to build using Nix without this change due to errors like the following: