Tags: aboutyou/grpc-dart
Tags
Fix compilation with DDC (grpc#516) b272632 exposed client certificate through `X509Certificate? get clientCertificate;` getter on `ServiceCall` class. This broke compilation of `grpc_web` code using DDC, but not dart2js. Turns out that dart2js is happy to compile any code using `dart:io` (though the result will not run if you try to use any of those APIs), but DDC rejects such code eagerly. `package:test` runs tests through `dart2js` so DDC breakage was not really caught by CI. Unfortunately this discrepancy between DDC and dart2js puts us in some really weird spot: most of our tests are platform independent, but most of those tests also pull in `dart:io` through transitive dependencies. This commit is the most minimal change we could make to allow the code compile both on the Web and natively. A proper fix should be to go through tests one-by-one and make sure that those that need to run on the Web don't import `dart:io`, but we don't have time to do that right now. This commit also adds a smoke test to the CI to verify that `grpc_web` example builds with DDC.
PreviousNext