forked from Cutieguwu/raven
Filter out all non-source files before feeding to javac.
This commit is contained in:
@@ -43,6 +43,4 @@ raven run main.Main
|
||||
will be implemented should there arise a need.
|
||||
- [ ] Wrap errors properly, instead of hap-hazardly using `anyhow`
|
||||
- [ ] Maybe proper logging?
|
||||
- [ ] Make `fs::expand_files()` skip over non-`.java` files or properly handle
|
||||
that.
|
||||
- [ ] Fix using hashes to avoid unnesscesary recompilation.
|
||||
|
||||
@@ -185,7 +185,13 @@ fn new(project_name: String) -> anyhow::Result<()> {
|
||||
}
|
||||
|
||||
fn build() -> anyhow::Result<()> {
|
||||
let mut targets = crate::fs::expand_files(DIR_SRC.as_path())?;
|
||||
let mut targets: Vec<PathBuf> = crate::fs::expand_files(DIR_SRC.as_path())?
|
||||
.into_iter()
|
||||
.filter(|f| {
|
||||
f.extension()
|
||||
.is_some_and(|ext| ext.to_str().is_some_and(|ext| ext == JAVA_EXT_SOURCE))
|
||||
})
|
||||
.collect();
|
||||
let mut nest_lock = NestLock::load().unwrap_or_default();
|
||||
|
||||
nest_lock.update();
|
||||
|
||||
Reference in New Issue
Block a user