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: use camino for paths #4797

Merged
merged 9 commits into from
Dec 27, 2024
Merged

refactor: use camino for paths #4797

merged 9 commits into from
Dec 27, 2024

Conversation

ematipico
Copy link
Member

Summary

This PR removes the use of Path and PathBuf from the majority of the code base, mostly where it counts (Workspace, CLI and LSP), and uses camino UTF-8 paths.

I did some research and other Rust-based compilers have made this choice, and the team agreed that this should be a very safe choice.

Test Plan

Existing tests should pass

@github-actions github-actions bot added A-CLI Area: CLI A-Core Area: core A-Project Area: project A-Linter Area: linter A-Parser Area: parser A-Formatter Area: formatter A-Tooling Area: internal tools A-LSP Area: language server protocol L-JavaScript Language: JavaScript and super languages L-CSS Language: CSS L-JSON Language: JSON and super languages A-Diagnostic Area: diagnostocis L-HTML Language: HTML L-Grit Language: GritQL labels Dec 26, 2024
Copy link

codspeed-hq bot commented Dec 26, 2024

CodSpeed Performance Report

Merging #4797 will not alter performance

Comparing refactor/use-camino (1f7a756) with next (93d1e23)

Summary

✅ 97 untouched benchmarks

@ematipico
Copy link
Member Author

ematipico commented Dec 27, 2024

In this PR I also changed how BiomePath is serialized and de-serialized. Before, we were forced to pass file kind and the was_written flag. This is incorrect because it's an implementation detail:

  • was_written is set internally, and serializers shouldn't set it
  • file_kind is set automatically when the type is created

This simplifies the APIs

@ematipico ematipico merged commit 3704321 into next Dec 27, 2024
13 checks passed
@ematipico ematipico deleted the refactor/use-camino branch December 27, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI A-Core Area: core A-Diagnostic Area: diagnostocis A-Formatter Area: formatter A-Linter Area: linter A-LSP Area: language server protocol A-Parser Area: parser A-Project Area: project A-Tooling Area: internal tools L-CSS Language: CSS L-Grit Language: GritQL L-HTML Language: HTML L-JavaScript Language: JavaScript and super languages L-JSON Language: JSON and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants