Skip to content

Commit b6e5f0b

Browse files
committed
chore: get rid of stdune in lsp
do not use Code_error in the lsp library ps-id: 364517D0-13DE-459D-99A4-4056F8DE4F57
1 parent 297150d commit b6e5f0b

File tree

5 files changed

+3
-9
lines changed

5 files changed

+3
-9
lines changed

dune-project

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ possible and does not make any assumptions about IO.
3535
dyn
3636
yojson
3737
(ppx_yojson_conv_lib (>= "v0.14"))
38-
stdune
3938
(uutf (>= 1.0.2))
4039
(odoc :with-doc)
4140
(ocaml (>= 4.12))))

lsp.opam

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ depends: [
2828
"dyn"
2929
"yojson"
3030
"ppx_yojson_conv_lib" {>= "v0.14"}
31-
"stdune"
3231
"uutf" {>= "1.0.2"}
3332
"odoc" {with-doc}
3433
"ocaml" {>= "4.12"}

lsp/src/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
(library
44
(name lsp)
55
(public_name lsp)
6-
(libraries jsonrpc ppx_yojson_conv_lib stdune dyn uutf yojson)
6+
(libraries jsonrpc ppx_yojson_conv_lib dyn uutf yojson)
77
(lint
88
(pps ppx_yojson_conv)))
99

lsp/src/import.ml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ module Result = struct
99
end
1010
end
1111

12-
(* TODO remove these last remnants of stdune once there is something public
13-
available *)
14-
module Code_error = Stdune.Code_error
15-
1612
let sprintf = Printf.sprintf
1713

1814
module String = struct
@@ -204,7 +200,7 @@ module Json = struct
204200
t =
205201
match f t with
206202
| `Assoc xs -> `Assoc ((k, `String v) :: xs)
207-
| _ -> Code_error.raise "To.literal_field" []
203+
| _ -> invalid_arg "To.literal_field"
208204

209205
let int_pair (x, y) = `List [ `Int x; `Int y ]
210206
end

lsp/src/snippet.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ let placeholder ?index content = Tabstop (index, `Placeholder content)
4444

4545
let choice ?index values =
4646
match values with
47-
| [] -> Code_error.raise "choice must have non empty values" []
47+
| [] -> invalid_arg "choice must have non empty values"
4848
| _ -> Tabstop (index, `Choice values)
4949

5050
let variable ?(opt = `None) var = Variable (var, opt)

0 commit comments

Comments
 (0)