summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-03Merge remote-tracking branch 'aosp/upstream-master' into master am: bc20f321cdColin Cross
am: 2a4a26af86 Change-Id: I8d8807bc92b038cd36bb43f833dd707744f2b25b
2017-11-03Merge remote-tracking branch 'aosp/upstream-master' into masterColin Cross
am: bc20f321cd Change-Id: I3b73fad6cd19c0ae322ea1d5978b025acf8c9943
2017-10-24Merge remote-tracking branch 'aosp/upstream-master' into masterandroid-o-mr1-iot-preview-6o-mr1-iot-preview-6Colin Cross
Also delete java/com/google/devtools/build/android/desugar/dependencies/MetadataCollector.java to avoid a proto dependency. * aosp/upstream-master: Record dependencies when directly calling moved interface methods. RELNOTES: None. Exclude Android dependency checking from Bazel's singlejar build. This should also address https://github.com/bazelbuild/bazel/issues/3903 RELNOTES: None. Track expansions in OptionValueDescription. Remove feature to allow expansion flags to have values. Migrate all users of OptionsParser.enableParamsFileSupport to use the ShellQuotedParamsFilePreProcessor. This covers all of the tools packaged in the ResourceProcessorBusyBox. Track Option placement within a priority category. Make option conflicts less spammy. Desugar-singlejar integration tests for double-checking default methods. Expand implicitRequirements in the location of the option that required it. Remove the implicit requirement of core_library. Clean up InvocationPolicy's use of OptionDescription. Report the structured Bazel command line via the BEP. Do not rewrite static interface method invocations from bootclasspath Downgrade the default invocation policy log levels to fine. Categorize build options for BuildConfiguration. add flags to desugar to emit metadata that can be used for double-checking correctness of default and static interface desugaring. RELNOTES: none Add new option categorization and tagging information to HelpCommand's output. Move the canonicalization of an option value to the option value itself. Test: m checkbuild Change-Id: Ie86c647a0350bea0986bd1d8df95486b3fe585c3
2017-10-24Record dependencies when directly calling moved interface methods.kmb
RELNOTES: None. PiperOrigin-RevId: 173154512 GitOrigin-RevId: a01493b751fa1a31e1cef929b36ee030402909fa Change-Id: Id96eb89cbca159e7ce7f0e72ec3c3312a7ba4071
2017-10-24Exclude Android dependency checking from Bazel's singlejar build.kmb
This should also address https://github.com/bazelbuild/bazel/issues/3903 RELNOTES: None. PiperOrigin-RevId: 172963663 GitOrigin-RevId: db1426b75d7721554a8b139696b5b4c400a260a5 Change-Id: I4cf813e365609c5f811f421f9133b2497f2c5c72
2017-10-24Track expansions in OptionValueDescription.ccalvarin
Add warnings for behavior that is likely unexpected. Expansion values do not accept values at all, and implicit requirements are set regardless of whether the option was turned "on" or not, so warn in the cases where this weird behavior might rear its ugly head. RELNOTES: None PiperOrigin-RevId: 172883214 GitOrigin-RevId: 1a4f4264492a0b37a4132d629342aa961fa1c6b0 Change-Id: I7f125848d4ee9b56184f1ac46343187bd7b79ddf
2017-10-24Remove feature to allow expansion flags to have values.ccalvarin
It was added as a potential fix for --config (an expansion flag with values), but this would have required forcing the parser to know the config's expansions at parsing time, which is not currently possible. Instead, we will use the new addition of option-location tracking to make sure we expand options at a the correct place, even if the expansion is triggered after the fact. This is mostly a straight forward undoing of https://github.com/bazelbuild/bazel/commit/7c7255ec8d6da20526c2c4078c57aadaf3dd3612, except where the context has changed. Notably, implicit requirements are effectively treated like expansion flags, so special casing in OptionDescription could be removed. RELNOTES: None. PiperOrigin-RevId: 172514997 GitOrigin-RevId: 34a9fea78f201caed8ace5c714a0cf288cb97c65 Change-Id: Ic26df46a5ff16f3b6dd89616ef9fcbe9a7971fa6
2017-10-24Migrate all users of OptionsParser.enableParamsFileSupport to use the ↵apell
ShellQuotedParamsFilePreProcessor. This covers all of the tools packaged in the ResourceProcessorBusyBox. RELNOTES: None. PiperOrigin-RevId: 172485486 GitOrigin-RevId: 20264552e18d8413f77b22b124e84e0267ce2b5e Change-Id: I124e1843794e7c6f6deb8e30305546cf1dd944ee
2017-10-24Track Option placement within a priority category.ccalvarin
An option has precedence over previous options at the same enum-valued priority. Track its placement in this ordering explicitly. This will allow after-the-fact expansion of expansion options such that they correctly take precedence or not compared to other mentions of the same flag. This is needed to fix --config's expansion. RELNOTES: None. PiperOrigin-RevId: 172367996 GitOrigin-RevId: 7cd9e883dd31f54cd505844aa1f1e0ed7bd9f380 Change-Id: Ia0c09601ac24ffceb31e47b9113a636849c9b2f4
2017-10-24Make option conflicts less spammy.ccalvarin
Remove an unnecessary warning and make all warnings for option conflicts print only if the option values are not equal. RELNOTES: None. PiperOrigin-RevId: 172124261 GitOrigin-RevId: 2553875c285dcca454ee830182d238296ce70aa2 Change-Id: I335a346ac2f8c92deba52fc3b5ce582f8d0fa20e
2017-10-24Desugar-singlejar integration tests for double-checking default methods.kmb
PiperOrigin-RevId: 171980809 GitOrigin-RevId: 9cf05abe06ee687d21e8a5bb12399a33f3fe0498 Change-Id: I4995c684a6d1d7440a125e1f56daa47209c60cdc
2017-10-24Expand implicitRequirements in the location of the option that required it.ccalvarin
Removes the special casing of implicit requirements. Accumulating them and parsing them at the end of the parse() function was never enough to actually guarantee that the value not be replaced. I've gone through all options with implicit requirements to make sure that the expectation is checked after options parsing, so this change should be relatively safe. Implicit requirements is still a broken concept - they don't actually expand based on the value given, so a user that is explicitly NOT setting a flag might unwittingly be setting all the requirements for that unset flag. Removing it fully requires redesigning or removing the flags that set it, though, so for now we are standardizing the behavior so that it behaves like any other expansion options, just one with a value. Also consolidate the deprecated wrapper option behavior into the expansion work. It will soon be removed entirely, but for now it can get grouped in with the expansion logic, so that its differences are more explicit. RELNOTES: None. PiperOrigin-RevId: 171957502 GitOrigin-RevId: faf2db22277bd0b074a0a8c5cd4533a735eff31a Change-Id: I84a1461624207d3d43786ebc69d17ab6f16f9ec8
2017-10-24Remove the implicit requirement of core_library.ccalvarin
The semantics of implicit requirements will soon change to adding the requirements in-place in the command line. This particular implicit requirement was not necessary. RELNOTES: None. PiperOrigin-RevId: 171841036 GitOrigin-RevId: b95f41b7aa8a53bee1fe0d4dc8dc843ddc22d2f7 Change-Id: Id8fda8f69c2ad6be85b381be4bc0d06ece4d0ceb
2017-10-24Clean up InvocationPolicy's use of OptionDescription.ccalvarin
OptionDescription is basically a hack to get the expansion data for options from outside the options parser, but it was being used at various points of invocation policy enforcement. In order to correctly track option origin, we only want to get this information once. Do it during the invocation policy expansion stage, not at enforcement, so that we track the information of the option's origin in the original invocation policy passed to the enforcer, not the expanded one. PiperOrigin-RevId: 171661669 GitOrigin-RevId: ca74482825e0c0ca5d119eceab74ba4292428557 Change-Id: Ib57ed5c67054c051a420507506807a8eb6809f47
2017-10-24Report the structured Bazel command line via the BEP.ccalvarin
This is part of the effort outlined in https://bazel.build/designs/2017/07/13/improved-command-line-reporting.html. The refactoring of the options parser is not yet complete, so we still do not have complete & correct information about the canonical command line. Where the information is blatantly incorrect, a best approximation was made, with comments and tests documenting the deficiencies. Change the names of the initial CommandLine fields in the BEP to be explicitly identified as unstructured. RELNOTES: None. PiperOrigin-RevId: 171625377 GitOrigin-RevId: ceb1013c1ca0238188e2714442fcfb2efb16bc6a Change-Id: I3a40b8e1ebd5d6a7d7e893be369d6d25de758ac7
2017-10-24Do not rewrite static interface method invocations from bootclasspathGoogler
RELNOTES: n/a PiperOrigin-RevId: 171344856 GitOrigin-RevId: 38da0c2e6e082964e32e8646439cdec7cd50808f Change-Id: Ice56501cd04133409dacde89318abac85b1828b9
2017-10-24Downgrade the default invocation policy log levels to fine.ccalvarin
Unfortunately, since the invocation policy gets enforced on a user's command line early in the command environment setup, so the effective log level is not yet set. For this run, keep the logs at INFO, since any other level will disappear into the ether. InvocationPolicy gets enforced not only at invocation startup but also elsewhere to recompute the default values. The log statements from these different runs overwhelm the log output from our tests, making it hard to find other events without filtering the log. Make all extra invocation policy enforcements log at FINE so that they only appear when extra detail is requested. PiperOrigin-RevId: 171151573 GitOrigin-RevId: 334d2f155d85fca1797e249dc0acf2c47be089b0 Change-Id: I2bd3fbd782b2b077a8e82ae6e38abb07a9d8df5d
2017-10-24Categorize build options for BuildConfiguration.gregce
PiperOrigin-RevId: 171017483 GitOrigin-RevId: e1b09f2f072231ed882c1de364fe3ea5c1f7d5af Change-Id: I697b9bfbf16dbd4186ec50362795d8a0f937dd73
2017-10-24add flags to desugar to emit metadata that can be used for double-checking ↵kmb
correctness of default and static interface desugaring. RELNOTES: none PiperOrigin-RevId: 170779637 GitOrigin-RevId: bdb12ceeb7c23d7d2293e8006d0aa7127a91b973 Change-Id: I6969cc42323b5299a90af9e8084658e9f654825f
2017-10-24Add new option categorization and tagging information to HelpCommand's output.ccalvarin
If setting flag --use_new_category_enum, group the options by the new categories in both the command line output and the "everything-as-html" output used for the generated docs at https://bazel.build/versions/master/docs/command-line-reference.html. In the html output, the effect and metadata tags are listed for each option, with links to their descriptions at the bottom of the page. The tags only appear in the terminal output in -l/--long/--help_verbosity=long, and only the names appear. This is still experimental as the majority of options do not yet use the new categorization system. The new output can be seen in command-line-reference.html format by adding the new flag to the "help everything-as-html" line in //src/main/java/com/google/devtools/build/lib:gen_command-line-reference. The html output is in the same order as before (by blaze rule, with inherited options not repeated), which means it still has duplicate options, that should ideally be fixed separately. I propose either dropping the high-level grouping and just grouping the options by documentation category, or potentially grouping them by optionsbase in some non-class-naming way, and listing the commands that they apply to, as more and more optionsbases are used by multiple commands without being inherited (for example, all BuildEventServiceOptions are listed 20 times). People probably use ctrl-f to navigate this page anyway. Once we know that we only list each option once, we can actually have links to the options, which will make it possible to have links in the expansion lists. Issue #3758 RELNOTES: added experimental --use_new_category_enum to the help command to output options grouped by the new type of category. PiperOrigin-RevId: 170116553 GitOrigin-RevId: 77e3a5ca955a3834406a837dbd4607b0b432b2d8 Change-Id: Id3f1fea6833f0cc05d127eb1454f21c92b22e03a
2017-10-24Move the canonicalization of an option value to the option value itself.ccalvarin
Ideally, the canonical form we output from OptionUtils would be the same as for the command canonicalize-flags, but that must wait for dependencies to be cleaned up. Still, in the meantime, keep the --foo=1 normalization of --foo, and apply it to all other boolean flag values (t,true,yes,y, and false equivalents), so that the canoncalize-flags output is more canonical, even if it isn't using the --[no]foo form yet. RELNOTES: Boolean flag values will now get normalized to 1 or 0 in canonicalize-flags output. PiperOrigin-RevId: 170084599 GitOrigin-RevId: 659feca7dee332f75801010b018505b7ba5a185e Change-Id: I65e969918c0ce0129d52e3fcdda4d95cde5175b7
2017-10-22Snap for 4410736 from dda948369b0845308fd2e5ec958266af99fcc091 to pi-releaseandroid-build-team Robot
Change-Id: I268e6104824c0a83f81f894dd0932714c89457a4
2017-10-22Use final release of ASM 6.0 am: 24351c4eab am: b94c5b8efd am: c6068560adColin Cross
am: 6c5f891f50 Change-Id: Ia095b297760c9dc39dc0d6049063eea99c0620ea
2017-10-22Use final release of ASM 6.0 am: 24351c4eab am: b94c5b8efdColin Cross
am: c6068560ad Change-Id: I037907bbdf9eb7bcd0691e64985acc3c440cf11d
2017-10-22Use final release of ASM 6.0 am: 24351c4eabColin Cross
am: b94c5b8efd Change-Id: I9c4ae59929524f4447606673543453e112f0db03
2017-10-22Use final release of ASM 6.0Colin Cross
am: 24351c4eab Change-Id: Idcd580dcd5609002682c1a1f4eb5221bbc098e0c
2017-10-20Use final release of ASM 6.0Colin Cross
Test: m checkbuild Change-Id: I841aadecf4b9ee3318eb10a67bd460d07a6d3860
2017-10-18Snap for 4402171 from 05fe64e0918856984ae9561f3f776c3d03d46c36 to pi-releaseandroid-build-team Robot
Change-Id: Iaef895f891145144e14c99fe3000493b2ab8e750
2017-10-17Move OpenJDK9-specific javacflags am: 46cd42316b am: 543731678d am: 73f0f562e9Colin Cross
am: f5d9b7abf2 Change-Id: Ibc528050de868ebb7efa00eac6ac22603ff32062
2017-10-17Move OpenJDK9-specific javacflags am: 46cd42316b am: 543731678dColin Cross
am: 73f0f562e9 Change-Id: I3268aa3d1fc727096ed1a448ac6ad6b8e1e2a7cb
2017-10-17Move OpenJDK9-specific javacflags am: 46cd42316bColin Cross
am: 543731678d Change-Id: I2bef0258b2c6131417a0a7cb202793a138ebeb03
2017-10-17Move OpenJDK9-specific javacflagsColin Cross
am: 46cd42316b Change-Id: Ifa1f7cf7f367cf050933958457713a334ddffb2a
2017-10-12Move OpenJDK9-specific javacflagsColin Cross
Test: m -j checkbuild Change-Id: I498a662390177bfcd6301d19d5834b7ea3361709
2017-09-26release-request-37e26775-0485-4a3d-a06c-026b3663c922-for-git_pi-release-4359 ↵android-build-team Robot
872 snap-temp-L83600000106066915 Change-Id: If8d980b20cd0d113eea4a31faaf8910d589fd68b
2017-09-25Merge remote-tracking branch 'aosp/upstream-master' am: 14905bc683 am: ↵Ivan Gavrilovic
3a238ab3dd am: 34477e8629 am: 01ca295d00 Change-Id: Id923cb5e1f5be4125f1905bcd607d00a32e74441
2017-09-25Merge remote-tracking branch 'aosp/upstream-master' am: 14905bc683 am: ↵Ivan Gavrilovic
3a238ab3dd am: 34477e8629 Change-Id: I036c4ea04f82b177d5262d7021a05667e403c209
2017-09-25Merge remote-tracking branch 'aosp/upstream-master' am: 14905bc683Ivan Gavrilovic
am: 3a238ab3dd Change-Id: I42c5bc3246a1d22ac12ba53425aada744a1544d4
2017-09-25Merge remote-tracking branch 'aosp/upstream-master'Ivan Gavrilovic
am: 14905bc683 Change-Id: Icde73e5b33f3c10662bced068a7a9a21f19558e4
2017-09-25Merge remote-tracking branch 'aosp/upstream-master'Ivan Gavrilovic
* aosp/upstream-master: (25 commits) Track the origin of an option in the option instance, not its final value. Deprecate wrapperOptions. Track all option instances. Cleanup of expansion option naming Create multiple ParamsFilePreProcessors to allow parsing files using the formats specified in ParameterFile.ParameterFileType. Also maintain the currently used parsing style of whitespace split arguments that allows single and double quoting and whitespace and quote escaping. This style of parsing is for a format not currently generated and will be removed once all consuming actions have been converted to using a supported format explicitly. Document the options in smaller commands. Treat parsed option values differently by option type. Throw away the confusing UnparsedOptionValueDescription name. Introduce "bazel help flags-as-proto" to print information about supported flags as a text protobuf. Pass the UnparsedOptionValues when setting or adding option values. Consolidate the "unparsed" option value tracking. Open source tests for Android desugarer. Move option value tracking classes to their own file. Replace referrals to options by their name to option definitions. Option value tracking should refer to the option definitions, not just track option name. Options with oldNames will no longer get reported twice in the effective option lists. fix for legacy jacoco instrumentation in interfaces behind flag RELNOTES: n/a Expansion flags need some restraints. Rename all logger instances to "logger" (instead "LOG" or "log"). Update comments about the option processor. ... Test: mma external/desugar Change-Id: I718bba35f1eb9eaacd68cb37d79a5c2068d3b9c1
2017-09-25Update copybara to exclude test resources am: d0f248dbc7 am: f64f5e13f4 am: ↵Ivan Gavrilovic
550655cfbe am: 7c095d65af Change-Id: I1ea702d0a63c66ecac3c987dafba690d4be2d1a6
2017-09-25Update copybara to exclude test resources am: d0f248dbc7 am: f64f5e13f4Ivan Gavrilovic
am: 550655cfbe Change-Id: Ie999f654aca2a172f1523f2dce2fa1fe74535029
2017-09-25Update copybara to exclude test resources am: d0f248dbc7Ivan Gavrilovic
am: f64f5e13f4 Change-Id: I08193f1aa05efe22901767f4b43b293d992e0e05
2017-09-25Update copybara to exclude test resourcesIvan Gavrilovic
am: d0f248dbc7 Change-Id: I8eb73a10b9f06f247b4be95a816dcdae169701b7
2017-09-22Update copybara to exclude test resourcesIvan Gavrilovic
Excluded test txt and jar files from Apache 2.0 license verification. Test: copybara import Change-Id: I7e651e7e9e8f9bb4e8878fd40c3408aa6f9e5cce
2017-09-22Track the origin of an option in the option instance, not its final value.ccalvarin
A single instance of an option has a single origin, but the final value only has a single origin if it has a single value. For multi-valued options, it is wrong to expect that the final value of an option will have a single parent. Track the option parents (which option expanded to the current instance, if any) in the right place, with the ParsedOptionDescription. Also fix some inconsistent spelling of 'dependent,' in favor of the American English standard. RELNOTES: None. PiperOrigin-RevId: 169487515 GitOrigin-RevId: 3a0df3cb0637d71dfcf0add7057332c09cd508c5 Change-Id: Ic187397f8204aea3638b109b71d590920e968bdb
2017-09-22Deprecate wrapperOptions.ccalvarin
In order to discourage new uses (there shouldn't be any, but just in case), make it illegal to set wrapperOption=true for non deprecated options. RELNOTES: None. PiperOrigin-RevId: 169477990 GitOrigin-RevId: 125e88d693f04df7f9039906dc7bb03245fb61f7 Change-Id: Iab3e66245c1cfb53aada05654cc304a4334ddd9a
2017-09-22Track all option instances.ccalvarin
Regardless of option type, have the OptionValueDescription track information about the parsed option. This does not yet change the values that we output as part of the GotOptionsEvent, as the expansion, implicit req, and wrapper options still don't actually track anything in their option value. RELNOTES: None. PiperOrigin-RevId: 169469793 GitOrigin-RevId: 1ad38ea0dd4eb10cad92daf0fb2710ff118147c9 Change-Id: If2f29862ffabb190cbb9fcdc1a56685fa2916a5e
2017-09-22Cleanup of expansion option namingccalvarin
Options that expand to other options are expansion options and the options they expand to have values that were expansions. This can be a bit confusing. Removes the isExpansion() call that is somewhat ambiguous, and forces option users to explicitly check the option definition for this information. Also provide a parallel boolean function for implicit requirements, so that we stop querying for the length of the implicit requirement all over the place. RELNOTES: None. PiperOrigin-RevId: 169461566 GitOrigin-RevId: 4acb36c048a620abd7a0f5dff274851bd6dd9c28 Change-Id: I75068dceefa40f56201d3b6817d551741137085d
2017-09-22Create multiple ParamsFilePreProcessors to allow parsing files using the ↵apell
formats specified in ParameterFile.ParameterFileType. Also maintain the currently used parsing style of whitespace split arguments that allows single and double quoting and whitespace and quote escaping. This style of parsing is for a format not currently generated and will be removed once all consuming actions have been converted to using a supported format explicitly. RELNOTES: None. PiperOrigin-RevId: 169437362 GitOrigin-RevId: bcb3c5798390d6901681e74e19099378a9afae0a Change-Id: I203a3cabbf693bc3e85ed1d63e7001e9787aa036
2017-09-22Document the options in smaller commands.ccalvarin
RELNOTES: None. PiperOrigin-RevId: 169258065 GitOrigin-RevId: 2573540ae538f117a7ac919783298561ed484e3e Change-Id: Ib1f1f1e1ae7b082c70bb5d65b4a9044aa8b0e24f