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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
f2693c4
Replace calls to ServiceManager.getService for application and modules
Apr 24, 2023
2c2d59b
Implement working set derivation from PROJECT.scl.
jin Jun 4, 2024
314ed77
Add a utility method for getting a singleton package path.
Jun 13, 2024
3d327f3
Add missing category submessage.
Jun 17, 2024
fa747d7
Imported changes from initial AOSP commit
LeFrosch Oct 26, 2024
30ea9eb
IJWB compatability fixes
LeFrosch Oct 28, 2024
ca6568c
Proactively warm-up the VFS before indexing
Nov 4, 2024
a8b7ff7
Make FileSystemWarmUpService less nested
Nov 4, 2024
1795bd2
Inline QuerySummary proto interning
Nov 4, 2024
e38f83a
Move ASwB tests to tools/adt/idea/aswb
Nov 4, 2024
9165308
Do not use com.intellij.history.core.Paths
Nov 4, 2024
ff887f3
Allow implementing com.intellij.openapi.startup.ProjectActivity
Nov 4, 2024
6362b27
Move ASwB test data to tools/adt/idea/aswb
Nov 4, 2024
3ce1fc6
Cleanup unused code and tests
Nov 4, 2024
81dbc22
Remove unused futures from EditorDesignSurface refresh methods
Nov 4, 2024
da2e6cd
WORKAROUND: Fix saving huge project snapshots
Nov 4, 2024
7441eae
WORKAROUND: create temp workaround for build cache artifact missing e…
Nov 4, 2024
598fed4
Rename getRelativePath -> getBazelOutRelativePath
Nov 4, 2024
556ee81
Remove translateOutputArtifacts methods
Nov 4, 2024
a0ee6f0
Store string indexes in rules
Nov 4, 2024
6f9892a
Prefer ApplicationProjectContext to ApplicationIdProvider
Nov 4, 2024
24c034f
Noop implementation of BuildSystemFilePreviewServices for Bazel
Nov 4, 2024
e2ebcc9
Rename project system filenames from Blaze... to Bazel...
Nov 4, 2024
99bbf13
Update testdata to use out own code as "external" deps.
Nov 4, 2024
cbdfcf1
Make test data more realistic
Nov 4, 2024
366a8d5
g3plugins depend on com.android.tools.design
Nov 4, 2024
1cb1c2e
Refactor usage and delete RenderResultCompat
Nov 4, 2024
25a5f1c
Reinstate some C/C++ functionality.
Nov 4, 2024
c5f50c0
Update query sync promo.
Nov 4, 2024
65daf76
Refactor usage and delete RenderLoggerCompat
Nov 4, 2024
5ffa768
Delete RenderErrorContributorCompat
Nov 4, 2024
2d96e69
Refactor usage and delete RenderServiceCompat
Nov 4, 2024
cbbc666
Refactor usage and delete HtmlLinkManagerCompat
Nov 4, 2024
f111c1d
Fix NoneType error when building deps.
Nov 4, 2024
4c3b8d3
Refactor usage and delete StudioLoggerProgressIndicatorCompat
Nov 4, 2024
55e648d
Refactor usage and delete AndroidManifestIndexCompat
Nov 4, 2024
3a5f1f7
Rename & Move DeployTasksCompat and refactor usage
Nov 4, 2024
344019a
Refactor usage and delete BlazeAndroidBinaryNormalBuildRunContextCompat
Nov 4, 2024
e7efdc7
Refactor usage and delete BlazeAndroidBinaryMobileInstallRunContextCo…
Nov 4, 2024
6f413f1
Rename BlazeAndroidBinaryRunConfigurationHandlerCompat to BlazeAndroi…
Nov 4, 2024
e8bcf60
Delete LaunchOptionsCompat as it is not used
Nov 4, 2024
e302d34
Delete sdkcompat folders for as231, as232 and asdev
Nov 4, 2024
025d96f
Rename GoogleMavenArtifactIdCompat to GoogleMavenArtifactIdHelper and…
Nov 4, 2024
8fbb03c
Refactor usage and delete IdeSdksCompat
Nov 4, 2024
6cda269
Refactor usage and delete AndroidDeviceCompat
Nov 4, 2024
579444c
Refactor usage and delete AndroidDebuggerCompat
Nov 4, 2024
d87ae89
Delete sdkcompat in tests and move its files
Nov 4, 2024
2f94f7c
Refactor usage and delete ConfigurationCompat
Nov 4, 2024
0132f2f
Move files from sdkcompat to src
Nov 4, 2024
bb9f67b
Remove sdkcompat from integrationtests
Nov 4, 2024
b5a6797
Move files from unittests/sdkcompat to unittests
Nov 4, 2024
768e4ed
Remove unnecessary dep on plugin_api
Nov 4, 2024
474c60f
Use artifactPath in OutputArtifactInfo
Nov 4, 2024
7782105
Ensure all jars are attributed to the right target.
Nov 4, 2024
e2ac028
Move bazel-version specific import etc into a separate file.
Nov 4, 2024
f184268
Do not use outRelativePath in query sync (almost)
Nov 4, 2024
7fda5f2
Use new AndroidIdeInfo API when available.
Nov 4, 2024
cdf61bc
Avoid using com.intellij.history.core.Paths
Nov 4, 2024
97acd95
Define a source provider for all variants, all artifacts
Nov 4, 2024
80bbb35
assume-verified Support for Deployment
Nov 4, 2024
cf0d490
Get module for file within read action
Nov 4, 2024
9af9303
Add derived artifact metadata to artifact tracker state.
Nov 4, 2024
d1bbad3
Add interfaces to support artifact metadata.
Nov 4, 2024
b8016f6
Move `combine_visibilities` from `tools/vendor/google/aswb/third_part…
Nov 4, 2024
50c00ab
Move `tools/vendor/google/aswb/third_party/java/auto` to `tools/adt/i…
Nov 4, 2024
2190d1f
Extract and store artifact metadata when downloading new artifacts.
Nov 4, 2024
c2c5643
Register the extension `BazelApplicationProjectContextProvider`
Nov 4, 2024
95a5793
Revert "WORKAROUND: create temp workaround for build cache artifact m…
Nov 4, 2024
7e7e283
Use a Function instead of a custom interface.
Nov 4, 2024
fca6fd0
Pass artifact state into project proto transforms.
Nov 4, 2024
8b58b88
Migrate AddProjectGenSrcJars to artifact metadata.
Nov 4, 2024
16e6ffa
Migrate AddProjectGenSrcs to artifact metadata.
Nov 4, 2024
9da4dc7
Migrate AddDependencyGenSrcsJars to artifact metadata.
Nov 4, 2024
3d13231
Migrate AddDependencyAars to artifact metadata.
Nov 4, 2024
a75526b
Tidy up ProjectProtoTransformProvider.
Nov 4, 2024
5db2820
Refactor usage of sdkcompat folder and delete it
Nov 5, 2024
3ce8126
Refactor usage and delete testing/testcompat folder
Nov 5, 2024
3e1e9ca
Check if file exists before fetching its children to avoid exception
Nov 5, 2024
7bce07d
Move actions to Background thread
Nov 5, 2024
9b9cba1
Fixes for query-sync with Bazel projects
Nov 5, 2024
0338155
Remove dep of query sync core library on experiments
Nov 5, 2024
d132eba
Remove unnecessary dep on plugin_api
Nov 5, 2024
4cf28a0
Improve artifact metadata handling and storage.
Nov 5, 2024
62426e6
ASwB: remove usages of trove4j
Nov 5, 2024
f544ae7
Retrieve kotlin compiler configuration via
Nov 5, 2024
4f8d541
Workaround bazel duplicate depset entries issue.
Nov 5, 2024
80b3d86
Fix implementation to return not null value
Nov 5, 2024
b61f1ce
Move `flogger`, `truth` and `junit` from `tools/vendor/google/aswb/th…
Nov 5, 2024
e34c014
Refactor usage and delete AndroidFacetModuleCustomizer
Nov 5, 2024
0b17cfd
Refactor usage and delete compat files in aswb/src/org/jetbrains/andr…
Nov 5, 2024
ff495e3
Move default Android SDK API level to static variable
Nov 5, 2024
143cca6
Fix conflict errors in the artifact tracker.
Nov 5, 2024
9df35df
bypass CMakeUsageHandlerFactory
Nov 5, 2024
68b2b8d
Improve querysync bugreport file adding.
Nov 5, 2024
df3f663
Application inspector is always one target
Nov 5, 2024
9ce3cd2
Include artifact store and build cache info in bugreports.
Nov 5, 2024
f161f9a
Add a check for DBiP env variable
Nov 5, 2024
ad162a0
Test to reproduce sync failing to find artifact
Nov 5, 2024
c6f3268
Fix race in BuildArtifactCacheDirectory
Nov 5, 2024
8a89153
Implement AppInspectorArtifactTracker
Nov 5, 2024
29fb13c
Do not update state until artifacts are fetched
Nov 5, 2024
46deee3
Do not suggest go links for external users
Nov 5, 2024
8a407e0
ASwB: add test runtime dependency on opentest4j
Nov 5, 2024
50745fa
Combine BepArtifactData more efficiently
Nov 5, 2024
84444e6
Track deps with missing artifacts.
Nov 5, 2024
9099021
Support for testing missing build artifacts.
Nov 5, 2024
a631b3f
ASwB: remove usage of ActionUpdateThread.OLD_EDT
Nov 5, 2024
048ed83
Address reviewer comments (minor cleanup)
Nov 5, 2024
82ca2b5
Fix `AffectedPackagesCalculator` when `directories: .` is used
Nov 5, 2024
0bf6813
Add logging for number of deleted entries.
Nov 5, 2024
12b16a2
Use `--consistent_labels=true` (https://bazel.build/reference/command…
Nov 5, 2024
08973dc
Run sync queries remotely.
Nov 5, 2024
ed58ff1
Remove some unused code
Nov 5, 2024
80920a6
Use a record for storing rules instead of a proto.
Nov 5, 2024
a8232b4
Make BuildTargetReference not hold module reference
Nov 5, 2024
8d497de
Remove an erroneous @Nullable.
Nov 5, 2024
10c419a
Do not validate/normalize labels on load
Nov 5, 2024
7f6dca8
Move formatting logic out of QuerySpec
Nov 5, 2024
76ce5fa
Re-arrange rule handling in BlazeQueryParser
Nov 5, 2024
2b76b6a
Introduce query strategies to allow experiments
Nov 5, 2024
2a9287d
Experimental filtering query
Nov 5, 2024
694a1ca
Move DynamicAppUtils
Nov 5, 2024
6929841
query.sync.skip.finding.build.output experiment
Nov 5, 2024
6078034
Revert "[WORKAROUND] bypass CMakeUsageHandlerFactory"
Nov 5, 2024
c3a2223
Fixed // not a valid label error in qsync aspect
LeFrosch Nov 5, 2024
890c0f4
Fixed python qsync build errors after rebase
LeFrosch Nov 5, 2024
1bb752b
Fixed CLion build
LeFrosch Nov 11, 2024
8607237
Fixed aspect testing build error
LeFrosch Nov 11, 2024
0134cfe
Added Querysync to ijwb-ue CI
LeFrosch Nov 15, 2024
f2b52fa
Fix failure tests
Nov 15, 2024
43ebb34
Prepare for providers from aspects
Nov 15, 2024
21d20a9
Extract Kotlin aspect IDE interface
Nov 15, 2024
b15566b
Extract CC aspect IDE interface
Nov 15, 2024
eccb63f
Check if the Cc toolchain target exists before collecting its `Depend…
Nov 15, 2024
fd91b46
WORKAROUND: Ignore diffs in target deduplication
Nov 15, 2024
d57f014
Do not attempt to fix source to target map
Nov 15, 2024
81993ec
Handle expand_sources without mutability
Nov 15, 2024
c9dbe15
Merge cc and java infos correctly
Nov 15, 2024
9063013
Display artifact number and sizes
Nov 15, 2024
106b690
Add "Reset sync" action
Nov 15, 2024
5be2c60
Do not run queries in snapshot directories
Nov 15, 2024
59e0992
Default Java language level to 21
Nov 15, 2024
d3e8549
Address pbfile not in workspace
Nov 15, 2024
329e5a8
Do not instantiate Labels
Nov 15, 2024
714b818
WORKAROUND: removed usage of incompatible alarm constructor
LeFrosch Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
50 changes: 3 additions & 47 deletions .bazelci/aspect.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,6 @@
---
tasks:
Aspect-internal-stable:
name: Aspect Tests for IJ Internal Stable
platform: ubuntu2204
build_flags:
- --define=ij_product=intellij-latest
build_targets:
- //aspect:aspect_files
test_flags:
- --define=ij_product=intellij-latest
- --test_output=errors
- --notrim_test_configuration
test_targets:
- //aspect/testing/...
skip_use_bazel_version_for_test: true
Aspect-internal-beta:
name: Aspect Tests for IJ Internal Beta
platform: ubuntu2204
build_flags:
- --define=ij_product=intellij-beta
build_targets:
- //aspect:aspect_files
test_flags:
- --define=ij_product=intellij-beta
- --test_output=errors
- --notrim_test_configuration
test_targets:
- //aspect/testing/...
skip_use_bazel_version_for_test: true
Aspect-internal-under-dev:
name: Aspect Tests for IJ Internal Under Development
platform: ubuntu2204
build_flags:
- --define=ij_product=intellij-under-dev
build_targets:
- //aspect:aspect_files
test_flags:
- --define=ij_product=intellij-under-dev
- --test_output=errors
- --notrim_test_configuration
test_targets:
- //aspect/testing/...
soft_fail:
- exit_status: 1
skip_use_bazel_version_for_test: true
Aspect-oss-oldest-stable:
Aspect-OSS-oldest-stable:
name: Aspect Tests for IJ OSS Oldest Stable
platform: ubuntu2204
build_flags:
Expand All @@ -58,7 +14,7 @@ tasks:
test_targets:
- //aspect/testing/...
skip_use_bazel_version_for_test: true
Aspect-oss-latest-stable:
Aspect-OSS-latest-stable:
name: Aspect Tests for IJ OSS Latest Stable
platform: ubuntu2204
build_flags:
Expand All @@ -72,7 +28,7 @@ tasks:
test_targets:
- //aspect/testing/...
skip_use_bazel_version_for_test: true
Aspect-oss-under-dev:
Aspect-OSS-under-dev:
name: Aspect Tests for IJ OSS Under Development
platform: ubuntu2204
build_flags:
Expand Down
13 changes: 12 additions & 1 deletion .bazelci/intellij-ue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,15 @@ tasks:
- //ijwb/...
soft_fail:
- exit_status: 1

Querysync:
name: Querysync Library
platform: ubuntu2204
build_flags:
- --define=ij_product=intellij-ue-oss-under-dev
build_targets:
- //querysync/...
test_flags:
- --define=ij_product=intellij-ue-oss-under-dev
- --test_output=errors
test_targets:
- //querysync/...
8 changes: 5 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,12 @@ maven.install(
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.code.gson:gson:2.10.1",
"com.google.errorprone:error_prone_annotations:2.20.0",
"com.google.guava:guava:33.0.0-jre", # changed to jre
"com.google.truth:truth:1.1.5",
"com.google.truth.extensions:truth-java8-extension:1.1.5",
"com.google.guava:guava:33.3.1-jre", # changed to jre
"com.google.truth:truth:1.4.4",
"com.google.truth.extensions:truth-java8-extension:1.4.4",
"com.google.j2objc:j2objc-annotations:2.8",
"com.google.guava:failureaccess:1.0.2",
"org.hamcrest:hamcrest-core:3.0",
],
fail_if_repin_required = True,
generate_compat_repositories = True,
Expand Down Expand Up @@ -130,6 +131,7 @@ use_repo(
objenesis = "org_objenesis_objenesis",
truth = "com_google_truth_truth",
truth8 = "com_google_truth_extensions_truth_java8_extension",
hamcrest = "org_hamcrest_hamcrest_core",
)

bazel_dep(name = "rules_go", version = "0.50.1", repo_name = "io_bazel_rules_go")
Expand Down
22 changes: 11 additions & 11 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions aspect/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,22 @@ filegroup(
# the aspect files that will be bundled with the final plugin zip
filegroup(
name = "aspect_files",
srcs = [
":aspect_files_only",
":aspect_tools",
],
visibility = ["//visibility:public"],
)

# Separate different targets as they are put into different directories
filegroup(
name = "aspect_files_only",
srcs = [
"WORKSPACE",
"artifacts.bzl",
"build_compose_dependencies.bzl",
"build_dependencies.bzl",
"build_dependencies_deps.bzl",
"fast_build_info_bundled.bzl",
"flag_hack.bzl",
"intellij_info.bzl",
Expand All @@ -40,6 +52,13 @@ filegroup(
"java_classpath.bzl",
"make_variables.bzl",
":BUILD.bazel",
],
visibility = ["//visibility:public"],
)

filegroup(
name = "aspect_tools",
srcs = [
"//aspect/tools:CreateAar",
"//aspect/tools:JarFilter_deploy.jar",
"//aspect/tools:PackageParser_deploy.jar",
Expand Down
37 changes: 37 additions & 0 deletions aspect/build_compose_dependencies.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""Aspects to build and collect project's compose dependencies."""

load("//third_party/bazel_rules/rules_java/java:defs.bzl", "JavaInfo")

ComposeDependenciesInfo = provider(
"The compose dependencies",
fields = {
"render_jars": "a list of render jars generated for project files and external dependencies",
},
)

def _package_compose_dependencies_impl(target, ctx): # @unused
return [OutputGroupInfo(
render_jars = target[ComposeDependenciesInfo].render_jars.to_list(),
)]

package_compose_dependencies = aspect(
implementation = _package_compose_dependencies_impl,
required_aspect_providers = [[ComposeDependenciesInfo]],
)

def _collect_compose_dependencies_impl(target, ctx): # @unused
if JavaInfo not in target:
return [ComposeDependenciesInfo(
render_jars = depset(),
)]
return [
ComposeDependenciesInfo(
render_jars = depset([], transitive = [target[JavaInfo].transitive_runtime_jars]),
),
]

collect_compose_dependencies = aspect(
implementation = _collect_compose_dependencies_impl,
provides = [ComposeDependenciesInfo],
attr_aspects = ["deps", "exports", "_android_sdk"],
)
Loading
Loading