[Issue 20015] New: [REG 2.086] Deprecated -preview, -revert, and -transition options not documented

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 30 19:52:01 UTC 2019


          Issue ID: 20015
           Summary: [REG 2.086] Deprecated -preview, -revert, and
                    -transition options not documented
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org

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
+        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
-        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)
             buf ~= "  =";


More information about the Digitalmars-d-bugs mailing list