Enforce JRuby as the supported ruby for running Warbler itself
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Lĩnh vực
- build-system
Hướng nghiên cứu
Start in lib/warbler/jar.rb, at the JRUBY_VERSION reference in find_single_gem_files (around line 221) and the symlink handling (around line 313), then find the ZipSupport versus warbler_jar.jar fallback. The gemspec's platform setting is the other entry point. Before changing anything, get a maintainer decision on whether to fail fast or only warn, since the issue leaves that open. Done means the chosen enforcement exists, the MRI guards are gone, the README documents JRuby-only use, and the spec suite still passes under JRuby.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Warbler currently implicitly half-supports being run under CRuby to package archives: the gem installs anywhere (platform = Gem::Platform::RUBY), and the packaging engine falls back from warbler_jar.jar to pure-Ruby rubyzip when JRUBY_VERSION is not defined. This was never made an explicit contract (see #324) and should be tightened to JRuby-only, because packaging
under CRuby is quietly broken by design:
- Wrong-platform gem resolution: Bundler/RubyGems resolve gems for the building ruby. Under CRuby that means
ruby-platform gems (e.g. native extension nokogiri/psych instead of their-javavariants) get packed into an archive that will only ever run on JRuby - assembling fine at build time and failing at boot. - Latent crashes: e.g.
Warbler::Jar#find_single_gem_filesreferences bareJRUBY_VERSION(jar.rb:221) in the default-gem branch -NameErroron CRuby. - JRuby-only features: the
compiledfeature shells out tojrubyc; symlink handling is JRuby-only (jar.rb:313). - Zero coverage: the spec suite only runs under JRuby; MRI behaviour is whatever has not rotted since someone last tried it.
Proposed
- Fail fast (or at minimum warn loudly) when
RUBY_ENGINE != 'jruby', pointing at JRuby as the supported build ruby - Document JRuby-only usage in the README
- Remove the now-unreachable MRI accommodations: the rubyzip fallback path (
ZipSupportvswarbler_jar.jarconditional),defined?(JRUBY_VERSION)guards, and the MRI symlink warning - Consider
spec.platform = 'java'for the gem itself so installation is the enforcement point
Refs #324: the request to properly support MRI packaging - this issue resolves that question in the opposite direction, which the wrong-platform gem resolution problem makes the only sound one.
Refs #408: warning or preventing JRuby version skew - an even worse problem likely to generate jars/wars broken on a given JRuby version.
Summarised with Claude assistance.
- Ngôn ngữ chính
- Ruby
- Star
- 901
- Fork
- 206
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jruby/warbler
-
Độ khó 4/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
-
Support Java module systemĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Tất cả issue của jruby/warbler
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/aws-sdk-ruby#3460 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ossf/best-practices-badge#3081 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
we-promise/sure#4355 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
NatLabRockies/OpenStudio-HPXML#2284 ·