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

Upgrade analyzer, analyzer_plugin, source_gen #300

Merged

Conversation

Rexios80
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Dec 20, 2024

@Rexios80 is attempting to deploy a commit to the Invertase Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

docs-page bot commented Dec 20, 2024

To view this pull requests documentation preview, visit the following URL:

docs.page/invertase/dart_custom_lint~300

Documentation is deployed and generated using docs.page.

@@ -7,7 +7,7 @@ environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
analyzer: 6.11.0
analyzer: ^7.0.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

A tight version is mandatory here.
And you need to re-run the generator

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will need to land rrousselGit/freezed#1140 first

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see why a Freezed version is necessary for custom_lint

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because freezed also depends on anaylzer...

@rrousselGit
Copy link
Collaborator

I don't plan to upgrade melos

@rrousselGit
Copy link
Collaborator

And I'm also skeptical that Custom_lint supports analyzer 7.0 without any change :)

@Rexios80
Copy link
Contributor Author

I mostly made this PR to bring awareness to the need to upgrade the analyzer package. Feel free to take over and make any necessary changes.

@rrousselGit
Copy link
Collaborator

I'm aware of it, but analyzer 7 isn't usable by Flutter stable, is it?

@Rexios80
Copy link
Contributor Author

I'm on flutter stable 3.27.1 and analyzer 7 is resolving

@Rexios80
Copy link
Contributor Author

Rexios80 commented Jan 6, 2025

@rrousselGit Due to the circular dependency freezed and custom_lint have on each other, I'm not sure I can take this any further on my own

@rrousselGit
Copy link
Collaborator

Which circular dependency are you referring to?

@Rexios80
Copy link
Contributor Author

Rexios80 commented Jan 6, 2025

I think it's just that the repos have a circular dependency (and thus the actions) and not the packages themselves. One of the freezed examples depends on custom_lint, and one of the custom_lint packages depends on freezed.

@rrousselGit
Copy link
Collaborator

This should be unblocked now

@Rexios80 Rexios80 changed the title Upgrade analyzer, analyzer_plugin, source_gen, and melos Upgrade analyzer, analyzer_plugin, source_gen Jan 7, 2025
@Rexios80 Rexios80 requested a review from rrousselGit January 7, 2025 00:30
@rrousselGit
Copy link
Collaborator

There are some pub get errors. Looks like not all packages were upgraded

@Rexios80
Copy link
Contributor Author

Rexios80 commented Jan 7, 2025

@rrousselGit I'm not sure what the issue is. It looks like maybe the pubspec_overrides.yaml isn't being respected for custom_lint_analyzer_plugin_loader for some reason? The command that is failing works for me locally.

@rrousselGit
Copy link
Collaborator

Yes, the plugin_loader doesn't respect pubspec_overrides (not my fault, that's how Dart handles plugins 🤷)

Also, don't trust that it's working for you locally. The pub cache is not invalidated enough for plugins.

@Rexios80
Copy link
Contributor Author

Rexios80 commented Jan 7, 2025

It looks like the command that's failing is just a regular dart pub get. Is that really affected by the analyzer plugin loader shenanigans? If it is, I'm not sure this is fixable without releasing all the packages.

@rrousselGit
Copy link
Collaborator

Hum.. We probably could exclude the plugin_loader from the melos workspace. That should fix the issue

@Rexios80
Copy link
Contributor Author

Rexios80 commented Jan 7, 2025

@rrousselGit I excluded the plugin loader from the melos workspace which fixed the pub get issue, but now tests are failing

@rrousselGit rrousselGit merged commit 4970682 into invertase:main Jan 8, 2025
4 of 5 checks passed
@rrousselGit
Copy link
Collaborator

Thanks!

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.

2 participants