diff --git a/.github/workflows/build-branches.yml b/.github/workflows/build-branches.yml index da77acf9c..1a3ea4765 100644 --- a/.github/workflows/build-branches.yml +++ b/.github/workflows/build-branches.yml @@ -9,7 +9,7 @@ jobs: build-workflow: strategy: matrix: - profile: [ p231, p232, p233, p241 ] + profile: [ p231, p232, p233, p241, p242 ] uses: ./.github/workflows/build-workflow.yml with: build-profile: ${{ matrix.profile }} @@ -20,7 +20,7 @@ jobs: # plugin-verifier-workflow: # strategy: # matrix: -# profile: [ p231, p232, p233, p241 ] +# profile: [ p231, p232, p233, p241, p242 ] # uses: ./.github/workflows/plugin-verifier-workflow.yml # with: # build-profile: ${{ matrix.profile }} diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index a22f9686b..63e4cd98e 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -7,7 +7,7 @@ jobs: build-workflow: strategy: matrix: - profile: [ p231, p232, p233, p241 ] + profile: [ p231, p232, p233, p241, p242 ] uses: ./.github/workflows/build-workflow.yml with: build-profile: ${{ matrix.profile }} @@ -18,7 +18,7 @@ jobs: build-workflow-with-rider: strategy: matrix: - profile: [ p231, p232, p233, p241 ] + profile: [ p231, p232, p233, p241, p242 ] uses: ./.github/workflows/build-workflow.yml with: build-profile: ${{ matrix.profile }} @@ -31,7 +31,7 @@ jobs: needs: [ build-workflow,build-workflow-with-rider ] strategy: matrix: - profile: [ p231, p232, p233, p241 ] + profile: [ p231, p232, p233, p241, p242 ] uses: ./.github/workflows/plugin-verifier-workflow.yml with: build-profile: ${{ matrix.profile }} diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 5f2470a57..c3a6db58e 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -8,7 +8,7 @@ jobs: build-workflow: strategy: matrix: - profile: [ p231, p232, p233, p241 ] + profile: [ p231, p232, p233, p241, p242 ] uses: ./.github/workflows/build-workflow.yml with: build-profile: ${{ matrix.profile }} @@ -19,7 +19,7 @@ jobs: build-workflow-with-rider: strategy: matrix: - profile: [ p231, p232, p233, p241 ] + profile: [ p231, p232, p233, p241, p242 ] uses: ./.github/workflows/build-workflow.yml with: build-profile: ${{ matrix.profile }} @@ -31,7 +31,7 @@ jobs: needs: [ build-workflow,build-workflow-with-rider ] strategy: matrix: - profile: [ p231, p232, p233, p241 ] + profile: [ p231, p232, p233, p241, p242 ] uses: ./.github/workflows/plugin-verifier-workflow.yml with: build-profile: ${{ matrix.profile }} diff --git a/.github/workflows/publish-to-jetbrains-and-increment-version.yml b/.github/workflows/publish-to-jetbrains-and-increment-version.yml index e8aa205eb..9141ef1d0 100644 --- a/.github/workflows/publish-to-jetbrains-and-increment-version.yml +++ b/.github/workflows/publish-to-jetbrains-and-increment-version.yml @@ -13,7 +13,7 @@ jobs: publish-workflow: strategy: matrix: - profile: [ p231, p232, p233, p241 ] + profile: [ p231, p232, p233, p241, p242 ] uses: ./.github/workflows/publish-workflow.yml with: build-profile: ${{ matrix.profile }} diff --git a/build.gradle.kts b/build.gradle.kts index 8d9636213..4a24601aa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,11 +24,13 @@ plugins { } -//the platformType is determined dynamically based on other property. -//we build with IU,RD,PC,PY etc. we also runIde with different platform type. -//it enables launching different IDEs with different versions and still let the other modules -//compile correctly. most modules always compile with the same platform type. -//see method dynamicPlatformType for details. +//the platformType determines which platform we build with, it may be IC,IU,PC,PY,RD. +//it is a good way for us to test that we don't have leaking usages of classes that exist in one platform +//but don't exist in another. +//this module should be compatible with all IDEs, and thus it should build with IC,IU,RD with no issues. +//the platformType is determined dynamically based on other property, +// we have for example buildWithRider,buildWIthUltimate. +//the other modules either also build with dynamic platform type or always build with the same type. val platformType: IntelliJPlatformType by extra(dynamicPlatformType(project)) diff --git a/building-how-to/build-all-profiles-short.sh b/building-how-to/build-all-profiles-short.sh index de5567fff..572a1c506 100755 --- a/building-how-to/build-all-profiles-short.sh +++ b/building-how-to/build-all-profiles-short.sh @@ -17,3 +17,7 @@ for i in {1..5}; do echo; done echo "############ building with 241 ################" ./gradlew clean buildPlugin -PbuildProfile=p241 +for i in {1..5}; do echo; done + +echo "############ building with 242 ################" +./gradlew clean buildPlugin -PbuildProfile=p242 diff --git a/building-how-to/build-all-profiles.sh b/building-how-to/build-all-profiles.sh index 22ce69abe..87a2778c6 100755 --- a/building-how-to/build-all-profiles.sh +++ b/building-how-to/build-all-profiles.sh @@ -13,13 +13,14 @@ set -e ## check that profile aliases work ./gradlew clean buildPlugin -PbuildProfile=lowest ./gradlew clean buildPlugin -PbuildProfile=latest -#./gradlew clean buildPlugin -PbuildProfile=eap +./gradlew clean buildPlugin -PbuildProfile=eap ./gradlew clean buildPlugin -PbuildProfile=p231 ./gradlew clean buildPlugin -PbuildProfile=p232 ./gradlew clean buildPlugin -PbuildProfile=p233 ./gradlew clean buildPlugin -PbuildProfile=p241 +./gradlew clean buildPlugin -PbuildProfile=p242 ###################### idea ultimate @@ -29,6 +30,7 @@ set -e ./gradlew clean buildPlugin -PbuildWIthUltimate=true -PbuildProfile=p232 ./gradlew clean buildPlugin -PbuildWIthUltimate=true -PbuildProfile=p233 ./gradlew clean buildPlugin -PbuildWIthUltimate=true -PbuildProfile=p241 +./gradlew clean buildPlugin -PbuildWIthUltimate=true -PbuildProfile=p242 @@ -38,6 +40,7 @@ set -e ./gradlew clean buildPlugin -PbuildWithRider=true -PbuildProfile=p232 ./gradlew clean buildPlugin -PbuildWithRider=true -PbuildProfile=p233 ./gradlew clean buildPlugin -PbuildWithRider=true -PbuildProfile=p241 +./gradlew clean buildPlugin -PbuildWithRider=true -PbuildProfile=p242 ###################### pycharm @@ -46,6 +49,7 @@ set -e #./gradlew clean buildPlugin -PbuildWithPycharm=true -PbuildProfile=p232 #./gradlew clean buildPlugin -PbuildWithPycharm=true -PbuildProfile=p233 #./gradlew clean buildPlugin -PbuildWithPycharm=true -PbuildProfile=p241 +#./gradlew clean buildPlugin -PbuildWithPycharm=true -PbuildProfile=p242 ###################### pycharm pro @@ -55,4 +59,5 @@ set -e #./gradlew clean buildPlugin -PbuildWithPycharmPro=true -PbuildProfile=p232 #./gradlew clean buildPlugin -PbuildWithPycharmPro=true -PbuildProfile=p233 #./gradlew clean buildPlugin -PbuildWithPycharmPro=true -PbuildProfile=p241 +#./gradlew clean buildPlugin -PbuildWithPycharmPro=true -PbuildProfile=p242 diff --git a/building-how-to/build-and-verify-all-profiles.sh b/building-how-to/build-and-verify-all-profiles.sh index 292effaeb..28dda2f4e 100755 --- a/building-how-to/build-and-verify-all-profiles.sh +++ b/building-how-to/build-and-verify-all-profiles.sh @@ -11,14 +11,13 @@ set -e ## check that profile aliases work ./gradlew clean buildPlugin verifyPlugin -PbuildProfile=lowest ./gradlew clean buildPlugin verifyPlugin -PbuildProfile=latest -#./gradlew clean buildPlugin verifyPlugin -PbuildProfile=eap - -# todo: add 242 +./gradlew clean buildPlugin verifyPlugin -PbuildProfile=eap ./gradlew clean buildPlugin verifyPlugin -PbuildProfile=p231 ./gradlew clean buildPlugin verifyPlugin -PbuildProfile=p232 ./gradlew clean buildPlugin verifyPlugin -PbuildProfile=p233 ./gradlew clean buildPlugin verifyPlugin -PbuildProfile=p241 +./gradlew clean buildPlugin verifyPlugin -PbuildProfile=p242 ###################### idea ultimate @@ -28,6 +27,7 @@ set -e ./gradlew clean buildPlugin verifyPlugin -PbuildWIthUltimate=true -PbuildProfile=p232 ./gradlew clean buildPlugin verifyPlugin -PbuildWIthUltimate=true -PbuildProfile=p233 ./gradlew clean buildPlugin verifyPlugin -PbuildWIthUltimate=true -PbuildProfile=p241 +./gradlew clean buildPlugin verifyPlugin -PbuildWIthUltimate=true -PbuildProfile=p242 @@ -37,6 +37,7 @@ set -e ./gradlew clean buildPlugin -PbuildWithRider=true -PbuildProfile=p232 ./gradlew clean buildPlugin -PbuildWithRider=true -PbuildProfile=p233 ./gradlew clean buildPlugin -PbuildWithRider=true -PbuildProfile=p241 +./gradlew clean buildPlugin -PbuildWithRider=true -PbuildProfile=p242 ###################### pycharm @@ -45,6 +46,7 @@ set -e #./gradlew clean buildPlugin -PbuildWithPycharm=true -PbuildProfile=p232 #./gradlew clean buildPlugin -PbuildWithPycharm=true -PbuildProfile=p233 #./gradlew clean buildPlugin -PbuildWithPycharm=true -PbuildProfile=p241 +#./gradlew clean buildPlugin -PbuildWithPycharm=true -PbuildProfile=p242 ###################### pycharm pro @@ -54,4 +56,5 @@ set -e #./gradlew clean buildPlugin -PbuildWithPycharmPro=true -PbuildProfile=p232 #./gradlew clean buildPlugin -PbuildWithPycharmPro=true -PbuildProfile=p233 #./gradlew clean buildPlugin -PbuildWithPycharmPro=true -PbuildProfile=p241 +#./gradlew clean buildPlugin -PbuildWithPycharmPro=true -PbuildProfile=p242 diff --git a/building-how-to/building-how-to.txt b/building-how-to/building-how-to.txt index f2989d1fe..47906815d 100644 --- a/building-how-to/building-how-to.txt +++ b/building-how-to/building-how-to.txt @@ -55,7 +55,7 @@ add new run configurations for the new profile. as new releases come out, older versions become more difficult to maintain because of API changes or build system changes, sometimes new releases require changes in gradle build scripts that will not work with older versions. we try to keep support for as many releases as possible without too much work. if it becomes too difficult to support -older releases we can remove the oldest profiles. +older releases we can remove the oldest profile. we must support at least 2 versions plus the next EAP. to remove a profile do the revers of adding a profile. @@ -93,7 +93,7 @@ need to map the profile name to a suitable rd-gen version and also support the c profiles are declared in buildSrc/src/main/kotlin/common/BuildProfile.kt a profile holds a few properties for the project, mainly platformVersion,riderVersion and more. data class BuildProfile( - val profile: BuildProfiles.Profiles, + val profile: BuildProfiles.Profile, val platformVersion: String, val riderVersion: String, val pycharmVersion: String, diff --git a/building-how-to/verify-all-profiles-short.sh b/building-how-to/verify-all-profiles-short.sh index 046a1ec06..e86260d8d 100755 --- a/building-how-to/verify-all-profiles-short.sh +++ b/building-how-to/verify-all-profiles-short.sh @@ -17,3 +17,6 @@ for i in {1..5}; do echo; done echo "############ verifyPlugin with 241 ################" ./gradlew clean verifyPlugin -PbuildProfile=p241 + +echo "############ verifyPlugin with 242 ################" +./gradlew clean verifyPlugin -PbuildProfile=p242 diff --git a/common-build-logic/src/main/kotlin/common/BuildProfile.kt b/common-build-logic/src/main/kotlin/common/BuildProfile.kt index 33570d250..84397996b 100644 --- a/common-build-logic/src/main/kotlin/common/BuildProfile.kt +++ b/common-build-logic/src/main/kotlin/common/BuildProfile.kt @@ -71,9 +71,9 @@ fun Project.currentProfile(): BuildProfile = BuildProfiles.currentProfile(this) object BuildProfiles { - enum class Profiles { p231, p232, p233, p241, p242 } + enum class Profile { p231, p232, p233, p241, p242 } - fun Profiles.greaterThan(other:Profiles):Boolean{ + fun Profile.greaterThan(other:Profile):Boolean{ val thisNumber = this.name.substring(1).toInt() val otherNumber = other.name.substring(1).toInt() return thisNumber > otherNumber @@ -89,18 +89,18 @@ object BuildProfiles { profileToUse = profileAliases[it] as String } - Profiles.valueOf(profileToUse) + Profile.valueOf(profileToUse) - } ?: Profiles.p231 + } ?: Profile.p231 return profiles[selectedProfile] ?: throw GradleException("can not find profile $selectedProfile") } //update this list as new profiles are added or removed private val profileAliases = mapOf( - "lowest" to Profiles.p231.name, - "latest" to Profiles.p241.name, - "eap" to Profiles.p242.name, + "lowest" to Profile.p231.name, + "latest" to Profile.p241.name, + "eap" to Profile.p242.name, ) @@ -117,13 +117,18 @@ object BuildProfiles { //https://www.jetbrains.com/intellij-repository/releases/ //https://www.jetbrains.com/intellij-repository/snapshots/ + //the java and kotlin version required for each release is here: + //see https://github.com/JetBrains/intellij-platform-gradle-plugin/blob/92e4348bcc64d6b958f7fb53f043aa61719566ca/src/main/kotlin/org/jetbrains/intellij/platform/gradle/utils/PlatformJavaVersions.kt + ///see https://github.com/JetBrains/intellij-platform-gradle-plugin/blob/92e4348bcc64d6b958f7fb53f043aa61719566ca/src/main/kotlin/org/jetbrains/intellij/platform/gradle/utils/PlatformKotlinVersions.kt + + //see building-how-to/* - Profiles.p231 to BuildProfile( - profile = Profiles.p231, - platformVersion = "2023.1.6", - riderVersion = "2023.1.4", - pycharmVersion = "2023.1.5", + Profile.p231 to BuildProfile( + profile = Profile.p231, + platformVersion = "2023.1.7", + riderVersion = "2023.1.7", + pycharmVersion = "2023.1.7", riderTargetFramework = "net472", riderResharperVersionConstant = "PROFILE_2023_1", platformVersionCode = "231", @@ -133,11 +138,11 @@ object BuildProfiles { javaVersion = JavaVersion.VERSION_17.majorVersion ), - Profiles.p232 to BuildProfile( - profile = Profiles.p232, - platformVersion = "2023.2.6", - riderVersion = "2023.2.3", - pycharmVersion = "2023.2.6", + Profile.p232 to BuildProfile( + profile = Profile.p232, + platformVersion = "2023.2.7", + riderVersion = "2023.2.5", + pycharmVersion = "2023.2.7", riderTargetFramework = "net472", riderResharperVersionConstant = "PROFILE_2023_2", platformVersionCode = "232", @@ -148,12 +153,12 @@ object BuildProfiles { ), - Profiles.p233 to BuildProfile( + Profile.p233 to BuildProfile( - profile = Profiles.p233, - platformVersion = "2023.3.4", - riderVersion = "2023.3.3", - pycharmVersion = "2023.3.3", + profile = Profile.p233, + platformVersion = "2023.3.7", + riderVersion = "2023.3.6", + pycharmVersion = "2023.3.7", riderTargetFramework = "net472", riderResharperVersionConstant = "PROFILE_2023_2", platformVersionCode = "233", @@ -164,12 +169,12 @@ object BuildProfiles { ), - Profiles.p241 to BuildProfile( + Profile.p241 to BuildProfile( - profile = Profiles.p241, + profile = Profile.p241, platformVersion = "2024.1.3", - riderVersion = "2024.1.2", - pycharmVersion = "2024.1.2", + riderVersion = "2024.1.3", + pycharmVersion = "2024.1.3", riderTargetFramework = "net8.0", riderResharperVersionConstant = "PROFILE_2023_2", platformVersionCode = "241", @@ -181,16 +186,13 @@ object BuildProfiles { - //todo: probably needs java 21, see in intellij plugin PlatformJavaVersions.kt and PlatformKotlinVersions.kt - //see https://github.com/JetBrains/intellij-platform-gradle-plugin/blob/92e4348bcc64d6b958f7fb53f043aa61719566ca/src/main/kotlin/org/jetbrains/intellij/platform/gradle/utils/PlatformJavaVersions.kt - ///see https://github.com/JetBrains/intellij-platform-gradle-plugin/blob/92e4348bcc64d6b958f7fb53f043aa61719566ca/src/main/kotlin/org/jetbrains/intellij/platform/gradle/utils/PlatformKotlinVersions.kt - Profiles.p242 to BuildProfile( + Profile.p242 to BuildProfile( isEAP = true, - profile = Profiles.p242, - platformVersion = "242-EAP-SNAPSHOT", - riderVersion = "2024.2-SNAPSHOT", - pycharmVersion = "242-EAP-SNAPSHOT", + profile = Profile.p242, + platformVersion = "242.16677-EAP-CANDIDATE-SNAPSHOT", + riderVersion = "2024.2-EAP2-SNAPSHOT", + pycharmVersion = "242.16677-EAP-CANDIDATE-SNAPSHOT", riderTargetFramework = "net8.0", riderResharperVersionConstant = "PROFILE_2023_2", platformVersionCode = "242", @@ -204,17 +206,8 @@ object BuildProfiles { } -/* - * Notes: - * pythonPluginVersion: - * pythonPluginVersion is necessary when building the python module with type=IC, in that case the version needs to be compatible - * with the IC platform version. if building the python module with type=PC then pythonPluginVersion is not relevant. - * building with type=PC means more disk space in GitHub. - * currently we build python with type=PC because matching the pythonPluginVersion and latest EAP build is not always possible, - * sometimes it takes time before there is a compatible python plugin version. and anyway it's easier to just build with PC. - */ data class BuildProfile( - val profile: BuildProfiles.Profiles, + val profile: BuildProfiles.Profile, val isEAP: Boolean = false, val platformVersion: String, val riderVersion: String, diff --git a/common-build-logic/src/main/kotlin/common/rider/RiderCommon.kt b/common-build-logic/src/main/kotlin/common/rider/RiderCommon.kt index f7303ea46..4057a75d5 100644 --- a/common-build-logic/src/main/kotlin/common/rider/RiderCommon.kt +++ b/common-build-logic/src/main/kotlin/common/rider/RiderCommon.kt @@ -5,11 +5,11 @@ import common.BuildProfiles fun rdGenVersion(profile: String): String { - val profileToUse: BuildProfiles.Profiles = when (profile) { - "lowest" -> BuildProfiles.Profiles.p231 - "latest" -> BuildProfiles.Profiles.p241 - "eap" -> BuildProfiles.Profiles.p242 - else -> BuildProfiles.Profiles.valueOf(profile) + val profileToUse: BuildProfiles.Profile = when (profile) { + "lowest" -> BuildProfiles.Profile.p231 + "latest" -> BuildProfiles.Profile.p241 + "eap" -> BuildProfiles.Profile.p242 + else -> BuildProfiles.Profile.valueOf(profile) } return rdGenVersionByProfile(profileToUse) @@ -17,12 +17,12 @@ fun rdGenVersion(profile: String): String { } -fun rdGenVersionByProfile(profile: BuildProfiles.Profiles): String { +fun rdGenVersionByProfile(profile: BuildProfiles.Profile): String { return when (profile) { - BuildProfiles.Profiles.p231 -> "2023.2.0" - BuildProfiles.Profiles.p232 -> "2023.2.2" - BuildProfiles.Profiles.p233 -> "2023.3.2" - BuildProfiles.Profiles.p241 -> "2023.3.2" - BuildProfiles.Profiles.p242 -> "2024.1.1" + BuildProfiles.Profile.p231 -> "2023.2.0" + BuildProfiles.Profile.p232 -> "2023.2.2" + BuildProfiles.Profile.p233 -> "2023.3.2" + BuildProfiles.Profile.p241 -> "2023.3.2" + BuildProfiles.Profile.p242 -> "2024.1.1" } } \ No newline at end of file diff --git a/gradle-support/build.gradle.kts b/gradle-support/build.gradle.kts index edc6447dd..56a53accf 100644 --- a/gradle-support/build.gradle.kts +++ b/gradle-support/build.gradle.kts @@ -6,8 +6,19 @@ plugins { id("plugin-library") } -//this module should always build with IC or IU -val platformType: IntelliJPlatformType by extra(dynamicPlatformType(project)) +//todo: modules that need to build with Idea can always use IC , there is no real need to build with IU +//this module should always build with IC or IU. +//if building with buildWithRider=true then this module should not use the dynamic type. +// it should use the dynamic type only when building with buildWIthUltimate=true +//platformType impacts project.platformVersion() so it must be accurate. +val platformType: IntelliJPlatformType by extra { + if (dynamicPlatformType(project) == IntelliJPlatformType.IntellijIdeaUltimate){ + IntelliJPlatformType.IntellijIdeaUltimate + }else{ + IntelliJPlatformType.IntellijIdeaCommunity + } +} + dependencies { diff --git a/ide-common/build.gradle.kts b/ide-common/build.gradle.kts index 06f2483fb..8d89e9fa1 100644 --- a/ide-common/build.gradle.kts +++ b/ide-common/build.gradle.kts @@ -7,8 +7,10 @@ plugins { id("plugin-library") } -//ide-common module should build with different platform types, if running rider with runIde it should -// build with RD, if running idea it should build with IC, etc. +//ide-common module should build with different platform types, if running rider with runIde or building +// with buildWithRider=true it should build with RD, +// if running ultimate or building with buildWIthUltimate=true it should build with IU, etc. +//the default is to build with IC val platformType: IntelliJPlatformType by extra(dynamicPlatformType(project)) diff --git a/jvm-common/build.gradle.kts b/jvm-common/build.gradle.kts index 463b1edf2..8bc2dd5f5 100644 --- a/jvm-common/build.gradle.kts +++ b/jvm-common/build.gradle.kts @@ -1,3 +1,5 @@ +import common.BuildProfiles +import common.currentProfile import common.dynamicPlatformType import common.platformVersion import de.undercouch.gradle.tasks.download.Download @@ -8,9 +10,18 @@ plugins { id("plugin-library") } -//jvm module should always build with IC or IU -val platformType: IntelliJPlatformType by extra(dynamicPlatformType(project)) - +//todo: modules that need to build with Idea can always use IC , there is no real need to build with IU +//this module should always build with IC or IU. +//if building with buildWithRider=true then this module should not use the dynamic type. +// it should use the dynamic type only when building with buildWIthUltimate=true +//platformType impacts project.platformVersion() so it must be accurate. +val platformType: IntelliJPlatformType by extra { + if (dynamicPlatformType(project) == IntelliJPlatformType.IntellijIdeaUltimate){ + IntelliJPlatformType.IntellijIdeaUltimate + }else{ + IntelliJPlatformType.IntellijIdeaCommunity + } +} dependencies { compileOnly(project(":ide-common")) @@ -29,7 +40,16 @@ dependencies { } bundledPlugin("com.intellij.java") - bundledPlugin("org.jetbrains.kotlin") + + //there is an issue with plugin verifier that prevents using bundledPlugin("org.jetbrains.kotlin") for 242. + //https://youtrack.jetbrains.com/issue/MP-6594 + //until this issue is fixed we use a direct dependency on kotlin plugin, which is not the best but works. + //todo: the dependency is on a version that i'm not sure compatible with 242 + if (project.currentProfile().profile > BuildProfiles.Profile.p241){ + plugin("org.jetbrains.kotlin","232-1.9.24-release-822-IJ10072.27") + }else{ + bundledPlugin("org.jetbrains.kotlin") + } } } diff --git a/jvm-common/src/main/kotlin/org/digma/intellij/plugin/idea/psi/discovery/endpoint/KtorFrameworkEndpointDiscovery.kt b/jvm-common/src/main/kotlin/org/digma/intellij/plugin/idea/psi/discovery/endpoint/KtorFrameworkEndpointDiscovery.kt index 337955902..cae6b9b79 100644 --- a/jvm-common/src/main/kotlin/org/digma/intellij/plugin/idea/psi/discovery/endpoint/KtorFrameworkEndpointDiscovery.kt +++ b/jvm-common/src/main/kotlin/org/digma/intellij/plugin/idea/psi/discovery/endpoint/KtorFrameworkEndpointDiscovery.kt @@ -74,7 +74,7 @@ class KtorFrameworkEndpointDiscovery(private val project: Project) : EndpointDis val declarations = runInReadAccessInSmartModeWithResultAndRetryIgnorePCE(project) { //todo: maybe cache the declarations, maybe in SmartElementPointer - val declarations = KotlinTopLevelFunctionFqnNameIndex.get(fqName, project, GlobalSearchScope.allScope(project)) + val declarations = KotlinTopLevelFunctionFqnNameIndex[fqName, project, GlobalSearchScope.allScope(project)] declarations.filter { ktNamedFunction: KtNamedFunction -> ktNamedFunction.containingKtFile.isCompiled } } diff --git a/maven-support/build.gradle.kts b/maven-support/build.gradle.kts index e88d8eeaa..77581453b 100644 --- a/maven-support/build.gradle.kts +++ b/maven-support/build.gradle.kts @@ -6,8 +6,18 @@ plugins { id("plugin-library") } -//this module should always build with IC or IU -val platformType: IntelliJPlatformType by extra(dynamicPlatformType(project)) +//todo: modules that need to build with Idea can always use IC , there is no real need to build with IU +//this module should always build with IC or IU. +//if building with buildWithRider=true then this module should not use the dynamic type. +// it should use the dynamic type only when building with buildWIthUltimate=true +//platformType impacts project.platformVersion() so it must be accurate. +val platformType: IntelliJPlatformType by extra { + if (dynamicPlatformType(project) == IntelliJPlatformType.IntellijIdeaUltimate){ + IntelliJPlatformType.IntellijIdeaUltimate + }else{ + IntelliJPlatformType.IntellijIdeaCommunity + } +} dependencies { diff --git a/python/build.gradle.kts b/python/build.gradle.kts index f4fe67e9d..01511d244 100644 --- a/python/build.gradle.kts +++ b/python/build.gradle.kts @@ -8,7 +8,15 @@ plugins { } //this module should always build with PC or PY -val platformType: IntelliJPlatformType by extra(dynamicPlatformType(project)) +//if building with buildWithRider=true then this module should not use the dynamic type, only +// when building with buildWithPycharmPro=true +val platformType: IntelliJPlatformType by extra { + if (dynamicPlatformType(project) == IntelliJPlatformType.PyCharmProfessional){ + IntelliJPlatformType.PyCharmProfessional + }else{ + IntelliJPlatformType.PyCharmCommunity + } +} dependencies { diff --git a/rider/build.gradle.kts b/rider/build.gradle.kts index 06df6759c..894a7f421 100644 --- a/rider/build.gradle.kts +++ b/rider/build.gradle.kts @@ -164,7 +164,7 @@ tasks { val tokens = mutableMapOf() //up to p233 the version should be 4.0.0, and 4.3.0 after p233 - val traceSourceVersion = if(project.currentProfile().profile.greaterThan(BuildProfiles.Profiles.p233)){ + val traceSourceVersion = if(project.currentProfile().profile.greaterThan(BuildProfiles.Profile.p233)){ "4.3.0" }else{ "4.0.0" diff --git a/src/main/resources/META-INF/org.digma.intellij-with-rider.xml b/src/main/resources/META-INF/org.digma.intellij-with-rider.xml index ed70287d8..48fdfac13 100644 --- a/src/main/resources/META-INF/org.digma.intellij-with-rider.xml +++ b/src/main/resources/META-INF/org.digma.intellij-with-rider.xml @@ -1,7 +1,5 @@ - rider.intellij.plugin.appender -