Unverified Commit 5776198f authored by Thomas Gerbet's avatar Thomas Gerbet Committed by GitHub
Browse files

Merge pull request #275418 from ShadowRZ/shadowrz/idea-pycharm-community-2023.3.1

jetbrains.{idea,pycharm}-community-src: 2023.2.2 -> 2023.3.2
parents a5845db5 21d257ee
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/sbom/SoftwareBillOfMaterialsImpl.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/sbom/SoftwareBillOfMaterialsImpl.kt
@@ -162,6 +162,8 @@
   }
 
   override suspend fun generate() {
+    Span.current().addEvent("SBOM generation are unavaliable due to requiring internet, skipping")
+    return
     val skipReason = when {
       !context.shouldBuildDistributions() -> "No distribution was built"
       documentNamespace == null -> "Document namespace isn't specified"
+35 −10
Original line number Diff line number Diff line
@@ -39,6 +39,17 @@
+    return Path.of("MAVEN_PATH_HERE")
   }
 }
--- a/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/BuildDependenciesDownloader.kt
+++ b/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/BuildDependenciesDownloader.kt
@@ -70,7 +70,7 @@
                              version: String,
                              classifier: String?,
                              packaging: String): URI {
-    val base = mavenRepository.trim('/')
+    val base = mavenRepository.trimEnd('/')
     val groupStr = groupId.replace('.', '/')
     val classifierStr = if (classifier != null) "-${classifier}" else ""
     return URI.create("${base}/${groupStr}/${artifactId}/${version}/${artifactId}-${version}${classifierStr}.${packaging}")
--- a/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt
+++ b/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt
@@ -25,11 +25,7 @@
@@ -56,21 +67,35 @@
       jdkExtracted.resolve("Contents").resolve("Home")
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/LinuxDistributionCustomizer.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/LinuxDistributionCustomizer.kt
@@ -43,12 +43,12 @@
@@ -46,7 +46,7 @@
   /**
    * If `true` a separate *-no-jbr.tar.gz artifact without runtime will be produced.
    * If `true`, a separate *[org.jetbrains.intellij.build.impl.LinuxDistributionBuilder.NO_RUNTIME_SUFFIX].tar.gz artifact without a runtime will be produced.
    */
-  var buildTarGzWithoutBundledRuntime = false
+  var buildTarGzWithoutBundledRuntime = true
 
   /**
    * If `true`, the only *-no-jbr.tar.gz will be produced, no other binaries for Linux will be built.
    */
-  var buildOnlyBareTarGz = false
+  var buildOnlyBareTarGz = true
-  var buildArtifactWithoutRuntime = false
+  var buildArtifactWithoutRuntime = true
 
   /**
    * Set both properties if a .snap package should be produced.
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/LinuxDistributionBuilder.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/LinuxDistributionBuilder.kt
@@ -45,7 +45,7 @@
       withContext(Dispatchers.IO) {
         val distBinDir = targetPath.resolve("bin")
         val sourceBinDir = context.paths.communityHomeDir.resolve("bin/linux")
-        copyFileToDir(NativeBinaryDownloader.downloadRestarter(context = context, os = OsFamily.LINUX, arch = arch), distBinDir)
+        copyFileToDir(sourceBinDir.resolve("${arch.dirName}/restarter"), distBinDir)
         copyFileToDir(sourceBinDir.resolve("${arch.dirName}/fsnotifier"), distBinDir)
         copyFileToDir(sourceBinDir.resolve("${arch.dirName}/libdbm.so"), distBinDir)
         generateBuildTxt(context, targetPath)
@@ -85,6 +85,8 @@
         }
       }
 
+      return@executeStep
+
       val runtimeDir = context.bundledRuntime.extract(os = OsFamily.LINUX, arch = arch)
       updateExecutablePermissions(runtimeDir, executableFileMatchers)
       val tarGzPath = buildTarGz(arch = arch, runtimeDir = runtimeDir, unixDistPath = osAndArchSpecificDistPath, suffix = suffix(arch))
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/brokenPlugins.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/brokenPlugins.kt
@@ -11,6 +11,7 @@
+0 −41
Original line number Diff line number Diff line
--- a/python/build/src/PyCharmCommunityInstallersBuildTarget.kt
+++ b/python/build/src/PyCharmCommunityInstallersBuildTarget.kt
@@ -2,9 +2,11 @@
 
 import kotlinx.coroutines.Dispatchers
 import kotlinx.coroutines.runBlocking
+import org.jetbrains.intellij.build.BuildOptions
 import org.jetbrains.intellij.build.BuildTasks
 import org.jetbrains.intellij.build.IdeaProjectLoaderUtil
 import org.jetbrains.intellij.build.impl.BuildContextImpl
+import org.jetbrains.intellij.build.pycharm.PyCharmBuildUtils
 import org.jetbrains.intellij.build.pycharm.PyCharmCommunityProperties
 
 // Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
@@ -12,13 +14,26 @@
   @JvmStatic
   fun main(args: Array<String>) {
     runBlocking(Dispatchers.Default) {
+      val options = BuildOptions().apply {
+        // we cannot provide consistent build number for PyCharm Community if it's built separately so use *.SNAPSHOT number to avoid confusion
+        buildNumber = null
+
+        // do not bother external users about clean/incremental
+        // just remove out/ directory for clean build
+        incrementalCompilation = true
+        useCompiledClassesFromProjectOutput = false
+        buildStepsToSkip.addAll(listOf(
+          BuildOptions.MAC_SIGN_STEP,
+        ))
+      }
       val communityHome = IdeaProjectLoaderUtil.guessCommunityHome(javaClass)
       val context = BuildContextImpl.createContext(
         communityHome = communityHome,
         projectHome = communityHome.communityRoot,
         productProperties = PyCharmCommunityProperties(communityHome.communityRoot),
+        options = options,
       )
       BuildTasks.create(context).buildDistributions()
     }
   }
 }
+9 −0
Original line number Diff line number Diff line
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -3,6 +3,3 @@
 
 [target.'cfg(all(target_os = "macos", target_arch = "x86_64"))']
 rustflags = ["-C", "link-arg=-mmacosx-version-min=10.15"]
-
-[target.'cfg(all(target_os = "linux", target_arch = "x86_64"))']
-rustflags = ["-C", "target-feature=+crt-static"]
+4 −4
Original line number Diff line number Diff line
@@ -17,12 +17,12 @@ To test the build process of every IDE (as well as the process for adding plugin
## How to update stuff:
 - Run ./bin/update_bin.py
 - This will update binary IDEs and plugins, and automatically commit them
 - Source builds need a bit more effort, as they aren't automated at the moment:
 - Source builds need a bit more effort, as they **aren't automated at the moment**:
   - Find the build of the stable release you want to target (usually different for pycharm and idea, should have three components)
   - I find this at https://jetbrains.com/updates/updates.xml (search for `fullNumber`)
   - I find this at https://jetbrains.com/updates/updates.xml (search for `product name="`, then `fullNumber`)
   - Update the `buildVer` field in source/default.nix
   - Empty the `ideaHash`, `androidHash` and `jpsHash` (only `ideaHash` changes on a regular basis) fields and try to build to get the new hashes
   - Run `nix build .#jetbrains.(idea/pycharm)-community-source.src`, then `./source/build_maven.py source/idea_maven_artefacts.json result/`
   - Empty the `ideaHash`, `androidHash`, `jpsHash` and `restarterHash` (only `ideaHash` and `restarterHash` changes on a regular basis) fields and try to build to get the new hashes
   - Run `nix build .#jetbrains.(idea/pycharm)-community-src.src.src`, then `./source/build_maven.py source/idea_maven_artefacts.json result/`
   - Update `source/brokenPlugins.json` (from https://plugins.jetbrains.com/files/brokenPlugins.json)
   - Do a test build
   - If it succeeds, make a PR/merge
Loading