【发布时间】:2022-08-05 03:17:35
【问题描述】:
在 Rails 应用程序中运行 srb init 时,我得到以下信息:
Generating /tmp/d20220723-3779490-paqj5l/reflection.rbi with 6784 modules and 142 aliases
Printing your code\'s symbol table into /tmp/d20220723-3779490-paqj5l/from-source.json
/home/allan/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/sorbet-0.5.10206/lib/hidden-definition-finder.rb:123:in `write_constants\': Your source can\'t be read by Sorbet. (RuntimeError)
You can try `find . -type f | xargs -L 1 -t bundle exec srb tc --no-config --isolate-error-code 1000` and hopefully the last file it is processing before it dies is the culprit.
If not, maybe the errors in this file will help: /tmp/d20220723-3779490-paqj5l/from-source.json.err
当我检查该错误文件时,我发现:
异常::raise():未实现的解析器节点:EmptyElse
是否有解决此错误的方法?
-
那么,哪个文件是罪魁祸首呢?那可能是个不错的起点
标签: sorbet