pks reports no constant references at all from a small number of .erb files. The file is walked and parsed as far as pks is concerned, it just yields nothing, so any boundary violation in it goes unreported.
On one of ours:
$ pks list-included-files | grep -c external_worker_statuses/show.html.erb
1
$ pks -p check 2>&1 | grep external_worker_statuses/show.html.erb
Started processing [...]/external_worker_statuses/show.html.erb
Finished processing [...]/external_worker_statuses/show.html.erb
$ pks check --ignore-recorded-violations [that file]
No violations detected!
packwerk check finds three violations in it.
How many
Appending a known cross-pack private constant reference to every .erb file in our app and re-running check, 8 of 735 fail to report it. The other 727 are fine.
What it isn't
I could not isolate the construct. Ruled out on the file above:
- multi-line
<% %> tags, and multi-line <%# %> comments
<%= ... do |f| %> block tags
- ERB whose generated Ruby doesn't parse, since 225 of our files are in that state and are still checked correctly
Appending a plain single-line reference to an affected file is also not detected, so whatever it is takes out the whole file rather than particular expressions in it.
Why it's worth fixing
It is silent. A clean pks check doesn't distinguish "no violations here" from "this file was never read", and nothing in the output points at the affected files. We only noticed because pks update proposed deleting todo entries that packwerk still detects.
I can share one of the affected files privately if that helps; they are application views I can't post as-is.
pks reports no constant references at all from a small number of
.erbfiles. The file is walked and parsed as far as pks is concerned, it just yields nothing, so any boundary violation in it goes unreported.On one of ours:
packwerk checkfinds three violations in it.How many
Appending a known cross-pack private constant reference to every
.erbfile in our app and re-runningcheck, 8 of 735 fail to report it. The other 727 are fine.What it isn't
I could not isolate the construct. Ruled out on the file above:
<% %>tags, and multi-line<%# %>comments<%= ... do |f| %>block tagsAppending a plain single-line reference to an affected file is also not detected, so whatever it is takes out the whole file rather than particular expressions in it.
Why it's worth fixing
It is silent. A clean
pks checkdoesn't distinguish "no violations here" from "this file was never read", and nothing in the output points at the affected files. We only noticed becausepks updateproposed deleting todo entries thatpackwerkstill detects.I can share one of the affected files privately if that helps; they are application views I can't post as-is.