Skip to content

Conversation

@ratmice
Copy link
Collaborator

@ratmice ratmice commented May 25, 2025

I was looking through the output of cargo semver-checks from the cargo-semver-checks tool.
In order to make a list of semver changes in doing so I noticed that RustEdition had been #[non_exhaustive] in lrlex but not lrpar.

@ratmice
Copy link
Collaborator Author

ratmice commented May 25, 2025

Here is the list of semver changes summarizing the output of cargo-semver-checks (including this PR) if that helps,
I don't think CHANGES.md has included a detailed list of changes like this before, so I'm not sure if we'd want to include it or just use it as a reference when writing the CHANGES.md

cfgrammar

Fields addied to pub constructable structs:

  • GrammarAST.token_directives
  • Production.prod_span

Types made #[non_exhaustive]:

  • YaccGrammarWarningKind
  • YaccGrammarWarningKind
  • YaccGrammarErrorKind
  • YaccGrammarErrorKind
  • SpansKind
  • YaccKind

Methods:

  • YaccGrammar::new_from_ast_with_validity_info parameter YaccKind was removed.
  • GrammarAST::add_prod now takes a Span parameter

lrlex

Changes to LexErrorKind:

  • No longer derives Eq or PartialEq.
  • Variant RegexError added regex::Error value for improved errors.
  • Added variant Header.

Types made #[non_exhaustive]:

  • LexerKind
  • LexErrorKind
  • RustEdition
  • Visibility

Renamed const DEFAULT_REGEX_OPTIONS to DEFAULT_LEX_FLAGS.

lrpar

Changes to CTParserBuilder

  • No longer implementing the auto-derived traits Send, Sync, UnwindSafe, or RefUnwindSafe.

Types made #[non_exhaustive]:

  • RecoveryKind
  • RustEdition
  • Visibility

lrtable

Types made #[non_exhaustive]:

  • StateTableErrorKind
  • StateTableError

@ltratt ltratt added this pull request to the merge queue May 25, 2025
@ltratt
Copy link
Member

ltratt commented May 25, 2025

Thanks! I will try and have a good think later today about when an appropriate time to make a release might be.

Merged via the queue into softdevteam:master with commit 657eecb May 25, 2025
2 checks passed
@ratmice
Copy link
Collaborator Author

ratmice commented May 25, 2025

I really am not in any rush to release honestly, I just didn't want leave the job of summarizing the changes up in the air.
Or lingering too long before I inevitably swap things out. Let me know if you want me to also prepare a list of features/changes of behavior for e.g. CHANGES.md too (or just for reference if you prefer to write it).

@ratmice ratmice deleted the rust_edition_non_exhaustive branch May 25, 2025 08:11
@ratmice
Copy link
Collaborator Author

ratmice commented May 25, 2025

FWIW here is a more high level list of changes that I could think of/remember,
there are perhaps some things which are not really needing to be on this list.
Hopefully I'm not forgetting anything or anyone.

Changes to lrpar:

  • Added a %gmrtools section to grammar files which can specify YaccKind, RecoveryKind, test_files.
  • Ability to specify spans for empty productions.
  • Enhanced error printing in CTParserBuilder can now reference source code inline.

Code generation:

  • Code generation now uses the quote crate which may impact erroneous actions
    Previously errors in rust action code couldn't be caught before compilation, some errors
    may now be caught during tokenization phase.
  • Code formatting of generated code using the prettyplease crate.
  • Code generation previously required serde, using a new version of bincode serde is now optional.
  • More compact bincode encoding of parse tables using the variable width encoding.

Changes to lrlex

  • RegexOptions has been LexFlags, some options not affecting regex have been added.
  • Added a %grmtools section, which can be used to specify LexFlags within a grammar.
  • Comments can now be enabled via allow_wholeline_comments
  • Enhanced error printing in CTLexerBuilder and the lrlex tool can now reference source code inline.

Changes to nimbleparse:

  • Arguments RecoveryKind, and YaccKind can be specified in %grmtools section
  • The -y YaccKind argument no longer has a default value.
  • Multiple input_file arguments can be passed.
  • If test_files is specified in the %grmtools section, input_file is no longer required.

Changes to lrtable:

  • struct Conflicts now contains a token index for lookahead.

Code generation:

  • Determinisic output from the code generator.
  • Export an array of all tokens.

New contributors first contributions: quernd, taminomara

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.

2 participants