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
Add CBOR diagnostic files for ease of code review #659
Conversation
Fixes #656 This adds a human-readable `.diag` file containing the CBOR diagnostic representation for the corresponding `.dhallb` file, for ease of reviewing changes to encoded expressions. This also adds: * A new `./scripts/generate-diagnostic-files.sh` script for keeping the `*.diag` files up-to-date * A new CI check to ensure the contributor hasn't forgotten to update those files This also removes the `./tests/diff-binary.sh` script since it's no longer necessary.
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.
Thank you! This is great! :)
CI seems to work:
👍 |
${pkgsNew.rsync}/bin/rsync --archive ${pkgsNew.expected-diagnostic-files}/ ./tests.expected | ||
${pkgsNew.rsync}/bin/rsync --archive ${./tests}/ ./tests.actual | ||
|
||
${pkgsNew.diffutils}/bin/diff --recursive ./tests.{actual,expected} |
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.
Don't you need to do something here to assert that there are no differences? Or does diff
exit with non-zero if there are differences?
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.
@ocharles: diff
exits with a non-zero exit code if there are differences
Co-Authored-By: Simon Jakobi <simon.jakobi@gmail.com>
Fixes #656
This adds a human-readable
.diag
file containing the CBOR diagnosticrepresentation for the corresponding
.dhallb
file, for ease ofreviewing changes to encoded expressions.
This also adds:
./scripts/generate-diagnostic-files.sh
script for keeping the*.diag
files up-to-datefiles
This also removes the
./tests/diff-binary.sh
script since it's no longernecessary.