-
Notifications
You must be signed in to change notification settings - Fork 91
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
Co-locate generated files #3049
Conversation
ab82865
to
9ff77e8
Compare
9ff77e8
to
1af26b5
Compare
This fixes those "top-level" generated folders from our internal upstream project, and looks pretty good. We have enough configs with sim+device times 3 product variants that there are 6 generated folders per library, so it's not a silver arrow for making things drop-dead-easy for Apple devs not fluent in Bazel, but it's also a big improvement over what we had previously. |
What if we added an option to map a configuration name to something more idiomatic/familiar? |
We might be able to smartly translate those, since we know the platform, minOS, and arch for any given config by virtue of targets that have that config. So these could be named similar to how we do target disambiguation 🤔. That would be a followup PR though. |
b408d68
to
01bb4d2
Compare
tools/generators/files_and_groups/src/Generator/CalculatePathTree.swift
Outdated
Show resolved
Hide resolved
787ffb8
to
ea062fe
Compare
test/internal/pbxproj_partials/write_files_and_groups_tests.bzl
Outdated
Show resolved
Hide resolved
test/internal/pbxproj_partials/write_files_and_groups_tests.bzl
Outdated
Show resolved
Hide resolved
573c0ff
to
8d2a6c9
Compare
...files_and_groups/test/ElementCreator/CreateInlineBazelGeneratedConfigGroupElementTests.swift
Show resolved
Hide resolved
...ators/files_and_groups/test/ElementCreator/CreateInlineBazelGeneratedFilesElementTests.swift
Show resolved
Hide resolved
71d7dfe
to
9fe354a
Compare
@erikkerber @sebastianv1 Can you approve if works for you locally? |
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.
Thank you for the help!
This makes it clear which type of node we are dealing with. It also sets us up for future enhancements where we don’t exactly map to the filesystem (e.g. co-locating generated outputs with source files). Signed-off-by: Brentley Jones <github@brentleyjones.com>
Signed-off-by: Brentley Jones <github@brentleyjones.com>
Update the API to support the generated_files/folder mocks structure Signed-off-by: Sebastian Shanus <sebastian.shanus@robinhood.com>
The path tree layout is nondeterministic from its upstream grouping in a dictionary. Putting the sort here seemed best since other path tree sorting happens here. Reviewers: Signed-off-by: Sebastian Shanus <sebastian.shanus@robinhood.com>
Adds tests and basic coverage over the new `ElementCreator` types. Signed-off-by: Sebastian Shanus <sebastian.shanus@robinhood.com>
Relocates up into `calculatePathTree` Signed-off-by: Sebastian Shanus <sebastian.shanus@robinhood.com>
Avoids constructing the native `Label` for a mocked `struct` with the required properties. Signed-off-by: Sebastian Shanus <sebastian.shanus@robinhood.com>
No need to future proof the model as it stands, we only need the path + owner as a model. Signed-off-by: Sebastian Shanus <sebastian.shanus@robinhood.com>
Adds assertions for group element contents. Signed-off-by: Sebastian Shanus <sebastian.shanus@robinhood.com>
9fe354a
to
95bced0
Compare
Resolves #3037.