-
Notifications
You must be signed in to change notification settings - Fork 96
Create xcodeproj_extra_files aspect hint #3150
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
base: main
Are you sure you want to change the base?
Create xcodeproj_extra_files aspect hint #3150
Conversation
xcodeproj/defs.bzl
Outdated
@@ -34,6 +35,7 @@ project_options = _project_options | |||
top_level_target = _top_level_target | |||
top_level_targets = _top_level_targets | |||
xcodeproj = _xcodeproj | |||
xcodeproj_extra_files = _xcodeproj_extra_files |
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.
We are moving away from a single file for loads, so let’s instead just have the aspect hint live one level up.
@@ -36,6 +37,7 @@ genrule( | |||
":xcode_schemes", | |||
":xcode_build_settings", | |||
":providers", | |||
":aspect_hints", |
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.
This is giving me an error. I tried to mimic the setup for the other sets of documentation, but I think the issues is that this is the first one where the implementation is at the root of xcodeproj/
rather than in xcodeproj/internal/
ERROR: /Users/johnflanagan/Projects/src/rules_xcodeproj/docs/BUILD:19:12: in deps attribute of starlark_doc_extract rule //docs:aspect_hints.extract: missing bzl_library targets for Starlark module(s) //xcodeproj:xcodeproj_extra_files.bzl. Since this rule was created by the macro 'stardoc', the error might have been caused by the macro implementation
ERROR: /Users/johnflanagan/Projects/src/rules_xcodeproj/docs/BUILD:19:12: Analysis of target '//docs:aspect_hints.extract' failed
ERROR: Analysis of target '//docs:update' failed; build aborted: Analysis failed
|
||
target_under_test = analysistest.target_under_test(env) | ||
|
||
asserts.equals(env, depset(["BUILD"]), target_under_test[XcodeProjExtraFilesHintInfo].files) |
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.
This is failing with:
DEBUG: /Users/johnflanagan/Projects/src/rules_xcodeproj/bazel-output-base/external/bazel_skylib+/lib/unittest.bzl:465:10: In test _provider_contents_test_impl from //test/internal/xcodeproj_extra_files:xcodeproj_extra_files_tests.bzl: Expected "depset(["BUILD"])", but got "depset([<source file test/internal/xcodeproj_extra_files/BUILD>])"
Create an aspect hint to allow dependencies to propagate up extra files that should be include in the Xcode navigator