Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-Pick changes from AOSP #6965

Merged
merged 145 commits into from
Nov 19, 2024
Merged

Cherry-Pick changes from AOSP #6965

merged 145 commits into from
Nov 19, 2024

Conversation

LeFrosch
Copy link
Collaborator

@LeFrosch LeFrosch commented Nov 5, 2024

This PR pulls all changes from the AOSP until 3e7c8ecfb0ccdc4fbe9e1bdfa862f2b267e87b0a. Also this PR starts to prepare the intellij fork for receiving further commits from the AOSP in future.

@LeFrosch LeFrosch force-pushed the aosp-merge branch 3 times, most recently from 2085bc4 to 7d216ec Compare November 12, 2024 09:27
aspect/fast_build_info.bzl Outdated Show resolved Hide resolved
@LeFrosch LeFrosch force-pushed the aosp-merge branch 2 times, most recently from 76eee5f to d817157 Compare November 15, 2024 10:13
Comment on lines 49 to 73
public static Label fromPackageAndName(Path packagePath, Path name) {
return of(String.format("@@//%s:%s", packagePath, name));
public static Label fromWorkspacePackageAndName(String workspace, Path packagePath, Path name) {
return workspace.isEmpty() ? Label.of(String.format("//%s:%s", packagePath, name))
: Label.of(String.format("@@%s//%s:%s", workspace, packagePath, name));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tpasternak Just rebased your most recent changes. Is this correct?

@LeFrosch LeFrosch force-pushed the aosp-merge branch 4 times, most recently from 8c3cfb7 to c999e03 Compare November 15, 2024 16:57
@LeFrosch LeFrosch marked this pull request as ready for review November 15, 2024 17:32
@github-actions github-actions bot added product: CLion CLion plugin product: IntelliJ IntelliJ plugin product: GoLand GoLand plugin awaiting-review Awaiting review from Bazel team on PRs labels Nov 15, 2024
@LeFrosch LeFrosch force-pushed the aosp-merge branch 8 times, most recently from e28f99f to 7f34195 Compare November 18, 2024 10:10
LeFrosch and others added 20 commits November 19, 2024 11:20
With 243, Alarm asks a CoroutineScope set with Alarm. Otherwise, it will
try to fetch it via applciation serivce AlarmSharedCoroutineScopeHolder.
It's a service that register via annotation and set as private. So it's
hard to mock an application service for it. In this case, set a dummy
Scope for it.

Bug: N/A
Test: //tools/adt/idea/aswb/common/experiments:unit_tests
Change-Id: I9a5b49d94f4ee38d0a16be857032ce347b3347a0

AOSP: b53f93734a0c871f3558f28999a697ccd9eb83c0
Do not rely on `label` property of a target object as in the current
version of Bazel it is not available if the target represent a
toolchain.

Bug: 375410284
Test: existing integration tests
Change-Id: I2482c59c9a94e237bcb12ac581d512d7e68a59ba

AOSP: 49387b7567e86af608f9ba97a0b4bf3db0a531e3
and prepare for the upcoming change to Kotlin toolchain handling.

Bug: 375410284
Test: existing integration tests and manually
Change-Id: I383dea974fddb1452c6619053d0469dd8f75e30b

AOSP: 97350e893ba8bb075108083f54b2b24a2d2d6734
and prepare for the upcoming change to CC toolchain handling.

Note: this is incomplete and only includes the interface needed for
      toolchain support.

Bug: 375410284
Test: existing integration tests and manually
Change-Id: I8e7bad390f9cce9299606079d6b3e1f367d350fe

AOSP: 9efef39fda9e7b25458176eed1cd3df7c91d3cd0
…enciesInfo`

Change-Id: If19c15951f9a0319c4ca595454800b8678347963
Bug: 378119291
Tests: presubmits

AOSP: f148ca57ac806f29b39ef34cdfb872b087bb52ac
Target info for the same target may have different artifact paths
when fetched from the target in different configurations. This typically
happens when a target is in a dependency chains
of Java and Android targets.

The right fix is to distinguish such a targets.

Bug: 376833687
Test: n/a (we lack Android test projects in bazel)
Change-Id: I1a0374d38854e53d5cc0e266506001d49df686d8

AOSP: fb3d773728775bb2007edd5a9e532e406a0d4713
as it causes later target info conflicts.

This change effectively reverts
I2caea196373a9d9fed47164c0f9ef97cfc885cb9 although not its tests as they
are mostly still applicable.

Bug: 376833687
Bug: 353651427
Test: n/a (manually tested to fix conflicts)
Change-Id: Iae8b38628b4a1b400ff212a166f434a797cfe4b8

AOSP: 512e39a6b528f6d4258009b24e90820b199b429b
`expand_sources` indicates that a target is a source code transformation
and its output should not be analyzed by the IDE. The `expand_sources`
is determined by a target configuration and when such a target is
consumed is directly known to the consumer and does not require a
context to be supplied from the outside, which makes the result not
depend on the target and its dependencies exclusively.

Bug: 376833687
Test: SyncedPrebuiltProjectTest
Test: SyncedInBazelProjectTest
Change-Id: Ie8eaf8b3ffb42bce3370afe3df225020120bc6ce

AOSP: e95dd8cc92104c856f71f643e99542c81de9f240
without creating empty java or cc infos which later confuse target
deduplication.

Replace generic merging with explicit merging of specific info types.

Bug: 376833687
Test: n/a (to be added later when Android test projects available)
Change-Id: I2425f252eaadce50af2915953a3e695ed02f2632

AOSP: ed316245b0831dd2c6eaec9b9b600f0442a4f8e5
when downloading.

Bug: n/a
Test: n/a
Change-Id: Ie87317a6c6962341773de142bcde5a86617b204e

AOSP: 262fcfaeb6af81c949bdc5e16a04e012aee71c42
Bug: n/a
Test: n/a
Change-Id: I1d4bf3ca5f13a3a8d48bb3b4d2f65204ca17f0ab

AOSP: a46b766372c62d18763ccbb4caf800a5b2d5f6af
Add `query.sync.run.query.in.workspace` experiment (default `true`) to
disable running queries in a snapshot directory.

This may result in query results reflecting a newer state of the
workspace or even failing because of inconsistencies caused by the user
editing files.

In general this is not expected to be dangerous since these changes are
supposed to be detected and the query state should become outdated
anyway and require re-querying.

Switching to a snapshot provides some consistency but at the cost of
spawning a new bazel instance and re-loading all packages every time.

Bug: 356244980
Test: n/a
Change-Id: Ib433ac2869700ff75d2c54c1bfefe1cf3ff9cc17

AOSP: ca5831e5ebeee8eb51889e7726309ef5ef4b8cfd
Bug: 378841215
Test: n/a
Change-Id: I4bf573d2decafd5b3893fb5e653944cabc1d5d4d

AOSP: f647f6fa18fe99d8e295703b37dfeae048363fba
Bug: 375380927
Test: n/a
Change-Id: I3bc87aa016559f1552c45dc5c1ba0225fc13174d

AOSP: aa84df91e1f973d0f11c371c76ed0363b2bc1e8f
until required. In the worst case if the regex is wrong is parses out
something that our Label implementation rejects it will appear in the
error list.

This change is to make it easier to understand why and what kind of
labels is instantiated during build operations.

Bug: n/a
Test: n/a
Change-Id: I53a6371be1ec2fc38dcd74acb7b2038e2612a064

AOSP: 3e7c8ecfb0ccdc4fbe9e1bdfa862f2b267e87b0a
@LeFrosch LeFrosch force-pushed the aosp-merge branch 2 times, most recently from 70317f5 to c1b5882 Compare November 19, 2024 10:20
Since google targets 243 this constructor is not available in 242.
Copy link
Collaborator

@ujohnny ujohnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's merge it as rebase

@tpasternak
Copy link
Contributor

btw you can disable AS checks in the same PR

@LeFrosch LeFrosch merged commit f8c553f into bazelbuild:master Nov 19, 2024
5 of 6 checks passed
@LeFrosch LeFrosch deleted the aosp-merge branch November 19, 2024 18:34
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Nov 19, 2024
@ujohnny ujohnny changed the title WIP: Cherry-Pick changes from AOSP Cherry-Pick changes from AOSP Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: CLion CLion plugin product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin
Projects
Development

Successfully merging this pull request may close these issues.

5 participants