subbu has joined #jruby
subbu has quit [Ping timeout: 276 seconds]
subbu has joined #jruby
subbu has quit [Ping timeout: 260 seconds]
subbu has joined #jruby
subbu has quit [Ping timeout: 240 seconds]
subbu has joined #jruby
<headius> enebo: could we compile "ruby2_keywords def foo" with the ruby2_keywords flag set right away?
<headius> doesn't help cases where it is set on another line of course
<enebo[m]> headius: Probably do as assume no one will alias that ever?
<headius> I am stuck on a bug on my callInfo PR and probably need to walk away to work on RailsConf-related stuff but I wanted to take another crack at it
<enebo[m]> This is probably a place where we have to examine the AST itself since by build time the def will just be some variable
<headius> yeah
<enebo[m]> It could be done via IR but yeah AST would be the simple path if we see ruby2_keywords and child is DefNode we could mark it as a flag
<headius> could be done in build if we see a call to ruby2_keywords where the argument is the result of a def
<headius> either way... but yeah it seems super unlikely it would be aliased because it would just break
<headius> or do nothing
<headius> so I guess that's one possible use case but aliasing it in that way would break anything that expects it to work
<enebo[m]> fwiw anyone who would alias ruby2_keywords would be for some diagnostic code to see if any still existed in a code base
<headius> yeah
<enebo[m]> which would perhaps be a weird way to look for that vs ruby2_keywords in a grep :)
<headius> heh yeah
<enebo[m]> I think the use case of the alias is it would alias the original and redefine it then record that it is being called
<enebo[m]> or to do something else with the method it is being called on
<enebo[m]> It is extremely likely it will not actually become a ruby2_keywords though
<enebo[m]> err reverse that
<enebo[m]> it will still call it
<headius> so such a case would have different behavior on JRuby because we'd still set the flag even though they broke it
<headius> which would just let it run like it was intended
<enebo[m]> I cannot think of a case where that wouldn't happen sans 10 years from now when it is going away and someone wants it to raise or something weird
<enebo[m]> I mean we can flag it so it compiles and still run it which will set a true value to true
<enebo[m]> Just pointing out that detecting it could force behavior but calling the method would just be asking for what we already know
<enebo[m]> The only thing which would break would be the case where they alias it and do not want the behavior which I think is extremely close to 0%
<enebo[m]> So close I cannot even dream of the scenario
<enebo[m]> headius: another reline thing: https://github.com/jruby/jruby/issues/7759
<enebo[m]> or at least I am guessing so
<headius> yeah I interacted with him on Twitter to get a bug report
nilsding has quit [Quit: You have been kicked for being idle]
nilsding has joined #jruby
subbu has quit [Ping timeout: 240 seconds]
subbu has joined #jruby
subbu has quit [Ping timeout: 240 seconds]
subbu has joined #jruby