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

InconsistentAnalysisException when building project #213

Closed
maxime-aubry opened this issue Jul 2, 2020 · 9 comments
Closed

InconsistentAnalysisException when building project #213

maxime-aubry opened this issue Jul 2, 2020 · 9 comments

Comments

@maxime-aubry
Copy link

maxime-aubry commented Jul 2, 2020

Hello.

I try to build my project https://github.com/maxime-aubry/EasyValidation/tree/feature/20190924_AddNewValidators
I got an InconsistentAnalysisException error.
I upgraded the lasts versions of Flutter and Dart as told is another issue of Reflectable repo, but this exception still appears.
Could you help me please ?

This is the command line I used :

flutter packages pub run build_runner build
@eernstg
Copy link
Collaborator

eernstg commented Jul 2, 2020

This would be the issue that is reported as dart-lang/build#2634, and it has not yet been resolved. The issue does not arise when build.yaml builds a single target, so a workaround would be to do that.

@maxime-aubry
Copy link
Author

Thanks a lot :)

@evelant
Copy link

evelant commented Aug 12, 2020

Also running into this, quite confusing as someone new to dart! It looks based on the closure of dart-lang/build#2634 that some fix is indeed needed in this repo?

edit: a little script to clean up and work around this when it happens for now

#!/usr/bin/env bash

#workaround for https://github.com/google/reflectable.dart/issues/213
find ./ -type f -name "*.g.dart" -delete
flutter clean
flutter pub get
flutter packages pub run build_runner build --delete-conflicting-outputs

@eernstg
Copy link
Collaborator

eernstg commented Aug 13, 2020

closure of dart-lang/build#2634

Right, the workaround was new to me. The time is scarce, but I'll try to use that workaround when possible.

@maxime-aubry
Copy link
Author

Hello.
are there improvements about this bug ?
thanks.

@eernstg
Copy link
Collaborator

eernstg commented Sep 7, 2020

Not yet. I've allocated some time to look into it on Friday, that should at least reveal whether the workaround works in this case.

@eernstg
Copy link
Collaborator

eernstg commented Sep 11, 2020

#220 up for review. Eliminates the InconsistentAnalysisExceptions in the cases where it was known to occur.

@eernstg
Copy link
Collaborator

eernstg commented Sep 11, 2020

@maxime-aubry, are you getting an InconsistentAnalysisException in a situation where you are generating code with reflectable for more than one entry point (that is: more than one library containing a main function which is the root of the set of libraries that will run as a single program)? If so then this is likely a duplicate of #198.

@eernstg
Copy link
Collaborator

eernstg commented Sep 29, 2020

Resolved by #220.

@eernstg eernstg closed this as completed Sep 29, 2020
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

No branches or pull requests

3 participants