Project

General

Profile

Feature #5458

DL should be removed

Added by kosaki (Motohiro KOSAKI) over 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Target version:

Description

DL and fiddle are redundant. Moreover DL has no maintainer and its code is problematic.


Related issues

Related to Ruby trunk - Feature #8601: Win32API.rb long life plan Assigned 07/05/2013
Related to Ruby trunk - Misc #10553: Ruby 2.2.0 release engeneering Closed
Blocks Ruby trunk - Bug #6592: test_call_double(DL::TestDL) fails on ARM HardFP Closed 06/14/2012

Associated revisions

Revision 48217
Added by tenderlove over 2 years ago

  • ext/dl/*: remove DL as it is replaced by Fiddle.
    [Feature #5458] Thanks to Jonan Scheffler jonanscheffler@gmail.com
    for this patch

  • test/dl/*: ditto.

Revision 48217
Added by tenderlove over 2 years ago

  • ext/dl/*: remove DL as it is replaced by Fiddle.
    [Feature #5458] Thanks to Jonan Scheffler jonanscheffler@gmail.com
    for this patch

  • test/dl/*: ditto.

Revision 48217
Added by tenderlove over 2 years ago

  • ext/dl/*: remove DL as it is replaced by Fiddle.
    [Feature #5458] Thanks to Jonan Scheffler jonanscheffler@gmail.com
    for this patch

  • test/dl/*: ditto.

Revision 48217
Added by tenderlove over 2 years ago

  • ext/dl/*: remove DL as it is replaced by Fiddle.
    [Feature #5458] Thanks to Jonan Scheffler jonanscheffler@gmail.com
    for this patch

  • test/dl/*: ditto.

History

#1 Updated by naruse (Yui NARUSE) over 5 years ago

  • Project changed from CommonRuby to Ruby trunk

#2 [ruby-core:43735] Updated by mame (Yusuke Endoh) about 5 years ago

  • Target version set to Next Major

#3 Updated by mame (Yusuke Endoh) about 5 years ago

  • Status changed from Open to Assigned
  • Assignee set to matz (Yukihiro Matsumoto)

In principle, nothing should be removed from 2.0 because of compatibility.
I cannot advocate DL and Syck, though...

--
Yusuke Endoh mame@tsg.ne.jp

#4 [ruby-core:43780] Updated by Anonymous about 5 years ago

  • File noname added

On Tue, Mar 27, 2012 at 10:50:41PM +0900, mame (Yusuke Endoh) wrote:

Issue #5458 has been updated by mame (Yusuke Endoh).

Status changed from Open to Assigned
Assignee set to matz (Yukihiro Matsumoto)

In principle, nothing should be removed from 2.0 because of compatibility.
I cannot advocate DL and Syck, though...

Fiddle doesn't handle struct creation and formatting. That part of DL
is useful. I could port that to Fiddle, but I'm not sure why.

Now that libffi will work with windows, why don't we just remove the C
code that backs DL? Then we can keep the DL ruby code and forget about
the native code.

--
Aaron Patterson
http://tenderlovemaking.com/

#5 [ruby-core:44693] Updated by matz (Yukihiro Matsumoto) about 5 years ago

  • Assignee changed from matz (Yukihiro Matsumoto) to mame (Yusuke Endoh)

Even though DL can be emulated by using Fiddle in theory, I'd rather keep it for 2.0 for compatibility.
After 2.0, it's OK to replace DL. In that case, we can mark DL as obsolete.

#6 [ruby-core:44695] Updated by mame (Yusuke Endoh) about 5 years ago

  • Assignee changed from mame (Yusuke Endoh) to tenderlovemaking (Aaron Patterson)
  • Target version changed from Next Major to 2.0.0

Okay, I'm willing to mark DL as obsolete in 2.0.
If anyone has an objection, please declare yourself ASAP.

Aaron, could you add a warning?
Then, please reassign back to me.

--
Yusuke Endoh mame@tsg.ne.jp

#7 [ruby-core:44701] Updated by Anonymous about 5 years ago

  • File noname added

On Sat, Apr 28, 2012 at 02:06:51AM +0900, mame (Yusuke Endoh) wrote:

Issue #5458 has been updated by mame (Yusuke Endoh).

Assignee changed from mame (Yusuke Endoh) to tenderlovemaking (Aaron Patterson)
Target version changed from 3.0 to 2.0.0

Okay, I'm willing to mark DL as obsolete in 2.0.
If anyone has an objection, please declare yourself ASAP.

Aaron, could you add a warning?
Then, please reassign back to me.

Yes I can add a warning! :-)

--
Aaron Patterson
http://tenderlovemaking.com/

#8 Updated by naruse (Yui NARUSE) about 5 years ago

  • File deleted (noname)

#9 Updated by naruse (Yui NARUSE) about 5 years ago

  • File deleted (noname)

#10 Updated by mame (Yusuke Endoh) over 4 years ago

Aaron, did you add a warning?

--
Yusuke Endoh mame@tsg.ne.jp

#11 [ruby-core:49977] Updated by mame (Yusuke Endoh) over 4 years ago

Aaron?

--
Yusuke Endoh mame@tsg.ne.jp

#12 [ruby-core:50189] Updated by Anonymous over 4 years ago

On Sat, Nov 24, 2012 at 11:26:16AM +0900, mame (Yusuke Endoh) wrote:

Issue #5458 has been updated by mame (Yusuke Endoh).

Aaron?

Sorry, I'm working on this. I should have the deprecation warning added
some time tomorrow (UTC-7).

--
Aaron Patterson
http://tenderlovemaking.com/

#13 [ruby-core:50233] Updated by zzak (Zachary Scott) over 4 years ago

I wrote a patch for the deprecation notice: https://gist.github.com/4155983

#14 [ruby-core:50260] Updated by tenderlovemaking (Aaron Patterson) over 4 years ago

  • Assignee changed from tenderlovemaking (Aaron Patterson) to mame (Yusuke Endoh)

DL is deprecated in trunk. To maintain backwards compatibility, I've moved some parts of DL to Fiddle. We should be able to remove ext/dl after 2.0 release.

#15 [ruby-core:50444] Updated by sorah (Sorah Fukumori) over 4 years ago

  • Category set to ext
  • Target version changed from 2.0.0 to next minor

#16 [ruby-core:55014] Updated by ngoto (Naohisa Goto) about 4 years ago

When DL is removed?

#17 [ruby-core:55015] Updated by sikachu (Prem Sichanugrist) about 4 years ago

@ngoto Looking from the target, seems like this will be removed on 2.1.0 (next minor)

#18 [ruby-core:55017] Updated by ngoto (Naohisa Goto) about 4 years ago

  • Target version changed from next minor to 2.1.0

#19 [ruby-core:55058] Updated by luislavena (Luis Lavena) about 4 years ago

tenderlovemaking (Aaron Patterson) wrote:

DL is deprecated in trunk. To maintain backwards compatibility, I've moved some parts of DL to Fiddle. We should be able to remove ext/dl after 2.0 release.

What parts of DL remain to be migrated to Fiddle?

With DL being deprecated, Win32API component and win32/registry will need to be changed or removed entirely.

#20 [ruby-core:55064] Updated by zzak (Zachary Scott) about 4 years ago

The Win32 stuff is largely undocumented, but I remember ngoto-san
moved a lot of it to Fiddle already?

#21 [ruby-core:55092] Updated by Anonymous about 4 years ago

On Mon, May 20, 2013 at 07:55:11AM +0900, Zachary Scott wrote:

The Win32 stuff is largely undocumented, but I remember ngoto-san
moved a lot of it to Fiddle already?

Pretty much everything should be moved by now. I'll remove DL, see what
breaks, then port any remaining bits.

--
Aaron Patterson
http://tenderlovemaking.com/

#22 [ruby-core:55099] Updated by luislavena (Luis Lavena) about 4 years ago

zzak (Zachary Scott) wrote:

The Win32 stuff is largely undocumented, but I remember ngoto-san
moved a lot of it to Fiddle already?

I think you're correct, I see win32/registry and win32/resolv:

However I don't see Win32API:

https://github.com/ruby/ruby/blob/trunk/ext/dl/win32/lib/Win32API.rb

So I think the warning in 1.9.3 and 2.0.0 is misleading.

Thank you.

#23 [ruby-core:60164] Updated by zzak (Zachary Scott) over 3 years ago

It seems the win32 stuff was moved in r41936 and released in 2.1.0: https://github.com/ruby/ruby/commit/771d31a

Should we mark this ticket as closed 100%?

#24 [ruby-core:60262] Updated by hsbt (Hiroshi SHIBATA) over 3 years ago

  • Target version changed from 2.1.0 to 2.2.0

#25 [ruby-core:63470] Updated by ngoto (Naohisa Goto) almost 3 years ago

#26 [ruby-core:65665] Updated by hsbt (Hiroshi SHIBATA) over 2 years ago

  • Assignee changed from mame (Yusuke Endoh) to tenderlovemaking (Aaron Patterson)

Hi, tenderlove.

Please remove DL from trunk.

#27 Updated by Anonymous over 2 years ago

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

Applied in changeset r48217.


  • ext/dl/*: remove DL as it is replaced by Fiddle.
    [Feature #5458] Thanks to Jonan Scheffler jonanscheffler@gmail.com
    for this patch

  • test/dl/*: ditto.

#28 [ruby-core:66173] Updated by vo.x (Vit Ondruch) over 2 years ago

  • Blocks Bug #6592: test_call_double(DL::TestDL) fails on ARM HardFP added

#29 [ruby-core:66962] Updated by naruse (Yui NARUSE) over 2 years ago

  • Status changed from Closed to Assigned

As far as I understand, removal of ext/dl is done only if Ruby bundle libffi source like libyaml.
But libffi source is not bundled yet.
I'll revert r48217 soon.

#30 [ruby-core:66963] Updated by naruse (Yui NARUSE) over 2 years ago

  • Related to Misc #10553: Ruby 2.2.0 release engeneering added

#31 [ruby-core:66971] Updated by vo.x (Vit Ondruch) over 2 years ago

What would be the point of revet? Does Ruby need to bundle everything now? It is not the case for zlib, tcl/tk nor for OpenSSL, so why should Ruby bundle libffi? So to say, this is -1 for reverting r48217 and -1 for bundling libffi.

#32 Updated by usa (Usaku NAKAMURA) over 2 years ago

Vit Ondruch wrote:

What would be the point of revet?

Because DL is stand alone but Fiddle is not.
To keep runnable some standard libraries, such as resolv.rb, we decided to bundle libffi if DL is removed.

#33 [ruby-core:66980] Updated by headius (Charles Nutter) over 2 years ago

Well, DL depends on libdl, right?

Maybe we make it a default gem?

#34 [ruby-core:66981] Updated by nobu (Nobuyoshi Nakada) over 2 years ago

Charles Nutter wrote:

Well, DL depends on libdl, right?

Yes on some platforms, no on others.
Usually dlopen() is a part of system-provided features, regardless of the library to be linked.
And different APIs are used on Windows, of course.

Maybe we make it a default gem?

One of the main problems is Win32API.
It's used very often.

#35 [ruby-core:67430] Updated by hsbt (Hiroshi SHIBATA) over 2 years ago

  • Status changed from Assigned to Closed

DL has been removed at Ruby 2.2.0

Also available in: Atom PDF