[Bug Report] Getting "There were stale violations found, please run `packwerk update-todo`" even there is no stale violations
kalys opened this issue · 7 comments
kalys commented
Description
I'm getting "There were stale violations found, please run packwerk update-todo" when I run check command againts some files.
For this you have to have one violation in several files.
For example:
# This file contains a list of dependencies that are not part of the long term plan for the
# 'packs/one' package.
# We should generally work to reduce this list over time.
#
# You can regenerate this file using the following command:
#
# bin/packwerk update-todo
---
".":
"::ApplicationController":
violations:
- dependency
files:
- packs/one/bar.rb
- packs/one/baz.rb
To Reproduce
- Create a dependency violation in the first file.
- Create the same dependency violation in another file within the same package.
- Run
packwerk update-todo
in order to generate package_todo.yml file. - Run
packwerk check path/to/the/first_file.rb
.
Actual Behaviour
- Command returns
1
status. - Command output contains info about stale violations.
📦 Finished in X.XX seconds
No offenses detected
There were stale violations found, please run `packwerk update-todo`
Expected Behaviour
- Command returns
0
status - Command output has no info about stale violations
Version Information
- Packwerk: 3.1.0
- Ruby: 3.2.1
Additional Context
3.0.1 has no this problem
rafaelfranca commented
What happen if you run update-todo
?
kalys commented
@rafaelfranca I added package update-todo
step to STR.
krisleech commented
I know this isn't much help, but we had this problem on CI for a day or so, but it just went away. Running update-todo
did not help.