Commit Graph

425 Commits

Author SHA1 Message Date
Nikolay Chashnikov
7930b9b5b4 [jps] API cleanup: mark deprecated unused API for removal (IJPL-156972)
Deprecated APIs which still have internal usage are marked as internal to ensure that new external usages won't appear.

GitOrigin-RevId: b85ab4eacb14f33d958d3d424ca52c911cc7d49c
2024-10-10 23:55:42 +00:00
Vladimir Krivosheev
a9e7930abe bazel - build lang-impl
GitOrigin-RevId: c4c4dce20bd6e4046644f95f6e7b3f437c51668d
2024-09-27 13:47:17 +00:00
Andrei.Kuznetsov
ffbce8da16 IJPL-157852: Let JpsFileContent hold parsed file content, not just delegate to a reader
The goal is to take full control over iml parsing. Namely:
0. From WSM's point of view, iml/xml files are plain xml files that describe a project, not a component store. There are no components in WSM, there are entities. Partitioning (accessing components by names) is not really helpful here.
1. Get full access to iml/xml file content: soon we'll need a method like `getAllComponents`. Introducing this method to JpsFileContentReader does not look right because this would mean that some code might try parsing the whole config file, instead of querying its own piece of configuration.
2. Do not keep parsed iml files in the memory longer than needed (JpsFileContentReader may hold cached content longer than actually needed).

GitOrigin-RevId: 7461e6a1a0fa539feb025f6f626f224df56be230
2024-09-25 19:12:31 +00:00
Vladimir Krivosheev
a1210118c0 bazel - fix JPMS, exports and internal
GitOrigin-RevId: 3dc80a9ee01e1900c0cebc24b2d08f04f93ddeff
2024-09-25 19:05:37 +00:00
Vladimir Krivosheev
4eb9b78b78 use bazel to build platform-impl
GitOrigin-RevId: b5bbc75323a08c7674777e512dcfd988ceb4461f
2024-09-22 17:01:28 +00:00
Vladimir Krivosheev
834bd75254 run jps-to-bazel by Bazel, compile platform using Bazel
GitOrigin-RevId: 3774d5adc404b02036f70b7cc35c9e60fdb5d84c
2024-09-21 00:54:17 +00:00
Vladimir Krivosheev
8455df53ca build build-scripts using Bazel
GitOrigin-RevId: f6ab74d791f866f567297e20266a7620cddfafae
2024-09-20 01:52:02 +00:00
Mikhail Filippov
bf43f2fc01 IJPL-150165 bump Kotlin language and API version
GitOrigin-RevId: a59dc8ca214a5047773fccf1cf28a1e1b07acf68
2024-08-30 22:15:55 +00:00
Nikolay Chashnikov
35a9f9cbc7 [jps model] make JpsLibraryCollectionBridge a real JpsElement (IJPL-409)
We have code that invokes `jpsLibrary.getParent().getParent()` to get a JpsModule instance for a module-level library. To keep such code working, we need to have JpsModule and JpsProject as super-parents (not direct parents) of JpsLibrary instances in the new implementation as well.

GitOrigin-RevId: a5f944d152229275b05efdfc686afa091c3fd963
2024-08-14 17:15:46 +00:00
Nikolay Chashnikov
6df730032a [jps model] API cleanup: move internal class TimingLog to impl package
GitOrigin-RevId: 99943719329b6087f0ff5f03d827599ff634ea15
2024-07-17 10:04:59 +00:00
Nikolay Chashnikov
b79f0b54e9 [jps model] load generic facets in the implementation of JpsModel based on the workspace model (IJPL-409)
JpsModuleExtensionBridge API is introduced which allows converting child entities of ModuleEntity in the workspace model to child elements of JpsModule in the build process.

GitOrigin-RevId: 86277abed01980441b40f7eec3bcd16ca57e040f
2024-07-03 13:23:43 +00:00
Nikolay Chashnikov
a58a3ce331 [jps model tests] use 'loadModel' in JpsProjectSerializationTest.loadProject
This allows using this test for checking loading from caches (IJPL-409).

GitOrigin-RevId: 4bda1c8166722ed860607517e1925ffaff60aabe
2024-07-03 13:23:43 +00:00
Nikolay Chashnikov
a084afb985 [jps build] provide a way to load the project model from workspace model cache files (IJPL-409)
GitOrigin-RevId: 2d76047ec29c4ae555f67171e725867046b4eaaa
2024-07-01 14:04:06 +00:00
Nikolay Chashnikov
dbe582ee4c [jps model] cache contents of loaded files when using the new implementation (IJPL-409)
Unlike the old implementation, the new one may call JpsComponentLoader.loadComponent multiple times for the same file, so it's better to cache content to speed up loading.

GitOrigin-RevId: 4c3630f24bdcb8740ef5cd3ba6d414febb0f9d77
2024-06-28 17:05:01 +00:00
Nikolay Chashnikov
55fb09873d [jps model] refactoring: extract and reuse JpsComponentLoader.loadComponent method
GitOrigin-RevId: 907421fa095075d727feb207538340cf41e4dcd6
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
c0393d751a [jps model] support loading project and module components in the new implementation (IJPL-409)
Data which is present in the workspace model is taken from it, other components are loaded from xml files as before.

GitOrigin-RevId: 368e2b15aa055bc3489fb944c334379f10f2725e
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
c6681283f6 [jps model tests] add runtime dependency on 'intellij.platform.workspace.jps' module in jps tests
This is needed to allow checking the new implementation (IJPL-409) using the old tests.

GitOrigin-RevId: c276d565e0d944a0d2f376db9178200b5add679a
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
ac5b260e40 [jps model tests] adapt test for invalid project configurations to the new implementation (IJPL-409)
The new implementation based on the workspace model behaves slightly differently for some projects with invalid configurations, tests should tolerate this.

GitOrigin-RevId: fa5a7c888aa60ff27507bff3b9a05fc3d68ececc
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
bafd0db912 [jps model tests] add tests on module paths in JpsProjectSerializationTest
GitOrigin-RevId: e889e6cffc4f00b0655e01c33a317724ff170298
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
bdcbfa2f00 [jps model tests] sort modules in testModuleProperties.ipr
Production code sorts modules before saving. Also, this is needed to simplify testing loading in the new implementation of JPS model (IJPL-409).

GitOrigin-RevId: f540342b831bf73cb0e717d51b92da323201edaf
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
a6554884e9 [jps model serialization] refactoring: pass externalConfigurationPath explicitly and use Path instead of String
This is needed to test loading external configuration in the new implementation of JPS model (IJPL-409) and to avoid conversions between Path and String.

JpsCompilerConfigurationTest changed to load the project configuration using JpsSerializationManager API and migrated to JUnit5.

GitOrigin-RevId: a9d85b2b8797cdecbc43c07339ad89511823d758
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
5730a1a367 [jps model] refactoring: extract code from JpsProjectLoader to JpsProjectConfigurationLoading
This is needed to reuse it for the new implementation of JPS model (IJPL-409).

GitOrigin-RevId: 510c9f53ac73ad2212de8af069a1e7bae299624f
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
fbcba43905 [jps tests] refactoring: rework jps serialization tests to use JpsSerializationManager API
JpsModelFromTestData utility is added which uses JpsSerializationManager instead of creating JpsModel and calling JpsProjectLoader directly. Tests are migrated to use it instead of extending JpsSerializationTestCase. This is needed to use these tests to verify the new implementation of JPS model serialization (IJPL-409). Also, the tests are migrated to JUnit 5.

GitOrigin-RevId: 874f0b01ea6ae5d31666b2dafb843052cc017024
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
c0bc5811fb [jps model] refactoring: replace inheritance from JpsLoaderBase by delegation and rename it to JpsComponentLoader
This is needed to refactor simplify JpsProjectLoader to allow reusing its code in the new implementation of the JPS model (IJPL-409).

GitOrigin-RevId: b88fb246454601489e7133df4b078e5e52f6da58
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
395c030d98 [jps model] refactoring: move code which reads external data for compiler configuration to the corresponding serializer
JpsProjectExtensionWithExternalDataSerializer is introduced to support project components which may have data in the external storage. Code related to loading the compiler configuration is moved from JpsProjectLoader to JpsJavaCompilerConfigurationSerializer. This is needed to refactor JpsProjectLoader to allow reusing its code in the new implementation of the JPS model (IJPL-409).

GitOrigin-RevId: c0e64c02c49e4a451da9b9743c240227bd6465a4
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
1d2b8c2b86 [jps model] refactoring: pass the path to the external project configuration explicitly and write tests
This is needed to provide a new implementation of the JPS model (IJPL-409).

GitOrigin-RevId: 3f47fa027e5d36be36d97d99eecc60ee750dde15
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
45e78213a5 [project model] cleanup: delete unused UnloadedModuleDescriptionImpl class
GitOrigin-RevId: 37e2cdc8e6d5ca01a624b8d24772d3b3732f671c
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
a53b4de5f8 [jps model] initial prototype of a new JPS model's implementation which delegates to the workspace model (IJPL-409)
Implementations for the following elements are provided for now:
 * modules: content, source and excluded roots, custom properties of modules and source roots, dependencies;
 * libraries: roots and custom properties;
 * SDKs: roots and custom properties;
 * java: custom properties of modules and dependencies.

GitOrigin-RevId: 1829d8defa1b36148abfbd063264defdd6c16014
2024-06-24 23:52:58 +00:00
Nikolay Chashnikov
9db2a6ec5c [jps model] refactoring: extract common code in intellij.platform.jps.model.serialization module
This is needed to reuse it in the new implementation based on the workspace model (IJPL-409).

GitOrigin-RevId: a749b014ea5d28a574c3b1999f23d4376ed27c4c
2024-06-24 19:27:40 +00:00
Nikolay Chashnikov
99eb3105bc IJPL-797 intellij.platform.jps.model.serialization review internal API
Review is complete.

GitOrigin-RevId: 1a817bf29c1c8618879c3aa1cf0d6f7e97c2e8e4
2024-06-20 18:28:24 +00:00
Nikolay Chashnikov
c0e79911d1 IJPL-797 intellij.platform.jps.model.serialization review internal API
GitOrigin-RevId: d36211e54eb45a92e09366ca89d2657ef8dada95
2024-06-20 18:28:24 +00:00
Nikolay Chashnikov
50b5977130 IJPL-797 intellij.platform.jps.model.serialization review internal API
Hide some code from JPS Model to simplify migration to the new implementation (IJPL-409).

GitOrigin-RevId: 99397680db06fa27c3215aa5e164e983189f7fab
2024-06-18 07:31:44 +00:00
Nikolay Chashnikov
fa55f843f7 [jps model] mark JpsModelSerializerExtension::saveExtension for removal and update javadoc
This is needed to make it easier to provide a new implementation of JpsModel delegating to Workspace Model (IJPL-409).

GitOrigin-RevId: 16e3a57ebccd561a3fc9cbbf54b1ed474563cf5f
2024-06-07 11:33:02 +00:00
Roman Shevchenko
fb5023db6b [project] fixing simple "zero-tolerance inspection" problems
GitOrigin-RevId: a2ed3b1983adba46cd998d7bd1f7f3e7a165d8c5
2024-05-12 20:30:07 +00:00
Vladimir Lagunov
8d1744cd88 JPS: apply path mapper to Maven Artifactory URLs
Now, if JPS runs in a WSL container, it mangles paths to JARs from `~\.m2`.

JPS uses JARs from the Windows disk. Although it would be more performant to use JARs from the Linux drive, this commit makes JPS at least work on WSL.

GitOrigin-RevId: 9c9d6dc378f03cc7e992b9fca8b639ccb709fd2b
2024-05-06 10:31:55 +00:00
Vladimir Lagunov
7159d220f2 JPS: Map paths for WSL both on Windows 10 and Windows 11
The UNC root of a WSL image path changed in Windows 11. It was `\\wsl$\` before and became `\\wsl.localhost\`.

GitOrigin-RevId: ec6f638eee90f9875871c3381051b4a7cc0733f3
2024-05-06 10:31:55 +00:00
Mikhail Pyltsin
678b932b33 [java-compiler] IDEA-290373 Check sensitivity for reference index.
- Use root to check case-sensitivity by default

GitOrigin-RevId: 1ee64c32753f049d518aec51b48ab266a4a881b2
2024-04-16 13:53:49 +00:00
Daniil Ovchinnikov
0ceb137057 IJPL-797 API dump: generate api-dump-unreviewed.txt and exposed API lists [1/4]
GitOrigin-RevId: 372e767101ed7821a6ef860d7be96f1c536833ef
2024-04-09 02:07:00 +00:00
Vladimir Krivosheev
6283819c6c cleanup - extract cwmLayout.kt
GitOrigin-RevId: 75fb868f3bb7e159cf9fe3da5b828975f3991b7e
2024-02-07 17:02:46 +00:00
Vladimir Krivosheev
f1e9d5710d cleanup - final
GitOrigin-RevId: 3c51fed9e0ba9c82609f892c3acbe160903f0dc9
2024-01-31 11:30:18 +00:00
Andrei Efanov
06685bed62 refactor(otel): use otel semantic attributes for easy access to docs
GitOrigin-RevId: fc04c1014919ba612b5cce7164cf812b197a43ca
2024-01-23 14:28:30 +00:00
Nikolay Chashnikov
82d7fcff34 [jps] cleanup: remove implementations of deprecated JpsElement.BulkModificationSupport.applyChanges
The method isn't used anymore.

GitOrigin-RevId: 1783d1d74ecc1f3c46d738c14ce89bdbaaa0cc43
2023-12-27 19:30:16 +00:00
Vladimir Krivosheev
fca146338b IJPL-285 use Map.copyOf
GitOrigin-RevId: 4975f08514792fe33400b2117e35323f18552732
2023-10-16 09:31:27 +00:00
Vladimir Krivosheev
59899406c0 reduce classloading - prefer JDK ArrayList
GitOrigin-RevId: 54258671f50febc9494c7d251164b04280fd4aed
2023-10-16 09:31:20 +00:00
Nikolay Chashnikov
be796843a5 [jps] API cleanup: remove unused deprecated API (IDEA-322162)
GitOrigin-RevId: c8f1d1009509f02b2e597a6601779c4526b9035c
2023-09-29 09:21:25 +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
Vladimir Krivosheev
97661aa3c0 JpsMacroExpander - avoid using of FileUtil (reduce classloading)
GitOrigin-RevId: c063f7d6dca475033b996770a6f83d1dbeb48590
2023-08-29 19:33:12 +00:00
Vladislav.Yaroshchuk
c78449b182 [jps] IJI-1002 JpsMavenSettings: make getGlobalMavenSettingsXml() return @Nullable
This fixes undefined behavior when `resolveMavenHomeDirectory()`
returns null

GitOrigin-RevId: cef3e2c0ad8bb918e068293a43d1d89d8354984a
2023-08-11 13:36:40 +00:00
Vladislav.Yaroshchuk
a09c3c755d [jps] IJI-1002 Introduce JpsMavenSettingsTest
GitOrigin-RevId: 2934d490f2f9f43d47126742c76e5a296571af0b
2023-08-11 11:11:30 +00:00
Vladislav.Yaroshchuk
ad3757e8eb [jps] IJI-1002 MavenPathRelativizer: extract and expose Maven settings retrieval methods
GitOrigin-RevId: eb67aef0ee0c721b1fb0b14c40555e6cd36e6700
2023-08-11 11:11:30 +00:00