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

Multiple grammars not always recompiled #789

Closed
jayhale opened this issue Feb 9, 2023 · 2 comments · Fixed by #790
Closed

Multiple grammars not always recompiled #789

jayhale opened this issue Feb 9, 2023 · 2 comments · Fixed by #790
Labels

Comments

@jayhale
Copy link

jayhale commented Feb 9, 2023

Describe the bug
When using multiple grammars as described in #758:

use pest::Parser;
use pest_derive::Parser;

#[derive(Parser)]
#[grammar = "base.pest"]
#[grammar = "core.pest"]
struct SplitGrammarParser;

The parser is only recompiled with new grammars from both files when the last grammar is changed. I.e., changes to only base.pest aren't captured in debug builds until something in core.pest changes.

To Reproduce
Steps to reproduce the behavior:

  • Create a simple grammar split across two files
  • Use derive as above
  • Experiment with changes in either or both grammar files (e.g., with cargo watch -x test)

Expected behavior

A change to any grammar should cause the parser to recompile with updates from all grammar files.

@jayhale jayhale added the bug label Feb 9, 2023
@NoahTheDuke
Copy link
Member

Thanks for the report!

@tomtau
Copy link
Contributor

tomtau commented Feb 9, 2023

CC @huacnlee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants