From 67e8c57f0371d952a5d6623e2fbfb1400e05b84f Mon Sep 17 00:00:00 2001 From: RedworkDE <10944644+RedworkDE@users.noreply.github.com> Date: Sun, 28 May 2023 16:52:46 +0200 Subject: [PATCH] Invalidate the DocCache when updating the xml docs --- editor/editor_builders.py | 1 + editor/editor_help.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/editor_builders.py b/editor/editor_builders.py index 2a4f79548ff..ce6abeb07ae 100644 --- a/editor/editor_builders.py +++ b/editor/editor_builders.py @@ -37,6 +37,7 @@ def make_doc_header(target, source, env): g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") g.write("#ifndef _DOC_DATA_RAW_H\n") g.write("#define _DOC_DATA_RAW_H\n") + g.write('static const char *_doc_data_hash = "' + str(hash(buf)) + '";\n') g.write("static const int _doc_data_compressed_size = " + str(len(buf)) + ";\n") g.write("static const int _doc_data_uncompressed_size = " + str(decomp_size) + ";\n") g.write("static const unsigned char _doc_data_compressed[] = {\n") diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 2b8cace2f11..17aa763983f 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -2258,7 +2258,7 @@ String EditorHelp::get_cache_full_path() { static bool first_attempt = true; static String _compute_doc_version_hash() { - return uitos(ClassDB::get_api_hash(ClassDB::API_CORE)) + "-" + uitos(ClassDB::get_api_hash(ClassDB::API_EDITOR)); + return vformat("%d/%d/%s", ClassDB::get_api_hash(ClassDB::API_CORE), ClassDB::get_api_hash(ClassDB::API_EDITOR), _doc_data_hash); } void EditorHelp::_load_doc_thread(void *p_udata) {