rokucommunity / rokucommunity/brighterscript
Stack overflow for circular component reference
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 208
- Forks
- 68
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 39
Description
Logs for context
(base) PS C:\Users\[user]\Desktop\Repositories\roku-master-brighterscript-template> bsc --watch
[01:54:53:469 PM] Using config file: "C:\Users\[user]\Desktop\Repositories\roku-master-brighterscript-template\bsconfig.json"
[01:54:53:472 PM] Loading 0 plugins for cwd "C:\Users\[user]\Desktop\Repositories\roku-master-brighterscript-template" []
[01:54:53:478 PM] Parsing files
[01:54:53:741 PM] Parsing files finished. (261.523ms)
[01:54:53:741 PM] Starting compilation in watch mode...
[01:54:53:742 PM] Validating project
Cancelling sequence program.validate
[01:54:53:838 PM] Validating project cancelled. (95.569ms)
RangeError: Maximum call stack size exceeded
at Logger.write (C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\node_modules\@rokucommunity\logger\dist\Logger.js:297:10)
at Logger.debug (C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\node_modules\@rokucommunity\logger\dist\Logger.js:307:14)
at XmlScope.logDebug (C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\dist\Scope.js:572:29)
at C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\dist\Scope.js:584:22
at Logger.time (C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\node_modules\@rokucommunity\logger\dist\Logger.js:373:20)
at XmlScope.validate (C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\dist\Scope.js:580:29)
at C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\dist\Scope.js:585:29
at Logger.time (C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\node_modules\@rokucommunity\logger\dist\Logger.js:373:20)
at XmlScope.validate (C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\dist\Scope.js:580:29)
at C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\dist\Scope.js:585:29
at Logger.time (C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\node_modules\@rokucommunity\logger\dist\Logger.js:373:20)
at XmlScope.validate (C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\dist\Scope.js:580:29)
at C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\dist\Scope.js:585:29
at Logger.time (C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\node_modules\@rokucommunity\logger\dist\Logger.js:373:20)
at XmlScope.validate (C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\dist\Scope.js:580:29)
at C:\Users\[user]\AppData\Local\nvm\v20.19.1\node_modules\brighterscript\dist\Scope.js:585:29
I assume this happens when the AST validation gets too deep?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with bsc --watch using the reported project context, then inspect Scope.js around XmlScope.validate and its recursive calls, along with the referenced logger frames. Determine why circular component references recurse indefinitely; done means validation no longer overflows the stack for that case and reports an appropriate result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100