Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Re-add annotations to test files that use null safety features #27021

Closed
wants to merge 1 commit into from

Conversation

bdero
Copy link
Member

@bdero bdero commented Jun 28, 2021

These annotations were removed in #26828 and #26870. I've been cherry-picking this small diff around as a local workaround.

Minimal portable example of a failing local build against head:

# working directory = out/host_debug_unopt

$ ./dart \
./frontend_server.dart.snapshot \
--sdk-root ./flutter_patched_sdk \
--target flutter \
--enable-experiment=non-nullable \
../../flutter/lib/ui/fixtures/ui_test.dart

result 08d02759-b49b-497b-87c1-2bd2cf64c5b0
../../flutter/lib/ui/fixtures/ui_test.dart:659:9: Error: Null safety features are disabled for this library.
Try removing the package language version or setting the language version to 2.10 or higher.
  Object? arg0,
        ^
...
./dart --version
Dart SDK version: 2.14.0-252.0.dev (dev) (Mon Jun 28 10:51:30 2021 -0700) on "macos_x64"

AFAICT, --enable-experiment=non-nullable doesn't work when the VM is set to a language version < 2.8. And in absence of a pubspec or annotation, I couldn't find a way to force a floor on the language version via arguments to the dart CLI or the frontend script.

@bdero bdero requested a review from dnfield June 28, 2021 23:25
@flutter-dashboard flutter-dashboard bot added the embedder Related to the embedder API label Jun 28, 2021
@google-cla google-cla bot added the cla: yes label Jun 28, 2021
@dnfield
Copy link
Contributor

dnfield commented Jun 28, 2021

@bdero rather than this, can you try patching in #26999 and see if it works for you?

@bdero
Copy link
Member Author

bdero commented Jun 28, 2021

@dnfield Your branch works. :)

@bdero bdero closed this Jun 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes embedder Related to the embedder API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants