Skip to content

Commit

Permalink
fix: static files not being copied in incremental build
Browse files Browse the repository at this point in the history
  • Loading branch information
harshdoesdev authored and Arpita-Jaiswal committed Jan 25, 2024
1 parent f6aeced commit af925fc
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions fastn-core/src/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,29 @@ async fn incremental_build(
let mut processed: Vec<String> = vec![];

if cache_hit {
let mut unresolved_dependencies: Vec<String> = documents
.iter()
.filter(|(_, f)| f.is_ftd())
.map(|(_, f)| remove_extension(f.get_id()))
.collect_vec();
let mut unresolved_dependencies = vec![];
let mut resolved_dependencies: Vec<String> = vec![];
let mut resolving_dependencies: Vec<String> = vec![];

for file in documents.values() {
// copy static files
if file.is_static() {
handle_file(
file,
config,
base_url,
ignore_failed,
test,
true,
Some(&mut c),
)
.await?;
continue;
}

unresolved_dependencies.push(remove_extension(file.get_id()));
}

while let Some(unresolved_dependency) = unresolved_dependencies.pop() {
// println!("Current UR: {}", unresolved_dependency.as_str());
if let Some(doc) = c.documents.get(unresolved_dependency.as_str()) {
Expand Down

0 comments on commit af925fc

Please sign in to comment.