Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jul 10, 2025

Remove vec! macro from oxc_allocator. This is in the vec2::raw_vec module, but is accidentally exposed due to the #[macro_export] attribute.

This macro creates a bumpalo::collections::Vec, instead of our own Vec type, which is confusing.

We could add a vec! macro which creates our own Vec type, but that's not completely trivial (how to handle cloning item in vec![item; 3]? Clone or CloneIn?). So for now, just remove this erroneous macro entirely.

Copy link
Member Author

overlookmotel commented Jul 10, 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.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 10, 2025

CodSpeed Instrumentation Performance Report

Merging #12206 will not alter performance

Comparing 07-10-fix_allocator_remove_vec_macro (facd3cd) with 07-10-docs_allocator_extend_doc_comments_for_vec_and_rawvec_ (b3a076b)

Summary

✅ 34 untouched benchmarks

@overlookmotel overlookmotel marked this pull request as ready for review July 10, 2025 19:20
@overlookmotel overlookmotel force-pushed the 07-10-docs_allocator_extend_doc_comments_for_vec_and_rawvec_ branch from 948cdec to 80e6946 Compare July 10, 2025 19:46
@overlookmotel overlookmotel force-pushed the 07-10-fix_allocator_remove_vec_macro branch from 077d2e7 to 64b2d05 Compare July 10, 2025 19:46
@graphite-app graphite-app bot force-pushed the 07-10-docs_allocator_extend_doc_comments_for_vec_and_rawvec_ branch from 80e6946 to c6a8eea Compare July 10, 2025 20:23
@graphite-app graphite-app bot requested a review from Dunqing as a code owner July 10, 2025 20:23
@graphite-app graphite-app bot force-pushed the 07-10-fix_allocator_remove_vec_macro branch from 64b2d05 to 8a4f7c5 Compare July 10, 2025 20:23
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
Copy link
Member

Dunqing commented Jul 11, 2025

Merge activity

Remove `vec!` macro from `oxc_allocator`. This is in the `vec2::raw_vec` module, but is accidentally exposed due to the `#[macro_export]` attribute.

This macro creates a `bumpalo::collections::Vec`, instead of our own `Vec` type, which is confusing.

We could add a `vec!` macro which creates our own `Vec` type, but that's not completely trivial (how to handle cloning `item` in `vec![item; 3]`? `Clone` or `CloneIn`?). So for now, just remove this erroneous macro entirely.
@graphite-app graphite-app bot force-pushed the 07-10-docs_allocator_extend_doc_comments_for_vec_and_rawvec_ branch from c6a8eea to b3a076b Compare July 11, 2025 00:57
@graphite-app graphite-app bot force-pushed the 07-10-fix_allocator_remove_vec_macro branch from 8a4f7c5 to facd3cd Compare July 11, 2025 00:57
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
Base automatically changed from 07-10-docs_allocator_extend_doc_comments_for_vec_and_rawvec_ to main July 11, 2025 01:06
@graphite-app graphite-app bot merged commit facd3cd into main Jul 11, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 07-10-fix_allocator_remove_vec_macro branch July 11, 2025 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants