aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
* MultiArchPlatformRule can use --experimental_objc_crosstoolGravatar Cal Peyser2017-02-02
| | | | | | -- PiperOrigin-RevId: 146258894 MOS_MIGRATED_REVID=146258894
* Rollback of commit 932d1abfa34267a9e5abc7441c9e2a081beedd85.Gravatar Adam Michael2017-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fixes and a test. Previously AndroidSdkRepository required that system-images/ directory exist in the Android SDK. However, it does not exist until you download the first system image. *** Original change description *** Automated [] rollback of commit 06072c557290b97cb2d2e4fd255b647a9208cb5c. *** Reason for rollback *** Broke andriod_sdk_repository on ci.bazel.io See https://github.com/bazelbuild/bazel/issues/2465 *** Original change description *** Make android_sdk_repository discover all system-images directories in the sdk. This will be used by the upcoming android_device rule that launches emulators. -- PiperOrigin-RevId: 146258003 MOS_MIGRATED_REVID=146258003
* Fix a NPE in crash reportingGravatar Liam Miller-Cushon2017-02-02
| | | | | | | | | if the product name is null, which is the case for some integration tests. -- PiperOrigin-RevId: 146252594 MOS_MIGRATED_REVID=146252594
* Fills out some macOS support needed for the bundler.Gravatar Googler2017-02-02
| | | | | | | | | | | | | | | | | | This CL also changes some names from "MacOSX" to "macOS", such as the command line options, internal constants/enum values, and platform constants that are accessible from Skylark but are not let being used. It also adds some flags that are needed for completeness, like macos_minimum_os and macos_cpus. This change intentionally omits a few reference (such as "default_macosx_sdk_version" in "xcode_version") that are currently used in BUILD files in order to prevent those from breaking--I'll try to attack those later. This CL also does *not* add compiling/linking support for macOS. -- PiperOrigin-RevId: 146250799 MOS_MIGRATED_REVID=146250799
* Encourage folks to use -iquote instead of -I for includes so that they focus ↵Gravatar Dave MacLachlan2017-02-02
| | | | | | | | | | their include paths on user includes. RELNOTES:None -- PiperOrigin-RevId: 146249228 MOS_MIGRATED_REVID=146249228
* Change JavaProvider.getProvider to first look for the provider in the targetGravatar Irina Iancu2017-02-02
| | | | | | | | and if not found, look for it in SkylarkProviders -> JavaProvider. -- PiperOrigin-RevId: 146247125 MOS_MIGRATED_REVID=146247125
* Fix #2018: Can't access localhost in bazel 0.3.2.Gravatar Philipp Wollermann2017-02-01
| | | | | | | | | | | | | | The behavior of the Linux sandbox was changed to not hide the local hostname by default. It is now only hidden when the --sandbox_fake_hostname flag is specified. Also, instead of using the hostname "sandbox" in this case, it now uses "localhost", which fixes the issue of sandboxed processes not being able to resolve their local hostname. RELNOTES: For increased compatibility with environments where UTS namespaces are not available, the Linux sandbox no longer hides the hostname of the local machine by default. Use --sandbox_fake_hostname to re-enable this feature. -- PiperOrigin-RevId: 146244268 MOS_MIGRATED_REVID=146244268
* Test strategy unification - extract env setup to a new classGravatar Ulf Adams2017-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new class TestPolicy that computes the test environment and use it from all the test strategies instead of the previous duplicated code. Note how the TestPolicy constructs the environment in four steps, each of which can override variables set in a previous step: 1. set env variables for which we have a hard-coded policy 2. set env variables from --action_env 3. set env variables from --test_env 4. set env variables that are specific to the test (path locations, coverage collection protocol, test sharding protocol, etc.); the code for this lives in TestRunnerAction This changes the order in which env variables are set, which can change the resulting environment if --test_env or --action_env are set. We should consider not allowing the command-line flags to override TEST_SRCDIR, RUNFILES_DIR, or TEST_TMPDIR. We should also try to find a way to drop the RUNTEST_PRESERVE_CWD variable in coverage mode. I'm fairly sure that it's current use breaks the combination of coverage and --run_under. My current thinking is that we change the test setup script to source the coverage collector before changing the CWD. Another option is to merge the coverage collector into the test setup script. -- PiperOrigin-RevId: 146237448 MOS_MIGRATED_REVID=146237448
* Rollback of commit 06072c557290b97cb2d2e4fd255b647a9208cb5c.Gravatar Yun Peng2017-02-01
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke andriod_sdk_repository on ci.bazel.io See https://github.com/bazelbuild/bazel/issues/2465 *** Original change description *** Make android_sdk_repository discover all system-images directories in the sdk. This will be used by the upcoming android_device rule that launches emulators. -- PiperOrigin-RevId: 146235800 MOS_MIGRATED_REVID=146235800
* Add a flag to print the effective (Spawn)ActionContexts for debugging.Gravatar Philipp Wollermann2017-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | By specifying the flag "--debug_print_action_contexts", Bazel will print the contents of the internal SpawnActionContext and ContextMap maps, which allows developers to see which kind of actions are run using which strategy. Example output of Bazel at HEAD: $ ./output/bazel build --debug_print_action_contexts INFO: SpawnActionContextMap: "" = LinuxSandboxedStrategy INFO: SpawnActionContextMap: "Closure" = WorkerSpawnStrategy INFO: SpawnActionContextMap: "Javac" = WorkerSpawnStrategy INFO: ContextMap: Context = BazelWorkspaceStatusActionContext INFO: ContextMap: CppCompileActionContext = SpawnGccStrategy INFO: ContextMap: CppLinkActionContext = SpawnLinkStrategy INFO: ContextMap: FileWriteActionContext = FileWriteStrategy INFO: ContextMap: FilesetActionContext = FilesetActionContextImpl INFO: ContextMap: IncludeScanningContext = DummyIncludeScanningContext INFO: ContextMap: SpawnActionContext = LinuxSandboxedStrategy INFO: ContextMap: SymlinkTreeActionContext = SymlinkTreeStrategy INFO: ContextMap: TestActionContext = ExclusiveTestStrategy (Can you spot the bug found by this feature here? The default TestActionContext is ExclusiveTestStrategy, which is probably not what we want.) -- PiperOrigin-RevId: 146233390 MOS_MIGRATED_REVID=146233390
* Simplify the Spawn interface, update Executor interfaceGravatar Ulf Adams2017-02-01
| | | | | | | | | | | | | | | | | | | | Drop the Spawn.getOwner() method, which was duplicating functionality already available through Spawn.getResourceOwner(), in favor of the latter. In order to do that, change Executor.reportSubcommand to take a Spawn instance instead, which in turn requires updating all call sites. This is part of establishing Spawn as an abstraction for lower-level local and remote execution in all cases instead of passing args, env, input/output files and possibly other metadata as individual method parameters to the underlying implementations. In order for that to be maintainable, Spawn should be light-weight and easy to construct correctly, and not contain too much unnecessary data. -- PiperOrigin-RevId: 146224914 MOS_MIGRATED_REVID=146224914
* Do not crash when a strict proto_library depends on a non-strict one.Gravatar Carmi Grushko2017-02-01
| | | | | | | | | | (strictness in the sense of strict proto deps) The reason for the crash was that a non-strict proto_library would put 'null' in its SupportData.protosInDirectDeps, and then a strict proto_library that consumes it would choke on the null. This rearranges things so that protosInDirectDeps will never be null. -- PiperOrigin-RevId: 146210040 MOS_MIGRATED_REVID=146210040
* Use consistent quotes in alias rule example.Gravatar Googler2017-02-01
| | | | | | -- PiperOrigin-RevId: 146201577 MOS_MIGRATED_REVID=146201577
* Make android_sdk_repository discover all system-images directories in the sdk.Gravatar Adam Michael2017-02-01
| | | | | | | | This will be used by the upcoming android_device rule that launches emulators. -- PiperOrigin-RevId: 146183077 MOS_MIGRATED_REVID=146183077
* allow skylark implicit output callbacks to use the rule name Gravatar Benjamin Peterson2017-02-01
| | | | | | | | | | | | | | | | | Skylark implicit output callbacks could use any nonconfigurable attribute of the rule except for "name". (As an implementation detail, "name" is easy to overlook because it's a special case in rule attribute map.) In practice, this isn't too much of a problem because the return value of a skylark implicit output callback has %{} substitutions applied to it, which do allow the rule name. However, it is weird and inconsistent to prevent implicit output callbacks from using the name. -- Change-Id: I13149b2e9689ef8b8056c612a29df9da32e39bf3 Reviewed-on: https://cr.bazel.build/8251 PiperOrigin-RevId: 146178693 MOS_MIGRATED_REVID=146178693
* Add type checking to select() keys.Gravatar Greg Estren2017-02-01
| | | | | | | | | Aside from making error messaging clearer, this stops Bazel from crashing on select({None: ...}) (a pretty anti-social error message). -- PiperOrigin-RevId: 146173043 MOS_MIGRATED_REVID=146173043
* CrosstoolCompilationSupport does not include .pch files in its module map.Gravatar Cal Peyser2017-02-01
| | | | | | -- PiperOrigin-RevId: 146169742 MOS_MIGRATED_REVID=146169742
* Turn on --experimental_j2objc_srcjar_processing by default.Gravatar Rumou Duan2017-02-01
| | | | | | -- PiperOrigin-RevId: 146162705 MOS_MIGRATED_REVID=146162705
* experimental_objc_library uses ImmutableSortedSet to avoid muddling inputGravatar Cal Peyser2017-02-01
| | | | | | | | order. -- PiperOrigin-RevId: 146159313 MOS_MIGRATED_REVID=146159313
* Remove apple_dynamic_library rule.Gravatar Chris Parsons2017-02-01
| | | | | | -- PiperOrigin-RevId: 146150539 MOS_MIGRATED_REVID=146150539
* Throw an exception when persistent workers are used to run tests with ↵Gravatar Kush Chakraborty2017-02-01
| | | | | | | | use_testrunner=0 -- PiperOrigin-RevId: 146150454 MOS_MIGRATED_REVID=146150454
* Add a flag to make fallback from direct to transitive classpaths an errorGravatar Liam Miller-Cushon2017-02-01
| | | | | | -- PiperOrigin-RevId: 146143641 MOS_MIGRATED_REVID=146143641
* Pass individual extdir inputs, instead of inferring a directoryGravatar Liam Miller-Cushon2017-02-01
| | | | | | | | | Corresponding JavaBuilder change: https://github.com/bazelbuild/bazel/blo[]fa9b24cb7b1e516f92a200d9087fd3ba561e5/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/JavaLibraryBuildRequest.java#L302 -- PiperOrigin-RevId: 146143519 MOS_MIGRATED_REVID=146143519
* --Gravatar John Cater2017-02-01
| | | | | PiperOrigin-RevId: 146138214 MOS_MIGRATED_REVID=146138214
* Add a little more logging so that we have more data about gRPC communication ↵Gravatar Lukacs Berki2017-02-01
| | | | | | | | issues. -- PiperOrigin-RevId: 146127950 MOS_MIGRATED_REVID=146127950
* Update documentation to note that the shrinker behavior differs from the ↵Gravatar Andrew Pellegrini2017-02-01
| | | | | | | | Gradle version in that it removes values resources instead of only minifying them. -- PiperOrigin-RevId: 146124871 MOS_MIGRATED_REVID=146124871
* Simplify the Spawn interfaceGravatar Ulf Adams2017-02-01
| | | | | | | | | | | | | | | | | | | | | | | | Remove getSpawnInfo and asShellCommand, which are never really overridden in a useful way. asShellCommand moves to the Spawns class, and getSpawnInfo is only ever called by SpawnAction, and the implementation moves there. I'm considering using Spawn as the general lower-level abstraction for both local and remote execution. It sort of is that already, except it's not used consistently - we often pass a tuple of (args, env) plus possibly input and output files through parameter-heavy method call hierarchies instead of using this existing abstraction. However, I'm concerned about the amount of baggage it's carrying as well as the number of implementations for what is supposed to be a simple interface (or possibly even a simple value class), and this is an attempt to slim it down a bit. This should have no visible effects on builds. -- PiperOrigin-RevId: 146109838 MOS_MIGRATED_REVID=146109838
* Rename inputsExemptFromDiscovery to prunableMandatoryInputs, which seems to ↵Gravatar Lukacs Berki2017-02-01
| | | | | | | | be a saner name. -- PiperOrigin-RevId: 146109129 MOS_MIGRATED_REVID=146109129
* Rollback of commit 00ac342f386be8b8ce1bdb11515c7828e86903c0.Gravatar Yun Peng2017-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Roll forward commit bbfa9fa5ad1dd66ecedcb136a4ff3d0f8d397b9b with fix *** Original change description *** Automated [] rollback of commit bbfa9fa5ad1dd66ecedcb136a4ff3d0f8d397b9b. *** Reason for rollback *** Wrong submit with unresolved issues *** Original change description *** Java template windows performance Address issue #2426 Closes #2427. -- PiperOrigin-RevId: 146108597 MOS_MIGRATED_REVID=146108597
* Simplify action input discovery by removing ↵Gravatar Lukacs Berki2017-01-31
| | | | | | | | | | Action#getInputsWhenSkippingInputDiscovery(). This has the side effect of always allowing new inputs to be discovered when Action#discoversInputs() return true, but since those actions are very few and have mostly to do with C++, I think it's an acceptable tradeoff for th ecode being that much simpler. -- PiperOrigin-RevId: 146098150 MOS_MIGRATED_REVID=146098150
* Don't short-circuit runfiles creation in tests if the output MANIFEST file ↵Gravatar Janak Ramakrishnan2017-01-31
| | | | | | | | is a symlink. That may indicate that it points to the input manifest, and so comparing the manifests in this case would be useless. -- PiperOrigin-RevId: 146048132 MOS_MIGRATED_REVID=146048132
* Fix test breakage, which tests build flags to be canonical, by maintaining ↵Gravatar Andrew Pellegrini2017-01-31
| | | | | | | | | | --android_resource_shrinking and --experimental_android_resource_shrinking as separate flags that affect the same behavior, instead of utilizing the 'oldName' feature of Options. RELNOTES: -- PiperOrigin-RevId: 146024304 MOS_MIGRATED_REVID=146024304
* Global cleanup change.Gravatar Googler2017-01-31
| | | | | | -- PiperOrigin-RevId: 146005461 MOS_MIGRATED_REVID=146005461
* Split transitions that return an empty list of options do not suppress ↵Gravatar Cal Peyser2017-01-30
| | | | | | | | | | dynamic ruleclass transitions. -- PiperOrigin-RevId: 146000375 MOS_MIGRATED_REVID=146000375
* When the apple crosstool transition is being used (set with ↵Gravatar Cal Peyser2017-01-30
| | | | | | | | --apple_crosstool_transition), the APPLE_CROSSTOOL distinguisher does not modify output directory. -- PiperOrigin-RevId: 145999133 MOS_MIGRATED_REVID=145999133
* Change depset conversion to stringsGravatar Vladimir Moskva2017-01-30
| | | | | | | | | | RELNOTES[INC]: Depsets (former sets) are converted to strings as "depset(...)" instead of "set(...)". -- PiperOrigin-RevId: 145990995 MOS_MIGRATED_REVID=145990995
* Fix the translation of names of implicit or latebound attributes to their ↵Gravatar Florian Weikert2017-01-30
| | | | | | | | | | Skylark equivalent (from '$attr' and ':attr' to '_attr'). This CL eliminates duplicate code and makes sure that attribute names in SkylarkClassObjects are properly translated. -- PiperOrigin-RevId: 145986380 MOS_MIGRATED_REVID=145986380
* Update dict docsGravatar Jon Brandvein2017-01-30
| | | | | | -- PiperOrigin-RevId: 145859025 MOS_MIGRATED_REVID=145859025
* Expands the number of attributes that XcodeVersionProperties provides to ↵Gravatar Sergio Campama2017-01-30
| | | | | | | | Skylark. -- PiperOrigin-RevId: 145836240 MOS_MIGRATED_REVID=145836240
* Remove --ios_multi_cpus (simulator & device) restriction on the ↵Gravatar Chris Parsons2017-01-30
| | | | | | | | objc_bundle_library rule -- PiperOrigin-RevId: 145834899 MOS_MIGRATED_REVID=145834899
* Tiny cleanup: narrow the scope of two variable declarations.Gravatar Greg Estren2017-01-30
| | | | | | -- PiperOrigin-RevId: 145827720 MOS_MIGRATED_REVID=145827720
* Fix error handling in WorkspaceFile/WorkspaceASTGravatar Kristina Chodorow2017-01-30
| | | | | | -- PiperOrigin-RevId: 145818492 MOS_MIGRATED_REVID=145818492
* Switch to RunfilesSuppliers for communicating runfilesGravatar Michajlo Matijkiw2017-01-30
| | | | | | | | | | | | | | | | | | | | | | | ActionSpawn/SpawnAction now deal exclusively in RunfilesSuppliers, manifests maps are no more. There is some lingering awkwardness, in particular: - Manifests still need to be tracked in some places, we can work out if this is still necessary on a case by case basis. - Skylark makes actions' runfiles available via 'resolve_command' where they are consumed by 'action'. I've updated the documentation, though the name isn't entirely accurate anymore. That being said these interfaces _are_ marked as experimental, so we _should_ be able to be flexible here. Overall, I think the benefits consolidating runfiles into suppliers, from both code cleanliness and performance perspectives (no longer needing to parse manifests), outweights the awkwardnesses. RELNOTES: resolve_command/action's input_manifest return/parameter is now list -- PiperOrigin-RevId: 145817429 MOS_MIGRATED_REVID=145817429
* Create a base implementation of GenRule that can be used by both Bazel andGravatar John Cater2017-01-30
| | | | | | | | internal Google code. -- PiperOrigin-RevId: 145795255 MOS_MIGRATED_REVID=145795255
* Framework resource deduping (framework resources are kept in the framework ↵Gravatar Chris Parsons2017-01-30
| | | | | | | | bundle, not the top level) -- PiperOrigin-RevId: 145795138 MOS_MIGRATED_REVID=145795138
* Update print() doc to admonish use in production codeGravatar Jon Brandvein2017-01-30
| | | | | | -- PiperOrigin-RevId: 145792618 MOS_MIGRATED_REVID=145792618
* Unify CppCompileActionContext#{getScannedIncludeFiles,findAdditionalInputs}.Gravatar Lukacs Berki2017-01-27
| | | | | | | | They differed only in reporting action state and the way they reported "no include scanning happened" so there was no reason to have both of them around. -- PiperOrigin-RevId: 145773972 MOS_MIGRATED_REVID=145773972
* Create aliases for tools for upcoming android_device rule.Gravatar Adam Michael2017-01-27
| | | | | | | | Note that these aliases are intentionally not yet functional. Nothing should be trying to build them. -- PiperOrigin-RevId: 145746166 MOS_MIGRATED_REVID=145746166
* Incremental dexing for java_lite_proto_librariesGravatar Googler2017-01-27
| | | | | | -- PiperOrigin-RevId: 145744124 MOS_MIGRATED_REVID=145744124
* Add a flag that alters the behavior of the parse_headers feature. With theGravatar Googler2017-01-27
| | | | | | | | | | | | | flag, the headers of a target are compiled into a C++ module instead of being parsed as their own translation unit. The module otherwise remains unused. This way, parse_headers can be used to get a codebase ready for C++ modules. parse_headers currently already gets close, but there are still ways in which a header can be modules-incompatible although it parses fine. -- PiperOrigin-RevId: 145729231 MOS_MIGRATED_REVID=145729231