Using "cleanCargoSource" with include_str and a non-rs file will break the build
As the title says, currently it will also clean depended files.
I understand that this is not something that is easily fixed, but I believe all the information is there to get the information.
I wonder though if cargo is able to give this list itself, or if it can be computed for the case of include_str!
crane needs to be able to figure out this list before it starts really touching and running anything, so there's probably no way to improve it.
Thanks for the report @TheNeikos! Yes cleanCargoSource is fairly aggressive in what it filters out as a nice default to avoid unnecessary rebuilds for most projects.
It is possible to write a custom filter that includes additional files for projects which do depend on additional files like this. Does this help?
Closing as this is the intended behavior of cleanCargoSource, but feel free to reopen if you have other questions!