Skip to content

Use core VbaSourceFile in MCP server import - #95

Merged
josef-poetzl merged 1 commit into
devfrom
feature/mcp-use-core-vba-source-file
Nov 17, 2026
Merged

josef-poetzl merged 1 commit into
devfrom
feature/mcp-use-core-vba-source-file

Conversation

@josef-poetzl

Copy link
Copy Markdown
Member

Summary

  • The MCP server import uses VbaSourceFile of the AccUnit core (Export test classes as UTF-8 with BOM and detect encoding on import #94) for reading, the encoding check and the ANSI conversion instead of its own copies.
  • The import copy (with export header for code without header) is written as UTF-8 with BOM; TestClassManager.ImportTestComponents converts it to ANSI for VBComponents.Import.
  • The check per file for characters outside the ANSI code page stays, so other files are still imported; UnsupportedSourceCharactersException is reported as tool error.
  • Tool description and README: export encoding follows the setting ImportExportEncoding (default UTF-8 with BOM).

Tests

  • MSBuild Debug, 140/140 unit tests passed.
  • Live stdio test in C:\Test: import of a UTF-8 class without header and an ANSI .bas, rejection of a file with a character outside cp1252 while the others were imported, run tests, export (UTF-8 BOM, umlaut kept), import again.

Reading, encoding check and ANSI conversion of test class files now use VbaSourceFile of the AccUnit core. The import copy is written as UTF-8 with BOM; the core converts it for VBComponents.Import. Export docs name the ImportExportEncoding setting.
@josef-poetzl
josef-poetzl merged commit 0a2cfbd into dev Nov 17, 2026
1 check passed
@josef-poetzl
josef-poetzl deleted the feature/mcp-use-core-vba-source-file branch November 17, 2026 15:52
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