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

Install prettier3 + alpha solidity plugin in parallel #640

Open
wants to merge 1 commit into
base: upgrade-slang-0.19
Choose a base branch
from

Conversation

antico5
Copy link
Collaborator

@antico5 antico5 commented Feb 24, 2025

<This PR is based on top of the 0.19 update branch>

This PR installs 2 combinations of prettier + plugin versions (prettier2 + solidity v1 plugin and prettier3 + solidity v2 beta puglin) in parallel. This has been done creating two separate implementations of PrettyPrinter, and having each one as an individual package with their own dependencies.

The interface of the PrettyPrinter has been unified to the one of v3 (mainly some functions went from sync to async), so every direct and indirect usage of the printer have been updated as well.

All calls to documentFormat are still being handled by prettier 2 + plugin v1, but 1% of the calls also run prettier3+plugin v2 beta, and logging any exception on sentry.

@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Feb 24, 2025
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

Attention: Patch coverage is 47.82609% with 24 lines in your changes missing coverage. Please review.

Project coverage is 53.05%. Comparing base (712e2d1) to head (7446cac).

Files with missing lines Patch % Lines
server/src/utils/prettier3/PrettyPrinter3.ts 20.00% 12 Missing ⚠️
server/src/services/formatting/prettierFormat.ts 41.66% 7 Missing ⚠️
server/src/services/codeactions/onCodeAction.ts 33.33% 2 Missing ⚠️
...er/src/services/formatting/onDocumentFormatting.ts 0.00% 2 Missing ⚠️
...erver/src/services/codeactions/QuickFixResolver.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##           upgrade-slang-0.19     #640      +/-   ##
======================================================
- Coverage               53.16%   53.05%   -0.12%     
======================================================
  Files                     226      227       +1     
  Lines                    5199     5223      +24     
  Branches                  801      803       +2     
======================================================
+ Hits                     2764     2771       +7     
- Misses                   2198     2215      +17     
  Partials                  237      237              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant