Skip to content

Commit 2f57da2

Browse files
committed
Merge pull request #77578 from RedworkDE/invalidate-doccache-on-change
Invalidate the DocCache when updating the XML docs
2 parents d3867e3 + 67e8c57 commit 2f57da2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

editor/editor_builders.py

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def make_doc_header(target, source, env):
3737
g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
3838
g.write("#ifndef _DOC_DATA_RAW_H\n")
3939
g.write("#define _DOC_DATA_RAW_H\n")
40+
g.write('static const char *_doc_data_hash = "' + str(hash(buf)) + '";\n')
4041
g.write("static const int _doc_data_compressed_size = " + str(len(buf)) + ";\n")
4142
g.write("static const int _doc_data_uncompressed_size = " + str(decomp_size) + ";\n")
4243
g.write("static const unsigned char _doc_data_compressed[] = {\n")

editor/editor_help.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2258,7 +2258,7 @@ String EditorHelp::get_cache_full_path() {
22582258
static bool first_attempt = true;
22592259

22602260
static String _compute_doc_version_hash() {
2261-
return uitos(ClassDB::get_api_hash(ClassDB::API_CORE)) + "-" + uitos(ClassDB::get_api_hash(ClassDB::API_EDITOR));
2261+
return vformat("%d/%d/%s", ClassDB::get_api_hash(ClassDB::API_CORE), ClassDB::get_api_hash(ClassDB::API_EDITOR), _doc_data_hash);
22622262
}
22632263

22642264
void EditorHelp::_load_doc_thread(void *p_udata) {

0 commit comments

Comments
 (0)