-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Getting null safety errors despite not opting-in #44648
Comments
Can you share your pubspec constraints as well? fyi - @jakemac53 - do we expect build_runner itself to be running null-safe? |
You need to update build_runner to version |
Thanks - do we document that anywhere? |
The changelog for that version documents it... I don't know what we would really document or where? It is a bit of an unfortunate situation to be sure but the build/test packages are heavily broken in many ways by null safety (anything interacting with compilers is). So you definitely need to be on the latest of each in order to work with null safety, or even upgrade to the 2.12 sdk generally. |
Maybe we can cover this on https://dart.dev/null-safety/faq ? |
That's essentially a copy of the internal FAQ. Not sure whether we might want to update that too, or whether this is external only (and if so, how we should handle that). |
This is external only, so advice can be added to the external faq, no change needed to the internal one. Thanks :) (Part of the reason we copied rather than trying to keep the two exactly in line is we knew there would be cases that didn't fit in both). |
I downgrading flutter back to stable yesterday which seemed to fix the issue however this morning I started getting null safety errors again but this time in a flutter project that imports the op package. Errors were saying that named parameters needed a default etc. I updated the Just wanted to point out that having dependencies on a package that doesn't have the necessary version of |
Packages should only have a |
Workaround for: 1.26.0-17.5.pre dev_dependencies:
build_runner: '1.11.1'
dependency_overrides:
analyzer: '0.40.6' |
Is this issue still being looked at? I also receive the same errors using Dart 1.12 and Flutter 2.0.2. Only difference is that list of libraries is smaller:
|
@MatrixDev you are seeing a slightly different issue - it appears that the main wrapper |
I'm trying to use build runner but all of a sudden it's throwing me null safety errors:
Fails with:
I have not opted in for null saftey, I'm aware of it but not ready to start migrating to it. Earlier I moved to flutter beta branch so I could test a project in flutter web, I did not expect this to enable null safety.
I've tried running with the suggested flag in the documentation but I still get the same error:
Flutter doctor output:
The text was updated successfully, but these errors were encountered: