Skip to content

Add support for jruby 10 #353

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,15 @@ axes:
display_name: OS
values:
- id: debian
display_name: "Debian 11"
run_on: debian11-small
display_name: "Debian 12"
run_on: debian12-small
variables:
MACHINE: "debian11"
MACHINE: "debian12"
- id: "ubuntu2404"
display_name: "Ubuntu 24.04"
run_on: ubuntu2404-small
variables:
MACHINE: "ubuntu2204"
- id: "ubuntu2204"
display_name: "Ubuntu 22.04"
run_on: ubuntu2204-small
Expand All @@ -267,11 +272,11 @@ axes:
- id: "special-os"
display_name: OS
values:
- id: "ubuntu2204-arm64"
display_name: "Ubuntu 22.04 ARM64"
run_on: ubuntu2204-arm64-small
- id: "ubuntu2404-arm64"
display_name: "Ubuntu 24.04 ARM64"
run_on: ubuntu2404-arm64-small
variables:
MACHINE: ubuntu2204-arm64
MACHINE: ubuntu2404-arm64

- id: ruby
display_name: Ruby Version
Expand All @@ -296,6 +301,10 @@ axes:
display_name: ruby-2.7
variables:
RVM_RUBY: ruby-2.7
- id: jruby-10.0
display_name: jruby-10.0
variables:
RVM_RUBY: jruby-10.0
- id: jruby-9.4
display_name: jruby-9.4
variables:
Expand Down Expand Up @@ -390,13 +399,13 @@ buildvariants:
- name: "test"

- matrix_name: "special-os"
matrix_spec: { ruby: ["ruby-3.2", "ruby-3.1", "jruby-9.4"], special-os: '*' }
matrix_spec: { ruby: ["ruby-3.2", "ruby-3.1"], special-os: '*' }
display_name: "${ruby}, ${special-os}"
tasks:
- name: "test"

- matrix_name: "jruby"
matrix_spec: { ruby: ["jruby-9.4", "jruby-9.3"], all-os: ubuntu2204 }
matrix_spec: { ruby: ["jruby-10.0", "jruby-9.4", "jruby-9.3"], all-os: ubuntu2204 }
display_name: "${ruby}, ${all-os}"
tasks:
- name: "test"
Expand Down
19 changes: 12 additions & 7 deletions .evergreen/config/axes.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ axes:
display_name: OS
values:
- id: debian
display_name: "Debian 11"
run_on: debian11-small
display_name: "Debian 12"
run_on: debian12-small
variables:
MACHINE: "debian11"
MACHINE: "debian12"
- id: "ubuntu2404"
display_name: "Ubuntu 24.04"
run_on: ubuntu2404-small
variables:
MACHINE: "ubuntu2204"
- id: "ubuntu2204"
display_name: "Ubuntu 22.04"
run_on: ubuntu2204-small
Expand All @@ -21,11 +26,11 @@ axes:
- id: "special-os"
display_name: OS
values:
- id: "ubuntu2204-arm64"
display_name: "Ubuntu 22.04 ARM64"
run_on: ubuntu2204-arm64-small
- id: "ubuntu2404-arm64"
display_name: "Ubuntu 24.04 ARM64"
run_on: ubuntu2404-arm64-small
variables:
MACHINE: ubuntu2204-arm64
MACHINE: ubuntu2404-arm64

- id: ruby
display_name: Ruby Version
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/config/variants.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ buildvariants:
- name: "test"

- matrix_name: "special-os"
matrix_spec: { ruby: <%= recent_rubies %>, special-os: '*' }
matrix_spec: { ruby: <%= recent_rubies - %w[ jruby-10.0 ] %>, special-os: '*' }
display_name: "${ruby}, ${special-os}"
tasks:
- name: "test"
Expand Down
5 changes: 5 additions & 0 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ set_env_ruby

install_deps

# TODO: move this to shared/shlib/set_env.sh
export JAVA_HOME="/opt/java/jdk21"
export SOURCE_VERSION=21
export TARGET_VERSION=21
# END TODO
echo "Running specs"
bundle exec rake spec
test_status=$?
Expand Down
6 changes: 3 additions & 3 deletions .evergreen/update-evergreen-configs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module ConfigProcessor

# these are used for testing against a few recent ruby versions
def recent_rubies
@recent_rubies ||= %w[ ruby-3.2 ruby-3.1 jruby-9.4 ]
@recent_rubies ||= %w[ ruby-3.2 ruby-3.1 jruby-10.0 ]
end

# the most recently released, stable version of Ruby (make sure this
Expand All @@ -96,7 +96,7 @@ module ConfigProcessor

# as above, but including the most recent JRuby release
def sample_rubies
@sample_rubies ||= sample_mri_rubies + %w[ jruby-9.4 ]
@sample_rubies ||= sample_mri_rubies + %w[ jruby-10.0 ]
end

# older Ruby versions provided by 10gen/mongo-ruby-toolchain
Expand All @@ -106,7 +106,7 @@ module ConfigProcessor

# all supported JRuby versions provided by 10gen/mongo-ruby-toolchain
def jrubies
@jrubies ||= %w[ jruby-9.4 jruby-9.3 ]
@jrubies ||= %w[ jruby-10.0 jruby-9.4 jruby-9.3 ]
end

# all supported MRI ruby versions
Expand Down
2 changes: 1 addition & 1 deletion src/main/org/bson_ruby/NativeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class NativeService implements BasicLibraryService {
* @since 2.0.0
*/
public boolean basicLoad(final Ruby runtime) throws IOException {
RubyModule bson = runtime.fastGetModule(BSON);
RubyModule bson = runtime.getModule(BSON);
GeneratorExtension.extend(bson);

RubyClass byteBuffer = bson.defineClassUnder("ByteBuffer", runtime.getObject(), new ObjectAllocator() {
Expand Down