Shebang mode fails on JRuby due to bash script launcher
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 42/100
Piste de recherche
Commencez par test/test_racc_command.rb, en particulier Racc::TestRaccCommand#test_executable_parser, et reproduisez l’échec sur JRuby. Suivez la manière dont les scripts de parser en shebang-mode sont générés et comparez le comportement des shebangs non-env et env ; le travail est terminé lorsque le test du parser exécutable réussit sur les configurations JRuby concernées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Yacc
- Étoiles
- 569
- Forks
- 95
- Merge moyen
- 12 h 11 min
- PR mergées (30 j)
- 1
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ruby/racc
-
`unused variable` warning is reported when grammer definition includes `*` qualifierPeut-être pris @ydah l’a pris il y a 259 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
-
Split/fork off racc-compilerOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
Toutes les issues de ruby/racc
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
evilmartians/lefthook#1588 ·
Les mainteneurs répondent en général sous 1 jour
-
agent:triaged bug bughunt pm:npm priority:p1
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
SocketDev/socket-patch#1127 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
-
bug needs triage
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour