feat(meta-compile): голые метатипы-категории реквизита → TypeSet (v1.30)

Остаток Attribute>TypeSet после v1.21. Голый метатип без имени объекта
(CatalogRef/DocumentRef/EnumRef/9 *Ref + AnyRef/AnyIBRef) означает «любой
объект категории» и в XML — <v8:TypeSet>cfg:X</v8:TypeSet>, а компилятор писал
<v8:Type>X</v8:Type> (fallback: регексы TypeSet/ref ждали ".имя", голое имя
проваливалось). Напр. реквизит типа «любой документ» (DocumentRef) или
«любая ссылка» (AnyRef) разворачивался в конкретный Type.

Фикс: ветка голых метатипов перед concrete-ref match (ps1+py). Декомпилятор
уже отдавал голое имя (Strip-NsPrefix у TypeSet) → не менялся (v0.20).
В составном типе — каждый через "+": "DocumentRef + CatalogRef".

Корпус (частота голых TypeSet): DocumentRef 25, AnyIBRef 17, AnyRef 13,
ExchangePlanRef 10, CatalogRef 9, … Роундтрип 120: match 95→96, TOTAL
158→138 (−20), Attribute>TypeSet=0, новых diff нет. Регресс 46/46 ps1+py,
ps1↔py identical. spec §3.2, кейс catalog-attr-typeset-linkbytype
(+AnyRef/AnyIBRef/композит DocumentRef+CatalogRef).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-07-04 14:57:43 +03:00
parent 1212cbd9ed
commit 562f4617bc
5 changed files with 147 additions and 6 deletions
@@ -9,7 +9,10 @@
"linkByType": { "dataPath": "Свойство", "linkItem": 1 } },
{ "name": "ЗначениеОпредТип", "type": "DefinedType.Сумма" },
{ "name": "СвязьСтрокой", "type": "Characteristic.ВидыСубконто",
"linkByType": "Свойство" }
"linkByType": "Свойство" },
{ "name": "ЛюбаяСсылка", "type": "AnyRef" },
{ "name": "ЛюбаяСсылкаИБ", "type": "AnyIBRef" },
{ "name": "Основание", "type": "DocumentRef + CatalogRef" }
]
},
"validatePath": "Catalogs/ТестХарактеристик",
@@ -253,6 +253,127 @@
<DataHistory>Use</DataHistory>
</Properties>
</Attribute>
<Attribute uuid="UUID-016">
<Properties>
<Name>ЛюбаяСсылка</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Любая ссылка</v8:content>
</v8:item>
</Synonym>
<Comment/>
<Type>
<v8:TypeSet>cfg:AnyRef</v8:TypeSet>
</Type>
<PasswordMode>false</PasswordMode>
<Format/>
<EditFormat/>
<ToolTip/>
<MarkNegatives>false</MarkNegatives>
<Mask/>
<MultiLine>false</MultiLine>
<ExtendedEdit>false</ExtendedEdit>
<MinValue xsi:nil="true"/>
<MaxValue xsi:nil="true"/>
<FillFromFillingValue>false</FillFromFillingValue>
<FillValue xsi:nil="true"/>
<FillChecking>DontCheck</FillChecking>
<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
<ChoiceParameterLinks/>
<ChoiceParameters/>
<QuickChoice>Auto</QuickChoice>
<CreateOnInput>Auto</CreateOnInput>
<ChoiceForm/>
<LinkByType/>
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
<Use>ForItem</Use>
<Indexing>DontIndex</Indexing>
<FullTextSearch>Use</FullTextSearch>
<DataHistory>Use</DataHistory>
</Properties>
</Attribute>
<Attribute uuid="UUID-017">
<Properties>
<Name>ЛюбаяСсылкаИБ</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Любая ссылка иб</v8:content>
</v8:item>
</Synonym>
<Comment/>
<Type>
<v8:TypeSet>cfg:AnyIBRef</v8:TypeSet>
</Type>
<PasswordMode>false</PasswordMode>
<Format/>
<EditFormat/>
<ToolTip/>
<MarkNegatives>false</MarkNegatives>
<Mask/>
<MultiLine>false</MultiLine>
<ExtendedEdit>false</ExtendedEdit>
<MinValue xsi:nil="true"/>
<MaxValue xsi:nil="true"/>
<FillFromFillingValue>false</FillFromFillingValue>
<FillValue xsi:nil="true"/>
<FillChecking>DontCheck</FillChecking>
<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
<ChoiceParameterLinks/>
<ChoiceParameters/>
<QuickChoice>Auto</QuickChoice>
<CreateOnInput>Auto</CreateOnInput>
<ChoiceForm/>
<LinkByType/>
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
<Use>ForItem</Use>
<Indexing>DontIndex</Indexing>
<FullTextSearch>Use</FullTextSearch>
<DataHistory>Use</DataHistory>
</Properties>
</Attribute>
<Attribute uuid="UUID-018">
<Properties>
<Name>Основание</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Основание</v8:content>
</v8:item>
</Synonym>
<Comment/>
<Type>
<v8:TypeSet>cfg:DocumentRef</v8:TypeSet>
<v8:TypeSet>cfg:CatalogRef</v8:TypeSet>
</Type>
<PasswordMode>false</PasswordMode>
<Format/>
<EditFormat/>
<ToolTip/>
<MarkNegatives>false</MarkNegatives>
<Mask/>
<MultiLine>false</MultiLine>
<ExtendedEdit>false</ExtendedEdit>
<MinValue xsi:nil="true"/>
<MaxValue xsi:nil="true"/>
<FillFromFillingValue>false</FillFromFillingValue>
<FillValue xsi:nil="true"/>
<FillChecking>DontCheck</FillChecking>
<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
<ChoiceParameterLinks/>
<ChoiceParameters/>
<QuickChoice>Auto</QuickChoice>
<CreateOnInput>Auto</CreateOnInput>
<ChoiceForm/>
<LinkByType/>
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
<Use>ForItem</Use>
<Indexing>DontIndex</Indexing>
<FullTextSearch>Use</FullTextSearch>
<DataHistory>Use</DataHistory>
</Properties>
</Attribute>
</ChildObjects>
</Catalog>
</MetaDataObject>