Consider moving the `prepend` lines to the EE modules
In order to minimize the CE/EE diff, we can actually put the CEModule.prepend(EE::EeModule)
lines to the EE::EeModule
files. In that case, there would be no diff between CE and EE files (outside of the ee/
folder obviously)!
That said, this requires that the ee/
folder is eager-loaded (already the case in production), since we would never reference explicitly the EE
modules (e.g. since we only explicitly use Appearance
, it would never be prepended with EE::Appearance
unless EE::Appearance
is eager-loaded). See https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/149449381 for an actual example of such issue: here PushEventPayload
was never prepended with EE::PushEventPayload
since PushEventPayload.prepend(EE::PushEventPayload)
was in ee/app/models/ee/push_event_payload.rb
and this file wasn't eager-loaded in the test
environment.
That could be as easy as turning config.eager_load = false
to config.eager_load = true
in config/development.rb
and config/test.rb
.