Skip to content

[compiler] Playground qol: shared compilation option directives with tests #32012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

mofeiZ
Copy link
Contributor

@mofeiZ mofeiZ commented Jan 7, 2025

  • Adds @compilationMode(all|infer|syntax|annotation) and @panicMode(none) directives. This is now shared with our test infra
  • Playground still defaults to infer mode while tests default to all mode
  • See added fixture tests

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jan 7, 2025
@mofeiZ mofeiZ changed the title [compiler] Playground qol: shared compilation option directives with tests [compiler] Playground qol: shared directives with tests Jan 7, 2025
Copy link
Member

@josephsavona josephsavona left a comment

Choose a reason for hiding this comment

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

this is great, thank you!

Copy link
Member

@poteto poteto left a comment

Choose a reason for hiding this comment

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

so nice, thanks for going the extra mile to add this! I was actually going to do something similar in my earlier PR but I realized I needed to stop procrastinating on that other thing 💀

@@ -142,7 +160,7 @@ test('reset button works', async ({page}) => {
});

TEST_CASE_INPUTS.forEach((t, idx) =>
test(`playground compiles: ${t.name}`, async ({page}) => {
test.only(`playground compiles: ${t.name}`, async ({page}) => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
test.only(`playground compiles: ${t.name}`, async ({page}) => {
test(`playground compiles: ${t.name}`, async ({page}) => {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the catch!!
I have a bad habit of procrastinating by writing QOL commits, but forgetting to submit them as a PR 🤦‍♀️ This is actually from ~2 weeks ago

@mofeiZ mofeiZ changed the title [compiler] Playground qol: shared directives with tests [compiler] Playground qol: shared compilation option directives with tests Jan 9, 2025
…tests

- Adds @compilationMode(all|infer|syntax|annotation) and @panicMode(none) directives. This is now shared with our test infra
- Playground still defaults to `infer` mode while tests default to `all` mode
- See added fixture tests
@mofeiZ mofeiZ merged commit d16fe4b into main Jan 9, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants