Doing a simpler check, not trying to figure out if the annotation is in the class declaration or on a method declaration. It would be
very rare for a method to be annotation and not the class.
This reverts commit ae8498e751.
Reason for revert: Fixed version
Original change's description:
> Revert "Add _CheckAndroidNullAwayAnnotatedClasses PRESUBMIT check"
>
> This reverts commit cfe861e365.
>
> Reason for revert: Doesn't ignore comments
>
> Original change's description:
> > Add _CheckAndroidNullAwayAnnotatedClasses PRESUBMIT check
> >
> > Warn when a .java file is missing @NullMarked and @NullUnmarked.
> >
> > Temporarily disabled in //android_webview and //chrome while migrating.
> >
> > Bug: 404884589
> > Change-Id: I38e331bcec6f3a3f2147c0999fd4dca8fef145d5
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6373892
> > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
> > Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1435461}
>
> Bug: 404884589
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Change-Id: I669658f3f21cab9365f0c50b4e0191a1e6a608a0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6377728
> Auto-Submit: Henrique Nakashima <hnakashima@chromium.org>
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1435593}
Bug: 404884589
Change-Id: I11d0ed28bf1941e72df5dcc457fb9d7e62dc89ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6381838
Auto-Submit: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1436182}
Warn when a .java file is missing @NullMarked and @NullUnmarked.
Temporarily disabled in //android_webview and //chrome while migrating.
Bug: 404884589
Change-Id: I38e331bcec6f3a3f2147c0999fd4dca8fef145d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6373892
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1435461}
https://crrev.com/c/6343776 added a presubmit warning to prevent new
usages of these headers. We chose a warning so that it'd be possible
to bypass in case of initial issues. Now that it seems to work, this CL
upgrades the warning to error.
Bug: 40242126
Change-Id: I740082f960468b563d435124460dfed0aa052833
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6368501
Reviewed-by: Dominic Battré <battre@chromium.org>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/main@{#1435063}
No change to production behavior. This adds a presubmit check for
IS_DESKTOP_ANDROID. The goal is to confine use of this value to chrome/
layer and other higher layers, but to ban this in content/ layer and
below.
This has "warning" status only so that it can be bypassed in case of
false positive, however the intention is that generally
IS_DESKTOP_ANDROID should only live in higher layers.
Fixed: 401628399
Test: vpython3 PRESUBMIT_test.py
Change-Id: Ice010be105a476100acf5cf70a3d262228916c33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6336803
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1431159}
Add new arm32 and arm64 targets:
- generate_orderfile_android_trichrome_chrome_bundle
- generate_orderfile_android_trichrome_chrome_64_32_bundle
Add --chromium-output-directory as an arg passed to run_benchmark for
the two scenarios that generate_orderfile.py calls.
For now, use --streamline-for-debugging until the bots are set up and
passing.
R=mheikal@chromium.org
Bug: 380082658
Change-Id: I7ae8d46d3b1d31202162474bd9b8d598da70afdc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6321261
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428003}
View::AddChildViewRaw is prone to memory bugs. This CL adds a PRESUBMIT
to warn against it.
This is a warning instead of error because there are cases that are
still difficult to be migrated off.
Bug: 40485510
Change-Id: I6de7a23a33eda2aa8f16b0edf21639f242ff01cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6321246
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Keren Zhu <kerenzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1427552}
These two features will be launched together anyway; this reshuffle aims
to simplify the testing process.
This CL also scopes the kIwaKeyDistributionComponent feature visibility
on about://flags to MacOS and Linux.
Bug: 399048404
Change-Id: I73146e05ee5d7f791242ffbf11d9cb5fc233183c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6298259
Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
Reviewed-by: Simon Hangl <simonha@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Andrew Rayskiy <greengrape@google.com>
Cr-Commit-Position: refs/heads/main@{#1426374}
Some presubmit regex needs to be escaped by r,
otherwise python can not compile them.
Python 3.12 has mad these into warnings and they're flooding
the presubmit messages.
Bug: 397963615
Change-Id: I5ddcb9cf1744438d163e6b25636e6861e665d7bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6305727
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Gary Tong <gatong@chromium.org>
Commit-Queue: Riley Wong <rgw@google.com>
Cr-Commit-Position: refs/heads/main@{#1425455}
Python 3.12 emits warnings if you use an unrecognized escape sequence
in a string. There were many occurrences of '\.' in PRESUBMIT.py, so
this fixes them.
Change-Id: Ibd07c56eaa6231965c75a943ade567bc8395679a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6278091
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/main@{#1425265}
Windows uses back slash \ as a path separator while other OSes use
forward slash. CL 6236404 introduced depot_tools AffectedFile.UnixLocalPath()
which provides a UNIX-style platform-independent path on all systems.
This CL updates PRESUBMIT.py to take advantage of this new method.
Bug: None
Change-Id: Iccd71ccb5192ff56efbc822dc2ae52304b61f778
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6218309
Commit-Queue: Anton Bershanskyi <bershanskyi@gmail.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/main@{#1418864}
This also removes a few direct calls from ash into
crash_reporter::DumpWithoutCrashing() which bypasses setting
crash-location keys. These may (but probably unlikely) be why we're
seeing a few bad-stack DWCs without location keys set.
Bug: 386552744
Change-Id: Id7f3e3a52a12decf2a8a7a75f3de047c3c1f3f1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6246294
Commit-Queue: Peter Boström <pbos@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1417969}
On this CQ job, Proguard took 2:45, and the subsequent tracerefernces
step took 15s. So, locally, this should save 10-15s for devs needing
to enable proguard.
Bug: 371461396
Change-Id: I7de30efd388a294d020cff4460055251369dde23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6221598
Reviewed-by: Sam Maier <smaier@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1414931}
Siso uses script name to partition when commands should be run remotely
vs locally, so this makes it possible.
There is also a lot of errorprone-specific logic, so it's more organized
to have it in a separate script.
Bug: 391114802
Change-Id: Ib1eecfd6dd473e4f721d7c16c9c17270ddb72cbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6191108
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1410095}
Git isn't available in Cog, and so when searching for grd files, we can't do a `git ls-files -- *.grd`. Previously, we tried walking the repo to find all instances of _.grd_ files. However, that meant that we were listing _.grd_ files in submodules, which we don't want.
Instead, we'll just skip the checks which involve _.grd_ file paths which are added to the repo but not added to the expectations file. Since presubmits run in CQ, this shouldn't result in invalid repo states. It's just a bit inconvenient in that edge case.
Alternatives considered:
- Use the grds present in the expectations files.
- This is possible, but is equivalent to the current implementation. (Effectively, we'd be saying that the expectation file is equivalent to the expectation file.)
- Make an RPC call to simulate the git ls-files result.
- This would require getting the correct credentials, and would make the implementation significantly more complex.
For unit tests, I've added a new test data file for each test case involving Cog. While we could have each of the missing files in one test data file, doing so would enforce the order errors are added to the list of errors. So having a separate check for each is less prone to toil if the implementation is changed.
Change-Id: I5552185b817eb4bf962b23d2d6fad15ad9ddc020
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6177203
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Commit-Queue: Terrence Reilly <treilly@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/main@{#1409647}
The Lacros platform is deprecated, and its associated code is being removed. Previously, the PRESUBMIT script was updated to recommend transitioning to the IS_CHROMEOS build flag
However, this change introduced ambiguity, leading to the misinterpretation that IS_CHROMEOS_LACROS should be renamed to IS_CHROMEOS alongside the IS_CHROMEOS_ASH build flag.
This CL refines the PRESUBMIT message to clearly state:
1) Code under IS_CHROMEOS_LACROS must be removed.
2) The IS_CHROMEOS_ASH build flag should be renamed to IS_CHROMEOS.
This update aims to eliminate confusion and provide precise guidance during the
deprecation process.
Bug: 388039763
Change-Id: I0cdd7a788da220ecca17f021a1597d2c41b2c05f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6169131
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1405919}
This is a refactor of EtwSystemDataSource with no intended behavior
change (aside from a small bug fix or two). The motivation is to make
the ETW consumer easier to test and easier to expand with more
functionality in subsequent CLs.
In particular:
- EtwSystemDataSource::Consumer is now EtwConsumer.
- The ProcessEventRecord implementation now dispatches to per-provider
event handling functions based on the provider guid.
- LostEvent records now emit DLOG messages for diagnostic purposes.
- Perfetto events are only generated when there is valid data to give
them. Previously, an EtwTraceEvent was created for every ETW event
originating from the Thread provider, but only populated for valid
CSwitch events.
- EtwConsumerTest (was EtwSystemDataSource) exercises more of the ETW
event processing code.
Bug: 41497361
Change-Id: I544533aed9c7974f3ee8bc77bf5d3d384a93f9de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6084478
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1394798}