Skip to content

feat(types): типы объектов XDTO-пакетов и фабрика XDTO - #4381

Merged
nixel2007 merged 10 commits into
developfrom
feat/types-xdto-packages
Aug 3, 2026
Merged

feat(types): типы объектов XDTO-пакетов и фабрика XDTO#4381
nixel2007 merged 10 commits into
developfrom
feat/types-xdto-packages

Conversation

@nixel2007

@nixel2007 nixel2007 commented Aug 2, 2026

Copy link
Copy Markdown
Member

Пункт 3.26 рекомендации «Типизация кода»: тип можно задать ссылкой на объект XDTO-пакета.

// Параметры:
//  Объект - См. XDTOПакет.КонтактнаяИнформация.Адрес
Процедура ОбработкаОбъекта(Объект)
	Страна = Объект.Страна;

Так пишут и в реальном коде: в ssl_3_1 такие ссылки стоят и на возвращаемом значении (см. XDTOПакет.КонтактнаяИнформация.КонтактнаяИнформация), и в строке (Состав = XDTOКонтактнаяИнформация.Состав; // см. XDTOПакет.КонтактнаяИнформация.Адрес).

Что было

Тип не выводился вовсе: XDTO-пакеты в систему типов не попадали. Причин две.

  1. Конфигурация читалась с skipXdtoPackage(true), поэтому у пакета были только имя и пространство имён, а схема из Ext/Package.bin не разбиралась. Флаг снят.
  2. Платформенной части XDTO (ОбъектXDTO, ФабрикаXDTO, ТипОбъектаXDTO, …) не было в словаре встроенных типов. Синтакс-помощник её отдаёт — проверено на HBK 8.3.26 через bsl-context, — но он есть не в каждой установке, а в тестах отключён.

Что сделано

XdtoTypesProvider заводит тип на каждый объектный тип пакета — под тем же именем, что пишут в ссылке: XDTOПакет.<Пакет>.<Тип> (англоязычный псевдоним XDTOPackage.<Пакет>.<Тип>). Благодаря этому ссылка разрешается реестром напрямую, отдельной нотации не нужно.

Члены типа — свойства из схемы пакета, считаются лениво: в крупных конфигурациях объектных типов десятки тысяч. Типы свойств:

  • имена XML-схемы отображаются в примитивы 1С (xs:stringСтрока, xs:dateTimeДата, xs:decimalЧисло, xs:booleanБулево, xs:base64BinaryДвоичныеДанные);
  • простой тип пакета (<valueType name="ТипИндекса" base="xs:decimal"/>) читается по своей базе;
  • ссылка на тип того же пакета — в его зарегистрированный тип;
  • свойство без типа остаётся произвольным.

Наследование base внутри пакета переносится в реестр, платформенная часть подмешивается от ОбъектXDTO.

В словарь встроенных типов добавлены ОбъектXDTO, ЗначениеXDTO, СписокXDTO, ТипОбъектаXDTO, ТипЗначенияXDTO, ФабрикаXDTO (состав снят с HBK 8.3.26) и глобальная переменная ФабрикаXDTO.

Цена

Чтение конфигурации ssl_3_1 (56 пакетов, 21 МБ схем, 14 826 объектных типов) — замер на трёх прогонах:

время чтения
со схемами XDTO 3.1–3.6 с
без схем (как было) 2.9 с

То есть +0.2…0.7 с однократно при загрузке конфигурации. Память не мерил.

Проверки

XdtoPackageTypesTest: ссылка на объектный тип даёт этот тип; свойства типизированы по схеме (строка, булево, число через простой тип пакета); свойство типа того же пакета даёт его тип, и через него доступны его свойства. В тестовую конфигурацию добавлен пакет ПакетТест.

Прогоны *types.*, *context.*, *BuiltinTypesJsonLoaderTest, *GlobalScope* — зелёные.

Фабрика XDTO (пункты 3.27 и 3.28)

ФабрикаXDTO.Тип(URI, Имя) отдаёт дескриптор ТипОбъектаXDTO, помеченный найденным типом объекта (как коллекция помечается типом элемента), а ФабрикаXDTO.Создать(Тип) эту пометку снимает и отдаёт сам тип объекта — так типизируется код без ссылок в комментариях. Пакет ищется по пространству имён: в ссылке пишут имя пакета, в коде — URI.

Когда пространство имён вычисляется в рантайме, литерала нет и пометки не возникает — тогда тип задаётся строчной ссылкой (// См. XDTOПакет.Пакет.Тип), и работает общий механизм типизирующих комментариев: он расчётный тип не заменяет, а дополняет.

Покрыто тестами factoryCreatesObjectOfTypeAddressedByNamespace и inlineSeeRefTypesObjectWhenNamespaceIsComputed.

Summary by CodeRabbit

  • New Features

    • Added support for resolving types from configuration XDTO packages, including properties, inheritance, aliases, and qualified names.
    • Added built-in XDTO platform types and the ФабрикаXDTO / XDTOFactory global.
    • Added type inference for XDTO factory operations, including type lookup and object creation.
    • XDTO package metadata is now included when reading solution information.
    • Added completion suggestions for XDTO object properties, methods, and nested package types.
  • Tests

    • Added coverage for XDTO type references, schema-derived properties, chained access, factory-created objects, and completion suggestions.

Ссылка «См. XDTOПакет.<Пакет>.<Тип>» разрешается в тип: на каждый объектный тип
пакета заводится тип с тем же именем, что пишут в ссылке, а его члены — свойства
из схемы пакета. Имена XML-схемы отображаются в примитивы 1С, простые типы пакета
читаются по их базе, ссылки на типы пакета — в его типы.

Схемы пакетов больше не пропускаются при чтении конфигурации: без них у пакета
есть только имя и пространство имён. На ssl_3_1 (56 пакетов, 14826 объектных
типов) чтение конфигурации дорожает с ~2.9 до ~3.1-3.6 с.

Платформенная часть XDTO (ОбъектXDTO, ФабрикаXDTO, типы и списки) добавлена
в словарь встроенных типов: синтакс-помощник её отдаёт, но он есть не везде.
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change adds built-in XDTO types, registers XDTO package object types from configuration metadata, preserves described type metadata, and infers types from XDTO factory calls. Tests cover references, schema properties, chained access, factory creation, and completion.

Changes

XDTO type inference

Layer / File(s) Summary
XDTO platform contracts
src/main/resources/.../builtin-globals.json, src/main/resources/.../builtin-platform-types.json
Adds the ФабрикаXDTO global and built-in XDTO object, value, collection, metadata, and factory types.
XDTO package provider
src/main/java/.../XdtoTypesProvider.java, src/main/java/.../ConfigurationTypesProvider.java
Registers configuration XDTO packages, object types, inheritance, aliases, display names, and lazily resolved members.
Described type metadata
src/main/java/.../TypeSet.java, src/main/java/.../OpenDataObjectInference.java
Stores described type associations in TypeSet and uses them during type-description and column inference.
XDTO factory inference
src/main/java/.../XdtoFactoryInference.java, src/main/java/.../ExpressionTypeInferencer.java
Resolves localized XDTO factory calls and uses the resolved object types during expression inference.
XDTO type resolution and completion tests
src/test/java/.../XdtoPackageTypesTest.java, src/test/java/.../XdtoPackageCompletionTest.java, src/test/java/.../TypeDescriptionConstructorInferenceTest.java, src/test/java/.../ConfigurationTypesProviderHelpersTest.java
Tests package references, schema-derived properties, chained access, factory creation, computed namespaces, completion, described types, and provider wiring.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ConfigurationTypesProvider
  participant XdtoTypesProvider
  participant TypeRegistry
  participant ExpressionTypeInferencer
  participant XdtoFactoryInference
  ConfigurationTypesProvider->>XdtoTypesProvider: register configuration XDTO packages
  XdtoTypesProvider->>TypeRegistry: register object types and members
  ExpressionTypeInferencer->>XdtoFactoryInference: refine XDTO factory call
  XdtoFactoryInference->>XdtoTypesProvider: resolve namespace and type
  XdtoTypesProvider-->>XdtoFactoryInference: return resolved object type
  XdtoFactoryInference-->>ExpressionTypeInferencer: return refined type set
Loading

Possibly related PRs

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: support for XDTO package object types and the XDTO factory.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/types-xdto-packages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json`:
- Around line 6103-6109: Register the missing XDTO return types referenced by
ObjectXDTO, ТипОбъектаXDTO, and ФабрикаXDTO: СвойствоXDTO,
ПоследовательностьXDTO, КоллекцияСвойствXDTO, and КоллекцияПакетовXDTO. Add
corresponding kind TYPE entries in the builtin platform type registry, or update
the affected method returnType values to existing registered types while
preserving their intended API types.

In
`@src/test/java/com/github/_1c_syntax/bsl/languageserver/types/XdtoPackageTypesTest.java`:
- Around line 127-135: Update the at helper’s Position construction to use the
zero-based character offset required by Position, removing the extra +1 from the
column calculation while preserving the existing line calculation and target
offset handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c80e7b95-e19a-4524-84cb-85d6e4dcf18b

📥 Commits

Reviewing files that changed from the base of the PR and between 7f1e814 and d7d063e.

⛔ Files ignored due to path filters (3)
  • src/test/resources/metadata/designer/Configuration.xml is excluded by !src/test/resources/**
  • src/test/resources/metadata/designer/XDTOPackages/ПакетТест.xml is excluded by !src/test/resources/**
  • src/test/resources/metadata/designer/XDTOPackages/ПакетТест/Ext/Package.bin is excluded by !**/*.bin, !src/test/resources/**
📒 Files selected for processing (7)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/context/ServerContext.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/ConfigurationTypesProvider.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/XdtoTypesProvider.java
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-globals.json
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/XdtoPackageTypesTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/registry/ConfigurationTypesProviderHelpersTest.java
💤 Files with no reviewable changes (1)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/context/ServerContext.java

«ФабрикаXDTO.Тип(URI, Имя)» отдаёт дескриптор, помеченный найденным типом объекта,
а «Создать(Тип)» эту пометку снимает — так пишут, когда пакет адресуется в коде,
без ссылок в комментариях. Пакет ищется по пространству имён: в ссылке пишут имя
пакета, в коде — URI, поэтому провайдер держит связку одного с другим.

Когда пространство имён вычисляется, литерала нет и пометки не возникает: тип
задаётся строчной ссылкой на объект пакета, и работает общий механизм комментариев.
@nixel2007 nixel2007 changed the title feat(types): типы объектов XDTO-пакетов конфигурации feat(types): типы объектов XDTO-пакетов и фабрика XDTO Aug 2, 2026
Свойства схемы видны после точки и у параметра со ссылкой на объект пакета,
и у объекта, созданного фабрикой, и у вложенного свойства-объекта.
Словарь встроенных типов работает заменителем синтакс-помощника там, где его нет,
поэтому объявления должны совпадать с платформенными: «Создать» возвращает
ЗначениеXDTO, «Тип» — ТипЗначенияXDTO, ТипОбъектаXDTO либо Неопределено.
«Создать» создаёт значение по типу значения (из значения либо по лексическому
представлению) и объект — по типу объекта, поэтому возврат у метода составной,
а у каждой сигнатуры свой. «Тип» ищется по URI и имени, по расширенному имени XML
либо по типу данных XML. Состав снят с синтакс-помощника.
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Test Results

 3 984 files  +12   3 984 suites  +12   44m 26s ⏱️ - 2m 52s
 4 130 tests + 8   4 059 ✅ + 8   71 💤 ±0  0 ❌ ±0 
24 780 runs  +48  24 350 ✅ +48  430 💤 ±0  0 ❌ ±0 

Results for commit c86caa8. ± Comparison against base commit 7f1e814.

This pull request removes 3 and adds 11 tests. Note that renamed tests count towards both.
com.github._1c_syntax.bsl.languageserver.types.TypeDescriptionConstructorInferenceTest ‑ multipleTypesPopulateElementTypes()
com.github._1c_syntax.bsl.languageserver.types.TypeDescriptionConstructorInferenceTest ‑ singleTypeStringPopulatesElementTypes()
com.github._1c_syntax.bsl.languageserver.types.TypeDescriptionConstructorInferenceTest ‑ unknownTypeNameInLiteralProducesNoElementType()
com.github._1c_syntax.bsl.languageserver.types.TypeDescriptionConstructorInferenceTest ‑ multipleTypesPopulateDescribedTypes()
com.github._1c_syntax.bsl.languageserver.types.TypeDescriptionConstructorInferenceTest ‑ singleTypeStringPopulatesDescribedTypes()
com.github._1c_syntax.bsl.languageserver.types.TypeDescriptionConstructorInferenceTest ‑ unknownTypeNameInLiteralProducesNoDescribedType()
com.github._1c_syntax.bsl.languageserver.types.XdtoPackageCompletionTest ‑ completionAfterDotOnFactoryCreatedObjectListsSchemaProperties()
com.github._1c_syntax.bsl.languageserver.types.XdtoPackageCompletionTest ‑ completionAfterDotOnReferencedObjectListsSchemaProperties()
com.github._1c_syntax.bsl.languageserver.types.XdtoPackageCompletionTest ‑ completionOnNestedPackageTypeListsItsProperties()
com.github._1c_syntax.bsl.languageserver.types.XdtoPackageTypesTest ‑ factoryCreatesObjectOfTypeAddressedByNamespace()
com.github._1c_syntax.bsl.languageserver.types.XdtoPackageTypesTest ‑ inlineSeeRefTypesObjectWhenNamespaceIsComputed()
com.github._1c_syntax.bsl.languageserver.types.XdtoPackageTypesTest ‑ propertyOfPackageTypeGivesThatType()
com.github._1c_syntax.bsl.languageserver.types.XdtoPackageTypesTest ‑ seeRefToXdtoObjectTypeGivesItsType()
…

♻️ This comment has been updated with latest results.

«Новый ОписаниеТипов(…)» и «ФабрикаXDTO.Тип(…)» — значения-описатели: они несут
типы, о которых говорят, но сами ими не являются. Раньше эти типы клались в
элементы коллекции, и обход описателя выдавал их так, будто он коллекция.

Теперь у набора есть отдельная декорация describedTypes со своими withDescribed
и getDescribedTypes; читают её «ПривестиЗначение», «ФабрикаXDTO.Создать» и разбор
колонок таблицы значений.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/OpenDataObjectInference.java (1)

246-276: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update stale "types элементов" references after the described-types refactor. This PR moves type-description content from elementTypes to the dedicated describedTypes map (TypeSet.withDescribed/getDescribedTypes), but three comments in this file still describe the old storage location.

  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/OpenDataObjectInference.java#L246-L276: update the Javadoc for applyTypeDescriptionTypes — it still says names are attached "как типы элементов," but the method calls base.withDescribed(...).
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/OpenDataObjectInference.java#L278-L307: update the Javadoc for adjustedValueTypes — it still says the composition "лежит в типах элементов," but the method calls receiver.getDescribedTypes(ref).
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/OpenDataObjectInference.java#L461-L512: update the inline comment in addedColumn — it still says the content "лежит в типах элементов," but the describedTypes() helper it relies on calls inferred.getDescribedTypes(ref).

As per coding guidelines, "keep documentation up to date with code changes."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/OpenDataObjectInference.java`
around lines 246 - 276, Update the stale documentation in
OpenDataObjectInference.java at lines 246-276, 278-307, and 461-512: revise the
Javadoc for applyTypeDescriptionTypes and adjustedValueTypes, plus the inline
comment in addedColumn, to describe describedTypes/withDescribed and
getDescribedTypes rather than element types; no code behavior changes are
needed.

Source: Coding guidelines

🧹 Nitpick comments (1)
src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json (1)

6396-6459: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add per-signature returnType for ФабрикаXDTO.Тип, matching Создать.

Создать declares a distinct "returnType" for each signature (ЗначениеXDTO, ЗначениеXDTO, ОбъектXDTO). Тип only declares the aggregate "returnTypes" at the method level, so the JSON signatures do not narrow the result type per overload. Add "returnType" entries to the Тип signatures, with ТипЗначенияXDTO for XML data-type signatures and the appropriate ТипОбъектаXDTO variants for URI/name and XML qualified name signatures.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json`
around lines 6396 - 6459, Add per-signature returnType fields to the
ФабрикаXDTO.Тип method: use ТипОбъектаXDTO for the URI/name and XML
qualified-name overloads, and ТипЗначенияXDTO for the XML data-type overload.
Keep the existing method-level returnTypes unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/OpenDataObjectInference.java`:
- Around line 246-276: Update the stale documentation in
OpenDataObjectInference.java at lines 246-276, 278-307, and 461-512: revise the
Javadoc for applyTypeDescriptionTypes and adjustedValueTypes, plus the inline
comment in addedColumn, to describe describedTypes/withDescribed and
getDescribedTypes rather than element types; no code behavior changes are
needed.

---

Nitpick comments:
In
`@src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json`:
- Around line 6396-6459: Add per-signature returnType fields to the
ФабрикаXDTO.Тип method: use ТипОбъектаXDTO for the URI/name and XML
qualified-name overloads, and ТипЗначенияXDTO for the XML data-type overload.
Keep the existing method-level returnTypes unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f9f3f366-224a-40a5-b507-d4f9da13298c

📥 Commits

Reviewing files that changed from the base of the PR and between e67387d and 8d060ed.

📒 Files selected for processing (6)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/OpenDataObjectInference.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/XdtoFactoryInference.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/TypeSet.java
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/TypeDescriptionConstructorInferenceTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/XdtoPackageCompletionTest.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/XdtoFactoryInference.java

Регистрация пакета разобрана на шаги, имена примитивов вынесены в константы,
сняты проверки на null у полей схемы — mdclasses их не отдаёт пустыми.
Уточнения вызова вынесены из refinedMemberTypes отдельным методом.

В словарь добавлены типы, на которые ссылались объявления XDTO: свойство,
последовательность, коллекции свойств и пакетов, сам пакет.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json`:
- Around line 6372-6374: Add Неопределено to the returnTypes for
ПолучитьСвойство in ПоследовательностьXDTO and Получить in КоллекцияСвойствXDTO,
using ["СвойствоXDTO", "Неопределено"] so inference preserves possible undefined
results. Apply the change at both affected sites in
src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json:6372-6374
and 6384-6386.
- Around line 6389-6399: Update the ПакетXDTO type definition by renaming the
Свойства member to КорневыеСвойства with the English name RootProperties, and
add a Зависимости member named Dependencies with return type
КоллекцияПакетовXDTO. Preserve the existing property kind and appropriate
descriptions.
- Around line 6365-6376: Update the ПоследовательностьXDTO type definition by
renaming the Получить member to ПолучитьЗначение and adding the
УстановитьЗначение, Добавить, and Удалить methods with the corresponding
platform API names and metadata. Preserve the existing Количество and
ПолучитьСвойство members.
- Around line 6351-6364: Extend the СвойствоXDTO members list with bilingual
metadata entries for ВозможноПустое, ЗначениеПоУмолчанию, and ТипВладелец.
Assign each member its documented XDTO return type and preserve the existing
PROPERTY metadata structure so completion and type inference expose all three
members.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 36f33dc6-ca25-4412-81f2-1874aeba3a40

📥 Commits

Reviewing files that changed from the base of the PR and between 8d060ed and 3e70e35.

📒 Files selected for processing (6)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/ExpressionTypeInferencer.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/XdtoFactoryInference.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/XdtoTypesProvider.java
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/XdtoPackageCompletionTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/XdtoPackageTypesTest.java
💤 Files with no reviewable changes (1)
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/XdtoPackageTypesTest.java
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/XdtoPackageCompletionTest.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/ExpressionTypeInferencer.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/XdtoFactoryInference.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/XdtoTypesProvider.java

Свойство, последовательность, коллекции и пакет описаны так, как их отдаёт
платформа: у последовательности «ПолучитьЗначение» вместо «Получить» и полный
набор операций, у пакета «КорневыеСвойства» и «Зависимости», у поисковых методов
в возврате есть «Неопределено».

Слияние декораций набора вынесено в два хелпера, объединение условий в mapRefs
разложено по смыслу, метод «все описанные типы» переименован, чтобы не спорить
с методом доступа записи.
Копирование, слияние, замена ключей и отбор устроены одинаково для всех декораций
и к самому значению отношения не имеют. Набор перестал быть сборником утилит,
а типы в лямбдах записаны явно.
Пакет модели помечен @NullMarked, карты декораций пустыми, а не null, — проверка
никогда не срабатывала.
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@nixel2007
nixel2007 merged commit 3449901 into develop Aug 3, 2026
37 checks passed
@nixel2007
nixel2007 deleted the feat/types-xdto-packages branch August 3, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant