fix: pin brighterscript to 1.0.0-alpha.52; fix #167 example bsconfig collisions - #177
Merged
Merged
Conversation
…collisions Two changes: 1. Pin `brighterscript` to exact "1.0.0-alpha.52" (no caret) in every package.json - the engine and every example/script project - instead of the floating "^1.0.0-alpha.50" range. That range already happened to resolve to alpha.52 today (confirmed via node_modules), but as a floating prerelease range it could silently drift to a newer alpha later. #175's bslint+rooibos-roku interaction bug is already known to be sensitive to exact alpha generation, so pin it everywhere rather than rely on install-time luck. 2. Fixes #167: every example's bsconfig.json (and the exampleTemplate scaffold used by `create-example`) copied the engine's entire src/ tree - both plain source and SceneGraph component code-behind files - into one shared destination folder. Component files declare same-named subs (redraw, init, onRenderComplete, etc.) that BrighterScript treats as global, so flattening them together caused ~33 duplicate-function errors the moment any example needed the engine's Shapes components (examples/scenegraph was the only example that already split them correctly). Fix: split each example's file copy into separate "source" and "components" destinations, matching examples/scenegraph's existing (correct) config - same pattern, just applied everywhere. controller's prior components-exclusion workaround and special controller-web copy are no longer needed (the split copy already lands controller-web at the right destination) and have been removed. Verified this needed a real device, not just bsc --validate: a first attempt at also nesting each dest under roku_modules/<packagename> (mirroring exactly what a real `ropm install` produces, confirmed by packing and installing the engine into a scratch consumer) validated fine via bsc/npm run check:all but failed to compile on a real Roku with "Install Failure: Compilation Failed. ShapeRenderTask" - a SceneGraph Task node quirk invisible to any static check. Reverted to the flatter destinations (still fully separating source from components, still fixing the collision) and confirmed both examples/scenegraph and examples/controller sideload and run cleanly on the same real device. Verification: - npm run check:all (lint, validate, headless tests, validate every example) passes clean. - npm run build-examples packages all 19 examples with no errors. - Sideloaded examples/scenegraph and examples/controller to a real Roku: both install and run correctly (controller's QR code, ship, and controller-web server all confirmed on screen). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pin
brighterscriptto exact1.0.0-alpha.52(no caret) in everypackage.json— engine root, everyexamples/*, andscripts/exampleTemplate/scripts/ropmConsumerFixture. The old^1.0.0-alpha.50range already resolved to alpha.52 (confirmed vianode_modules), but as a floating prerelease range it could silently drift to a newer alpha later — bslint+rooibos-roku (together): pre-existing file can't resolve a symbol from a brand-new file #175's bslint+rooibos-roku interaction bug is already known to be sensitive to exact alpha generation, so pin it everywhere instead of relying on install-time luck.Fixes Example template bsconfig.json breaks build for every example except scenegraph #167: every example's
bsconfig.json(and theexampleTemplatescaffold used bycreate-example) copied the engine's plain source and its SceneGraph component code-behind files into one shared destination folder. Component files declare same-named subs (redraw,init,onRenderComplete, etc.) that BrighterScript treats as global, so mixing them together caused ~33duplicate-functionerrors the moment any example needed the engine'sShapescomponents (examples/scenegraphwas the only example that already split them correctly).Fix: split every example's file copy into separate
sourceandcomponentsdestinations, matchingexamples/scenegraph's existing (correct) config.controller's prior components-exclusion workaround and specialcontroller-webcopy entry are no longer needed (the split copy already landscontroller-webat the right destination) and have been removed.A wrong turn worth flagging
I first tried nesting each destination under
roku_modules/<packagename>to mirror exactly what a realropm installproduces (verified the real layout by packing the engine and installing it into a scratch consumer project). That version passedbsc --validateandnpm run check:allcleanly — but failed to compile on a real Roku device:Install Failure: Compilation Failed. ShapeRenderTask(a SceneGraphTasknode). Completely invisible to static analysis. Reverted to the flattersource/componentsdestinations (still fully separating source from components, still fixing the actual collision) and confirmed bothexamples/scenegraphandexamples/controllersideload and run cleanly on the same real device.Verification
npm run check:all(lint, validate, headless tests, validate every example) passes clean.npm run build-examplespackages all 19 examples with no errors.examples/scenegraphandexamples/controllerto a real Roku: both install and run correctly (controller's QR code, ship, and controller-web server all confirmed on screen via screenshot).🤖 Generated with Claude Code