-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When only asset filenames change ambient build
doesn't seem to pick them up
#1176
Comments
It does not at the moment. We currently have |
Yep, that will rebuild the whole project, leading to those unknowns where someone says "It doesn't work" and the other reply "try Is there any reason |
Not sure, I have not personally worked on that part. I know that there has been a bunch of discussion for how to accurately hash and detect these without leading to cycles, there's been discussion about hashing and baking those into the package itself, to solve this issue when publishing, see: #792. |
@FredrikNoren and @philpax may have more insight on this. |
Interesting - the build-skip check checks if any files have a modified date after the last build. My guess is that renaming a file doesn't count as a modification? 🤔 The proper fix is probably #792, as Freja mentioned - we should hash the inputs and use that for change detection. |
If you are already checking the file modifications, then for adding removing or renaming files, possibly we need to check whether the directory changed as well, not only the files. Unless, that is what we are already doing.
|
@fabiopolimeni Was this on Windows or Mac? |
let last_modified_time = get_files_in_path(&package_path)
.filter(|p| !p.starts_with(&build_path) && !p.starts_with(&package_individual_build_path))
.filter_map(|f| f.metadata().ok()?.modified().ok())
.map(chrono::DateTime::<chrono::Utc>::from)
.chain(dependency_max_last_build_times.into_iter())
.max();
let last_modified_before_build = last_build_time
.zip(last_modified_time)
.is_some_and(|(build, modified)| modified < build); https://doc.rust-lang.org/std/fs/struct.Metadata.html#method.modified EDIT: perhaps we consider both |
I would say so, |
That should still work OK - it'll just pick up zero built files ( I can add |
Of course |
It seems that if I rename an asset file, for instance, a GLB file packed with animations, and then execute an
ambient build
the project will not be rebuilt, and therefore, my new packaged animations path will not be created. I suspectambient build
does not figure it needs to rebuild the pipelines because no rust source file has changed?I use VSCode and build through Command+Shift+B on MacOS.
The text was updated successfully, but these errors were encountered: