Skip to content
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

Add Ruby 3.4 to the cross compile list #573

Merged
merged 3 commits into from
Dec 30, 2024

Conversation

andyundso
Copy link
Member

This required an update of rake-compiler-dock, as well as an update of minitest (since Ruby 3.4 no longer ships mutex_m, which our old version of minitest was using).

Currently pipelines fail because Ruby 3.4 is not yet available on Windows. But I saw that the CI on Linux still uses RC1 of Ruby 3.4.

Also upgrade rake-compiler-dock and fix the version used for precompiling 3.3.0 to 3.3.5 (see https://github.com/rake-compiler/rake-compiler-dock/releases/tag/v1.6.0).
A recent release of minitest removed the dependency on `mutex_m`. `mutex_m` is no longer part of the standard library with Ruby 3.4.
@@ -7,7 +7,7 @@ require_relative './ext/tiny_tds/extconsts'

SPEC = Gem::Specification.load(File.expand_path('../tiny_tds.gemspec', __FILE__))

ruby_cc_ucrt_versions = "3.3.0:3.2.0:3.1.0".freeze
ruby_cc_ucrt_versions = "3.4.0:3.3.5:3.2.0:3.1.0".freeze
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since 3.3.0 became 3.3.5, do we also want to update to 3.1.6 & 3.2.6?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to 3.3.5 comes from the v1.6.0 release notes of rake-compiler-dock:
https://github.com/rake-compiler/rake-compiler-dock/releases/tag/v1.6.0

looking at how nokogiri configured their cross-compilation list, it appears to not be necessary to update any other version:
https://github.com/sparklemotion/nokogiri/blob/dadec3409556be85aecf9eff3857b883cacbe563/.cross_rubies

tiny_tds.gemspec Outdated Show resolved Hide resolved
@@ -24,8 +24,8 @@ Gem::Specification.new do |s|
s.add_development_dependency 'mini_portile2', '~> 2.5.0'
s.add_development_dependency 'rake', '~> 13.0.0'
s.add_development_dependency 'rake-compiler', '~> 1.2'
s.add_development_dependency 'rake-compiler-dock', '~> 1.4.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What changed here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • v1.5: Support for compiling gems against musl (Alpine's "glibc" library)
  • v1.6: Base images are now based on Ubuntu, therefore some libraries were upgraded.
  • v1.7: Support for compiling gems against Ruby 3.4

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release notes here say the minimum glibc version was incremented; does that mean our minimum version of linux/glibc is also bumped for our linux releases? or is that just for the build system for windows?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is just for the build system on Windows.

@andyundso
Copy link
Member Author

I see there are a bunch of compile warnings for the Ruby 3.4 jobs (e.g. here). Will merge this PR and look at those tomorrow before releasing a new version. Just want to avoid that the installation process of tiny_tds becomes noisy.

@andyundso andyundso merged commit f5cd106 into rails-sqlserver:master Dec 30, 2024
75 checks passed
@andyundso
Copy link
Member Author

I now implemented this whole TypedData stuff as part of my refactoring branch:
f7ce481

In our current code structure, GET_RESULT_WRAPPER is in the header file for result.c, and I did not find out how I would properly setup this rb_data_type_t constant within the header file including the references to the free and mark function. But tiny_tds works fine with Ruby v3.4, so I think there is no urgency for now to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants