Releases: HewlettPackard/dockerfile-parser-rs
Fix an issue where certain string escapes could cause a stack overflow
This release includes a fix for an issue where certain quoted strings containing invalid escapes could cause a stack overflow, for example:
ARG FOO="hello\/world"
The error is now properly reported without causing an overflow, however strings like the example are still (for now) considered invalid. Docker may handle invalid escape sequences differently (and seems to consider this particular escape valid despite it being nonsensical).
Properly parse images containing hashes
This release tweaks the image parser to properly handle docker image strings containing hashes or digests, for example:
docker pull hello-world@sha256:90659bf80b44ce6be8234e6ff90a1ac34acbeb826903b02cfa0da11c82cbc042
This is another minor breaking change for any downstream dependencies that instantiate ImageRef
directly in e.g. unit tests, as a new field has been added to the struct.
Stage improvements
This refactors the Stage struct to add a number of new features:
- stages now track their
name
(if set) - stages now track their
parent
androot
(image / stage) - new
Stages
wrapper struct provides utility to get by name or index - reduced
Span
debug output, now prints as(1, 23)
- additional testing
This is a mild breaking change for code that depends on the particular type signature of Dockerfile::iter_stages()
or the Stage struct itself, as fields have been added.
Bugfix for ImageRef::parse()
Fixes a bug in ImageRef::parse(..)
where the parsed image part truncated image names beyond the first /
.
Improved spans
This release includes several Span
improvements:
- Add
span
toCopyInstruction
- Add
span
andvalue_span
toCopyFlag
- Add
From<(usize, usize)>
toSpan
from prometheus-parser-rs - Add
Span::relative_span(...)
to create a line-relative span from a global span
Lastly, this renames dockerfile.rs
to dockerfile_parser.rs
since vscode decided it was a Dockerfile. This may be a minor breaking change if this module was referenced directly.
v0.2.2: Merge pull request #1 from HewlettPackard/tryfrom-impls
Extra docs and TryFrom Instruction impls
Fix improper whitespace handling for comments
This releases fixes a grammar issue where the comment rule improperly consumed trailing newlines. This could cause subsequent rules expecting a leading newline to fail.
Initial public release
v0.2.0 add CI badge to README.md
testing publish
v0.2.0-rc2 add CI badge to README.md