Skip to content

feat(types): вложенные и рекурсивные см.-ссылки в выводе типов, hover и автокомплите#4196

Merged
nixel2007 merged 13 commits into
developfrom
claude/github-issue-4194-v19sfb
Jun 25, 2026
Merged

feat(types): вложенные и рекурсивные см.-ссылки в выводе типов, hover и автокомплите#4196
nixel2007 merged 13 commits into
developfrom
claude/github-issue-4194-v19sfb

Conversation

@nixel2007

@nixel2007 nixel2007 commented Jun 23, 2026

Copy link
Copy Markdown
Member

Closes #4194

см. Метод-ссылки в JsDoc разворачивались только на верхнем уровне описания типа.
PR делает их вывод единообразным на любой глубине, добавляет поддержку
рекурсивных (само- и взаимно-ссылочных) структур и чинит сопутствующие дефекты в
hover и автокомплите, найденные репортёром.

1. Вложенные см.-ссылки (fix)

Во вложенных позициях (тип элемента коллекции Массив из см. X, тип поля
структуры * Поле - см. X, типы параметров) ссылки терялись, т.к. в рекурсивный
резолв SymbolTypeIndex не прокидывался контекст документа.

  • прокинут ResolutionContext (владелец + язык + множество посещённых функций)
    через resolveTypes/resolveCollection/applyFields; HYPERLINK
    разворачивается единообразно на любом уровне через resolveSeeReference;
  • getDeclaredParameterTypes принимает owner и разворачивает см.-ссылки в
    типах параметров (в т.ч. вложенные);
  • удалены обходные проходы, существовавшие лишь из-за отсутствия контекста
    (resolveReturnedValueHyperlinks, parameterHyperlinkTypes, мёртвый
    resolveDescribedTypes);
  • защита от закольцованных см.-ссылок через множество visited
    (скоупится на путь обхода).

2. Рекурсивный автокомплит (feat)

Самоссылочные структуры (узел дерева: * Потомки - Массив из см. Узел)
образуют бесконечный тип — eager-материализация его не вмещает. Решение — ленивый
разворот, управляемый курсором: автокомплит разыменовывает выражение конечной
глубины, поэтому каждый шаг форсит ровно один уровень из кэша функции-источника.

  • новый LazyTypeSet — неизменяемая, немемоизирующая ссылка на возвращаемый тип
    локальной функции; реальный тип берётся из кэша на момент чтения;
  • TypeSet получил декорации lazyElements/lazyFields (+ LazyField с
    описанием); геттеры форсят их на чтении, поэтому потребители не меняются;
  • equals/hashCode остаются конечными и по значению (ключ ленивой ссылки —
    символ функции, не результат форса);
  • глубина рекурсии ограничивается выражением под курсором; хранимый граф конечен.

Корень.Потомки[0].Потомки[0].Значение разрешается до Строка на любую глубину;
закольцованные ссылки A↔B не зацикливаются.

3. Сценарии из отчёта в issue (@alisher-nil)

  • Чейнинг в автокомплите. Контекст.ДанныеТокена. забывал содержимое
    структуры: при разыменовании члена локальное поле сводилось к головному
    TypeRef. DereferenceMemberMatcher теперь несёт полный тип поля.
  • Взаимная рекурсия в hover. Контейнер↔Коробка через см.-поля/параметры
    уводили построитель hover в StackOverflow. Вместо лимита глубины — точное
    обнаружение цикла по функции-источнику: повторный вход рендерится как
    См. Функция (то самое ссылочное представление, которого ожидал репортёр), а
    глубокие нерекурсивные структуры по-прежнему разворачиваются полностью.
  • Поля элемента коллекции. `Соответствие из КлючИЗначение: * Ключ - Строка
    • Значение - Числотерял тип элемента приДля Каждого: поля COLLECTION-описания навешивались на голову коллекции, а не на элемент. Исправлено в resolveCollection`.

4. Правки по ревью

  • CodeRabbit: visited скоупится на путь обхода (try/finally); ленивые поля
    сохраняют описание doc-комментария; fail-fast guard маркера в тесте.
  • @NullMarked: убраны избыточные Objects.requireNonNull в types.model
    (TypeSet.with*, конструктор LazyTypeSet).

Тесты

  • NestedSeeRefInferenceTest, RecursiveSeeRefInferenceTest,
    ReporterScenariosSeeRefTest (инференс/hover/автокомплит),
    MapElementFieldsInferenceTest;
  • юнит-тесты LazyTypeSet/LazyField и ленивых декораций TypeSet;
  • фикстуры NestedSeeRef*, RecursiveSeeRef, Chained*, MutualRecursion*,
    MapElementFields.

Полный прогон зелёный; coverage на новом коде ≥ 95% (line).

Производительность (репозиторий cpm, 13 090 файлов)

Замер ядра ленивой реализации (develop vs ветка) через analyze (JFR + GC +
jmap) и CompletionTypingProfileTest:

Метрика develop этот PR
Автокомплит (dot, p50) 0.18 / 0.15 ms 0.19 / 0.09 ms
Построение контекста (rebuild/keystroke, p50) 73.9 / 80.4 ms 77.2 / 78.7 ms
Allocations (весь analyze) 150.3 GB 150.0 GB
Retained, атрибутируемо правке +8 B/TypeSet ≈ +3.8 MB

Латентность не изменилась (разброс прогонов больше разницы веток), аллокации
идентичны; LazyTypeSet инстанцируется только для рекурсивных типов (в cpm — 73
шт.). Последующие UX-правки (обнаружение цикла в hover, чейнинг в автокомплите,
поля элемента) работают на уже посчитанных типах и в горячий путь не попадают.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 23, 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

Nested // См. type resolution now carries document context and cycle tracking through SymbolTypeIndex. TypeSet gained lazy element and field decorations, caller code passes method owners, and new tests cover nested, recursive, and cyclic inference paths.

Changes

Nested См. reference resolution with lazy type decorations

Layer / File(s) Summary
Context-aware resolution and cycle protection
src/main/java/com/github/_1c_syntax/bsl/languageserver/types/index/SymbolTypeIndex.java
Introduces ResolutionContext with owner, file type, and visited methods; threads it through resolveTypes, resolveTypeDescription, resolveCollection, and applyFields; and applies cycle protection in resolveSeeReference while removing the separate returned-value hyperlink path.
Lazy type decorations in TypeSet
src/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/LazyTypeSet.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/LazyField.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/TypeSet.java
Adds LazyTypeSet and LazyField, and extends TypeSet with lazy element and field maps, immutable copying in the constructor, lazy-aware union and decoration checks, and read-time forcing of lazy element and field types.
Owner-aware parameter type callers
src/main/java/com/github/_1c_syntax/bsl/languageserver/types/TypeService.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/ExpressionTypeInferencer.java, src/main/java/com/github/_1c_syntax/bsl/languageserver/types/MemberTypeFromCommentResolver.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/types/JsDocVariantsTest.java
TypeService#getParameterTypes now passes method.getOwner() into getDeclaredParameterTypes, and ExpressionTypeInferencer uses the owner-aware overload in parameter resolution and inherited parameter resolution after removing the separate hyperlink helper. MemberTypeFromCommentResolver and JsDocVariantsTest update their Javadoc references to the new resolution path.
Lazy type model tests
src/test/java/com/github/_1c_syntax/bsl/languageserver/types/model/LazyFieldTest.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/types/model/LazyTypeSetTest.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/types/model/TypeSetTest.java
Adds unit tests for LazyField, LazyTypeSet, and TypeSet lazy element and field behavior, including merging, materialization, read-time forcing, and lazy-aware unions.
Nested and recursive inference cases
src/test/java/com/github/_1c_syntax/bsl/languageserver/types/NestedSeeRefInferenceTest.java, src/test/java/com/github/_1c_syntax/bsl/languageserver/types/RecursiveSeeRefInferenceTest.java
Adds integration tests for nested // См. inference, recursive // См. chains, and cyclic resolution limits across array and structure return values and parameters.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐇 I hopped through см. links with care,
A visited set kept me aware.
Nested fields bloomed bright and new,
With lazy types waiting through and through.
No loop could trap my furry feet —
I prance on resolved types, neat!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.18% 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
Linked Issues check ✅ Passed The changes add nested and recursive см. resolution for collections, structures, parameter types, and cyclic cases, matching #4194.
Out of Scope Changes check ✅ Passed No unrelated functionality changes are evident; the new lazy type model and tests support the stated nested and recursive см. goals.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title clearly matches the main change: nested and recursive см.-link resolution for type output, hover, and autocomplete.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/github-issue-4194-v19sfb

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: 1

🤖 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/java/com/github/_1c_syntax/bsl/languageserver/types/index/SymbolTypeIndex.java`:
- Around line 315-322: The visited set is being shared across all recursion
branches, causing false-positive cycle detection when the same helper is
referenced multiple times in different contexts. Instead of adding localFunction
to the shared visited set and passing it to ResolutionContext, create a new
visited set copy that includes the current visited elements plus the current
localFunction, then pass this new scoped copy to the recursive resolveTypes
call. This ensures each recursion path maintains its own cycle detection state
without affecting sibling branches.
🪄 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: 38d68e0e-1bf0-401c-9782-7139cfe50d1f

📥 Commits

Reviewing files that changed from the base of the PR and between 750169d and 317856a.

⛔ Files ignored due to path filters (2)
  • src/test/resources/types/NestedSeeRef.bsl is excluded by !src/test/resources/**
  • src/test/resources/types/NestedSeeRefCyclic.bsl is excluded by !src/test/resources/**
📒 Files selected for processing (6)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/MemberTypeFromCommentResolver.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/TypeService.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/index/SymbolTypeIndex.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/inferencer/ExpressionTypeInferencer.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/JsDocVariantsTest.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/NestedSeeRefInferenceTest.java

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Test Results

 3 564 files  + 36   3 564 suites  +36   1h 40m 50s ⏱️ + 3m 58s
 3 504 tests + 42   3 486 ✅ + 42   18 💤 ±0  0 ❌ ±0 
21 024 runs  +252  20 912 ✅ +252  112 💤 ±0  0 ❌ ±0 

Results for commit 37e6ae8. ± Comparison against base commit 750169d.

♻️ This comment has been updated with latest results.

@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/java/com/github/_1c_syntax/bsl/languageserver/types/model/TypeSet.java`:
- Around line 65-67: The lazy doc-comment field path in TypeSet is dropping the
field description, so IDE hints lose the text after the reference while keeping
the lazy type. Update TypeSet to carry descriptions alongside lazy fields by
extending the lazy field storage and materialization logic, and make
SymbolTypeIndex.applyFields pass fieldDescription(field) into that path instead
of creating lazy fields with an empty description.

In
`@src/test/java/com/github/_1c_syntax/bsl/languageserver/types/RecursiveSeeRefInferenceTest.java`:
- Around line 83-84: The cursor helper in RecursiveSeeRefInferenceTest can
compute an invalid offset when the marker is missing because indexOf returns -1.
Add a fail-fast assertion or precondition in the helper that computes
markerStart and targetOffset so the test stops immediately if the marker is
absent, and keep the validation close to the marker lookup logic.
🪄 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: 9e836e63-b949-4706-a6f4-36df81adcc0c

📥 Commits

Reviewing files that changed from the base of the PR and between 317856a and 176af23.

⛔ Files ignored due to path filters (1)
  • src/test/resources/types/RecursiveSeeRef.bsl is excluded by !src/test/resources/**
📒 Files selected for processing (4)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/index/SymbolTypeIndex.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/LazyTypeSet.java
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/TypeSet.java
  • src/test/java/com/github/_1c_syntax/bsl/languageserver/types/RecursiveSeeRefInferenceTest.java
✅ Files skipped from review due to trivial changes (1)
  • src/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/LazyTypeSet.java

Comment thread src/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/TypeSet.java Outdated
claude added 2 commits June 24, 2026 11:53
…олях структур

Ссылки вида `см. Метод` в JsDoc разворачивались только на верхнем уровне.
Во вложенных позициях (тип элемента коллекции `Массив из см. X`, тип поля
структуры `* Поле - см. X`) они терялись, т.к. в рекурсивный резолв
SymbolTypeIndex не прокидывался контекст документа. То же касалось и описаний
типов параметров.

Изменения:
- прокинут ResolutionContext (владелец + язык + множество посещённых функций)
  через resolveTypes/resolveCollection/applyFields; HYPERLINK разворачивается
  единообразно на любом уровне через resolveSeeReference;
- getDeclaredParameterTypes теперь принимает owner и разворачивает см.-ссылки
  в типах параметров (в т.ч. вложенные);
- удалены обходные проходы, существовавшие лишь из-за отсутствия контекста:
  resolveReturnedValueHyperlinks (SymbolTypeIndex) и parameterHyperlinkTypes
  (ExpressionTypeInferencer); удалён ставший мёртвым публичный
  resolveDescribedTypes;
- защита от закольцованных см.-ссылок через множество visited.

Тесты: NestedSeeRefInferenceTest (элемент коллекции, поле структуры, параметр,
закольцованная ссылка) + фикстуры NestedSeeRef.bsl/NestedSeeRefCyclic.bsl.

Closes #4194

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
…т вложенных типов)

Самоссылающиеся структуры (узел дерева: `* Потомки - Массив из см. Узел`)
образуют бесконечный тип — eager-материализация его не вмещает, поэтому раньше
вложенность обрывалась на первом уровне.

Решение — ленивый разворот, управляемый курсором. Авто-комплит разыменовывает
выражение конечной глубины, поэтому материализовывать бесконечный тип не нужно:
- новый LazyTypeSet — неизменяемая, немемоизирующая ссылка на возвращаемый тип
  локальной функции; реальный тип берётся из кэша на момент чтения;
- TypeSet получил декорации lazyElements/lazyFields; геттеры
  getElementTypes/getLocalFields/getFieldTypes/getAllFieldNames форсят их на
  чтении, поэтому потребители (инференсер/автокомплит/hover) не меняются;
- equals/hashCode остаются конечными и по значению (ключ ленивой ссылки —
  символ функции, не результат форса);
- SymbolTypeIndex: вложенная см.-ссылка на локальную функцию навешивается
  лениво (withLazyElement/withLazyField), верхнеуровневые ссылки и
  квалифицированные/типовые — по-прежнему eager.

Глубина рекурсии ограничивается выражением под курсором; хранимый граф конечен.

Тесты: RecursiveSeeRefInferenceTest (глубокая навигация Корень.Потомки[0].
Потомки[0].Значение -> Строка; промежуточный уровень раскрывает поля).

Refs #4194

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
@nixel2007
nixel2007 force-pushed the claude/github-issue-4194-v19sfb branch from 176af23 to 49e5055 Compare June 24, 2026 09:54
@nixel2007 nixel2007 changed the title fix(types): развернуть вложенные см.-ссылки в элементах коллекций и полях структур feat(types): вложенные и рекурсивные см.-ссылки в выводе типов Jun 24, 2026
- visited скоупится на текущий путь обхода (try/finally remove) — соседняя
  нециклическая см.-ссылка на ту же функцию больше не считается циклом;
- ленивые поля сохраняют текстовое описание doc-комментария (новый LazyField:
  ленивый тип + описание), оно доходит до подсказок;
- fail-fast проверка наличия маркера в курсор-хелпере теста.

Тесты: юнит-тесты LazyTypeSet/LazyField и ленивых декораций TypeSet
(элемент/поле, union, add, форс на чтении, имена без форса); регрессии —
описание поля через см.-ссылку и верхнеуровневая закольцованная см.-цепочка.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
@nixel2007

Copy link
Copy Markdown
Member Author

/buildJar

@github-actions

Copy link
Copy Markdown
Contributor

✅ Собраны JAR-файлы для этого PR по команде /buildJar.

Артефакт: 7851216217

Файлы внутри:

  • bsl-language-server-claude-github-issue-4194-v19sfb-c4bc4bb-exec.jar

claude added 5 commits June 24, 2026 13:38
- TypeSet: накопление нескольких ленивых полей, union ленивых декораций на
  новых ref'ах, игнор несовпадающего по имени ленивого поля;
- См.-ссылка на имя типа (не локальная функция) разрешается через TypeRegistry.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
Массив из см. Модуль.Метод — квалифицированная ссылка не лениво и, не
разрешившись, не даёт тип элемента (ветки resolveCollection/localFunctionSeeRef).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
…урсии

Отчёт alisher-nil к #4194 выявил два дефекта поверх первичной реализации:

1. Автокомплит после `a.СмПоле.` забывал содержимое структуры: при
   разыменовании члена локальное поле сводилось к головному TypeRef, теряя
   вложенные поля. DereferenceMemberMatcher.collectLocalFieldMembers теперь
   несёт полный тип поля (с декорациями), поэтому `Контекст.ДанныеТокена.`
   снова показывает поля вложенной структуры.

2. Взаимно-рекурсивные структуры (Контейнер↔Коробка через см.-поля/параметры)
   при наведении уводили VariableSymbolMarkupContentBuilder.collectFieldBullets
   в бесконечную рекурсию (StackOverflow): ленивые поля раскрываются на чтении.
   Добавлено ограничение глубины разворота (MAX_FIELD_NESTING).

Тесты: ReporterScenariosSeeRefTest воспроизводит сценарии репортёра в инференсе,
hover и автокомплите (+ фикстуры Chained*/MutualRecursion*).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
…есто лимита глубины

Замена ограничения глубины (MAX_FIELD_NESTING) на точное обнаружение цикла по
функции-источнику ленивой см.-ссылки. collectFieldBullets ведёт набор уже
развёрнутых на пути источников; поле, разворот которого снова приводит к одному
из них, не углубляется, а рендерится как «См. Функция» (то самое ссылочное
представление, которого ожидал репортёр). Глубокие нерекурсивные структуры
по-прежнему разворачиваются полностью; взаимная рекурсия Контейнер↔Коробка
больше не уводит hover в StackOverflow.

Тест mutualRecursionHoverTerminates усилен проверкой `См. (Контейнер|Коробка)`.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
… не на голову

Отчёт alisher-nil к #4194: `Соответствие из КлючИЗначение: * Ключ - Строка
* Значение - Число` — тип переменной считался верно, но при обходе `Для Каждого`
тип элемента терялся.

Причина: поля COLLECTION-описания (`* Ключ`/`* Значение`) применялись к голове
коллекции (Соответствие), а не к её элементу (КлючИЗначение). resolveCollection
теперь навешивает их на тип элемента; resolveTypes не применяет applyFields к
COLLECTION повторно. У простых типов (`Структура: * Поле`) поведение прежнее.

Тесты: MapElementFieldsInferenceTest (элемент несёт Ключ/Значение; Элемент.Ключ →
Строка; Элемент.Значение → Число) + фикстура MapElementFields.bsl.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
@nixel2007

Copy link
Copy Markdown
Member Author

/buildJar

@github-actions

Copy link
Copy Markdown
Contributor

✅ Собраны JAR-файлы для этого PR по команде /buildJar.

Артефакт: 7858809395

Файлы внутри:

  • bsl-language-server-claude-github-issue-4194-v19sfb-cf0cb1a-exec.jar

Comment thread src/main/java/com/github/_1c_syntax/bsl/languageserver/types/model/TypeSet.java Outdated
claude added 2 commits June 24, 2026 18:35
По замечанию ревьюера: пакет types.model помечен @NullMarked, поэтому явные
Objects.requireNonNull на параметрах избыточны. Убраны из новых
TypeSet.withLazyElement/withLazyField и конструктора LazyTypeSet; удалён
ставший бессмысленным тест constructorRejectsNulls.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
…консистентности

Продолжение замечания про @NullMarked: уже существовавшие
TypeSet.withElement/withField тоже несли избыточные Objects.requireNonNull —
после чистки ленивых методов это смотрелось непоследовательно. Убраны, импорт
java.util.Objects больше не нужен.

ParameterDescriptor.requireNonNullElse оставлен: это нормализация null→дефолт,
иное по смыслу, чем защитный requireNonNull.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
@nixel2007 nixel2007 changed the title feat(types): вложенные и рекурсивные см.-ссылки в выводе типов feat(types): вложенные и рекурсивные см.-ссылки в выводе типов, hover и автокомплите Jun 24, 2026
claude added 3 commits June 24, 2026 18:53
- VariableSymbolMarkupContentBuilder: вынесен renderInferredField (снижена
  когнитивная/цикломатическая сложность collectFieldBullets); явные скобки в
  seeReferenceLabel;
- SymbolTypeIndex: localFunctionSeeRef сделан static, убрана всегда-ложная
  проверка name == null (@NullMarked), ветка локальной функции вынесена в
  resolveLocalFunctionTypes (число return'ов в resolveSeeReference ≤ 5);
- TypeSet: нормализация декорационных мап вынесена в immutableCopy/
  immutableNestedCopy (снижена сложность канонического конструктора);
- убраны неиспользуемые импорты (MemberTypeFromCommentResolver, NestedSeeRefInferenceTest);
- LazyTypeSetTest: объединённая цепочка ассертов.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
…r S1200)

Единственное использование Arrays.copyOfRange заменено на List.of(parts).subList,
что убирает класс из зависимостей SymbolTypeIndex (21 → 20) и закрывает последнее
замечание SonarCloud по PR.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
- hover по рекурсивному дереву (Массив из см. ДеревоУзел) — обрыв элемент-цикла
  ссылкой `См. ДеревоУзел` (покрывает ветку ленивых элементов в lazySourceKeys);
- hover взаимной рекурсии в EN-локали — `See Функция` (ветка локали в seeReferenceLabel).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcYuuctkrfWkmGqXaUmx5S
@nixel2007

Copy link
Copy Markdown
Member Author

/buildJar

@github-actions

Copy link
Copy Markdown
Contributor

✅ Собраны JAR-файлы для этого PR по команде /buildJar.

Артефакт: 7859960413

Файлы внутри:

  • bsl-language-server-claude-github-issue-4194-v19sfb-37e6ae8-exec.jar

@sonarqubecloud

Copy link
Copy Markdown

@nixel2007
nixel2007 merged commit 3b180d5 into develop Jun 25, 2026
37 checks passed
@nixel2007
nixel2007 deleted the claude/github-issue-4194-v19sfb branch June 25, 2026 13:31
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.

[BUG] Не разрешаются вложенные элементы коллекций типизированные через ссылки

2 participants