Project

General

Profile

Actions

Bug #6809

closed

Deprecation of Config

Added by Eregon (Benoit Daloze) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.0.0dev (2012-07-15 trunk 36395) [x86_64-darwin10.8.0]
Backport:
[ruby-core:46836]

Description

I saw nobu removed Config (the old RbConfig) at r36330.

While I totally approve this (use the RbConfig constant instead of Config), I already noticed a few failures due to it.

The comment in lib/rbconfig/obsolete.rb says "compatibility for ruby-1.8.4 and older",
so that would mean RbConfig was available in the version after ruby 1.8.4 (which was done at r9970).

In this case, it sounds safe to just rename Config to RbConfig for libraries not expecting to run on these old versions (< 1.8.5 if I understand well).
It means some complications for libraries which want to support older rubies.

I would like to discuss about removing Config for 2.0, because of the number of failures I'm seeing and the fact the warning has been added in 1.9.3. Would postponing the removal to the release after 2.0 be a good idea? Or do you think it's the right time, and people should have adapted from a while? (I guess quite a few did not try with 1.9.3 or did not notice the warning)

Also, do you know any workaround, for example when installing a gem using Config in its extconf.rb?
RUBYOPT=/path/to/some/script/which/define/Config.rb is one way, but it's a bit tedious (fixing the gem of someone else is not quick, especially during the holidays).

Updated by Eregon (Benoit Daloze) over 11 years ago

  • Category set to ext
  • Target version set to 2.0.0

I would like some feedback on this.

It seems a potential compatibility problem, and is very annoying because it might fail to build a gem/extension which would be just fine otherwise.
I'm thinking the warning should stay in 2.0, so most users have time to adapt to it.

Updated by luislavena (Luis Lavena) over 11 years ago

  • Status changed from Open to Assigned
  • Assignee set to nobu (Nobuyoshi Nakada)

Eregon (Benoit Daloze) wrote:

I'm thinking the warning should stay in 2.0, so most users have time to adapt to it.

I do thin the warning should stay longer considering it was "recently" introduced in 1.9.3

While lot of projects have updated their code, there are still lot of extensions and libraries that use Config instead of RbConfig, even it has been available for years.

I like the idea of less deprecations, but reality out-weights our ideal scenario: everybody keeps their code up-to-date.

Nobu-san, do you agree on reintroduce Config deprecation warning and state when this will be removed (perhaps 2.1?)

Thank you.

Actions #3

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r37386.
Benoit, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


rbconfig/obsolete.rb: Config

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0