Skip to content

[refactor] move include_package into Java#6661

Merged
kares merged 5 commits intojruby:masterfrom
kares:java-include
May 24, 2021
Merged

[refactor] move include_package into Java#6661
kares merged 5 commits intojruby:masterfrom
kares:java-include

Conversation

@kares
Copy link
Member

@kares kares commented Apr 22, 2021

also java_import was moved to not have these in 2 places (could ditch the whole JI module.rb ext file)

the motivation for the move is to have predictable include_package behavior e.g. on Java linking errors.
previously w include_package, all NameError where rescued and loop continued attempting to load a class with the next package -> effectively creating a weird set of errors where the real cause is unknown e.g. cheald/manticore#87

the changes here make sure only ClassNotFoundException is a valid error to continue the loop, alll other NameError instances (e.g. caused by LinkageError) will be raised promptly.

@kares kares marked this pull request as ready for review April 23, 2021 08:34
@kares kares force-pushed the java-include branch 2 times, most recently from 378a3dc to cc21824 Compare April 23, 2021 10:15
kares added 2 commits April 23, 2021 19:21
mostly following up with the `java_import` part
since a failure with (Integer) const re-assignment
has potential consequences for the whole suite
@kares kares added this to the JRuby 9.3.0.0 milestone Apr 23, 2021
@headius
Copy link
Member

headius commented May 17, 2021

This looks good to me. Remove the commented-out load of module.rb when you decide you are done with it.

@headius
Copy link
Member

headius commented May 20, 2021

WIndows failure is #6678, disregard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants