What happened
After the [CI] chore: update flake commit from 2026-05-31 (63bb827), the check-qml CI job fails on any open PR. The formatter outputs an empty file for modules/bar/Bar.qml (and likely other files), causing diff to see the entire file as removed.
Observed via PR #1457, which does not touch Bar.qml at all.
Root cause
Bar.qml (and several other files in the repo) use the inline type assertion syntax introduced in Qt 6:
const loader = repeater.itemAt(i) as WrappedLoader;
Some versions of qmlformat do not parse the as TypeName expression correctly and silently output nothing instead of the formatted file. When the flake was updated today, the pinned Qt/qmlformat version appears to have changed to one that regresses on this syntax.
The CI script exits on the first failure:
for file in (string match -v 'build/*' **.qml)
/usr/lib/qt6/bin/qmlformat $file | diff -u $file - || exit 1
end
modules/bar/Bar.qml comes first alphabetically, so the job stops there.
Possible fixes
- Pin the flake to a Qt version where
qmlformat handles as correctly.
- Upgrade to a Qt version where the regression is fixed.
- Rewrite the affected
as casts to a style that the current qmlformat accepts (if one exists).
- Skip files that use
as casts in the format check until upstream qmlformat support is stable.
Affected files
At minimum modules/bar/Bar.qml. Other files using the same syntax are likely affected too but the CI exits before reaching them.
What happened
After the
[CI] chore: update flakecommit from 2026-05-31 (63bb827), thecheck-qmlCI job fails on any open PR. The formatter outputs an empty file formodules/bar/Bar.qml(and likely other files), causingdiffto see the entire file as removed.Observed via PR #1457, which does not touch
Bar.qmlat all.Root cause
Bar.qml(and several other files in the repo) use the inline type assertion syntax introduced in Qt 6:Some versions of
qmlformatdo not parse theas TypeNameexpression correctly and silently output nothing instead of the formatted file. When the flake was updated today, the pinned Qt/qmlformat version appears to have changed to one that regresses on this syntax.The CI script exits on the first failure:
modules/bar/Bar.qmlcomes first alphabetically, so the job stops there.Possible fixes
qmlformathandlesascorrectly.ascasts to a style that the currentqmlformataccepts (if one exists).ascasts in the format check until upstream qmlformat support is stable.Affected files
At minimum
modules/bar/Bar.qml. Other files using the same syntax are likely affected too but the CI exits before reaching them.