Skip to content

Commit

Permalink
v0.2.6.2.2.1: Build with lsp-1.6 on GHC 9.2 and LTS 20.26
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Nov 21, 2023
1 parent d4eb378 commit fa680de
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 27 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## v0.2.6.2.2.1 - 2023-11-21

### Added

- Building with `lsp-1.6`.
Builds with `lsp` < 1.7 on GHC 8.10 (LTS 18.28), 9.0 (LTS 19.33), and 9.2 (LTS 20.26)

## v0.2.6.2.2 - 2023-11-21

### Changed
Expand Down
9 changes: 5 additions & 4 deletions agda-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack

name: agda-language-server
version: 0.2.6.2.2
version: 0.2.6.2.2.1
synopsis: An implementation of language server protocal (LSP) for Agda 2.
description: Please see the README on GitHub at <https://github.com/agda/agda-language-server#readme>
category: Development
Expand All @@ -23,6 +23,7 @@ extra-source-files:
package.yaml
stack.yaml
stack-8.10.yaml
stack-9.0.yaml

source-repository head
type: git
Expand Down Expand Up @@ -70,7 +71,7 @@ library
, base >=4.7 && <5
, bytestring
, containers
, lsp <1.5
, lsp <1.7
, mtl
, network
, network-simple
Expand Down Expand Up @@ -98,7 +99,7 @@ executable als
, base >=4.7 && <5
, bytestring
, containers
, lsp <1.5
, lsp <1.7
, mtl
, network
, network-simple
Expand Down Expand Up @@ -153,7 +154,7 @@ test-suite als-test
, base >=4.7 && <5
, bytestring
, containers
, lsp <1.5
, lsp <1.7
, mtl
, network
, network-simple
Expand Down
5 changes: 3 additions & 2 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: agda-language-server
version: 0.2.6.2.2
version: 0.2.6.2.2.1
github: "banacorn/agda-language-server"
license: MIT
author: "Ting-Gian LUA"
Expand All @@ -12,6 +12,7 @@ extra-source-files:
- package.yaml
- stack.yaml
- stack-8.10.yaml
- stack-9.0.yaml

# Metadata used when publishing your package
synopsis: An implementation of language server protocal (LSP) for Agda 2.
Expand All @@ -33,7 +34,7 @@ dependencies:
- aeson
- bytestring
- containers
- lsp < 1.5
- lsp < 1.7
- mtl
- network
- network-simple
Expand Down
10 changes: 7 additions & 3 deletions src/Server.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}

-- entry point of the LSP server
Expand Down Expand Up @@ -44,7 +45,11 @@ run options = do
$ \(sock, _remoteAddr) -> do
-- writeChan (envLogChan env) "[Server] connection established"
handle <- socketToHandle sock ReadWriteMode
_ <- runServerWithHandles handle handle (serverDefn options)
_ <- runServerWithHandles
#if MIN_VERSION_lsp(1,5,0)
mempty mempty
#endif
handle handle (serverDefn options)
return ()
-- Switchboard.destroy switchboard
return 0
Expand Down Expand Up @@ -103,9 +108,8 @@ handlers = mconcat
= req
result <- Handler.onHover uri pos
responder $ Right result
-- -- syntax highlighting
-- -- syntax highlighting
-- , requestHandler STextDocumentSemanticTokensFull $ \req responder -> do
-- result <- Handler.onHighlight (req ^. (params . textDocument . uri))
-- responder result
]

16 changes: 16 additions & 0 deletions stack-9.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
resolver: lts-19.33
compiler: ghc-9.0.2
# Allow a newer minor version of GHC than the snapshot specifies
compiler-check: newer-minor

packages:
- .

# Use some newer versions than in the lts-19.33 snapshot
extra-deps:
- text-icu-0.8.0.1

flags:
Agda:
# optimise-heavily: true
enable-cluster-counting: true
8 changes: 2 additions & 6 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
resolver: lts-19.33
compiler: ghc-9.0.2
resolver: lts-20.26
compiler: ghc-9.2.8
# Allow a newer minor version of GHC than the snapshot specifies
compiler-check: newer-minor

packages:
- .

# Use some newer versions than in the lts-19.33 snapshot
extra-deps:
- text-icu-0.8.0.1

flags:
Agda:
# optimise-heavily: true
Expand Down
17 changes: 5 additions & 12 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: text-icu-0.8.0.1@sha256:22d21c91e7a81f1ee5766b3406f4fe9df0ff8cc426581a861de3f6f2fa413449,4624
pantry-tree:
sha256: 71ed32ecdce71adba6df6220e717b8ec4bd252cc403714c5c4ba70cf6d1aa1e4
size: 3223
original:
hackage: text-icu-0.8.0.1
packages: []
snapshots:
- completed:
sha256: 6d1532d40621957a25bad5195bfca7938e8a06d923c91bc52aa0f3c41181f2d4
size: 619204
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/33.yaml
original: lts-19.33
sha256: 5a59b2a405b3aba3c00188453be172b85893cab8ebc352b1ef58b0eae5d248a2
size: 650475
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/26.yaml
original: lts-20.26

0 comments on commit fa680de

Please sign in to comment.