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

[pigeon] Fixed decoding code for null-safe classes. #292

Merged
merged 2 commits into from
Feb 22, 2021

Conversation

gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Feb 22, 2021

issue: flutter/flutter#76405

Pre-launch Checklist

  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@gaaclarke gaaclarke force-pushed the pigeon-decode-null-safe branch 2 times, most recently from 97ab024 to 8a8132c Compare February 22, 2021 19:16
@gaaclarke gaaclarke force-pushed the pigeon-decode-null-safe branch from 8a8132c to ccaf34b Compare February 22, 2021 21:20
@gaaclarke gaaclarke force-pushed the pigeon-decode-null-safe branch from ccaf34b to 6a36235 Compare February 22, 2021 21:29
@gaaclarke gaaclarke marked this pull request as ready for review February 22, 2021 21:30
Comment on lines +181 to +185
return 'List<Object$nullTag>$nullTag';
case 'Map':
return 'Map<Object$nullTag, Object$nullTag>';
return 'Map<Object$nullTag, Object$nullTag>$nullTag';
default:
return dataType;
return '$dataType$nullTag';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual fix, other stuff is just testing infrastructure / tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

Comment on lines +1 to +4
// Autogenerated from Pigeon (v0.1.21), do not edit directly.
// See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import
// @dart = 2.12
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add this file otherwise CI analysis steps fail.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, we disable the analysis for flutter_null_safe_unit_tests? https://dart.dev/guides/language/analysis-options#the-analysis-options-file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pointer. I'm on the fence as to whether it is a good idea or not. I think I'll keep it this way for now.

@gaaclarke gaaclarke requested a review from ditman February 22, 2021 21:31
@ditman
Copy link
Member

ditman commented Feb 22, 2021

Let me add @blasten to this review, he pointed yesterday to the code you're touching here!

@ditman ditman requested a review from blasten February 22, 2021 22:23
@gaaclarke gaaclarke merged commit e82599a into flutter:master Feb 22, 2021
stuartmorgan pushed a commit to stuartmorgan/packages that referenced this pull request Apr 30, 2021
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 this pull request may close these issues.

3 participants