aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Create a basic annotation processor for validating SkylarkCallable uses at ↵Gravatar cparsons2018-02-12
| | | | | | | compile time. RELNOTES: None. PiperOrigin-RevId: 185432867
* Add missing parameter documentation to the which method in repository_ctx.Gravatar kaipi2018-02-12
| | | | PiperOrigin-RevId: 185424287
* 1) Make checker exit with 199 if there is any dependency issue.Gravatar cnsun2018-02-12
| | | | | | | | 2) Also print the dependency issues to stderr. 3) Add golden tests to test the above two. RELNOTES:n/a. PiperOrigin-RevId: 185423338
* Use a different date time when normalizing zip entriesGravatar cushon2018-02-12
| | | | PiperOrigin-RevId: 185419668
* Create a skylint and buildozer checker for preventing glob(**/*.java)Gravatar Googler2018-02-12
| | | | | | | | | For now we will only block Java recursive globs. Any other languages or extensions can be banned relatively easily. RELNOTES: Add lint check for discouraging glob(["**/*.java"]) PiperOrigin-RevId: 185417760
* Thread ConfiguredTargetAndTarget through objC classes to get rid of referencesGravatar mjhalupka2018-02-12
| | | | | | | | to ConfiguredTarget.GetTarget(). Also remove equivalence requirements for the ConfiguredTarget's target and the stored Target since there will soon no longer be a Target in ConfiguredTarget. PiperOrigin-RevId: 185417468
* Make AndroidInstrumentationInfo createable from Skylark.Gravatar ajmichael2018-02-12
| | | | | | | | This enables writing tests for android_instrumentation_test that mock android_binary using a skylark rule that returns an AndroidInstrumentationInfo. RELNOTES: None PiperOrigin-RevId: 185417182
* Add labels to some Android progress messages.Gravatar ajmichael2018-02-12
| | | | | RELNOTES: None PiperOrigin-RevId: 185412809
* Fix screen flicker caused by small writes.Gravatar jmmv2018-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | ExperimentalEventHandler is in charge of composing the pretty progress bar that Bazel displays. This progress bar is a multi-line message with control characters printed on the terminal. The progress bar was composed by issuing many individual writes to an AnsiTerminal. Because the AnsiTerminal in this case was backed by an error stream (which are unbuffered), each of these writes resulted in a gRPC to the Bazel client to write the message to the console. gRPC calls are much more expensive than calls to a file descriptor, and, in general, even small writes to a file descriptor should be avoided when preparing long messages. To fix this, fully buffer the output messages sent to the AnsiTerminal until explicitly flushed. ExperimentalEventHandler was already doing the right thing regarding flushes but did not account for the fact that each write would be (unintentionally) sent directly to the terminal. The flicker was significant: on a pathological case (building sandboxfs with Bazel on my MacBook Pro 13" on macOS), this change shaves about 5 seconds of build time on the previous 45 second-long build. I think this only happened with "bazel run" and "bazel test" invocations and not "bazel build", but I haven't really confirmed this. RELNOTES: None. PiperOrigin-RevId: 185405892
* Remove label name interning.Gravatar tomlu2018-02-12
| | | | | | | | We already intern the labels themselves. Benchmarks do not show any further gain by interning the label names. RELNOTES: None PiperOrigin-RevId: 185394812
* PiperOrigin-RevId: 185383460Gravatar juliexxia2018-02-12
|
* Fixing test-setup.sh occasionally missing stdout/stderr, on systems where ↵Gravatar Googler2018-02-12
| | | | | | | | | | | | "tail --pid" is supported. The solutions aren't mine, the new test was taken from Ola's unknown commit and the way to avoid race condition courtesy of sethkoehler@ Mitigates #4608 for compatible Linux systems. TESTED=manual scripts and new test case. RELNOTES: None PiperOrigin-RevId: 185374273
* Changes cc_library to consume headers specified in the "hdrs" attribute of anGravatar cpeyser2018-02-12
| | | | | | | | objc_library that it depends on. See https://github.com/bazelbuild/bazel/issues/3352 PiperOrigin-RevId: 185371993
* Add a mechanism to SpawnResult to return an in-memory outputGravatar ulfjack2018-02-12
| | | | PiperOrigin-RevId: 185370712
* Move common proto aspect logic to a new class.Gravatar elenairina2018-02-12
| | | | PiperOrigin-RevId: 185369902
* C++: Allows adding linkopts through file.Gravatar plf2018-02-12
| | | | | | | The file can be generated during execution by a different rule. RELNOTES:none PiperOrigin-RevId: 185361140
* Update documentation about Files.Gravatar laurentlb2018-02-12
| | | | | | | | I don't think it's worth repeating things here. Let's point to the main documentation. RELNOTES: None. PiperOrigin-RevId: 185356504
* [MSVC] Don't declare environ when it is already defined as macroGravatar Loo Rong Jie2018-02-12
| | | | | | | | | | | | | | | | In MSVC, `environ` is a macro (from `stdlib.h`): ```cpp extern char*** __p__environ(void); #define _environ (*__p__environ()) #define environ _environ ``` So `extern char **environ;` will be expanded as `extern char **(*__p_environ());` which is invalid. This causes compile warning on MSVC. Closes #4487. PiperOrigin-RevId: 185354631
* C++: Remove last instatiation of CppModel outside CcLibraryHelper.Gravatar plf2018-02-12
| | | | PiperOrigin-RevId: 185354353
* Skylark: SlicingExpression: do not create new nodes for optional expressionsGravatar laurentlb2018-02-12
| | | | | RELNOTES: None. PiperOrigin-RevId: 185353994
* BEP: assert event orderings explicitlyGravatar Klaus Aehlig2018-02-12
| | | | | | | | | | | ...even where they should be clear from the evaluation order. Since reporting sometimes happens in different threads, there might be races on the event bus. Explicit order constraints allow the BuildEventStreamer to reorder those events correctly in the case of a lost race. Change-Id: Ib5211341c2016527e9268e8fdbd1677d4255b23c PiperOrigin-RevId: 185345738
* Add context argument to ObjectCodec.{serialize,deserialize}Gravatar michajlo2018-02-11
| | | | | | | | | | Context implementations are currently empty, just doing the plumbing in this change. Once this is in we can start passing along the ObjectCodecRegistry, which will allow runtime codec resolution for classes not known at compile time. We'll also inevitably add some memoization helpers, allowing us to optimize the serialization process further. PiperOrigin-RevId: 185305674
* Add custom_package attribute to android_local_test.Gravatar dannark2018-02-10
| | | | | | | | | android_local_test generates and R.class file and so this is necessary for projects that don't nest their BUILD files under a java/ or javatests/ root. Fixes #4618 RELNOTES: None PiperOrigin-RevId: 185281836
* Desugar fixes:Gravatar kmb2018-02-10
| | | | | | | | - make Objects.requireNonNull and Long.compare rewrites compatible with --core_library - apply those and try-with-resources rewrites to generated companion classes RELNOTES: None. PiperOrigin-RevId: 185262256
* Rollback changes to TargetCompleteEventGravatar mjhalupka2018-02-10
| | | | PiperOrigin-RevId: 185255326
* Delete erroneous piece of desugar's renaming logicGravatar kmb2018-02-09
| | | | | | RELNOTES: None. PiperOrigin-RevId: 185218745
* Increase timeout of build_event_stream_test.Gravatar ruperts2018-02-09
| | | | | RELNOTES: None. PiperOrigin-RevId: 185215175
* Automated rollback of commit 873f343fefbb08048e7e75c482843b9e68954de6.Gravatar jingwen2018-02-09
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaking targets in 2018.02.08 and 2018.02.09 nightly TGPs There were some merge conflicts in this rollback CL. See unknown commit for the unresolved version. I kept the YOURS sections, and ran fiximports.py to remove unused imports. See b/73157879 *** Original change description *** C++: Remove last instatiation of CppModel outside CcLibraryHelper. This is the second try for this CL. The first one caused Blaze to crash when building Exoblaze as shown in b/72936965. In this CL I fix the condition of when to generate non-PIC compilation actions for WrapCcHelper. RELNOTES:none PiperOrigin-RevId: 185203398
* Add support to Polymorphic strategy for grandchild classes that have no ↵Gravatar janakr2018-02-09
| | | | | | codec, but whose parent classes have codecs. This is ok because the polymorphic strategy doesn't need an instance of the grandchild class: the parent class is fine, so long as it has a codec. PiperOrigin-RevId: 185200943
* add srcs filegroups for import_deps_checkerGravatar Benjamin Peterson2018-02-09
| | | | | Change-Id: I1fa7867ffb08af95c1eef5ae3e32cff34292328b PiperOrigin-RevId: 185189976
* Do not store Path object in RootedPath.Gravatar tomlu2018-02-09
| | | | | | | This can be computed on the fly if we need it. RELNOTES: None PiperOrigin-RevId: 185180257
* Make getxattr not throw an exception when attribute does not exist on Mac.Gravatar ajmichael2018-02-09
| | | | | | | This matches the current behavior on Linux. When an extended attribute is not present on a file, getxattr on Linux returns ENODATA whereas getxattr on Mac returns ENOATTR. Previously, we were special casing ENODATA to not throw an exception but not ENOATTR. Now we treat them the same. RELNOTES: None PiperOrigin-RevId: 185157964
* Narrow type of "configuration" field in ActionOwner. It is only ever a ↵Gravatar janakr2018-02-09
| | | | | | BuildConfiguration. PiperOrigin-RevId: 185155423
* Stop populating deprecated fields in the TargetComplete Message in theGravatar mjhalupka2018-02-09
| | | | | | TargetCompletedEvent. PiperOrigin-RevId: 185150827
* Make blaze stop passing --rule_kind to java tools.Gravatar tomlu2018-02-09
| | | | | | | This argument is unused and should be removed. RELNOTES: None PiperOrigin-RevId: 185147327
* Switch a few maps/sets to CompactHash(Map|Set)Gravatar Googler2018-02-09
| | | | | RELNOTES: None. PiperOrigin-RevId: 185145663
* Move BazelRuleClassProvider.TOOLCHAIN_RULES to its own class.Gravatar lpino2018-02-09
| | | | PiperOrigin-RevId: 185143078
* Split the include scanning dummy classes into their own parent classGravatar ulfjack2018-02-09
| | | | PiperOrigin-RevId: 185140903
* Remove a few unused fields.Gravatar lberki2018-02-09
| | | | | RELNOTES: None. PiperOrigin-RevId: 185138928
* Java,runfiles,test: test finding runfilesGravatar Laszlo Csomor2018-02-09
| | | | | | | | | | | | | | | | | | | | Add a test to //src/test/py/bazel:runfiles_test that ensures that Java binaries using the Java runfiles library in @bazel_tools can find their runfiles, even if JAVA_RUNFILES and the RUNFILES_* envvars are undefined. There's already a shell script test for this in //src/test/shell/bazel:java_launcher_test, but we don't run that on Windows, shell tests are slower on Windows than on Linux anyway, and adding this test was very little work. Plus I'll need the new Bar.java file for other tests that are coming. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: Ie0fa51046c3f3a1e5ece7a6206131261a5a5b1f8 PiperOrigin-RevId: 185137988
* distdir: also accept relative pathGravatar Klaus Aehlig2018-02-09
| | | | | | | ...and interpret them relative to the workspace directory. Change-Id: I31a0ce3a179356c798f00c4218ddd22e16b256a3 PiperOrigin-RevId: 185136432
* Remove hard-wired basenames for the test setup and the coverage collection ↵Gravatar lberki2018-02-09
| | | | | | | | | script. Accomplished by creating an explicit attribute for both of them on test actions. RELNOTES: None. PiperOrigin-RevId: 185132460
* Simplify BinTools setup for integration testsGravatar ulfjack2018-02-09
| | | | | | Progress on #4608. PiperOrigin-RevId: 185126689
* experimental_repository_cache: support relative pathsGravatar Klaus Aehlig2018-02-09
| | | | | | | | | | ...and interpret them relative to the workspace directory. Improves on #3516. In fact, fixes the original request of supporting relative paths. Change-Id: Ibbb6fd43179d589ad477427e47e26c773c7a04de PiperOrigin-RevId: 185121629
* python,runfiles library,refactor: rename EnvVar()Gravatar Laszlo Csomor2018-02-09
| | | | | | | | | | | | | | | | Rename the runfiles library's Runfiles.EnvVar() method to EnvVars(), indicating that it may return multiple entries in the dict. In the future this method will return multiple keys, but I want to update the interface ASAP so that it is stable after it's released in Bazel 0.12.0. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: I8ab3a2a64736ff746dd96fea80ba2f5356dcfcc3 PiperOrigin-RevId: 185118832
* Support local search for http archivesGravatar Klaus Aehlig2018-02-09
| | | | | | | | | | | | | | | | | | With --experimental_repository_cache, bazel has means of avoiding downloading the same archive again. However, this requires bazel to first download it itself, as we make no guarantee about the internal structure of that cache; this, in turn, does not play well in situations where bazel has to cooperate with other tools, e.g., because the bazel build is just one step in a larger package building process. Therefore, add an experimental option allowing to specify directories where the outer process may have placed needed files and make bazel not download them if a file with correct name and hash could be found in one of those directories. In this way, cooperation is possible without patching all entries in the WORSPACE file. Change-Id: I43240b8b59bf8472ec0310661015899e46491236 PiperOrigin-RevId: 185115713
* Stub default methods as needed for core library desugaringGravatar kmb2018-02-08
| | | | | | RELNOTES: None PiperOrigin-RevId: 185082719
* Use MoreAsserts.assertThrowas instead of the Junit's version.Gravatar cnsun2018-02-08
| | | | | RELNOTES:none. PiperOrigin-RevId: 185075745
* Replace path implementation.Gravatar tomlu2018-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Path and PathFragment have been replaced with String-based implementations. They are pretty similar, but each method is dissimilar enough that I did not feel sharing code was appropriate. A summary of changes: PATH ==== * Subsumes LocalPath (deleted, its tests repurposed) * Use a simple string to back Path * Path instances are no longer interned; Reference equality will no longer work * Always normalized (same as before) * Some operations will now be slower, like instance compares (which were previously just a reference check) * Multiple identical paths will now consume more memory since they are not interned PATH FRAGMENT ============= * Use a simple string to back PathFragment * No more segment arrays with interned strings * Always normalized * Remove isNormalized * Replace some isNormalizied uses with containsUpLevelReferences() to check if path fragments try to escape their scope * To check if user input is normalized, supply static methods on PathFragment to validate the string before constructing a PathFragment * Because PathFragments are always normalized, we have to replace checks for literal "." from PathFragment#getPathString to PathFragment#getSafePathString. The latter returns "." for the empty string. * The previous implementation supported efficient segment semantics (segment count, iterating over segments). This is now expensive since we do longer have a segment array. ARTIFACT ======== * Remove Path instance. It is instead dynamically constructed on request. This is necessary to avoid this CL becoming a memory regression. RELNOTES: None PiperOrigin-RevId: 185062932
* Remove references to getTarget(). Requires threading through anGravatar mjhalupka2018-02-08
| | | | | | | ExtendedEventHandler so we can get the target via the package manager during rule dumps. PiperOrigin-RevId: 185042522