-
Notifications
You must be signed in to change notification settings - Fork 43
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
New #[files] feature does not recompile on file change #220
Comments
Sorry, isn't possible to handle this without introducing a That's really sad.... |
Yes I also couldn't quite figure it out how to do it in a sensible way without a |
It does look like something nightly-only exists which might be stabilized at some point, not sure if we can do much except wait for that. |
Yes... but maybe is not enough because you can track files but not folder. |
Seems like it does allow for folder tracking, but it might not support globbing, which is unfortunate. |
In #256 I wrote some notes about how to handle this in the most of the cases. Intended, with the use of |
I have a large project with many files that I read as integration tests.
I saw the new #[files] feature and love it.
However, I would expect it to automatically pick up when I add new files to a directory that matches the glob pattern. This does currently seem to happen. If I add a file and run the (already compiled) crate, I do not get the new test case. However if I go in and force the crate to recompile by changing some arbitrary line of code, then the new test case seems to run.
I should probably mention here that my test files are outside the
src
directory, in a separatetests
directory. I'm unsure if cargo picks up on the changed files automatically if they are all insidesrc
My current workaround is just to call
touch src/lib.rs
before running the tests, as that seems to force cargo to recompile.The text was updated successfully, but these errors were encountered: