From 73573d3e02729a6390acf9bcc7eb1534ea59dad7 Mon Sep 17 00:00:00 2001 From: Mikhail Shagvaliev Date: Thu, 23 Nov 2023 01:04:32 +0100 Subject: [PATCH] :bug: Disable project opening via activities flag #216 (QD-7787) - in qodana we don't open project via activities, flag must be enabled when we would want to do that - see in intellij f036cf057bed40c54545826909e27f090667af06 com.jetbrains.python.sdk.PythonSdkUpdater#dropUpdaterInHeadless --- core/core_test.go | 6 ++++-- core/properties.go | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/core_test.go b/core/core_test.go index 40525ad2..cbd95316 100644 --- a/core/core_test.go +++ b/core/core_test.go @@ -1134,6 +1134,7 @@ func TestQodanaOptions_RequiresToken(t *testing.T) { func propertiesFixture(enableStats bool, additionalProperties []string) []string { properties := []string{ "-Dfus.internal.reduce.initial.delay=true", + "-Dide.warmup.use.predicates=false", fmt.Sprintf("-Didea.application.info.value=%s", filepath.Join(os.TempDir(), "entrypoint", "QodanaAppInfo.xml")), "-Didea.class.before.app=com.jetbrains.rider.protocol.EarlyBackendStarter", fmt.Sprintf("-Didea.config.path=%s", filepath.Join(os.TempDir(), "entrypoint")), @@ -1264,7 +1265,7 @@ func Test_Properties(t *testing.T) { }, { name: "override options from CLI, YAML should be ignored", - cliProperties: []string{"-Dfus.internal.reduce.initial.delay=false", "-Didea.application.info.value=0", "idea.headless.enable.statistics=false"}, + cliProperties: []string{"-Dfus.internal.reduce.initial.delay=false", "-Dide.warmup.use.predicates=true", "-Didea.application.info.value=0", "idea.headless.enable.statistics=false"}, qodanaYaml: "" + "version: \"1.0\"\n" + "properties:\n" + @@ -1273,8 +1274,9 @@ func Test_Properties(t *testing.T) { isContainer: false, expected: append([]string{ "-Dfus.internal.reduce.initial.delay=false", + "-Dide.warmup.use.predicates=true", "-Didea.application.info.value=0", - }, propertiesFixture(false, []string{})[2:]...), + }, propertiesFixture(false, []string{})[3:]...), }, } { t.Run(tc.name, func(t *testing.T) { diff --git a/core/properties.go b/core/properties.go index e54a4e6c..dcefece0 100644 --- a/core/properties.go +++ b/core/properties.go @@ -64,7 +64,8 @@ func getPropertiesMap( "-Didea.application.info.value": quoteIfSpace(appInfoXml), "-Didea.log.path": quoteIfSpace(logDir), "-Didea.qodana.thirdpartyplugins.accept": "true", - "-Dqodana.automation.guid": quoteIfSpace(analysisId), + "-Dqodana.automation.guid": QuoteIfSpace(analysisId), + "-Dide.warmup.use.predicates": "false", "-XX:SoftRefLRUPolicyMSPerMB": "50", "-XX:MaxJavaStackTraceDepth": "10000",