difftreelog
ci use hercules
in: master
110 files changed
.envrcdiffbeforeafterboth--- a/.envrc
+++ b/.envrc
@@ -3,6 +3,6 @@
use flake
-if ! diff .github/hooks/pre-commit .git/hooks/pre-commit >/dev/null; then
+if ! test -d .jj && ! diff .github/hooks/pre-commit .git/hooks/pre-commit >/dev/null; then
echo -e "${RED}Hooks are updated, read .github/hooks/pre-commit, and then install it with cp .github/hooks/pre-commit .git/hooks/pre-commit${RESET}"
fi
.github/workflows/checks.yamldiffbeforeafterboth--- a/.github/workflows/checks.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: Checks
-on: [ pull_request ]
-jobs:
- tests:
- name: Tests
- uses: ./.github/workflows/test.yaml
- lints:
- name: Lints
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4.1.4
- - uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
- - uses: auguwu/clippy-action@1.3.0
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- permissions:
- checks: write
- formatting:
- name: Formatting
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4.1.4
- - uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
- - uses: actions-rust-lang/rustfmt@v1.1.0
-
.github/workflows/release.yamldiffbeforeafterboth--- a/.github/workflows/release.yaml
+++ /dev/null
@@ -1,140 +0,0 @@
-name: Release
-on:
- push:
- tags: [ 'v*' ]
-jobs:
- tests:
- uses: ./.github/workflows/test.yaml
-
- cargo-release:
- if: !endsWith(github.ref, '-test')
- needs: [ tests ]
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4.1.4
- - name: Install stable toolchain
- uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
- with:
- toolchain: stable
- - run: cargo install cargo-release
- - run: cargo login ${{ secrets.CARGO_TOKEN }}
- - run: cargo release --no-dev-version --skip-push --skip-tag --no-confirm
-
- github-release:
- needs: [ tests ]
- strategy:
- matrix:
- target:
- # Linux build notes:
- # While musl targets are not as supported as gnu, those are most relevant to users,
- # which want to download binaries from github, as glibc has compatibility issues
- # with older distros
-
- # Tier 1
- - i686-pc-windows-msvc
- - x86_64-apple-darwin
- - x86_64-pc-windows-msvc
-
- # Tier 2
- - aarch64-apple-darwin
- - aarch64-unknown-linux-musl
- - i686-unknown-linux-musl
- - x86_64-unknown-linux-musl
- include:
- # Linux
- - target: aarch64-unknown-linux-musl
- os: ubuntu-latest
- bin: jrsonnet
- name: jrsonnet-linux-aarch64
- - target: i686-unknown-linux-musl
- os: ubuntu-latest
- bin: jrsonnet
- name: jrsonnet-linux-i686
- - target: x86_64-unknown-linux-musl
- os: ubuntu-latest
- bin: jrsonnet
- name: jrsonnet-linux-amd64
-
- # Windows
- - target: i686-pc-windows-msvc
- os: windows-latest
- bin: jrsonnet.exe
- name: jrsonnet-windows-i686.exe
- - target: x86_64-pc-windows-msvc
- os: windows-latest
- bin: jrsonnet.exe
- name: jrsonnet-windows-amd64.exe
-
- # Apple
- - target: aarch64-apple-darwin
- os: macOS-latest
- bin: jrsonnet
- name: jrsonnet-darwin-aarch64
- - target: x86_64-apple-darwin
- os: macOS-latest
- bin: jrsonnet
- name: jrsonnet-darwin-amd64
- runs-on: ${{ matrix.os }}
- steps:
- - name: Fetch apt repo updates
- if: ${{ startsWith(matrix.os, 'ubuntu-') }}
- run: sudo apt update
-
- - name: Install stable toolchain
- uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
- with:
- toolchain: stable
- target: ${{ matrix.target }}
-
- - uses: actions/checkout@v4.1.4
-
- - name: Add experimental flags
- if: ${{ endsWith(github.ref, '-test' )}}
- run: echo 'EXPERIMENTAL_FLAGS=--features=experimental' >> $GITHUB_ENV
-
- - name: Linux x86 cross compiler
- if: ${{ startsWith(matrix.target, 'i686-unknown-linux-') }}
- run: sudo apt install gcc-multilib
-
- - name: ARM cross compiler
- if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
- uses: actions-rs/cargo@v1
- with:
- command: install
- args: cross
-
- - name: ARM gcc
- if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
- run: sudo apt install gcc-aarch64-linux-gnu
-
- - name: Musl gcc
- if: ${{ endsWith(matrix.target, '-musl') }}
- run: sudo apt install musl musl-tools
-
- - name: Run cross build
- if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
- shell: bash
- run: cross build --bin=jrsonnet --release --target ${{ matrix.target }} ${{ env.EXPERIMENTAL_FLAGS }}
-
- - name: Run build
- if: ${{ !startsWith(matrix.target, 'aarch64-unknown-linux-') }}
- run: cargo build --bin=jrsonnet --release --target ${{ matrix.target }} ${{ env.EXPERIMENTAL_FLAGS }}
-
- - name: Package
- shell: bash
- run: |
- cd target/${{ matrix.target }}/release
-
- cp ${{ matrix.bin }} ../../../${{ matrix.name }}
- cd -
-
- - name: Generate SHA-256
- run: shasum -a 256 ${{ matrix.name }} > ${{ matrix.name }}.sha256
-
- - name: Publish
- uses: softprops/action-gh-release@v2.0.4
- with:
- draft: true
- files: "jrsonnet*"
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
.github/workflows/test.yamldiffbeforeafterboth--- a/.github/workflows/test.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-name: Test
-on: [ workflow_call ]
-jobs:
- test:
- name: Test
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4.1.4
- - uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
- - run: cargo test --all
- test-stable:
- name: Test on stable
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4.1.4
- - name: Install the latest stable toolchain
- uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
- with:
- toolchain: stable
- - run: cargo test --all
-
Cargo.lockdiffbeforeafterboth194 packageslockfile v4
Might be heavy and slow!
ahash
0.8.12crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75used byaho-corasick
1.1.4crates.io↘ 1↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301depends onaliasable
0.1.3crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fdused byallocator-api2
0.2.21crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923annotate-snippets
0.12.11crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum16e4850548ff4a25a77ce3bda7241874e17fb702ea551f0cc62a2dbe052f1272depends onannotated-string
0.3.0crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum298ed730801db3c02f2edba003c9420a0f57ea48d37fdc5601c536113668c059used byanstream
0.6.21crates.io↘ 7↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4adepends onused byanstyle
1.0.13crates.io↘ 0↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78anstyle-parse
0.2.7crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2depends onused byanstyle-query
1.1.5crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadcdepends onused byanstyle-wincon
3.0.11crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747dused byanyhow
1.0.101crates.io↘ 0↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75eaar_archive_writer
0.5.1crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340bdepends onused byarraydeque
0.5.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236used byautocfg
1.5.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumc08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8used bybase64
0.22.1crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6bitflags
2.10.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3used byblock-buffer
0.10.4crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71depends onused bybstr
1.12.1crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cabdepends onused bybumpalo
3.19.1crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510depends oncc
1.2.55crates.io↘ 2↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29depends oncfg-if
1.0.4crates.io↘ 0↖ 7sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801clap
4.5.57crates.io↘ 2↖ 6sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum6899ea499e3fb9305a65d5ebf6e3d2248c5fab291f300ad0a704fbe142eae31adepends onclap_builder
4.5.57crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7b12c8b680195a62a8364d16b8447b01b6c2c8f9aaf68bee653be34d4245e238used byclap_complete
4.5.65crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum430b4dc2b5e3861848de79627b2bedc9f3342c7da5173a14eaa5d0f8dc18ae5ddepends onused byclap_derive
4.5.55crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5used byclap_lex
0.7.7crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumc3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32used bycolorchoice
1.0.4crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75used byconsole
0.15.11crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8used bycountme
3.0.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636used bycpufeatures
0.2.17crates.io↘ 1↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280depends oncrypto-common
0.1.7crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60adepends onused bydigest
0.10.7crates.io↘ 2↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292depends ondprint-core
0.67.4crates.io↘ 7↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2c1d827947704a9495f705d6aeed270fa21a67f825f22902c28f38dc3af7a9aedepends ondrop_bomb
0.1.5crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9bda8e21c04aca2ae33ffc2fd8c23134f3cac46db123ba97bd9d3f3b8a4a85e1educe
0.6.0crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417either
1.15.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719used byencode_unicode
1.0.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0used byencoding_rs
0.8.35crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3depends onused byencoding_rs_io
0.1.7crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum1cc3c5651fb62ab8aa3103998dade57efdd028544bd300516baa31840c252a83depends onused byenum-ordinalize
4.3.2crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum4a1091a7bb1f8f2c4b28f1fe2cef4980ca2d410a3d727d67ecc3178c9b0800f0depends onused byenum-ordinalize-derive
4.3.2crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631depends onused byequivalent
1.0.2crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0ferrno
0.3.14crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efebdepends onused byextension-trait
1.0.2crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumdd65f1b59dd22d680c7a626cc4a000c1e03d241c51c3e034d2bc9f1e90734f9bdepends onused byfastrand
2.3.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411beused byfind-msvc-tools
0.1.9crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582used byfnv
1.0.7crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1used byfoldhash
0.1.5crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2used byfoldhash
0.2.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdbused bygeneric-array
0.14.7crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9adepends ongetrandom
0.3.4crates.io↘ 6↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fdglobset
0.4.18crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3used byhashbrown
0.14.5crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1used byhashbrown
0.15.5crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1used byhashbrown
0.16.1crates.io↘ 3↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100heck
0.4.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8used byheck
0.5.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55eaused byhi-doc
0.3.0crates.io↘ 10↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf70fb920ba34768415fb239d7d607486083bfc38ad35e3f1d558697f9f646f11depends onhi-doc-jumprope
1.2.1crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum236c25809a9c0a0249b3488feb57744e12aa64e4f3db851980eab303719c7bdddepends onused byindexmap
2.13.0crates.io↘ 4↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017indoc
2.0.7crates.io↘ 1↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706depends oninsta
1.46.3crates.io↘ 6↖ 6sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume82db8c87c7f1ccecb34ce0c24399b8a73081427f3c7c50a5d597925356115e4is_terminal_polyfill
1.70.2crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695used byitertools
0.14.0crates.io↘ 1↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285depends onitoa
1.0.17crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2used byjrsonnet-cli
0.5.0-pre97workspace↘ 5↖ 2jrsonnet-deps
0.5.0-pre97workspace↘ 5↖ 0jrsonnet-evaluator
0.5.0-pre97workspace↘ 20↖ 6depends on- annotate-snippets
0.12.11 - anyhow
1.0.101 - educe
0.6.0 - hi-doc
0.3.0 - jrsonnet-gcmodule
0.4.2 - jrsonnet-interner
0.5.0-pre97 - jrsonnet-ir
0.5.0-pre97 - jrsonnet-ir-parser
0.5.0-pre97 - jrsonnet-macros
0.5.0-pre97 - jrsonnet-peg-parser
0.5.0-pre97 - jrsonnet-types
0.5.0-pre97 - num-bigint
0.4.6 - pathdiff
0.2.3 - rustc-hash
2.1.1 - rustversion
1.0.22 - serde
1.0.228 - stacker
0.1.23 - static_assertions
1.1.0 - strsim
0.11.1 - thiserror
2.0.18
- annotate-snippets
jrsonnet-fmt
0.5.0-pre97workspace↘ 6↖ 0jrsonnet-formatter
0.5.0-pre97workspace↘ 6↖ 1jrsonnet-gcmodule
0.4.2crates.io↘ 1↖ 11sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf95b976a79e4000bb9e07ff0709dca0ea27bcf1952d4c17d91fb7364d6145683depends onjrsonnet-gcmodule-derive
0.4.2crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum51d928626220a310ff0cec815e80cf7fe104697184352ca21c40534e0b0d72d9depends onused byjrsonnet-interner
0.5.0-pre97workspace↘ 3↖ 3jrsonnet-ir
0.5.0-pre97workspace↘ 5↖ 8depends onjrsonnet-ir-parser
0.5.0-pre97workspace↘ 4↖ 2jrsonnet-lexer
0.5.0-pre97workspace↘ 1↖ 3jrsonnet-macros
0.5.0-pre97workspace↘ 4↖ 2jrsonnet-peg-parser
0.5.0-pre97workspace↘ 4↖ 1jrsonnet-rowan-parser
0.5.0-pre97workspace↘ 9↖ 1jrsonnet-stdlib
0.5.0-pre97workspace↘ 16↖ 3depends onjrsonnet-types
0.5.0-pre97workspace↘ 2↖ 1depends onjs-sys
0.3.85crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3depends onused bykeccak
0.1.5crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654depends onused bylibc
0.2.180crates.io↘ 0↖ 7sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fclibjsonnet
0.5.0-pre97workspace↘ 5↖ 0linux-raw-sys
0.11.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumdf1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039used bylog
0.4.29crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897used bylogos
0.16.1crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumeb2c55a318a87600ea870ff8c2012148b44bf18b74fad48d0f835c38c7d07c5fdepends onused bylogos-codegen
0.16.1crates.io↘ 6↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum58b3ffaa284e1350d017a57d04ada118c4583cf260c8fb01e0fe28a2e9cf8970used bylogos-derive
0.16.1crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum52d3a9855747c17eaf4383823f135220716ab49bea5fbea7dd42cc9a92f8aa31depends onused bylru
0.16.3crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593depends onused bymd5
0.8.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumae960838283323069879657ca3de837e9f7bbb4c7bf6ea7f1b290d5e9476d2e0used bymemchr
2.8.0crates.io↘ 0↖ 7sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79mimalloc-sys
0.1.6crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum4aa3cefb626f6ae3d0b2f71c5378c89d2b1d4d7bc246b0ca9a7ee61a4daad291depends onused bymimallocator
0.1.3crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2d44fe4ebf6b538fcf39d9975c2b90bb3232d1ba8e8bffeacd004f27b20c577adepends onused bynohash-hasher
0.2.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451used bynum-bigint
0.4.6crates.io↘ 3↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9num-integer
0.1.46crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858fdepends onused bynum-traits
0.2.19crates.io↘ 1↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841depends onobject
0.37.3crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fedepends onused byonce_cell
1.21.3crates.io↘ 0↖ 6sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2donce_cell_polyfill
1.70.2crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4feused byouroboros
0.18.5crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum1e0f050db9c44b97a94723127e6be766ac5c340c48f2c4bb3ffa11713744be59used byouroboros_macro
0.18.5crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3c7028bdd3d43083f6d8d4d5187680d0d3560d54df4cc9d752005268b41e64d0used bypathdiff
0.2.3crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumdf94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3peg
0.8.5crates.io↘ 2↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9928cfca101b36ec5163e70049ee5368a8a1c3c6efc9ca9c5f9cc2f816152477depends onpeg-macros
0.8.5crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum6298ab04c202fa5b5d52ba03269fb7b74550b150323038878fe6c372d8280f71used bypeg-runtime
0.8.5crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum132dca9b868d927b35b5dd728167b2dee150eb1ad686008fc71ccb298b776fcaused byppv-lite86
0.2.21crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9depends onused byproc-macro2
1.0.106crates.io↘ 1↖ 18sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934depends onused by- clap_derive
4.5.55 - educe
0.6.0 - enum-ordinalize-derive
4.3.2 - extension-trait
1.0.2 - jrsonnet-gcmodule-derive
0.4.2 - jrsonnet-macros
0.5.0-pre97 - logos-codegen
0.16.1 - ouroboros_macro
0.18.5 - peg-macros
0.8.5 - proc-macro2-diagnostics
0.10.1 - quote
1.0.44 - serde_derive
1.0.228 - syn
2.0.114 - syn-dissect-closure
0.1.0 - thiserror-impl
2.0.18 - wasm-bindgen-macro-support
0.2.108 - xtask
0.1.0 - zerocopy-derive
0.8.39
- clap_derive
proc-macro2-diagnostics
0.10.1crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumaf066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8used bypsm
0.1.30crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3852766467df634d74f0b2d7819bf8dc483a0eb2e3b0f50f756f9cfe8b0d18d8depends onused byquote
1.0.44crates.io↘ 1↖ 18sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4depends onused by- clap_derive
4.5.55 - educe
0.6.0 - enum-ordinalize-derive
4.3.2 - extension-trait
1.0.2 - jrsonnet-gcmodule-derive
0.4.2 - jrsonnet-macros
0.5.0-pre97 - logos-codegen
0.16.1 - ouroboros_macro
0.18.5 - peg-macros
0.8.5 - proc-macro2-diagnostics
0.10.1 - serde_derive
1.0.228 - syn
2.0.114 - syn-dissect-closure
0.1.0 - thiserror-impl
2.0.18 - wasm-bindgen-macro
0.2.108 - wasm-bindgen-macro-support
0.2.108 - xtask
0.1.0 - zerocopy-derive
0.8.39
- clap_derive
r-efi
5.3.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0fused byrand
0.9.2crates.io↘ 2↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1depends onrand_chacha
0.9.0crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cbdepends onused byrand_core
0.9.5crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83cdepends onused byrandom_color
1.1.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd635c5e80ae160390ac62ca027d2d06c94c1dc69e5c0a12f1e3a53664dc84966depends onused byrange-map
0.2.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum12a5a2d6c7039059af621472a4389be1215a816df61aa4d531cfe85264aee95fdepends onused byregex
1.12.3crates.io↘ 4↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276regex-automata
0.4.14crates.io↘ 3↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8fregex-syntax
0.8.9crates.io↘ 0↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4crowan
0.16.1crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum417a3a9f582e349834051b8a10c8d71ca88da4211e4093528e36b9845f6b5f21rustc-hash
1.1.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2used byrustc-hash
2.1.1crates.io↘ 0↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0drustix
1.1.3crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34used byrustversion
1.0.22crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46dsame-file
1.0.6crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502depends onused bysaphyr-parser-bw
0.0.607crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2f9bae8d059bf1ca32753cf3cdafbf5d391502de2fc2ca54510811fe9c100d90used byserde
1.0.228crates.io↘ 2↖ 10sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9edepends onserde_core
1.0.228crates.io↘ 1↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67addepends onserde_derive
1.0.228crates.io↘ 3↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79depends onserde_json
1.0.149crates.io↘ 6↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86serde-saphyr
0.0.17crates.io↘ 13↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbc14a55107113a16346915d7e3d78acc539a923458385db89670e22cac106d7adepends onused bysha1
0.10.6crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6badepends onused bysha2
0.10.9crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283depends onused bysha3
0.10.8crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60depends onused bysimilar
2.7.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daaused bysmallvec
1.15.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03used bysmallvec
2.0.0-alpha.12crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumef784004ca8777809dcdad6ac37629f0a97caee4c685fcea805278d81dd8b857stacker
0.1.23crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum08d74a23609d509411d10e2176dc2a4346e3b4aea2e7b1869f19fdedbc71c013static_assertions
1.1.0crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543fstr_indices
0.4.4crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd08889ec5408683408db66ad89e0e1f93dff55c73a4ccc71c427d5b277ee47e6used bystreaming-iterator
0.1.9crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520strip-ansi-escapes
0.2.1crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2a8f8038e7e7969abb3f1b7c2a811225e9296da208539e0f79c5251d6cac0025depends onstrsim
0.11.1crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4fsyn
2.0.114crates.io↘ 3↖ 14sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2aused by- clap_derive
4.5.55 - educe
0.6.0 - enum-ordinalize-derive
4.3.2 - extension-trait
1.0.2 - jrsonnet-gcmodule-derive
0.4.2 - jrsonnet-macros
0.5.0-pre97 - logos-codegen
0.16.1 - ouroboros_macro
0.18.5 - proc-macro2-diagnostics
0.10.1 - serde_derive
1.0.228 - syn-dissect-closure
0.1.0 - thiserror-impl
2.0.18 - wasm-bindgen-macro-support
0.2.108 - zerocopy-derive
0.8.39
- clap_derive
syn-dissect-closure
0.1.0crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum343bae741672e4b94421cbe93f9794ba9a061434272f7e3a29ff43be26be3ac9depends onused bytempfile
3.24.0crates.io↘ 5↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9ctests
0.1.0workspace↘ 6↖ 0text-size
1.1.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233used bythiserror
2.0.18crates.io↘ 1↖ 6sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4depends onthiserror-impl
2.0.18crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5depends onused bytree-sitter
0.26.5crates.io↘ 6↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum12987371f54efc9b9306a20dc87ed5aaee9f320c8a8b115e28515c412b2efe39depends onused bytree-sitter-highlight
0.26.5crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2b688407049ea1b55a7e872f138947d22389118b9c4d09b459cb34ca205e41c0used bytree-sitter-language
0.1.7crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782used bytypenum
1.19.0crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bbungrammar
1.16.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma3e5df347f0bf3ec1d670aad6ca5c6a1859cd9ea61d2113125794654ccced68fused byunicode-box-drawing
0.3.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2a1f97719cf40224391201fc11e7f5b0cc0ba21416367cfc914e2d45af4e42efused byunicode-ident
1.0.22crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5unicode-width
0.2.2crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254utf8parse
0.2.2crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821version_check
0.9.5crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105avte
0.14.1crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum231fdcd7ef3037e8330d8e17e61011a2c244126acc0a982f4040ac3f9f0bc077depends onused bywalkdir
2.5.0crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4bdepends onused bywasip2
1.0.2+wasi-0.2.9crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5depends onused bywasm-bindgen
0.2.108crates.io↘ 5↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566depends onused bywasm-bindgen-macro
0.2.108crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608used bywasm-bindgen-macro-support
0.2.108crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55used bywinapi-util
0.1.11crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumc2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22depends onused bywindows_aarch64_gnullvm
0.52.6crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3used bywindows_aarch64_msvc
0.52.6crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469used bywindows_i686_gnu
0.52.6crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0bused bywindows_i686_gnullvm
0.52.6crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66used bywindows_i686_msvc
0.52.6crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66used bywindows_x86_64_gnu
0.52.6crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78used bywindows_x86_64_gnullvm
0.52.6crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0dused bywindows_x86_64_msvc
0.52.6crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ecused bywindows-link
0.2.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5used bywindows-sys
0.59.0crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853bdepends onused bywindows-sys
0.61.2crates.io↘ 1↖ 6sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fcdepends onwindows-targets
0.52.6crates.io↘ 8↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973depends onused bywit-bindgen
0.51.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5used byxshell
0.2.7crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9e7290c623014758632efe00737145b6867b66292c42167f2ec381eb566a373ddepends onused byxshell-macros
0.2.7crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum32ac00cd3f8ec9c1d33fb3e7958a82df6989c42d747bd326c822b1d625283547used byxtask
0.1.0workspace↘ 8↖ 0yansi
1.0.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049zerocopy
0.8.39crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumdb6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4adepends onused byzerocopy-derive
0.8.39crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517depends onused byzmij
1.0.19crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,20 +8,20 @@
edition = "2021"
license = "MIT"
repository = "https://github.com/CertainLach/jrsonnet"
-version = "0.5.0-pre97"
+version = "0.5.0-pre98"
[workspace.dependencies]
-jrsonnet-evaluator = { path = "./crates/jrsonnet-evaluator", version = "0.5.0-pre97" }
-jrsonnet-macros = { path = "./crates/jrsonnet-macros", version = "0.5.0-pre97" }
-jrsonnet-ir = { path = "./crates/jrsonnet-ir", version = "0.5.0-pre97" }
-jrsonnet-ir-parser = { path = "./crates/jrsonnet-ir-parser", version = "0.5.0-pre97" }
-jrsonnet-peg-parser = { path = "./crates/jrsonnet-peg-parser", version = "0.5.0-pre97" }
-jrsonnet-rowan-parser = { path = "./crates/jrsonnet-rowan-parser", version = "0.5.0-pre97" }
-jrsonnet-interner = { path = "./crates/jrsonnet-interner", version = "0.5.0-pre97" }
-jrsonnet-stdlib = { path = "./crates/jrsonnet-stdlib", version = "0.5.0-pre97" }
-jrsonnet-cli = { path = "./crates/jrsonnet-cli", version = "0.5.0-pre97" }
-jrsonnet-types = { path = "./crates/jrsonnet-types", version = "0.5.0-pre97" }
-jrsonnet-formatter = { path = "./crates/jrsonnet-formatter", version = "0.5.0-pre97" }
+jrsonnet-evaluator = { path = "./crates/jrsonnet-evaluator", version = "0.5.0-pre98" }
+jrsonnet-macros = { path = "./crates/jrsonnet-macros", version = "0.5.0-pre98" }
+jrsonnet-ir = { path = "./crates/jrsonnet-ir", version = "0.5.0-pre98" }
+jrsonnet-ir-parser = { path = "./crates/jrsonnet-ir-parser", version = "0.5.0-pre98" }
+jrsonnet-peg-parser = { path = "./crates/jrsonnet-peg-parser", version = "0.5.0-pre98" }
+jrsonnet-rowan-parser = { path = "./crates/jrsonnet-rowan-parser", version = "0.5.0-pre98" }
+jrsonnet-interner = { path = "./crates/jrsonnet-interner", version = "0.5.0-pre98" }
+jrsonnet-stdlib = { path = "./crates/jrsonnet-stdlib", version = "0.5.0-pre98" }
+jrsonnet-cli = { path = "./crates/jrsonnet-cli", version = "0.5.0-pre98" }
+jrsonnet-types = { path = "./crates/jrsonnet-types", version = "0.5.0-pre98" }
+jrsonnet-formatter = { path = "./crates/jrsonnet-formatter", version = "0.5.0-pre98" }
jrsonnet-gcmodule = { version = "0.4.2" }
# Diagnostics.
# hi-doc is my library, which handles text formatting very well, but isn't polished enough yet
bindings/jsonnet/Cargo.tomldiffbeforeafterboth--- a/bindings/jsonnet/Cargo.toml
+++ b/bindings/jsonnet/Cargo.toml
@@ -39,5 +39,8 @@
interop-threading = []
experimental = ["exp-preserve-order", "exp-destruct"]
-exp-preserve-order = ["jrsonnet-evaluator/exp-preserve-order", "jrsonnet-stdlib/exp-preserve-order"]
+exp-preserve-order = [
+ "jrsonnet-evaluator/exp-preserve-order",
+ "jrsonnet-stdlib/exp-preserve-order",
+]
exp-destruct = ["jrsonnet-evaluator/exp-destruct"]
bindings/jsonnet/src/import.rsdiffbeforeafterboth--- a/bindings/jsonnet/src/import.rs
+++ b/bindings/jsonnet/src/import.rs
@@ -5,16 +5,15 @@
cell::RefCell,
collections::HashMap,
env::current_dir,
- ffi::{c_void, CStr, CString},
+ ffi::{CStr, CString, c_void},
os::raw::{c_char, c_int},
path::PathBuf,
ptr::null_mut,
};
use jrsonnet_evaluator::{
- bail,
+ AsPathLike, ImportResolver, ResolvePath, bail,
error::{ErrorKind::*, Result},
- AsPathLike, ImportResolver, ResolvePath,
};
use jrsonnet_gcmodule::Acyclic;
use jrsonnet_ir::{SourceDirectory, SourceFile, SourcePath};
bindings/jsonnet/src/lib.rsdiffbeforeafterboth--- a/bindings/jsonnet/src/lib.rs
+++ b/bindings/jsonnet/src/lib.rs
@@ -21,14 +21,13 @@
};
use jrsonnet_evaluator::{
- apply_tla, bail,
+ AsPathLike, FileImportResolver, IStr, ImportResolver, Result, State, Val, apply_tla, bail,
gc::WithCapacityExt as _,
manifest::{JsonFormat, ManifestFormat, ToStringFormat},
rustc_hash::FxHashMap,
stack::set_stack_depth_limit,
tla::TlaArg,
trace::{CompactFormat, PathResolver, TraceFormat},
- AsPathLike, FileImportResolver, IStr, ImportResolver, Result, State, Val,
};
use jrsonnet_gcmodule::Acyclic;
use jrsonnet_ir::SourcePath;
bindings/jsonnet/src/native.rsdiffbeforeafterboth--- a/bindings/jsonnet/src/native.rs
+++ b/bindings/jsonnet/src/native.rs
@@ -1,13 +1,13 @@
use std::{
- ffi::{c_void, CStr},
+ ffi::{CStr, c_void},
os::raw::{c_char, c_int},
};
use jrsonnet_evaluator::{
+ IStr, Val,
error::{Error, ErrorKind},
function::builtin::{NativeCallback, NativeCallbackHandler},
typed::FromUntyped as _,
- IStr, Val,
};
use crate::VM;
bindings/jsonnet/src/val_make.rsdiffbeforeafterboth--- a/bindings/jsonnet/src/val_make.rs
+++ b/bindings/jsonnet/src/val_make.rs
@@ -6,8 +6,8 @@
};
use jrsonnet_evaluator::{
+ ObjValue, Val,
val::{ArrValue, NumValue},
- ObjValue, Val,
};
use crate::VM;
bindings/jsonnet/src/val_modify.rsdiffbeforeafterboth--- a/bindings/jsonnet/src/val_modify.rs
+++ b/bindings/jsonnet/src/val_modify.rs
@@ -4,7 +4,7 @@
use std::{ffi::CStr, os::raw::c_char};
-use jrsonnet_evaluator::{val::ArrValue, Thunk, Val};
+use jrsonnet_evaluator::{Thunk, Val, val::ArrValue};
use crate::VM;
bindings/jsonnet/src/vars_tlas.rsdiffbeforeafterboth--- a/bindings/jsonnet/src/vars_tlas.rs
+++ b/bindings/jsonnet/src/vars_tlas.rs
@@ -2,8 +2,7 @@
use std::{ffi::CStr, os::raw::c_char};
-use jrsonnet_evaluator::tla::TlaArg;
-use jrsonnet_evaluator::IStr;
+use jrsonnet_evaluator::{IStr, tla::TlaArg};
use crate::VM;
cmds/jrsonnet-deps/src/main.rsdiffbeforeafterboth--- a/cmds/jrsonnet-deps/src/main.rs
+++ b/cmds/jrsonnet-deps/src/main.rs
@@ -1,12 +1,10 @@
-use std::collections::BTreeSet;
-use std::process::exit;
+use std::{collections::BTreeSet, process::exit};
use clap::Parser;
+use jrsonnet_cli::MiscOpts;
use jrsonnet_evaluator::{FileImportResolver, ImportResolver};
-use jrsonnet_ir::{visit::Visitor, IStr, Source, SourcePath};
+use jrsonnet_ir::{IStr, Source, SourcePath, visit::Visitor};
use jrsonnet_ir_parser::ParserSettings;
-
-use jrsonnet_cli::MiscOpts;
#[derive(Parser)]
struct Opts {
cmds/jrsonnet-fmt/src/main.rsdiffbeforeafterboth--- a/cmds/jrsonnet-fmt/src/main.rs
+++ b/cmds/jrsonnet-fmt/src/main.rs
@@ -6,7 +6,7 @@
};
use clap::Parser;
-use jrsonnet_formatter::{format, FormatOptions};
+use jrsonnet_formatter::{FormatOptions, format};
#[derive(Parser)]
#[allow(clippy::struct_excessive_bools)]
@@ -51,8 +51,12 @@
}
fn main_result() -> Result<(), Error> {
- eprintln!("jrsonnet-fmt is a prototype of a jsonnet code formatter, do not expect it to produce meaningful results right now.");
- eprintln!("It is not expected for its output to match other implementations, it will be completly separate implementation with maybe different name.");
+ eprintln!(
+ "jrsonnet-fmt is a prototype of a jsonnet code formatter, do not expect it to produce meaningful results right now."
+ );
+ eprintln!(
+ "It is not expected for its output to match other implementations, it will be completly separate implementation with maybe different name."
+ );
let mut opts = Opts::parse();
let input = if opts.exec {
if opts.in_place {
cmds/jrsonnet/Cargo.tomldiffbeforeafterboth--- a/cmds/jrsonnet/Cargo.toml
+++ b/cmds/jrsonnet/Cargo.toml
@@ -12,19 +12,19 @@
[features]
experimental = [
- "exp-preserve-order",
- "exp-destruct",
- "exp-null-coaelse",
- "exp-object-iteration",
- "exp-bigint",
- "exp-apply",
+ "exp-preserve-order",
+ "exp-destruct",
+ "exp-null-coaelse",
+ "exp-object-iteration",
+ "exp-bigint",
+ "exp-apply",
]
# Use mimalloc as allocator
mimalloc = ["mimallocator"]
# Experimental feature, which allows to preserve order of object fields
exp-preserve-order = [
- "jrsonnet-evaluator/exp-preserve-order",
- "jrsonnet-cli/exp-preserve-order",
+ "jrsonnet-evaluator/exp-preserve-order",
+ "jrsonnet-cli/exp-preserve-order",
]
# Destructuring of locals
exp-destruct = ["jrsonnet-evaluator/exp-destruct"]
@@ -36,9 +36,9 @@
exp-regex = ["jrsonnet-cli/exp-regex"]
# obj?.field, obj?.['field']
exp-null-coaelse = [
- "jrsonnet-evaluator/exp-null-coaelse",
- "jrsonnet-ir/exp-null-coaelse",
- "jrsonnet-cli/exp-null-coaelse",
+ "jrsonnet-evaluator/exp-null-coaelse",
+ "jrsonnet-ir/exp-null-coaelse",
+ "jrsonnet-cli/exp-null-coaelse",
]
# --exp-apply
exp-apply = []
cmds/jrsonnet/src/main.rsdiffbeforeafterboth--- a/cmds/jrsonnet/src/main.rs
+++ b/cmds/jrsonnet/src/main.rs
@@ -1,5 +1,5 @@
use std::{
- fs::{create_dir_all, File},
+ fs::{File, create_dir_all},
io::{Read, Write},
};
@@ -7,9 +7,8 @@
use clap_complete::Shell;
use jrsonnet_cli::{GcOpts, ManifestOpts, MiscOpts, OutputOpts, StdOpts, TlaOpts, TraceOpts};
use jrsonnet_evaluator::{
- apply_tla, bail,
+ ResultExt, State, Val, apply_tla, bail,
error::{Error as JrError, ErrorKind},
- ResultExt, State, Val,
};
use jrsonnet_ir::{SourceDefaultIgnoreJpath, SourcePath};
crates/jrsonnet-cli/Cargo.tomldiffbeforeafterboth--- a/crates/jrsonnet-cli/Cargo.toml
+++ b/crates/jrsonnet-cli/Cargo.toml
@@ -12,20 +12,15 @@
[features]
exp-preserve-order = [
- "jrsonnet-evaluator/exp-preserve-order",
- "jrsonnet-stdlib/exp-preserve-order",
-]
-exp-bigint = [
- "jrsonnet-evaluator/exp-bigint",
- "jrsonnet-stdlib/exp-bigint",
+ "jrsonnet-evaluator/exp-preserve-order",
+ "jrsonnet-stdlib/exp-preserve-order",
]
+exp-bigint = ["jrsonnet-evaluator/exp-bigint", "jrsonnet-stdlib/exp-bigint"]
exp-null-coaelse = [
- "jrsonnet-evaluator/exp-null-coaelse",
- "jrsonnet-stdlib/exp-null-coaelse",
+ "jrsonnet-evaluator/exp-null-coaelse",
+ "jrsonnet-stdlib/exp-null-coaelse",
]
-exp-regex = [
- "jrsonnet-stdlib/exp-regex",
-]
+exp-regex = ["jrsonnet-stdlib/exp-regex"]
[dependencies]
jrsonnet-evaluator = { workspace = true, features = ["explaining-traces"] }
crates/jrsonnet-cli/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-cli/src/lib.rs
+++ b/crates/jrsonnet-cli/src/lib.rs
@@ -7,10 +7,10 @@
use clap::Parser;
use jrsonnet_evaluator::{
- stack::{limit_stack_depth, StackDepthLimitOverrideGuard},
FileImportResolver,
+ stack::{StackDepthLimitOverrideGuard, limit_stack_depth},
};
-use jrsonnet_gcmodule::{with_thread_object_space, ObjectSpace};
+use jrsonnet_gcmodule::{ObjectSpace, with_thread_object_space};
pub use manifest::*;
pub use stdlib::*;
pub use tla::*;
crates/jrsonnet-cli/src/stdlib.rsdiffbeforeafterboth--- a/crates/jrsonnet-cli/src/stdlib.rs
+++ b/crates/jrsonnet-cli/src/stdlib.rs
@@ -1,8 +1,7 @@
use std::str::FromStr;
use clap::Parser;
-use jrsonnet_evaluator::tla::TlaArg;
-use jrsonnet_evaluator::{trace::PathResolver, Result};
+use jrsonnet_evaluator::{Result, tla::TlaArg, trace::PathResolver};
use jrsonnet_stdlib::ContextInitializer;
#[derive(Clone)]
crates/jrsonnet-cli/src/tla.rsdiffbeforeafterboth--- a/crates/jrsonnet-cli/src/tla.rs
+++ b/crates/jrsonnet-cli/src/tla.rs
@@ -1,6 +1,7 @@
use clap::Parser;
-use jrsonnet_evaluator::tla::TlaArg;
-use jrsonnet_evaluator::{error::Result, gc::WithCapacityExt as _, rustc_hash::FxHashMap, IStr};
+use jrsonnet_evaluator::{
+ IStr, error::Result, gc::WithCapacityExt as _, rustc_hash::FxHashMap, tla::TlaArg,
+};
use crate::{ExtFile, ExtStr};
crates/jrsonnet-evaluator/Cargo.tomldiffbeforeafterboth--- a/crates/jrsonnet-evaluator/Cargo.toml
+++ b/crates/jrsonnet-evaluator/Cargo.toml
@@ -26,13 +26,19 @@
# Allows to preserve field order in objects
exp-preserve-order = []
# Implements field destructuring
-exp-destruct = ["jrsonnet-peg-parser?/exp-destruct", "jrsonnet-ir-parser?/exp-destruct"]
+exp-destruct = [
+ "jrsonnet-peg-parser?/exp-destruct",
+ "jrsonnet-ir-parser?/exp-destruct",
+]
# Iteration over objects yields [key, value] elements
exp-object-iteration = []
# Bigint type
exp-bigint = ["num-bigint", "jrsonnet-types/exp-bigint"]
# obj?.field, obj?.['field']
-exp-null-coaelse = ["jrsonnet-peg-parser?/exp-null-coaelse", "jrsonnet-ir-parser?/exp-null-coaelse"]
+exp-null-coaelse = [
+ "jrsonnet-peg-parser?/exp-null-coaelse",
+ "jrsonnet-ir-parser?/exp-null-coaelse",
+]
[dependencies]
jrsonnet-interner.workspace = true
@@ -63,7 +69,13 @@
num-bigint = { workspace = true, features = ["serde"], optional = true }
stacker = "0.1.23"
-educe = { version = "0.6.0", default-features = false, features = ["Clone", "Debug", "Eq", "Hash", "PartialEq"] }
+educe = { version = "0.6.0", default-features = false, features = [
+ "Clone",
+ "Debug",
+ "Eq",
+ "Hash",
+ "PartialEq",
+] }
[build-dependencies]
rustversion = "1.0.22"
crates/jrsonnet-evaluator/src/arr/mod.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/arr/mod.rs
+++ b/crates/jrsonnet-evaluator/src/arr/mod.rs
@@ -5,11 +5,11 @@
rc::Rc,
};
-use jrsonnet_gcmodule::{cc_dyn, Cc};
+use jrsonnet_gcmodule::{Cc, cc_dyn};
use jrsonnet_interner::IBytes;
use jrsonnet_ir::Expr;
-use crate::{function::NativeFn, typed::IntoUntyped, Context, Result, Thunk, Val};
+use crate::{Context, Result, Thunk, Val, function::NativeFn, typed::IntoUntyped};
mod spec;
pub use spec::{ArrayLike, *};
crates/jrsonnet-evaluator/src/arr/spec.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/arr/spec.rs
+++ b/crates/jrsonnet-evaluator/src/arr/spec.rs
@@ -1,18 +1,17 @@
-use std::rc::Rc;
-use std::{any::Any, cell::RefCell, fmt::Debug, mem::replace};
+use std::{any::Any, cell::RefCell, fmt::Debug, mem::replace, rc::Rc};
use jrsonnet_gcmodule::{Cc, Trace};
use jrsonnet_interner::{IBytes, IStr};
use jrsonnet_ir::Expr;
use super::ArrValue;
-use crate::function::NativeFn;
use crate::{
+ Context, Error, ObjValue, Result, Thunk, Val,
error::ErrorKind::InfiniteRecursionDetected,
evaluate,
+ function::NativeFn,
typed::{IntoUntyped, Typed},
val::ThunkValue,
- Context, Error, ObjValue, Result, Thunk, Val,
};
pub trait ArrayLike: Any + Trace + Debug {
crates/jrsonnet-evaluator/src/async_import.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/async_import.rs
+++ b/crates/jrsonnet-evaluator/src/async_import.rs
@@ -1,9 +1,7 @@
-use std::rc::Rc;
-use std::{any::Any, cell::RefCell, future::Future};
+use std::{any::Any, cell::RefCell, future::Future, rc::Rc};
use jrsonnet_gcmodule::Acyclic;
-use jrsonnet_ir::visit::Visitor;
-use jrsonnet_ir::{IStr, Source, SourcePath};
+use jrsonnet_ir::{IStr, Source, SourcePath, visit::Visitor};
use rustc_hash::FxHashMap;
use crate::{AsPathLike, FileData, ImportResolver, ResolvePathOwned, State};
crates/jrsonnet-evaluator/src/ctx.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/ctx.rs
+++ b/crates/jrsonnet-evaluator/src/ctx.rs
@@ -6,8 +6,8 @@
use rustc_hash::FxHashMap;
use crate::{
- error::ErrorKind::*, gc::WithCapacityExt as _, map::LayeredHashMap, ObjValue, Pending, Result,
- SupThis, Thunk, Val,
+ ObjValue, Pending, Result, SupThis, Thunk, Val, error::ErrorKind::*, gc::WithCapacityExt as _,
+ map::LayeredHashMap,
};
/// Context keeps information about current lexical code location
///
crates/jrsonnet-evaluator/src/dynamic.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/dynamic.rs
+++ b/crates/jrsonnet-evaluator/src/dynamic.rs
@@ -3,7 +3,7 @@
use educe::Educe;
use jrsonnet_gcmodule::{Cc, Trace};
-use crate::{bail, error::ErrorKind::InfiniteRecursionDetected, val::ThunkValue, Result};
+use crate::{Result, bail, error::ErrorKind::InfiniteRecursionDetected, val::ThunkValue};
#[derive(Trace, Educe)]
#[educe(Clone)]
crates/jrsonnet-evaluator/src/error.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/error.rs
+++ b/crates/jrsonnet-evaluator/src/error.rs
@@ -7,11 +7,11 @@
use thiserror::Error;
use crate::{
+ ObjValue, ResolvePathOwned,
function::{CallLocation, FunctionSignature, ParamName},
stdlib::format::FormatError,
typed::TypeLocError,
val::ConvertNumValueError,
- ObjValue, ResolvePathOwned,
};
#[derive(Debug, Clone)]
@@ -78,7 +78,10 @@
if conf < 0.8 {
continue;
}
- assert!(field.as_str() != key.as_str(), "looks like string pooling failure, please write any info regarding this crash to https://github.com/CertainLach/jrsonnet/issues/113, thanks!");
+ assert!(
+ field.as_str() != key.as_str(),
+ "looks like string pooling failure, please write any info regarding this crash to https://github.com/CertainLach/jrsonnet/issues/113, thanks!"
+ );
heap.push((conf, field));
}
@@ -271,11 +274,11 @@
}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- writeln!(f, "{}", self.0 .0)?;
- for el in &self.0 .1 .0 {
+ writeln!(f, "{}", self.0.0)?;
+ for el in &self.0.1.0 {
write!(f, "\t{}", el.desc)?;
if let Some(loc) = &el.location {
- write!(f, "at {}", loc.0 .0 .0)?;
+ write!(f, "at {}", loc.0.0.0)?;
loc.0.map_source_locations(&[loc.1, loc.2]);
}
writeln!(f)?;
crates/jrsonnet-evaluator/src/evaluate/destructure.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/evaluate/destructure.rs
+++ b/crates/jrsonnet-evaluator/src/evaluate/destructure.rs
@@ -3,15 +3,14 @@
use jrsonnet_interner::IStr;
use jrsonnet_ir::{BindSpec, Destruct};
+#[cfg(feature = "exp-preserve-order")]
+use crate::evaluate;
use crate::{
- bail,
+ Context, Pending, Thunk, Val, bail,
error::{ErrorKind::*, Result},
- evaluate_method, evaluate_named_param, Context, Pending, Thunk, Val,
+ evaluate_method, evaluate_named_param,
};
-#[cfg(feature = "exp-preserve-order")]
-use crate::evaluate;
-
#[allow(clippy::too_many_lines)]
#[allow(unused_variables)]
pub fn destruct<H: BuildHasher>(
@@ -107,10 +106,11 @@
}
#[cfg(feature = "exp-destruct")]
Destruct::Object { fields, rest } => {
- use crate::ObjValueBuilder;
use jrsonnet_ir::DestructRest;
use rustc_hash::FxHashSet;
+ use crate::ObjValueBuilder;
+
let captured_fields: FxHashSet<_> = fields.iter().map(|f| f.0.clone()).collect();
let field_names: Vec<_> = fields
.iter()
crates/jrsonnet-evaluator/src/evaluate/mod.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/evaluate/mod.rs
+++ b/crates/jrsonnet-evaluator/src/evaluate/mod.rs
@@ -3,27 +3,28 @@
use jrsonnet_gcmodule::{Cc, Trace};
use jrsonnet_interner::IStr;
use jrsonnet_ir::{
- function::ParamName, ArgsDesc, AssertStmt, BinaryOpType, BindSpec, CompSpec, Expr, ExprParams,
- FieldMember, FieldName, ForSpecData, IfSpecData, ImportKind, LiteralType, ObjBody, ObjMembers,
- Spanned,
+ ArgsDesc, AssertStmt, BinaryOpType, BindSpec, CompSpec, Expr, ExprParams, FieldMember,
+ FieldName, ForSpecData, IfSpecData, ImportKind, LiteralType, ObjBody, ObjMembers, Spanned,
+ function::ParamName,
};
use jrsonnet_types::ValType;
use rustc_hash::FxHashMap;
use self::destructure::destruct;
use crate::{
+ Context, Error, ObjValue, ObjValueBuilder, ObjectAssertion, Pending, Result, ResultExt,
+ SupThis, Unbound, Val,
arr::ArrValue,
bail,
destructure::evaluate_dest,
- error::{suggest_object_fields, ErrorKind::*},
+ error::{ErrorKind::*, suggest_object_fields},
evaluate::operator::{evaluate_binary_op_special, evaluate_unary_op},
function::{CallLocation, FuncDesc, FuncVal},
gc::WithCapacityExt as _,
in_frame,
typed::{FromUntyped, IntoUntyped as _, Typed},
val::{CachedUnbound, IndexableVal, NumValue, StrValue, Thunk},
- with_state, Context, Error, ObjValue, ObjValueBuilder, ObjectAssertion, Pending, Result,
- ResultExt, SupThis, Unbound, Val,
+ with_state,
};
pub mod destructure;
pub mod operator;
crates/jrsonnet-evaluator/src/evaluate/operator.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/evaluate/operator.rs
+++ b/crates/jrsonnet-evaluator/src/evaluate/operator.rs
@@ -3,14 +3,14 @@
use jrsonnet_ir::{BinaryOpType, Expr, UnaryOpType};
use crate::{
+ Context, Result, Val,
arr::ArrValue,
bail,
error::ErrorKind::*,
evaluate,
stdlib::std_format,
typed::IntoUntyped as _,
- val::{equals, StrValue},
- Context, Result, Val,
+ val::{StrValue, equals},
};
pub fn evaluate_unary_op(op: UnaryOpType, b: &Val) -> Result<Val> {
crates/jrsonnet-evaluator/src/function/builtin.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/function/builtin.rs
+++ b/crates/jrsonnet-evaluator/src/function/builtin.rs
@@ -1,6 +1,6 @@
use std::any::Any;
-use jrsonnet_gcmodule::{cc_dyn, Trace, TraceBox};
+use jrsonnet_gcmodule::{Trace, TraceBox, cc_dyn};
use jrsonnet_ir::function::{FunctionSignature, ParamDefault, ParamName, ParamParse};
use super::CallLocation;
crates/jrsonnet-evaluator/src/function/mod.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/function/mod.rs
+++ b/crates/jrsonnet-evaluator/src/function/mod.rs
@@ -9,11 +9,11 @@
use self::{
builtin::{Builtin, StaticBuiltin},
parse::{parse_builtin_call, parse_default_function_call, parse_function_call},
- prepared::{parse_prepared_builtin_call, parse_prepared_function_call, PreparedCall},
+ prepared::{PreparedCall, parse_prepared_builtin_call, parse_prepared_function_call},
};
use crate::{
- bail, error::ErrorKind::*, evaluate, evaluate_trivial, function::builtin::BuiltinFunc, Context,
- Result, Thunk, Val,
+ Context, Result, Thunk, Val, bail, error::ErrorKind::*, evaluate, evaluate_trivial,
+ function::builtin::BuiltinFunc,
};
pub mod builtin;
@@ -21,10 +21,9 @@
mod parse;
mod prepared;
+pub use jrsonnet_ir::function::*;
pub use native::NativeFn;
pub use prepared::PreparedFuncVal;
-
-pub use jrsonnet_ir::function::*;
/// Function callsite location.
/// Either from other jsonnet code, specified by expression location, or from native (without location).
crates/jrsonnet-evaluator/src/function/native.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/function/native.rs
+++ b/crates/jrsonnet-evaluator/src/function/native.rs
@@ -1,14 +1,14 @@
use std::marker::PhantomData;
use jrsonnet_gcmodule::Trace;
+use jrsonnet_types::{ComplexValType, ValType};
use super::PreparedFuncVal;
use crate::{
+ CallLocation, Result, Val,
function::FuncVal,
typed::{FromUntyped, IntoUntyped, Typed},
- CallLocation, Result, Val,
};
-use jrsonnet_types::{ComplexValType, ValType};
#[derive(Debug, Trace, Clone)]
pub struct NativeFn<D: 'static>(pub(crate) PreparedFuncVal, PhantomData<D>);
crates/jrsonnet-evaluator/src/function/parse.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/function/parse.rs
+++ b/crates/jrsonnet-evaluator/src/function/parse.rs
@@ -1,18 +1,17 @@
use std::rc::Rc;
use jrsonnet_ir::{
+ ArgsDesc, Expr, ExprParams,
function::{FunctionSignature, ParamName},
- ArgsDesc, Expr, ExprParams,
};
use rustc_hash::FxHashMap;
use crate::{
- bail,
+ Context, Pending, Thunk, Val, bail,
destructure::destruct,
error::{ErrorKind::*, Result},
evaluate, evaluate_named_param,
gc::WithCapacityExt as _,
- Context, Pending, Thunk, Val,
};
fn eval_arg(ctx: Context, arg: &Rc<Expr>, tailstrict: bool) -> Result<Thunk<Val>> {
crates/jrsonnet-evaluator/src/function/prepared.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/function/prepared.rs
+++ b/crates/jrsonnet-evaluator/src/function/prepared.rs
@@ -1,16 +1,14 @@
use std::rc::Rc;
use jrsonnet_gcmodule::{Acyclic, Trace};
-use jrsonnet_ir::function::FunctionSignature;
-use jrsonnet_ir::{ExprParams, IStr};
+use jrsonnet_ir::{ExprParams, IStr, function::FunctionSignature};
use rustc_hash::{FxHashMap, FxHashSet};
-
-use crate::destructure::destruct;
-use crate::gc::WithCapacityExt;
-use crate::{bail, error::ErrorKind::*, Result};
-use crate::{evaluate_named_param, Context, ContextBuilder, Pending, Thunk, Val};
use super::{CallLocation, FuncVal};
+use crate::{
+ Context, ContextBuilder, Pending, Result, Thunk, Val, bail, destructure::destruct,
+ error::ErrorKind::*, evaluate_named_param, gc::WithCapacityExt,
+};
#[derive(Debug, Trace, Clone)]
pub struct PreparedFuncVal {
crates/jrsonnet-evaluator/src/integrations/serde.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/integrations/serde.rs
+++ b/crates/jrsonnet-evaluator/src/integrations/serde.rs
@@ -2,17 +2,17 @@
use jrsonnet_interner::IStr;
use serde::{
+ Deserialize, Serialize, Serializer,
de::{self, Visitor},
ser::{
Error, SerializeMap, SerializeSeq, SerializeStruct, SerializeStructVariant, SerializeTuple,
SerializeTupleStruct, SerializeTupleVariant,
},
- Deserialize, Serialize, Serializer,
};
use crate::{
- arr::ArrValue, in_description_frame, runtime_error, val::NumValue, Error as JrError, ObjValue,
- ObjValueBuilder, Result, Val,
+ Error as JrError, ObjValue, ObjValueBuilder, Result, Val, arr::ArrValue, in_description_frame,
+ runtime_error, val::NumValue,
};
impl<'de> Deserialize<'de> for Val {
crates/jrsonnet-evaluator/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/lib.rs
+++ b/crates/jrsonnet-evaluator/src/lib.rs
@@ -40,7 +40,7 @@
pub use evaluate::*;
use function::CallLocation;
pub use import::*;
-use jrsonnet_gcmodule::{cc_dyn, Cc, Trace};
+use jrsonnet_gcmodule::{Cc, Trace, cc_dyn};
pub use jrsonnet_interner::{IBytes, IStr};
pub use jrsonnet_ir as parser;
use jrsonnet_ir::{Expr, Source, SourcePath};
crates/jrsonnet-evaluator/src/manifest.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/manifest.rs
+++ b/crates/jrsonnet-evaluator/src/manifest.rs
@@ -1,6 +1,6 @@
use std::{borrow::Cow, fmt::Write, ptr};
-use crate::{bail, in_description_frame, Result, ResultExt, Val};
+use crate::{Result, ResultExt, Val, bail, in_description_frame};
pub trait ManifestFormat {
fn manifest_buf(&self, val: Val, buf: &mut String) -> Result<()>;
crates/jrsonnet-evaluator/src/map.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/map.rs
+++ b/crates/jrsonnet-evaluator/src/map.rs
@@ -2,7 +2,7 @@
use jrsonnet_interner::IStr;
use rustc_hash::FxHashMap;
-use crate::{gc::WithCapacityExt as _, Thunk, Val};
+use crate::{Thunk, Val, gc::WithCapacityExt as _};
#[derive(Trace, Debug)]
#[trace(tracking(force))]
crates/jrsonnet-evaluator/src/obj/mod.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/obj/mod.rs
+++ b/crates/jrsonnet-evaluator/src/obj/mod.rs
@@ -11,7 +11,7 @@
};
use educe::Educe;
-use jrsonnet_gcmodule::{cc_dyn, Acyclic, Cc, Trace, Weak};
+use jrsonnet_gcmodule::{Acyclic, Cc, Trace, Weak, cc_dyn};
use jrsonnet_interner::IStr;
use jrsonnet_ir::Span;
use rustc_hash::{FxHashMap, FxHashSet};
@@ -22,13 +22,13 @@
pub use oop::ObjValueBuilder;
use crate::{
+ CcUnbound, MaybeUnbound, Result, Thunk, Unbound, Val,
arr::{PickObjectKeyValues, PickObjectValues},
bail,
- error::{suggest_object_fields, ErrorKind::*},
+ error::{ErrorKind::*, suggest_object_fields},
identity_hash,
operator::evaluate_add_op,
val::{ArrValue, ThunkValue},
- CcUnbound, MaybeUnbound, Result, Thunk, Unbound, Val,
};
#[cfg(not(feature = "exp-preserve-order"))]
crates/jrsonnet-evaluator/src/obj/oop.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/obj/oop.rs
+++ b/crates/jrsonnet-evaluator/src/obj/oop.rs
@@ -1,21 +1,25 @@
-use std::cell::{Cell, RefCell};
-use std::ops::ControlFlow;
-use std::{fmt, mem};
+use std::{
+ cell::{Cell, RefCell},
+ fmt, mem,
+ ops::ControlFlow,
+};
-use crate::function::{CallLocation, FuncVal};
-use crate::gc::WithCapacityExt as _;
-use crate::{
- bail, error::ErrorKind::*, in_frame, CcUnbound, MaybeUnbound, Result, Thunk, Unbound, Val,
-};
use jrsonnet_gcmodule::{Cc, Trace};
use jrsonnet_ir::IStr;
use rustc_hash::{FxHashMap, FxHashSet};
-use super::ordering::{FieldIndex, SuperDepth};
use super::{
CcObjectAssertion, CcObjectCore, EnumFields, EnumFieldsHandler, FieldVisibility, GetFor,
HasFieldIncludeHidden, ObjMember, ObjMemberBuilder, ObjValue, ObjValueInner, ObjectAssertion,
ObjectCore, OmitFieldsCore, SupThis,
+ ordering::{FieldIndex, SuperDepth},
+};
+use crate::{
+ CcUnbound, MaybeUnbound, Result, Thunk, Unbound, Val, bail,
+ error::ErrorKind::*,
+ function::{CallLocation, FuncVal},
+ gc::WithCapacityExt as _,
+ in_frame,
};
#[allow(clippy::module_name_repetitions)]
crates/jrsonnet-evaluator/src/stdlib/format.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/stdlib/format.rs
+++ b/crates/jrsonnet-evaluator/src/stdlib/format.rs
@@ -7,10 +7,9 @@
use thiserror::Error;
use crate::{
- bail,
- error::{format_found, suggest_object_fields, ErrorKind::*},
+ Error, ObjValue, Result, Val, bail,
+ error::{ErrorKind::*, format_found, suggest_object_fields},
typed::FromUntyped,
- Error, ObjValue, Result, Val,
};
#[derive(Debug, Clone, Error, Trace)]
crates/jrsonnet-evaluator/src/stdlib/mod.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/stdlib/mod.rs
+++ b/crates/jrsonnet-evaluator/src/stdlib/mod.rs
@@ -3,7 +3,7 @@
use format::{format_arr, format_obj};
-use crate::{function::CallLocation, in_frame, Result, Val};
+use crate::{Result, Val, function::CallLocation, in_frame};
pub mod format;
crates/jrsonnet-evaluator/src/tla.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/tla.rs
+++ b/crates/jrsonnet-evaluator/src/tla.rs
@@ -5,8 +5,9 @@
use jrsonnet_ir::{SourceFifo, SourcePath};
use crate::{
+ Result, Thunk, Val,
function::{CallLocation, PreparedFuncVal},
- in_description_frame, with_state, Result, Thunk, Val,
+ in_description_frame, with_state,
};
#[derive(Clone, Trace)]
crates/jrsonnet-evaluator/src/trace/mod.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/trace/mod.rs
+++ b/crates/jrsonnet-evaluator/src/trace/mod.rs
@@ -10,7 +10,7 @@
#[cfg(feature = "explaining-traces")]
use jrsonnet_ir::Span;
-use crate::{error::ErrorKind, Error};
+use crate::{Error, error::ErrorKind};
/// The way paths should be displayed
#[derive(Clone, Trace)]
@@ -258,7 +258,7 @@
struct ResetData {
loc: Span,
}
- use hi_doc::{source_to_ansi, Formatting, SnippetBuilder, Text};
+ use hi_doc::{Formatting, SnippetBuilder, Text, source_to_ansi};
write!(out, "{}", error.error())?;
if let ErrorKind::ImportSyntaxError { path, error } = error.error() {
crates/jrsonnet-evaluator/src/typed/conversions.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/typed/conversions.rs
+++ b/crates/jrsonnet-evaluator/src/typed/conversions.rs
@@ -5,23 +5,23 @@
use jrsonnet_types::{ComplexValType, ValType};
use crate::{
+ ObjValue, ObjValueBuilder, Result, ResultExt, Thunk, Val,
arr::{ArrValue, BytesArray},
bail,
function::FuncVal,
typed::CheckType,
val::{IndexableVal, NumValue, StrValue, ThunkMapper},
- ObjValue, ObjValueBuilder, Result, ResultExt, Thunk, Val,
};
#[doc(hidden)]
pub mod __typed_macro_prelude {
pub use ::jrsonnet_evaluator::{
+ IStr, ObjValue, ObjValueBuilder, State, Val,
error::{ErrorKind, Result as JrResult},
typed::{
CheckType, ComplexValType, FromUntyped, IntoUntyped, ParseTypedObj, SerializeTypedObj,
Typed,
},
- IStr, ObjValue, ObjValueBuilder, State, Val,
};
}
pub use jrsonnet_macros::{FromUntyped, IntoUntyped, Typed};
crates/jrsonnet-evaluator/src/typed/mod.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/typed/mod.rs
+++ b/crates/jrsonnet-evaluator/src/typed/mod.rs
@@ -7,8 +7,9 @@
use thiserror::Error;
use crate::{
+ Val,
error::{Error, ErrorKind, Result},
- in_description_frame, Val,
+ in_description_frame,
};
#[derive(Debug, Error, Clone, Acyclic)]
crates/jrsonnet-evaluator/src/val.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/val.rs
+++ b/crates/jrsonnet-evaluator/src/val.rs
@@ -9,7 +9,7 @@
rc::Rc,
};
-use jrsonnet_gcmodule::{cc_dyn, Acyclic, Cc, Trace};
+use jrsonnet_gcmodule::{Acyclic, Cc, Trace, cc_dyn};
use jrsonnet_interner::IStr;
pub use jrsonnet_macros::Thunk;
use jrsonnet_types::ValType;
@@ -18,13 +18,12 @@
pub use crate::arr::{ArrValue, ArrayLike};
use crate::{
- bail,
+ ObjValue, Result, SupThis, Unbound, WeakSupThis, bail,
error::{Error, ErrorKind::*},
function::FuncVal,
gc::WithCapacityExt as _,
manifest::{ManifestFormat, ToStringFormat},
typed::{BoundedUsize, MAX_SAFE_INTEGER, MIN_SAFE_INTEGER},
- ObjValue, Result, SupThis, Unbound, WeakSupThis,
};
pub trait ThunkValue: Trace {
crates/jrsonnet-formatter/src/children.rsdiffbeforeafterboth--- a/crates/jrsonnet-formatter/src/children.rs
+++ b/crates/jrsonnet-formatter/src/children.rs
@@ -3,8 +3,8 @@
use std::{fmt::Debug, mem};
use jrsonnet_rowan_parser::{
+ AstNode, AstToken, SyntaxElement, SyntaxNode, TS,
nodes::{CustomError, Trivia, TriviaKind},
- AstNode, AstToken, SyntaxElement, SyntaxNode, TS,
};
pub type ChildTrivia = Vec<Result<Trivia, String>>;
crates/jrsonnet-formatter/src/comments.rsdiffbeforeafterboth--- a/crates/jrsonnet-formatter/src/comments.rs
+++ b/crates/jrsonnet-formatter/src/comments.rs
@@ -1,7 +1,7 @@
use std::string::String;
use dprint_core::formatting::PrintItems;
-use jrsonnet_rowan_parser::{nodes::TriviaKind, AstToken};
+use jrsonnet_rowan_parser::{AstToken, nodes::TriviaKind};
use crate::{children::ChildTrivia, p, pi};
crates/jrsonnet-formatter/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-formatter/src/lib.rs
+++ b/crates/jrsonnet-formatter/src/lib.rs
@@ -2,26 +2,26 @@
use children::{children_between, trivia_before};
use dprint_core::formatting::{
+ ConditionResolver, ConditionResolverContext, LineNumber, PrintItems, PrintOptions,
condition_helpers::is_multiple_lines,
condition_resolvers::true_resolver,
ir_helpers::{new_line_group, with_indent},
- ConditionResolver, ConditionResolverContext, LineNumber, PrintItems, PrintOptions,
};
use hi_doc::{Formatting, SnippetBuilder};
use jrsonnet_lexer::collect_lexed_str_block;
use jrsonnet_rowan_parser::{
+ AstNode, AstToken as _, SyntaxToken,
nodes::{
Arg, ArgsDesc, Assertion, BinaryOperator, Bind, CompSpec, Destruct, DestructArrayPart,
DestructRest, Expr, ExprArray, ExprBase, FieldName, ForSpec, IfSpec, ImportKind, Literal,
Member, Name, Number, ObjBody, ObjLocal, ParamsDesc, SliceDesc, SourceFile, Stmt, Suffix,
Text, TextKind, UnaryOperator, Visibility,
},
- AstNode, AstToken as _, SyntaxToken,
};
use crate::{
- children::{trivia_after, Child, EndingComments},
- comments::{format_comments, CommentLocation},
+ children::{Child, EndingComments, trivia_after},
+ comments::{CommentLocation, format_comments},
};
mod children;
@@ -461,18 +461,10 @@
if mem.should_start_with_newline {
p!(out, nl);
}
- format_comments(
- &mem.before_trivia,
- CommentLocation::AboveItem,
- &mut out,
- );
- p!(&mut out, {mem.value});
+ format_comments(&mem.before_trivia, CommentLocation::AboveItem, &mut out);
+ p!(&mut out, { mem.value });
p!(out, if("trailing comma", multi_line, str(",")));
- format_comments(
- &mem.inline_trivia,
- CommentLocation::ItemInline,
- &mut out,
- );
+ format_comments(&mem.inline_trivia, CommentLocation::ItemInline, &mut out);
p!(out, if_else("member-comp sep", multi_line, nl)(sonl));
}
@@ -490,17 +482,9 @@
if mem.should_start_with_newline {
p!(out, nl);
}
- format_comments(
- &mem.before_trivia,
- CommentLocation::AboveItem,
- &mut out,
- );
+ format_comments(&mem.before_trivia, CommentLocation::AboveItem, &mut out);
p!(&mut out, { mem.value });
- format_comments(
- &mem.inline_trivia,
- CommentLocation::ItemInline,
- &mut out,
- );
+ format_comments(&mem.inline_trivia, CommentLocation::ItemInline, &mut out);
p!(out, if_else("comp spec sep", multi_line, nl)(sonl));
}
crates/jrsonnet-interner/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-interner/src/lib.rs
+++ b/crates/jrsonnet-interner/src/lib.rs
@@ -14,7 +14,7 @@
str,
};
-use hashbrown::{hash_map::RawEntryMut, HashMap};
+use hashbrown::{HashMap, hash_map::RawEntryMut};
use jrsonnet_gcmodule::{Acyclic, Trace};
use rustc_hash::FxBuildHasher;
@@ -242,7 +242,7 @@
pub mod interop {
use std::mem;
- use crate::{PoolMap, POOL};
+ use crate::{POOL, PoolMap};
/// Type-erased interned string pool
pub enum PoolState {}
crates/jrsonnet-ir-parser/Cargo.tomldiffbeforeafterboth--- a/crates/jrsonnet-ir-parser/Cargo.toml
+++ b/crates/jrsonnet-ir-parser/Cargo.toml
@@ -1,5 +1,6 @@
[package]
name = "jrsonnet-ir-parser"
+description = "Jrsonnet hand-rolled parser which parses source directly into IR"
authors.workspace = true
edition.workspace = true
license.workspace = true
crates/jrsonnet-ir-parser/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-ir-parser/src/lib.rs
+++ b/crates/jrsonnet-ir-parser/src/lib.rs
@@ -2,12 +2,12 @@
use jrsonnet_gcmodule::Acyclic;
use jrsonnet_ir::{
- unescape, ArgsDesc, AssertExpr, AssertStmt, BinaryOp, BinaryOpType, BindSpec, CompSpec,
- Destruct, Expr, ExprParam, ExprParams, FieldMember, FieldName, ForSpecData, IStr, IfElse,
- IfSpecData, ImportKind, IndexPart, LiteralType, Member, ObjBody, ObjComp, ObjMembers, Slice,
- SliceDesc, Source, Span, Spanned, UnaryOpType, Visibility,
+ ArgsDesc, AssertExpr, AssertStmt, BinaryOp, BinaryOpType, BindSpec, CompSpec, Destruct, Expr,
+ ExprParam, ExprParams, FieldMember, FieldName, ForSpecData, IStr, IfElse, IfSpecData,
+ ImportKind, IndexPart, LiteralType, Member, ObjBody, ObjComp, ObjMembers, Slice, SliceDesc,
+ Source, Span, Spanned, UnaryOpType, Visibility, unescape,
};
-use jrsonnet_lexer::{collect_lexed_str_block, Lexeme, Lexer, SyntaxKind, T};
+use jrsonnet_lexer::{Lexeme, Lexer, SyntaxKind, T, collect_lexed_str_block};
pub struct ParserSettings {
pub source: Source,
crates/jrsonnet-ir/src/function.rsdiffbeforeafterboth--- a/crates/jrsonnet-ir/src/function.rs
+++ b/crates/jrsonnet-ir/src/function.rs
@@ -1,6 +1,4 @@
-use std::fmt;
-use std::ops::Deref;
-use std::rc::Rc;
+use std::{fmt, ops::Deref, rc::Rc};
use jrsonnet_gcmodule::Acyclic;
use jrsonnet_interner::IStr;
@@ -50,11 +48,7 @@
}
impl ParamDefault {
pub const fn exists(is_exists: bool) -> Self {
- if is_exists {
- Self::Exists
- } else {
- Self::None
- }
+ if is_exists { Self::Exists } else { Self::None }
}
}
impl fmt::Display for ParamDefault {
crates/jrsonnet-ir/src/location.rsdiffbeforeafterboth--- a/crates/jrsonnet-ir/src/location.rs
+++ b/crates/jrsonnet-ir/src/location.rs
@@ -85,7 +85,7 @@
#[cfg(test)]
pub mod tests {
- use super::{offset_to_location, CodeLocation};
+ use super::{CodeLocation, offset_to_location};
#[test]
fn test() {
crates/jrsonnet-ir/src/source.rsdiffbeforeafterboth--- a/crates/jrsonnet-ir/src/source.rs
+++ b/crates/jrsonnet-ir/src/source.rs
@@ -9,7 +9,7 @@
use jrsonnet_gcmodule::Acyclic;
use jrsonnet_interner::{IBytes, IStr};
-use crate::location::{location_to_offset, offset_to_location, CodeLocation};
+use crate::location::{CodeLocation, location_to_offset, offset_to_location};
macro_rules! any_ext_methods {
($T:ident) => {
@@ -286,22 +286,22 @@
}
pub fn code(&self) -> &str {
- &self.0 .1
+ &self.0.1
}
pub fn source_path(&self) -> &SourcePath {
- &self.0 .0
+ &self.0.0
}
pub fn map_source_locations<const S: usize>(&self, locs: &[u32; S]) -> [CodeLocation; S] {
- offset_to_location(&self.0 .1, locs)
+ offset_to_location(&self.0.1, locs)
}
pub fn map_from_source_location(&self, line: usize, column: usize) -> Option<usize> {
- location_to_offset(&self.0 .1, line, column)
+ location_to_offset(&self.0.1, line, column)
}
}
impl fmt::Debug for Source {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- write!(f, "{:?}", self.0 .0)
+ write!(f, "{:?}", self.0.0)
}
}
crates/jrsonnet-lexer/Cargo.tomldiffbeforeafterboth--- a/crates/jrsonnet-lexer/Cargo.toml
+++ b/crates/jrsonnet-lexer/Cargo.toml
@@ -1,5 +1,6 @@
[package]
name = "jrsonnet-lexer"
+description = "Jrsonnet lexer shared between rowan and hand-rolled parser"
authors.workspace = true
edition.workspace = true
license.workspace = true
crates/jrsonnet-lexer/src/lex.rsdiffbeforeafterboth--- a/crates/jrsonnet-lexer/src/lex.rs
+++ b/crates/jrsonnet-lexer/src/lex.rs
@@ -1,12 +1,12 @@
use core::ops::Range;
use logos::Logos;
+
// use rowan::{TextRange, TextSize};
-
use crate::{
+ Span,
generated::syntax_kinds::SyntaxKind,
- string_block::{lex_str_block, StringBlockError},
- Span,
+ string_block::{StringBlockError, lex_str_block},
};
pub struct Lexer<'a> {
crates/jrsonnet-lexer/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-lexer/src/lib.rs
+++ b/crates/jrsonnet-lexer/src/lib.rs
@@ -7,4 +7,4 @@
pub use generated::syntax_kinds::SyntaxKind;
pub use lex::{Lexeme, Lexer};
-pub use string_block::{collect_lexed_str_block, CollectStrBlock};
+pub use string_block::{CollectStrBlock, collect_lexed_str_block};
crates/jrsonnet-lexer/src/string_block.rsdiffbeforeafterboth--- a/crates/jrsonnet-lexer/src/string_block.rs
+++ b/crates/jrsonnet-lexer/src/string_block.rs
@@ -6,8 +6,8 @@
MissingIndent,
}
+use StringBlockError::*;
use logos::Lexer;
-use StringBlockError::*;
use crate::generated::syntax_kinds::SyntaxKind;
crates/jrsonnet-macros/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-macros/src/lib.rs
+++ b/crates/jrsonnet-macros/src/lib.rs
@@ -3,14 +3,13 @@
use proc_macro2::TokenStream;
use quote::{quote, quote_spanned};
use syn::{
- parenthesized,
+ Attribute, DeriveInput, Error, Expr, ExprClosure, FnArg, GenericArgument, Ident, ItemFn,
+ LitStr, Meta, Pat, Path, PathArguments, Result, ReturnType, Token, Type, parenthesized,
parse::{Parse, ParseStream},
parse_macro_input,
punctuated::Punctuated,
spanned::Spanned,
token::Comma,
- Attribute, DeriveInput, Error, Expr, ExprClosure, FnArg, GenericArgument, Ident, ItemFn,
- LitStr, Meta, Pat, Path, PathArguments, Result, ReturnType, Token, Type,
};
use self::typed::{derive_from_untyped_inner, derive_into_untyped_inner, derive_typed_inner};
crates/jrsonnet-macros/src/typed.rsdiffbeforeafterboth--- a/crates/jrsonnet-macros/src/typed.rs
+++ b/crates/jrsonnet-macros/src/typed.rs
@@ -1,10 +1,13 @@
-use crate::names::Names;
-use crate::{extract_type_from_option, kw, parse_attr, type_is_path};
use proc_macro2::TokenStream;
use quote::quote;
-use syn::parse::{Parse, ParseStream};
-use syn::spanned::Spanned as _;
-use syn::{parenthesized, token, DeriveInput, Error, Ident, LitStr, Result, Token, Type};
+use syn::{
+ DeriveInput, Error, Ident, LitStr, Result, Token, Type, parenthesized,
+ parse::{Parse, ParseStream},
+ spanned::Spanned as _,
+ token,
+};
+
+use crate::{extract_type_from_option, kw, names::Names, parse_attr, type_is_path};
#[derive(Default)]
#[allow(clippy::struct_excessive_bools)]
crates/jrsonnet-peg-parser/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-peg-parser/src/lib.rs
+++ b/crates/jrsonnet-peg-parser/src/lib.rs
@@ -1,12 +1,13 @@
+use std::rc::Rc;
+
use jrsonnet_gcmodule::Acyclic;
use jrsonnet_ir::{
- unescape, ArgsDesc, AssertExpr, AssertStmt, BinaryOp, BindSpec, CompSpec, Destruct,
- DestructRest, Expr, ExprParam, ExprParams, FieldMember, FieldName, ForSpecData, IStr, IfElse,
- IfSpecData, ImportKind, IndexPart, LiteralType, Member, ObjBody, ObjComp, ObjMembers, Slice,
- SliceDesc, Source, Span, Spanned, Visibility,
+ ArgsDesc, AssertExpr, AssertStmt, BinaryOp, BindSpec, CompSpec, Destruct, DestructRest, Expr,
+ ExprParam, ExprParams, FieldMember, FieldName, ForSpecData, IStr, IfElse, IfSpecData,
+ ImportKind, IndexPart, LiteralType, Member, ObjBody, ObjComp, ObjMembers, Slice, SliceDesc,
+ Source, Span, Spanned, Visibility, unescape,
};
use peg::parser;
-use std::rc::Rc;
pub struct ParserSettings {
pub source: Source,
@@ -58,7 +59,7 @@
rule id() -> IStr = v:$(quiet!{ !reserved() alpha() (alpha() / digit())*} / expected!("<identifier>")) { v.into() }
rule keyword(id: &'static str) -> ()
- = ##parse_string_literal(id) end_of_ident()
+ = #parse_string_literal(id) end_of_ident()
pub rule param(s: &ParserSettings) -> ExprParam = destruct:destruct(s) expr:(_ "=" _ expr:expr(s){expr})? { ExprParam { destruct, default: expr.map(Rc::new) } }
pub rule params(s: &ParserSettings) -> ExprParams
@@ -429,7 +430,7 @@
use insta::{assert_snapshot, glob};
use jrsonnet_ir::{IStr, Source};
- use crate::{parse, ParserSettings};
+ use crate::{ParserSettings, parse};
#[test]
fn snapshots() {
crates/jrsonnet-rowan-parser/src/event.rsdiffbeforeafterboth--- a/crates/jrsonnet-rowan-parser/src/event.rs
+++ b/crates/jrsonnet-rowan-parser/src/event.rs
@@ -3,10 +3,10 @@
use rowan::{GreenNodeBuilder, Language, TextRange, TextSize};
use crate::{
+ AstToken, JsonnetLanguage, SyntaxKind,
lex::Lexeme,
nodes::Trivia,
parser::{LocatedSyntaxError, Parse, SyntaxError},
- AstToken, JsonnetLanguage, SyntaxKind,
};
#[derive(Clone, Debug)]
crates/jrsonnet-rowan-parser/src/generated/nodes.rsdiffbeforeafterboth--- a/crates/jrsonnet-rowan-parser/src/generated/nodes.rs
+++ b/crates/jrsonnet-rowan-parser/src/generated/nodes.rs
@@ -3,9 +3,9 @@
#![allow(non_snake_case, clippy::match_like_matches_macro)]
use crate::{
- ast::{support, AstChildren, AstNode, AstToken},
SyntaxKind::{self, *},
SyntaxNode, SyntaxToken, T,
+ ast::{AstChildren, AstNode, AstToken, support},
};
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
crates/jrsonnet-rowan-parser/src/marker.rsdiffbeforeafterboth--- a/crates/jrsonnet-rowan-parser/src/marker.rs
+++ b/crates/jrsonnet-rowan-parser/src/marker.rs
@@ -3,9 +3,9 @@
use drop_bomb::DropBomb;
use crate::{
+ SyntaxKind,
event::Event,
parser::{ExpectedSyntax, Parser, SyntaxError},
- SyntaxKind,
};
// pub struct Ranger {
crates/jrsonnet-rowan-parser/src/parser.rsdiffbeforeafterboth--- a/crates/jrsonnet-rowan-parser/src/parser.rs
+++ b/crates/jrsonnet-rowan-parser/src/parser.rs
@@ -3,13 +3,13 @@
use rowan::{GreenNode, TextRange};
use crate::{
+ AstToken, SyntaxKind,
+ SyntaxKind::*,
+ SyntaxNode, T, TS,
event::Event,
marker::{CompletedMarker, Marker},
nodes::{BinaryOperatorKind, Literal, Number, Text, UnaryOperatorKind},
token_set::SyntaxKindSet,
- AstToken, SyntaxKind,
- SyntaxKind::*,
- SyntaxNode, T, TS,
};
pub struct Parse {
@@ -923,8 +923,7 @@
let m = p.start();
p.bump();
- let _ = expr_binding_power(p, right_binding_power)
- .map(|v| v.precede(p).complete(p, EXPR));
+ let _ = expr_binding_power(p, right_binding_power).map(|v| v.precede(p).complete(p, EXPR));
m.complete(p, EXPR_UNARY)
} else if p.at(T!['(']) {
let m = p.start();
crates/jrsonnet-rowan-parser/src/tests.rsdiffbeforeafterboth--- a/crates/jrsonnet-rowan-parser/src/tests.rs
+++ b/crates/jrsonnet-rowan-parser/src/tests.rs
@@ -3,7 +3,7 @@
use hi_doc::{Formatting, SnippetBuilder, Text};
-use crate::{parse, AstNode};
+use crate::{AstNode, parse};
fn process(text: &str) -> String {
use std::fmt::Write;
crates/jrsonnet-stdlib/Cargo.tomldiffbeforeafterboth--- a/crates/jrsonnet-stdlib/Cargo.toml
+++ b/crates/jrsonnet-stdlib/Cargo.toml
@@ -17,8 +17,8 @@
exp-bigint = ["dep:num-bigint", "jrsonnet-evaluator/exp-bigint"]
exp-null-coaelse = [
- "jrsonnet-ir/exp-null-coaelse",
- "jrsonnet-evaluator/exp-null-coaelse",
+ "jrsonnet-ir/exp-null-coaelse",
+ "jrsonnet-evaluator/exp-null-coaelse",
]
# std.regexMatch and other helpers
exp-regex = ["dep:regex", "dep:lru", "dep:rustc-hash"]
crates/jrsonnet-stdlib/src/arrays.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/arrays.rs
+++ b/crates/jrsonnet-stdlib/src/arrays.rs
@@ -1,12 +1,11 @@
#![allow(non_snake_case)]
use jrsonnet_evaluator::{
- bail,
- function::{builtin, FuncVal, NativeFn},
+ Either, IStr, ObjValue, ObjValueBuilder, Result, ResultExt, Thunk, Val, bail,
+ function::{FuncVal, NativeFn, builtin},
runtime_error,
typed::{BoundedI32, BoundedUsize, Either2, FromUntyped},
- val::{equals, ArrValue, IndexableVal},
- Either, IStr, ObjValue, ObjValueBuilder, Result, ResultExt, Thunk, Val,
+ val::{ArrValue, IndexableVal, equals},
};
pub fn eval_on_empty(on_empty: Option<Thunk<Val>>) -> Result<Val> {
crates/jrsonnet-stdlib/src/compat.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/compat.rs
+++ b/crates/jrsonnet-stdlib/src/compat.rs
@@ -1,7 +1,7 @@
use std::cmp::Ordering;
use jrsonnet_evaluator::{
- function::builtin, operator::evaluate_compare_op, val::ArrValue, Result, Val,
+ Result, Val, function::builtin, operator::evaluate_compare_op, val::ArrValue,
};
#[builtin]
crates/jrsonnet-stdlib/src/encoding.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/encoding.rs
+++ b/crates/jrsonnet-stdlib/src/encoding.rs
@@ -1,10 +1,9 @@
-use base64::{engine::general_purpose::STANDARD, Engine};
+use base64::{Engine, engine::general_purpose::STANDARD};
use jrsonnet_evaluator::{
- bail,
+ IBytes, IStr, Result, bail,
function::builtin,
runtime_error,
typed::{Either, Either2},
- IBytes, IStr, Result,
};
#[builtin]
crates/jrsonnet-stdlib/src/hash.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/hash.rs
+++ b/crates/jrsonnet-stdlib/src/hash.rs
@@ -1,4 +1,4 @@
-use jrsonnet_evaluator::{function::builtin, IStr};
+use jrsonnet_evaluator::{IStr, function::builtin};
#[builtin]
pub fn builtin_md5(s: IStr) -> String {
crates/jrsonnet-stdlib/src/keyf.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/keyf.rs
+++ b/crates/jrsonnet-stdlib/src/keyf.rs
@@ -1,6 +1,8 @@
-use jrsonnet_evaluator::function::{CallLocation, FuncVal, PreparedFuncVal};
-use jrsonnet_evaluator::typed::{ComplexValType, FromUntyped, Typed, ValType};
-use jrsonnet_evaluator::{Error, Result, Thunk, Val};
+use jrsonnet_evaluator::{
+ Error, Result, Thunk, Val,
+ function::{CallLocation, FuncVal, PreparedFuncVal},
+ typed::{ComplexValType, FromUntyped, Typed, ValType},
+};
#[derive(Default, Clone)]
pub enum KeyF {
crates/jrsonnet-stdlib/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/lib.rs
+++ b/crates/jrsonnet-stdlib/src/lib.rs
@@ -12,12 +12,12 @@
pub use encoding::*;
pub use hash::*;
use jrsonnet_evaluator::{
+ ContextBuilder, IStr, ObjValue, ObjValueBuilder, Thunk, Val,
error::Result,
function::{CallLocation, FuncVal},
tla::TlaArg,
trace::PathResolver,
val::NumValue,
- ContextBuilder, IStr, ObjValue, ObjValueBuilder, Thunk, Val,
};
use jrsonnet_gcmodule::{Acyclic, Cc, Trace};
use jrsonnet_ir::Source;
crates/jrsonnet-stdlib/src/manifest/ini.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/manifest/ini.rs
+++ b/crates/jrsonnet-stdlib/src/manifest/ini.rs
@@ -1,9 +1,9 @@
use std::collections::BTreeMap;
use jrsonnet_evaluator::{
+ IStr, ObjValue, Result, ResultExt, Val,
manifest::{ManifestFormat, ToStringFormat},
typed::{FromUntyped, Typed},
- IStr, ObjValue, Result, ResultExt, Val,
};
pub struct IniFormat {
crates/jrsonnet-stdlib/src/manifest/mod.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/manifest/mod.rs
+++ b/crates/jrsonnet-stdlib/src/manifest/mod.rs
@@ -6,9 +6,9 @@
pub use ini::IniFormat;
use jrsonnet_evaluator::{
+ IStr, ObjValue, Result, Val,
function::builtin,
- manifest::{escape_string_json, JsonFormat, YamlStreamFormat},
- IStr, ObjValue, Result, Val,
+ manifest::{JsonFormat, YamlStreamFormat, escape_string_json},
};
pub use python::{PythonFormat, PythonVarsFormat};
pub use toml::TomlFormat;
crates/jrsonnet-stdlib/src/manifest/python.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/manifest/python.rs
+++ b/crates/jrsonnet-stdlib/src/manifest/python.rs
@@ -1,7 +1,6 @@
use jrsonnet_evaluator::{
- bail,
- manifest::{escape_string_json_buf, ManifestFormat, ToStringFormat},
- Result, Val,
+ Result, Val, bail,
+ manifest::{ManifestFormat, ToStringFormat, escape_string_json_buf},
};
pub struct PythonFormat {
crates/jrsonnet-stdlib/src/manifest/toml.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/manifest/toml.rs
+++ b/crates/jrsonnet-stdlib/src/manifest/toml.rs
@@ -1,10 +1,9 @@
use std::borrow::Cow;
use jrsonnet_evaluator::{
- bail, in_description_frame,
- manifest::{escape_string_json_buf, ManifestFormat},
+ IStr, ObjValue, Result, ResultExt, Val, bail, in_description_frame,
+ manifest::{ManifestFormat, escape_string_json_buf},
val::ArrValue,
- IStr, ObjValue, Result, ResultExt, Val,
};
pub struct TomlFormat<'s> {
crates/jrsonnet-stdlib/src/manifest/xml.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/manifest/xml.rs
+++ b/crates/jrsonnet-stdlib/src/manifest/xml.rs
@@ -1,9 +1,8 @@
use jrsonnet_evaluator::{
- bail, in_description_frame,
+ Either, ObjValue, Result, ResultExt, Val, bail, in_description_frame,
manifest::{ManifestFormat, ToStringFormat},
typed::{ComplexValType, Either2, FromUntyped, Typed, ValType},
val::ArrValue,
- Either, ObjValue, Result, ResultExt, Val,
};
pub struct XmlJsonmlFormat {
crates/jrsonnet-stdlib/src/manifest/yaml.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/manifest/yaml.rs
+++ b/crates/jrsonnet-stdlib/src/manifest/yaml.rs
@@ -1,9 +1,8 @@
use std::{borrow::Cow, fmt::Write};
use jrsonnet_evaluator::{
- bail, in_description_frame,
- manifest::{escape_string_json_buf, ManifestFormat},
- Result, ResultExt, Val,
+ Result, ResultExt, Val, bail, in_description_frame,
+ manifest::{ManifestFormat, escape_string_json_buf},
};
pub struct YamlFormat<'s> {
crates/jrsonnet-stdlib/src/math.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/math.rs
+++ b/crates/jrsonnet-stdlib/src/math.rs
@@ -9,11 +9,7 @@
#[builtin]
pub fn builtin_sign(n: f64) -> f64 {
- if n == 0. {
- 0.
- } else {
- n.signum()
- }
+ if n == 0. { 0. } else { n.signum() }
}
#[builtin]
crates/jrsonnet-stdlib/src/misc.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/misc.rs
+++ b/crates/jrsonnet-stdlib/src/misc.rs
@@ -1,13 +1,12 @@
use std::{cell::RefCell, collections::BTreeSet};
use jrsonnet_evaluator::{
- bail,
+ Either, IStr, ObjValue, ObjValueBuilder, ResultExt, Thunk, Val, bail,
error::{ErrorKind::*, Result},
- function::{builtin, CallLocation, FuncVal},
+ function::{CallLocation, FuncVal, builtin},
manifest::JsonFormat,
typed::{Either2, Either4},
- val::{equals, ArrValue},
- Either, IStr, ObjValue, ObjValueBuilder, ResultExt, Thunk, Val,
+ val::{ArrValue, equals},
};
use jrsonnet_gcmodule::Cc;
@@ -202,7 +201,9 @@
for field in target_fields.union(&patch_fields) {
let Some(field_patch) = patch.get(field.clone())? else {
// All lazy fields might be unified into a single filtered object core instead of creating a thunk per, but this implementation is good enough.
- let target_field = target.get_lazy(field.clone()).expect("we're iterating over fields union, if field is missing in patch - it exists in target");
+ let target_field = target.get_lazy(field.clone()).expect(
+ "we're iterating over fields union, if field is missing in patch - it exists in target",
+ );
out.field(field.clone()).thunk(target_field);
continue;
};
crates/jrsonnet-stdlib/src/objects.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/objects.rs
+++ b/crates/jrsonnet-stdlib/src/objects.rs
@@ -1,9 +1,9 @@
use jrsonnet_evaluator::{
+ IStr, ObjValue, ObjValueBuilder,
function::builtin,
gc::WithCapacityExt,
rustc_hash::FxHashSet,
val::{ArrValue, Val},
- IStr, ObjValue, ObjValueBuilder,
};
#[builtin]
crates/jrsonnet-stdlib/src/operator.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/operator.rs
+++ b/crates/jrsonnet-stdlib/src/operator.rs
@@ -2,12 +2,12 @@
//! However, in our case we instead implement them in native, and implement native functions on top of core for backwards compatibility
use jrsonnet_evaluator::{
+ IStr, Result, Val,
function::builtin,
operator::evaluate_mod_op,
stdlib::std_format,
typed::{Either, Either2},
- val::{equals, primitive_equals, NumValue},
- IStr, Result, Val,
+ val::{NumValue, equals, primitive_equals},
};
#[builtin]
crates/jrsonnet-stdlib/src/parse.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/parse.rs
+++ b/crates/jrsonnet-stdlib/src/parse.rs
@@ -1,4 +1,4 @@
-use jrsonnet_evaluator::{function::builtin, runtime_error, IStr, Result, Val};
+use jrsonnet_evaluator::{IStr, Result, Val, function::builtin, runtime_error};
#[builtin]
pub fn builtin_parse_json(str: IStr) -> Result<Val> {
crates/jrsonnet-stdlib/src/regex.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/regex.rs
+++ b/crates/jrsonnet-stdlib/src/regex.rs
@@ -2,11 +2,11 @@
use ::regex::Regex;
use jrsonnet_evaluator::{
+ IStr, ObjValue, ObjValueBuilder,
error::{ErrorKind::*, Result},
rustc_hash::FxBuildHasher,
typed::{IntoUntyped, Typed},
val::StrValue,
- IStr, ObjValue, ObjValueBuilder,
};
use jrsonnet_gcmodule::Acyclic;
use jrsonnet_macros::builtin;
crates/jrsonnet-stdlib/src/sets.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/sets.rs
+++ b/crates/jrsonnet-stdlib/src/sets.rs
@@ -1,7 +1,7 @@
use std::cmp::Ordering;
use jrsonnet_evaluator::{
- function::builtin, operator::evaluate_compare_op, val::ArrValue, Result, Thunk, Val,
+ Result, Thunk, Val, function::builtin, operator::evaluate_compare_op, val::ArrValue,
};
use jrsonnet_ir::BinaryOpType;
crates/jrsonnet-stdlib/src/sort.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/sort.rs
+++ b/crates/jrsonnet-stdlib/src/sort.rs
@@ -3,11 +3,10 @@
use std::cmp::Ordering;
use jrsonnet_evaluator::{
- bail,
+ Result, Thunk, Val, bail,
function::builtin,
operator::evaluate_compare_op,
- val::{equals, ArrValue},
- Result, Thunk, Val,
+ val::{ArrValue, equals},
};
use jrsonnet_ir::BinaryOpType;
crates/jrsonnet-stdlib/src/strings.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/strings.rs
+++ b/crates/jrsonnet-stdlib/src/strings.rs
@@ -1,12 +1,11 @@
use std::collections::BTreeSet;
use jrsonnet_evaluator::{
- bail,
+ Either, IStr, Val, bail,
error::{ErrorKind::*, Result},
function::builtin,
typed::{Either2, FromUntyped, M1},
val::{ArrValue, IndexableVal},
- Either, IStr, Val,
};
#[builtin]
@@ -206,8 +205,8 @@
#[cfg(feature = "exp-bigint")]
#[builtin]
pub fn builtin_bigint(v: Either![f64, IStr]) -> Result<Val> {
+ use Either2::*;
use jrsonnet_evaluator::runtime_error;
- use Either2::*;
Ok(match v {
A(a) => {
Val::BigInt(Box::new(a.to_string().parse().map_err(|e| {
crates/jrsonnet-stdlib/src/types.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/types.rs
+++ b/crates/jrsonnet-stdlib/src/types.rs
@@ -1,4 +1,4 @@
-use jrsonnet_evaluator::{function::builtin, IStr, Val};
+use jrsonnet_evaluator::{IStr, Val, function::builtin};
#[builtin]
pub fn builtin_type(x: Val) -> IStr {
flake.lockdiffbeforeafterboth--- a/flake.lock
+++ b/flake.lock
@@ -2,18 +2,40 @@
"nodes": {
"crane": {
"locked": {
- "lastModified": 1770419512,
- "owner": "ipetkov",
+ "lastModified": 1775245625,
+ "owner": "CertainLach",
"repo": "crane",
- "rev": "2510f2cbc3ccd237f700bb213756a8f35c32d8d7",
+ "rev": "9c67a3098774323d0270004eed7d7291ddcfe918",
"type": "github"
},
"original": {
- "owner": "ipetkov",
+ "owner": "CertainLach",
+ "ref": "refactor/drop-remarshal",
"repo": "crane",
"type": "github"
}
},
+ "fenix": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "rust-analyzer-src": "rust-analyzer-src"
+ },
+ "locked": {
+ "lastModified": 1775272531,
+ "owner": "CertainLach",
+ "repo": "fenix",
+ "rev": "831116e5887552af53f2998dcb46e1d55dc0850e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "CertainLach",
+ "ref": "fix/libatomic",
+ "repo": "fenix",
+ "type": "github"
+ }
+ },
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@@ -21,10 +43,10 @@
]
},
"locked": {
- "lastModified": 1769996383,
+ "lastModified": 1775087534,
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
+ "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"type": "github"
},
"original": {
@@ -33,12 +55,34 @@
"type": "github"
}
},
+ "hercules-ci-effects": {
+ "inputs": {
+ "flake-parts": [
+ "flake-parts"
+ ],
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1773550609,
+ "owner": "hercules-ci",
+ "repo": "hercules-ci-effects",
+ "rev": "554f6ed448ca74c00aa2371cde901ae1e73005b9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "hercules-ci-effects",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
- "lastModified": 1770468184,
+ "lastModified": 1775270577,
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "a124a10ea33a73329c42d67f30efcdbfb60a4e04",
+ "rev": "9370b0614498381a0019e082c10e9cf8413e7c2c",
"type": "github"
},
"original": {
@@ -51,28 +95,28 @@
"root": {
"inputs": {
"crane": "crane",
+ "fenix": "fenix",
"flake-parts": "flake-parts",
+ "hercules-ci-effects": "hercules-ci-effects",
"nixpkgs": "nixpkgs",
- "rust-overlay": "rust-overlay",
- "shelly": "shelly"
+ "shelly": "shelly",
+ "treefmt-nix": "treefmt-nix"
}
},
- "rust-overlay": {
- "inputs": {
- "nixpkgs": [
- "nixpkgs"
- ]
- },
+ "rust-analyzer-src": {
+ "flake": false,
"locked": {
- "lastModified": 1770433312,
- "owner": "oxalica",
- "repo": "rust-overlay",
- "rev": "9922ff9f99a6436756cbe6f5d11f9c3630e58cf0",
+ "lastModified": 1775174431,
+ "narHash": "sha256-jSw1C5MuyySiCpPgjdR+H0wPR3AgPRuylLunw+yd7A0=",
+ "owner": "rust-lang",
+ "repo": "rust-analyzer",
+ "rev": "9767050b2db436f5a770c5f91a548c88fd91ec71",
"type": "github"
},
"original": {
- "owner": "oxalica",
- "repo": "rust-overlay",
+ "owner": "rust-lang",
+ "ref": "nightly",
+ "repo": "rust-analyzer",
"type": "github"
}
},
@@ -89,6 +133,25 @@
"repo": "shelly",
"type": "github"
}
+ },
+ "treefmt-nix": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1775125835,
+ "owner": "numtide",
+ "repo": "treefmt-nix",
+ "rev": "75925962939880974e3ab417879daffcba36c4a3",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "treefmt-nix",
+ "type": "github"
+ }
}
},
"root": "root",
flake.nixdiffbeforeafterboth--- a/flake.nix
+++ b/flake.nix
@@ -2,46 +2,219 @@
description = "Jrsonnet";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/release-25.11";
- rust-overlay = {
- url = "github:oxalica/rust-overlay";
+ fenix = {
+ url = "github:CertainLach/fenix/fix/libatomic";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
- crane.url = "github:ipetkov/crane";
+ hercules-ci-effects = {
+ url = "github:hercules-ci/hercules-ci-effects";
+ inputs.flake-parts.follows = "flake-parts";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ treefmt-nix = {
+ url = "github:numtide/treefmt-nix";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ crane.url = "github:CertainLach/crane/refactor/drop-remarshal";
shelly.url = "github:CertainLach/shelly";
};
outputs =
- inputs@{
- nixpkgs,
- flake-parts,
- rust-overlay,
- crane,
- shelly,
- ...
- }:
- flake-parts.lib.mkFlake { inherit inputs; } {
- imports = [ shelly.flakeModule ];
- systems = inputs.nixpkgs.lib.systems.flakeExposed;
+ inputs:
+ let
+ inherit (inputs.nixpkgs.lib)
+ mkIf
+ mkForce
+ optionals
+ optionalAttrs
+ ;
+ in
+ inputs.flake-parts.lib.mkFlake { inherit inputs; } {
+ imports = [
+ inputs.shelly.flakeModule
+ inputs.hercules-ci-effects.flakeModule
+ ];
+ systems = [
+ "x86_64-linux"
+ "i686-linux"
+ "aarch64-linux"
+ "armv7l-linux"
+ "aarch64-darwin"
+ ];
perSystem =
{
config,
+ self',
system,
...
}:
let
- pkgs = import nixpkgs {
+ pkgs = import inputs.nixpkgs {
inherit system;
- overlays = [ rust-overlay.overlays.default ];
+ overlays = [ inputs.fenix.overlays.default ];
config.allowUnsupportedSystem = true;
+ config.allowUnfreePredicate = pkg: pkg.name == "Xcode.app";
+ };
+ targetArch = pkgs.stdenv.hostPlatform.parsed.cpu.name;
+ rustfmt = (pkgs.fenix.complete or pkgs.fenix.stable).rustfmt;
+ toolchain = pkgs.fenix.combine [
+ (pkgs.fenix.stable.withComponents [
+ "cargo"
+ "clippy"
+ "rustc"
+ "rust-src"
+ ])
+ rustfmt
+ ];
+ craneLib = (inputs.crane.mkLib pkgs).overrideToolchain toolchain;
+ treefmt =
+ (inputs.treefmt-nix.lib.evalModule pkgs (import ./treefmt.nix { inherit rustfmt; })).config.build;
+
+ # Cross-compilation toolchains
+ crossToolchain = pkgs.fenix.combine [
+ (pkgs.fenix.stable.withComponents [
+ "cargo"
+ "rustc"
+ ])
+ pkgs.fenix.targets."${targetArch}-unknown-linux-musl".stable.rust-std
+ pkgs.fenix.targets."${targetArch}-apple-darwin".stable.rust-std
+ ];
+ craneLibCross = (inputs.crane.mkLib pkgs).overrideToolchain crossToolchain;
+
+ # Windows cross-compilation
+ pkgsWindows = import inputs.nixpkgs {
+ overlays = [ inputs.fenix.overlays.default ];
+ localSystem = system;
+ crossSystem = {
+ config = "${targetArch}-w64-mingw32";
+ libc = "msvcrt";
+ };
};
- rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
- craneLib = (crane.mkLib pkgs).overrideToolchain rust;
+ windowsToolchain = pkgs.fenix.combine [
+ (pkgs.fenix.stable.withComponents [
+ "cargo"
+ "rustc"
+ ])
+ pkgs.fenix.targets."${targetArch}-pc-windows-gnu".stable.rust-std
+ ];
+ craneLibWindows = (inputs.crane.mkLib pkgsWindows).overrideToolchain (_: windowsToolchain);
+
in
{
legacyPackages = {
+ release = optionalAttrs pkgs.stdenv.hostPlatform.isLinux (
+ {
+ jrsonnet-linux-glibc = self'.packages.jrsonnet;
+ jrsonnet-experimental-linux-glibc = self'.packages.jrsonnet-experimental;
+ }
+ // optionalAttrs pkgs.stdenv.hostPlatform.is64bit rec {
+ jrsonnet-linux-musl = pkgs.callPackage ./nix/jrsonnet-cross-musl.nix {
+ craneLib = craneLibCross;
+ targetTriple = "${targetArch}-unknown-linux-musl";
+ muslCC = pkgs.pkgsMusl.stdenv.cc;
+ };
+ jrsonnet-experimental-linux-musl = jrsonnet-linux-musl.override {
+ withExperimentalFeatures = true;
+ };
+ }
+ // optionalAttrs (targetArch == "aarch64") rec {
+ jrsonnet-darwin = pkgs.callPackage ./nix/jrsonnet-cross-darwin.nix {
+ craneLib = craneLibCross;
+ targetTriple = "${targetArch}-apple-darwin";
+ };
+ jrsonnet-experimental-darwin = jrsonnet-darwin.override {
+ withExperimentalFeatures = true;
+ };
+ }
+ // optionalAttrs (targetArch == "x86_64") rec {
+ jrsonnet-windows = pkgsWindows.callPackage ./nix/jrsonnet-cross-windows.nix {
+ craneLib = craneLibWindows;
+ targetTriple = "${targetArch}-pc-windows-gnu";
+ };
+ jrsonnet-experimental-windows = jrsonnet-windows.override {
+ withExperimentalFeatures = true;
+ };
+ }
+ );
+ benchmarks = optionalAttrs (system == "x86_64-linux" || system == "aarch64-linux") {
+ default = pkgs.callPackage ./nix/benchmarks.nix {
+ inherit (config.legacyPackages.jsonnetImpls)
+ go-jsonnet
+ sjsonnet
+ cpp-jsonnet
+ rsjsonnet
+ ;
+ jrsonnetVariants = [
+ {
+ drv = self'.packages.jrsonnet.override { forBenchmarks = true; };
+ name = "";
+ }
+ ];
+ };
+ quick = pkgs.callPackage ./nix/benchmarks.nix {
+ inherit (config.legacyPackages.jsonnetImpls)
+ go-jsonnet
+ sjsonnet
+ cpp-jsonnet
+ rsjsonnet
+ ;
+ quick = true;
+ jrsonnetVariants = [
+ {
+ drv = self'.packages.jrsonnet.override { forBenchmarks = true; };
+ name = "";
+ }
+ ];
+ };
+ against-release = pkgs.callPackage ./nix/benchmarks.nix {
+ inherit (config.legacyPackages.jsonnetImpls)
+ go-jsonnet
+ sjsonnet
+ cpp-jsonnet
+ rsjsonnet
+ ;
+ jrsonnetVariants = [
+ {
+ drv = self'.packages.jrsonnet.override { forBenchmarks = true; };
+ name = "current";
+ }
+ {
+ drv = self'.packages.jrsonnet-experimental.override { forBenchmarks = true; };
+ name = "current-experimental";
+ }
+ {
+ drv = self'.legacyPackages.jsonnetImpls.jrsonnet-release.override { forBenchmarks = true; };
+ name = "release";
+ }
+ ];
+ };
+ quick-against-release = pkgs.callPackage ./nix/benchmarks.nix {
+ inherit (config.legacyPackages.jsonnetImpls)
+ go-jsonnet
+ sjsonnet
+ cpp-jsonnet
+ rsjsonnet
+ ;
+ quick = true;
+ jrsonnetVariants = [
+ {
+ drv = self'.packages.jrsonnet.override { forBenchmarks = true; };
+ name = "current";
+ }
+ {
+ drv = self'.packages.jrsonnet-experimental.override { forBenchmarks = true; };
+ name = "current-experimental";
+ }
+ {
+ drv = self'.legacyPackages.jsonnetImpls.jrsonnet-release.override { forBenchmarks = true; };
+ name = "release";
+ }
+ ];
+ };
+ };
jsonnetImpls = {
go-jsonnet = pkgs.callPackage ./nix/go-jsonnet.nix { };
sjsonnet = pkgs.callPackage ./nix/sjsonnet.nix { };
@@ -49,101 +222,33 @@
# I didn't managed to build it, and nixpkgs version is marked as broken
# haskell-jsonnet = pkgs.callPackage ./nix/haskell-jsonnet.nix { };
rsjsonnet = pkgs.callPackage ./nix/rsjsonnet.nix { };
+ # Older released version of jrsonnet itself, for benchmarking purposes
+ jrsonnet-release = pkgs.callPackage ./nix/jrsonnet-release.nix {
+ rustPlatform = pkgs.makeRustPlatform {
+ rustc = toolchain;
+ cargo = toolchain;
+ };
+ };
};
};
- packages = rec {
- default = jrsonnet;
-
- jrsonnet = pkgs.callPackage ./nix/jrsonnet.nix {
- inherit craneLib;
- };
- jrsonnet-experimental = pkgs.callPackage ./nix/jrsonnet.nix {
- inherit craneLib;
- withExperimentalFeatures = true;
- };
-
- jrsonnet-release = pkgs.callPackage ./nix/jrsonnet-release.nix {
- rustPlatform = pkgs.makeRustPlatform {
- rustc = rust;
- cargo = rust;
+ packages =
+ let
+ jrsonnet = pkgs.callPackage ./nix/jrsonnet.nix {
+ inherit craneLib;
};
- };
-
- benchmarks = pkgs.callPackage ./nix/benchmarks.nix {
- inherit (config.legacyPackages.jsonnetImpls)
- go-jsonnet
- sjsonnet
- cpp-jsonnet
- rsjsonnet
- ;
- jrsonnetVariants = [
- {
- drv = jrsonnet.override { forBenchmarks = true; };
- name = "";
- }
- ];
+ jrsonnet-experimental = pkgs.callPackage ./nix/jrsonnet.nix {
+ inherit craneLib;
+ withExperimentalFeatures = true;
+ };
+ in
+ {
+ default = jrsonnet;
+ inherit jrsonnet jrsonnet-experimental;
};
- benchmarks-quick = pkgs.callPackage ./nix/benchmarks.nix {
- inherit (config.legacyPackages.jsonnetImpls)
- go-jsonnet
- sjsonnet
- cpp-jsonnet
- rsjsonnet
- ;
- quick = true;
- jrsonnetVariants = [
- {
- drv = jrsonnet.override { forBenchmarks = true; };
- name = "";
- }
- ];
- };
- benchmarks-against-release = pkgs.callPackage ./nix/benchmarks.nix {
- inherit (config.legacyPackages.jsonnetImpls)
- go-jsonnet
- sjsonnet
- cpp-jsonnet
- rsjsonnet
- ;
- jrsonnetVariants = [
- {
- drv = jrsonnet.override { forBenchmarks = true; };
- name = "current";
- }
- {
- drv = jrsonnet-experimental.override { forBenchmarks = true; };
- name = "current-experimental";
- }
- {
- drv = jrsonnet-release.override { forBenchmarks = true; };
- name = "release";
- }
- ];
- };
- benchmarks-quick-against-release = pkgs.callPackage ./nix/benchmarks.nix {
- inherit (config.legacyPackages.jsonnetImpls)
- go-jsonnet
- sjsonnet
- cpp-jsonnet
- rsjsonnet
- ;
- quick = true;
- jrsonnetVariants = [
- {
- drv = jrsonnet.override { forBenchmarks = true; };
- name = "current";
- }
- {
- drv = jrsonnet-experimental.override { forBenchmarks = true; };
- name = "current-experimental";
- }
- {
- drv = jrsonnet-release.override { forBenchmarks = true; };
- name = "release";
- }
- ];
- };
+ checks = optionalAttrs (system != "armv7l-linux") {
+ formatting = treefmt.check inputs.self;
};
+ formatter = mkIf (system != "armv7l-linux") treefmt.wrapper;
shelly.shells.default = {
factory = craneLib.devShell;
packages =
@@ -158,11 +263,126 @@
hyperfine
graphviz
]
- ++ lib.optionals (!stdenv.isDarwin) [
+ ++ optionals (!stdenv.isDarwin) [
valgrind
kdePackages.kcachegrind
];
};
};
+ hercules-ci.github-releases.files =
+ let
+ rel = system: inputs.self.legacyPackages.${system}.release;
+ bin = drv: "${drv}/bin/jrsonnet";
+ exe = drv: "${drv}/bin/jrsonnet.exe";
+ in
+ [
+ {
+ label = "jrsonnet-x86_64-linux-musl";
+ path = bin (rel "x86_64-linux").jrsonnet-linux-musl;
+ }
+ {
+ label = "jrsonnet-experimental-x86_64-linux-musl";
+ path = bin (rel "x86_64-linux").jrsonnet-experimental-linux-musl;
+ }
+ {
+ label = "jrsonnet-aarch64-darwin";
+ path = bin (rel "aarch64-linux").jrsonnet-darwin;
+ }
+ {
+ label = "jrsonnet-experimental-aarch64-darwin";
+ path = bin (rel "aarch64-linux").jrsonnet-experimental-darwin;
+ }
+ {
+ label = "jrsonnet-x86_64-windows.exe";
+ path = exe (rel "x86_64-linux").jrsonnet-windows;
+ }
+ {
+ label = "jrsonnet-experimental-x86_64-windows.exe";
+ path = exe (rel "x86_64-linux").jrsonnet-experimental-windows;
+ }
+
+ {
+ label = "jrsonnet-aarch64-linux-musl";
+ path = bin (rel "aarch64-linux").jrsonnet-linux-musl;
+ }
+ {
+ label = "jrsonnet-experimental-aarch64-linux-musl";
+ path = bin (rel "aarch64-linux").jrsonnet-experimental-linux-musl;
+ }
+
+ {
+ label = "jrsonnet-x86_64-linux-glibc";
+ path = bin (rel "x86_64-linux").jrsonnet-linux-glibc;
+ }
+ {
+ label = "jrsonnet-experimental-x86_64-linux-glibc";
+ path = bin (rel "x86_64-linux").jrsonnet-experimental-linux-glibc;
+ }
+ {
+ label = "jrsonnet-aarch64-linux-glibc";
+ path = bin (rel "aarch64-linux").jrsonnet-linux-glibc;
+ }
+ {
+ label = "jrsonnet-experimental-aarch64-linux-glibc";
+ path = bin (rel "aarch64-linux").jrsonnet-experimental-linux-glibc;
+ }
+ {
+ label = "jrsonnet-i686-linux-glibc";
+ path = bin (rel "i686-linux").jrsonnet-linux-glibc;
+ }
+ {
+ label = "jrsonnet-experimental-i686-linux-glibc";
+ path = bin (rel "i686-linux").jrsonnet-experimental-linux-glibc;
+ }
+ {
+ label = "jrsonnet-armv7l-linux-glibc";
+ path = bin (rel "armv7l-linux").jrsonnet-linux-glibc;
+ }
+ {
+ label = "jrsonnet-experimental-armv7l-linux-glibc";
+ path = bin (rel "armv7l-linux").jrsonnet-experimental-linux-glibc;
+ }
+ ];
+ hercules-ci.cargo-publish = {
+ enable = true;
+ secretName = "crates-io";
+ };
+ hercules-ci.flake-update = {
+ enable = true;
+ baseMerge.enable = true;
+ baseMerge.method = "fast-forward";
+ when = {
+ dayOfWeek = [ "Sat" ];
+ };
+ };
+ herculesCI =
+ { lib, config, ... }:
+ {
+ ciSystems = [
+ "x86_64-linux"
+ "i686-linux"
+ "aarch64-linux"
+ "armv7l-linux"
+ # TODO: add workers for these platforms
+ # "aarch64-darwin"
+ ];
+ onPush.default.outputs = {
+ benchmarks.x86_64-linux = inputs.self.legacyPackages.x86_64-linux.benchmarks.default;
+
+ # Cross: musl/mingw/darwin-zigbuild
+ release.x86_64-linux = inputs.self.legacyPackages.x86_64-linux.release;
+ release.aarch64-linux = inputs.self.legacyPackages.aarch64-linux.release;
+ release.armv7l-linux = inputs.self.legacyPackages.armv7l-linux.release;
+ release.i686-linux = inputs.self.legacyPackages.i686-linux.release;
+
+ # Too much to build for CI purposes
+ devShells = mkForce { };
+ formatter = mkForce { };
+
+ # No need to run them on different arch, pretty large derivations and might try to compile GHC
+ checks.i686-linux.formatting = mkForce { };
+ checks.aarch64-linux.formatting = mkForce { };
+ };
+ };
};
}
nix/benchmarks.nixdiffbeforeafterboth--- a/nix/benchmarks.nix
+++ b/nix/benchmarks.nix
@@ -53,7 +53,7 @@
in
stdenv.mkDerivation {
name = "benchmarks";
- __impure = true;
+ # __impure = true; # not supported by hercules-ci
unpackPhase = "true";
buildInputs = [
@@ -143,7 +143,9 @@
"\"sjsonnet-native $path${optionalString (vendor != "") " -J ${vendor}"}\" -n \"Scala (native)\""
} \
${
- optionalString (skipScala == "")
+ # My aarch64-linux machine can't run graalvm image:
+ # The current machine does not support all of the following CPU features that are required by the image: [FP, ASIMD, CRC32, LSE].
+ optionalString (skipScala == "" && stdenv.hostPlatform.system != "aarch64-linux")
"\"sjsonnet-graalvm $path${optionalString (vendor != "") " -J ${vendor}"}\" -n \"Scala (GraalVM)\""
} \
${optionalString (skipCpp == "")
@@ -174,9 +176,14 @@
echo "* C++: $(jsonnet --version)" >> $out
echo "* Scala (native/GraalVM): $(sjsonnet-native 2>&1 | grep -oP 'Sjsonnet \S+')" >> $out
echo "* Rust (alternative): rsjsonnet ${rsjsonnet.version} (${rsjsonnet.src.rev})" >> $out
- ${concatStringsSep "\n" (forEach jrsonnetVariants (variant:
- "echo \"* Rust${if variant.name != "" then " (${variant.name})" else ""}: $(${variant.drv}/bin/jrsonnet --version 2>&1)\" >> $out"
- ))}
+ ${concatStringsSep "\n" (
+ forEach jrsonnetVariants (
+ variant:
+ "echo \"* Rust${
+ if variant.name != "" then " (${variant.name})" else ""
+ }: $(${variant.drv}/bin/jrsonnet --version 2>&1)\" >> $out"
+ )
+ )}
echo "====" >> $out
echo >> $out
''}
nix/jrsonnet-cross-darwin.nixdiffbeforeafterboth--- /dev/null
+++ b/nix/jrsonnet-cross-darwin.nix
@@ -0,0 +1,49 @@
+{
+ lib,
+ craneLib,
+ cargo-zigbuild,
+ zig,
+ darwin,
+ targetTriple,
+ withExperimentalFeatures ? false,
+}:
+let
+ inherit (lib) optionalString;
+in
+craneLib.buildPackage {
+ src = lib.cleanSourceWith {
+ src = ../.;
+ filter = path: type: (lib.hasSuffix ".jsonnet" path) || (craneLib.filterCargoSources path type);
+ };
+ pname = "jrsonnet";
+ version = "current${optionalString withExperimentalFeatures "-experimental"}";
+ strictDeps = true;
+
+ depsBuildBuild = [
+ zig
+ cargo-zigbuild
+ ];
+
+ nativeBuildInputs = [
+ darwin.xcode_12_2
+ ];
+
+ cargoExtraArgs = "-p jrsonnet";
+
+ buildPhaseCargoCommand = ''
+ export SDKROOT=${darwin.xcode_12_2}/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
+ export XDG_CACHE_HOME=$TMPDIR/xdg_cache
+ mkdir -p $XDG_CACHE_HOME
+ export CARGO_ZIGBUILD_CACHE_DIR=$TMPDIR/cargo-zigbuild-cache
+ mkdir -p $CARGO_ZIGBUILD_CACHE_DIR
+
+ HOME=$(mktemp -d)
+ cargo zigbuild --release --locked ${optionalString withExperimentalFeatures "--features=experimental"} --target=${targetTriple}
+ '';
+
+ doNotPostBuildInstallCargoBinaries = true;
+ installPhaseCommand = ''
+ mkdir -p $out/bin
+ cp target/${targetTriple}/release/jrsonnet $out/bin/jrsonnet
+ '';
+}
nix/jrsonnet-cross-musl.nixdiffbeforeafterboth--- /dev/null
+++ b/nix/jrsonnet-cross-musl.nix
@@ -0,0 +1,31 @@
+{
+ lib,
+ craneLib,
+ muslCC,
+ targetTriple,
+ withExperimentalFeatures ? false,
+}:
+let
+ targetEnv = builtins.replaceStrings [ "-" ] [ "_" ] targetTriple;
+ inherit (lib) optionalString;
+in
+craneLib.buildPackage {
+ src = lib.cleanSourceWith {
+ src = ../.;
+ filter = path: type: (lib.hasSuffix ".jsonnet" path) || (craneLib.filterCargoSources path type);
+ };
+ pname = "jrsonnet";
+ version = "current${optionalString withExperimentalFeatures "-experimental"}";
+ strictDeps = true;
+
+ cargoExtraArgs = "--locked --features=mimalloc${optionalString withExperimentalFeatures ",experimental"} --target=${targetTriple}";
+
+ "CC_${targetEnv}" = "${muslCC}/bin/${muslCC.targetPrefix}cc";
+ "CARGO_TARGET_${lib.toUpper targetEnv}_LINKER" = "${muslCC}/bin/${muslCC.targetPrefix}cc";
+
+ doNotPostBuildInstallCargoBinaries = true;
+ installPhaseCommand = ''
+ mkdir -p $out/bin
+ cp target/${targetTriple}/release/jrsonnet $out/bin/jrsonnet
+ '';
+}
nix/jrsonnet-cross-windows.nixdiffbeforeafterboth--- /dev/null
+++ b/nix/jrsonnet-cross-windows.nix
@@ -0,0 +1,26 @@
+{
+ lib,
+ craneLib,
+ targetTriple,
+ withExperimentalFeatures ? false,
+}:
+let
+ inherit (lib) optionalString;
+in
+craneLib.buildPackage {
+ src = lib.cleanSourceWith {
+ src = ../.;
+ filter = path: type: (lib.hasSuffix ".jsonnet" path) || (craneLib.filterCargoSources path type);
+ };
+ pname = "jrsonnet";
+ version = "current${optionalString withExperimentalFeatures "-experimental"}";
+ strictDeps = true;
+
+ cargoExtraArgs = "--locked ${optionalString withExperimentalFeatures "--features=experimental"} --target=${targetTriple}";
+
+ doNotPostBuildInstallCargoBinaries = true;
+ installPhaseCommand = ''
+ mkdir -p $out/bin
+ cp target/${targetTriple}/release/jrsonnet.exe $out/bin/jrsonnet.exe
+ '';
+}
nix/jrsonnet-release.nixdiffbeforeafterboth--- a/nix/jrsonnet-release.nix
+++ b/nix/jrsonnet-release.nix
@@ -18,10 +18,10 @@
};
cargoHash = "sha256-ZHmdlqakucapzXJz6L7ZJpmvqTutelN8qkWAD4uDJr8=";
- cargoTestFlags = ["--package=jrsonnet --features=mimalloc,legacy-this-file"];
- cargoBuildFlags = ["--package=jrsonnet --features=mimalloc,legacy-this-file"];
+ cargoTestFlags = [ "--package=jrsonnet --features=mimalloc,legacy-this-file" ];
+ cargoBuildFlags = [ "--package=jrsonnet --features=mimalloc,legacy-this-file" ];
- buildInputs = [makeWrapper];
+ buildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/jrsonnet --add-flags "--max-stack=200000"
nix/jrsonnet.nixdiffbeforeafterboth--- a/nix/jrsonnet.nix
+++ b/nix/jrsonnet.nix
@@ -5,23 +5,23 @@
withExperimentalFeatures ? false,
forBenchmarks ? false,
}:
-with lib;
- craneLib.buildPackage {
- src = lib.cleanSourceWith {
- src = ../.;
- filter = path: type:
- (lib.hasSuffix "\.jsonnet" path)
- || (craneLib.filterCargoSources path type);
- };
- pname = "jrsonnet";
- version = "current${optionalString withExperimentalFeatures "-experimental"}";
+let
+ inherit (lib) optionalString;
+in
+craneLib.buildPackage {
+ src = lib.cleanSourceWith {
+ src = ../.;
+ filter = path: type: (lib.hasSuffix "\.jsonnet" path) || (craneLib.filterCargoSources path type);
+ };
+ pname = "jrsonnet";
+ version = "current${optionalString withExperimentalFeatures "-experimental"}";
- cargoExtraArgs = "--locked --features=mimalloc${optionalString withExperimentalFeatures ",experimental"}";
+ cargoExtraArgs = "--locked --features=mimalloc${optionalString withExperimentalFeatures ",experimental"}";
- nativeBuildInputs = [makeWrapper];
+ nativeBuildInputs = [ makeWrapper ];
- # To clean-up hyperfine output
- postInstall = optionalString forBenchmarks ''
- wrapProgram $out/bin/jrsonnet --add-flags "--max-stack=200000"
- '';
- }
+ # To clean-up hyperfine output
+ postInstall = optionalString forBenchmarks ''
+ wrapProgram $out/bin/jrsonnet --add-flags "--max-stack=200000"
+ '';
+}
nix/rsjsonnet.nixdiffbeforeafterboth--- a/nix/rsjsonnet.nix
+++ b/nix/rsjsonnet.nix
@@ -16,7 +16,7 @@
cargoHash = "sha256-0IDAxm4J2rEqfUGNYoQTP0RPrEZe4YPe2E6TT7A4THo=";
- nativeBuildInputs = [makeWrapper];
+ nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/rsjsonnet --add-flags "--max-stack=200000"
nix/sjsonnet.nixdiffbeforeafterboth--- a/nix/sjsonnet.nix
+++ b/nix/sjsonnet.nix
@@ -17,29 +17,35 @@
version = "0.6.2";
baseUrl = "https://github.com/databricks/sjsonnet/releases/download/${version}";
- nativePlatform = {
- x86_64-linux = "linux-x86_64";
- aarch64-linux = "linux-arm64";
- aarch64-darwin = "darwin-arm64";
- # Nobody cares about darwin on intel
- }.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
+ nativePlatform =
+ {
+ x86_64-linux = "linux-x86_64";
+ aarch64-linux = "linux-arm64";
+ aarch64-darwin = "darwin-arm64";
+ # Nobody cares about darwin on intel
+ }
+ .${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
nativeSrc = fetchurl {
url = "${baseUrl}/sjsonnet-${version}-${nativePlatform}";
- hash = {
- x86_64-linux = "sha256-r79Q6SovcPIomDDUYTGIP35/y5t9Xo5Z3ohP7pxsF8I=";
- aarch64-linux = "sha256-LxWR94u1Oncau57Kmtzj2UFEofWGT4+laDTbRDkwv08=";
- aarch64-darwin = "sha256-gNZ6XekMm+ebeD7UFeRfoapXw/90gHk8MoeGD86dzKk=";
- }.${stdenv.hostPlatform.system};
+ hash =
+ {
+ x86_64-linux = "sha256-r79Q6SovcPIomDDUYTGIP35/y5t9Xo5Z3ohP7pxsF8I=";
+ aarch64-linux = "sha256-LxWR94u1Oncau57Kmtzj2UFEofWGT4+laDTbRDkwv08=";
+ aarch64-darwin = "sha256-gNZ6XekMm+ebeD7UFeRfoapXw/90gHk8MoeGD86dzKk=";
+ }
+ .${stdenv.hostPlatform.system};
};
graalvmSrc = fetchurl {
url = "${baseUrl}/sjsonnet-graalvm-${version}-${nativePlatform}";
- hash = {
- x86_64-linux = "sha256-XNJCnQlwVFySrUevn1nLN/DY8UBGgvCFAitkedLB+yM=";
- aarch64-linux = "sha256-J+C3pmiBEmo8M00IDHp9jznonibXmHVRlhsvQ4apVWw=";
- aarch64-darwin = "sha256-TXNL52sS4NE3GjbOFtgf6aCP268qGKMFaoTwAfJfgGc=";
- }.${stdenv.hostPlatform.system};
+ hash =
+ {
+ x86_64-linux = "sha256-XNJCnQlwVFySrUevn1nLN/DY8UBGgvCFAitkedLB+yM=";
+ aarch64-linux = "sha256-J+C3pmiBEmo8M00IDHp9jznonibXmHVRlhsvQ4apVWw=";
+ aarch64-darwin = "sha256-TXNL52sS4NE3GjbOFtgf6aCP268qGKMFaoTwAfJfgGc=";
+ }
+ .${stdenv.hostPlatform.system};
};
in
stdenv.mkDerivation {
@@ -52,10 +58,18 @@
};
unpackPhase = "true";
- nativeBuildInputs = [ makeWrapper ]
- ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
- buildInputs = [ java ]
- ++ lib.optionals stdenv.hostPlatform.isLinux [ zlib openssl stdenv.cc.cc.lib ];
+ nativeBuildInputs = [
+ makeWrapper
+ ]
+ ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
+ buildInputs = [
+ java
+ ]
+ ++ lib.optionals stdenv.hostPlatform.isLinux [
+ zlib
+ openssl
+ stdenv.cc.cc.lib
+ ];
installPhase = ''
mkdir -p $out/bin $out/lib
rust-toolchain.tomldiffbeforeafterboth--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,3 +1,3 @@
[toolchain]
-channel = "1.93.0"
+channel = "stable"
components = ["rustfmt", "clippy", "rust-analyzer", "rust-src"]
treefmt.nixdiffbeforeafterboth--- /dev/null
+++ b/treefmt.nix
@@ -0,0 +1,14 @@
+{ rustfmt }:
+{
+ settings.global.excludes = [
+ "*.jsonnet"
+ "*.libsonnet"
+ ];
+
+ programs.nixfmt.enable = true;
+ programs.rustfmt = {
+ enable = true;
+ package = rustfmt;
+ };
+ programs.taplo.enable = true;
+}
xtask/Cargo.tomldiffbeforeafterboth--- a/xtask/Cargo.toml
+++ b/xtask/Cargo.toml
@@ -16,4 +16,4 @@
quote.workspace = true
ungrammar.workspace = true
xshell.workspace = true
-clap = {workspace = true, features = ["derive"]}
+clap = { workspace = true, features = ["derive"] }
xtask/src/main.rsdiffbeforeafterboth--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -1,6 +1,6 @@
use anyhow::Result;
use clap::Parser;
-use xshell::{cmd, Shell};
+use xshell::{Shell, cmd};
mod sourcegen;
@@ -68,7 +68,11 @@
if cachegrind {
let mut cachegrind_out = out.path().to_owned();
cachegrind_out.push("cachegrind.out.1");
- cmd!(sh, "valgrind --tool=cachegrind --cachegrind-out-file={cachegrind_out} {built} {args...}").run()?;
+ cmd!(
+ sh,
+ "valgrind --tool=cachegrind --cachegrind-out-file={cachegrind_out} {built} {args...}"
+ )
+ .run()?;
cmd!(sh, "kcachegrind {cachegrind_out}").run()?;
}
xtask/src/sourcegen/ast.rsdiffbeforeafterboth--- a/xtask/src/sourcegen/ast.rs
+++ b/xtask/src/sourcegen/ast.rs
@@ -5,8 +5,8 @@
use ungrammar::{Grammar, Rule};
use super::{
+ KindsSrc,
util::{pluralize, to_lower_snake_case},
- KindsSrc,
};
impl AstNodeSrc {
@@ -282,9 +282,11 @@
_ => return false,
};
let (node, repeat, trailing_comma) = match rule.as_slice() {
- [Rule::Node(node), Rule::Rep(repeat), Rule::Opt(trailing_comma)] => {
- (node, repeat, trailing_comma)
- }
+ [
+ Rule::Node(node),
+ Rule::Rep(repeat),
+ Rule::Opt(trailing_comma),
+ ] => (node, repeat, trailing_comma),
_ => return false,
};
let repeat = match &**repeat {
xtask/src/sourcegen/mod.rsdiffbeforeafterboth--- a/xtask/src/sourcegen/mod.rs
+++ b/xtask/src/sourcegen/mod.rs
@@ -1,7 +1,7 @@
use std::{collections::HashMap, path::PathBuf};
use anyhow::Result;
-use ast::{lower, AstSrc};
+use ast::{AstSrc, lower};
use itertools::Itertools;
use kinds::{KindsSrc, TokenKind};
use proc_macro2::{Ident, Punct, Spacing, Span, TokenStream};
@@ -56,7 +56,9 @@
});
}
SpecialName::Error => {
- panic!("error token ERROR_{name} must be explicitly defined in jsonnet_kinds()");
+ panic!(
+ "error token ERROR_{name} must be explicitly defined in jsonnet_kinds()"
+ );
}
}
continue;
xtask/src/sourcegen/util.rsdiffbeforeafterboth--- a/xtask/src/sourcegen/util.rs
+++ b/xtask/src/sourcegen/util.rs
@@ -3,7 +3,7 @@
use std::{fs, path::Path};
use anyhow::Result;
-use xshell::{cmd, Shell};
+use xshell::{Shell, cmd};
/// Checks that the `file` has the specified `contents`. If that is not the
/// case, updates the file and then fails the test.