IJ-MR-175479 IJ-CR-146078 IJPL-209476 hash4j, aalto-xml as product module (part 2)

GitOrigin-RevId: 41ab0c3b2cf8f84818d5892461a917b10ea7fdf8
This commit is contained in:
Vladimir Krivosheev
2025-10-03 20:13:24 +02:00
committed by intellij-monorepo-bot
parent b0f6200a5d
commit 25bc2aff75
37 changed files with 81 additions and 46 deletions

1
.idea/modules.xml generated
View File

@@ -625,6 +625,7 @@
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/intellij.kotlin.plugin.community.main.iml" filepath="$PROJECT_DIR$/plugins/kotlin/intellij.kotlin.plugin.community.main.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/laf/macos/intellij.laf.macos.iml" filepath="$PROJECT_DIR$/plugins/laf/macos/intellij.laf.macos.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/laf/win10/intellij.laf.win10.iml" filepath="$PROJECT_DIR$/plugins/laf/win10/intellij.laf.win10.iml" />
<module fileurl="file://$PROJECT_DIR$/libraries/aalto-xml/intellij.libraries.aalto.xml.iml" filepath="$PROJECT_DIR$/libraries/aalto-xml/intellij.libraries.aalto.xml.iml" />
<module fileurl="file://$PROJECT_DIR$/libraries/ai.grazie.spell.gec.engine.local/intellij.libraries.ai.grazie.spell.gec.engine.local.iml" filepath="$PROJECT_DIR$/libraries/ai.grazie.spell.gec.engine.local/intellij.libraries.ai.grazie.spell.gec.engine.local.iml" />
<module fileurl="file://$PROJECT_DIR$/libraries/assertj-core/intellij.libraries.assertj.core.iml" filepath="$PROJECT_DIR$/libraries/assertj-core/intellij.libraries.assertj.core.iml" />
<module fileurl="file://$PROJECT_DIR$/libraries/caffeine/intellij.libraries.caffeine.iml" filepath="$PROJECT_DIR$/libraries/caffeine/intellij.libraries.caffeine.iml" />

View File

@@ -15,7 +15,7 @@ jvm_library(
"@lib//:kotlin-metadata",
"@lib//:caffeine",
"@lib//:asm",
"@lib//:hash4j",
"@community//libraries/hash4j:hash4j",
"@lib//:fastutil-min",
"@lib//:kotlin-stdlib-provided",
]
@@ -50,7 +50,7 @@ jvm_library(
"@lib//:kotlin-stdlib",
"@lib//:netty-buffer",
"@lib//:fastutil-min",
"@lib//:hash4j",
"@community//libraries/hash4j:hash4j",
]
)

View File

@@ -337,6 +337,7 @@ jvm/jvm-analysis-kotlin-tests-shared
jvm/jvm-analysis-quickFix
jvm/jvm-analysis-refactoring
jvm/jvm-analysis-testFramework
libraries/aalto-xml
libraries/ai.grazie.spell.gec.engine.local
libraries/assertj-core
libraries/caffeine

View File

@@ -34,6 +34,9 @@ suspend fun buildCommunityStandaloneJpsBuilder(
"intellij.platform.util.rt.java8",
"intellij.platform.util.trove",
"intellij.platform.util.nanoxml",
"intellij.libraries.hash4j",
"intellij.libraries.caffeine",
"intellij.libraries.aalto.xml",
).map { ModuleItem(moduleName = it, relativeOutputFile = "util.jar", reason = null) })
layout.withModule("intellij.platform.util.rt", "util_rt.jar")
@@ -103,11 +106,8 @@ suspend fun buildCommunityStandaloneJpsBuilder(
"kotlinx-coroutines-core",
"commons-lang3",
"maven-resolver-provider",
"aalto-xml",
"caffeine",
"mvstore",
"kotlin-metadata",
"hash4j"
)) {
layout.withProjectLibrary(it, LibraryPackMode.STANDALONE_MERGED)
}

View File

@@ -28,9 +28,9 @@ public class FacetLibrariesValidatorTest extends FacetTestCase {
private MockFacetValidatorsManager myValidatorsManager;
private static final LibraryInfo
FAST_UTIL = new LibraryInfo("fastutil.jar", (String)null, null, null, "it.unimi.dsi.fastutil.objects.ObjectOpenHashSet");
private static final LibraryInfo HASH4J = new LibraryInfo("hash4j.jar", (String)null, null, null, "com.dynatrace.hash4j.hashing.Hasher");
private static final LibraryInfo BB = new LibraryInfo("bb.jar", (String)null, null, null, "net.bytebuddy.build.BuildLogger");
private VirtualFile myFastUtilJar;
private VirtualFile myHash4jJar;
private VirtualFile myBBJar;
@NonNls private static final String LIB_NAME = "lib";
private MockFacet myFacet;
private FacetLibrariesValidatorDescription myDescription;
@@ -41,7 +41,7 @@ public class FacetLibrariesValidatorTest extends FacetTestCase {
myValidatorsManager = new MockFacetValidatorsManager();
myFacet = createFacet();
myFastUtilJar = IntelliJProjectConfiguration.getJarFromSingleJarProjectLibrary("fastutil-min");
myHash4jJar = IntelliJProjectConfiguration.getJarFromSingleJarProjectLibrary("hash4j");
myBBJar = IntelliJProjectConfiguration.getJarFromSingleJarProjectLibrary("byte-buddy");
myDescription = new FacetLibrariesValidatorDescription(LIB_NAME);
}
@@ -75,27 +75,27 @@ public class FacetLibrariesValidatorTest extends FacetTestCase {
validator.setRequiredLibraries(LibraryInfo.EMPTY_ARRAY);
assertNoErrors();
validator.setRequiredLibraries(new LibraryInfo[]{HASH4J});
assertError("hash4j.jar");
validator.setRequiredLibraries(new LibraryInfo[]{BB});
assertError("bb.jar");
}
public void testAddJars() {
final FacetLibrariesValidatorImpl validator = createValidator(FAST_UTIL, HASH4J);
final FacetLibrariesValidatorImpl validator = createValidator(FAST_UTIL, BB);
assertError("");
ModuleRootModificationUtil.addModuleLibrary(myModule, myFastUtilJar.getUrl());
IndexingTestUtil.waitUntilIndexesAreReady(myProject);
myValidatorsManager.validate();
assertError("hash4j");
assertError("bb");
ModuleRootModificationUtil.addModuleLibrary(myModule, myHash4jJar.getUrl());
ModuleRootModificationUtil.addModuleLibrary(myModule, myBBJar.getUrl());
IndexingTestUtil.waitUntilIndexesAreReady(myProject);
myValidatorsManager.validate();
validator.onFacetInitialized(createFacet());
final List<VirtualFile> classpath = Arrays.asList(OrderEnumerator.orderEntries(myModule).getClassesRoots());
assertTrue(classpath.contains(myFastUtilJar));
assertTrue(classpath.contains(myHash4jJar));
assertTrue(classpath.contains(myBBJar));
}
public void testUnresolvedLibrary() {
@@ -104,8 +104,8 @@ public class FacetLibrariesValidatorTest extends FacetTestCase {
}
public void testLibrary() {
PsiTestUtil.addProjectLibrary(myModule, "lib1", myFastUtilJar, myHash4jJar);
createValidator(FAST_UTIL, HASH4J);
PsiTestUtil.addProjectLibrary(myModule, "lib1", myFastUtilJar, myBBJar);
createValidator(FAST_UTIL, BB);
assertNoErrors();
}

View File

@@ -0,0 +1,18 @@
### auto-generated section `build intellij.libraries.aalto.xml` start
load("@rules_jvm//:jvm.bzl", "jvm_library", "resourcegroup")
resourcegroup(
name = "aalto-xml_resources",
srcs = glob(["resources/**/*"]),
strip_prefix = "resources"
)
jvm_library(
name = "aalto-xml",
visibility = ["//visibility:public"],
srcs = glob([], allow_empty = True),
resources = [":aalto-xml_resources"],
exports = ["@lib//:aalto-xml"],
runtime_deps = ["@lib//:aalto-xml"]
)
### auto-generated section `build intellij.libraries.aalto.xml` end

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="aalto-xml" level="project" />
</component>
</module>

View File

@@ -0,0 +1,2 @@
<idea-plugin>
</idea-plugin>

View File

@@ -129,7 +129,7 @@ private val predefinedMergeRules = listOf<Pair<String, (String, FrontendModuleFi
},
// used in an external process - see `ConsoleProcessListFetcher.getConsoleProcessCount`
UTIL_JAR to { it, _ -> it == "pty4j" || it == "jvm-native-trusted-roots" || it == "caffeine" },
UTIL_JAR to { it, _ -> it == "pty4j" || it == "jvm-native-trusted-roots" },
)
internal fun getLibraryFileName(library: JpsLibrary): String {

View File

@@ -168,7 +168,6 @@ internal suspend fun createPlatformLayout(projectLibrariesUsedByPlugins: SortedS
"intellij.platform.bootstrap.coroutine",
), productLayout = productLayout, layout = layout)
// used by jdom - pack to the same JAR
layout.withProjectLibrary(libraryName = "aalto-xml", jarName = UTIL_8_JAR)
// Space plugin uses it and bundles into IntelliJ IDEA, but not bundles into DataGrip, so, or Space plugin should bundle this lib,
// or IJ Platform. As it is a small library and consistency is important across other coroutine libs, bundle to IJ Platform.
layout.withProjectLibrary(libraryName = "kotlinx-coroutines-slf4j", LibraryPackMode.STANDALONE_SEPARATE_WITHOUT_VERSION_NAME)

View File

@@ -18,6 +18,7 @@ fun JpsModule.isLibraryModule(): Boolean {
* Please mind that intellij.libraries.microba and intellij.libraries.cglib are exceptions and should not be included in this list
*/
private val LIBRARY_MODULE_NAMES: Set<String> = setOf(
"intellij.libraries.aalto.xml",
"intellij.libraries.assertj.core",
"intellij.libraries.caffeine",
"intellij.libraries.compose.foundation.desktop",

View File

@@ -41,7 +41,7 @@ jvm_library(
"//tools/reproducibleBuilds.diff",
"//jps/jps-builders:build",
"//platform/runtime/product",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"//platform/platform-impl/bootstrap",
"//platform/core-impl",
"//platform/util-class-loader:util-classLoader",

View File

@@ -56,7 +56,7 @@
<orderEntry type="module" module-name="intellij.tools.reproducibleBuilds.diff" />
<orderEntry type="module" module-name="intellij.platform.jps.build" />
<orderEntry type="module" module-name="intellij.platform.runtime.product" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="module" module-name="intellij.platform.ide.bootstrap" />
<orderEntry type="module" module-name="intellij.platform.core.impl" />
<orderEntry type="module" module-name="intellij.platform.util.classLoader" />

View File

@@ -37,7 +37,7 @@ jvm_library(
"@lib//:fastutil-min",
"//platform/diff-api:diff",
"//platform/core-ui",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"//platform/util/xmlDom",
"//platform/util/jdom",
"//libraries/hash4j",

View File

@@ -31,7 +31,7 @@
<orderEntry type="library" name="fastutil-min" level="project" />
<orderEntry type="module" module-name="intellij.platform.diff" />
<orderEntry type="module" module-name="intellij.platform.core.ui" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="module" module-name="intellij.platform.util.xmlDom" />
<orderEntry type="module" module-name="intellij.platform.util.jdom" />
<orderEntry type="module" module-name="intellij.libraries.hash4j" />

View File

@@ -21,7 +21,7 @@ jvm_library(
"//platform/util/jdom",
"@lib//:fastutil-min",
"//platform/util-class-loader:util-classLoader",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"//platform/util/xmlDom",
"@lib//:automaton",
"//libraries/guava",

View File

@@ -30,7 +30,7 @@
<orderEntry type="module" module-name="intellij.platform.util.jdom" />
<orderEntry type="library" name="fastutil-min" level="project" />
<orderEntry type="module" module-name="intellij.platform.util.classLoader" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="module" module-name="intellij.platform.util.xmlDom" />
<orderEntry type="library" name="automaton" level="project" />
<orderEntry type="module" module-name="intellij.libraries.guava" />

View File

@@ -28,7 +28,7 @@ jvm_library(
"//platform/diagnostic",
"//libraries/caffeine",
"//platform/util/nanoxml",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"//platform/util/xmlDom",
"//platform/workspace/storage",
"//platform/util/storages",

View File

@@ -28,7 +28,7 @@
<orderEntry type="module" module-name="intellij.platform.diagnostic" />
<orderEntry type="module" module-name="intellij.libraries.caffeine" />
<orderEntry type="module" module-name="intellij.platform.util.nanoxml" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="module" module-name="intellij.platform.util.xmlDom" />
<orderEntry type="module" module-name="intellij.platform.workspace.storage" />
<orderEntry type="module" module-name="intellij.platform.util.io.storages" />

View File

@@ -102,7 +102,7 @@ jvm_library(
"//platform/ide-core-impl",
"//platform/ide-core/plugins",
"//platform/platform-util-netty:ide-util-netty",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"@lib//:jbr-api",
"//libraries/kotlinx/serialization/json",
"//libraries/kotlinx/serialization/core",
@@ -264,7 +264,7 @@ jvm_library(
"//platform/ide-core-impl",
"//platform/ide-core/plugins",
"//platform/platform-util-netty:ide-util-netty",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"@lib//:jbr-api",
"//libraries/kotlinx/serialization/json",
"//libraries/kotlinx/serialization/core",

View File

@@ -109,7 +109,7 @@
<orderEntry type="module" module-name="intellij.platform.ide.core.impl" />
<orderEntry type="module" module-name="intellij.platform.ide.core.plugins" />
<orderEntry type="module" module-name="intellij.platform.ide.util.netty" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="library" scope="RUNTIME" name="jgoodies-common" level="project" />
<orderEntry type="library" scope="RUNTIME" name="jgoodies-forms" level="project" />
<orderEntry type="library" name="jbr-api" level="project" />

View File

@@ -6,6 +6,7 @@
<module name="intellij.libraries.kotlinx.serialization.core" loading="embedded"/>
<module name="intellij.libraries.kotlinx.serialization.json" loading="embedded"/>
<module name="intellij.libraries.aalto.xml" loading="embedded"/>
<module name="intellij.libraries.caffeine" loading="embedded"/>
<module name="intellij.libraries.guava" loading="embedded"/>
<module name="intellij.libraries.hash4j" loading="embedded"/>

View File

@@ -99,7 +99,7 @@ jvm_library(
"//platform/code-style-impl:codeStyle-impl",
"//platform/statistics/uploader",
"//platform/platform-util-io:ide-util-io",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"//platform/util/xmlDom",
"//platform/platform-util-io-impl:ide-util-io-impl",
"//platform/platform-util-netty:ide-util-netty",

View File

@@ -85,7 +85,7 @@
<orderEntry type="module" module-name="intellij.platform.codeStyle.impl" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.statistics.uploader" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.ide.util.io" scope="TEST" />
<orderEntry type="library" scope="TEST" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.util.xmlDom" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.ide.util.io.impl" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.ide.util.netty" scope="TEST" />

View File

@@ -10,7 +10,7 @@ jvm_library(
deps = [
"@lib//:kotlin-stdlib",
"//platform/util/xmlDom",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"//platform/util",
]
)

View File

@@ -25,7 +25,7 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="intellij.platform.util.xmlDom" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="module" module-name="intellij.platform.util" />
</component>
</module>

View File

@@ -18,7 +18,7 @@ jvm_library(
"//platform/util-ex",
"//platform/platform-impl/bootstrap",
"//platform/util/xmlDom",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"//platform/runtime/product",
"//jps/model-api:model",
]

View File

@@ -18,7 +18,7 @@
<orderEntry type="module" module-name="intellij.platform.util.ex" />
<orderEntry type="module" module-name="intellij.platform.ide.bootstrap" />
<orderEntry type="module" module-name="intellij.platform.util.xmlDom" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="module" module-name="intellij.platform.runtime.product" />
<orderEntry type="module" module-name="intellij.platform.jps.model" />
</component>

View File

@@ -45,7 +45,7 @@ jvm_library(
"//platform/util",
"//platform/object-serializer",
"//libraries/kotlinx/serialization/json",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"@lib//:kotlinx-serialization-cbor",
]
)
@@ -87,7 +87,7 @@ jvm_library(
"//platform/object-serializer",
"//platform/object-serializer:object-serializer_test_lib",
"//libraries/kotlinx/serialization/json",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"//community-resources:customization",
"//platform/testFramework/core",
"@lib//:kotlinx-serialization-cbor",

View File

@@ -75,7 +75,7 @@
<orderEntry type="module" module-name="intellij.platform.util" />
<orderEntry type="module" module-name="intellij.platform.objectSerializer" />
<orderEntry type="module" module-name="intellij.libraries.kotlinx.serialization.json" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="module" module-name="intellij.idea.community.customization" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.testFramework.core" scope="TEST" />
<orderEntry type="library" name="kotlinx-serialization-cbor" level="project" />

View File

@@ -32,7 +32,7 @@ jvm_library(
"@lib//:fastutil-min",
"@lib//:kotlin-stdlib",
"//platform/util/base",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"//platform/util/xmlDom",
"@lib//:kotlinx-coroutines-core",
"//libraries/kotlinx/serialization/core",
@@ -180,7 +180,7 @@ jvm_library(
"//platform/util-ex",
"@lib//:netty-buffer",
"//libraries/caffeine",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"//platform/util/xmlDom",
"//platform/util/zip",
"@lib//:jbr-api",

View File

@@ -45,7 +45,7 @@
<orderEntry type="library" name="fastutil-min" level="project" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="intellij.platform.util.base" exported="" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="module" module-name="intellij.platform.util.xmlDom" />
<orderEntry type="library" name="kotlinx-coroutines-core" level="project" />
<orderEntry type="module" module-name="intellij.libraries.kotlinx.serialization.core" />

View File

@@ -40,7 +40,7 @@
<orderEntry type="module" module-name="intellij.platform.util.ex" />
<orderEntry type="library" name="netty-buffer" level="project" />
<orderEntry type="module" module-name="intellij.libraries.caffeine" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="module" module-name="intellij.platform.util.xmlDom" />
<orderEntry type="module" module-name="intellij.platform.util.zip" />
<orderEntry type="library" name="jbr-api" level="project" />

View File

@@ -8,7 +8,7 @@ jvm_library(
srcs = glob(["src/**/*.kt", "src/**/*.java", "src/**/*.form"], allow_empty = True),
kotlinc_opts = "@community//:k8",
deps = [
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"@lib//:kotlin-stdlib",
"@lib//:jetbrains-annotations",
"@lib//:fastutil-min",

View File

@@ -29,7 +29,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="library" name="jetbrains-annotations" level="project" />
<orderEntry type="library" name="fastutil-min" level="project" />

View File

@@ -50,7 +50,7 @@ jvm_library(
"//platform/platform-util-io-impl:ide-util-io-impl",
"//platform/util/xmlDom",
"//platform/util/jdom",
"@lib//:aalto-xml",
"//libraries/aalto-xml",
"//platform/polySymbols/backend",
"//libraries/xerces",
"//xml/xml-syntax:syntax",

View File

@@ -44,7 +44,7 @@
<orderEntry type="module" module-name="intellij.platform.ide.util.io.impl" />
<orderEntry type="module" module-name="intellij.platform.util.xmlDom" />
<orderEntry type="module" module-name="intellij.platform.util.jdom" />
<orderEntry type="library" name="aalto-xml" level="project" />
<orderEntry type="module" module-name="intellij.libraries.aalto.xml" />
<orderEntry type="module" module-name="intellij.platform.backend" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.platform.polySymbols.backend" />
<orderEntry type="module" module-name="intellij.libraries.xerces" />