clojuredart:cljd.com上的执行错误/load-libs-info(compiler.cljc:126)。阅读时EOF

发布于 2025-01-30 11:20:44 字数 359 浏览 1 评论 0原文

在将一本Flutter食谱转换为Clojuredart时,我概括了这个错误。 我以这种方式初始化了项目:

$ mkdir -p src/samples && touch src/samples/tabs.cljd
$ clj -M -m cljd.build init --dart samples.tabs

然后我以这种方式编译了:

$ clj -M -m cljd.build flutter

我做错了什么?

While translating a flutter cookbook into ClojureDart, I encoutered this error.
I initialized the project that way:

$ mkdir -p src/samples && touch src/samples/tabs.cljd
$ clj -M -m cljd.build init --dart samples.tabs

And then I compiled it this way:

$ clj -M -m cljd.build flutter

What did I do wrong ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

御弟哥哥 2025-02-06 11:20:44

我的.clojuredart/libs-info.edn文件是空的,这就是为什么它会导致eof。
这里的错误不是来自代码本身,而是我初始化项目的方式。
而不是这样做:

$ clj -M -m cljd.build init --dart samples.tabs

我应该刚刚完成:

$ clj -M -m cljd.build init samples.tabs

没有-Dart

有两种纠正此问题的方法。

  1. 从正确的命令重新将
  2. 分析仪的输出重定向到libs-info.edn。
    如果将ls运行到.clojuredart,您会注意到有两个文件:analyzer.dartlibs-info.edn。 Clojuredart使用分析仪来产品飞镖代码。
    运行:
$ dart .clojuredart/analyzer.dart > .clojuredart/libs-info.edn

它应该有效,就像对我一样!

My .clojuredart/libs-info.edn file was empty, that is why it causes EOF.
The mistake here is not from the code itself, but from the way I initialized the project.
Instead of doing:

$ clj -M -m cljd.build init --dart samples.tabs

I should have just done:

$ clj -M -m cljd.build init samples.tabs

without the --dart.

There are two ways to correct this.

  1. Start again with the correct command
  2. redirect the output of the analyzer into libs-info.edn.
    If you run ls into .clojuredart, you will notice that there are two files: analyzer.dart and libs-info.edn. ClojureDart uses the analyzer to product dart code.
    run:
$ dart .clojuredart/analyzer.dart > .clojuredart/libs-info.edn

And it should works, just like it did for me !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文