refactor: autoloading via zeitwerk#868
Open
YOU54F wants to merge 2 commits intopact-foundation:masterfrom
Open
refactor: autoloading via zeitwerk#868YOU54F wants to merge 2 commits intopact-foundation:masterfrom
YOU54F wants to merge 2 commits intopact-foundation:masterfrom
Conversation
Member
Author
|
Yoooo @bethesque! I had a bit of a go at this, after getting familiarised with Zeitwerk in the pact-ruby v2 rewrite. Thought you might fancy a goosey gander. Wasn't too bad in the end actually, probably in part ot the work you have previously done in #661 |
Member
Author
|
Hey team! We may need some coordination, and/or testing with PactFlow prior to merging this in, in case there are changes required to consume, or if we need to plan it in with some engineering time in order to be able to apply this. |
Member
8504b12 to
7202234
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #633
Lots of files touched, but mainly the removal of
require "pact_broker/.*"Main loading logic for Zeitwerk is in our gems entrypoint
./lib/pact_broker.rbwhich follows the patternzeitwerkgermzeitwerknot to warn us about files that are unmanaged by Zeitwerk, these are because we cannot rename or rework the files to work within convention, we just need to manually load these as beforeZeitwerk:Loader.for_gemwhich users the file list in the gemspec to generate a load list of filespact_broker/webmachinewhich loads webmachine, and our ignored monkey patchesThe rest of the changes are just renaming files/classes/modules to match Zeitwerk conventions, and removal of manual imports which are no longer required, as that is the big benefit of using an autoloader.