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

Mentions of Repository class resolve to the wrong Repository class #59

Open
jar398 opened this issue Mar 16, 2020 · 3 comments
Open

Mentions of Repository class resolve to the wrong Repository class #59

jar398 opened this issue Mar 16, 2020 · 3 comments

Comments

@jar398
Copy link
Contributor

jar398 commented Mar 16, 2020

There is a Repository class under models/ (I'll call it A) and another Repository under publishing/ (call it B). Mentions of Repository in fast.rb and slurb.rb used to resolve correctly to A, but on my instance I just had those same mentions resolve to B, causing the operation (publishing i think) to fail. This might be due to the recent ruby upgrade, I don't know.

My fix was to rename class A, but perhaps there is a way to force those mentions to resolve to A without changing the name of the class.

@jar398 jar398 changed the title Uses of Repository class resolve to the wrong Repository class Mentions of Repository class resolve to the wrong Repository class Mar 16, 2020
@JRice
Copy link
Member

JRice commented Mar 19, 2020

You can force names in Ruby, by using notation like SuperClass::SubClass, or, if there is no SuperClass, the really ugly ::Class.

That said, I generally prefer to rename classes to avoid collisions. :\

@jar398
Copy link
Contributor Author

jar398 commented Mar 23, 2020

The thing that's blocking me from preparing a PR to fix this is the challenge of choosing a new name. (Preferably for the one in models/ , since changing its name requires far fewer edits to other files.) RepositoryHandle, sort of, although that's sort of lame.

@JRice
Copy link
Member

JRice commented Mar 24, 2020

Naming things is hard.

ContentServerConnection is verbose, but most descriptive. It's not used often, why don't we just use that?

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

No branches or pull requests

2 participants