You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The commit to allow setting the logger on the context 5c7c87d is a breaking change for anyone implementing the context interface
Not a huge issue to deal with in my case, but something to think about when exposing public interfaces, any change to them becomes a breaking change for others implementing them.
Checklist
Dependencies installed
No typos
Searched existing issues and docs
Expected behavior
interfaces to not change without a major version bump
Actual behavior
interface changed in a patch version bump
The text was updated successfully, but these errors were encountered:
PR #1502 would also introduce a "breaking" change for the context interface.
So that would require to mark this PR as a breaking change and wait for release of Echo v5 (which will probably take a long while).
We decided to not implement the context interface, but rather created our own AppContext that will be cast the context into an AppContext when needed. Actually our reason to do so, was to integrate zerolog, so it pretty much is which this issue is about.
For this change I would suspect it is already to late to roll it back.
I agree, to late to rollback in this case, but what you can and IMHO should do is make new interfaces that also include the base Context. In this case it would be a LoggingContext that just had the method to get/set the logger. In your case it might be a RouteDetailsContext or some such.
If you keep the base Context small and focused to the basic flow needed by echo itself, then it is easy to add additional interfaces for specific methods inside echo that need to change the logger, or fetch the matched route, etc. Then people who do not need to use those methods do not need to implement the interface for their Context.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Issue Description
The commit to allow setting the logger on the context 5c7c87d is a breaking change for anyone implementing the context interface
Not a huge issue to deal with in my case, but something to think about when exposing public interfaces, any change to them becomes a breaking change for others implementing them.
Checklist
Expected behavior
interfaces to not change without a major version bump
Actual behavior
interface changed in a patch version bump
The text was updated successfully, but these errors were encountered: