Skip to content

Make it easy (and well performing) to skip certain subdirectories/globs within component dirs #239

@timriley

Description

@timriley

Right now, the only way is to do this:

config.component_dirs.add "some_dir" do
  dir.auto_register = proc do |component|
    relative_path = component.file_path.relative_path_from(root).to_s
    !relative_path.start_with?("config#{File::PATH_SEPARATOR}")
  end
end

Which feels a bit too roundabout, and also imposes a cost on every auto-registration.

We may be able to take inspiration on how Zeitwerk does this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions