-
-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Most Godot projects are a collection of scripts and assets, most commonly GDScript, but could be other script files such as C# or Lua (or other unofficial scripting extensions).
To display source code context, we could offer an option (opt-in) to collect and upload a source bundle when the project is exported. For this, we need to somehow identify the script files that go into the exported project, generate a source bundle with those files included, and upload it to Sentry. Sentry should be capable of recognizing such a bundle as source code context for Godot script errors.
When Godot Engine exports a project, usually it transforms scripts into a binary version (binary tokens), and packages them alongside other assets into a .pck file -- it's a binary resource pack format containing game assets. Such a pack file can optionally be embedded inside an exe file, and even encrypted (rarely used feature though as it's a complicated process). Worth mentioning that PCKs can also be used as DLC content or mods.
The best time to create such a bundle, in my opinion, is during the export process, when the source files are being included in the exported pack file, perhaps creating such a bundle alongside the .exe and .pck. It could be an opt-in project setting or an export setting. We could potentially include a debug identifier inside the exported .pck to link it with the correct source bundle. The SDK could read this identifier and include it with the events.