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

Remove explicit repo name loading local bzl files #2485

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apple/cc_toolchain_forwarder.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
A rule for handling the cc_toolchains and their constraints for a potential "fat" Mach-O binary.
"""

load("@build_bazel_rules_apple//apple/internal:providers.bzl", "new_appleplatforminfo")
load("@build_bazel_rules_apple//apple:providers.bzl", "ApplePlatformInfo")
load("//apple/internal:providers.bzl", "new_appleplatforminfo")
load("//apple:providers.bzl", "ApplePlatformInfo")
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain")
Comment on lines +19 to 21
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After doing this, can you reorder the loads? Relative ones should be below external ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related: I noticed buildifier isn't run on PR's here. By design or should that be added?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's checked in buildkite/rules-apple-darwin/pr/buildifier, right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Though maybe it's not as strict as it should be.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran buildifier on the repo locally/manually and got this diff and others like it. I'll look to see if it's a version diff or something.

CleanShot 2024-07-11 at 14 43 48@2x

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make the sorts another PR, and if I see a buildifier fix I'll include that with it.


def _target_os_from_rule_ctx(ctx):
Expand Down
6 changes: 3 additions & 3 deletions apple/internal/apple_xcframework_import.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ load(
"@build_bazel_rules_apple//apple/internal:framework_import_support.bzl",
"framework_import_support",
)
load("@build_bazel_rules_apple//apple/internal:intermediates.bzl", "intermediates")
load("@build_bazel_rules_apple//apple/internal:rule_attrs.bzl", "rule_attrs")
load("//apple/internal:intermediates.bzl", "intermediates")
load("//apple/internal:rule_attrs.bzl", "rule_attrs")
load(
"@build_bazel_rules_apple//apple/internal/aspects:swift_usage_aspect.bzl",
"SwiftUsageInfo",
)
load("@build_bazel_rules_apple//apple:providers.bzl", "AppleFrameworkImportInfo")
load("//apple:providers.bzl", "AppleFrameworkImportInfo")
load(
"@build_bazel_rules_apple//apple/internal/providers:framework_import_bundle_info.bzl",
"AppleFrameworkImportBundleInfo",
Expand Down
4 changes: 2 additions & 2 deletions apple/internal/aspects/app_intents_aspect.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ load(
"@build_bazel_apple_support//lib:apple_support.bzl",
"apple_support",
)
load("@build_bazel_rules_apple//apple/internal:cc_info_support.bzl", "cc_info_support")
load("//apple/internal:cc_info_support.bzl", "cc_info_support")
load(
"@build_bazel_rules_apple//apple/internal/providers:app_intents_info.bzl",
"//apple/internal/providers:app_intents_info.bzl",
"AppIntentsInfo",
)
load(
Expand Down
10 changes: 5 additions & 5 deletions apple/internal/framework_import_support.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

"""Support methods for Apple framework import rules."""

load("@build_bazel_rules_apple//apple/internal/utils:files.bzl", "files")
load("@build_bazel_rules_apple//apple/internal:providers.bzl", "new_appleframeworkimportinfo")
load("@build_bazel_rules_apple//apple:providers.bzl", "AppleFrameworkImportInfo")
load("@build_bazel_rules_apple//apple/internal/utils:defines.bzl", "defines")
load("@build_bazel_rules_apple//apple:utils.bzl", "group_files_by_directory")
load("//apple/internal/utils:files.bzl", "files")
load("//apple/internal:providers.bzl", "new_appleframeworkimportinfo")
load("//apple:providers.bzl", "AppleFrameworkImportInfo")
load("//apple/internal/utils:defines.bzl", "defines")
load("//apple:utils.bzl", "group_files_by_directory")
load(
"@build_bazel_rules_swift//swift:swift.bzl",
"SwiftInfo",
Expand Down
6 changes: 3 additions & 3 deletions apple/internal/local_provisioning_profiles.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ provisioning_profile_repository.setup(
### In your `WORKSPACE` file:
```starlark
load("@build_bazel_rules_apple//apple:apple.bzl", "provisioning_profile_repository")
load("//apple:apple.bzl", "provisioning_profile_repository")
provisioning_profile_repository(
name = "local_provisioning_profiles",
Expand All @@ -74,7 +74,7 @@ provisioning_profile_repository(
### In your `BUILD` files (see `local_provisioning_profile` for more examples):
```starlark
load("@build_bazel_rules_apple//apple:apple.bzl", "local_provisioning_profile")
load("//apple:apple.bzl", "local_provisioning_profile")
local_provisioning_profile(
name = "app_debug_profile",
Expand Down Expand Up @@ -199,7 +199,7 @@ same profile name.
## Example
```starlark
load("@build_bazel_rules_apple//apple:apple.bzl", "local_provisioning_profile")
load("//apple:apple.bzl", "local_provisioning_profile")
local_provisioning_profile(
name = "app_debug_profile",
Expand Down
6 changes: 3 additions & 3 deletions apple/internal/partials/app_intents_metadata_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

"""Partial implementation for processing AppIntents metadata bundle."""

load("@build_bazel_rules_apple//apple/internal:intermediates.bzl", "intermediates")
load("@build_bazel_rules_apple//apple/internal:linking_support.bzl", "linking_support")
load("@build_bazel_rules_apple//apple/internal:processor.bzl", "processor")
load("//apple/internal:intermediates.bzl", "intermediates")
load("//apple/internal:linking_support.bzl", "linking_support")
load("//apple/internal:processor.bzl", "processor")
load(
"@build_bazel_rules_apple//apple/internal/providers:app_intents_info.bzl",
"AppIntentsInfo",
Expand Down
2 changes: 1 addition & 1 deletion apple/internal/resource_actions/app_intents.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""AppIntents intents related actions."""

load("@build_bazel_apple_support//lib:apple_support.bzl", "apple_support")
load("@build_bazel_rules_apple//apple/internal:intermediates.bzl", "intermediates")
load("//apple/internal:intermediates.bzl", "intermediates")

def generate_app_intents_metadata_bundle(
*,
Expand Down
2 changes: 1 addition & 1 deletion apple/internal/xcarchive.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ metadata for the .xcarchive.
Example:
````starlark
load("@build_bazel_rules_apple//apple:xcarchive.bzl", "xcarchive")
load("//apple:xcarchive.bzl", "xcarchive")
ios_application(
name = "App",
Expand Down
6 changes: 3 additions & 3 deletions doc/rules-apple.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ same profile name.
## Example

```starlark
load("@build_bazel_rules_apple//apple:apple.bzl", "local_provisioning_profile")
load("//apple:apple.bzl", "local_provisioning_profile")

local_provisioning_profile(
name = "app_debug_profile",
Expand Down Expand Up @@ -442,7 +442,7 @@ provisioning_profile_repository.setup(
### In your `WORKSPACE` file:

```starlark
load("@build_bazel_rules_apple//apple:apple.bzl", "provisioning_profile_repository")
load("//apple:apple.bzl", "provisioning_profile_repository")

provisioning_profile_repository(
name = "local_provisioning_profiles",
Expand All @@ -453,7 +453,7 @@ provisioning_profile_repository(
### In your `BUILD` files (see `local_provisioning_profile` for more examples):

```starlark
load("@build_bazel_rules_apple//apple:apple.bzl", "local_provisioning_profile")
load("//apple:apple.bzl", "local_provisioning_profile")

local_provisioning_profile(
name = "app_debug_profile",
Expand Down
2 changes: 1 addition & 1 deletion doc/rules-xcarchive.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ metadata for the .xcarchive.
Example:

````starlark
load("@build_bazel_rules_apple//apple:xcarchive.bzl", "xcarchive")
load("//apple:xcarchive.bzl", "xcarchive")

ios_application(
name = "App",
Expand Down