-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: flatten golden files directory #22967
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
Conversation
@@ -7,15 +7,19 @@ load("@npm//ts-api-guardian:index.bzl", "ts_api_guardian_test") | |||
against the associated source entry point. | |||
""" | |||
|
|||
def generate_test_targets(golden_files): | |||
for golden_file in golden_files: | |||
def generate_test_targets(targets): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was split between doing this here or when generating the target names in tools/public_api_guard/BUILD.bazel
. I decided to do it here, because even though it would be cleaner when generating the target names, I think that the slashes in the target name make sense, they just produce a weird directory structure when the golden is generated.
Currently all the golden files for primary entry points are at the root which makes them easy to find, but the ones for secondary entry points are in sub-directories and all have the same name (`autocomplete/testing.d.ts`, `button/testing.d.ts` etc.) which is hard to look up and looks weird when browsing through the file system. These changes flatten the directory so that the testing files are next to their entry points.
5759850
to
20d1fe5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think it doesn't matter too much how these files are aligned; but I'd agree that this is more readable. I've kept them initially like that so that I can get nice auto-completion for secondary/tertiary entry-points (where I just append _api.accept
for example)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Currently all the golden files for primary entry points are at the root which makes them easy to find, but the ones for secondary entry points are in sub-directories and all have the same name (`autocomplete/testing.d.ts`, `button/testing.d.ts` etc.) which is hard to look up and looks weird when browsing through the file system. These changes flatten the directory so that the testing files are next to their entry points. (cherry picked from commit 766b07e)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently all the golden files for primary entry points are at the root which makes them easy to find, but the ones for secondary entry points are in sub-directories and all have the same name (
autocomplete/testing.d.ts
,button/testing.d.ts
etc.) which is hard to look up and looks weird when browsing through the file system.These changes flatten the directory so that the testing files are next to their entry points.