Skip to content

Rename to annotate_rb #187

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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Conversation

sethherr
Copy link

@sethherr sethherr commented Feb 6, 2025

I don't understand why you have named this inconsistently - it's surprising and confusing.

Some things use annotaterb - like the gem name and the .annotaterb.yml file - but everything else uses annotate_rb

This PR switches everything to be annotate_rb - making it simpler and using the Ruby naming convention.

I realize this would be a big change, if you accept it! But it seems like a worthwhile adjustment to make.

It makes it so annotaterb.yml files are still found, for backward compatibility. But, everyone using the gem will have to update the name.

An alternative option that would still achieve consistency would be renaming everything to annotaterb (i.e. Annotaterb). I explored that in #196 but it creates too many changes and seems like a worse solution.

Regardless - thanks for creating this gem!

@galori
Copy link
Contributor

galori commented Feb 11, 2025

👍

@drwl
Copy link
Owner

drwl commented Feb 17, 2025

Hi @sethherr thanks for submitting this PR. It does seem like with more adoption of this gem, that people are running into issues with the name annotaterb not following conventions. So I apologize for any annoyances and headaches. I definitely had my share, for example, when working on the Rails generator for this gem.

I think you caught on to it, but I wanted to have the gem name be annotaterb but in code Annotaterb looks strange.

Would you mind sharing where you're running into issues due to naming? It would help inform me on making a decision here.

@sethherr
Copy link
Author

sethherr commented Feb 17, 2025

For instance, when I wrote the PR to annotate_models to link to this gem, I initially used the incorrect form.

IMG_9852

Without going and looking at the code (or re-reading my comment), I can’t tell you which one the correct form is for what. If I was adding this to a new project, I wouldn’t remember which commands go which way off the top of my head.

I have too many things on my mind to be able to remember which is which. Or I’m too dumb and lazy. Or this is additional, unnecessary cognitive load. Take your pick!

@sethherr
Copy link
Author

sethherr commented Feb 24, 2025

Forcing everyone to rename the gem seems very inconvenient! I closed this and submitted a PR for the switch in the other direction (renaming everything annotaterb).

... but that PR made it clear that renaming in that direction would change every file (because the main directory needs to be renamed) and keeping it backward compatible would mean maintaining two code paths (which would be a bummer).

Changing the name in this direction seems like a better solution, so I'm reopening this PR.

@sethherr sethherr closed this Feb 24, 2025
@sethherr sethherr mentioned this pull request Feb 24, 2025
@sethherr sethherr reopened this Feb 24, 2025
@sethherr
Copy link
Author

It does seem like with more adoption of this gem, that people are running into issues with the name annotaterb not following conventions.

@drwl why do you want this gem to be named annotaterb instead of annotate_rb?

Not following naming conventions generates friction for everyone using the gem. Sometimes it's worth adding friction, but I don't understand what is gained in this instance. If you explained the advantages of having this gem named in a surprising way, maybe it would help me get over my frustration.

@drwl
Copy link
Owner

drwl commented Mar 31, 2025

@sethherr I've been putting off addressing this because this is new territory for me. I didn't expect the naming of a gem to get such a response.

I've taken long breaks between maintaining this, mostly due to work and lack of motivation, so I will need some time to re-familiarize myself with all the issues related to naming.

@sethherr
Copy link
Author

sethherr commented Apr 1, 2025

@drwl would you like to meet up or get on a call? I feel like chatting could help resolve this.

@sethherr sethherr force-pushed the rename-annotate_rb branch from ac1bfa4 to 2efeca0 Compare June 2, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants