Skip to content

Conversation

@nickvergessen
Copy link
Member

Summary

Checklist

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen added 3. to review Waiting for reviews feature: caldav Related to CalDAV internals labels Mar 11, 2025
@nickvergessen nickvergessen added this to the Nextcloud 32 milestone Mar 11, 2025
@nickvergessen nickvergessen self-assigned this Mar 11, 2025
@nickvergessen nickvergessen requested review from nfebe, provokateurin and sorbaugh and removed request for a team March 11, 2025 14:57
Copy link
Member

@ChristophWurst ChristophWurst left a 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.

Copy link
Member

@AndyScherzinger AndyScherzinger left a 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.

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Mar 11, 2025
@nickvergessen
Copy link
Member Author

nickvergessen commented Mar 11, 2025

The public/private namespace distinction is there to solve this precise problem.

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.

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.

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.
I will add my commit to the backport only.

🫧 Future

Happy to discuss alternatives, but we need events, they should be "contractual save" at least some of them (seeing many OCA\…\Event\LoadAdditionalScriptsEvent and …\BeforeTemplateRenderedEvent for files, settings, …) and many others are used by other apps. For the future I'd propose that events should have @internal when they are meant to only be internal and this should be limited to "where strictly required", all other events should have proper @since and @deprecated annotations and follow "decent" documentation and deprecation policies. The ecosystem lives from integrations between apps and those need to be possible without a big hassle.

@JonathanTreffler
Copy link

JonathanTreffler commented Mar 12, 2025

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).

@nickvergessen nickvergessen deleted the bugfix/51082/restore-BC branch March 12, 2025 15:16
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish feature: caldav Related to CalDAV internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants