Skip to content

Commit b827a63

Browse files
authored
Merge pull request #436 from Shopify/exclude_load_paths
Exclude load paths
2 parents 6282199 + d0a5b38 commit b827a63

44 files changed

Lines changed: 37623 additions & 14160 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gemfile.lock

Lines changed: 90 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
PATH
22
remote: .
33
specs:
4-
packwerk (3.2.2)
4+
packwerk (3.2.3)
55
activesupport (>= 6.0)
66
ast
77
better_html
88
bundler
9-
constant_resolver (>= 0.2.0)
9+
constant_resolver (>= 0.3)
1010
parallel
1111
parser
1212
prism (>= 0.25.0)
@@ -16,92 +16,135 @@ PATH
1616
GEM
1717
remote: https://rubygems.org/
1818
specs:
19-
actionpack (7.0.8.7)
20-
actionview (= 7.0.8.7)
21-
activesupport (= 7.0.8.7)
22-
rack (~> 2.0, >= 2.2.4)
19+
actionpack (7.2.2.1)
20+
actionview (= 7.2.2.1)
21+
activesupport (= 7.2.2.1)
22+
nokogiri (>= 1.8.5)
23+
racc
24+
rack (>= 2.2.4, < 3.2)
25+
rack-session (>= 1.0.1)
2326
rack-test (>= 0.6.3)
24-
rails-dom-testing (~> 2.0)
25-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
26-
actionview (7.0.8.7)
27-
activesupport (= 7.0.8.7)
27+
rails-dom-testing (~> 2.2)
28+
rails-html-sanitizer (~> 1.6)
29+
useragent (~> 0.16)
30+
actionview (7.2.2.1)
31+
activesupport (= 7.2.2.1)
2832
builder (~> 3.1)
29-
erubi (~> 1.4)
30-
rails-dom-testing (~> 2.0)
31-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
32-
activesupport (7.0.8.7)
33-
concurrent-ruby (~> 1.0, >= 1.0.2)
33+
erubi (~> 1.11)
34+
rails-dom-testing (~> 2.2)
35+
rails-html-sanitizer (~> 1.6)
36+
activesupport (7.2.2.1)
37+
base64
38+
benchmark (>= 0.3)
39+
bigdecimal
40+
concurrent-ruby (~> 1.0, >= 1.3.1)
41+
connection_pool (>= 2.2.5)
42+
drb
3443
i18n (>= 1.6, < 2)
44+
logger (>= 1.4.2)
3545
minitest (>= 5.1)
36-
tzinfo (~> 2.0)
46+
securerandom (>= 0.3)
47+
tzinfo (~> 2.0, >= 2.0.5)
3748
ast (2.4.2)
49+
base64 (0.2.0)
50+
benchmark (0.4.0)
3851
better_html (2.1.1)
3952
actionview (>= 6.0)
4053
activesupport (>= 6.0)
4154
ast (~> 2.0)
4255
erubi (~> 1.4)
4356
parser (>= 2.4)
4457
smart_properties
58+
bigdecimal (3.1.9)
4559
builder (3.3.0)
4660
byebug (11.1.3)
61+
cgi (0.4.2)
4762
concurrent-ruby (1.3.5)
48-
constant_resolver (0.2.0)
63+
connection_pool (2.5.3)
64+
constant_resolver (0.3.0)
4965
crass (1.0.6)
66+
date (3.4.1)
67+
drb (2.2.3)
68+
erb (4.0.4)
69+
cgi (>= 0.3.3)
5070
erubi (1.13.1)
5171
i18n (1.14.7)
5272
concurrent-ruby (~> 1.0)
73+
io-console (0.8.0)
74+
irb (1.15.2)
75+
pp (>= 0.6.0)
76+
rdoc (>= 4.0.0)
77+
reline (>= 0.4.2)
5378
json (2.7.2)
5479
language_server-protocol (3.17.0.3)
55-
loofah (2.24.0)
80+
logger (1.7.0)
81+
loofah (2.24.1)
5682
crass (~> 1.0.2)
5783
nokogiri (>= 1.12.0)
5884
m (1.6.0)
5985
method_source (>= 0.6.7)
6086
rake (>= 0.9.2.2)
6187
method_source (1.1.0)
62-
minitest (5.25.4)
88+
minitest (5.25.5)
6389
minitest-focus (1.3.1)
6490
minitest (>= 4, < 6)
6591
mocha (2.5.0)
6692
ruby2_keywords (>= 0.0.5)
6793
netrc (0.11.0)
68-
nokogiri (1.18.4-aarch64-linux-gnu)
94+
nokogiri (1.18.8-aarch64-linux-gnu)
6995
racc (~> 1.4)
70-
nokogiri (1.18.4-arm64-darwin)
96+
nokogiri (1.18.8-arm64-darwin)
7197
racc (~> 1.4)
72-
nokogiri (1.18.4-x86_64-darwin)
98+
nokogiri (1.18.8-x86_64-darwin)
7399
racc (~> 1.4)
74-
nokogiri (1.18.4-x86_64-linux-gnu)
100+
nokogiri (1.18.8-x86_64-linux-gnu)
75101
racc (~> 1.4)
76102
parallel (1.25.1)
77103
parser (3.3.3.0)
78104
ast (~> 2.4.1)
79105
racc
106+
pp (0.6.2)
107+
prettyprint
108+
prettyprint (0.2.0)
80109
prism (0.27.0)
110+
psych (5.2.6)
111+
date
112+
stringio
81113
racc (1.8.1)
82-
rack (2.2.13)
114+
rack (3.1.15)
115+
rack-session (2.1.1)
116+
base64 (>= 0.1.0)
117+
rack (>= 3.0.0)
83118
rack-test (2.2.0)
84119
rack (>= 1.3)
85-
rails-dom-testing (2.2.0)
120+
rackup (2.2.1)
121+
rack (>= 3)
122+
rails-dom-testing (2.3.0)
86123
activesupport (>= 5.0.0)
87124
minitest
88125
nokogiri (>= 1.6)
89126
rails-html-sanitizer (1.6.2)
90127
loofah (~> 2.21)
91128
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
92-
railties (7.0.8.7)
93-
actionpack (= 7.0.8.7)
94-
activesupport (= 7.0.8.7)
95-
method_source
129+
railties (7.2.2.1)
130+
actionpack (= 7.2.2.1)
131+
activesupport (= 7.2.2.1)
132+
irb (~> 1.13)
133+
rackup (>= 1.0.0)
96134
rake (>= 12.2)
97-
thor (~> 1.0)
98-
zeitwerk (~> 2.5)
135+
thor (~> 1.0, >= 1.2.2)
136+
zeitwerk (~> 2.6)
99137
rainbow (3.1.1)
100-
rake (13.0.6)
138+
rake (13.2.1)
101139
rbi (0.1.12)
102140
prism (>= 0.18.0, < 0.28)
103141
sorbet-runtime (>= 0.5.9204)
142+
rdoc (6.14.0)
143+
erb
144+
psych (>= 4.0.0)
104145
regexp_parser (2.9.2)
146+
reline (0.6.1)
147+
io-console (~> 0.5)
105148
rexml (3.3.9)
106149
rubocop (1.64.1)
107150
json (~> 2.3)
@@ -125,22 +168,24 @@ GEM
125168
rubocop (>= 0.90.0)
126169
ruby-progressbar (1.13.0)
127170
ruby2_keywords (0.0.5)
171+
securerandom (0.4.1)
128172
smart_properties (1.17.0)
129-
sorbet (0.5.11367)
130-
sorbet-static (= 0.5.11367)
131-
sorbet-runtime (0.5.11367)
132-
sorbet-static (0.5.11367-aarch64-linux)
133-
sorbet-static (0.5.11367-universal-darwin)
134-
sorbet-static (0.5.11367-x86_64-linux)
135-
sorbet-static-and-runtime (0.5.11367)
136-
sorbet (= 0.5.11367)
137-
sorbet-runtime (= 0.5.11367)
173+
sorbet (0.5.12135)
174+
sorbet-static (= 0.5.12135)
175+
sorbet-runtime (0.5.12135)
176+
sorbet-static (0.5.12135-aarch64-linux)
177+
sorbet-static (0.5.12135-universal-darwin)
178+
sorbet-static (0.5.12135-x86_64-linux)
179+
sorbet-static-and-runtime (0.5.12135)
180+
sorbet (= 0.5.12135)
181+
sorbet-runtime (= 0.5.12135)
138182
spoom (1.3.2)
139183
erubi (>= 1.10.0)
140184
prism (>= 0.19.0)
141185
sorbet-static-and-runtime (>= 0.5.10187)
142186
thor (>= 0.19.2)
143187
spring (4.0.0)
188+
stringio (3.1.7)
144189
tapioca (0.13.3)
145190
bundler (>= 2.2.25)
146191
netrc (>= 0.11.0)
@@ -150,20 +195,22 @@ GEM
150195
spoom (>= 1.2.0)
151196
thor (>= 1.2.0)
152197
yard-sorbet
153-
thor (1.3.1)
198+
thor (1.3.2)
154199
tzinfo (2.0.6)
155200
concurrent-ruby (~> 1.0)
156201
unicode-display_width (2.5.0)
202+
useragent (0.16.11)
157203
yard (0.9.36)
158204
yard-sorbet (0.8.1)
159205
sorbet-runtime (>= 0.5)
160206
yard (>= 0.9)
161-
zeitwerk (2.6.4)
207+
zeitwerk (2.6.18)
162208

163209
PLATFORMS
164210
aarch64-linux
165211
arm64-darwin-21
166212
arm64-darwin-22
213+
arm64-darwin-23
167214
x86_64-darwin
168215
x86_64-darwin-20
169216
x86_64-linux

lib/packwerk/application_validator.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def check_package_manifest_syntax(configuration)
7272
def check_application_structure(configuration)
7373
resolver = ConstantResolver.new(
7474
root_path: configuration.root_path.to_s,
75-
load_paths: configuration.load_paths
75+
load_paths: configuration.load_paths,
76+
exclude: configuration.exclude,
7677
)
7778

7879
begin

lib/packwerk/run_context.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def from_configuration(configuration)
2222
inflector: ActiveSupport::Inflector,
2323
custom_associations: configuration.custom_associations,
2424
associations_exclude: configuration.associations_exclude,
25+
exclude: configuration.exclude,
2526
cache_enabled: configuration.cache_enabled?,
2627
cache_directory: configuration.cache_directory,
2728
config_path: configuration.config_path,
@@ -39,6 +40,7 @@ def from_configuration(configuration)
3940
package_paths: T.nilable(T.any(T::Array[String], String)),
4041
custom_associations: AssociationInspector::CustomAssociations,
4142
associations_exclude: T::Array[String],
43+
exclude: T::Array[String],
4244
checkers: T::Array[Checker],
4345
cache_enabled: T::Boolean,
4446
).void
@@ -52,6 +54,7 @@ def initialize(
5254
package_paths: nil,
5355
custom_associations: [],
5456
associations_exclude: [],
57+
exclude: [],
5558
checkers: Checker.all,
5659
cache_enabled: false
5760
)
@@ -65,6 +68,7 @@ def initialize(
6568
@cache_enabled = cache_enabled
6669
@cache_directory = cache_directory
6770
@config_path = config_path
71+
@exclude = exclude
6872

6973
@file_processor = T.let(nil, T.nilable(FileProcessor))
7074
@context_provider = T.let(nil, T.nilable(ConstantDiscovery))
@@ -123,6 +127,7 @@ def resolver
123127
root_path: @root_path,
124128
load_paths: @load_paths,
125129
inflector: @inflector,
130+
exclude: @exclude,
126131
)
127132
end
128133

lib/packwerk/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# frozen_string_literal: true
33

44
module Packwerk
5-
VERSION = "3.2.2"
5+
VERSION = "3.2.3"
66
end

packwerk.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Gem::Specification.new do |spec|
4040

4141
spec.add_dependency("activesupport", ">= 6.0")
4242
spec.add_dependency("bundler")
43-
spec.add_dependency("constant_resolver", ">= 0.2.0")
43+
spec.add_dependency("constant_resolver", ">= 0.3")
4444
spec.add_dependency("parallel")
4545
spec.add_dependency("sorbet-runtime", ">= 0.5.9914")
4646
spec.add_dependency("zeitwerk", ">= 2.6.1")

0 commit comments

Comments
 (0)