February 04, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9289



--- Comment #20 from Jonathan M Davis <jmdavisProg@gmx.com> 2013-02-04 03:05:04 PST ---
I agree with David on this one. If there's stuff here that really shouldn't be compiling, then lets finally remove it. Code shouldn't need to be checking whether deprecated features work or not. It shouldn't be trying to use them in the first place. And many of the currently deprecated language features have been deprecated for some time ande really should be outright removed. In general, warning for deprecations just works a lot better, so I'd hate to lose that.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 04, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9289



--- Comment #21 from Leandro Lucarella <leandro.lucarella@sociomantic.com> 2013-02-04 08:34:16 PST ---
BTW, Don, I see what you mean now, but that problem existed before making deprecations emit warnings by default (if you used -d). The default was only changed.

I know that introduces some kind of regression in a sense because code will behave differently unless you use -de, but I think this is only a transitional problem, as again, only the default changed.

If some deprecated feature gets too problematic, I agree with David that the best solution might be to just remove them, specially if they have been deprecated long ago...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9289



--- Comment #22 from Don <clugdbug@yahoo.com.au> 2013-02-26 00:51:42 PST ---
(In reply to comment #21)
> BTW, Don, I see what you mean now, but that problem existed before making deprecations emit warnings by default (if you used -d). The default was only changed.


It is true that there's always been a difference in is(typeof()) between when
compiled with -d, and when not. However, historically that hasn't mattered so
much -- it has been crazy to compile with -d.

This bug report gives the -d behaviour a higher priority than
the no-flags behaviour. You're assuming that when a deprecated feature appears
while errors are gagged, it's because it used to compile. That assumption is
false.

Such code might, or might not be a use of a deprecated feature. There is no way
to tell. The patch moves it from "assume it's never a deprecated feature" to
"assume it's always a deprecated feature".
Effectively, you're changing an accepts-invalid bug to a rejects-valid bug.
It's not an improvement.

Here's what I think should happen:

-dXX should give a warning (not an error, not silence), whenever a deprecated
feature is used when errors are gagged.
In other cases, the existing behaviour (silence) should be preserved.

Basically I think that with any form of -d option, deprecated features should never compile without generating a warning (even when errors are gagged). When -d is not used, it should be as if those features don't exist -- there should be no difference between something that is deprecated, vs any other sort of error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9289


Leandro Lucarella <leandro.lucarella@sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Deprecated language         |[Regression 2.061] Had been
                   |features should be warn too |deprecated language
                   |when errors are normally    |features are enabled again
                   |silented                    |in default


--- Comment #23 from Leandro Lucarella <leandro.lucarella@sociomantic.com> 2013-02-26 03:26:54 PST ---
(In reply to comment #22)
> (In reply to comment #21)
> > BTW, Don, I see what you mean now, but that problem existed before making deprecations emit warnings by default (if you used -d). The default was only changed.
> 
> It is true that there's always been a difference in is(typeof()) between when
> compiled with -d, and when not. However, historically that hasn't mattered so
> much -- it has been crazy to compile with -d.

Agreed.

> This bug report gives the -d behaviour a higher priority than
> the no-flags behaviour. You're assuming that when a deprecated feature appears
> while errors are gagged, it's because it used to compile. That assumption is
> false.

Yes, as I said I understand what you mean and agree too. I'll roll back the title to the original one to avoid spreading this confusion.

> Such code might, or might not be a use of a deprecated feature. There is no way
> to tell. The patch moves it from "assume it's never a deprecated feature" to
> "assume it's always a deprecated feature".
> Effectively, you're changing an accepts-invalid bug to a rejects-valid bug.
> It's not an improvement.
> 
> Here's what I think should happen:
> 
> -dXX should give a warning (not an error, not silence), whenever a deprecated
> feature is used when errors are gagged.
> In other cases, the existing behaviour (silence) should be preserved.
> 
> Basically I think that with any form of -d option, deprecated features should never compile without generating a warning (even when errors are gagged). When -d is not used, it should be as if those features don't exist -- there should be no difference between something that is deprecated, vs any other sort of error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9289



--- Comment #24 from Leandro Lucarella <leandro.lucarella@sociomantic.com> 2013-02-26 03:38:50 PST ---
Woops! I wanted to commit only the title change...

(In reply to comment #22)
> Such code might, or might not be a use of a deprecated feature. There is no way
> to tell. The patch moves it from "assume it's never a deprecated feature" to
> "assume it's always a deprecated feature".
> Effectively, you're changing an accepts-invalid bug to a rejects-valid bug.
> It's not an improvement.

Again, agreed.

> Here's what I think should happen:
> 
> -dXX should give a warning (not an error, not silence), whenever a deprecated feature is used when errors are gagged.

You're talking about a new flag I guess...

> In other cases, the existing behaviour (silence) should be preserved.

Only when gagged I assume.

> Basically I think that with any form of -d option, deprecated features should never compile without generating a warning (even when errors are gagged).

Except for plain -d I guess. That's the original meaning of -d, silence everything.

> When -d is not used, it should be as if those features don't exist -- there should be no difference between something that is deprecated, vs any other sort of error.

Only when errors are gagged I guess. Otherwise is going back to where we started.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9289



--- Comment #25 from Don <clugdbug@yahoo.com.au> 2013-02-26 04:37:10 PST ---
(In reply to comment #24)
> Woops! I wanted to commit only the title change...
> 
> (In reply to comment #22)
> > Such code might, or might not be a use of a deprecated feature. There is no way
> > to tell. The patch moves it from "assume it's never a deprecated feature" to
> > "assume it's always a deprecated feature".
> > Effectively, you're changing an accepts-invalid bug to a rejects-valid bug.
> > It's not an improvement.
> 
> Again, agreed.
> 
> > Here's what I think should happen:
> > 
> > -dXX should give a warning (not an error, not silence), whenever a deprecated feature is used when errors are gagged.
> 
> You're talking about a new flag I guess...

Not necessarily. It could be done with -dw for example.

> > In other cases, the existing behaviour (silence) should be preserved.
> 
> Only when gagged I assume.

Yes, otherwise it's an error.

> 
> > Basically I think that with any form of -d option, deprecated features should never compile without generating a warning (even when errors are gagged).
> 
> Except for plain -d I guess. That's the original meaning of -d, silence everything.

Possibly. We should just kill that, it's ridiculous.

> > When -d is not used, it should be as if those features don't exist -- there should be no difference between something that is deprecated, vs any other sort of error.
> 
> Only when errors are gagged I guess. Otherwise is going back to where we started.

When errors aren't gagged, using a deprecated feature is just an error. (The wording may mention that it's deprecated, but otherwise it's a normal error). When errors are gagged, it's again just an error, but nothing is printed.

When compiled with -dw, whenever anything deprecated is encountered, display a warning message. Display this even if errors are gagged.

ie, anything deprecated is either a normal error, or noisy accepted, and this is not affected by gagging.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 27, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9289



--- Comment #26 from Leandro Lucarella <leandro.lucarella@sociomantic.com> 2013-02-27 09:24:34 PST ---
(In reply to comment #25)
> > > -dXX should give a warning (not an error, not silence), whenever a deprecated feature is used when errors are gagged.
> > 
> > You're talking about a new flag I guess...
> 
> Not necessarily. It could be done with -dw for example.

But then make -dw mean something different than <no flag at all>, right? Just trying to understand your suggestion.

> > > In other cases, the existing behaviour (silence) should be preserved.
> > 
> > Only when gagged I assume.
> 
> Yes, otherwise it's an error.

Mmm, an error? Using -de I guess, if that's the default this is like reverting the "make deprecations issue warnings by default".

> > > Basically I think that with any form of -d option, deprecated features should never compile without generating a warning (even when errors are gagged).
> > 
> > Except for plain -d I guess. That's the original meaning of -d, silence everything.
> 
> Possibly. We should just kill that, it's ridiculous.

Maybe.

> > Only when errors are gagged I guess. Otherwise is going back to where we started.
> 
> When errors aren't gagged, using a deprecated feature is just an error. (The wording may mention that it's deprecated, but otherwise it's a normal error). When errors are gagged, it's again just an error, but nothing is printed.

Why should it be an error to use a deprecated feature? I still don't understand why is this desirable when it was the whole point of making "deprecation as warnings by default". With this, you upgrade to a new DMD version and your code gets broken if you happened to be using a recently deprecated feature instead of just getting a deprecation message. Deprecating something means "it will be removed in the future" not "it already have been removed". And if you used some deprecated feature where errors are gagged, you're application will change its behaviour without any warnings.

> When compiled with -dw, whenever anything deprecated is encountered, display a warning message. Display this even if errors are gagged.
> 
> ie, anything deprecated is either a normal error, or noisy accepted, and this is not affected by gagging.

I think this really makes the feature useless. If you don't use -dw, your code won't compile. If you use it, you'll potentially get a lot of spurious warnings about gagged code that is using some feature that used to have a different meaning a while ago.

I think that's far from ideal...

If we leave things are they are now, the only problem I see is you don't know if some piece of error-gagged code uses a deprecated feature or not, and you'll only find out when the feature is completely removed, if you are lucky enough to notice the program changed its behaviour (if we keep deprecated features as errors, this will happen as soon as the feature gets deprecated instead of removed). Maybe we can add a flag (-dv for verbose maybe?) to print warnings for deprecated errors even when errors are gagged.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2 3
Next ›   Last »