Enforce JRuby as the supported ruby for running Warbler itself
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Ambito
- build-system
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Ruby
- Stelle
- 901
- Fork
- 206
- Merge medio
- 1g 10h
- PR unite (30g)
- 3
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di jruby/warbler
-
Difficoltà 4/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
-
Support Java module systemAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Tutte le issue di jruby/warbler
Issue simili
-
Concept round-trip: serialized "id" parses as #id, #uuid then lazily derives a different UUIDAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
glossarist/glossarist-ruby#247 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
🐛 bug 🧑💼 conseillers
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
betagouv/conseillers-entreprises#4768 ·
I maintainer di solito rispondono entro 1 giorno
-
`github-events` aborts the repository scan when a closed pull's API payload has a null `head`Forse già presa @renyamamoto2026-cmyk l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
zerocracy/judges-action#2823 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno