Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Make _IdentityConverter compatible with Dart SDK 1.x #18

Merged
merged 2 commits into from
Dec 19, 2018

Conversation

aaronlademann-wf
Copy link
Contributor

Problem

#17 was merged and released in version 2.1.0 without changing the lower-bound of the Dart SDK to >=2.0.0. The changes in #17 includes the construction of an _IdentityConverter instance without the new or const keyword, which is a Dart SDK 2.x-only feature.

This causes a regression for Dart 1.x SDK consumers building their application using the Dart Dev Compiler:

Error compiling dartdevc module:convert|lib/lib__convert.js

[error] '_IdentityConverter' isn't a function. (package:convert/src/identity_codec.dart, line 20, col 34)
[error] '_IdentityConverter' isn't a function. (package:convert/src/identity_codec.dart, line 21, col 34)

Solution

Use the new keyword to construct the instance. I attempted to keep it a const, but it does not appear that const constructors can have generic parameters using the Dart 1.x SDK.


@jonasfj @kevmoo @lrhn @jayudey-wf @robbecker-wf

+ Fixes DDC compilation regression introduced by dart-archive#17
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@aaronlademann-wf
Copy link
Contributor Author

@jonasfj @kevmoo @lrhn - the company I work for - (@Workiva) has signed the CLA.

@jonasfj jonasfj requested a review from lrhn December 19, 2018 14:12
@jonasfj
Copy link
Contributor

jonasfj commented Dec 19, 2018

@aaronlademann-wf, I dropped you a line by email to resolve the CLA issue. Hit me back if you need more help.

@greglittlefield-wf
Copy link

We just added Aaron to the correct group; he should have a valid CLA now.

@aaronlademann-wf
Copy link
Contributor Author

@googlebot @jonasfj the CLA should be taken care of now.

@googlebot
Copy link

CLAs look good, thanks!

@kevmoo kevmoo merged commit 6467500 into dart-archive:master Dec 19, 2018
@kevmoo
Copy link
Contributor

kevmoo commented Dec 19, 2018

published!

mosuem pushed a commit to dart-lang/core that referenced this pull request Oct 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

5 participants