Shebang mode fails on JRuby due to bash script launcher
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Inizia da test/test_racc_command.rb, in particolare da Racc::TestRaccCommand#test_executable_parser, e riproduci il malfunzionamento su JRuby. Traccia il modo in cui vengono generati gli script del parser in shebang-mode e confronta il comportamento degli shebang non-env e env; il lavoro è completato quando il test del parser eseguibile passa sulle configurazioni JRuby interessate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The "shebang" mode for the parser generator does not work properly on some configurations of JRuby due to the jruby command being a bash script.
This leads to the following error in CI (see #93):
Failure:
Racc::TestRaccCommand#test_executable_parser [/Users/headius/projects/racc/test/test_racc_command.rb:57]:
Expected false to be truthy.
In many installs of JRuby, including the default tarball you can download from https://jruby.org, the jruby command is actually implemented using a bash script. Due to stupidity in the design of shebangs on most *nix systems, this means that the jruby script cannot be used directly in the shebang line of a Ruby script, because bash will attempt to execute both the jruby command and the target script with bash.
This is the reason that RubyGems with binscripts are usually installed using so-called "env shebangs" on JRuby, like so:
#!/usr/bin/env jruby
It is possible to install the jruby-launcher gem which will install a native jruby binary that works with the non-env shebang. This may be an option to get the test to pass, but it may be better to use an env shebang when generating the parser script.
- Lingua principale
- Yacc
- Stelle
- 569
- Fork
- 94
- Merge medio
- 12h 11m
- PR unite (30g)
- 1
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 ruby/racc
-
`unused variable` warning is reported when grammer definition includes `*` qualifierForse già presa @ydah l’ha presa 257 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
-
Split/fork off racc-compilerAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
danjdewhurst/story-skills#537 ·
I maintainer di solito rispondono entro 1 giorno
-
[Request]: zbarAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
ScoopInstaller/Extras#18939 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
CommandCodeAI/command-code#992 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
gugod/App-perlbrew#879 ·
-
fix(mcp): avoid Unicode credential masking panics in profile_showForse già presa @joshrotenberg l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 4 giorni