Shopify / packwerk

Good things come in small packages.
MIT License
1.54k stars 111 forks source link

[Bug Report] Getting "There were stale violations found, please run `packwerk update-todo`" even there is no stale violations #369

Open kalys opened 10 months ago

kalys commented 10 months ago

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

  1. Create a dependency violation in the first file.
  2. Create the same dependency violation in another file within the same package.
  3. Run packwerk update-todo in order to generate package_todo.yml file.
  4. Run packwerk check path/to/the/first_file.rb.

Actual Behaviour

📦 Finished in X.XX seconds

No offenses detected
There were stale violations found, please run `packwerk update-todo`

Expected Behaviour

Version Information

Additional Context 3.0.1 has no this problem

rafaelfranca commented 10 months ago

What happen if you run update-todo?

kalys commented 10 months ago

@rafaelfranca I added package update-todo step to STR.

krisleech commented 5 months ago

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.