Skip to content
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

Update README on automatically include new files #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jc4x4
Copy link

@jc4x4 jc4x4 commented Mar 28, 2024

See discussion in #22.

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

For the regression test use case, I am not sure that this is an appropriate recommendation. It would cause the library to be rebuilt every time any test is modified, which is bad in two ways:

  • The lib target is getting rebuilt, not just the test target as would be necessary.
  • The unneeded rebuild occurs on every modification, not just on newly added files, so this can severely affect the inner loop of iterating on those files.

@jc4x4
Copy link
Author

jc4x4 commented Apr 26, 2024

Thanks!

For the regression test use case, I am not sure that this is an appropriate recommendation. It would cause the library to be rebuilt every time any test is modified, which is bad in two ways:

* The lib target is getting rebuilt, not just the test target as would be necessary.

* The unneeded rebuild occurs on every modification, not just on newly added files, so this can severely affect the inner loop of iterating on those files.

For the regression test case, I expect that when a new regression test is added, the next cargo test should exercise it. Without a build script change, the user would have to manually do a clean build, which isn't very intuitive and obvious.

It would certainly be nice if there is a way to only rebuild for new file, not modification. If there are too many rebuilds, one can isolate the regression test cases into a separate crate. That way, the rebuild only affects what's inside the crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants