Skip to content

Add bsl-language-server support for 1C:Enterprise language#1

Open
Copilot wants to merge 11 commits intomainfrom
copilot/add-bsl-language-server
Open

Add bsl-language-server support for 1C:Enterprise language#1
Copilot wants to merge 11 commits intomainfrom
copilot/add-bsl-language-server

Conversation

Copy link

Copilot AI commented Dec 24, 2025

  • Create BSL language server implementation in src/solidlsp/language_servers/bsl_language_server.py
    • Automatic version detection via GitHub API (/releases/latest endpoint)
    • Auto-updates to new versions when available (checks every 8 minutes, same as vsc-language-1c-bsl)
    • Stores version info in SERVER-INFO file (version + last update check timestamp)
    • Cleans up old versions after update
    • Downloads platform-specific ZIP from GitHub releases (win/nix/mac)
    • Bundled runtime included, no Java required
    • Correct executable paths for each platform
    • Fallback to hardcoded version if GitHub API is unavailable
    • Supports custom executable path and BSL LS configuration via ls_specific_settings
    • LSP capabilities based on official BSL LS source code (BSLLanguageServer.java):
      • hover, definition, references
      • documentSymbol, formatting, rangeFormatting
      • codeAction (quickfix, refactor), codeLens
      • documentLink, colorProvider, rename, inlayHint
      • publishDiagnostics, foldingRange, selectionRange
      • callHierarchy, semanticTokens (full+delta+range), workspaceSymbol
  • Add BSL language to the Language enum in src/solidlsp/ls_config.py
  • Create test repository with BSL source files
  • Create test suite (4 tests pass)
  • Add BSL pytest marker to pyproject.toml
  • Update README.md and CHANGELOG.md
Original prompt

Add bsl-language-server. See https://github.com/oraios/serena/blob/main/.serena/memories/adding_new_language_support_guide.md


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Dec 24, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 24, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.


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

Copilot AI and others added 2 commits December 24, 2025 15:04
Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for BSL language server Add bsl-language-server support for 1C:Enterprise language Dec 24, 2025
Copilot AI requested a review from nixel2007 December 24, 2025 15:10
@nixel2007
Copy link
Member

@copilot Не качай jar, качай zip под операционную систему

Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 24, 2025

@copilot Не качай jar, качай zip под операционную систему

Сделано в коммите 8e5456a. Теперь скачивается ZIP архив под конкретную ОС:

  • Windows: bsl-language-server_win.zip
  • Linux: bsl-language-server_nix.zip
  • macOS: bsl-language-server_mac.zip

Пути к исполняемому файлу тоже учитывают разную структуру для каждой платформы (включая .app/Contents/MacOS/ для macOS).

Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 24, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/1c-syntax/bsl-language-server/releases/latest
    • Triggering command: /home/REDACTED/work/serena/serena/.venv/bin/pytest pytest test -vv -m bsl (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 28, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/1c-syntax/bsl-language-server/releases/latest
    • Triggering command: /home/REDACTED/work/serena/serena/.venv/bin/pytest pytest test -vv -m bsl (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@nixel2007
Copy link
Member

@copilot запусти тесты

@nixel2007 nixel2007 marked this pull request as ready for review December 28, 2025 18:08
Copilot AI review requested due to automatic review settings December 28, 2025 18:08
Copy link
Author

Copilot AI commented Dec 28, 2025

@copilot запусти тесты

Тесты BSL пройдены успешно:

test/solidlsp/bsl/test_bsl_basic.py::TestBSLLanguageServer::test_ls_is_running[bsl-bsl] PASSED
test/solidlsp/bsl/test_bsl_basic.py::TestBSLLanguageServer::test_find_document_symbols[bsl-bsl] PASSED
test/solidlsp/bsl/test_bsl_basic.py::TestBSLLanguageServer::test_find_definition_within_file[bsl-bsl] PASSED
test/solidlsp/bsl/test_bsl_basic.py::TestBSLLanguageServer::test_find_references_within_file[bsl-bsl] PASSED

4 passed, 1 skipped, 699 deselected, 6 warnings in 21.59s

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive support for BSL (1C:Enterprise 8) language via the bsl-language-server, enabling Serena to work with 1C:Enterprise projects. The implementation includes automatic version detection and updates via GitHub API, platform-specific binary distribution with bundled runtime (no Java required), and comprehensive test coverage.

Key changes:

  • Automatic language server installation with version management and update checks every 8 minutes
  • Platform-specific executable handling for Windows, Linux, and macOS with correct paths for each platform
  • Comprehensive test suite covering language server startup, document symbols, go-to-definition, and find references

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/solidlsp/language_servers/bsl_language_server.py Core implementation of BSL language server with automatic download, version management, update checking, and platform-specific executable handling
src/solidlsp/ls_config.py Added BSL to Language enum, file matchers for .bsl and .os extensions, and language server class mapping
test/solidlsp/bsl/test_bsl_basic.py Test suite covering language server startup, document symbols, go-to-definition, and find references functionality
test/solidlsp/bsl/__init__.py Test module initialization file
test/resources/repos/bsl/test_repo/main.bsl Main test file with functions and procedures for testing BSL language server capabilities
test/resources/repos/bsl/test_repo/helper.bsl Helper module with utility functions for cross-file reference testing
test/resources/repos/bsl/test_repo/simple_var.bsl Simple variable test module for additional test coverage
pyproject.toml Added BSL pytest marker for test organization
README.md Updated supported languages list to include BSL (1C:Enterprise)
CHANGELOG.md Documented the new BSL language support with feature details

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
…n, etc.)

Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
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.

3 participants