fixes and updates

This commit is contained in:
Simon Cruanes 2025-04-07 13:31:04 -04:00
parent 5ba6f40a3c
commit 5b264f9f67
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
11 changed files with 30 additions and 8 deletions

View file

@ -13,6 +13,9 @@ clean:
doc: doc:
@dune build @doc @dune build @doc
update-submodules:
@git submodule update --init
VERSION=$(shell awk '/^version:/ {print $$2}' linol.opam) VERSION=$(shell awk '/^version:/ {print $$2}' linol.opam)
update_next_tag: update_next_tag:

View file

@ -15,6 +15,8 @@
of a document are expected to be able to return. of a document are expected to be able to return.
*) *)
module Lsp = Linol.Lsp
type state_after_processing = unit type state_after_processing = unit
let process_some_input_file (_file_contents : string) : state_after_processing = let process_some_input_file (_file_contents : string) : state_after_processing =

View file

@ -15,6 +15,8 @@
of a document are expected to be able to return. of a document are expected to be able to return.
*) *)
module Lsp = Linol.Lsp
type state_after_processing = unit type state_after_processing = unit
let process_some_input_file (_file_contents : string) : state_after_processing = let process_some_input_file (_file_contents : string) : state_after_processing =

View file

@ -1,3 +1,5 @@
module Lsp = Linol_lsp.Lsp
module Jsonrpc = Linol_jsonrpc.Jsonrpc
module Trace = Trace_core module Trace = Trace_core
let ( let@ ) = ( @@ ) let ( let@ ) = ( @@ )

View file

@ -3,4 +3,4 @@
(public_name linol) (public_name linol)
(private_modules log) (private_modules log)
(flags :standard -warn-error -a+8) (flags :standard -warn-error -a+8)
(libraries yojson logs threads trace.core lsp jsonrpc)) (libraries yojson logs threads trace.core (re_export linol.lsp) (re_export linol.jsonrpc)))

View file

@ -1,3 +1,7 @@
open struct
module Lsp = Linol_lsp.Lsp
end
module type IO = Linol.IO module type IO = Linol.IO
module IO_eio : module IO_eio :

View file

@ -2,6 +2,7 @@
See {{: https://www.jsonrpc.org/specification} the spec} *) See {{: https://www.jsonrpc.org/specification} the spec} *)
open Common_
type json = Yojson.Safe.t type json = Yojson.Safe.t
module type IO = Sigs.IO module type IO = Sigs.IO

View file

@ -3,13 +3,16 @@
Abstraction over The "Lsp" library, to make it easier to develop Abstraction over The "Lsp" library, to make it easier to develop
LSP servers in OCaml (but not necessarily {b for} OCaml). *) LSP servers in OCaml (but not necessarily {b for} OCaml). *)
module Imports = struct
module Lsp = Lsp
module Jsonrpc = Jsonrpc
end
module type IO = Sigs.IO 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 Jsonrpc2 = Jsonrpc2
module Server = Server module Server = Server
module Blocking_IO = Blocking_IO module Blocking_IO = Blocking_IO

View file

@ -1,3 +1,7 @@
open struct
module Lsp = Linol_lsp.Lsp
end
module type IO = Linol.IO module type IO = Linol.IO
module IO_lwt : module IO_lwt :

2
vendor/jsonrpc/dune vendored
View file

@ -1,5 +1,5 @@
(copy_files %{project_root}/submodules/ocaml-lsp/jsonrpc/src/*.{ml,mli}) (copy_files %{project_root}/submodules/ocaml-lsp/jsonrpc/src/*.{ml,mli})
(library (library
(name jsonrpc) (name linol_jsonrpc)
(public_name linol.jsonrpc)) (public_name linol.jsonrpc))

5
vendor/lsp/dune vendored
View file

@ -1,9 +1,10 @@
(copy_files %{project_root}/submodules/ocaml-lsp/lsp/src/*.{ml,mli,mll}) (copy_files %{project_root}/submodules/ocaml-lsp/lsp/src/*.{ml,mli,mll})
(library (library
(name lsp) (name linol_lsp)
(public_name linol.lsp) (public_name linol.lsp)
(libraries jsonrpc ppx_yojson_conv_lib uutf yojson) (libraries linol_jsonrpc ppx_yojson_conv_lib uutf yojson)
(flags :standard -open Linol_jsonrpc)
(lint (lint
(pps ppx_yojson_conv))) (pps ppx_yojson_conv)))