Skip to content

Fix libary statement complib postfixes - #323

Open
RokuSerhii wants to merge 23 commits into
rokucommunity:masterfrom
RokuSerhii:library.statement
Open

Fix libary statement complib postfixes#323
RokuSerhii wants to merge 23 commits into
rokucommunity:masterfrom
RokuSerhii:library.statement

Conversation

@RokuSerhii

@RokuSerhii RokuSerhii commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

The ComponentLibraryProject.postfixFiles() does a postfix of files with __lib and changes all references inside the library, but it doesn't apply this postfix for Library "file_name.brs" in the app

So if that library and app are sideloaded to the device, the compilation of the app fails because the Library statement points to a file without a postfix

RokuSerhii and others added 15 commits April 7, 2026 15:46
# Conflicts:
#	src/debugSession/BrightScriptDebugSession.spec.ts
#	src/debugSession/BrightScriptDebugSession.ts
#	src/managers/ProjectManager.spec.ts
#	src/managers/ProjectManager.ts
Deleting interdependent component libraries makes the device emit transient
compile errors (the main app/other complibs briefly reference a complib that
was just removed). Add pause/resume/settle to CompileErrorProcessor and pause
reporting during the delete sweep, resuming (after settle) only once we begin
re-installing libraries to the device. Each zip upload waits for the resume to
fully settle so real install errors are still surfaced.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread src/debugSession/BrightScriptDebugSession.ts Outdated
@TwitchBronBron TwitchBronBron changed the title apply postfix for Library statement Add component library postfix to library statements Jul 10, 2026
@TwitchBronBron TwitchBronBron added the create-vsix PRs with this tag will trigger a vsix build on vscode-brightscript-language for every push label Jul 10, 2026
Resolved merge conflict in ProjectManager.spec.ts by keeping both JSZip and undent imports.
@TwitchBronBron TwitchBronBron removed the create-vsix PRs with this tag will trigger a vsix build on vscode-brightscript-language for every push label Jul 10, 2026
@rokucommunity-bot

Copy link
Copy Markdown
Contributor

Hey there! I just built a new version of the vscode extension based on a7a0b76.

Download:

Install instructions.

@rokucommunity-bot

Copy link
Copy Markdown
Contributor

Hey there! I just built a new version of the vscode extension based on 5525fcc.

Download:

Install instructions.

@TwitchBronBron TwitchBronBron changed the title Add component library postfix to library statements Fix libary statement complib postfixes Jul 15, 2026
@TwitchBronBron TwitchBronBron self-assigned this Jul 16, 2026
@chrisdp chrisdp added the create-vsix PRs with this tag will trigger a vsix build on vscode-brightscript-language for every push label Jul 20, 2026
@chrisdp chrisdp removed the create-vsix PRs with this tag will trigger a vsix build on vscode-brightscript-language for every push label Jul 20, 2026
@rokucommunity-bot

Copy link
Copy Markdown
Contributor

Hey there! I just built a new version of the vscode extension based on 2333c41.

Download:

Install instructions.

`Library` statement postfixing previously only understood `bs_libs_provided`
and `bs_libs_required`. Add support for `sg_component_libs_provided` and
`sg_component_libs_required`, keeping the two mechanisms strictly separate:
a `bs_libs_required` name is only ever satisfied by a `bs_libs_provided`
library, and an `sg_component_libs_required` name only by an
`sg_component_libs_provided` library. A single library may broadcast itself
under both by declaring both manifest keys.

- `Project` gains `bsLibsRequired` / `sgComponentLibsRequired`
- `ComponentLibraryProject` gains `bsLibsProvided` / `sgComponentLibsProvided`
  (each manifest value is comma-delimited, so all are lists)
- each `Library` statement resolves its provider per-mechanism inline; when two
  different libraries export the same file name (one per mechanism) we can't
  know which the device loads, so warn and prefer the bs lib
- skip the file walk unless at least one required library is actually provided
- add `util.splitAndTrim` for the comma-delimited manifest values

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rokucommunity rokucommunity deleted a comment from rokucommunity-bot Bot Jul 29, 2026
@rokucommunity-bot

Copy link
Copy Markdown
Contributor

Hey there! I just built a new version of the vscode extension based on 9e658d8.

Download:

Install instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants