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

Support the null-safe glob package #1400

Closed
nex3 opened this issue Dec 7, 2020 · 6 comments · Fixed by #1401
Closed

Support the null-safe glob package #1400

nex3 opened this issue Dec 7, 2020 · 6 comments · Fixed by #1401
Assignees

Comments

@nex3
Copy link
Member

nex3 commented Dec 7, 2020

test_core currently depends on glob ^1.0.0, which doesn't support null-safety. This means that a package that uses both test and glob can't upgrade both to null-safe versions at once. Please release a new version that supports the latest glob (and any other null-safe dependency versions that have since been released).

@jakemac53
Copy link
Contributor

Blocked on dart-lang/sdk#44429

@jakemac53
Copy link
Contributor

Actually, I can confidently say the package works so I will go ahead and update the constraint even though we can't resolve for it right now (we are using the latest version of glob internally and in the sdk). You will still be blocked on analyzer though.

@nex3
Copy link
Member Author

nex3 commented Dec 8, 2020

What's the plan going forward for the analyzer? The migration guide suggests that tests should be run in sound null-safety mode, but as I understand it that's not possible if test imports a null-unsafe analyzer. On the other hand, this comment suggests that analyzer won't be null-safe until the end of March at the earliest. Is the expectation that most users won't migrate to null safety in the short term?

@jakemac53
Copy link
Contributor

analyzer is not imported by user code in the test package - it is only used by the test runner. So you can write sound null safe tests today and run them, just the test runner won't be running in sound mode until analyzer is migrated.

@nex3
Copy link
Member Author

nex3 commented Dec 8, 2020

Ah, got it. Are dart test and pub run test smart enough to know to invoke the test runner in unsound mode without an extra flag?

@jakemac53
Copy link
Contributor

Ah, got it. Are dart test and pub run test smart enough to know to invoke the test runner in unsound mode without an extra flag?

Yes, this works just like all the normal defaults. So since the entrypoint (bin/test.dart) is opted out it runs in unsound mode.

The test package does the same for your tests, it will run them in a mode determined by the language version of the test being ran.

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 a pull request may close this issue.

2 participants