difftreelog
Merge pull request #27 from CertainLach/syntax-error-display
in: master
Syntax error display
8 files changed
Cargo.lockdiffbeforeafterboth60 packageslockfile v1
Might be heavy and slow!
annotate-snippets
0.9.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5c96c3d1062ea7101741480185a6a1275eab01cbe8b20e378d1311bc056d2e08depends onused byatty
0.2.14crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8depends onused byautocfg
1.0.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9dused bybase64
0.13.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fdused bybincode
1.3.1crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896ddepends onused bybitflags
1.2.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693used bybyteorder
1.3.4crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472deused bycc
1.0.55crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb1be3409f94d7bdceeb5f5fac551039d9b3f00e25da7a74fc4d33400a0d96368used byclap
3.0.0-beta.2github.com/clap-rs/clap↘ 11↖ 2sourcegit+https://github.com/clap-rs/clap?rev=1d0b21908f93478e75b4b1a21533d86325d39386#1d0b21908f93478e75b4b1a21533d86325d39386depends onclap_derive
3.0.0-beta.2github.com/clap-rs/clap↘ 5↖ 1sourcegit+https://github.com/clap-rs/clap?rev=1d0b21908f93478e75b4b1a21533d86325d39386#1d0b21908f93478e75b4b1a21533d86325d39386used byclosure
0.3.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd6173fd61b610d15a7566dd7b7620775627441c4ab9dac8906e17cb93a24b782used byhashbrown
0.9.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7used byheck
0.3.1crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205depends onused byhermit-abi
0.1.14crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909depends onused byindexmap
1.6.0crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2depends onitoa
0.4.6crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumdc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6used byjrsonnet
0.3.1workspace↘ 6↖ 0jrsonnet-cli
0.3.1workspace↘ 3↖ 1jrsonnet-evaluator
0.3.1workspace↘ 14↖ 3jrsonnet-parser
0.3.1workspace↘ 6↖ 4jrsonnet-stdlib
0.3.1workspace↘ 0↖ 2jsonnet
0.3.1workspace↘ 2↖ 0lazy_static
1.4.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646used bylibc
0.2.71crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49md5
0.7.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771used bymimalloc-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 byos_str_bytes
2.3.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum06de47b848347d8c4c94219ad8ecd35eb90231704b067e67e6ae2e36ee023510used bypathdiff
0.2.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum877630b3de15c0b64cc52f659345724fbf6bdad9bd9566699fc53688f3c34a34used bypeg
0.6.3crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9f76678828272f177ac33b7e2ac2e3e73cc6c1cd1e3e387928aa69562fa51367depends onused bypeg-macros
0.6.3crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum636d60acf97633e48d266d7415a9355d4389cea327a193f87df395d88cd2b14dused bypeg-runtime
0.6.3crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9555b1514d2d99d78150d3c799d4c357a3e2c2a8062cd108e93a06d9057629c5used byproc-macro-error
1.0.3crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumfc175e9777c3116627248584e8f8b3e2987405cabe1c0adf7d1dd28f09dc7880used byproc-macro-error-attr
1.0.3crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3cc9795ca17eb581285ec44936da7fc2335a3f34f2ddd13118b6f4d515435c50used byproc-macro2
1.0.18crates.io↘ 1↖ 10sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbeae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fadepends onquote
1.0.7crates.io↘ 1↖ 9sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumaa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37depends onrustc-hash
1.1.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2used byryu
1.0.5crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86eused byserde
1.0.117crates.io↘ 1↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1adepends onserde_derive
1.0.117crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74edepends onused byserde_json
1.0.59crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumdcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95depends onused bystrsim
0.10.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623used bystructdump
0.1.2crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2e16ec33a0342fdb67d13913b4ffae6527ebccfa04b5d7da174bdc7a31db29b8structdump-derive
0.1.2crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum06c337fdc077e02ccbfcc62af0090564a4af342975c3b7be09705efab90c1888depends onused bysyn
1.0.33crates.io↘ 3↖ 7sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cdsyn-mid
0.5.0crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338adepends onused bytermcolor
1.1.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75fdepends onused bytextwrap
0.12.1crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789depends onused bythiserror
1.0.21crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum318234ffa22e0920fe9a40d7b8369b5f649d490980cf7aadcf1eb91594869b42depends onthiserror-impl
1.0.21crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcae2447b6282786c3493999f40a9be2a6ad20cb8bd268b0a0dbf5a065535c0abdepends onused byunescape
0.1.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumccb97dac3243214f8d8507998906ca3e2e0b900bf9bf4870477f125b82e68f6eused byunicode-segmentation
1.6.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0used byunicode-width
0.1.7crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcaaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479unicode-xid
0.2.0crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097cused byvec_map
0.8.2crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191used byversion_check
0.9.2crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aedwinapi
0.3.9crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419used bywinapi-i686-pc-windows-gnu
0.4.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6used bywinapi-util
0.1.5crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178depends onused bywinapi-x86_64-pc-windows-gnu
0.4.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183fused by
61 packageslockfile v1
Might be heavy and slow!
annotate-snippets
0.9.0crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5c96c3d1062ea7101741480185a6a1275eab01cbe8b20e378d1311bc056d2e08depends onused byatty
0.2.14crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8depends onused byautocfg
1.0.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9dused bybase64
0.13.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fdused bybincode
1.3.1crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896ddepends onused bybitflags
1.2.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693used bybyteorder
1.3.4crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472deused bycc
1.0.55crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb1be3409f94d7bdceeb5f5fac551039d9b3f00e25da7a74fc4d33400a0d96368used byclap
3.0.0-beta.2github.com/clap-rs/clap↘ 11↖ 2sourcegit+https://github.com/clap-rs/clap?rev=1d0b21908f93478e75b4b1a21533d86325d39386#1d0b21908f93478e75b4b1a21533d86325d39386depends onclap_derive
3.0.0-beta.2github.com/clap-rs/clap↘ 5↖ 1sourcegit+https://github.com/clap-rs/clap?rev=1d0b21908f93478e75b4b1a21533d86325d39386#1d0b21908f93478e75b4b1a21533d86325d39386used byclosure
0.3.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd6173fd61b610d15a7566dd7b7620775627441c4ab9dac8906e17cb93a24b782used byhashbrown
0.9.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7used byheck
0.3.1crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205depends onused byhermit-abi
0.1.14crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909depends onused byindexmap
1.6.0crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2depends onitoa
0.4.6crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumdc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6used byjrsonnet
0.3.1workspace↘ 6↖ 0jrsonnet-cli
0.3.1workspace↘ 3↖ 1jrsonnet-evaluator
0.3.1workspace↘ 14↖ 3jrsonnet-parser
0.3.1workspace↘ 6↖ 4jrsonnet-stdlib
0.3.1workspace↘ 0↖ 2jsonnet
0.3.1workspace↘ 2↖ 0lazy_static
1.4.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646used bylibc
0.2.71crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49md5
0.7.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771used bymimalloc-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 byos_str_bytes
2.3.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum06de47b848347d8c4c94219ad8ecd35eb90231704b067e67e6ae2e36ee023510used bypathdiff
0.2.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum877630b3de15c0b64cc52f659345724fbf6bdad9bd9566699fc53688f3c34a34used bypeg
0.6.3crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9f76678828272f177ac33b7e2ac2e3e73cc6c1cd1e3e387928aa69562fa51367depends onused bypeg-macros
0.6.3crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum636d60acf97633e48d266d7415a9355d4389cea327a193f87df395d88cd2b14dused bypeg-runtime
0.6.3crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9555b1514d2d99d78150d3c799d4c357a3e2c2a8062cd108e93a06d9057629c5used byproc-macro-error
1.0.3crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumfc175e9777c3116627248584e8f8b3e2987405cabe1c0adf7d1dd28f09dc7880used byproc-macro-error-attr
1.0.3crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3cc9795ca17eb581285ec44936da7fc2335a3f34f2ddd13118b6f4d515435c50used byproc-macro2
1.0.18crates.io↘ 1↖ 10sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbeae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fadepends onquote
1.0.7crates.io↘ 1↖ 9sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumaa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37depends onrustc-hash
1.1.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2used byryu
1.0.5crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86eused byserde
1.0.117crates.io↘ 1↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1adepends onserde_derive
1.0.117crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74edepends onused byserde_json
1.0.59crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumdcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95depends onused bystrsim
0.10.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623used bystructdump
0.1.2crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2e16ec33a0342fdb67d13913b4ffae6527ebccfa04b5d7da174bdc7a31db29b8structdump-derive
0.1.2crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum06c337fdc077e02ccbfcc62af0090564a4af342975c3b7be09705efab90c1888depends onused bysyn
1.0.33crates.io↘ 3↖ 7sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cdsyn-mid
0.5.0crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338adepends onused bytermcolor
1.1.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75fdepends onused bytextwrap
0.12.1crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789depends onused bythiserror
1.0.21crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum318234ffa22e0920fe9a40d7b8369b5f649d490980cf7aadcf1eb91594869b42depends onthiserror-impl
1.0.21crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcae2447b6282786c3493999f40a9be2a6ad20cb8bd268b0a0dbf5a065535c0abdepends onused byunescape
0.1.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumccb97dac3243214f8d8507998906ca3e2e0b900bf9bf4870477f125b82e68f6eused byunicode-segmentation
1.6.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0used byunicode-width
0.1.7crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcaaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479unicode-xid
0.2.0crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097cused byvec_map
0.8.2crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191used byversion_check
0.9.2crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aedwinapi
0.3.9crates.io↘ 2↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419winapi-i686-pc-windows-gnu
0.4.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6used bywinapi-util
0.1.5crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178depends onused bywinapi-x86_64-pc-windows-gnu
0.4.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183fused byyansi-term
0.1.2crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumfe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1depends onused by
crates/jrsonnet-evaluator/Cargo.tomldiffbeforeafterboth--- a/crates/jrsonnet-evaluator/Cargo.toml
+++ b/crates/jrsonnet-evaluator/Cargo.toml
@@ -55,6 +55,7 @@
# Explaining traces
[dependencies.annotate-snippets]
version = "0.9.0"
+features = ["color"]
optional = true
[build-dependencies]
crates/jrsonnet-evaluator/src/error.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/error.rs
+++ b/crates/jrsonnet-evaluator/src/error.rs
@@ -78,7 +78,11 @@
ImportBadFileUtf8(PathBuf),
#[error("tried to import {1} from {0}, but imports is not supported")]
ImportNotSupported(PathBuf, PathBuf),
- #[error("syntax error")]
+ #[error(
+ "syntax error, expected one of {}, got {:?}",
+ .error.expected,
+ .source_code.chars().nth(error.location.offset).map(|c| c.to_string()).unwrap_or_else(|| "EOF".into())
+ )]
ImportSyntaxError {
path: Rc<PathBuf>,
source_code: Rc<str>,
crates/jrsonnet-evaluator/src/evaluate.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/evaluate.rs
+++ b/crates/jrsonnet-evaluator/src/evaluate.rs
@@ -419,18 +419,12 @@
use Expr::*;
let LocExpr(expr, loc) = expr;
Ok(match &**expr {
- Literal(LiteralType::This) => Val::Obj(
- context
- .this()
- .clone()
- .ok_or_else(|| CantUseSelfOutsideOfObject)?,
- ),
- Literal(LiteralType::Dollar) => Val::Obj(
- context
- .dollar()
- .clone()
- .ok_or_else(|| NoTopLevelObjectFound)?,
- ),
+ Literal(LiteralType::This) => {
+ Val::Obj(context.this().clone().ok_or(CantUseSelfOutsideOfObject)?)
+ }
+ Literal(LiteralType::Dollar) => {
+ Val::Obj(context.dollar().clone().ok_or(NoTopLevelObjectFound)?)
+ }
Literal(LiteralType::True) => Val::Bool(true),
Literal(LiteralType::False) => Val::Bool(false),
Literal(LiteralType::Null) => Val::Null,
crates/jrsonnet-evaluator/src/trace/location.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/trace/location.rs
+++ b/crates/jrsonnet-evaluator/src/trace/location.rs
@@ -1,5 +1,7 @@
#[derive(Clone, PartialEq, Debug)]
pub struct CodeLocation {
+ pub offset: usize,
+
pub line: usize,
pub column: usize,
@@ -25,6 +27,7 @@
let mut out = vec![
CodeLocation {
+ offset: 0,
column: 0,
line: 0,
line_start_offset: 0,
@@ -40,6 +43,7 @@
Some(x) if x.0 == pos => {
let out_idx = x.1;
with_no_known_line_ending.push(out_idx);
+ out[out_idx].offset = pos;
out[out_idx].line = line;
out[out_idx].column = column;
out[out_idx].line_start_offset = this_line_offset;
@@ -82,12 +86,14 @@
),
vec![
CodeLocation {
+ offset: 0,
line: 1,
column: 2,
line_start_offset: 0,
- line_end_offset: 11
+ line_end_offset: 11,
},
CodeLocation {
+ offset: 14,
line: 2,
column: 4,
line_start_offset: 12,
crates/jrsonnet-evaluator/src/trace/mod.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/trace/mod.rs
+++ b/crates/jrsonnet-evaluator/src/trace/mod.rs
@@ -1,6 +1,6 @@
mod location;
-use crate::{EvaluationState, LocError};
+use crate::{error::Error, EvaluationState, LocError};
pub use location::*;
use std::path::PathBuf;
@@ -87,6 +87,33 @@
error: &LocError,
) -> Result<(), std::fmt::Error> {
writeln!(out, "{}", error.error())?;
+ if let Error::ImportSyntaxError {
+ path,
+ source_code,
+ error,
+ } = error.error()
+ {
+ use std::fmt::Write;
+ let mut n = self.resolver.resolve(path);
+ let mut offset = error.location.offset;
+ let is_eof = if offset >= source_code.len() {
+ offset = source_code.len() - 1;
+ true
+ } else {
+ false
+ };
+ let mut location = offset_to_location(source_code, &[offset])
+ .into_iter()
+ .next()
+ .unwrap();
+ if is_eof {
+ location.column += 1;
+ }
+
+ write!(n, ":").unwrap();
+ print_code_location(&mut n, &location, &location).unwrap();
+ write!(out, "{:<p$}{}", "", n, p = self.padding,)?;
+ }
let file_names = error
.trace()
.0
@@ -167,52 +194,101 @@
evaluation_state: &EvaluationState,
error: &LocError,
) -> Result<(), std::fmt::Error> {
- use annotate_snippets::{
- display_list::{DisplayList, FormatOptions},
- snippet::{AnnotationType, Slice, Snippet, SourceAnnotation},
- };
writeln!(out, "{}", error.error())?;
+ if let Error::ImportSyntaxError {
+ path,
+ source_code,
+ error,
+ } = error.error()
+ {
+ let mut offset = error.location.offset;
+ if offset >= source_code.len() {
+ offset = source_code.len() - 1;
+ }
+ let mut location = offset_to_location(source_code, &[offset])
+ .into_iter()
+ .next()
+ .unwrap();
+ if location.column >= 1 {
+ location.column -= 1;
+ }
+
+ self.print_snippet(
+ out,
+ source_code,
+ path,
+ &location,
+ &location,
+ "^ syntax error",
+ )?;
+ }
let trace = &error.trace();
for item in trace.0.iter() {
let desc = &item.desc;
let source = item.location.clone();
let start_end = evaluation_state.map_source_locations(&source.0, &[source.1, source.2]);
- let source_fragment: String = evaluation_state
- .get_source(&source.0)
- .unwrap()
- .chars()
- .skip(start_end[0].line_start_offset)
- .take(start_end[1].line_end_offset - start_end[0].line_start_offset)
- .collect();
+ self.print_snippet(
+ out,
+ &evaluation_state.get_source(&source.0).unwrap(),
+ &source.0,
+ &start_end[0],
+ &start_end[1],
+ desc,
+ )?;
+ }
+ Ok(())
+ }
+}
+
+impl ExplainingFormat {
+ fn print_snippet(
+ &self,
+ out: &mut dyn std::fmt::Write,
+ source: &str,
+ origin: &PathBuf,
+ start: &CodeLocation,
+ end: &CodeLocation,
+ desc: &str,
+ ) -> Result<(), std::fmt::Error> {
+ use annotate_snippets::{
+ display_list::{DisplayList, FormatOptions},
+ snippet::{AnnotationType, Slice, Snippet, SourceAnnotation},
+ };
+
+ let source_fragment: String = source
+ .chars()
+ .skip(start.line_start_offset)
+ .take(end.line_end_offset - end.line_start_offset)
+ .collect();
- let origin = self.resolver.resolve(&source.0);
- let snippet = Snippet {
- opt: FormatOptions {
- color: true,
- ..Default::default()
- },
- title: None,
- footer: vec![],
- slices: vec![Slice {
- source: &source_fragment,
- line_start: start_end[0].line,
- origin: Some(&origin),
- fold: false,
- annotations: vec![SourceAnnotation {
- label: desc,
- annotation_type: AnnotationType::Error,
- range: (
- source.1 - start_end[0].line_start_offset,
- source.2 - start_end[0].line_start_offset,
- ),
- }],
+ let origin = self.resolver.resolve(origin);
+ let snippet = Snippet {
+ opt: FormatOptions {
+ color: true,
+ ..Default::default()
+ },
+ title: None,
+ footer: vec![],
+ slices: vec![Slice {
+ source: &source_fragment,
+ line_start: start.line,
+ origin: Some(&origin),
+ fold: false,
+ annotations: vec![SourceAnnotation {
+ label: desc,
+ annotation_type: AnnotationType::Error,
+ range: (
+ start.offset - start.line_start_offset,
+ end.offset - start.line_start_offset,
+ ),
}],
- };
+ }],
+ };
- let dl = DisplayList::from(snippet);
- writeln!(out, "{}", dl)?;
- }
+ let dl = DisplayList::from(snippet);
+ writeln!(out, "{}", dl)?;
+
Ok(())
}
}
crates/jrsonnet-evaluator/src/val.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/val.rs
+++ b/crates/jrsonnet-evaluator/src/val.rs
@@ -349,7 +349,7 @@
for v in arr.iter() {
out.push_str("---\n");
out.push_str(&v.manifest(format)?);
- out.push_str("\n");
+ out.push('\n');
}
out.push_str("...");
}
crates/jrsonnet-parser/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-parser/src/lib.rs
+++ b/crates/jrsonnet-parser/src/lib.rs
@@ -37,7 +37,7 @@
rule reserved() = ("assert" / "else" / "error" / "false" / "for" / "function" / "if" / "import" / "importstr" / "in" / "local" / "null" / "tailstrict" / "then" / "self" / "super" / "true") end_of_ident()
rule id() = quiet!{ !reserved() alpha() (alpha() / digit())*} / expected!("<identifier>")
- rule keyword(id: &'static str)
+ rule keyword(id: &'static str) -> ()
= ##parse_string_literal(id) end_of_ident()
// Adds location data information to existing expression
rule l(s: &ParserSettings, x: rule<Expr>) -> LocExpr
@@ -85,11 +85,11 @@
[' ' | '\t']*<, {prefix.len() - 1}> "|||"
{let mut l = empty_lines.to_owned(); l.push_str(first_line); l.extend(lines); l}
pub rule string() -> String
- = "\"" str:$(("\\\"" / "\\\\" / (!['"'][_]))*) "\"" {unescape::unescape(str).unwrap()}
+ = quiet!{ "\"" str:$(("\\\"" / "\\\\" / (!['"'][_]))*) "\"" {unescape::unescape(str).unwrap()}
/ "'" str:$(("\\'" / "\\\\" / (!['\''][_]))*) "'" {unescape::unescape(str).unwrap()}
/ "@'" str:$(("''" / (!['\''][_]))*) "'" {str.replace("''", "'")}
/ "@\"" str:$(("\"\"" / (!['"'][_]))*) "\"" {str.replace("\"\"", "\"")}
- / string_block()
+ / string_block() } / expected!("<string>")
pub rule field_name(s: &ParserSettings) -> expr::FieldName
= name:$(id()) {expr::FieldName::Fixed(name.into())}
@@ -208,54 +208,59 @@
SliceDesc { start, end, step }
}
+ rule binop(x: rule<()>) -> ()
+ = quiet!{ x() } / expected!("<binary op>")
+ rule unaryop(x: rule<()>) -> ()
+ = quiet!{ x() } / expected!("<unary op>")
+
rule expr(s: &ParserSettings) -> LocExpr
= start:position!() a:precedence! {
- a:(@) _ "||" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Or, b))}
+ a:(@) _ binop(<"||">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Or, b))}
--
- a:(@) _ "&&" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::And, b))}
+ a:(@) _ binop(<"&&">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::And, b))}
--
- a:(@) _ "|" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::BitOr, b))}
+ a:(@) _ binop(<"|">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::BitOr, b))}
--
- a:@ _ "^" _ b:(@) {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::BitXor, b))}
+ a:@ _ binop(<"^">) _ b:(@) {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::BitXor, b))}
--
- a:(@) _ "&" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::BitAnd, b))}
+ a:(@) _ binop(<"&">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::BitAnd, b))}
--
- a:(@) _ "==" _ b:@ {loc_expr_todo!(Expr::Apply(
+ a:(@) _ binop(<"==">) _ b:@ {loc_expr_todo!(Expr::Apply(
el!(Expr::Intrinsic("equals".into())),
ArgsDesc(vec![Arg(None, a), Arg(None, b)]),
true
))}
- a:(@) _ "!=" _ b:@ {loc_expr_todo!(Expr::UnaryOp(UnaryOpType::Not, el!(Expr::Apply(
+ a:(@) _ binop(<"!=">) _ b:@ {loc_expr_todo!(Expr::UnaryOp(UnaryOpType::Not, el!(Expr::Apply(
el!(Expr::Intrinsic("equals".into())),
ArgsDesc(vec![Arg(None, a), Arg(None, b)]),
true
))))}
--
- a:(@) _ "<" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Lt, b))}
- a:(@) _ ">" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Gt, b))}
- a:(@) _ "<=" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Lte, b))}
- a:(@) _ ">=" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Gte, b))}
- a:(@) _ keyword("in") _ b:@ {loc_expr_todo!(Expr::Apply(
+ a:(@) _ binop(<"<">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Lt, b))}
+ a:(@) _ binop(<">">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Gt, b))}
+ a:(@) _ binop(<"<=">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Lte, b))}
+ a:(@) _ binop(<">=">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Gte, b))}
+ a:(@) _ binop(<keyword("in")>) _ b:@ {loc_expr_todo!(Expr::Apply(
el!(Expr::Intrinsic("objectHasEx".into())), ArgsDesc(vec![Arg(None, b), Arg(None, a), Arg(None, el!(Expr::Literal(LiteralType::True)))]),
true
))}
--
- a:(@) _ "<<" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Lhs, b))}
- a:(@) _ ">>" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Rhs, b))}
+ a:(@) _ binop(<"<<">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Lhs, b))}
+ a:(@) _ binop(<">>">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Rhs, b))}
--
- a:(@) _ "+" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Add, b))}
- a:(@) _ "-" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Sub, b))}
+ a:(@) _ binop(<"+">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Add, b))}
+ a:(@) _ binop(<"-">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Sub, b))}
--
- a:(@) _ "*" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Mul, b))}
- a:(@) _ "/" _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Div, b))}
- a:(@) _ "%" _ b:@ {loc_expr_todo!(Expr::Apply(
+ a:(@) _ binop(<"*">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Mul, b))}
+ a:(@) _ binop(<"/">) _ b:@ {loc_expr_todo!(Expr::BinaryOp(a, BinaryOpType::Div, b))}
+ a:(@) _ binop(<"%">) _ b:@ {loc_expr_todo!(Expr::Apply(
el!(Expr::Intrinsic("mod".into())), ArgsDesc(vec![Arg(None, a), Arg(None, b)]),
false
))}
--
- "-" _ b:@ {loc_expr_todo!(Expr::UnaryOp(UnaryOpType::Minus, b))}
- "!" _ b:@ {loc_expr_todo!(Expr::UnaryOp(UnaryOpType::Not, b))}
- "~" _ b:@ { loc_expr_todo!(Expr::UnaryOp(UnaryOpType::BitNot, b)) }
+ unaryop(<"-">) _ b:@ {loc_expr_todo!(Expr::UnaryOp(UnaryOpType::Minus, b))}
+ unaryop(<"!">) _ b:@ {loc_expr_todo!(Expr::UnaryOp(UnaryOpType::Not, b))}
+ unaryop(<"~">) _ b:@ { loc_expr_todo!(Expr::UnaryOp(UnaryOpType::BitNot, b)) }
--
a:(@) _ "[" _ s:slice_desc(s) _ "]" {loc_expr_todo!(Expr::Apply(
el!(Expr::Intrinsic("slice".into())),