[ruby-core:90788] Re: [Ruby trunk Bug#15478][Feedback] [RFC] erb: remove deprecation warnings from ERB.new

From: Eric Wong <normalperson@...>
Date: 2018-12-29 05:34:39 UTC
List: ruby-core #90788
takashikkbn@gmail.com wrote:
> Stop showing warnings for legacy_trim_mode and legacy_eoutvar is fine.

OK.

> But why should we stop deprecating nil and 0 for
> safe_level? If we do so, this would be suddenly broken in Ruby
> 2.8 or Ruby 3.0. So this change does not make sense for safe
> migration.

nil and 0 $SAFE is already no-op, already, right?  I don't care
about $SAFE, so I would expect people will pass nil or 0 when
they don't care (because they need to pass the other legacy
variables).

> Note that we already showed this deprecation warning on warnlevel == 2
> on Ruby 2.6.

Yeah, so if $SAFE already warns, I don't think ERB should also need
to warn.

> Also please provide real-world use cases for this.

I hit this at:
https://80x24.org/olddoc.git/tree/lib/oldweb.rb?h=v1.5.1#n272

> I saw many projects are rewritten to Ruby 2.6 interface before
> even Ruby 2.6 is officially released. We should fix such
> projects instead of removing deprecation warning where it's
> actually necessary.

Most code repositories are NOT public; and we can never know all
or even most of them.  By now, I believe deprecating
existing/stable APIs gracefully in scripting languages is
impossible without either making users angry or wasting their
time with churn.

It's much easier to deprecate C-API stuff because only
developers see such warnings.

If anything, such warning should go to syslog (or an
out-of-the-way OS-level logging mechanism).  Stderr is too
annoying to ordinary users (not programmers).

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next