Skip to content

Conversation

@segiddins
Copy link
Contributor

@segiddins segiddins commented Jul 31, 2025

Implements wheel-type platforms (whl-{ruby}-{platform}) for binary gem support. Key changes:

  • Add Gem::Platform::Wheel class for wheel platform parsing and matching
  • Add Gem::Platform::Specific class for structured environment representation
  • Implement wheel tag generation with platform compatibility
  • Add Linux-specific platform detection (manylinux/musllinux) with ELF parsing
  • Update platform matching logic to handle wheel vs traditional platform resolution
  • Maintain backwards compatibility with existing platform functionality

See rubygems/rfcs#60 for the RFC

What was the end-user or developer problem that led to this PR?

What is your fix for the problem, implemented in this PR?

Make sure the following tasks are checked

@segiddins segiddins force-pushed the segiddins/gem-platform branch 2 times, most recently from d339a8e to 00ae57c Compare August 20, 2025 19:22
@segiddins segiddins force-pushed the segiddins/gem-platform branch 3 times, most recently from 1c1c67b to 2ae538d Compare August 22, 2025 17:57
Implements wheel-type platforms (whl-{ruby}-{abi}-{platform}) for binary gem support.
Key changes:
- Add Gem::Platform::Wheel class for wheel platform parsing and matching
- Add Gem::Platform::Specific class for structured environment representation  
- Implement comprehensive wheel tag generation with platform compatibility
- Add Linux-specific platform detection (manylinux/musllinux) with ELF parsing
- Update platform matching logic to handle wheel vs traditional platform resolution
- Maintain full backwards compatibility with existing platform functionality

All tests pass with enhanced platform resolution supporting both traditional 
and wheel platform formats for future binary gem distribution.

Add Bundler integration tests for wheel platform support

Add comprehensive tests to validate wheel platform gem building and
resolution in Bundler:

- Test wheel platform gem creation with correct platform naming
- Test fallback to ruby gems when wheel platforms don't match
- Test multi-tag wheel platform handling (currently skipped)
- Test platform resolution priority (currently skipped)  
- Test lockfile wheel platform recording (currently skipped)

Most tests are currently skipped as they require Bundler resolver
updates to handle Gem::Platform::Wheel objects. The working test
demonstrates that wheel platform gems can be built successfully
with full platform names (e.g. wheel_native-1.0.0-whl-rb33-x86_64_linux.gem).
Add comprehensive tests to validate wheel platform gem building and
resolution in Bundler:

- Test wheel platform gem creation with correct platform naming
- Test fallback to ruby gems when wheel platforms don't match
- Test multi-tag wheel platform handling (currently skipped)
- Test platform resolution priority (currently skipped)  
- Test lockfile wheel platform recording (currently skipped)

Most tests are currently skipped as they require Bundler resolver
updates to handle Gem::Platform::Wheel objects. The working test
demonstrates that wheel platform gems can be built successfully
with full platform names (e.g. wheel_native-1.0.0-whl-rb33-x86_64_linux.gem).
Changes wheel platform gems to require RubyGems 3.8.0.dev instead of 4.0.0,
matching the current development version. This allows wheel platform gems
to be properly resolved by the dependency resolver.

Fixes all wheel platform resolver test failures.
@segiddins segiddins force-pushed the segiddins/gem-platform branch from 2ae538d to 0b3a172 Compare August 22, 2025 18:19
@hsbt hsbt closed this Oct 7, 2025
@hsbt hsbt deleted the segiddins/gem-platform branch October 28, 2025 11:45
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.

3 participants