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

Validate web_resources() #22

Closed
dgp1130 opened this issue Jan 17, 2021 · 0 comments
Closed

Validate web_resources() #22

dgp1130 opened this issue Jan 17, 2021 · 0 comments
Labels
feature New feature or request
Milestone

Comments

@dgp1130
Copy link
Owner

dgp1130 commented Jan 17, 2021

Currently, the web_resources() rule merges all its transitive dependencies into a single directory and fails if there is a merge conflict. However, this merge is done at the top-level when a consumer wants the full directory. This directory is not generated for every web_resources() rule, only the last one. This means that if there is a path conflict, that won't be detected until the very end of the compilation.

This is particularly annoying if a developer created a shared component and checked in a bad web_resources() rule (depending on some other web_resources() targets which caused a path conflict). They might be able to pass tests and submit their change. Only once a web_resources_devserver() or other consumer actually used the directory would the error be found. If there is an organizational boundary between the shared component developer and the prerender_page() where it is used, this could be quite annoying to find and fix.

We need to find a way to validate that the web_resources() rule does not have conflicts as part of its own compilation, even before it is actually used. Bazel doesn't have great support for validating builds at the moment, but mangling the dependencies in a non-intuitive way could possibly trigger a full merge to be done before allowing downstream web_resources() targets to depend on a broken target.

@dgp1130 dgp1130 added the feature New feature or request label Jan 17, 2021
@dgp1130 dgp1130 added this to the 1.0.0 milestone Jan 17, 2021
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

1 participant