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

Support JetBrains IDEs 2024.1 #5960

Merged
merged 6 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 80 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ http_archive(
url = IC_233_URL,
)

# The plugin api for intellij_ce_2024_1. This is required to build IJwB and run integration tests.
IC_241_SHA = "b1deacab7964751e135b462b65c1348e98640f0a6094363643e2eacf874b5812"

IC_241_URL = "https://www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/idea/ideaIC/241.8102.112-EAP-SNAPSHOT/ideaIC-241.8102.112-EAP-SNAPSHOT.zip"

http_archive(
name = "intellij_ce_2024_1",
build_file = "@//intellij_platform_sdk:BUILD.idea241",
sha256 = IC_241_SHA,
url = IC_241_URL,
)

# The plugin api for IntelliJ UE 2021.2. This is required to run UE-specific
# integration tests.
http_archive(
Expand Down Expand Up @@ -159,6 +171,17 @@ http_archive(
url = IU_233_URL,
)

IU_241_SHA = "a89ca40374d7495e1b31df14f14fd0479b4948800b6a3cb082bc392fddf04ae3"

IU_241_URL = "https://www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/idea/ideaIU/241.8102.112-EAP-SNAPSHOT/ideaIU-241.8102.112-EAP-SNAPSHOT.zip"

http_archive(
name = "intellij_ue_2024_1",
build_file = "@//intellij_platform_sdk:BUILD.ue241",
sha256 = IU_241_SHA,
url = IU_241_URL,
)

# The plugin api for clion_2021_2. This is required to build CLwB, and run integration tests.
http_archive(
name = "clion_2021_2",
Expand Down Expand Up @@ -234,6 +257,17 @@ http_archive(
url = CLION_233_URL,
)

CLION_241_SHA = "099e05aa25233814f45fc14a0d3831d23dd23f6ec215c39b51ba364c5051446d"

CLION_241_URL = "https://www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/clion/clion/241.8102.118-EAP-SNAPSHOT/clion-241.8102.118-EAP-SNAPSHOT.zip"

http_archive(
name = "clion_2024_1",
build_file = "@//intellij_platform_sdk:BUILD.clion241",
sha256 = CLION_241_SHA,
url = CLION_241_URL,
)

DEVKIT_BUILD_FILE = """
java_import(
name = "devkit",
Expand All @@ -253,6 +287,17 @@ http_archive(
url = DEVKIT_233_URL,
)

DEVKIT_241_SHA = "afd94744e647117eae959a41c7410269259ab5d0411a64148759b046093b0139"

DEVKIT_241_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/DevKit/241.8102.119/DevKit-241.8102.119.zip"

http_archive(
name = "devkit_2024_1",
build_file_content = DEVKIT_BUILD_FILE,
sha256 = DEVKIT_241_SHA,
url = DEVKIT_241_URL,
)

_PYTHON_CE_BUILD_FILE = """
java_import(
name = "python",
Expand Down Expand Up @@ -360,6 +405,17 @@ http_archive(
url = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/PythonCore/232.9921.47/PythonCore-232.9921.47.zip",
)

PYTHON_PLUGIN_241_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/PythonCore/241.8102.112/PythonCore-241.8102.112.zip"

PYTHON_PLUGIN_241_SHA = "cc20c45dec7defe17346b5da06cf508c19b5f2517fc5187cde4a2ebb97bc2712"

http_archive(
name = "python_2024_1",
build_file_content = _PYTHON_CE_BUILD_FILE,
sha256 = PYTHON_PLUGIN_241_SHA,
url = PYTHON_PLUGIN_241_URL,
)

_GO_BUILD_FILE = """
java_import(
name = "go",
Expand Down Expand Up @@ -447,6 +503,17 @@ http_archive(
url = GO_PLUGIN_233_URL,
)

GO_PLUGIN_241_SHA = "fd759b4947622f931ebefdd6a20d9dc611196ba44203827fd8e80f3cfd707bff"

GO_PLUGIN_241_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.jetbrains.plugins.go/241.8102.112/org.jetbrains.plugins.go-241.8102.112.zip"

http_archive(
name = "go_2024_1",
build_file_content = _GO_BUILD_FILE_223,
sha256 = GO_PLUGIN_241_SHA,
url = GO_PLUGIN_241_URL,
)

_SCALA_BUILD_FILE = """
java_import(
name = "scala",
Expand Down Expand Up @@ -526,6 +593,17 @@ http_archive(
url = SCALA_PLUGIN_233_URL,
)

SCALA_PLUGIN_241_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.intellij.scala/2024.1.1/org.intellij.scala-2024.1.1.zip"

SCALA_PLUGIN_241_SHA = "412f3be2ec29a9603eb8b6015d0aecff26cb477c80da312e2c66729b9ec68469"

http_archive(
name = "scala_2024_1",
build_file_content = _SCALA_BUILD_FILE,
sha256 = SCALA_PLUGIN_241_SHA,
url = SCALA_PLUGIN_241_URL,
)

# The plugin api for android_studio_2022_2 android_studio. This is required to build ASwB and run integration tests
http_archive(
name = "android_studio_2022_2",
Expand Down Expand Up @@ -664,8 +742,8 @@ jvm_maven_import_external(

jvm_maven_import_external(
name = "error_prone_annotations",
artifact = "com.google.errorprone:error_prone_annotations:2.13.1",
artifact_sha256 = "f5ee2aac2ee6443789e1dee0f96e3c35d9f3c78891f54ed83f3cf918a1cde6d1",
artifact = "com.google.errorprone:error_prone_annotations:2.24.1",
artifact_sha256 = "19fe2f7155d20ea093168527999da98108103ee546d1e8b726bc4b27c31a3c30",
licenses = ["notice"], # Apache 2.0
server_urls = ["https://repo1.maven.org/maven2"],
)
Expand Down
1 change: 1 addition & 0 deletions base/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ java_library(
"//third_party/auto_value",
"//third_party/bazel/src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
"@com_google_guava_guava//jar",
"@error_prone_annotations//jar",
"@junit//jar",
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static PsiElement findGoogleTestSymbol(Project project) {
throw new IllegalStateException("More than 1 extension for " + EP_NAME.getName() + " is not supported");
}

GoogleTestUtilAdapter adapter = EP_NAME.getPoint().extensions().findFirst().orElse(null);
GoogleTestUtilAdapter adapter = EP_NAME.getPoint().getExtensionList().stream().findFirst().orElse(null);
if (adapter != null) {
return adapter.findGoogleTestSymbol(project, testScopeElement -> true);
}
Expand Down
1 change: 1 addition & 0 deletions common/actions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ java_library(
"//intellij_platform_sdk:jsr305",
"//intellij_platform_sdk:plugin_api",
"//sdkcompat",
"@error_prone_annotations//jar",
],
)
1 change: 1 addition & 0 deletions common/settings/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ java_library(
"//intellij_platform_sdk:jsr305",
"//intellij_platform_sdk:plugin_api",
"//third_party/auto_value",
"@error_prone_annotations//jar",
],
)
1 change: 1 addition & 0 deletions common/util/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ java_library(
deps = [
"//intellij_platform_sdk:jsr305", # unuseddeps: keep for @Nullable
"//intellij_platform_sdk:plugin_api",
"@error_prone_annotations//jar",
],
tpasternak marked this conversation as resolved.
Show resolved Hide resolved
)

Expand Down
1 change: 1 addition & 0 deletions cpp/sdkcompat/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ java_library(
"clion-2023.1": ["//cpp/sdkcompat/v231"],
"clion-2023.2": ["//cpp/sdkcompat/v232"],
"clion-2023.3": ["//cpp/sdkcompat/v233"],
"clion-2024.1": ["//cpp/sdkcompat/v241"],
}),
visibility = ["//cpp:__pkg__"],
deps = ["//intellij_platform_sdk:plugin_api"],
Expand Down
19 changes: 19 additions & 0 deletions cpp/sdkcompat/v241/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2024 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

filegroup(
name = "v241",
srcs = glob(["**/*.java"]),
visibility = ["//cpp/sdkcompat:__pkg__"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2023 The Bazel Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.idea.blaze.cpp.qsync;

import com.intellij.openapi.util.Disposer;
import com.jetbrains.cidr.lang.workspace.OCWorkspace;

/** SDK compat class for {@link OCWorkspace.ModifiableModel} */
public class OCWorkspaceModifiableModelDisposer {

private OCWorkspaceModifiableModelDisposer() {}

public static void dispose(OCWorkspace.ModifiableModel modifiableModel) {
Disposer.dispose(modifiableModel);
}
}
2 changes: 1 addition & 1 deletion cpp/src/com/google/idea/blaze/cpp/SourceFileFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static VirtualFile findAndGetSourceFileForHeaderFile(Project project, VirtualFil
throw new IllegalStateException("More than 1 extension for " + EP_NAME.getName() + " is not supported");
}

SourceFileFinder finder = EP_NAME.getPoint().extensions().findFirst().orElse(null);
SourceFileFinder finder = EP_NAME.getPoint().getExtensionList().stream().findFirst().orElse(null);
if (finder != null) {
return finder.getSourceFileForHeaderFile(project, headerFile);
}
Expand Down
42 changes: 41 additions & 1 deletion intellij_platform_sdk/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,19 @@ config_setting(
},
)

config_setting(
name = "intellij-2024.1",
values = {"define": "ij_product=intellij-2024.1"},
)

config_setting(
name = "intellij-2024.1-mac",
values = {
"define": "ij_product=intellij-2024.1",
"cpu": "darwin_x86_64",
},
)

config_setting(
name = "intellij-2023.3-mac",
values = {
Expand Down Expand Up @@ -325,6 +338,18 @@ config_setting(
},
)

config_setting(
name = "intellij-ue-2024.1",
values = {"define": "ij_product=intellij-ue-2024.1"},
)

config_setting(
name = "intellij-ue-2024.1-mac",
values = {
"define": "ij_product=intellij-ue-2024.1",
"cpu": "darwin_x86_64",
},
)

config_setting(
name = "intellij-ue-2023.1-mac",
Expand Down Expand Up @@ -613,6 +638,19 @@ config_setting(
},
)

config_setting(
name = "clion-2024.1",
values = {"define": "ij_product=clion-2024.1"},
)

config_setting(
name = "clion-2024.1-mac",
values = {
"define": "ij_product=clion-2024.1",
"cpu": "darwin_x86_64",
},
)

config_setting(
name = "clion-2023.3-mac",
values = {
Expand All @@ -621,7 +659,6 @@ config_setting(
},
)


config_setting(
name = "intellij-cc-oldest-stable",
values = {
Expand Down Expand Up @@ -763,20 +800,23 @@ java_library(
"clion-2022.1": ["@jsr305_annotations//jar"],
"clion-2022.2": ["@jsr305_annotations//jar"],
"clion-2022.3": ["@jsr305_annotations//jar"],
"clion-2024.1": [],
"intellij-2021.3": ["@jsr305_annotations//jar"],
"intellij-2022.1": ["@jsr305_annotations//jar"],
"intellij-2022.2": ["@jsr305_annotations//jar"],
"intellij-2022.3": ["@jsr305_annotations//jar"],
"intellij-2023.1": ["@jsr305_annotations//jar"],
"intellij-2023.2": ["@jsr305_annotations//jar"],
"intellij-2023.3": ["@jsr305_annotations//jar"],
"intellij-2024.1": ["@jsr305_annotations//jar"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

missing for clion, should we make this always export @jsr305_annotations//jar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure, but it seems that for clion we just don't need it. According to the comment above it's all about javax.annotation.Nullable class, which is included in CLion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Btw the last clion version here is 2022.3

"intellij-ue-2021.3": ["@jsr305_annotations//jar"],
"intellij-ue-2022.1": ["@jsr305_annotations//jar"],
"intellij-ue-2022.2": ["@jsr305_annotations//jar"],
"intellij-ue-2022.3": ["@jsr305_annotations//jar"],
"intellij-ue-2023.1": ["@jsr305_annotations//jar"],
"intellij-ue-2023.2": ["@jsr305_annotations//jar"],
"intellij-ue-2023.3": ["@jsr305_annotations//jar"],
"intellij-ue-2024.1": ["@jsr305_annotations//jar"],
"android-studio-2022.2": ["@jsr305_annotations//jar"],
"android-studio-2022.3": ["@jsr305_annotations//jar"],
"android-studio-2023.1": ["@jsr305_annotations//jar"],
Expand Down
Loading
Loading