Skip to content

Commit 10d0494

Browse files
authored
Merge branch 'master' into branching-deps
2 parents c3732b1 + b377ab3 commit 10d0494

File tree

7 files changed

+17
-45
lines changed

7 files changed

+17
-45
lines changed

.github/scripts/build.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ uname
1111
pwd
1212
env
1313

14-
# setup the locale as HLS contains non-ascii modules and content.
15-
setup_locale
16-
1714
# ensure ghcup
1815
install_ghcup
1916

.github/scripts/common.sh

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -207,32 +207,3 @@ mktempdir() {
207207
;;
208208
esac
209209
}
210-
211-
# "Inspired" from GHC GitLab CI
212-
# https://gitlab.haskell.org/ghc/ghc/-/blob/214b2b6916f2d016ab9db0b766060e7828bb47a0/.gitlab/ci.sh#L60
213-
setup_locale() {
214-
# BSD grep terminates early with -q, consequently locale -a will get a
215-
# SIGPIPE and the pipeline will fail with pipefail.
216-
shopt -o -u pipefail
217-
if locale -a | grep -q C.UTF-8; then
218-
# Debian
219-
export LANG=C.UTF-8
220-
elif locale -a | grep -q C.utf8; then
221-
# Fedora calls it this
222-
export LANG=C.utf8
223-
elif locale -a | grep -q en_US.UTF-8; then
224-
# Centos doesn't have C.UTF-8
225-
export LANG=en_US.UTF-8
226-
elif locale -a | grep -q en_US.utf8; then
227-
# Centos doesn't have C.UTF-8
228-
export LANG=en_US.utf8
229-
else
230-
error "Failed to find usable locale"
231-
info "Available locales:"
232-
locale -a
233-
fail "No usable locale, aborting..."
234-
fi
235-
info "Using locale $LANG..."
236-
export LC_ALL=$LANG
237-
shopt -o -s pipefail
238-
}

haskell-language-server.cabal

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ extra-source-files:
2222
test/testdata/**/*.cabal
2323
test/testdata/**/*.yaml
2424
test/testdata/**/*.hs
25+
test/testdata/**/*.json
2526

27+
-- These globs should only match test/testdata
2628
plugins/**/*.project
29+
plugins/**/*.expected
2730
plugins/**/*.cabal
2831
plugins/**/*.yaml
32+
plugins/**/*.txt
2933
plugins/**/*.hs
3034

3135
bindist/wrapper.in

plugins/hls-semantic-tokens-plugin/test/SemanticTokensTest.hs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ semanticTokensFullDeltaTests :: TestTree
178178
semanticTokensFullDeltaTests =
179179
testGroup "semanticTokensFullDeltaTests" $
180180
[ testCase "null delta since unchanged" $ do
181-
let file1 = "TModula𐐀bA.hs"
181+
let file1 = "TModuleA.hs"
182182
let expectDelta = InR (InL (SemanticTokensDelta (Just "1") []))
183183
Test.Hls.runSessionWithServerInTmpDir def semanticTokensPlugin (mkFs $ FS.directProjectMulti [file1]) $ do
184184
doc1 <- openDoc file1 "haskell"
@@ -188,7 +188,7 @@ semanticTokensFullDeltaTests =
188188
liftIO $ delta @?= expectDelta
189189

190190
, testCase "add tokens" $ do
191-
let file1 = "TModula𐐀bA.hs"
191+
let file1 = "TModuleA.hs"
192192
let expectDelta = InR (InL (SemanticTokensDelta (Just "1") [SemanticTokensEdit 20 0 (Just [2,0,3,8,0])]))
193193
-- r c l t m
194194
-- where r = row, c = column, l = length, t = token, m = modifier
@@ -207,7 +207,7 @@ semanticTokensFullDeltaTests =
207207
liftIO $ delta @?= expectDelta
208208

209209
, testCase "remove tokens" $ do
210-
let file1 = "TModula𐐀bA.hs"
210+
let file1 = "TModuleA.hs"
211211
let expectDelta = InR (InL (SemanticTokensDelta (Just "1") [SemanticTokensEdit 0 20 (Just [])]))
212212
-- delete all tokens
213213
Test.Hls.runSessionWithServerInTmpDir def semanticTokensPlugin (mkFs $ FS.directProjectMulti [file1]) $ do
@@ -229,7 +229,7 @@ semanticTokensTests :: TestTree
229229
semanticTokensTests =
230230
testGroup "other semantic Token test" $
231231
[ testCase "module import test" $ do
232-
let file1 = "TModula𐐀bA.hs"
232+
let file1 = "TModuleA.hs"
233233
let file2 = "TModuleB.hs"
234234
Test.Hls.runSessionWithServerInTmpDir def semanticTokensPlugin (mkFs $ FS.directProjectMulti [file1, file2]) $ do
235235
doc1 <- openDoc file1 "haskell"
@@ -245,14 +245,14 @@ semanticTokensTests =
245245

246246
result <- docSemanticTokensString def doc2
247247
let expect = unlines [
248-
"3:8-18 TModule \"TModula\\66560bA\""
249-
, "4:18-28 TModule \"TModula\\66560bA\""
248+
"3:8-16 TModule \"TModuleA\""
249+
, "4:18-26 TModule \"TModuleA\""
250250
, "6:1-3 TVariable \"go\""
251251
, "6:6-10 TDataConstructor \"Game\""
252252
, "8:1-5 TVariable \"a\\66560bb\""
253-
, "8:8-19 TModule \"TModula\\66560bA.\""
254-
, "8:19-22 TRecordField \"a\\66560b\""
255-
, "8:23-25 TVariable \"go\""
253+
, "8:8-17 TModule \"TModuleA.\""
254+
, "8:17-20 TRecordField \"a\\66560b\""
255+
, "8:21-23 TVariable \"go\""
256256
]
257257
liftIO $ result @?= expect,
258258
goldenWithSemanticTokensWithDefaultConfig "mixed constancy test result generated from one ghc version" "T1",

plugins/hls-semantic-tokens-plugin/test/testdata/TModula𐐀bA.hs renamed to plugins/hls-semantic-tokens-plugin/test/testdata/TModuleA.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module TModula𐐀bA where
1+
module TModuleA where
22

33
data Game = Game {a𐐀b :: Int}
44

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module TModuleB where
22

3-
import TModula𐐀bA
4-
import qualified TModula𐐀bA
3+
import TModuleA
4+
import qualified TModuleA
55

66
go = Game 1
77

8-
a𐐀bb = TModula𐐀bA.a𐐀b go
8+
a𐐀bb = TModuleA.a𐐀b go
Binary file not shown.

0 commit comments

Comments
 (0)