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

Ignore files that are only imports for unstable packages #2142

Open
bufdev opened this issue May 31, 2023 · 0 comments
Open

Ignore files that are only imports for unstable packages #2142

bufdev opened this issue May 31, 2023 · 0 comments
Labels
Feature New feature or request

Comments

@bufdev
Copy link
Member

bufdev commented May 31, 2023

For buf breaking, We should ignore files being deleted if allow_unstable_packages is try that are:

  • Marked as imports
  • Only imported by unstable packages

This actually is probably somewhat easy - we have a designation of whether a file is an import or not as part of our ImageFile construct, and we can use that to denote whether a FILE_NO_DELETE should be emitted. The check will need to be done at a Files level though - if a file is deleted and it was a source or imported by a stable package, it still should be marked as deleted.

You could make an argument either way: technically, its part of your build, and a stable package, so you could argue that it is modifying a stable package, but you could also argue that for the sources you care about, imports are only part of the packages that import them, and if an unstable package is importing something and you don't care about unstable packages, then you don't care about its imports either.

This argument might apply for all breaking change rules that are only imports of unstable packages.

See #2129.

@doriable doriable added the Feature New feature or request label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants