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

Clarify validity requirements in docs of PackageFilesInfo/PackageFilegroupInfo #746

Open
nnmm opened this issue Aug 29, 2023 · 3 comments
Open
Labels
documentation need more information P3 An issue that we are not working on but will review quarterly

Comments

@nnmm
Copy link

nnmm commented Aug 29, 2023

Is it invalid (meaning under no circumstances a good idea, assumed by consuming rules not to happen) to have

  • A PackageFilegroupInfo that contains the same destination file twice? I assume yes, c.f. Make duplicate output paths an error instead of a warning #682
  • A PackageFilesInfo that contains directory Files?
  • A PackageFilesInfo that contains symlink Files?
  • One or two PackageFilesInfo in the same PackageFilegroupInfo containing both a file a/b and a file a/b/c, where a/b is a regular or symlink File?
  • One or two PackageFilesInfo in the same PackageFilegroupInfo containing both a file a/b and a file a/b/c, where a/b is a directory File?

Imo it would be helpful to mention that in the docs of the respective provider. That way, these providers can become a more standardized interface between producing and consuming rules.

@aiuto aiuto added P3 An issue that we are not working on but will review quarterly documentation labels Oct 16, 2023
@aiuto
Copy link
Collaborator

aiuto commented Oct 16, 2023

Do you intend to create new rules which would consume these providers?

I'm having trouble understanding the questions abouta/b and a/b/c mixing where a/b is a regular file. Do you have a working example which can do that? If the source package a/b exists, so there can be a target a/b/c, then it is almost always incorrect in Bazel to have the package a produce the plain or symlink target a/b.

@nnmm
Copy link
Author

nnmm commented Oct 17, 2023

@aiuto Yes, I do have a custom rule consuming these providers.

By "containing a file a/b", I mean an entry in dest_src_map with key a/b. So this has nothing to do with targets' names/packages, only with the destination path.

@aiuto
Copy link
Collaborator

aiuto commented Oct 17, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation need more information P3 An issue that we are not working on but will review quarterly
Projects
None yet
Development

No branches or pull requests

2 participants