-
Notifications
You must be signed in to change notification settings - Fork 7
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
Replace regex with winnow
based parser
#255
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file is intended to define valid `Procfile` inputs and parser behavior separate from implementation. It may be updated in the future based on upstream requirements (CNB spec or kubernetes spec) or through future discussion.
joshwlewis
reviewed
Jan 7, 2025
joshwlewis
reviewed
Jan 7, 2025
joshwlewis
reviewed
Jan 7, 2025
* Use "separated" instead of terminated/preceded * Add a missing word * Specify that spaces are not part of they key * Document duplicate key behavior
joshwlewis
reviewed
Jan 14, 2025
joshwlewis
approved these changes
Jan 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably warrants a major version bump. Looks good to me!
heroku-linguist bot
added a commit
that referenced
this pull request
Jan 21, 2025
## heroku/procfile ### Changed - Regex based parser has been removed in favor of a `winnow` based parser combinator, the format is now more strict. See [SPEC.md](spec.md) for more details. ([#255](#255)) - Keys starting with spaces now emit a warning - Underscore key characters (`_`) are now converted to hyphens (`-`) and emit a warning - Uppercase key characters are now converted to lowercase and emit a warning - Invalid keys now error, previously they were ignored
Merged
heroku-linguist bot
added a commit
that referenced
this pull request
Jan 21, 2025
## heroku/procfile ### Changed - Regex based parser has been removed in favor of a `winnow` based parser combinator, the format is now more strict. See [SPEC.md](spec.md) for more details. ([#255](#255)) - Keys starting with spaces now emit a warning - Underscore key characters (`_`) are now converted to hyphens (`-`) and emit a warning - Uppercase key characters are now converted to lowercase and emit a warning - Invalid keys now error, previously they were ignored Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com>
heroku-linguist bot
added a commit
to heroku/cnb-builder-images
that referenced
this pull request
Jan 21, 2025
## heroku/procfile ### Changed - Regex based parser has been removed in favor of a `winnow` based parser combinator, the format is now more strict. See [SPEC.md](spec.md) for more details. ([#255](heroku/buildpacks-procfile#255)) - Keys starting with spaces now emit a warning - Underscore key characters (`_`) are now converted to hyphens (`-`) and emit a warning - Uppercase key characters are now converted to lowercase and emit a warning - Invalid keys now error, previously they were ignored
heroku-linguist bot
added a commit
to heroku/cnb-builder-images
that referenced
this pull request
Jan 21, 2025
## heroku/procfile ### Changed - Regex based parser has been removed in favor of a `winnow` based parser combinator, the format is now more strict. See [SPEC.md](spec.md) for more details. ([#255](heroku/buildpacks-procfile#255)) - Keys starting with spaces now emit a warning - Underscore key characters (`_`) are now converted to hyphens (`-`) and emit a warning - Uppercase key characters are now converted to lowercase and emit a warning - Invalid keys now error, previously they were ignored Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace the existing
Regex
based "parser" with an actual honest-to-goodness parser/combinator based parser.Procfile
validation more strict #73How to review
Some suggestions on how to review this:
procfile.rs
. Some of them were useful for development, the majority are asserting overall behavior and edge cases