aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
...
* Introduce cc_configure_lib.bzl#split_escapedGravatar hlopko2018-02-27
| | | | | | | | This function allows us to split strings coming from env variables into lists while respecting %-escaping. RELNOTES: None. PiperOrigin-RevId: 187166226
* Expose --output_user_base to the Bazel server processGravatar Klaus Aehlig2018-02-27
| | | | | | | | | | | ...so that it can use that path to compute other directories in the output user base, in particular the default location for caches. The first cache we will add is the hash-index cache for downloads of external archives, but a spawn cache might be added later in the output user base as well. Change-Id: I24b1c33235c8f76ec008ecb1789163de2b2a45be PiperOrigin-RevId: 187164275
* Java: Stops adding C++ providers directly.Gravatar plf2018-02-27
| | | | | | | | | | | | | | | | | | | | | unknown commit fixes the only related broken target showing up in a TGP after this change. It seems that this provider was only ever used through java_wrap_cc with java_library dependencies which themselves had cc_library dependencies, i.e. java_wrap_cc -> java_library -> cc_library. This dependency is not needed, the cc_library can be added directly to java_wrap_cc to get the same behavior and this is the way it should be done instead of relying on transitive dependencies. The reason for making this change right now is that with the Skylark C++ API, I will be adding attr("deps").mandatoryProviders(CcCompilationInfo, CcLinkParamsInfo) to C++ rules so that they can take any Skylark rule and not having to explicitly hard-code the name of those Skylark rules in Blaze. However, Java meets this criteria and the change would allow C++ rules to depend on Java. This is not something that was supported before and is not something we plan to support. RELNOTES:none PiperOrigin-RevId: 187158176
* Use std::to_string for non-mingw/cygwinGravatar Loo Rong Jie2018-02-27
| | | | | | | | | | `std::to_string` is faster than `std::stringstream`. This issue only presents in older versions of Mingw/Cygwin. My Mingw64 GCC 7.1.0 has `std::to_string`. I can't determine the exact version of GCC that fixed the issue. Closes #4493. PiperOrigin-RevId: 187145391
* Optimize GC churn of Attribute#getAspects by lazily allocating a builder.Gravatar shreyax2018-02-26
| | | | PiperOrigin-RevId: 187113491
* Refactor AarImport by extracting javaCompilationArgsProvider. This provider ↵Gravatar cnsun2018-02-26
| | | | | | | will be used for the dependency checker later. Refactoring it now just avoids future potential merge conflicts. RELNOTES: None PiperOrigin-RevId: 187103807
* Fail gracefully on conflicting actions generated by an aspect. These can ↵Gravatar janakr2018-02-26
| | | | | | come from Skylark, so we shouldn't crash. As a safety measure, subclasses of ActionLookupValue are now responsible for detecting action conflicts themselves. PiperOrigin-RevId: 187095271
* Adjust Android integration testing environment by adding a dependency to theGravatar cnsun2018-02-26
| | | | | | | import_deps_checker. RELNOTES: None PiperOrigin-RevId: 187095109
* Move gRPC server to its own java_library to sever a dependency path between ↵Gravatar carmi2018-02-26
| | | | | | | :packages and checked-in gRPC jars. RELNOTES: None PiperOrigin-RevId: 187088590
* add binary flag for core library desugaring and gate existing configuration ↵Gravatar kmb2018-02-26
| | | | | | | | flags by it. RELNOTES: None. PiperOrigin-RevId: 187075897
* Optimize LValue#boundIdentifiers for common caseGravatar michajlo2018-02-26
| | | | | | | | | | I'm assuming most of the time folks are only assigning one variable, which doesn't require an ImmutableSet.Builder and the garbage it comes with. Also took the liberty of removing some unused InterruptedException declarations. PiperOrigin-RevId: 187068400
* Allow @AutoCodec to tag static final fields, and generate a "pointer" class ↵Gravatar janakr2018-02-26
| | | | | | that has a single static INSTANCE field pointing back to the target field, so that serialization can grab it. PiperOrigin-RevId: 187065629
* Optimize SkylarkNestedSet constructionGravatar michajlo2018-02-26
| | | | | | | | | | | | | | Only check/update type if the types of elements that we're adding changes. In particular, the "is DICT/LIST" check can get expensive when run on every single inserted element. According to a hacky unit test (create 10M element SkylarkNestedSet 10x over) this is ~60% faster (~18s -> ~7s). This change is intended to be a quick fix, there's surely a more principled way to make skylark's type checking more efficient... PiperOrigin-RevId: 187062547
* Retain @AutoCodec at runtime.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187059719
* Expose SimpleCycleDetector. Also, allow MemoizingEvaluatorTest to support ↵Gravatar cpeyser2018-02-26
| | | | | | evaluators that do not store errors alongside values, but which still support error transience. PiperOrigin-RevId: 187058808
* @AutoCodec some more providers.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187057628
* @AutoCodec JavaPackageConfigurationProvider and MessageBundleProvider.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187057332
* @AutoCodec WriteBuildInfoPropertiesAction.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187054284
* RELNOTES: aar_import now sets java.transitive_exports.Gravatar ajmichael2018-02-26
| | | | | | This field is needed by the Android Studio with Bazel plugin. PiperOrigin-RevId: 187053906
* Add support for parameterized types to AutoCodec.Gravatar cpeyser2018-02-26
| | | | | | | | | | AutoCodec still cannnot handle types with generic elements, e.g. class Foo<T> { private T member; } PiperOrigin-RevId: 187052487
* Expand databinding expressions in resource_files.zip.Gravatar ajmichael2018-02-26
| | | | | | | This zip is the input to the resource shrinker, which currently sometimes chokes on databinding expressions. This should fix that. RELNOTES: None PiperOrigin-RevId: 187049578
* @AutoCodec FileWriteAction.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187048921
* @AutoCodec a bunch of providers.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187044297
* @AutoCodec TransitiveJavaRuleOutputJarsProvider and JavaRuleOutputJarsProvider.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187043046
* @AutoCodec PackageGroupConfiguredTarget (forgot to actually annotate the ↵Gravatar janakr2018-02-26
| | | | | | class in https://github.com/bazelbuild/bazel/commit/14e549cc6596f67ed22c1bac0819f0775e4fb806). PiperOrigin-RevId: 187042482
* @AutoCodec JavaConstraintProvider and JavaExportsProvider.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187038647
* Micro-optimize if-block evaluationGravatar michajlo2018-02-26
| | | | | | Most of the time there's only one, doesn't justify the iterator overhead. PiperOrigin-RevId: 187031802
* runfiles,C++: implement runfiles lib foundationsGravatar Laszlo Csomor2018-02-26
| | | | | | | | | | | | | | | | | | Implement the foundation of the C++ runfiles library, along with a directory-based Runfiles implementation. Subsequent commits will add more feataures: - manifest-based runfiles handling - creating list of envvars to pass to child processes - automatic Runfiles creation based on argv[0] and the envvars of this process See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: Id5a38619a1ae874499f04523863081559360410c PiperOrigin-RevId: 187031518
* Verify embedding of paths to other foreign repositoriesGravatar Klaus Aehlig2018-02-26
| | | | | | | | | | | While rules that want to be called from different repositories may not make any assumptions about locations of their dependencies, they still may embed path obtained via expansion of $(location ...) into their files, even if the dependencies refer to a different repository. Add tests verifying that this behavior is preserved. Change-Id: I2ee6cc806e30b6e18fad9b488012169da400895b PiperOrigin-RevId: 187030372
* @AutoCodec JavaHeaderCompileAction.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187030267
* Hide fix for linkstmap inputs computation behind an optionGravatar hlopko2018-02-26
| | | | | | | | | | | This cl introduces a bazel option (--experimental_fix_linkstamp_inputs_bug_73447914) to control which inputs get added into C++ linkstamp compile action. When set to true (defaults to false), all inputs of relevant C++ linking action get added as inputs to the linkstamp compile action too. RELNOTES: None. PiperOrigin-RevId: 187030217
* @AutoCodec CcSpecificLinkParamsProvider.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187029559
* Change android_library .aar timestamp and open-source AarGeneratorActionTest.Gravatar ajmichael2018-02-26
| | | | | | | See https://github.com/bazelbuild/bazel/issues/4614 and https://github.com/bazelbuild/bazel/commit/bcefd9833cb5620fef8a27c37c2808a66b57c7e6. RELNOTES: None PiperOrigin-RevId: 187029042
* @AutoCodec ProtoCcHeaderProvider and GenRuleSourcesProvider.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187029004
* @AutoCodec JavaCcLinkParamsProvider.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187028864
* @AutoCodec JavaCompilationInfoProvider.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187028110
* Revamp docs for default outputs / output groupsGravatar brandjon2018-02-26
| | | | | | | | | | | - collapsed these into one section - removed the term "implicit outputs" - add explanation for what these are first, then how to control them - update docs for DefaultInfo - also update docs for test/executable args of rule() RELNOTES: None PiperOrigin-RevId: 187026641
* Keep the order of select branches the same as it was in the BUILD file.Gravatar lberki2018-02-26
| | | | | | | This is a change from behavior introduced in unknown commit, which was added to preserve determinism even though the ordering of dicts in Python is non-deterministic. Now that we don't call into Python anymore, this is not necessary. RELNOTES: None (select branches are mutually exclusive, so this is a no-op) PiperOrigin-RevId: 187022575
* Fix filename in docGravatar brandjon2018-02-26
| | | | | RELNOTES: None PiperOrigin-RevId: 187018017
* Revamp rules.md documentation for filesGravatar brandjon2018-02-26
| | | | | | | Unified "Files" and "Output files" sections. Renamed "declared files" to "predeclared files" to avoid confusion with "declare_file()"/"declare_directory()". RELNOTES: None PiperOrigin-RevId: 187017607
* Add a regression test for SOURCE_DATE_EPOCHGravatar Klaus Aehlig2018-02-26
| | | | | | | | | Since bazel 0.10.0 and 0.11.0 were shipped with SOURCE_DATE_EPOCH interpreted as Kiloseconds rather than seconds since the epoch as it should, extend our test to also verify that the correct year is shown. Change-Id: I613d1a967e4e36019b55b720a4b9b7757cfb4b60 PiperOrigin-RevId: 187009490
* native.package_name() stops relying on "dynamic" environment variables.Gravatar laurentlb2018-02-26
| | | | | | | | | | Dynamic environment variables are going away. This also fixes a crashing bug. Fixes #3983 RELNOTES: None. PiperOrigin-RevId: 187008011
* build stamping: "Build time" is now correctGravatar Laszlo Csomor2018-02-26
| | | | | | | | | | | | | | | | | | | | | | | Stamped binaries now have a correct build-data.properties file with regard to the "Build time" field. There's a mismatch in BuildInfo.BUILD_TIMESTAMP semantics between Bazel and Google-internal Blaze: Bazel assumes this amount is in milliseconds, Blaze assumed seconds. Since there are users depending on this field already on both sides, it is too late to change its semantics. So this commit only fixes the bogus "Build time" field and leaves BUILD_TIMESTAMP as milliseconds for Bazel and as seconds for Blaze. Fixes https://github.com/bazelbuild/bazel/issues/4469 Change-Id: I28282d660244af693ab16443ae1e42fb455f9dde PiperOrigin-RevId: 187005016
* Keep order of dict attributes the same as it was in the BUILD file.Gravatar lberki2018-02-26
| | | | | | | | This is a change from behavior introduced in unknown commit, which was added to preserve determinism even though the ordering of dicts in Python is non-deterministic. Now that we don't call into Python anymore, this is not necessary. RELNOTES[INC]: The order of dict-valued attributes is now the order in the BUILD file (or in the Skylark dict they were created from) and not lexicographically sorted. PiperOrigin-RevId: 187003317
* Optimize GetEscapedArgumentGravatar Loo Rong Jie2018-02-25
| | | | | | | | If `argument` does not contain `' '` and `'"'` and `escape_backslash` is false (i.e: no escaping needed), `escaped_arg` will allocate memory exactly once only. Closes #4491. PiperOrigin-RevId: 186962716
* Add support to @AutoCodec for long and byte fields, and centralize primitive ↵Gravatar janakr2018-02-24
| | | | | | logic so that we can transparently handle arrays. We no longer care about the type of an object in AutoCodecProcessor: Marshallers is in charge of getting the correct code generator for array types anyway, so it can handle bare primitives as well. PiperOrigin-RevId: 186919695
* Rename and implement emulated interfaces as needed during android desugaringGravatar kmb2018-02-24
| | | | | | RELNOTES: None. PiperOrigin-RevId: 186904092
* SerializationTester uses an addDependency method instead ofGravatar shahan2018-02-24
| | | | | | | | (Des|S)erializationContext factories. This is consistent as ObjectCodecs will eventually create context objects if needed. PiperOrigin-RevId: 186900662
* expectThrows has been renamed to assertThrowsGravatar cushon2018-02-24
| | | | | | More information: https://github.com/junit-team/junit5/issues/531 PiperOrigin-RevId: 186900384
* AutoCodec verifies that constructor parameter and field types are related.Gravatar shahan2018-02-24
| | | | | | | This isn't 100% safe, which requires 1:1 type correspondence, but can catch some errors at compile time. PiperOrigin-RevId: 186898025