diff --git a/src/main/java/com/google/devtools/build/docgen/StarlarkDocumentationCollector.java b/src/main/java/com/google/devtools/build/docgen/StarlarkDocumentationCollector.java index 433016dd63c441..341336183f11f3 100644 --- a/src/main/java/com/google/devtools/build/docgen/StarlarkDocumentationCollector.java +++ b/src/main/java/com/google/devtools/build/docgen/StarlarkDocumentationCollector.java @@ -40,7 +40,7 @@ final class StarlarkDocumentationCollector { @StarlarkBuiltin( name = "globals", - category = DocCategory.TOP_LEVEL_TYPE, + category = DocCategory.TOP_LEVEL_MODULE, doc = "Objects, functions and modules registered in the global environment.") private static final class TopLevelModule implements StarlarkValue {} diff --git a/src/main/java/com/google/devtools/build/docgen/StarlarkDocumentationProcessor.java b/src/main/java/com/google/devtools/build/docgen/StarlarkDocumentationProcessor.java index 5e8530064e2f52..a7ac11d147bb03 100644 --- a/src/main/java/com/google/devtools/build/docgen/StarlarkDocumentationProcessor.java +++ b/src/main/java/com/google/devtools/build/docgen/StarlarkDocumentationProcessor.java @@ -36,7 +36,7 @@ public final class StarlarkDocumentationProcessor { private static final ImmutableList GLOBAL_CATEGORIES = - ImmutableList.of(Category.NONE, Category.TOP_LEVEL_TYPE); + ImmutableList.of(Category.TOP_LEVEL_MODULE); private StarlarkDocumentationProcessor() {} @@ -90,7 +90,7 @@ public static void generateDocumentation(String outputDir, String... args) writeCategoryPage(Category.CONFIGURATION_FRAGMENT, outputDir, modulesByCategory, expander); writeCategoryPage(Category.BUILTIN, outputDir, modulesByCategory, expander); writeCategoryPage(Category.PROVIDER, outputDir, modulesByCategory, expander); - writeNavPage(outputDir, modulesByCategory.get(Category.TOP_LEVEL_TYPE)); + writeNavPage(outputDir, modulesByCategory.get(Category.TOP_LEVEL_MODULE)); // In the code, there are two StarlarkModuleCategory instances that have no heading: // TOP_LEVEL_TYPE and NONE. @@ -137,7 +137,7 @@ public static void generateDocumentation(String outputDir, String... args) private static StarlarkBuiltinDoc findGlobalModule( Map> modulesByCategory) { - List topLevelModules = modulesByCategory.get(Category.TOP_LEVEL_TYPE); + List topLevelModules = modulesByCategory.get(Category.TOP_LEVEL_MODULE); String globalModuleName = StarlarkDocumentationCollector.getTopLevelModule().name(); for (StarlarkBuiltinDoc module : topLevelModules) { if (module.getName().equals(globalModuleName)) { @@ -253,16 +253,13 @@ public enum Category { // be usable solely by accessing their members, via modulename.funcname() or // modulename.constantname. // Examples: attr, cc_common, config, java_common - TOP_LEVEL_TYPE(null, null), + TOP_LEVEL_MODULE(null, null), CORE( "Core Starlark data types", "This section lists the data types of the Starlark" - + " core language."), - - // Legacy uncategorized type; these are treated like TOP_LEVEL_TYPE in documentation. - NONE(null, null); + + " core language."); // Maps (essentially free-form) strings in annotations to permitted categories. static Category of(StarlarkBuiltin annot) { @@ -273,15 +270,11 @@ static Category of(StarlarkBuiltin annot) { return PROVIDER; case DocCategory.BUILTIN: return BUILTIN; - case DocCategory.TOP_LEVEL_TYPE: - return TOP_LEVEL_TYPE; - case DocCategory.NONE: - return NONE; + case DocCategory.TOP_LEVEL_MODULE: + return TOP_LEVEL_MODULE; case "core": // interpreter built-ins (e.g. int) case "core.lib": // Starlark standard modules (e.g. json) return CORE; - case "": // no annotation - return TOP_LEVEL_TYPE; default: throw new IllegalStateException( String.format( diff --git a/src/main/java/com/google/devtools/build/docgen/annot/DocCategory.java b/src/main/java/com/google/devtools/build/docgen/annot/DocCategory.java index cd6e56b7612764..169d5c0d65adcc 100644 --- a/src/main/java/com/google/devtools/build/docgen/annot/DocCategory.java +++ b/src/main/java/com/google/devtools/build/docgen/annot/DocCategory.java @@ -26,7 +26,5 @@ private DocCategory() {} // uninstantiable public static final String BUILTIN = "BUILTIN"; - public static final String TOP_LEVEL_TYPE = "TOP_LEVEL_TYPE"; - - public static final String NONE = "NONE"; + public static final String TOP_LEVEL_MODULE = "TOP_LEVEL_MODULE"; } diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BUILD b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BUILD index 9b67970ecef4bb..818b9229a97377 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BUILD +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BUILD @@ -20,18 +20,11 @@ java_library( ], ), deps = [ - "//src/main/java/com/google/devtools/build/lib/actions", + "//src/main/java/com/google/devtools/build/docgen/annot", "//src/main/java/com/google/devtools/build/lib/actions:artifacts", - "//src/main/java/com/google/devtools/build/lib/actions:commandline_item", - "//src/main/java/com/google/devtools/build/lib/analysis:actions/custom_command_line", - "//src/main/java/com/google/devtools/build/lib/analysis:actions/launcher_file_write_action", - "//src/main/java/com/google/devtools/build/lib/analysis:actions/substitution", - "//src/main/java/com/google/devtools/build/lib/analysis:actions/template", - "//src/main/java/com/google/devtools/build/lib/analysis:actions/template_expansion_action", "//src/main/java/com/google/devtools/build/lib/analysis:analysis_cluster", "//src/main/java/com/google/devtools/build/lib/analysis:config/build_options", "//src/main/java/com/google/devtools/build/lib/analysis:config/core_option_converters", - "//src/main/java/com/google/devtools/build/lib/analysis:config/execution_transition_factory", "//src/main/java/com/google/devtools/build/lib/analysis:config/fragment", "//src/main/java/com/google/devtools/build/lib/analysis:config/fragment_options", "//src/main/java/com/google/devtools/build/lib/analysis:config/invalid_configuration_exception", @@ -41,17 +34,14 @@ java_library( "//src/main/java/com/google/devtools/build/lib/analysis/starlark/annotations", "//src/main/java/com/google/devtools/build/lib/bazel/rules/cpp", "//src/main/java/com/google/devtools/build/lib/cmdline", - "//src/main/java/com/google/devtools/build/lib/collect/nestedset", "//src/main/java/com/google/devtools/build/lib/concurrent", "//src/main/java/com/google/devtools/build/lib/events", "//src/main/java/com/google/devtools/build/lib/packages", "//src/main/java/com/google/devtools/build/lib/rules/cpp", "//src/main/java/com/google/devtools/build/lib/rules/python", - "//src/main/java/com/google/devtools/build/lib/util:os", "//src/main/java/com/google/devtools/build/lib/vfs:pathfragment", "//src/main/java/com/google/devtools/common/options", "//src/main/java/net/starlark/java/annot", "//third_party:guava", - "//third_party:jsr305", ], ) diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonConfiguration.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonConfiguration.java index ae1da9e8c9fd56..981378283dcb3b 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonConfiguration.java @@ -14,6 +14,7 @@ package com.google.devtools.build.lib.bazel.rules.python; +import com.google.devtools.build.docgen.annot.DocCategory; import com.google.devtools.build.lib.analysis.config.BuildOptions; import com.google.devtools.build.lib.analysis.config.CoreOptionConverters.LabelConverter; import com.google.devtools.build.lib.analysis.config.Fragment; @@ -36,7 +37,7 @@ /** Bazel-specific Python configuration. */ @Immutable -@StarlarkBuiltin(name = "bazel_py") +@StarlarkBuiltin(name = "bazel_py", category = DocCategory.CONFIGURATION_FRAGMENT) @RequiresOptions(options = {BazelPythonConfiguration.Options.class, PythonOptions.class}) public class BazelPythonConfiguration extends Fragment { diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLauncherInfo.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLauncherInfo.java index 8b1192443da24e..eccfdf1f748596 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLauncherInfo.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLauncherInfo.java @@ -15,7 +15,6 @@ package com.google.devtools.build.lib.rules.cpp; import com.google.common.annotations.VisibleForTesting; -import com.google.devtools.build.docgen.annot.DocCategory; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.packages.BuiltinProvider; import com.google.devtools.build.lib.packages.NativeInfo; @@ -38,8 +37,7 @@ documented = false, doc = "Provider that signals that rules that use launchers can use this target as " - + "the launcher.", - category = DocCategory.TOP_LEVEL_TYPE) + + "the launcher.") public class CcLauncherInfo extends NativeInfo { private static final String RESTRICTION_ERROR_MESSAGE = "This provider is restricted to native.java_binary, native.py_binary and native.java_test. " diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkAttrModuleApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkAttrModuleApi.java index a273b8923d8f36..865211675ca980 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkAttrModuleApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkAttrModuleApi.java @@ -38,7 +38,7 @@ */ @StarlarkBuiltin( name = "attr", - category = DocCategory.TOP_LEVEL_TYPE, + category = DocCategory.TOP_LEVEL_MODULE, doc = "This is a top-level module for defining the attribute schemas of a rule or aspect. Each" + " function returns an object representing the schema of a single attribute. These" diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkCommandLineApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkCommandLineApi.java index 5ffc917868357e..0ef3407f86d081 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkCommandLineApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkCommandLineApi.java @@ -25,7 +25,7 @@ /** Interface for a module associated with creating efficient command lines. */ @StarlarkBuiltin( name = "cmd_helper", - category = DocCategory.TOP_LEVEL_TYPE, + category = DocCategory.TOP_LEVEL_MODULE, doc = "Deprecated. Module for creating memory efficient command lines.") public interface StarlarkCommandLineApi extends StarlarkValue { diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkConfigApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkConfigApi.java index 76287d2f7ee348..0dcca89de532e1 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkConfigApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkConfigApi.java @@ -31,7 +31,7 @@ */ @StarlarkBuiltin( name = "config", - category = DocCategory.BUILTIN, + category = DocCategory.TOP_LEVEL_MODULE, doc = "This is a top-level module for creating configuration transitions and build " + "setting descriptors which describe what kind of build setting (if any) a rule is. " diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkNativeModuleApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkNativeModuleApi.java index e23efd7389dd16..66770ad58fb6c8 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkNativeModuleApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkNativeModuleApi.java @@ -31,7 +31,7 @@ /** Interface for a module with native rule and package helper functions. */ @StarlarkBuiltin( name = "native", - category = DocCategory.BUILTIN, + category = DocCategory.TOP_LEVEL_MODULE, doc = "A built-in module to support native rules and other package helper functions. " + "All native rules appear as functions in this module, e.g. " diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/android/AndroidNeverLinkLibrariesProviderApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/android/AndroidNeverLinkLibrariesProviderApi.java index d11da658173a2f..27e7daac4cd475 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/android/AndroidNeverLinkLibrariesProviderApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/android/AndroidNeverLinkLibrariesProviderApi.java @@ -13,6 +13,7 @@ // limitations under the License. package com.google.devtools.build.lib.starlarkbuildapi.android; +import com.google.devtools.build.docgen.annot.DocCategory; import com.google.devtools.build.docgen.annot.StarlarkConstructor; import com.google.devtools.build.lib.collect.nestedset.Depset; import com.google.devtools.build.lib.starlarkbuildapi.FileApi; @@ -27,6 +28,7 @@ /** Provides information about neverlink libraries for Android targets. */ @StarlarkBuiltin( name = "AndroidNeverLinkLibrariesProvider", + category = DocCategory.PROVIDER, doc = "Information about neverlink libraries for Android targets.") public interface AndroidNeverLinkLibrariesProviderApi extends StructApi { diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/android/AndroidStarlarkApiProviderApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/android/AndroidStarlarkApiProviderApi.java index bb23c4626a1ebb..e286afa1ebee3c 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/android/AndroidStarlarkApiProviderApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/android/AndroidStarlarkApiProviderApi.java @@ -146,7 +146,6 @@ public interface AndroidStarlarkApiProviderApi extends St /** Helper class to provide information about IDLs related to this rule. */ @StarlarkBuiltin( name = "AndroidStarlarkIdlInfo", - category = DocCategory.NONE, doc = "Do not use this module. It is intended for migration purposes only. If you depend on " + "it, you will be broken when it is removed." diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/AppleToolchainApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/AppleToolchainApi.java index 318f3e05998748..e40ba48ed642d0 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/AppleToolchainApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/AppleToolchainApi.java @@ -14,6 +14,7 @@ package com.google.devtools.build.lib.starlarkbuildapi.apple; +import com.google.devtools.build.docgen.annot.DocCategory; import net.starlark.java.annot.Param; import net.starlark.java.annot.StarlarkBuiltin; import net.starlark.java.annot.StarlarkMethod; @@ -22,6 +23,7 @@ /** Interface for a utility module involving the Apple toolchain. */ @StarlarkBuiltin( name = "apple_toolchain", + category = DocCategory.TOP_LEVEL_MODULE, doc = "Utilities for resolving items from the Apple toolchain.") public interface AppleToolchainApi> extends StarlarkValue { diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config/ConfigStarlarkCommonApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config/ConfigStarlarkCommonApi.java index 35b39b6817e433..11828d394a7cf8 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config/ConfigStarlarkCommonApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config/ConfigStarlarkCommonApi.java @@ -14,6 +14,7 @@ package com.google.devtools.build.lib.starlarkbuildapi.config; +import com.google.devtools.build.docgen.annot.DocCategory; import com.google.devtools.build.lib.analysis.config.transitions.StarlarkExposedRuleTransitionFactory; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.starlarkbuildapi.core.ProviderApi; @@ -28,6 +29,7 @@ /** Helper utility containing functions regarding configurations.ss */ @StarlarkBuiltin( name = "config_common", + category = DocCategory.TOP_LEVEL_MODULE, doc = "Functions for Starlark to interact with Blaze's configurability APIs.") public interface ConfigStarlarkCommonApi extends StarlarkValue { diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BUILD b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BUILD index 941153f72f6a89..2fad7fd036125b 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BUILD +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BUILD @@ -24,14 +24,12 @@ java_library( srcs = glob(["*.java"]), deps = [ "//src/main/java/com/google/devtools/build/docgen/annot", - "//src/main/java/com/google/devtools/build/lib/actions:artifacts", "//src/main/java/com/google/devtools/build/lib/cmdline", "//src/main/java/com/google/devtools/build/lib/collect/nestedset", "//src/main/java/com/google/devtools/build/lib/packages/semantics", "//src/main/java/com/google/devtools/build/lib/starlarkbuildapi", "//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple", "//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/core", - "//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/go", "//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/platform", "//src/main/java/net/starlark/java/annot", "//src/main/java/net/starlark/java/eval", diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BazelCcModuleApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BazelCcModuleApi.java index aeff2e3b4e0088..f3be3c610f8a32 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BazelCcModuleApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BazelCcModuleApi.java @@ -14,6 +14,7 @@ package com.google.devtools.build.lib.starlarkbuildapi.cpp; +import com.google.devtools.build.docgen.annot.DocCategory; import com.google.devtools.build.lib.starlarkbuildapi.FileApi; import com.google.devtools.build.lib.starlarkbuildapi.StarlarkActionFactoryApi; import com.google.devtools.build.lib.starlarkbuildapi.StarlarkRuleContextApi; @@ -23,6 +24,7 @@ /** Utilites related to C++ support. */ @StarlarkBuiltin( name = "cc_common_internal_do_not_use", + category = DocCategory.TOP_LEVEL_MODULE, doc = "Utilities for C++ compilation, linking, and command line generation.") public interface BazelCcModuleApi< StarlarkActionFactoryT extends StarlarkActionFactoryApi, diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BranchFdoProfileApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BranchFdoProfileApi.java index a55f4bf203a65f..1ffbc736303306 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BranchFdoProfileApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/BranchFdoProfileApi.java @@ -31,7 +31,7 @@ */ @StarlarkBuiltin( name = "CcBranchFdoProfile", - category = DocCategory.TOP_LEVEL_TYPE, + category = DocCategory.TOP_LEVEL_MODULE, documented = false) public interface BranchFdoProfileApi extends StarlarkValue { diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/CcModuleApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/CcModuleApi.java index 18dfb6369bdcb7..d186124bf78cd2 100755 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/CcModuleApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/CcModuleApi.java @@ -14,6 +14,7 @@ package com.google.devtools.build.lib.starlarkbuildapi.cpp; +import com.google.devtools.build.docgen.annot.DocCategory; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.collect.nestedset.Depset; import com.google.devtools.build.lib.packages.semantics.BuildLanguageOptions; @@ -39,6 +40,7 @@ /** Utilites related to C++ support. */ @StarlarkBuiltin( name = "cc_common_internal_do_not_use", + category = DocCategory.TOP_LEVEL_MODULE, doc = "Utilities for C++ compilation, linking, and command line generation.") public interface CcModuleApi< StarlarkActionFactoryT extends StarlarkActionFactoryApi, diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/CppModuleMapApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/CppModuleMapApi.java index 791817fc86037f..6b1a781afc9ef2 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/CppModuleMapApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/CppModuleMapApi.java @@ -31,7 +31,7 @@ * *

See javadoc for {@link com.google.devtools.build.lib.rules.cpp.CcModule}. */ -@StarlarkBuiltin(name = "CcModuleMap", category = DocCategory.TOP_LEVEL_TYPE, documented = false) +@StarlarkBuiltin(name = "CcModuleMap", category = DocCategory.TOP_LEVEL_MODULE, documented = false) public interface CppModuleMapApi extends StarlarkValue { @StarlarkMethod(name = "file", documented = false, useStarlarkThread = true) diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/ExtraLinkTimeLibraryApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/ExtraLinkTimeLibraryApi.java index 799a248610f397..483868980a7cac 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/ExtraLinkTimeLibraryApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/ExtraLinkTimeLibraryApi.java @@ -22,5 +22,5 @@ @StarlarkBuiltin( name = "ExtraLinkTimeLibrary", documented = false, - category = DocCategory.TOP_LEVEL_TYPE) + category = DocCategory.TOP_LEVEL_MODULE) public interface ExtraLinkTimeLibraryApi extends StarlarkValue {} diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/FdoContextApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/FdoContextApi.java index 6e6fc1ae1787a3..57918164d77897 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/FdoContextApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/FdoContextApi.java @@ -30,7 +30,7 @@ * *

See javadoc for {@link com.google.devtools.build.lib.rules.cpp.CcModule}. */ -@StarlarkBuiltin(name = "CcFdoContext", category = DocCategory.TOP_LEVEL_TYPE, documented = false) +@StarlarkBuiltin(name = "CcFdoContext", category = DocCategory.TOP_LEVEL_MODULE, documented = false) public interface FdoContextApi extends StarlarkValue { diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/LinkstampApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/LinkstampApi.java index 9469f3d5a06a5b..a8b03baf6a4237 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/LinkstampApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/LinkstampApi.java @@ -31,7 +31,7 @@ * *

See javadoc for {@link com.google.devtools.build.lib.rules.cpp.CcModule}. */ -@StarlarkBuiltin(name = "CcLinkstamp", category = DocCategory.TOP_LEVEL_TYPE, documented = false) +@StarlarkBuiltin(name = "CcLinkstamp", category = DocCategory.TOP_LEVEL_MODULE, documented = false) public interface LinkstampApi extends StarlarkValue { @StarlarkMethod(name = "file", documented = false, useStarlarkThread = true) FileT getArtifactForStarlark(StarlarkThread thread) throws EvalException; diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/LtoBackendArtifactsApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/LtoBackendArtifactsApi.java index 5795ce1f03bfa2..5fbb5993a98888 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/LtoBackendArtifactsApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/LtoBackendArtifactsApi.java @@ -33,7 +33,7 @@ */ @StarlarkBuiltin( name = "CcLtoBackendArtifacts", - category = DocCategory.TOP_LEVEL_TYPE, + category = DocCategory.TOP_LEVEL_MODULE, documented = false) public interface LtoBackendArtifactsApi extends StarlarkValue { diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/PyWrapCcHelperApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/PyWrapCcHelperApi.java index d8285c77b5a21a..3b9c6fd22a3a5a 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/PyWrapCcHelperApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/PyWrapCcHelperApi.java @@ -37,7 +37,7 @@ name = "py_wrap_cc_helper_do_not_use", documented = false, doc = "", - category = DocCategory.TOP_LEVEL_TYPE) + category = DocCategory.TOP_LEVEL_MODULE) public interface PyWrapCcHelperApi< FileT extends FileApi, ConstraintValueT extends ConstraintValueInfoApi, diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/java/JavaCommonApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/java/JavaCommonApi.java index 5f73db7de8f637..b362246ec35be8 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/java/JavaCommonApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/java/JavaCommonApi.java @@ -15,6 +15,7 @@ package com.google.devtools.build.lib.starlarkbuildapi.java; import com.google.common.collect.ImmutableList; +import com.google.devtools.build.docgen.annot.DocCategory; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.collect.nestedset.Depset; import com.google.devtools.build.lib.collect.nestedset.Depset.TypeException; @@ -39,7 +40,10 @@ import net.starlark.java.eval.StarlarkValue; /** Utilities for Java compilation support in Starlark. */ -@StarlarkBuiltin(name = "java_common", doc = "Utilities for Java compilation support in Starlark.") +@StarlarkBuiltin( + name = "java_common", + category = DocCategory.TOP_LEVEL_MODULE, + doc = "Utilities for Java compilation support in Starlark.") public interface JavaCommonApi< FileT extends FileApi, JavaInfoT extends JavaInfoApi, diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/objc/AppleCommonApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/objc/AppleCommonApi.java index 8599b85ac8f075..418a0773520fc2 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/objc/AppleCommonApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/objc/AppleCommonApi.java @@ -15,6 +15,7 @@ package com.google.devtools.build.lib.starlarkbuildapi.objc; import com.google.common.collect.ImmutableMap; +import com.google.devtools.build.docgen.annot.DocCategory; import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; import com.google.devtools.build.lib.analysis.config.transitions.StarlarkExposedRuleTransitionFactory; import com.google.devtools.build.lib.collect.nestedset.Depset; @@ -44,6 +45,7 @@ /** Interface for a module with useful functions for creating apple-related rule implementations. */ @StarlarkBuiltin( name = "apple_common", + category = DocCategory.TOP_LEVEL_MODULE, doc = "Functions for Starlark to access internals of the apple rule implementations.") public interface AppleCommonApi< FileApiT extends FileApi, diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/platform/PlatformCommonApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/platform/PlatformCommonApi.java index 95f8b29123276f..cbe266c49eb7ae 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/platform/PlatformCommonApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/platform/PlatformCommonApi.java @@ -14,6 +14,7 @@ package com.google.devtools.build.lib.starlarkbuildapi.platform; +import com.google.devtools.build.docgen.annot.DocCategory; import com.google.devtools.build.lib.starlarkbuildapi.core.ProviderApi; import net.starlark.java.annot.StarlarkBuiltin; import net.starlark.java.annot.StarlarkMethod; @@ -22,6 +23,7 @@ /** Module containing functions to interact with the platform APIs. */ @StarlarkBuiltin( name = "platform_common", + category = DocCategory.TOP_LEVEL_MODULE, doc = "Functions for Starlark to interact with the platform APIs.") public interface PlatformCommonApi extends StarlarkValue { @StarlarkMethod( diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/proto/ProtoCommonApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/proto/ProtoCommonApi.java index 020d7a9981fa9f..6143696d7e30ab 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/proto/ProtoCommonApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/proto/ProtoCommonApi.java @@ -14,6 +14,7 @@ package com.google.devtools.build.lib.starlarkbuildapi.proto; +import com.google.devtools.build.docgen.annot.DocCategory; import net.starlark.java.annot.StarlarkBuiltin; import net.starlark.java.eval.StarlarkValue; @@ -24,6 +25,7 @@ */ @StarlarkBuiltin( name = "proto_common", + category = DocCategory.TOP_LEVEL_MODULE, doc = "Utilities for protocol buffers. " + "

" diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/test/CoverageCommonApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/test/CoverageCommonApi.java index cef27db2dbb8b3..aacd6a8285cbff 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/test/CoverageCommonApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/test/CoverageCommonApi.java @@ -14,6 +14,7 @@ package com.google.devtools.build.lib.starlarkbuildapi.test; +import com.google.devtools.build.docgen.annot.DocCategory; import com.google.devtools.build.lib.collect.nestedset.Depset; import com.google.devtools.build.lib.collect.nestedset.Depset.TypeException; import com.google.devtools.build.lib.starlarkbuildapi.FileApi; @@ -33,6 +34,7 @@ /** Helper functions for Starlark to access coverage-related infrastructure */ @StarlarkBuiltin( name = "coverage_common", + category = DocCategory.TOP_LEVEL_MODULE, doc = "Helper functions to access coverage-related infrastructure.") public interface CoverageCommonApi< ConstraintValueT extends ConstraintValueInfoApi, diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/test/TestingModuleApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/test/TestingModuleApi.java index 2a0e1bab6db554..37234c62048595 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/test/TestingModuleApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/test/TestingModuleApi.java @@ -14,6 +14,7 @@ package com.google.devtools.build.lib.starlarkbuildapi.test; +import com.google.devtools.build.docgen.annot.DocCategory; import com.google.devtools.build.lib.packages.semantics.BuildLanguageOptions; import com.google.devtools.build.lib.starlarkbuildapi.RunEnvironmentInfoApi; import com.google.devtools.build.lib.starlarkbuildapi.StarlarkRuleFunctionsApi; @@ -32,6 +33,7 @@ /** Helper module for accessing test infrastructure. */ @StarlarkBuiltin( name = "testing", + category = DocCategory.TOP_LEVEL_MODULE, doc = "Helper methods for Starlark to access testing infrastructure.") public interface TestingModuleApi extends StarlarkValue { diff --git a/src/main/java/com/google/devtools/build/skydoc/SkydocMain.java b/src/main/java/com/google/devtools/build/skydoc/SkydocMain.java index fa3dac00a3644f..1e0064b16264fe 100644 --- a/src/main/java/com/google/devtools/build/skydoc/SkydocMain.java +++ b/src/main/java/com/google/devtools/build/skydoc/SkydocMain.java @@ -555,7 +555,7 @@ public String getName() { }); } - @StarlarkBuiltin(name = "ProtoModule", doc = "") + @StarlarkBuiltin(name = "ProtoModule", documented = false) private static final class ProtoModule implements StarlarkValue { @StarlarkMethod( name = "encode_text", diff --git a/src/main/java/net/starlark/java/eval/MethodLibrary.java b/src/main/java/net/starlark/java/eval/MethodLibrary.java index 5610061162982a..df2467b73de23d 100644 --- a/src/main/java/net/starlark/java/eval/MethodLibrary.java +++ b/src/main/java/net/starlark/java/eval/MethodLibrary.java @@ -804,9 +804,7 @@ public StarlarkList zip(Sequence args, StarlarkThread thread) throws EvalE category = "core", doc = "A type to represent booleans. There are only two possible values: " - + "True and " - + "False. " - + "Any value can be converted to a boolean using the " - + "bool function.") + + "True and False. Any value can be converted to a boolean using the " + + "bool function.") static final class BoolModule implements StarlarkValue {} // (documentation only) } diff --git a/src/main/java/net/starlark/java/eval/StringModule.java b/src/main/java/net/starlark/java/eval/StringModule.java index 147e3cdaed3f5d..de84d4077d28c0 100644 --- a/src/main/java/net/starlark/java/eval/StringModule.java +++ b/src/main/java/net/starlark/java/eval/StringModule.java @@ -29,7 +29,7 @@ /** * Starlark String module. * - *

This module has special treatment in Starlark, as its methods represent methods represent for + *

This module has special treatment in Starlark, as its methods represent methods present for * any 'string' objects in the language. * *

Methods of this class annotated with {@link StarlarkMethod} must have a positional-only diff --git a/src/main/starlark/builtins_bzl/common/cc/cc_common.bzl b/src/main/starlark/builtins_bzl/common/cc/cc_common.bzl index 1b0ff96bbd7cbb..8246510ac474ca 100644 --- a/src/main/starlark/builtins_bzl/common/cc/cc_common.bzl +++ b/src/main/starlark/builtins_bzl/common/cc/cc_common.bzl @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Utilites related to C++ support.""" +"""Utilities related to C++ support.""" load(":common/cc/cc_info.bzl", "CcInfo")