-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Another backwards compatibility break propagating through projects: rename logrus_syslog package to syslog - PROPOSAL #620
Comments
Oh- and of course I propose immediately reverting #587 before it's propagated into peoples workspaces as they update and really cause a mess. These changes can take a while to emerge as we saw with the last rename so the earlier you revert the less impact in the long run. |
I think this is a legit concern, @dmathieu what was the motivation for the change? |
Hi @cstockton, thank you for taking the time to write this up. As one of the maintainers of logrus and the one reviewing the change you refer to, I'd like to add my thoughts on this. Before getting into details, I'd like to repeat that I'm thankful for your input but would also ask you for a constructive discussion. I understand that you're angry about having to change import paths again though. In general, we should all stick to the convention that binaries vendor their dependencies (and/or contain requirement files that are managed by a go package manager like dep). In my experience, logrus isn't the only library that changes its exported types and packages. Nevertheless, I understand that vendoring imposes other challenges. In order to keep change possible at all, I'm currently 👍 for your suggestion to freeze the current API in master and start working in branches that then are referred to using gopkg.in. I will definitely take some time to discuss this with @dmathieu and @sirupsen in the next few days. One thing that I don't understand is how you ended up in the situation of your error message though. Could you please elaborate on that? Regarding your question @sirupsen: I'm pretty sure that @dmathieu wanted to get rid of the old issue #108 and followed the suggestion in there. |
Not sure what about my post isn't constructive or what implies I'm angry. As stated I'm surprised to be running into more logrus issues, nothing more or less.
I understand the position and agree that they should, simple fact is that they don't. Many applications, libraries, tools exist that were written long before dep, and predate vendoring as well. I could go on but I don't think the importance of backwards compatibility really needs justified in the Go ecosystem. I'm not sure about other libraries changing exported identifiers, I've never experienced this myself but would be willing to read through comments from an issue for an exported identifier that changed that has a dependency graph as massive as what logrus has.
They define a Gopkg.toml, recently yes. But my docker containers that existed long before dep predate this, as well as many projects I've made in the past. I haven't even adopted dep yet and will wait as long as possible to do so, my first experience with dep was having it rm -rf my vendor folder which at least led to golang/dep#552. Even if I loved dep (I don't) and was excited for any opportunity to upgrade things to it as time goes on this becomes an impossible task. It's why backwards compatibility (go1promise) and such exist for highly depended upon libraries (like logrus), so developers don't have to randomly stop all work to upgrade a stable and completed project, subjecting it to test cycles, ci/cd, code review, all the noise along with it. |
Would the logrus team accept a pull request for this or will the change remain? |
I don't think reverting the package name change is a good idea. We'll get other people saying they're relying on the latest version and it breaks again. The true issue here is that we're unable to do anything on logrus except basic maintenance due to the impossibility of doing any breaking changes. This is the true thing we need to fix. |
@dmathieu I very strongly disagree.
For every person that complains it was broken and fixed again, there will be much more that report it was broken months from now. If you leave it broken you make sure every single person who has it in their dependency tree is affected. If you revert it the people who have been affected by the change are limited to those who upgraded earliest. We have already seen how these sort of issues take time to cascade through your packages dependency graph, the pain for the users is multiplied by the fact that the longer it takes for them to be impacted the further away the dependency is from their project and more difficult it can be to resolve.
The main issue is making backwards incompatible changes on a library which has a massive dependency graph. There are options that could be exercised here that don't involve breaking every users project for nomenclature purity. The value of this change measured against the expense of breaking every single dependency seems impossible to justify from me personally. Hopefully the fact this subpackage is less used will cause less trouble for users down the road. While I strongly disagree with the Logrus maintainers that it is okay to simply break dependencies without strong justification, I accept it and thank you for at least hearing me out. |
Let me rephrase. I, and the other maintainers of logrus ( @seiffert and @sirupsen ) are entirely aware that breaking backward compatibility is entirely shitty. At this point though, properly working on improving the project will require a version 2.0 which will bring backward-incompatible changes. But we're stuck with it, as we can't bring them to master (they'd be pulled by everybody), and we can't really create a 2-0 branch, as no PRs would be based against it. Basically, we're at a state where we either bring backward-incompatible changes, or the project slowly dies by not being updatable. |
@dmathieu If you understand it's undesirable and I've yet to see justification for the change I don't understand why you don't want to revert it? I don't agree that you're options are limited here or that there is the slightest hint of contention while quantifying them. This is what I would do:
All users with the flexibility to immediately change logrus to a newer version to enjoy the improvements can do so early. Without forcing another year of pain as backwards incompatible changes cascade through the dependency graph of projects for users who are not positioned to upgrade immediately. I think Aliases show the importance of API compatibility and how when you have such a large dependency graph at that scale and velocity breaking changes are no longer an option. Logrus is at a much larger disadvantage then Google was even, since in logrus you replace velocity with disparity and remove the ability to update every dependency of a packages change. My last two cents for @sirupsen I don't want to beat a dead horse or anything just really want to avoid what I see as a pretty awesome project come under anymore heat like the rename. Not when there are other perfectly reasonable options. -Chris |
How will moving logrus to another organization not be another case of casegate? |
@sirupsen To clarify by "use the logrus org" I mean specifically to use it for future development while freezing the API for this repository. I don't know what options github has around keeping issues, stars and so on so I don't have an opinion about the semantics of the move. Only detail I think is important is that the repositories are separate and the current repository remains in tact. Under this clarification we can see that changing cases gave people one option, stop what they are doing and make changes to their code. While creating a repository in a new organization for a v2.0 logrus and keeping the existing logrus at sirupsen/logrus with stricter compatibility solves all the major pain points:
|
Another pull request .. #108 about nomenclature.. and #587 renames logrus_syslog .. breaking all packages that use it.
I really am surprised that after the last fiasco with renaming this repo that I am dealing with yet another rename today. This time breaking all dependencies using the "syslog" package in exchange for the following value- justified by @dmathieu:
Yes- people can include it with any name they wish. So the people who are bothered by the name can use "logrus". I have no idea how you can justify breaking dependencies to remove an underscore....?
Anyways- this leads me into a proposal for @sirupsen, that is to FREEZE this API for master and please stop breaking projects that depend on this library. It is wildly popular, with that comes the responsibility to be stable. Incompatible API changes should be weighed very heavily and well thought out. "Just vendor" isn't an option, the ship has sailed and logrus predates some of the best practices that have emerged in the Go community. I believe it needs the stability to the standard libary.
A new import path and version could be made for a "cleaned" up version- I suggested some time ago in #451 (comment) for a logrus organization for this purpose, or something like gopkg.in. I think it would be beneficial to all library consumers though to find some form of resolution for stability in logrus.
The text was updated successfully, but these errors were encountered: