diff --git a/src/rime/config/build_info_plugin.cc b/src/rime/config/build_info_plugin.cc index 238af9f1c..4df1e6581 100644 --- a/src/rime/config/build_info_plugin.cc +++ b/src/rime/config/build_info_plugin.cc @@ -22,11 +22,15 @@ bool BuildInfoPlugin::ReviewLinkOutput( auto timestamps = build_info["timestamps"]; compiler->EnumerateResources([&](an resource) { if (!resource->loaded) { - LOG(WARNING) << "resource '" << resource->resource_id << "' not loaded."; + LOG(INFO) << "resource '" << resource->resource_id << "' not loaded."; + timestamps[resource->resource_id] = 0; return; } auto file_name = resource->data->file_name(); if (file_name.empty()) { + LOG(WARNING) << "resource '" << resource->resource_id + << "' is not persisted."; + timestamps[resource->resource_id] = 0; return; } // TODO: store as 64-bit number to avoid the year 2038 problem diff --git a/src/rime/lever/deployment_tasks.cc b/src/rime/lever/deployment_tasks.cc index d6fbda5ec..56b3a1c9f 100644 --- a/src/rime/lever/deployment_tasks.cc +++ b/src/rime/lever/deployment_tasks.cc @@ -385,14 +385,14 @@ static bool ConfigNeedsUpdate(Config* config) { for (auto entry : *timestamps.AsMap()) { fs::path source_file_path = resolver->ResolvePath(entry.first); if (!fs::exists(source_file_path)) { - LOG(INFO) << "source file not exists: " << source_file_path.string(); + LOG(INFO) << "source file no longer exists: " << source_file_path.string(); return true; } auto value = As(entry.second); int recorded_time = 0; if (!value || !value->GetInt(&recorded_time) || recorded_time != (int) fs::last_write_time(source_file_path)) { - LOG(INFO) << "timestamp mismatch: " << source_file_path.string(); + LOG(INFO) << "source file changed: " << source_file_path.string(); return true; } }