Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One comment in particular on Reddit really hit me:
This has changed my perspective of a hard fail, even if they could just bump the date. There's also #1 to think about and solve, so making these not block the dependency tree goes hand in hand with making it a warning instead.
The first step here is just adding
#[cfg(test)]
to the compile_error!() call. That "solves" the build problem pretty cleanly, in fact. As expected, when building a project I am not blocked. The editor still shows the compiler error when I hover over, which is nice. Tests with todo_by!() calls that have expired will fail. So the tests are still not completely solved because my dependencies could have todo_by!() calls that cause my tests to fail even though I didn't change anything. Not good.Since Macro Diagnostics are still not ready for Stable Rust, @Emilgardis showcased a workaround we can pull from where we pass the error message through a "deprecated" warning.
I'm going to attempt to keep the compiler error in the editor (that's a nice visual reminder), but never have it run, even in tests. I'd rather just show the warnings, and even then I hope to be able to scope it to the current project and not show warnings from dependencies - that hopefully happens out of the box with deprecation warnings!