Skip to content

Commit 90f2a0c

Browse files
committed
Allow building deprecated modules without deprecation warnings
The compiler issues a deprecation warning only on a "non-deprecated" -> "deprecated" transition. As such, building or testing Dub packages which have deprecated modules when a dub_test_root.d file needs to be generated will cause deprecation warnings. This in turn makes it impossible to use `buildRequirements "disallowDeprecations"` in this situation. Fix this by simply making the auto-generated root module (dub_test_root) deprecated. 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).
1 parent 8d87794 commit 90f2a0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/dub/project.d

+1-1
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,7 @@ final class SelectedVersions {
19111911

19121912
/// The template code from which the test runner is generated
19131913
private immutable TestRunnerTemplate = q{
1914-
module dub_test_root;
1914+
deprecated module dub_test_root;
19151915

19161916
import std.typetuple;
19171917

0 commit comments

Comments
 (0)