“registerLanguage” 在项目中未定义。

huangapple go评论94阅读模式
英文:

registerLanguage isn't defined in project

问题

I am your Chinese translator. Here is the translated text:

我正在尝试构建一个较旧的 Rascal 项目:https://github.com/visknut/LudoscopeLite 它在尝试调用 registerLanguage 时抛出 CallFailed 错误。

我在网络上找到了一些关于 registerLanguage 的引用,它似乎是 util:IDE 的一部分。然而,在当前的文档(IDE 似乎已被 IDEServices 取代)https://www.rascal-mpl.org/docs/Library/util/IDEServices/ 中找不到相关内容。

  • registerLanguage 被什么取代了?我需要做哪些更改才能使它构建成功?
  • 是否可以查看较旧版本的 rascal 文档?
  • 是否可以安装 Eclipse 插件的较旧版本的 rascal?
英文:

I'm trying to build an older rascal project: https://github.com/visknut/LudoscopeLite
It throws a CallFailed when trying to call registerLanguage.

I can find some references to registerLanguage across the web as part of util:IDE - neither are part of the current documentation here (IDE seems to have been succeeded by IDEServices) : https://www.rascal-mpl.org/docs/Library/util/IDEServices/

  • What was registerLanguage succeeded by? What do I need to change to get it to build?
  • Is it possible to see documentation for an older version of rascal?
  • Is it possible to install the eclipse plugin for an older version of rascal?

答案1

得分: 1

以下是翻译好的内容:

有两个版本的registerLanguage在它们的生命周期中相当稳定。

  • 一个是为Eclipse提供的,由rascal-eclipse插件提供,在util::IDE模块中。您可以在这里找到文档化的代码:https://github.com/usethesource/rascal-eclipse/blob/main/rascal-eclipse/src/org/rascalmpl/eclipse/library/util/IDE.rsc
  • 另一个是为VScode或者更准确地说是LSP提供的,它的模块是util::LanguageServer。代码在这里:https://github.com/usethesource/rascal-language-servers/blob/main/rascal-lsp/src/main/rascal/util/LanguageServer.rsc

这两个项目都在rascal-mpl.org上等待文档发布,但这可能不会提供比这些文件中所含的更多信息。当然,这两个项目的Pico演示项目都很有见地。

VScode版本与旧版Eclipse版本不兼容,因为它具有不同的参数。VScode版本旨在启动一个新的Rascal运行时,加载所需的模块并启动LSP回调服务,而Eclipse版本将直接从当前终端运行时注册回调。

关于util::IDEServices;这是新代码,起源于VScode移植,但部分地被反向移植到所有其他上下文。在Eclipse中,如果您愿意,您可以忽略它,或者使用它编写更可移植的代码,它也可以在VScode和命令行中工作。

安装旧版本的Rascal需要安装更旧版本的Eclipse。您必须将它们都移至Java11版本之前的版本。

旧版本的文档可以在git存储库中通过检出发布标签并阅读源代码 .rsc 或 .md 或 .concept markdown 来找到。

如果遇到问题,请给我们留言?

英文:

There are two versions of registerLanguage which have been rather stable during their lifetimes.

Both projects are on the backlog for documentation publication on rascal-mpl.org but that will probably offer not much more than what is in those files. Of course the demo projects for Pico for both are insightful.

The VScode version is incompatible with the older eclipse version, because it has different parameters. The VScode version is made to boot a fresh rascal runtime, load the required modules and start the LSP callback services, while the eclipse version would register the callbacks directly from the current terminal runtime.

About util::IDEServices; this is new code which originated from the VScode port but was partially back-ported to all other contexts. In eclipse you can ignore it if you want, or write more portable code with it which will also work in VScode and the commandline.

Installing older versions of Rascal requires installing much older versions of eclipse. You have to move both of them past the Java11 breakline.

Documentation for the older versions can be found in the git repositories by checking out release tags and reading the source .rsc or .md or .concept markdown.

Drop us a line if you get stuck?

huangapple
  • 本文由 发表于 2023年5月21日 11:50:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76298219.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定