Skip to content

Commit

Permalink
Merge pull request #77578 from RedworkDE/invalidate-doccache-on-change
Browse files Browse the repository at this point in the history
Invalidate the DocCache when updating the XML docs
  • Loading branch information
akien-mga committed May 29, 2023
2 parents d3867e3 + 67e8c57 commit 2f57da2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions editor/editor_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion editor/editor_help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2f57da2

Please sign in to comment.