Skip to content

Commit

Permalink
[Stardoc] Cleanup new stardoc include issues, removing internal docs
Browse files Browse the repository at this point in the history
1. Export all files to `bzl_srcs`
2. Remove mirror of includes into `bzl_library`
3. Remove documentation of internal sources

Related: #783 #776
  • Loading branch information
jerrymarino committed Oct 19, 2023
1 parent 6f5c50e commit 95f0456
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 259 deletions.
2 changes: 0 additions & 2 deletions docs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ _DOC_SRCS = [
"features",
"framework",
"hmap",
"import_middleman",
"library",
"plists",
"force_load_direct_deps",
"precompiled_apple_resource_bundle",
"providers",
"substitute_build_settings",
Expand Down
48 changes: 0 additions & 48 deletions docs/force_load_direct_deps_doc.md

This file was deleted.

74 changes: 0 additions & 74 deletions docs/import_middleman_doc.md

This file was deleted.

142 changes: 34 additions & 108 deletions rules/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ bzl_library(
srcs = ["transition_support.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
"@build_bazel_apple_support//lib:apple_support",
"@rules_apple_api//:api",
],
deps = [":bzl_srcs"],
)

bzl_library(
Expand All @@ -51,38 +48,20 @@ bzl_library(
visibility = ["//visibility:public"],
)

bzl_library(
name = "force_load_direct_deps",
srcs = ["force_load_direct_deps.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
":providers",
":transition_support",
"@rules_apple_api//:api",
],
)

bzl_library(
name = "xcconfig.doc",
srcs = ["xcconfig.doc.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = ["//rules/library:xcconfig"],
deps = ["bzl_srcs"],
)

bzl_library(
name = "plists",
srcs = ["plists.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
":substitute_build_settings",
"//rules/library:xcconfig",
"@bazel_skylib//lib:sets",
"@bazel_skylib//lib:types",
"@bazel_skylib//rules:write_file",
],
deps = [":bzl_srcs"],
)

bzl_library(
Expand All @@ -99,25 +78,7 @@ bzl_library(
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
":transition_support",
":utils.bzl",
"@bazel_skylib//lib:partial",
"@bazel_skylib//lib:paths",
"@build_bazel_apple_support//lib:apple_support",
"@build_bazel_rules_apple//apple",
],
)

bzl_library(
name = "import_middleman",
srcs = ["import_middleman.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
":features",
"//rules/internal:objc_provider_utils",
"@build_bazel_rules_apple//apple",
"@rules_apple_api//:api",
":bzl_srcs",
],
)

Expand All @@ -126,101 +87,72 @@ bzl_library(
srcs = ["library.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
":hmap",
":import_middleman",
":precompiled_apple_resource_bundle",
":utils.bzl",
"//rules/framework:vfs_overlay",
"//rules/library:resources",
"//rules/library:xcconfig",
"@bazel_skylib//lib:paths",
"@bazel_skylib//lib:selects",
"@bazel_skylib//lib:sets",
"@bazel_skylib//rules:write_file",
"@build_bazel_rules_apple//apple",
"@build_bazel_rules_apple//apple:apple_static_library",
"@build_bazel_rules_apple//apple:resources",
"@build_bazel_rules_swift//swift",
"@rules_apple_api//:api",
],
deps = [":bzl_srcs"],
)

bzl_library(
name = "framework",
srcs = ["framework.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
":features",
":force_load_direct_deps",
":library",
":plists",
":providers",
":transition_support",
"//rules/framework:vfs_overlay",
"//rules/internal:objc_provider_utils",
"@bazel_skylib//lib:partial",
"@bazel_skylib//lib:paths",
"@bazel_tools//tools/cpp:toolchain_utils.bzl",
"@build_bazel_rules_apple//apple",
"@build_bazel_rules_swift//swift",
"@rules_apple_api//:api",
],
deps = [":bzl_srcs"],
)

bzl_library(
name = "apple_patched",
srcs = ["apple_patched.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
":features",
":providers",
"//rules/framework:vfs_overlay",
"@build_bazel_rules_apple//apple",
"@build_bazel_rules_swift//swift",
],
deps = [":bzl_srcs"],
)

bzl_library(
name = "app_clip",
srcs = ["app_clip.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
":force_load_direct_deps",
":plists",
"//rules/internal:framework_middleman",
"@build_bazel_rules_apple//apple:ios",
],
deps = [":bzl_srcs"],
)

bzl_library(
name = "app",
srcs = ["app.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
":force_load_direct_deps",
":library",
":plists",
"//rules/internal:framework_middleman",
"@build_bazel_rules_apple//apple:ios",
],
deps = [":bzl_srcs"],
)

bzl_library(
name = "extension",
srcs = ["extension.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [":bzl_srcs"],
)

# A library for all of the bzl_srcs, to satisfy `stardoc`'s deps attribute.
bzl_library(
name = "bzl_srcs",
srcs = glob([
"*.bzl",
"internal/*.bzl",
]),
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
":force_load_direct_deps",
":plists",
":transition_support",
"//rules/internal:framework_middleman",
"//data:xcspecs",
"//rules/framework:vfs_overlay",
"//rules/library:bzl_srcs",
"@bazel_skylib//lib:paths",
"@bazel_skylib//lib:selects",
"@bazel_skylib//lib:sets",
"@bazel_skylib//lib:types",
"@bazel_skylib//rules:write_file",
"@build_bazel_rules_apple//apple",
"@build_bazel_rules_apple//apple:apple_static_library",
"@build_bazel_rules_apple//apple:ios",
"@build_bazel_rules_apple//apple:resources",
"@build_bazel_rules_swift//swift",
"@rules_apple_api//:api",
],
)
Expand All @@ -230,11 +162,5 @@ bzl_library(
srcs = ["test.bzl"],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
":library",
":plists",
"//rules/internal:framework_middleman",
"@bazel_skylib//lib:types",
"@build_bazel_rules_apple//apple:ios",
],
deps = [":bzl_srcs"],
)
24 changes: 0 additions & 24 deletions rules/internal/BUILD.bazel

This file was deleted.

Loading

0 comments on commit 95f0456

Please sign in to comment.