aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skylarkbuildapi
Commit message (Collapse)AuthorAge
* Throw an EvalException when run_shell is passed both a command string ↵Gravatar cparsons2018-08-15
| | | | | | | | | | | sequence and arguments. Previously, this resulted in an uncaught UnsupportedOperationException. Closes #5892. RELNOTES: None. PiperOrigin-RevId: 208865301
* Create new config module that is responsible for creating BuildSetting ↵Gravatar juliexxia2018-08-14
| | | | | | | | | | descriptor objects. Build settings are units of configuration i.e. a key/value pair of a setting (e.g. cpu) and a value (e.g. ppc). A build setting descriptor is used to describe what kind of build setting a skylark rule is (if any at all). The BuildSettingDescriptor implementation of the API describes two facets of the build setting rule: the type of the value and whether or not the setting is settable on the command line. The methods exposed here will eventually be hooked up to a new parameter in the <code> rule() </code> function. Validation for these restrictions will also happen in a later CL attached to the same bug. PiperOrigin-RevId: 208669663
* Export constructors as global symbols.Gravatar Googler2018-08-14
| | | | | | | This CL also includes a fix for constructor names from the "Provider" module. Naming does not include the module's name now. (Provider.AndroidAssetsInfo() -> AndroidAssetsInfo()) RELNOTES: None PiperOrigin-RevId: 208658905
* Final asset/resource decoupling cleanupGravatar asteinb2018-08-09
| | | | | | | | | | | | | | | | | | - Remove MergableAndroidData interface, and clean up various converters to explicitly use ParsedAndroid{Resources|Assets} - Remove calls to getters that always return an empty list (based on the above cleanup) - Stop passing around empty transitiveAssets in ResourceDependencies and AndroidResourcesInfo - Remove no-op getter method for decoupling settings in AndroidConfiguration Also, consolidate all AndroidDataConverter instances that were used in multiple places into the AndroidDataConverter class, rather than declaring them in multiple places. Add a bit of documentation as to which objects they represent in the action code, which should make mapping between one and the other easier. RELNOTES: none PiperOrigin-RevId: 208042452
* Expose GeneratedExtensionRegistryProvider to Skylark.Gravatar Googler2018-08-08
| | | | | RELNOTES: None PiperOrigin-RevId: 207905848
* Expose methods returning bare C++ options in SkylarkGravatar hlopko2018-08-08
| | | | | | | | | | | | | This cl exposes getters for flags passed by --copt, --cxxopt, --conlyopt, and --linkopt Bazel options. Fixes #5602. While at it, I deprecated existing methods that are either migrated to the C++ toolchain, or to cc_common. RELNOTES: None. PiperOrigin-RevId: 207854692
* C++: Removes CcLinkParamsStore from Skylark APIGravatar plf2018-08-07
| | | | | | | This class is deprecated and should not be exposed. RELNOTES:none PiperOrigin-RevId: 207685607
* Clarifies the documentation for action.args() set_param_file_format.Gravatar Googler2018-08-02
| | | | | | | | The way documentation reads, it sounds like 'shell' format is single line (especially because the other format is called multiline). Currently it seems like the implementation only uses new line but assuming Bazel doesn't want to promise on that, this patch updates the documentation to point that whitespace could be space, tab or newline - which mimics the documentation of ParameterFileType.SHELL_QUOTED. RELNOTES: None. PiperOrigin-RevId: 207142679
* Add manifestProtoOutput produced during Java compilation to the OutputJar so ↵Gravatar Googler2018-07-30
| | | | | | | that it can be accessed in Skylark. One example where this is used is in Android IDL processing where the manifestProtoOutput is used to split out the Android IDL generated Java classes from the overarching outputJar produced by the android_library rule. RELNOTES: none PiperOrigin-RevId: 206580880
* [Skylark] Support dictionaries in structs when serializing them using ↵Gravatar Taras Tsugrii2018-07-25
| | | | | | | | | | | | | | | | | struct.to_json. Dictionaries are frequently used for generic configuration descriptions especially given that `struct` is not allowed in build files. In order to be JSON-compatible, only dictionaries with string keys are allowed. Technically Python also allows integers and booleans by automatically converting them to strings, but this is confusing and not necessarily a good thing to do. Fixes #5542 Closes #5543. PiperOrigin-RevId: 206049754
* Allow the AndroidResourcesInfo to be created from Skylark.Gravatar Googler2018-07-25
| | | | | RELNOTES: none. PiperOrigin-RevId: 206035420
* ProtoSourcesProvider docs: Add link to FileDescriptorSet definitionGravatar Googler2018-07-24
| | | | | RELNOTES: None. PiperOrigin-RevId: 205850479
* C++: Refactors every provider wrapping CcLinkParamsStoreGravatar plf2018-07-23
| | | | | | | | Providers that were wrapping CcLinkParamsStore now wrap CcLinkingInfo instead. CcLinkParamsStore will be deleted in a future CL. RELNOTES:none PiperOrigin-RevId: 205629924
* Automated rollback of commit 64ea3cd90e1ead5ece533ee5a3cb4ee3520527fb.Gravatar Googler2018-07-20
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Update the Flutter rules AndroidSdkInfo provider to FlutterAndroidSdkInfo. AndroidSdkInfo should be unique in the repo now. *** Original change description *** Automated rollback of commit 4d10250291a813302de64151be3b22d57e94749d. *** Reason for rollback *** AndroidSdkInfo is already being used by the Flutter rules. *** Original change description *** Expose AndroidSdkProvider to Skylark (as AndroidSdkInfo). RELNOTES: None. PiperOrigin-RevId: 205431461
* C++: Implements Skylark cc_common.compile()/link().Gravatar plf2018-07-19
| | | | | | | Working towards #4570. RELNOTES:none PiperOrigin-RevId: 205274676
* Automated rollback of commit 4d10250291a813302de64151be3b22d57e94749d.Gravatar Googler2018-07-18
| | | | | | | | | | | | | *** Reason for rollback *** AndroidSdkInfo is already being used by the Flutter rules. *** Original change description *** Expose AndroidSdkProvider to Skylark (as AndroidSdkInfo). RELNOTES: None. PiperOrigin-RevId: 205142459
* Expose ProguardMappingProvider to Skylark (as ProguardMappingInfo).Gravatar Googler2018-07-18
| | | | | RELNOTES: none. PiperOrigin-RevId: 205100703
* Expose the UsesDataBindingProvider to Skylark (as UsesDataBindingInfo).Gravatar Googler2018-07-17
| | | | | RELNOTES: none. PiperOrigin-RevId: 205032841
* Expose AndroidFeatureFlagSetProvider to SkylarkGravatar Googler2018-07-17
| | | | | RELNOTES: None PiperOrigin-RevId: 205011761
* Expose AndroidSdkProvider to Skylark (as AndroidSdkInfo).Gravatar Googler2018-07-17
| | | | | RELNOTES: None. PiperOrigin-RevId: 204983634
* Update the AndroidProguardInfo provider so that it can be created from Skylark.Gravatar Googler2018-07-17
| | | | | RELNOTES: none. PiperOrigin-RevId: 204976789
* Expose ProguardSpecProvider to skylark.Gravatar Googler2018-07-17
| | | | | RELNOTES: None PiperOrigin-RevId: 204974291
* Expose AndroidLibraryResourceClassJarProvider to skylark.Gravatar Googler2018-07-17
| | | | | RELNOTES: None PiperOrigin-RevId: 204953629
* Expose AndroidCcLinkParamsProvider to Skylark as AndroidCcLinkParamsInfo.Gravatar Googler2018-07-17
| | | | | RELNOTES: None PiperOrigin-RevId: 204927047
* Add flags for disabling legacy crosstool fieldsGravatar hlopko2018-07-17
| | | | | | | | | | | | This cl adds following flags: * --experimental_disable_legacy_cc_compilation_api * --experimental_disable_legacy_cc_linking_api * --experimental_disable_linking_mode_flags * --experimental_disable_compilation_mode_flags * --experimental_disable_legacy_crosstool_fields RELNOTES: None PiperOrigin-RevId: 204924599
* Fix comments.Gravatar Googler2018-07-16
| | | | | RELNOTES: None PiperOrigin-RevId: 204817013
* Expose AndroidPreDexJarProvider to Skylark as AndroidPreDexJarInfo.Gravatar Googler2018-07-16
| | | | | RELNOTES: None PiperOrigin-RevId: 204809750
* AndroidIdeInfoProvider exposed to Skylark (as AndroidIdeInfo).Gravatar Googler2018-07-16
| | | | | RELNOTES: None. PiperOrigin-RevId: 204801047
* Make AndroidAssetsInfo createable from Skylark.Gravatar Googler2018-07-16
| | | | | RELNOTES: None. PiperOrigin-RevId: 204788478
* C++: New functionality exposed to Skylark for external libs.Gravatar plf2018-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CcLinkingInfo has a getter for CcLinkParams. - Artifacts and linkopts of CcLinkParams are accessible. - CcCompilationInfo constructor now accepts defines and include dirs. - CcCompilation now has getters for headers, defines and include dirs. CcCompiilationInfo( headers=depset([Artifacts]), defines=depset([Strings]), include_dirs=depet([Strings]) CcCompilationInfo.headers CcCompilationInfo.defines CcCompilationInfo.include_dirs -- cc_common.merge([CcLinkingInfos]) returns CcLinkingInfo -- CcLinkingInfo.static_shared_params CcLinkingInfo.static_no_shared_params CcLinkingInfo.no_static_shared_params CcLinkingInfo.no_static_no_shared_params -- CcLinkParams.libraries CcLinkParams.linkopts CcLinkParams.dynamic_libraries_for_runtime RELNOTES:none PiperOrigin-RevId: 204700779
* Test suite to verify contracts of @SkylarkCallable and @SkylarkModule which ↵Gravatar cparsons2018-07-13
| | | | | | | are difficult or impossible to verify by annotation processor. RELNOTES: None. PiperOrigin-RevId: 204540521
* Expose AndroidIdlProvider to Skylark (as AndroidIdlInfo).Gravatar Googler2018-07-13
| | | | | RELNOTES: none PiperOrigin-RevId: 204514591
* Remove documentation for the old Actions provider.Gravatar cparsons2018-07-13
| | | | | | | This old provider will be deprecated, and removing documentation for this type is of higher priority as it conflicts with the documentation for "actions", another skylark type. RELNOTES: None. PiperOrigin-RevId: 204480354
* Simplify dSYM handlingGravatar Googler2018-07-11
| | | | | | | | | | | | | | - Previously we would zip the output of dsymutil and then proceed to unzip it. Due to the size of dSYM files, this could add a few seconds to all builds with dSYMs. - There's no need to have a DsymOutputType or even Info.plist as all we need is the DWARF symbol file; the dSYM is repackaged later on by the bundler. This change is synchronized with the CROSSTOOL and wrapped_clang via the `no_dsym_create_zip` feature, which Bazel sets on the CROSSTOOL to inform wrapped_clang that no zip file should be created for the dSYM. PiperOrigin-RevId: 204134986
* C++: Exposes new parameters of C++ Skylark API.Gravatar plf2018-07-10
| | | | | | | This will be needed by py_wrap_cc in a follow up CL. RELNOTES:none PiperOrigin-RevId: 203964457
* Fix CcCompilationInfo to appropriately subclass Struct, and improve upon ↵Gravatar cparsons2018-07-09
| | | | | | | error messaging and commenting when there's an unresolvable skylark type. RELNOTES: None. PiperOrigin-RevId: 203826504
* Clarify documentation for implicit deps and default attr valuesGravatar brandjon2018-07-06
| | | | | RELNOTES: None PiperOrigin-RevId: 203466429
* Clarify attr documentationGravatar brandjon2018-07-03
| | | | | | | Fixes #5335 RELNOTES: None PiperOrigin-RevId: 203148338
* First cl for verbose workspaces (ability to log certain potentially ↵Gravatar Googler2018-07-03
| | | | | | | | | | | | | | | | | non-hermetic events that happen as part of repository rules). In the interest of smaller cls, adding plumbing first with the rest to follow. Creates and posts a new EventBus message for workspace rule events (only execution for now); conditional on a flag, registers a listener to output those events. In the future: - Better structure for the events: will create a proto with appropriate messages and more information per event - Add more events - Allowing to specify log file rather than dumping to INFO - Log levels, full or alerts only RELNOTES: None PiperOrigin-RevId: 203132761
* C++: Exposes C++ Skylark providers to BazelGravatar plf2018-07-02
| | | | | RELNOTES:none PiperOrigin-RevId: 202943806
* Add a flag to disable the parts of the Skylark API of the C++ configuration ↵Gravatar lberki2018-07-02
| | | | | | | | | that depend on BUILD/CROSSTOOL files. Also add @Deprecated tags for these methods and extract CppConfigurationSkylarkTest in a separate class so that it actually gets run (followup change with the explanation a-coming) RELNOTES: None. PiperOrigin-RevId: 202903559
* Refactor TemplateExpansionAction so that various strategies can be used to ↵Gravatar kush2018-06-29
| | | | | | | | | implement it. Also clarify the behavior of the expand_template API in the presence of multiple-substitutions. RELNOTES: None PiperOrigin-RevId: 202719656
* Create and integrate JavaBootstrap, and use fake top-level Java skylark ↵Gravatar cparsons2018-06-29
| | | | | | | objects for Skydoc. RELNOTES: None. PiperOrigin-RevId: 202697176
* Add basic android classes to fakebuildapiGravatar cparsons2018-06-29
| | | | | RELNOTES: None. PiperOrigin-RevId: 202677272
* [java_common.compile] Always generate a source jar.Gravatar elenairina2018-06-29
| | | | | | | | | | | | | | | [Rolling forward https://github.com/bazelbuild/bazel/commit/c4e128e2c6d8cacaeba034d6a3195796d50f1745] java_common.compile doesn't generate the output source jar when a source jar is the only input for the compilation. This is wrong because the source jar can include APT generated sources. It is also inconsistent with java_library and leads to inconsistent Skylark rules where a declared output will not always have a generating action. This new behavior is guarded by a new flag --incompatible_generate_javacommon_source_jar. RELNOTES: None. PiperOrigin-RevId: 202648346
* Expose Skylark API to the C++ toolchainGravatar hlopko2018-06-28
| | | | | | | | | | | | | This is an implementation of the design at https://docs.google.com/document/d/1g91BWJITcYw_X-VxsDC0VgUn5E9g0kRBGoBSpoO41gA/edit>. More thorough documentation will be sent in a separate cl. The api was approved at https://docs.google.com/document/d/1M8JA7kzZnWpLZ3WEX9rp6k2u_nlwE8smsHYgVTSSJ9k/edit?ts=5b292400#. Work towards #4571 (only the docs are missing). RELNOTES: None. PiperOrigin-RevId: 202464331
* Fix docgen handling of multiple modules with the same nameGravatar cparsons2018-06-27
| | | | | | | | | | If there are multiple modules with the same name: - If only one is marked 'documented', that one takes precedence. - If one is a subclass of the others, the subclass takes precedence. - Otherwise, an exception is thrown. RELNOTES: None. PiperOrigin-RevId: 202359443
* Initial check-in of skydoc rewrite.Gravatar cparsons2018-06-26
| | | | | | | | | | | | | | This skydoc rewrite uses an actual skylark interpreter with a faked build API (implementing the actual build API that Bazel uses). There's a lot left to do here, this is a barebones start. For example, this does not yet handle: - load() statements - non-global build API elements (e.g. apple_common) - output of any rule information other than attribute names - markdown output format RELNOTES: None. PiperOrigin-RevId: 202187207
* Add newline in Args docs.Gravatar tomlu2018-06-26
| | | | | RELNOTES: None PiperOrigin-RevId: 202162804
* Document LateBoundDefaultGravatar cparsons2018-06-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 202150316