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

dub_test_root is deprecated, but used by unit test runners like Silly #2998

Open
ArthaTi opened this issue Feb 8, 2025 · 2 comments
Open

Comments

@ArthaTi
Copy link

ArthaTi commented Feb 8, 2025

Silly uses UDAs to name unittests. These UDAs are not normally available at runtime to the test runner, so Silly uses traits to fetch them from all known modules. It uses dub_test_root to do so, which has recently been deprecated.

I don't believe there exists a suitable replacement to access all modules at compile time, so I don't think it is appropriate to deprecate dub_test_root.

@rikkimax
Copy link
Contributor

rikkimax commented Feb 8, 2025

I do agree that splitting it out and having it opt-in would be a good feature to have, I don't think you have the full picture here: #2650

@ArthaTi
Copy link
Author

ArthaTi commented Feb 8, 2025

Thanks for the link! I had no idea indeed.

If it's deprecated only to fix deprecation build failures, then maybe it would be a good idea to add some informative text inside the deprecation itself.

As it is the compiler's entry point, the module itself will not cause a deprecation warning, and it importing deprecating modules will not cause deprecation warnings (as there is no longer a transition of deprecation state).

So I suppose the only way to fix this would be to mark silly as deprecated from inside of itself?

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

No branches or pull requests

2 participants