Skip to content

Реализация чтения нового формата поддержки едт#631

Merged
theshadowco merged 1 commit into
developfrom
feature/parentConf
Jul 1, 2026
Merged

Реализация чтения нового формата поддержки едт#631
theshadowco merged 1 commit into
developfrom
feature/parentConf

Conversation

@theshadowco

@theshadowco theshadowco commented Jul 1, 2026

Copy link
Copy Markdown
Member

Описание

Связанные задачи

Closes

Чеклист

Общие

  • Ветка PR обновлена из develop
  • Отладочные, закомментированные и прочие, не имеющие смысла участки кода удалены
  • Изменения покрыты тестами
  • Обязательные действия перед коммитом выполнены (запускал команду gradlew precommit)

Дополнительно

Summary by CodeRabbit

  • Bug Fixes

    • Improved how the app detects and loads project configuration, so it now works with the appropriate configuration file when available and falls back more reliably when it is not.
    • Reduced the chance of loading issues during project reading by only attempting to process configuration data when the expected file is present.
  • Chores

    • Updated an internal dependency to a newer version.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates the supportconf dependency to version 0.17.1 and changes EDTReader's constructor to use a new supportConfigPath() helper that prefers Configuration.distr over ParentConfigurations.bin when resolving the support configuration file to load.

Changes

Support config resolution and dependency bump

Layer / File(s) Summary
Support config path resolution logic
src/main/java/com/github/_1c_syntax/bsl/reader/edt/EDTReader.java
Replaces parentConfigurationsPath() with supportConfigPath(), which returns Configuration.distr when present, otherwise falls back to ParentConfigurations.bin; constructor's exists-check and ParseSupportData.read(...) call now use this new path.
Dependency version bump
build.gradle.kts
Bumps io.github.1c-syntax:supportconf from 0.17.0 to 0.17.1, keeping the existing bsl-common-library exclusion.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • 1c-syntax/mdclasses#529: Both PRs modify EDTReader's support-config loading to check for an on-disk file before calling ParseSupportData.read(...).
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 Title matches the main change: EDTReader now reads the new support format with a fallback to the old one.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/parentConf

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

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/main/java/com/github/_1c_syntax/bsl/reader/edt/EDTReader.java (1)

286-293: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider extracting hardcoded path segments to constants.

"src", MDOType.CONFIGURATION.nameEn(), "Configuration.distr", and "ParentConfigurations.bin" are inlined here, similar to patterns already captured by CONFIGURATION_MDO_PATH/CONFIGURATION_MDO_FILE_NAME above. Extracting filename constants would reduce duplication and ease future changes to the format names.

🤖 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/reader/edt/EDTReader.java` around
lines 286 - 293, The supportConfigPath method in EDTReader still inlines path
and filename segments that are already duplicated elsewhere. Replace the
hardcoded "src", MDOType.CONFIGURATION.nameEn(), "Configuration.distr", and
"ParentConfigurations.bin" values with shared constants alongside
CONFIGURATION_MDO_PATH and CONFIGURATION_MDO_FILE_NAME, then use those constants
when building the configurationDir and fallback path.
🤖 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.

Nitpick comments:
In `@src/main/java/com/github/_1c_syntax/bsl/reader/edt/EDTReader.java`:
- Around line 286-293: The supportConfigPath method in EDTReader still inlines
path and filename segments that are already duplicated elsewhere. Replace the
hardcoded "src", MDOType.CONFIGURATION.nameEn(), "Configuration.distr", and
"ParentConfigurations.bin" values with shared constants alongside
CONFIGURATION_MDO_PATH and CONFIGURATION_MDO_FILE_NAME, then use those constants
when building the configurationDir and fallback path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cefa6ad8-a32d-4301-b3aa-4429304f3a37

📥 Commits

Reviewing files that changed from the base of the PR and between d25c361 and 6c5f1ce.

📒 Files selected for processing (2)
  • build.gradle.kts
  • src/main/java/com/github/_1c_syntax/bsl/reader/edt/EDTReader.java

@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Test Results

  402 files  ±0    402 suites  ±0   8m 18s ⏱️ +51s
  374 tests ±0    374 ✅ ±0  0 💤 ±0  0 ❌ ±0 
2 328 runs  ±0  2 328 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 6c5f1ce. ± Comparison against base commit d25c361.

♻️ This comment has been updated with latest results.

@theshadowco
theshadowco merged commit 8db75f0 into develop Jul 1, 2026
30 of 33 checks passed
@theshadowco
theshadowco deleted the feature/parentConf branch July 1, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant