Skip to content

v2.6.1: pest as a git dependency

Compare
Choose a tag to compare
@tomtau tomtau released this 17 Jun 14:11
· 40 commits to master since this release
867da2e

What's Changed

  • ci: fix for cargo-msrv needing at least 1.59 now by @tomtau in #850
  • Mitigate errors in reporting grammars that can cause the parser to run indefinetely by @Tartasprint in #848
  • Removed TODO about removed box syntax by @Tartasprint in #854
  • derive/examples: add a help menu grammar and parser by @e-dant in #856
  • feat: add simple Position/Span From implementations for LineColLocation by @HoloTheDrunk in #860
  • Swap precedence of negation and factorial by @SandaruKasa in #865
  • Conditional source-tree bootstrapping by @tomtau and @iptq in #866

New Contributors

Full Changelog: v2.6.0...v2.6.1

Using pest as a git dependency

pest v2.6.1 contains a patch for the longstanding problem that pest couldn't be used as a git dependency due to the bootstrapping process. It should be possible now with a special feature flag as follows:

pest = { git = "https://github.com/.../pest.git", rev = "..." }
pest_derive = { git = "https://github.com/.../pest.git", rev = "...", features = ["not-bootstrap-in-src"]}

Note that the compilation time will be higher due to the cargo library dependency. If that becomes an issue, you can still use the old workarounds, e.g. cloning the repo, running cargo bootstrap there and specifying the dependency as a path to the locally cloned repo instead of git.

Warning: Semantic Versioning

Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule enum. This is a known issue and will be fixed in the future (e.g. by increasing MSRV and non_exhaustive annotations).

If you face a dependency problem where Cargo mixes different versions of pest due to transitive dependencies: #849 (comment) you can try adding the older pest to explicitly force it as follows:

pest = { version = "=2.5.6" }