diff --git a/dune b/dune
index d23f6bdac..1eff30c41 100644
--- a/dune
+++ b/dune
@@ -7,7 +7,3 @@
 
 (rule
  (copy lsp.opam.template ocaml-lsp-server.opam.template))
-
-(env
- (_
-  (flags :standard -alert -unstable -w -58)))
diff --git a/dune-project b/dune-project
index b950df45d..923fd95bf 100644
--- a/dune-project
+++ b/dune-project
@@ -36,7 +36,6 @@ possible and does not make any assumptions about IO.
   (cinaps :with-test)
   (ppx_expect (and (>= v0.17.0) :with-test))
   (uutf (>= 1.0.2))
-  (odoc :with-doc)
   (ocaml (>= 4.14))))
 
 (package
@@ -68,7 +67,6 @@ possible and does not make any assumptions about IO.
   (pp (>= 1.1.2))
   (csexp (>= 1.5))
   (ocamlformat-rpc-lib (>= 0.21.0))
-  (odoc :with-doc)
   (merlin-lib (and (>= 5.2) (< 6.0)))))
 
 (package
@@ -76,5 +74,4 @@ possible and does not make any assumptions about IO.
  (synopsis "Jsonrpc protocol implemenation")
  (description "See https://www.jsonrpc.org/specification")
  (depends
-  (ocaml (>= 4.08))
-  (odoc :with-doc)))
+  (ocaml (>= 4.08))))
diff --git a/lsp.opam b/lsp.opam
index 4aadd460f..6f0e87f07 100644
--- a/lsp.opam
+++ b/lsp.opam
@@ -30,8 +30,8 @@ depends: [
   "cinaps" {with-test}
   "ppx_expect" {>= "v0.17.0" & with-test}
   "uutf" {>= "1.0.2"}
-  "odoc" {with-doc}
   "ocaml" {>= "4.14"}
+  "odoc" {with-doc}
 ]
 dev-repo: "git+https://github.com/ocaml/ocaml-lsp.git"
 build: [
diff --git a/ocaml-lsp-server.opam b/ocaml-lsp-server.opam
index b0e803e0b..4de03b797 100644
--- a/ocaml-lsp-server.opam
+++ b/ocaml-lsp-server.opam
@@ -44,8 +44,8 @@ depends: [
   "pp" {>= "1.1.2"}
   "csexp" {>= "1.5"}
   "ocamlformat-rpc-lib" {>= "0.21.0"}
-  "odoc" {with-doc}
   "merlin-lib" {>= "5.2" & < "6.0"}
+  "odoc" {with-doc}
 ]
 dev-repo: "git+https://github.com/ocaml/ocaml-lsp.git"
 build: [