Bug 20015 – [REG 2.086] Deprecated -preview, -revert, and -transition options not documented

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-06-30T19:52:01Z
Last change time
2022-03-27T02:24:24Z
Keywords
pull
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2019-06-30T19:52:01Z
Caused by PR/9636, commit 625c75a1b3a620ac884e89be778e2528f66f2d47 In generateFeatureUsage(), printing help information is skipped, despite the documented fields being explicitly set to true. I'd expect that instead, the words "[DEPRECATED]" would appear in big letters next to the option. For context, you can see the bug introduced from this specific part of the patch series for PR/9636: diff --git a/src/dmd/cli.d b/src/dmd/cli.d index 7234816cd..d0d6668f8 100644 --- a/src/dmd/cli.d +++ b/src/dmd/cli.d @@ -671,10 +671,11 @@ dmd -cov -unittest myprog.d string paramName; // internal transition parameter name string helpText; // detailed description of the feature bool documented = true; // whether this option should be shown in the documentation + bool deprecated_; /// whether the feature is still in use } /// Returns all available transitions @@ -682,7 +686,7 @@ dmd -cov -unittest myprog.d Feature("field", "vfield", "list all non-mutable fields which occupy an object instance"), Feature("checkimports", "check10378", - "give deprecation messages about 10378 anomalies"), + "give deprecation messages about 10378 anomalies", true, true), Feature("complex", "vcomplex", "give deprecation messages about all usages of complex or imaginary types"), Feature("tls", "vtls", @@ -694,7 +698,7 @@ dmd -cov -unittest myprog.d /// Returns all available reverts static immutable reverts = [ Feature("dip25", "noDIP25", "revert DIP25 changes https://github.com/dlang/DIPs/blob/master/DIPs/archive/DIP25.md"), - Feature("import", "bug10378", "revert to single phase name lookup"), + Feature("import", "bug10378", "revert to single phase name lookup", true, true), ]; /// Returns all available previews @@ -777,6 +781,8 @@ struct CLIUsage "list information on all " ~ description)] ~ features; foreach (t; allTransitions) { + if (t.deprecated_) + continue; if (!t.documented) continue; buf ~= " =";
Comment #1 by bugzilla — 2019-12-18T10:54:08Z
Comment #2 by dlang-bot — 2022-03-08T13:35:38Z
@RazvanN7 created dlang/dmd pull request #13784 "Fix Issue 20015 - [REG 2.086] Deprecated -preview, -revert, and -transition options not documented" fixing this issue: - Fix Issue 20015 - [REG 2.086] Deprecated -preview, -revert, and -transition options not documented https://github.com/dlang/dmd/pull/13784
Comment #3 by dlang-bot — 2022-03-15T12:46:28Z
dlang/dmd pull request #13784 "Fix Issue 20015 - [REG 2.086] Deprecated -preview, -revert, and -transition options not documented" was merged into stable: - 20c45b0875ddb73153c186104d616c0654fd7e1f by RazvanN7: Fix Issue 20015 - [REG 2.086] Deprecated -preview, -revert, and -transition options not documented https://github.com/dlang/dmd/pull/13784
Comment #4 by dlang-bot — 2022-03-27T02:24:24Z
dlang/dmd pull request #13892 "Merge stable into master" was merged into master: - 53f9e4aa8f817ce9c7a68ed96adbdd0b620fa3d5 by RazvanN7: Fix Issue 20015 - [REG 2.086] Deprecated -preview, -revert, and -transition options not documented https://github.com/dlang/dmd/pull/13892