diff --git a/MODULE.bazel b/MODULE.bazel index 849856edf7b..f30b8463086 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -94,6 +94,7 @@ maven.install( "org.jetbrains.pty4j:pty4j:0.13.0", # Only required for the maintenance script, otherwise use the stdlib for the sdk "org.jetbrains.kotlin:kotlin-stdlib:2.1.21", + "org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0", ], fail_if_repin_required = True, generate_compat_repositories = True, diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 198d6aae3a3..b4020c84cf1 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -142,6 +142,7 @@ "https://bcr.bazel.build/modules/rules_cc/0.0.8/MODULE.bazel": "964c85c82cfeb6f3855e6a07054fdb159aced38e99a5eecf7bce9d53990afa3e", "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5", "https://bcr.bazel.build/modules/rules_cc/0.1.1/MODULE.bazel": "2f0222a6f229f0bf44cd711dc13c858dad98c62d52bd51d8fc3a764a83125513", + "https://bcr.bazel.build/modules/rules_cc/0.1.5/MODULE.bazel": "88dfc9361e8b5ae1008ac38f7cdfd45ad738e4fa676a3ad67d19204f045a1fd8", "https://bcr.bazel.build/modules/rules_cc/0.2.0/MODULE.bazel": "b5c17f90458caae90d2ccd114c81970062946f49f355610ed89bebf954f5783c", "https://bcr.bazel.build/modules/rules_cc/0.2.13/MODULE.bazel": "eecdd666eda6be16a8d9dc15e44b5c75133405e820f620a234acc4b1fdc5aa37", "https://bcr.bazel.build/modules/rules_cc/0.2.14/MODULE.bazel": "353c99ed148887ee89c54a17d4100ae7e7e436593d104b668476019023b58df8", @@ -190,8 +191,8 @@ "https://bcr.bazel.build/modules/rules_kotlin/1.9.0/MODULE.bazel": "ef85697305025e5a61f395d4eaede272a5393cee479ace6686dba707de804d59", "https://bcr.bazel.build/modules/rules_kotlin/1.9.5/MODULE.bazel": "043a16a572f610558ec2030db3ff0c9938574e7dd9f58bded1bb07c0192ef025", "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/MODULE.bazel": "d269a01a18ee74d0335450b10f62c9ed81f2321d7958a2934e44272fe82dcef3", - "https://bcr.bazel.build/modules/rules_kotlin/2.1.10/MODULE.bazel": "cf3e4e04cebd799ffdd76f07a5fcc05f7b8c47bae73b780a694fe76746a69440", - "https://bcr.bazel.build/modules/rules_kotlin/2.1.10/source.json": "04a273e397fbb31ff3d328f44482c783feac979f33f3c2737fba880c84f8f340", + "https://bcr.bazel.build/modules/rules_kotlin/2.2.0/MODULE.bazel": "ba6bdb75315e0bf87acaac82d3b4e5db6766b329e927080967d5e7fa52cb6396", + "https://bcr.bazel.build/modules/rules_kotlin/2.2.0/source.json": "39103924d24c78ddb38a1850b940a3e13b71093ec06f2cac46e2e8b673b349d2", "https://bcr.bazel.build/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0", "https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d", "https://bcr.bazel.build/modules/rules_license/1.0.0/MODULE.bazel": "a7fda60eefdf3d8c827262ba499957e4df06f659330bbe6cdbdb975b768bb65c", @@ -223,8 +224,8 @@ "https://bcr.bazel.build/modules/rules_python/1.0.0/MODULE.bazel": "898a3d999c22caa585eb062b600f88654bf92efb204fa346fb55f6f8edffca43", "https://bcr.bazel.build/modules/rules_python/1.4.1/MODULE.bazel": "8991ad45bdc25018301d6b7e1d3626afc3c8af8aaf4bc04f23d0b99c938b73a6", "https://bcr.bazel.build/modules/rules_python/1.6.0/MODULE.bazel": "7e04ad8f8d5bea40451cf80b1bd8262552aa73f841415d20db96b7241bd027d8", - "https://bcr.bazel.build/modules/rules_python/1.6.3/MODULE.bazel": "a7b80c42cb3de5ee2a5fa1abc119684593704fcd2fec83165ebe615dec76574f", - "https://bcr.bazel.build/modules/rules_python/1.6.3/source.json": "f0be74977e5604a6526c8a416cda22985093ff7d5d380d41722d7e44015cc419", + "https://bcr.bazel.build/modules/rules_python/1.7.0/MODULE.bazel": "d01f995ecd137abf30238ad9ce97f8fc3ac57289c8b24bd0bf53324d937a14f8", + "https://bcr.bazel.build/modules/rules_python/1.7.0/source.json": "028a084b65dcf8f4dc4f82f8778dbe65df133f234b316828a82e060d81bdce32", "https://bcr.bazel.build/modules/rules_robolectric/4.14.1.2/MODULE.bazel": "d44fec647d0aeb67b9f3b980cf68ba634976f3ae7ccd6c07d790b59b87a4f251", "https://bcr.bazel.build/modules/rules_robolectric/4.14.1.2/source.json": "37c10335f2361c337c5c1f34ed36d2da70534c23088062b33a8bdaab68aa9dea", "https://bcr.bazel.build/modules/rules_shell/0.1.2/MODULE.bazel": "66e4ca3ce084b04af0b9ff05ff14cab4e5df7503973818bb91cbc6cda08d32fc", @@ -258,7 +259,7 @@ "//intellij_platform_sdk:extension.bzl%intellij_platform": { "general": { "bzlTransitiveDigest": "UjNym0BxUS4MaN8Wh8hjZtlBQJO29AuRlFxQOtEzySI=", - "usagesDigest": "j96E+NQfsVoyTdUfAcbkzA/uvNC2sH1XJXydnUCs7xk=", + "usagesDigest": "NZOTGQV6uDifj+ELZGWO5rTTG8xNyOEn6DE4iUsyWco=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -739,10 +740,245 @@ ] } }, + "@@rules_python+//python/extensions:config.bzl%config": { + "general": { + "bzlTransitiveDigest": "xaCns8Qt+8bJqVLy8r6nc/eL2AjEIX/vOdjqoh5xYac=", + "usagesDigest": "ZVSXMAGpD+xzVNPuvF1IoLBkty7TROO0+akMapt1pAg=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "rules_python_internal": { + "repoRuleId": "@@rules_python+//python/private:internal_config_repo.bzl%internal_config_repo", + "attributes": { + "transition_setting_generators": {}, + "transition_settings": [] + } + }, + "pypi__build": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/e2/03/f3c8ba0a6b6e30d7d18c40faab90807c9bb5e9a1e3b2fe2008af624a9c97/build-1.2.1-py3-none-any.whl", + "sha256": "75e10f767a433d9a86e50d83f418e83efc18ede923ee5ff7df93b6cb0306c5d4", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__click": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", + "sha256": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__colorama": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", + "sha256": "4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__importlib_metadata": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/2d/0a/679461c511447ffaf176567d5c496d1de27cbe34a87df6677d7171b2fbd4/importlib_metadata-7.1.0-py3-none-any.whl", + "sha256": "30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__installer": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/e5/ca/1172b6638d52f2d6caa2dd262ec4c811ba59eee96d54a7701930726bce18/installer-0.7.0-py3-none-any.whl", + "sha256": "05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__more_itertools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/50/e2/8e10e465ee3987bb7c9ab69efb91d867d93959095f4807db102d07995d94/more_itertools-10.2.0-py3-none-any.whl", + "sha256": "686b06abe565edfab151cb8fd385a05651e1fdf8f0a14191e4439283421f8684", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__packaging": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/49/df/1fceb2f8900f8639e278b056416d49134fb8d84c5942ffaa01ad34782422/packaging-24.0-py3-none-any.whl", + "sha256": "2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pep517": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/25/6e/ca4a5434eb0e502210f591b97537d322546e4833dcb4d470a48c375c5540/pep517-0.13.1-py3-none-any.whl", + "sha256": "31b206f67165b3536dd577c5c3f1518e8fbaf38cbc57efff8369a392feff1721", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pip": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl", + "sha256": "ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pip_tools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/0d/dc/38f4ce065e92c66f058ea7a368a9c5de4e702272b479c0992059f7693941/pip_tools-7.4.1-py3-none-any.whl", + "sha256": "4c690e5fbae2f21e87843e89c26191f0d9454f362d8acdbd695716493ec8b3a9", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pyproject_hooks": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/ae/f3/431b9d5fe7d14af7a32340792ef43b8a714e7726f1d7b69cc4e8e7a3f1d7/pyproject_hooks-1.1.0-py3-none-any.whl", + "sha256": "7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__setuptools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/90/99/158ad0609729111163fc1f674a5a42f2605371a4cf036d0441070e2f7455/setuptools-78.1.1-py3-none-any.whl", + "sha256": "c3a9c4211ff4c309edb8b8c4f1cbfa7ae324c4ba9f91ff254e3d305b9fd54561", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__tomli": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl", + "sha256": "939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__wheel": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/7d/cd/d7460c9a869b16c3dd4e1e403cce337df165368c71d6af229a74699622ce/wheel-0.43.0-py3-none-any.whl", + "sha256": "55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__zipp": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/da/55/a03fd7240714916507e1fcf7ae355bd9d9ed2e6db492595f1a67f61681be/zipp-3.18.2-py3-none-any.whl", + "sha256": "dce197b859eb796242b0622af1b8beb0a722d52aa2f57133ead08edd5bf5374e", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "rules_python+", + "bazel_tools", + "bazel_tools" + ], + [ + "rules_python+", + "pypi__build", + "rules_python++config+pypi__build" + ], + [ + "rules_python+", + "pypi__click", + "rules_python++config+pypi__click" + ], + [ + "rules_python+", + "pypi__colorama", + "rules_python++config+pypi__colorama" + ], + [ + "rules_python+", + "pypi__importlib_metadata", + "rules_python++config+pypi__importlib_metadata" + ], + [ + "rules_python+", + "pypi__installer", + "rules_python++config+pypi__installer" + ], + [ + "rules_python+", + "pypi__more_itertools", + "rules_python++config+pypi__more_itertools" + ], + [ + "rules_python+", + "pypi__packaging", + "rules_python++config+pypi__packaging" + ], + [ + "rules_python+", + "pypi__pep517", + "rules_python++config+pypi__pep517" + ], + [ + "rules_python+", + "pypi__pip", + "rules_python++config+pypi__pip" + ], + [ + "rules_python+", + "pypi__pip_tools", + "rules_python++config+pypi__pip_tools" + ], + [ + "rules_python+", + "pypi__pyproject_hooks", + "rules_python++config+pypi__pyproject_hooks" + ], + [ + "rules_python+", + "pypi__setuptools", + "rules_python++config+pypi__setuptools" + ], + [ + "rules_python+", + "pypi__tomli", + "rules_python++config+pypi__tomli" + ], + [ + "rules_python+", + "pypi__wheel", + "rules_python++config+pypi__wheel" + ], + [ + "rules_python+", + "pypi__zipp", + "rules_python++config+pypi__zipp" + ] + ] + } + }, "@@rules_python+//python/uv:uv.bzl%uv": { "general": { - "bzlTransitiveDigest": "PmZM/pIkZKEDDL68TohlKJrWPYKL5VwUw3MA7kmm6fk=", - "usagesDigest": "icnInV8HDGrRQf9x8RMfxWfBHgT3OgRlYovS/9POEJw=", + "bzlTransitiveDigest": "N8SCcKcL6KnzBLApxvY2jR9vhXjA2VCBZMLZfY3sDRA=", + "usagesDigest": "H8dQoNZcoqP+Mu0tHZTi4KHATzvNkM5ePuEqoQdklIU=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, diff --git a/maven_install.json b/maven_install.json index f9977d8ff8e..d8719cac0f5 100755 --- a/maven_install.json +++ b/maven_install.json @@ -1,7 +1,7 @@ { "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": -2046140714, - "__RESOLVED_ARTIFACTS_HASH": 1011897224, + "__INPUT_ARTIFACTS_HASH": -995535065, + "__RESOLVED_ARTIFACTS_HASH": 1985540921, "conflict_resolution": { "com.google.auto.value:auto-value-annotations:1.10.2": "com.google.auto.value:auto-value-annotations:1.11.0", "com.google.code.gson:gson:2.8.9": "com.google.code.gson:gson:2.10.1", @@ -165,6 +165,24 @@ }, "version": "2.1.21" }, + "org.jetbrains.kotlinx:kotlinx-serialization-core-jvm": { + "shasums": { + "jar": "d3c94e9d829bba6e0c4cd3ae478a40846dd49d5475d6707877be853976afe416" + }, + "version": "1.8.0" + }, + "org.jetbrains.kotlinx:kotlinx-serialization-json": { + "shasums": { + "jar": "faabc73e856bc9eac97ba19d3df4fc4ae87e14e2add0765c7041bc72ea47a1bb" + }, + "version": "1.8.0" + }, + "org.jetbrains.kotlinx:kotlinx-serialization-json-jvm": { + "shasums": { + "jar": "7b7c445880cef94dc464f4733da1b33b94bee78805041ea08ae06e8507e4620e" + }, + "version": "1.8.0" + }, "org.jetbrains.pty4j:pty4j": { "shasums": { "jar": "7c32981abb52efa20560ffbc506d160cb5c8c213e302decfeb5de86a845e7738" @@ -258,6 +276,16 @@ "org.jetbrains.kotlin:kotlin-stdlib": [ "org.jetbrains:annotations" ], + "org.jetbrains.kotlinx:kotlinx-serialization-core-jvm": [ + "org.jetbrains.kotlin:kotlin-stdlib" + ], + "org.jetbrains.kotlinx:kotlinx-serialization-json": [ + "org.jetbrains.kotlinx:kotlinx-serialization-json-jvm" + ], + "org.jetbrains.kotlinx:kotlinx-serialization-json-jvm": [ + "org.jetbrains.kotlin:kotlin-stdlib", + "org.jetbrains.kotlinx:kotlinx-serialization-core-jvm" + ], "org.jetbrains.pty4j:pty4j": [ "net.java.dev.jna:jna", "net.java.dev.jna:jna-platform", @@ -626,6 +654,18 @@ "kotlin.time.jdk8", "kotlin.uuid" ], + "org.jetbrains.kotlinx:kotlinx-serialization-core-jvm": [ + "kotlinx.serialization", + "kotlinx.serialization.builtins", + "kotlinx.serialization.descriptors", + "kotlinx.serialization.encoding", + "kotlinx.serialization.internal", + "kotlinx.serialization.modules" + ], + "org.jetbrains.kotlinx:kotlinx-serialization-json-jvm": [ + "kotlinx.serialization.json", + "kotlinx.serialization.json.internal" + ], "org.jetbrains.pty4j:pty4j": [ "com.pty4j", "com.pty4j.unix", @@ -765,6 +805,9 @@ "org.hamcrest:hamcrest", "org.hamcrest:hamcrest-core", "org.jetbrains.kotlin:kotlin-stdlib", + "org.jetbrains.kotlinx:kotlinx-serialization-core-jvm", + "org.jetbrains.kotlinx:kotlinx-serialization-json", + "org.jetbrains.kotlinx:kotlinx-serialization-json-jvm", "org.jetbrains.pty4j:pty4j", "org.jetbrains:annotations", "org.jspecify:jspecify", diff --git a/tools/maintenance/BUILD b/tools/maintenance/BUILD index 8b2a0b6d348..cc6659cf0f6 100644 --- a/tools/maintenance/BUILD +++ b/tools/maintenance/BUILD @@ -20,7 +20,8 @@ kt_jvm_library( srcs = ["maintenance.kt"], deps = [ "@maven//:com_google_guava_guava", - "@maven//:org_jetbrains_kotlin_kotlin_stdlib" + "@maven//:org_jetbrains_kotlin_kotlin_stdlib", + "@maven//:org_jetbrains_kotlinx_kotlinx_serialization_json", ], ) diff --git a/tools/maintenance/maintenance.kt b/tools/maintenance/maintenance.kt index 939c927efc4..d8e733fb60a 100644 --- a/tools/maintenance/maintenance.kt +++ b/tools/maintenance/maintenance.kt @@ -14,6 +14,10 @@ * limitations under the License. */ import com.google.common.io.BaseEncoding +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.jsonArray +import kotlinx.serialization.json.jsonObject +import kotlinx.serialization.json.jsonPrimitive import org.w3c.dom.Node import org.w3c.dom.NodeList import java.io.BufferedInputStream @@ -21,144 +25,87 @@ import java.net.URL import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths -import java.nio.file.StandardCopyOption +import java.nio.file.StandardOpenOption import java.security.MessageDigest import javax.xml.parsers.DocumentBuilderFactory // Usage: bazel run //tools/maintenance -- $PWD/MODULE.bazel && cp MODULE.bazel.out MODULE.bazel -fun main(args: Array) { - val out = Paths.get("${args[0]}.out") - Files.copy(Paths.get(args[0]), out, StandardCopyOption.REPLACE_EXISTING) +fun main(args: Array) { + var content = Files.readString(Path.of(args[0])) - // Example for 252: - // bumpEap("252", out) - // bumpPlugins("252", out) - // bumpRelease("2025.2", "252", out) -} - -fun bumpMavenPackages(coordinates: String, variablePrefix: String, out: Path) { - val latestVersion = latestVersion(coordinates) - val packageName = coordinates.split( ":").last() - val jarUrl = "https://repo1.maven.org/maven2/${coordinates.replace(":", "/").replace(".", "/")}/$latestVersion/$packageName-$latestVersion.jar" - val sha = shaOfUrl(jarUrl) - val content = Files.readString(out) - .insertWorkspaceValue("${variablePrefix}_ARTIFACT", "$coordinates:$latestVersion") - .insertWorkspaceValue("${variablePrefix}_SHA", sha) - Files.writeString(out, content) -} + content = bumpSdk("253", eap = true, content) + content = bumpPythonPlugin("253", content) + content = bumpSdk("2025.2", eap = false, content) + content = bumpPythonPlugin("252", content) + content = bumpSdk("2025.1", eap = false, content) + content = bumpPythonPlugin("251", content) -private fun latestVersion(coordinates: String): String { - val metadataAddress = "https://repo1.maven.org/maven2/${coordinates.replace(".", "/").replace(":", "/")}/maven-metadata.xml" - val metadata = URL(metadataAddress).readText() - val builder = DocumentBuilderFactory.newInstance().newDocumentBuilder() - val plugins = builder.parse(metadata.byteInputStream()).documentElement.getElementsByTagName("versioning") - return plugins.item(0).childNodes.toList().first { it.nodeName == "latest" }.firstChild.nodeValue + Files.writeString(Paths.get("${args[0]}.out"), content, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING) } -fun bumpRelease(version: String, major: String, out: Path) { - val releasesPage = URL("https://www.jetbrains.com/intellij-repository/releases").readText(); - val clionRelease = latestRelease(version, releasesPage, "clion") +private fun bumpSdk(majorVersion: String, eap: Boolean, input: String): String { + val version = getLatestSdkVersion(majorVersion, eap) + val repository = if (eap) "snapshots" else "releases" + val url = "https://www.jetbrains.com/intellij-repository/$repository/com/jetbrains/intellij/clion/clion/$version/clion-$version.zip" - bump( - workspaceShaVarName = "CLION_${major}_SHA", - workspaceUrlVarName = "CLION_${major}_URL", - downloadUrl = clionRelease, - workspace = out, - ) - println(clionRelease) + return bump("clion", majorVersion, version, getSha256(url), input) } -private fun bumpEap(intellijMajorVersion: String, out: Path) { - val clionLatestVersion = getLatestVersion("clion", intellijMajorVersion) +private fun bumpPythonPlugin(majorVersion: String, input: String): String { + val version = getLatestPluginVersion(7322, majorVersion) + val url = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/PythonCore/$version/PythonCore-$version.zip" - println(clionLatestVersion) - bump( - workspaceShaVarName = "CLION_${intellijMajorVersion}_SHA", - workspaceUrlVarName = "CLION_${intellijMajorVersion}_URL", - downloadUrl = "https://www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/clion/clion/${clionLatestVersion}-EAP-SNAPSHOT/clion-${clionLatestVersion}-EAP-SNAPSHOT.zip", - workspace = out, - ) - println(out.toAbsolutePath()) + return bump("PythonCore", majorVersion, version, getSha256(url), input) } -private fun bumpPlugins(intellijMajorVersion: String, out: Path) { - bumpPluginVersion(intellijMajorVersion, out, "PythonCore", "PYTHON_PLUGIN") -} - -private fun bumpPluginVersion(intellijMajorVersion: String, out: Path, mavenCoordinates: String, pythonPluginVarPrefix: String) { - val pluginVersion = pluginLatestVersion(mavenCoordinates, intellijMajorVersion) - bump( - workspaceShaVarName = "${pythonPluginVarPrefix}_${intellijMajorVersion}_SHA", - workspaceUrlVarName = "${pythonPluginVarPrefix}_${intellijMajorVersion}_URL", - downloadUrl = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/$mavenCoordinates/${pluginVersion}/$mavenCoordinates-${pluginVersion}.zip", - workspace = out - ) -} - -private fun bump(downloadUrl: String, workspace: Path?, workspaceShaVarName: String, workspaceUrlVarName: String) { - val regex = "$workspaceUrlVarName = \"(.*)\"".toRegex() - val currentURL = regex.find(Files.readString(workspace))?.destructured?.toList()?.firstOrNull() - if(currentURL == null) { - println("Couldn't bump $workspaceUrlVarName") - return +private fun bump(name: String, majorVersion: String, version: String, sha256: String, input: String): String { + return input + .replace( // replace the version + """(intellij_platform\.(sdk|plugin)[^)]*name = "$name"[^)]*version = ")($majorVersion[^"]*)""".toRegex() + ) { result -> + "${result.groupValues[1]}$version" } - if(currentURL == downloadUrl) { - println("${Paths.get(currentURL).fileName} is up to date"); - return + .replace( // replace the sha256 + """(intellij_platform\.(sdk|plugin)[^)]*name = "$name"[^)]*sha256 = ")([^"]+)("[^)]*version = "$version")""".toRegex() + ) { result -> + "${result.groupValues[1]}$sha256${result.groupValues[4]}" } - val icSha = shaOfUrl(downloadUrl) - val content = Files.readString(workspace) - .insertWorkspaceValue(workspaceShaVarName, icSha) - .insertWorkspaceValue(workspaceUrlVarName, downloadUrl) - Files.writeString(workspace, content) } -private fun shaOfUrl(icUrl: String): String { - val icStream = BufferedInputStream(URL(icUrl).openStream()) - val digest = MessageDigest.getInstance("SHA-256") - var index = 0L // iterator's withIndex uses int instead of long - icStream.iterator().forEachRemaining { - index += 1 - digest.update(it) - if (index % 10000000 == 0L) { - println("${index / 1024 / 1024} mb of ${URL(icUrl).file.split("/").last()} processed") - } +private fun getSha256(url: String): String { + val icStream = BufferedInputStream(URL(url).openStream()) + val digest = MessageDigest.getInstance("SHA-256") + var index = 0L // iterator's withIndex uses int instead of long + icStream.iterator().forEachRemaining { + index += 1 + digest.update(it) + if (index % 10000000 == 0L) { + println("${index / 1024 / 1024} mb of ${URL(url).file.split("/").last()} processed") } - val sha256sum = digest.digest(icStream.readAllBytes()) - return BaseEncoding.base16().encode(sha256sum).lowercase() + } + val sha256sum = digest.digest(icStream.readAllBytes()) + return BaseEncoding.base16().encode(sha256sum).lowercase() } -private fun getLatestVersion(product: String, major: String): String { - val ijVersionUrl = URL("https://www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/$product/BUILD/$major-EAP-SNAPSHOT/BUILD-$major-EAP-SNAPSHOT.txt") - return BufferedInputStream(ijVersionUrl.openStream()).reader().readText() -} +private fun getLatestSdkVersion(major: String, eap: Boolean): String { + if (eap) { + val version = + URL("https://www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/clion/BUILD/$major-EAP-SNAPSHOT/BUILD-$major-EAP-SNAPSHOT.txt").readText() + return "$version-EAP-SNAPSHOT" + } -private fun latestRelease(version: String, releasesPage: String, product: String): String { - val productFamily = when(product) { - "clion" -> "clion" - else -> throw RuntimeException("No such product: $product") - } - return "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/$productFamily/$product/$version\\.?(\\d*)\\.?(\\d*)/$product-$version\\.?(\\d*)\\.?(\\d*).zip".toRegex() - .findAll(releasesPage).maxWith(compareBy({ it.groupValues[1].toIntOrNull() ?: 0 }, { it.groupValues[2].toIntOrNull() ?: 0 })) - .value -} + val latestRelease = + URL("https://data.services.jetbrains.com/products/releases?code=CL&type=release&majorVersion=$major&latest=true").readText() -fun pluginLatestVersion(pluginId: String, major: String): String? { - val pluginListUrl = URL("https://plugins.jetbrains.com/plugins/list?pluginId=$pluginId").readText() - val builder = DocumentBuilderFactory.newInstance().newDocumentBuilder() - val plugins: NodeList = builder.parse(pluginListUrl.byteInputStream()).documentElement.childNodes.item(1).childNodes - val compatiblePlugin = plugins.toList().firstOrNull {plugin -> - val ideaVersionNode = plugin.childNodes.toList().first{ it.nodeName == "idea-version" } - val until = ideaVersionNode.attributes.getNamedItem("until-build") - until.nodeValue.startsWith("${major}.") - } - val pluginVersion = compatiblePlugin?.childNodes?.toList()?.firstOrNull { it.nodeName == "version" } - return pluginVersion?.childNodes?.toList()?.first()?.nodeValue + val json = Json.parseToJsonElement(latestRelease).jsonObject + val clArray = json["CL"]?.jsonArray ?: error("CL array not found") + return clArray[0].jsonObject["version"]?.jsonPrimitive?.content ?: error("Version not found") } -fun String.insertWorkspaceValue(workspaceShaVarName: String, icSha: String): String = - this.replace("$workspaceShaVarName =.*".toRegex(), """$workspaceShaVarName = "$icSha"""") +fun getLatestPluginVersion(pluginId: Int, major: String): String { + val text = URL("https://plugins.jetbrains.com/api/plugins/$pluginId/updates").readText() -fun NodeList.toList(): List { - return (0 until this.length).map { this.item(it) } + return Json.parseToJsonElement(text).jsonArray + .mapNotNull { it.jsonObject["version"]?.jsonPrimitive?.content } + .first { it.startsWith(major) } }