http://d.puremagic.com/issues/show_bug.cgi?id=7041
Summary: [PATCH] Add -di option to show deprecated errors as
warnings
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody@puremagic.com
ReportedBy: llucax@gmail.com
--- Comment #0 from Leandro Lucarella <llucax@gmail.com> 2011-12-01 03:30:37 PST ---
The new option -di treats deprecation errors as informational warnings,
just like -wi show warnings as informational messages without triggering
errors. This would enable users to have a better update path from deprecated
features, as they can be reminded (annoyed) with warnings but they can still
compile their code.
Patches available as a pull request in Github:
https://github.com/D-Programming-Language/dmd/pull/248--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

http://d.puremagic.com/issues/show_bug.cgi?id=7041
--- Comment #1 from Leandro Lucarella <leandro.lucarella@sociomantic.com> 2012-02-02 04:07:32 PST ---
> We already have so many options for deprecation and warnings, I am hard
> pressed to agree that adding more will help more than just add complexity.
The problem for me is, the way deprecated works now it's completely useless for
our workflow at least. We have programs that use libraries, those libraries get
updated often and sometimes things are deprecated.
If the programs are compiled with -d, you never get noticed about when
something is deprecated, but when they were actually removed, then you have to
give immediate attention to fix that part of the code, which might not be what
you want.
If programs are compiled without -d, then you get an error whenever something
is deprecated, then you have to give immediate attention to fix that part of
the code, which might not be what you want.
This forces you to change your priorities. Sometimes I need to update a library
because I need to use a new feature, but I have other priorities than fixing
all the deprecation errors.
For me the whole thing about deprecation is to *ease* the update path, not to
force it. If I want to force it, I just remove the stuff and that's it.
I think options are a matter of taste, I'm used to GCC so I can manage several
hundreds of options (and I even like the flexibility). What are you scared
about having more options? Are you concerned about complexity in code or just
about people being scared about dmd help message being too long?
If is the former, I think the patch makes the code simpler with the
introduction of the deprecation() function. If is the later, you could show a
simplified help and have an option to show the full help (--advanced-help or
whatever).
Also I wouldn't mind *at all* making deprecation warnings by default if you
don't want to add more switches, or adding them to -wi or whatever, I just
think the current situation with deprecation is just the worse possible.
That said, I still would appreciate having the option of making deprecation
errors (because sometimes is useful to use it as a commit hook or some other
automatic testing).
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

http://d.puremagic.com/issues/show_bug.cgi?id=7041
Walter Bright <bugzilla@digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla@digitalmars.com
--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2012-02-04 02:06:29 PST ---
More and more switches for is it a warning? is it an error? makes for a rat's
nest of confusion. I don't find the gcc example of thousands (!) of switches to
be an example to emulate. Remember, each switch adds a burden of testing and
documenting as well.
The workflow is designed to ignore them until you're ready to fix them, then
just fix the lot in one go. Each one should be trivial to do.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

http://d.puremagic.com/issues/show_bug.cgi?id=7041
--- Comment #3 from Leandro Lucarella <leandro.lucarella@sociomantic.com> 2012-02-06 09:51:22 PST ---
(In reply to comment #2)
> More and more switches for is it a warning? is it an error? makes for a rat's
> nest of confusion. I don't find the gcc example of thousands (!) of switches to
> be an example to emulate. Remember, each switch adds a burden of testing and
> documenting as well.
Did you see this part of the comment?
(In reply to comment #1)
> Also I wouldn't mind *at all* making deprecation warnings by default if you
> don't want to add more switches, or adding them to -wi or whatever, I just
> think the current situation with deprecation is just the worse possible.
(In reply to comment #2)
> The workflow is designed to ignore them until you're ready to fix them, then
> just fix the lot in one go. Each one should be trivial to do.
That means changing the compilation flags, that usually means changing the
build system, and the build system usually is in the VCS, and makes no sense to
either changing the build system all the time each time something is
depracated, or having to ignore changes in the build system, because some
change might have to be really committed.
And sometimes changes are not trivial at all.
Anyway, I can understand that you don't want to add more options (well, not
really, but I can accept it, is not that I have an option anyway :), but
believe me, there are other valid and good workflows, I don't think the
compiler should force the developers to use a particular workflow for this.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------