From a6734c45ab6a5b304d19b1d6391dc9ad88eabe02 Mon Sep 17 00:00:00 2001 From: Shea Frembling Date: Mon, 23 Mar 2026 20:09:19 -0600 Subject: [PATCH] Fix bug with nested / moduled c files not compiling (#30) closes #29 Reviewed-on: http://192.168.1.227:3000/sfrembling/pallet/pulls/30 Co-authored-by: Shea Frembling Co-committed-by: Shea Frembling --- src/app.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app.rs b/src/app.rs index c6f7c4f..603bb0c 100644 --- a/src/app.rs +++ b/src/app.rs @@ -482,7 +482,7 @@ fn gen_compile_commands(mode: &Option) -> std::io::Result<()> { let cwd = std::env::current_dir()?; let obj_dir = format!("target/{}/obj", build_config.name); - let source_files: Vec = glob("src/*.c") + let source_files: Vec = glob("src/**/*.c") .map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))? .filter_map(|e| e.ok()) .collect(); @@ -665,7 +665,7 @@ fn build(mode: &Option, force_recompile: bool) -> std::io::Result<()> { .collect(); } - let source_files: Vec = glob("src/*.c") + let source_files: Vec = glob("src/**/*.c") .map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))? .filter_map(|e| e.ok()) .collect(); @@ -814,7 +814,7 @@ fn clean() -> std::io::Result<()> { } fn fmt() -> std::io::Result<()> { - let source_files: Vec = glob("src/*.c") + let source_files: Vec = glob("src/**/*.c") .map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))? .chain( glob("src/*.h") @@ -846,7 +846,7 @@ fn fmt() -> std::io::Result<()> { fn lint() -> std::io::Result<()> { gen_compile_commands(&None)?; - let source_files: Vec = glob("src/*.c") + let source_files: Vec = glob("src/**/*.c") .map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))? .filter_map(|e| e.ok()) .collect();