Possible bugs
Hello! I asked the sonnet 5.5 to find bugs. Maybe this is helpful, or not.
1. CLI crash (segfault, exit 139)
Reusing an enum view-model property in a second group crashes the CLI. The first use works; adding a second binding that reads the same enum segfaults on build or capture.
2. EnumToUint converter has no effect
Binding an enum property through EnumToUint into a Rectangle width does nothing. The enum value reads back correctly in --data-dump, but the width never changes.
3. Boolean negate pattern doesn't flip
The documented click-toggle pattern (fromViewModelProperty with read and write contexts plus BooleanNegate) doesn't flip the boolean in a headless run. Writing a literal (BindablePropertyBoolean with direction=true) does work.
4. ListToLength then ToString stays at the placeholder
ListToLength into Formula into a number works (3 items gave width 140). ListToLength into ToString into a text run leaves the text at its placeholder.
5. Stack layout drops later children
layoutTypeValue="stack" with layoutAlignmentType: the first child draws, a second smaller child never appears. Flex and grid on the same content are fine.
6. Trigger fired from a script doesn't reach listeners
A Property<number>:addListener hears another script's write, but a trigger listener never fires when the trigger is fired from a script. Firing it from a state machine works.
7. Docs: ScriptedPathEffect placement
The docs place ScriptedPathEffect inside Shape, which fails with "could not be re-imported". It builds when placed inside the Fill.
8. ImageAsset image:view() samples as zeros
Sampling image:view() from an ImageAsset in a shader returns all zeros. Drawing the image into a context:canvas() and sampling that canvas's image works.
9. First draw is blank in --screenshot when GPU resources are built lazily
--screenshot calls draw once after advancing, so resources created lazily in the first draw give a blank frame. Worth a note in the docs (create in init/resize).
10. Headless pointer clicks don't move focus
--pointer=click doesn't change keyboard focus, while --key=down traversal works. Unsure if this is headless-only.
11. Minor / DX
- Running the CLI on "." builds the whole working tree, and --screenshot=name.png resolves relative to the CLI's working directory rather than the project. Easy to mix up.
- Print arguments are concatenated with no separator.