Skip to content

Commit

Permalink
Merge branch 'master' into issue-6416-breakpoints-do-not-get-triggere…
Browse files Browse the repository at this point in the history
…d-in-golang-projects-running-c-extensions-via-cgo
  • Loading branch information
iliakondratev authored Oct 22, 2024
2 parents 50ad8e8 + 77b7a71 commit bdd60b7
Show file tree
Hide file tree
Showing 122 changed files with 1,634 additions and 1,386 deletions.
56 changes: 52 additions & 4 deletions .bazelci/clion.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
tasks:
CLion-OSS-oldest-stable:
name: CLion OSS Oldest Stable
CLion-Linux-OSS-oldest-stable:
name: CLion Linux OSS Oldest Stable
platform: ubuntu2204
build_flags:
- --define=ij_product=clion-oss-oldest-stable
Expand All @@ -12,8 +12,8 @@ tasks:
- --test_output=errors
test_targets:
- //:clwb_tests
CLion-OSS-latest-stable:
name: CLion OSS Latest Stable
CLion-Linux-OSS-latest-stable:
name: CLion Linux OSS Latest Stable
platform: ubuntu2204
build_flags:
- --define=ij_product=clion-oss-latest-stable
Expand All @@ -24,6 +24,54 @@ tasks:
- --test_output=errors
test_targets:
- //:clwb_tests
CLion-Windows-OSS-oldest-stable:
name: CLion Windows OSS Oldest Stable
platform: windows
build_flags:
- --define=ij_product=clion-oss-oldest-stable
build_targets:
- //clwb/...
test_flags:
- --define=ij_product=clion-oss-oldest-stable
- --test_output=errors
test_targets:
- //clwb:integration_tests
CLion-Windows-OSS-latest-stable:
name: CLion Windows OSS Latest Stable
platform: windows
build_flags:
- --define=ij_product=clion-oss-latest-stable
build_targets:
- //clwb/...
test_flags:
- --define=ij_product=clion-oss-latest-stable
- --test_output=errors
test_targets:
- //clwb:integration_tests
CLion-MacOS-OSS-oldest-stable:
name: CLion MacOS OSS Oldest Stable
platform: macos_arm64
build_flags:
- --define=ij_product=clion-oss-oldest-stable
build_targets:
- //clwb/...
test_flags:
- --define=ij_product=clion-oss-oldest-stable
- --test_output=errors
test_targets:
- //:clwb_tests
CLion-MacOS-OSS-latest-stable:
name: CLion MacOS OSS Latest Stable
platform: macos_arm64
build_flags:
- --define=ij_product=clion-oss-latest-stable
build_targets:
- //clwb/...
test_flags:
- --define=ij_product=clion-oss-latest-stable
- --test_output=errors
test_targets:
- //:clwb_tests
CLion-Linux-OSS-under-dev:
name: CLion Linux OSS Under Development
platform: ubuntu2204
Expand Down
38 changes: 0 additions & 38 deletions .bazelci/intellij-ue.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,5 @@
---
tasks:
IntelliJ-UE-internal-stable:
name: IntelliJ UE Internal Stable
platform: ubuntu2204
build_flags:
- --define=ij_product=intellij-ue-latest
build_targets:
- //ijwb/...
test_flags:
- --define=ij_product=intellij-ue-latest
- --test_output=errors
test_targets:
- //:ijwb_ue_tests
IntelliJ-UE-internal-beta:
name: IntelliJ UE Internal Beta
platform: ubuntu2204
build_flags:
- --define=ij_product=intellij-ue-beta
build_targets:
- //ijwb/...
test_flags:
- --define=ij_product=intellij-ue-beta
- --test_output=errors
test_targets:
- //:ijwb_ue_tests
IntelliJ-UE-internal-under-dev:
name: IntelliJ UE Internal Under Development
platform: ubuntu2204
build_flags:
- --define=ij_product=intellij-ue-under-dev
build_targets:
- //ijwb/...
test_flags:
- --define=ij_product=intellij-ue-under-dev
- --test_output=errors
test_targets:
- //:ijwb_ue_tests
soft_fail:
- exit_status: 1
IntelliJ-UE-OSS-oldest-stable:
name: IntelliJ UE OSS Oldest Stable
platform: ubuntu2204
Expand Down
40 changes: 1 addition & 39 deletions .bazelci/intellij.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,5 @@
---
tasks:
IntelliJ-CE-internal-stable:
name: IntelliJ CE Internal Stable
platform: ubuntu2204
build_flags:
- --define=ij_product=intellij-latest
build_targets:
- //ijwb/...
test_flags:
- --define=ij_product=intellij-latest
- --test_output=errors
test_targets:
- //:ijwb_ce_tests
IntelliJ-CE-internal-beta:
name: IntelliJ CE Internal Beta
platform: ubuntu2204
build_flags:
- --define=ij_product=intellij-beta
build_targets:
- //ijwb/...
test_flags:
- --define=ij_product=intellij-beta
- --test_output=errors
test_targets:
- //:ijwb_ce_tests
IntelliJ-CE-internal-under-dev:
name: IntelliJ CE Internal Under Development
platform: ubuntu2204
build_flags:
- --define=ij_product=intellij-under-dev
build_targets:
- //ijwb/...
test_flags:
- --define=ij_product=intellij-under-dev
- --test_output=errors
test_targets:
- //:ijwb_ce_tests
soft_fail:
- exit_status: 1
IntelliJ-CE-OSS-oldest-stable:
name: IntelliJ CE OSS Oldest Stable
platform: ubuntu2204
Expand Down Expand Up @@ -76,7 +38,7 @@ tasks:
- //:ijwb_ce_tests
soft_fail:
- exit_status: 1
IntelliJ-CE-OSS-under-dev:
IntelliJ-CE-OSS-under-dev-windows:
name: IntelliJ CE OSS Under Development
platform: windows
build_flags:
Expand Down
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build --java_language_version=17 --java_runtime_version=17
build --tool_java_language_version=17 --tool_java_runtime_version=17

# Delete test data packages, needed for bazel integration tests. Update by running the following command:
# bazel run @rules_bazel_integration_test//tools:update_deleted_packages
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
v2024.10.22
===========
Bug Fixes
* [fix] Fix python debugging #6847
* Set runfiles vars to absolute paths when debugging Go tests #6883
* Fix starlark debugger #6888
* fix(querysync): affected packages calculator was broken when 'directories' contained '.' #6885
* fix: fast test not working when main class is not set #6903
* fix: fast sync with bazel 8 or when --incompatible_use_plus_in_repo_names is on #6901
* BEP parse unknown targets in aborted event #6910
Features
* Download Buildifier Binary #6625
* Support for Python Rules that are Code Generators #6726
* Decorate tabs for BUILD files with package name #6900
* New Sync View #6813
* feat: More descriptive location labels (instead of just .workspace) #6916

v2024.10.08
===========
Bug Fixes
Expand Down
8 changes: 5 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ module(
repo_name = "intellij_with_bazel",
)

register_toolchains("//third_party/kotlin:toolchain")

bazel_dep(
name = "platforms",
version = "0.0.10",
)
bazel_dep(
name = "rules_java",
version = "7.12.1",
version = "7.12.2",
)
bazel_dep(
name = "rules_python",
version = "0.36.0",
version = "0.37.0",
)

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
Expand Down Expand Up @@ -50,7 +52,7 @@ use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools")

bazel_dep(
name = "rules_bazel_integration_test",
version = "0.25.0",
version = "0.26.0",
dev_dependency = True,
)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ how to join the discussion can be found in the [SIG charter](https://github.com/

## Support

See the [documentation entry](https://ij.bazel.build/docs/bazel-support.html)
See the [documentation entry](https://github.com/bazelbuild/intellij/blob/master/docs/index.md)
on the plugin support across JetBrains products, languages, and operating
systems.

Expand Down Expand Up @@ -54,7 +54,7 @@ We recommend watching [this video](https://www.youtube.com/watch?v=GV_KwWK3Qy8)
To import an existing Bazel project, choose `Import Bazel Project`,
and follow the instructions in the project import wizard.

Detailed docs are available [here](http://ij.bazel.build).
Detailed docs are available [here](https://github.com/bazelbuild/intellij/blob/master/docs/index.md).

## Known issues

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void testCoptsPrefinedMakeVars() throws Exception {
assertThat(cTargetIdeInfo.getTargetCoptList()).hasSize(2);
// These predefined variables' values are dependent on build system and configuration.
assertThat(cTargetIdeInfo.getTargetCoptList().get(0))
.containsMatch("^-DPREFINED_BINDIR=(blaze|bazel)-out/[-0-9a-z]+/bin$");
.containsMatch("^-DPREFINED_BINDIR=(blaze|bazel)-out/[0-9a-z_-]+/bin$");
assertThat(cTargetIdeInfo.getTargetCoptList().get(1)).isEqualTo("-DPREFINED_BINDIR2=$(BINDIR)");
}
}
4 changes: 4 additions & 0 deletions aswb/aswb.bazelproject
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ test_sources:
*/testcompat/unittests*
*/testcompat/integrationtests*
*/testcompat/utils/integration*

additional_languages:
kotlin

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.lib.rules.android.deployinfo.AndroidDeployInfoOuterClass.AndroidDeployInfo;
import com.google.devtools.build.lib.rules.android.deployinfo.AndroidDeployInfoOuterClass.Artifact;
import com.google.idea.blaze.android.manifest.ManifestParser.ParsedManifest;
Expand All @@ -29,6 +30,7 @@
import com.google.idea.blaze.common.artifact.OutputArtifact;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.util.containers.ContainerUtil;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand All @@ -45,7 +47,7 @@ public class BlazeApkDeployInfoProtoHelper {
public AndroidDeployInfo readDeployInfoProtoForTarget(
Label target, BuildResultHelper buildResultHelper, Predicate<String> pathFilter)
throws GetDeployInfoException {
ImmutableList<OutputArtifact> outputArtifacts;
ImmutableSet<OutputArtifact> outputArtifacts;
try {
outputArtifacts = buildResultHelper.getBuildArtifactsForTarget(target, pathFilter);
} catch (GetArtifactsException e) {
Expand All @@ -62,7 +64,7 @@ public AndroidDeployInfo readDeployInfoProtoForTarget(
log.warn(outputArtifact.getRelativePath() + " -> " + outputArtifact.getRelativePath());
}
log.warn("All local artifacts for " + target + ":");
List<OutputArtifact> allBuildArtifacts =
ImmutableSet<OutputArtifact> allBuildArtifacts =
buildResultHelper.getBuildArtifactsForTarget(target, path -> true);
List<File> allLocalFiles = LocalFileArtifact.getLocalFiles(allBuildArtifacts);
for (File file : allLocalFiles) {
Expand All @@ -87,7 +89,7 @@ public AndroidDeployInfo readDeployInfoProtoForTarget(
.collect(Collectors.joining(", ", "[", "]")));
}

try (InputStream inputStream = outputArtifacts.get(0).getInputStream()) {
try (InputStream inputStream = ContainerUtil.getFirstItem(outputArtifacts).getInputStream()) {
return AndroidDeployInfo.parseFrom(inputStream);
} catch (IOException e) {
throw new GetDeployInfoException(e.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import com.google.idea.blaze.base.command.BlazeCommandName;
import com.google.idea.blaze.base.command.BlazeFlags;
import com.google.idea.blaze.base.command.buildresult.BuildResultHelper;
import com.google.idea.blaze.base.command.buildresult.BuildResultHelper.GetArtifactsException;
import com.google.idea.blaze.base.command.buildresult.BuildResultHelperBep;
import com.google.idea.blaze.base.filecache.FileCaches;
import com.google.idea.blaze.base.ideinfo.AndroidInstrumentationInfo;
import com.google.idea.blaze.base.ideinfo.TargetIdeInfo;
Expand Down Expand Up @@ -195,7 +193,7 @@ public void run(@NotNull BlazeLaunchContext launchContext)
String.format("Starting %s test...\n", Blaze.buildSystemName(project)));

int retVal;
try (BuildResultHelper buildResultHelper = new BuildResultHelperBep()) {
try (final var buildResultHelper = new BuildResultHelper()) {
commandBuilder.addBlazeFlags(buildResultHelper.getBuildFlags());
BlazeCommand command = commandBuilder.build();
ExecutionUtils.println(console, command + "\n");
Expand All @@ -212,16 +210,13 @@ public void run(@NotNull BlazeLaunchContext launchContext)
if (retVal != 0) {
context.setHasError();
} else {
testResultsHolder.setTestResults(
buildResultHelper.getTestResults(Optional.empty()));
testResultsHolder.setTestResults(buildResultHelper.getTestResults());
}
ListenableFuture<Void> unusedFuture =
FileCaches.refresh(
project,
context,
BlazeBuildOutputs.noOutputs(BuildResult.fromExitCode(retVal)));
} catch (GetArtifactsException e) {
LOG.error(e.getMessage());
}
return !context.hasErrors();
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private static void notifyMissingPlugin(BlazeContext context, PluginNameAndId pl
+ "Click here to install/enable it, then restart the IDE",
plugin.name);
IssueOutput.error(msg)
.navigatable(PluginUtils.installOrEnablePluginNavigable(plugin.id))
.withNavigatable(PluginUtils.installOrEnablePluginNavigable(plugin.id))
.submit(context);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
import com.google.idea.blaze.base.model.primitives.Label;
import com.google.idea.blaze.base.scope.BlazeContext;
import com.google.idea.blaze.base.scope.output.IssueOutput;
import com.google.idea.blaze.base.scope.output.IssueOutput.Category;
import com.google.idea.blaze.base.scope.output.PerformanceWarning;
import com.google.idea.blaze.common.Output;
import com.google.idea.common.experiments.BoolExperiment;
import com.intellij.build.events.MessageEvent.Kind;
import com.intellij.openapi.project.Project;
import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -327,7 +327,7 @@ private ImmutableList<AndroidResourceModule> buildAndroidResourceModules(
if (mergeResourcesEnabled.getValue()) {
messageBuilder.append(" ").append("Merging Resources...").append("\n");
String message = messageBuilder.toString();
context.accept(IssueOutput.issue(Category.INFORMATION, message).build());
context.accept(IssueOutput.issue(Kind.INFO, message).build());

result.add(mergeAndroidResourceModules(androidResourceModulesWithJavaPackage));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.google.idea.blaze.base.sync.projectview.ProjectViewTargetImportFilter;
import com.google.idea.blaze.common.Output;
import com.google.idea.blaze.java.sync.model.BlazeJarLibrary;
import com.intellij.build.events.MessageEvent.Kind;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import java.util.Collection;
Expand Down Expand Up @@ -110,8 +111,7 @@ static Consumer<Output> asConsumer(BlazeContext context) {
context.output(issue);
if (issue instanceof IssueOutput) {
IssueOutput issueOutput = (IssueOutput) issue;
if (issueOutput.getCategory()
== com.google.idea.blaze.base.scope.output.IssueOutput.Category.ERROR) {
if (issueOutput.getKind() == Kind.ERROR) {
context.setHasError();
}
}
Expand Down
Loading

0 comments on commit bdd60b7

Please sign in to comment.