Skip to content

refactor(transformer/styled-components): use Atom everywhere#12217

Merged
graphite-app[bot] merged 1 commit intomainfrom
07-11-refactor_transformer_styled-components_use_atom_everywhere
Jul 11, 2025
Merged

refactor(transformer/styled-components): use Atom everywhere#12217
graphite-app[bot] merged 1 commit intomainfrom
07-11-refactor_transformer_styled-components_use_atom_everywhere

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jul 11, 2025

Pure refactor. Instead of using a mix of Atom<'a> and &'a str in different places, use Atom<'a> everywhere for consistency.

Copy link
Member Author

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

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jul 11, 2025
@overlookmotel overlookmotel marked this pull request as ready for review July 11, 2025 11:27
@overlookmotel overlookmotel requested a review from Dunqing as a code owner July 11, 2025 11:27
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 11, 2025

CodSpeed Instrumentation Performance Report

Merging #12217 will not alter performance

Comparing 07-11-refactor_transformer_styled-components_use_atom_everywhere (836bf9d) with 07-11-refactor_transformer_styled-components_store_block_name_in_arena (0c08c37)

Summary

✅ 34 untouched benchmarks

@Dunqing
Copy link
Member

Dunqing commented Jul 11, 2025

block_name is only used in alloc_concat_strs_array, which only accepts &str, so I think storing Atom for block_name is unnecessary?

Copy link
Member

@Dunqing Dunqing left a comment

Choose a reason for hiding this comment

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

Anyway, I am going to merge this.

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Jul 11, 2025

Merge activity

Pure refactor. Instead of using a mix of `Atom<'a>` and `&'a str` in different places, use `Atom<'a>` everywhere for consistency.
@graphite-app graphite-app bot force-pushed the 07-11-refactor_transformer_styled-components_store_block_name_in_arena branch from 8d00718 to 0c08c37 Compare July 11, 2025 15:27
@graphite-app graphite-app bot force-pushed the 07-11-refactor_transformer_styled-components_use_atom_everywhere branch from 8f29673 to 836bf9d Compare July 11, 2025 15:28
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
Base automatically changed from 07-11-refactor_transformer_styled-components_store_block_name_in_arena to main July 11, 2025 15:36
@graphite-app graphite-app bot merged commit 836bf9d into main Jul 11, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 07-11-refactor_transformer_styled-components_use_atom_everywhere branch July 11, 2025 15:37
@overlookmotel
Copy link
Member Author

Atom<'a> is just a no-op wrapper around &'a str, so it makes no difference at all to the compiler - there's zero overhead to using Atom. I just thought in this case it was preferable to use Atom everywhere for consistency, rather than some methods using Atom<'a>, and some using &'a str.

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-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants