aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Introduce `--incompatible_disallow_slash_operator` to disable `/` operator.Gravatar laurentlb2018-04-11
| | | | | | | | RELNOTES: The `/` operator is deprecated in favor of `//` (floor integer division). Try the `--incompatible_disallow_slash_operator` flag to ensure your code is forward-compatible. PiperOrigin-RevId: 192430310
* Also prefetch label lists for repository rulesGravatar Klaus Aehlig2018-04-11
| | | | | | | | | | | ...so that a repository rule can access them in any order without being restarted. Restarting a repository rule can be expensive, if it already accessed the network or executed expensive commands. Improves on #4533. Change-Id: I618c25322511dab42a80c1dddb0798fc9aea3106 PiperOrigin-RevId: 192420257
* Remove BuildConfiguration.Fragment#setupActionEnvironment().Gravatar lberki2018-04-11
| | | | | | | This is accomplished by moving it to ConfiguredRuleClassProvider. This also suggests a neat way to get rid of logic in ShellConfiguration.Loader() by moving the determination of the shell executable, there, too, but not in this change. RELNOTES: None. PiperOrigin-RevId: 192411609
* Automated rollback of commit ca598fb9445627e9734c2900bc6b11430250d453.Gravatar dannark2018-04-10
| | | | | | | | | | | | | *** Reason for rollback *** breaks guitar tests *** Original change description *** Disallow labels of the form ////foo. RELNOTES: Labels of the form ////foo are disallowed. PiperOrigin-RevId: 192393660
* Add value constants to ObjectCodecRegistry. Value constants are to be used ↵Gravatar janakr2018-04-10
| | | | | | when there may not be a canonical instance of the object we want (or the canonical instance isn't available at registry construction time), but we can reasonably cheaply do value equality comparisons. Strings are a good example. PiperOrigin-RevId: 192354865
* Migrate apple_common.new_objc_provider to use @SkylarkCallableGravatar cparsons2018-04-10
| | | | | RELNOTES: None. PiperOrigin-RevId: 192350172
* Migrate Info's skylark methods to @SkylarkCallableGravatar cparsons2018-04-10
| | | | | RELNOTES: None PiperOrigin-RevId: 192337555
* Simplify AbstractSkyFunctionEnvironment to more directly call ↵Gravatar shreyax2018-04-10
| | | | | | getValueOrUntypedExceptions. PiperOrigin-RevId: 192329649
* Disallow labels of the form ////foo.Gravatar carmi2018-04-10
| | | | | RELNOTES: Labels of the form ////foo are disallowed. PiperOrigin-RevId: 192329081
* Make some objects frequently encountered during serialization into ↵Gravatar janakr2018-04-10
| | | | | | | | constants. A lot of care is needed here because we're using reference equality. I plan to add value-equality constants in a follow-up. Add ImmutableSortedSet marshaller because I think it might have been needed, and hey, why not. PiperOrigin-RevId: 192326359
* Fix handling of relative symlinks within sandboxfs.Gravatar jmmv2018-04-10
| | | | | | | | | | | | | | | | | | If an action expresses a symlink as an input, the target of the symlink does not necessarily appear as a file to map within the sandbox. This is a problem when the target of the symlink is relative because sandboxfs would expose the link verbatim and the target would be missing later on during resolution. To fix this, special-case the handling of symlinks: when trying to expose them via a sandboxfs mount point, resolve their final target instead of respecting the original contents. This loses the fact that the file was a symlink when running within the sandboxfs sandbox, but is easier to implement and slightly faster at runtime. We can reconsider this choice if this causes problems. RELNOTES: None. PiperOrigin-RevId: 192325932
* Bring startup_options to BAZEL_LOG.Gravatar ccalvarin2018-04-10
| | | | | RELNOTES: None. PiperOrigin-RevId: 192313667
* Make SkylarkCustomCommandLine support efficient fingerprint calculation.Gravatar tomlu2018-04-10
| | | | | | | | | | | When using nested sets, we reuse sub-fingerprint computations by using the nested set key cache. map_each is supported. All formats, before_each, join_with and so on are computed via adding a specific UUID to the fingerprint + the control string (eg. the format string) rather than performing the actual computation. In legacy mode (existence of old map_fn), it falls back to trivial (and slow) fingerprint calculation. RELNOTES: None PiperOrigin-RevId: 192288783
* Remove traces of optional_flags from crosstoolGravatar hlopko2018-04-10
| | | | | | | AFAIK all uses have been migrated to features, so they are not needed anymore. RELNOTES: CppRules: optional_compiler_flag was removed from CROSSTOOL, use features instead. PiperOrigin-RevId: 192277764
* python,runfiles: move to different packageGravatar Laszlo Csomor2018-04-10
| | | | | | | | | | | | | | | | | | | | Move the Python runfiles library from `@bazel_tools//tools/runfiles:py-runfiles` to `@bazel_tools//tools/python/runfiles:runfiles` Also rename the testdata runfiles.py to foo.py. This file was not a mock runfiles library, just a client file using the runfiles library that was also called runfiles.py Fixes https://github.com/bazelbuild/bazel/issues/4878 Change-Id: I874b230c93679d4454ac91e816932c8272ecc5c7 Closes #4981. Change-Id: I908e0ab7ec61225e82f70793b1a05432e7f0b07e PiperOrigin-RevId: 192256481
* Remove support for the --incompatible_disallow_three_arg_vardef command line ↵Gravatar lberki2018-04-10
| | | | | | | | | option. It was used for a migration, which is now done. RELNOTES: None. PiperOrigin-RevId: 192246659
* Introduce extraPositonals and extraArguments to SkylarkCallable, to have ↵Gravatar cparsons2018-04-09
| | | | | | | | | parity with @SkylarkSignature. This is necessary for several builtin functions that still use @SkylarkSignature, such as string format. These will be migrated in a future CL. RELNOTES: None. PiperOrigin-RevId: 192200282
* Remove overly optimistic decoupled manifest processingGravatar asteinb2018-04-09
| | | | | | | | | | | | | In earlier changes, I introduced an idealised manifest processing pipeline that has no relation to what's currently being used. Instead, we should start with independent manifest processing that keeps the current behavior. We can migrate to new functionality later, time permitting. Keep some methods that will be the basis for a reasonable decoupled manifest processing implementation. RELNOTES: none PiperOrigin-RevId: 192164028
* Fix issue with filtered resourcesGravatar asteinb2018-04-09
| | | | | | | | | Apparently, I was using a flawed strategy to compute the filtered resource root paths. Instead, just recalculate those roots from scratch, replicating the behavior that existed before the change that caused problems. RELNOTES: none PiperOrigin-RevId: 192152306
* Add tests for interface shared library build variables when lto indexingGravatar hlopko2018-04-09
| | | | | | | Adding tests for unknown commit since the submission of the fix had to happen quickly. RELNOTES: None PiperOrigin-RevId: 192139135
* s/BazelMain/Bazel/Gravatar michajlo2018-04-09
| | | | PiperOrigin-RevId: 192137803
* Remove alphabetical sorting of options in the canonical list.Gravatar ccalvarin2018-04-09
| | | | | | | This was broken for --config. Doing this properly requires keeping the order in which the options were given, which could be done either by filtering the ordered list according to which values affect the final outcome or by tracking the order correctly. I picked the later: the option order was not explicitly tracked for expansions before but now it is. RELNOTES: canonicalize-flags no longer reorders the flags PiperOrigin-RevId: 192132260
* Remove warning about non-canonical workspace namesGravatar Klaus Aehlig2018-04-09
| | | | | | | | | | | | While we still recommend to name repositories in canonical way, a canonical way can not always be ensured, e.g., if different versions of the same external repository have to be used. Our design for upcoming renaming repositories honors this observation. So remove the old warning about the name in an external repository's WORKSPACE file not matching the name given to it in the global WORKSPACE file; we certainly will not make this an error in the future. Change-Id: I5eef92ec61dc81d25734d71187a635024630322c PiperOrigin-RevId: 192114195
* Replace usage of foo.com with example.com in git_repository test dataGravatar Ed Baunton2018-04-09
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4409 Closes #4522. PiperOrigin-RevId: 192112573
* Remove BuildConfiguration.Fragment#getReservedActionMnemonics() in favor of ↵Gravatar lberki2018-04-09
| | | | | | | | | encoding the same in ConfiguredRuleClassProvider. This is a step towards dumbing down BuildConfiguration.Fragment and the ConfigurationFactoryLoader, which is in needed so that we can rewrite C++/Java/Python rules in Skylark without having to introduce the concept of "configuration loader" in Skylark, too. RELNOTES: None. PiperOrigin-RevId: 192104912
* Cleanup Artifact.getPath() usage in Runfiles.Gravatar shahan2018-04-06
| | | | PiperOrigin-RevId: 191971225
* Flip default value of --experimental_shortened_obj_file_path to trueGravatar pcloudy2018-04-06
| | | | | | RELNOTES: Flip default value of --experimental_shortened_obj_file_path to true, Bazel now generates short object file path by default. PiperOrigin-RevId: 191958480
* Cleanup @SkylarkCallable parameters and their error handling.Gravatar cparsons2018-04-06
| | | | | | | This involves enforcing additional compiletime restrictions on Param ordering and semantics. RELNOTES: None. PiperOrigin-RevId: 191927206
* Stop passing location of testdata as jvm property.Gravatar ajmichael2018-04-06
| | | | | | | We can use the builtin env variables to get this. RELNOTES: None PiperOrigin-RevId: 191926221
* Remove die() and replace it with BAZEL_DIE, part of the logging framework.Gravatar ccalvarin2018-04-06
| | | | | | | This will mean the messages will make it to the right output stream. RELNOTES: PiperOrigin-RevId: 191925662
* DynamicCodec emits a trail of type names when it encounters ↵Gravatar shahan2018-04-06
| | | | | | | | NoSuchCodecException. This will make it easier to trace down missing codecs. PiperOrigin-RevId: 191920743
* Delete dead codeGravatar carmi2018-04-06
| | | | | RELNOTES: None PiperOrigin-RevId: 191916828
* Disallow undefined configs by default.Gravatar ccalvarin2018-04-06
| | | | | | | | This brings it in line with other flags, where a malformed value is an error. RELNOTES(INC): --config=foo will error if no 'foo' config exists. PiperOrigin-RevId: 191910781
* Add a new test environment variable, TEST_TARGET.Gravatar John Cater2018-04-06
| | | | | | | | | | | | | | | | | | | | Also include the test target in the test log for easier debugging of tests. Fixes #4960. Change-Id: Ic79bf21e8eeba765b607755c1d290ee4e910d01f Closes #4972. Sample output: ``` exec ${PAGER:-/usr/bin/less} "$0" || exit 1 Executing tests from //src/test/shell/bazel:bazel_example_test ----------------------------------------------------------------------------- ``` Change-Id: I433cd9251a564b269da5566bb8401151ae4c99b7 PiperOrigin-RevId: 191891278
* Automated rollback of commit 77c5582fa0f5c829df576d9f8d66f4975fe415a6.Gravatar hlopko2018-04-06
| | | | PiperOrigin-RevId: 191880445
* C++: Introduce provider that wraps C++ compilation providers.Gravatar plf2018-04-06
| | | | | | | For now, only CcCompilationContextInfo is wrapped. CcCompilationContextInfo will be renamed CcCompilationContext since the *Info suffix is used for providers. This will be done in a follow-up CL. RELNOTES:none PiperOrigin-RevId: 191876504
* Ensure arguments for repository rules are available earlyGravatar Klaus Aehlig2018-04-06
| | | | | | | | | | | ...so that a repository rule can access them in any order without being restarted. Restarting a repository rule can be expensive, if it already accessed the network or executed expensive commands. Improves on #4533. Change-Id: I1d27f88492e4e51fb955f3f066a28a75c5016169 PiperOrigin-RevId: 191874363
* Move shell executable to its own configuration fragment.Gravatar lberki2018-04-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 191861074
* Make DynamicCodec always memoize. Since it replaces Java serialization, ↵Gravatar janakr2018-04-05
| | | | | | which memoizes, we should too. PiperOrigin-RevId: 191813677
* Split Args#add into three methods.Gravatar tomlu2018-04-05
| | | | | | | | | | | Args#add(value, *, arg, format) Args#add_all(value, *, arg, map_each, format_each, before_each, omit_if_empty, uniquify) Args#add_joined(value, *, arg, join_with, map_each, format_each, format_joined, omit_if_empty, uniquify) The old Args#add remains backwards compatible, but we add a flag to disable this compatibility mode. RELNOTES: None PiperOrigin-RevId: 191804482
* Use @AutoCodec for NestedSet serialization.Gravatar janakr2018-04-05
| | | | PiperOrigin-RevId: 191797413
* Remove legacy manifest merging from Bazel.Gravatar ajmichael2018-04-05
| | | | | RELNOTES: android_binary.manifest_merger is no longer supported. PiperOrigin-RevId: 191791177
* Transform StackOverflowError thrown in ArrayCodec into ↵Gravatar janakr2018-04-05
| | | | | | SerializationException. This can happen with deep nested sets. PiperOrigin-RevId: 191790431
* Make statically linking cpp-runtimes as a crosstool feature.Gravatar Googler2018-04-05
| | | | | | | | | | | This cl should result in no user-visible change. It simply sets the feature based on the field in the crosstool proto. A subsequent cl will expose this feature for people to actually use. DELTA_BY_EXTENSION=java=100,py=15 RELNOTES: None PiperOrigin-RevId: 191761838
* Fix strict module map propagation for j2objc.Gravatar allevato2018-04-05
| | | | | | J2Objc needs special consideration to implement strict Swift-ObjC deps. The module maps for the generated Objective-C code are associated with their originating java_library targets (via the J2Objc aspect), which a swift_library cannot directly depend on. So those deeper down module maps need to be propagated transitively *until* a j2objc_library is reached; at that point, the j2objc_library should propagate all of its Java deps module maps, but *not* any of its j2objc_library deps (because that would be non-strict). PiperOrigin-RevId: 191754811
* Avoids calling getPath() in Artifact.toDetailString().Gravatar shahan2018-04-05
| | | | | | | | Also deletes obsolete Artifact.serializeToString() method. "Semantic" change: replaces the actual exec root with <execution_root> in the toString() representation. PiperOrigin-RevId: 191742669
* Fix the definition of Argument in the Skylark specificationGravatar vladmos2018-04-05
| | | | PiperOrigin-RevId: 191717115
* Remove c++-link-interface-dynamic-library from crosstools, it's not usedGravatar hlopko2018-04-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 191713379
* Add codec for Object[]. This may be useful for NestedSetCodec, pushing up so ↵Gravatar janakr2018-04-04
| | | | | | | | that my uncommitted change chain is a little more manageable. Unfortunately we can't get rid of the array marshaller because this only handles Object[], not any other type of array. PiperOrigin-RevId: 191662535
* Disallow empty environment groups.Gravatar gregce2018-04-04
| | | | PiperOrigin-RevId: 191651271