Use ECMGenerateExportHeader to manage deprecated API better
ClosedPublic

Authored by kossebau on Sep 9 2019, 4:20 PM.

Details

Summary

Allows

  • projects linking to KService to hide deprecated API up to a given version or silence deprecation warnings before a given version, using
    • -DKSERVICE_DISABLE_DEPRECATED_BEFORE_AND_AT
    • -DKSERVICE_DEPRECATED_WARNINGS_SINCE
    • -DKSERVICE_NO_DEPRECATED_WARNINGS
    • -DKSERVICE_NO_DEPRECATED or
    • -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT
    • -DKF_DEPRECATED_WARNINGS_SINCE
    • -DKF_NO_DEPRECATED_WARNINGS
    • -DKF_NO_DEPRECATED
  • to build KService optionally with deprecated API excluded from the build, using "EXCLUDE_DEPRECATED_BEFORE_AND_AT" cmake argument.
Test Plan

Builds with EXCLUDE_DEPRECATED_BEFORE_AND_AT set to 0, 5.0.0, CURRENT and
all the versions where deprecations were done.

Diff Detail

Repository
R309 KService
Branch
useECMGenerateExportHeader
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17579
Build 17597: arc lint + arc unit
kossebau created this revision.Sep 9 2019, 4:20 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 9 2019, 4:20 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
kossebau requested review of this revision.Sep 9 2019, 4:20 PM
kossebau edited the test plan for this revision. (Show Details)Sep 9 2019, 4:24 PM
kossebau updated this revision to Diff 67222.Oct 2 2019, 8:30 PM
kossebau edited the test plan for this revision. (Show Details)
  • update to latest version of ecm_generate_export_header with deprecation text support
kossebau retitled this revision from RFC: Use ECMGenerateExportHeader to manage deprecated API better to Use ECMGenerateExportHeader to manage deprecated API better.
kossebau added reviewers: Frameworks, dfaure.
kossebau updated this revision to Diff 67655.Oct 10 2019, 9:04 PM

tests no longer need to unset KSERVICE_DEPRECATED

If no-one objects, would be pushing on Monday evening, Oct. 14th.

kossebau updated this revision to Diff 67731.Oct 11 2019, 5:26 PM
  • disable KF group deprecation macros for now
  • set DEPRECATED_BASE_VERSION=0, to not disable any API by default
mlaurent accepted this revision.Oct 12 2019, 7:02 AM
This revision is now accepted and ready to land.Oct 12 2019, 7:02 AM
dfaure added inline comments.Oct 12 2019, 8:26 PM
src/kdeinit/ktoolinvocation.h
152

No #if for this one?

kossebau marked an inline comment as done.Oct 12 2019, 8:52 PM
kossebau added inline comments.
src/kdeinit/ktoolinvocation.h
152

I cannot remember this was left out on purpose, so far assume I was just confused by the existing if/endif spanning multiple methods, and missing out this one was not covered.
Updating to add an #if as well as also for its implementation.

kossebau updated this revision to Diff 67803.Oct 12 2019, 8:53 PM
kossebau marked an inline comment as done.

add missing #if/#endif for KToolInvocation::invokeBrowser

dfaure accepted this revision.Oct 12 2019, 9:11 PM
This revision was automatically updated to reflect the committed changes.