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

Antlr 4.10 Dart runtime package missing in Pub.dev #3654

Closed
kaby76 opened this issue Apr 14, 2022 · 9 comments
Closed

Antlr 4.10 Dart runtime package missing in Pub.dev #3654

kaby76 opened this issue Apr 14, 2022 · 9 comments

Comments

@kaby76
Copy link
Contributor

kaby76 commented Apr 14, 2022

According to the instructions for Antlr and Dart, we need to have a package published on Dev.pub. But, the latest version is 4.9.3. See here.

@lingyv-li
Copy link
Member

4.10.0 for Dart is released.

@kaby76
Copy link
Contributor Author

kaby76 commented Apr 14, 2022

Is there some indexing that needs to be done, or something that needs to be done to the package? I can find the version here, but a build does not work still:

dart pub get
Resolving dependencies...
Error on line 7, column 11 of pubspec.yaml: A dependency specification must be a string or a mapping.
  ╷
7 │   antlr4: 4.10
  │           ^^^^
  ╵

When I add single quotes around 4.10 (as I do not know the correct form of specifying the dependency for the .yaml file--and the error message from dart says that it must be a string or ...--GFC give an error message that is correct!), then do a build, it gives this (see error after dart pub get):

java -jar /mnt/c/Users/Kenne/Documents/GitHub/grammars-v4-i2572-p2/antlr4-4.10-complete.jar -encoding utf-8 -Dlanguage=Dart  abbLexer.g4
java -jar /mnt/c/Users/Kenne/Documents/GitHub/grammars-v4-i2572-p2/antlr4-4.10-complete.jar -encoding utf-8 -Dlanguage=Dart  abbParser.g4
dart pub get
Resolving dependencies...
Error on line 7, column 11 of pubspec.yaml: Invalid version constraint: Could not parse version "4.10". Unknown text at "4.10".
  ╷
7 │   antlr4: '4.10'
  │           ^^^^^^
  ╵
make: *** [makefile:11: classes] Error 65
name: cli
description: A sample command-line application.
environment:
  sdk: '>=2.12.0 <3.0.0'
dependencies:
  antlr4: '4.10'
dev_dependencies:
  pedantic: ^1.9.0
  test: ^1.14.4

The dart pub get works for old Antlr 4.9.3 but not 4.10.

@kaby76
Copy link
Contributor Author

kaby76 commented Apr 14, 2022

OK. Got it. dart pub add antlr4 sets up the .yaml how it wants to set it up. 4.10 does not equal 4.10.0 which is rather annoying because the Antlr .jar is named antlr4-4.10-complete.jar, not antlr4-4.10.0-complete.jar. See here. And, 4.10 equals 4.10.0 in Nuget.org, C# builds, etc.

@kaby76 kaby76 closed this as completed Apr 14, 2022
@KvanTTT
Copy link
Member

KvanTTT commented Apr 14, 2022

It looks like restriction on version format. Dart uses Semantic Versioning 2.0.0.

@kaby76
Copy link
Contributor Author

kaby76 commented Apr 14, 2022

It looks like restriction on version format. Dart uses Semantic Versioning 2.0.0.

Yeah, didn't read the doc--TLDR, ICR (i can't read), LCIR (last choice is reading), and of course IRTAP (I rather type all permutations). :)

@domesticmouse
Copy link

Please update for Antlr 4.10.1. Thanks!

@lingyv-li
Copy link
Member

@parrt would you like me to publish for 4.10.1 as well?

The 4.10.1 update has no change (other than version bump) to the Dart runtime. And the generated code will be compatible as it's a patch version change. Still for consistency it's better to publish.

@parrt
Copy link
Member

parrt commented Apr 19, 2022 via email

@lingyv-li
Copy link
Member

4.10.1 is published https://pub.dev/packages/antlr4/versions/4.10.1

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

5 participants