jetbrains.idea-community-src: 2024.1 -> 2024.3.1, jetbrains.pycharm-community-src: 2024.1 -> 2024.3

This commit is contained in:
夜坂雅
2024-12-14 13:03:40 +08:00
parent 5a9ed73f70
commit 931f75bf1d
8 changed files with 8469 additions and 2356 deletions
@@ -0,0 +1,11 @@
--- a/build/deps/src/org/jetbrains/intellij/build/impl/BundledMavenDownloader.kt
+++ b/build/deps/src/org/jetbrains/intellij/build/impl/BundledMavenDownloader.kt
@@ -35,7 +35,7 @@
"org.jdom:jdom2:2.0.6.1",*/
)
-private val mavenTelemetryDependencies = listOf("com.fasterxml.jackson.core:jackson-core:2.16.0")
+private val mavenTelemetryDependencies = listOf("com.fasterxml.jackson.core:jackson-core:2.17.0")
object BundledMavenDownloader {
private val mutex = Mutex()
@@ -46,11 +46,11 @@
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
@@ -33,11 +33,7 @@
}
suspend fun getJdkHome(communityRoot: BuildDependenciesCommunityRoot, os: OS, arch: Arch, infoLog: (String) -> Unit): Path {
- val jdkUrl = getUrl(communityRoot = communityRoot, os = os, arch = arch)
@@ -55,11 +55,7 @@
variation: String? = null,
infoLog: (String) -> Unit,
): Path {
- val jdkUrl = getUrl(communityRoot = communityRoot, os = os, arch = arch, jdkBuildNumber = jdkBuildNumber, variation = variation)
- val jdkArchive = downloadFileToCacheLocation(url = jdkUrl.toString(), communityRoot = communityRoot)
- val jdkExtracted = BuildDependenciesDownloader.extractFileToCacheLocation(communityRoot = communityRoot,
- archiveFile = jdkArchive,
@@ -72,15 +72,15 @@
* 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) {
@@ -50,7 +50,7 @@
val distBinDir = targetPath.resolve("bin")
val sourceBinDir = context.paths.communityHomeDir.resolve("bin/linux")
- copyFileToDir(NativeBinaryDownloader.downloadRestarter(context = context, os = OsFamily.LINUX, arch = arch), distBinDir)
addNativeLauncher(distBinDir, targetPath, arch)
- copyFileToDir(NativeBinaryDownloader.getRestarter(context, OsFamily.LINUX, 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)
copyDistFiles(context, targetPath, OsFamily.LINUX, arch)
@@ -85,6 +85,8 @@
}
}
@@ -90,6 +90,16 @@
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))
@@ -383,7 +385,8 @@
}
private suspend fun addNativeLauncher(distBinDir: Path, targetPath: Path, arch: JvmArchitecture) {
- val (execPath, licensePath) = NativeBinaryDownloader.getLauncher(context, OsFamily.LINUX, arch)
+ val execPath = Path.of("XPLAT_LAUNCHER_PREBUILT_PATH_HERE/Linux-${arch.archName}/xplat-launcher")
+ val licensePath = Path.of("XPLAT_LAUNCHER_PREBUILT_PATH_HERE/license/xplat-launcher-third-party-licenses.html")
copyFile(execPath, distBinDir.resolve(context.productProperties.baseFileName))
copyFile(licensePath, targetPath.resolve("license/launcher-third-party-libraries.html"))
}
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/brokenPlugins.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/brokenPlugins.kt
@@ -9,6 +9,8 @@
@@ -137,7 +147,7 @@
- // Ideal solution would be to move compilation to other process altogether and do not modify current process classpath
- println(" * Downloading $kotlinJpsPluginUrl")
- val tmpLocation = Files.createTempFile(cacheLocation.parent, cacheLocation.name, ".tmp")
- suspendingRetryWithExponentialBackOff {
- retryWithExponentialBackOff {
- FileUtils.copyURLToFile(kotlinJpsPluginUrl.toURL(), tmpLocation.toFile())
- }
- Files.move(tmpLocation, cacheLocation, StandardCopyOption.ATOMIC_MOVE)
File diff suppressed because one or more lines are too long
@@ -1,5 +1,6 @@
{ fetchFromGitHub
, fetchurl
, fetchzip
, lib
, linkFarm
, makeWrapper
@@ -11,6 +12,7 @@
, ant
, cmake
, glib
, glibc
, jetbrains
, kotlin
, libdbusmenu
@@ -118,6 +120,9 @@ let
inherit src;
sourceRoot = "${src.name}/native/restarter";
cargoHash = restarterHash;
# Allow static linking
buildInputs = [ glibc glibc.static ];
};
jpsRepo = runCommand "jps-bootstrap-repository"
@@ -177,6 +182,8 @@ let
"https://packages.jetbrains.team/maven/p/ki/maven/${entry.url}"
"https://packages.jetbrains.team/maven/p/dpgpv/maven/${entry.url}"
"https://cache-redirector.jetbrains.com/download.jetbrains.com/teamcity-repository/${entry.url}"
"https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies/${entry.url}"
"https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/public/p/compose/dev/${entry.url}"
];
sha256 = entry.hash;
};
@@ -188,16 +195,22 @@ let
repoUrl = "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies";
groupId = builtins.replaceStrings [ "." ] [ "/" ] "org.jetbrains.kotlin";
artefactId = "kotlin-jps-plugin-classpath";
version = "1.9.22";
version = "2.0.21-RC";
in
fetchurl {
url = repoUrl + "/" + groupId + "/" + artefactId + "/" + version + "/" + artefactId + "-" + version + ".jar";
hash = "sha256-ZPfEceGoIChDmjIAjjhDZpyMWQ7/DtP9Ll4YIrZN+PM=";
hash = "sha256-jFjxP1LGjrvc1x2XqF5gg/SeKdSFNefxABBlrYl81zA=";
};
targetClass = if buildType == "pycharm" then "intellij.pycharm.community.build" else "intellij.idea.community.build";
targetName = if buildType == "pycharm" then "PyCharmCommunityInstallersBuildTarget" else "OpenSourceCommunityInstallersBuildTarget";
xplat-launcher = fetchzip {
url = "https://cache-redirector.jetbrains.com/intellij-dependencies/org/jetbrains/intellij/deps/launcher/242.22926/launcher-242.22926.tar.gz";
hash = "sha256-ttrQZUbBvvyH1BSVt1yWOoD82WwRi/hkoRfrsdCjwTA=";
stripRoot = false;
};
in
stdenvNoCC.mkDerivation rec {
pname = "${buildType}-community";
@@ -210,6 +223,7 @@ stdenvNoCC.mkDerivation rec {
patches = [
../patches/no-download.patch
../patches/disable-sbom-generation.patch
../patches/bump-jackson-core-in-source.patch
];
postPatch = ''
@@ -217,20 +231,24 @@ stdenvNoCC.mkDerivation rec {
cp ${fsnotifier}/bin/fsnotifier bin/linux/amd64/fsnotifier
cp ${libdbm}/lib/libdbm.so bin/linux/amd64/libdbm.so
sed \
-e 's|JPS_PLUGIN_CLASSPATH_HERE|${kotlin-jps-plugin-classpath}|' \
-e 's|KOTLIN_PATH_HERE|${kotlin}|' \
-i platform/build-scripts/src/org/jetbrains/intellij/build/kotlin/KotlinCompilerDependencyDownloader.kt
sed \
-e 's|JDK_PATH_HERE|${jbr}/lib/openjdk|' \
-i platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt
sed \
-e 's|BROKEN_PLUGINS_HERE|${./brokenPlugins.json}|' \
-i platform/build-scripts/src/org/jetbrains/intellij/build/impl/brokenPlugins.kt
sed \
-e 's|MAVEN_REPO_HERE|${mvnRepo}/.m2/repository/|' \
-e 's|MAVEN_PATH_HERE|${maven}/maven|' \
-i build/deps/src/org/jetbrains/intellij/build/impl/BundledMavenDownloader.kt
substituteInPlace \
platform/build-scripts/src/org/jetbrains/intellij/build/kotlin/KotlinCompilerDependencyDownloader.kt \
--replace-fail 'JPS_PLUGIN_CLASSPATH_HERE' '${kotlin-jps-plugin-classpath}' \
--replace-fail 'KOTLIN_PATH_HERE' '${kotlin}'
substituteInPlace \
platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt \
--replace-fail 'JDK_PATH_HERE' '${jbr}/lib/openjdk'
substituteInPlace \
platform/build-scripts/src/org/jetbrains/intellij/build/impl/brokenPlugins.kt \
--replace-fail 'BROKEN_PLUGINS_HERE' '${./brokenPlugins.json}'
substituteInPlace \
platform/build-scripts/src/org/jetbrains/intellij/build/impl/LinuxDistributionBuilder.kt \
--replace-fail 'XPLAT_LAUNCHER_PREBUILT_PATH_HERE' '${xplat-launcher}'
substituteInPlace \
build/deps/src/org/jetbrains/intellij/build/impl/BundledMavenDownloader.kt \
--replace-fail 'MAVEN_REPO_HERE' '${mvnRepo}/.m2/repository/' \
--replace-fail 'MAVEN_PATH_HERE' '${maven}/maven'
echo '${buildNumber}.SNAPSHOT' > build.txt
'';
@@ -244,7 +262,7 @@ stdenvNoCC.mkDerivation rec {
-Djps.kotlin.home=${kotlin} \
-Dintellij.build.target.os=linux \
-Dintellij.build.target.arch=x64 \
-Dintellij.build.skip.build.steps=mac_artifacts,mac_dmg,mac_sit,windows_exe_installer,windows_sign,repair_utility_bundle_step \
-Dintellij.build.skip.build.steps=mac_artifacts,mac_dmg,mac_sit,windows_exe_installer,windows_sign,repair_utility_bundle_step,sources_archive \
-Dintellij.build.unix.snaps=false \
--java-argfile-target=java_argfile \
/build/source \
@@ -41,11 +41,8 @@ def add_libraries(root_path: str, hashes: list[dict[str, str]], projects_to_proc
add_entries(sources, targets, hashes)
modules_xml = parse(open(root_path+"/modules.xml").read())
for entry in modules_xml["project"]["component"]:
if entry["@name"] != "ProjectModuleManager":
continue
for module in entry["modules"]["module"]:
projects_to_process.append(module["@filepath"])
for module in modules_xml["project"]["component"]["modules"]["module"]:
projects_to_process.append(module["@filepath"])
def add_iml(path: str, hashes: list[dict[str, str]], projects_to_process: list[str]):
@@ -3,23 +3,23 @@
{
idea-community = callPackage ./build.nix {
version = "2024.1.3";
buildNumber = "241.17890.1";
version = "2024.3.1";
buildNumber = "243.22562.145";
buildType = "idea";
ideaHash = "sha256-jWFnewxRkriSmV6CgGX1r//uaErMINfx3Z+JpkE34jk=";
androidHash = "sha256-hX2YdRYNRg0guskNiYfxdl9osgZojRen82IhgA6G0Eo=";
jpsHash = "sha256-Abr7L1FyqzRoUSDtsJs3cTEdkhORY5DzsQnOo5irVRI=";
restarterHash = "sha256-XdjyuJUQMvhC0fl6sMj0sRWlqgUb3ZgBmKKXcD3egkk=";
ideaHash = "sha256-So55gxse7TU05F2c1pe/2BPjZ6xNlCi0Lhaxm+45w/M=";
androidHash = "sha256-2ZLTh3mwrIWOqn1UHqAVibG5JvfvxinqDna/EGxd0Ds=";
jpsHash = "sha256-p3AEHULhVECIicyhCYNkxeQoMAorrbvoIj7jcqxYD2s=";
restarterHash = "sha256-m6HK4kxtAlN6EaszI/xpkVYDaY8W3Qn9FGWgvaW/UYI=";
mvnDeps = ./idea_maven_artefacts.json;
};
pycharm-community = callPackage ./build.nix {
version = "2024.1.3";
buildNumber = "241.17890.14";
version = "2024.3";
buildNumber = "243.21565.199";
buildType = "pycharm";
ideaHash = "sha256-tTB91/RHEWP/ZILPNFAbolVBLvgjLXTdD/uF/pdJ22Y=";
androidHash = "sha256-hX2YdRYNRg0guskNiYfxdl9osgZojRen82IhgA6G0Eo=";
jpsHash = "sha256-Abr7L1FyqzRoUSDtsJs3cTEdkhORY5DzsQnOo5irVRI=";
restarterHash = "sha256-TbTIz9pc5wqL54TAMRoQ/9Ax/qsDp+r+h5jn2ub0hes=";
mvnDeps = ./idea_maven_artefacts.json;
ideaHash = "sha256-NohKF30k3aSYgDUPKrhE2CZmjzT8TK0zw++0Low1OfM=";
androidHash = "sha256-H1JegxX6sj7XG0EdZhtzL92GupCCoIq4akgK9t06nXM=";
jpsHash = "sha256-p3AEHULhVECIicyhCYNkxeQoMAorrbvoIj7jcqxYD2s=";
restarterHash = "sha256-CnTYpYx6SoT6XaS79cm0QpIijIiPKpFh4LfiPJkByXA=";
mvnDeps = ./pycharm_maven_artefacts.json;
};
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff