-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix(caldav): Restore old private events and deprecate them #51398
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
Conversation
Signed-off-by: Joas Schilling <coding@schilljs.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree that events are defacto public API. This slows down internal changes, because you never know if something is used by an app.
The public/private namespace distinction is there to solve this precise problem.
It's the same dilemma as calling every OCS API a public API. This leads to nobody building a proper public API, and implicitly causing breaking changes when internal OCS APIs change.
IMHO this is not the right way to move forward as a platform.
I'm okay with restoring the previous events for stable31.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine either way, but definitely needs to ensure we do not break v31, so 32 I could live with while I also don't see an issue in dropping with v33 or v34. It would be deprecated evens with a 31 change, so we can communicate it and drop it, no fixes on old API, hence no maintenance and folks can move over to the new one.
Let me know if you need a decision.
This option does not exist for apps. We can not merge every interface and event that should be "public" from Talk or all 300+ other apps into the server repo.
Talk has one of the biggest APIs and basically all of it (apart from HPB sign-up admin only feature) is OCS and documented with openapi and follows the default retention period. It's doable at least. We also don't need to over play it here. In this case here it's a simple event (or well 6), we can avoid breaking things by keeping 6 files a tad longer. It's a drop-in replacement with a name change, so should also be fine to require changing it earlier, not 3 years needed. But on a patch version is meh, as apps would need to subscribe to both events etc. 🫧 FutureHappy to discuss alternatives, but we need events, they should be "contractual save" at least some of them (seeing many |
|
To actually solve the bigger issue behind this I would advocate for the addition of a public namespace for apps so basically OCAP and OCA with the same meaning of OC and OCP. I am not entirely sure how this would work on a technical level, as the classloader would of course have to be adjusted (maybe a public directory in the lib folder 🤷 ). An alternative would of course be to have an #[internal] or similar class attribute as @nickvergessen proposed, but I would go further than just events. I think there are many legitimate cases for calling another apps service class for example. I call OCA APIs in my apps all the time (and I will not apologize 😆) (often between multiple apps by me, so I myself can keep the interfaces stable which helps, but most apps don't change their interfaces often anyways), even though it is not technically public, because that is the only sane way apps can cooperate and extend each other currently (the only alternative would often be to query and change other apps databases, sooooo no thank you, OCA it is). |
Summary
Checklist