Deprecate/Remove .protocol files for KIOSlaves
Open, Needs TriagePublic

Description

The JSON based loading of the plugin exists since ~6 years. Maybe KF6 would be a good time to get rid of the old .protocol files?

The only usecase where the JSON metadata is not a drop-in replacement is for protocol files which only provide metadata and not an actual ioslave (like mailto), as discussed in https://invent.kde.org/frameworks/kio/-/merge_requests/362#note_246537

alex created this task.May 26 2021, 8:00 PM

Some stuff still seems to use it, e.g. tags.protocol, to test https://bugs.kde.org/show_bug.cgi?id=435586, I removed the .protocol file and that made the tags kio unreachable.

It there a way to detect code that is still using .protocol files only? (grep for some pattern?)

alex added a comment.May 26 2021, 8:33 PM

Some stuff still seems to use it

That is why deprecating is in the title ;) Removing it during KF5 times would of course not be possible.

It there a way to detect code that is still using .protocol files only? (grep for some pattern?)

Searching for the .protocol files itself should work fine. There is no cmake function to compile the files to JSON like there is with the desktop files.

ahmadsamir added a comment.EditedMay 26 2021, 8:50 PM

Yes, I meant deprecate and port away from it, then remove in KF6.

I am guessing not all of them are needed, so how to tell? I vaguely remember some qCWarning() somewhere...

EDIT: removed list, not all of them are KIO slaves obviously...

OK, that's 37 (out of a total of 49 .protocol files in /usr/share/kservices5/ on my system, there could be more for stuff I don't have installed here):

about.protocol:2:exec=kf5/kio/about
activities.protocol:2:exec=kf5/kio/activities
akonadi.protocol:2:exec=kf5/kio/akonadi
applications.protocol:2:exec=kf5/kio/applications
baloosearch.protocol:2:exec=kf5/kio/baloosearch
bookmarks.protocol:2:exec=kf5/kio/bookmarks
bzip.protocol:2:exec=kf5/kio/filter
bzip2.protocol:2:exec=kf5/kio/filter
desktop.protocol:2:exec=kf5/kio/desktop
filenamesearch.protocol:2:exec=kf5/kio/filenamesearch
fish.protocol:2:exec=kf5/kio/fish
fonts.protocol:2:exec=kio_fonts
gzip.protocol:2:exec=kf5/kio/filter
http_cache_cleaner.desktop:59:Exec=kio_http_cache_cleaner
info.protocol:3:exec=kf5/kio/info
iso.protocol:2:exec=kio_iso
krarc.protocol:2:exec=kio_krarc
ldap.protocol:2:exec=kf5/kio/ldap
ldaps.protocol:2:exec=kf5/kio/ldap
lzma.protocol:2:exec=kf5/kio/filter
man.protocol:2:exec=kf5/kio/man
metainfo.protocol:2:exec=kf5/kio/metainfo
ms-its.protocol:2:exec=kio_msits
mtp.protocol:2:exec=kf5/kio/mtp
network.protocol:79:exec=kf5/kio/network
pop3.protocol:2:exec=kf5/kio/pop3
pop3s.protocol:2:exec=kf5/kio/pop3
programs.protocol:2:exec=kf5/kio/applications
recentdocuments.protocol:3:exec=kf5/kio/recentdocuments
settings.protocol:2:exec=kf5/kio/settings
sftp.protocol:2:exec=kf5/kio/sftp
sieve.protocol:2:exec=kf5/kio/sieve
tags.protocol:2:exec=kf5/kio/tags
thumbnail.protocol:2:exec=kf5/kio/thumbnail
timeline.protocol:2:exec=kf5/kio/timeline
webcal.protocol:2:exec=kio_http
xz.protocol:2:exec=kf5/kio/filter
alex added a comment.EditedMay 27 2021, 6:33 AM

Yes, I meant deprecate and port away from it, then remove in KF6.

Then I will consider this task as a go ahead!

EDIT: removed list, not all of them are KIO slaves obviously...

That confused me at first too, the slaves get installed to the plugin dir. This means that the KPluginLoader will try to load their metadata but recejt those because they contain no JSON.

alex claimed this task.May 27 2021, 6:50 AM
In T14518#256818, @alex wrote:

Yes, I meant deprecate and port away from it, then remove in KF6.

Then I will consider this task as a go ahead!

Please also wait for input from others :))

alex renamed this task from Consider deprecating .protocol files for KIOSlaves to Deprecate/Remove .protocol files for KIOSlaves.May 28 2021, 7:55 PM
alex updated the task description. (Show Details)
alex moved this task from Backlog to Waiting on KF6 Branching on the KF6 board.Jun 5 2021, 8:58 PM