Commit Graph

50 Commits

Author SHA1 Message Date
Vladimir Krivosheev
351374ca85 IJ-MR-175479 IJ-CR-146078 IJPL-209476 hash4j as product module
GitOrigin-RevId: 09cdcc9248d5b0f77ad594c48b44b08e5d50cae1
2025-10-04 19:03:47 +00:00
Ilia Kirianovskii
f43aa95086 [bazel] Update build files (IJI-3062)
GitOrigin-RevId: 98a67396a48bddc3d084cc93c50ae2f2017bfe8c
2025-09-29 00:11:15 +00:00
Ilia Kirianovskii
6f8920da99 [bazel] Update build files (IJI-3062)
GitOrigin-RevId: 2394c1289e33945f7640f249b17cbf34b31fd695
2025-09-23 09:25:59 +00:00
Nikolay Chashnikov
21c96e93b5 [build scripts] refactoring: allow generating the runtime module repository for a subset of modules and libraries (IJPL-201730)
This is needed to speed up generation of the runtime module repository for a real distribution and for dev build in the build scripts.

IJ-MR-174028

GitOrigin-RevId: 5f1117262af8515b2e63b5b3a8d0ace0c102f6fd
2025-09-01 13:28:43 +00:00
Nikolay Chashnikov
7f995e1ffc [build scripts] optimization: speed up generation of the runtime module repository (IJPL-201730)
Before it analyzed transitive dependencies of each module separately to produce runtime descriptors for their test parts. Now results for different modules are cached and reused. In total, this reduces generation time by 7 times (from 3 seconds to 400ms for the intellij ultimate monorepo on my machine).

As a result, some transitive dependencies for test modules aren't included as direct dependencies anymore, but this shouldn't affect behavior at runtime.

IJ-MR-174028

GitOrigin-RevId: 51f5fe3d08eac12e9a33d00865db73e74b4b79fe
2025-09-01 13:28:43 +00:00
Nikolay Chashnikov
15ff7eb7e4 [jps build devkit] refactoring: extract interface ResourcePathsSchema interface (IJPL-201730)
If the JPS build doesn't generate the runtime module repository, we need to produce it in build scripts from scratch. It will be more efficient and convenient to generate it with proper resource paths for modules and libraries directly instead of first generating it with JPS output paths and then replacing the paths.

GitOrigin-RevId: 3c57f41ba719857be1a15032747dc5ae5bddb629
2025-08-25 11:28:38 +00:00
Aleksei.Cherepanov
c7515bfd3a KTIJ-35250 [Bazel] Promote "Missing dependency superclass" warning to error (part 2)
This commit enables check only for modules WITH a Kotlin facet
Bazel generator was updated as well

GitOrigin-RevId: 90a3427d4b5a3ebc29e257693cb3748ac09bfc6a
2025-08-24 18:49:00 +00:00
Nikolay Chashnikov
454084031c [jps build devkit] refactoring: implement logic for shortening resource paths in the runtime module repository explicitly (IJPL-201730)
This is needed to reuse the generator in the build scripts without adding a dependency on PathRelativizer from the JPS build.

GitOrigin-RevId: 112ac4aa3cf5c2833d9a89e4db0d98169ba6bc2f
2025-08-22 16:02:28 +00:00
Nikolay Chashnikov
656f04cada [tests] check that paths to libraries are shortened properly in the runtime module repository (IJPL-201730)
This is needed to ensure that the logic won't break after refactoring.

GitOrigin-RevId: 806ccf23fa679b2e6056e6506231ced6f781fa3e
2025-08-22 16:02:28 +00:00
Nikolay Chashnikov
d625600d34 [jps build devkit] refactoring: move constants from RuntimeModuleRepositoryBuildConstants to 'intellij.devkit.runtimeModuleRepository.generator' (IJPL-201730)
This is needed to reuse it in the build scripts.

GitOrigin-RevId: 2ff3d844537787622db4f00af38a17ece44c729b
2025-08-22 16:02:27 +00:00
Nikolay Chashnikov
a8d4d66be3 [jps build devkit] refactoring: move RuntimeModuleRepositoryValidator to 'intellij.devkit.runtimeModuleRepository.generator' (IJPL-201730)
This is needed to reuse it in the build scripts.

GitOrigin-RevId: 45eef0f7dcd37c67ea4df001e9c398b073eb9094
2025-08-22 16:02:27 +00:00
Nikolay Chashnikov
ea9f03e463 [jps build devkit] refactoring: extract code which generates the runtime module repository to a separate module (IJPL-201730)
Currently, the runtime module repository is generated by a plugin inside the JPS build during compilation. Doing the same in Bazel doesn't look like a good option because generating something for all modules in the project contradicts the incremental nature of Bazel. So it's better to invoke generation of the runtime module repository by JPS project configuration inside build scripts. To do that and avoid having dependencies on the JPS build classes inside the build scripts, the code which generates the runtime module repository is moved to a separate module 'intellij.devkit.runtimeModuleRepository.generator'.

GitOrigin-RevId: f2596fd51c1c019d304de36ed93fe163cf519ae6
2025-08-22 16:02:27 +00:00
Ilia Kirianovskii
dc268560b6 [bazel] Update build files (IJI-2835)
GitOrigin-RevId: 275260ab73f59d3c08f0b4cb9f4c89b74054094a
2025-08-20 08:49:22 +00:00
Nikolay Chashnikov
42afa24ba6 [devkit] performance optimization: use JpsProject.findModuleByName instead of iterating over all modules
GitOrigin-RevId: 6fd6facc7c1505a1460e3d08b49c237845f566d5
2025-08-01 15:39:42 +00:00
Mikhail Filippov
a5e421cd0b [bazel] update bazel files
GitOrigin-RevId: 718ea2ab97ff962a6c46b36e03c5b468ed68521e
2025-07-29 07:47:09 +00:00
Mikhail Filippov
0e1e215c2c update bazel files
GitOrigin-RevId: 00c5dbade7ac3b8416f30d5527e4c83b35902ce5
2025-07-26 22:51:48 +00:00
Leonid Shalupov
cff76ea65e bazel: split test and build sections in convert jps to bazel:L update Bazel files
GitOrigin-RevId: 90063178de33c2a95bfdebd160a721d6977d8097
2025-07-18 16:18:47 +00:00
Evgenii Ilichev
06fb3e21e6 Update test definitions in BUILD.bazel
GitOrigin-RevId: 12636c0153e8909f9d9658a07278edac5ceb9c23
2025-06-18 19:05:49 +00:00
Nikolay Chashnikov
791282fbe7 [runtime module repository] implement a more efficient format for the repository (IJPL-189949)
A new implementation which generates and loads the runtime module repository from a module-descriptors.dat file in binary format is implemented. module-descriptors.jar in the old format is still generated for compatibility with other tools (e.g., IntelliJ Platform Gradle Plugin) and to provide a human-readable view. It's also used as a fallback variant if module-descriptors.dat is absent.

The new format speeds up loading by around 10 times.

GitOrigin-RevId: b17ba7b53f825e6dcf243ff0aa5b7aedaf7ab9e2
2025-06-05 20:30:43 +00:00
Mikhail Filippov
40e854e522 IJPL-188826 bump Kotlin language version to 2.2
GitOrigin-RevId: 61c9fecae6a713d7e328e74b83186bc5d2f6bf66
2025-05-26 13:41:54 +00:00
Vladimir Krivosheev
6f8ff07ccc simplify bazel labels (another step towards using simple names that reflect directory structure)
GitOrigin-RevId: 12bfb2d0fa315d87c7a4ade363d0f834cf324b71
2025-05-08 16:58:30 +00:00
Mikhail Filippov
493c93a4bf IJPL-182711 bump Kotlin language version
GitOrigin-RevId: 0beaed34efbd3b42a739dddd78de097b4e1d09c5
2025-04-09 14:26:59 +00:00
Nikolay Chashnikov
f60bbd4e2c [runtime repository builder] ensure that a descriptor for each JPS module name is always generated (IJPL-109)
Otherwise, dependency from 'intellij.maven.ultimate.testFramework' module to 'intellij.idea.ultimate.tests.main' breaks the generation of the module repository: the latter is considered as a test-only module, so a descriptor for its production part isn't generated, but the production part of the former has a dependency on it. It's possible to fix this by using 'test' scope for such dependencies or by adding more exceptions in 'isTestOnly' check, but it's not reliable. Given that we already have the problems with 'isTestOnly' heuristics in the past, it's better to get rid of it. This results in about 200 more descriptors created for IntelliJ Ultimate project, but this shouldn't be a problem especially when we start using more compact storage for the runtime module repository.

GitOrigin-RevId: 613c5d4a55ae853e774ded31a4ab5345646ac2e9
2025-04-07 14:45:43 +00:00
Nikolay Chashnikov
957be93008 [devkit tests] cleanup: fix typos in test name
GitOrigin-RevId: b1ad57da8c8d54090189686b748e317009bb1e93
2025-01-17 17:49:59 +00:00
Nikolay Chashnikov
98f5e6e99b [devkit tests] check that runtime module the repository builder always generates descriptors for modules with production sources
Adds a test which verifies the fix done in b00b22c9b9a36c.

GitOrigin-RevId: dde84215ff61faf73a047ef16e382ed747f8cb1a
2025-01-16 14:16:18 +00:00
Nikolay Chashnikov
f21a23e15d [devkit] update runtime module repository builder to always generate descriptors for modules with production sources
Even if the name of the module satisfies 'isTestOnly' conditions, we still need to generate a descriptor for it if it has production sources. Recently, a new module 'intellij.rdct.tests.plugin' was added, which satisfies the condition, and at the same time the test which checks that no modules satisfying 'isTestOnly' condition have production sources was modified (see 39890e67352a1889). So the descriptor wasn't generated for the module, and build scripts fail it in FrontendModuleFilter.isModuleCompatibleWithFrontend.

GitOrigin-RevId: 2814a470f4825449c21adf5bc013c01bfd3f948b
2025-01-15 17:16:58 +00:00
Vladimir Krivosheev
0bc1cf1557 update bazel files
GitOrigin-RevId: 7320d3eff3aba093692ce66839c720ece6d7c4db
2024-12-30 11:28:24 +00:00
Vladimir Krivosheev
aaa5c93bfb do not export deps blindly
GitOrigin-RevId: 3f884c638f8e047b4c6933e023f19f0b79fb8752
2024-12-21 22:49:43 +00:00
Vladimir Krivosheev
98799639aa do not use _test as lib - test targets do not support this
GitOrigin-RevId: f2f49db4294b6a64040dbbd5f1d95e972cbd70a3
2024-12-15 18:32:30 +00:00
Vladimir Krivosheev
17916c90f8 libraries -> lib, resources, opt-in, test deps
GitOrigin-RevId: db66ee95dcb0f0553b40c9cc56cd6afed8634cdd
2024-11-27 13:53:42 +00:00
Mikhail Filippov
bf43f2fc01 IJPL-150165 bump Kotlin language and API version
GitOrigin-RevId: a59dc8ca214a5047773fccf1cf28a1e1b07acf68
2024-08-30 22:15:55 +00:00
Vladimir Krivosheev
e3af69868a introduce BuildTargetHashSupplier (simplify build target fingerprint calculation)
GitOrigin-RevId: f810aed3a678cb36212d68c7539f6893bbe68cf2
2024-08-22 19:11:14 +00:00
Vladimir Krivosheev
e947d352b2 RuntimeModuleRepositoryTarget - use hash4j lib
GitOrigin-RevId: 69299dafffb04c2cbaf339e2bdc86c903dad701a
2024-08-22 12:20:34 +00:00
Yuriy Artamonov
4dac328bf4 [i18n] IJPL-158521 Fix more ellipsis problems in plugins
GitOrigin-RevId: 981393c6f975e303847ca598b650fec8fe65d9bf
2024-07-30 16:35:51 +00:00
Nikolay Chashnikov
cebbe13031 IJPL-797 intellij.platform.runtime.repository review internal API
Constructor is replaced by a factory method in RawRuntimeModuleDescriptor.

GitOrigin-RevId: d6538ac3444867271aa81900d14143677ccaa538
2024-05-17 12:11:30 +00:00
Nikolay Chashnikov
51be1809f5 [runtime module repository] refactoring: extract raw module descriptors data to a separate class
This is needed to support loading the module repository from multiple JAR files, which is in turn needed to support non-bundled plugins (IJPL-633).

GitOrigin-RevId: 853ed4f3221cb2aa34696802d6c36f9636da97b6
2024-02-12 19:47:16 +00:00
Nikolay Chashnikov
162cf5ec55 [runtime module repository] include descriptors for test parts of modules to runtime module repository (IDEA-345102)
Code which adds transitive dependencies for tests is modified to include only those dependencies which aren't already available. This change reduces the size of module-descriptors.jar from 4.2Mb to 2.2Mb for the intellij ultimate project.

GitOrigin-RevId: f1ac6cd72b082afac5a8d3100c8664dbbe80fbe0
2024-02-07 20:12:25 +00:00
Nikolay Chashnikov
44f53cad05 [devkit] implement incremental compilation for runtime module repository (IDEA-335089)
The runtime module descriptors file should be updated if and only if something changes in the configuration of modules and libraries. Since up-to-date checks in org.jetbrains.jps.incremental.BuildOperations are based on files, we need to have at least one source file registered by the builder for that. Here .idea/modules.xml is used for that.

GitOrigin-RevId: ca5e56dfca75d63e4056017a4164dd3fbb20b116
2024-01-29 17:17:12 +00:00
Nikolay Chashnikov
5a1588b3e1 [tests] refactoring: extract checking code from RuntimeModuleRepositoryBuilderTest to a separate file
This is needed to reuse it for tests for IDEA-335089.

GitOrigin-RevId: 89b79c0573d6c427704b97217330f6ec4dd7f59b
2024-01-29 17:17:05 +00:00
Nikolay Chashnikov
0d8c30ae02 [devkit] cleanup: reuse constant for RuntimeModuleRepositoryTargetType instead of declaring a duplicating one
GitOrigin-RevId: acb040cde33b4df2f31d0ff9ad174b0d80edcec8
2023-10-17 19:30:09 +00:00
Daniil Ovchinnikov
27e155fc21 IJPL-167 bump language and API version 1.8 -> 1.9
GitOrigin-RevId: 5204df1784bbbba550476415e4ceff7368ab5fd4
2023-09-19 19:52:47 +00:00
Nikolay Chashnikov
8e4bbe97fd [runtime module repository] cache classpath for intellij.platform.bootstrap module in MANIFEST.MF (IJPL-128)
Currently com.intellij.platform.runtime.loader.Loader parses all module descriptor xml files to compute classpath for ModularMain class, this may take noticeable time. Now classpath for the bootstrap module is cached in an attribute of MANIFEST.MF file, so it can be loaded faster. This is done for production mode only, because in that mode paths to classes roots don't use macros, so there is no need to substitute them.

GitOrigin-RevId: 0af716f718976b67c3a6bcfc94358a0b488d8649
2023-06-01 18:09:45 +00:00
Nikolay Chashnikov
1634cec9fa [runtime module repository] remove unnecessary ../ prefix from resource paths in module descriptors (IJPL-109)
Module descriptors are put to a separate module-descriptors.jar now, and we don't plan to place their resources to that JAR, so the paths will always start with '../' prefix, and it'll just complicate code and requires additional work at runtime. So let's suppose that paths in module-descriptors.jar are relative to the directory where the JAR file is located.

GitOrigin-RevId: 43572247998686fd81d66bcdfba8dd700605281b
2023-05-17 17:46:04 +00:00
Nikolay Chashnikov
25f7a44a3a [runtime module repository] fix generation of descriptors with resource roots only
GitOrigin-RevId: 8760ad91b4b33caf62f781e701965138859126d3
2023-04-25 08:17:36 +00:00
Nikolay Chashnikov
5ed2534fa6 [runtime module repository] check that dependencies are resolved in tests, not during generation
Unresolved dependencies don't always indicate a real problem, because they may correspond to optional dependencies from bundled to non-bundled plugins. So instead of checking this in the build scripts, it's better to check this in a test.

GitOrigin-RevId: dfe404cbbfe27ee41733cf46f0f0926e37ce3c12
2023-04-18 13:15:53 +00:00
Nikolay Chashnikov
2ffe94fea1 [runtime repository] cleanup: remove unused code
It was moved to RuntimeModuleRepositoryValidator in bd53da038.

GitOrigin-RevId: dd9f6516861dbdd6e9ebc5f951d4817322d57e93
2023-04-13 19:00:36 +00:00
Nikolay Chashnikov
1b98750c9f [runtime repository] don't include non-existing output paths to module descriptors (IJPL-109)
GitOrigin-RevId: c6e0877f1f3cf3def89591038ada6d12ae72e706
2023-04-11 13:55:37 +00:00
Nikolay Chashnikov
bdb038ffff [runtime repository] refactoring: extract code which validates descriptors to a separate object (IJPL-109)
...to reuse it from build scripts.

GitOrigin-RevId: bd53da0383b384a1cef50208792117745683ec8e
2023-04-06 14:31:49 +00:00
Nikolay Chashnikov
1f81225e2e [runtime repository] refactoring: move constants used in the builder to a separate public class
...to make them accessible from other modules.

GitOrigin-RevId: 8d9b1b11e80d133e34641c6959988c22336b0935
2023-04-06 14:31:39 +00:00
Nikolay Chashnikov
9126fa4426 [platform] initial version of runtime module repository (IJPL-109)
This change introduces RuntimeModuleRepository API which will be used to determine paths to classes and other resources of modules at runtime. It also adds RuntimeModuleRepositoryBuilder which generates descriptors for modules during compilation of intellij project (this is controlled by a registry key which is switched off by default for now).

GitOrigin-RevId: be33235ec0cdb7ea55a925e753b9b58a3ca63ac3
2023-04-05 15:39:33 +00:00