Skip to content

Commit e959e44

Browse files
libretroadminLibretroAdmin
authored andcommitted
tools/settings_migrate_group: permit plain rows with level-variant twins
The entanglement guard predates the level-variant grammar; a plain row whose twin is a level-variant row now migrates first and owns the shared strings and configuration, and the twin references it. The array-target variants remain refused until their grammar lands.
1 parent a5b12f8 commit e959e44

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tools/settings_migrate_group.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,11 @@ def guard_of(text, pat):
258258
for _k, _f, _T, _a in rows:
259259
if _k.endswith('_LV') or not _f:
260260
continue
261-
_vm = re.search(r'SDESC_\w+_ROW_(?:LV|AT|AT_EX)\(\s*%s,' % _f, _ms_scan)
261+
_vm = re.search(r'SDESC_\w+_ROW_(?:AT|AT_EX)\(\s*%s,' % _f, _ms_scan)
262262
assert not _vm, ("field %s is entangled with a variant row" % _f,
263263
_ms_scan[_vm.start():_vm.start()+60] if _vm else '')
264+
if re.search(r'SDESC_\w+_ROW_LV\(\s*%s,' % _f, _ms_scan):
265+
print(' note: %s has a level-variant twin - it will reference this def' % _f)
264266
print("extraction ok: %d settings (%d without sublabel)" % (len(rows), sum(1 for _,_,T,_ in rows if T not in ussub)))
265267

266268
cfg = open('configuration.c').read()

0 commit comments

Comments
 (0)