Skip to content

feat(types): билингва-классификация, двуязычное отображение типов, специализация менеджеров, async-флаг#3952

Merged
nixel2007 merged 7 commits into
developfrom
fix/bilingual-mixed-script-names
May 27, 2026
Merged

feat(types): билингва-классификация, двуязычное отображение типов, специализация менеджеров, async-флаг#3952
nixel2007 merged 7 commits into
developfrom
fix/bilingual-mixed-script-names

Conversation

@sfaqer

@sfaqer sfaqer commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Билингва-классификация имён со встроенной латиницей — инвариант «есть кириллица ⟹ имя русское» (ЧтениеJSON, HTTPСоединение). Чинит выбор алиаса в completion (R159) и склейку двуязычных членов (R286); applyDocumentation переведён на orElseGet.
  • Двуязычное отображение типов — тип возврата/свойства в детали completion и имя конфигурационного типа теперь на языке интерфейса (Строка/String, СправочникМенеджер.X/CatalogManager.X). Специализация display-имени — структурная, через TypeRef.specialize (без парсинга скобок в LS).
  • Специализация generic-семейства для всех менеджеров MD — раньше платформенные members подмешивались только объектным типам; теперь и регистрам/перечислениям/журналам/критериям отбора и др. Добавлены FILTER_CRITERION, SETTINGS_STORAGE, WS_REFERENCE, INTEGRATION_SERVICE, INTEGRATION_SERVICE_CHANNEL.
  • async-флаг платформенных методовMemberDescriptor.async (из bsl-context 0.5.0, по суффиксу Асинх/Async); семантические токены навешивают модификатор Async, hover показывает метку. Закрывает prerequisite из feat(semantictokens): подсветка платформенных member-методов через accessCall #3950.

Зависимость bsl-context поднята до 0.5.0 (async-флаг + фикс извлечения заметок методов).

Test plan

  • ConfigurationTypesProviderTest, BuiltinPlatformTypesProviderTest, TypeRegistrySpecializationTest, CompletionProviderTest — зелёные
  • PlatformMemberHoverBuilderTest, *semantictokens.* — зелёные, регрессий нет
  • Новые тесты: классификация смешанных имён, двуязычный display, наследование платформенных методов менеджерами регистра/критерия, чтение async из JSON, hover-метка async
  • Компиляция и тесты против released bsl-context 0.5.0

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Hover and completion now label asynchronous methods; semantic highlighting marks async library methods.
    • Added new platform manager types for filter criteria and information register managers; new built-in async global function.
  • Improvements

    • Completion item details localize return types per configured language.
    • Improved bilingual name merging and bilingual display-name handling for configuration and specialized types.
  • Tests

    • Added tests for async markers, semantic tokens, bilingual merging, completion localization, and display-name specialization.

Review Change Stack

sfaqer and others added 4 commits May 27, 2026 10:12
Инвариант 1С: наличие кириллицы однозначно относит имя к русскому
(ЗаписатьJSON, ПрочитатьXML, HTTPСоединение), английские идентификаторы —
чистый ASCII. Правит две точки, где эвристика ru/en ломалась на
смешанных именах:

- CompletionProvider.isInConfiguredLanguage: EN-ветка больше не принимает
  русское имя со встроенной латиницей за английское (замечание R159).
- BuiltinPlatformTypesProvider.isBilingualPair: член со смешанным русским
  именем теперь склеивается со своей англоязычной парой (замечание R286).

Плюс applyDocumentation переведён на orElseGet (замечание ревью).

Тесты: склейка смешанных методов (ЗаписатьJSON/WriteJSON, ПрочитатьXML/
ReadXML) и сохранность латинского метода-одиночки (Flush).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
…урации

В английской локали тип возвращаемого значения/свойства в детали
completion-item и имя конфигурационного типа показывались по-русски.

- CompletionProvider.formatTypeName: тип берётся через
  typeService.displayName(ref, scriptVariant), а не из ru-стороны
  ref.simpleName() — Строка→String, Число→Number и т.п.
- TypeRegistry: registerDisplayName + перенос двуязычного display-имени
  на специализации (СправочникСсылка.X → CatalogRef.X). Подстановка
  структурная, через TypeRef.specialize (позиции placeholder'ов даёт
  bsl-context, ContextNames.placeholders); парсинга угловых скобок в LS нет.
- ConfigurationTypesProvider: явное двуязычное display-имя у менеджер-
  обёрток и коллекций (СправочникМенеджер.X / CatalogManager.X, Справочники /
  Catalogs).

Тесты: язык типа в детали completion; двуязычный display менеджера/коллекции;
структурная специализация en-имени из display-имени generic'а.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Платформенные members generic-семейства (Менеджер/Ссылка/Объект/Выборка/
Список/НаборЗаписей/КлючЗаписи) подмешивались только объектным MD-типам:
вызов registerFamilySpecializations был вложен в registerObjectAndRefTypes,
который отсеивает не-OBJECT_TYPES. У менеджеров регистров, перечислений,
журналов, констант, отчётов, обработок, последовательностей платформенных
методов не было — completion у «РегистрыСведений.X.» оставался пустым.

- Вынос registerFamilySpecializations в основной цикл — для всех MANAGER_TYPES.
- В MANAGER_TYPES добавлены FILTER_CRITERION, SETTINGS_STORAGE, WS_REFERENCE,
  INTEGRATION_SERVICE, INTEGRATION_SERVICE_CHANNEL (один placeholder, fullName
  совпадает с префиксом generic'а).
- builtin-platform-types.json: generic'и РегистрСведенийМенеджер.<Имя> и
  КритерийОтбораМенеджер.<Имя> для JSON-fallback без HBK.
- Тест-конфигурация: FilterCriteria/КритерийОтбора1 + регистрация в Configuration.xml.
- Тесты на наследование платформенных методов менеджерами регистра и критерия.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Платформенные async-методы (await-стиль 8.3.18+) теперь несут флаг async и
отражаются в UI — симметрично async-методам исходного кода.

- bsl-context 0.5.0: ContextMethod.isAsync() (флаг по суффиксу Асинх/Async).
- MemberDescriptor.async — новый компонент (старая 8-арг форма сохранена
  compat-конструктором, флаг протянут через with*/specialize).
- Маппинг: BslContextPlatformTypesProvider (из method.isAsync()),
  BuiltinPlatformTypesProvider (JSON-поле "async" + сохранение в mergePair).
- Семантические токены: PlatformGlobalMethodSemanticTokensSupplier и
  GlobalScopeSemanticTokensSupplier навешивают модификатор Async.
- Hover: метка «Асинхронный метод / Asynchronous method».

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 169a8d50-4cf8-4ea7-a75c-755d9afc2cab

📥 Commits

Reviewing files that changed from the base of the PR and between ade5876 and 177d415.

📒 Files selected for processing (4)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/semantictokens/GlobalScopeSemanticTokensSupplier.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/semantictokens/PlatformGlobalMethodSemanticTokensSupplier.java
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder_en.properties
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder_ru.properties
✅ Files skipped from review due to trivial changes (2)
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder_en.properties
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder_ru.properties
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/semantictokens/GlobalScopeSemanticTokensSupplier.java

📝 Walkthrough

Walkthrough

This PR adds async-method support and script-variant-aware type display: model gains an async flag, async is populated from sources, semantic tokens and hover indicate async, completion detail localizes return types, and TypeRegistry stores bilingual specialized display names.

Changes

Async Methods & Type Display Localization

Layer / File(s) Summary
MemberDescriptor async flag model
src/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/MemberDescriptor.java
Record extended with async boolean component; compatibility constructor and copy methods (withAsync, withSourceSymbol, etc.) preserve async flag across transformations.
Async flag population from sources
src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/BslContextPlatformTypesProvider.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/BuiltinPlatformTypesProvider.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/GlobalScopeProvider.java, src/main/resources/.../builtin-globals.json, src/test/java/.../BuiltinPlatformTypesProviderTest.java
BslContextPlatformTypesProvider reads method.isAsync(), BuiltinPlatformTypesProvider parses JSON async and applies withAsync(), bilingual merging preserves async state; GlobalScopeProvider reads async from builtins JSON; tests validate async propagation and mixed-script merging.
Semantic token async highlighting
src/main/java/com/github/_1c_syntax/bsl/languageserver/semantictokens/GlobalScopeSemanticTokensSupplier.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/semantictokens/PlatformGlobalMethodSemanticTokensSupplier.java, src/test/java/.../PlatformGlobalMethodSemanticTokensSupplierTest.java
Global and platform method call tokens now include SemanticTokenModifiers.Async when the resolved member/function is async; helper method computes modifier arrays and tests assert emitted modifiers.
Hover async indication
src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder.java, src/main/resources/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder_*.properties, src/test/java/.../PlatformMemberHoverBuilderTest.java
Hover builder inserts localized asyncMethod label for async members; EN/RU property keys added and tests assert presence/absence accordingly.
Completion script-variant localization
src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProvider.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProviderTest.java
Language filtering simplified to Cyrillic-detection; propertyDetail/methodDetail use scriptVariant; formatTypeName uses typeService.displayName(..., scriptVariant) and shows last segment; documentation purpose prefers source symbol when non-blank; test verifies localized return-type text in completion detail.
Type registry display name system
src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/TypeRegistry.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/types/registry/TypeRegistrySpecializationTest.java
Public registerDisplayName() added; specialization registration computes/stores specialized EN display name using placeholder substitution from generic EN display name; test validates bilingual specialized display name resolution.
Configuration manager type registration and display names
src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/ConfigurationTypesProvider.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/types/registry/ConfigurationTypesProviderTest.java
MANAGER_TYPES extended (SEQUENCE, FILTER_CRITERION, SETTINGS_STORAGE, WS_REFERENCE, INTEGRATION_SERVICE, INTEGRATION_SERVICE_CHANNEL); displayName registered for manager and collection wrapper types; registerFamilySpecializations() moved earlier; tests added for manager member inheritance and display names.
New platform type definitions and dependency
src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json, build.gradle.kts
JSON adds КритерийОтбораМенеджер.<Имя критерия> and РегистрСведенийМенеджер.<Имя регистра сведений> types with members and typed returns; io.github.1c-syntax:bsl-context bumped to 0.5.0.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • nixel2007

Poem

🐰 I twitch my whiskers, update in paw,
I tag async methods with a tiny awe,
Types wear two tongues — RU and EN delight,
Hovers show async, completions speak right,
Hop, patch, and ship beneath the moonlight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 38.46% 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 comprehensively covers the main changes: bilingual classification, bilingual type display, manager specialization, and async flag support.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bilingual-mixed-script-names

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 and usage tips.

@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

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/registry/BuiltinPlatformTypesProvider.java (1)

311-322: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Preserve async when either bilingual side is async.

Line 321 currently keeps only ru.async(). If only the EN entry is marked async, merge drops the flag and downstream async UI signals disappear.

Proposed fix
-      ru.async()
+      ru.async() || en.async()
🤖 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/registry/BuiltinPlatformTypesProvider.java`
around lines 311 - 322, The mergePair method currently preserves only
ru.async(), which loses the async flag when en.async() is true; update mergePair
(in BuiltinPlatformTypesProvider.mergePair) to compute the async value as a
logical OR of both sides (e.g., use ru.async() || en.async()) and pass that
combined boolean into the MemberDescriptor constructor so the merged descriptor
remains async if either bilingual side is async.
🤖 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 2-18: The JSON defines method Выбрать on type
КритерийОтбораМенеджер that returns КритерийОтбораСписок.<Имя критерия>, but no
КритерийОтбораСписок type exists and КритерийОтбораМенеджер lacks aliases; fix
by adding a new TYPE entry for "КритерийОтбораСписок.<Имя критерия>" (mirror
members expected for a list-type, e.g., iteration/Получить/Размер or whatever
list API other *Список types use) so the returnType resolves, and add an
"aliases" array to the existing "КритерийОтбораМенеджер.<Имя критерия>" record
with the English bilingual alias (e.g., "SelectionCriterionManager.<Name>" or
consistent alias format used elsewhere) so the manager type follows the
project's catalog-style bilingual convention.
- Around line 19-36: The JSON type entry for РегистрСведенийМенеджер.<Имя
регистра сведений> declares methods СоздатьНаборЗаписей and Выбрать whose
returnType values reference non-existent types РегистрСведенийНаборЗаписей.<Имя
регистра сведений> and РегистрСведенийВыборка.<Имя регистра сведений>; add
corresponding TYPE definitions for those two return types in
builtin-platform-types.json (matching the pattern used for other manager types)
so the references resolve, and do not add English aliases — keep the style
consistent with other Менеджер.<Имя ...> entries (no aliases).

---

Outside diff comments:
In
`@src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/BuiltinPlatformTypesProvider.java`:
- Around line 311-322: The mergePair method currently preserves only ru.async(),
which loses the async flag when en.async() is true; update mergePair (in
BuiltinPlatformTypesProvider.mergePair) to compute the async value as a logical
OR of both sides (e.g., use ru.async() || en.async()) and pass that combined
boolean into the MemberDescriptor constructor so the merged descriptor remains
async if either bilingual side is async.
🪄 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

Run ID: 0135e17a-3762-4e37-99eb-9b5e89cafc9b

📥 Commits

Reviewing files that changed from the base of the PR and between 8b04731 and 0457ce6.

⛔ Files ignored due to path filters (4)
  • src/test/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/async-method.json is excluded by !src/test/resources/**
  • src/test/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/mixed-script-member-merge.json is excluded by !src/test/resources/**
  • src/test/resources/metadata/designer/Configuration.xml is excluded by !src/test/resources/**
  • src/test/resources/metadata/designer/FilterCriteria/КритерийОтбора1.xml is excluded by !src/test/resources/**
📒 Files selected for processing (18)
  • build.gradle.kts
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProvider.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/semantictokens/GlobalScopeSemanticTokensSupplier.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/semantictokens/PlatformGlobalMethodSemanticTokensSupplier.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/MemberDescriptor.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/BslContextPlatformTypesProvider.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/BuiltinPlatformTypesProvider.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/TypeRegistry.java
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder_en.properties
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder_ru.properties
  • src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilderTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProviderTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/registry/BuiltinPlatformTypesProviderTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/registry/ConfigurationTypesProviderTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/registry/TypeRegistrySpecializationTest.java

Comment on lines +2 to +18
{
"kind": "TYPE",
"name": "КритерийОтбораМенеджер.<Имя критерия>",
"members": [
{
"name": "Выбрать",
"kind": "METHOD",
"returnType": "КритерийОтбораСписок.<Имя критерия>",
"description": "Формирует выборку по критерию отбора."
},
{
"name": "ПолучитьФорму",
"kind": "METHOD",
"description": "Возвращает форму критерия отбора."
}
]
},

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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that return types for filter criterion manager are registered

# Search for КритерийОтбораСписок type definition
echo "=== Searching for КритерийОтбораСписок type definition ==="
rg -n --type json 'КритерийОтбораСписок' -C 3

# Search for English naming pattern of filter criterion in type registry
echo "=== Searching for FilterCriterion naming in codebase ==="
rg -n --type java 'FilterCriterion' -C 2

Repository: 1c-syntax/bsl-language-server

Length of output: 1805


Fix unresolved returnType and consider bilingual aliases for КритерийОтбораМенеджер

  • In src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json, method Выбрать sets "returnType": "КритерийОтбораСписок.<Имя критерия>", but КритерийОтбораСписок is not defined anywhere else in the repo’s JSON (only appears as that returnType reference), so the return type is likely missing/unresolvable.
  • КритерийОтбораМенеджер.<Имя критерия> has no "aliases"; add an English alias only if this *Менеджер.* family is intended to be bilingual like other existing catalog-style entries.
🤖 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 2 - 18, The JSON defines method Выбрать on type
КритерийОтбораМенеджер that returns КритерийОтбораСписок.<Имя критерия>, but no
КритерийОтбораСписок type exists and КритерийОтбораМенеджер lacks aliases; fix
by adding a new TYPE entry for "КритерийОтбораСписок.<Имя критерия>" (mirror
members expected for a list-type, e.g., iteration/Получить/Размер or whatever
list API other *Список types use) so the returnType resolves, and add an
"aliases" array to the existing "КритерийОтбораМенеджер.<Имя критерия>" record
with the English bilingual alias (e.g., "SelectionCriterionManager.<Name>" or
consistent alias format used elsewhere) so the manager type follows the
project's catalog-style bilingual convention.

Comment on lines +19 to +36
{
"kind": "TYPE",
"name": "РегистрСведенийМенеджер.<Имя регистра сведений>",
"members": [
{
"name": "СоздатьНаборЗаписей",
"kind": "METHOD",
"returnType": "РегистрСведенийНаборЗаписей.<Имя регистра сведений>",
"description": "Создаёт набор записей регистра сведений."
},
{
"name": "Выбрать",
"kind": "METHOD",
"returnType": "РегистрСведенийВыборка.<Имя регистра сведений>",
"description": "Формирует выборку записей регистра сведений."
}
]
},

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that return types for information register manager are registered

# Search for information register record set type
echo "=== Searching for РегистрСведенийНаборЗаписей type definition ==="
rg -n --type json 'РегистрСведенийНаборЗаписей' -C 3

# Search for information register selection type
echo "=== Searching for РегистрСведенийВыборка type definition ==="
rg -n --type json 'РегистрСведенийВыборка' -C 3

# Search for English naming pattern
echo "=== Searching for InformationRegister naming in codebase ==="
rg -n --type java 'InformationRegister(Manager|RecordSet|Selection)' -C 2

Repository: 1c-syntax/bsl-language-server

Length of output: 2195


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Where is the type name 'РегистрСведенийМенеджер.<Имя регистра сведений>' defined? ==="
rg -n --type json '"name"\s*:\s*"РегистрСведенийМенеджер\.<Имя регистра сведений>"' -S

echo
echo "=== Do we have any TYPE definitions for return types 'РегистрСведенийНаборЗаписей.<Имя регистра сведений>' and 'РегистрСведенийВыборка.<Имя регистра сведений>'? ==="
rg -n --type json '"name"\s*:\s*"РегистрСведенийНаборЗаписей\.<Имя регистра сведений>"' -S
rg -n --type json '"name"\s*:\s*"РегистрСведенийВыборка\.<Имя регистра сведений>"' -S

echo
echo "=== Any TYPE definitions for the base names (template types) without the '<Имя ...>' suffix? ==="
rg -n --type json '"name"\s*:\s*"РегистрСведенийНаборЗаписей"' -S || true
rg -n --type json '"name"\s*:\s*"РегистрСведенийВыборка"' -S || true

echo
echo "=== Check how aliases are done in other registry manager TYPEs (examples: check for an 'InformationRegister*' alias or any aliases array near manager types) ==="
rg -n --type json '"kind"\s*:\s*"TYPE"' -S src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry | rg -n --context 2 '"aliases"' | head -n 80

Repository: 1c-syntax/bsl-language-server

Length of output: 498


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Any occurrences of 'РегистрСведенийНаборЗаписей' in repo (all files) ==="
rg -n 'РегистрСведенийНаборЗаписей' -S || true

echo
echo "=== Any occurrences of 'РегистрСведенийВыборка' in repo (all files) ==="
rg -n 'РегистрСведенийВыборка' -S || true

echo
echo "=== Any 'InformationRegisterManager' occurrences (json/ts/java) ==="
rg -n 'InformationRegisterManager' -S --glob '*.{json,java,kt,ts,js}' || true

echo
echo "=== Look at nearby TYPE definitions for 'aliases' usage in registry builtin types ==="
rg -n --type json '"aliases"\s*:' -S src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry | head -n 80

Repository: 1c-syntax/bsl-language-server

Length of output: 10844


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json"

echo "=== Show top part around the TYPE named РегистрСведенийМенеджер.<Имя регистра сведений> (lines ~1-120) ==="
nl -ba "$FILE" | sed -n '1,140p'

echo
echo "=== All TYPE name entries starting with РегистрСведений (up to 120 matches) ==="
rg -n --type json '"name"\s*:\s*"РегистрСведений' "$FILE" | head -n 120

echo
echo "=== Any TYPE definitions whose name contains 'НаборЗаписей' or 'Выборка' (within this file) ==="
rg -n --type json '"name"\s*:\s*".*(НаборЗаписей|Выборка).*(\.<Имя|\<Имя).*"' "$FILE" || true
rg -n --type json '"name"\s*:\s*".*НаборЗаписей.*"' "$FILE" | head -n 50
rg -n --type json '"name"\s*:\s*".*Выборка.*"' "$FILE" | head -n 50

echo
echo "=== Any 'aliases' entries that mention InformationRegister* (within this file) ==="
rg -n --type json '"aliases"\s*:\s*\[.*InformationRegister' "$FILE" || true

echo
echo "=== Any 'aliases' entries that mention English-ish names for registers (heuristic: 'Register' in aliases) ==="
rg -n --type json '"aliases"\s*:\s*\[.*Register' "$FILE" || true

Repository: 1c-syntax/bsl-language-server

Length of output: 241


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json"

echo "=== Top part around TYPE 'РегистрСведенийМенеджер.<Имя регистра сведений>' (lines 1-140) ==="
cat -n "$FILE" | sed -n '1,140p'

echo
echo "=== All TYPE name entries starting with 'РегистрСведений' (first 200 matches) ==="
rg -n --type json '"name"\s*:\s*"РегистрСведений' "$FILE" | head -n 200

echo
echo "=== TYPE definitions (names) containing 'НаборЗаписей' or 'Выборка' (within this file) ==="
rg -n --type json '"name"\s*:\s*".*(НаборЗаписей|Выборка).*"' "$FILE" || true

echo
echo "=== aliases entries that mention 'InformationRegister' (within this file) ==="
rg -n --type json '"aliases"\s*:\s*\[.*InformationRegister' "$FILE" || true

echo
echo "=== aliases entries that mention 'Register' (within this file) ==="
rg -n --type json '"aliases"\s*:\s*\[.*Register' "$FILE" || true

Repository: 1c-syntax/bsl-language-server

Length of output: 4523


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json"

echo "=== Find other TYPEs with name ending in 'Менеджер.<Имя ' and show nearby 'aliases' presence ==="
rg -n --type json '"name"\s*:\s*".*Менеджер\.<Имя ' "$FILE" -n -C 3 | head -n 120

echo
echo "=== Show all occurrences of 'InformationRegister' across repo (any file types) ==="
rg -n --hidden --no-ignore -S 'InformationRegister' . || true

echo
echo "=== Show all occurrences of 'РегистрСведенийНаборЗаписей' and 'РегистрСведенийВыборка' again, to confirm no definitions beyond returnType ==="
rg -n -S 'РегистрСведенийНаборЗаписей' . || true
rg -n -S 'РегистрСведенийВыборка' . || true

Repository: 1c-syntax/bsl-language-server

Length of output: 9265


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json"

echo "=== Find manager-type TYPE entries and whether they contain an 'aliases' field nearby ==="
rg -n --type json '"kind"\s*:\s*"TYPE",' -S "$FILE" | head -n 5 >/dev/null # just ensure rg works
# Print blocks for TYPE names ending with 'Менеджер.<Имя'
rg -n --type json '"name"\s*:\s*".*Менеджер\.<Имя' "$FILE" -n -C 5 | head -n 200

echo
echo "=== Search for any 'aliases' fields within ~25 lines of TYPE entries whose name contains 'Менеджер.<Имя' ==="
rg -n --type json '"name"\s*:\s*".*Менеджер\.<Имя' "$FILE" -S | cut -d: -f1 | head -n 50 | while read -r line; do
  start=$((line-10)); end=$((line+25));
  sed -n "${start},${end}p" "$FILE" | rg -n '("name"|\"aliases\"|\"kind\")' || true
done | head -n 120

Repository: 1c-syntax/bsl-language-server

Length of output: 3658


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json"
echo "File: $FILE"
wc -l "$FILE"

python3 - <<'PY'
import json, re, sys

path = "src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json"

with open(path, "r", encoding="utf-8") as f:
    data = json.load(f)

def find_by_name(name):
    return [o for o in data if isinstance(o, dict) and o.get("name") == name]

targets = {
    "reg_manager": "РегистрСведенийМенеджер.<Имя регистра сведений>",
    "reg_recordset": "РегистрСведенийНаборЗаписей.<Имя регистра сведений>",
    "reg_selection": "РегистрСведенийВыборка.<Имя регистра сведений>",
    "crit_manager": "КритерийОтбораМенеджер.<Имя критерия>",
    "ref_manager": "СправочникМенеджер.<Имя справочника>",
    "doc_manager": "ДокументМенеджер.<Имя документа>",
}

for k,v in targets.items():
    matches = find_by_name(v)
    print(f"\n== {k}: {v} ==")
    print("count:", len(matches))
    if matches:
        o = matches[0]
        print("kind:", o.get("kind"))
        print("has aliases:", "aliases" in o)
        if "aliases" in o: 
            print("aliases:", o["aliases"])

print("\n== Check: any TYPE whose name contains 'НаборЗаписей' or 'Выборка' ==")
for substr in ["НаборЗаписей", "Выборка"]:
    found = [o for o in data if isinstance(o, dict) and o.get("kind")=="TYPE" and substr in str(o.get("name",""))]
    print(substr, "TYPE count:", len(found))
    for o in found[:10]:
        print(" -", o.get("name"))

print("\n== Check: any aliases values containing 'InformationRegisterManager' ==")
hits=[]
for o in data:
    if isinstance(o, dict) and "aliases" in o and isinstance(o["aliases"], list):
        for a in o["aliases"]:
            if "InformationRegisterManager" in a:
                hits.append((o.get("kind"), o.get("name"), a))
print("hits:", len(hits))
for h in hits[:20]:
    print(" -", h)

print("\n== Check: any TYPE names containing 'InformationRegisterManager' ==")
hits2=[o for o in data if isinstance(o, dict) and "InformationRegisterManager" in str(o.get("name",""))]
print("hits:", len(hits2))
for o in hits2[:10]:
    print(" -", o.get("name"))
PY

Repository: 1c-syntax/bsl-language-server

Length of output: 1122


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Search across repo (json only) for exact TYPE names of return types ==="
rg -n --type json -S '"name"\s*:\s*"РегистрСведенийНаборЗаписей\.<Имя регистра сведений>"' . || true
rg -n --type json -S '"name"\s*:\s*"РегистрСведенийВыборка\.<Имя регистра сведений>"' . || true

echo
echo "=== Search across repo (json only) for return type base templates without the '<Имя ...>' suffix ==="
rg -n --type json -S '"name"\s*:\s*"РегистрСведенийНаборЗаписей"' . || true
rg -n --type json -S '"name"\s*:\s*"РегистрСведенийВыборка"' . || true

echo
echo "=== Count how many TYPE entries have an 'aliases' field in builtin-platform-types.json (stats) ==="
python3 - <<'PY'
import json
path="src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json"
data=json.load(open(path,"r",encoding="utf-8"))
type_with_alias=sum(1 for o in data if isinstance(o,dict) and o.get("kind")=="TYPE" and "aliases" in o)
type_total=sum(1 for o in data if isinstance(o,dict) and o.get("kind")=="TYPE")
prim_alias=sum(1 for o in data if isinstance(o,dict) and o.get("kind") in {"PRIMITIVE_TYPE"} and "aliases" in o)
print("TYPE total:", type_total)
print("TYPE with aliases:", type_with_alias)
print("PRIMITIVE_TYPE with aliases:", prim_alias)
PY

Repository: 1c-syntax/bsl-language-server

Length of output: 419


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check for TYPE definitions of КритерийОтбораСписок.<Имя критерия> ==="
rg -n --type json -S '"name"\s*:\s*"КритерийОтбораСписок\.<Имя критерия>"' . || true

echo "=== Check for TYPE definitions of other manager returnTypes in the same file ==="
rg -n --type json -S '"returnType"\s*:\s*"[^"]+"' src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json | head -n 50

python3 - <<'PY'
import json, re
path="src/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.json"
data=json.load(open(path,"r",encoding="utf-8"))
# collect TYPE names
type_names=set(o.get("name") for o in data if isinstance(o,dict) and o.get("kind")=="TYPE" and "name" in o)
def exists(name): return name in type_names
targets=[
"КритерийОтбораСписок.<Имя критерия>",
"РегистрСведенийНаборЗаписей.<Имя регистра сведений>",
"РегистрСведенийВыборка.<Имя регистра сведений>",
"СправочникСсылка.<Имя справочника>",
"ДокументСсылка.<Имя документа>"
]
for t in targets:
    print(t, "exists as TYPE:", exists(t))
PY

Repository: 1c-syntax/bsl-language-server

Length of output: 2707


Define missing return TYPEs for РегистрСведенийМенеджер methods

  • РегистрСведенийМенеджер.<Имя регистра сведений> references return types РегистрСведенийНаборЗаписей.<Имя регистра сведений> and РегистрСведенийВыборка.<Имя регистра сведений>, but those TYPE definitions are not present anywhere in the repo, so the return types are unresolved.
  • Drop the English-alias suggestion: other *Менеджер.<Имя ...> TYPEs in builtin-platform-types.json (e.g., КритерийОтбораМенеджер..., СправочникМенеджер..., ДокументМенеджер...) also don’t define aliases, and there are no InformationRegisterManager aliases in the codebase.
🤖 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 19 - 36, The JSON type entry for РегистрСведенийМенеджер.<Имя
регистра сведений> declares methods СоздатьНаборЗаписей and Выбрать whose
returnType values reference non-existent types РегистрСведенийНаборЗаписей.<Имя
регистра сведений> and РегистрСведенийВыборка.<Имя регистра сведений>; add
corresponding TYPE definitions for those two return types in
builtin-platform-types.json (matching the pattern used for other manager types)
so the references resolve, and do not add English aliases — keep the style
consistent with other Менеджер.<Имя ...> entries (no aliases).

@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Test Results

 2 868 files  ± 0   2 868 suites  ±0   1h 20m 1s ⏱️ -13s
 2 512 tests +11   2 512 ✅ +11  0 💤 ±0  0 ❌ ±0 
15 072 runs  +66  15 072 ✅ +66  0 💤 ±0  0 ❌ ±0 

Results for commit ade5876. ± Comparison against base commit 8b04731.

♻️ This comment has been updated with latest results.

sfaqer and others added 2 commits May 27, 2026 12:19
- mergePair: async = ru.async() || en.async() (флаг сохраняется, если асинхронна
  любая из двуязычных сторон члена).
- ForbiddenMetadataNameDiagnosticTest: учтён добавленный в тест-конфигурацию
  КритерийОтбора1 (счётчики 1→2 и 4→5, проверка имени критерия).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
- TypeRegistry: HashMap.newHashMap вместо конструктора (S6485); убраны
  always-false null-проверки в registerDisplayName (S2589).
- ConfigurationTypesProvider: регистрация коллекций-namespace вынесена в
  отдельный метод (S138, длина register).
- GlobalScopeProvider.readFunctions читает флаг async из builtin-globals.json;
  добавлена async-функция ВопросАсинх/DoQueryBoxAsync (8.3.18+).
- Тест: async-модификатор для async-глобала в семантических токенах.

Co-Authored-By: Claude Opus 4.7 <[email protected]>

private static String[] modifiers(boolean async) {
return async
? new String[]{SemanticTokenModifiers.DefaultLibrary, SemanticTokenModifiers.Async}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

В кэш в статик поле класса

memberOf=член типа
globalFunction=глобальная функция
globalProperty=глобальное свойство
asyncMethod=Асинхронный метод.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Точка

memberOf=member of
globalFunction=global function
globalProperty=global property
asyncMethod=Asynchronous method.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

И тут точка

}
if (globalScopeProvider.findFunction(name, fileType).isEmpty()) {
var function = globalScopeProvider.findFunction(name, fileType);
if (function.isEmpty()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ifPresent

…точки

Замечания nixel2007 на PR #3952:
- PlatformGlobalMethodSemanticTokensSupplier: findFunction().ifPresent(...) вместо
  isEmpty()/get(); массивы модификаторов вынесены в статические поля.
- GlobalScopeSemanticTokensSupplier: те же модификаторы из статических полей.
- hover-метка async без завершающей точки (ru/en).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@nixel2007
nixel2007 enabled auto-merge May 27, 2026 06:12
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants