From d7acbd926732459f39dfa88945187bc675538262 Mon Sep 17 00:00:00 2001 From: Viktor Erlingsson Date: Fri, 7 Aug 2026 11:59:04 +0200 Subject: [PATCH] fix: make dead_lettering.cr compile standalone `dead_lettering.cr` references `AMQP::Queue` in the `Task` alias but never required it, so the CI job that compiles each changed `*.cr` file on its own failed on this file. Requiring `../queue/queue` at the top doesn't work: `queue.cr` does `include Argument::DeadLettering`, and an `include` needs the module body already processed, so entering from this file fails the other way around. Requiring it after the module is defined satisfies both entry points - the in-progress require is a no-op on the second pass, and the alias target resolves in the later semantic phase. --- src/lavinmq/amqp/argument/dead_lettering.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lavinmq/amqp/argument/dead_lettering.cr b/src/lavinmq/amqp/argument/dead_lettering.cr index 474039f189..c31a81b7c0 100644 --- a/src/lavinmq/amqp/argument/dead_lettering.cr +++ b/src/lavinmq/amqp/argument/dead_lettering.cr @@ -197,3 +197,8 @@ module LavinMQ::AMQP end end end + +# Queue includes DeadLettering, so requiring queue.cr at the top would make the +# include fail when this file is the compilation entry point. Requiring it here, +# after the module is defined, works from either direction. +require "../queue/queue"