Closed bwilkerson closed 11 months ago
@dcharkes @simolus3 @MaryaBelanger
Three FFI related diagnostics now have documentation with example and fix code that produce unexpected diagnostics. Validation of the three has been disabled in ``, so they should be re-enabled as part of fixing this issue.
@bwilkerson disabled in what?
CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT (36, 3) The name 'Int' isn't a type, so it can't be used as a type argument.
Are these validated against the mock sdk? In that case we need to add Int
as AbiSpecificInteger
there.
disabled in what?
Sorry, I got interrupted and forgot that I hadn't finished.
They're disabled in analyzer/test/verify_diagnostics_test.dart
. Or soon will be; the CL is out for review. I assumed I could get that CL landed and the bots green faster than fixing the code in the documentation.
Are these validated against the mock sdk?
Yes.
Adding that class will be part of the fix. The code also declared non-nullable variables and fields that aren't initialized, and that's also a problem. It was less clear to me what the initializers should look like.
@simolus3 Can you take a look at fixing this?
The mock SDK can be found in pkg/analyzer/lib/src/test_utilities/mock_sdk.dart. Please copy over the definition of Int
there.
@bwilkerson which bots must we run on the CI to verify that we've got everything green?
I see these were red before your fix:
https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/analyzer-mac-release/25489/overview https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/analyzer-win-release/25290/overview
If I'm remembering correctly, both of them were catching this error, so you ought to be able to run either one of them. I suspect that the mac bot will be faster.
Three FFI related diagnostics now have documentation with example and fix code that produce unexpected diagnostics. Validation of the three has been disabled in ``, so they should be re-enabled as part of fixing this issue.
The output of the verification test (prior to disabling them) was