repo
string
pull_number
int64
instance_id
string
issue_numbers
list
base_commit
string
patch
string
test_patch
string
problem_statement
string
hints_text
string
created_at
string
version
string
updated_at
string
environment_setup_commit
string
FAIL_TO_PASS
list
PASS_TO_PASS
list
FAIL_TO_FAIL
list
PASS_TO_FAIL
list
source_dir
string
aya-rs/aya
397
aya-rs__aya-397
[ "386" ]
89df8c36d36584a506df50cdbbe8a3b0660337c2
diff --git a/aya-log/src/lib.rs b/aya-log/src/lib.rs --- a/aya-log/src/lib.rs +++ b/aya-log/src/lib.rs @@ -90,7 +90,7 @@ impl BpfLogger { logger: T, ) -> Result<BpfLogger, Error> { let logger = Arc::new(logger); - let mut logs: AsyncPerfEventArray<_> = bpf.map_mut("AYA_LOGS")?.try_into()?;...
diff --git a/aya/src/maps/bloom_filter.rs b/aya/src/maps/bloom_filter.rs --- a/aya/src/maps/bloom_filter.rs +++ b/aya/src/maps/bloom_filter.rs @@ -85,38 +72,6 @@ impl<T: Deref<Target = Map>, V: Pod> BloomFilter<T, V> { } } -impl<V: Pod> TryFrom<MapRef> for BloomFilter<MapRef, V> { - type Error = MapError; - ...
Convert BPF maps to using enums Following what we currenlty [do for EBPF Programs ](https://github.com/aya-rs/aya/blob/main/aya/src/programs/mod.rs#L221) convert aya's notion of bpf maps to be an Enum rather than having concrete types (HashMap, PerfEventArray etc) for every BPF map type. Maps were initially design...
@dave-tucker You can assign me here :) I've started this in https://github.com/astoycos/aya/tree/refactor-map Still have some to go but I'll keep updating with status here
2022-09-29T18:54:50Z
0.11
2023-02-23T10:03:39Z
61608e64583f9dc599eef9b8db098f38a765b285
[ "maps::bloom_filter::tests::test_insert_ok", "maps::bloom_filter::tests::test_contains_syscall_error", "maps::bloom_filter::tests::test_contains_not_found", "maps::bloom_filter::tests::test_insert_syscall_error", "maps::bloom_filter::tests::test_new_not_created", "maps::bloom_filter::tests::test_new_ok", ...
[]
[]
[]
auto_2025-06-07
aya-rs/aya
387
aya-rs__aya-387
[ "385" ]
98e25ca5e6550526d35f783d74e6276f7aaf8a71
diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -443,7 +443,7 @@ impl<'a> BpfLoader<'a> { Err(_) => { let fd = map.create(&name)?; map.pin(&name, path).map_err(|error| MapError::PinError { - ...
diff --git a/aya/src/maps/bloom_filter.rs b/aya/src/maps/bloom_filter.rs --- a/aya/src/maps/bloom_filter.rs +++ b/aya/src/maps/bloom_filter.rs @@ -254,7 +250,7 @@ mod tests { assert!(matches!( bloom_filter.insert(1, 0), - Err(MapError::SyscallError { call, code: -1, io_error }) if cal...
Allow the user to load pre-existing BPF maps from a pin point or a Raw FD Similar to https://github.com/cilium/ebpf 's Map APIs https://pkg.go.dev/github.com/cilium/ebpf#LoadPinnedMap and https://pkg.go.dev/github.com/cilium/ebpf#NewMapFromFD I would like the ability to load and interact with Pre-existing BPF maps whi...
2022-09-06T21:09:01Z
0.11
2023-02-23T10:04:53Z
61608e64583f9dc599eef9b8db098f38a765b285
[ "maps::bloom_filter::tests::test_contains_not_found", "maps::bloom_filter::tests::test_contains_syscall_error", "maps::bloom_filter::tests::test_insert_syscall_error", "maps::bloom_filter::tests::test_new_not_created", "maps::bloom_filter::tests::test_insert_ok", "maps::bloom_filter::tests::test_new_ok", ...
[]
[]
[]
auto_2025-06-07
aya-rs/aya
83
aya-rs__aya-83
[ "21" ]
f632f81db152fd1185047550ec819926a83b0eae
diff --git a/bpf/aya-bpf-macros/Cargo.toml b/bpf/aya-bpf-macros/Cargo.toml --- a/bpf/aya-bpf-macros/Cargo.toml +++ b/bpf/aya-bpf-macros/Cargo.toml @@ -10,4 +10,7 @@ proc-macro = true [dependencies] proc-macro2 = "1.0" quote = "1.0" -syn = {version = "1.0", features = ["full"]} \ No newline at end of file +syn = {ver...
diff --git a/bpf/aya-bpf/src/programs/lsm.rs b/bpf/aya-bpf/src/programs/lsm.rs --- a/bpf/aya-bpf/src/programs/lsm.rs +++ b/bpf/aya-bpf/src/programs/lsm.rs @@ -10,6 +10,49 @@ impl LsmContext { pub fn new(ctx: *mut c_void) -> LsmContext { LsmContext { ctx } } + + /// Returns the `n`th argument passe...
feat(bpf): add probe register utility methods There is currently a lot of commented code in those methods because the code will panic on no_std, if possible a proper fix for assert and panic should be added, so we can write safer code when using specific arch
2021-10-28T14:42:44Z
0.10
2022-01-11T16:42:21Z
b9a544831c5b4cd8728e9cca6580c14a623b7793
[ "src/helpers.rs - helpers::bpf_get_current_pid_tgid (line 305) - compile", "src/helpers.rs - helpers::bpf_probe_read (line 27) - compile", "src/helpers.rs - helpers::bpf_probe_read_kernel (line 101) - compile", "src/helpers.rs - helpers::bpf_probe_read_user_str (line 184) - compile", "src/helpers.rs - helpe...
[]
[]
[]
auto_2025-06-07
aya-rs/aya
63
aya-rs__aya-63
[ "45" ]
a7f5b3775d27c89e226c49c4a2f21d0e90b08591
diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -2,7 +2,7 @@ use std::{ collections::HashMap, error::Error, fs, io, - os::raw::c_int, + os::{raw::c_int, unix::io::RawFd}, path::{Path, PathBuf}, }; diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs --- a/a...
diff --git a/aya/src/maps/hash_map/hash_map.rs b/aya/src/maps/hash_map/hash_map.rs --- a/aya/src/maps/hash_map/hash_map.rs +++ b/aya/src/maps/hash_map/hash_map.rs @@ -182,6 +182,7 @@ mod tests { let map = Map { obj: new_obj_map("TEST"), fd: None, + pinned: false, }...
Add support for map and program pinning Program pinning looks simple enough: It should be possible to add `pub fn pin(&mut self, path: Path )` to the `Link` trait. Where `Path` would be a relative path on `/sys/fs/bpf` or an absolute path to `/sys/fs/bpf`. The implementation would call the `bpf` syscall and `BPF_OBJ...
2021-09-24T16:32:32Z
0.10
2022-01-11T16:44:13Z
b9a544831c5b4cd8728e9cca6580c14a623b7793
[ "maps::hash_map::hash_map::tests::test_insert_ok", "maps::hash_map::hash_map::tests::test_get_not_found", "maps::hash_map::hash_map::tests::test_insert_syscall_error", "maps::hash_map::hash_map::tests::test_get_syscall_error", "maps::hash_map::hash_map::tests::test_iter", "maps::hash_map::hash_map::tests:...
[]
[]
[]
auto_2025-06-07
aya-rs/aya
774
aya-rs__aya-774
[ "636" ]
792f467d40dc4c6c543c62dda7a608863fc364dc
diff --git a/aya/src/maps/mod.rs b/aya/src/maps/mod.rs --- a/aya/src/maps/mod.rs +++ b/aya/src/maps/mod.rs @@ -291,9 +291,9 @@ macro_rules! impl_try_from_map { // rather than the repeated idents used later because the macro language does not allow one // repetition to be pasted inside another. ($ty_param...
diff --git a/aya/src/maps/hash_map/hash_map.rs b/aya/src/maps/hash_map/hash_map.rs --- a/aya/src/maps/hash_map/hash_map.rs +++ b/aya/src/maps/hash_map/hash_map.rs @@ -108,43 +108,22 @@ mod tests { use libc::{EFAULT, ENOENT}; use crate::{ - bpf_map_def, generated::{ bpf_attr, bpf...
cant' use LruHashMap in userspace the userspace HashMap try_from impl ```rust impl<'a, V: Pod, K: Pod> TryFrom<&'a mut Map> for HashMap<&'a mut MapData, V, K> { type Error = MapError; fn try_from(map: &'a mut Map) -> Result<HashMap<&'a mut MapData, V, K>, MapError> { match map { Ma...
https://docs.rs/aya/latest/src/aya/maps/hash_map/hash_map.rs.html#48 the crates.io version handled the lruhashmap maybe we can add a new type LruHashMap to fix this problem Do you have a test? I don't understand this issue. sorry for the late reply kernel space codes main.rs ```rust #[xdp(name = "lru_test")]...
2023-08-31T01:49:22Z
1.5
2023-09-01T15:30:33Z
1d272f38bd19f64652ac8a278948f61e66164856
[ "maps::hash_map::hash_map::tests::test_try_from_ok_lru", "maps::hash_map::per_cpu_hash_map::tests::test_try_from_ok_lru" ]
[ "maps::bloom_filter::tests::test_contains_not_found", "maps::bloom_filter::tests::test_contains_syscall_error", "maps::bloom_filter::tests::test_insert_ok", "maps::bloom_filter::tests::test_insert_syscall_error", "maps::bloom_filter::tests::test_new_ok", "maps::bloom_filter::tests::test_try_from_ok", "m...
[]
[]
auto_2025-06-07
aya-rs/aya
656
aya-rs__aya-656
[ "654" ]
61608e64583f9dc599eef9b8db098f38a765b285
diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,6 @@ resolver = "2" default-members = [ "aya", - "aya-bpf-macros", "aya-log", "aya-log-common", "aya-log-parser", diff --git a/aya-obj/Cargo.toml b/aya-obj/Cargo.toml --- a/aya-obj/Cargo.toml +++ b/aya-obj/Carg...
diff --git a/aya-obj/src/obj.rs b/aya-obj/src/obj.rs --- a/aya-obj/src/obj.rs +++ b/aya-obj/src/obj.rs @@ -1486,7 +1486,7 @@ pub fn copy_instructions(data: &[u8]) -> Result<Vec<bpf_insn>, ParseError> { #[cfg(test)] mod tests { use alloc::vec; - use matches::assert_matches; + use assert_matches::assert_matc...
Kernel version detection is broken on WSL Using aya from with the yesterday's commit fails with ``` thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError(Parse("90.1", "patch"))', /home/debian/.cargo/git/checkouts/aya-c55fbc69175ac116/242d8c3/aya/src/maps/mod.rs:504:55 ``` when runnin...
2023-07-14T14:51:06Z
0.11
2023-07-15T03:18:35Z
61608e64583f9dc599eef9b8db098f38a765b285
[ "btf::btf::tests::parsing_older_ext_data", "btf::btf::tests::test_fixup_ptr", "btf::btf::tests::test_fixup_func_proto", "btf::btf::tests::test_fixup_datasec", "btf::btf::tests::test_parse_header", "btf::btf::tests::test_sanitize_datasec", "btf::btf::tests::test_parse_btf", "btf::btf::tests::test_sanit...
[ "tests::btf_relocations::relocate_enum64", "tests::btf_relocations::relocate_enum64_signed", "tests::btf_relocations::relocate_enum_signed", "tests::load::pin_lifecycle", "tests::smoke::xdp" ]
[ "tests::btf_relocations::relocate_pointer", "tests::elf::test_maps", "tests::btf_relocations::relocate_field", "tests::btf_relocations::relocate_struct_flavors", "tests::btf_relocations::relocate_enum", "tests::rbpf::use_map_with_rbpf", "tests::rbpf::run_with_rbpf", "tests::load::pin_lifecycle_kprobe"...
[]
auto_2025-06-07
aya-rs/aya
921
aya-rs__aya-921
[ "918" ]
1d272f38bd19f64652ac8a278948f61e66164856
diff --git a/aya/src/programs/cgroup_device.rs b/aya/src/programs/cgroup_device.rs --- a/aya/src/programs/cgroup_device.rs +++ b/aya/src/programs/cgroup_device.rs @@ -8,7 +8,7 @@ use crate::{ bpf_prog_get_fd_by_id, define_link_wrapper, load_program, query, CgroupAttachMode, FdLink, Link, ProgAttachLin...
diff --git a/aya/src/programs/links.rs b/aya/src/programs/links.rs --- a/aya/src/programs/links.rs +++ b/aya/src/programs/links.rs @@ -394,6 +397,125 @@ pub enum LinkError { SyscallError(#[from] SyscallError), } +#[derive(Debug)] +pub(crate) enum LinkRef { + Id(u32), + Fd(RawFd), +} + +bitflags::bitflags!...
Add TCX link support Following the recent addition of [link support for TC programs](https://lwn.net/Articles/938632/) we should add the necessary bits to support this in aya as well. The [commit adding support to the cilium ebpf library](https://github.com/cilium/ebpf/commit/417f8a264d2e691649ede9b995fb334e6c58ca...
2024-04-05T15:21:29Z
1.5
2024-10-09T09:31:40Z
1d272f38bd19f64652ac8a278948f61e66164856
[ "bpf::tests::test_adjust_to_page_size", "bpf::tests::test_max_entries_override", "maps::bloom_filter::tests::test_contains_syscall_error", "maps::bloom_filter::tests::test_contains_not_found", "maps::bloom_filter::tests::test_insert_ok", "maps::bloom_filter::tests::test_insert_syscall_error", "maps::blo...
[]
[]
[]
auto_2025-06-07
aya-rs/aya
897
aya-rs__aya-897
[ "896" ]
b6a84b658ae00f23d0f1721c30d11f2e57f99eab
diff --git a/aya-bpf-macros/src/cgroup_skb.rs b/aya-bpf-macros/src/cgroup_skb.rs --- a/aya-bpf-macros/src/cgroup_skb.rs +++ b/aya-bpf-macros/src/cgroup_skb.rs @@ -29,7 +29,7 @@ impl CgroupSkb { let section_name: Cow<'_, _> = if self.attach_type.is_some() { format!("cgroup_skb/{}", self.attach_type...
diff --git a/aya-bpf-macros/src/cgroup_skb.rs b/aya-bpf-macros/src/cgroup_skb.rs --- a/aya-bpf-macros/src/cgroup_skb.rs +++ b/aya-bpf-macros/src/cgroup_skb.rs @@ -66,7 +66,7 @@ mod tests { let expanded = prog.expand().unwrap(); let expected = quote! { #[no_mangle] - #[link_sect...
Error: error parsing BPF object: invalid program section `cgroup_skb` **My program code: ``` #[cgroup_skb] pub fn cg01(ctx: SkBuffContext) -> i32 { match try_cg02(ctx) { Ok(ret) => ret, Err(ret) => ret, } } fn try_cg01(ctx: SkBuffContext) -> Result<i32, i32> { info!(&ctx, "received...
Change ``` #[cgroup_skb] ``` to ``` #[cgroup_skb(ingress)] ``` if you want to hook to ingress or ``` #[cgroup_skb(egress)] ``` if you want to hook to egress @dave-tucker looks like this was broken in https://github.com/aya-rs/aya/commit/c72aab5f7b809b48273cd2fed4554ddff6b66bdf#diff-748602d38469...
2024-03-04T07:45:13Z
1.5
2024-03-04T08:53:45Z
1d272f38bd19f64652ac8a278948f61e66164856
[ "cgroup_skb::tests::cgroup_skb" ]
[ "cgroup_device::tests::test_cgroup_device", "btf_tracepoint::tests::test_btf_tracepoint", "cgroup_skb::tests::cgroup_skb_egress", "btf_tracepoint::tests::test_btf_tracepoint_with_function", "cgroup_skb::tests::cgroup_skb_ingress", "cgroup_skb::tests::priv_function", "cgroup_skb::tests::pub_crate_functio...
[]
[]
auto_2025-06-07
aya-rs/aya
475
aya-rs__aya-475
[ "473" ]
c6f93b177511d3dfb0ab6cce4fa298d13707dedc
diff --git /dev/null b/aya-obj/Cargo.toml new file mode 100644 --- /dev/null +++ b/aya-obj/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "aya-obj" +version = "0.1.0" +description = "An eBPF object file parsing library with BTF and relocation support." +keywords = ["ebpf", "bpf", "btf", "elf", "object"] +license = "MIT...
diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [workspace] members = [ - "aya", "aya-tool", "aya-log", "aya-log-common", "aya-log-parser", "test/integration-test", "test/integration-test-macros", "xtask", + "aya", "aya-obj", "aya-tool", "aya-log", "aya-log-common", "aya...
Feature Request: Make aya::obj API public to allow usage with different runtime There exists some user-space runtime for eBPF programs, like [rbpf](https://github.com/qmonnet/rbpf). However, taking rbpf for an example, it only accepts fully relocated raw eBPF bytecode (similar to BPF_PROG_LOAD in `bpf(2)`) and does not...
This has come up a couple of times before. I think we could split the linking/relocation code as part of a separate `aya-obj` or something crate. I just don't want to commit to exposing it as part of the main `aya` crate. We're slowly refining the `aya` API towards releasing 1.0, and at this time I think we should focu...
2022-12-28T08:34:06Z
0.11
2023-03-10T14:43:06Z
61608e64583f9dc599eef9b8db098f38a765b285
[ "generate::test::test_extract_ctypes_prefix", "generate::test::test_combine_flags" ]
[]
[]
[]
auto_2025-06-07
aya-rs/aya
431
aya-rs__aya-431
[ "427" ]
82773f46c8cff830b36b8b4f57100952eb6ec8d2
diff --git a/aya/src/maps/array/array.rs b/aya/src/maps/array/array.rs --- a/aya/src/maps/array/array.rs +++ b/aya/src/maps/array/array.rs @@ -1,4 +1,5 @@ use std::{ + borrow::Borrow, convert::{AsMut, AsRef}, marker::PhantomData, }; diff --git a/aya/src/maps/array/array.rs b/aya/src/maps/array/array.rs -...
diff --git a/aya/src/maps/hash_map/hash_map.rs b/aya/src/maps/hash_map/hash_map.rs --- a/aya/src/maps/hash_map/hash_map.rs +++ b/aya/src/maps/hash_map/hash_map.rs @@ -311,6 +317,27 @@ mod tests { assert!(hm.insert(1, 42, 0).is_ok()); } + #[test] + fn test_insert_boxed_ok() { + override_sysc...
API for updating maps with large Pod Although Rust is memory safe, it does not have any stack overflow protection. The default Rust stack is 2MB which is plenty for most applications. However, when dealing with Pod with large arrays embedded, it's possible to overflow the user space Rust stack. Here's an example: ...
We can change the insert() calls to take `AsRef<K>` and `AsRef<V>` so they work with both values and references (including boxes)
2022-11-01T20:35:41Z
0.11
2023-02-23T09:59:02Z
61608e64583f9dc599eef9b8db098f38a765b285
[ "maps::bloom_filter::tests::test_contains_syscall_error", "maps::bloom_filter::tests::test_contains_not_found", "maps::bloom_filter::tests::test_insert_ok", "maps::bloom_filter::tests::test_insert_syscall_error", "maps::bloom_filter::tests::test_new_not_created", "maps::bloom_filter::tests::test_new_ok", ...
[]
[]
[]
auto_2025-06-07
aya-rs/aya
90
aya-rs__aya-90
[ "88" ]
3a8e4fe9b91538a0fafd8c91ae96185c1a017651
diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs --- a/aya/src/obj/mod.rs +++ b/aya/src/obj/mod.rs @@ -410,6 +410,7 @@ struct Section<'a> { address: u64, name: &'a str, data: &'a [u8], + size: u64, relocations: Vec<Relocation>, } diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs --- a/a...
diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs --- a/aya/src/obj/mod.rs +++ b/aya/src/obj/mod.rs @@ -607,6 +611,7 @@ mod tests { address: 0, name, data, + size: data.len() as u64, relocations: Vec::new(), } }
bpf(2) fails with invalid argument when creating .bss map I wanted to test out a simple example of using .data, .rodata, and .bss maps in Aya. It seems that .data and .rodata work just fine, but creating the .bss map always seems to fail with an invalid argument error. Inspecting the strace dump (shown below), the offe...
2021-10-31T00:02:13Z
0.10
2021-11-04T06:00:06Z
b9a544831c5b4cd8728e9cca6580c14a623b7793
[ "maps::hash_map::hash_map::tests::test_get_syscall_error", "maps::hash_map::hash_map::tests::test_insert_ok", "maps::hash_map::hash_map::tests::test_get_not_found", "maps::hash_map::hash_map::tests::test_insert_syscall_error", "maps::hash_map::hash_map::tests::test_iter", "maps::hash_map::hash_map::tests:...
[]
[]
[]
auto_2025-06-07
aya-rs/aya
85
aya-rs__aya-85
[ "84" ]
c4b6970774930540ece21df329a1abd8dcb4ceb7
diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -20,9 +20,9 @@ use crate::{ Object, ParseError, ProgramSection, }, programs::{ - CgroupSkb, CgroupSkbAttachType, KProbe, LircMode2, Lsm, PerfEvent, ProbeKind, Program, - ProgramData, ProgramError, ...
diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs --- a/aya/src/obj/mod.rs +++ b/aya/src/obj/mod.rs @@ -1046,4 +1050,21 @@ mod tests { }) ); } + + #[test] + fn test_parse_section_btf_tracepoint() { + let mut obj = fake_obj(); + + assert_matches!( + obj.parse_...
Support BTF tracepoints (tp_btf/*, also called "BTF-enabled raw tracepoints") #68 added support for raw tracepoints (raw_tp/*). However, there's another variant of raw tracepoints which uses tp_btf/*. I don't fully understand how it work but I think it makes it so that you can access the arguments of the traced hook po...
2021-10-28T21:14:42Z
0.10
2021-10-29T16:37:08Z
b9a544831c5b4cd8728e9cca6580c14a623b7793
[ "maps::hash_map::hash_map::tests::test_get_syscall_error", "maps::hash_map::hash_map::tests::test_get_not_found", "maps::hash_map::hash_map::tests::test_insert_ok", "maps::hash_map::hash_map::tests::test_insert_syscall_error", "maps::hash_map::hash_map::tests::test_iter", "maps::hash_map::hash_map::tests:...
[]
[]
[]
auto_2025-06-07
aya-rs/aya
253
aya-rs__aya-253
[ "51" ]
b9a544831c5b4cd8728e9cca6580c14a623b7793
diff --git a/aya/src/programs/cgroup_skb.rs b/aya/src/programs/cgroup_skb.rs --- a/aya/src/programs/cgroup_skb.rs +++ b/aya/src/programs/cgroup_skb.rs @@ -9,7 +9,8 @@ use crate::{ bpf_prog_type::BPF_PROG_TYPE_CGROUP_SKB, }, programs::{ - define_link_wrapper, load_program, FdLink, Link, ProgAtt...
diff --git a/aya/src/programs/links.rs b/aya/src/programs/links.rs --- a/aya/src/programs/links.rs +++ b/aya/src/programs/links.rs @@ -153,7 +192,7 @@ pub(crate) use define_link_wrapper; mod tests { use std::{cell::RefCell, rc::Rc}; - use crate::programs::ProgramError; + use crate::programs::{OwnedLink, P...
lifecyle: Add a `forget()` API for `Link` Default behaviour is that the `Drop` trait calls `detach()` when the program is terminated (or panics). For some types of long running programs you may wish to intentionally `forget()` the fd wrapped by `Link`, so you can keep the program running after exit. Query and detach c...
I'm not sure it should be called `forget()`, but then again I am struggling to come up with a better name. Maybe something like `keep_program_attached()`, `disown()`, or `keep_attached()`. Maybe I'll come up with a better name.
2022-05-06T23:27:37Z
0.10
2022-05-12T18:56:36Z
b9a544831c5b4cd8728e9cca6580c14a623b7793
[ "maps::hash_map::hash_map::tests::test_insert_ok", "maps::hash_map::hash_map::tests::test_get_not_found", "maps::hash_map::hash_map::tests::test_get_syscall_error", "maps::hash_map::hash_map::tests::test_insert_syscall_error", "maps::hash_map::hash_map::tests::test_iter", "maps::hash_map::hash_map::tests:...
[]
[]
[]
auto_2025-06-07
sharkdp/bat
1,070
sharkdp__bat-1070
[ "1046" ]
b09d245dea7e2f45cf461fda978f3256e7162465
diff --git a/.gitmodules b/.gitmodules --- a/.gitmodules +++ b/.gitmodules @@ -185,3 +185,6 @@ [submodule "assets/syntaxes/02_Extra/AsciiDoc"] path = assets/syntaxes/02_Extra/AsciiDoc url = https://github.com/asciidoctor/sublimetext-asciidoc.git +[submodule "assets/syntaxes/02_Extra/GLSL"] + path = assets/syntaxes...
diff --git a/src/assets.rs b/src/assets.rs --- a/src/assets.rs +++ b/src/assets.rs @@ -428,6 +428,7 @@ mod tests { assert_eq!(test.syntax_for_file("test.h"), "C++"); assert_eq!(test.syntax_for_file("test.sass"), "Sass"); assert_eq!(test.syntax_for_file("test.js"), "JavaScript (Babel)"); + ...
Add GLSL syntax <!-- BEFORE YOU MAKE A REQUEST: Are you looking to add a new syntax to use on one of your devices? Bat supports locally-installed language definitions. See the link below: https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions If you think adding this syntax would help other...
Relevant package: https://packagecontrol.io/packages/OpenGL%20Shading%20Language%20%28GLSL%29
2020-06-23T01:20:46Z
0.15
2020-06-29T04:10:37Z
2d1a92b7cc2af6c35f868cbefe9dbfe466c59fcb
[ "config::default_config_should_include_all_lines", "config::default_config_should_highlight_no_lines", "less::test_parse_less_version_487", "less::test_parse_less_version_529", "input::basic", "less::test_parse_less_version_wrong_program", "less::test_parse_less_version_551", "input::utf16le", "line...
[]
[]
[]
auto_2025-06-07
sharkdp/bat
1,023
sharkdp__bat-1023
[ "978" ]
1dae5bbc95c5f2297ebd1d12bc109f520c0351d2
diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -76,6 +76,7 @@ default-features = false [dev-dependencies] tempdir = "0.3" assert_cmd = "1.0.1" +predicates = "1.0.4" [build-dependencies] clap = { version = "2.33", optional = true }
diff --git /dev/null b/.github/workflows/CICD.yml new file mode 100644 --- /dev/null +++ b/.github/workflows/CICD.yml @@ -0,0 +1,294 @@ +name: CICD + +env: + PROJECT_NAME: bat + PROJECT_DESC: "A `cat` clone with wings" + PROJECT_AUTH: "sharkdp" + RUST_MIN_SRV: "1.40.0" + +on: [push, pull_request] + +jobs: + min_ve...
Github actions integration Is there any interest in using Github actions for this Project? I had a nice experience using them and I would set up one for testing and build automation.
> Is there any interest in using Github actions for this Project? Yes, there is! :smile: @rivy has recently upgraded the CICD system to GitHub Actions in another Rust project of mine (https://github.com/sharkdp/pastel, https://github.com/sharkdp/pastel/pull/120), and I really like how it nicely integrates with t...
2020-05-26T03:51:46Z
0.15
2020-06-03T07:13:48Z
2d1a92b7cc2af6c35f868cbefe9dbfe466c59fcb
[ "config::default_config_should_include_all_lines", "config::default_config_should_highlight_no_lines", "input::basic", "input::utf16le", "less::test_parse_less_version_487", "less::test_parse_less_version_529", "less::test_parse_less_version_wrong_program", "less::test_parse_less_version_551", "line...
[]
[]
[]
auto_2025-06-07
sharkdp/bat
1,017
sharkdp__bat-1017
[ "1008" ]
d6abad908a51cf9396cc8521a5ec94b1fc9206ea
diff --git a/src/syntax_mapping.rs b/src/syntax_mapping.rs --- a/src/syntax_mapping.rs +++ b/src/syntax_mapping.rs @@ -42,6 +42,11 @@ impl<'a> SyntaxMapping<'a> { ) .unwrap(); + // See #1008 + mapping + .insert("rails", MappingTarget::MapToUnknown) + .unwr...
diff --git a/src/assets.rs b/src/assets.rs --- a/src/assets.rs +++ b/src/assets.rs @@ -481,4 +481,15 @@ mod tests { "Bourne Again Shell (bash)" ); } + + #[test] + fn issue_1008() { + let test = SyntaxDetectionTest::new(); + + assert_eq!( + test.syntax_for_file_w...
bin/rails script highlighted as HTML (Rails) instead of Ruby <!-- Hey there, thanks for creating an issue! In order to reproduce your issue, we might need to know a little bit more about the environment which you're running `bat` on. If you're on Linux or MacOS: Please run the script at https://github.com/sh...
Thank you for reporting this! We recently discussed whether first-line syntax detection should take precedence over the filename syntax detection: see #685 and https://github.com/sharkdp/bat/issues/891#issuecomment-604617183 Unfortunately, there are some cases where it's not favorable to rely on first-line detect...
2020-05-24T08:23:09Z
0.15
2020-05-24T09:27:48Z
2d1a92b7cc2af6c35f868cbefe9dbfe466c59fcb
[ "config::default_config_should_highlight_no_lines", "config::default_config_should_include_all_lines", "less::test_parse_less_version_487", "less::test_parse_less_version_551", "less::test_parse_less_version_529", "line_range::test_parse_partial_min", "less::test_parse_less_version_wrong_program", "li...
[]
[]
[]
auto_2025-06-07
sharkdp/bat
1,556
sharkdp__bat-1556
[ "1550" ]
c569774e1a8528fab91225dabdadf53fde3916ea
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - If `PAGER` (but not `BAT_PAGER` or `--pager`) is `more` or `most`, silently use `less` instead to ensure support for colors, see #1063 (@Enselic) - If `PAGER` is `bat`, silently use `less` to prevent recursion. For `BAT...
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -652,6 +652,13 @@ fn config_location_test() { .assert() .success() .stdout("bat.conf\n"); + + bat_with_config() + .env("BAT_CONFIG_PATH", "not-ex...
BAT_CONFIG_PATH ignored by --generate-config-file <!-- Hey there, thank you for creating an issue! --> **What version of `bat` are you using?** <!-- Output of `bat --version` --> Newest **Describe the bug you encountered:** ![image](https://user-images.githubusercontent.com/55729509/108675764-3694ee80-7522-1...
Thank you for reporting this. Looks like a bug indeed. I can confirm this bug, which is generic. It is caused by ``` .filter(|config_path| config_path.is_file()) ``` in ``` pub fn config_file() -> PathBuf { env::var("BAT_CONFIG_PATH") .ok() .map(PathBuf::from) .filter(|conf...
2021-02-27T11:22:32Z
0.17
2021-02-28T14:19:15Z
c569774e1a8528fab91225dabdadf53fde3916ea
[ "config_location_test" ]
[ "line_range::test_ranges_open_low", "input::utf16le", "less::test_parse_less_version_487", "less::test_parse_less_version_551", "config::default_config_should_include_all_lines", "line_range::test_ranges_simple", "line_range::test_parse_full", "input::basic", "line_range::test_ranges_advanced", "p...
[]
[]
auto_2025-06-07
sharkdp/bat
1,522
sharkdp__bat-1522
[ "1521" ]
d36b091fd7c9050c80078c0fe286d09dbab0f45a
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -17,9 +17,9 @@ dependencies = [ [[package]] name = "ansi_colours" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0f302a81afc6a7f4350c04f0ba7cfab529cc009bca3324b3fb5764e6a...
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -117,7 +106,7 @@ dependencies = [ "serial_test", "shell-words", "syntect", - "tempdir", + "tempfile", "unicode-width", "wait-timeout", "wild", diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -76,11 +73,11 @@ ...
RUSTSEC-2020-0053: dirs: dirs is unmaintained, use dirs-next instead When `cargo-audit` is run on any crate that depends directly or indirectly on bat, the following is output (for more info, see https://rustsec.org/advisories/RUSTSEC-2020-0053): ``` Crate: dirs Version: 3.0.1 Warning: unmaint...
2021-01-17T22:23:01Z
0.17
2021-02-16T16:42:31Z
c569774e1a8528fab91225dabdadf53fde3916ea
[ "config::default_config_should_highlight_no_lines", "config::default_config_should_include_all_lines", "less::test_parse_less_version_487", "input::utf16le", "input::basic", "less::test_parse_less_version_wrong_program", "less::test_parse_less_version_529", "line_range::test_parse_fail", "line_range...
[]
[]
[]
auto_2025-06-07
sharkdp/bat
1,518
sharkdp__bat-1518
[ "1503" ]
3af35492320077b2abf7cc70117ea02aa24389a3
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -98,6 +98,7 @@ dependencies = [ "git2", "globset", "lazy_static", + "nix", "path_abs", "predicates", "semver", diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -213,12 +214,12 @@ dependencies = [ [[package]...
diff --git a/src/assets.rs b/src/assets.rs --- a/src/assets.rs +++ b/src/assets.rs @@ -329,7 +329,7 @@ mod tests { let input = Input::ordinary_file(file_path.as_os_str()); let dummy_stdin: &[u8] = &[]; - let mut opened_input = input.open(dummy_stdin).unwrap(); + let mut...
Can not run bat with input and output attached to /dev/null **Describe the bug you encountered:** ``` ▶ bat > /dev/null < /dev/null [bat error]: The output file is also an input! ``` **What did you expect to happen instead?** This is kind of a weird edge case, but running `bat` like this is actually useful ...
I looked into the `cat` source code again and I found that we missed a detail when this feature was sketched out for the first time. `cat` always checks, that the output is a "regular file", according to the filetype encoded in the `st_mode` field: ```c out_isreg = S_ISREG (stat_buf.st_mode) != 0; // ... /*...
2021-01-14T19:34:00Z
0.17
2021-02-28T22:04:49Z
c569774e1a8528fab91225dabdadf53fde3916ea
[ "input::basic", "preprocessor::test_try_parse_utf8_char", "line_range::test_ranges_all", "line_range::test_parse_partial_min", "line_range::test_ranges_advanced", "input::utf16le", "less::test_parse_less_version_wrong_program", "config::default_config_should_include_all_lines", "config::default_conf...
[]
[]
[]
auto_2025-06-07
sharkdp/bat
1,506
sharkdp__bat-1506
[ "1413" ]
b25713938d23b0ff59e82e3e969b56423028ce53
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Print an 'Invalid syntax theme settings' error message if a custom theme is broken, see #614 (@Enselic) - If plain mode is set and wrap is not explicitly opted in, long lines will no be truncated, see #1426 - If `PAGER...
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -499,6 +499,28 @@ fn pager_disable() { .stdout(predicate::eq("hello world\n").normalize()); } +#[test] +fn env_var_pager_value_bat() { + bat() + .env("PAGER", "...
Can't use `bat` at all! (Error: Use of bat as a pager is disallowed...) **What version of `bat` are you using?** bat 0.17.1 **Describe the bug you encountered:** Whenever I use `bat`, I'm shown the following error message: > [bat error]: Use of bat as a pager is disallowed in order to avoid infinite recursion...
That's intentional, see https://github.com/sharkdp/bat/pull/1343 Personally, I don't like this restriction too (but it's not hard to overcome). > That's intentional, see #1343 Hm. Kind of, but not to the extent documented here, actually. What we really want to avoid is infinite recursion (`bat` calls `bat` as pag...
2021-01-10T16:13:16Z
0.17
2021-08-20T04:48:10Z
c569774e1a8528fab91225dabdadf53fde3916ea
[ "env_var_pager_value_bat" ]
[ "config::default_config_should_include_all_lines", "less::test_parse_less_version_529", "config::default_config_should_highlight_no_lines", "less::test_parse_less_version_551", "input::basic", "input::utf16le", "less::test_parse_less_version_487", "less::test_parse_less_version_wrong_program", "line...
[]
[]
auto_2025-06-07
sharkdp/bat
1,889
sharkdp__bat-1889
[ "1703" ]
ed3246c423932561435d45c50fd8cd9e06add7f5
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Python syntax highlighting no longer suffers from abysmal performance in specific scenarios. See #1688 (@keith-hall) - First line not shown in diff context. See #1891 (@divagant-martian) +- Do not ignore syntaxes that h...
diff --git a/src/assets.rs b/src/assets.rs --- a/src/assets.rs +++ b/src/assets.rs @@ -530,6 +554,42 @@ mod tests { assert_eq!(test.syntax_for_file("test.h"), "C"); } + #[test] + fn syntax_detection_with_extension_mapping_to_unknown() { + let mut test = SyntaxDetectionTest::new(); + + ...
Some *.conf files not highlighted I wanted to add syntax highlighting for for .tmux.conf file, so I add this file to `bat/syntaxes/` https://raw.githubusercontent.com/gerardroche/sublime-tmux/master/Tmux.sublime-syntax I then `bat cache -b` and try viewing my `.tmux.conf` file, but it is still plain with no synta...
I just realised that it works when I force it like this: `$ bat -l Tmux .tmux.conf` So why is it not detecting the file when it is named in the same way that the `bat -L` mentions? ie. `Tmux tmux.conf, tmux, .tmux.conf, .tmux` likely related: https://github.com/sharkdp/bat/...
2021-10-06T21:46:39Z
0.18
2021-10-25T15:59:13Z
8072d5a3e34494c80f10396481703a96997bb893
[ "assets::build_assets::tests::remove_explicit_context_sanity", "config::default_config_should_highlight_no_lines", "config::default_config_should_include_all_lines", "input::basic", "input::utf16le", "less::test_parse_less_version_487", "less::test_parse_less_version_529", "less::test_parse_less_versi...
[]
[]
[]
auto_2025-06-07
sharkdp/bat
1,440
sharkdp__bat-1440
[ "1438", "1438" ]
60e00d49a99f33eb90397c6932c770d82fd481ec
diff --git a/src/preprocessor.rs b/src/preprocessor.rs --- a/src/preprocessor.rs +++ b/src/preprocessor.rs @@ -72,7 +72,7 @@ pub fn replace_nonprintable(input: &[u8], tab_width: usize) -> String { } } // line feed - '\x0A' => output.push('␊'), + ...
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ ## Bugfixes -- only print themes hint in interactive mode (`bat --list-themes`), see #1439 (@rsteube) +- If the last line doesn't end with a newline character, don't add it if `--style=plain`, see #1438 (@Enselic) +- Onl...
Newline can be added even if --style=plain In #975 @sharkdp said this: > The fact that bat -p prints a trailing newline (even if there is no newline at the end of the file) should be considered a bug, I believe (but we should check older tickets, if there was a reason for this behavior). And I completely agree. T...
Thank you for taking the time to write this down in detail! Thank you for taking the time to write this down in detail!
2020-12-16T19:47:12Z
0.17
2021-01-06T21:41:06Z
c569774e1a8528fab91225dabdadf53fde3916ea
[ "plain_mode_does_not_add_nonexisting_newline" ]
[ "config::default_config_should_highlight_no_lines", "config::default_config_should_include_all_lines", "input::basic", "less::test_parse_less_version_487", "input::utf16le", "less::test_parse_less_version_529", "less::test_parse_less_version_wrong_program", "less::test_parse_less_version_551", "line...
[]
[]
auto_2025-06-07
sharkdp/bat
1,398
sharkdp__bat-1398
[ "1193" ]
8381945cb59aac45e4a60c597f114dbf0102cfcf
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -99,6 +99,7 @@ dependencies = [ "assert_cmd", "atty", "clap", + "clircle", "console", "content_inspector", "dirs", diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -116,6 +117,7 @@ dependencies = [ "syntect"...
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -1,11 +1,17 @@ -use assert_cmd::Command; +use assert_cmd::assert::OutputAssertExt; +use assert_cmd::cargo::CommandCargoExt; use predicates::{prelude::predicate, str::PredicateStrExt...
Infinite loop when "input file is output file" <!-- Hey there, thanks for creating an issue! In order to reproduce your issue, we might need to know a little bit more about the environment which you're running `bat` on. If you're on Linux or MacOS: Please run the script at https://github.com/sharkdp/bat/blob...
Thank you very much for reporting this! This should be fixed. I wonder how `cat` implements this feature? Apparently, it detects that file/inode behind the stdout file descriptor is the same as one of the input files. yes. it's comparing inodes: ```c if (out_isreg && stat_buf.st_dev == out_dev && ...
2020-11-24T23:38:38Z
0.17
2021-01-14T19:18:09Z
c569774e1a8528fab91225dabdadf53fde3916ea
[ "config::default_config_should_include_all_lines", "config::default_config_should_highlight_no_lines", "input::utf16le", "input::basic", "less::test_parse_less_version_487", "less::test_parse_less_version_529", "less::test_parse_less_version_wrong_program", "line_range::test_parse_partial_max", "lin...
[]
[]
[]
auto_2025-06-07
sharkdp/bat
1,276
sharkdp__bat-1276
[ "1163" ]
33128d75f22a7c029df17b1ee595865933551469
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## Features - Adjust pager configuration to comply with `--wrap=never`, see #1255 (@gahag) +- Added a new `--style` value, `rule`, which adds a simple horizontal ruled line between files, see #1276 (@tommilligan) ## Bu...
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -570,6 +570,18 @@ fn empty_file_leads_to_empty_output_with_grid_enabled() { .stdout(""); } +#[test] +fn empty_file_leads_to_empty_output_with_rule_enabled() { + bat() ...
Alternative to `grid` for style which only draws a line between files I'm not a fan of having my `cat`-alike draw a full-blown table, but I would like to have some visible "end of file, beginning of next file" separation. Unfortunately, `--style=header,grid` still draws the horizontal lines as if they were part of a...
Thank you for the feedback. Sounds good to me. Maybe we could also change the `grid` style whenever the sidebar is not visible? Instead of introducing a new style? > Maybe we could also change the grid style whenever the sidebar is not visible? Instead of introducing a new style? I considered that, but I proposed...
2020-10-06T16:29:46Z
0.16
2020-11-23T18:09:48Z
33128d75f22a7c029df17b1ee595865933551469
[ "grid_overrides_rule", "header_padding_rule", "empty_file_leads_to_empty_output_with_rule_enabled", "changes_header_rule", "changes_grid_header_numbers_rule", "header_numbers_rule", "rule", "changes_grid_header_rule", "changes_rule", "grid_header_rule", "grid_rule", "header_rule", "changes_g...
[ "config::default_config_should_highlight_no_lines", "config::default_config_should_include_all_lines", "input::basic", "input::utf16le", "less::test_parse_less_version_487", "less::test_parse_less_version_529", "less::test_parse_less_version_wrong_program", "less::test_parse_less_version_551", "line...
[]
[]
auto_2025-06-07
sharkdp/bat
1,135
sharkdp__bat-1135
[ "1076" ]
b3657aef2bc34ef09cd86e2ea044e6bdee0f8141
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # unreleased +- Handle file extension conflicts in --list-languages, see #1076 and #1135 (@Kienyew) ## Features diff --git a/src/assets.rs b/src/assets.rs --- a/src/assets.rs +++ b/src/assets.rs @@ -170,6 +170,21 @@ imp...
diff --git a/src/bin/bat/main.rs b/src/bin/bat/main.rs --- a/src/bin/bat/main.rs +++ b/src/bin/bat/main.rs @@ -86,6 +86,26 @@ pub fn list_languages(config: &Config) -> Result<()> { .filter(|syntax| !syntax.hidden && !syntax.file_extensions.is_empty()) .cloned() .collect::<Vec<_>>(); + + //...
Improved handling of file-extension conflicts With #1070 merged, we now have four known exceptions to the "no duplicate extensions" rule (see `tests/no_duplicate_extensions.rs`). We have a separate test (`syntax_detection_well_defined_mapping_for_duplicate_extensions`) that makes sure that these extensions are handled ...
2020-08-08T04:45:38Z
0.15
2020-09-20T10:40:39Z
2d1a92b7cc2af6c35f868cbefe9dbfe466c59fcb
[ "config::default_config_should_include_all_lines", "config::default_config_should_highlight_no_lines", "input::basic", "input::utf16le", "less::test_parse_less_version_wrong_program", "line_range::test_parse_full", "less::test_parse_less_version_487", "less::test_parse_less_version_529", "less::test...
[]
[]
[]
auto_2025-06-07
sharkdp/bat
562
sharkdp__bat-562
[ "557" ]
1ce0bc8e0d6364b3dbac07158ad6343f3d5769a3
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "adler32" version = "1.0.3" diff --git a/src/clap_app.rs b/src/clap_app.rs --- a/src/clap_app.rs +++ b/src/clap_app.rs...
diff --git /dev/null b/tests/examples/cache new file mode 100644 --- /dev/null +++ b/tests/examples/cache @@ -0,0 +1,1 @@ +test diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -448,3 +448,18 @@ fn utf16() { .success() ...
Bat is broken for filenames that are prefixes of "cache" The issue with files named "cache" was already identified in #245 and fixed in #275. However, the `clap` parser doesn't require an exact match: any prefix of the subcommand "cache" will do. So if you try `bat c` (or "ca", "cac", "cach"), one of the following will...
Which version of `bat` are you using? This should have been fixed and I can not reproduce this. I just discovered this myself. Version 0.10.0 I did `bat c` where c was a file and got the error ```bash ~ > bat c error: The following required arguments were not provided: <--build|--clear> USAGE: ...
2019-05-10T19:03:15Z
0.10
2019-05-10T22:55:52Z
1ce0bc8e0d6364b3dbac07158ad6343f3d5769a3
[ "does_not_print_unwanted_file_named_cache" ]
[ "config::empty", "config::comments", "config::multi_line", "config::quotes", "config::multiple", "inputfile::utf16le", "inputfile::basic", "config::single", "line_range::test_parse_fail", "line_range::test_parse_partial_max", "line_range::test_parse_full", "line_range::test_parse_partial_min",...
[]
[]
auto_2025-06-07
sharkdp/bat
337
sharkdp__bat-337
[ "285" ]
e97095b724b763e6841c08d9b89b20089592d310
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -50,8 +50,9 @@ dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "console 0.6.2 (registry+https://github.com/rust-lang/crates.io-in...
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -166,6 +167,63 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "encoding" +version = "0.2.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies ...
bat shows BOM at the start of the line when the source code has BOM at the begining of the line, its shown as "<U+FEFF>". I have now huge problem with this per se but it would be more user friendly to strip that piece away when showing the code and putting that info as interpreted value into same line as "File:" is, li...
Thank you for your feedback. I have recently written a small library (https://crates.io/crates/content_inspector) that I plan to use within `bat`. It will be able to detect BOMs, which should make this feature request possible. I love the idea of showing the encoding within the header. I was always planning to put m...
2018-10-07T14:46:12Z
0.7
2018-10-07T15:56:30Z
e43d97dc15985258b03ade549e81ffdedce8c650
[ "inputfile::utf16le" ]
[ "inputfile::basic", "line_range::test_parse_full", "line_range::test_parse_partial_max", "line_range::test_parse_fail", "line_range::test_parse_partial_min", "snapshot::grid_header_numbers", "snapshot::tabs_4_wrapped", "snapshot::changes", "snapshot::header", "snapshot::tabs_8_wrapped", "snapsho...
[]
[]
auto_2025-06-07
sharkdp/bat
165
sharkdp__bat-165
[ "161" ]
69c798eafd93d174d0340158794b7c1d5f4e598d
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -51,6 +51,7 @@ dependencies = [ "git2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "syntect 2.1.0 (registry+https://github.com/rust-lang/crates....
diff --git a/tests/tester.rs b/tests/tester.rs --- a/tests/tester.rs +++ b/tests/tester.rs @@ -1,16 +1,29 @@ use std::env; use std::fs::{self, File}; -use std::io::Read; -use std::path::PathBuf; +use std::io::{self, Read}; +use std::path::{Path, PathBuf}; use std::process::Command; +extern crate tempdir; +use self...
cargo test thread panicked while panicking on 0.4.0 tarball Hi I was just preparing to update the AUR package to 0.4.0. Part of the build process runs the tests via `cargo test`, which is failing. I tried a separate git checkout of the 0.4.0 tag and `cargo test` worked. I then tried downloading [the release tarball][ta...
Thank you for reporting this. I can reproduce this. Not sure what is going on (currently investigating). Ok, this is due to the way we reset the `sample.rs` file after running the tests. It expects the current folder to be a Git repository: ```rust fn undo_sample_file_modification() { let output = Command::new("...
2018-06-02T16:08:57Z
0.4
2018-06-02T17:00:16Z
e5b8c4471a609991f82183ed6648ffa2b20b130c
[ "terminal::test_rgb2ansi_black_white", "terminal::test_rgb2ansi_approx", "terminal::test_rgb2ansi_gray", "terminal::test_rgb2ansi_color", "test_snapshots" ]
[]
[]
[]
auto_2025-06-07
rust-fuzz/cargo-fuzz
388
rust-fuzz__cargo-fuzz-388
[ "386" ]
a608970259c3b0d575e70b0748c1c4cf79081031
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -165,6 +165,20 @@ pub struct BuildOptions { /// and the fuzzer can store an input to the corpus at each condition that it passes; /// giving it a better chance of producing an input that reaches `res = 2;`. pub disa...
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -265,6 +279,7 @@ mod test { no_cfg_fuzzing: false, no_trace_compares: false, disable_branch_folding: None, + no_include_main_msvc: false, }; let opts = vec![
Fuzzing Windows DLL (cdylib) - Unresolved External Symbol Main Hi cargo-fuzz devs! I am working on fuzzing a Windows DLL with cargo-fuzz and have been hitting a wall with a particular linker error. I've reproduced the problem in a small & simple Cargo project to demonstrate the issue. ## Problem Description The i...
2024-10-16T17:58:54Z
0.12
2024-11-05T18:55:01Z
a608970259c3b0d575e70b0748c1c4cf79081031
[ "rustc_version::tests::test_parsing_future_stable", "rustc_version::tests::test_parsing_nightly", "rustc_version::tests::test_parsing_stable", "options::test::display_build_options", "help", "init_defines_correct_dependency", "init_finds_parent_project", "add_twice", "init_twice", "list", "tmin"...
[]
[]
[]
auto_2025-06-12
rust-fuzz/cargo-fuzz
344
rust-fuzz__cargo-fuzz-344
[ "343" ]
abb7a67c5b2e1263c3e5c7abfa8c70bb4dec7796
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -126,6 +126,13 @@ pub struct BuildOptions { #[arg(long)] pub no_cfg_fuzzing: bool, + #[arg(skip = false)] + /// Add the 'cfg(fuzzing-repro)' compilation configuration. This build + /// option will be automatic...
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -232,6 +239,7 @@ mod test { coverage: false, strip_dead_code: false, no_cfg_fuzzing: false, + cfg_fuzzing_repro: false, no_trace_compares: false, }; diff --...
Detect when code is reproducing a crash vs when it is fuzzing Hi all, I have a lot of fun using `cargo fuzz` on my projects! It lowers the barrier enough that fuzzing becomes simple, so well done :+1: When I find a crash, I often need to debug it by adding extra `dbg!` or `eprintln!` calls to my code. Is there a...
I would be in support of a `cfg(fuzz_repro)` or something.
2023-06-16T13:28:04Z
0.11
2023-06-18T17:12:28Z
abb7a67c5b2e1263c3e5c7abfa8c70bb4dec7796
[ "options::test::display_build_options", "help", "init_finds_parent_project", "init_twice", "add_twice", "list", "tmin" ]
[]
[]
[]
auto_2025-06-12
rust-fuzz/cargo-fuzz
339
rust-fuzz__cargo-fuzz-339
[ "331" ]
fa18f0d77aef036302d9f948e80aa12c6b95d57b
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -82,6 +82,20 @@ pub struct BuildOptions { /// Use a specific sanitizer pub sanitizer: Sanitizer, + #[arg(long = "build-std")] + /// Pass -Zbuild-std to Cargo, which will build the standard library with all the bu...
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -209,6 +223,8 @@ mod test { no_default_features: false, all_features: false, features: None, + build_std: false, + careful_mode: false, sanitizer: Sanitizer...
Integrate cargo-careful cargo-careful enables debug assertions and some UB checks in libstd, I think it would be useful if we can fuzz under that configuration https://github.com/RalfJung/cargo-careful (@RalfJung Might be of interest to you)
2023-05-04T18:54:19Z
0.11
2023-05-24T12:12:51Z
abb7a67c5b2e1263c3e5c7abfa8c70bb4dec7796
[ "options::test::display_build_options", "help", "init_finds_parent_project", "add_twice", "init_twice", "list" ]
[]
[]
[]
auto_2025-06-12
rust-fuzz/cargo-fuzz
264
rust-fuzz__cargo-fuzz-264
[ "263" ]
2e496ca9cfe11de7cfb3d89b2299e93359ebc72f
diff --git a/src/project.rs b/src/project.rs --- a/src/project.rs +++ b/src/project.rs @@ -822,6 +830,10 @@ impl FuzzProject { targets: Vec::new(), }) } + + fn fuzz_dir_is_default_path(&self) -> bool { + self.fuzz_dir.ends_with(DEFAULT_FUZZ_DIR) + } } fn collect_targets(value...
diff --git a/src/project.rs b/src/project.rs --- a/src/project.rs +++ b/src/project.rs @@ -459,14 +459,22 @@ impl FuzzProject { eprintln!(); } + let fuzz_dir = if self.fuzz_dir_is_default_path() { + String::new() + } else { + format!(" ...
[`fuzz run`] Bad discovered input should display custom fuzz dir Currently, when `fuzz run someTarget` discovers a bad input, it doesn't take into consideration custom `--fuzz-dir` directories. Actual: ``` RUST_BACKTRACE=1 cargo fuzz run --fuzz-dir someDirectory someTarget ... Reproduce with: cargo fuzz...
2021-05-23T01:27:42Z
0.10
2021-05-25T17:16:22Z
78965346c161a3800166c41304f61717e9d7e85c
[ "options::test::display_build_options", "help", "init_finds_parent_project", "init_twice", "add_twice", "list" ]
[]
[]
[]
auto_2025-06-12
rust-fuzz/cargo-fuzz
262
rust-fuzz__cargo-fuzz-262
[ "238" ]
089dfae55534ae29a6323b4e0368ae6ebe9b34f8
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -13,8 +13,8 @@ pub use self::{ run::Run, tmin::Tmin, }; -use std::fmt as stdfmt; use std::str::FromStr; +use std::{fmt as stdfmt, path::PathBuf}; use structopt::StructOpt; #[derive(Debug, Clone, Copy, PartialEq)] diff...
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -186,6 +186,23 @@ impl stdfmt::Display for BuildOptions { } } +#[derive(Clone, Debug, StructOpt, PartialEq)] +pub struct FuzzDirWrapper { + /// The path to the fuzz project directory. + #[structopt(long = "fuzz-dir")...
Support for non-standard project directories `fuzz` is currently the only possible directory name and it would be nice to have something like `cargo fuzz run --path some_fuzz_project_dir someTarget`
That the directory containing the fuzzing code _has to be_ called "fuzz" (and cannot be renamed nor moved deeper in the directory structure) is a limitation that is not documented anywhere. Is there a reason for it?
2021-05-08T19:52:56Z
0.10
2021-05-13T17:23:13Z
78965346c161a3800166c41304f61717e9d7e85c
[ "options::test::display_build_options", "help", "init_finds_parent_project", "list", "init_twice", "add_twice" ]
[]
[]
[]
auto_2025-06-12
rust-fuzz/cargo-fuzz
234
rust-fuzz__cargo-fuzz-234
[ "228" ]
9f2f36888d10504f0a219bf1a91b72837d9fba56
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -15,7 +15,7 @@ use std::fmt as stdfmt; use std::str::FromStr; use structopt::StructOpt; -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, PartialEq)] pub enum Sanitizer { Address, Leak, diff --git a/src/o...
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -110,3 +110,125 @@ pub struct BuildOptions { /// Unstable (nightly-only) flags to Cargo pub unstable_flags: Vec<String>, } + +impl stdfmt::Display for BuildOptions { + fn fmt(&self, f: &mut stdfmt::Formatter) -> stdf...
Recommended reproduction command ignores arguments When running the fuzzer with specific sanitizer, time or memory settings and an issue is found then the output for reproduction is not complete. In particular the recommended command line for reproducing the issue misses any of these parameters as well as the used `car...
Thanks for reporting! Here's the code that needs to change: https://github.com/rust-fuzz/cargo-fuzz/blob/2fb3bd85c0dd57ea7f3d5c29174c26a5550d0aa8/src/project.rs#L426-L436 We need to incorporate [the arguments](https://github.com/rust-fuzz/cargo-fuzz/blob/2fb3bd85c0dd57ea7f3d5c29174c26a5550d0aa8/src/options/run.rs...
2020-07-02T12:19:45Z
0.8
2020-07-06T18:55:01Z
9f2f36888d10504f0a219bf1a91b72837d9fba56
[ "help", "init_finds_parent_project", "add_twice", "init_twice", "list" ]
[]
[]
[]
auto_2025-06-12
rust-fuzz/cargo-fuzz
231
rust-fuzz__cargo-fuzz-231
[ "230" ]
87c36a1deee8ca9b550fe034623a7445d7e8c770
diff --git a/src/main.rs b/src/main.rs --- a/src/main.rs +++ b/src/main.rs @@ -40,7 +40,11 @@ fuzz/fuzz_targets/, i.e. the name picked when running `cargo fuzz add`. This will run the script inside the fuzz target with varying inputs until it finds a crash, at which point it will save the crash input to the artifact ...
diff --git a/src/project.rs b/src/project.rs --- a/src/project.rs +++ b/src/project.rs @@ -182,7 +183,7 @@ impl FuzzProject { // performance, we're taking a huge hit relative to actual release mode. // Local tests have once showed this to be a ~3x faster runtime where // otherwise functions l...
Fuzzing with default settings is much slower than it needs to be `cargo fuzz run` currently defaults to debug mode with Address Sanitizer. Debug mode in Rust is needlessly slow, easily 20x slower than release mode, and for fuzzing performance is critical. It would be a much better idea to default to release mode, but w...
For reference, AFL already defaults to release mode with overflow checks and debug assertions: https://github.com/rust-fuzz/afl.rs/blob/d156adfb072aad655342a1a04cdbe4d9ac2ffc9e/src/bin/cargo-afl.rs#L294
2020-06-20T21:45:55Z
0.7
2020-11-11T18:48:06Z
87c36a1deee8ca9b550fe034623a7445d7e8c770
[ "help", "init_finds_parent_project", "add_twice", "init_twice", "list" ]
[]
[]
[]
auto_2025-06-12
rust-fuzz/cargo-fuzz
204
rust-fuzz__cargo-fuzz-204
[ "196" ]
f81f71edcb358e66cc8938fcf986fa3d42a89177
diff --git a/src/main.rs b/src/main.rs --- a/src/main.rs +++ b/src/main.rs @@ -6,8 +6,6 @@ // copied, modified, or distributed except according to those terms. use anyhow::Result; -use std::fmt; -use std::str::FromStr; use structopt::StructOpt; #[macro_use] diff --git a/src/main.rs b/src/main.rs --- a/src/main....
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,4 +15,5 @@ jobs: run: | rustup install nightly rustup default nightly + export RUST_BACKTRACE=1 cargo test --verbose diff --git a/src/pro...
Support running fuzz targets over specific input files libfuzzer allows one to run a fuzz target over specific existing inputs, *without* generating new inputs afterwards. You pass a list of files in on the command line. This is useful for running all the inputs in a corpus in CI for a pull request, for example. How...
Ah, so one workaround is to pass `-- -runs=0`, which will make libFuzzer exit after re-running each of the corpus's seeds, without generating any new inputs. We may still want to add a `--only-existing-corpus` flag to do this, since it isn't obvious. I agree. I was trying to figure this out for a while with little s...
2019-12-19T22:07:13Z
0.5
2019-12-19T22:52:02Z
f81f71edcb358e66cc8938fcf986fa3d42a89177
[ "help", "init_finds_parent_project", "init_twice", "add_twice", "list" ]
[]
[]
[]
auto_2025-06-12
rust-fuzz/cargo-fuzz
288
rust-fuzz__cargo-fuzz-288
[ "287" ]
63730da7f95cfb21f6f5a9b0a74532f98d3983a4
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,13 @@ Released YYYY-MM-DD. ### Added -* TODO (or remove section if none) +* Added the `--no-trace-compares` flag which opts out of the + `-sanitizer-coverage-trace-compares` LLVM argument. + + Using this may improve fuzzer ...
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -229,6 +238,7 @@ mod test { coverage: false, strip_dead_code: false, no_cfg_fuzzing: false, + no_trace_compares: false, }; let opts = vec![
Targets built with cargo-fuzz always require POPCNT instruction libFuzzer uses the `POPCNT` instruction for data-flow guided coverage and cargo-fuzz builds targets with it turned on. This causes the targets to mysteriously crash when the CPU doesn't support the instruction (like my ancient laptop). References: - [ca...
Is there a particular subset that we can disable to avoid `popcnt`? If we disable all of them, I am pretty sure the fuzzer will give up and say that nothing is interesting. If you can get a flag working, happy to merge it tho.
2022-01-24T21:57:04Z
0.11
2022-01-25T19:30:26Z
abb7a67c5b2e1263c3e5c7abfa8c70bb4dec7796
[ "options::test::display_build_options", "help", "init_twice", "add_twice", "list", "init_finds_parent_project" ]
[]
[]
[]
auto_2025-06-12
rust-fuzz/cargo-fuzz
274
rust-fuzz__cargo-fuzz-274
[ "273" ]
a6dceae81e6977e19ccc9cf8e4008ae82102065c
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -128,6 +128,11 @@ pub struct BuildOptions { /// optimized targets. This flag allows you to opt out of it. #[structopt(long)] pub strip_dead_code: bool, + + /// By default the 'cfg(fuzzing)' compilation configurat...
diff --git a/src/options.rs b/src/options.rs --- a/src/options.rs +++ b/src/options.rs @@ -223,6 +228,7 @@ mod test { target_dir: None, coverage: false, strip_dead_code: false, + no_cfg_fuzzing: false, }; let opts = vec![
Allow to disable `--cfg fuzzing` One of the dependencies of my project would deactivate some features on `#[cfg(fuzzing)]` which i'd like to keep. Is there a way to opt out of `--cfg fuzzing`? If not would it be possible to add one?
2021-08-31T08:42:51Z
0.10
2021-09-02T16:58:17Z
78965346c161a3800166c41304f61717e9d7e85c
[ "options::test::display_build_options", "help", "init_finds_parent_project", "init_twice", "add_twice", "list" ]
[]
[]
[]
auto_2025-06-12
rcoh/angle-grinder
67
rcoh__angle-grinder-67
[ "66" ]
b264366cb68b0f649486d70b8522b43bb3392865
diff --git a/src/lib.rs b/src/lib.rs --- a/src/lib.rs +++ b/src/lib.rs @@ -243,7 +243,10 @@ pub mod pipeline { // Drop tx when causes the thread to exit. drop(tx); - t.join().unwrap(); + match t.join() { + Ok(_) => (), + Err(e) => println!(...
diff --git a/tests/integration.rs b/tests/integration.rs --- a/tests/integration.rs +++ b/tests/integration.rs @@ -101,6 +101,11 @@ mod integration { structured_test(include_str!("structured_tests/total_agg.toml")); } + #[test] + fn fields_after_agg_bug() { + structured_test(include_str!("s...
fields after count causes panic ```sudo lsof -i -P | grep '(LISTEN)' | agrind '* | parse ":* (" as port | count by port | fields port'``` leads to a panic. Probably a bug in the pre-aggregate adapter.
2019-03-12T05:32:19Z
0.9
2019-03-12T06:12:05Z
b264366cb68b0f649486d70b8522b43bb3392865
[ "integration::fields_after_agg_bug" ]
[ "data::tests::agg", "data::tests::from_string", "data::tests::ordering", "lang::tests::parse_parses", "lang::tests::query_operators", "lang::tests::parse_quoted_string", "lang::tests::query_no_operators", "data::tests::record_put_get", "lang::tests::parse_percentile", "lang::tests::parse_var_list"...
[]
[]
auto_2025-05-31
rcoh/angle-grinder
37
rcoh__angle-grinder-37
[ "30" ]
c3a24bd096813cb9d2fe2c051ec01024182e1134
diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -181,6 +181,13 @@ Count number of source_hosts: * | json | count by endpoint_url, status_code | sort by endpoint_url desc ``` +##### Total +`total(a)`: Compute the running total of a given field +*Examples*: +```agrind +* | json | total(num_reque...
diff --git a/src/data.rs b/src/data.rs --- a/src/data.rs +++ b/src/data.rs @@ -205,15 +211,13 @@ mod tests { let agg = Aggregate::new( &["kc1".to_string(), "kc2".to_string()], "count".to_string(), - &[ - ( - hashmap!{ - ...
Support a "running total" operator (Like `accum`) in SumoLogic. Requested by @tallpsmith
2018-12-26T22:15:53Z
0.7
2018-12-26T22:42:23Z
c3a24bd096813cb9d2fe2c051ec01024182e1134
[ "lang::tests::parse_expr_ident", "lang::tests::parse_expr", "lang::tests::query_no_operators", "lang::tests::parse_operator", "data::tests::ordering", "lang::tests::parse_keyword_string", "lang::tests::parse_expr_value", "data::tests::panic_on_invalid_row", "data::tests::record_put_get", "operator...
[]
[]
[]
auto_2025-05-31
rcoh/angle-grinder
191
rcoh__angle-grinder-191
[ "189" ]
27c2c38eceae75a194c7d5587201ea7cad023613
diff --git a/src/lib.rs b/src/lib.rs --- a/src/lib.rs +++ b/src/lib.rs @@ -283,8 +283,8 @@ pub mod pipeline { if ct == 0 { break; } - let data = std::str::from_utf8(&line[..ct]).unwrap(); - if self.filter.matches(data) + ...
diff --git /dev/null b/test_files/binary_data.bin new file mode 100644 --- /dev/null +++ b/test_files/binary_data.bin @@ -0,0 +1,3 @@ +line of regular text k=v2 +�K���@�V ���+P��Q�Þ�0����S��oU�!+��X-!����޴A�� �r��[�OC��j_kΕ����V����5; �x1rYuV��� +line of regular text k=v diff --git a/tests/integration.rs b...
Crash while parsing syslog for netfilter logs I got the attached crash while trying to parse netfilter (iptables) logs from `/var/log/syslog`. Full command and output below. Crash report (renamed to .txt. because GitHub won't permit .toml files as attachments): [report-79c5d249-00d8-4ad4-bfbe-29b534be5307.txt](https...
FWIW, I get the same crash if I `cat /var/log/syslog | ./agrind ....` instead of making ag read it using `-f` argument. Using `grep kernel: /var/log/syslog | ./agrind '* | parse ....` does NOT crash. I'm guessing some kind of weird character in one of the log lines that ag isn't handling nicely. Hopefully the crash ...
2023-05-19T18:56:53Z
0.19
2023-05-19T19:16:10Z
fca19ae150d804e2b8998e21f074401a5c508eca
[ "lang::tests::parse_parses" ]
[ "data::tests::record_put_get", "data::tests::from_string", "data::tests::record_ordering_matching_prefix", "data::tests::arithmetic", "data::tests::record_ordering", "data::tests::agg", "data::tests::render_duration", "data::tests::panic_on_invalid_row - should panic", "data::tests::test_aggresively...
[]
[]
auto_2025-05-31
rcoh/angle-grinder
8
rcoh__angle-grinder-8
[ "4" ]
b33c72ef9aedb4c2744b030290ecb5d29694245a
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,7 @@ name = "ag" version = "0.3.3" dependencies = [ + "assert_cli 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.30.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.7.6 (registry+htt...
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -295,14 +552,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa8...
Support outputs that aren't a TTY `ag '....' > some_file`
2018-03-18T02:11:42Z
0.3
2018-03-18T02:23:43Z
176dc55e0ec8e02507cdb6c6520844ccb0809638
[ "render::tests::test_pretty_print_record_too_long", "data::tests::test_agg", "lang::tests::test_var_list", "lang::tests::test_quoted_string", "lang::tests::test_query_operators", "lang::tests::test_operator", "lang::tests::test_query_no_operators", "render::tests::test_pretty_print_record", "lang::t...
[]
[]
[]
auto_2025-05-31
rcoh/angle-grinder
104
rcoh__angle-grinder-104
[ "101" ]
8df4ddecc440ba995b1b6b31a44ec589938cd6b0
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -12,6 +12,7 @@ dependencies = [ "annotate-snippets 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "assert_cli 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.14 (registry+https://github.com/rust-la...
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -39,6 +40,7 @@ dependencies = [ "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "structopt 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "terminal_size 0.1.12 (registry+https://github.com/rust-lang...
Support parsing tabs It would be useful to be able to parse tabs. For example, I have logs like: ``` [WARNING]2020-01-01T00:00:00.000Z 1e4cd606-a550-4d41-b013-f61a4a3d959d init_attendance no students user='kennimrod' /aws/lambda/function-4TPZE69CJ8X7 2020/01/01/[$LATEST]e75d9ab689c4457da0a79316cf624c...
Did you try putting a literal tab in the pattern? I agree this is needed either way though I didn't try that because it is not easy to put a literal tab here, I forgot to think about using edit mode to add a literal tab.
2020-06-13T14:55:04Z
0.13
2020-06-13T15:47:14Z
8df4ddecc440ba995b1b6b31a44ec589938cd6b0
[ "data::tests::agg", "data::tests::from_string", "data::tests::record_ordering", "data::tests::record_put_get", "data::tests::record_ordering_matching_prefix", "data::tests::test_aggresively_to_num", "errors::tests::did_you_mean", "filter::tests::filter_wildcard", "data::tests::value_ordering", "la...
[]
[]
[]
auto_2025-05-31
rcoh/angle-grinder
84
rcoh__angle-grinder-84
[ "81" ]
abc2654788ca7a8cb4e8f79beb75ba63935128ef
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -24,6 +24,7 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "human-panic 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "im 13.0.0 (registry+https://github.com/rust-lang/crates.i...
diff --git /dev/null b/aliases/multi-operator.toml new file mode 100644 --- /dev/null +++ b/aliases/multi-operator.toml @@ -0,0 +1,4 @@ +keyword = "testmultioperator" +template = """ +json | count(abc) +""" diff --git /dev/null b/src/alias.rs new file mode 100644 --- /dev/null +++ b/src/alias.rs @@ -0,0 +1,48 @@ +//! I...
Support Apache Combined Log format Hey this tool is really neat! The addition of the logfmt operator made me think of another type of log file that's in common use which people would likely use `agrinder` against- Apache's Combined log format. Many other web servers, including nginx and caddy, are able to output in com...
interesting. For formats like this that are parsable with the existing `parser` operator I'm considering having some why of having a "parser library" so that you could write parsers like this without needing to write any Rust. It would be a folder of files, each containing an angle-grinder pipeline. There would be s...
2019-10-10T01:12:34Z
0.11
2019-10-22T17:39:52Z
abc2654788ca7a8cb4e8f79beb75ba63935128ef
[ "integration::test_aliases" ]
[ "data::tests::record_put_get", "data::tests::agg", "filter::tests::filter_wildcard", "lang::tests::parse_expr_ident", "data::tests::record_ordering_matching_prefix", "lang::tests::parse_percentile", "lang::tests::not_filter", "lang::tests::parse_ident", "lang::tests::empty_query_is_query", "lang::...
[]
[]
auto_2025-05-31
rcoh/angle-grinder
18
rcoh__angle-grinder-18
[ "17", "15" ]
5dfdbb21c56afd3ae74fcfcaeabbbb31ea9cd91c
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -8,6 +8,7 @@ dependencies = [ "itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", "maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "nom 4.0.0-beta1 (registry+https://github.com/rust-lang/crates....
diff --git a/src/data.rs b/src/data.rs --- a/src/data.rs +++ b/src/data.rs @@ -199,7 +200,7 @@ mod tests { #[test] fn test_from_string() { assert_eq!(Value::from_string("949919"), Value::Int(949919)); - assert_eq!(Value::from_string("0.00001"), Value::Float(0.00001)); + assert_eq!(Value...
sorting by aggregated columns sorts lexographically instead of numerically eg. count by x,y sort by y support multi-aggregates eg. `| count, pct50(response_time), count_distinct(status_code) by server` ``` server _count _p50, _countDistinct ... 5 95 40 ```
2018-04-04T07:11:32Z
0.6
2018-04-05T01:08:02Z
5dfdbb21c56afd3ae74fcfcaeabbbb31ea9cd91c
[ "lang::tests::test_ident", "data::tests::test_from_string", "lang::tests::test_operator", "data::tests::test_agg", "data::tests::test_record_put_get", "lang::tests::test_percentile", "operator::tests::test_parse_from_field", "lang::tests::test_query_no_operators", "lang::tests::test_parses", "data...
[]
[]
[]
auto_2025-05-31
rcoh/angle-grinder
11
rcoh__angle-grinder-11
[ "3" ]
176dc55e0ec8e02507cdb6c6520844ccb0809638
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [[package]] name = "ag" -version = "0.3.3" +version = "0.4.0" dependencies = [ "assert_cli 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.30.0 (registry+https://github.com/rust-lang/crates.io-index)", ...
diff --git a/src/data.rs b/src/data.rs --- a/src/data.rs +++ b/src/data.rs @@ -129,6 +126,27 @@ impl Record { raw: raw.to_string(), } } + + pub fn ordering<'a>(columns: Vec<String>) -> Box<Fn(&VMap, &VMap) -> Ordering + 'a> { + Box::new(move |rec_l: &VMap, rec_r: &VMap| { + ...
Add configurable sorting
2018-03-21T15:48:08Z
0.3
2018-03-21T15:55:21Z
176dc55e0ec8e02507cdb6c6520844ccb0809638
[ "data::tests::test_agg", "lang::tests::test_operator", "data::tests::test_panic_on_invalid_row", "lang::tests::test_parses", "data::tests::test_from_string", "lang::tests::test_quoted_string", "lang::tests::test_query_operators", "render::tests::test_pretty_print_aggregate", "lang::tests::test_perce...
[]
[]
[]
auto_2025-05-31
rcoh/angle-grinder
77
rcoh__angle-grinder-77
[ "76" ]
764599d7932ec195be6ad1247923aa52ec99eb05
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -41,6 +41,7 @@ dependencies = [ "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang...
diff --git a/src/render.rs b/src/render.rs --- a/src/render.rs +++ b/src/render.rs @@ -328,6 +343,7 @@ mod tests { floating_points: 2, min_buffer: 1, max_buffer: 4, + format: None, }, None, ); diff --git a/src/render.rs...
More control over human-formatted output I'd like to use agrind to transform structured log output into something that's easy to read while tailing some logs Currently agrind's human-formatted output looks something like ``` [id=ConsumerFetcherManager-1382721708341][level=info][module=kafka.consumer.ConsumerFetche...
This seems related to #71 but with a different goal.
2019-07-23T22:00:33Z
0.10
2019-07-25T15:12:45Z
764599d7932ec195be6ad1247923aa52ec99eb05
[ "data::tests::agg", "data::tests::from_string", "data::tests::record_ordering", "data::tests::value_ordering", "data::tests::record_ordering_matching_prefix", "data::tests::panic_on_invalid_row", "lang::tests::parse_percentile", "lang::tests::parse_ident", "lang::tests::parse_expr", "errors::tests...
[]
[]
[]
auto_2025-05-31
rcoh/angle-grinder
75
rcoh__angle-grinder-75
[ "74" ]
4c67c65113ddb7d3975a94e5bbfe71b19ac74abb
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -26,6 +26,7 @@ dependencies = [ "im 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates...
diff --git a/src/lang.rs b/src/lang.rs --- a/src/lang.rs +++ b/src/lang.rs @@ -939,6 +950,15 @@ mod tests { value: InlineOperator::Json { input_column: None } }) ); + expect!( + operator, + " logfmt", + Operator::Inline(Positioned { + ...
Support logfmt input https://www.brandur.org/logfmt describes the logfmt input, which is supported by a variety of platforms and logging libraries. I'd like to consume them with angle-grinder.
2019-07-02T21:36:36Z
0.10
2019-07-08T18:28:50Z
764599d7932ec195be6ad1247923aa52ec99eb05
[ "data::tests::from_string", "data::tests::record_ordering_matching_prefix", "data::tests::record_ordering", "data::tests::agg", "data::tests::record_put_get", "data::tests::value_ordering", "data::tests::panic_on_invalid_row", "filter::tests::filter_wildcard", "errors::tests::did_you_mean", "lang:...
[]
[]
[]
auto_2025-05-31
rcoh/angle-grinder
139
rcoh__angle-grinder-139
[ "138" ]
6bd07f2b35ac68b3a0fe5960a465b3ea07ad7f26
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -2,18 +2,18 @@ # It is not intended for manual editing. [[package]] name = "addr2line" -version = "0.14.1" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a55f82cfe485775d02112886f4169bde0c589...
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -170,9 +172,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.4.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b58...
ag Crash Report Hello there! I'm trying ag to explore some logs, thanks for this tool <3. It had a problem and crashed so here I am reporting it. Generated report file content: ```toml name = 'ag' operating_system = 'unix:Unknown' crate_version = '0.16.0' explanation = ''' Panic occurred in file '/rustc/d...
thanks! Looks like this line is wrong: https://github.com/rcoh/angle-grinder/blob/main/src/operator/split.rs#L25 it needs to account for the width of the codepoint
2021-05-17T00:20:12Z
0.16
2021-05-17T00:35:21Z
6bd07f2b35ac68b3a0fe5960a465b3ea07ad7f26
[ "data::tests::arithmetic", "data::tests::panic_on_invalid_row", "data::tests::record_ordering", "funcs::tests::substring_of_num", "lang::tests::parse_expr", "funcs::tests::int_length", "filter::tests::filter_wildcard", "data::tests::test_aggresively_to_num", "data::tests::value_ordering", "funcs::...
[]
[]
[]
auto_2025-05-31
rcoh/angle-grinder
125
rcoh__angle-grinder-125
[ "124" ]
1448568e38839060eaf7bc9c22a82e2b0bc5165d
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -47,7 +47,6 @@ dependencies = [ "regex", "self_update", "serde", - "serde_derive", "serde_json", "strfmt", "strsim", diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -1752,6 +1751,9 @@ name = "serde" version ...
diff --git a/src/bin/agrind.rs b/src/bin/agrind.rs --- a/src/bin/agrind.rs +++ b/src/bin/agrind.rs @@ -32,6 +33,7 @@ struct Cli { #[structopt(group = "main")] query: Option<String>, + #[cfg(feature = "self_update")] /// Update agrind to the latest published version Github (https://github.com/rcoh/an...
no longer builds on non-x86/arm architectures since switching to rustls, this will no longer build on any architectures other than x86 and arm, since `ring` is not portable
2020-09-01T03:48:52Z
0.15
2020-09-01T12:44:20Z
1448568e38839060eaf7bc9c22a82e2b0bc5165d
[ "data::tests::arithmetic", "data::tests::from_string", "data::tests::record_put_get", "data::tests::record_ordering", "data::tests::value_ordering", "data::tests::record_ordering_matching_prefix", "data::tests::test_aggresively_to_num", "data::tests::serialize_vec", "data::tests::panic_on_invalid_ro...
[]
[]
[]
auto_2025-05-31
rcoh/angle-grinder
119
rcoh__angle-grinder-119
[ "118" ]
618bfa0b50faacaef5515a1fbc21e6506e3e28c8
diff --git a/src/funcs.rs b/src/funcs.rs --- a/src/funcs.rs +++ b/src/funcs.rs @@ -121,8 +121,17 @@ fn contains(left: &str, right: &str) -> Result<data::Value, EvalError> { Ok(data::Value::from_bool(left.contains(right))) } -fn length(s: &str) -> Result<data::Value, EvalError> { - Ok(data::Value::Int(s.chars...
diff --git a/src/funcs.rs b/src/funcs.rs --- a/src/funcs.rs +++ b/src/funcs.rs @@ -225,7 +234,40 @@ mod tests { #[test] fn unicode_length() { - assert_eq!(data::Value::Int(1), length("\u{2603}").unwrap()); + assert_eq!( + data::Value::Int(1), + length(&vec!(data::Value::S...
Getting the length of an array or number of members in an object What should we do for finding the length of an array? In sumo, the `length()` documentation says it only works for strings, which is what I implemented. I tried searching a bit and found some questions[1], but no answers. Should `length()` just be used...
I would probably just make length a Generic instead of String1 and make it "just work" On Thu, Aug 20, 2020, 12:21 PM Tim Stack <notifications@github.com> wrote: > What should we do for finding the length of an array? In sumo, the > length() documentation says it only works for strings, which is what I > implemented....
2020-08-22T04:59:01Z
0.14
2020-08-23T02:16:38Z
618bfa0b50faacaef5515a1fbc21e6506e3e28c8
[ "data::tests::arithmetic", "data::tests::from_string", "data::tests::agg", "data::tests::record_ordering", "data::tests::record_ordering_matching_prefix", "data::tests::record_put_get", "data::tests::serialize_vec", "data::tests::panic_on_invalid_row", "data::tests::value_ordering", "data::tests::...
[]
[]
[]
auto_2025-05-31
starkware-libs/cairo
3,132
starkware-libs__cairo-3132
[ "3130" ]
5c98cf17854f2bec359077daa610a72453f04b7f
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -603,6 +603,7 @@ dependencies = [ "env_logger", "indoc", "itertools", + "num-bigint", "salsa", "serde_json", "smol_str", diff --git a/crates/cairo-lang-plugins/Cargo.toml b/crates/cairo-lang-plugins/Cargo.toml --- a/crates/cairo-lang-...
diff --git a/crates/cairo-lang-plugins/src/lib.rs b/crates/cairo-lang-plugins/src/lib.rs --- a/crates/cairo-lang-plugins/src/lib.rs +++ b/crates/cairo-lang-plugins/src/lib.rs @@ -13,6 +15,7 @@ mod test; /// Gets the list of default plugins to load into the Cairo compiler. pub fn get_default_plugins() -> Vec<Arc<dyn S...
feat: compile-time arithmetic for constants # Feature Request **Describe the Feature Request** The Cairo compiler should be able to calculate the compile-time value of constants, to make it easier to write such constants, e.g.: ``` const some_value = (256 * 1080) & 0xfaff + 1234; // should become 14336 const s...
2023-05-12T09:12:14Z
1.3
2023-06-13T14:38:53Z
2dca6e26696859c0e70910023110500d6bc2671b
[ "test::expand_plugin::config", "test::expand_plugin::derive", "test::expand_plugin::panicable", "test::expand_plugin::generate_trait" ]
[]
[]
[]
auto_2025-06-10
starkware-libs/cairo
5,683
starkware-libs__cairo-5683
[ "5680" ]
576ddd1b38abe25af1e204cb77ea039b7c46d05e
diff --git a/crates/cairo-lang-semantic/src/expr/compute.rs b/crates/cairo-lang-semantic/src/expr/compute.rs --- a/crates/cairo-lang-semantic/src/expr/compute.rs +++ b/crates/cairo-lang-semantic/src/expr/compute.rs @@ -1773,7 +1773,7 @@ fn maybe_compute_tuple_like_pattern_semantic( unexpected_pattern: fn(TypeId) -...
diff --git a/crates/cairo-lang-semantic/src/expr/compute.rs b/crates/cairo-lang-semantic/src/expr/compute.rs --- a/crates/cairo-lang-semantic/src/expr/compute.rs +++ b/crates/cairo-lang-semantic/src/expr/compute.rs @@ -2279,30 +2279,13 @@ fn member_access_expr( // Find MemberId. let member_name = expr_as_id...
bug: weak inference on simple type # Bug Report **Cairo version:** On commit `8d6b690cb1401e682a0aba7bcda3b40f00482572`. **Current behavior:** The inference of very simple types seems to not be supported anymore, at least on `LegacyMap` that we had into the storage. It this expected as `LegacyMap` should be...
2024-05-29T16:31:46Z
2.6
2024-06-10T16:00:00Z
a767ed09cf460ba70c689abc2cfd18c0a581fc6c
[ "diagnostic::test::test_missing_module_file", "diagnostic::test::test_inline_module_diagnostics", "resolve::test::test_resolve_path_super", "diagnostic::test::test_analyzer_diagnostics", "items::extern_type::test::test_extern_type", "items::extern_function::test::test_extern_function", "expr::test::test...
[]
[]
[]
auto_2025-06-10
starkware-libs/cairo
5,539
starkware-libs__cairo-5539
[ "5524" ]
2b8bd3da33176c38e92e660d8c94f8b6df05f0b1
diff --git a/crates/cairo-lang-lowering/src/graph_algorithms/feedback_set.rs b/crates/cairo-lang-lowering/src/graph_algorithms/feedback_set.rs --- a/crates/cairo-lang-lowering/src/graph_algorithms/feedback_set.rs +++ b/crates/cairo-lang-lowering/src/graph_algorithms/feedback_set.rs @@ -41,7 +41,7 @@ pub fn priv_functio...
diff --git a/crates/cairo-lang-utils/src/graph_algos/feedback_set.rs b/crates/cairo-lang-utils/src/graph_algos/feedback_set.rs --- a/crates/cairo-lang-utils/src/graph_algos/feedback_set.rs +++ b/crates/cairo-lang-utils/src/graph_algos/feedback_set.rs @@ -19,45 +21,55 @@ mod feedback_set_test; /// Context for the fee...
bug: gas computation / unexpected cycle in computation issue with recursive type definition # Bug Report **Cairo version:** At least on `2.5.4` and `2.6.3` **Current behavior:** For the Dojo project, we use the following types to define the layout of our data that will be stored in a dedicated smart contrac...
Tell me if you need more explanation, context or whatever ! Thank you for the report! managed to minimally recreate an example now as well. For your specific usecase you can even reorder your function definitions - and your code would fully compile. will be taking care of it soon.
2024-05-09T18:35:22Z
2.6
2024-05-20T04:05:02Z
a767ed09cf460ba70c689abc2cfd18c0a581fc6c
[ "bigint::test::serde::test_bigint_serde::zero", "bigint::test::serde::test_bigint_serde::negative", "bigint::test::serde::test_bigint_serde::positive", "bigint::test::parity_scale_codec::encode_bigint", "collection_arithmetics::test::test_add_map_and_sub_map", "graph_algos::feedback_set::feedback_set_test...
[]
[]
[]
auto_2025-06-10
starkware-libs/cairo
4,777
starkware-libs__cairo-4777
[ "4744" ]
75f779e8553d28e4bfff3b23f140ccc781c9dab0
diff --git a/crates/cairo-lang-sierra-generator/src/store_variables/known_stack.rs b/crates/cairo-lang-sierra-generator/src/store_variables/known_stack.rs --- a/crates/cairo-lang-sierra-generator/src/store_variables/known_stack.rs +++ b/crates/cairo-lang-sierra-generator/src/store_variables/known_stack.rs @@ -70,9 +70,...
diff --git a/crates/cairo-lang-sierra-generator/src/store_variables/test.rs b/crates/cairo-lang-sierra-generator/src/store_variables/test.rs --- a/crates/cairo-lang-sierra-generator/src/store_variables/test.rs +++ b/crates/cairo-lang-sierra-generator/src/store_variables/test.rs @@ -207,6 +207,11 @@ fn get_lib_func_sign...
bug: One of the arguments does not satisfy the requirements of the libfunc. # Bug Report **Cairo version: 2.3.0-rc0** <!-- Please specify commit or tag version. --> **Current behavior:** ```cairo fn g(ref v: Felt252Vec<u64>, a: usize, b: usize, c: usize, d: usize, x: u64, y: u64) { let mut v_a = v[a];...
I suggested a temporary workaround as you suggested to me last time @orizi, which is ```rust #[inline(never)] fn no_op() {} fn g(ref v: Felt252Vec<u64>, a: usize, b: usize, c: usize, d: usize, x: u64, y: u64) { let mut v_a = v[a]; let mut v_b = v[b]; let mut v_c = v[c]; let mut v_d = v[d];...
2024-01-10T09:30:48Z
2.4
2024-01-15T08:20:26Z
75f779e8553d28e4bfff3b23f140ccc781c9dab0
[ "store_variables::test::push_values_with_hole" ]
[ "store_variables::known_stack::test::merge_stacks", "resolve_labels::test::test_resolve_labels", "canonical_id_replacer::test::test_replacer", "store_variables::test::consecutive_push_values", "store_variables::test::push_values_temp_not_on_top", "store_variables::test::push_values_optimization", "store...
[]
[]
auto_2025-06-10
starkware-libs/cairo
4,391
starkware-libs__cairo-4391
[ "4375" ]
45f9bc8ad931e1568ad3704efa49419a99572e2a
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -1065,7 +1066,7 @@ dependencies = [ "serde_json", "sha2", "sha3", - "starknet-crypto", + "starknet-crypto 0.5.2", "thiserror-no-std", ] diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -2884,6 +2885,26 @@ depen...
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -708,6 +708,7 @@ dependencies = [ "num-bigint", "num-integer", "num-traits 0.2.17", + "starknet-crypto 0.6.1", "test-case", "thiserror", ] diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -105,6 +105,7 @@ serde...
bug: CASM runner assigns arbitrary contract addresses instead of using correct address computation # Bug Report **Cairo version:** 2.3.1 <!-- Please specify commit or tag version. --> **Current behavior:** Currently, the casm runner assigns arbitrary addresses to contracts deployed using `deploy_syscall`, incr...
If these are the specifications - feel free to open a PR. Make sure to include a test. @orizi am I allowed to use the `calculate_contract_address` function from the `starknet_api` crate? Or do you not want dependencies external to the compiler? In any case, I need access to pedersen hash which is available in `starkne...
2023-11-10T08:51:39Z
2.3
2023-11-19T18:53:57Z
02b6ce71cf1d0ca226ba615ce363d71eb2340df4
[ "casm_run::test::test_as_cairo_short_string_ex", "casm_run::test::test_as_cairo_short_string", "casm_run::test::test_runner::jumps", "casm_run::test::test_format_for_debug", "casm_run::test::test_allocate_segment", "casm_run::test::test_runner::divmod_hint", "casm_run::test::test_runner::fib_1_1_13_", ...
[]
[]
[]
auto_2025-06-10
starkware-libs/cairo
6,317
starkware-libs__cairo-6317
[ "6080" ]
d22835b5494e976dbff7b967f3027cc04a7a04a6
diff --git a/crates/cairo-lang-defs/src/db.rs b/crates/cairo-lang-defs/src/db.rs --- a/crates/cairo-lang-defs/src/db.rs +++ b/crates/cairo-lang-defs/src/db.rs @@ -114,6 +114,9 @@ pub trait DefsGroup: /// i.e. a type marked with this attribute is considered a phantom type. fn declared_phantom_type_attributes(&...
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -580,14 +580,19 @@ dependencies = [ name = "cairo-lang-doc" version = "2.8.2" dependencies = [ + "anyhow", "cairo-lang-defs", + "cairo-lang-filesystem", "cairo-lang-formatter", "cairo-lang-parser", + "cairo-lang-semantic", "cairo-lang-...
Implement `//!` comments Add support for `//!` comments that are handled analogously to Rust ones. Follow implementation of `///` comments.
Hey @mkaput I'll like to take up this issue. Can you provide more context to this issue? like where can I find the implementation of `///` this is trivially greppable https://github.com/starkware-libs/cairo/blob/e60c298fd7a10c4e40a63a066f25e972417a6847/crates/cairo-lang-doc/src/db.rs#L25 you will need to test...
2024-08-30T08:46:14Z
2.8
2024-09-09T12:47:54Z
47fe5bf462ab3a388f2c03535846a8c3a7873337
[ "markdown::test::fenced_code_blocks" ]
[]
[]
[]
auto_2025-06-10
starkware-libs/cairo
6,248
starkware-libs__cairo-6248
[ "6235" ]
24d12682ee4b6159d17942ce40b5ba6b32d4801a
diff --git a/crates/cairo-lang-language-server/Cargo.toml b/crates/cairo-lang-language-server/Cargo.toml --- a/crates/cairo-lang-language-server/Cargo.toml +++ b/crates/cairo-lang-language-server/Cargo.toml @@ -33,6 +33,7 @@ scarb-metadata = "1.12" serde = { workspace = true, default-features = true } serde_json.work...
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -669,6 +669,7 @@ dependencies = [ "serde", "serde_json", "smol_str", + "tempfile", "test-log", "tokio", "tower-lsp", diff --git a/crates/cairo-lang-language-server/src/project/unmanaged_core_crate.rs b/crates/cairo-lang-language-serve...
Look for unmanaged `core` in Scarb Implement this TODO: https://github.com/starkware-libs/cairo/blob/cdaceb909ccf0644b7e385669d2c48417ceb90d4/crates/cairo-lang-language-server/src/project/unmanaged_core_crate.rs#L26-L29 I think it'd be best to cache the result in a `LazyLock`.
2024-08-20T14:42:48Z
2.7
2024-08-27T07:22:41Z
aecf701703c5a5067ac68fac12484dca6d357027
[ "lang::lsp::ls_proto_group::test::file_url", "project::project_manifest_path::project_manifest_path_test::discover_no_manifest", "project::project_manifest_path::project_manifest_path_test::discover_precedence", "project::project_manifest_path::project_manifest_path_test::discover_scarb_toml", "project::pro...
[]
[]
[]
auto_2025-06-10
starkware-libs/cairo
4,909
starkware-libs__cairo-4909
[ "4897" ]
7e0dceb788114a0f7e201801a03c034b52c19679
diff --git a/crates/cairo-lang-plugins/src/plugins/config.rs b/crates/cairo-lang-plugins/src/plugins/config.rs --- a/crates/cairo-lang-plugins/src/plugins/config.rs +++ b/crates/cairo-lang-plugins/src/plugins/config.rs @@ -9,7 +9,7 @@ use cairo_lang_syntax::attribute::structured::{ Attribute, AttributeArg, Attribu...
diff --git a/crates/cairo-lang-starknet/src/plugin/starknet_module/contract.rs b/crates/cairo-lang-starknet/src/plugin/starknet_module/contract.rs --- a/crates/cairo-lang-starknet/src/plugin/starknet_module/contract.rs +++ b/crates/cairo-lang-starknet/src/plugin/starknet_module/contract.rs @@ -302,12 +310,13 @@ pub(sup...
bug: code annotated with cfg(test) included in build # Bug Report **Cairo version:** 2.5.0 (was fine in 2.2.0) **Current behavior:** Contract that includes implementation annotated with `#[cfg(test)]` doesn't compile. Works fine when running `scarb test` **Related code:** Code example: ``` #[cfg...
2024-01-24T18:05:48Z
2.5
2024-02-04T08:34:08Z
600553d34a1af93ff7fb038ac677efdd3fd07010
[ "contract::test::test_starknet_keccak", "allowed_libfuncs::test::all_list_includes_all_supported", "allowed_libfuncs::test::libfunc_lists_include_only_supported_libfuncs", "contract_class::test::test_serialization", "felt252_serde::test::test_long_ids", "felt252_serde::test::test_libfunc_serde", "casm_c...
[]
[]
[]
auto_2025-06-10
starkware-libs/cairo
6,720
starkware-libs__cairo-6720
[ "6696" ]
9e0fea71cd1d90cf47d25689f5433250ae2f504f
diff --git a/crates/cairo-lang-semantic/src/diagnostic.rs b/crates/cairo-lang-semantic/src/diagnostic.rs --- a/crates/cairo-lang-semantic/src/diagnostic.rs +++ b/crates/cairo-lang-semantic/src/diagnostic.rs @@ -1344,6 +1344,7 @@ impl SemanticDiagnosticKind { } Self::MissingMember(_) => error_c...
diff --git a/crates/cairo-lang-semantic/src/diagnostic_test.rs b/crates/cairo-lang-semantic/src/diagnostic_test.rs --- a/crates/cairo-lang-semantic/src/diagnostic_test.rs +++ b/crates/cairo-lang-semantic/src/diagnostic_test.rs @@ -54,7 +54,7 @@ fn test_missing_module_file() { assert_eq!( db.module_semanti...
Implement code action for creating module files Basically copy this from IntelliJ Rust: https://github.com/user-attachments/assets/c5fef694-3a5a-4d2c-b864-2fbaa84eba3a
2024-11-21T17:23:04Z
2.9
2024-12-22T10:04:12Z
9e0fea71cd1d90cf47d25689f5433250ae2f504f
[ "diagnostic::test::test_missing_module_file", "diagnostic::test::diagnostics::not_found" ]
[ "diagnostic::test::test_inline_module_diagnostics", "diagnostic::test::test_analyzer_diagnostics", "items::extern_type::test::test_extern_type", "items::extern_function::test::test_extern_function", "expr::test::test_function_with_param", "expr::test::test_function_body", "expr::test::test_expr_call_fai...
[]
[]
auto_2025-06-10
starkware-libs/cairo
6,649
starkware-libs__cairo-6649
[ "6540" ]
47fe5bf462ab3a388f2c03535846a8c3a7873337
diff --git a/crates/cairo-lang-language-server/src/ide/hover/render/definition.rs b/crates/cairo-lang-language-server/src/ide/hover/render/definition.rs --- a/crates/cairo-lang-language-server/src/ide/hover/render/definition.rs +++ b/crates/cairo-lang-language-server/src/ide/hover/render/definition.rs @@ -32,6 +32,17 @...
diff --git a/crates/cairo-lang-language-server/tests/e2e/hover.rs b/crates/cairo-lang-language-server/tests/e2e/hover.rs --- a/crates/cairo-lang-language-server/tests/e2e/hover.rs +++ b/crates/cairo-lang-language-server/tests/e2e/hover.rs @@ -17,7 +17,8 @@ cairo_lang_test_utils::test_file_test!( partial: "part...
LS: Incorrect hovers for path segments Path segments in import statements don't have hovers by themselves ![Image](https://github.com/user-attachments/assets/f0cdd5ff-380b-42f6-b882-1efc7200ed04) However, when they appear in e.g. function call context, they inherit hover of the called function: ![Image](https://github...
2024-11-13T11:29:13Z
2.8
2024-11-18T11:15:41Z
47fe5bf462ab3a388f2c03535846a8c3a7873337
[ "hover::hover::basic", "hover::hover::paths" ]
[ "lang::diagnostics::trigger::test::test_drop_receiver", "lang::diagnostics::trigger::test::test_sync", "project::project_manifest_path::project_manifest_path_test::discover_cairo_project_toml", "project::project_manifest_path::project_manifest_path_test::discover_no_manifest", "lang::lsp::ls_proto_group::te...
[]
[]
auto_2025-06-10
starkware-libs/cairo
6,632
starkware-libs__cairo-6632
[ "6537" ]
893838229215c21471d2e9deacab7a37bc13f02b
diff --git a/crates/cairo-lang-language-server/src/lang/inspect/defs.rs b/crates/cairo-lang-language-server/src/lang/inspect/defs.rs --- a/crates/cairo-lang-language-server/src/lang/inspect/defs.rs +++ b/crates/cairo-lang-language-server/src/lang/inspect/defs.rs @@ -3,7 +3,7 @@ use std::iter; use cairo_lang_defs::db::...
diff --git a/crates/cairo-lang-language-server/tests/e2e/hover.rs b/crates/cairo-lang-language-server/tests/e2e/hover.rs --- a/crates/cairo-lang-language-server/tests/e2e/hover.rs +++ b/crates/cairo-lang-language-server/tests/e2e/hover.rs @@ -17,6 +17,7 @@ cairo_lang_test_utils::test_file_test!( partial: "part...
LS: Incorrect hover when used on member of struct llteral ![image](https://github.com/user-attachments/assets/1bac8b92-2c3e-4604-836d-89e37dc5bd75) ![image](https://github.com/user-attachments/assets/cafb3270-80ce-46bf-bfcc-968cd4b0851a) But not always ![image](https://github.com/user-attachments/assets/ddc3e628...
2024-11-12T10:49:03Z
2.8
2024-11-18T09:44:11Z
47fe5bf462ab3a388f2c03535846a8c3a7873337
[ "hover::hover::structs", "hover::hover::basic" ]
[ "lang::diagnostics::trigger::test::test_drop_receiver", "lang::diagnostics::trigger::test::test_sync", "lang::lsp::ls_proto_group::test::file_url", "project::project_manifest_path::project_manifest_path_test::discover_no_manifest", "project::project_manifest_path::project_manifest_path_test::discover_cairo_...
[]
[]
auto_2025-06-10
starkware-libs/cairo
6,451
starkware-libs__cairo-6451
[ "6444" ]
4b9410e52502f317f7d15359408f894ea396c47d
diff --git a/crates/cairo-lang-language-server/src/project/crate_data.rs b/crates/cairo-lang-language-server/src/project/crate_data.rs --- a/crates/cairo-lang-language-server/src/project/crate_data.rs +++ b/crates/cairo-lang-language-server/src/project/crate_data.rs @@ -8,7 +8,7 @@ use cairo_lang_filesystem::db::{ }; ...
diff --git a/crates/cairo-lang-language-server/src/project/scarb.rs b/crates/cairo-lang-language-server/src/project/scarb.rs --- a/crates/cairo-lang-language-server/src/project/scarb.rs +++ b/crates/cairo-lang-language-server/src/project/scarb.rs @@ -22,6 +23,8 @@ use crate::project::crate_data::Crate; /// Technically...
LS: Insert correct dependency versions when updating crate roots Implement this TODO: https://github.com/starkware-libs/cairo/pull/6411/files#diff-d59b333ba7670534994598079b394c9f46961c54088015804ed156691615818dR95
2024-10-04T09:18:02Z
2.8
2024-10-09T10:34:34Z
47fe5bf462ab3a388f2c03535846a8c3a7873337
[ "lang::lsp::ls_proto_group::test::file_url", "project::project_manifest_path::project_manifest_path_test::discover_no_manifest", "project::project_manifest_path::project_manifest_path_test::discover_cairo_project_toml", "project::project_manifest_path::project_manifest_path_test::discover_precedence", "proj...
[]
[]
[]
auto_2025-06-10
starkware-libs/cairo
6,431
starkware-libs__cairo-6431
[ "6132" ]
737cc88d14a17e1e8b46a6d2d4061aa4b6984980
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -286,34 +286,12 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-trait" -version = "0.1.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673f...
diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -638,7 +616,6 @@ dependencies = [ "pretty_assertions", "rust-analyzer-salsa", "serde", - "smol_str", "test-case", "thiserror", ] diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -665,21 +642,25 @@ dependencies ...
Rewrite from `tower-lsp` to `lsp-server` This task is spin off #5355 References: - https://github.com/ebkalderon/tower-lsp/issues/284
https://github.com/astral-sh/ruff/tree/main/crates/ruff_server
2024-09-27T11:30:28Z
2.8
2024-10-11T17:24:27Z
47fe5bf462ab3a388f2c03535846a8c3a7873337
[ "lang::lsp::ls_proto_group::test::file_url", "project::project_manifest_path::project_manifest_path_test::discover_no_manifest", "project::project_manifest_path::project_manifest_path_test::discover_cairo_project_toml", "project::project_manifest_path::project_manifest_path_test::discover_scarb_toml", "proj...
[]
[]
[]
auto_2025-06-10
starkware-libs/cairo
2,289
starkware-libs__cairo-2289
[ "1672" ]
8f433e752a78afc017d0f08c9e21b966acfe1c11
diff --git a/crates/cairo-lang-parser/src/colored_printer.rs b/crates/cairo-lang-parser/src/colored_printer.rs --- a/crates/cairo-lang-parser/src/colored_printer.rs +++ b/crates/cairo-lang-parser/src/colored_printer.rs @@ -50,6 +50,7 @@ pub fn is_empty_kind(kind: SyntaxKind) -> bool { | SyntaxKind::OptionT...
diff --git a/crates/cairo-lang-parser/src/parser_test.rs b/crates/cairo-lang-parser/src/parser_test.rs --- a/crates/cairo-lang-parser/src/parser_test.rs +++ b/crates/cairo-lang-parser/src/parser_test.rs @@ -62,14 +62,30 @@ const TEST_test2_tree_with_trivia: ParserTreeTestParams = ParserTreeTestParams { print_color...
dev: generics type syntax contains turbofish ``` fn main() -> Option::<felt> { fib(1, 1, 13) } /// Calculates fib... fn fib(a: felt, b: felt, n: felt) -> Option::<felt> { get_gas()?; match n { 0 => Option::<felt>::Some(a), _ => fib(b, a + b, n - 1), } } ``` I hate to bik...
If anyone wants to contribute in this matter, it would be helpful:) Would love to contribute to this, if no one picked it up yet. Am a bit new to this so will be a bit slow when working on this, so if its urgent then I'll leave it to someone else. Sure, you are more than welcome. Not urgent at all. The main issue r...
2023-02-26T20:22:22Z
1.3
2023-02-28T15:48:46Z
2dca6e26696859c0e70910023110500d6bc2671b
[ "parser::test::partial_parser_tree_with_trivia::path", "parser::test::parse_and_compare_tree::test3_tree_no_trivia", "parser::test::parse_and_compare_tree::test3_tree_with_trivia", "parser::test::parse_and_compare_tree::test1_tree_no_trivia", "parser::test::parse_and_compare_tree::test1_tree_with_trivia" ]
[ "lexer::test::test_bad_character", "lexer::test::test_cases", "lexer::test::test_lex_single_token", "db::db_test::test_parser", "parser::test::diagnostic::fn_", "parser::test::diagnostic::pattern", "parser::test::diagnostic::semicolon", "parser::test::diagnostic::module_diagnostics", "parser::test::...
[]
[]
auto_2025-06-10
starkware-libs/cairo
3,264
starkware-libs__cairo-3264
[ "3211" ]
fecc9dc533ba78bb333d8f444d86ad9dd9b61e82
diff --git a/crates/cairo-lang-lowering/src/optimizations/match_optimizer.rs b/crates/cairo-lang-lowering/src/optimizations/match_optimizer.rs --- a/crates/cairo-lang-lowering/src/optimizations/match_optimizer.rs +++ b/crates/cairo-lang-lowering/src/optimizations/match_optimizer.rs @@ -22,6 +23,7 @@ pub fn optimize_mat...
diff --git a/crates/cairo-lang-lowering/src/optimizations/match_optimizer.rs b/crates/cairo-lang-lowering/src/optimizations/match_optimizer.rs --- a/crates/cairo-lang-lowering/src/optimizations/match_optimizer.rs +++ b/crates/cairo-lang-lowering/src/optimizations/match_optimizer.rs @@ -2,13 +2,14 @@ #[path = "match_op...
bug: Multiple jumps to arm blocks are not allowed. # Bug Report **Cairo version:** bcebb2e3 <!-- Please specify commit or tag version. --> **Current behavior:** The compiler panics when trying to compile and run this test: ```rust impl U256TryIntoU64 of TryInto<u256, u64> { #[inline(always)] ...
this is definitely a bug - it also happens when we inline the code "by hand" .
2023-05-30T08:30:01Z
1.3
2023-06-28T05:25:25Z
2dca6e26696859c0e70910023110500d6bc2671b
[ "optimizations::match_optimizer::test::match_optimizer::arm_pattern_destructure", "test::lowering::implicits", "optimizations::match_optimizer::test::match_optimizer::option" ]
[ "test::lowering_phases::tests", "test::lowering::rebindings", "test::lowering::assignment", "test::lowering::tuple", "test::lowering::enums", "test::lowering::error_propagate", "test::lowering::constant", "optimizations::delay_var_def::test::delay_var_def::move_literals", "lower::usage::test::inlini...
[]
[]
auto_2025-06-10
bincode-org/bincode
261
bincode-org__bincode-261
[ "250" ]
0c519bb19dffc5ded3b04525070c0afeb38fdbc3
diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ documentation = "https://docs.rs/bincode" readme = "./readme.md" categories = ["network-programming"] keywords = ["binary", "encode", "decode", "serialize", "deserialize"] +build = "build.rs" license = "MIT" description = "A...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -72,7 +72,7 @@ fn test_numbers() { the_same(5f64); } -#[cfg(feature = "i128")] +#[cfg(has_i128)] #[test] fn test_numbers_128bit() { // unsigned positive
Make `i128` support automatic To revisit #236, it would be more convenient for users if `i128` support was enabled automatically on compatible compilers. We [already argued in July](https://github.com/rust-random/rand/pull/571) that this was the best option for Rand. The linked PR shows how this can be achieved with...
Since build scripts cannot enable features, this would actually require that @BurntSushi's [byteorder](https://github.com/BurntSushi/byteorder) also use auto-detection, and then that `bincode` depend on the new version of `byteorder`. I agree it would be nice to have auto detection here. It looks like `i128` wasn't sta...
2019-01-28T10:43:19Z
1.0
2019-01-28T17:07:59Z
f33abb21b45ff20b63be2a5ab134fce0d6d86d59
[ "test_numbers_128bit" ]
[ "char_serialization", "endian_difference", "bytes", "encode_box", "path_buf", "deserializing_errors", "not_human_readable", "serde_bytes", "test_basic_struct", "test_bool", "test_big_endian_deserialize_seed", "test_cow_serialize", "test_multi_strings_serialize", "test_enum", "test_defaul...
[]
[]
auto_2025-06-08
bincode-org/bincode
217
bincode-org__bincode-217
[ "215" ]
882224363716621d4c9bbbbcc4bde8b4f7e1ba68
diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -18,8 +18,9 @@ description = "A binary serialization / deserialization strategy that uses Serde [dependencies] byteorder = "1.0.0" -serde = "1.*.*" +serde = "1.0.16" [dev-dependencies] serde_bytes = "0.10.*" -serde_derive = "1.*.*" +serde...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -457,3 +457,12 @@ fn test_zero_copy_parse() { assert_eq!(out, f); } } + +#[test] +fn not_human_readable() { + use std::net::Ipv4Addr; + let ip = Ipv4Addr::new(1, 2, 3, 4); + the_same(ip); + assert_eq!(&ip.oc...
Set is_human_readable to false I have not released this yet but I will in the next few days. https://github.com/serde-rs/serde/pull/1044 ```rust trait Serializer { /* ... */ fn is_human_readable(&self) -> bool { true } } trait Deserializer<'de> { /* ... */ fn is_human_readable(&self) -> ...
2017-11-02T10:16:55Z
0.9
2017-11-20T17:56:37Z
882224363716621d4c9bbbbcc4bde8b4f7e1ba68
[ "not_human_readable" ]
[ "bytes", "encode_box", "char_serialization", "endian_difference", "path_buf", "deserializing_errors", "serde_bytes", "test_bool", "test_basic_struct", "test_enum", "test_cow_serialize", "test_multi_strings_serialize", "test_map", "test_fixed_size_array", "test_nested_struct", "test_num...
[]
[]
auto_2025-06-08
bincode-org/bincode
214
bincode-org__bincode-214
[ "164" ]
0bc254459489761e2a933a3bba26cba32d515794
diff --git a/examples/basic.rs b/examples/basic.rs --- a/examples/basic.rs +++ b/examples/basic.rs @@ -2,7 +2,7 @@ extern crate serde_derive; extern crate bincode; -use bincode::{deserialize, serialize, Infinite}; +use bincode::{deserialize, serialize}; #[derive(Serialize, Deserialize, PartialEq, Debug)] struct...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -2,48 +2,43 @@ extern crate serde_derive; extern crate bincode; +extern crate byteorder; extern crate serde; extern crate serde_bytes; -extern crate byteorder; use std::fmt::Debug; use std::collections::HashMap; use std::bo...
Serialized size is not affected by endian choice The `serialized_size` and `serialized_size_bounded` functions should not be exported under `endian_choice`. They have nothing to do with it.
2017-10-17T23:54:01Z
0.9
2020-03-17T16:22:21Z
882224363716621d4c9bbbbcc4bde8b4f7e1ba68
[ "bytes", "endian_difference", "path_buf", "char_serialization", "encode_box", "deserializing_errors", "serde_bytes", "not_human_readable", "test_bool", "test_basic_struct", "test_multi_strings_serialize", "test_cow_serialize", "test_enum", "test_map", "test_oom_protection", "test_neste...
[]
[]
[]
auto_2025-06-08
bincode-org/bincode
212
bincode-org__bincode-212
[ "177" ]
8f7501431d9fd22424ef3ef206d87953780e0501
diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,7 @@ name = "bincode" version = "0.8.1" authors = ["Ty Overby <ty@pre-alpha.com>", "Francesco Mazzoli <f@mazzo.li>", "David Tolnay <dtolnay@gmail.com>", "Daniel Griffen"] +# Adding ErrorKind::Invalid*Encoding is a breaking change # A...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -195,25 +195,32 @@ fn test_fixed_size_array() { #[test] fn deserializing_errors() { - fn isize_invalid_deserialize<T: Debug>(res: Result<T>) { - match res.map_err(|e| *e) { - Err(ErrorKind::InvalidEncoding{..}...
InvalidEncoding representation It looks like this is used for a very limited set of situations. It should be possible to represent them in a nicer way than `{ desc: &'static str, detail: Option<String> }`. ```rust InvalidEncoding { desc: "string was not valid utf8", detail: None, } InvalidEncoding { ...
2017-10-12T15:48:34Z
0.8
2020-03-17T16:21:14Z
8f7501431d9fd22424ef3ef206d87953780e0501
[ "bytes", "char_serialization", "encode_box", "deserializing_errors", "endian_difference", "path_buf", "serde_bytes", "test_bool", "test_basic_struct", "test_cow_serialize", "test_multi_strings_serialize", "test_enum", "test_map", "test_nested_struct", "test_option", "test_proxy_encoded...
[]
[]
[]
auto_2025-06-08
bincode-org/bincode
475
bincode-org__bincode-475
[ "474" ]
f33abb21b45ff20b63be2a5ab134fce0d6d86d59
diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -45,6 +45,8 @@ serde_json = "1.0.68" tempfile = "3.2.0" criterion = "0.3" rand = "0.8" +uuid = { version = "0.8", features = ["serde"] } +chrono = { version = "0.4", features = ["serde"] } [[bench]] name = "varint" diff --git a/src...
diff --git a/tests/issues.rs b/tests/issues.rs --- a/tests/issues.rs +++ b/tests/issues.rs @@ -11,3 +11,6 @@ mod issue_467; #[path = "issues/issue_459.rs"] mod issue_459; + +#[path = "issues/issue_474.rs"] +mod issue_474; diff --git /dev/null b/tests/issues/issue_474.rs new file mode 100644 --- /dev/null +++ b/test...
CannotBorrowOwnedData on decode_from_slice for some types that implement Serialize/Deserialize - bincode::serde Thanks for the excellent work on bincode. I'm currently testing a simple memory based cache for a system I'm writing. In various places I'm calling `serde::encode_to_vec` and `serde::decode_from_slice`. I'm r...
2022-01-17T13:30:05Z
1.0
2022-01-17T16:16:17Z
f33abb21b45ff20b63be2a5ab134fce0d6d86d59
[ "varint::decode_unsigned::test_decode_u32", "varint::decode_unsigned::test_decode_u16", "varint::decode_unsigned::test_decode_u128", "varint::decode_unsigned::test_decode_u64", "varint::encode_signed::test_encode_i128", "varint::encode_signed::test_encode_i16", "varint::encode_signed::test_encode_i32", ...
[]
[]
[]
auto_2025-06-08
bincode-org/bincode
471
bincode-org__bincode-471
[ "459" ]
8c3dd01b89fe9edd2ce0c31f201b4f372f5a9663
diff --git a/derive/src/derive_enum.rs b/derive/src/derive_enum.rs --- a/derive/src/derive_enum.rs +++ b/derive/src/derive_enum.rs @@ -29,7 +29,7 @@ impl DeriveEnum { .generate_fn("encode") .with_generic("E", ["bincode::enc::Encoder"]) .with_self_arg(FnSelfArg::RefSelf) - ...
diff --git a/tests/alloc.rs b/tests/alloc.rs --- a/tests/alloc.rs +++ b/tests/alloc.rs @@ -20,10 +20,10 @@ struct Foo { impl bincode::enc::Encode for Foo { fn encode<E: bincode::enc::Encoder>( &self, - mut encoder: E, + encoder: &mut E, ) -> Result<(), bincode::error::EncodeError> { - ...
ICE: `thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0'` See: https://github.com/kdy1/wasm-perf/pull/1 I filed [an issue on rust issue tracker](https://github.com/rust-lang/rust/issues/92470), but I think it can be workarounded for now. Stack: ``` query stack during panic: #...
Still ICE's on `1.59.0-nightly (fcef61230 2021-12-17)`
2022-01-12T10:15:16Z
1.0
2022-02-01T13:18:32Z
f33abb21b45ff20b63be2a5ab134fce0d6d86d59
[ "varint::decode_unsigned::test_decode_u16", "varint::decode_unsigned::test_decode_u128", "varint::decode_unsigned::test_decode_u64", "varint::decode_unsigned::test_decode_u32", "varint::encode_signed::test_encode_i128", "varint::encode_signed::test_encode_i16", "varint::encode_signed::test_encode_i32", ...
[]
[]
[]
auto_2025-06-08
bincode-org/bincode
470
bincode-org__bincode-470
[ "467" ]
6d386492d5b51712c6a4dfe901c1665c9bef6bfc
diff --git a/derive/src/derive_enum.rs b/derive/src/derive_enum.rs --- a/derive/src/derive_enum.rs +++ b/derive/src/derive_enum.rs @@ -201,7 +201,7 @@ impl DeriveEnum { }) .generate_fn("decode") .with_generic("D", ["bincode::de::Decoder"]) - .with_arg("mut decoder", "D"...
diff --git a/tests/alloc.rs b/tests/alloc.rs --- a/tests/alloc.rs +++ b/tests/alloc.rs @@ -30,11 +30,11 @@ impl bincode::enc::Encode for Foo { impl bincode::Decode for Foo { fn decode<D: bincode::de::Decoder>( - mut decoder: D, + decoder: &mut D, ) -> Result<Self, bincode::error::DecodeError>...
recursive struct gives: overflow evaluating the requirement SliceReader: Sized ```rust use std::collections::BTreeMap; #[derive(bincode::Decode)] struct AllTypes(BTreeMap<u8, AllTypes>); fn main() { let result: Result<(AllTypes, _), _> = bincode::decode_from_slice( &[], bincode::config::C...
2022-01-10T18:31:18Z
1.0
2022-01-11T19:23:49Z
f33abb21b45ff20b63be2a5ab134fce0d6d86d59
[ "varint::decode_unsigned::test_decode_u128", "varint::decode_unsigned::test_decode_u16", "varint::decode_unsigned::test_decode_u32", "varint::encode_signed::test_encode_i128", "varint::decode_unsigned::test_decode_u64", "varint::encode_signed::test_encode_i16", "varint::encode_signed::test_encode_i32", ...
[]
[]
[]
auto_2025-06-08
bincode-org/bincode
198
bincode-org__bincode-198
[ "193" ]
131b2b213dedc34bea0edc98298770eb4eb0c74a
diff --git a/src/config/legacy.rs b/src/config/legacy.rs --- a/src/config/legacy.rs +++ b/src/config/legacy.rs @@ -49,6 +49,7 @@ macro_rules! config_map { (Unlimited, Little) => { let $opts = DefaultOptions::new() .with_fixint_encoding() + .allow_tra...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -277,6 +277,17 @@ fn deserializing_errors() { } } +#[test] +fn trailing_bytes() { + match DefaultOptions::new() + .deserialize::<char>(b"1x") + .map_err(|e| *e) + { + Err(ErrorKind::Custom(_)) => {} ...
Reject trailing bytes when deserializing from &[u8] In `deserialize_from`, it makes sense to allow deserializing multiple values from the same io::Read. But in `deserialize`, I think trailing data should be an error. I would expect this to be an error rather than ignoring `b"x"`: ```rust extern crate bincode; ...
@dtolnay Is this issue in response to my question: https://github.com/TyOverby/bincode/issues/192 ? Does it mean that multiple serialised messages (differing by trailing bytes) can deserialise to the same content? https://github.com/TyOverby/bincode/issues/192#issuecomment-313660286 gives a workaround to detect trai...
2017-07-24T00:07:44Z
1.2
2020-05-26T19:40:05Z
263fb948aca86d3ac5dfa5bc4f345b44ed8bb8f8
[ "trailing_bytes" ]
[ "config::int::test::test_zigzag_edge_cases", "config::int::test::test_zigzag_decode", "config::int::test::test_zigzag_encode", "char_serialization", "bytes", "deserializing_errors", "endian_difference", "path_buf", "encode_box", "not_human_readable", "serde_bytes", "test_basic_struct", "test...
[]
[]
auto_2025-06-08
bincode-org/bincode
434
bincode-org__bincode-434
[ "433" ]
a2e7e0e3fc7b838dae9df3b6c358acb2725f5f52
diff --git a/derive/src/derive_enum.rs b/derive/src/derive_enum.rs --- a/derive/src/derive_enum.rs +++ b/derive/src/derive_enum.rs @@ -1,5 +1,5 @@ use crate::generate::{FnSelfArg, Generator, StreamBuilder}; -use crate::parse::{EnumVariant, Fields}; +use crate::parse::{EnumVariant, FieldAttribute, Fields}; use crate::...
diff --git a/derive/src/parse/attributes.rs b/derive/src/parse/attributes.rs --- a/derive/src/parse/attributes.rs +++ b/derive/src/parse/attributes.rs @@ -44,6 +78,27 @@ impl Attribute { } Ok(result) } + + fn parse_bincode_attribute( + loc: AttributeLocation, + stream: &mut Peeka...
Figure out bincode Decode/Encode interop with serde Currently bincode 2 only allows either `Decode/Encode`, or serde's traits. It would be nice to have a way to use serde types while using `Decode/Encode` Some ideas: - Add an `#[serde_interop]` attribute to `bincode_derive` - Add a `WithSerde<T>` that implements `...
2021-11-08T12:40:52Z
1.0
2021-11-09T09:08:50Z
f33abb21b45ff20b63be2a5ab134fce0d6d86d59
[ "parse::body::test_enum_body_take", "parse::visibility::test_visibility_try_take", "parse::attributes::test_attributes_try_take", "parse::body::test_struct_body_take", "parse::generics::test_generics_try_take", "parse::generics::test_lifetime_take", "parse::generics::test_generic_constraints_try_take", ...
[]
[]
[]
auto_2025-06-08
bincode-org/bincode
336
bincode-org__bincode-336
[ "335" ]
f5fa06e761646ba083c1317a4ba0dcd58eefe99b
diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bincode" -version = "1.3.0" # remember to update html_root_url +version = "1.3.1" # remember to update html_root_url authors = ["Ty Overby <ty@pre-alpha.com>", "Francesco Mazzoli <f@mazzo.li>", "David Tolnay <dto...
diff --git a/src/de/read.rs b/src/de/read.rs --- a/src/de/read.rs +++ b/src/de/read.rs @@ -185,3 +180,23 @@ where visitor.visit_bytes(&self.temp_buffer[..]) } } + +#[cfg(test)] +mod test { + use super::IoReader; + + #[test] + fn test_fill_buffer() { + let buffer = vec![0u8; 64]; + ...
Regression in 1.3.0: memory allocation of 8391155392347897856 bytes failed Can be reproduced by adding the following test to the bottom of src/lib.rs in https://github.com/sharkdp/bat/tree/b09d245dea7e2f45cf461fda978f3256e7162465 and running `cargo update` and `cargo test --lib bincode_repro`. It succeeds with bincode ...
The regression seems to start with https://github.com/servo/bincode/pull/309. I'm uncertain, but it seems like [`fill_buffer`](https://github.com/servo/bincode/blob/f5fa06e761646ba083c1317a4ba0dcd58eefe99b/src/de/read.rs#L143-L154) was written to assume that it will only add at most `length` bytes to the buffer. Howev...
2020-06-24T05:33:27Z
1.3
2020-06-24T06:42:46Z
f5fa06e761646ba083c1317a4ba0dcd58eefe99b
[ "de::read::test::test_fill_buffer" ]
[ "config::int::test::test_zigzag_edge_cases", "config::int::test::test_zigzag_decode", "config::int::test::test_zigzag_encode", "bytes", "char_serialization", "endian_difference", "deserializing_errors", "encode_box", "path_buf", "serde_bytes", "not_human_readable", "test_basic_struct", "test...
[]
[]
auto_2025-06-08
bincode-org/bincode
323
bincode-org__bincode-323
[ "320" ]
263fb948aca86d3ac5dfa5bc4f345b44ed8bb8f8
diff --git /dev/null b/src/config/endian.rs new file mode 100644 --- /dev/null +++ b/src/config/endian.rs @@ -0,0 +1,29 @@ +use byteorder::{self, ByteOrder}; + +pub trait BincodeByteOrder { + type Endian: ByteOrder + 'static; +} + +/// Little-endian byte ordering. +#[derive(Copy, Clone)] +pub struct LittleEndian; + ...
diff --git a/src/config.rs /dev/null --- a/src/config.rs +++ /dev/null @@ -1,1279 +0,0 @@ -use byteorder; -use de::read::BincodeRead; -use error::{ErrorKind, Result}; -use serde; -use std::io::{Read, Write}; -use std::marker::PhantomData; -use std::mem::size_of; - -pub(crate) use self::internal::*; - -use self::EndianO...
DefaultOptions::new is kinda long; can we have a short way to call it?
2020-05-19T01:44:52Z
1.2
2020-05-19T05:46:13Z
263fb948aca86d3ac5dfa5bc4f345b44ed8bb8f8
[ "bytes", "encode_box", "char_serialization", "endian_difference", "deserializing_errors", "path_buf", "serde_bytes", "test_big_endian_deserialize_from_seed", "test_default_deserialize_from_seed", "test_nested_struct", "test_map", "test_big_endian_deserialize_seed", "test_string", "test_sli...
[]
[]
[]
auto_2025-06-08
bincode-org/bincode
306
bincode-org__bincode-306
[ "319" ]
a8ce052bf61e775afaee4397f340554c0f5cf0ba
diff --git a/src/config.rs b/src/config.rs --- a/src/config.rs +++ b/src/config.rs @@ -4,6 +4,7 @@ use error::{ErrorKind, Result}; use serde; use std::io::{Read, Write}; use std::marker::PhantomData; +use std::mem::size_of; pub(crate) use self::internal::*; diff --git a/src/config.rs b/src/config.rs --- a/src/c...
diff --git a/src/config.rs b/src/config.rs --- a/src/config.rs +++ b/src/config.rs @@ -560,4 +1128,152 @@ mod internal { pub trait BincodeByteOrder { type Endian: ByteOrder + 'static; } + + pub trait IntEncoding { + /// Gets the size (in bytes) that a value would be serialized to. + ...
Varint encoding for discriminants/lengths Rolling up issues #285, #157, and #75 We should offer an option to allow encoding discriminants and lengths as some sort of varint.
2020-03-14T03:50:48Z
1.2
2020-08-20T04:01:06Z
263fb948aca86d3ac5dfa5bc4f345b44ed8bb8f8
[ "bytes", "endian_difference", "char_serialization", "deserializing_errors", "encode_box", "path_buf", "not_human_readable", "test_bool", "test_basic_struct", "test_big_endian_deserialize_from_seed", "test_cow_serialize", "test_default_deserialize_from_seed", "test_big_endian_deserialize_seed...
[]
[]
[]
auto_2025-06-08
async-graphql/async-graphql
1,346
async-graphql__async-graphql-1346
[ "1238" ]
b0e2c7494bf7c8bfdc00692a9cf41f4ca7d5a676
diff --git a/derive/src/args.rs b/derive/src/args.rs --- a/derive/src/args.rs +++ b/derive/src/args.rs @@ -207,6 +207,8 @@ pub struct SimpleObject { pub shareable: bool, #[darling(default)] pub inaccessible: bool, + #[darling(default)] + pub interface_object: bool, #[darling(default, multiple,...
diff --git a/src/registry/export_sdl.rs b/src/registry/export_sdl.rs --- a/src/registry/export_sdl.rs +++ b/src/registry/export_sdl.rs @@ -644,8 +649,8 @@ mod tests { #[test] fn test_compose_directive_dsl() { let expected = r#"extend schema @link( - url: "https://specs.apollo.dev/federation/v2.1", - ...
Support for `@interfaceObject` and `@key` on interfaces ## Description of the feature Add support for `@interfaceObject` and `@key` on interfaces that was added to the federation spec in v2.3. You can read more about this [here](https://github.com/apollographql/federation/issues/2277).
any updates/thoughts on this? cc @sunli829
2023-08-14T18:28:08Z
6.0
2023-08-15T01:51:06Z
d3a4c64b57455f48e7a7b800d5235d258c9540f0
[ "dataloader::tests::test_dataloader_load_empty", "dataloader::tests::test_dataloader_disable_cache", "dataloader::tests::test_dataloader_disable_all_cache", "dataloader::tests::test_duplicate_keys", "dataloader::tests::test_dataloader_with_cache_hashmap_fnv", "dataloader::tests::test_dataloader_with_cache...
[]
[]
[]
auto_2025-06-06
async-graphql/async-graphql
1,228
async-graphql__async-graphql-1228
[ "1223" ]
dc140a55012ab4fd671fc4974f3aed7b0de23c7a
diff --git a/src/dynamic/resolve.rs b/src/dynamic/resolve.rs --- a/src/dynamic/resolve.rs +++ b/src/dynamic/resolve.rs @@ -336,7 +336,13 @@ fn collect_fields<'a>( type_condition.map(|condition| condition.node.on.node.as_str()); let introspection_type_name = &object.name; - ...
diff --git a/src/dynamic/interface.rs b/src/dynamic/interface.rs --- a/src/dynamic/interface.rs +++ b/src/dynamic/interface.rs @@ -389,4 +389,47 @@ mod tests { }] ); } + #[tokio::test] + async fn query_type_condition() { + struct MyObjA; + let obj_a = Object::new("MyObjA")...
dynamic schema: query interface on union not working ## Expected Behavior when we have a union of objects that some of which implements an interface, we should be able to query the union by the interface. In the following example, if the `pet` is queried by the `Named` interface, we expect the `name` field and `__ty...
2023-02-07T09:56:55Z
5.0
2023-02-09T17:25:24Z
dc140a55012ab4fd671fc4974f3aed7b0de23c7a
[ "dynamic::interface::tests::query_type_condition", "dynamic::union::tests::test_query" ]
[ "dataloader::tests::test_dataloader_load_empty", "dataloader::tests::test_dataloader_disable_cache", "dataloader::tests::test_dataloader_disable_all_cache", "dataloader::tests::test_duplicate_keys", "dataloader::tests::test_dataloader_with_cache", "dataloader::tests::test_dataloader_with_cache_hashmap_fnv...
[]
[]
auto_2025-06-06
async-graphql/async-graphql
1,099
async-graphql__async-graphql-1099
[ "1098" ]
49b6fa4f9f3a679a318fb489fe2d017c38b09237
diff --git a/src/http/graphiql_v2_source.rs b/src/http/graphiql_v2_source.rs --- a/src/http/graphiql_v2_source.rs +++ b/src/http/graphiql_v2_source.rs @@ -18,6 +18,7 @@ pub struct GraphiQLSource<'a> { endpoint: &'a str, subscription_endpoint: Option<&'a str>, headers: Option<HashMap<&'a str, &'a str>>, +...
diff --git a/src/http/graphiql_v2_source.rs b/src/http/graphiql_v2_source.rs --- a/src/http/graphiql_v2_source.rs +++ b/src/http/graphiql_v2_source.rs @@ -275,6 +286,7 @@ mod tests { .endpoint("http://localhost:8000") .subscription_endpoint("ws://localhost:8000/ws") .header("Autho...
Ability to change Document Title in GraphiQL v2 and GraphQL Playground ## Description of the feature I would like to be able to change the html document title in the GraphiQL v2 and GraphQL Playground responses. I would like to implement this myself as part of my [Hacktoberfest](https://hacktoberfest.com) contribut...
2022-09-30T14:21:43Z
4.0
2022-10-07T09:05:48Z
49b6fa4f9f3a679a318fb489fe2d017c38b09237
[ "dataloader::tests::test_dataloader_load_empty", "http::graphiql_v2_source::tests::test_with_both_urls", "http::graphiql_v2_source::tests::test_with_all_options", "http::graphiql_v2_source::tests::test_with_only_url", "registry::cache_control::tests::to_value", "dataloader::tests::test_dataloader_disable_...
[]
[]
[]
auto_2025-06-06
async-graphql/async-graphql
1,048
async-graphql__async-graphql-1048
[ "1045" ]
b2acefdf602e91d451ba01730c8a38a8f9d30abc
diff --git a/src/registry/export_sdl.rs b/src/registry/export_sdl.rs --- a/src/registry/export_sdl.rs +++ b/src/registry/export_sdl.rs @@ -367,7 +367,7 @@ impl Registry { write!(sdl, " @tag(name: \"{}\")", tag.replace('"', "\\\"")).ok(); } } - ...
diff --git a/tests/federation.rs b/tests/federation.rs --- a/tests/federation.rs +++ b/tests/federation.rs @@ -536,6 +536,15 @@ pub async fn test_entity_inaccessible() { assert!(schema_sdl.contains("inputFieldInaccessibleA: Int! @inaccessible")); // no trailing spaces assert!(!schema_sdl.contains(" \n"))...
SDL: missing space after input type name before open brace (without annotations) Old is expected, new is actual: ```diff @@ -175,9 +175,9 @@ type DomainConnection { pageInfo: PageInfo! } -input DomainContactInput { - domain: String! - message: String! +input DomainContactInput{ + ...
2022-08-29T20:26:17Z
4.0
2022-08-30T01:33:28Z
49b6fa4f9f3a679a318fb489fe2d017c38b09237
[ "test_entity_tag", "test_entity_inaccessible" ]
[ "dataloader::tests::test_dataloader_load_empty", "http::graphiql_v2_source::tests::test_with_both_urls", "http::graphiql_v2_source::tests::test_with_all_options", "http::graphiql_v2_source::tests::test_with_only_url", "registry::export_sdl::tests::test_escape_string", "dataloader::tests::test_dataloader_d...
[]
[]
auto_2025-06-06
async-graphql/async-graphql
1,043
async-graphql__async-graphql-1043
[ "1037" ]
337279f6c76885e1f792cff50e3e455efd664812
diff --git a/src/registry/export_sdl.rs b/src/registry/export_sdl.rs --- a/src/registry/export_sdl.rs +++ b/src/registry/export_sdl.rs @@ -271,29 +271,29 @@ impl Registry { write!(sdl, "extend ").ok(); } - write!(sdl, "type {} ", name).ok(); + write!...
diff --git a/tests/federation.rs b/tests/federation.rs --- a/tests/federation.rs +++ b/tests/federation.rs @@ -534,6 +534,8 @@ pub async fn test_entity_inaccessible() { assert!(schema_sdl.contains("input MyInputObjInaccessible @inaccessible")); // INPUT_FIELD_DEFINITION assert!(schema_sdl.contains("input...
4.0.10 adds trailing spaces in schema output After upgrading to 4.0.10, the schema output changed to include trailing spaces after input type fields. Would be nice to avoid this (and other unnecessary changes to schema output, ideally).
There is an MR to fix this: https://github.com/async-graphql/async-graphql/pull/1036
2022-08-25T13:37:40Z
4.0
2022-08-29T05:50:02Z
49b6fa4f9f3a679a318fb489fe2d017c38b09237
[ "test_entity_inaccessible", "test_entity_tag" ]
[ "dataloader::tests::test_dataloader_load_empty", "registry::export_sdl::tests::test_escape_string", "dataloader::tests::test_dataloader_disable_cache", "http::playground_source::tests::test_with_setting_can_use_any_json_value", "dataloader::tests::test_dataloader_disable_all_cache", "dataloader::tests::te...
[]
[]
auto_2025-06-06
async-graphql/async-graphql
741
async-graphql__async-graphql-741
[ "740" ]
d2a71377a933eb32f8f3f0e23854638ac52ca927
diff --git a/src/registry/mod.rs b/src/registry/mod.rs --- a/src/registry/mod.rs +++ b/src/registry/mod.rs @@ -922,6 +922,19 @@ impl Registry { traverse_type(ctx, &self.types, &mut visible_types, ty.name()); } + for ty in self.types.values() { + if let MetaType::Interface { pos...
diff --git /dev/null b/tests/interface_exporting.rs new file mode 100644 --- /dev/null +++ b/tests/interface_exporting.rs @@ -0,0 +1,203 @@ +use async_graphql::*; +use serde::Deserialize; + +#[derive(SimpleObject)] +struct ObjectA { + id: i32, + title: String, +} + +#[derive(SimpleObject)] +struct ObjectB { + ...
Interfaces not being exported via schema in Async GraphQL 3.x ## Expected Behavior registering an interface to properly expose it via the __schema API. ## Actual Behavior The interface is not accessible via the __schema API. ## Steps to Reproduce the Problem 1. I have two types that implement an interface `...
2021-12-04T18:40:16Z
3.0
2022-05-31T22:21:25Z
5c4289e442d6e56bcc3239b742e1534800adbe1b
[ "test_interface_exports_interfaces_on_object_type", "test_interface_exports_implicit_interface_type" ]
[ "dataloader::tests::test_dataloader_load_empty", "http::playground_source::tests::test_with_setting_can_use_any_json_value", "request::tests::test_deserialize_request_with_null_variables", "request::tests::test_request", "request::tests::test_batch_request_single", "dataloader::tests::test_dataloader_disa...
[]
[]
auto_2025-06-06
async-graphql/async-graphql
584
async-graphql__async-graphql-584
[ "583" ]
06a5eb298365b741187baec5b7bc6aec0ad3abab
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spe...
diff --git a/src/http/playground_source.rs b/src/http/playground_source.rs --- a/src/http/playground_source.rs +++ b/src/http/playground_source.rs @@ -608,3 +620,30 @@ impl<'a> GraphQLPlaygroundConfig<'a> { self } } + +#[cfg(test)] +mod tests { + use super::*; + use std::collections::BTreeMap; + + ...
Playground settings can only be &str ## Expected Behavior Playground settings should be able to accept any JSON type (although maybe not Object or Array?). ## Actual Behavior [`with_setting`](https://docs.rs/async-graphql/2.9.9/async_graphql/http/struct.GraphQLPlaygroundConfig.html#method.with_setting) can onl...
Good idea,welcome to PR.👏
2021-07-23T08:47:32Z
2.9
2021-07-23T10:30:33Z
06a5eb298365b741187baec5b7bc6aec0ad3abab
[ "dataloader::tests::test_dataloader_load_empty", "request::tests::test_batch_request_single", "request::tests::test_batch_request_batch", "request::tests::test_request", "request::tests::test_deserialize_request_with_null_variables", "response::tests::test_batch_response_batch", "request::tests::test_re...
[]
[]
[]
auto_2025-06-06
async-graphql/async-graphql
574
async-graphql__async-graphql-574
[ "573" ]
c1f651254ec0c92cc632ae86c2ac2060ba8f678d
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - Add binary types to `ConstValue` and `Value`. [#569](https://github.com/async-graphql/async-graphql/issues/569) +- Changed...
diff --git a/src/look_ahead.rs b/src/look_ahead.rs --- a/src/look_ahead.rs +++ b/src/look_ahead.rs @@ -45,34 +48,36 @@ impl<'a> From<SelectionField<'a>> for Lookahead<'a> { fn from(selection_field: SelectionField<'a>) -> Self { Lookahead { fragments: selection_field.fragments, - fi...
Lookahead doesn't allow multiple instances of a subfield I've encountered a limitation to `Lookahead` that I think severely limits their usability, particularly when used in public facing APIs. For internal only APIs you can (sometimes) get around this if aware of the limitations, but I feel it'd be inadvisable to use ...
2021-07-15T01:17:49Z
2.9
2021-07-15T02:00:39Z
06a5eb298365b741187baec5b7bc6aec0ad3abab
[ "dataloader::tests::test_dataloader_load_empty", "request::tests::test_batch_request_batch", "request::tests::test_deserialize_request_with_null_variables", "request::tests::test_batch_request_single", "request::tests::test_request_with_operation_name", "request::tests::test_request", "dataloader::tests...
[]
[]
[]
auto_2025-06-06
async-graphql/async-graphql
562
async-graphql__async-graphql-562
[ "550" ]
f1dd3f380cd374a357908c9c8f11248713da2606
diff --git a/derive/src/complex_object.rs b/derive/src/complex_object.rs --- a/derive/src/complex_object.rs +++ b/derive/src/complex_object.rs @@ -18,7 +18,6 @@ pub fn generate( let crate_name = get_crate_name(object_args.internal); let (self_ty, _) = get_type_path_and_name(item_impl.self_ty.as_ref())?; ...
diff --git a/tests/complex_object.rs b/tests/complex_object.rs --- a/tests/complex_object.rs +++ b/tests/complex_object.rs @@ -1,4 +1,5 @@ use async_graphql::*; +use core::marker::PhantomData; #[tokio::test] pub async fn test_complex_object() { diff --git a/tests/complex_object.rs b/tests/complex_object.rs --- a/t...
[Question] Generics and context Hello 👋 First of all thank you for this amazing crate. I'm having issues achieving a particular use case and I'm curious if its at all possible or I'm looking at the problem from the wrong perspective. In my application I have service structs that look like this: ```rust #[de...
I am trying to do the same thing as you do, and this approach works: ```rust use std::marker::PhantomData; use async_graphql::{Object, SimpleObject, ComplexObject, Context, ID, Error, Result, Schema, EmptyMutation, EmptySubscription}; pub trait MyData: Send + Sync {} struct DefaultMyData {} impl MyData for ...
2021-07-03T16:10:45Z
2.9
2021-07-04T06:10:20Z
06a5eb298365b741187baec5b7bc6aec0ad3abab
[ "dataloader::tests::test_dataloader_load_empty", "request::tests::test_batch_request_batch", "request::tests::test_batch_request_single", "request::tests::test_request_with_operation_name", "dataloader::tests::test_duplicate_keys", "request::tests::test_request", "request::tests::test_deserialize_reques...
[]
[]
[]
auto_2025-06-06
async-graphql/async-graphql
1,559
async-graphql__async-graphql-1559
[ "1558" ]
faa78d071cfae795dacc39fd46900fdfb6157d0d
diff --git a/src/registry/export_sdl.rs b/src/registry/export_sdl.rs --- a/src/registry/export_sdl.rs +++ b/src/registry/export_sdl.rs @@ -259,10 +259,8 @@ impl Registry { write!(sdl, " @tag(name: \"{}\")", tag.replace('"', "\\\"")).ok(); } } - ...
diff --git a/tests/schemas/test_fed2_compose_2.schema.graphql b/tests/schemas/test_fed2_compose_2.schema.graphql --- a/tests/schemas/test_fed2_compose_2.schema.graphql +++ b/tests/schemas/test_fed2_compose_2.schema.graphql @@ -3,7 +3,7 @@ type Query { - testArgument(arg: String! @type_directive_argument_definition...
The custom directive ARGUMENT_DEFINITION is not being output at the appropriate location in SDL ## Rust Code ```rust use async_graphql::*; #[TypeDirective(location = "ArgumentDefinition")] fn testDirective(desc: String) {} struct Query; #[Object] impl Query { async fn add( &self, #...
2024-07-09T10:56:37Z
7.0
2024-07-14T02:17:22Z
faa78d071cfae795dacc39fd46900fdfb6157d0d
[ "test_type_directive_2" ]
[ "dataloader::tests::test_dataloader_load_empty", "dataloader::tests::test_dataloader_disable_all_cache", "dataloader::tests::test_dataloader_disable_cache", "dataloader::tests::test_duplicate_keys", "dataloader::tests::test_dataloader_with_cache", "dynamic::check::tests::test_recursive_input_objects_bad",...
[]
[]
auto_2025-06-06
async-graphql/async-graphql
1,535
async-graphql__async-graphql-1535
[ "1490" ]
59f150befa7d0ee5abae81a1d23decdbcdb20b15
diff --git a/derive/src/simple_object.rs b/derive/src/simple_object.rs --- a/derive/src/simple_object.rs +++ b/derive/src/simple_object.rs @@ -114,7 +114,7 @@ pub fn generate(object_args: &args::SimpleObject) -> GeneratorResult<TokenStream } for SimpleObjectFieldGenerator { field, derived } in &processed_fi...
diff --git a/tests/derived_field.rs b/tests/derived_field.rs --- a/tests/derived_field.rs +++ b/tests/derived_field.rs @@ -382,3 +382,57 @@ pub async fn test_derived_field_complex_object_derived() { }) ); } + +#[tokio::test] +pub async fn test_derived_field_with_skip_simple_object() { + use serde::{De...
As using proxy type ## Description of the feature I would like to include a feature similar to [`serde_with::FromInto`](https://docs.rs/serde_with/3.7.0/serde_with/struct.FromInto.html): > Serialize value by converting to/from a proxy type with serde support. > > This adapter serializes a type O by converting it i...
2024-06-08T02:15:37Z
7.0
2024-06-15T00:26:50Z
faa78d071cfae795dacc39fd46900fdfb6157d0d
[ "dataloader::tests::test_dataloader_load_empty", "dataloader::tests::test_dataloader_disable_all_cache", "dataloader::tests::test_dataloader_disable_cache", "dataloader::tests::test_duplicate_keys", "dataloader::tests::test_dataloader_with_cache", "dataloader::tests::test_dataloader_with_cache_hashmap_fnv...
[]
[]
[]
auto_2025-06-06
async-graphql/async-graphql
1,524
async-graphql__async-graphql-1524
[ "1187" ]
9d1befde1444a3d6a9dfdc62750ba271159c7173
diff --git a/src/registry/export_sdl.rs b/src/registry/export_sdl.rs --- a/src/registry/export_sdl.rs +++ b/src/registry/export_sdl.rs @@ -95,15 +95,6 @@ impl Registry { pub(crate) fn export_sdl(&self, options: SDLExportOptions) -> String { let mut sdl = String::new(); - let has_oneof = self - ...
diff --git a/tests/directive.rs b/tests/directive.rs --- a/tests/directive.rs +++ b/tests/directive.rs @@ -1,4 +1,5 @@ use async_graphql::*; +use serde::{Deserialize, Serialize}; #[tokio::test] pub async fn test_directive_skip() { diff --git a/tests/directive.rs b/tests/directive.rs --- a/tests/directive.rs +++ b/...
Oneof directive not included in introspection result ## Expected Behavior I would expect the `@oneof` directive to be included in the result of an introspection query whenever the `#[derive(OneofObject)]` macro is used on a struct. ## Actual Behavior The directive is not listed in the introspection query result: ...
GraphiQL doesn't seem to support oneof. `Type` contains `oneOf` field, but GraphiQL is not querying it. https://github.com/async-graphql/async-graphql/blob/e2e35ce93f1032d6467144c7fa8f0783e1dde04b/src/model/type.rs#L241 Yes, that is true. Probably because it is still in RFC2 (Draft) phase. They renamed it to `isO...
2024-05-18T14:33:38Z
7.0
2024-05-19T00:59:07Z
faa78d071cfae795dacc39fd46900fdfb6157d0d
[ "test_includes_deprecated_directive", "test_includes_specified_by_directive", "test_introspection_directives", "test_type_directive_2" ]
[ "dataloader::tests::test_dataloader_load_empty", "dataloader::tests::test_dataloader_disable_cache", "dataloader::tests::test_duplicate_keys", "dataloader::tests::test_dataloader_disable_all_cache", "dynamic::check::tests::test_recursive_input_objects_bad", "dynamic::check::tests::test_recursive_input_obj...
[]
[]
auto_2025-06-06
async-graphql/async-graphql
1,491
async-graphql__async-graphql-1491
[ "1486" ]
759fb0e594606aecf4a239b00d6f3f8aeb22d885
diff --git a/src/validation/rules/default_values_of_correct_type.rs b/src/validation/rules/default_values_of_correct_type.rs --- a/src/validation/rules/default_values_of_correct_type.rs +++ b/src/validation/rules/default_values_of_correct_type.rs @@ -29,12 +29,7 @@ impl<'a> Visitor<'a> for DefaultValuesOfCorrectType { ...
diff --git a/src/validation/rules/default_values_of_correct_type.rs b/src/validation/rules/default_values_of_correct_type.rs --- a/src/validation/rules/default_values_of_correct_type.rs +++ b/src/validation/rules/default_values_of_correct_type.rs @@ -101,8 +96,8 @@ mod tests { } #[test] - fn no_required_...
Non nullable variables should allow default values ## Expected Behavior Queries should be able to define non-nullable variables with default variables. This is currently prevented by the check here: https://github.com/async-graphql/async-graphql/blob/759fb0e594606aecf4a239b00d6f3f8aeb22d885/src/validation/rules/de...
Here's a quick example of this working using the reference graphql-js implementation: https://stackblitz.com/edit/typescript-5qrssw?file=index.ts Could you be so kind to share a snippet of the source code, that raises the error above? Here's a simple reproduction: https://github.com/hayes/repro-async-graphql-non-null-v...
2024-03-13T23:43:22Z
7.0
2024-03-16T01:52:32Z
faa78d071cfae795dacc39fd46900fdfb6157d0d
[ "validation::rules::default_values_of_correct_type::tests::required_variables_with_default_values", "test_required_variable_with_default" ]
[ "dataloader::tests::test_dataloader_load_empty", "dataloader::tests::test_dataloader_disable_cache", "dataloader::tests::test_dataloader_disable_all_cache", "dataloader::tests::test_duplicate_keys", "dynamic::check::tests::test_recursive_input_objects_bad", "dynamic::check::tests::test_recursive_input_obj...
[]
[]
auto_2025-06-06
async-graphql/async-graphql
10
async-graphql__async-graphql-10
[ "9" ]
ba64ecc31d8c94b29b481a4c6a6573e397a1a132
diff --git /dev/null b/examples/error_extensions.rs new file mode 100644 --- /dev/null +++ b/examples/error_extensions.rs @@ -0,0 +1,108 @@ +use actix_rt; +use actix_web::{guard, web, App, HttpResponse, HttpServer}; +use async_graphql::http::{graphiql_source, playground_source, GQLRequest, GQLResponse}; +use async_grap...
diff --git a/src/http/mod.rs b/src/http/mod.rs --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -259,6 +270,30 @@ mod tests { ); } + #[test] + fn test_response_error_with_extension() { + let err = ExtendedError( + "MyErrorMessage".to_owned(), + json!({ + "...
Support Error Extensions Hey, first of all, I really enjoy using your library so far. I think it is already very comprehensive. One thing I am missing though is returning extensions for errors as described [here](https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md) in the spec. Some...
Thank you for your advice, that's a great idea, and I really need your help. These days I want to optimize the code in the subscription to make it easier to use, so our work doesn't conflict.If you have time, you can help implement `ErrorExtensions'.😁 Thanks again! I thought a little about it and started implementing...
2020-03-29T15:00:42Z
1.6
2020-03-30T06:36:27Z
ba64ecc31d8c94b29b481a4c6a6573e397a1a132
[ "http::tests::test_request", "http::tests::test_request_with_operation_name", "http::tests::test_response_data", "http::tests::test_request_with_variables", "http::tests::test_response_error", "scalars::tests::test_scalar_type", "types::list::tests::test_list_type", "http::tests::test_response_error_w...
[]
[]
[]
auto_2025-06-06
async-graphql/async-graphql
170
async-graphql__async-graphql-170
[ "169" ]
2e9557ff1c1482acce1337508b81ccdde09009a9
diff --git a/src/context.rs b/src/context.rs --- a/src/context.rs +++ b/src/context.rs @@ -424,6 +424,16 @@ impl<'a, T> ContextBase<'a, T> { } else if let Some(default) = &def.default_value { return Ok(default.clone_inner()); } + match def.var_type.deref() { + ...
diff --git a/tests/variables.rs b/tests/variables.rs --- a/tests/variables.rs +++ b/tests/variables.rs @@ -71,6 +71,69 @@ pub async fn test_variable_default_value() { ); } +#[async_std::test] +pub async fn test_variable_no_value() { + struct QueryRoot; + + #[Object] + impl QueryRoot { + pub asyn...
invalid: Variable "$var" is not defined When executing a query in async-graphql, I'm getting a "Variable ... is not defined" error when I don't think I should be. A query like ```graphql query TestQuery($var: Boolean) { test(var: $var) { id } } ``` with no variables ```json {} ``` ...
2020-06-11T15:33:20Z
1.15
2020-06-12T01:35:38Z
2e9557ff1c1482acce1337508b81ccdde09009a9
[ "test_variable_no_value" ]
[ "validation::rules::arguments_of_correct_type::tests::incorrect_item_type", "validation::rules::arguments_of_correct_type::tests::incorrect_value_and_missing_argument", "types::list::tests::test_list_type", "http::tests::test_request", "validation::rules::arguments_of_correct_type::tests::boolean_into_id", ...
[]
[]
auto_2025-06-06
dtolnay/async-trait
260
dtolnay__async-trait-260
[ "259" ]
62969d525fbd76abec15edf00289ced049b7fa0a
diff --git a/src/expand.rs b/src/expand.rs --- a/src/expand.rs +++ b/src/expand.rs @@ -125,6 +125,7 @@ pub fn expand(input: &mut Item, is_local: bool) { fn lint_suppress_with_body() -> Attribute { parse_quote! { #[allow( + unused_qualifications, clippy::async_yields_async, ...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -2,7 +2,7 @@ async_trait_nightly_testing, feature(impl_trait_in_assoc_type, min_specialization) )] -#![deny(rust_2021_compatibility)] +#![deny(rust_2021_compatibility, unused_qualifications)] #![allow( clippy::incompa...
Using async-trait with nightly-2024-03-04 triggers `unused-qualifications` lint Consider the following code: ```rust use async_trait::async_trait; // async-trait = "0.1.77" #[async_trait] pub trait Foo { async fn foo(&self); } pub struct Bar; #[async_trait] impl Foo for Bar { async fn foo(&se...
2024-03-16T23:27:55Z
0.1
2024-03-16T23:37:31Z
f8e5bb43181450a17068f160e8a51d410ede1705
[ "drop_order::test_drop_order", "issue57::test", "issue45::tracing", "issue199::test", "src/lib.rs - (line 15) - compile fail", "src/lib.rs - (line 178) - compile fail", "src/lib.rs - (line 199)", "src/lib.rs - (line 224)", "src/lib.rs - (line 141)", "src/lib.rs - (line 63)", "src/lib.rs - (line ...
[]
[]
[]
auto_2025-06-06
dtolnay/async-trait
239
dtolnay__async-trait-239
[ "238" ]
7937a8900b6546dc1c9b2e931647d3d21c854cd0
diff --git a/src/expand.rs b/src/expand.rs --- a/src/expand.rs +++ b/src/expand.rs @@ -80,13 +80,6 @@ pub fn expand(input: &mut Item, is_local: bool) { } } Item::Impl(input) => { - let mut lifetimes = CollectLifetimes::new("'impl"); - lifetimes.visit_type_mut(&mut *i...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -1585,3 +1585,22 @@ pub mod issue236 { } } } + +// https://github.com/dtolnay/async-trait/issues/238 +pub mod issue238 { + #![deny(single_use_lifetimes)] + + use async_trait::async_trait; + + #[async_trait] + ...
Weird interaction with `single_use_lifetimes` [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=a3f95d64d1d61fac41ec315a644ae353) ``` warning: lifetime parameter `'impl0` only used once --> src/lib.rs:7:19 | 7 | impl<T> Trait for &T {} | ^ | ...
2023-03-04T06:54:09Z
0.1
2023-03-04T06:56:03Z
f8e5bb43181450a17068f160e8a51d410ede1705
[ "drop_order::test_drop_order", "issue199::test", "issue45::tracing", "src/lib.rs - (line 15) - compile fail", "src/lib.rs - (line 165) - compile fail", "src/lib.rs - (line 286)", "src/lib.rs - (line 126)", "src/lib.rs - (line 265)", "src/lib.rs - (line 211)", "src/lib.rs - (line 186)", "src/lib....
[]
[]
[]
auto_2025-06-06
dtolnay/async-trait
235
dtolnay__async-trait-235
[ "234" ]
125917ffe0833c07e736e9b048951358d6ada8bb
diff --git a/src/expand.rs b/src/expand.rs --- a/src/expand.rs +++ b/src/expand.rs @@ -403,7 +403,10 @@ fn transform_block(context: Context, sig: &mut Signature, block: &mut Block) { } else { quote! { #(#attrs)* - let ...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -2,6 +2,7 @@ async_trait_nightly_testing, feature(min_specialization, type_alias_impl_trait) )] +#![deny(rust_2021_compatibility)] #![allow( clippy::let_unit_value, clippy::missing_panics_doc, diff --git a/tests/...
Nested `_` and `..` patterns under 2018 edition can trigger rust_2021_compatibility warning The code generated by async-trait should never exhibit edition sensitive behavior differences. The fact that async-trait involves the use of move closures internally is an implementation detail. If the behavior is sensitive to e...
2023-01-22T21:52:47Z
0.1
2023-01-22T21:54:15Z
f8e5bb43181450a17068f160e8a51d410ede1705
[ "drop_order::test_drop_order", "issue199::test", "issue45::tracing", "src/lib.rs - (line 15) - compile fail", "src/lib.rs - (line 165) - compile fail", "src/lib.rs - (line 286)", "src/lib.rs - (line 47)", "src/lib.rs - (line 126)", "src/lib.rs - (line 186)", "src/lib.rs - (line 211)", "src/lib.r...
[]
[]
[]
auto_2025-06-06
dtolnay/async-trait
233
dtolnay__async-trait-233
[ "232" ]
d71c74de7b445060462c40f223f10cbe270c5250
diff --git a/src/expand.rs b/src/expand.rs --- a/src/expand.rs +++ b/src/expand.rs @@ -297,10 +297,16 @@ fn transform_sig( }) => {} FnArg::Receiver(arg) => arg.mutability = None, FnArg::Typed(arg) => { - if let Pat::Ident(ident) = &mut *arg.pat { - ...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -1489,3 +1489,37 @@ pub mod issue226 { } } } + +// https://github.com/dtolnay/async-trait/issues/232 +pub mod issue232 { + use async_trait::async_trait; + + #[async_trait] + pub trait Generic<T> { + asyn...
Do not require Sync on unused shared reference arguments ```rust use async_trait::async_trait; #[async_trait] trait Generic<T> { async fn takes_ref(&self, thing: &T); } #[async_trait] impl<T> Generic<T> for () { async fn takes_ref(&self, _: &T) {} } ``` This currently fails because it expands t...
2023-01-22T21:22:12Z
0.1
2023-01-22T21:25:44Z
f8e5bb43181450a17068f160e8a51d410ede1705
[ "issue199::test", "drop_order::test_drop_order", "issue45::tracing", "src/lib.rs - (line 165) - compile fail", "src/lib.rs - (line 15) - compile fail", "src/lib.rs - (line 186)", "src/lib.rs - (line 47)", "src/lib.rs - (line 211)", "src/lib.rs - (line 286)", "src/lib.rs - (line 265)", "src/lib.r...
[]
[]
[]
auto_2025-06-06
dtolnay/async-trait
107
dtolnay__async-trait-107
[ "106" ]
7c746b6ee601c51c557c9f4c32230f5c9a9934be
diff --git a/src/expand.rs b/src/expand.rs --- a/src/expand.rs +++ b/src/expand.rs @@ -81,6 +81,13 @@ pub fn expand(input: &mut Item, is_local: bool) { } } Item::Impl(input) => { + let mut lifetimes = CollectLifetimes::with("'impl_life"); + lifetimes.visit_type_mut(&...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -905,3 +905,35 @@ mod issue104 { impl_t1!(Foo, 1); } + +// https://github.com/dtolnay/async-trait/issues/106 +mod issue106 { + use async_trait::async_trait; + use std::future::Future; + + #[async_trait] + pub trait...
Translation of lifetimes in Fn trait input parameters I think this is a fairly niche and easy to work around case but it's a surprising footgun that might be worth a fix? ```rust use async_trait::async_trait; use core::future::Future; #[async_trait] pub trait ProcessPool: Send + Sync { type ThreadPool; ...
EDIT: Sorry, this comment is incorrect. I was trying to convert an irrelevant lifetime to `'static`. EDIT2: See https://github.com/dtolnay/async-trait/issues/106#issuecomment-640927871 > This can be resolved by translating instead to `<&'static P as ProcessPool>::ThreadPool`. I don't know if this breaks other use c...
2020-06-09T01:15:55Z
0.1
2020-06-09T01:33:55Z
f8e5bb43181450a17068f160e8a51d410ede1705
[ "issue45::tracing", "src/lib.rs - (line 15)", "src/lib.rs - (line 165)", "src/lib.rs - (line 126)", "src/lib.rs - (line 286)", "src/lib.rs - (line 265)", "src/lib.rs - (line 186)", "src/lib.rs - (line 211)", "src/lib.rs - (line 47)" ]
[]
[]
[]
auto_2025-06-06
dtolnay/async-trait
105
dtolnay__async-trait-105
[ "104" ]
5220bbd2bdf30fa43c78d08a8e9a9f311a239cf8
diff --git a/src/expand.rs b/src/expand.rs --- a/src/expand.rs +++ b/src/expand.rs @@ -258,7 +258,7 @@ fn transform_block( let inner = format_ident!("__{}", sig.ident); let args = sig.inputs.iter().enumerate().map(|(i, arg)| match arg { - FnArg::Receiver(_) => quote!(self), + FnArg::Receiver(R...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -556,10 +556,10 @@ pub mod issue45 { pub mod issue46 { use async_trait::async_trait; - macro_rules! implement_commands { + macro_rules! implement_commands_workaround { ($tyargs:tt : $ty:tt) => { #[a...
Problem with declarative macros Hello there. I have problem with declarative macros. The code is simplified as below: ```Rust use async_trait::async_trait; #[async_trait] trait T1 { async fn id(&self) -> i32; } macro_rules! impl_t1 { ($ty: ty, $id: expr) => { #[async_trait] impl ...
This is a compiler bug (https://github.com/rust-lang/rust/issues/43081). You can work around it by writing the decl macro as: ```rust macro_rules! impl_t1 { ($ty:tt, $($id:tt)*) => { #[async_trait] impl T1 for $ty { async fn id(&self) -> i32 { $($id)* ...
2020-06-08T03:01:30Z
0.1
2020-06-08T23:44:42Z
f8e5bb43181450a17068f160e8a51d410ede1705
[ "issue45::tracing", "src/lib.rs - (line 15)", "src/lib.rs - (line 165)", "src/lib.rs - (line 126)", "src/lib.rs - (line 286)", "src/lib.rs - (line 186)", "src/lib.rs - (line 211)", "src/lib.rs - (line 265)", "src/lib.rs - (line 47)" ]
[]
[]
[]
auto_2025-06-06
dtolnay/async-trait
100
dtolnay__async-trait-100
[ "92" ]
bee997398ff951b505f251b237dd08eeddd8e9c7
diff --git a/src/receiver.rs b/src/receiver.rs --- a/src/receiver.rs +++ b/src/receiver.rs @@ -1,4 +1,5 @@ use proc_macro2::{Group, TokenStream, TokenTree}; +use quote::quote; use std::iter::FromIterator; use std::mem; use syn::punctuated::Punctuated; diff --git a/src/receiver.rs b/src/receiver.rs --- a/src/receive...
diff --git a/tests/test.rs b/tests/test.rs --- a/tests/test.rs +++ b/tests/test.rs @@ -785,3 +785,85 @@ pub mod issue89 { async fn f(&self) {} } } + +// https://github.com/dtolnay/async-trait/issues/92 +pub mod issue92 { + use async_trait::async_trait; + + macro_rules! mac { + ($($tt:tt)*) =...
Self keyword inside macro invocations in trait impl Issue #73 only revealed part of the problem, and only part of it was fixed. Since Merge Request #74 `Self` inside macro invocation works when used in the trait declaration, but the issue persists in the trait impl. See this example: ```rust use async_trait::asy...
I ran into the same bug, it's still present in 0.1.31 and the workaround still works.
2020-05-25T12:31:51Z
0.1
2020-06-01T05:15:59Z
f8e5bb43181450a17068f160e8a51d410ede1705
[ "issue45::tracing", "src/lib.rs - (line 15)", "src/lib.rs - (line 165)", "src/lib.rs - (line 126)", "src/lib.rs - (line 186)", "src/lib.rs - (line 211)", "src/lib.rs - (line 286)", "src/lib.rs - (line 265)", "src/lib.rs - (line 47)" ]
[]
[]
[]
auto_2025-06-06