简体   繁体   English

安装带有限制性约束的 opam package

[英]installing an opam package with a restrictive bound

Right now ocaml-lsp-server is restricted to ocaml>=4.13 & <4.14现在ocaml-lsp-server仅限于ocaml>=4.13 & <4.14

Is there an easy way to force-install it on an "opam switch" having a higher version?是否有一种简单的方法可以将其强制安装在具有更高版本的“opam 开关”上?

Is it unthinkable that it could work?它可以工作是不可想象的吗?

> opam list
# Packages matching: installed
# Name              # Installed  # Synopsis
...
ocaml               4.14.0       The OCaml compiler (virtual package)
ocaml-compiler-libs v0.12.4      OCaml compiler libraries repackaged
ocaml-config        2            OCaml Switch Configuration
ocaml-variants      4.14.0+trunk Latest 4.14.0 development
...
> opam switch invariant
["ocaml-variants" {= "4.14.0+trunk"}]

At the time of this question, OCaml 4.14 has not been released yet.在这个问题的时候,OCaml 4.14 还没有发布。

The ocaml-lsp server is based on merlin which is itself strongly coupled to the compiler due to its use of the typechecker internal API. ocaml-lsp服务器基于merlin ,由于它使用内部类型检查器 API,它本身与编译器强耦合。 Moreover, merlin will be in flux for 4.14 until the release of the first beta release of OCaml 4.14.0 (due to the upstreaming of some part of the Merlin codebase to the compiler).此外,在 OCaml 4.14.0 的第一个 beta 版本发布之前,merlin 将在 4.14 中不断变化(由于 Merlin 代码库的某些部分已上传到编译器)。

The easiest way (which is not easy at all) is thus to port ocaml-lsp-server to 4.14 yourself and maintain it while waiting for the official version.因此,最简单的方法(这根本不容易)是自己将ocaml-lsp-server移植到 4.14 并在等待正式版本时对其进行维护。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM