Skip to content

Commit 25aeb23

Browse files
authored
CM-59286: remove sentry and update cli version (#93)
1 parent dcab662 commit 25aeb23

16 files changed

Lines changed: 16 additions & 178 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ jobs:
9595
if: ${{ github.event_name == 'workflow_dispatch' }}
9696
env:
9797
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
98-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
9998
run: ./gradlew publishPlugin
10099

101100
# test:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.DS_Store
22
.gradle
33
.idea
4+
.intellijPlatform
45
.env
56
build
67

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
## [Unreleased]
66

7+
- Remove Sentry error tracking
8+
- Update required CLI version to 3.9.2
9+
710
## [3.0.0] - 2025-11-18
811

912
- Add support for IDEs 2025.3

build.gradle.kts

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import org.jetbrains.changelog.Changelog
22
import org.jetbrains.changelog.markdownToHTML
3+
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
34

45
fun properties(key: String) = providers.gradleProperty(key)
56
fun environment(key: String) = providers.environmentVariable(key)
@@ -10,7 +11,6 @@ plugins {
1011
alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin
1112
alias(libs.plugins.changelog) // Gradle Changelog Plugin
1213
alias(libs.plugins.kover) // Gradle Kover Plugin
13-
alias(libs.plugins.sentry)
1414
}
1515

1616
group = properties("pluginGroup").get()
@@ -36,7 +36,11 @@ dependencies {
3636
// Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
3737
// Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
3838
bundledPlugin("com.intellij.java")
39+
40+
testFramework(TestFrameworkType.Platform)
3941
}
42+
43+
testImplementation("junit:junit:4.13.2")
4044
}
4145

4246
// Set the JVM language level used to build the project. We are using Java 17 for 2022.2+.
@@ -125,28 +129,15 @@ changelog {
125129
}
126130

127131
// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
128-
koverReport {
129-
defaults {
130-
xml {
131-
onCheck = true
132+
kover {
133+
// Disable Kover instrumentation for tests to avoid conflicts with IntelliJ Platform test framework
134+
currentProject {
135+
instrumentation {
136+
disabledForTestTasks.add("test")
132137
}
133138
}
134139
}
135140

136-
// Configure Sentry
137-
sentry {
138-
includeDependenciesReport = false
139-
140-
// Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
141-
// This enables source context, allowing you to see your source
142-
// code as part of your stack traces in Sentry.
143-
includeSourceContext = true
144-
145-
org = "cycode"
146-
projectName = "intellij-platform-plugin"
147-
authToken = environment("SENTRY_AUTH_TOKEN")
148-
}
149-
150141
tasks {
151142
wrapper {
152143
gradleVersion = properties("gradleVersion").get()
@@ -180,5 +171,4 @@ val runIdeForUiTests by intellijPlatformTesting.runIde.registering {
180171

181172
tasks.named("publishPlugin") {
182173
dependsOn("patchChangelog")
183-
dependsOn("sentryUploadSourceBundleJava")
184174
}

gradle/libs.versions.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ dokka = "1.9.20"
99
kotlin = "2.2.0"
1010
changelog = "2.2.1"
1111
gradleIntelliJPlugin = "2.10.4"
12-
kover = "0.7.3"
13-
sentry = "4.11.0"
12+
kover = "0.9.0"
1413

1514
[libraries]
1615
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
@@ -23,4 +22,3 @@ dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
2322
gradleIntelliJPlugin = { id = "org.jetbrains.intellij.platform", version.ref = "gradleIntelliJPlugin" }
2423
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
2524
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
26-
sentry = { id = "io.sentry.jvm.gradle", version.ref = "sentry" }
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.cycode.plugin
22

3-
import com.cycode.plugin.utils.getPluginVersion
43
import com.intellij.openapi.application.PathManager
54
import com.intellij.openapi.util.SystemInfo
65

@@ -17,17 +16,11 @@ private fun getDefaultCliPath(): String {
1716
return "${Consts.PLUGIN_PATH}/cycode"
1817
}
1918

20-
private fun getSentryReleaseVersion(): String {
21-
val appName = CycodeBundle.message("appName")
22-
val version = getPluginVersion()
23-
return "$appName@${version}"
24-
}
25-
2619
class Consts {
2720
companion object {
2821
val PLUGIN_PATH = PathManager.getPluginsPath() + "/cycode-intellij-platform-plugin"
2922
val DEFAULT_CLI_PATH = getDefaultCliPath()
30-
const val REQUIRED_CLI_VERSION = "3.6.0"
23+
const val REQUIRED_CLI_VERSION = "3.9.2"
3124

3225
const val CYCODE_DOMAIN = "cycode.com"
3326

@@ -38,12 +31,5 @@ class Consts {
3831

3932
const val PLUGIN_AUTO_SAVE_FLUSH_INITIAL_DELAY_SEC = 0L
4033
const val PLUGIN_AUTO_SAVE_FLUSH_DELAY_SEC = 5L
41-
42-
const val SENTRY_DSN = "https://0f0524e8d03a4283702a10ed4b6e03d0@o1026942.ingest.us.sentry.io/4507543885774848"
43-
const val SENTRY_DEBUG = false
44-
val SENTRY_RELEASE = getSentryReleaseVersion()
45-
const val SENTRY_SAMPLE_RATE = 1.0
46-
const val SENTRY_SEND_DEFAULT_PII = false
47-
const val SENTRY_ENABLE_UNCAUGHT_EXCEPTION_HANDLER = false
4834
}
4935
}

src/main/kotlin/com/cycode/plugin/activities/PostStartupActivity.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
package com.cycode.plugin.activities
22

33
import com.cycode.plugin.annotators.CycodeAnnotator
4-
import com.cycode.plugin.sentry.SentryInit
54
import com.cycode.plugin.services.cycode
65
import com.intellij.openapi.diagnostic.thisLogger
76
import com.intellij.openapi.project.Project
87
import com.intellij.openapi.startup.StartupActivity
98

109
class PostStartupActivity : StartupActivity.DumbAware {
1110
override fun runActivity(project: Project) {
12-
SentryInit.init()
13-
1411
// we are using singleton here because runActivity is called for each project
1512
CycodeAnnotator.INSTANCE.registerForAllLangs()
1613

src/main/kotlin/com/cycode/plugin/cli/CliWrapper.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import com.intellij.execution.process.ProcessOutputTypes
1515
import com.intellij.openapi.diagnostic.thisLogger
1616
import com.intellij.openapi.util.Key
1717
import com.intellij.util.io.BaseOutputReader
18-
import io.sentry.Sentry
1918
import java.io.File
2019
import java.nio.charset.Charset
2120

@@ -108,7 +107,6 @@ class CliWrapper(val workDirectory: String? = null) {
108107
val result: CliError = mapper.readValue(stdout)
109108
return CliResult.Error(result)
110109
} catch (e: Exception) {
111-
Sentry.captureException(e)
112110
thisLogger().error("Failed to parse ANY CLI output: $stdout", e)
113111
}
114112

src/main/kotlin/com/cycode/plugin/sentry/SentryErrorReporter.kt

Lines changed: 0 additions & 78 deletions
This file was deleted.

src/main/kotlin/com/cycode/plugin/sentry/SentryInit.kt

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)