Skip to content

[Bug Report] deprecated_references.yml files erroneously removed if running packwerk update-deprecations with the --package argument #306

@Tabby

Description

@Tabby

Description

Since #199 was released, running packwerk update-deprecations --packages=components/some_component in order to save time by only updating one component instead of everything now causes all deprecated_references.yml files other than those in the specified component to be deleted when they shouldn't be.

To Reproduce

  • Have a project with more than one deprecated_references.yml file
  • Run packwerk update-deprecations --packages=<one of the multiple packages> or packwerk update-deprecations <one of the multiple packages>

Expected Behaviour

Only the deprecated_references.yml file in the specified package(s) should be changed, all others should be untouched.

Version Information

  • Packwerk: v2.2.2
  • Ruby: 3.2.0 MRI
  • OS: Mac OS 13.1

Additional Context

This might be intentional, but the expected behaviour described above is how packwerk used to behave before #199 was released. I've been using the ability to update only a single package for a long time to save time (as suggested by the docs) because running it on our whole repository takes about 30s, whereas running on just the one package is often only 4-5s.

This is not a huge issue, as the (I think new?) cache option reduces the time to run update-deprecations on the whole repository to only about 6s once cached vs 3-4s for a single package, but the new behaviour is surprising

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions