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

Petitparser 4.1.0 incompatability #25

Closed
One-Nub opened this issue Apr 17, 2021 · 1 comment
Closed

Petitparser 4.1.0 incompatability #25

One-Nub opened this issue Apr 17, 2021 · 1 comment

Comments

@One-Nub
Copy link

One-Nub commented Apr 17, 2021

It appears that the current version of toml.dart is incompatible with the latest version of petitparser (4.1.0) with the resulting error:

../../.pub-cache/hosted/pub.dartlang.org/toml-0.10.0/lib/src/decoder/parser/util/seq_pick.dart:9:54: Error: Expected 0 type arguments.
  Parser<S> before<S>(Parser<S> other) => seq(other).pick<S>(1);
                                                     ^
../../.pub-cache/hosted/pub.dartlang.org/toml-0.10.0/lib/src/decoder/parser/util/seq_pick.dart:13:52: Error: Expected 0 type arguments.
  Parser<T> followedBy(Parser other) => seq(other).pick<T>(0);
                                                   ^
../../.pub-cache/hosted/pub.dartlang.org/toml-0.10.0/lib/src/decoder/parser/util/seq_pick.dart:23:46: Error: Expected 0 type arguments.
      prefix.seq(this).seq(suffix ?? prefix).pick<T>(1);
                                             ^

which goes away when petitparser is downgraded to 4.0.2.

just95 added a commit that referenced this issue Apr 18, 2021
In PetitParser 4.1.0, the type argument of `pick` was removed.
To ensure type safety, this commit adds a new parser class
for parsers that have an ignored prefix and suffix instead of
using `pick` and `seq`.
just95 added a commit that referenced this issue Apr 18, 2021
Due to dart-lang/language#1557 the parser
constructed by `ChoiceParserExtension.or` is not typed correctly.
Runtime-type errors are avoided by construction `ChoiceParser`s
directly.
just95 added a commit that referenced this issue Apr 18, 2021
@just95
Copy link
Owner

just95 commented Apr 18, 2021

Thanks for the report. I've now released version 0.11.0 with support for petitparser 4.1.0.

@just95 just95 closed this as completed Apr 18, 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

No branches or pull requests

2 participants