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
Namespace clashes because of generic naming #3
Comments
That’s actually a problem I never imagined having. I guess you’ve got an AR model or something similar called I spent like a week trying to find a short concise gem name for this project as most obvious names are all tied up on rubygems. Sometimes by frustratingly old and unmaintained projects. You are right it’s super generic. But it does make sense. This is all about "events" in your application and logging them either using structured logging (e.g. JSON) or to the terminal in a human readable form. One of my longer term goals is to actually make a web interface to show these events as they happen in real time - so not a sequential set of strings, but more like a real time graph of events happening in your system. I’m not really sure what the solution here is. Let me think about it. No matter what name I choose there is the potential to have this issue. Calling the gem |
By the way, this is also pretty hilarious from the POV that this code started out in the following gems:
I finally found a name that I consider half decent |
Okay, after internal discussion, I think this is going to be the solution:
The only problem with this is that it will make logging really shitty by default, because stdlib logger is shitty by default, but maybe it's unavoidable. At least we can experiment with making it less bad. |
I'm also considering that begin
require 'event/console'
@logger = Event::Console.logger
rescue LoadError
require 'logger'
@logger = Logger.new
end But I'm not sure if that's a good approach or not. |
Yes we have an ActiveRecord Model called Event which wraps a legacy database. With this explanation I would not mind to change our part and we will, but I am afraid other clients could run in to this same problem. I personally would prefer the name async-logger, since it conveys the meaning of the gem and |
(Sorry for this wall of text but I wanted to summarise everything that I've done today for future reference) It's already accepted that Here is what I tried today:
I discussed this issue at length with @bryanp and I think we came to the conclusion that:
I think ultimately while I agree with you in many ways, I have too many conflicting interests. My one overriding interest is that The reason for this is when I used The Rails/AR approach of dumping everything into the global namespace is bound to cause pain and other issues and I'm not sure I can justify a huge complexity w.r.t logging just to work around that. I already spent a lot of time on it today which was taken away from other more important issues. It sounds like the right solution here is to rename it on your end, or even better put it in a module as you suggested. On the other hand, I could just rename the gem to something obscure, but that's not ideal either. Name clash is inevitable due to the design of Ruby. Unfortunately At this point, I see benefits to this discussion, but I'm not sure if the cost of supporting stdlib I wish I could find some better solution. I wish stdlib |
Pinging @wmorgan who seems to be the owner of the |
Can you walk me through what you're asking me to do? I am very far removed from the Ruby world these days. |
@wmorgan any chance of an update? Thanks :) |
Would transferring this to you mean that |
I am happy to maintain the existing release of the code if you provide it to me. There is only one reverse dependency listed: https://rubygems.org/gems/doctor It has a hard dependency on the latest release (v0.5), so it won't break because I'll leave the existing releases alone. Therefore, for that dependency, it won't break anything. If there are private projects that depend on it, I am happy to maintain the current interface, but within the bounds of semantic versioning (so a major version bump might change the interface, for example). But this should already be compatible with how projects use this gem. |
Ok, ownership transferred! |
@wmorgan are you able to provide me the original source code? |
Hm, that will require a little digging. Give me a few days. |
Fine with me
Samuel Williams <notifications@github.com> schrieb am Fr., 29. März 2019,
02:14:
… @wmorgan <https://github.com/wmorgan> Thanks, just keep me in the loop!
@rhino232 <https://github.com/rhino232> I believe we will be able to
address the name clash you mentioned, so I'm going to close this issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAnEzvAqczZTGglCi0rdz_WhN5aQiXP3ks5vbWjpgaJpZM4b_Pfe>
.
|
We tried to use the falcon as our new http-server, but this failed because of a namespace clash.
After debugging it with pry we found out, that the built in logger module Event implemented in event.gem clashes with one of our core abstractions also called event.
Event is a very generic name for a nice improved logger gem.
We have two issues with the naming:
Is there any chance to rename the gem to another more specific name (e.g. event-logger), that implies more meaning and is more specific to the task it fullfills?
The text was updated successfully, but these errors were encountered: