feat(types): билингва-классификация, двуязычное отображение типов, специализация менеджеров, async-флаг#3952
Conversation
Инвариант 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]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis 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. ChangesAsync Methods & Type Display Localization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 winPreserve 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
⛔ Files ignored due to path filters (4)
src/test/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/async-method.jsonis excluded by!src/test/resources/**src/test/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/mixed-script-member-merge.jsonis excluded by!src/test/resources/**src/test/resources/metadata/designer/Configuration.xmlis excluded by!src/test/resources/**src/test/resources/metadata/designer/FilterCriteria/КритерийОтбора1.xmlis excluded by!src/test/resources/**
📒 Files selected for processing (18)
build.gradle.ktssrc/main/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder.javasrc/main/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProvider.javasrc/main/java/com/github/_1c_syntax/bsl/languageserver/semantictokens/GlobalScopeSemanticTokensSupplier.javasrc/main/java/com/github/_1c_syntax/bsl/languageserver/semantictokens/PlatformGlobalMethodSemanticTokensSupplier.javasrc/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/MemberDescriptor.javasrc/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/BslContextPlatformTypesProvider.javasrc/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/BuiltinPlatformTypesProvider.javasrc/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/ConfigurationTypesProvider.javasrc/main/java/com/github/_1c_syntax/bsl/languageserver/types/registry/TypeRegistry.javasrc/main/resources/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder_en.propertiessrc/main/resources/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilder_ru.propertiessrc/main/resources/com/github/_1c_syntax/bsl/languageserver/types/registry/builtin-platform-types.jsonsrc/test/java/com/github/_1c_syntax/bsl/languageserver/hover/PlatformMemberHoverBuilderTest.javasrc/test/java/com/github/_1c_syntax/bsl/languageserver/providers/CompletionProviderTest.javasrc/test/java/com/github/_1c_syntax/bsl/languageserver/types/registry/BuiltinPlatformTypesProviderTest.javasrc/test/java/com/github/_1c_syntax/bsl/languageserver/types/registry/ConfigurationTypesProviderTest.javasrc/test/java/com/github/_1c_syntax/bsl/languageserver/types/registry/TypeRegistrySpecializationTest.java
| { | ||
| "kind": "TYPE", | ||
| "name": "КритерийОтбораМенеджер.<Имя критерия>", | ||
| "members": [ | ||
| { | ||
| "name": "Выбрать", | ||
| "kind": "METHOD", | ||
| "returnType": "КритерийОтбораСписок.<Имя критерия>", | ||
| "description": "Формирует выборку по критерию отбора." | ||
| }, | ||
| { | ||
| "name": "ПолучитьФорму", | ||
| "kind": "METHOD", | ||
| "description": "Возвращает форму критерия отбора." | ||
| } | ||
| ] | ||
| }, |
There was a problem hiding this comment.
🧩 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 2Repository: 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.
| { | ||
| "kind": "TYPE", | ||
| "name": "РегистрСведенийМенеджер.<Имя регистра сведений>", | ||
| "members": [ | ||
| { | ||
| "name": "СоздатьНаборЗаписей", | ||
| "kind": "METHOD", | ||
| "returnType": "РегистрСведенийНаборЗаписей.<Имя регистра сведений>", | ||
| "description": "Создаёт набор записей регистра сведений." | ||
| }, | ||
| { | ||
| "name": "Выбрать", | ||
| "kind": "METHOD", | ||
| "returnType": "РегистрСведенийВыборка.<Имя регистра сведений>", | ||
| "description": "Формирует выборку записей регистра сведений." | ||
| } | ||
| ] | ||
| }, |
There was a problem hiding this comment.
🧩 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 2Repository: 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 80Repository: 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 80Repository: 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" || trueRepository: 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" || trueRepository: 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 'РегистрСведенийВыборка' . || trueRepository: 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 120Repository: 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"))
PYRepository: 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)
PYRepository: 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))
PYRepository: 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 inbuiltin-platform-types.json(e.g.,КритерийОтбораМенеджер...,СправочникМенеджер...,ДокументМенеджер...) also don’t definealiases, and there are noInformationRegisterManageraliases 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).
- 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} |
| memberOf=член типа | ||
| globalFunction=глобальная функция | ||
| globalProperty=глобальное свойство | ||
| asyncMethod=Асинхронный метод. |
| memberOf=member of | ||
| globalFunction=global function | ||
| globalProperty=global property | ||
| asyncMethod=Asynchronous method. |
| } | ||
| if (globalScopeProvider.findFunction(name, fileType).isEmpty()) { | ||
| var function = globalScopeProvider.findFunction(name, fileType); | ||
| if (function.isEmpty()) { |
…точки Замечания nixel2007 на PR #3952: - PlatformGlobalMethodSemanticTokensSupplier: findFunction().ifPresent(...) вместо isEmpty()/get(); массивы модификаторов вынесены в статические поля. - GlobalScopeSemanticTokensSupplier: те же модификаторы из статических полей. - hover-метка async без завершающей точки (ru/en). Co-Authored-By: Claude Opus 4.7 <[email protected]>
|



Summary
ЧтениеJSON,HTTPСоединение). Чинит выбор алиаса в completion (R159) и склейку двуязычных членов (R286);applyDocumentationпереведён наorElseGet.Строка/String,СправочникМенеджер.X/CatalogManager.X). Специализация display-имени — структурная, черезTypeRef.specialize(без парсинга скобок в LS).FILTER_CRITERION,SETTINGS_STORAGE,WS_REFERENCE,INTEGRATION_SERVICE,INTEGRATION_SERVICE_CHANNEL.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.*— зелёные, регрессий нет🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Improvements
Tests