Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
The i18n gem does not work in AOT mode #4416
$ jruby -v jruby 184.108.40.206 (2.3.1) 2016-11-09 0150a76 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64] $ echo $JRUBY_OPTS -Xcompile.mode=FORCE $ uname -a Darwin Macintosh.local 16.3.0 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64
The i18n gem test suite passes in AOT mode:
$ git clone https://github.com/svenfuchs/i18n.git $ cd i18n $ bundle $ JRUBY_OPTS="-Xcompile.mode=FORCE" bundle exec rake
getting a different failures (same without rake loader being loaded) - most are variations of :
... I do seem to be having issues starting this up with current master (targeted for 9.1.7)
@headius there definitely seems to be a regression when running FORCE compiled on master :
Good news! It seems the fix was simpler than we expected. The problem appears to be that we weren't testing the top-level "container" module when loading scripts with AOT. As a result, any modules or classes they attempted to define would raise that TypeError, because the containing module (into which they would be defined) was null.
My fix is being tested in #4431, but I confirmed it lets both i18n's test suite and one of our own suites both run properly (and all green) with AOT enabled.