repo stringclasses 47
values | pull_number int64 2 17k | instance_id stringlengths 14 36 | issue_numbers listlengths 1 3 | base_commit stringlengths 40 40 | patch stringlengths 274 1.45M | test_patch stringlengths 254 594k | problem_statement stringlengths 34 44.3k | hints_text stringlengths 0 66.2k | created_at stringdate 2017-03-29 16:32:14 2024-12-29 18:55:13 | version stringclasses 76
values | updated_at stringdate 2017-04-05 19:13:00 2025-03-25 20:07:17 | environment_setup_commit stringlengths 40 40 | FAIL_TO_PASS listlengths 1 1.57k | PASS_TO_PASS listlengths 0 1.78k | FAIL_TO_FAIL listlengths 0 83 | PASS_TO_FAIL listlengths 0 3 | source_dir stringclasses 13
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | 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 |
fschutt/azul | 2 | fschutt__azul-2 | [
"1"
] | af100e8cbddaeb26cf97cb9910518aaf6bd2ed3a | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Felix Schütt <felix.schuett@maps4print.com>"]
[dependencies]
-webrender = { git = "https://github.com/servo/webrender", rev = "9c9b97a5950899cdc57837e9237e9c020f1aee83" }
+webrender = { git = "https:... | diff --git a/examples/test_content.css b/examples/test_content.css
--- a/examples/test_content.css
+++ b/examples/test_content.css
@@ -3,7 +3,8 @@
color: #000000;
border: 1px solid #b7b7b7;
border-radius: 4px;
- box-shadow: 0px 0px 3px #c5c5c5ad;
+ /*box-shadow: 0px 0px 3px #c5c5c5ad;*/
+ box-sh... | "debug" example crashes
I am not sure if it is expected on the current state of the project development, but I figured it would rather give some feedback:
```
$ env RUST_BACKTRACE=1 cargo run --example debug
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/examples/debug... | 2018-03-20T08:12:26Z | 0.1 | 2018-03-20T08:28:37Z | 56d6c2bac9b752264871afab1119a34365aceacb | [
"css_parser::test_parse_box_shadow_1",
"css_parser::test_parse_box_shadow_10",
"css_parser::test_parse_box_shadow_2",
"css_parser::test_parse_box_shadow_5",
"css_parser::test_parse_box_shadow_4",
"css_parser::test_parse_box_shadow_3",
"css_parser::test_parse_box_shadow_6",
"css_parser::test_parse_box_... | [] | [] | [] | auto_2025-06-07 | |
imsnif/bandwhich | 23 | imsnif__bandwhich-23 | [
"16"
] | 408ec397c81bb99d6727f01d5dc058e814012714 | diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ Windows is not supported at the moment - if you'd like to contribute a windows p
### Usage
```
USAGE:
- what [FLAGS] --interface <interface>
+ what [FLAGS] [OPTIONS]
FLAGS:
-h, --help Prints help information
d... | diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -46,14 +46,14 @@ Note that since `what` sniffs network packets, it requires root privileges - so
### raw_mode
`what` also supports an easier-to-parse mode that can be piped or redirected to a file. For example, try:
```
-what -i eth0 --raw | grep ... | Listen on all interfaces
`what` now listens on the interface given by the `-i` flag. The default behaviour should probably be "listen on all interfaces", with the -i flag being an optional override.
Things that are needed to do this:
1. The OS layer (eg. `os/linux.rs`) needs to be adjusted.
2. The `OsInputOutput` ... | 2019-12-10T22:07:27Z | 0.4 | 2019-12-22T09:53:02Z | 408ec397c81bb99d6727f01d5dc058e814012714 | [
"tests::cases::ui::basic_startup",
"tests::cases::ui::layout_under_120_width_under_30_height",
"tests::cases::ui::layout_under_150_width_under_30_height",
"tests::cases::ui::layout_full_width_under_30_height",
"tests::cases::ui::layout_under_120_width_full_height",
"tests::cases::raw_mode::multiple_packet... | [] | [] | [] | auto_2025-06-07 | |
imsnif/bandwhich | 328 | imsnif__bandwhich-328 | [
"145",
"213"
] | cf9b9f063420b153225d4e2ff49e22a2f97dbddf | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -41,6 +41,7 @@ thiserror = "1.0.50"
tokio = { version = "1.33", features = ["rt", "sync"] }
trust-dns-resolver = "0.23.2"
unicode-width = "0.1.11"
+strum = { version = "0.25.0", features = ["derive"] }
[target.'cfg(target_os = "linux")'.dep... | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -187,6 +187,7 @@ dependencies = [
"resolv-conf",
"rstest",
"simplelog",
+ "strum",
"sysinfo",
"thiserror",
"tokio",
diff --git a/src/display/components/display_bandwidth.rs b/src/display/components/display_bandwidth.rs
--- a/src/displ... | Units
Hello,
First of all thank you for this great utility.
Is there any possibility to switch units to bps (bits per second) since bitrate is usually expressed this way?
Thanks,
Feature - bandwidth in Mbit/s
Please add FLAGS
-b, Bandwidth in Mbit/s
| Hey - glad you like it.
Well, this was modeled after the bandwidth measurement I've seen in other places (eg. when you download in firefox, you see "1.5 MB/s"). Do you have an example where the rate is represented in bits?
Well, this is heavily used in video streaming. It makes sense if you are comparing measured ag... | 2023-11-01T07:47:13Z | 0.21 | 2024-04-15T07:09:23Z | cf9b9f063420b153225d4e2ff49e22a2f97dbddf | [
"tests::cases::ui::basic_only_connections",
"tests::cases::ui::basic_only_addresses",
"tests::cases::ui::basic_startup",
"tests::cases::ui::two_windows_split_vertically",
"tests::cases::ui::two_windows_split_horizontally",
"tests::cases::ui::layout::case_3",
"tests::cases::raw_mode::one_ip_packet_of_tra... | [] | [] | [] | auto_2025-06-07 |
imsnif/bandwhich | 12 | imsnif__bandwhich-12 | [
"6"
] | c5d683078d0bb8727d26db6ce5e5563580d7f9d3 | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -34,6 +34,16 @@ name = "arc-swap"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
+[[package]]
+name = "async-trait"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dep... | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1374,9 +1819,14 @@ dependencies = [
"checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc"
"checksum log 0.3.9 (registry+https://github.com/rust-la... | Faster DNS resolution
Right now we use just 1 background thread to resolve IPs into their hostnames with reverse dns. We could benefit from using a thread pool and doing this much quicker.
| 2019-11-20T21:03:55Z | 0.3 | 2019-12-07T18:48:24Z | c5d683078d0bb8727d26db6ce5e5563580d7f9d3 | [
"tests::cases::ui::basic_startup",
"tests::cases::ui::layout_under_120_width_under_30_height",
"tests::cases::ui::layout_under_150_width_under_30_height",
"tests::cases::ui::layout_full_width_under_30_height",
"tests::cases::ui::layout_under_120_width_full_height",
"tests::cases::raw_mode::multiple_proces... | [] | [] | [] | auto_2025-06-07 | |
imsnif/bandwhich | 118 | imsnif__bandwhich-118 | [
"100"
] | e6bb39a5e992498e00bc3af47d92352865e3223d | diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,4 @@ debian/*
!debian/control
!debian/copyright
!debian/rules
-!debian/source
+!debian/source
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,9 @@ The format is ba... | diff --git a/src/tests/cases/snapshots/ui__basic_only_addresses.snap b/src/tests/cases/snapshots/ui__basic_only_addresses.snap
--- a/src/tests/cases/snapshots/ui__basic_only_addresses.snap
+++ b/src/tests/cases/snapshots/ui__basic_only_addresses.snap
@@ -51,5 +51,5 @@ expression: "&terminal_draw_events_mirror[0]"
│ ... | Option to change the default 'window' when terminal is small
Is it possible to implement an option for default 'window' to display when the terminal size is small?
I'd love to be able to get 'Utilization by connection' as default information, for example, instead of 'Utilization by process name'.
And even more, an ... | I'd be open to adding `--connections`, `--remote-ips` and `--processes` flags.
These would have to be mutually exclusive, and picking one of them would only display that window regardless of terminal size.
If anyone wants to pick this up and is unsure how to proceed, give me a ping here or privately.
Hello @imsni... | 2020-01-14T23:51:55Z | 0.14 | 2020-05-17T20:40:05Z | e6bb39a5e992498e00bc3af47d92352865e3223d | [
"tests::cases::ui::basic_processes_with_dns_queries",
"tests::cases::ui::basic_startup",
"tests::cases::ui::basic_only_connections",
"tests::cases::ui::basic_only_processes",
"tests::cases::ui::basic_only_addresses",
"tests::cases::ui::two_windows_split_vertically",
"tests::cases::ui::layout_under_120_w... | [
"tests::cases::raw_mode::bi_directional_traffic",
"tests::cases::raw_mode::multiple_connections_from_remote_address",
"tests::cases::raw_mode::multiple_packets_of_traffic_from_different_connections",
"tests::cases::raw_mode::one_process_with_multiple_connections",
"tests::cases::raw_mode::one_ip_packet_of_t... | [] | [] | auto_2025-06-07 |
imsnif/bandwhich | 379 | imsnif__bandwhich-379 | [
"159"
] | 23d187986ef2e835f144395b54cf05954aa99128 | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## Added
* CI: include generated assets in release archive #359 - @cyqsimon
+* Add PID column to the process table #379 - @notjedi
## Ch... | diff --git a/src/os/lsof_utils.rs b/src/os/lsof_utils.rs
--- a/src/os/lsof_utils.rs
+++ b/src/os/lsof_utils.rs
@@ -259,6 +261,6 @@ com.apple 590 etoledom 204u IPv4 0x28ffb9c04111253f 0t0 TCP 192.168.1.
}
fn test_raw_connection_parse_process_name(raw_line: &str) {
let connection = RawConnect... | Add PID column to processes table
It would be useful to be able to toggle/flag into a process-level mode to group by pid and display more process-level information like the full command line.
- For the "Utilization by process name" window, we could group by pid rather than process name so that it's easier to find sp... | Hey @llchan, thanks for the suggestion. I must admit I'm a little weary of adding stuff like this. I feel these sorts of features are something that could be implemented "on top" of bandwhich. Either requiring it as a library or using raw_mode.
If you're looking for something to work on, I'd be happy to suggest some... | 2024-03-15T04:06:26Z | 0.22 | 2024-03-18T05:29:48Z | d9fa0894a34374394ea21f9d2aa9c26574d1506a | [
"display::components::display_bandwidth::tests::bandwidth_formatting",
"tests::cases::ui::basic_startup",
"tests::cases::ui::basic_only_addresses",
"tests::cases::ui::basic_only_processes",
"tests::cases::raw_mode::multiple_processes_with_multiple_connections",
"tests::cases::ui::layout::case_3",
"tests... | [] | [] | [] | 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:**
)
```
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 | 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 |
cswinter/LocustDB | 138 | cswinter__LocustDB-138 | [
"101"
] | 3a180e58446d263dee73023275946ebdd6b16081 | diff --git a/src/engine/execution/query_task.rs b/src/engine/execution/query_task.rs
--- a/src/engine/execution/query_task.rs
+++ b/src/engine/execution/query_task.rs
@@ -80,15 +80,21 @@ impl QueryTask {
sender: SharedSender<QueryResult>) -> Result<QueryTask, QueryError> {
let start_time_ns = p... | diff --git a/src/syntax/parser.rs b/src/syntax/parser.rs
--- a/src/syntax/parser.rs
+++ b/src/syntax/parser.rs
@@ -341,13 +360,20 @@ mod tests {
fn test_select_star() {
assert_eq!(
format!("{:?}", parse_query("select * from default")),
- "Ok(Query { select: [ColName(\"*\")], table:... | Query planner chooses names for anonymous result columns that might be identical to existing ones
It should ensure that all output column names are unique.
| Can I pick this up? Also interested to know about your future plans related to this project.
Please do! I think it just needs some changes to this function: https://github.com/cswinter/LocustDB/blob/e3e53fa6ecd7a6c53337bd017c600fa2e6c18ff1/src/engine/planning/query.rs#L347
There's also a related issue https://github.c... | 2021-01-21T10:44:16Z | 0.1 | 2021-01-22T15:56:34Z | 3a180e58446d263dee73023275946ebdd6b16081 | [
"syntax::parser::tests::test_select_star",
"syntax::parser::tests::test_alias",
"syntax::parser::tests::test_to_year",
"test_colnames"
] | [
"engine::operators::top_n::tests::test_heap_replace",
"engine::operators::subpartition::tests::test_multipass_grouping",
"ingest::alias_method_fork::test_new_alias_table",
"mem_store::codec::tests::test_ensure_property",
"unit_fmt::tests::test_format",
"ingest::schema::tests::test_parse_schema",
"lt_fil... | [
"test_group_by_nullable"
] | [] | auto_2025-05-30 |
artichoke/artichoke | 2,449 | artichoke__artichoke-2449 | [
"2361",
"2361"
] | 73f8bd2f4c30bd7057b7f471b8928d6312440d06 | diff --git a/artichoke-backend/src/extn/core/string/mruby.rs b/artichoke-backend/src/extn/core/string/mruby.rs
--- a/artichoke-backend/src/extn/core/string/mruby.rs
+++ b/artichoke-backend/src/extn/core/string/mruby.rs
@@ -23,6 +23,7 @@ pub fn init(interp: &mut Artichoke) -> InitializeResult<()> {
.add_method(... | diff --git a/spinoso-string/src/lib.rs b/spinoso-string/src/lib.rs
--- a/spinoso-string/src/lib.rs
+++ b/spinoso-string/src/lib.rs
@@ -2117,4 +2221,56 @@ mod tests {
assert_eq!(utf8, binary);
assert_eq!(binary, ascii);
}
+
+ #[test]
+ fn byteindex_supports_needle_and_haystack_of_different_e... | Add `byteindex` and `byterindex` methods to `spinoso-string`
The existing `spinoso_string::String::index` and `spinoso_string::String::rindex` methods return byte indexes, but should operate on characters.
Expose new methods `spinoso_string::String::byteindex` and `spinoso_string::String::byterindex` which preserve ... | 2023-03-21T14:49:35Z | 0.21 | 2023-04-11T03:32:01Z | 73f8bd2f4c30bd7057b7f471b8928d6312440d06 | [
"enc::ascii::inspect::tests::del",
"enc::ascii::inspect::tests::emoji",
"enc::ascii::inspect::tests::ascii_control",
"enc::ascii::inspect::tests::empty",
"enc::ascii::inspect::tests::escape_inner_slash",
"enc::ascii::inspect::tests::escape_slash",
"enc::ascii::inspect::tests::fred",
"enc::ascii::inspe... | [] | [] | [] | auto_2025-06-03 | |
artichoke/artichoke | 2,416 | artichoke__artichoke-2416 | [
"2194"
] | 2246959a46f627a455a1dc5ca0fff0d5c5f795e9 | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -748,7 +748,7 @@ dependencies = [
[[package]]
name = "spinoso-time"
-version = "0.7.0"
+version = "0.7.1"
dependencies = [
"once_cell",
"regex",
diff --git a/artichoke-backend/Cargo.toml b/artichoke-backend/Cargo.toml
--- a/artichoke-bac... | diff --git a/spinoso-time/src/time/tzrs/math.rs b/spinoso-time/src/time/tzrs/math.rs
--- a/spinoso-time/src/time/tzrs/math.rs
+++ b/spinoso-time/src/time/tzrs/math.rs
@@ -304,6 +304,15 @@ mod tests {
}
}
+ #[test]
+ fn add_out_of_fixnum_range_float_sec() {
+ let dt = datetime();
+ dt... | `Time::checked_add_f64` and `Time::checked_sub_f64` panic on too large input
```rust
use core::time::Duration;
fn main() {
dbg!(Duration::from_secs_f64(f64::MAX));
}
```
Output:
```
Compiling playground v0.0.1 (/playground)
Finished dev [unoptimized + debuginfo] target(s) in 0.58s
Running `... | I've put up a stabilization PR for this feature in Rust `std` here: https://github.com/rust-lang/rust/pull/102271.
These functions were stabilized and released today in Rust 1.66.0:
- https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.try_from_secs_f32
- https://blog.rust-lang.org/2022/12/15/Rust... | 2023-02-19T19:20:14Z | 4.1 | 2023-02-19T19:33:19Z | 2246959a46f627a455a1dc5ca0fff0d5c5f795e9 | [
"time::tzrs::math::tests::add_out_of_fixnum_range_float_sec",
"time::tzrs::math::tests::sub_out_of_fixnum_range_float_sec"
] | [
"time::tzrs::math::tests::add_int_to_time",
"time::tzrs::math::tests::add_float_to_time",
"time::tzrs::math::tests::add_subsec_float_to_time",
"time::tzrs::math::tests::rounding",
"time::tzrs::math::tests::rounding_rollup",
"time::tzrs::math::tests::sub_float_to_time",
"time::tzrs::math::tests::sub_int_... | [] | [] | auto_2025-06-03 |
artichoke/artichoke | 2,073 | artichoke__artichoke-2073 | [
"2072"
] | b3284a42fb0d175da1a822bda73bd300ddab72c3 | diff --git a/spinoso-time/src/time/tzrs/parts.rs b/spinoso-time/src/time/tzrs/parts.rs
--- a/spinoso-time/src/time/tzrs/parts.rs
+++ b/spinoso-time/src/time/tzrs/parts.rs
@@ -316,7 +316,7 @@ impl Time {
self.inner.local_time_type().is_dst()
}
- /// Returns an integer representing the day of the week,... | diff --git a/spinoso-time/src/time/tzrs/parts.rs b/spinoso-time/src/time/tzrs/parts.rs
--- a/spinoso-time/src/time/tzrs/parts.rs
+++ b/spinoso-time/src/time/tzrs/parts.rs
@@ -550,4 +550,29 @@ mod tests {
assert_eq!("UTC", dt.time_zone());
assert!(dt.is_utc());
}
+
+ #[test]
+ fn yday() {
+ ... | The doc of `spinoso_time::tzrs::Time::day_of_year()` is inconsistent with its implementation
The doc of `spinoso_time::tzrs::Time::day_of_year()` is inconsistent with its implementation:
https://github.com/artichoke/artichoke/blob/b3284a42fb0d175da1a822bda73bd300ddab72c3/spinoso-time/src/time/tzrs/parts.rs#L511-L533.
... | 2022-08-11T15:52:40Z | 1.62 | 2022-08-11T16:20:21Z | b3284a42fb0d175da1a822bda73bd300ddab72c3 | [
"time::tzrs::parts::tests::yday"
] | [
"time::chrono::build::tests::time_at_with_max_i64_overflow",
"time::chrono::build::tests::time_at_with_min_i64_overflow",
"time::chrono::build::tests::time_at_with_negative_sub_second_nanos",
"time::chrono::build::tests::time_at_with_overflowing_negative_sub_second_nanos",
"time::chrono::build::tests::time_... | [] | [] | auto_2025-06-03 | |
artichoke/artichoke | 1,047 | artichoke__artichoke-1047 | [
"1046"
] | 7b867a30a442cde8c3ab8fd0b585432f93f7fa1a | diff --git a/spinoso-string/src/lib.rs b/spinoso-string/src/lib.rs
--- a/spinoso-string/src/lib.rs
+++ b/spinoso-string/src/lib.rs
@@ -32,7 +32,6 @@ extern crate std;
use alloc::boxed::Box;
use alloc::vec::{self, Vec};
-use core::char::REPLACEMENT_CHARACTER;
use core::cmp::Ordering;
use core::convert::TryFrom;
u... | diff --git a/spinoso-string/src/lib.rs b/spinoso-string/src/lib.rs
--- a/spinoso-string/src/lib.rs
+++ b/spinoso-string/src/lib.rs
@@ -1804,6 +1800,7 @@ fn conventionally_utf8_bytestring_len<T: AsRef<[u8]>>(bytes: T) -> usize {
#[cfg(test)]
#[allow(clippy::clippy::shadow_unrelated)]
mod tests {
+ use alloc::strin... | String::make_capitalized removes invalid UTF-8 byte sequences and the Unicode replacement character from conventionally UTF-8 strings
Introduced in #1045.
Two branches in the `String::make_capitalized` implementation cause both invalid UTF-8 byte sequences and the Unicode replacement character to be stripped from th... | 2021-01-14T16:08:28Z | 0.4 | 2021-01-14T18:05:35Z | a3ec3b702a9ee559a85eb5f47ef6a707d547cd4b | [
"tests::make_capitalized_utf8_string_invalid_utf8",
"tests::make_capitalized_utf8_string_unicode_replacement_character"
] | [
"tests::make_capitalized_binary_string_ascii",
"tests::fuzz_char_len_utf8_contents_binary_string",
"tests::fuzz_bytesize_binary_contents_utf8_string",
"tests::fuzz_bytesize_utf8_contents_utf8_string",
"tests::fuzz_char_len_binary_contents_utf8_string",
"tests::fuzz_len_binary_contents_ascii_string",
"te... | [] | [] | auto_2025-06-03 | |
asciinema/asciinema | 601 | asciinema__asciinema-601 | [
"598"
] | 477bc8c0f48d9c22cc90f0b630c96d2ee110f17f | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -89,14 +89,12 @@ dependencies = [
"anyhow",
"clap",
"config",
- "mio",
"nix",
"reqwest",
"rustyline",
"serde",
"serde_json",
"signal-hook",
- "signal-hook-mio",
"termion",
"uuid",
]
diff --git a/Cargo.lock b/Cargo.lock
--- ... | diff --git a/src/pty.rs b/src/pty.rs
--- a/src/pty.rs
+++ b/src/pty.rs
@@ -310,6 +289,49 @@ fn write_all<W: Write>(sink: &mut W, data: &mut Vec<u8>) -> io::Result<usize> {
Ok(left)
}
+struct SignalFd {
+ sigid: SigId,
+ rx: i32,
+}
+
+impl SignalFd {
+ fn open(signal: libc::c_int) -> Result<Self> {
+ ... | Recording crashes on macOS - Invalid argument (os error 22)
```sh
$ target/release/asciinema rec demo.cast
Error: Invalid argument (os error 22)
```
Seems to be related to https://github.com/tokio-rs/mio/issues/1377
| More on the problem: https://nathancraddock.com/blog/macos-dev-tty-polling/
The `select`+thread trick described here is something to consider: https://code.saghul.net/2016/05/libuv-internals-the-osx-select2-trick/ | 2024-01-06T15:31:14Z | 1.0 | 2024-01-12T13:19:53Z | 6dbc5219e56e34c1e347b2264ed315d33a6a1dc0 | [
"format::asciicast::tests::accelerate",
"format::asciicast::tests::limit_idle_time",
"format::asciicast::tests::write_header",
"format::asciicast::tests::open",
"format::asciicast::tests::writer",
"pty::tests::exec"
] | [] | [] | [] | auto_2025-06-03 |
ash-rs/ash | 216 | ash-rs__ash-216 | [
"204"
] | 19771a8200ea9f2aad8039644ee1b16e8522a034 | diff --git a/ash/Cargo.toml b/ash/Cargo.toml
--- a/ash/Cargo.toml
+++ b/ash/Cargo.toml
@@ -8,6 +8,7 @@ repository = "https://github.com/MaikKlein/ash"
readme = "../README.md"
keywords = ["vulkan", "graphic"]
documentation = "https://docs.rs/ash"
+edition = "2018"
[dependencies]
shared_library = "0.1.9"
diff --gi... | diff --git a/ash/tests/constant_size_arrays.rs b/ash/tests/constant_size_arrays.rs
--- a/ash/tests/constant_size_arrays.rs
+++ b/ash/tests/constant_size_arrays.rs
@@ -1,4 +1,4 @@
-extern crate ash;
+use ash;
use ash::vk::{PhysicalDeviceProperties, PipelineColorBlendStateCreateInfo};
diff --git a/ash/tests/display.... | Migrate to edition 2018
We should probably migrate to 2018 and clean up old patterns. `rustfix` should fix most of the issues, but the generator would require a few manual changes.
| 2019-05-25T19:41:11Z | 0.29 | 2019-05-26T21:28:09Z | 19771a8200ea9f2aad8039644ee1b16e8522a034 | [
"assert_ffi_array_param_is_pointer",
"assert_struct_field_is_array",
"debug_enum",
"debug_flags"
] | [] | [] | [] | auto_2025-06-03 | |
rinja-rs/askama | 673 | rinja-rs__askama-673 | [
"671"
] | 358f7cd07dc42ba4189d2661461ff0b43a27c304 | diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -246,7 +246,7 @@ struct Generator<'a, S: std::hash::BuildHasher> {
next_ws: Option<&'a str>,
// Whitespace suppression from the previous non-literal. Will b... | diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs
--- a/askama_shared/src/lib.rs
+++ b/askama_shared/src/lib.rs
@@ -701,5 +705,14 @@ mod tests {
)
.unwrap();
assert_eq!(config.whitespace, WhitespaceHandling::Preserve);
+
+ let config = Config::new(
+ r#"
+ ... | Trim all but 1 whitespace jinja condition
@vallentin suggested [here](https://github.com/djc/askama/pull/664#pullrequestreview-945253861) that we could extend the "trim_all_whitespace" feature to be able to trim all whitespace characters but one.
So currently, we have:
```jinja
<div> {%- if foo -%} blabla {%-... | I'm on board with all that, including the proposed operator.
Ok, then I'll make a PR soon. :)
I like that! For readability I'd like it best if a run of whitespaces becomes a single '\n' if it contains an '\n', or a space otherwise.
I'm fine with implementing it this way. Anyone else has an opinion maybe?
Yeah, I think ... | 2022-04-21T14:51:49Z | 0.11 | 2022-04-26T08:31:21Z | 7b6f1df433a7f11612608644342b898cd6be8ff5 | [
"filters::json::tests::test_json",
"filters::tests::test_abs",
"filters::tests::test_center",
"filters::tests::test_capitalize",
"filters::tests::test_filesizeformat",
"filters::tests::test_indent",
"filters::tests::test_into_f64",
"filters::tests::test_into_isize",
"filters::tests::test_join",
"f... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 652 | rinja-rs__askama-652 | [
"651"
] | b14982f97ffd20039286171d56e6fcfab21f56bc | diff --git a/askama_shared/src/filters/mod.rs b/askama_shared/src/filters/mod.rs
--- a/askama_shared/src/filters/mod.rs
+++ b/askama_shared/src/filters/mod.rs
@@ -330,20 +330,14 @@ where
/// Capitalize a value. The first character will be uppercase, all others lowercase.
pub fn capitalize<T: fmt::Display>(s: T) -> ... | diff --git a/askama_shared/src/filters/mod.rs b/askama_shared/src/filters/mod.rs
--- a/askama_shared/src/filters/mod.rs
+++ b/askama_shared/src/filters/mod.rs
@@ -655,6 +649,9 @@ mod tests {
assert_eq!(capitalize(&"").unwrap(), "".to_string());
assert_eq!(capitalize(&"FoO").unwrap(), "Foo".to_string()... | Capitalize does not work with non ascii chars
Capitalize filter only works with ascii chars not chars like å, ä and ö.
| This custom filter does what i expected capitalize to do.
```rust
mod filters {
pub fn cap(s: &str) -> ::askama::Result<String> {
match s.chars().next() {
Some(c) => {
if c.is_lowercase() {
let mut replacement: String = c.to_uppercase().collect();
... | 2022-03-26T15:32:24Z | 0.11 | 2022-03-26T17:50:42Z | 7b6f1df433a7f11612608644342b898cd6be8ff5 | [
"filters::tests::test_capitalize"
] | [
"filters::tests::test_abs",
"filters::tests::test_center",
"filters::tests::test_filesizeformat",
"filters::json::tests::test_json",
"filters::tests::test_indent",
"filters::tests::test_into_f64",
"filters::tests::test_into_isize",
"filters::tests::test_join",
"filters::tests::test_linebreaks",
"f... | [
"filters::yaml::tests::test_yaml"
] | [] | auto_2025-06-03 |
rinja-rs/askama | 359 | rinja-rs__askama-359 | [
"357"
] | 17b9d06814cee84bfd57b73e1941b63187ec5f65 | diff --git a/askama_shared/src/filters/mod.rs b/askama_shared/src/filters/mod.rs
--- a/askama_shared/src/filters/mod.rs
+++ b/askama_shared/src/filters/mod.rs
@@ -249,7 +249,7 @@ pub fn indent(s: &dyn fmt::Display, width: &usize) -> Result<String> {
#[cfg(feature = "num-traits")]
/// Casts number to f64
-pub fn int... | diff --git a/askama_shared/src/filters/mod.rs b/askama_shared/src/filters/mod.rs
--- a/askama_shared/src/filters/mod.rs
+++ b/askama_shared/src/filters/mod.rs
@@ -460,22 +460,22 @@ mod tests {
#[test]
#[allow(clippy::float_cmp)]
fn test_into_f64() {
- assert_eq!(into_f64(1).unwrap(), 1.0 as f64);
... | into_f64, into_isize unusable
`{{ number | into_f64 }}` expands to `into_f64(&number)`, which doesn't compile, because borrowed number doesn't `impl NumCast`.
| Thanks for the report. Would you mind submitting a patch that adds the appropriate `*` operators?
Maybe it's better to have info_f64 take `&T`?
That's fine, too! Whatever works in the context of Askama filters. | 2020-09-16T01:05:50Z | 0.10 | 2020-09-16T09:49:22Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"filters::tests::test_abs",
"filters::tests::test_filesizeformat",
"filters::tests::test_center",
"filters::tests::test_capitalize",
"filters::json::tests::test_json",
"filters::tests::test_into_f64",
"filters::tests::test_indent",
"filters::tests::test_into_isize",
"filters::tests::test_lower",
"... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 304 | rinja-rs__askama-304 | [
"285",
"196"
] | cff49453a851029f87b35512f5234a999fea3e6c | diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -909,7 +909,9 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
Expr::StrLit(s) => self.visit_str_lit(buf, s),
Expr::CharLit(s) => s... | diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs
--- a/askama_shared/src/parser.rs
+++ b/askama_shared/src/parser.rs
@@ -1078,6 +1098,34 @@ mod tests {
super::parse("{{ strvar|e }}", &Syntax::default());
}
+ #[test]
+ fn test_parse_var_call() {
+ assert_eq!(
+ ... | Call methods on root context
Is there a syntax for calling methods implemented directly on the 'context'? A bare `function()` doesn't appear to do the trick
Static method call
Can I use static method in the template?
| I think you can call `self.function()`? Documentation patches welcome. 😊
Can you give a concrete example? Presumably you have tried it?
I tried like so:
`{% let a = crate::a() %}
`
Did you get an error? What was the error? Did you look at the generated code?
The print attribute is "all", but it shows only `message: ... | 2020-03-15T11:07:43Z | 0.9 | 2020-03-18T21:33:57Z | cff49453a851029f87b35512f5234a999fea3e6c | [
"filters::tests::test_capitalize",
"filters::tests::test_center",
"filters::tests::test_filesizeformat",
"filters::json::tests::test_json",
"filters::tests::test_indent",
"filters::tests::test_linebreaks",
"filters::tests::test_linebreaksbr",
"filters::tests::test_join",
"filters::tests::test_lower"... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 861 | rinja-rs__askama-861 | [
"860"
] | 43e92aa3b6b9cd967a70bd0fd54d1f087d6ed76b | diff --git a/askama_parser/src/expr.rs b/askama_parser/src/expr.rs
--- a/askama_parser/src/expr.rs
+++ b/askama_parser/src/expr.rs
@@ -248,15 +248,15 @@ impl<'a> Suffix<'a> {
}
fn r#macro(i: &'a str) -> IResult<&'a str, Self> {
- fn nested_parenthesis(i: &str) -> IResult<&str, ()> {
+ fn neste... | diff --git a/askama_parser/src/tests.rs b/askama_parser/src/tests.rs
--- a/askama_parser/src/tests.rs
+++ b/askama_parser/src/tests.rs
@@ -788,3 +788,10 @@ fn test_parse_array() {
)],
);
}
+
+#[test]
+fn fuzzed_unicode_slice() {
+ let d = "{eeuuu{b&{!!&{!!11{{
+ 0!(!1q҄א!)!!!!!!n!";
+ as... | Fuzzing askama_parser results in panic
Hi, fuzzing `askama_parser` resulted in panic at following line.
https://github.com/djc/askama/blob/43e92aa3b6b9cd967a70bd0fd54d1f087d6ed76b/askama_parser/src/expr.rs#L290
I suppose it happens because crash input contains Cyrillic letters which are multi-byte and we need exact b... | 2023-09-11T09:42:00Z | 0.12 | 2023-09-11T10:19:21Z | 4dab5f91ba15e7c238ddf6223ec7b45eef32cab4 | [
"tests::fuzzed_unicode_slice"
] | [
"tests::change_delimiters_parse_filter",
"tests::test_missing_space_after_kw",
"tests::test_invalid_block - should panic",
"tests::test_parse_comments",
"tests::test_associativity",
"tests::test_parse_const",
"tests::test_parse_numbers",
"tests::test_odd_calls",
"tests::test_parse_root_path",
"tes... | [] | [] | auto_2025-06-03 | |
rinja-rs/askama | 837 | rinja-rs__askama-837 | [
"836"
] | 9de9af4a006021a63f705e420be4cdef3eb6af82 | diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -1373,7 +1373,7 @@ impl<'a> Generator<'a> {
}
Expr::Group(ref inner) => self.visit_group(buf, inner)?,
Expr::Call(ref obj, ref ... | diff --git a/askama_derive/src/parser/tests.rs b/askama_derive/src/parser/tests.rs
--- a/askama_derive/src/parser/tests.rs
+++ b/askama_derive/src/parser/tests.rs
@@ -221,6 +221,51 @@ fn test_parse_root_path() {
);
}
+#[test]
+fn test_rust_macro() {
+ let syntax = Syntax::default();
+ assert_eq!(
+ ... | Parse error when using macro with expanded module path
I am making a crate that allows people to embed icons from Iconify at compile time, but I ran into a little snag.
Tried on main and 0.12. Only happens when using a macro, normal functions work fine.
The intended usage is:
```jsx
<body>
<h1>Hello</h1>
... | Huh, I guess there's some subtlety in the parser relating to the combination of a path, the macro call and the filter. Care to submit a PR?
Sure, I'll take a jab at it.
Macro invocations are parsed specially, but they should actually be simply suffix expressions, and be handled like normal function calls:
https://gi... | 2023-07-05T21:49:42Z | 0.12 | 2023-07-24T09:39:14Z | 4dab5f91ba15e7c238ddf6223ec7b45eef32cab4 | [
"config::tests::find_absolute",
"config::tests::find_relative",
"config::tests::add_syntax",
"config::tests::escape_modes",
"config::tests::add_syntax_two",
"config::tests::find_relative_sub",
"config::tests::get_source",
"config::tests::find_relative_nonexistent - should panic",
"config::tests::ill... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 965 | rinja-rs__askama-965 | [
"962",
"961"
] | 4dab5f91ba15e7c238ddf6223ec7b45eef32cab4 | diff --git a/askama/Cargo.toml b/askama/Cargo.toml
--- a/askama/Cargo.toml
+++ b/askama/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "askama"
-version = "0.12.1"
+version = "0.13.0"
description = "Type-safe, compiled Jinja-like templates for Rust"
documentation = "https://docs.rs/askama"
keywords = ["markup", "temp... | diff --git a/askama_derive/src/config.rs b/askama_derive/src/config.rs
--- a/askama_derive/src/config.rs
+++ b/askama_derive/src/config.rs
@@ -299,9 +299,9 @@ pub(crate) fn get_template_source(tpl_path: &Path) -> std::result::Result<String
static CONFIG_FILE_NAME: &str = "askama.toml";
static DEFAULT_SYNTAX_NAME: &st... | Remove the need to import askama itself when using integration crates
While wording on https://github.com/djc/askama/issues/961, I wandered off to find the cause for the need as the title goes. A rough scan reveals that askama_derive generates some uses of `::askama::`, for example, this:
https://github.com/djc/aska... | Well, I wouldn't want to do this in a way that requires adding another intermediate allocation, but perhaps a newtype with a `Display` implementation could do the job. I'd be open to reviewing such a PR.
How about checking for existence of `::askama::`, and if so, splitting the `&str` into head, prefix and tail, then 1... | 2024-02-13T14:31:39Z | 0.12 | 2024-03-05T10:34:46Z | 4dab5f91ba15e7c238ddf6223ec7b45eef32cab4 | [
"config::tests::find_absolute",
"config::tests::find_relative",
"config::tests::find_relative_sub",
"config::tests::add_syntax",
"config::tests::add_syntax_two",
"config::tests::get_source",
"config::tests::find_relative_nonexistent - should panic",
"config::tests::test_config_whitespace_error",
"co... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 951 | rinja-rs__askama-951 | [
"924"
] | 29b25505b496510217a39606a5f72884867ef492 | diff --git a/askama_parser/src/lib.rs b/askama_parser/src/lib.rs
--- a/askama_parser/src/lib.rs
+++ b/askama_parser/src/lib.rs
@@ -349,9 +349,9 @@ fn path_or_identifier(i: &str) -> ParseResult<'_, PathOrIdentifier<'_>> {
let rest = rest.as_deref().unwrap_or_default();
// The returned identifier can be assum... | diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -484,3 +484,23 @@ fn test_num_literals() {
"[90, -90, 90, 2, 56, 240, 10.5, 10.5, 100000000000, 105000000000]",
);
}
+
+#[allow(non_snake_case)]
+#[derive(askama::Template)]
+#[te... | 0.12.1 only allow lower-case variable name in template
I don't know if I asked a stupid question, but I spend one day to find it ! my rust version is 1.74.0, I run it on my win11 and WSL ubuntu 22.04, see the same error below
```rust
use askama::Template;
#[derive(Template)]
#[template(path = "hello.html")]
str... | I'm new to axum, I have learn the docs https://djc.github.io/askama/askama.html, but it seems not have the request of lower case
I suggest you get the macro expansion via Rust Analyzer or via the [debugging](https://djc.github.io/askama/debugging.html) features. I guess the code generator applies some heuristics that t... | 2024-01-18T09:50:05Z | 0.12 | 2024-01-18T10:23:22Z | 4dab5f91ba15e7c238ddf6223ec7b45eef32cab4 | [
"test_attr",
"test_comment",
"test_composition",
"test_constants",
"test_define_string_var",
"test_else",
"test_else_if",
"test_empty",
"test_escape",
"test_func_ref_call",
"test_generics",
"test_if",
"test_literals",
"test_index",
"test_literals_escape",
"test_minus",
"test_negation... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 943 | rinja-rs__askama-943 | [
"330"
] | 84c2094e871b7ef16ab51c77b4a3568794c75638 | diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -1210,6 +1210,20 @@ impl<'a> Generator<'a> {
Ok(DisplayWrap::Wrapped)
}
+ fn _visit_as_ref_filter(
+ &mut self,
+ buf: &mut Buffer,
+... | diff --git a/testing/tests/filters.rs b/testing/tests/filters.rs
--- a/testing/tests/filters.rs
+++ b/testing/tests/filters.rs
@@ -309,3 +309,17 @@ fn test_json_script() {
r#"<script>var user = "\u003c/script\u003e\u003cbutton\u003eHacked!\u003c/button\u003e"</script>"#
);
}
+
+#[derive(askama::Template)... | Add support for reference operator (i.e. `{% let x = &y %}`)
Sometimes while working with deeply nested structures, it would be useful to create an alias to a field, like say `{% let h = &parent.child.hash %}`
At the moment the `&` unary operator is not supported.
| Not supporting this has been a design goal from the start. If I remember correctly, your example should already work without `&`.
> If I remember correctly, your example should already work without `&`.
Unfortunately it doesn't (`hash` here is an owned `HashMap`, and all other structures are owned by `self`):
~~~~
... | 2024-01-10T14:11:35Z | 0.12 | 2024-01-12T10:10:23Z | 4dab5f91ba15e7c238ddf6223ec7b45eef32cab4 | [
"filter_escape",
"filter_format",
"filter_fmt",
"filter_opt_escaper_html",
"filter_opt_escaper_none",
"into_numbers_fmt",
"test_filter_let_filter",
"test_filter_truncate",
"test_join",
"test_json",
"test_json_attribute",
"test_json_attribute2",
"test_json_script",
"test_my_filter",
"test... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 911 | rinja-rs__askama-911 | [
"904"
] | 6cbfde04514a90d4e24350c21ef490c40666d820 | diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -1575,6 +1575,16 @@ impl<'a> Generator<'a> {
}
buf.write(name);
}
+ Target::OrChain(targets) => match target... | diff --git /dev/null b/testing/templates/match-enum-or.html
new file mode 100644
--- /dev/null
+++ b/testing/templates/match-enum-or.html
@@ -0,0 +1,8 @@
+The card is
+{%- match suit %}
+ {%- when Suit::Clubs or Suit::Spades -%}
+ {{ " black" }}
+ {%- when Suit::Diamonds or Suit::Hearts -%}
+ {{ " red" }}
+... | Feature request: enhance match to include multiple targets
This has previously been discussed at https://github.com/djc/askama/issues/711#issuecomment-1794340598 but I would like to move it to its own issue as it can be implemented separately.
The request is to enhance Askana's syntax for the `match` block (see http... | I'm happy to review a PR for this as proposed. | 2023-11-19T18:50:18Z | 0.12 | 2023-11-22T13:56:14Z | 4dab5f91ba15e7c238ddf6223ec7b45eef32cab4 | [
"test_match_custom_enum",
"test_match_literal_char",
"test_match_literal",
"test_match_literal_num",
"test_match_no_whitespace",
"test_match_option",
"test_match_option_bool",
"test_match_option_result_option",
"test_match_ref_deref",
"test_match_without_with_keyword",
"test_match_with_comment"
... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 910 | rinja-rs__askama-910 | [
"885"
] | 80238d7f48fd86ef939e74df9fdc9678ee78a208 | diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -727,7 +727,50 @@ impl<'a> Generator<'a> {
args.len()
)));
}
- for (expr, arg) in std::iter::zip(args, &def.args) {
+ ... | diff --git a/testing/tests/macro.rs b/testing/tests/macro.rs
--- a/testing/tests/macro.rs
+++ b/testing/tests/macro.rs
@@ -95,3 +95,31 @@ fn test_macro_self_arg() {
let t = MacroSelfArgTemplate { s: "foo" };
assert_eq!(t.render().unwrap(), "foo");
}
+
+#[derive(Template)]
+#[template(
+ source = "{%- macr... | Allow to have named arguments in macro
It'd pretty nice to be able to have named arguments. For example:
```
{% macro menu_link(href, text, target) %}
...
{% endmacro menu_link %}
```
Then to be able to call it like this:
```
{% menu_link(href="/something", text="link", target="_blank") %}
```
It make... | I worry that this would be a little foreign to users -- that is, I'm not sure it passes the design test of "it should be obvious how this gets compiled to Rust code".
Does it really matter? If this is a big enough concern, we can add a new entry in the askama book explaining how it is generated.
It matters to me -- I t... | 2023-11-17T13:50:00Z | 0.12 | 2023-11-28T10:54:25Z | 4dab5f91ba15e7c238ddf6223ec7b45eef32cab4 | [
"test_one_func",
"test_one_func_binop",
"test_one_func_self",
"test_one_func_index",
"test_coerce",
"test_path_ext_html",
"test_path_ext_html_and_ext_txt",
"test_path_ext_html_jinja",
"test_path_ext_html_jinja_and_ext_txt",
"test_path_ext_jinja",
"test_path_ext_jinja_and_ext_txt",
"filter_esca... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 401 | rinja-rs__askama-401 | [
"333",
"221",
"107"
] | 5057b75e7752f2186157fb3e1f5e5d2d0c5ff880 | diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -667,8 +667,26 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
", _loop_item) in ::askama::helpers::TemplateLoop::new({}) {{",
... | diff --git a/testing/tests/loops.rs b/testing/tests/loops.rs
--- a/testing/tests/loops.rs
+++ b/testing/tests/loops.rs
@@ -67,3 +67,39 @@ fn test_for_range() {
"foo (first)\nfoo (last)\nbar\nbar\nfoo\nbar\nbar\n"
);
}
+
+#[derive(Template)]
+#[template(source = "{% for i in [1, 2, 3] %}{{ i }}{% endfor %... | for-loop on values of a BTreeMap inside a template does not compile
Hi Askama team,
I'm hitting the an issue with for-loops inside template on `(some BTreeMap).values()`.
## Preliminary: what DOES work
Consider first the following piece of code, which works, demonstrating that the `values()` function of `BTreeMa... | Allocating a `Vec` just to appease `djc/askama` seems unfortunate. I wonder whether adding something like the `&`-syntax could improve things:
```
{% for &foo in map.values() %}
```
I encountered the same issue trying to iterate over a `BTreeMap` using `.rev()`:
```jinja
{% for (date, day_videos) in videos.video... | 2020-12-15T06:21:33Z | 0.10 | 2021-02-18T12:18:18Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"test_for",
"test_for_range",
"test_precedence_for",
"test_nested_for"
] | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 399 | rinja-rs__askama-399 | [
"397",
"397"
] | 5b01e605914a49f0b9e71e7dbe7c17ef1de2c522 | diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -444,8 +444,8 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
Node::Cond(ref conds, ws) => {
self.write_cond(ctx, buf,... | diff --git a/testing/tests/gen_ws_tests.py b/testing/tests/gen_ws_tests.py
--- a/testing/tests/gen_ws_tests.py
+++ b/testing/tests/gen_ws_tests.py
@@ -4,12 +4,23 @@
from itertools import product, chain, zip_longest, tee
+# The amount of branches to generate
+BRANCHES = 2 # branches
+
IF, ELSE_IF, ELSE, END_IF = 0... | Unwanted whitespace in match arm
For a Template struct containing a field `ver: Option<&'a str>` and the following template:
```jinja2
{% let suffix -%}
{% match ver -%}
{% when Some with (ver) -%}
{% let suffix = format!("-{}", ver) -%}
{% when None -%}
{% let suffix = String::new() -%}
{% endmat... | I'm wondering where the whitespace between the `match` and the first `when` should go. Whether it should go into the first match arm or before the match expression (thus "into" all match arms). The whitespace before `endmatch` is self-explanatory.
In short:
```jinja
{% match ... %}[this whitespace]{% when ... %}... | 2020-12-12T16:51:50Z | 0.10 | 2020-12-13T22:08:20Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"test_match_custom_enum",
"test_match_literal_char",
"test_match_literal",
"test_match_literal_num",
"test_match_option",
"test_match_ref_deref",
"test_extra_whitespace",
"test_match_ws"
] | [
"test_match_no_whitespace",
"test_cond_ws"
] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 394 | rinja-rs__askama-394 | [
"377",
"378"
] | 810d5ad5067085cc5e4be19903b5804b1ff13430 | diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -505,8 +505,9 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
let mut has_else = false;
for (i, &(cws, ref cond, ref nodes)) in conds.iter... | diff --git /dev/null b/testing/tests/gen_ws_tests.py
new file mode 100644
--- /dev/null
+++ b/testing/tests/gen_ws_tests.py
@@ -0,0 +1,112 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from itertools import product, chain, zip_longest, tee
+
+
+IF, ELSE_IF, ELSE, END_IF = 0, 1, 2, 3
+
+NL = "\\n"
+dash = lambda... | Whitespace issue with if conditions
Askama seems to be including whitespace from inside an if condition even when the condition is not fulfilled. Here is my template file:
```jinja
{%- if some_condition -%}
# WARNING
{% endif -%}
# FILE START
```
What I expected is:
- When `some_condition` is `true`:
... | It sure sounds like a bug! Let me look at some code.
So the code generation for if statements is here:
https://github.com/djc/askama/blob/main/askama_shared/src/generator.rs#L502
I don't immediately see anything obviously wrong. Maybe you can contribute a test case and/or use the debugging facility (add `print = ... | 2020-12-03T18:13:39Z | 0.10 | 2020-12-03T21:14:33Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"test_cond_ws"
] | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 393 | rinja-rs__askama-393 | [
"331",
"331"
] | a199defeca2dfc6aa3e972acca82c96db07f99e9 | diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs
--- a/askama_shared/src/parser.rs
+++ b/askama_shared/src/parser.rs
@@ -1,7 +1,7 @@
use nom::branch::alt;
use nom::bytes::complete::{escaped, is_not, tag, take_until};
use nom::character::complete::{anychar, char, digit1};
-use nom::combinator::{... | diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs
--- a/askama_shared/src/parser.rs
+++ b/askama_shared/src/parser.rs
@@ -1136,6 +1138,25 @@ mod tests {
);
}
+ #[test]
+ fn test_parse_root_path() {
+ let syntax = Syntax::default();
+ assert_eq!(
+ supe... | Allow paths to start with `::`
[Discovered while working on #315 and #327.]
At the moment `{{ std::string::String::new()}}` works but `{{ ::std::string::String::new() }}` doesn't.
Allow paths to start with `::`
[Discovered while working on #315 and #327.]
At the moment `{{ std::string::String::new()}}` works bu... | Alright, that should be fixed.
Alright, that should be fixed. | 2020-12-02T18:03:44Z | 0.10 | 2020-12-02T19:48:44Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"parser::tests::test_parse_root_path",
"test_attr",
"test_composition",
"test_comment",
"test_define_string_var",
"test_else",
"test_else_if",
"test_empty",
"test_escape",
"test_func_ref_call",
"test_generics",
"test_if",
"test_literals_escape",
"test_index",
"test_literals",
"test_nes... | [
"filters::tests::test_abs",
"filters::json::tests::test_json",
"filters::tests::test_capitalize",
"filters::tests::test_center",
"filters::tests::test_filesizeformat",
"filters::tests::test_into_f64",
"filters::tests::test_into_isize",
"filters::tests::test_indent",
"filters::tests::test_join",
"f... | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 391 | rinja-rs__askama-391 | [
"381"
] | f4065b09b91f5d00efa5644915cdd83bfb7d393a | diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs
--- a/askama_shared/src/parser.rs
+++ b/askama_shared/src/parser.rs
@@ -573,36 +573,32 @@ fn expr_rust_macro(i: &[u8]) -> IResult<&[u8], Expr> {
macro_rules! expr_prec_layer {
( $name:ident, $inner:ident, $op:expr ) => {
fn $name(i: &... | diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs
--- a/askama_shared/src/parser.rs
+++ b/askama_shared/src/parser.rs
@@ -1078,12 +1074,13 @@ pub fn parse<'a>(src: &'a str, syntax: &'a Syntax<'a>) -> Result<Vec<Node<'a>>,
#[cfg(test)]
mod tests {
+ use super::{Expr, Node, WS};
use crate... | The operator parser gets precedences wrong
Consider the expression `a + b == c`. If we changed the code generated from `{lhs} {op} {rhs}` to include parentheses around the entire thing, we get `(a + (b == c))`, which is incorrect, because _(i)_ the `+` and `==` operators combined are not associative (and I think that's... | So precedence is handled here:
https://github.com/djc/askama/blob/main/askama_shared/src/parser.rs#L610
I forgot how I wrote this code in the first place, but I'm guessing the associativity aspect is not handled correctly. | 2020-12-01T08:40:04Z | 0.10 | 2020-12-01T09:04:25Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"parser::tests::test_associativity",
"parser::tests::test_precedence"
] | [
"filters::tests::test_abs",
"filters::tests::test_capitalize",
"filters::tests::test_center",
"filters::json::tests::test_json",
"filters::tests::test_filesizeformat",
"filters::tests::test_into_f64",
"filters::tests::test_into_isize",
"filters::tests::test_indent",
"filters::tests::test_linebreaks"... | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 374 | rinja-rs__askama-374 | [
"368"
] | ac7d9e8031b4df489a0d58dc3459bc931f1ff870 | diff --git a/askama_derive/Cargo.toml b/askama_derive/Cargo.toml
--- a/askama_derive/Cargo.toml
+++ b/askama_derive/Cargo.toml
@@ -25,5 +25,4 @@ warp = []
[dependencies]
askama_shared = { version = "0.10.4", path = "../askama_shared", default-features = false }
proc-macro2 = "1"
-quote = "1"
syn = "1"
diff --git a/... | diff --git a/testing/Cargo.toml b/testing/Cargo.toml
--- a/testing/Cargo.toml
+++ b/testing/Cargo.toml
@@ -15,6 +15,7 @@ serde_json = { version = "1.0", optional = true }
[dev-dependencies]
criterion = "0.3"
+trybuild = "1.0"
[[bench]]
name = "all"
diff --git /dev/null b/testing/tests/ui.rs
new file mode 100644... | Consider using `compile_error!` instead of panicking
I just tried out askama for the first time and my IDE (using rust-analyzer) reported that my code failed to compile because `proc-macro derive panicked`. This error message is not very helpful as I had to go to the command line and ask cargo what the real problem was... | The simple approach using what syn provides is not enough because many of the potential panics originate from the template parser, which doesn't process Rust code as such. Still, it would surely be nice to use something better than `panic!()`, it just hasn't been much of a priority for me. In the same space, I've also ... | 2020-11-02T15:50:35Z | 0.10 | 2020-11-04T00:28:09Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"ui"
] | [
"filter_escape",
"filter_fmt",
"filter_format",
"into_numbers_fmt",
"test_filter_let_filter",
"test_filter_truncate",
"test_join",
"test_nested_filter_ref",
"test_my_filter",
"test_vec_join",
"main",
"test_include",
"test_deep",
"test_different_module",
"test_empty_child",
"test_let_bl... | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 500 | rinja-rs__askama-500 | [
"494"
] | 49252d2457f280026c020d0df46733578eb959a5 | diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -658,6 +658,12 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
", _loop_item) in ::askama::helpers::TemplateLoop::new(((&{}).into_iter())) ... | diff --git a/testing/tests/loops.rs b/testing/tests/loops.rs
--- a/testing/tests/loops.rs
+++ b/testing/tests/loops.rs
@@ -1,3 +1,5 @@
+use std::ops::Range;
+
use askama::Template;
#[derive(Template)]
diff --git a/testing/tests/loops.rs b/testing/tests/loops.rs
--- a/testing/tests/loops.rs
+++ b/testing/tests/loops... | move occurs because `item1.list2` has type `Vec<Box<dyn MyTrait + Send>>`, which does not implement the `Copy` trait
I got this error with `main` but not with `0.10.5`.
```
error[E0507]: cannot move out of `item1.list2` which is behind a shared reference
--> src/main.rs:3:10
|
3 | #[derive(Template)]
| ... | As a workaround, it should work if you change `item1.list2` to `item1.list2.iter()`. However, I'll look into why that fails, as right now I don't recall the reason why it _would_ fail.
@vallentin would be great if you can look into this, thanks!
@djc I will. I've just been a bit busy the past week and this week, but ... | 2021-06-23T16:29:30Z | 0.10 | 2021-06-23T19:41:31Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"test_for",
"test_for_array",
"test_for_method_call",
"test_for_index",
"test_for_range",
"test_for_path_call",
"test_for_zip_ranges",
"test_nested_for",
"test_precedence_for"
] | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 499 | rinja-rs__askama-499 | [
"498"
] | b318d7cbcded2c6dfc66bbe19687f1246a9a9eab | diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -717,6 +717,7 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
let mut names = Buffer::new(0);
let mut values = Buffer::new(0);
+ ... | diff --git /dev/null b/testing/templates/nested-macro-args.html
new file mode 100644
--- /dev/null
+++ b/testing/templates/nested-macro-args.html
@@ -0,0 +1,9 @@
+{%- macro outer(first) -%}
+{%- call inner(first, "second") -%}
+{%- endmacro -%}
+
+{%- macro inner(first, second) -%}
+{{ first }} {{ second }}
+{%- endmac... | Error "proc-macro derive produced unparseable tokens" with nested macro call
I was working on updating [UniFFI](https://github.com/mozilla/uniffi-rs/) to the latest `main` branch of Askama, and ran into a case where the `#[derive(Template)]` seems to generate invalid code. Below is a reduced example:
```
use askama... | 2021-06-21T06:39:19Z | 0.10 | 2021-06-22T09:41:51Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"test_deep_import",
"test_nested",
"test_macro",
"test_import",
"test_short_circuit"
] | [] | [] | [] | auto_2025-06-03 | |
rinja-rs/askama | 486 | rinja-rs__askama-486 | [
"245"
] | 92df4d1fe49e8fde5ca13f13b8236102bc16b969 | diff --git a/askama_escape/src/lib.rs b/askama_escape/src/lib.rs
--- a/askama_escape/src/lib.rs
+++ b/askama_escape/src/lib.rs
@@ -129,7 +129,6 @@ impl Escaper for Html {
b'&' => escaping_body!(start, i, fmt, bytes, "&"),
b'"' => escaping_body!(start, i, fmt, bytes, ""... | diff --git a/testing/tests/filters.rs b/testing/tests/filters.rs
--- a/testing/tests/filters.rs
+++ b/testing/tests/filters.rs
@@ -21,7 +21,7 @@ fn filter_escape() {
};
assert_eq!(
s.render().unwrap(),
- "// my <html> is "unsafe" & \
+ "// my <html> i... | askama_escape Why escape slashes?
Sorry, I just don't seem to understand what harm slashes can do in html.
[Why does it escape slashes?](https://github.com/djc/askama/blob/467f4ade19fa34983de7e6f6d81c6b4d5ff140fe/askama_escape/src/lib.rs#L134)
| Because the OWASP recommends doing so.
https://security.stackexchange.com/questions/49852/why-should-xss-filters-escape-forward-slash
[OWASP Cross Site Scripting Prevention Cheat Sheet](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.md#rule-1---html-esc... | 2021-05-16T20:39:00Z | 0.10 | 2021-05-17T19:33:59Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"filter_escape"
] | [
"filter_format",
"filter_fmt",
"into_numbers_fmt",
"test_filter_let_filter",
"test_filter_truncate",
"test_join",
"test_my_filter",
"test_nested_filter_ref",
"test_vec_join",
"test_attr",
"test_comment",
"test_composition",
"test_constants",
"test_define_string_var",
"test_else",
"test... | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 458 | rinja-rs__askama-458 | [
"457",
"457"
] | 96a4328d642191e4925a8f822c9d2cf311f2f9ec | diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -156,10 +156,7 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
buf.writeln("}")?;
buf.writeln("fn extension(&self) -> Option<&'static st... | diff --git a/askama_shared/src/input.rs b/askama_shared/src/input.rs
--- a/askama_shared/src/input.rs
+++ b/askama_shared/src/input.rs
@@ -227,3 +242,51 @@ impl FromStr for Print {
})
}
}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test_ext() {
+ assert_eq!(extension(Pat... | Proper file extension for templates for plugin integration?
First of all, let me congratulate you for your work. I'm developing an application with Askama and Rocket, and I'm very happy with the results. However, I recently hit an interesting bump. This was using VS Code as my development environment:
- As the templ... | 2021-03-09T05:45:50Z | 0.10 | 2021-03-10T12:09:59Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"filters::tests::test_abs",
"filters::json::tests::test_json",
"filters::tests::test_capitalize",
"filters::tests::test_filesizeformat",
"filters::tests::test_center",
"filters::tests::test_indent",
"filters::tests::test_into_f64",
"filters::tests::test_into_isize",
"filters::tests::test_linebreaks"... | [] | [] | [] | auto_2025-06-03 | |
rinja-rs/askama | 433 | rinja-rs__askama-433 | [
"432",
"291"
] | 560d219c269bbf291a4f78e8ef3ffeb0d02ffdef | diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -1721,8 +1721,11 @@ impl MapChain<'_, &str, LocalMeta> {
}
fn resolve_or_self(&self, name: &str) -> String {
- self.resolve(name)
- .unw... | diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -72,6 +72,36 @@ fn test_variables_no_escape() {
);
}
+#[derive(Template)]
+#[template(
+ source = "{{ foo }} {{ foo_bar }} {{ FOO }} {{ FOO_BAR }} {{ self::FOO }} {{ self::FOO_BAR }} ... | Updated book to include urlencode and urlencode_strict
Forgot to include these in #429.
Question: passing a const, not as a field.
I'm trying to reference a constant in my template, since I reuse it all over the place (including across templates) and it'd be a pain to have to update it everywhere it needs to change. ... |
As a workaround, try referencing it through a path, for example, from the crate root?
Askama tries not to use its knowledge of the context fields, and instead keeps track of local variables, such that everything non-local is treated as a context field. Maybe this can be improved, although I think there were some bene... | 2021-01-11T18:51:24Z | 0.10 | 2021-01-13T07:58:54Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"test_attr",
"test_comment",
"test_composition",
"test_define_string_var",
"test_else",
"test_else_if",
"test_empty",
"test_escape",
"test_func_ref_call",
"test_generics",
"test_if",
"test_index",
"test_literals",
"test_minus",
"test_literals_escape",
"test_nested_attr",
"test_negati... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 426 | rinja-rs__askama-426 | [
"424",
"424"
] | c29ecd68714bddf5e27a9e347c902faa23b2a545 | diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs
--- a/askama_shared/src/parser.rs
+++ b/askama_shared/src/parser.rs
@@ -539,7 +539,7 @@ fn filter(i: &[u8]) -> IResult<&[u8], (&str, Option<Vec<Expr>>)> {
}
fn expr_filtered(i: &[u8]) -> IResult<&[u8], Expr> {
- let (i, (obj, filters)) = tupl... | diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs
--- a/askama_shared/src/parser.rs
+++ b/askama_shared/src/parser.rs
@@ -1126,7 +1126,41 @@ mod tests {
#[test]
fn test_parse_filter() {
- super::parse("{{ strvar|e }}", &Syntax::default()).unwrap();
+ use Expr::*;
+ ... | Filters have precedence over unary operators
Performing e.g. `{{ -2|abs }}` is parsed as `{{ -(2|abs) }}` resulting in `-2` being rendered.
Filters have precedence over unary operators
Performing e.g. `{{ -2|abs }}` is parsed as `{{ -(2|abs) }}` resulting in `-2` being rendered.
| Oops -- we should fix that!
Oops -- we should fix that! | 2021-01-05T14:44:35Z | 0.10 | 2021-01-05T15:15:20Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"parser::tests::test_parse_filter"
] | [
"filters::tests::test_abs",
"filters::tests::test_center",
"filters::json::tests::test_json",
"filters::tests::test_capitalize",
"filters::tests::test_filesizeformat",
"filters::tests::test_indent",
"filters::tests::test_into_isize",
"filters::tests::test_into_f64",
"filters::tests::test_lower",
"... | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 423 | rinja-rs__askama-423 | [
"404",
"404"
] | c29ecd68714bddf5e27a9e347c902faa23b2a545 | diff --git a/askama_shared/src/filters/json.rs b/askama_shared/src/filters/json.rs
--- a/askama_shared/src/filters/json.rs
+++ b/askama_shared/src/filters/json.rs
@@ -8,8 +8,8 @@ use serde::Serialize;
///
/// This will panic if `S`'s implementation of `Serialize` decides to fail,
/// or if `T` contains a map with no... | diff --git a/askama_shared/src/filters/json.rs b/askama_shared/src/filters/json.rs
--- a/askama_shared/src/filters/json.rs
+++ b/askama_shared/src/filters/json.rs
@@ -22,6 +22,8 @@ mod tests {
#[test]
fn test_json() {
+ assert_eq!(json(Html, true).unwrap().to_string(), "true");
+ assert_eq!(js... | Version 0.10 places Copy value literals behind a reference where 0.9 did not
I have a large collection of templates that compiles perfectly fine with version 0.9 of askama, but when I try to upgrade to 0.10, I get a bunch of type errors because a bunch of `Copy` types that were previously passed as values now get place... | Sorry for breaking your templates! Are these types being passed to macros, or to custom filters? Can you give an example?
We have some things in the works that will hopefully fix this.
Just off the top of my head, boolean literals, i.e. `true` and `false` are both passed to functions as `&true` and `&false`, and sim... | 2021-01-02T22:39:30Z | 0.10 | 2021-01-05T15:17:19Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"filters::tests::test_abs",
"filters::tests::test_center",
"filters::tests::test_capitalize",
"filters::json::tests::test_json",
"filters::tests::test_into_isize",
"filters::tests::test_into_f64",
"filters::tests::test_indent",
"filters::tests::test_filesizeformat",
"filters::tests::test_linebreaks"... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 411 | rinja-rs__askama-411 | [
"329",
"329"
] | c7697cbd406dce0962618e99a6b78116b14fdb1c | diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -876,16 +876,34 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
match *var {
Target::Name(name) => {
- if !self.local... | diff --git /dev/null b/testing/templates/let-shadow.html
new file mode 100644
--- /dev/null
+++ b/testing/templates/let-shadow.html
@@ -0,0 +1,22 @@
+{%- let a = 1 -%}
+{%- let b -%}
+
+{%- if cond -%}
+ {%- let b = 22 -%}
+ {{ b }}-
+
+ {%- let b = 33 -%}
+ {{ a }}-{{ b }}-
+{%- else -%}
+ {%- let b = 2... | Add support for redefining the same variable with `let` (just as Rust permits)
[Discovered while working on #315 and #327.]
The following statements, although allowed by Rust, are disallowed by `askama`:
~~~~
{% let x = 1 %}
{% let x = 2 %}
~~~~
The failure is:
~~~~
cannot assign twice to immutable variable... | I'm guessing this should be easy to fix.
Any news on this? It's very important when splitting template into small parts with ability to `include` them and setting some variables before include.
I haven't had a chance to work on it, and it's not much of a priority for me right now. I might be able to mentor you if you w... | 2020-12-23T14:44:36Z | 0.10 | 2020-12-25T21:42:49Z | 49252d2457f280026c020d0df46733578eb959a5 | [
"test_if_let",
"test_let",
"test_let_decl",
"test_self_iter",
"test_let_tuple"
] | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 1,097 | rinja-rs__askama-1097 | [
"1086"
] | 53b4b518f9a230665029560df038c318b2e55458 | diff --git a/askama_parser/src/expr.rs b/askama_parser/src/expr.rs
--- a/askama_parser/src/expr.rs
+++ b/askama_parser/src/expr.rs
@@ -270,7 +270,7 @@ impl<'a> Expr<'a> {
separated_list0(char(','), ws(move |i| Self::parse(i, level))),
Self::Array,
),
- ... | diff --git a/testing/tests/loops.rs b/testing/tests/loops.rs
--- a/testing/tests/loops.rs
+++ b/testing/tests/loops.rs
@@ -83,6 +83,16 @@ fn test_for_array() {
assert_eq!(t.render().unwrap(), "123");
}
+#[derive(Template)]
+#[template(source = "{% for i in [1, 2, 3, ] %}{{ i }}{% endfor %}", ext = "txt")]
+stru... | Allow Trailing Commas in Arrays Inside Template Expressions
Basically what the title says.
To give an example of what I mean, this here compiles just fine:
```html
<nav class="flex justify-between items-center max-w-7xl gap-x-12">
{% for (route, name) in [
("/about", "About"),
("/contact",... | Should be easy enough to implement, do you want to try submitting a PR? You'll want to start here:
https://github.com/djc/askama/blob/main/askama_parser/src/expr.rs#L263
Oh yeah sure! I'll see to it once I have the time. Doesn't look too complicated at first glance. | 2024-09-27T14:22:20Z | 0.13 | 2024-09-28T09:55:54Z | 53b4b518f9a230665029560df038c318b2e55458 | [
"test_for",
"test_for_array",
"test_for_cycle",
"test_for_cycle_dynamic",
"test_for_cycle_empty",
"test_for_destructoring_ref_tuple",
"test_for_enumerate",
"test_for_destructoring_tuple",
"test_for_in_if",
"test_for_index",
"test_for_method_call",
"test_for_path_call",
"test_for_range",
"t... | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 1,093 | rinja-rs__askama-1093 | [
"1063"
] | 668bd6f2c1f60dc25143360976a5c775901af889 | diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -822,6 +822,7 @@ impl<'a> Generator<'a> {
};
let locals = MapChain::with_parent(&self.locals);
let mut child = Self::new(self.input, self.c... | diff --git /dev/null b/testing/templates/fragment-include.html
new file mode 100644
--- /dev/null
+++ b/testing/templates/fragment-include.html
@@ -0,0 +1,9 @@
+{% extends "fragment-base.html" %}
+
+{% block body %}
+{% include "included.html" %}
+{% endblock %}
+
+{% block other_body %}
+<p>Don't render me.</p>
+{% en... | Include statement has no effect when used from a block fragment
When using a block fragment include statements don't seem to work.
See https://github.com/OscartGiles/askama/commit/74162b9453486a53a4de40bba905b4be31dcf3f0 for an example.
Is this intented behaviour or a bug?
| 2024-09-11T03:39:27Z | 0.13 | 2024-09-11T17:40:47Z | 53b4b518f9a230665029560df038c318b2e55458 | [
"test_fragment_include"
] | [
"test_fragment_nested_block",
"test_fragment_simple",
"test_fragment_nested_super",
"test_fragment_super",
"test_fragment_unused_expression",
"test_specific_block"
] | [] | [] | auto_2025-06-03 | |
rinja-rs/askama | 1,057 | rinja-rs__askama-1057 | [
"1056"
] | 627d58bc3b93c484f190d0711a4f9a9e26bc062c | diff --git a/askama_parser/src/node.rs b/askama_parser/src/node.rs
--- a/askama_parser/src/node.rs
+++ b/askama_parser/src/node.rs
@@ -369,24 +369,20 @@ pub struct Cond<'a> {
impl<'a> Cond<'a> {
fn parse(i: &'a str, s: &State<'_>) -> ParseResult<'a, Self> {
- let mut p = tuple((
+ let (i, (_, pws,... | diff --git /dev/null b/testing/tests/if.rs
new file mode 100644
--- /dev/null
+++ b/testing/tests/if.rs
@@ -0,0 +1,26 @@
+use askama::Template;
+
+#[derive(Template)]
+#[template(
+ source = r#"{%- if s == "" -%}
+empty
+{%- else if s == "b" -%}
+b
+{%- elif s == "c" -%}
+c
+{%- else -%}
+else
+{%- endif -%}"#,
+ ... | Add `elif` keyword
Hi,
we recently migrated from Tera to Askama and overall it was quite straightforward. One thing that did not work out of the box was the `elif` keyword, so it would be nice to include that. In addition, `elif` seems to be [supported by jinja](https://jinja.palletsprojects.com/en/3.1.x/templates/... | I guess I'm open to having that added as an alias for `else if`. Would you be able to submit a PR?
The code is here: https://github.com/djc/askama/blob/main/askama_parser/src/node.rs#L375.
Ah cool. :D | 2024-05-23T10:19:41Z | 0.13 | 2024-05-23T12:28:00Z | 53b4b518f9a230665029560df038c318b2e55458 | [
"test_if_let",
"test_if_let_else",
"test_if_let_shadowing",
"test_if_let_struct",
"test_if_let_struct_ref"
] | [] | [] | [] | auto_2025-06-03 |
rinja-rs/askama | 1,029 | rinja-rs__askama-1029 | [
"1022"
] | 03690ab46bbb9cc10f688ebfe003986f9cf4999c | diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -705,7 +705,7 @@ impl<'a> Generator<'a> {
break;
}
}
- let current_buf = mem::take(&mut self.buf_writable);
+ let... | diff --git /dev/null b/testing/templates/blocks.txt
new file mode 100644
--- /dev/null
+++ b/testing/templates/blocks.txt
@@ -0,0 +1,11 @@
+{% block index %}
+Section: {{ s1 }}
+{% endblock %}
+
+{% block section -%}
+ [
+ {%- for value in values -%}
+ {{ value }}
+ {%- endfor -%}
+ ]
+{%- endblock %}
diff --gi... | Compilation error when using nested template blocks with in a single template file
Hello! I Encountered a compilation error when using[ block fragments](https://github.com/djc/askama/pull/824) with Vec<&str> in a single template file. The error does not occur when the template is split into separate files.
This is w... | I had the same issue, investigating what's going on. | 2024-05-02T15:40:27Z | 0.13 | 2024-05-16T12:07:05Z | 53b4b518f9a230665029560df038c318b2e55458 | [
"test_fragment_nested_block",
"test_fragment_simple",
"test_fragment_nested_super",
"test_fragment_super",
"test_fragment_unused_expression"
] | [
"test_deep",
"test_different_module",
"test_empty_child",
"test_flat_deep",
"test_let_block",
"test_named_end",
"test_nested_blocks",
"test_use_base_directly",
"test_simple_extends",
"test_attr",
"test_comment",
"test_constants",
"test_composition",
"test_else",
"test_define_string_var",... | [] | [] | auto_2025-06-03 |
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 | 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 |
cargo-generate/cargo-generate | 785 | cargo-generate__cargo-generate-785 | [
"784"
] | 15b2143c1c5520cdd378c762769eacf55d2853e4 | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -171,23 +171,21 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clap"
-version = "3.2.23"
+version = "4.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "... | diff --git a/src/args.rs b/src/args.rs
--- a/src/args.rs
+++ b/src/args.rs
@@ -42,8 +42,8 @@ pub struct GenerateArgs {
"bin",
"define",
"init",
- "template-values-file",
- "ssh-identity",
+ "template_values_file",
+ "ssh_identity",
... | chore(deps): bump clap from 3.2.23 to 4.0.19
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.23 to 4.0.19.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/clap-rs/clap/releases">clap's releases</a>.</em></p>
<blockquote>
<h2>v4.0.19</h2>
<h2>[4.0.19] - 2022-11-04</h2>
<... | 2022-11-07T12:22:15Z | 0.16 | 2022-11-07T15:33:38Z | 15b2143c1c5520cdd378c762769eacf55d2853e4 | [
"basics::error_message_for_invalid_repo_or_user"
] | [
"config::tests::config_try_from_errors_on_invalid_keys",
"config::tests::locate_configs_returns_empty_upon_failure",
"config::tests::config_try_from_handles_empty",
"config::tests::locate_configs_doesnt_look_past_cargo_generate",
"config::tests::config_try_from_handles_placeholders",
"filenames::tests::sh... | [
"basics::it_processes_dot_github_directory_files",
"basics::it_provides_crate_type_lib",
"basics::it_allows_user_defined_projectname_when_passing_force_flag",
"basics::it_ignore_tags_inside_raw_block",
"basics::it_kebabcases_projectname_when_passed_to_flag",
"basics::it_removes_genignore_files_before_subs... | [] | auto_2025-06-12 | |
cargo-generate/cargo-generate | 693 | cargo-generate__cargo-generate-693 | [
"636"
] | 422da4742fdae5475206f588c5dbe45e1667527e | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,13 +6,25 @@
- [fix(#514): boolean value being ignored](https://github.com/cargo-generate/cargo-generate/issues/514)
### ✨ Features
-- [Test for file existance from rhai scripts](https://github.com/cargo-generate/cargo-generate/pull... | diff --git a/src/config.rs b/src/config.rs
--- a/src/config.rs
+++ b/src/config.rs
@@ -89,30 +90,38 @@ impl Config {
}
}
-pub fn locate_template_configs(dir: &Path) -> Result<Vec<String>> {
- let mut result = vec![];
-
- for entry in WalkDir::new(dir) {
- let entry = entry?;
- if entry.file_... | Feat: when pointing to a multi-template repo, it should be possible to explicitly specify the default template
When using `cargo-generate` with a multi template repository, `cargo-generate` creates a `choice` prompt for the user to select a
template to expand.
It would help on usability if it was possible to influ... | > When using cargo-generate with a multi template repository, cargo-generate creates a choice prompt for the user to select a
template to expand.
The choices presented to the users, should be based on the first level of directories in the template repository?
Currently we find all sub-folders that has a `cargo-gene... | 2022-07-09T18:53:37Z | 0.15 | 2022-07-13T07:06:10Z | 9bdf3ab592e2431309929ff57d7a525a4182a8cf | [
"config::tests::config_try_from_handles_empty",
"config::tests::config_try_from_errors_on_invalid_keys",
"config::tests::config_try_from_handles_placeholders",
"git::utils::should_canonicalize",
"git::identity_path::tests::should_pretty_path",
"project_variables::tests::block_invalid_key_names",
"projec... | [] | [] | [] | auto_2025-06-12 |
cargo-generate/cargo-generate | 511 | cargo-generate__cargo-generate-511 | [
"391"
] | dbc133f2287b4b19f65facd6e7fcbbe94c73f101 | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -130,6 +130,7 @@ version = "0.11.1"
dependencies = [
"anyhow",
"assert_cmd",
+ "cargo-husky",
"console",
"dialoguer",
"dirs",
diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -161,6 +162,12 @@ dependencies = [
... | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -54,6 +54,11 @@ predicates = "2.1"
assert_cmd = "2.0"
indoc = "1.0"
+[dev-dependencies.cargo-husky]
+version = "1"
+default-features = false
+features = ["prepush-hook", "run-cargo-test", "run-cargo-clippy", "run-cargo-fmt"]
+
[features]
ve... | abbreviation support for gitlab and bitbucket users
At the moment I can point to a github repo like this:
```sh
cargo generate --git rustwasm/wasm-pack-template
# or even shorter:
cargo generate rustwasm/wasm-pack-template
```
In order to support also gitlab and bitbucket users I'm proposing a prefix that w... | 2022-01-04T13:25:19Z | 0.11 | 2022-01-04T18:16:12Z | dbc133f2287b4b19f65facd6e7fcbbe94c73f101 | [
"config::tests::config_try_from_handles_empty",
"config::tests::config_try_from_errors_on_invalid_keys",
"config::tests::config_try_from_handles_placeholders",
"git::should_canonicalize",
"git::tests::should_determine_repo_kind",
"git::tests::should_not_fail_for_ssh_remote_urls",
"git::should_pretty_pat... | [] | [] | [] | auto_2025-06-12 | |
cargo-generate/cargo-generate | 474 | cargo-generate__cargo-generate-474 | [
"473"
] | 86bd44b49a0b9acf0fa09bdbdd49db7fcc88abf8 | diff --git a/src/hooks/variable_mod.rs b/src/hooks/variable_mod.rs
--- a/src/hooks/variable_mod.rs
+++ b/src/hooks/variable_mod.rs
@@ -1,7 +1,7 @@
use liquid::{Object, ValueView};
use liquid_core::Value;
use regex::Regex;
-use rhai::{Dynamic, EvalAltResult, Module};
+use rhai::{Array, Dynamic, EvalAltResult, Module}... | diff --git a/src/hooks/variable_mod.rs b/src/hooks/variable_mod.rs
--- a/src/hooks/variable_mod.rs
+++ b/src/hooks/variable_mod.rs
@@ -203,3 +220,61 @@ impl GetNamedValue for Rc<RefCell<Object>> {
}
}
}
+
+fn rhai_to_liquid_value(val: Dynamic) -> Result<Value> {
+ val.as_bool()
+ .map(Into::int... | feature: in Rhai script, add support for array in variable::set
This feature is not an addition to the types of placeholders in general. Instead it aims only to allow the usage of arrays through Rhai scripts. Rhai already has support for arrays and so does Liquid, so the implementation is simple and minimal changes wou... | 2021-10-02T14:55:51Z | 0.10 | 2021-11-07T11:35:35Z | 86bd44b49a0b9acf0fa09bdbdd49db7fcc88abf8 | [
"config::tests::config_try_from_handles_empty",
"config::tests::config_try_from_errors_on_invalid_keys",
"git::should_canonicalize",
"config::tests::config_try_from_handles_placeholders",
"git::tests::should_determine_repo_kind",
"git::tests::should_not_fail_for_ssh_remote_urls",
"git::should_pretty_pat... | [] | [] | [] | auto_2025-06-12 | |
cargo-generate/cargo-generate | 445 | cargo-generate__cargo-generate-445 | [
"18"
] | 81622ba05aac86dc08625a24b04639941d2e6643 | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,14 @@
# Changelog
## [Unreleased]
-
+- [enable pre/post hooks](https://github.com/cargo-generate/cargo-generate/issues/18)
+
+ Support for template hooks written in [rhai](https://rhai.rs/book/about/index.html).
+
+ Enab... | diff --git a/src/config.rs b/src/config.rs
--- a/src/config.rs
+++ b/src/config.rs
@@ -170,6 +197,7 @@ mod tests {
result,
Config {
template: None,
+ hooks: None,
placeholders: None,
conditional: Default::default(),
... | Pre/Post Hooks
This is something else that has been handy from [cookiecutter](https://cookiecutter.readthedocs.io/en/latest/advanced/hooks.html) but is more questionable due to security.
Use cases from my python cookiecutter translated to Rust.
- Custom SCM support
- Verifying ident (see #17)
- `cargo update && g... | I did a little research of what projects allow to run rust code. Here is what I found:
- https://crates.io/crates/rust-script
- https://crates.io/crates/cargo-play
- https://crates.io/crates/runner
- https://crates.io/crates/cargo-eval (fork of cargo-script which wasn't updated in 4 years) | 2021-09-04T18:14:40Z | 0.9 | 2021-09-19T21:21:05Z | 81622ba05aac86dc08625a24b04639941d2e6643 | [
"config::tests::config_try_from_handles_empty",
"config::tests::config_try_from_errors_on_invalid_keys",
"config::tests::config_try_from_handles_placeholders",
"git::should_canonicalize",
"git::should_pretty_path",
"git::tests::should_determine_repo_kind",
"git::tests::should_not_fail_for_ssh_remote_url... | [] | [] | [] | auto_2025-06-12 |
cargo-generate/cargo-generate | 525 | cargo-generate__cargo-generate-525 | [
"516"
] | 3853b4c68a4440578e243ede86244a431a6ac5f2 | diff --git a/src/app_config.rs b/src/app_config.rs
--- a/src/app_config.rs
+++ b/src/app_config.rs
@@ -7,7 +7,7 @@ use std::{
path::{Path, PathBuf},
};
-use crate::emoji;
+use crate::info;
pub const CONFIG_FILE_NAME: &str = "cargo-generate.toml";
diff --git a/src/app_config.rs b/src/app_config.rs
--- a/src... | diff --git a/tests/integration/basics.rs b/tests/integration/basics.rs
--- a/tests/integration/basics.rs
+++ b/tests/integration/basics.rs
@@ -73,70 +73,6 @@ version = "0.1.0"
assert_eq!(0, references);
}
-#[test]
-fn it_removes_git_history() {
- let template = tmp_dir()
- .file(
- "Cargo.t... | forcing git initialisation by a new flag `--force-git-init`
It seems cargo-generate ignores any and all attempts to allow for git initialization when the target directory is already inside an existing git repository.
I use git for the config files in my home directory and so it seems I can not create any git initial... | That's an interesting issue.
> I use git for the config files in my home directory
Are you not using a `.dotfiles` folder where the git checkout of your dot files lives, and then symlink e.g. `ln -s ~/.dotfiles/.bashrc ~/` it over into your home?
No, I am not using a .dotfiles folder and symlinking the files sinc... | 2022-01-17T01:26:11Z | 0.12 | 2022-01-17T01:46:17Z | a24f4d14e7c4d9b68aeb23e5657f41c05a0374a4 | [
"config::tests::config_try_from_handles_placeholders",
"config::tests::config_try_from_handles_empty",
"git::should_pretty_path",
"config::tests::config_try_from_errors_on_invalid_keys",
"config::tests::test_deserializes_config",
"git::tests::should_not_fail_for_ssh_remote_urls",
"project_variables::tes... | [] | [] | [] | auto_2025-06-12 |
cargo-generate/cargo-generate | 1,172 | cargo-generate__cargo-generate-1172 | [
"1152"
] | 26427861bddd32bc2fdca354a76bc7b093871084 | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -175,7 +175,6 @@ dependencies = [
"assert_cmd",
"auth-git2",
"bstr",
- "cargo-husky",
"clap",
"console",
"dialoguer",
diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -212,12 +211,6 @@ dependencies = [
"walk... | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -61,16 +61,6 @@ indoc = "~2.0"
url = "~2.5"
bstr = "~1.9"
-[dev-dependencies.cargo-husky]
-version = "~1.5"
-default-features = false
-features = [
- "prepush-hook",
- "run-cargo-test",
- "run-cargo-clippy",
- "run-cargo-fmt",
-]
... | Don't rename underscores to hyphens in project names
`cargo-generate` swaps underscores to hyphens in project names:
```
🤷 Project Name: lock_firmware
⚠️ Renaming project called `lock_firmware` to `lock-firmware`...
```
I'm not aware of any requirement that Rust projects use hyphens, so this seems unneces... | That's actually a fair point. Underscore to dash is not necessary. Dash to underscore is necessary on the module level.
I will prepare a fix. | 2024-04-10T12:43:38Z | 0.20 | 2024-04-10T20:56:02Z | 26427861bddd32bc2fdca354a76bc7b093871084 | [
"config::tests::config_try_from_handles_empty",
"config::tests::config_try_from_errors_on_invalid_keys",
"config::tests::config_try_from_handles_placeholders",
"config::tests::locate_configs_doesnt_look_past_cargo_generate",
"git::utils::should_canonicalize",
"config::tests::locate_configs_returns_empty_u... | [] | [] | [] | auto_2025-06-12 |
cargo-generate/cargo-generate | 880 | cargo-generate__cargo-generate-880 | [
"879"
] | faf3d01b1e1af968ec2a17a80849193c70657f8a | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -73,9 +73,9 @@ dependencies = [
[[package]]
name = "bstr"
-version = "1.2.0"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7f0778972c64420fdedc63f09919c8a88bda7b25135357fd25a5d9f3257e832"
+... | diff --git a/tests/integration/git.rs b/tests/integration/git.rs
--- a/tests/integration/git.rs
+++ b/tests/integration/git.rs
@@ -1,7 +1,7 @@
use assert_cmd::prelude::*;
use bstr::ByteSlice;
use git2::Repository;
-use git_config::File as GitConfig;
+use gix_config::File as GitConfig;
use predicates::prelude::*;
u... | Cannot install on Rust 1.67
**Describe the bug**
Running `cargo install cargo-generate` failed with rustc 1.67.0. Specifically, it fails to build git-ref 0.23.1, which is a dependency of git-config.
**Desktop (please complete the following information):**
- OS: Windows 10
- `rustc --version`: 1.67.0
**Additi... | Can confirm for rustc 1.67.1 on Manjaro
Confirming too, wasnt able to install it today
Same for me on macos.
```Rust
error[E0277]: the trait bound `BStr: AsRef<[_; 0]>` is not satisfied
--> /Users/l1x/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/store/packed/find.rs:95:35
|
95 | ... | 2023-02-21T19:10:17Z | 0.17 | 2023-02-22T11:46:49Z | faf3d01b1e1af968ec2a17a80849193c70657f8a | [
"git::identity_path::tests::should_pretty_path",
"config::tests::locate_configs_can_locate_paths_with_cargo_generate",
"config::tests::locate_configs_returns_empty_upon_failure",
"config::tests::locate_configs_doesnt_look_past_cargo_generate",
"project_variables::tests::choices_is_array_string_no_regex_is_f... | [] | [] | [] | auto_2025-06-12 |
cargo-generate/cargo-generate | 691 | cargo-generate__cargo-generate-691 | [
"569"
] | e9fcff0cdd84481fd8bcb85a46ce7a92abe2d74c | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,7 +18,7 @@
If a selected template doesn't have a `cargo-generate.toml` file, but a parent one exists, any configured sub-templates will be ignored.
Further implication is that sub-templates no longer needs to have a `cargo-g... | diff --git a/tests/integration/basics.rs b/tests/integration/basics.rs
--- a/tests/integration/basics.rs
+++ b/tests/integration/basics.rs
@@ -462,6 +462,44 @@ version = "0.1.0"
Ok(())
}
+#[test]
+fn it_can_overwrite_files() -> anyhow::Result<()> {
+ let template = tmp_dir()
+ .file(
+ "Car... | Add option to overwrite files in existing project
[The book has the following to say](https://cargo-generate.github.io/cargo-generate/usage.html#generating-into-current-dir) about this:
> `cargo-generate` will not allow any existing files to be overwritten and will fail to generate any files should there be any conf... | maybe a `-f | --force` flag would be more reasonable for this sort of behaviour?
If anyone wants to work on this - I'm available to guide as needed.
> maybe a `-f | --force` flag would be more reasonable for this sort of behaviour?
I would have liked this option better too but it's already taken: https://github.com/... | 2022-07-07T10:06:22Z | 0.15 | 2022-07-14T07:30:25Z | 9bdf3ab592e2431309929ff57d7a525a4182a8cf | [
"config::tests::config_try_from_handles_empty",
"config::tests::config_try_from_errors_on_invalid_keys",
"config::tests::config_try_from_handles_placeholders",
"git::utils::should_canonicalize",
"project_variables::tests::block_invalid_key_names",
"config::tests::locate_configs_can_doesnt_look_past_cargo_... | [] | [] | [] | auto_2025-06-12 |
cargo-generate/cargo-generate | 680 | cargo-generate__cargo-generate-680 | [
"679"
] | 7692e625993c5e18a8cea35858bccc4b82afbe14 | diff --git a/guide/src/favorites.md b/guide/src/favorites.md
--- a/guide/src/favorites.md
+++ b/guide/src/favorites.md
@@ -13,10 +13,14 @@ description = "<optional description, visible with --list-favorites>"
git = "https://github.com/ashleygwilliams/wasm-pack-template"
branch = "<optional-branch>"
subfolder = "<opt... | diff --git a/src/config.rs b/src/config.rs
--- a/src/config.rs
+++ b/src/config.rs
@@ -183,6 +184,7 @@ mod tests {
include: Some(vec!["Cargo.toml".into()]),
exclude: None,
ignore: None,
+ init: None,
})
);
assert!(config.pl... | feat: let template specify it is designed to NOT go into a sub-folder (aka. the template always has --init behaviour)
By specifying
```toml
[template]
init = true
```
in `cargo-generate` of a template (or for a favorite in the global config), the template will always behave as if the user specified `--init` o... | 2022-07-03T19:44:07Z | 0.15 | 2022-07-05T17:27:35Z | 9bdf3ab592e2431309929ff57d7a525a4182a8cf | [
"project_variables::tests::default_for_string_with_no_choices_and_matching_regex",
"project_variables::tests::default_for_string_only_accepts_strings",
"config::tests::config_try_from_handles_empty",
"config::tests::test_deserializes_config",
"config::tests::locate_configs_returns_empty_upon_failure",
"co... | [] | [] | [] | auto_2025-06-12 | |
cargo-generate/cargo-generate | 677 | cargo-generate__cargo-generate-677 | [
"635"
] | 1098c62c7f86956ba0c09be314533eaabf9822d5 | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,8 @@
# Changelog
## [Unreleased](https://github.com/cargo-generate/cargo-generate/compare/v0.15.2...HEAD)
-
### ✨ Features
+- [Set default VCS in the favorite or template config](https://github.com/cargo-generate/cargo-genera... | diff --git a/src/config.rs b/src/config.rs
--- a/src/config.rs
+++ b/src/config.rs
@@ -184,6 +187,7 @@ mod tests {
include: Some(vec!["Cargo.toml".into()]),
exclude: None,
ignore: None,
+ vcs: None,
init: None,
})
)... | Feature request: Set default VCS from within templates
It would be nice if it was possible to make templates default to a different or no VCS initialisation. In my case this would be useful for a "minimal" template meant for messing around inside. Could also be useful for templates which are meant to be a smaller part ... | Hey, for rhai scripts there are pre and post hook scripts.
A post hook script should provide what you need.
I tested with a post hook script. It prints before the VCS initialisation, and cannot delete the vcs folder since it doesn't exist yet.
Ok, I think that is probably a bug or a debatable issue of the post hooks. ... | 2022-07-03T15:41:24Z | 0.15 | 2022-07-05T18:31:25Z | 9bdf3ab592e2431309929ff57d7a525a4182a8cf | [
"config::tests::config_try_from_handles_empty",
"config::tests::config_try_from_errors_on_invalid_keys",
"config::tests::config_try_from_handles_placeholders",
"git::utils::should_canonicalize",
"project_variables::tests::boolean_cant_have_choices",
"project_variables::tests::block_invalid_key_names",
"... | [] | [] | [] | auto_2025-06-12 |
cargo-generate/cargo-generate | 671 | cargo-generate__cargo-generate-671 | [
"647"
] | d95b96ddbec990289327ba9ba6ee0a0d51685ece | diff --git a/src/app_config.rs b/src/app_config.rs
--- a/src/app_config.rs
+++ b/src/app_config.rs
@@ -29,6 +29,7 @@ pub struct FavoriteConfig {
pub description: Option<String>,
pub git: Option<String>,
pub branch: Option<String>,
+ pub tag: Option<String>,
pub subfolder: Option<String>,
pub... | diff --git a/tests/integration/git.rs b/tests/integration/git.rs
--- a/tests/integration/git.rs
+++ b/tests/integration/git.rs
@@ -32,6 +32,29 @@ fn it_allows_a_git_branch_to_be_specified() {
.contains("foobar-project"));
}
+#[test]
+fn it_allows_a_git_tag_to_be_specified() {
+ let template = tmp_dir().i... | feat: support `--tag` in addition to `--branch`
It's really difficult right now to expand a specific tagged version of a template.
We really should allow to use tagged versions!
| 2022-06-27T17:40:01Z | 0.15 | 2022-07-04T21:52:43Z | 9bdf3ab592e2431309929ff57d7a525a4182a8cf | [
"config::tests::config_try_from_handles_empty",
"config::tests::config_try_from_errors_on_invalid_keys",
"config::tests::config_try_from_handles_placeholders",
"project_variables::tests::block_invalid_key_names",
"git::utils::should_canonicalize",
"project_variables::tests::boolean_cant_have_choices",
"... | [] | [] | [] | auto_2025-06-12 | |
cargo-generate/cargo-generate | 372 | cargo-generate__cargo-generate-372 | [
"325"
] | 4daf0d95d5238250edbcb4a596b1c85ae25faec7 | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -199,6 +199,7 @@ dependencies = [
"cargo",
"console",
"dialoguer",
+ "dirs",
"git2",
"heck",
"home",
diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -482,6 +483,26 @@ dependencies = [
"generic-array",
]
... | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -79,6 +79,12 @@ jobs:
run: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
+ - name: Install SSH ... | Git SSH URL Support
The [Github Docs](https://docs.github.com/en/enterprise-server@3.0/github/getting-started-with-github/about-remote-repositories#about-remote-repositories) specify that a remote repository URL must have one of the following forms
- https://[hostname]/user/repo.git
- git@[hostname]:user/repo.git
... | this also slightly relates to #302.
It might be possible to implement the https and ssh/git urls with [RepoBuilder](https://docs.rs/git2/0.13.17/git2/build/struct.RepoBuilder.html) and in the best case both issues are solved.
@SkamDart your contributions are appreciated. | 2021-07-13T14:17:48Z | 0.6 | 2021-07-13T16:14:07Z | 4daf0d95d5238250edbcb4a596b1c85ae25faec7 | [
"config::tests::config_try_from_handles_empty",
"config::tests::config_try_from_errors_on_invalid_keys",
"git::tests::should_fail_for_non_existing_local_path",
"git::tests::should_support_a_local_relative_path",
"git::tests::should_support_a_local_absolute_path",
"project_variables::tests::block_invalid_k... | [] | [] | [] | auto_2025-06-12 |
sagiegurari/cargo-make | 498 | sagiegurari__cargo-make-498 | [
"497"
] | ef3726d808bdf5fb34bd98a6aca9c0d7ab2bbe02 | diff --git a/docs/_includes/content.md b/docs/_includes/content.md
--- a/docs/_includes/content.md
+++ b/docs/_includes/content.md
@@ -265,6 +265,22 @@ hello
Now you can see that 'hello' was printed twice.
+Tasks may also depend on tasks in other files. To do this, specify the
+dependency with the object format, p... | diff --git a/src/lib/execution_plan.rs b/src/lib/execution_plan.rs
--- a/src/lib/execution_plan.rs
+++ b/src/lib/execution_plan.rs
@@ -10,8 +10,9 @@ mod execution_plan_test;
use crate::environment;
use crate::logger;
use crate::profile;
+use crate::proxy_task::create_proxy_task;
use crate::types::{
- Config, Cra... | Propose syntax-sugar for referring to tasks in other crates
I have a workspace with many crates. As part of the packaging process, I'd like to copy some files (html templates) between them. This copy stage depends on some preprocessing defined in `src/web/Makefile.toml`. In the root `Makefile.toml` I am having to creat... | Interesting idea.
What if it was an object instead?
```toml
dependencies = [ { cwd = "src/web", name = "dist", fork = true }, { name = "some-local-task" } ]
```
which would trigger a sub cargo make process (as you did manually)?
The fork would always be true, but if i'm making it an object now, i need to think o... | 2020-11-30T19:56:53Z | 0.32 | 2020-12-03T18:43:48Z | 30b6ba4415f03d7329fc42bc6e4714a550f00b1e | [
"cache::cache_test::load_from_path_not_exists",
"cache::cache_test::load_from_path_exists",
"cli_commands::list_steps::list_steps_test::run_empty",
"cli_commands::print_steps::print_steps_test::get_format_type_default",
"cli_commands::print_steps::print_steps_test::get_format_type_unknown",
"cli_commands:... | [] | [] | [] | auto_2025-06-12 |
sagiegurari/cargo-make | 358 | sagiegurari__cargo-make-358 | [
"357"
] | 1ed351272a4b09c60c3dfe81b6420fd7bcaa56fa | diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1355,6 +1355,7 @@ In addition to manually setting environment variables, cargo-make will also auto
* **CARGO_MAKE_CRATE_WORKSPACE_MEMBERS** - Holds list of member paths (defined as empty value if no Cargo.toml is found)
* **CARGO_MAKE_CRATE_CURREN... | diff --git a/src/lib/environment/crateinfo.rs b/src/lib/environment/crateinfo.rs
--- a/src/lib/environment/crateinfo.rs
+++ b/src/lib/environment/crateinfo.rs
@@ -9,10 +9,12 @@ mod crateinfo_test;
use crate::types::{CrateDependency, CrateInfo};
use glob::glob;
+use std::env;
+use std::fs;
use std::fs::File;
use s... | Get default build target including from `.cargo/Config.toml`
**Features Description**
A way to get default build targets from `.cargo/Config.toml` or fall back to rustc default.
**Describe the solution you'd like**
An environment variable like `CARGO_MAKE_CRATE_TARGET_TRIPLE`.
**Code Sample**
```toml
[tasks.w... | 2020-01-04T22:28:55Z | 0.25 | 2020-01-09T20:26:16Z | 1ed351272a4b09c60c3dfe81b6420fd7bcaa56fa | [
"cache::cache_test::load_from_path_not_exists",
"cache::cache_test::load_from_path_exists",
"cache::cache_test::load_without_cargo_home",
"cli::cli_test::run_cwd_task_not_found",
"cli::cli_test::run_cli_panic",
"cli::cli_test::run_for_args_bad_subcommand",
"cli_commands::list_steps::list_steps_test::run... | [] | [] | [] | auto_2025-06-12 | |
sagiegurari/cargo-make | 597 | sagiegurari__cargo-make-597 | [
"585"
] | 69f6a2372722e5446dbc6241cbf61cd700af23e4 | diff --git a/docs/_includes/content.md b/docs/_includes/content.md
--- a/docs/_includes/content.md
+++ b/docs/_includes/content.md
@@ -3123,9 +3123,9 @@ These are the following options available while running cargo-make:
```console
USAGE:
- cargo make [FLAGS] [OPTIONS] [--] [ARGS]
+ cargo make [FLAGS] [OPTION... | diff --git a/src/lib/cli_test.rs b/src/lib/cli_test.rs
--- a/src/lib/cli_test.rs
+++ b/src/lib/cli_test.rs
@@ -643,3 +643,23 @@ fn run_for_args_set_task_args() {
"arg1;arg2;arg3"
);
}
+
+#[test]
+fn run_for_args_set_task_var_args() {
+ // See also issue #585
+ let global_config = GlobalConfig::new(... | Arguments to tasks can be interpreted as cargo make options
### Describe The Bug
If hyphenated arguments are passed to a cargo make task, and those arguments happen to match a cargo make CLI option, then the arguments are consumed by cargo make rather than being passed to the task.
### To Reproduce
```toml
# Make... | i'm using clap for cli arg handling. maybe you can investigate how to resolve it, but i think -- is kinda standard stuff in rust clis. not sure why
@edmorley i have been looking here:
https://docs.rs/clap/2.33.3/clap/struct.Arg.html
and couldn't find a good way to do it. The code that uses clap to setup the cli is ca... | 2021-10-17T19:21:04Z | 0.35 | 2021-10-21T16:42:04Z | b60232e120431d950bb772417f2a281a385eac9b | [
"installer::cargo_plugin_installer::cargo_plugin_installer_test::get_install_crate_args_with_args_force",
"descriptor::makefiles::mod_test::makefile_outdated_test",
"runner::runner_test::get_sub_task_info_for_routing_info_condition_found",
"runner::runner_test::get_sub_task_info_for_routing_info_fork_false",
... | [
"cache::cache_test::load_from_path_not_exists",
"cache::cache_test::load_from_path_exists",
"cli_commands::list_steps::list_steps_test::run_empty",
"cli_commands::print_steps::print_steps_test::get_format_type_default",
"cli_commands::list_steps::list_steps_test::run_all_private",
"cli_commands::print_ste... | [
"environment::mod_test::get_base_directory_name_valid",
"installer::crate_installer::crate_installer_test::install_already_installed_crate_only_min_version_smaller",
"installer::crate_installer::crate_installer_test::install_already_installed_crate_only_version_equal",
"installer::crate_installer::crate_insta... | [] | auto_2025-06-12 |
sagiegurari/cargo-make | 595 | sagiegurari__cargo-make-595 | [
"594"
] | ee4e8b40319532079750d26c7d2415c0c6fbc306 | diff --git a/docs/_includes/content.md b/docs/_includes/content.md
--- a/docs/_includes/content.md
+++ b/docs/_includes/content.md
@@ -2039,6 +2039,19 @@ rustc 1.32.0-nightly (451987d86 2018-11-01)
[cargo-make] INFO - Build Done in 2 seconds.
```
+It's also possible to assert a minimum required version of rustc wi... | diff --git a/src/lib/command_test.rs b/src/lib/command_test.rs
--- a/src/lib/command_test.rs
+++ b/src/lib/command_test.rs
@@ -110,7 +110,7 @@ fn run_command_for_toolchain() {
let mut task = Task::new();
task.command = Some("echo".to_string());
task.args = Some(vec!["test".to_string()]);
- ... | Let toolchain describe a minimal supported rust version
### Feature Description
```
[tasks.rustc-version-stable]
toolchain = "1.56" # required because we're using edition 2021
```
Unfortunately, by the time 1.57 stabilizes, the above will suddenly complain to devs using the latest stable release.
### Describe... | thanks a lot for the idea.
how about:
```toml
[tasks.rustc-version-stable]
toolchain = { channel = "stable", min_version = "1.56" }
```
this way
* we don't need to parse the version
* we are consistent with install_crate attribute which has min_version as well. so better do the same everywhere.
this sound... | 2021-10-06T17:31:32Z | 0.35 | 2021-11-08T14:10:09Z | b60232e120431d950bb772417f2a281a385eac9b | [
"cache::cache_test::load_from_path_not_exists",
"cache::cache_test::load_from_path_exists",
"cli_commands::list_steps::list_steps_test::run_empty",
"cli_commands::print_steps::print_steps_test::get_format_type_default",
"cli_commands::print_steps::print_steps_test::get_format_type_short_description",
"cli... | [] | [] | [] | auto_2025-06-12 |
sagiegurari/cargo-make | 268 | sagiegurari__cargo-make-268 | [
"267"
] | 51783889ecf38fae634225f8e8f6ac8a1e01007f | diff --git a/src/lib/cli.rs b/src/lib/cli.rs
--- a/src/lib/cli.rs
+++ b/src/lib/cli.rs
@@ -92,18 +92,18 @@ fn run(cli_args: CliArgs, global_config: &GlobalConfig) {
let experimental = cli_args.experimental;
let config = descriptor::load(&build_file, force_makefile, env, experimental);
- match config.conf... | diff --git a/src/lib/descriptor.rs b/src/lib/descriptor.rs
--- a/src/lib/descriptor.rs
+++ b/src/lib/descriptor.rs
@@ -12,6 +12,7 @@ mod descriptor_test;
use crate::command;
use crate::types::{Config, ConfigSection, EnvValue, Extend, ExternalConfig, ModifyConfig, Task};
+use crate::version;
use envmnt;
use indexm... | config.min_version doesn't work if the new TOML file breaks the old parser
**Describe the bug**
cargo-make tries to parse the Makefile.toml entirely before checking the config.min_version key. This causes an issue when the new format cannot be parsed properly by the old parser: we get an error before min_version has a... | the min version is used to prevent cargo make running the flow in case the makefile structure is legit but in reality cargo make can't support the needed features.
For example, functions:
```toml
[tasks.split-example]
command = "echo"
args = ["@@split(ENV_VAR,|)"]
```
if you run an old cargo-make, it will wo... | 2019-08-06T08:51:32Z | 0.21 | 2019-08-09T10:30:36Z | 51783889ecf38fae634225f8e8f6ac8a1e01007f | [
"cache::cache_test::load_from_path_not_exists",
"cache::cache_test::load_from_path_exists",
"cache::cache_test::load_without_cargo_home",
"cli::cli_test::run_cwd_task_not_found",
"cli::cli_test::run_cli_panic",
"cli::cli_test::run_for_args_bad_subcommand",
"cli_commands::diff_steps::diff_steps_test::run... | [] | [] | [] | auto_2025-06-12 |
sagiegurari/cargo-make | 1,109 | sagiegurari__cargo-make-1109 | [
"1108"
] | e3e93de01658a7a4fa8a62ff086582e69e712bc8 | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
## CHANGELOG
+### v0.37.14
+
+* Fix: fix the --skip-init-end-tasks argument #1108
+
### v0.37.13 (2024-07-07)
* Enhancement: New condition_script_runner_args attribute #1081
diff --git a/src/lib/cli.rs b/src/lib/cli.rs... | diff --git a/src/lib/cli_commands/diff_steps.rs b/src/lib/cli_commands/diff_steps.rs
--- a/src/lib/cli_commands/diff_steps.rs
+++ b/src/lib/cli_commands/diff_steps.rs
@@ -8,7 +8,7 @@
mod diff_steps_test;
use crate::command;
-use crate::execution_plan::create as create_execution_plan;
+use crate::execution_plan::Exe... | `--skip-init-end-tasks` doesn't seem to work
### Describe The Bug
With `tasks.init` defined, even if we call `cargo make --skip-init-end-tasks empty`, the init task will be called.
I am not sure if I am understanding the `--skip-init-end-tasks` argument incorrectly, or there is a bug. If it's a misunderstanding, I ... | instead of
cargo make empty --skip-init-end-tasks
do
cargo make --skip-init-end-tasks empty
> instead of cargo make empty --skip-init-end-tasks do cargo make --skip-init-end-tasks empty
The same:
```
$ cargo init hello-world && cd hello-world && echo "tasks.init.script = \"echo init\"" > Makefile.toml && car... | 2024-07-07T19:09:51Z | 0.37 | 2024-07-14T17:47:16Z | ef1f37051d1fba6118cf75492e5c5aec5ebbe704 | [
"cache::cache_test::load_from_path_not_exists",
"cli::cli_test::run_bad_subcommand - should panic",
"cli_commands::diff_steps::diff_steps_test::run_missing_task_in_first_config - should panic",
"cli_commands::list_steps::list_steps_test::run_all_public",
"cli_commands::list_steps::list_steps_test::run_empty... | [] | [] | [] | auto_2025-06-12 |
sagiegurari/cargo-make | 1,066 | sagiegurari__cargo-make-1066 | [
"1059"
] | bcf7bf337a9e59721f4836df8de5e183a8a757c6 | diff --git a/docs/_config.yml b/docs/_config.yml
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -2,4 +2,4 @@ theme: jekyll-theme-cayman
title: cargo-make
description: Rust task runner and build tool.
show_downloads: false
-version: 0.37.10
+version: 0.37.11
diff --git a/src/lib/toolchain.rs b/src/lib/toolchain.rs
... | diff --git a/src/lib/toolchain_test.rs b/src/lib/toolchain_test.rs
--- a/src/lib/toolchain_test.rs
+++ b/src/lib/toolchain_test.rs
@@ -124,16 +124,19 @@ fn get_cargo_binary_path_valid() {
#[test]
#[ignore]
fn remove_rust_env_vars_existed() {
+ envmnt::set("CARGO", "bad0");
envmnt::set("RUSTC", "bad1");
... | `CARGO` env variable does not get set when running commands
### Describe The Bug
The README describes
> When defined with scripts (as opposed to commands), the CARGO environment variable will be defined for the requested toolchain.
Although this says it doesn't define it for commands, I think this should so tha... | its not cargo make. if i remember this was mentioned before and it was due to cargo behavior itself.
> its not cargo make. if i remember this was mentioned before and it was due to cargo behavior itself.
Do you have a workaround for this?
Also the reason I think this is cargo make is because when running `rustup... | 2024-04-05T16:13:18Z | 0.37 | 2024-04-05T16:13:33Z | ef1f37051d1fba6118cf75492e5c5aec5ebbe704 | [
"scriptengine::mod_test::get_engine_type_no_runner"
] | [
"cache::cache_test::load_from_path_not_exists",
"cache::cache_test::load_from_path_exists",
"cli::cli_test::run_bad_subcommand - should panic",
"cli_commands::list_steps::list_steps_test::run_all_private",
"cli_commands::list_steps::list_steps_test::run_all_public",
"cli_commands::list_steps::list_steps_t... | [
"condition::condition_test::validate_criteria_valid_os",
"condition::condition_test::validate_os_valid",
"environment::mod_test::get_base_directory_name_valid",
"installer::crate_installer::crate_installer_test::install_already_installed_crate_only_min_version_smaller",
"installer::crate_installer::crate_in... | [] | auto_2025-06-12 |
sagiegurari/cargo-make | 1,060 | sagiegurari__cargo-make-1060 | [
"1059"
] | c984595cb6cee8542e94e702b02e16f87e513089 | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -158,7 +158,7 @@ dependencies = [
"glob",
"home",
"ignore",
- "indexmap 2.2.5",
+ "indexmap 2.2.6",
"itertools",
"lenient_semver",
"log",
diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -714,9 +714,9 @@ depen... | diff --git a/src/lib/toolchain_test.rs b/src/lib/toolchain_test.rs
--- a/src/lib/toolchain_test.rs
+++ b/src/lib/toolchain_test.rs
@@ -124,16 +124,19 @@ fn get_cargo_binary_path_valid() {
#[test]
#[ignore]
fn remove_rust_env_vars_existed() {
+ envmnt::set("CARGO", "bad0");
envmnt::set("RUSTC", "bad1");
... | `CARGO` env variable does not get set when running commands
### Describe The Bug
The README describes
> When defined with scripts (as opposed to commands), the CARGO environment variable will be defined for the requested toolchain.
Although this says it doesn't define it for commands, I think this should so tha... | 2024-03-27T01:42:01Z | 0.37 | 2024-04-05T15:57:19Z | ef1f37051d1fba6118cf75492e5c5aec5ebbe704 | [
"runner::runner_test::get_sub_task_info_for_routing_info_condition_found",
"runner::runner_test::get_sub_task_info_for_routing_info_condition_found_multiple_tasks",
"runner::runner_test::get_sub_task_info_for_routing_info_fork_false",
"runner::runner_test::get_sub_task_info_for_routing_info_fork_true",
"run... | [
"cli::cli_test::run_bad_subcommand - should panic",
"cache::cache_test::load_from_path_exists",
"cli_commands::list_steps::list_steps_test::run_all_private",
"cli_commands::diff_steps::diff_steps_test::run_missing_task_in_first_config - should panic",
"cli_commands::diff_steps::diff_steps_test::run_missing_... | [
"condition::condition_test::validate_criteria_valid_os",
"condition::condition_test::validate_os_valid",
"environment::mod_test::get_base_directory_name_valid",
"installer::crate_version_check::crate_version_check_test::is_min_version_valid_newer_version",
"installer::crate_version_check::crate_version_chec... | [] | auto_2025-06-12 | |
sagiegurari/cargo-make | 714 | sagiegurari__cargo-make-714 | [
"712"
] | 6f82c9ec41374598a4fda5dde232fda7a557865d | diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,5 @@ dump.rdb
/rs*.sh
/docs/_site
/core
+/src/**/Cargo.lock
+/examples/**/Cargo.lock
diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
## CHANGELOG
+### v0.36.1
+
+* Enhancement: Support... | diff --git a/Makefile.toml b/Makefile.toml
--- a/Makefile.toml
+++ b/Makefile.toml
@@ -28,6 +28,26 @@ echo " Unstable Format Environment: ${CARGO_MAKE_TEMP_UNSTABLE_FMT_ENV}"
echo "*************************************"
'''
+[tasks.test-multi-phases-cleanup]
+script = '''
+#!@duckscript
+
+fn <scope> delete_all
... | Cargo make incompatible with Rust 1.64 Workspace Inheritance
### Describe The Bug
As of Rust 1.64, a package version can be set using `version.workspace = true`.
cargo-make expects PackageInfo.version to be an `Option<String>`, and is unable to parse the new map structure.
https://doc.rust-lang.org/cargo/refe... | oh... thanks for reporting. I'll handle that today
I also forgot to mention that this may also affect the parsing of inherited package deps, but I didn't get far enough to test if that was an issue or not for cargo-make. | 2022-09-23T14:25:19Z | 0.36 | 2022-09-27T09:08:25Z | 74e54adeefbd609c5d163c6df66b787e43740428 | [
"cache::cache_test::load_from_path_not_exists",
"cache::cache_test::load_from_path_exists",
"cli::cli_test::run_bad_subcommand - should panic",
"cli_commands::list_steps::list_steps_test::run_empty",
"cli_commands::list_steps::list_steps_test::run_all_private",
"cli_commands::print_steps::print_steps_test... | [
"tests::it_works"
] | [] | [] | auto_2025-06-12 |
sagiegurari/cargo-make | 688 | sagiegurari__cargo-make-688 | [
"685"
] | b60232e120431d950bb772417f2a281a385eac9b | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -135,6 +135,8 @@ dependencies = [
"indexmap",
"lenient_semver",
"log",
+ "once_cell",
+ "petgraph",
"regex",
"run_script",
"rust_info",
diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -460,6 +462,12 @@ depend... | diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1343,18 +1344,146 @@ We run task **3** the output would be:
<a name="usage-env"></a>
### Environment Variables
-cargo-make enables you to defined environment variables in several ways.<br>
-Environment variables can later be used in commands, sc... | Env variable interpolation stops working when extending
### Describe The Bug
When redefining environmental variables, from a Makefile that we extend from and execute any task `@@split()` no longer works.
### To Reproduce
Minimal Reproducible Example:
extend.toml
```toml
extend = { path = "base.toml" }
... | Update: if `CARGO_TEST_HACK_FLAGS_BASE` is defined in `base.toml` This issue does not occur:
extend.toml: unchanged
base.toml
```toml
[config]
default_to_workspace = false
[config.modify_core_tasks]
private = true
namespace = "default"
[env]
CARGO_TEST_HACK_FLAGS_BASE = ""
CARGO_TEST_HACK_FLAGS = "... | 2022-08-06T20:08:47Z | 0.35 | 2022-08-29T17:54:36Z | b60232e120431d950bb772417f2a281a385eac9b | [
"cache::cache_test::load_from_path_not_exists",
"cache::cache_test::load_from_path_exists",
"cli_commands::list_steps::list_steps_test::run_empty",
"cli_commands::list_steps::list_steps_test::run_all_private",
"cli::cli_test::run_bad_subcommand - should panic",
"cli_commands::print_steps::print_steps_test... | [] | [] | [] | auto_2025-06-12 |
sagiegurari/cargo-make | 598 | sagiegurari__cargo-make-598 | [
"585"
] | 69f6a2372722e5446dbc6241cbf61cd700af23e4 | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
## CHANGELOG
+### v0.35.3
+
+* Enhancement: Task cli arguments matching cargo-make cli args can now be passed without -- character #585 (thanks @WorldSEnder)
+
### v0.35.2 (2021-10-16)
* Enhancement: Ability to specify... | diff --git a/src/lib/cli_test.rs b/src/lib/cli_test.rs
--- a/src/lib/cli_test.rs
+++ b/src/lib/cli_test.rs
@@ -643,3 +643,23 @@ fn run_for_args_set_task_args() {
"arg1;arg2;arg3"
);
}
+
+#[test]
+fn run_for_args_set_task_var_args() {
+ // See also issue #585
+ let global_config = GlobalConfig::new(... | Arguments to tasks can be interpreted as cargo make options
### Describe The Bug
If hyphenated arguments are passed to a cargo make task, and those arguments happen to match a cargo make CLI option, then the arguments are consumed by cargo make rather than being passed to the task.
### To Reproduce
```toml
# Make... | i'm using clap for cli arg handling. maybe you can investigate how to resolve it, but i think -- is kinda standard stuff in rust clis. not sure why
@edmorley i have been looking here:
https://docs.rs/clap/2.33.3/clap/struct.Arg.html
and couldn't find a good way to do it. The code that uses clap to setup the cli is ca... | 2021-10-22T07:06:34Z | 0.35 | 2021-10-22T07:20:31Z | b60232e120431d950bb772417f2a281a385eac9b | [
"scriptengine::generic_script::generic_script_test::execute_shell_error_no_validate",
"types::types_test::config_section_get_get_load_script_platform_some",
"cli::cli_test::run_for_args_set_task_var_args"
] | [
"cache::cache_test::load_from_path_not_exists",
"cache::cache_test::load_from_path_exists",
"cli::cli_test::run_for_args_bad_subcommand - should panic",
"cli_commands::list_steps::list_steps_test::run_all_public",
"cli_commands::list_steps::list_steps_test::run_all_private",
"cli_commands::list_steps::lis... | [
"environment::mod_test::get_base_directory_name_valid",
"installer::crate_installer::crate_installer_test::install_already_installed_crate_only_min_version_smaller",
"installer::crate_installer::crate_installer_test::install_already_installed_crate_only_version_equal",
"installer::crate_installer::crate_insta... | [
"descriptor::makefiles::mod_test::makefile_outdated_test"
] | auto_2025-06-12 |
sagiegurari/cargo-make | 1,020 | sagiegurari__cargo-make-1020 | [
"1018"
] | 97f23d33f48dcf1681e12d23f0643bb24f6c60e1 | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -331,12 +331,12 @@ dependencies = [
[[package]]
name = "ctrlc"
-version = "3.4.1"
+version = "3.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82e95fbd621905b854affdc67943b043a0fbb6ed7385fd5a25650d19a8a6cf... | diff --git a/src/lib/environment/mod_test.rs b/src/lib/environment/mod_test.rs
--- a/src/lib/environment/mod_test.rs
+++ b/src/lib/environment/mod_test.rs
@@ -230,6 +230,7 @@ fn set_env_multi_types() {
source: "${ENV_DECODE_EXPRESSIONS_MULTI_TYPE_VAR1}".to_string(),
default_value: None,
mappi... | Decode map environment variable overwrites existing one even with env_not_set condition
Hi, thanks for making and maintaining cargo-make, I really like it! I think I've come across a potential bug with conditionals and the decode map feature for environment variables. Here's an example Makefile.toml:
```toml
[tasks... | 2024-01-13T12:19:44Z | 0.37 | 2024-01-13T15:32:14Z | ef1f37051d1fba6118cf75492e5c5aec5ebbe704 | [
"cache::cache_test::load_from_path_not_exists",
"cli::cli_test::run_bad_subcommand - should panic",
"cache::cache_test::load_from_path_exists",
"cli_commands::diff_steps::diff_steps_test::run_missing_task_in_first_config - should panic",
"cli_commands::diff_steps::diff_steps_test::run_missing_task_in_second... | [] | [] | [] | auto_2025-06-12 | |
sagiegurari/cargo-make | 897 | sagiegurari__cargo-make-897 | [
"833"
] | 74e54adeefbd609c5d163c6df66b787e43740428 | diff --git a/src/lib/environment/crateinfo.rs b/src/lib/environment/crateinfo.rs
--- a/src/lib/environment/crateinfo.rs
+++ b/src/lib/environment/crateinfo.rs
@@ -197,7 +197,6 @@ fn add_members(crate_info: &mut CrateInfo, new_members: Vec<String>) {
fn dedup_members(crate_info: &mut CrateInfo) {
if let Some(ref m... | diff --git a/src/lib/environment/crateinfo_test.rs b/src/lib/environment/crateinfo_test.rs
--- a/src/lib/environment/crateinfo_test.rs
+++ b/src/lib/environment/crateinfo_test.rs
@@ -49,6 +49,24 @@ fn add_members_workspace_new_members_with_data() {
assert_eq!(workspace.members.unwrap().len(), 2);
}
+#[test]
+fn... | Workspace children do not get executed in order defined in `Cargo.toml` members
### Describe The Bug
The expected behaviour is that the order of execution for a workspace follows the order of the `members` array in `Cargo.toml`. In version v0.36.6 this is broken and appears to follow alphabetical order instead, v0.35.... | @simon-wh thanks for reporting this.
dependencies are an issue to resolve and its not always possible to define same order.
however, question, if one member is dependend on the other, it should be stated in its cargo.toml so building it would use the current dependency in your filesystem.
or are we talking about som... | 2023-07-18T11:19:37Z | 0.36 | 2023-07-19T10:31:51Z | 74e54adeefbd609c5d163c6df66b787e43740428 | [
"cli_commands::list_steps::list_steps_test::run_all_public_markdown_sub_section",
"environment::crateinfo::crateinfo_test::add_members_workspace_non_alpha_ordered",
"scriptengine::os_script::os_script_test::execute_shell_with_runner",
"types::types_test::config_section_new",
"types::types_test::workspace_ne... | [
"cache::cache_test::load_from_path_not_exists",
"cli::cli_test::run_bad_subcommand - should panic",
"cli_commands::list_steps::list_steps_test::run_all_private",
"cache::cache_test::load_from_path_exists",
"cli_commands::list_steps::list_steps_test::run_all_public",
"cli_commands::diff_steps::diff_steps_t... | [
"environment::mod_test::get_base_directory_name_valid",
"installer::crate_installer::crate_installer_test::install_already_installed_crate_only_version_equal",
"installer::crate_version_check::crate_version_check_test::is_min_version_valid_newer_version",
"installer::crate_version_check::crate_version_check_t... | [] | auto_2025-06-12 |
sagiegurari/cargo-make | 866 | sagiegurari__cargo-make-866 | [
"862"
] | 768f14bd85713d9a5822672c39e5044b3d065a61 | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -369,6 +370,12 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "dissimilar"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "210ec60ae7d710bed8683e333e9d2855a8a56a3e9892b38bad3bb0d4d29b0d... | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -176,6 +176,7 @@ dependencies = [
"duckscript",
"duckscriptsdk",
"envmnt",
+ "expect-test",
"fern",
"fsio",
"git_info",
diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -468,6 +475,16 @@ version = "10.0.0"
so... | merge together alias tasks in `--list-all-steps`
### Feature Description
<!-- A clear description of the feature request. -->
### Describe The Solution You'd Like
<!-- A clear and concise description of what you want to happen. -->
Change
```
Misc
----------
l - Description
logs - Description
```
To
`... | cool idea. would you like to PR that?
i think all code should go into:
https://github.com/sagiegurari/cargo-make/blob/master/src/lib/cli_commands/list_steps.rs
> would you like to PR that?
Yes I can do it. | 2023-06-08T21:48:52Z | 0.36 | 2023-06-10T14:52:51Z | 74e54adeefbd609c5d163c6df66b787e43740428 | [
"cache::cache_test::load_from_path_not_exists",
"cli::cli_test::run_bad_subcommand - should panic",
"cache::cache_test::load_from_path_exists",
"cli_commands::list_steps::list_steps_test::run_empty",
"cli_commands::diff_steps::diff_steps_test::run_missing_task_in_first_config - should panic",
"cli_command... | [] | [] | [] | auto_2025-06-12 |
est31/cargo-udeps | 132 | est31__cargo-udeps-132 | [
"131"
] | 254ed0f73e3dafd182d89d6c82e2b6ca8e6eec34 | diff --git a/src/lib.rs b/src/lib.rs
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -48,6 +48,7 @@ pub fn run<I: IntoIterator<Item = OsString>, W: Write>(args :I, config :&mut Con
enum Opt {
#[structopt(
about,
+ version,
name = "udeps",
after_help(
"\
| diff --git /dev/null b/tests/version_exists.rs
new file mode 100644
--- /dev/null
+++ b/tests/version_exists.rs
@@ -0,0 +1,37 @@
+mod runner;
+
+use anyhow::anyhow;
+use cargo::CargoResult;
+use pretty_assertions::assert_eq;
+
+use crate::runner::Runner;
+
+use std::{fmt, error};
+
+#[derive(Debug)]
+enum VersionError ... | Bring Back Version Information
A recent update broke the `--version` flag which is used to ensure we're on the same version of `udeps`.
Please bring that flag back to ensure consistency and the ability to check if we're on a recent version.
| 2022-08-07T02:39:53Z | 0.1 | 2022-08-07T04:18:07Z | 254ed0f73e3dafd182d89d6c82e2b6ca8e6eec34 | [
"check_version_exists"
] | [] | [
"ignore_all",
"ignore_if_chain",
"without_all_targets",
"with_all_targets",
"unused_transitive",
"hide_unused_transitive"
] | [] | auto_2025-06-12 | |
watchexec/cargo-watch | 177 | watchexec__cargo-watch-177 | [
"77"
] | 00205380f91a3ec8a644aa079e4a134e5c68f359 | diff --git a/src/args.rs b/src/args.rs
--- a/src/args.rs
+++ b/src/args.rs
@@ -2,7 +2,7 @@ use clap::{App, AppSettings, Arg, ArgMatches, ErrorKind, SubCommand};
use std::{env, process};
pub fn parse() -> ArgMatches<'static> {
- let footnote = "Cargo commands (-x) are always executed before shell commands (-s). Y... | diff --git a/src/options.rs b/src/options.rs
--- a/src/options.rs
+++ b/src/options.rs
@@ -15,51 +15,6 @@ pub fn set_commands(builder: &mut ConfigBuilder, matches: &ArgMatches) {
// and before the remaining arguments
let features = value_t!(matches, "features", String).ok();
- // Cargo commands are in fr... | Cargo commands with `-x` are always executed before shell commands with `-s`?
# Reproduction steps
Use `-s foo` option before `-x bar` option.
# Expected behavior
Commands specified by `-s` and `-x` options are executed in the given order.
(For example, `cargo watch -s foo -x bar` runs `foo` and then `cargo bar`.... | This is at the bottom of the help message, and in the readme:
```
Cargo commands (-x) are always executed before shell commands (-s).
```
This is a consequence of the library used for arguments, Clap. It doesn't convey ordering information between different options. If you want this feature, you'll need to requ... | 2021-07-17T13:48:38Z | 8.1 | 2022-01-22T04:32:46Z | 00205380f91a3ec8a644aa079e4a134e5c68f359 | [
"without_announce",
"with_announce",
"with_error"
] | [
"with_poll",
"without_cargo",
"without_watch"
] | [
"without_poll",
"with_cargo"
] | [] | auto_2025-06-12 |
mozilla/cbindgen | 401 | mozilla__cbindgen-401 | [
"397"
] | 5b4cda0d95690f00a1088f6b43726a197d03dad0 | diff --git a/src/bindgen/bindings.rs b/src/bindgen/bindings.rs
--- a/src/bindgen/bindings.rs
+++ b/src/bindgen/bindings.rs
@@ -2,10 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+use std::cell::RefCell;
+use std::collec... | diff --git a/tests/expectations/associated_in_body.cpp b/tests/expectations/associated_in_body.cpp
--- a/tests/expectations/associated_in_body.cpp
+++ b/tests/expectations/associated_in_body.cpp
@@ -32,11 +32,11 @@ struct StyleAlignFlags {
static const StyleAlignFlags END;
static const StyleAlignFlags FLEX_START;... | Initialize struct literals with list-initializer
On cbindgen 0.9.1, Values of bitflags are converted to static const items with designated initializer.
But designated initializer is not available in C++11. Sadly, It is available in C++20. https://en.cppreference.com/w/cpp/language/aggregate_initialization#Designated... | 2019-10-12T13:18:55Z | 0.9 | 2019-11-18T02:03:42Z | 5b4cda0d95690f00a1088f6b43726a197d03dad0 | [
"test_struct_literal_order"
] | [
"bindgen::mangle::generics",
"test_no_includes",
"test_custom_header",
"test_include_guard",
"test_cfg_field",
"test_alias",
"test_cdecl",
"test_docstyle_doxy",
"test_docstyle_c99",
"test_assoc_constant",
"test_annotation",
"test_body",
"test_array",
"test_include_item",
"test_assoc_cons... | [
"test_expand_features",
"test_expand_default_features",
"test_expand_dep",
"test_expand",
"test_expand_no_default_features"
] | [] | auto_2025-06-12 | |
mozilla/cbindgen | 332 | mozilla__cbindgen-332 | [
"331"
] | 46aed0802ae6b3e766dfb3f36680221c29f9d2fc | diff --git a/src/bindgen/cargo/cargo.rs b/src/bindgen/cargo/cargo.rs
--- a/src/bindgen/cargo/cargo.rs
+++ b/src/bindgen/cargo/cargo.rs
@@ -6,9 +6,11 @@ use std::path::{Path, PathBuf};
use bindgen::cargo::cargo_expand;
use bindgen::cargo::cargo_lock::{self, Lock};
+pub(crate) use bindgen::cargo::cargo_metadata::Pack... | diff --git a/src/bindgen/cargo/cargo_metadata.rs b/src/bindgen/cargo/cargo_metadata.rs
--- a/src/bindgen/cargo/cargo_metadata.rs
+++ b/src/bindgen/cargo/cargo_metadata.rs
@@ -24,23 +26,28 @@ use serde_json;
/// Starting point for metadata returned by `cargo metadata`
pub struct Metadata {
/// A list of all crate... | Plan For Refactor: Ignore Extern Crates Completely
In Rust 2018 you're idiomatically supposed to avoid using `extern crate` as much as possible (not always possible). This means cbindgen cannot rely on `extern crate` being present.
At the same time, even if `extern crate` is present, that name might be a rename tha... | 2019-04-30T19:11:42Z | 0.8 | 2019-05-02T21:39:41Z | 46aed0802ae6b3e766dfb3f36680221c29f9d2fc | [
"bindgen::mangle::generics",
"test_no_includes",
"test_docstyle_doxy",
"test_inner_mod",
"test_global_attr",
"test_union",
"test_nonnull",
"test_lifetime_arg",
"test_typedef",
"test_prefixed_struct_literal",
"test_item_types",
"test_docstyle_auto",
"test_cfg_field",
"test_assoc_const_confl... | [] | [] | [] | auto_2025-06-12 | |
mozilla/cbindgen | 293 | mozilla__cbindgen-293 | [
"100"
] | e712cc42c759ace3e47a6ee9fdbff8c4f337cec1 | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -34,6 +34,8 @@ version = "0.8.0"
dependencies = [
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.25 (registry+https://github.com/... | diff --git a/.travis.yml b/.travis.yml
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,11 +9,11 @@ addons:
sources:
- ubuntu-toolchain-r-test
packages:
- - gcc-4.9
- - g++-4.9
-env:
- - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
+ - gcc-7
+ - g++-7
script:
+ - export CC=gcc-... | Handle bitflags
It would be nice to be able to use [`bitflags!`](https://github.com/rust-lang-nursery/bitflags) and have nice output generated. Ideally the output of macro expansion would just naturally work.
Currently the output of a `bitflags!` macro is a struct containing an integer, some trait implementations, a... | I can confirm the expanded output does work outside of the associated constants. For instance, with macro expansion enabled, this
```rust
bitflags! {
#[repr(C)]
pub struct Flags: u32 {
const A = 0b00000001;
}
}
#[no_mangle]
pub extern "C" fn call_flag(value: &Flags) -> u32 {
value.... | 2019-02-24T02:01:02Z | 0.8 | 2019-02-26T05:39:16Z | 46aed0802ae6b3e766dfb3f36680221c29f9d2fc | [
"bindgen::mangle::generics"
] | [] | [] | [] | auto_2025-06-12 |
mozilla/cbindgen | 519 | mozilla__cbindgen-519 | [
"518"
] | b6b88f8c3024288287368b377e4d928ddcd2b9e2 | diff --git a/docs.md b/docs.md
--- a/docs.md
+++ b/docs.md
@@ -335,7 +348,6 @@ Given configuration in the cbindgen.toml, `cbindgen` can generate these attribut
This is controlled by the `swift_name_macro` option in the cbindgen.toml.
-
## cbindgen.toml
Most configuration happens through your cbindgen.toml file... | diff --git a/docs.md b/docs.md
--- a/docs.md
+++ b/docs.md
@@ -235,6 +235,19 @@ An annotation may be a bool, string (no quotes), or list of strings. If just the
Most annotations are just local overrides for identical settings in the cbindgen.toml, but a few are unique because they don't make sense in a global contex... | Exclude parsing of module paths in crate
Hello! I ran into an issue with cbindgen where I want to expose multiple C interfaces in a single static/dynamic library but want to avoid including one of these interfaces in the generated header file.
The reason for this is that our Wasm runtime has a C API but we also wan... | Can you post a concrete example so that I can wrap my head around it please?
You can conditionally import / define stuff using `#[cfg]`, but I understand that what you want is to completely ignore a module, right?
I wonder if something like:
```rust
#[cbindgen::ignore]
mod foo;
```
or such?
Sure, but the... | 2020-05-01T02:40:21Z | 0.14 | 2020-05-15T13:43:59Z | 6b4181540c146fff75efd500bfb75a2d60403b4c | [
"bindgen::mangle::generics",
"test_const_conflict",
"test_bitflags",
"test_no_includes",
"test_cfg_field",
"test_documentation_attr",
"test_cdecl",
"test_export_name",
"test_function_sort_name",
"test_docstyle_c99",
"test_function_sort_none",
"test_cfg",
"test_constant_constexpr",
"test_as... | [] | [] | [] | auto_2025-06-12 |
mozilla/cbindgen | 501 | mozilla__cbindgen-501 | [
"500"
] | 6fd245096dcd5c50c1065b4bd6ce62a09df0b39b | diff --git a/src/bindgen/library.rs b/src/bindgen/library.rs
--- a/src/bindgen/library.rs
+++ b/src/bindgen/library.rs
@@ -54,7 +54,6 @@ impl Library {
}
pub fn generate(mut self) -> Result<Bindings, Error> {
- self.remove_excluded();
self.transfer_annotations();
self.simplify_stand... | diff --git /dev/null b/tests/expectations/both/exclude_generic_monomorph.c
new file mode 100644
--- /dev/null
+++ b/tests/expectations/both/exclude_generic_monomorph.c
@@ -0,0 +1,15 @@
+#include <stdint.h>
+
+typedef uint64_t Option_Foo;
+
+
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <std... | Manually avoid declaring opaque structs
My code uses the following types on the FFI:
```rust
struct Foo(NonZeroU64);
struct Bar {
foo: Option<Foo>,
}
```
What I want here really is `foo: u64`.
What `cbindgen` ends up producing is:
```cpp
typedef struct Option_Foo Option_Foo;
```
It looks like this opa... | @emilio @Gankra could you post your thoughts on that?
We need to confer with the Rust devs to verify that `Option<NonZeroU64>` actually has the Integer type kind in rustc's ABI lowering (naively it is an Aggregate), and that this is guaranteed. As is, the libs docs only guarantee that it has the same size.
It's also... | 2020-03-31T15:44:12Z | 0.13 | 2020-04-01T09:46:05Z | 6fd245096dcd5c50c1065b4bd6ce62a09df0b39b | [
"test_exclude_generic_monomorph"
] | [
"bindgen::mangle::generics",
"test_include_guard",
"test_custom_header",
"test_no_includes",
"test_cell",
"test_assoc_constant",
"test_char",
"test_docstyle_auto",
"test_docstyle_doxy",
"test_const_transparent",
"test_bitflags",
"test_assoc_const_conflict",
"test_reserved",
"test_cfg_2",
... | [
"test_expand_no_default_features",
"test_expand_dep",
"test_expand_features",
"test_expand",
"test_expand_default_features",
"test_expand_dep_v2"
] | [] | auto_2025-06-12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.