From 6d853e52394e0cf67c2322c10ccf502782ec80c7 Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Thu, 23 Jul 2026 03:51:17 +0200 Subject: [PATCH] Define explicit Zeitwerk namespaces for Renderer and Adapters - lib/simple_navigation/renderer.rb: declare SimpleNavigation::Renderer explicitly - lib/simple_navigation/adapters.rb: declare SimpleNavigation::Adapters explicitly Zeitwerk inferred both as implicit namespaces from their directories, which is not resolved reliably under JRuby (LoadError on require, issue #237). Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/simple_navigation/adapters.rb | 12 ++++++++++++ lib/simple_navigation/renderer.rb | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 lib/simple_navigation/adapters.rb create mode 100644 lib/simple_navigation/renderer.rb diff --git a/lib/simple_navigation/adapters.rb b/lib/simple_navigation/adapters.rb new file mode 100644 index 0000000..1f451be --- /dev/null +++ b/lib/simple_navigation/adapters.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module SimpleNavigation + # Explicit namespace for the framework adapters living in adapters/. + # + # Without this file Zeitwerk would infer SimpleNavigation::Adapters as an + # implicit namespace from the adapters/ directory. That inference is not + # resolved reliably on every runtime (e.g. JRuby, see issue #237), so the + # namespace is defined explicitly here. + module Adapters + end +end diff --git a/lib/simple_navigation/renderer.rb b/lib/simple_navigation/renderer.rb new file mode 100644 index 0000000..a127147 --- /dev/null +++ b/lib/simple_navigation/renderer.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module SimpleNavigation + # Explicit namespace for the renderers living in renderer/. + # + # Without this file Zeitwerk would infer SimpleNavigation::Renderer as an + # implicit namespace from the renderer/ directory. That inference is not + # resolved reliably on every runtime (e.g. JRuby, see issue #237), so the + # namespace is defined explicitly here. + module Renderer + end +end