Skip to content

Conversation

@Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Jun 27, 2025

Closes #36456

@Skn0tt Skn0tt requested a review from dgozman June 27, 2025 08:22
@Skn0tt Skn0tt self-assigned this Jun 27, 2025
convertSeq(fragment, yamlDoc.contents as yamlTypes.YAMLSeq);
if (errors.length)
return { errors, fragment: emptyFragment };
if (fragment.children?.length === 1)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of deleting, doing && !fragment.containerMode would also solve the issue. But my understanding is that this line is just a tiny optimisation anyway, so I removed the complexity instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out it's not a tiny optimisation! It has an impact on whether we match the element itself or its parent, as is evidenced by the failing tests debug-controller.spec.ts:286 cli-codegen-aria.spec.ts:76 trace-viewer.spec.ts:1189. I turned it into the other thing.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

Test results for "tests 1"

4 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104:3 › should work with strict CSP policy @firefox-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node22-1
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

46467 passed, 931 skipped
✔️✔️✔️

Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: children: deep-equal is sometimes ignored when at the top level

2 participants