Skip to content

timeliness has some troubles with modern AS #46

@tagliala

Description

@tagliala

Run rake

An error occurred while loading timeliness_helper.
Failure/Error: require 'active_support/time'

NoMethodError:
  undefined method `deprecator' for module ActiveSupport

As per: https://edgeguides.rubyonrails.org/active_support_core_extensions.html

In order to have the smallest default footprint possible, Active Support loads the minimum dependencies by default. It is broken in small pieces so that only the desired extensions can be loaded. It also has some convenience entry points to load related extensions in one shot, even everything.

...

1.1.1 Cherry-picking a Definition

...

require "active_support"
require "active_support/core_ext/hash/indifferent_access"

So active_support is supposed to be required even when core extensions are explicitly loaded.

However, the minimum supported AS version by timeliness is 3.2.0.

From Rails APIs: https://guides.rubyonrails.org/v3.2.0/active_support_core_extensions.html

In order to have a near zero default footprint, Active Support does not load anything by default. It is broken in small pieces so that you may load just what you need, and also has some convenience entry points to load related extensions in one shot, even everything.

...

1.1.1 Cherry-picking a Definition

...

require 'active_support/core_ext/object/blank'

So, instructions are different and the global active_support is not required. I guess this is an issue in documentation that can be checked with a memory profiler

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions