Skip to content

Commit e1797ae

Browse files
committed
device_extensions and rule_module are read, and were reported as unsupported
同一个解析器往上约四十行就把这两个键读进 `featureDeviceExtensions` 与 `featureRuleModule`,prepare 在消费者激活该 feature 时会读它们 —— 它们正是「新增一门 设备语言不需要引擎发版」的全部依据。它们只是没被加进 `kKnownFeatureKeys`,于是引擎对 一个它刚刚用过的键打印: [features].rules-spirv has unsupported key 'rule_module' (ignored). Supported keys: defines, flags, forward, implies, provides, requires, sources. 比消息错更坏:它在**建议包作者删掉让规则生效的那两行**。 没被发现,是因为规则包平时走的 host-module 路径不打印 schema 警告;而**普通**构建会 打印。当一个规则包开始产出 `tools = [...]` 要的二进制,它的普通构建就成了常态,这条 噪音于是浮到每个用户面前。
1 parent 4f50903 commit e1797ae

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎modules/manifest/src/toml.cppm‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,25 @@ std::expected<Manifest, ManifestError> parse_string(std::string_view content,
837837
static constexpr std::string_view kKnownFeatureKeys[] = {
838838
"defines", "flags", "forward", "implies", "provides",
839839
"requires", "sources",
840+
// THE TWO RULE-PACKAGE KEYS, WHICH THIS PARSER READS ABOUT
841+
// FORTY LINES ABOVE AND THEN REPORTED AS UNSUPPORTED.
842+
//
843+
// `device_extensions` and `rule_module` are parsed into
844+
// `featureDeviceExtensions` and `featureRuleModule`, and
845+
// read by prepare when a consumer activates the feature --
846+
// they are the whole reason a new device language costs no
847+
// engine release. Leaving them off this list made every
848+
// ordinary load of such a package print "unsupported key
849+
// (ignored)" for a key it had just used, which is worse
850+
// than a wrong message: it tells a package author to delete
851+
// the two lines that make their rule work.
852+
//
853+
// It went unnoticed because the host-module path a rule
854+
// package is normally loaded through does not print schema
855+
// warnings. An ORDINARY build of the same package does --
856+
// and `tools = [...]` made ordinary builds of rule packages
857+
// routine.
858+
"device_extensions", "rule_module",
840859
};
841860
for (auto& [fkey, fignored] : fval.as_table()) {
842861
(void)fignored;

0 commit comments

Comments
 (0)