mirror of
https://github.com/c-cube/linol.git
synced 2025-12-05 19:00:34 -05:00
Merge branch 'vendor-lsp'
This commit is contained in:
commit
f83580c8c1
22 changed files with 64 additions and 41 deletions
3
.github/workflows/gh-pages.yml
vendored
3
.github/workflows/gh-pages.yml
vendored
|
|
@ -10,7 +10,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- uses: ocaml/setup-ocaml@v3
|
||||
with:
|
||||
ocaml-compiler: '5.2'
|
||||
|
|
|
|||
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
|
|
@ -15,6 +15,8 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- uses: ocaml/setup-ocaml@v3
|
||||
with:
|
||||
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
||||
|
|
@ -37,21 +39,17 @@ jobs:
|
|||
- 5.1.x
|
||||
- 5.2.x
|
||||
- 5.3.x
|
||||
lsp-version:
|
||||
- 1.19.0
|
||||
- 1.20.1
|
||||
- 1.22.0
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- uses: ocaml/setup-ocaml@v3
|
||||
with:
|
||||
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
||||
dune-cache: true
|
||||
allow-prerelease-opam: true
|
||||
- run: opam pin -n .
|
||||
- run: opam pin add jsonrpc ${{ matrix.lsp-version }}
|
||||
- run: opam pin add lsp ${{ matrix.lsp-version }}
|
||||
- run: opam depext -yt linol linol-lwt linol-eio
|
||||
- run: opam install -t . --deps-only
|
||||
- run: opam exec -- dune build
|
||||
|
|
|
|||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "submodules/ocaml-lsp"]
|
||||
path = submodules/ocaml-lsp
|
||||
url = https://github.com/ocaml/ocaml-lsp.git
|
||||
3
Makefile
3
Makefile
|
|
@ -16,6 +16,9 @@ doc:
|
|||
fmt:
|
||||
@dune build @fmt --auto-promote
|
||||
|
||||
update-submodules:
|
||||
@git submodule update --init
|
||||
|
||||
VERSION=$(shell awk '/^version:/ {print $$2}' linol.opam)
|
||||
|
||||
update_next_tag:
|
||||
|
|
|
|||
1
dune
Normal file
1
dune
Normal file
|
|
@ -0,0 +1 @@
|
|||
(data_only_dirs submodules)
|
||||
31
dune-project
31
dune-project
|
|
@ -28,17 +28,14 @@
|
|||
"logs"
|
||||
("trace"
|
||||
(>= "0.4"))
|
||||
("lsp"
|
||||
(and
|
||||
(>= "1.19")
|
||||
(< "1.23")))
|
||||
("jsonrpc"
|
||||
(and
|
||||
(>= "1.19")
|
||||
(< "1.23")))
|
||||
("ocaml"
|
||||
(>= "4.14"))
|
||||
("odoc" :with-doc)))
|
||||
("odoc" :with-doc)
|
||||
; The following dependencies are needed for lsp, which we vendor
|
||||
(uutf
|
||||
(>= 1.0.2))
|
||||
(ppx_yojson_conv_lib
|
||||
(>= "v0.14"))))
|
||||
|
||||
(package
|
||||
(name linol-lwt)
|
||||
|
|
@ -53,14 +50,6 @@
|
|||
(and
|
||||
(>= "5.1")
|
||||
(< "6.0")))
|
||||
("lsp"
|
||||
(and
|
||||
(>= "1.19")
|
||||
(< "1.23")))
|
||||
("jsonrpc"
|
||||
(and
|
||||
(>= "1.19")
|
||||
(< "1.23")))
|
||||
("odoc" :with-doc)))
|
||||
|
||||
(package
|
||||
|
|
@ -78,12 +67,4 @@
|
|||
(>= "1.0")
|
||||
(< "2.0")))
|
||||
(eio_main :with-test)
|
||||
("lsp"
|
||||
(and
|
||||
(>= "1.19")
|
||||
(< "1.23")))
|
||||
("jsonrpc"
|
||||
(and
|
||||
(>= "1.19")
|
||||
(< "1.23")))
|
||||
("odoc" :with-doc)))
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
of a document are expected to be able to return.
|
||||
*)
|
||||
|
||||
module Lsp = Linol.Lsp
|
||||
|
||||
type state_after_processing = unit
|
||||
|
||||
let process_some_input_file (_file_contents : string) : state_after_processing =
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
of a document are expected to be able to return.
|
||||
*)
|
||||
|
||||
module Lsp = Linol.Lsp
|
||||
|
||||
type state_after_processing = unit
|
||||
|
||||
let process_some_input_file (_file_contents : string) : state_after_processing =
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ depends: [
|
|||
"base-unix"
|
||||
"eio" {>= "1.0" & < "2.0"}
|
||||
"eio_main" {with-test}
|
||||
"lsp" {>= "1.19" & < "1.23"}
|
||||
"jsonrpc" {>= "1.19" & < "1.23"}
|
||||
"odoc" {with-doc}
|
||||
]
|
||||
build: [
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ depends: [
|
|||
"linol" {= version}
|
||||
"base-unix"
|
||||
"lwt" {>= "5.1" & < "6.0"}
|
||||
"lsp" {>= "1.19" & < "1.23"}
|
||||
"jsonrpc" {>= "1.19" & < "1.23"}
|
||||
"odoc" {with-doc}
|
||||
]
|
||||
build: [
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ depends: [
|
|||
"yojson" {>= "1.6"}
|
||||
"logs"
|
||||
"trace" {>= "0.4"}
|
||||
"lsp" {>= "1.19" & < "1.23"}
|
||||
"jsonrpc" {>= "1.19" & < "1.23"}
|
||||
"ocaml" {>= "4.14"}
|
||||
"odoc" {with-doc}
|
||||
"uutf" {>= "1.0.2"}
|
||||
"ppx_yojson_conv_lib" {>= "v0.14"}
|
||||
]
|
||||
build: [
|
||||
["dune" "subst"] {pinned}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
module Lsp = Linol_lsp.Lsp
|
||||
module Jsonrpc = Linol_jsonrpc.Jsonrpc
|
||||
module Trace = Trace_core
|
||||
|
||||
let ( let@ ) = ( @@ )
|
||||
|
|
|
|||
2
src/dune
2
src/dune
|
|
@ -3,4 +3,4 @@
|
|||
(public_name linol)
|
||||
(private_modules log)
|
||||
(flags :standard -warn-error -a+8)
|
||||
(libraries yojson lsp logs threads trace.core))
|
||||
(libraries yojson logs threads trace.core (re_export linol.lsp) (re_export linol.jsonrpc)))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
(library
|
||||
(name linol_eio)
|
||||
(public_name linol-eio)
|
||||
(libraries eio eio.unix linol)
|
||||
(libraries eio eio.unix linol linol.lsp linol.jsonrpc)
|
||||
(flags :standard -warn-error -a))
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
open struct
|
||||
module Lsp = Linol_lsp.Lsp
|
||||
end
|
||||
|
||||
module type IO = Linol.IO
|
||||
|
||||
module IO_eio :
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
See {{: https://www.jsonrpc.org/specification} the spec} *)
|
||||
|
||||
open Common_
|
||||
type json = Yojson.Safe.t
|
||||
|
||||
module type IO = Sigs.IO
|
||||
|
|
|
|||
|
|
@ -3,8 +3,16 @@
|
|||
Abstraction over The "Lsp" library, to make it easier to develop
|
||||
LSP servers in OCaml (but not necessarily {b for} OCaml). *)
|
||||
|
||||
|
||||
module type IO = Sigs.IO
|
||||
|
||||
(** {2 Re-export from vendored lsp} *)
|
||||
|
||||
module Lsp = Linol_lsp.Lsp
|
||||
module Jsonrpc = Linol_jsonrpc.Jsonrpc
|
||||
|
||||
(** {2 Main modules} *)
|
||||
|
||||
module Jsonrpc2 = Jsonrpc2
|
||||
module Server = Server
|
||||
module Blocking_IO = Blocking_IO
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
(library
|
||||
(name linol_lwt)
|
||||
(public_name linol-lwt)
|
||||
(libraries yojson lwt lwt.unix linol lsp jsonrpc)
|
||||
(libraries yojson lwt lwt.unix linol linol.lsp linol.jsonrpc)
|
||||
(flags :standard -warn-error -a))
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
open struct
|
||||
module Lsp = Linol_lsp.Lsp
|
||||
end
|
||||
|
||||
module type IO = Linol.IO
|
||||
|
||||
module IO_lwt :
|
||||
|
|
|
|||
1
submodules/ocaml-lsp
Submodule
1
submodules/ocaml-lsp
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit aae6986391a8519de3da6a7a341f2bd3376e0d2f
|
||||
5
vendor/jsonrpc/dune
vendored
Normal file
5
vendor/jsonrpc/dune
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
(copy_files %{project_root}/submodules/ocaml-lsp/jsonrpc/src/*.{ml,mli})
|
||||
|
||||
(library
|
||||
(name linol_jsonrpc)
|
||||
(public_name linol.jsonrpc))
|
||||
11
vendor/lsp/dune
vendored
Normal file
11
vendor/lsp/dune
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(copy_files %{project_root}/submodules/ocaml-lsp/lsp/src/*.{ml,mli,mll})
|
||||
|
||||
(library
|
||||
(name linol_lsp)
|
||||
(public_name linol.lsp)
|
||||
(libraries linol_jsonrpc ppx_yojson_conv_lib uutf yojson)
|
||||
(flags :standard -open Linol_jsonrpc)
|
||||
(lint
|
||||
(pps ppx_yojson_conv)))
|
||||
|
||||
(ocamllex uri_lexer)
|
||||
Loading…
Add table
Reference in a new issue