nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

antlr4_11: init

Open Technius opened this issue 1 year ago • 2 comments

Description of changes

This adds ANTLR 4.11, which was released recently. The package was largely copied from antlr4_9, with a few modifications to account for the dependency changes from 4.9 to 4.11.

Things done
  • Built on platform(s)
    • [x] x86_64-linux
    • [ ] aarch64-linux
    • [ ] x86_64-darwin
    • [ ] aarch64-darwin
  • [ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • [ ] Tested, as applicable:
  • [x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • [x] Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • [ ] (Package updates) Added a release notes entry if the change is major or breaking
    • [ ] (Module updates) Added a release notes entry if the change is significant
    • [ ] (Module addition) Added a release notes entry if adding a new NixOS module
    • [ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • [ ] Fits CONTRIBUTING.md.

Technius avatar Sep 15 '22 08:09 Technius

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/1209

nixos-discourse avatar Sep 26 '22 02:09 nixos-discourse

This adds ANTLR 4.11, which was released recently. The package was largely copied from antlr4_9, with a few modifications to account for the dependency changes from 4.9 to 4.11.

What hinders us from upgrading the antlr version instead of adding a new one?

SuperSandro2000 avatar Sep 26 '22 09:09 SuperSandro2000

What hinders us from upgrading the antlr version instead of adding a new one?

As far as I'm aware, ANTLR major/minor releases only provide best-effort backwards/forwards compatibility with no guarantees. For example, lexers/parsers generated by ANTLR 4.10 are incompatible with the ANTLR 4.9 runtime. Regarding the C++ runtime library specifically, there are also many other breaking changes between versions such as changes to the API, CMake configuration changes, etc.

Are you suggesting removing the versioned antlr packages and only leaving pkgs.antlr4, or changing pkgs.antlr4 to point to ANTLR 4.11?

Can we please use some generic or common nix file to reduce the amount of code duplication?

I agree there is a large amount of code duplication, but this PR is focused on adding ANTLR 4.11. Would it be better to refactor all of the ANTLR packages first, and include those refactoring changes + the new version in this PR, or would a separate refactoring PR be more appropriate?

Technius avatar Oct 02 '22 23:10 Technius

or changing pkgs.antlr4 to point to ANTLR 4.11?

we should think about that and removing older versions.

Would it be better to refactor all of the ANTLR packages first, and include those refactoring changes + the new version in this PR,

That would be really nice to reduce the code duplication.

SuperSandro2000 avatar Oct 03 '22 18:10 SuperSandro2000

It would be nice to have 4.10.

aaronjheng avatar Oct 13 '22 09:10 aaronjheng