Skip to content

Sync with upstream #2

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

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bb6b4e1
Support `fourmolu ^>= 0.7` (#2944)
parsonsmatt Jun 11, 2022
3d9f9a2
Support Fourmolu 0.7 in CLI mode
georgefst Jun 12, 2022
0bbc545
Bump index state
georgefst Jun 12, 2022
581686c
Only use Fourmolu `--no-cabal` flag on recent versions
georgefst Jun 13, 2022
8a5840a
Merge pull request #2950 from haskell/fourmolu-0.7-fixes
georgefst Jun 13, 2022
e64b61e
Support ghc-9.2.3 (#2936)
July541 Jun 16, 2022
09968a1
More Fourmolu improvements (#2959)
georgefst Jun 17, 2022
ae3d178
Serialize core to core files
wz1000 Feb 11, 2022
c047b05
Generate bytecode/object code on demand
wz1000 Mar 17, 2022
37f9ec1
Fix eval plugin
wz1000 Jun 18, 2022
d56f6c5
Shake store -> Values store
pepeiborra Jun 19, 2022
76c5a0f
fix a few imports
pepeiborra Jun 19, 2022
4a1d981
Values store -> build graph
pepeiborra Jun 19, 2022
d29f624
Don't force codegen from the corefile if we just need the hash
wz1000 Jun 19, 2022
aa2446d
Address some review comments
wz1000 Jun 19, 2022
41e01ec
Fix eval plugin
wz1000 Jun 19, 2022
6556ab7
GHC 9.2 supports unboxed things in bytecode
wz1000 Jun 19, 2022
dc45afc
Handle exceptions when reading core files
wz1000 Jun 19, 2022
2121495
hls-class-plugin: Only create placeholders for unimplemented methods …
akshaymankar Jun 20, 2022
44be741
Implement PluginMethod for hard-wired in handlers (#2977)
fendor Jun 20, 2022
0ba7c8d
Update doc (#2983)
July541 Jun 22, 2022
907a6e6
Teach HLS about different file extensions (#2945)
fendor Jun 22, 2022
3461823
hls-class-plugin enhancement (#2920)
July541 Jun 22, 2022
efcb8e2
Set up partial functions ratchet (#2974)
michaelpj Jun 24, 2022
cdc8f78
Turn HLS-wrapper into an LSP Server (#2960)
smatting Jun 26, 2022
0b8c793
fix new import position (#2981)
Jun 27, 2022
3543fbe
Update for aarch64-darwin
matthewbauer Apr 26, 2022
5af6c5e
add hacky hls.nix file
avieth May 26, 2022
e8862e8
Add sha256 hashes to hls.nix
9999years Jun 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/caching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: [ "9.2.2"
ghc: [ "9.2.3"
, "9.2.2"
, "9.0.2"
, "9.0.1"
, "8.10.7"
, "8.10.6"
, "8.8.4"
, "8.6.5"
]
Expand Down Expand Up @@ -118,7 +117,7 @@ jobs:
cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild
env:
# needed for GHC 9.2.2 https://github.com/digital-asset/ghc-lib/issues/352
CPATH:"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi":$CPATH
CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"

# We build ghcide with benchs and test enabled to include its dependencies in the cache
# (including shake-bench)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: true
matrix:
ghc: [ "9.2.2"
ghc: [ "9.2.3"
, "9.0.2"
, "8.10.7"
, "8.8.4"
Expand All @@ -68,7 +68,7 @@ jobs:
run: cabal v2-build ghcide --flags="ghc-patched-unboxed-bytecode test-exe executable bench-exe ekg"

# we have to clean up warnings for 9.0 and 9.2 before enable -WAll
- if: matrix.ghc != '9.0.2' && matrix.ghc != '9.2.2'
- if: matrix.ghc != '9.0.2' && matrix.ghc != '9.2.3'
name: Build with pedantic (-WError)
run: cabal v2-build --flags="pedantic"

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/hlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '**'

jobs:
build10:
hlint:
name: "Hlint check run"
runs-on: ubuntu-latest
steps:
Expand All @@ -15,11 +15,12 @@ jobs:
- name: 'Installing'
uses: rwe/actions-hlint-setup@v1
with:
version: '3.3.4'
version: '3.4'

- name: 'Checking code'
uses: rwe/actions-hlint-run@v1
with:
hlint-bin: "hlint --with-group=extra --hint=ghcide/.hlint.yaml"
path: '[ "ghcide/src", "ghcide/exe", "ghcide/bench/lib", "ghcide/bench/exe", "ghcide/bench/hist", "shake-bench/src", "ghcide/test/exe"]'
hlint-bin: "hlint --with-group=extra"
fail-on: error
path: .

23 changes: 10 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ jobs:
strategy:
fail-fast: true
matrix:
ghc: [ "9.2.2"
ghc: [ "9.2.3"
, "9.2.2"
, "9.0.2"
, "9.0.1"
, "8.10.7"
, "8.10.6"
, "8.8.4"
, "8.6.5"
]
Expand All @@ -71,7 +70,7 @@ jobs:
include:
# only test supported ghc major versions
- os: ubuntu-latest
ghc: '9.2.2'
ghc: '9.2.3'
test: true
- os: ubuntu-latest
ghc: '9.0.2'
Expand All @@ -86,7 +85,7 @@ jobs:
ghc: '8.6.5'
test: true
- os: windows-latest
ghc: '9.2.2'
ghc: '9.2.3'
test: true
- os: windows-latest
ghc: '9.0.2'
Expand All @@ -98,12 +97,10 @@ jobs:
ghc: '8.6.5'
test: true
# only build rest of supported ghc versions for windows
- os: windows-latest
ghc: '9.0.1'
- os: windows-latest
ghc: '8.10.6'
- os: windows-latest
ghc: '8.8.4'
- os: windows-latest
ghc: '9.2.2'

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -162,7 +159,7 @@ jobs:
HLS_WRAPPER_TEST_EXE: hls-wrapper
run: cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper"

- if: matrix.test && matrix.ghc != '9.2.2'
- if: matrix.test && matrix.ghc != '9.2.3'
name: Test hls-brittany-plugin
run: cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="$TEST_OPTS"

Expand All @@ -182,11 +179,11 @@ jobs:
name: Test hls-eval-plugin
run: cabal test hls-eval-plugin --test-options="$TEST_OPTS" || cabal test hls-eval-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.2.2'
- if: matrix.test && matrix.ghc != '9.2.3'
name: Test hls-haddock-comments-plugin
run: cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.2.2'
- if: matrix.test && matrix.ghc != '9.2.3'
name: Test hls-splice-plugin
run: cabal test hls-splice-plugin --test-options="$TEST_OPTS" || cabal test hls-splice-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="$TEST_OPTS"

Expand All @@ -202,7 +199,7 @@ jobs:
name: Test hls-fourmolu-plugin
run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.2.2'
- if: matrix.test && matrix.ghc != '9.2.3'
name: Test hls-tactics-plugin test suite
run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="$TEST_OPTS"

Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ variables:
CABAL_PROJECT: cabal.project
- GHC_VERSION: 9.2.2
CABAL_PROJECT: cabal.project
- GHC_VERSION: 9.2.1
- GHC_VERSION: 9.2.3
CABAL_PROJECT: cabal.project

workflow:
Expand Down
185 changes: 185 additions & 0 deletions .hlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# HLint configuration file
# https://github.com/ndmitchell/hlint
##########################

# To run HLint do:
# $ hlint --git -j4

# Warnings currently triggered by our code
- ignore: {name: "Use <$>"}
- ignore: {name: "Use :"}
- ignore: {name: "Redundant do"}
- ignore: {name: "Avoid lambda"}
- ignore: {name: "Use newtype instead of data"}
- ignore: {name: "Use unless"}
- ignore: {name: "Move brackets to avoid $"}
- ignore: {name: "Eta reduce"}
- ignore: {name: "Parse error"}
- ignore: {name: "Reduce duplication"}
- ignore: {name: "Use ++"}
- ignore: {name: "Use $>"}
- ignore: {name: "Use section"}
- ignore: {name: "Use record patterns"}
- ignore: {name: "Use camelCase"}
- ignore: {name: "Use uncurry"}
- ignore: {name: "Avoid lambda using `infix`"}

# Gives at least one suggestion we don't like.
- ignore: {name: "Use <=<"}
- ignore: {name: "Use zipFrom"}
- ignore: {name: "Use zipWithFrom"}

# We are using the "redundant" return/pure to assign a name. We do not want to
# delete it. In particular, this is not an improvement:
# Found:
# do options <- somethingComplicated
# pure options
# Perhaps:
# do somethingComplicated
- ignore: {name: "Redundant return"}
- ignore: {name: "Redundant pure"}

# Off by default hints we like
- warn: {name: Use module export list}

# Condemn nub and friends
- warn: {lhs: nub (sort x), rhs: Data.List.Extra.nubSort x}
- warn: {lhs: nub, rhs: Data.List.Extra.nubOrd}
- warn: {lhs: nubBy, rhs: Data.List.Extra.nubOrdBy}
- warn: {lhs: Data.List.Extra.nubOn, rhs: Data.List.Extra.nubOrdOn}

- functions:
# Things that are unsafe in Haskell base library
- name: unsafePerformIO
within:
- Development.IDE.Core.Shake
- Development.IDE.GHC.Util
- Development.IDE.Graph.Internal.Database
- Development.IDE.Graph.Internal.Paths
- Development.IDE.Graph.Internal.Profile
- Ide.Types
- Test.Hls
- Test.Hls.Command
- Wingman.Debug
- Wingman.Types
- AutoTupleSpec
- name: unsafeInterleaveIO
within:
- Development.IDE.LSP.LanguageServer
- {name: unsafeDupablePerformIO, within: []}
- name: unsafeCoerce
within:
- Ide.Plugin.Eval.Code
- Development.IDE.Core.Compile
- Development.IDE.Types.Shake
- Wingman.Judgements.SYB
- Ide.Plugin.Properties

# Things that are a bit dangerous in the GHC API
- name: nameModule
within:
- Development.IDE.GHC.CoreFile
- Ide.Plugin.CallHierarchy.Internal
- Ide.Plugin.Rename
- Compat.HieBin

# Partial functions
- name: Data.List.head
within:
- Main
- Experiments
- Development.IDE.Core.Shake
- Development.IDE.Plugin.CodeAction
- Development.IDE.Plugin.Completions
- Development.IDE.Plugin.CodeAction.ExactPrint
- Development.IDE.Session
- Development.IDE.Spans.Documentation
- Ide.Plugin.CallHierarchy.Internal
- TExpectedActual
- TRigidType
- TRigidType
- Ide.Plugin.Class
- Wingman.Tactics

- name: Data.List.tail
within:
- Main
- Development.Benchmark.Rules
- Development.IDE.Plugin.CodeAction
- Development.IDE.Plugin.CodeAction.ExactPrint
- Development.IDE.Session
- IDE.Plugin.Eval.Code
- IDE.Plugin.Eval.Util
- UnificationSpec

- name: Data.List.last
within:
- GenChangelogs
- Main

- name: Data.List.init
within: []

- name: Data.List.foldl1'
within: []

- name: Data.List.foldr1'
within: []

- name: "Data.List.!!"
within:
- Main
- Experiments
- FunctionalCodeAction
- Development.IDE.Plugin.CodeAction
- Development.IDE.Plugin.Completions.Logic
- Development.IDE.Spans.Documentation
- Wingman.CaseSplit
- Wingman.Simplify


- name: Data.Text.head
within:
- Development.IDE.Plugin.CodeAction
- Development.IDE.Plugin.Completions.Logic

- name: Data.Foldable.foldl1
within: []

- name: Data.Foldable.foldr1
within:
- Wingman.Tactics

- name: Data.Maybe.fromJust
within:
- Experiments
- Main
- MultipleImports
- Progress
- Utils
- Development.IDE.Core.Compile
- Development.IDE.Core.Rules
- Development.IDE.Core.Shake
- Development.IDE.Plugin.Completions
- Development.IDE.Plugin.CodeAction.ExactPrint
- Development.IDE.Test
- Development.IDE.Graph.Internal.Profile
- Development.IDE.Graph.Internal.Rules
- Ide.Plugin.Class

- name: "Data.Map.!"
within:
- Wingman.LanguageServer

- name: "Data.IntMap.!"
within: []

- name: "Data.Vector.!"
within: []

- name: "GHC.Arr.!"
within: []

# We really do not want novel usages of restricted functions, and mere
# Warning is not enough to prevent those consistently; you need a build failure.
- error: {name: Avoid restricted function}
2 changes: 1 addition & 1 deletion bindist/ghcs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
8.8.4,cabal.project
8.10.7,cabal.project
9.0.2,cabal.project
9.2.1,cabal.project
9.2.2,cabal.project
9.2.3,cabal.project
2 changes: 1 addition & 1 deletion bindist/ghcs-Msys
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
8.10.7,cabal.project
9.0.2,cabal.project
9.2.2,cabal.project
9.2.1,cabal.project
9.2.3,cabal.project
25 changes: 2 additions & 23 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ package *

write-ghc-environment-files: never

index-state: 2022-04-30T21:02:45Z
index-state: 2022-06-12T00:00:00Z

constraints:
hyphenation +embed,
Expand All @@ -67,26 +67,5 @@ allow-newer:
-- ghc-9.2
----------
hiedb:base,
retrie:ghc-exactprint,

-- for brittany
-- https://github.com/lspitzner/multistate/pull/8
multistate:base,
-- https://github.com/lspitzner/data-tree-print/pull/3
data-tree-print:base,
-- https://github.com/lspitzner/butcher/pull/8
butcher:base,

-- for shake-bench
Chart:lens,
Chart-diagrams:lens,

-- for ekg
ekg-core:base,
ekg-core:ghc-prim,
ekg-wai:base,
ekg-wai:time,

-- for shake-bench
Chart-diagrams:diagrams-core,
SVGFonts:diagrams-core
ekg-wai:time
Loading