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 ee0fe9c commit 5ee7d6bc5383de0e49d49051dfe23c85cb9fa0f3
@Vladimir Panteleev Vladimir Panteleev authored on 30 May 2023
Mathias LANG committed on 11 Jan 2024
Showing 5 changed files
View
source/dub/project.d
View
test/issue2650-deprecated-modules/.no_build 0 → 100644
View
test/issue2650-deprecated-modules/.no_run 0 → 100644
View
test/issue2650-deprecated-modules/dub.sdl 0 → 100644
View
test/issue2650-deprecated-modules/source/test.d 0 → 100644