New warning messages might as well be fatal errors
utcc.utoronto.ca
utcc.utoronto.ca
And so that they can have an excuse to say they have not been informed of the deprecation and call you names. Seriously, this basically amounts to never deprecating anything at all.
I'm sure people will upgrade willy-nilly and still call you names, but at least they've had plenty of warning.
Besides, if your program doesn't work on their test environment after updating because it needs some extra config to enable legacy behaviour, their update process will have to slow down (alter config and retry) but no serious downtime will occur.
Bold of you to assume they have one of those! Personally I assume they will break production, then call you names because of it.
For open source software: too bad. The AS IS part of the license should cover expectations well.
For commercial software: depends on the contract, really. If the contract hasn't specified anything, an upgrade document will work fine in many cases.
For enterprise software: your customers won't update your software anyway. I'd go with warnings just to be safe. Maybe do it in three stages, first warnings, then severe warnings, then errors.
If you really want to grab attention for your warnings, prefix them with <<COMPLIANCY RISK ALERT>> and you'll be sure to get them to read the upgrade guide!
yeah, though from the perspective of a sysadmin I suspect this is what they would prefer
It was about deprecating and then removing long standing Unix command names, with histories back at least as far as the middle/early 1980s, simply because they aren't now in the Single Unix Specification.
They were in the SVID.
Or just use stderr?
If you write to standard error in a cron job, mail gets sent to root. All of the cron jobs using fgrep and egrep were suddenly mailing root, every single run, even when nothing went wrong.
Isn't this why there are two output streams, stdout and stderr?
Now the further context is that fgrep and egrep have been embedded into larger scripts and systems which call them in turn, so now you've got the stderr of a tool mingling with the stderr of every other tool, and the script itself. But that's why everything on stderr includes argv[0] from time immemorial, too.
The comment about rate-limiting makes me imagine someone's got plenty of "find ... -print | xargs fgrep" in there, though!
EDIT: scratch the context, since this blog post is from 2007, though cks still had over 15 years of sysadmin experience.
> This change is pointless make-work inflicted on the broad open source ecology by GNU Grep. GNU Grep's decision to cause these long-standing commands to emit new messages requires everyone else to go through making changes in order to return to the status quo. This is exactly the same kind of make work as other pointless API changes, and just like them it's hostile to the broad open source ecology.
* https://utcc.utoronto.ca/~cks/space/blog/linux/GNUGrepVersus...
is that not the idea?
So even if it "might as well be a fatal error", at least it's a fatal error that's more likely to be manageable instead of a fire.
I learned about a quarter century ago that egrep and fgrep are considered obsolescent by POSIX/SuS, which has grep -E and grep -F, and stopped using them.
Here is Single Unix Spec from 1997:
https://pubs.opengroup.org/onlinepubs/007908799/xcu/egrep.ht...
That's probably before some of the complainers were weaned off diapers.
However, I disagree with the removal of these commands. A POSIX or "Unix-like" system has a good many commands that are not in the spec. Removing commands that are in the spec (or have been) but were obsolescent is completely wrongheaded.
A sane approach might be for the utilities project like Coreutils to remove the programs; distros can simulate them with scripts (that don't emit any lame chatter):
This could be /usr/bin/egrep:
#!/bin/sh
grep -E "$@"
Why should we remove egrep just because it was mentioned in the spec as obsolescent, yet keep emacs or ssh that are not in the spec?It should be a priority to retain any command that was ever in the actual spec, regardless of whether it was obsolescent, over retaining commands that are not in the spec.
The guiding principle should be whether those commands are in wide use and whether they are harmful in any way. fgrep and egrep aren't harmful. There is a spec for them which says what they should do; we have it from POSIX that egrep is equivalent to grep -E. People use them.
The only portability issue with egrep in a script is that it might not be there, which would only be because someone had a knee-jerk reaction to wording in the spec. If a system does have egrep, it is expected to conform to the spec and be equivalent to grep -E.
However, I think there are two mistakes in the process:
1. Why should it matter that there are different flavors of tar out there which have interoperability issues? The command and some of its options could be standardized, as having an implementation-defined format. The ecosystem of POSIX-like systems will solve the interoperability problem.
2. Why consider the matter closed for so many decades; maybe the issue should be revisited? There should be an effort to have tar as a standard command, given that it's widely used. The only reason we have POSIX in the first place is that Unix is widely implemented and used.
I mean, different file systems have totally different inode data structures, right? Yet we have a standard commands that manipulate things in the file system, like ls. What your system can ls, another one might not be able to mount at all.
Instead of adding a deprecation warning in the new release, go ahead and throw the full-blown exception and log it as such. The exception message can contain instructions for resolving the concern, links to documentation, et. al.
I know the way we specialize and divide labor makes this kind of thing suck in many shops, but the counterpoint is that by "just fixing it now", you don't really have to worry about all of this weird cruft accumulating over time. eventually you will get rug-pulled one way or the other, so why not incrementally shore up your usage as the API changes over time?
From a legal & B2B perspective, this might also be considered desirable. If your customers have to stay closely-aligned to your happy path, you won't have to send in seal team 6 to rescue some deprecated pile of shit or otherwise worry about weird, unsupported combinations of state & configuration building up over time.