Skip to content
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

refactor(biome_deserialize): use enumflags2 #3529

Merged
merged 5 commits into from
Jul 27, 2024
Merged

Conversation

RiESAEX
Copy link
Contributor

@RiESAEX RiESAEX commented Jul 26, 2024

Summary

Part of #3157

Test Plan

The current CI should pass

@github-actions github-actions bot added the A-CLI Area: CLI label Jul 26, 2024
Copy link

codspeed-hq bot commented Jul 26, 2024

CodSpeed Performance Report

Merging #3529 will improve performances by 6.45%

Comparing RiESAEX:enum (1376a32) with main (5ff6e11)

Summary

⚡ 1 improvements
✅ 103 untouched benchmarks

Benchmarks breakdown

Benchmark main RiESAEX:enum Change
dojo_11880045762646467684.js[cached] 8.5 ms 8 ms +6.45%

@ematipico ematipico requested a review from Conaclos July 26, 2024 18:44
Copy link
Member

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!
It looks good to me. I suggested some change to improve the code.

I noticed the care of reducing breaking change as much as possible.
I wonder if we could use more consistent naming: DeserializableType instead of Types and DeserializableTypes instead of VisitableType.
We could still avoid most breaking changes by using a type alias:

#[deprecated(since="0.7.0", note="please use `DeserializableType` instead")]
pub type VisitableType = DeserializableTypes;

We should also update bione_deserialize_macros if we change the type name.

crates/biome_deserialize/src/diagnostics.rs Outdated Show resolved Hide resolved
crates/biome_deserialize/src/diagnostics.rs Outdated Show resolved Hide resolved
crates/biome_cli/src/execute/migrate/eslint_eslint.rs Outdated Show resolved Hide resolved
crates/biome_deserialize/src/diagnostics.rs Outdated Show resolved Hide resolved
crates/biome_deserialize/src/diagnostics.rs Outdated Show resolved Hide resolved
crates/biome_deserialize/src/diagnostics.rs Outdated Show resolved Hide resolved
@Conaclos
Copy link
Member

Also, let us know that you are working on #3157, I was going to assign it to me ^^

@github-actions github-actions bot added A-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Jul 27, 2024
@RiESAEX
Copy link
Contributor Author

RiESAEX commented Jul 27, 2024

Thank you for your guidance!
It's just a whim, So it's all yours : )

@ematipico
Copy link
Member

Thank you for your guidance!
It's just a whim, So it's all yours : )

Hey @RiESAEX, thank you for your contribution! I think what @Conaclos meant was to write a comment on the issue to avoid duplicate work!

You're free to continue the work if you want, you should just leave a comment saying where.

If you wish to play more, the biome_js_parser is a good area, however there the usage of bitflags is heavy, so my suggestion is to port one bitflag at the time :)

@Conaclos
Copy link
Member

@RiESAEX

Hey @RiESAEX, thank you for your contribution! I think what @Conaclos meant was to write a comment on the issue to avoid duplicate work!

👆 Yes, It is just a comment for the future :) If you want to address the issue, it is all yours :)

@Conaclos
Copy link
Member

Once everything is green on the CI, we will merge the PR :)

@ematipico ematipico merged commit 9aea758 into biomejs:main Jul 27, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI A-Linter Area: linter A-Project Area: project L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants