Issue #7548 has been updated by trans (Thomas Sawyer).


> It seems that you are shaping and changing your suggestion with each new post,
> so it is a bit hard to react.

Well, it's a process and discussion. I didn't really post this as a set in stone sort of request, which is why I presented it first with a question.

> But the way I see it, your suggestions belong somewhere to Std-lib 'debug'.
> Perhaps it might be possible to change stdlib 'debug' to support
> cherrypicking like ActiveSupport,

You mean "cherrypicking like Facets" right? ;)

> so you could call require 'debug/kernel/load_callbacks' if you want those callbacks,
> but not the DEBUGGER itself. I am against adding this directly to the core.

I think that's very reasonable. Ultimately I like my last suggestion, the one about having a central method that handles loading. That strikes me as a more solid design for Ruby in general. So I think I will make a more concrete proposal for that in another ticket. But short of that, then I agree. Having a standard "cherrypickable" debugging library for this would be the nicest approach.



----------------------------------------
Feature #7548: Load and Require Callbacks
https://bugs.ruby-lang.org/issues/7548#change-34789

Author: trans (Thomas Sawyer)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: next minor


=begin
Should #load and #require have callbacks? e.g.

  def required(path)
    ...
  end

  def loaded(path, wrap)
    ...
  end

On occasion I have wanted to do load monitoring to track down a bug. This would have made it easier.

Are there any other good use cases?
=end



-- 
http://bugs.ruby-lang.org/