digitalmars.D.bugs - [Issue 11764] New: [REG2.065a]std.getopt broken
- d-bugmail puremagic.com (31/31) Dec 18 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11764
- d-bugmail puremagic.com (11/11) Dec 18 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11764
- d-bugmail puremagic.com (11/11) Dec 18 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11764
- d-bugmail puremagic.com (16/16) Dec 18 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11764
- d-bugmail puremagic.com (10/16) Dec 18 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11764
- d-bugmail puremagic.com (6/6) Dec 18 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11764
- d-bugmail puremagic.com (6/6) Dec 18 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11764
- d-bugmail puremagic.com (11/11) Dec 18 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11764
- d-bugmail puremagic.com (9/9) Dec 18 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11764
https://d.puremagic.com/issues/show_bug.cgi?id=11764 Summary: [REG2.065a]std.getopt broken Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: zan77137 nifty.com This code doesn't work (git HEAD): import std.getopt; import std.stdio; void main() { auto args = ["main", "-test"]; bool opt; args.getopt(config.passThrough, "opt", &opt); writeln(args); assert(args == ["main", "-test"]); } ---- $ dmd -run main ["main", "-t", "est"] core.exception.AssertError main(10): Assertion failure -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 18 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11764 monarchdodra gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra gmail.com Introduced by: https://github.com/D-Programming-Language/phobos/pull/1779 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 18 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11764 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich gmail.com 09:38:18 PST --- I guess getopt should check whether the option exists before it tries to separate "-abc" to -a=bc? -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 18 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11764 Andrei Alexandrescu <andrei erdani.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrei erdani.com PST --- This is intentional because arguably the use was incorrectly accepted. The commonly used convention is to either use short (single-letter) options with single dash, or long options (multi-letter) with double dashes. The use '-test' is currently interpreted as "pass argument est to the single-letter option -t". That said, a regression is what it is so perhaps we need to continue supporting the old mistake. I'll look into it. Please advise. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 18 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11764 10:23:56 PST ---This is intentional because arguably the use was incorrectly accepted. The commonly used convention is to either use short (single-letter) options with single dash, or long options (multi-letter) with double dashes. The use '-test' is currently interpreted as "pass argument est to the single-letter option -t".I think the OPs point however is that the passThrough option should let *you* handle any unsupported syntax like single-dash long options *after* getopt is done, hence why it should not split up "-test" (if there's no -t option then it should arguably not try to split up -test). -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 18 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11764 PST --- Oh I see. Nice! -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 18 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11764 PST --- https://github.com/D-Programming-Language/phobos/pull/1783 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 18 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11764 Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/4900690b77ebcd0ae3248119f706e0efac7dcfdc Fix issue 11764 https://github.com/D-Programming-Language/phobos/commit/ac83fa77067e50142723d480614ec72d6c40a459 Fix issue 11764 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 18 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11764 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 18 2013