Bug #9456

Include bin/racc with ruby

Added by Zachary Scott about 1 year ago. Updated about 1 year ago.

[ruby-core:60153]
Status:Open
Priority:Normal
Assignee:Minero Aoki
ruby -v:2.2.0dev Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN

Description

As you can see we include executables for Rake, RDoc, ri, ERB, RubyGems, and Irb with Ruby.

We should also include Racc as an executable for Ruby.

This resolves an issue where libraries requiring Racc, and using the binary executable, must install the Racc gem in order to use bin/racc.

I'm fairly sure this change won't cause any issues, so I'd be happy to commit it.

History

#1 Updated by Hiroshi SHIBATA about 1 year ago

Who are maintain it?

#2 Updated by Zachary Scott about 1 year ago

  • Assignee set to Minero Aoki

As Aaron has pointed out, the binary executable is GPL.

So I'm assigning this ticket to Aoki-san as this change depends on possibly re-licensing bin/racc

#3 Updated by Yui NARUSE about 1 year ago

Why gem is not enough?
Are there libraries which need other than ext/racc?

#4 Updated by Zachary Scott about 1 year ago

Why gem is not enough?

For the same reason that the gem is included in stdlib, if we can't include the full functionality of the gem then it shouldn't be inclued in stdlib.

#5 Updated by Zachary Scott about 1 year ago

Are there libraries which need other than ext/racc?

RDoc does, here's the initial discussion that resulted in this ticket.

#6 Updated by David MacMahon about 1 year ago

I think a distinction needs to be made between the racc executable and the racc runtime library. My understanding is that the racc executable (bin/racc) is needed to develop a racc-based parser for a given application. Anyone who wants to use the application that contains the resultant parser needs the racc runtime library, but they don't need the racc executable. Thus, including the racc runtime library in the Ruby standard library is a way to ensure that racc parsers will be usable by anyone with a basic Ruby environment. Those who want to develop racc-based parsers will need the racc executable (and a suitable grammar file) to generate the parser, but those developers are more than capable of obtaining the racc executable (e.g. by installing the racc gem) for their own development environment.

Instead of asking for bin/racc to be included in the standard library, it make more sense (IMHO) to ask whether the racc runtime could be removed from the standard library so as not to favor one parser runtime library over another one. For example, since the racc runtime is included in stdlib, why not also include the treetop runtime (if there is one) or any other "runtime" library in stdlib? Where does line of reasoning end?

On the other hand, why even have a standard library if everything can be installed gems? Where would that line of reasoning end?

My guess is that the racc runtime library has been "grandfathered in" since it has been part of stdlib for so long (since Ruby 1.6?).

Dave

On Jan 27, 2014, at 6:48 PM, e@zzak.io wrote:

Issue #9456 has been updated by Zachary Scott.

Why gem is not enough?

For the same reason that the gem is included in stdlib, if we can't include the full functionality of the gem then it shouldn't be inclued in stdlib.


Bug #9456: Include bin/racc with ruby
https://bugs.ruby-lang.org/issues/9456#change-44648

  • Author: Zachary Scott
  • Status: Open
  • Priority: Normal
  • Assignee: Minero Aoki
  • Category:
  • Target version: current: 2.2.0
  • ruby -v: 2.2.0dev

* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN

As you can see we include executables for Rake, RDoc, ri, ERB, RubyGems, and Irb with Ruby.

We should also include Racc as an executable for Ruby.

This resolves an issue where libraries requiring Racc, and using the binary executable, must install the Racc gem in order to use bin/racc.

I'm fairly sure this change won't cause any issues, so I'd be happy to commit it.

http://bugs.ruby-lang.org/

#7 Updated by Eric Hodel about 1 year ago

RDoc needs a racc runtime to parse the RD (rdtool) documentation in the ruby sources.

Also available in: Atom PDF