Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

jaq 1.5.0 #175671

Merged
merged 2 commits into from
Jun 26, 2024
Merged

jaq 1.5.0 #175671

merged 2 commits into from
Jun 26, 2024

Conversation

BrewTestBot
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

release notes
This release finishes the work started in jaq 1.4 towards making jaq being able to process non-JSON values. In particular, a vast majority the filters in jaq's core library can now process any kind of value that satisfies certain conditions; see the [corresponding PR](https://github.com/01mf02/jaq/pull/187). Currently, this is mostly interesting for people who want to use jaq as an API.

Compilation errors

Since about two months, the compilation of jaq via cargo install jaq failed. This happened because a dependency of jaq called ariadne (responsible for printing compilation errors in jaq) broke semantic versioning. Unfortunately, despite the issue being known upstream, at the time of writing there has been no action towards resolving this problem. This put jaq in an awkward position and was somewhat ironic: the library responsible for reporting compilation errors caused compilation errors.

Eventually, I decided to resolve this problem by replacing ariadne. After having evaluated a number of alternative code span printing libraries, such as miette and codespan-reporting, I wrote a new library called codesnake. Starting from this release, codesnake is in charge for formatting code that is printed during compilation errors in jaq. One direct benefit of this change is that compilation errors are now also colored on the jaq playground.

At this point, I would like to thank @zesterer for having created and maintained ariadne. Without it, the error reporting in jaq would not be close to what it is today.

Smaller changes

This release corrects escaping of special characters in strings; in particular, newlines tabs, and quotes (") were not correctly escaped. For example, for the filter "\n" | tojson, jaq 1.4 yields "\"\n\"", whereas jaq 1.5 yields "\"\\n\"" (the difference being an additional backslash before n). Among others, this shows up in string interpolation ("\(.)"), tostring, and tojson.

Apart from ariadne, this release also removes another dependency, namely colored_json. This makes it possible to print output values without first converting them to a format that colored_json can interpret (serde_json::Value). This should favourably influence the performance of printing output values. In the long run, this will allow to remove jaq's dependency on serde, further contributing to shorter compilation times and smaller binary size.

Furthermore, when using --color never, compilation errors are now also printed without colors (#177).

Full Changelog: 01mf02/jaq@v1.4.0...v1.5.0

@github-actions github-actions bot added rust Rust use is a significant feature of the PR or issue bump-formula-pr PR was created using `brew bump-formula-pr` labels Jun 26, 2024
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Jun 26, 2024
@BrewTestBot BrewTestBot enabled auto-merge June 26, 2024 13:56
@BrewTestBot BrewTestBot added this pull request to the merge queue Jun 26, 2024
Merged via the queue into master with commit 1663421 Jun 26, 2024
14 checks passed
@BrewTestBot BrewTestBot deleted the bump-jaq-1.5.0 branch June 26, 2024 14:02
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. rust Rust use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants