-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Truffle Setup issues with jt.rb and #exec #4346
Comments
Hmm . . . I'm sorry you've run into problems. Can you please let me know the commit SHA for the version of JRuby you have checked out? I tried to deduce it from your output above, but I think your checked out version is different than the JRuby 9.1.6.0-SNAPSHOT you're using. I'm having a bit of difficulty matching up your backtrace as a result. |
ch-nb-647:jruby dtrollope$ git rev-parse HEAD
no changes added to commit (use "git add" and/or "git commit -a") |
@davetrollope In your patch, you first do From the mailing lost:
This is the problem, the fact that PATH=../graalvm-0.18-re/bin:$PATH tool/jt.rb ruby --graal -e 'p Truffle::Graal.graal?' For now, a simple fix is to not have Can you confirm removing |
…Truffle. * It's not a good recipe for fast startup. * See #4346.
Sure - I tossed the shift in above my debugs - didn't make sense after.. Here you go:
diff --git a/tool/jt.rb b/tool/jt.rb
index 3c08502..41e48e9 100755
--- a/tool/jt.rb
+++ b/tool/jt.rb
@@ -269,6 +269,7 @@ module ShellUtils
end
def raw_sh(*args)
+puts "ARG1 #{args}"
options = args.last.is_a?(Hash) ? args.last : {}
continue_on_failure = options.delete :continue_on_failure
use_exec = options.delete :use_exec
@@ -280,6 +281,7 @@ module ShellUtils
end
if use_exec
+ args.shift # DST
result = exec(*args)
elsif timeout
result = system_timeout(timeout, *args) You are right - using the system ruby without the graal version in the path works:
Thanks for the speedy responses! Your comments about the startup cost are interesting. This has been one of my biggest issues with jruby and rake tasks - the startup costs often outweigh the trivial nature of rake tasks. That is of course a subject for another thread but I would certainly encourage improvements in that area. Glad we at least identified a specific issue with #exec that can be addressed too. Thanks again! |
You are welcome! |
Environment
Expected Behavior
I was running through the dev setup on https://github.com/jruby/jruby/tree/truffle-head/truffle and ran in to a couple of issues.
Running jt ruby --graal -e 'p Truffle::Graal.graal?' should return true
Actual Behavior
When I run jt ruby --graal -e 'p Truffle::Graal.graal?' I get a No such file or directory (Errno::ENOENT). I supplemented jt.rb to dump what was being passed to exec() and verified the paths being used are valid, see output below:
Now - the curious thing is if I remove the hash with the environment setup from what is passed to #exec, it all works:
I'm not familiar with how #exec is processing the environment hash, but something odd is happening. Currently I am relying on java being in the path.
The text was updated successfully, but these errors were encountered: