Bug 12567 – Modules can't be marked as deprecated

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-12T21:51:00Z
Last change time
2015-02-18T03:40:10Z
Keywords
pull
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2014-04-12T21:51:05Z
----- deprecated("This module is deprecated, use module bar instad.") module foo; void main() { } ----- foo.d(2): Error: Declaration expected, not 'module'
Comment #1 by code — 2014-07-16T14:56:53Z
I was just about to write the same enhancement, because the lack of this feature causes problems when a deprecated module is finally removed. Just recently std.metastrings was dropped from phobos which breaks vibe.d 0.7.20 because it still has unused imports of std.metastrings [1]. I'd settle on the same syntax. The important part is, that this deprecation is triggered on import. [1]: https://github.com/rejectedsoftware/vibe.d/pull/706
Comment #2 by hsteoh — 2014-07-16T16:25:20Z
Yeah we need this, otherwise if the user imports a module but doesn't actually use it, they won't see any deprecation messages, and then it will just stop compiling when the module is dropped.
Comment #3 by k.hara.pg — 2014-08-27T14:55:50Z
Comment #4 by github-bugzilla — 2014-08-27T17:29:55Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2af112ec0f156c19b63a9d8269b37ba0555c5857 fix Issue 12567 - Modules can't be marked as deprecated https://github.com/D-Programming-Language/dmd/commit/a93bfc1af201cdead3fb1f02a1e8a2081a3cad21 Merge pull request #3907 from 9rnsr/fix12567 [enh] Issue 12567 - Modules can't be marked as deprecated
Comment #5 by k.hara.pg — 2014-08-28T14:27:28Z
Comment #6 by github-bugzilla — 2014-08-28T14:56:02Z
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/a9ccb01bc4d09932f5ca74758f4c3470d1f39586 fix Issue 12567 - Modules can't be marked as deprecated https://github.com/D-Programming-Language/dlang.org/commit/764503c065fa0d06262bc9261128f61c0ddc2639 Merge pull request #642 from 9rnsr/fix12567 Issue 12567 - Modules can't be marked as deprecated
Comment #7 by github-bugzilla — 2014-09-11T20:31:17Z
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/313a89e2c6f9c0cee389a16a98b6804541c1c270 Backport "Modules can't be marked as deprecated" Original D2 commit : 2af112ec0f156c19b63a9d8269b37ba0555c5857 "fix Issue 12567 - Modules can't be marked as deprecated "
Comment #8 by github-bugzilla — 2014-10-11T20:38:21Z
Commit pushed to 2.066 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/194b4c216b828fff9430e0b1fcd4163761731330 Merge pull request #3907 from 9rnsr/fix12567 [enh] Issue 12567 - Modules can't be marked as deprecated Conflicts: src/hdrgen.c src/module.c
Comment #9 by github-bugzilla — 2015-02-18T03:40:10Z