Commit 53ec893e authored by Sven Brauch's avatar Sven Brauch

compute itemrepository version from version plus KDEVELOP_VERSION

This ensures that for each release, we clear the item repository.
In the past, we had various issues related to old caches -- this change
should avold that, since we no longer need to remember to bump the
ITEMREPOSITORY_VERSION variable on each release.

Changing ITEMREPOSITORY_VERSION is still possible to force a clear even
if KDEVELOP_VERSION is untouched.
parent c2f9b5f2
......@@ -2,8 +2,9 @@
# E.g. for KDevelop 5.2.0 => SOVERSION 52 (we only promise ABI compatibility between patch version updates)
set(KDEVPLATFORM_SOVERSION ${KDEVELOP_SOVERSION})
# Increase this to reset incompatible item-repositories
set(KDEV_ITEMREPOSITORY_VERSION 87)
# Increase this to reset incompatible item-repositories.
# Changing KDEVELOP_VERSION automatically resets the itemrepository as well.
set(KDEV_ITEMREPOSITORY_INCREMENT 0)
set(KDevPlatform_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(KDevPlatform_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
......
#ifndef CONFIG_KDEVPLATFORM_H
#define CONFIG_KDEVPLATFORM_H
#define KDEV_ITEMREPOSITORY_VERSION @KDEV_ITEMREPOSITORY_VERSION@
#include "kdevelop_version.h"
#define KDEV_ITEMREPOSITORY_VERSION (KDEVELOP_VERSION_MAJOR << 24) \
+ (KDEVELOP_VERSION_MINOR << 16) \
+ (KDEVELOP_VERSION_PATCH << 8) \
+ @KDEV_ITEMREPOSITORY_INCREMENT@
#endif
......@@ -74,7 +74,7 @@ bool shouldClear(const QString& path)
}
if (!dir.exists(QStringLiteral("version_%1").arg(staticItemRepositoryVersion()))) {
qCWarning(SERIALIZATION) << "version-hint not found, seems to be an old version";
qCWarning(SERIALIZATION) << "version mismatch or no version hint; expected version:" << staticItemRepositoryVersion();
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment