difftreelog
refactor drop derivative dependency
in: master
5 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -194,7 +194,7 @@
"heck",
"proc-macro2",
"quote",
- "syn 2.0.76",
+ "syn",
]
[[package]]
@@ -244,17 +244,6 @@
dependencies = [
"generic-array",
"typenum",
-]
-
-[[package]]
-name = "derivative"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.109",
]
[[package]]
@@ -483,7 +472,6 @@
dependencies = [
"annotate-snippets",
"anyhow",
- "derivative",
"hashbrown 0.14.5",
"hi-doc",
"jrsonnet-gcmodule",
@@ -533,7 +521,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.76",
+ "syn",
]
[[package]]
@@ -551,7 +539,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.76",
+ "syn",
"syn-dissect-closure",
]
@@ -694,7 +682,7 @@
"proc-macro2",
"quote",
"regex-syntax",
- "syn 2.0.76",
+ "syn",
]
[[package]]
@@ -1019,7 +1007,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.76",
+ "syn",
]
[[package]]
@@ -1123,17 +1111,6 @@
[[package]]
name = "syn"
-version = "1.0.109"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
-]
-
-[[package]]
-name = "syn"
version = "2.0.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525"
@@ -1151,7 +1128,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.76",
+ "syn",
]
[[package]]
@@ -1202,7 +1179,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.76",
+ "syn",
]
[[package]]
@@ -1428,5 +1405,5 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.76",
+ "syn",
]
Cargo.tomldiffbeforeafterboth1[workspace]2members = ["crates/*", "bindings/jsonnet", "cmds/*", "tests", "xtask"]3default-members = ["cmds/jrsonnet"]4resolver = "2"56[workspace.package]7authors = ["Yaroslav Bolyukin <iam@lach.pw>"]8edition = "2021"9license = "MIT"10repository = "https://github.com/CertainLach/jrsonnet"11version = "0.5.0-pre96"1213[workspace.dependencies]14jrsonnet-evaluator = { path = "./crates/jrsonnet-evaluator", version = "0.5.0-pre96" }15jrsonnet-macros = { path = "./crates/jrsonnet-macros", version = "0.5.0-pre96" }16jrsonnet-parser = { path = "./crates/jrsonnet-parser", version = "0.5.0-pre96" }17jrsonnet-rowan-parser = { path = "./crates/jrsonnet-rowan-parser", version = "0.5.0-pre96" }18jrsonnet-interner = { path = "./crates/jrsonnet-interner", version = "0.5.0-pre96" }19jrsonnet-stdlib = { path = "./crates/jrsonnet-stdlib", version = "0.5.0-pre96" }20jrsonnet-cli = { path = "./crates/jrsonnet-cli", version = "0.5.0-pre96" }21jrsonnet-types = { path = "./crates/jrsonnet-types", version = "0.5.0-pre96" }22jrsonnet-gcmodule = { version = "0.3.7" }23# Diagnostics.24# hi-doc is my library, which handles text formatting very well, but isn't polished enough yet25# Previous implementation was based on annotate-snippets, which I don't like for many reasons.26#27# I'm against using miette, because I want to reuse data between interpreter and annotations, yet miette28# and other libraries want to handle spans etc by itself, which is okay for compiler diagnostics, but is29# bad for interpreter, where interpreter and parser are paired much closer.30hi-doc = "0.1.1"31annotate-snippets = "0.10.1"3233# CLI34clap = "4.5"35clap_complete = "4.5"3637# Parsing, manifestification is implemented manually everywhere38# Note on serde_yaml_with_quirks: This is a fork of serde-yaml with legacy yaml 1.1 support:39# https://github.com/dtolnay/serde-yaml/pull/22540serde = "1.0.197"41serde_json = "1.0.114"42serde_yaml_with_quirks = "0.8.24"4344# Error handling45anyhow = "1.0.83"46thiserror = "1.0.60"4748# Code formatting49dprint-core = "0.65.0"5051# Stdlib hashing functions52md5 = "0.7.0"53sha1 = "0.10.6"54sha2 = "0.10.8"55sha3 = "0.10.8"5657# Source code parsing.58# Jrsonnet has two parsers for jsonnet - one is for execution, and another is for better parsing diagnostics/lints/LSP.59# First (and fast one) is based on peg, second is based on rowan.60peg = "0.8.3"61logos = "0.14.0"62ungrammar = "1.16.1"63rowan = "0.15.15"6465mimallocator = "0.1.3"66indoc = "2.0"67insta = "1.39"68tempfile = "3.10"69pathdiff = "0.2.1"70hashbrown = "0.14.5"71static_assertions = "1.1"72rustc-hash = "1.1"73num-bigint = "0.4.5"74derivative = "2.2.0"75strsim = "0.11.0"76proc-macro2 = "1.0"77quote = "1.0"78syn = "2.0"79drop_bomb = "0.1.5"80base64 = "0.22.1"81indexmap = "2.2.3"82itertools = "0.13.0"83xshell = "0.2.6"8485lsp-server = "0.7.6"86lsp-types = "0.96.0"8788regex = "1.10"89lru = "0.12.3"9091json-structural-diff = "0.1.0"92syn-dissect-closure = "0.1.0"9394[workspace.lints.rust]95unsafe_op_in_unsafe_fn = "deny"9697# TODO: add docs everywhere98# missing_doc = "warn"99100elided_lifetimes_in_paths = "allow"101explicit_outlives_requirements = "allow"102noop_method_call = "allow"103single_use_lifetimes = "allow"104variant_size_differences = "allow"105macro_expanded_macro_exports_accessed_by_absolute_paths = "allow"106107[workspace.lints.rustdoc]108all = "warn"109110[workspace.lints.clippy]111all = { level = "warn", priority = -1 }112nursery = { level = "warn", priority = -1 }113pedantic = { level = "warn", priority = -1 }114115ptr_arg = "allow"116# Too verbose117must_use_candidate = "allow"118# A lot of functions pass around errors thrown by code119missing_errors_doc = "allow"120# A lot of pointers have interior Rc121needless_pass_by_value = "allow"122# Its fine123wildcard_imports = "allow"124enum_glob_use = "allow"125module_name_repetitions = "allow"126# TODO: fix individual issues, however this works as intended almost everywhere127cast_precision_loss = "allow"128cast_possible_wrap = "allow"129cast_possible_truncation = "allow"130cast_sign_loss = "allow"131# False positives132# https://github.com/rust-lang/rust-clippy/issues/6902133use_self = "allow"134# https://github.com/rust-lang/rust-clippy/issues/8539135iter_with_drain = "allow"136type_repetition_in_bounds = "allow"137# ci is being run with nightly, but library should work on stable138missing_const_for_fn = "allow"139# too many false-positives with .expect() calls140missing_panics_doc = "allow"141# false positive for IStr type. There is an configuration option for142# such cases, but it doesn't work:143# https://github.com/rust-lang/rust-clippy/issues/9801144mutable_key_type = "allow"145# false positives146redundant_pub_crate = "allow"147# Sometimes code is fancier without that148manual_let_else = "allow"149# Something is broken about that lint, can't be allowed for150# codegenerated-stdlib block151similar_names = "allow"152153#[profile.test]154#opt-level = 1155156[profile.release]157opt-level = 3158lto = "fat"159codegen-units = 1160debug = 0161panic = "abort"162strip = true163164[profile.releasedebug]165inherits = "release"166debug = 2167panic = "unwind"168strip = falsecrates/jrsonnet-evaluator/Cargo.tomldiffbeforeafterboth--- a/crates/jrsonnet-evaluator/Cargo.toml
+++ b/crates/jrsonnet-evaluator/Cargo.toml
@@ -59,5 +59,4 @@
hi-doc = { workspace = true, optional = true }
# Bigint
num-bigint = { workspace = true, features = ["serde"], optional = true }
-derivative.workspace = true
stacker = "0.1.15"
crates/jrsonnet-evaluator/src/function/parse.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/function/parse.rs
+++ b/crates/jrsonnet-evaluator/src/function/parse.rs
@@ -1,8 +1,7 @@
use std::mem::replace;
-use jrsonnet_gcmodule::Trace;
use jrsonnet_interner::IStr;
-use jrsonnet_parser::{LocExpr, ParamsDesc};
+use jrsonnet_parser::ParamsDesc;
use super::{arglike::ArgsLike, builtin::BuiltinParam};
use crate::{
crates/jrsonnet-evaluator/src/val.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/val.rs
+++ b/crates/jrsonnet-evaluator/src/val.rs
@@ -8,7 +8,6 @@
rc::Rc,
};
-use derivative::Derivative;
use jrsonnet_gcmodule::{Cc, Trace};
use jrsonnet_interner::IStr;
pub use jrsonnet_macros::Thunk;
@@ -402,8 +401,7 @@
/// Represents jsonnet number
/// Jsonnet numbers are finite f64, with NaNs disallowed
-#[derive(Trace, Clone, Copy, Derivative)]
-#[derivative(Debug = "transparent")]
+#[derive(Trace, Clone, Copy)]
#[repr(transparent)]
pub struct NumValue(f64);
impl NumValue {
@@ -439,6 +437,11 @@
Some(self.cmp(other))
}
}
+impl Debug for NumValue {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ Debug::fmt(&self.0, f)
+ }
+}
impl Display for NumValue {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Display::fmt(&self.0, f)