<kares[m]>
<enebo[m]> "kares: I know we are more..." <- honestly do not know - the auto-reconnection in the Java layer felt like legacy and I believe it predates when I started working on AR-JDBC
<kares[m]>
think I've seen it in action on an old AR 3.x version or so but it might have been an issue with how the AR pool was managing connections ...
<kares[m]>
your PR looks good to me and esp. given this is SQLite it should be fine, I guess (not much SQLite experience though)
<headius>
Sorry I am traveling the week before RailsConf but I appreciate everyone's efforts to get Rails 7 working. I will try to fit in work here and there as I can
<headius>
woot, working on the bus from Oslo airport to Fredrickstad
<headius>
ERROR: While executing gem ... (NoMethodError)
<headius>
undefined method `deprecated?' for nil:NilClass
<headius>
Gem::MissingSpecError
<headius>
ugh, or rvm somehow activated and was trying to use CRuby gems with JRuby
<headius>
yup false alarm
subbu has joined #jruby
<headius>
enebo: I found the problem with that ActiveModel constant, and this could easily explain other constant-scoping weirdness: https://github.com/jruby/jruby/issues/7199
<headius>
basically Rails has switched `constantize` to just use `Module#const_get` and our implementation sees toplevel constants when it should not (and probably other edge case issues)
<headius>
I tried a quick fix but could not get a combination that would pass all specs
<headius>
a re-port of the logic might be in order... it has not been updated in quite a while
subbu has quit [Ping timeout: 256 seconds]
<enebo[m]>
headius cool. I am hoping there is nothing too surprising in that methods changes
<enebo[m]>
lol
<headius>
It really just seems like specific edge cases that we handle badly
<headius>
The logic in CRuby is similar but they slice up these cases differently and I could not find a trivial patch
<enebo[m]>
seems to be the Ruby 3+ way
<enebo[m]>
Things are a bit more complicated than they original appear
<headius>
Headed to a family dinner now so probably can't get back to it until tomorrow or Sunday, but fixing all const_get cases may fix all the issues we are seeing with constants
<headius>
They use constantize all over
<headius>
So much so that a special compile for const_get might be high value
<enebo[m]>
headius: I will look this morning. If it is literally just const_get impl then it may not take a long time
<headius>
Yeah give it a shot
<enebo[m]>
If it also involves other changes to cref and anonymous modules it may be rough
<headius>
I could get one or two cases to work but then broke two others
<enebo[m]>
Meaning it might be more than one thing for all errors
<headius>
Fixing the top level fallback will solve the ActiveModel thing I am pretty certain
<enebo[m]>
I am also fresh since I just got up
<headius>
Which fixes scaffold post
<enebo[m]>
Did you sleep at all on the plane?
<enebo[m]>
One other question is whether we are failing something tagged out in const_get
<enebo[m]>
fails:Module#const_get raises a NameError when the nested constant does not exist on the module but exists in Object
<enebo[m]>
So this must be one behavior
subbu has joined #jruby
<headius>
Got a bit of sleep yeah
<headius>
Yeah that is the one that triggers the scaffold issue
<enebo[m]>
It may also be a 2.6 fail
<headius>
Patch that the way I thought and it breaks three others that should not error
<enebo[m]>
There is this time_helpers.rb travel_to which stubs out Time.now and then at end it travel_back which should restore Time
<enebo[m]>
I am thinking a) the stubbing is not working b) it is raising in such a way Time is not restored
<enebo[m]>
yeah this would make sense it stubs a few objects with aliases and then unstub_all which will basically reset those definitions
<enebo[m]>
but since we have some singleton error it probably is unstubbing 0 or not all of them
<enebo[m]>
although it looks like it is not stubbing properly to begin with
<headius>
Ahh ok that would make sense
<enebo[m]>
This must be something with object.singleton_class not doing something
<enebo[m]>
Time.singleton_class.alias_method somenewname now
<enebo[m]>
jruby -we '3.times do; p Time.object_id; p Time.singleton_class.object_id; p Time.singleton_class.alias_method(:new_now, :now); Time.define_singleton_method(:now) { puts "FFFFFF"; 42 }; p Time.singleton_class.alias_method(:now, :new_now); Time.singleton_class.alias_method :now, :now; p Time.singleton_class.undef_method(:new_now); p ::Time.now; end'
<enebo[m]>
bleh...all this stuff is working
<headius>
I'm crashing here, will be able to get back to this tomorrow or Sunday