aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com
Commit message (Collapse)AuthorAge
* @AutoCodec SelectorList and SkylarkFileType.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190285424
* @AutoCodec SkylarkComputedDefaultTemplate and dependencies.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190284631
* Create a new output formatter for cquery which output transition information ↵Gravatar juliexxia2018-03-23
| | | | | | in either a FULL or LITE version. Trigger new output with the new --transitions cquery flag in the new CqueryOptions class. PiperOrigin-RevId: 190278664
* @AutoCodec JavaRunfilesProvider.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190277450
* Update javadocs in DependencyResolver.Gravatar mjhalupka2018-03-23
| | | | PiperOrigin-RevId: 190258675
* Re-enable aliasing of CodedInputStream during deserialization, removed as ↵Gravatar janakr2018-03-23
| | | | | | | | part of primary codepath somewhere around https://github.com/bazelbuild/bazel/commit/bde43ec8a96a62b8fbf67ad60d5154cf121647d9 (and killed entirely in unknown commit. Force copying of a ByteString read from CodedInputStream in NestedSetCodec and persisted, since otherwise we might hang onto the entire buffer indefinitely. PiperOrigin-RevId: 190256337
* Adds hook to AspectFunction to allow for inlining SkylarkImportLookupFunction.Gravatar cpeyser2018-03-23
| | | | | | If inlining is off, fixes a bug where null return values resulted in an error. PiperOrigin-RevId: 190255818
* Expose mergeManifests method in SkylarkGravatar asteinb2018-03-23
| | | | | RELNOTES: none PiperOrigin-RevId: 190253911
* Don't bound the method and field name caches in FuncallExpression.Gravatar nharmata2018-03-23
| | | | | | | | | | | The number of *unique* Class instances that will be used as keys in these caches over the lifetime of a Bazel server is small-ish, and bounded by the size of the set of unique Classes used as the Java runtime representation of Skylark objects. The bookkeeping done by LocalCache when the cache's size is bounded is therefore pure CPU overhead. While we're here, just use the default capacity (16); a smaller initial capacity seems silly considering these caches are live for the duration of the Bazel server. RELNOTES: None PiperOrigin-RevId: 190238099
* RELNOTES: Move (c/cxx)opts from legacy_compile_flags to user_compile_flagsGravatar Googler2018-03-23
| | | | PiperOrigin-RevId: 190224987
* Fix test flakiness due to the filesystem mutations done during the 'fetch' ↵Gravatar nharmata2018-03-23
| | | | | | | | | work done by BazelPackageBuilderHelperForTesting#sanityCheckBazelPackageLoader. We fix this flakiness by _not_ having RepositoryDelegatorFunction unconditionally 'fetch' local repos. We then have to make a change to BazelPackageLoader test to reinstate these mutations, since it was only working before due to the unconditional filesystem mutations done here :p RELNOTES: None PiperOrigin-RevId: 190222830
* Refactor and cleanup the sandboxing code.Gravatar Philipp Wollermann2018-03-23
| | | | | | | | | | | | | - Remove Optional<> where it's not needed. It's nice for return values, but IMHO it was overused in this code (e.g. Optional<List<X>> is an anti-pattern, as the list itself can already signal that it is empty). - Use Bazel's own Path class when dealing with paths, not String or java.io.File. - Move LinuxSandboxUtil into the "sandbox" package. - Remove dead code and unused fields. - Migrate deprecated VFS method calls to their replacements. - Fix a bug in ExecutionStatistics where a FileInputStream was not closed. Closes #4868. PiperOrigin-RevId: 190217476
* Bugfixes for int()Gravatar brandjon2018-03-23
| | | | | | | | | | - fix negatives + prefixes - fix boundary cases (min int value) The only remaining relevant differences from Python are that we disallow int() with zero args, we don't allow whitespace in strings, and we take Python 3's view on prohibiting leading 0s when base is 0. RELNOTES: None PiperOrigin-RevId: 190216646
* Shorten object file pathGravatar pcloudy2018-03-23
| | | | | | | | | | | | | | | | | | | | | | | Closes #4781. Fix https://github.com/bazelbuild/bazel/issues/4149 RELNOTES: Users can now pass --experimental_shortened_obj_file_path=true to have a shorter object file path, the object file paths (and all other related paths) will be constructed as following: If there's no two or more source files with the same base name: <bazel-bin>/<target_package_path>/_objs/<target_name>/<source_base_name>.<extension> otherwise: <bazel-bin>/<target_package_path>/_objs/<target_name>/N/<source_base_name>.<extension> N = the file?s order among the source files with the same basename, starts from 0. Examples: 1. Output names for ["lib1/foo.cc", "lib2/bar.cc"] are ["foo", "bar"] 2. Output names for ["foo.cc", "bar.cc", "foo.cpp", "lib/foo.cc"] are ["0/foo", "bar", "1/foo", "2/foo"] The default value of --experimental_shortened_obj_file_path option is false, but we plan to flip it to true and eventually remove this option. You shouldn't depend on the format of generated object file path, but if you do and this change breaks you, please use --experimental_shortened_obj_file_path=false to work around it. PiperOrigin-RevId: 190214375
* Remove a unused parameter in PackageFactory#evaluateBuildFile().Gravatar lberki2018-03-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 190207183
* Implement TargetProviderForQueryEnvironment.Gravatar dbabkin2018-03-23
| | | | | | | DirectTargetProvider works with WalkableGraph directly. If it fails to find target, then last try to use delegate TargetProvider which supposed to be PackageManager from SkyframeExecutor. RELNOTES:none PiperOrigin-RevId: 190204106
* Victory lap: Remove all code that used to support the three-argument form of ↵Gravatar lberki2018-03-23
| | | | | | | vardef(). RELNOTES: None. PiperOrigin-RevId: 190196933
* Remove the unused Matrix class.Gravatar lberki2018-03-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 190196203
* Remove unnecessary product name and constructors from sandboxed spawn runners.Gravatar jmmv2018-03-23
| | | | | | | | | | The product name was previously propagated to all sandboxed spawn runners unconditionally, even when the majority did not need it. Also, these same spawn runners had obsolete constructors that were not used at all or were only used in tests. Remove both for simplicity. RELNOTES: None. PiperOrigin-RevId: 190195305
* Remove RuleClass.Builder#depsCfg().Gravatar lberki2018-03-23
| | | | | | | The only user of it was Android resource trimming, which just got deleted. RELNOTES: None. PiperOrigin-RevId: 190193627
* Add support for sandboxfs-based sandboxing to macOS.Gravatar jmmv2018-03-22
| | | | | | | | | | | | | | | | This only modifies the DarwinSandboxedSpawnRunner for now and leaves behind the Linux version. The latter is a bit more complex to do because of the need to deal with tmpfs and bind-mount interactions. We expect sandboxfs to have the biggest impact on macOS anyway, not Linux, so this can wait until this has proven that it deserves staying for the long-term. Tested: Manually ran a self-build of Bazel on a version of Bazel built with these changes and the build passed. RELNOTES: None. PiperOrigin-RevId: 190133429
* Deprecate the Skyframe-native fileset flag, now that we've had 2 weeks with ↵Gravatar kush2018-03-22
| | | | | | | no issues of Skyframe-native in production. RELNOTES: None PiperOrigin-RevId: 190129810
* Convert several SkylarkAttr methods to use @SkylarkCallable instead of ↵Gravatar cparsons2018-03-22
| | | | | | | @SkylarkSignature RELNOTES: None. PiperOrigin-RevId: 190129404
* Optimistically check the Set within NestedSetVisitor.VisitedState using ↵Gravatar Googler2018-03-22
| | | | | | | | | contains before invoking the heavier add. This reduces cpu-work and contention. When blaze is invoked on a large fileset and the build is already up-to-date, this makes things about 1.9s (33%) faster. PiperOrigin-RevId: 190125803
* Add AndroidManifest and related classes for new manifest merging implementationGravatar asteinb2018-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | AndroidManifest represents a new class to handle decoupled Android manifest processing (as opposed to the existing ApplicationManifest, which handles manifests, resources, and assets all together). This new manifest processing pipeline will be used by the Skylark Android Data API. AndroidManifest wraps the manifest and related information, so we don't just pass around untyped Artifacts all the time. Additionally, the StampedAndroidManifest subclass explicitly states that a manifest has been stamped with the correct package (previous confusion between passing around the stamped and unstamped manifests has led to bugs in Blaze). Unlike the old manifest processing pipeline, AndroidManifest: - Does not support the old legacy manifest merger - Is decoupled from resource and asset processing - Does incremental merges - Always has the package defined at analysis time - Can be run without an input manifest (for rules which don't specify their own manifest but either inherit manifests that should be merged or to provide a dummy manifest for tooling) RELNOTES: none PiperOrigin-RevId: 190119992
* Use an immutable Attribute factory in objects that are persisted to ↵Gravatar janakr2018-03-22
| | | | | | Skyframe, rather than the potentially mutable builder, and @AutoCodec SkylarkAttr.Descriptor. PiperOrigin-RevId: 190118565
* Add a DefaultBuildOptions specifying default build flags that may differ ↵Gravatar mjhalupka2018-03-22
| | | | | | from the provided defaults in Options classes. These are used to create BuildOptionsDiffForReconstruction, which lets us store only the diffs in our BuildConfigurationValue.Keys. PiperOrigin-RevId: 190117455
* Allow NestedSetCodec to share members across multiple deserializations.Gravatar cpeyser2018-03-22
| | | | | | This avoids redundancy in memory when multiple NestedSets share a member PiperOrigin-RevId: 190085907
* Create useSkylarkSemantics for @SkylarkCallable, so annotated methods can ↵Gravatar cparsons2018-03-22
| | | | | | | | | | | specifically get a semantics object This is slightly redundant with useEnvironment, yes (as one can easily obtain the semantics object with Environment), but we intend on restricting useEnvironment so that structField=true methods cannot specify useEnvironment, but *can* specify useSkylarkSemantics. In general, we can also ween off non structField methods to use useSkylarkSemantics instead of useEnvironment in cases where this is feasible. RELNOTES: None. PiperOrigin-RevId: 190082547
* Remove unused Digest class.Gravatar Googler2018-03-22
| | | | | RELNOTES: None. PiperOrigin-RevId: 190079798
* Create AndroidManifestInfo providerGravatar asteinb2018-03-22
| | | | | | | | | This provider is the first part of the Skylark Android Data API. This provider is not yet used by the native android_* rules, and is subject to change if needed to implement the rest of the Skylark Android data API. RELNOTES: none PiperOrigin-RevId: 190078860
* Ensure -fPIC set on shared non-LTO backends as neededGravatar Googler2018-03-22
| | | | | | | | | | | | | | Set the usePicForLtoBackend bit on the link action builder when we create static link actions. Before https://github.com/bazelbuild/bazel/commit/8c5e290dfab3cab378a9ca107ecdd6267403cd4b this wasn't required for static library link actions, as the LTO backend actions weren't created until the dependent binary's link action, which set this flag for the binary static link. However, with that change, we now create shared non-LTO backend actions early, when creating the library link action, for use later when we create the binary link action. So that flag needs to be set properly on the static library link action to get the -fPIC flag set as needed on the shared non-LTO backends. RELNOTES: None PiperOrigin-RevId: 190074918
* Fix ConcurrentModificationException in memory tracker.Gravatar tomlu2018-03-22
| | | | | RELNOTES: None PiperOrigin-RevId: 190073818
* Convert SkylarkActionFactory methods to use @SkylarkCallable instead of ↵Gravatar cparsons2018-03-22
| | | | | | | @SkylarkSignature RELNOTES: None. PiperOrigin-RevId: 190073508
* Add annotation-processor verification that only one of Param.type or ↵Gravatar cparsons2018-03-22
| | | | | | | Param.allowedTypes is used. RELNOTES: None. PiperOrigin-RevId: 190070309
* RELNOTES: In int() function, do not auto-detect base if input starts with '0'.Gravatar laurentlb2018-03-22
| | | | PiperOrigin-RevId: 190069001
* Move ConfigFeatureFlagConfiguration.Options to a top-level class.Gravatar mstaib2018-03-22
| | | | | | | | This class is about to get bigger in a major way, so let's put it in its own class. This also moves the tests to their own test class, since that class is about to get a lot bigger too. RELNOTES: None. PiperOrigin-RevId: 190065717
* Add a new SandboxfsSandboxedSpawn to spawn actions using sandboxfs.Gravatar jmmv2018-03-22
| | | | | RELNOTES: None. PiperOrigin-RevId: 190062172
* Local Disk Cache: Only write to disk if target hash doesn't already exist.Gravatar robinnabel2018-03-22
| | | | | | | | | | Under Windows, the default permissions used when writing to the local disk cache prevent the files from being overwritten. This CR adds a check: if the target file already exists, return early. This is a performance improvement and will fix the error described above as existing files will no longer need to be overwritten. Similar features have been implemented on the remote gRPC cache implementations, see bazel issue #4789. Closes #4886. PiperOrigin-RevId: 190060233
* Assume toolchain supportsDynamicLinker from presence of ↵Gravatar hlopko2018-03-22
| | | | | | | | | | | | | | | "dynamic_linking_mode" feature Toolchains no longer have to provide linking_mode_flags { mode: DYNAMIC } to state that they support dynamic linking mode. It is enough to provide a feature. This is part of ongoing work to get rid of linking_mode_flags from the CROSSTOOL. This is rollforward of https://github.com/bazelbuild/bazel/commit/3dab964407a2f1e12feb439d8507079bc06cb769. RELNOTES: None. PiperOrigin-RevId: 190059334
* Remove the --incompatible_disallow_uncalled_set_constructor flagGravatar vladmos2018-03-22
| | | | | | | | RELNOTES[INC]: The --incompatible_disallow_uncalled_set_constructor flag is no longer available, the `set` constructor` is completely removed from Skylark. Use `depset` instead. PiperOrigin-RevId: 190053331
* Deprecate BuildConfiguration.Fragment#topLevelConfigurationHook().Gravatar lberki2018-03-22
| | | | | RELNOTES: None. PiperOrigin-RevId: 190052728
* Remove ResourceFilterFactory#getOutputDirectorySuffix().Gravatar lberki2018-03-22
| | | | | | | | | I have a bit of a PTSD wrt. output directory naming (although stritcly speaking, the trauma is not over yet...) so I'm very happy to remove functionality that reminds me of having that problem. RELNOTES: None. PiperOrigin-RevId: 190052059
* remote/http: properly support read timeoutGravatar Jakob Buchgraber2018-03-22
| | | | | | | | | | Also, remove unused SO_TIMEOUT. Fixes #4890 cc @benjaminp Closes #4895. PiperOrigin-RevId: 190051030
* Remove overloaded function in QueryEnvironmentFactoryGravatar dbabkin2018-03-22
| | | | | RELNOTES: none PiperOrigin-RevId: 190046225
* Improve error message when a persistent worker sends an unparseable response.Gravatar philwo2018-03-22
| | | | | | Fixes #4897. PiperOrigin-RevId: 190045930
* Remove the flag --incompatible_show_all_print_messagesGravatar vladmos2018-03-22
| | | | | | | | RELNOTES[INC]: The flag --incompatible_show_all_print_messages is removed. Messages generated by `print` statements from any package will be displayed as DEBUG messages. PiperOrigin-RevId: 190043451
* Remove an unused flag.Gravatar lberki2018-03-22
| | | | | | | I don't know what it *was* used for, but it sure is never writen at the moment, nor is it useful on the command line. RELNOTES: None. PiperOrigin-RevId: 190031826
* Store RuleClassType in RuleClass. Shouldn't use much more memory, and allows ↵Gravatar janakr2018-03-21
| | | | | | serialization to preserve the type when reconstituting the RuleClass. PiperOrigin-RevId: 190015323
* Clean up unnecessary "additional data" from memoizing deserialization. Since ↵Gravatar janakr2018-03-21
| | | | | | memoization is now a simple on-off switch, change semantics to have at most one memoizing frame: starting memoization is now an idempotent operation. PiperOrigin-RevId: 189993914