Commit c1f7371
committed
fix: fix override path matching in reload hotloading
The issue was that during hot reload operations, override configuration
paths were being incorrectly matched by the getMetaConfigureId function
instead of being handled by getOverrideConfigureId. This caused override
configurations to fail during reload operations.
The fix modifies the regular expression in getMetaConfigureId to exclude
override paths using negative lookahead (?!overrides/). This ensures
that override paths are properly routed to getOverrideConfigureId for
correct processing. Additionally, the getConfigureIdByPath function was
updated to not check for file existence before parsing, as files may not
exist during deletion operations but still need path parsing.
Log: Fixed hot reload functionality for override configuration paths
Influence:
1. Test hot reload functionality with override configurations
2. Verify that override paths are correctly identified and processed
3. Test configuration deletion and reload scenarios
4. Validate both standard and override configuration paths work
correctly
5. Test edge cases with special characters in configuration paths
fix: 修复热加载中覆盖路径匹配问题
问题在于热重载操作期间,覆盖配置路径被 getMetaConfigureId 函数错误匹配,
而不是由 getOverrideConfigureId 处理。这导致覆盖配置在重载操作期间失效。
修复方案修改了 getMetaConfigureId 中的正则表达式,使用负向先
行断言 (?!overrides/) 排除覆盖路径。这确保覆盖路径能正确路由到
getOverrideConfigureId 进行处理。此外,更新了 getConfigureIdByPath 函
数,使其在解析前不检查文件是否存在,因为在删除操作期间文件可能不存在但仍
需要路径解析。
Log: 修复了覆盖配置路径的热重载功能
Influence:
1. 测试覆盖配置的热重载功能
2. 验证覆盖路径是否正确识别和处理
3. 测试配置删除和重载场景
4. 验证标准和覆盖配置路径都能正常工作
5. 测试包含特殊字符的配置路径边界情况1 parent b30cf4c commit c1f7371
2 files changed
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
| 382 | + | |
| 383 | + | |
388 | 384 | | |
389 | 385 | | |
390 | 386 | | |
| |||
0 commit comments