Skip to content

Commit afb0023

Browse files
committed
Merge remote-tracking branch 'upstream/master' into alex/4057-2
2 parents a16fa46 + 9565d0b commit afb0023

File tree

45 files changed

+1119
-354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1119
-354
lines changed

.github/actions/setup-build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ runs:
3131
sudo chown -R $USER /usr/local/.ghcup
3232
shell: bash
3333

34-
- uses: haskell-actions/[email protected].3
34+
- uses: haskell-actions/[email protected].5
3535
id: HaskEnvSetup
3636
with:
3737
ghc-version : ${{ inputs.ghc }}

.github/workflows/release.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
ghc: ["9.10.1", "9.8.2", "9.6.5", "9.4.8"]
33+
ghc: ["9.10.1", "9.8.2", "9.6.6", "9.4.8"]
3434
platform: [ { image: "debian:9"
3535
, installCmd: "sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list && sed -i /-updates/d /etc/apt/sources.list && apt-get update && apt-get install -y"
3636
, toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
@@ -102,7 +102,7 @@ jobs:
102102
, ADD_CABAL_ARGS: "--enable-split-sections"
103103
},
104104
{ image: "centos:7"
105-
, installCmd: "yum -y install epel-release && yum install -y"
105+
, installCmd: "sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && yum -y install epel-release && yum install -y"
106106
, toolRequirements: "autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf"
107107
, DISTRO: "CentOS"
108108
, ARTIFACT: "x86_64-linux-centos7"
@@ -127,7 +127,7 @@ jobs:
127127
, ARTIFACT: "x86_64-linux-unknown"
128128
, ADD_CABAL_ARGS: "--enable-split-sections"
129129
}
130-
- ghc: 9.6.5
130+
- ghc: 9.6.6
131131
platform:
132132
{ image: "rockylinux:8"
133133
, installCmd: "yum -y install epel-release && yum install -y --allowerasing"
@@ -213,7 +213,7 @@ jobs:
213213
strategy:
214214
fail-fast: true
215215
matrix:
216-
ghc: ["9.10.1", "9.8.2", "9.6.5", "9.4.8"]
216+
ghc: ["9.10.1", "9.8.2", "9.6.6", "9.4.8"]
217217
steps:
218218
- uses: docker://arm64v8/ubuntu:focal
219219
name: Cleanup (aarch64 linux)
@@ -259,7 +259,7 @@ jobs:
259259
## The environments can be seen in https://github.com/haskell/haskell-language-server/settings/environments
260260
## assuming you have the proper permissions.
261261
environment: CI
262-
runs-on: macOS-11
262+
runs-on: macOS-12
263263
env:
264264
MACOSX_DEPLOYMENT_TARGET: 10.13
265265
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -273,7 +273,7 @@ jobs:
273273
strategy:
274274
fail-fast: false
275275
matrix:
276-
ghc: ["9.10.1", "9.8.2", "9.6.5", "9.4.8"]
276+
ghc: ["9.10.1", "9.8.2", "9.6.6", "9.4.8"]
277277
steps:
278278
- name: Checkout code
279279
uses: actions/checkout@v3
@@ -318,7 +318,7 @@ jobs:
318318
strategy:
319319
fail-fast: false
320320
matrix:
321-
ghc: ["9.10.1", "9.8.2", "9.6.5", "9.4.8"]
321+
ghc: ["9.10.1", "9.8.2", "9.6.6", "9.4.8"]
322322
steps:
323323
- name: Checkout code
324324
uses: actions/checkout@v3
@@ -363,7 +363,7 @@ jobs:
363363
strategy:
364364
fail-fast: false
365365
matrix:
366-
ghc: ["9.10.1", "9.8.2", "9.6.5", "9.4.8"]
366+
ghc: ["9.10.1", "9.8.2", "9.6.6", "9.4.8"]
367367
steps:
368368
- name: install windows deps
369369
shell: pwsh
@@ -450,7 +450,7 @@ jobs:
450450
DISTRO: Fedora
451451
ARTIFACT: "x86_64-linux-fedora33"
452452
- image: centos:7
453-
installCmd: yum -y install epel-release && yum install -y
453+
installCmd: sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && yum -y install epel-release && yum install -y
454454
toolRequirements: autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf tree
455455
DISTRO: CentOS
456456
ARTIFACT: "x86_64-linux-centos7"
@@ -567,7 +567,7 @@ jobs:
567567

568568
bindist-mac-x86_64:
569569
name: Tar bindists (Mac x86_64)
570-
runs-on: macOS-11
570+
runs-on: macOS-12
571571
needs: ["build-mac-x86_64"]
572572
env:
573573
TARBALL_EXT: tar.xz
@@ -745,7 +745,7 @@ jobs:
745745
DISTRO: Fedora
746746
ARTIFACT: "x86_64-linux-fedora33"
747747
- image: centos:7
748-
installCmd: yum -y install epel-release && yum install -y
748+
installCmd: sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && yum -y install epel-release && yum install -y
749749
toolRequirements: autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf tree
750750
DISTRO: CentOS
751751
ARTIFACT: "x86_64-linux-centos7"
@@ -828,7 +828,7 @@ jobs:
828828

829829
test-mac-x86_64:
830830
name: Test binary (Mac x86_64)
831-
runs-on: macOS-11
831+
runs-on: macOS-12
832832
needs: ["bindist-mac-x86_64"]
833833
env:
834834
MACOSX_DEPLOYMENT_TARGET: 10.13

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog for haskell-language-server
22

3+
## 2.9.0.1
4+
5+
- Bindists for GHC 9.6.6
6+
37
## 2.9.0.0
48

59
- Bindists for GHC 9.10.1 by @wz1000, @jhrcek, @michaelpj

docs/features.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ Completions for language pragmas.
111111
## Formatting
112112

113113
Format your code with various Haskell code formatters.
114+
The default Haskell code formatter is `ormolu`, and the Haskell formatter can be configured via the `formattingProvider` option.
114115

115116
| Formatter | Provided by |
116117
| --------------- | ---------------------------- |
@@ -119,12 +120,17 @@ Format your code with various Haskell code formatters.
119120
| Ormolu | `hls-ormolu-plugin` |
120121
| Stylish Haskell | `hls-stylish-haskell-plugin` |
121122

123+
---
124+
122125
Format your cabal files with a cabal code formatter.
126+
The default cabal code formatter is `cabal-gild`, which needs to be available on the `$PATH`,
127+
or the location needs to be explicitly provided.
128+
To change the cabal formatter, edit the `cabalFormattingProvider` option.
123129

124130
| Formatter | Provided by |
125131
|-----------------|------------------------------|
126132
| cabal-fmt | `hls-cabal-fmt-plugin` |
127-
133+
| cabal-gild | `hls-cabal-gild-plugin` |
128134

129135
## Document symbols
130136

docs/support/ghc-version-support.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Support status (see the support policy below for more details):
2020
| 9.10.1 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
2121
| 9.8.2 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
2222
| 9.8.1 | [2.6.0.0](https://github.com/haskell/haskell-language-server/releases/tag/2.6.0.0) | full support |
23-
| 9.6.5 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
23+
| 9.6.6 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
24+
| 9.6.5 | [2.9.0.1](https://github.com/haskell/haskell-language-server/releases/tag/2.9.0.1) | full support |
2425
| 9.6.4 | [2.6.0.0](https://github.com/haskell/haskell-language-server/releases/tag/2.6.0.0) | full support |
2526
| 9.6.3 | [2.5.0.0](https://github.com/haskell/haskell-language-server/releases/tag/2.5.0.0) | full support |
2627
| 9.6.2 | [2.2.0.0](https://github.com/haskell/haskell-language-server/releases/tag/2.2.0.0) | deprecated |

ghcide/ghcide.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cabal-version: 3.4
22
build-type: Simple
33
category: Development
44
name: ghcide
5-
version: 2.9.0.0
5+
version: 2.9.0.1
66
license: Apache-2.0
77
license-file: LICENSE
88
author: Digital Asset and Ghcide contributors
@@ -81,8 +81,8 @@ library
8181
, hie-bios ^>=0.14.0
8282
, hie-compat ^>=0.3.0.0
8383
, hiedb ^>= 0.6.0.0
84-
, hls-graph == 2.9.0.0
85-
, hls-plugin-api == 2.9.0.0
84+
, hls-graph == 2.9.0.1
85+
, hls-plugin-api == 2.9.0.1
8686
, implicit-hie >= 0.1.4.0 && < 0.1.5
8787
, lens
8888
, list-t

ghcide/session-loader/Development/IDE/Session.hs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -523,22 +523,17 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do
523523
_inplace = map rawComponentUnitId $ NE.toList all_deps
524524

525525
all_deps' <- forM all_deps $ \RawComponentInfo{..} -> do
526-
-- Remove all inplace dependencies from package flags for
527-
-- components in this HscEnv
528-
let (df2, uids) = (rawComponentDynFlags, [])
529526
let prefix = show rawComponentUnitId
530527
-- See Note [Avoiding bad interface files]
531-
let hscComponents = sort $ map show uids
532-
cacheDirOpts = hscComponents ++ componentOptions opts
528+
let cacheDirOpts = componentOptions opts
533529
cacheDirs <- liftIO $ getCacheDirs prefix cacheDirOpts
534-
processed_df <- setCacheDirs recorder cacheDirs df2
530+
processed_df <- setCacheDirs recorder cacheDirs rawComponentDynFlags
535531
-- The final component information, mostly the same but the DynFlags don't
536532
-- contain any packages which are also loaded
537533
-- into the same component.
538534
pure $ ComponentInfo
539535
{ componentUnitId = rawComponentUnitId
540536
, componentDynFlags = processed_df
541-
, componentInternalUnits = uids
542537
, componentTargets = rawComponentTargets
543538
, componentFP = rawComponentFP
544539
, componentCOptions = rawComponentCOptions
@@ -1017,10 +1012,6 @@ data ComponentInfo = ComponentInfo
10171012
-- | Processed DynFlags. Does not contain inplace packages such as local
10181013
-- libraries. Can be used to actually load this Component.
10191014
, componentDynFlags :: DynFlags
1020-
-- | Internal units, such as local libraries, that this component
1021-
-- is loaded with. These have been extracted from the original
1022-
-- ComponentOptions.
1023-
, componentInternalUnits :: [UnitId]
10241015
-- | All targets of this components.
10251016
, componentTargets :: [GHC.Target]
10261017
-- | Filepath which caused the creation of this component

ghcide/src/Development/IDE/Core/Compile.hs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ import Development.IDE.Types.Location
9494
import Development.IDE.Types.Options
9595
import GHC (ForeignHValue,
9696
GetDocsFailure (..),
97-
parsedSource)
97+
parsedSource, ModLocation (..))
9898
import qualified GHC.LanguageExtensions as LangExt
9999
import GHC.Serialized
100100
import HieDb hiding (withHieDb)
@@ -1021,8 +1021,17 @@ getModSummaryFromImports env fp _modTime mContents = do
10211021
return $! Util.fingerprintFingerprints $
10221022
[ Util.fingerprintString fp
10231023
, fingerPrintImports
1024+
, modLocationFingerprint ms_location
10241025
] ++ map Util.fingerprintString opts
10251026

1027+
modLocationFingerprint :: ModLocation -> Util.Fingerprint
1028+
modLocationFingerprint ModLocation{..} = Util.fingerprintFingerprints $
1029+
Util.fingerprintString <$> [ fromMaybe "" ml_hs_file
1030+
, ml_hi_file
1031+
, ml_dyn_hi_file
1032+
, ml_obj_file
1033+
, ml_dyn_obj_file
1034+
, ml_hie_file]
10261035

10271036
-- | Parse only the module header
10281037
parseHeader

ghcide/src/Development/IDE/Core/OfInterest.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import Development.IDE.Graph
2929
import Control.Concurrent.STM.Stats (atomically,
3030
modifyTVar')
3131
import Data.Aeson (toJSON)
32+
import qualified Data.Aeson as Aeson
3233
import qualified Data.ByteString as BS
3334
import Data.Maybe (catMaybes)
3435
import Development.IDE.Core.ProgressReporting

ghcide/src/Development/IDE/Core/Rules.hs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,10 +1041,9 @@ usePropertyByPathAction path plId p = do
10411041
getLinkableRule :: Recorder (WithPriority Log) -> Rules ()
10421042
getLinkableRule recorder =
10431043
defineEarlyCutoff (cmapWithPrio LogShake recorder) $ Rule $ \GetLinkable f -> do
1044-
ModSummaryResult{msrModSummary = ms} <- use_ GetModSummary f
1045-
HiFileResult{hirModIface, hirModDetails, hirCoreFp} <- use_ GetModIface f
1046-
let obj_file = ml_obj_file (ms_location ms)
1047-
core_file = ml_core_file (ms_location ms)
1044+
HiFileResult{hirModSummary, hirModIface, hirModDetails, hirCoreFp} <- use_ GetModIface f
1045+
let obj_file = ml_obj_file (ms_location hirModSummary)
1046+
core_file = ml_core_file (ms_location hirModSummary)
10481047
case hirCoreFp of
10491048
Nothing -> error $ "called GetLinkable for a file without a linkable: " ++ show f
10501049
Just (bin_core, fileHash) -> do
@@ -1057,7 +1056,7 @@ getLinkableRule recorder =
10571056
core_t <- liftIO $ getModTime core_file
10581057
(warns, hmi) <- case linkableType of
10591058
-- Bytecode needs to be regenerated from the core file
1060-
BCOLinkable -> liftIO $ coreFileToLinkable linkableType (hscEnv session) ms hirModIface hirModDetails bin_core (posixSecondsToUTCTime core_t)
1059+
BCOLinkable -> liftIO $ coreFileToLinkable linkableType (hscEnv session) hirModSummary hirModIface hirModDetails bin_core (posixSecondsToUTCTime core_t)
10611060
-- Object code can be read from the disk
10621061
ObjectLinkable -> do
10631062
-- object file is up to date if it is newer than the core file
@@ -1070,8 +1069,8 @@ getLinkableRule recorder =
10701069
else pure Nothing
10711070
case mobj_time of
10721071
Just obj_t
1073-
| obj_t >= core_t -> pure ([], Just $ HomeModInfo hirModIface hirModDetails (justObjects $ LM (posixSecondsToUTCTime obj_t) (ms_mod ms) [DotO obj_file]))
1074-
_ -> liftIO $ coreFileToLinkable linkableType (hscEnv session) ms hirModIface hirModDetails bin_core (error "object doesn't have time")
1072+
| obj_t >= core_t -> pure ([], Just $ HomeModInfo hirModIface hirModDetails (justObjects $ LM (posixSecondsToUTCTime obj_t) (ms_mod hirModSummary) [DotO obj_file]))
1073+
_ -> liftIO $ coreFileToLinkable linkableType (hscEnv session) hirModSummary hirModIface hirModDetails bin_core (error "object doesn't have time")
10751074
-- Record the linkable so we know not to unload it, and unload old versions
10761075
whenJust ((homeModInfoByteCode =<< hmi) <|> (homeModInfoObject =<< hmi)) $ \(LM time mod _) -> do
10771076
compiledLinkables <- getCompiledLinkables <$> getIdeGlobalAction

0 commit comments

Comments
 (0)