Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename gem to rubyvm-debug_inspector #18

Closed
0x1eef opened this issue Aug 20, 2017 · 10 comments
Closed

rename gem to rubyvm-debug_inspector #18

0x1eef opened this issue Aug 20, 2017 · 10 comments

Comments

@0x1eef
Copy link
Contributor

0x1eef commented Aug 20, 2017

Shouldn't gem name be rubyvm-debug_inspector?

VALUE rb_cRubyVM = rb_const_get(rb_cObject, rb_intern("RubyVM"));
VALUE cDebugInspector = rb_define_class_under(rb_cRubyVM, "DebugInspector", rb_cObject);

And, mv lib/debug_inspector.rb lib/rubyvm/debug_inspector.rb, so:

RubyVM::DebugInspector::VERSION
@0x1eef
Copy link
Contributor Author

0x1eef commented Aug 20, 2017

@0x1eef 0x1eef changed the title gem name rename gem to rubyvm-debug_inspector Aug 20, 2017
@junaruga
Copy link
Collaborator

Regarding: http://guides.rubygems.org/name-your-gem/
Current status is

GEM NAME: debug_inspector, Require statement: require 'debug_inspector', Main class or module: DebugInspector

Is this wrong for the naming rule?
Is it because of below status?

VALUE rb_cRubyVM = rb_const_get(rb_cObject, rb_intern("RubyVM"));
VALUE cDebugInspector = rb_define_class_under(rb_cRubyVM, "DebugInspector", rb_cObject);

Are there any other cases, for below status, and the name is RubyVM::Something?

VALUE rb_cRubyVM = rb_const_get(rb_cObject, rb_intern("RubyVM"));
VALUE cSomething = rb_define_class_under(rb_cRubyVM, "Something", rb_cObject);

@junaruga
Copy link
Collaborator

Ah sorry, you are right. Main class or module is RubyVM::DebugInspector.
Your proposal makes sense to me.

@junaruga
Copy link
Collaborator

I only find one case that the pattern is used as a reference.
https://rubygems.org/gems/rubyvm-frozencore

@banister
Copy link
Owner

I agree it probably makes sense but i think this is water under the bridge at this point, as there's a fair number of gems relying on this one already and it would disrupt things too much. We should just consider the bad name 'historical baggage' :P

@junaruga
Copy link
Collaborator

I agree. Changing the gem name at least now confusing users.

Recently I experienced same kind of situation about renaming gem in another project.
They are trying to change it at major version update. (0.x => 1.0)

Ref: https://github.com/guard/rb-inotify/issues/66

  1. I'd like to propose that we consider renaming the gems. The rb- prefix is pretty ugly, and quite non-standard by modern standards. Some ideas I have include os-, fs-, sys-. Open to suggestions/discussion.
  2. Coordinated 1.0 release. I think there is an opportunity for us to all get to 1.0 at the same time. It's not essential, but it would be nice if we could invest the time to achieve this.

@0x1eef
Copy link
Contributor Author

0x1eef commented Aug 21, 2017

It's not just the gem name (we can keep the gem name), I don't think constants like this
makes sense:

  • DebugInspector
  • DebugInspector::Version
  • RubyVM::DebugInspector

'DebugInspector' exists only to add ::VERSION constant. It's not living in the same namespace as the implementation. This is odd. RubyVM::DebugInspector is where the implementation is, and 'RubyVM::DebugInspector' is what has a VERSION. ::DebugInspector is meaningless, because there's nothing there. How can nothing have a version? By nothing i mean, not even ::DebugInspector.constants has something meaningful related to the implementation. Only a ::VERSION constant. It's not acting as a namespace for the rest of the code, even.

So I think we could modify #19 to keep the gem name "debug_inspector", but
change lib/debug_inspector.rb to just be:

require_relative "rubyvm/debug_inspector"

With RubyVM::DebugInspector (in C), and RubyVM::DebugInspector::VERSION (in Ruby), and no DebugInspector constant.I t's not backwards compatible, but is DebugInspector::VERSION even a feature? And updating to RubyVM::DebugInspector::VERSION isn't hard. Plus current gem is 0.0.3, so you're allowed to break things.

What do you think @banister @junaruga

@0x1eef
Copy link
Contributor Author

0x1eef commented Aug 21, 2017

I only find one case that the pattern is used as a reference.
https://rubygems.org/gems/rubyvm-frozencore

That's better. It makes identifying & finding extensions to the RubyVM easy, but unfortunately debug_inspector isn't part of that.

@banister
Copy link
Owner

@R-obert sounds fine to me! Thanks! 👍

@banister
Copy link
Owner

Closed in favor of the PR. Thanks @R-obert

Repository owner locked and limited conversation to collaborators Aug 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants