Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tabby opened this issue Feb 21, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Tabby
Copy link

Tabby commented Feb 21, 2023

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

@Tabby Tabby added the bug Something isn't working label Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant