From 079f93bddb244685ade505baa5f3a5e0a040154f Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sun, 26 Oct 2025 13:01:09 -0400 Subject: [PATCH] remove track-transpiled-plugin.ts --- config/bsconfig.base.jsonc | 3 - config/bsconfig.tests.base.jsonc | 5 +- docs/plugins.md | 22 ----- playlet-app/package.json | 2 +- playlet-lib/package.json | 2 +- .../src/components/MainScene.transpiled.brs | 84 ------------------- .../src/components/MainScene.transpiled.xml | 60 ------------- .../MainScene_bindings.transpiled.brs | 75 ----------------- .../tests.transpiled/AutoBindNode1.brs | 6 -- .../tests.transpiled/AutoBindNode1.xml | 21 ----- .../AutoBindNode1Container.brs | 6 -- .../AutoBindNode1Container.xml | 19 ----- .../AutoBindNode1Container_bindings.brs | 12 --- .../AutoBindNode1_bindings.brs | 12 --- .../tests.transpiled/AutoBindNode2.brs | 6 -- .../tests.transpiled/AutoBindNode2.xml | 18 ---- .../AutoBindNode2_bindings.brs | 13 --- tools/bs-plugins/track-transpiled-plugin.ts | 68 --------------- 18 files changed, 3 insertions(+), 431 deletions(-) delete mode 100644 playlet-lib/src/components/MainScene.transpiled.brs delete mode 100644 playlet-lib/src/components/MainScene.transpiled.xml delete mode 100644 playlet-lib/src/components/MainScene_bindings.transpiled.brs delete mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1.brs delete mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1.xml delete mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1Container.brs delete mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1Container.xml delete mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1Container_bindings.brs delete mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1_bindings.brs delete mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode2.brs delete mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode2.xml delete mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode2_bindings.brs delete mode 100644 tools/bs-plugins/track-transpiled-plugin.ts diff --git a/config/bsconfig.base.jsonc b/config/bsconfig.base.jsonc index 60329f12..f827fe47 100644 --- a/config/bsconfig.base.jsonc +++ b/config/bsconfig.base.jsonc @@ -74,8 +74,6 @@ "lib/**", "www/**", "manifest", - "!**/*.transpiled/**", - "!**/*.transpiled.*", "!**/*.spec.bs", "!**/tests/**" ], @@ -87,7 +85,6 @@ "../tools/bs-plugins/component-includes-plugin.ts", "../tools/bs-plugins/bindings-plugin.ts", "../tools/bs-plugins/oninit-plugin.ts", - "../tools/bs-plugins/track-transpiled-plugin.ts", "../tools/bs-plugins/json-yaml-plugin.ts", "../tools/bs-plugins/validation-plugin.ts", "../tools/bs-plugins/logger-plugin.ts", diff --git a/config/bsconfig.tests.base.jsonc b/config/bsconfig.tests.base.jsonc index c4f49f6a..82e02241 100644 --- a/config/bsconfig.tests.base.jsonc +++ b/config/bsconfig.tests.base.jsonc @@ -13,9 +13,7 @@ "config/**", "lib/**", "www/**", - "manifest", - "!**/*.transpiled/**", - "!**/*.transpiled.*" + "manifest" ], "plugins": [ "@rokucommunity/bslint", @@ -25,7 +23,6 @@ "../tools/bs-plugins/component-includes-plugin.ts", "../tools/bs-plugins/bindings-plugin.ts", "../tools/bs-plugins/oninit-plugin.ts", - "../tools/bs-plugins/track-transpiled-plugin.ts", "../tools/bs-plugins/json-yaml-plugin.ts", "../tools/bs-plugins/validation-plugin.ts", "../tools/bs-plugins/logger-plugin.ts", diff --git a/docs/plugins.md b/docs/plugins.md index 27e13b08..cb12fa5c 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -7,7 +7,6 @@ - [@oninit](#oninit) - [Bindings](#bindings) - [Job System Generator](#job-system-generator) -- [Tracking transpilied files](#tracking-transpilied-files) - [Logger](#logger) - [Type Gen](#type-gen) - [Web Server](#web-server) @@ -470,27 +469,6 @@ The job system will auto scale up to a maximum number of tasks, in order to avoi Although very useful, this pattern might not be the best for long running tasks (like the Web Server) and it is simpler to create dedicated tasks for those. -## Tracking transpilied files - -**[Source](/tools/bs-plugins/track-transpiled-plugin.ts)** - -By now, you realize we make a lot of transformations to the source code through many plugins. As a sanity check, this plugin allows us to keep track of the transpiled files, so we can be sure that the output is what we expect. - -### Why - -This is useful to catch errors with the plugin usage, of bugs with the plugins themselves. - -### How - -When transpiling a file, say `MyComponent.xml`, the plugin will see if there is a `MyComponent.transpiled.xml` right next to it in the source. -If a file is found, then the transpiled file of `MyComponent.xml` will be copied back from the staging folder to `MyComponent.transpiled.xml`. - -Additionally, if there's a folder `MyFolder` and `MyFolder.transpiled` in the source, then all transpiled files of `MyFolder` will also be copied back to `MyFolder.transpiled`. Keeping track of entire folders is primarily to track of transpiled files of test nodes and scripts. - -To reduce the noise of this plugin, it only runs when we're making a test build. - -Because we continiously make test build in Github actions, the tracked transpilied files will be automatically added to PRs, so that we notice if outputs do not look right. - ## Logger **[Source](/tools/bs-plugins/logger-plugin.ts)** diff --git a/playlet-app/package.json b/playlet-app/package.json index 8b682e29..c189d432 100644 --- a/playlet-app/package.json +++ b/playlet-app/package.json @@ -13,7 +13,7 @@ "sign-package": "node ../tools/sign-package.js --out-file playlet.squashfs.zip --out-dir ../release --staging-dir ../build/playlet-app", "lint": "bslint --project bsconfig.lint.json --lintConfig ../config/bslint.jsonc", "lint:fix": "npm run lint -- --fix", - "format:base": "bsfmt \"src/**/*.brs\" \"src/**/*.bs\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" \"!**/*.transpiled/**\" \"!**/*.transpiled.*\" --bsfmt-path ../config/bsfmt.jsonc", + "format:base": "bsfmt \"src/**/*.brs\" \"src/**/*.bs\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" --bsfmt-path ../config/bsfmt.jsonc", "format": "npm run format:base -- --check", "format:fix": "npm run format:base -- --write", "test": "npm run test:build && npm run test:run", diff --git a/playlet-lib/package.json b/playlet-lib/package.json index 4508abc3..df43fc15 100644 --- a/playlet-lib/package.json +++ b/playlet-lib/package.json @@ -15,7 +15,7 @@ "sign-package": "node ../tools/sign-package.js --out-file playlet-lib.squashfs.zip --out-dir ../release --staging-dir ../build/playlet-lib", "lint": "bslint --project bsconfig.lint.json --lintConfig ../config/bslint.jsonc", "lint:fix": "npm run lint -- --fix", - "format:base": "bsfmt \"src/**/*.brs\" \"src/**/*.bs\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" \"!**/*.transpiled/**\" \"!**/*.transpiled.*\" --bsfmt-path ../config/bsfmt.jsonc", + "format:base": "bsfmt \"src/**/*.brs\" \"src/**/*.bs\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" --bsfmt-path ../config/bsfmt.jsonc", "format": "npm run format:base -- --check", "format:fix": "npm run format:base -- --write", "test": "npm run test:build && npm run test:run", diff --git a/playlet-lib/src/components/MainScene.transpiled.brs b/playlet-lib/src/components/MainScene.transpiled.brs deleted file mode 100644 index c04767e3..00000000 --- a/playlet-lib/src/components/MainScene.transpiled.brs +++ /dev/null @@ -1,84 +0,0 @@ -'import "pkg:/components/Dialog/DialogUtils.bs" -'import "pkg:/components/EcpArgs.bs" -'import "pkg:/components/parts/AutoBind/AutoBind.part.bs" -'import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs" -'import "pkg:/source/utils/LoadingScreen.bs" -'import "pkg:/source/utils/Locale.bs" - -function Init() - InitializeBindings() ' auto-generated! - m.scene = m.top.getScene() - SetScenePalette(m.scene) - ' At this point, the "MainScene" node is not yet added to the scene, and does not have a parent yet. - ' Let's wait until it has one. - m.MainSceneContainer = m.scene.findNode("MainSceneContainer") - m.MainSceneContainer.ObserveField("change", FuncName(MainSceneContainerChanged)) -end function - -function SetScenePalette(scene as object) as void - palette = scene.palette - if palette <> invalid - return - end if - palette = CreateObject("roSGNode", "RSGPalette") - palette.colors = { - DialogBackgroundColor: "#242424FF" - DialogFocusColor: "#CECECEFF" - DialogFocusItemColor: "#202020FF" - DialogSecondaryTextColor: "#EBEBEBFF" - DialogSecondaryItemColor: "#FF1C30FF" - DialogTextColor: "#EBEBEBFF" - } - scene.palette = palette -end function - - -function MainSceneContainerChanged() - AutoBindSceneGraph() - StartWebServer() - HideLoadingScreen() - InitEcpArgs() - if false - if not ShowAnnouncement() - m.scene.signalBeacon("AppLaunchComplete") - end if - else - m.scene.signalBeacon("AppLaunchComplete") - end if - CopyLoadingMessagesToCache() -end function - -function StartWebServer() - m.loungeService = m.top.findNode("LoungeService") - m.loungeService.callfunc("StartService", invalid) - m.webServer = m.top.findNode("WebServer") - m.webServer.callfunc("StartServer", invalid) - m.dialServer = m.top.findNode("DialServer") - m.dialServer.callfunc("StartServer", invalid) -end function - -function ShowAnnouncement() as boolean - dialog = DialogUtils_ShowDialogOnce({ - messageId: "1755469284" - title: "Playback fixes - Canary build" - message: [ - "Thank you for helping test the latest changes by using the Canary build of Playlet!" - "If you encounter any issues with playback, please report them on the GitHub issue tracker." - "https://github.com/iBicha/playlet/issues" - ] - alwaysOnTop: true - large: true - }) - if dialog = invalid - return false - end if - m.scene.signalBeacon("AppDialogInitiate") - dialog.observeField("wasClosed", FuncName(OnAnnouncementDialogClosed)) - return true -end function - -function OnAnnouncementDialogClosed() - m.scene.signalBeacon("AppDialogComplete") - m.scene.signalBeacon("AppLaunchComplete") -end function -'//# sourceMappingURL=./MainScene.brs.map \ No newline at end of file diff --git a/playlet-lib/src/components/MainScene.transpiled.xml b/playlet-lib/src/components/MainScene.transpiled.xml deleted file mode 100644 index 2744f4f3..00000000 --- a/playlet-lib/src/components/MainScene.transpiled.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - -