Skip to content

Commit 4edde46

Browse files
authored
updating platform version to 2025.1 (bazelbuild#7234)
updating platform version to 2025.1
1 parent 0d97ae9 commit 4edde46

File tree

48 files changed

+1180
-412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1180
-412
lines changed

MODULE.bazel

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,18 @@ http_archive(
184184
url = IC_243_URL,
185185
)
186186

187+
# The plugin api for intellij_ce_2025_1. This is required to build IJwB and run integration tests.
188+
IC_251_SHA = "86dd6617de5054dfbe2150bb005c4739c833adc1fee437d87e698eac03cf15dc"
189+
190+
IC_251_URL = "https://www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/idea/ideaIC/251.14649.49-EAP-SNAPSHOT/ideaIC-251.14649.49-EAP-SNAPSHOT.zip"
191+
192+
http_archive(
193+
name = "intellij_ce_2025_1",
194+
build_file = "@//intellij_platform_sdk:BUILD.idea251",
195+
sha256 = IC_251_SHA,
196+
url = IC_251_URL,
197+
)
198+
187199
IU_242_SHA = "6374538aeb34376c7501819b19804a30ee4a49547b5bfe3aa4aa80735191324e"
188200

189201
IU_242_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIU/2024.2.5/ideaIU-2024.2.5.zip"
@@ -206,6 +218,18 @@ http_archive(
206218
url = IU_243_URL,
207219
)
208220

221+
# The plugin api for intellij_ce_2025_1. This is required to build IJwB and run integration tests.
222+
IU_251_SHA = "c151b4ee53182b10bca4c8849f76960c4f7f27b41904f4f243858cb982fa3760"
223+
224+
IU_251_URL = "https://www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/idea/ideaIU/251.14649.49-EAP-SNAPSHOT/ideaIU-251.14649.49-EAP-SNAPSHOT.zip"
225+
226+
http_archive(
227+
name = "intellij_ue_2025_1",
228+
build_file = "@//intellij_platform_sdk:BUILD.ue251",
229+
sha256 = IU_251_SHA,
230+
url = IU_251_URL,
231+
)
232+
209233
CLION_242_SHA = "27029107088193b6ba0d3d888ce67fcdd1aae68f324c4c6ddadfdd4c3c90b87e"
210234

211235
CLION_242_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/clion/clion/2024.2.4/clion-2024.2.4.zip"
@@ -228,6 +252,17 @@ http_archive(
228252
url = CLION_243_URL,
229253
)
230254

255+
CLION_251_SHA = "1a8dcdafb91f4ed442f28ca7871562249c31452574a6493207755908dd56eab1"
256+
257+
CLION_251_URL = "https://www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/clion/clion/251-EAP-SNAPSHOT/clion-251-EAP-SNAPSHOT.zip"
258+
259+
http_archive(
260+
name = "clion_2025_1",
261+
build_file = "@//intellij_platform_sdk:BUILD.clion251",
262+
sha256 = CLION_251_SHA,
263+
url = CLION_251_URL,
264+
)
265+
231266
DEVKIT_BUILD_FILE = """
232267
java_import(
233268
name = "devkit",
@@ -258,6 +293,17 @@ http_archive(
258293
url = DEVKIT_243_URL,
259294
)
260295

296+
DEVKIT_251_SHA = "d7e48245cb09607204d6b31347c982b7a3cf74c3b112406252e950eea63bcf7b"
297+
298+
DEVKIT_251_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/DevKit/251.14649.49/DevKit-251.14649.49.zip"
299+
300+
http_archive(
301+
name = "devkit_2025_1",
302+
build_file_content = DEVKIT_BUILD_FILE,
303+
sha256 = DEVKIT_251_SHA,
304+
url = DEVKIT_251_URL,
305+
)
306+
261307
_PYTHON_CE_BUILD_FILE = """
262308
java_import(
263309
name = "python",
@@ -293,6 +339,17 @@ http_archive(
293339
url = PYTHON_PLUGIN_243_URL,
294340
)
295341

342+
PYTHON_PLUGIN_251_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/PythonCore/251.14649.49/PythonCore-251.14649.49.zip"
343+
344+
PYTHON_PLUGIN_251_SHA = "2dbe044e1f7cec4368d927f59962b0916e3d4ba06b3a6100114ccad386ad1636"
345+
346+
http_archive(
347+
name = "python_2025_1",
348+
build_file_content = _PYTHON_CE_BUILD_FILE,
349+
sha256 = PYTHON_PLUGIN_251_SHA,
350+
url = PYTHON_PLUGIN_251_URL,
351+
)
352+
296353
_GO_BUILD_FILE = """
297354
java_import(
298355
name = "go",
@@ -323,6 +380,17 @@ http_archive(
323380
url = GO_PLUGIN_243_URL,
324381
)
325382

383+
GO_PLUGIN_251_SHA = "e481abb6d206d420bc3eb5d362af02c1f9d28800012f0700a2ca04941f8471ad"
384+
385+
GO_PLUGIN_251_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.jetbrains.plugins.go/251.14649.49/org.jetbrains.plugins.go-251.14649.49.zip"
386+
387+
http_archive(
388+
name = "go_2025_1",
389+
build_file_content = _GO_BUILD_FILE,
390+
sha256 = GO_PLUGIN_251_SHA,
391+
url = GO_PLUGIN_251_URL,
392+
)
393+
326394
_SCALA_BUILD_FILE = """
327395
java_import(
328396
name = "scala",
@@ -353,6 +421,17 @@ http_archive(
353421
url = SCALA_PLUGIN_243_URL,
354422
)
355423

424+
SCALA_PLUGIN_251_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.intellij.scala/2025.1.1/org.intellij.scala-2025.1.1.zip"
425+
426+
SCALA_PLUGIN_251_SHA = "bfec18cc757a908fb21e646c7d110ee9386b116a596a7ad982aaedbaa90b3817"
427+
428+
http_archive(
429+
name = "scala_2025_1",
430+
build_file_content = _SCALA_BUILD_FILE,
431+
sha256 = SCALA_PLUGIN_251_SHA,
432+
url = SCALA_PLUGIN_251_URL,
433+
)
434+
356435
_TOML_BUILD_FILE = """
357436
java_import(
358437
name = "toml",
@@ -384,6 +463,17 @@ http_archive(
384463
url = TOML_PLUGIN_243_URL,
385464
)
386465

466+
TOML_PLUGIN_251_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.toml.lang/251.14649.45/org.toml.lang-251.14649.45.zip"
467+
468+
TOML_PLUGIN_251_SHA = "a5a717340ed02d913902445aa88c472dcd6bccc2a8fa3c3ef871d1b93568cf1a"
469+
470+
http_archive(
471+
name = "toml_2025_1",
472+
build_file_content = _TOML_BUILD_FILE,
473+
sha256 = TOML_PLUGIN_251_SHA,
474+
url = TOML_PLUGIN_251_URL,
475+
)
476+
387477
# needed for cpp tests
388478
http_archive(
389479
name = "com_google_absl",

clwb/clwb.bazelproject

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ targets:
1212
workspace_type: intellij_plugin
1313

1414
build_flags:
15-
--define=ij_product=clion-latest
15+
--define=ij_product=clion-oss-under-dev
1616

1717
test_sources:
1818
*/tests/unittests*

clwb/sdkcompat/BUILD

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")
1516
load(
1617
"//intellij_platform_sdk:build_defs.bzl",
1718
"select_for_plugin_api",
1819
)
19-
load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")
2020

2121
kt_jvm_library(
2222
name = "sdkcompat",
2323
srcs = select_for_plugin_api({
2424
"clion-2024.2": ["//clwb/sdkcompat/v242"],
2525
"clion-2024.3": ["//clwb/sdkcompat/v243"],
26+
"clion-2025.1": ["//clwb/sdkcompat/v251"],
2627
}),
2728
visibility = ["//clwb:__pkg__"],
2829
deps = [

clwb/sdkcompat/v251/BUILD

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2024 The Bazel Authors. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
filegroup(
16+
name = "v251",
17+
srcs = glob([
18+
"**/*.java",
19+
"**/*.kt",
20+
]),
21+
visibility = ["//clwb/sdkcompat:__pkg__"],
22+
)
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
/*
2+
* Copyright 2023 The Bazel Authors. All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.google.idea.blaze.clwb
17+
18+
import com.google.idea.blaze.base.lang.buildfile.language.BuildFileType
19+
import com.google.idea.blaze.base.settings.Blaze
20+
import com.google.idea.blaze.base.wizard2.BazelImportCurrentProjectAction
21+
import com.google.idea.blaze.base.wizard2.BazelNotificationProvider
22+
import com.intellij.openapi.Disposable
23+
import com.intellij.openapi.actionSystem.AnAction
24+
import com.intellij.openapi.actionSystem.AnActionEvent
25+
import com.intellij.openapi.actionSystem.DataContext
26+
import com.intellij.openapi.application.readAction
27+
import com.intellij.openapi.components.Service
28+
import com.intellij.openapi.components.service
29+
import com.intellij.openapi.extensions.LoadingOrder
30+
import com.intellij.openapi.project.Project
31+
import com.intellij.openapi.vfs.VirtualFile
32+
import com.intellij.ui.EditorNotificationProvider
33+
import com.jetbrains.cidr.lang.daemon.OCFileScopeProvider.Companion.getProjectSourceLocationKind
34+
import com.jetbrains.cidr.project.ui.convertStatus
35+
import com.jetbrains.cidr.project.ui.isProjectAwareFile
36+
import com.jetbrains.cidr.project.ui.notifications.EditorNotificationWarningProvider
37+
import com.jetbrains.cidr.project.ui.notifications.ProjectNotification
38+
import com.jetbrains.cidr.project.ui.popup.ProjectFixesProvider
39+
import com.jetbrains.cidr.project.ui.widget.*
40+
41+
private fun isBazelAwareFile(project: Project, file: VirtualFile): Boolean {
42+
if (Blaze.isBlazeProject(project)) {
43+
return false
44+
}
45+
46+
if (!isProjectAwareFile(file, project) && file.fileType !== BuildFileType.INSTANCE) {
47+
return false
48+
}
49+
50+
if (getProjectSourceLocationKind(project, file).isInProject()) {
51+
return false
52+
}
53+
54+
if (!BazelImportCurrentProjectAction.projectCouldBeImported(project)) {
55+
return false
56+
}
57+
58+
return project.basePath != null
59+
}
60+
61+
// #api242
62+
@Service(Service.Level.APP)
63+
class CLionNotificationProvider : ProjectFixesProvider, WidgetStatusProvider, EditorNotificationWarningProvider,
64+
Disposable.Default {
65+
66+
companion object {
67+
@JvmStatic
68+
fun register(project: Project) {
69+
service<CLionNotificationProvider>().unregisterGenericProvider(project)
70+
}
71+
}
72+
73+
init {
74+
registerSpecificProvider();
75+
}
76+
77+
private fun registerSpecificProvider() {
78+
val projectFixes = ProjectFixesProvider.Companion.EP_NAME.point
79+
projectFixes.registerExtension(this, this)
80+
81+
val projectNotifications = EditorNotificationWarningProvider.EP_NAME.point
82+
projectNotifications.registerExtension(this, this)
83+
84+
val widgetStatus = WidgetStatusProvider.EP_NAME.point
85+
widgetStatus.registerExtension(this, this)
86+
}
87+
88+
private fun unregisterGenericProvider(project: Project) {
89+
val extensionPoint = EditorNotificationProvider.EP_NAME.getPoint(project)
90+
91+
// Note: We need to remove the default style of showing project status and fixes used in
92+
// Android Studio and IDEA to introduce CLion's PSW style.
93+
for (extension in extensionPoint.extensions) {
94+
if (extension is BazelNotificationProvider) {
95+
extensionPoint.unregisterExtension(extension)
96+
}
97+
}
98+
}
99+
100+
override suspend fun collectFixes(project: Project, file: VirtualFile?, dataContext: DataContext): List<AnAction> {
101+
if (file == null) {
102+
return emptyList()
103+
}
104+
105+
val isBazelFile = readAction { isBazelAwareFile(project, file) }
106+
if (!isBazelFile) {
107+
return emptyList()
108+
}
109+
110+
return listOf(ImportBazelAction(project.basePath ?: return emptyList()))
111+
}
112+
113+
private class ImportBazelAction(private val root: String) : AnAction("Import Bazel project") {
114+
override fun actionPerformed(anActionEvent: AnActionEvent) {
115+
BazelImportCurrentProjectAction.createAction(root).run()
116+
}
117+
}
118+
119+
override fun getProjectNotification(project: Project, virtualFile: VirtualFile): ProjectNotification? {
120+
return convertStatus(getWidgetStatus(project, virtualFile))
121+
}
122+
123+
override fun getWidgetStatus(project: Project, file: VirtualFile?): WidgetStatus? {
124+
if (Blaze.isBlazeProject(project)) {
125+
return DefaultWidgetStatus(Status.OK, Scope.Project, "Project is configured")
126+
}
127+
128+
if (file == null || !isBazelAwareFile(project, file)) {
129+
return null
130+
}
131+
132+
return DefaultWidgetStatus(Status.Warning, Scope.Project, "Project is not configured")
133+
}
134+
}

ijwb/ijwb.bazelproject

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ targets:
1414
workspace_type: intellij_plugin
1515

1616
build_flags:
17-
--define=ij_product=intellij-2024.3
17+
--define=ij_product=intellij-ue-2025.1
1818

1919
test_sources:
2020
*/tests/unittests*

0 commit comments

Comments
 (0)