build: support ruby 3.1 and modern libpulsar#2
Open
gmiklos-ltg wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the gem’s native build and configuration behavior to work with Ruby 3.1 and newer libpulsar releases, including more portable libpulsar discovery and removal of the now-obsolete use_tls toggle.
Changes:
- Refactor both extconf entrypoints to discover libpulsar via
--with-pulsar-*overrides first, then platform defaults, and require C++17. - Remove
use_tlsfrom Ruby configuration flow/specs and from the native bindings API surface. - Add repo-local
miseRuby 3.1.7 patching and expand development documentation for macOS and Ubuntu build verification.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/pulsar/ext/extconf.rb | Fixture extconf: add cross-platform libpulsar discovery and header/library checks. |
| spec/pulsar/client_configuration_spec.rb | Remove assertions tied to deprecated use_tls. |
| README.md | Document TLS behavior change + add mise and Ubuntu/Docker build notes. |
| Rakefile | Add Ruby 3 / old Rake FileUtils keyword-arg shim. |
| patches/ruby-3.1.7-darwin-socket.patch | New patch to enable Ruby 3.1.7 build on current macOS via mise. |
| mise.toml | Pin Ruby 3.1.7 and apply the repo-local patch. |
| lib/pulsar/client_configuration.rb | Remove use_tls population and env/client.conf inference. |
| ext/bindings/extconf.rb | Main extension extconf: cross-platform libpulsar discovery + C++17 default. |
| ext/bindings/client.hpp | Remove use_tls methods; track TLS trust cert path in wrapper state. |
| ext/bindings/client.cpp | Remove use_tls binding and adjust TLS trust cert getter/setter behavior. |
| docs/superpowers/specs/2026-06-19-ubuntu-compile-design.md | New design note for Ubuntu-friendly build discovery. |
| docs/superpowers/plans/2026-06-19-ubuntu-compile-plan.md | New implementation plan documenting the extconf refactor steps. |
| AGENTS.md | New repo guidance for contributors/agents. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4
to
+8
| DEFAULT_PULSAR_DIRS = if RbConfig::CONFIG['host_os'] =~ /darwin/ | ||
| ['/opt/homebrew/opt/libpulsar'] | ||
| else | ||
| ['/usr', '/usr/local'] | ||
| end.freeze |
Comment on lines
+4
to
+8
| DEFAULT_PULSAR_DIRS = if RbConfig::CONFIG['host_os'] =~ /darwin/ | ||
| ['/opt/homebrew/opt/libpulsar'] | ||
| else | ||
| ['/usr', '/usr/local'] | ||
| end.freeze |
Comment on lines
+8
to
+24
| module FileUtilsExt | ||
| def mkdir_p(*args, **kwargs, &block) | ||
| super(*args, **kwargs, &block) | ||
| end | ||
|
|
||
| def chdir(*args, **kwargs, &block) | ||
| super(*args, **kwargs, &block) | ||
| end | ||
|
|
||
| def cp(*args, **kwargs, &block) | ||
| super(*args, **kwargs, &block) | ||
| end | ||
|
|
||
| def install(*args, **kwargs, &block) | ||
| super(*args, **kwargs, &block) | ||
| end | ||
| end |
| ## Setup And Build | ||
|
|
||
| - This gem links against `libpulsar`; local work needs both the runtime library and C++ headers installed before `bundle install` or `rake compile` will succeed. | ||
| - `ext/bindings/extconf.rb` links with `-lpulsar` and forces `-std=c++11`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test Plan