Feature #5458

DL should be removed

Added by Motohiro KOSAKI almost 4 years ago. Updated 8 months ago.

Status:Closed
Priority:Normal
Assignee:Aaron Patterson

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 Assigned 11/28/2014
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 10 months 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 10 months 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 Yui NARUSE almost 4 years ago

  • Project changed from CommonRuby to Ruby trunk

#2 Updated by Yusuke Endoh over 3 years ago

  • Target version set to Next Major

#3 Updated by Yusuke Endoh over 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to 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 Updated by Anonymous over 3 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 Updated by Yukihiro Matsumoto over 3 years ago

  • Assignee changed from Yukihiro Matsumoto to 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 Updated by Yusuke Endoh over 3 years ago

  • Assignee changed from Yusuke Endoh to 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 Updated by Anonymous over 3 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 Yui NARUSE over 3 years ago

  • File deleted (noname)

#9 Updated by Yui NARUSE over 3 years ago

  • File deleted (noname)

#10 Updated by Yusuke Endoh almost 3 years ago

Aaron, did you add a warning?

Yusuke Endoh mame@tsg.ne.jp

#11 Updated by Yusuke Endoh almost 3 years ago

Aaron?

Yusuke Endoh mame@tsg.ne.jp

#12 Updated by Anonymous almost 3 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 Updated by Zachary Scott almost 3 years ago

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

#14 Updated by Aaron Patterson almost 3 years ago

  • Assignee changed from Aaron Patterson to 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 Updated by Shota Fukumori over 2 years ago

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

#16 Updated by Naohisa Goto over 2 years ago

When DL is removed?

#17 Updated by Prem Sichanugrist over 2 years ago

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

#18 Updated by Naohisa Goto over 2 years ago

  • Target version changed from next minor to 2.1.0

#19 Updated by Luis Lavena over 2 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 Updated by Zachary Scott over 2 years ago

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

#21 Updated by Anonymous over 2 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 Updated by Luis Lavena over 2 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 Updated by Zachary Scott over 1 year 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 Updated by Hiroshi SHIBATA over 1 year ago

  • Target version changed from 2.1.0 to current: 2.2.0

#25 Updated by Naohisa Goto about 1 year ago

#26 Updated by Hiroshi SHIBATA 11 months ago

  • Assignee changed from Yusuke Endoh to Aaron Patterson

Hi, tenderlove.

Please remove DL from trunk.

#27 Updated by Anonymous 10 months 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 Updated by Vit Ondruch 10 months ago

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

#29 Updated by Yui NARUSE 9 months 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 Updated by Yui NARUSE 9 months ago

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

#31 Updated by Vit Ondruch 9 months 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 Usaku NAKAMURA 9 months 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 Updated by Charles Nutter 9 months ago

Well, DL depends on libdl, right?

Maybe we make it a default gem?

#34 Updated by Nobuyoshi Nakada 9 months 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 Updated by Hiroshi SHIBATA 8 months ago

  • Status changed from Assigned to Closed

DL has been removed at Ruby 2.2.0

Also available in: Atom PDF