mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-09-17 23:35:22 +03:00
fix(skd-compile): всегда эмитить useRestriction для параметра
Платформа эмитит <useRestriction>true|false</useRestriction> у каждого параметра безусловно. Раньше compile эмитил только если =true, что приводило к LOST <useRestriction>false</useRestriction> в roundtrip. Эффект на sample30: −84 строки diff. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
77fc0cee2f
commit
32e06cbc56
@@ -1,4 +1,4 @@
|
||||
# skd-compile v1.49 — Compile 1C DCS from JSON
|
||||
# skd-compile v1.50 — Compile 1C DCS from JSON
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$DefinitionFile,
|
||||
@@ -1257,10 +1257,11 @@ function Emit-SingleParam {
|
||||
$parsed.useRestriction = $true
|
||||
}
|
||||
|
||||
# UseRestriction
|
||||
if ($parsed.useRestriction -eq $true -or ($p -isnot [string] -and $p.useRestriction -eq $true)) {
|
||||
X "`t`t<useRestriction>true</useRestriction>"
|
||||
}
|
||||
# UseRestriction — платформа всегда эмитит этот тег у параметра (true/false)
|
||||
$urEmit = $false
|
||||
if ($parsed.useRestriction -eq $true) { $urEmit = $true }
|
||||
elseif ($p -isnot [string] -and $p.useRestriction -eq $true) { $urEmit = $true }
|
||||
X ("`t`t<useRestriction>" + $(if ($urEmit) { 'true' } else { 'false' }) + "</useRestriction>")
|
||||
|
||||
# Expression
|
||||
if ($parsed.expression) {
|
||||
|
||||
Reference in New Issue
Block a user