mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
a50df1ab0e
Adds the `syntax_suggest` syntax error display tool to Ruby through the same mechanism as `error_highlight` and `did_you_mean`. Reference ticket: https://bugs.ruby-lang.org/issues/18159 close #4845 ## What is syntax_suggest? When a syntax error is raised by requiring a file, dead_end will use a combination of indentation and lexing to identify the problem. > Note: Previously this tool was named `dead_end`. ## Known issues - SyntaxSearch's approach of showing syntax errors only works through integration with `require`, `load`, `autoload`, and `require_relative` (since it monkeypatches them to detect syntax errors). It does not work with direct Ruby file invocations https://github.com/zombocom/dead_end/issues/31. - This causes failure in the test suite (test_expected_backtrace_location_when_inheriting_from_basic_object_and_including_kernel) and confusion when inspecting backtraces if there's a different error when trying to require a file such as measuring memory (https://github.com/zombocom/syntax_suggest/issues/124#issuecomment-1006705016). - Discussed fix. We previously talked about opening up `SyntaxError` to be monkeypatched in the same way that other gems hook into `NoMethodError`. This is currently not possible and requires development work. When we last talked about it at RubyKaigi Nobu expressed an ability to make such a change. |
||
---|---|---|
.. | ||
annocheck | ||
bundler | ||
dummy-rake-compiler/rake | ||
lib | ||
m4 | ||
releng | ||
ruby_vm | ||
test | ||
asm_parse.rb | ||
bisect.sh | ||
build-transcode | ||
checksum.rb | ||
ci_functions.sh | ||
colors | ||
darwin-cc | ||
disable_ipv6.sh | ||
downloader.rb | ||
enc-emoji-citrus-gen.rb | ||
enc-emoji4unicode.rb | ||
enc-unicode.rb | ||
eval.rb | ||
expand-config.rb | ||
extlibs.rb | ||
fake.rb | ||
fetch-bundled_gems.rb | ||
file2lastrev.rb | ||
format-release | ||
gen-mailmap.rb | ||
gen_dummy_probes.rb | ||
gen_ruby_tapset.rb | ||
generic_erb.rb | ||
git-refresh | ||
gperf.sed | ||
id2token.rb | ||
ifchange | ||
insns2vm.rb | ||
install-sh | ||
intern_ids.rb | ||
leaked-globals | ||
ln_sr.rb | ||
make-snapshot | ||
make_hgraph.rb | ||
mdoc2man.rb | ||
merger.rb | ||
mjit_archflag.sh | ||
mjit_tabs.rb | ||
mk_builtin_loader.rb | ||
mkconfig.rb | ||
mkrunnable.rb | ||
node_name.rb | ||
parse.rb | ||
prereq.status | ||
probes_to_wiki.rb | ||
pure_parser.rb | ||
rbinstall.rb | ||
rbuninstall.rb | ||
redmine-backporter.rb | ||
release.sh | ||
rmdirs | ||
run-gcov.rb | ||
run-lcov.rb | ||
runruby.rb | ||
search-cgvars.rb | ||
strip-rdoc.rb | ||
sync_default_gems.rb | ||
test-annocheck.sh | ||
test-bundled-gems.rb | ||
test-coverage.rb | ||
transcode-tblgen.rb | ||
transform_mjit_header.rb | ||
travis_retry.sh | ||
travis_wait.sh | ||
update-bundled_gems.rb | ||
update-deps | ||
vtlh.rb | ||
wasm-clangw | ||
ytab.sed |