Skip to content

No public replacement for custom inheritable namespace settings in Grape 4.0? #2979

Open

Description

@olivier-thatch

Hi,

While bumping the grape gem from 3.3 to 4.0 in our app, we noticed that inheritable_setting is no longer exposed.

AFAICT, Grape 4.0 no longer exposes any mechanism to let users define inheritable namespace settings? Is that correct? Is that intended?

There's a very unclear paragraph in UPGRADING.md, and the source code mentions "the nesting behaviour DSL::Settings#namespace_setting is specified to have", but I still have no clue what that behavior actually is.

For now we're working around this issue by manually traversing the parent chain. While it's only a few lines of code, it is kind of annoying that we have to do this... particularly when Grape used to do it.

Activity

  1. ericproulx commented on Sep 22, 2026

    @ericproulx
    Contributor

    Hello @olivier-thatch, thank you for opening an issue. inheritable_setting is still exposed but some internals like namespace_inheritable have been made private since it's exposing how Grape is working internally. What's your specific use case ?

    Meanwhile, if you look at inheritable_setting, there's plenty of methods that are now exposed to fill the gap. Something is probably missing and I would gladly look at your case.

    namespace_setting, route_setting and global_setting are still exposed as DSL methods.

  2. pinned and unpinned a comment on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions