You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I found that the typeprof VSCode extension does not work correctly on lib/typeprof/ when using the latest master branch (50d2d7c). However, it works fine with the previous commit (b21905b).
The execution results of tool/dog_bench.rb also reflect this behavior.
Given that the former results in an error and the latter succeeds, I am reporting this as a problem.
Problem
At 50d2d7c , $ bundle exec ruby tool/dog_bench.rb failed
$ bundle exec ruby tool/dog_bench.rb ; echo $?
lib/typeprof/code_range.rb
lib/typeprof/core/ast/base.rb
/Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/env.rb:297:in `get_var': unhandled exception
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/control.rb:189:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:23:in `block in install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `each'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/control.rb:66:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:23:in `block in install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `each'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/control.rb:139:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:23:in `block in install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `each'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/method.rb:224:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/method.rb:189:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:23:in `block in install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `each'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/module.rb:67:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/module.rb:113:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:23:in `block in install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `each'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/module.rb:67:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/module.rb:113:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:23:in `block in install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `each'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/module.rb:67:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:23:in `block in install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `each'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/misc.rb:22:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:211:in `install0'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/ast/base.rb:93:in `install'
from /Users/hoshino/ghq/github.com/ruby/typeprof/lib/typeprof/core/service.rb:81:in `update_rb_file'
from tool/dog_bench.rb:10:in `block in main'
from <internal:dir>:411:in `glob'
from tool/dog_bench.rb:7:in `main'
from tool/dog_bench.rb:31:in `block in <main>'
from tool/dog_bench.rb:30:in `run'
from tool/dog_bench.rb:30:in `<main>'
1
In other words, I think the program fails when it looks like this.
until(cond)nextend
Ideally, I would have solved the root cause of the issue, but I was unable to do so 🙏. Therefore, I created a PR marking it as a known issue. I would appreciate it if you could review it. #210 .
Additional Information
This change makes the tests pass, but currently, I am not fully sure what I am doing 😇 😇
--- a/lib/typeprof/core/ast/control.rb+++ b/lib/typeprof/core/ast/control.rb@@ -186,7 +186,9 @@ module TypeProf::Core
def install0(genv)
@arg.install(genv)
- @lenv.add_next_box(@changes.add_escape_box(genv, @arg.ret, @lenv.get_var(:"*expected_block_ret")))+ if @lenv.locals[:"*expected_block_ret"]+ @lenv.add_next_box(@changes.add_escape_box(genv, @arg.ret, @lenv.get_var(:"*expected_block_ret")))+ end
Source.new(Type::Bot.new(genv))
end
end
The text was updated successfully, but these errors were encountered:
mame
added a commit
to mame/typeprof
that referenced
this issue
Jun 8, 2024
Recently, I found that the typeprof VSCode extension does not work correctly on
lib/typeprof/
when using the latest master branch (50d2d7c). However, it works fine with the previous commit (b21905b).The execution results of
tool/dog_bench.rb
also reflect this behavior.Given that the former results in an error and the latter succeeds, I am reporting this as a problem.
Problem
At 50d2d7c ,
$ bundle exec ruby tool/dog_bench.rb
failedAt previous commit b21905b ,
$ bundle exec ruby tool/dog_bench.rb
succeedsAdded Known-Issue PR
I believe the following part of
core/ast/base.rb
is causing typeprof to fail:typeprof/lib/typeprof/core/ast/base.rb
Lines 26 to 28 in 50d2d7c
In other words, I think the program fails when it looks like this.
Ideally, I would have solved the root cause of the issue, but I was unable to do so 🙏. Therefore, I created a PR marking it as a known issue. I would appreciate it if you could review it. #210 .
Additional Information
This change makes the tests pass, but currently, I am not fully sure what I am doing 😇 😇
The text was updated successfully, but these errors were encountered: