Upgrade to prepare for Dart 3; use working uris when available #310
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR deletes the legacy tests (they contain non-null-safe code and cannot be executed in the future). The PR also adjusts the SDK bounds in order to prepare for Dart 3.
The update revealed that one test, 'test_reflectable/test/new_instance_native_test.dart', performed a reflective invocation of the list constructor named
List
, which is no longer supported. The test was adjusted to call another constructor ofList
.Finally, this PR changes the computation of the
uri
of aLibraryMirror
such that it uses apackage
URI whenever possible. This should be helpful in the situation where there is a need to find the actual source code, as requested in #305.The change in the result returned by the
uri
getter may seem like a breaking change, but it is hardly breaking in practice because the result returned previously was essentially meaningless (using the schemereflectable
which is not used anywhere else, and consisting mostly of a number which reflected the numbering of libraries being loaded by the analyzer during code generation).The new behavior is tested in the updated version of 'reflect_type_test.dart'.