Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 8, 2025

Fixes missing test cases for explicit resource management by renaming the test directory to match the updated plugin name.

Background

PR #12874 updated references from the deprecated @babel/plugin-proposal-explicit-resource-management to the newer @babel/plugin-transform-explicit-resource-management package. However, the test directory under tasks/transform_conformance/tests/ was not renamed, causing the test runner to miss 4 test cases.

Issue

The transform conformance test runner iterates through plugins defined in constants.rs and looks for test fixtures in directories matching the plugin names. Since the plugin name was updated to babel-plugin-transform-explicit-resource-management but the directory remained babel-plugin-proposal-explicit-resource-management, the test runner couldn't find the test cases.

This resulted in 4 missing test cases in the oxc.snap file as noted by @Dunqing.

Solution

Renamed the test directory:

tasks/transform_conformance/tests/babel-plugin-proposal-explicit-resource-management/
→ tasks/transform_conformance/tests/babel-plugin-transform-explicit-resource-management/

Verification

After the fix, running the transform conformance tests now correctly discovers and executes all 4 test cases:

  • export-class-name
  • for-of-no-block
  • function-with-scopes-in-params
  • try-catch

The oxc.snap file now shows babel-plugin-transform-explicit-resource-management (2/4) indicating all 4 test cases are found (2 pass, 2 have implementation issues unrelated to this fix).

Closes the follow-up issue identified in #12874.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 8, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copilot AI changed the title [WIP] @oxc-project/oxc/pull/12874 There is a reasonable request change after this PR has been merged. Please create another follow-on PR to solve it. fix: rename babel-plugin-proposal-explicit-resource-management test directory Aug 8, 2025
Copilot AI requested a review from Dunqing August 8, 2025 07:18
Copilot finished work on behalf of Dunqing August 8, 2025 07:18
@Dunqing Dunqing changed the title fix: rename babel-plugin-proposal-explicit-resource-management test directory test(transformer): rename babel-plugin-proposal-explicit-resource-management test directory Aug 9, 2025
@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Aug 9, 2025
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Aug 9, 2025
@Boshen Boshen marked this pull request as ready for review August 9, 2025 09:36
Copy link
Member

Dunqing commented Aug 9, 2025

Merge activity

  • Aug 9, 9:36 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 9, 9:53 AM UTC: Dunqing added this pull request to the Graphite merge queue.

@Boshen Boshen force-pushed the copilot/fix-7ac091b9-503e-4e3e-b3c9-1a37d86412c1 branch from dba2208 to 410f4ac Compare August 9, 2025 09:46
…nagement` test directory (#12894)

Fixes missing test cases for explicit resource management by renaming the test directory to match the updated plugin name.

## Background

PR #12874 updated references from the deprecated `@babel/plugin-proposal-explicit-resource-management` to the newer `@babel/plugin-transform-explicit-resource-management` package. However, the test directory under `tasks/transform_conformance/tests/` was not renamed, causing the test runner to miss 4 test cases.

## Issue

The transform conformance test runner iterates through plugins defined in `constants.rs` and looks for test fixtures in directories matching the plugin names. Since the plugin name was updated to `babel-plugin-transform-explicit-resource-management` but the directory remained `babel-plugin-proposal-explicit-resource-management`, the test runner couldn't find the test cases.

This resulted in 4 missing test cases in the `oxc.snap` file as noted by @Dunqing.

## Solution

Renamed the test directory:
```
tasks/transform_conformance/tests/babel-plugin-proposal-explicit-resource-management/
→ tasks/transform_conformance/tests/babel-plugin-transform-explicit-resource-management/
```

## Verification

After the fix, running the transform conformance tests now correctly discovers and executes all 4 test cases:
- export-class-name
- for-of-no-block
- function-with-scopes-in-params
- try-catch

The `oxc.snap` file now shows `babel-plugin-transform-explicit-resource-management (2/4)` indicating all 4 test cases are found (2 pass, 2 have implementation issues unrelated to this fix).

Closes the follow-up issue identified in #12874.

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for you](https://github.com/oxc-project/oxc/issues/new?title=✨Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
@graphite-app graphite-app bot force-pushed the copilot/fix-7ac091b9-503e-4e3e-b3c9-1a37d86412c1 branch from 410f4ac to ddc0b01 Compare August 9, 2025 09:53
@Boshen Boshen merged commit df68910 into main Aug 9, 2025
21 checks passed
@Boshen Boshen deleted the copilot/fix-7ac091b9-503e-4e3e-b3c9-1a37d86412c1 branch August 9, 2025 09:59
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 9, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-transformer Area - Transformer / Transpiler C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants