Skip to content

fix: Avoid properties added in dart_style v2.3.7 #652

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

Closed

Conversation

koji-1009
Copy link
Contributor

What does this change?

Removed DartFormatter.latestLanguageVersion and modified it to work with dart_style 2.2.4.

Fixes #651 🎯

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
    • Ensure the tests (melos run test)
    • Ensure the analyzer and formatter pass (melos run format to automatically apply formatting)
  • Appropriate docs were updated (if necessary)

@AlexV525
Copy link
Member

AlexV525 commented Feb 8, 2025

We have two options to solve the problem, as I thought:

  1. Use a dynamic caller that can construct with and without the languageVersion field but bypass the analyzer check at the same time.
  2. Raise the constraint to ^3.

If 1 is inapplicable, then we should go with 2.

@AlexV525
Copy link
Member

AlexV525 commented Feb 8, 2025

And 3: raise the constraint to >=2.3.7.

@AlexV525 AlexV525 mentioned this pull request Feb 8, 2025
1 task
@@ -24,7 +24,7 @@ dependencies:
json_annotation: ^4.4.0
glob: ^2.0.0

dart_style: '>=2.2.4 <4.0.0'
dart_style: '>=2.2.4 <3.0.0'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

AlexV525 added a commit that referenced this pull request Feb 9, 2025
## What does this change?

An alternative of #652.

Fixes #651 🎯

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
@AlexV525
Copy link
Member

AlexV525 commented Feb 9, 2025

I'm closing this as #653 should resolve the issue without removing the field. Thanks for the contribution!

@AlexV525 AlexV525 closed this Feb 9, 2025
Copy link

codecov bot commented Feb 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (778be81) to head (71bffb4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main   #652       +/-   ##
=========================================
- Coverage   97.55%      0   -97.56%     
=========================================
  Files          21      0       -21     
  Lines         819      0      -819     
=========================================
- Hits          799      0      -799     
+ Misses         20      0       -20     

☔ 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: DartFormatter.latestLanguageVersion is supported by dart_style v2.3.7 and above
2 participants