RDCore a été conçu dès le départ avec l’extensibilité en tête : RDCore.Diagnostics est peut-être livré avec la plateforme principale, mais ça a toujours été une extension. L’idée n’est toutefois pas d’expédier toutes les extensions avec la plateforme.
En fait, la seule façon de les utiliser actuellement est de les compiler à partir du code source. Quel genre d’extensions, demandez-vous ?
Déposez votre café et assurez-vous d’être bien assis.
RDCore.UnitTesting
La fonctionnalité qui a transformé une idée un peu folle de tests unitaires VBA en un portage C#, puis en un complément VBE qui est rapidement devenu Rubberduck, avant de devenir aujourd’hui RDCore. Les tests unitaires sont donc de retour avec la même interface Assert (mais une nouvelle bibliothèque de plateforme RDTest), ainsi que :
rdc test et des rapports d’exécution au format JUnit pour les exécutions hébergées en CI
L’exécution des tests directement dans l’éditeur est prévue, mais pas encore implémentée
Nouvelles annotations @TestCase et @ExpectedError
Diagnostics documentés sous la forme d’incidents RDT00000
Les listes de complétion proposent les annotations sur @, avec leur aide sur les paramètres
Il ne s’agit pas d’une liste de souhaits hypothétique : voici la plateforme en action sur GitHub, dans un projet de démonstration RD-VBA qui exécute des tests unitaires RD-VBA sur Ubuntu :
L’option --unattended garantit que le runtime lève une exception au lieu d’attendre qu’un utilisateur absent confirme une boîte de dialogue.
RDCore.Web
Si VBScript allait de pair avec ASP Classic, alors RD-VBA fait de même avec ASP.NET. Cette extension définit la bibliothèque de plateforme RDWeb, qui fournit l’API permettant de faire exactement cela :
'@Controller("api/orders")
Option Explicit
'@HttpGet("{id}")
Public Function Order(ByVal id As Variant, Optional ByVal format As Variant) As Variant
' ...
End Function
'@HttpPost("{id}/lines")
'@FromBody("line")
Public Function AddLine(ByVal id As Variant, ByVal line As Variant) As Variant
' ...
End Function
La bibliothèque définit également les outils de sérialisation et désérialisation JSON, et l’extension du langage RDJson (temporairement intégrée) permet une sérialisation JSON aller-retour pour les objets Dictionary, Collection et les objets métier (classes de l’espace de travail). Ainsi, une méthode de contrôleur déclarée As Thing peut retourner une instance de Thing, et RDWeb saura comment la sérialiser pour le client.
Et plus encore ?
Plusieurs autres extensions de plateforme gratuites et open-source arriveront pendant la phase bêta, lorsque l’installation d’extensions ne nécessitera plus une compilation depuis les sources : toutes les extensions de plateforme seront alors disponibles via la place de marché sur rubberduckvba.ca.
D’ici là, ces briques fondamentales devraient déjà suffire à vous occuper. Bien sûr, il y a encore beaucoup de choses que je n’ai pas mentionnées :
RDCore.Demo.NavalBattle inclut désormais un serveur RDWeb qui expose l’API faisant fonctionner le jeu dans une interface React ; ça aurait tout aussi bien pu être Angular.
Les exécutions CI du dépôt lancent rdc test et s’en servent pour alimenter l’insigne d’état du README : ce sont des tests unitaires RD-VBA qui s’exécutent sur une machine virtuelle Linux quelque part dans le nuage, intégrés à une chaîne DevOps, avec chaque appel externe ou natif entièrement traçable.
Les types différés et inférés sont disponibles : vous pouvez maintenant obtenir des suggestions de complétion pour des modules ou fonctions que vous n’avez même pas encore écrits, développer quand même le code qui les utilise (des tests unitaires, peut-être ?), puis inférer la structure d’un module auxiliaire avec une action de code qui le matérialise automatiquement.
La couche de politique d’exécution permet de journaliser et auditer tous les appels natifs et externes (ou de les bloquer si vous préférez ; oui, cela a un coût en performance).
Consultez la page des versions pour la liste détaillée de toutes les nouveautés.
Prochaine étape : une visite guidée de la démo de plateforme, qui n’a pas encore été publiée.
English
V I V A T ❤️ C U C U M I S ™
Platform Extensions
RDCore was architected from the very beginning, with extensibility in mind: RDCore.Diagnostics may ship with the core platform, it was always an extension. The idea isn’t to ship extensions with the platform though.
In fact the only way to use them is currently to build them from source. What kind of extensions, you ask?
Put down your coffee and make sure you’re seated.
RDCore.UnitTesting
The feature that turned a crazy VBA unit testing idea into a C# port and VBE add-in, which quickly turned into Rubberduck, which today becomes RDCore. So unit testing comes back with the same Assert interface (with a new RDTest platform library), but also:
rdc test and JUnit-format test run reports for CI-hosted runs
Running tests in the editor is planned, just not implemented yet
New @TestCase and @ExpectedError annotations
Issues documented RDT00000 diagnostics
Completion lists offer annotations on @, with their parameter help
This isn’t a hypothetical wish-list – here is the platform in action on GitHub, in a RD-VBA demo project that runs RD-VBA unit tests on Ubuntu:
The --unattended switch ensures the runtime throws instead of waiting for a user that isn’t there to OK a dialog.
RDCore.Web
If VBScript went hand-in-hand with ASP-Classic, then RD-VBA does the same with ASP.NET. This extension defines the RDWeb platform library, which provides the API for doing exactly that:
'@Controller("api/orders")
Option Explicit
'@HttpGet("{id}")
Public Function Order(ByVal id As Variant, Optional ByVal format As Variant) As Variant
' ...
End Function
'@HttpPost("{id}/lines")
'@FromBody("line")
Public Function AddLine(ByVal id As Variant, ByVal line As Variant) As Variant
' ...
End Function
The library also defines JSON de/serialization tooling, and the (temporarily embedded) language-level extension RDJson makes Dictionary, Collection, and objects (workspace classes) round-trip JSON serialization, so a controller method that declares As Thing can return a Thing instance, and RDWeb knows how to serialize it to a client.
More?
There will be several more free and open-source platform extensions in the beta phase, when the extension installation experience doesn’t require building from source anymore: all platform extensions will then be available through the marketplace on rubberduckvba.ca.
Until then, these foundational building blocks should keep you busy. Of course, there’s a lot more I haven’t mentioned:
RDCore.Demo.NavalBattle now includes a RDWeb server that serves the API that runs the game in a React frontend; it could have been Angular, too. Or you could still inline your HTML in classic ASP style and fashion.
The repository’s CI runs, run rdc test and use it to report the status badge on the README: that’s RD-VBA unit tests running on a Linux VM somewhere on a cloud and integrated into a DevOps pipeline, with every external or native call auditable.
Deferred/inferred types have shipped: you can now get completion list items for modules or functions you haven’t written yet, write the code (unit tests?) against them anyway, and then infer the shape of a helper module with a code action that materializes it for you.
Execution policy layer makes all native and external calls optionally auditable (or blocked if you like; yes, there’s a performance penalty).
RDCore.VSCode est une extension VS Code qui se connecte au serveur de langage RDCore pour offrir l’expérience LSP complète dans l’éditeur Visual Studio Code.
RDCore publie la version 0.2.5-alpha avec un correctif au niveau de la plateforme qui permet de déboguer un espace de travail qui référence MSForms. Ceci corrige l’intégration à HexIDE juste avant la grosse sortie de HexIDE.
VS Code n’est peut-être pas votre éditeur préféré, mais il fonctionne et fait le travail. Pour certains, il lui manque trop de fonctionnalités pour être utile. Pour d’autres, le thème abyss est tout ce dont il aura jamais besoin. Pour ceux qui se trouvent quelque part entre les deux, une nouvelle extension RDCore lui fait prendre en charge le code VBA et les espaces de travail .rdproj.
Avec la plateforme RDCore derrière, l’implémentation d’un client language server protocol (LSP) pour VS Code s’est faite en moins de 10 minutes, avec une seule requête (chapeau à Claude Opus 5.5) : le serveur LSP alors intégré à HexIDE nuisait aux tests d’intégration de la plateforme RDCore, et j’avais besoin d’un client capable d’en faire plus que le client REPL de RDC.
Et puis, puisqu’il existait, je me suis dit qu’il pouvait aussi bien être publié : quelqu’un allait bien faire un client VS Code pour RDCore un jour ou l’autre, alors une offre maison me semble tout indiquée.
La version initiale offre tous les gestionnaires LSP standard que RDC fournit d’emblée : on obtient donc des code lenses navigables, des inlay hints, des diagnostics avec leurs correctifs rapides et leurs liens vers la documentation, la coloration syntaxique sémantique, le pliage du code, et les fonctionnalités du débogueur DAP, points d’arrêt conditionnels compris.
Voici la démo de plateforme NavalBattle exécutée dans le débogueur de Visual Studio Code, avec une interface MSForms native hébergée par l’environnement d’exécution RDCore, sous Win64 :
FairplayAI (grille 1) a gagné cette partie contre MercilessAI, pour la petite histoire.
L’adaptateur de débogage est un peu lent à démarrer, mais la console de débogage fonctionne et permet de manipuler les variables locales, puis de modifier et continuer.
Essayez-le!
Ce client s’ajoute à la page des téléchargements du site; vous le trouverez avec les autres liens de téléchargement de RDCore, dont le client HexIDE :
La section RDCore de la page des téléchargements de rubberduckvba.ca accueille déjà le petit nouveau de la famille.
V I V A T ❤️ C U C U M I S ™
English
RDCore.VSCode is a VS Code extension that connects to the RDCore language server to deliver the complete LSP experience in the Visual Studio Code editor.
RDCore ships version 0.2.5-alpha with a platform-level fix to enable debugging a workspace that references MSForms. This fixes the HexIDE integration just before HexIDE’s own big release.
VS Code may not be your favorite editor, but it works and gets the job done. For some, it lacks too many features to be useful. For others, the abyss theme is all it’s ever going to need. For those somewhere in between, there’s a new RDCore extension that makes it handle VBA code and .rdproj workspaces.
With the RDCore platform behind it, implementing a language server protocol (LSP) client for VS Code happened in under 10 minutes with a single prompt (props to Claude Opus 5.5): HexIDE’s then-bundled LSP server was getting in the way of RDCore platform-level integration tests, and I needed a client that could do more than RDC’s own REPL client does.
And then since it existed, I thought it might as well ship – someone was going to make a VS Code client for RDCore one day or another, so a first-party offering seems appropriate.
The initial release offers all the vanilla-LSP handlers that RDC supplies out of the box, so we get navigable codelens, inlay hints, diagnostics with their quickfixes and documentation links, semantic syntax highlighting, foldings, plus the DAP debugger features – including conditional breakpoints.
Here is the NavalBattle platform demo running through the Visual Studio Code debugger, with a native MSForms GUI hosted by the RDCore runtime, on Win64:
FairplayAI (grid 1) won this game against MercilessAI, for the record.
The debug adapter is a bit slow to start, but the debug console works and lets you manipulate locals, and then edit and continue.
Try it!
This client makes a new addition to the site’s downloads page; you’ll find it alongside the other RDCore download links, including the HexIDE client:
The RDCore section of the rubberduckvba.ca downloads page already welcomes the newest member of the family.
RDCore v0.2.1-alpha, la deuxième préversion de la plateforme, est arrivée! Elle exécute votre code VBA et VB6 hors de l’éditeur VBA, sous Windows, Linux et macOS, et cette fois-ci, elle amène les formulaires avec elle.
RDCore v0.2.1-alpha : la plateforme, avec rdc et le serveur de langage. Elle a besoin de l’environnement d’exécution .NET 11.
RDCore et RDForms exécutant la démo de la plateforme sur un Mac, avec des sprites PNG. Derrière, la démo “application console” complétant une partie dans les mêmes conditions.
La première version alpha hébergeait les MSForms natifs, sous Windows seulement. Cette deuxième version alpha exécute vos formulaires Classic-VB dans RDForms, le tout nouveau cadriciel d’interface multiplateforme de la plateforme, qui affiche et exécute votre interface existante sous Linux, ou sur un Mac, Intel ou ARM64. Évidemment, ça fonctionne aussi sous Windows. Porter votre interface vers le nouveau cadriciel est entièrement facultatif (RDCore comprend les fichiers .frm et .frx), mais RDForms est fortement recommandé si vous démarrez un nouveau projet : il fond essentiellement MSForms dans les formulaires Classic-VB, de sorte que vos formulaires RD-VBA peuvent être MDI et afficher des images PNG avec un canal alpha. Bien sûr, ils ne se reportent pas vers MSForms ou les formulaires Classic-VB : ni l’un ni l’autre ne vous laisse régler l’opacité d’un contrôle, par exemple.
Le code d’un formulaire RDForms vit dans un module .rdform, à côté d’un document de conception .xaml.
Le cycle de vie des formulaires VB, les groupes de contrôles, Controls.Add, les membres des ListBox et des ComboBox (avec des icônes!), les menus contextuels, les twips et les modes d’échelle, PaintPicture, Print, Line, Circle, PSet, Point, etc. fonctionnent tous dans RDForms comme dans VB6; les UserControls, PropertyPages et UserDocuments sont des modules de code, et PropertyBag et Ambient sont pris en charge.
App.KeepSystemTheme fait suivre à RDForms le thème du système, alors vous obtenez un thème sombre gratuitement dans vos applications RDForms. Les lecteurs d’écran et les outils de test d’interface voient les menus et les contrôles, eux aussi. Les projets qui référencent MSComctlLib et FM20.DLL les lient dans RDForms, mais ni l’une ni l’autre de ces DLL n’est livrée avec le paquet RDForms.
Quoi d’autre de neuf?
Un projet RD-VBA peut maintenant être une Console Application : ses invites MsgBox et InputBox sont posées dans la console, mais sous Windows, on peut aussi les configurer pour faire apparaître les boîtes natives. Et un programme bâti sous Windows s’exécute sous Linux ou macOS, sans ses sources.
Un espace de travail peut maintenant contenir plusieurs projets qui se référencent les uns les autres : un groupe de projets VB6, ou une paire complément VBA et classeur Excel, peut tenir dans un seul espace de travail. Friend et VB_Exposed fonctionnent comme la spécification le prévoit.
Changements incompatibles
Cette version corrige les constantes du précompilateur VB en introduisant Is64BitEnv, qui sépare proprement les tests de système d’exploitation des tests d’architecture. Dans MS-VBA, Win64 vaut 1 sur un Mac 64 bits, ce qui brouille la frontière entre les deux et fait que les directives #If se comportent de façon inattendue; RDCore vous apporte des diagnostics qui vous disent quand elles sont mal configurées, et offrent de les corriger. La constante Linux64, introduite dans la première version alpha, est retirée (elle vaut 0 à moins que votre code la définisse) : Linux vaut 1 sous Linux, et Is64BitEnv vaut 1 dans tout environnement 64 bits, peu importe le système d’exploitation. #If Linux And Is64BitEnv teste ce que testait Linux64.
Le code écrit dans MS-VBA avec des directives de compilation conditionnelle qui fonctionnent sur un Mac continue de fonctionner tel quel.
Le schéma d’un fichier .rdproj a changé plusieurs fois depuis la première version alpha. Un projet créé avec cette première alpha se charge encore, mais il est recommandé de recréer le .rdproj, surtout si votre espace de travail a été créé à partir d’un projet VB6 : le nouveau schéma comprend des métadonnées de projet supplémentaires, que VB6 utilise pour make et que rdc build utilise à des fins semblables.
Quelques autres changements peuvent surprendre un espace de travail existant (une erreur non gérée termine maintenant le programme comme le fait End, par exemple); les notes de version les énumèrent tous.
Parité des inspections et des refactorisations de Rubberduck
La dernière version de la plateforme RDCore apporte presque chacune des inspections du Rubberduck d’origine (celles qui sont propres à Excel sont exclues, pour l’instant), mais avec un modèle sémantique qui permet d’aller beaucoup plus loin dans l’analyse, en faisant beaucoup moins de suppositions. La plupart offrent une ou plusieurs actions de code correctives (des correctifs rapides), et oui, vous pouvez encore les ignorer, mais ça se fait par les paramètres de configuration, et c’est encore mieux, parce que les paramètres de configuration forment une hiérarchie : la configuration de la plateforme pour la machine se trouve dans le dossier d’installation, la configuration de l’utilisateur dans votre profil, et maintenant une configuration d’espace de travail peut la remplacer pour un espace de travail.
Les inspections de Rubberduck sont devenues des diagnostics RDC. Voyez la documentation pour la liste complète :
Membres par défaut et vérifications des affectations
Liaison tardive et validation des interfaces
Code inutilisé ou mort
Plateformes et compilation conditionnelle
Là où MS-VBA et sa propre spécification MS-VBAL divergent
Projets et compilation : références circulaires entre projets, aucun point d’entrée ou plus d’un
Moins de faux positifs sur toute la ligne
Des outils de refactorisation, bien sûr :
Extract Method peut remplacer d’un coup, partout dans le projet, les copies de la sélection par un appel de la nouvelle méthode
Inline Member, tout nouveau : remplace un appel d’une procédure par son corps
Convertir un GoSub en procédure
Encapsulate Field
Implement Interface (offert sur la ligne Implements)
Move Members vers le haut et vers le bas d’un module; Sort Members
Remove et Reorder Parameters
Move Closer to Usage
Rename des types, des énumérations, des modules, du projet, des étiquettes de ligne et des contrôles de formulaire; le renommage suit les vraies liaisons symboliques. Comme toutes les refactorisations de RDC, il est entièrement déterministe et n’est pas une opération de recherche et remplacement textuelle.
Outils CLI
Les applications client et serveur de RDCore ont maintenant un écran de démarrage fourni par le SDK, et peuvent le remplacer par le leur, alors tous les outils ont l’air de faire partie de la même famille, parce que c’est le cas!
rdc build -c Release bâtit un programme qui peut s’exécuter hors de son espace de travail, et rdc build -r le bâtit pour Windows, Linux ou macOS (x64 ou Arm64), depuis n’importe quelle machine.
rdc bench exécute le corpus de bancs d’essai de la plateforme sur votre machine; donnez-lui un espace de travail et vous pouvez mesurer votre propre code source RD-VBA. La plateforme s’occupe pour vous de la mise en température et des statistiques.
rdc export-library extrait tous les symboles d’une bibliothèque de types donnée; quand la plateforme a les symboles d’une bibliothèque, elle peut compiler le code source écrit pour cette bibliothèque (mais pas l’exécuter : il faut pour ça la bibliothèque elle-même).
rdc mcp --workspace <chemin> sert les outils d’assistant IA intégrés de RDCore, par le protocole MCP standard.
Serveur MCP intégré
Comme on l’a déjà écrit, RDCore embrasse l’IA. Les outils MCP intégrés le démontrent : ils donnent à un assistant de programmation LLM le modèle sémantique de RDCore, par des outils entièrement déterministes qui trouvent les symboles, les références et les diagnostics, listent et appliquent les correctifs rapides, et renomment selon les liaisons. Un assistant IA qui utilise ces outils a quelque chose que la plupart n’ont pas, parce que les outils MCP se branchent habituellement sur un IDE, et non directement sur le cerveau et le modèle sémantique d’une plateforme de langage.
La différence est majeure : sans modèle sémantique, un assistant IA travaille avec des résultats non déterministes et traite le code source comme du texte brut. Bien des modèles deviennent très bons à travailler ainsi, mais ils restent sujets aux hallucinations et ne génèrent pas toujours le code optimal. Avec le MCP de RDCore, ces agents ont accès aux symboles, aux références, aux diagnostics et aux correctifs, et ils peuvent se servir de ces outils pour valider le code qu’ils génèrent, avant même qu’il n’arrive dans une réponse du clavardage.
Tout hôte d’assistant qui parle MCP peut s’en servir : vous fournissez le modèle, RDCore lui donne des ailes.
Performance
Ce cycle apporte des gains de performance étonnants sur toute la ligne pour le code compilé, et cette version compile beaucoup plus de code source RD-VBA que la précédente : là où bien des cas restaient interprétés, la plupart s’exécutent aujourd’hui compilés.
L’achèvement de l’étape de l’abaissement vers l’IR explique à lui seul une bonne part des gains, mais les bancs d’essai se sont surtout améliorés grâce à l’optimisation de la compilation et à la réduction des allocations : plusieurs opérations n’allouent maintenant presque rien et n’entraînent exactement aucune collecte de mémoire .NET :
Ces chiffres bougent à chaque fusion et n’indiquent que des charges de travail précises et irréalistes; mesurez votre propre code par rapport à une exécution de référence dans MS-VBA pour faire vos propres comparaisons valables à la maison.
Exécution maison sur MacOS: RD-VBA l’emporte avec 61/63 cas plus rapides que MS-VBA, complétant ici le banc d’essai en 304.3 millisecondes, contre 2,073.5 pour MS-VBA sur MacOS (ARM64).
Essayez-le!
Ça fait beaucoup de canard pour une deuxième préversion, et c’est encore une alpha : attendez-vous à des aspérités, et à ce que les choses changent d’une version à l’autre. Téléchargez-la, pointez rdc vers votre code, et puis VIVAT CUCUMIS!
V I V A T ❤️ C U C U M I S ™
English
RDCore v0.2.1-alpha, the platform’s second preview, is out! It runs your VBA and VB6 code outside the VBA editor, on Windows, Linux and macOS, and this time it brings the forms along.
RDCore+RDForms running the platform demo on a Mac, with PNG sprites. Background: the console application demo running to completion all the same.
The initial alpha release hosted native MSForms, on Windows only. This second alpha release runs your Classic-VB forms in RDForms, the platform’s shiny new cross-platform UI framework that renders and runs your legacy UI on Linux, or on a Mac, Intel or ARM64. Of course it also works on Windows. Porting your UI to the new framework is entirely optional (RDCore understands .frm/.frx), but RDForms is highly encouraged if you’re starting a new project: it essentially folds MSForms into Classic-VB forms, so your RD-VBA forms can be MDI and display PNG images with an alpha channel. Obviously, they don’t back-port to MSForms or Classic-VB forms: neither lets you set a control’s Opacity, for example.
An RDForms form’s code-behind lives in a .rdform module beside a .xaml designer document.
VB forms’ lifecycle, control arrays, Controls.Add, ListBox and ComboBox members (with icons!), context/popup menus, twips and scale modes, PaintPicture, Print, Line, Circle, PSet, Point, etc. all work on RDForms as they do in VB6; UserControls, PropertyPages and UserDocuments are code modules, with PropertyBag and Ambient supported.
App.KeepSystemTheme makes RDForms follow the system-wide theme, so you get a dark theme for free in your RDForms applications. Screen readers and UI testing tools see menus and controls, too. Projects that reference MSComctlLib and FM20.DLL bind them in RDForms, but neither DLL ships with the RDForms package.
What else is new?
RD-VBA projects can now be a Console Application, whose MsgBox/InputBox prompts are handled in the console, although on Windows they can also be configured to pop the native boxes. And a program built on Windows runs on Linux or macOS, without its sources.
Workspaces can now include multiple projects that reference one another; a VB6 project group or a VBA add-in + Excel workbook pair can exist in one workspace. Friend and VB_Exposed work as specified.
Breaking changes
This release fixes the VB precompiler constants by introducing Is64BitEnv, cleanly separating OS checks from bitness checks. In MS-VBA, Win64 is 1 on a 64-bit Mac, which blurs the line between OS and bitness checks and makes #If directives behave unexpectedly; RDCore brings you diagnostics that tell you when they are set up wrong, and offer to fix them. The Linux64 constant that the first alpha release introduced is retired (it is 0 unless your code defines it): Linux is 1 when running on Linux, and Is64BitEnv is 1 when running in a 64-bit environment, regardless of the OS. #If Linux And Is64BitEnv tests what Linux64 did.
Code that is written in MS-VBA with conditional compilation directives that work on a Mac continues to work as-is.
The schema definition of a .rdproj file has changed several times since the initial alpha release. A project file from that first alpha still loads, but re-creating the .rdproj is recommended, especially if your workspace was created from a VB6 project: the new schema includes additional project-level metadata that VB6 uses for make and that rdc build uses for similar purposes.
A few other changes may surprise an existing workspace (an unhandled error now ends the program as End does, for one); the release notes list them all.
Rubberduck inspection & refactoring parity
The latest version of the RDCore platform brings almost every single one of the legacy Rubberduck inspections (the Excel-specific ones are excluded, for now), but now with a semantic model that enables going much further in the analysis, while making far fewer assumptions. Most of them offer one or more corrective code actions (quick fixes), and yes, you can still ignore them, but that’s through configuration settings, so it gets even better, because configuration settings are a hierarchy: machine-level platform configuration lives in the installation folder, user-level configuration lives in your user profile, and now workspace-level configuration can override it within a workspace.
Rubberduck’s inspections have become RDC diagnostics. See the documentation for the full list:
Default members and assignment checks
Late binding and interface validation
Unused/dead code
Platforms and conditional compilation
Where MS-VBA and its own MS-VBAL specification diverge
Projects and builds: circular project references, no entry point or more than one
Fewer false positives across the board
Refactoring tools, of course:
Extract Method can replace every duplicate of the selection across the project with a call to the new method, in one go
Inline Member, brand new: replaces a call of a procedure with its body
Convert GoSub to Procedure
Encapsulate Field
Implement Interface (offered on the Implements line)
Move Members up and down a module; Sort Members
Remove/Reorder Parameters
Move Closer to Usage
Rename types, enums, modules, the project, line labels, form controls; rename follows actual symbolic bindings. Like all RDC refactorings, it is entirely deterministic and not a text-based search & replace operation.
CLI Tools
RDCore client and server applications now get an SDK-provided splash screen and may replace it with their own, so all the tools look & feel like they’re part of the same family, because they are!
rdc build -c Release builds a program that can run outside of its workspace, and rdc build -r builds it for Windows, Linux or macOS (x64 or Arm64), from any machine.
rdc bench runs the platform’s benchmark corpus on your machine; give it a workspace and you can benchmark your own RD-VBA source code. The platform handles warm-ups and stats for you.
rdc export-library extracts all the symbols of a specified type library; when the platform has the symbols for a library, it can compile (but not run; that needs the actual library) source code written against that library.
rdc mcp --workspace <path> serves RDCore’s built-in AI assistant tools, over standard MCP.
Built-in MCP Server
As was written before, RDCore embraces AI. The built-in MCP tooling demonstrates it: it gives an LLM coding assistant RDCore’s semantic model through fully deterministic tools that find symbols, references and diagnostics, list and apply quick fixes, and rename by binding. An AI assistant that uses these tools has something most don’t, because MCP tools typically hook into an IDE, not directly into a language platform’s brains and semantic model.
The difference is major: without a semantic model, an AI assistant works with non-deterministic outcomes and treats source code as plain text. Many models are getting very good at working like this, but they remain prone to hallucinations and may not always generate optimal code. With RDCore MCP, these agents get access to symbols, references, diagnostics and fixes, and they can use these tools to validate the code they generate before it even lands in a chat reply.
Any assistant host that speaks MCP can use them: you supply the model, RDCore empowers it.
Performance
This cycle delivers astonishing performance gains across the board for compiled code, and this version compiles much more RD-VBA source code than the previous release: where many cases remained interpreted, most today run compiled.
Completing the IR lowering milestone explains a lot of the performance gains all by itself, but the benchmarks mostly improved by optimizing compilation and reducing allocations: several operations now allocate almost nothing and incur exactly zero .NET garbage collections:
These figures move at every merge and only indicate specific, unrealistic workloads; benchmark your own code against an MS-VBA reference run to make your own valid comparisons at home.
A third party’s run on MacOS: RD-VBA wins with 61/63 faster cases than MS-VBA, completing the benchmark runs in 304.3 milliseconds while MS-VBA did the same in 2,073.5, on MacOS (ARM64).
Try it!
That’s a lot of duck for a second preview, and it’s still an alpha: expect rough edges, and expect things to change between versions. Download it, point rdc at your code, and VIVAT CUCUMIS!
La plateforme RDCore franchit aujourd’hui une étape importante avec sa première version alpha publiée officiellement. Cette pré-version peut être téléchargée et installée dès maintenant, et fonctionne sous Windows, Linux et macOS. Pour le moment, seules les plateformes 64 bits sont prises en charge.
La plateforme accueille RD‑VBA, une implémentation de la spécification MS‑VBAL corrigée sur certains points, enrichie sur d’autres, qui permet notamment d’utiliser PEEK et POKE dans le mode BASIC, ajoute les constantes de précompilation #If Linux et #IfLinux64, et compile vers l’IL de .NET 10.
Le cœur du langage réside dans le SDK (NuGet : v0.1.2‑alpha). Il définit une variante de VBA ainsi qu’une implémentation complète de sa bibliothèque standard capable de s’exécuter partout où .NET est disponible, sans dépendre du tristement célèbre environnement d’exécution MicrosoftVisual Basic ni d’une application hôte quelconque. La plateforme fournit son propre environnement d’exécution.
Automatisation COM
VBA a toujours été capable d’automatiser des objets COM sans être hébergé dans le processus concerné. C’est exactement ce qui se produit lorsqu’une variable reçoit un New Excel.Application ou qu’un appel à CreateObject(“Excel.Application”) est effectué.
Comme RD‑VBA s’exécute en dehors des applications Microsoft Office, cette approche devient désormais la méthode normale d’interaction avec COM.
rdc build
En contrepartie, vous gagnez la possibilité de compiler du code RD‑VBA en exécutables autonomes. Les commandes rdc build et rdc run font exactement ce que leur nom laisse entendre.
Serveur de langage
Le cœur du langage n’est qu’un modèle. Ce qui lui donne vie, c’est l’architecture client/serveur LSP qui constitue la plateforme. En son centre se trouve le serveur de langage, qui coordonne les échanges entre l’hôte d’exécution, le client ou l’EDI et les extensions de la plateforme.
Le serveur fournit l’implémentation du protocole LSP 3.17 par l’intermédiaire d’OmniSharp 0.19. Les erreurs de syntaxe, de compilation et, lorsque possible, d’exécution sont signalées sous forme de diagnostics dès la phase de conception.
Les listes d’autocomplétion sont disponibles pour les mots-clés et les identificateurs, et prennent en charge la recherche par bosses PascalCase : saisir « mb » permet par exemple de retrouver MidB et MsgBox.
La plateforme elle-même n’inclut pas d’EDI*; cependant, rdc.exe agit également comme client LSP autonome et lance une console interactive RD‑VBA/BASIC lorsqu’il est exécuté sans argument.
*mais attendez, ce n’est pas tout!
RDCore.HexIDE
Sans faire directement partie de la distribution RDCore, ce module complémentaire pour HexIDE agit comme client LSP. Il télécharge la plateforme si nécessaire, avec votre consentement, puis assure la liaison entre l’EDI et le serveur de langage.
Pour installer RDCore.HexIDE, téléchargez le paquet signé depuis sa publication GitHub, extrayez-le dans un dossier qui lui est propre sous le dossier addins de HexIDE, puis redémarrez HexIDE.
HexIDE est né comme projet d’EDI VB6 accompagné d’un interpréteur expérimental. Avec RDCore comme moteur, il devient naturellement l’environnement de référence pour les espaces de travail RD‑VBA.
Importation de code source MS‑VBA
Les utilisateurs de Rubberduck dans le VBIDE connaissent probablement déjà les fonctionnalités d’exportation et de synchronisation de projets destinées au travail sous gestion de versions.
Sinon, exportez simplement les modules de votre projet dans un dossier dédié puis ouvrez ce dossier comme espace de travail dans HexIDE. RDCore génère un fichier .rdproj qui recense tous les éléments appartenant au projet, qu’il s’agisse de code source ou non.
Votre espace de travail peut ainsi contenir des fichiers README.md, des images, des ressources localisées ou tout autre actif chargé à l’exécution.
Le code MS‑VBA qui suppose la présence d’un hôte devra être adapté pour recourir à l’automatisation COM externe. Le code qui utilise déjà cette approche devrait fonctionner tel quel.
Importation d’un projet VB6
Les projets VB6 existent déjà sous forme de fichiers et sont décrits par un fichier .vbp. Lorsqu’un tel espace de travail est ouvert dans RDCore, le fichier .rdproj correspondant est généré automatiquement à partir du projet VB6 existant.
Là encore, la compatibilité devrait être largement transparente, avec quelques réserves.
Applications graphiques
RDCore héberge nativement MSForms 2.0 sur les postes Windows qui disposent de cette bibliothèque en version 64 bits. En revanche, il n’héberge pas les formulaires VB classiques, même si tous les symboles associés sont définis au moment de la compilation.
Le projet RDForms est actuellement en développement et sera publié pendant le cycle alpha. Cette infrastructure d’interface utilisateur reposera sur le rendu multiplateforme Avalonia et sur le moteur d’exécution RDCore.
L’objectif est de réunifier les formulaires VB classiques et MSForms dans une seule plateforme moderne capable d’importer les fichiers historiques .frm et .frx, tout en offrant une API événementielle familière pour le code existant et une API MVVM pour les nouveaux développements.
Un concepteur XAML pour HexIDE fait également partie du programme.
D’ici la publication de RDForms, les interfaces utilisateur interactives restent limitées aux systèmes Windows disposant de MSForms 2.0 en version 64 bits.
Applications console
Les applications ne nécessitant aucune interface graphique peuvent s’exécuter partout où .NET est disponible.
Sous Windows, MsgBox utilise une boîte de dialogue Win32 native. Sur les autres plateformes, la fonction est fournie par l’environnement hôte (rdc) et affiche une boîte de dialogue simulée en mode texte dans la console. InputBox suit le même principe.
Lorsqu’une application est exécutée avec rdc run –unattended, toute tentative d’interaction avec l’utilisateur provoque une erreur d’exécution mettant fin au processus.
À vous de jouer!
RDCore entame son cycle alpha avec une implémentation LSP déjà remarquablement avancée. Les fonctionnalités essentielles attendues d’un environnement moderne sont présentes aujourd’hui et continueront d’évoluer au cours des prochains mois.
C’est donc le moment idéal pour explorer RDCore et HexIDE.
Et si vous ne savez pas par où commencer, le dépôt RDCore.Demo.NavalBattle constitue la vitrine officielle de la plateforme. Cette adaptation RD‑VBA du code MS‑VBA original publié sur ce blogue propose une interface MSForms sous Windows et une interface console sur toutes les autres plateformes.
The RDCore platform has officially released a tagged alpha build: a pre-release that you can download and install, and that runs on Windows, Linux, and macOS. For now, it is only available on 64-bit systems.
The platform is the home of RD-VBA, an implementation of the MS-VBAL specification, corrected in places and enhanced in others, that lets you PEEK and POKE at memory space in BASIC mode, adds #If Linux and #If Linux64 precompiler constants, and compiles to .NET 10 IL.
The language core lives in the SDK (NuGet: v0.1.2-alpha) and defines a version of VBA and an implementation of its standard library that runs everywhere .NET runs, without the infamous Microsoft Visual Basic runtime and outside of any host application: the platform provides its own host.
COM Automation
VBA was always able to automate COM without needing to be hosted inside the COM process in question – it’s what you do whenever you set an object variable to a New Excel.Application, or when you CreateObject(“Excel.Application”). RD-VBA running outside a Microsoft Office host means you must do things that way now.
rdc build
What you gain in exchange is the ability to build standalone executables from RD-VBA source code, so CLI commands like rdc build and rdc run do exactly what they sound like they’re doing.
Language Server
The language core alone is just a model. What brings it to life is the LSP client/server architecture of the platform and its components, at the center of which we find the language server, which acts as a coordinator between the host and runtime, the client/IDE, and the platform extensions.
The server delivers LSP 3.17 through OmniSharp 0.19, progress reporting included. Syntax and compilation errors, and run-time errors whenever possible, are reported as design-time diagnostics. Completion lists are triggered for keywords and identifiers, and match PascalCase humps, so “mb” gets you “MidB” and “MsgBox”.
The platform itself doesn’t include an IDE*, but rdc.exe itself is a standalone LSP client that runs a fun RD-VBA/BASIC shell when executed without any command-line arguments.
*but wait, there’s more!
RDCore.HexIDE
Not directly part of the platform bundle, this LSP client is a HexIDE add-in that downloads the RDCore platform, with your consent, if it’s not already installed, and then becomes the bridge between the IDE and the language server.
To install the RDCore.HexIDE add-in, download the signed package from its GitHub release, extract it into its own folder under HexIDE’s addins folder, and restart HexIDE.
HexIDE started as a VB6 IDE project with a toy interpreter – with RDCore as a backend, it becomes the natural home of RD-VBA workspaces.
Importing MS-VBA source code
If you’re using Rubberduck in the VBIDE, you’re probably already familiar with the export project and synchronize folder features, which were intended for working with source control.
Otherwise, export your project’s modules to a dedicated local folder, and open that folder as a workspace in HexIDE: RDCore generates a .rdproj file that enumerates all the files that belong to the project, whether they’re source code or not – so your workspace can contain a README.md file and additional assets (images, resource strings, etc.) that source code loads at run-time.
MS-VBA source code that presumes a host must be adapted to automate COM from the sidelines. MS-VBA source code that already does this should work as-is.
Importing a VB6 project
VB6 projects already exist in the file system, and a .vbp file describes the project: opening such a workspace in RDCore will automatically generate the .rdproj file from the .vbp, and again should work as-is… with a few caveats.
GUI Applications
RDCore hosts native MSForms 2.0 on a Windows desktop that has the 64-bit library. It does not host VB Forms despite having all the symbols defined at compile time; hosting VB forms requires reengineering pieces that belong to Microsoft, and RDCore does not do that.
RDForms is under development and will ship during the alpha cycle; it is the UI framework that RDCore will ultimately be using: Avalonia cross-platform rendering with RDCore runtime support will be combining Classic VB Forms and MS-VBA’s MSForms into a unified, modern UI framework that seamlessly imports legacy .frx and .frm, and then exposes a familiar event-based API for legacy workloads, and an MVVM API for the new ones. A XAML designer for HexIDE is also part of the deal.
Until RDForms releases, interactive UI in RDCore remains limited to Windows machines that have Microsoft’s 64-bit MSForms 2.0 library installed.
Console Applications
An application that doesn’t need to display a UI can run anywhere .NET runs. On Windows, MsgBox is a native Win32 message box; otherwise, the function is implemented by the environment host (rdc) and draws a text-mode message box in the console; InputBox is in a similar condition.
When executed with rdc run with the –unattended switch on, code that requires such user interactions throws at run-time, failing the process.
Playtime!
RDCore launches its alpha cycle much further along its LSP implementation than most other LSP projects would: everything you expect is there and already works, and both the SDK and the platform will keep evolving in the next few months.
This makes the next few months the perfect time to play with RDCore and HexIDE, and if you don’t know where to start, there’s always the RDCore.Demo.NavalBattle repository, which is the platform’s showcase demo: it runs an MSForms UI on Windows, and a console UI everywhere else, and it’s an RD-VBA port of the original MS-VBA code initially published on this blog.
Un jalon majeur a été franchi la semaine dernière : la plateforme RDCore dispose désormais d’un interpréteur qui assemble toutes les pièces du puzzle en quelque chose de traçable, configurable et extensible, qui ressemble aux débuts d’un runtime.
Là où tout ceci devient très concret : l’application console exécute maintenant une boucle REPL interactive où vous exécutez une session runtime en mode immédiat :
Ne vous laissez pas avoir par le look C64-BASIC : il s’agit d’un client LSP avec une session RD-VBA.
Les 4 octets alloués sont pris par le module et la procédure synthétique où vit le code source de votre programme. Tapez une instruction VBA, elle s’évalue et affiche son résultat; précédez-la d’un numéro de ligne, et vous venez d’inscrire cette instruction à cette ligne dans votre programme RD-VBA. Le nom de ce module synthétique est Program, et le nom de la procédure est Main. Vous verrez régulièrement ces identifiants dans les traces de la pile d’exécution (stack trace) des erreurs rencontrées – qui seront ici toujours sous Main, mais vous comprendrez que ce même mécanisme fonctionnera peu importe la profondeur de la pile dans un véritable client (IDE), avec un vrai projet et plusieurs modules et procédures.
L’idée ici n’est pas de faire évoluer cette application en un IDE non plus – mais ça fait une façon très divertissante de tester la plateforme, le cœur de langage et ses sémantiques. Le rôle de cette application est de simplement permettre de tester la plateforme de bout en bout. Étant un client LSP, nous verrons fort probablement apparaître un surlignage sémantique de la syntaxe au niveau de la sortie de LIST par exemple, ou alors des listes de complétion interactives; les diagnostics sont déjà branchés et ANALYZE en affichera les détails dès que ceux-ci deviendront disponibles. PEEK/POKE ne sont que pure lecture/écriture directe en mémoire à la Commodore64.
RUN exécute le programme de haut en bas, à moins que vous lui construisiez un parcours avec GoTo et GoSub/Return, auquel cas vous savez probablement ce que vous faites… sinon les diagnostics seront bientôt là pour vous guider.
Sémantiques
Toute la plomberie est en place; ce qu’il reste, c’est l’implémentation : les instructions I/O comme Open, Close, Print#, Write#, Put#, Get# sont implémentées; les déclarations, boucles, conditions, sauts et gestion d’erreurs sont fonctionnels. Beaucoup reste à faire: chacune des instructions doit avoir une implémentation, sans quoi les exécuter sera toujours en erreur.
L’implémentation de la librairie standard a débuté : Len et LenB sont les premiers consommateurs des données de stockage des UDT, et bien que LSet fonctionne tel que spécifié sur une String ou un UDT, la très vaste majorité de la librairie demeure à implémenter. Il s’agit de travail relativement simple qui n’a pas à traverser plusieurs couches d’abstraction et peuvent être des gains rapides; c’est pourquoi j’ai préféré donner les plus gros morceaux à Claude, les fonctions pures de la librairie peuvent être implémentées plus tard.
Ceci dit l’exécution et la gestion d’erreurs en place donnent déjà un bon aperçu :
Un programme RD-VBA qui ne contient pas d’instructions non-implémentées se complète.
Le retrait de l’instruction On Error GoTo révèle quelques faits intéressants :
D’abord, il y a une différence entre une erreur lancée explicitement par l’application, et une erreur d’exécution. Ensuite on remarque le numéro de ligne, puis la stack trace.
Ce que ces images ne montrent pas, c’est que le numéro de ligne est un symbole ici, seulement parce qu’il s’agit du mode programme – mais dans un document, la configuration par défaut fait de ce numéro l’emplacement L1C1 exact de l’erreur dans le document.
Une erreur d’application (VBA00000) est une erreur lancée par le code source (via Error, ou Err.Raise); une erreur d’exécution (VBR00000) est une erreur lancée par l’interpréteur. MS-VBA ne différencie pas réellement ces deux types d’erreurs – il y a donc désormais une distinction claire entre les deux, et ça ne brise rien du tout!
Aucune erreur d’application ne peut être confondue avec une erreur d’exécution, et il y aura toujours une trace de la pile d’exécution, même en mode immédiat!
Limitations
Certaines limitations sont inhérentes au fait qu’il s’agisse d’une application console: en effet il serait surprenant d’y voir une fonctionnalité affichant des info-bulles au survol d’un symbole.
D’autres limitations sont plutôt liées au design:
Le module Program et la procédure Main sont intrinsèques et ne peuvent pas être renommés.
Une commande sans numéro de ligne s’exécute immédiatement; les numéros de ligne sont donc obligatoires pour tout programme dans ce client.
Les numéros de lignes ne devraient pas empêcher l’utilisation de libellés, mais ceux-ci ne fonctionnent pas actuellement avec un numéro de ligne; GoTo/GoSub doivent donc référer à un numéro de ligne.
Les continuations sont invalides: un numéro de ligne ne peut pas être situé en plein milieu d’une instruction.
Limitation éventuelle du jeu de syntaxe valide en mode BASIC (configurable).
Limitation éventuelle à 10,000 lignes de la longueur permise d’une procédure; l’erreur procedure too long devrait alors être lancée à la compilation, mais possible que le mode BASIC fonctionne différemment.
Exit Sub termine le programme; Exit Function et Exit Property sont statiquement invalides.
Sub Main() et End Sub sont implicites: le corps du programme constitue le corps de cette procédure.
L’ajout de procédures additionnelles n’est pas supporté (les numéros de ligne étant invalides au niveau des déclarations d’un module); utilisez plutôt GoSub/Return avec de larges sauts de numérotation pour coder des sous-routines.
D’autres limitations sont ponctuelles et seront résolues avant le lancement de la v1 :
L’instruction REM qui explose à l’exécution est objectivement comique, mais ne restera vraisemblablement pas brisée longtemps.
L’invocation de membres de la librairie standard qui ne sont pas encore implémentés sera également en erreur.
Manipulation de Mémoire
Les commandes PEEK et POKE ne sont pas (encore?) implémentées en tant que mots-clés et donc pas utilisables dans du code source RD-VBA, mais les commandes fonctionnent et permettent donc une lecture/écriture directe d’octets en mémoire applicative – opération évidemment très risquée, mais la nostalgie l’a emportée.
Ceci dit les opérations LSet fonctionnent dans le code source sur des String et UDT.
Jalons
L’évolution du cœur de langage est complètement découplée de celle de l’application CLI, donc celle-ci fonctionnera de mieux en mieux et de façon de plus en plus complète à mesure que s’ajouteront les sémantiques du cœur de langage, et ce sans rien devoir corriger ou modifier dans l’application même.
Cela ne signifie pas pour autant que le travail est terminé!
L’application supporte notamment des thèmes, donc si le bleu C64-BASIC ne vous plaît pas, vous pouvez toujours passer à un thème foncé moderne. Ce n’est donc qu’une question de temps avant que la sortie de LIST affiche un surlignage sémantique issu du serveur de langage!
Exploiter cette connexion LSP constitue la façon dont cette application deviendra ultimement beaucoup plus qu’un éditeur BASIC. ANALYZE est déjà prêt à afficher les diagnostics, dès qu’ils commenceront à apparaître dans la plateforme.
Le mode REPL est bien pour une démo, mais le véritable outil est le mode CLI non interactif.
Les outils modernes s’exécutent dans des pipelines CI/CD (intégration et livraison continues) dans le cloud. rdc.exe sera à terme en mesure de compiler un projet, d’en exécuter les tests, et de bloquer une livraison qui dévie des conventions établies, le tout complètement en-dehors de l’écosystème MS-VBA.
Si seulement 1986 avait eu LSP… If only 1986 had LSP…
A major milestone was knocked down in the last week: the RDCore platform now has an interpreter that puts all the previous pieces together into a traceable, configurable, and extensible beginning of a runtime.
Where this gets very real, is with the CLI app now running an interactive REPL program mode where you’re basically running a runtime session in immediate mode:
Don’t be fooled by the C64-BASIC look; this CLI app is a full-fledged LSP client with an active RD-VBA runtime session.
The 4 bytes taken are allocated for the synthesized module and procedure scope your program space lives in. Type a VBA expression, and you get its result; precede it with a line number, and now you’ve written that instruction at that specified line number in your program. The name of this synthesized module is Program, and the name of the enclosing procedure is Main. This matters, because you’ll see these identifiers in error stack traces – here only ever inside Main, but you can see what this means for error handling with an actual IDE client, and a project with real procedure scopes.
The idea is not to evolve this app into one, either; it’s just to make a fun way to test the language core and semantics… and diagnostics – the platform, basically. The role of RD-VBA CLI mode is to test the platform end-to-end, hands-on – and being a LSP client means we’ll probably get to write old-school BASIC programs with semanticsyntax highlighting in LIST outputs, completion lists for the REPL inputs. Diagnostics are already wired, ANALYZE will start showing meaningful output when providers/extensions issue diagnostics. PEEK/POKE is just C64-like pure unsafe program memory read/write.
RUN runs the program top to bottom, unless you make it do funny things like GoSub, in which case you probably know what you’re doing. If you don’t, …RDCore diagnostics will eventually have your back covered.
Semantics
So the plumbing is in place; what remains is semantics: file I/O statements like Open, Write, Print#, are implemented at the language core layer. Declarations, control flow, error handling as well. Still a lot remains TODO – every single statement keyword must have its semantics implemented, otherwise running them gets you an internal error.
Standard library implementation has begun as well; Len and LenB are the first consumers of the UDT member storage data, and while all the symbols are defined and LSet works as specified on UDT and strings, the vast majority of the standard library remains to be implemented; this is mechanical work that doesn’t need to reach across multiple layers to be a quick gain – so I let Claude/Opus focus on the more meaty parts that do cross into the runtime and memory layout, leaving the simpler, pure functions for later.
Control flow and error handling is fully functional:
BASIC-like RD-VBA code runs end-to-end in the app, …as long as the program doesn’t involve unimplemented semantics.
Removing the On Error GoTo instruction reveals a number of interesting facts about RD-VBA:
First, there’s a difference between an error you raise and an error the runtime raises. Second, errors have a source location pointing to the line number of the faulting instruction, and then there’s a stack trace.
What this doesn’t tell you, is that the platform is showing symbolic line numbers here only because it has no workspace document proper (the internal buffer just simulates one), but in an IDE client the default configuration would be reporting the actual L1C1 document location.
An application error (“VBA00000”) is a run-time error that is raised by the workspace code; a runtime error (“VBR00000”) is a run-time error that is raised in the language core runtime semantics. MS-VBA historically did not really differentiate between these errors; now there’s a structural distinction between them, and it doesn’t break anything!
No Error or Err.Raise statement can ever be mistaken for a runtime error, and we always get a stack trace, even in immediate command mode.
Limitations
Some limitations are inherent to the CLI app being a CLI app: hover tooltips aren’t going to be available, and that’s a given.
Others are design decisions. These include:
Program.Main project and procedure scope; intrinsic, cannot be renamed.
C64-style program interface, using line numbers as markers for instructions that are stored in the source buffer rather than immediately piped to the interpreter; this makes line numbers inherently mandatory in this client.
Line numbers should not prevent the use of line labels, however labels do not currently parse with line numbers. GoTo must therefore refer to line numbers.
Line continuations cannot be used; a line number isn’t a valid statement to continue into.
Eventually artificially limiting the valid RD-VBA syntax (including comments) in CLI program mode to the BASIC subset of VB, via appsettings.json platform configuration.
Eventually limiting the number of logical lines to 10,000; procedure too long compile-time error ought to be raised then, but BASIC mode will probably end up working differently.
Exit Sub terminates the program; Exit Function and Exit Property are statically illegal.
Sub Main() and End Sub are implicit; the program body is that procedure’s body.
Additional Sub procedures cannot be defined (line numbers are illegal on declaration members); use GoSub/Return with wide line numbering gaps to denote subroutines instead.
Other limitations are temporary pre-alpha missing implementations that will definitely be implemented before a v1.0 can ship:
REM statements (BASIC-style comments) throwing statement not implemented is objectively funny, but will probably not take too long to get working as the no-op instruction it is.
Standard library implementation being incomplete, any function call that refers to a symbol defined there throws not implemented as well.
Unsafe Program Memory Ops
Not (yet?) implemented as keywords, the PEEK and POKE immediate commands allow byte-level unsafe reads and writes (!) from/to a specified address in program memory space. This is obviously dangerous and may lead to crashes, but nostalgia won.
That said LSet and RSet semantics are both implemented, including against UDT values.
🎯 Milestones
The evolution of the RD-VBA language core and runtime implementation is architecturally decoupled from the CLI application, so it’ll automatically throw fewer errors as the language core progresses, without fixing or changing anything anywhere in the CLI app.
That doesn’t mean the work is done, however.
The app supports themes, so if you don’t like C64-style BASIC blue, you might like a modern dark theme instead. It’s only a matter of time before LIST output gets semantic syntax highlighting from the language server!
Leveraging this LSP connection is how the app will turn into something more than a BASIC console. ANALYZE is already wired up to report diagnostics as soon as they start coming.
A BASIC immediate/command/program mode is nice for a platform demo, but the real tool is the non-interactive CLI mode.
Modern tools run in the cloud, from CI/CD scripts that build a project, run its tests, inspect its vulnerabilities and deviations from established coding practices; rdc.exe supports an extensible set of command-line tools exactly for this. Extensions can supply a provider for various commands such as test or analyze, and a CI/CD script could be configured to gate a build on tests passing and diagnostics showing no warnings or errors.
Il y a certaines choses qui doivent tout simplement être accomplies.
Parfois, c’est de graver avec vos propres mains dans un morceau de pierre le logo de votre compagnie nouvellement enregistrée.
Je peux le toucher (si lisse!) – il est là, il est réel. Je l’ai fait moi-même et je suis très fier du résultat!
D’autres fois, c’est de modéliser puis implémenter une spécification de langage depuis sa fondation.
J’ai, euh, fait quelque chose
Cette histoire débute à peu près à ce temps-ci de l’année (mai/juin) en 2014, mais le bout qui nous intéresse ici nous ramène il y a tout juste quelques mois à l’hiver 2026, au moment où je me suis réveillé un matin en me disant “et si RD3 était nettoyé un peu, et redémarré ?”
Armé d’une redoutable cafetière, j’ai ouvert Visual Studio et parti un projet tout neuf que j’ai nommé RDCore, puis j’ai commencé à y déplacer le système de typage – j’avais vraiment quelque chose d’intéressant dans RD3, il fallait juste débroussailler un peu.
J’ai ensuite suivi la documentation MS-VBAL (la spécification officielle du langage VBA) et… j’ai rapidement conclu que je détenais autre chose, que ceci n’allait pas, en fait, aboutir avec juste un redémarrage de RD3.
Rubberduck v3 a toujours été ambitieux, mais là c’était en train de devenir un véritable SDK… pour une plateforme de langage moderne.
Pour VBA.
Pleinement open-source et désormais officiellement sous la gestion d’une entité corporative, le projet est tout juste rendu public et toujours en phase de développement actif, donc ne cherchez pas un installateur pour l’instant, mais…
RDCore.SDK
La librairie principale de la solution RDCore encapsule le cœur de langage de la plateforme (le système de typage, les règles sémantiques, les abstractions de la librairie standard… Ça sera tout VBA mis en boîte), mais aussi (pour l’instant du moins) toute l’extensibilité liée au Language Server Protocol (LSP) pour bâtir une constellation de plug-ins hors-processus pour des analyseurs sémantiques, entre autres idées d’extensions.
Il s’agit d’un framework pour construire des applications .net 10 (donc théoriquement indépendantes de l’OS) qui peuvent construire sur ces nouvelles fondations flambant neuves, tout ce que la communauté VBA a toujours rêvé de pouvoir faire avec ce langage.
VBA est mort, non?
Voici ici une ré-implémentation (en cours) partie des spécifications, traduisant un ensemble inconfortable de règles souvent partielles et qui semblent contradictoires en un design honnêtement très élégant qui… change complètement la donne.
Et si on avait Roslyn, mais pour VBA?
Ceci place VBA à une véritable fourche dans son histoire : une branche représentant de plus en plus un risque opérationnel, l’autre se plaçant solidement comme un chemin vers l’avant.
One does not simply… sortir de VBA
Si vous n’étiez pas là vers la fin des années 90, vous ne savez peut-être pas à quel point VB était pratiquement partout. C’est peut-être aujourd’hui un langage un peu bizarre qui automatise quelques fichiers Excel pour votre compagnie, mais pour d’autres il exécute des fonctions critiques, ou alors il implémente un moteur de calculs physiques propriétaire qu’aucun n’a osé toucher en 25 ans sans avoir la sécurité d’une solide suite de tests unitaires : la migration de ce code hérité (“legacy”) coûtera plusieurs dizaines sinon des centaines de milliers de dollars pour aboutir avec quelque chose qui fonctionne peut-être aussi bien que lamacro de Dave, mais maintenant avec un portail web et des micro-services distribués sur AWS avec un API et oh, voici votre nouvelle facture mensuelle pour toute cette infonuagique, bienvenue sur le cloud!
Cette même histoire se répète un peu partout dans chaque recoin de chaque secteur de chaque économie sur cette planète, et l’industrie de la modernisation du code hérité est énorme… et tous les joueurs majeurs semblent convaincus qu’un autocomplete glorifié et mis sur un piédestal saura régler tous ces problèmes, avec une approche approximative qui fonctionne en surface, mais tient rarement la route par elle-même, car le diable est dans les détails.
À moins que quelque chose ne vienne déranger l’industrie avec une approche radicalement différente.
RDCore pourrait (éventuellement) prendre en charge la macro de Dave et soudainement, celle-ci serait pérenne et observable, de la même façon que si elle avait été complètement réécrite sur une plateforme de langage moderne… parce que c’est exactement ce dont il s’agit ici.
Ce que signifie l’existence de RDCore
C’est un énoncé, un pied à terre. Ça signifie qu’il existe désormais une plateforme de serveur de langage avec des capacités d’analyse sémantique extrêmementdétaillées en développement actifsous la direction de 9562-7303 Québec inc., et qu’il existe une communauté de développeurs qui refuse d’abandonner VBA et qui a décidé que le temps était venu de le prendre en main. MS-VBA ne sera probablement jamais open-source, alors notre réponse est “d’accord. nous le rendrons donc par nous-même à sa communauté“.
Ça signifie que soudainement, les capacités d’analyse sémantique de VBA deviennent comparables à celles deRoslyn (l’impeccable compilateur de C#) – entre toutes les choses avec quoi VBA aurait pu rêver d’être favorablement comparé.
Ça implique des possibilités d’extensions qui vont bien au-delà de ma propre débordante imagination : il existe désormais un chemin où la communauté peut façonner l’avenir de VBA de toutes les façons qui lui chantent.
Ça signifie beaucoup, beaucoup de choses.
Qu’advient-il de Rubberduck?
Il ne deviendra pas un nouveau plug-in pour VBA, c’est plus gros que ça. Pas non plus une version client LSP – c’est plus gros que ça.
Rubberduck va plutôt fusionner et ne devenir qu’un avec le langage qu’il tentait de mieux comprendre : la prochaine itération de Rubberduck en sera une du langage même, et il s’agit d’un nouveau paradigme pour Rubberduck, pour VBA, et pour l’industrie de la modernisation du code hérité en général.
J’aimerais voir RDCore devenir un vibrant écosystème bourré d’excitantes extensions officielles et de tierces parties ouvrant des possibilités jamais même envisagées auparavant qui démontent complètement l’idée que VBA est une langue morte. Une langue n’est pas morte tant qu’elle a des locuteurs, et d’ailleurs VBA est une spécification, et une spécification ne meurt pas – elle se retrouve plutôt fossilisée, gravée dans la pierre, puis implémentée des siècles plus tard d’une façon dont les auteurs originaux n’auraient pu imaginer.
Il y a une possibilité qu’RDCore passe à l’Histoire comme la plateforme qui a finalement succédé à VBA. Et ce n’était pas Microsoft. C’était nous. C’était Rubberduck. C’était RDCore.
Sometimes it’s carving your recently-incorporated company’s logo with your own hands in a limestone slab.
Now I can touch it (so smooth!): it’s here, it’s real. I made it myself and I’m proud of the results!
Some other times it’s just waking up and implementing a language specification.
So uh, I did a thing.
This story could start at just about exactly this time of the year (May/June) in 2014, but that’s not why you’re here, so I’m going to skip ahead to winter 2026 – just a few months ago when I thought “hey what if RD3 was actually sorted out and rebooted”, and set out to do just that.
I started a new solution and called it RDCore, then started the migration with the type system. I had something interesting in RD3, it just needed to be expanded on and cleaned up a little.
I grabbed the MS-VBAL specifications and found myself just organically but rather quickly reaching the conclusion that I was onto something else, this wasn’t just a reboot of RD3 anymore.
It was becoming a SDK. For a language platform.
For VBA.
Fully open-sourced and under corporate stewardship, now officially in Public Open-Core Phase II after a few months in a private development phase – the project is still very much pre-launch so don’t go looking for an installer yet, but…
RDCore.SDK
The main library in the RDCore solution encapsulates the platform’s language core (the type system, semantics, standard library abstractions, … it’s VBA wrapped up in a box), but also (for now anyway) everything around extensibility and wiring up the Language Server Protocol to make a constellation of out-of-process semantic analyzer plug-ins… among other extension ideas.
It’s a framework for building .net 10 applications (so at least theoretically platform-agnostic) that can extend this shiny new language platform with everything the VBA community ever dreamed of extending the language with.
VBA is dead, right?
The ironic thing is that, this is what might ultimately become its actual successor: a ground-up reimplementation of the language specifications (in progress), turning an uncomfortable mess of seemingly contradictory rules and exceptions into a honestly very elegant object-oriented design that …completely flips the script.
What if Roslyn, but for VBA?
This basically puts VBA at a literal fork in the road: one path is increasingly becoming a liability, the other is emerging as an increasingly compelling way forward.
One does notsimply… Exit VBA
If you weren’t around in the late 90s you might not understand just how ubiquitous Visual Basic was. Maybe it’s a funny language that scripts a handful of worksheets at your company, but elsewhere it runs complex proprietary physics calculations that nobody in 25 years dared refactoring without the safety net of a good unit test coverage, let alone extracting clear specifications from it: migrating it would cost hundreds of thousands of dollars, only to get something that maybe will work just as well as Dave’s macro, but in a web app now, with AWS-hosted micro services and API and oh here’s your updated cloud services monthly bill for all that. Welcome to the cloud!
And that same story is in every conceivable corner of every sector of every economy on this planet, and the modernization of this legacy code is a gigantic business with major players apparently all convinced that a masterfully concocted glorified auto-completion engine can solve all their problems, with an approximative approach that works fine on the surface, but often falls apart under scrutiny because the devil is in the details.
Unless something comes along and… disrupts the industry, that is.
RDCore could (eventually) run Dave’s macro and, just like that, it becomes sustainable and observable, as if it had been completely rewritten to run on a modern language platform... because it’s exactly what it is.
What RDCore’s existence means
It’s a statement. It means that there’s now a language server platform with extremely detailed semantic analysis capabilities, in active public development under the stewardship of 9562-7303 Québec inc., and that there’s a developer community that is refusing to let go of VBA and has decided that the time has come to take it into our own hands: MS-VBA will likely never be open-sourced, but RD-VBA says “fine, we’re open-sourcing VBA on our terms then”.
And then it means that suddenly, the semantic analysis capabilities of VBA are comparable to Roslyn (the pristine C# compiler itself), of all things VBA could ever dream to be favorably comparable to.
It means extensibility well beyond my own admittedly quite creatively artistic imagination: there’s now a path where a dev community gets to shape the future of VBA in just about any way they like.
What happens to Rubberduck?
It’s not becoming a better VBIDE addin. Bigger. Nor even a LSP-enabled version of it. Bigger.
Instead, Rubberduck is becometh one with the language it always tried to understand: the next iteration of Rubberduck is going to be an iteration of the entire language itself, and it’s a complete paradigm shift for Rubberduck, for VBA, and for legacy software modernization.
I would like the RDCore platform to spawn a thriving ecosystem of exciting never-thought-even-possible-before first and third party extensions that really challenge the notion that VBA is a dead language. A language isn’t dead as long as it’s spoken, and besides VBA is a language specification, and specs don’t die; they just get carved in stone, and then centuries later implemented in a way the original authors couldn’t even imagine.
There’s a chance RDCore goes down in History as the language platform that finally did replace VBA. And it wasn’t Microsoft that did it. It was us. It was Rubberduck. It was RDCore.
Le 26 mai 2026 marquera le 10e anniversaire de la découverte par le contributeur historique @Comintern de ce message cryptique à la clé de resource 18089 de la librairie VBE7INTL.DLL:
STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US { 18080, "Tile Horizontally" 18081, "Tile Vertically" 18082, "Arrange Icons" 18083, "Microsoft Visual Basic for Applications Help Topics" 18084, "Search Reference Index..." 18085, "Obtaining Technical Support" 18088, "About Microsoft Visual Basic for Applications..." 18089, "Long Live the Cucumber" 18090, "Break On All" 18091, "Break In Ole Server" 18092, "Break On Unhandled" }
Le projet Rubberduck a toujours voulu s’approprier cette phrase et s’en servir quelque part d’une façon ou d’une autre.
Rubberduck Core marine ce concombre depuis un certain temps, et fait de cette phrase son slogan, en latin:
Gravé dans la pierre, VIVAT CUCUMIS se lit en latin comme une prophétie ancienne.
Il y a plusieurs niveaux à cette imagerie: plongeons.
Gravé dans la pierre
Quand on dit de quelque chose qu’il est gravé dans la pierre, on décrit quelque chose d’immuable, ou qui n’est pas prêt de changer. Un peu comme les spécifications d’un certain langage de programmation.
La pierre taillée évoque l’antiquité et la renaissance, mais aussi les pierres tombales et les cimetières, où l’on pourrait s’attendre à retrouver une langue morte comme le latin… ou VBA. Ça dit “ceci existe depuis longtemps”, mais aussi “ceci fait partie de notre héritage”.
La pierre est une fondation solide, noble. Elle est aussi lourde, et peut être un fardeau tout comme le code hérité – ou pour Microsoft tout comme le support des librairies d’exécution de VBA. Elle dit malgré tout “ceci existera encore longtemps”.
VBA est mort, vive VBA!
Peut-être que le proverbial concombre se voulait réellement référer à Visual Basic même, mais c’est sans importance de toute façon parce que VBA a effectivement survécu, et donc le soulier fait, même si c’est a posteriori.
L’utilisation d’une image qui pourrait être interprétée comme une pierre tombale pour quelque chose qui est lié à VBA assume complètement la nature “intuable” du langage et la profonde ironie de le voir survivre à chaque produit ou technologie qui tente désespérément et successivement de le remplacer : VBA est mort, longue vie à VBA!
Modernisation
Rubberduck Core conserve les racines et fait évoluer le concept, alors on passera éventuellement de la pierre au métal – à l’acier :
Gravés au laser sur un médaillon en acier, les mêmes mots deviennent à la fois un hommage, une promesse, une réalisation, un… porte-clé sans doute.
L’acier est toujours la pierre, en quelque sorte. Cuisinée un peu certes (bon d’accord, carrément séparée du métal…), mais néanmoins il vient de lapierre. Brute, lourde et difficile à manier, maintenant raffinée, élégante et polie, relativement légère mais robuste et durable. Et brillante aussi. L’âme y est clairement toujours.
C’est précisément ce qui va se produire avec Rubberduck : le concombre ne fait que mariner encore un peu… parce qu’une décennie plus tard, celui-là n’est toujours pas un cornichon.
rubberduckvba.ca
Le site historique du projet rubberduckvba.comredirige désormais vers rubberduckvba.ca et le dépôt du projet Rubberduck sur GitHub est maintenant archivé en lecture seule. Les efforts de développement pour la prochaine évolution sont en cours dans un dépôt pour l’instant privé sous la même organisation rubberduck-vba; Rubberduck Core en sera bientôt le nouveau projet-phare en mode Open-Core, soutenu par 9562-7303 Québec inc., une société privée fondée à cet effet par le même auteur principal de Rubberduck et auteur de ce blogue depuis son commencement.
Être incorporé au Québec signifie que toutes les communications officielles seront publiées dans ce format en français d’abord, avec un lien immédiat vers le contenu équivalent en anglais. Ça signifie également que la disponibilité du contenu dans une langue autre que l’anglais n’est pas un ajout, mais une nécessité : tout comme Rubberduck, Rubberduck Core (ou RDCore pour faire plus court) sera assurément disponible en français et en anglais dès le jour un, et ensuite dans toutes les langues que la communauté rendra disponibles. Ce n’est pas un fardeau, mais une opportunité. Vos documents seront toujours envoyés dans la langue de votre choix.
(C) 2026 Mathieu Guindon pour 9562-7303 Québec inc.
English
Long Live the Cucumber
May 26, 2026 will mark the 10th anniversary of the discovery by core historical contributor @Comintern of this cryptic message at resource key 18089 of the VBE7INTL.DLL library:
STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US { 18080, "Tile Horizontally" 18081, "Tile Vertically" 18082, "Arrange Icons" 18083, "Microsoft Visual Basic for Applications Help Topics" 18084, "Search Reference Index..." 18085, "Obtaining Technical Support" 18088, "About Microsoft Visual Basic for Applications..." 18089, "Long Live the Cucumber" 18090, "Break On All" 18091, "Break In Ole Server" 18092, "Break On Unhandled" }
The Rubberduck project always wanted to appropriate this phrase and use it somewhere, somehow.
Rubberduck Core marinates the cucumber and makes the quote its catchphrase, coined in Latin:
Carved in stone, Latin VIVAT CUCUMIS reads like some ancient prophecy.
There are a few layers to this imagery: let’s dive.
Carved in Stone
When we say something is carved in stone, we are describing something that is either immutable, or isn’t about to change – much like the specifications of a certain programming language.
Carved stone evokes Antiquity and Renaissance, but also cemeteries and headstones, like where you would expect to find a dead language like Latin… or VBA. It says “this has been around for a long time”, and also “this is part of our heritage”
Stone is rock solid, foundational, noble. It’s also heavy, and it can be a burden, like legacy code – or if we ask Microsoft, like runtime support for VBA. It nevertheless still says “this will be around for a long time”.
VBA is Dead, Long Live VBA!
Maybe “the cucumber” really did refer to Visual Basic itself, but it wouldn’t matter if it didn’t: VBA lived on, so the shoe fits even if a posteriori.
Using something that can be construed as a headstone to depict something related to VBA leans heavily onto its “unkillable” nature and the profound irony of it surviving every single one of its successive replacement attempts: VBA is dead, long live VBA!
Modernization
Rubberduck Core keeps the roots and evolves the concept, and so we will eventually grow out of stone, to metal – to steel:
Laser-engraved on a steel medallion, the same words become a tribute, a promise, a fulfillment, a… keychain, perhaps.
Steel is still the stone, in a way – crushed and cooked (narrator: fully separated from it, actually), but it came from the stone. Crude, heavy and unwieldy, it ultimately becomes refined, elegant and polished, relatively lightweight but extremely solid and reliable. And shiny. The soul is still there.
That’s exactly what’s going to happen with Rubberduck – the cucumber is only marinating a little longer… because a decade later, this one still hasn’t pickled yet.
rubberduckvba.ca
The historical project site rubberduckvba.com is now redirecting to rubberduckvba.ca and the Rubberduck repository on GitHub is now archived/read-only. Development efforts towards the next evolution are currently in progress in a private repository under the same rubberduck-vbaorganization; Rubberduck Core will soon be its flagship Open-Coreproject under 9562-7303 Québec inc., a private company founded for this specific purpose by the same primary author of Rubberduck and of this blog since its inception.
Being incorporated in Québec means all public communications are going to be issued in a French-first format, with an immediate link to the English content. It also means that localization isn’t an afterthought in this company, but a necessity: like Rubberduck before it, Rubberduck Core (or RDCore for short) shall be assuredly available in both French and English, and then every language it would end up being translated into. It’s not a burden, but an opportunity. Your documents will always be emailed in the language of your choosing.
(C) 2026 Mathieu Guindon on behalf of 9562-7303 Québec inc.
The v3 full rewrite failed, obviously. The project was simply too ambitious for the limited capacity of an open-source weekend project.
Rubberduck is at a crossroads: either there’s a way forward, or sooner or later it’s a way to the graveyard.
You thought this was going to be about Rubberduck going “on indefinite pause”, didn’t you? If you haven’t seen the recent movement around the project’s website and GitHub organization, I wouldn’t blame you for thinking so, but…
I can’t let that happen to Rubberduck. This project means too much to me, to just let it die like this.
Not after all the blood, guts, and sweat that went into it.
It’s 2026. VBA has been “dead” for what, 20 years now? It’ll be “dead” for another 15 and Microsoft will still do nothing about modernizing VBA: they’ve essentially left that ground to the community – and that’s us.
And I’m perfectly fine with that.
I have no idea how big or small Rubberduck’s user base is; all I have is rough estimates. I know the total number of installer downloads for any given release tag, that’s all. I never collected any data from our users, because an OSS project that can’t sign their code shouldn’t be doing that, plus where’s the infra and who’s paying for it? I’ve poured quite a lot of my own money into this over the course of the past decade or so, and Enterprise-approvable, certified/signed code is crazy expensive and simply wasn’t going to happen under a pure open-source GPLv3 model at my sole expense.
Meanwhile we’ve built a reputation for ourselves and are now positioned as the reference for professional-level VBA code, and Microsoft’s own flagship AI tool – Copilot – spontaneously names Rubberduck as the best tool in the ecosystem in 2026 and validates our unit testing features as a unit testing framework that is comparable to industry-standard NUnit/JUnit. To me it says something about how deep the actual reach goes, and how dead VBA actually still isn’t.
“the best tool in the ecosystem is Rubberduck VBA”, says none other than Microsoft’s very own Copilot. Not an implicit or explicit endorsement of course, just objective facts: Rubberduck is just de-facto the best tool in the entire VBA ecosystem. The mission is accomplished.
Are we done beating around the bush now?
Yes: I’m going all in.
Rubberduck has already found its own little niche; it’s an amazing product I’ve always believed in, and I have the business plan to protect the Rubberduck IP for the foreseeable future: the Rubberduck logo is a soon-to-be trademarked asset of a Québec-based (Canada) company that I am currently in the process of starting up, specifically to take Rubberduck to the next levelby finallyworking full-time on it, starting as soon as it’s going to be possible. Now before anything else let me be very clear:
Rubberduck will always be free and open-source, including its future iterations.
In order to simplify the transfer of IP-related assets to the new legal entity, you may have noticed that I have deleted or otherwise deactivated the social media accounts (X/Twitter, Facebook/Meta, etc.), along with the Ko-fi and PayPal accounts. I had already transferred my PayPal balance and have issued a refund to all new donations received to my personal account: the streams cannot and will not cross, and there can be only one, so… all gone.
This blog will be archived. Being a Québec-Inc. enterprise, going forward and in compliance with Québec laws all communications will be issued in French and English, French first. DNS registration for rubberduckvba.com have been moved over to a Montréal-based registrar, to simplify the fiscality of the transaction: indeed, the domain name is one of the assets being transferred from my own self to the new legal owner.
Reflecting Canadian ownership, a new domain is taking over: rubberduckvba.ca will now be served instead of the historical .com, this time with certificates issued through Microsoft Azure; a permanent, registrar-level redirect is now in place so while the Rubberduck project website and API routes are currently unavailable/offline (the “version check” feature in Rubberduck isn’t going to successfully hit any backend, and inspection details links are all HTTP404 for the time being), the plan is to remap these legacy routes and continue to serve their content, although it’s admittedly not currently a top priority.
The GitHub repositories have been archived. The administration of the GitHub organization has been updated to reflect the new ownership, and all the existing content will remain available, but will not be translated in French.
It’s the end of this blog then?
Depends how you see it, really. In a sense no, because it’s a huge part of the Rubberduck IP that’s coming along for the ride as historical content – but I honestly don’t (and haven’t for a while) have enough time to keep posting VBA content as I did during my 2018-2022 Microsoft MVP tenure, and well before it too.
I’m not excluding an eventual return to VBA-themed writing, but I’d rather be focused on my family first, and implementing my vision second; I love writing, but it’s a distant third.
So… What’s next?
I can’t yet disclose what’s next, actually. But I’ll just say I’m going through a lot of very stressful and life-changing events that are going to secure Rubberduck – and ultimately VBA itself, forever. Mark my words:
This company will make VBA immortal.
I intend for this company to be a pristine example of a company with absolute integrity, honesty, transparency, and pride in itsethics and core values – from the inception. This doesn’t mean there aren’t things I can’t yet make public, nor that everything will be; it means everyone will know everything they need to know in due time. At this stage, it means publicly announcing my intentions to incorporate, and officially disclosing what’s going on with Rubberduck.
The GitHub organization rubberduck-vba has officially been transferred over to the company, and all historical members have been converted to external collaborators (it did sting, particularly since I know for a fact that some of them will not be able to accept an invitation when they’re invited back in with a corporate-provided seat), and a new public .github repository is serving the same markdown content as the static site.
Discussions on that public repository is where all official corporate public announcements will be made going forward – both in French and in English, so make sure to follow, and of course feel free to discuss!
The rubberduckvba.com website has been in a sad state for a very long time, and I have been working on a new version written with .net8 and the latest Angular framework so it could finally keep up and benefit from the latest additions to C# and the .net framework… all while moving hosting out of GoDaddy, because it makes no sense to be paying this much for SSL in 2024.
I went with what I know, so it’s a WinServer machine that runs IIS and a SQL Express instance. I learned a lot of things in the process and I’m happy everything is mostly working now: both test.rubberduckvba.com and rubberduckvba.com are now being served from an Azure VM that I fully control, with SSL certificates automatically renewing monthly for free with Let’s Encrypt.
The most important part was the backend part that reads xmldoc from Rubberduck release assets it downloads from GitHub and then synchronizes all the inspections and quickfixes and annotations in the database (marking as new ones that exist in next but not in main, or as discontinued those that exist in main but not in next). That and the (related) pipeline that gets the latest tags from GitHub, and updates the download stats on the home page:
A fresh new look for the site’s landing page, with a sleek revisited “outline” ducky icon – this time an actual SVG, so no more fuzzy blur!
Some work is still needed to correctly parse before/after examples for the annotations, and some legacy routes (e.g. /FeatureDetails?name="SomeQuickFix") are probably broken now, but pretty much everything that should be working, is working. The new site is much more snappy and responsive, and will be much easier to maintain as well: the source code is on GitHub at last, and should work locally with minimal setup for Angular/AngularCLI and perhaps a handful of environment variables.
Gone: redirect from rubberduck-vba.com
When I first signed up with GoDaddy in 2015, the domain I registered had the dash in it, mirroring the name of the GitHub organization. I think it’s when the ASP.NET/WebForms site went up that I registered the domain without the dash; the old domain would have pointed to the WebsiteBuilder thing, and when the new one went live I made the old dash domain a permanent http-redirect… and kept the old domain since then.
It’s been almost a decade, it’s time to let it go, for the same reason there’s not also a .org or .info or whatever – take it, be my guest. The no-dash domain however, remains under my wing for the foreseeable future.
Next steps
I needed to go live very soon to beat the GoDaddy renewals, so all the markdown content is exactly the same as it was on the old site, but some of it is kind of outdated and some features are missing, so expect this content to move a bit in the next couple of days.
With the old site, I’d login with GitHub and then as an authenticated administrator on the site I had tools to edit this markdown content; the backend part for the login has been implemented in the new site as well, but the client-side functionality isn’t there yet; I’d like to take the time to do this, otherwise I might as well just keep it all as static content directly in the HTML, but I like how markdown makes it easy to format a simple document, plus I got VBE-styled, Rubberduck-parsed code blocks to render as intended, so… the admin functionality is pretty high on my list right now.
Breaking changes would be high on that list as well, but as far as I know we’re all good.
In-app links to specific inspection pages should be working now, but the legacy /build/version routing did not make the cut: it dates all the way back to the ASP.NET (WebForms) site where I’d manually upload a copy of the rubberduck.dll to the server, and the site would use its version to advertise that a new one was available, and there was no backend API and multiple pages so it was easy to make a route that just returned a version string that Rubberduck could check against its own version on startup… but wow, what a silly idea. I did see a number of hits in the IIS logs while I was getting the prod site up, so that means some old pre-2.0 builds are still out there doing their thing, that’ll start failing to… tell the user about a newer available version; the newer builds hit the backend API directly instead, which returns a JSON string that can contain more information about the latest release than just a string with a version number – like a tag name and a download URL.
So yeah, some tweaks here and there, a revisiting of the markdown content, adding the Rubberduck.Mocks feature, and then some quick admin tools to maintain that content, and then I can draw another line and call it done and move on to the next thing; any changes will be deployed to the test site first, but at the moment there’s only one backend database, so any content changes made on the test site will affect the production site… which isn’t ideal, and won’t stand for long. Then there are a number of redundant requests and database hits that need to be axed, and caching has yet to be implemented and will further improve performance and significantly reduce the overall resource consumption of the VM which is something I need to keep an eye on, now that I manage it.
I know it’s been forever, trust me… I know. But life happens as they say, and here we are a whole year and over 20,000 downloads later with some movement at last in the Rubberduck repository.
Also… Rubberduck is now officially a whole 10 years old! It’s completely incredible how far we’ve pushed this project, and I’m very proud of everything we did, undid, redid. The number of times we’ve collectively crashed the VBIDE together must overflow an Integer by now!
Development on the project started late in 2014, but the website and blog only did in early 2015, with the initial release of what was then not much more than an extension of a thought experiment.
The “official” 2.5.92 release will come later once it’s been out in the wild a little as a pre-release, but the announcement will refer to this present article for what’s new.
The broken website did not like having the new tag records inserted for some reason, but the fallback links point to the right place so it’s still relatively easy to find the installer download; you’ll find the executable listed under the assets of the latest release/tag on GitHub:
A handful of new inspections are being introduced once again, this time around Option Base 1 and a little pet peeve of mine with Excel-specific code.
Parameterless Cells
As you know, in the Excel library Range.Cells is a parameterized get-only property that accepts a row or column index, or both, …or neither. Except when it’s not parameterized, it’ll just return exactly the parent Range object reference, making it an entirely superfluous member call. This new Excel-specific inspection will flag these parameterless calls. A quickfix could be implemented to automatically remove these calls, but flagging them as redundant is a good first step:
Public Sub DoSomething()
Debug.Print Sheet1.Range("A1").Cells.Address '<<< inspection result here
End Sub
UPDATE 2025-02-01: Properly implementing this inspection requires more careful consideration that make it difficult to avoid false positives in the few specific situations where a parameterless Cells call does, actually, return different references depending on what other Range members were called before – this kind of tracking isn’t quite possible with v2.x, unfortunately. So this inspection isn’t making it to release, it’s been removed already.
When Option Base 1 is specified, implicitly sized arrays begin at index 1 instead of the more typical 0. However, ParamArray arrays will always be zero-based regardless of Option Base. Similarly, explicitly qualified VBA.Array function calls will also systematically yield a zero-based array. This new inspection flags these parameters and function calls as having a base that is inconsistent with the Option Base setting of the module. There’s no fix for this one either, it’s just a hint that could potentially help detect off-by-one errors.
Option Base 1
Public Sub DoSomething()
Dim Values As Variant
Values = Array(42)
Debug.Print LBound(Values) '<~ 1 as per Option Base
Values = VBA.Array(42) '<<< inspection result here
Debug.Print LBound(Values) '<~ not 1
End Sub
Another example:
Option Base 1
Public Sub DoSomething(ParamArray Values) '<<< inspection result here
Debug.Print LBound(Values) '<~ not 1
End Sub
Rebalanced Inspection Defaults
For a while now, something had been bugging me about the inspection types and default severities: things tended to stick to the default fallbacks over time, and the categorization of a number of inspections felt wrong and overall unbalanced. Because inspection types are for legacy reasons part of the inspection configuration, if yours isn’t the default configuration you will not see an effect until you either reset everything to defaults, or manually edit the configuration file to remove everything about inspections.
Here’s the breakdown of how things were shuffled around with inspection types:
Inspection Type
v2.5.91
v2.5.92
Code Quality
73
60
Language Opportunities
23
21
Naming and Conventions
19
28
Rubberduck Opportunities
3
12
Total
118
121
..and with the default severity levels:
Default Severity
v2.5.91
v2.5.92
DoNotShow
3
3
Hint
11
22
Suggestion
25
34
Warning
72
38
Error
7
24
Total
118
121
Notably, everything around annotations is now under Rubberduck Opportunities, and default severity levels are much more sensible; the 3 inspections disabled by default remain disabled:
RedundantByRef mirrors ImplicitByRef; both are valid takes, just different conventions and the more explicit one was made the default, but you can reconfigure them to match your style by enabling one and disabling the other.
StepIsNotSpecified mirrors RedundantStepOne; again both valid stances, this time with the less noisy one as the default configuration.
ShadowedDeclaration was disabled for performance reasons, if I recall correctly. Or it’s something about some difficult false negative situations making it somewhat too unreliable or experimental to ship enabled by default.
This clean-up touched every single inspection, and in the process the way to localize the resources has been standardized, which should fix the annoying partly-localized labels in some inspection results.
The inspection results toolwindow gets a new disable this inspection button right next to the Fix menu, which should make it easier to disable an inspection altogether with a single click, by selecting any of its results in the grid.
The “disable inspection” command remains available as a link/button in the bottom panel, but now also as a more prominently visible button on the main toolbar. Note that there is no confirmation prompt for this actionfor now.
Unit Testing
This is a very, very exciting release for the unit testing feature!
Performance Enhancements
Keeping the Test Explorer UI updated with a constantly changing source collection was taking a serious toll on the UI thread, incidentally the only one available for running VBA code. Thanks to a quick PR by contributor tommy9, the explorer now leverages WPF features that improve the situation.
Projects with a lot of tests can still significantly speed up their execution by hiding the toolwindow and selecting Run all tests from the Rubberduck menu. If the main thread isn’t busy drawing a UI element, it’s free to run the instructions of a test procedure.
Moq+VBA
Seven long years after the initial pull request was opened, it’s finally merged and ready to start a little revolution in the VBA unit testing world.
There are important limitations: user code cannot be mocked after it’s been modified, and the setup of ByRef parameters may not always work correctly, but the bulk of it is close enough (and has been for a long time) to be release-worthy. Part of what took so long was that we wanted to ship the full feature working exactly as intended, but there are some serious technical roadblocks and between entirely dropping a 7 years old pull request and merging it anyway, … I’m going with the merge. Perfect is the enemy of good, they say.
What’s happening here is nothing short of pure wizardry: we’re turning arbitrary COM objects into .net ones, and then we translate configuration calls written in VBA into .net expressions that literally get compiled and invoked on the fly to call the non-generic methods offered by Moq 4.8 (getting a bit old, but we’ve never had anything like this in VBA).
In other words, unit testing with Rubberduck now empowers you with quite a large part of what only becomes possible with a real mocking framework, which this is.
The mocking API is currently documented in the wiki, but here’s the crux of it… it’s a game changer:
'arrange
Dim Mock As Rubberduck.ComMock
Set Mock = Mocks.Mock("Excel.Application") 'here we create a new mock using the Excel.Application progid
'then we configure our mock as per our needs...
Mock.SetupWithReturns "Name", "Mocked-Excel"
Mock.SetupWithCallback "CalculateFull", AddressOf OnAppCalculate
Dim Mocked As Excel.Application
Set Mocked = Mock.Object 'ComMock.Object represents the mocked object and always implements the COM interface it's mocking
'act
'just making sure the mock works 🙂
Debug.Print Mocked.Name
Mocked.CalculateFull
'assert
'use the ComMock.Verify method to fail the test if a method that was setup was not invoked as per the test's specifications:
Mock.Verify "CalculateFull", Mocks.Times.AtLeastOnce
There’s only a handful of simple objects to work with, and the API is clean, unambiguous, intuitive. The example above illustrates the enormous power that’s now in your hands by mocking the Excel.Application interface.
The COM mock lets you access the proxy object to pass it around as a surrogate implementation for a dependency that would otherwise compromise the “unit” part of it being a “unit test”; it’s a class type that’s spawned into existence from its definition, for which you can setup any member call in a test. Here we make the `Name` property return a different value just because we can, and when the macro invokes the `CalculateFull` method against this mock instance, rather than awaiting a full application-level compute you can simply verify that the method was invoked, or run a callback procedure (elegantly passing it to the API with the `AddressOf` operator) that can be parameterized if you need to accordingly alter some state.
I’ll write a whole article dedicated to this API soon, but together with the Fakes API, this really takes the Rubberduck unit testing feature to the next level (code coverage would be the next one). As long as you can identify the dependencies in your code (and come up with a way to inject them from the caller), you can now write a test that abstracts them away.
Other Tweaks
The Unassigned variable usage inspection will now honor the out prefix by convention, meaning it will no longer issue false positives when a variable is assigned by another procedure via a ByRef argument, as long as it’s named accordingly with an “out” prefix.
The About box will now mention “Win11” for Windows builds above 22000, even though the major version says 10. This was likely related to Rubberduck using an ancient .net Framework API to retrieve this OS version information.
Renaming an enum member in a way that requires the constant to be qualified, will now correctly use the enum type name rather than the name of the containing module, which was an edge case that could cause headaches and break the code.
What about v3?
If things had gone smoothly, you would know by now. They obviously haven’t, and not much has moved on that front since last May or so. I’m not abandoning the project, but building an entire editor client and a language server is honestly much more than I can chew at the moment, for multiple reasons… twinBASIC is coming, and while a commercial offering, it’s a VB6/VBA language server and compiler, and it reckons the whole editor part is already a solved problem. Rubberduck 3.0 was going to reinvent that wheel, which would have been a huge distraction.
So RD3 is going to be re-scoped a bit: the planned VBIDE integration / add-in part remains of course, but instead of making an entire editor from scratch, we’ll integrate into an existing, modern one that’s already an extensible LSP (Language Server Protocol) client, much like Visual Studio Code (but no, it’s not going to be VS Code). This instantly knocks off (well, removes outright) a gigantic, milestone.
With this v2.x release, the backlog of pending pull requests is finally cleared. 950+ open issues remain in the Rubberduck repository, but very few are actual unresolved bugs or realistically implementable feature ideas. Expect additional pull requests for missing translations, minor fixes and UI/UX enhancements, but the 2.x life cycle is now essentially completed… and it was about time: the technology used for building Rubberduck has evolved a lot in the last decade, with much of it either deprecated, or on the brink of falling out of official long-term support from Microsoft, which is making it harder and harder to easily and successfully build Rubberduck, hoping with fingers crossed that nothing breaks at every dependency update.
I bet VBA will outlive .NET Framework 4.8.1 LTS, which is non-ironically very funny to me… but for Rubberduck to keep moving forward, making the move from the now ancient .NET Framework over to current technology is inevitable – and development on v3 has already knocked that critical milestone, too.
Afterthoughts
I want to stop spreading too thin and actually finish the website now (as you can see, …the thing is falling apart!), and then with Rubberduck 2.x in its current state (more or less), I can finally draw a line and know exactly what v3.0 needs to be. My priorities have shifted quite much since 2021 for many reasons, and Rubberduck and the blog and my online presence in general basically had to hit the brakes. Life happens… doesn’t it.
I’ll always write code as a hobby, as I’ve done ever since I found out about programming. But I also played (badly) some guitar as a teen, and carried a few harmonicas with me to the Microsoft MVP Global Summit in 2018 and 2019 (the two I attended before they went virtual during the pandemic); these days I feel like I could write about the music theory I’ve learned since, or perhaps how to configure the reed gaps on a 10-hole diatonic, standard Richter-tuned harmonica to make it easy to play the hidden overblow notes. I haven’t been paid to maintain a line of VBA code for a very long time now, and I’ll always love it but I can’t say it’s my GoTo language anymore, but it’s all right – Rubberduck isn’t written in VBA anyway. But it’s becoming hard to find inspiration to write about some random VBA things, especially since I’ve stopped participating on Stack Overflow. I stopped, because they basically made an agreement with OpenAI and essentially stole (with a unilateral move in violation of the agreed-upon license) the volunteer work and helpful knowledge-dumps of tens of thousands of people (myself included) to train a… chatbot and make billions off of these people’s work, and then take art and reduce it a prompt.
I mean I get it, it’s fun. But it’s a very steep cost just for something that’s just innocent fun.This is the first and last AI-generated image you’ll ever see from me on this blog.
Perhaps I’m just turning into an old man screaming at a cloud (brought to you by AWS!), but… look, it doesn’t matter that you can prompt a machine to play some harmonica for you: you’ll never, ever, ever experience any AI-generated slop like when you’re actually playing the blues and counting that I-IV-V progression over these 12 bars. Same on guitar. Same on drums. Same with code.