You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Requiring packwerk via require "packwerk" (the default require) sets autoloads and some upfront requires. Tools like T::Utils.run_all_sig_blocks triggers signatures to be evaluated, which expands Packwerk into memory as it loads constants in sigs.
To Reproduce
A scenario like #334 using T::Utils.run_all_sig_blocks.
Expected Behaviour T::Utils.run_all_sig_blocks should not inflate Packwerk into memory.
Screenshots
N/A
Version Information
Packwerk: edge
Ruby 3.2.1
Additional Context
We don't seem to want to encourage developers reach for require: false as of #304. What we can do instead is remove the requires from the main entrypoint file and make sure no more are added (and thus no sigs evaluated). We don't seem to want to move autoloads out of the default require for API design reasons.
The text was updated successfully, but these errors were encountered:
Description
Requiring
packwerk
viarequire "packwerk"
(the default require) sets autoloads and some upfront requires. Tools likeT::Utils.run_all_sig_blocks
triggers signatures to be evaluated, which expands Packwerk into memory as it loads constants in sigs.To Reproduce
A scenario like #334 using
T::Utils.run_all_sig_blocks
.Expected Behaviour
T::Utils.run_all_sig_blocks
should not inflate Packwerk into memory.Screenshots
N/A
Version Information
Additional Context
We don't seem to want to encourage developers reach for
require: false
as of #304. What we can do instead is remove the requires from the main entrypoint file and make sure no more are added (and thus no sigs evaluated). We don't seem to want to move autoloads out of the default require for API design reasons.The text was updated successfully, but these errors were encountered: