rokucommunity / rokucommunity/brighterscript

making component extend itself causes a crash

Open
#222 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
208
Forks
68
Avg merge
8h 39m
Merged PRs (30d)
39

Description

image

results in stacktrace:

    at Function.applyStyle (/home/george/hope/open-source/vsc/brighterscript/node_modules/chalk/index.js:176:12)
    at Function.builder (/home/george/hope/open-source/vsc/brighterscript/node_modules/chalk/index.js:121:21)
    at XmlFile.logDebug (/home/george/hope/open-source/vsc/brighterscript/src/files/XmlFile.ts:611:52)
    at EventEmitter.<anonymous> (/home/george/hope/open-source/vsc/brighterscript/src/files/XmlFile.ts:411:18)
    at EventEmitter.emit (/home/george/hope/open-source/vsc/brighterscript/node_modules/eventemitter3/index.js:202:33)
    at DependencyGraph.emit (/home/george/hope/open-source/vsc/brighterscript/src/DependencyGraph.ts:80:30)
    at EventEmitter.<anonymous> (/home/george/hope/open-source/vsc/brighterscript/src/DependencyGraph.ts:118:28)
    at EventEmitter.emit (/home/george/hope/open-source/vsc/brighterscript/node_modules/eventemitter3/index.js:202:33)
    at DependencyGraph.emit (/home/george/hope/open-source/vsc/brighterscript/src/DependencyGraph.ts:80:30)
    at EventEmitter.<anonymous> (/home/george/hope/open-source/vsc/brighterscript/src/DependencyGraph.ts:118:28)
/home/george/hope/open-source/vsc/brighterscript/src/Logger.ts:54
arg1:RangeError: Maximum call stack size exceeded
    at Function.applyStyle (/home/george/hope/open-source/vsc/brighterscript/node_modules/chalk/index.js:176:12)
    at Function.builder (/home/george/hope/open-source/vsc/brighterscript/node_modules/chalk/index.js:121:21)
    at XmlFile.logDebug (/home/george/hope/open-source/vsc/brighterscript/dist/files/XmlFile.js:401:62)
    at EventEmitter.<anonymous> (/home/george/hope/open-source/vsc/brighterscript/dist/files/XmlFile.js:224:18)
    at EventEmitter.emit (/home/george/hope/open-source/vsc/brighterscript/node_modules/eventemitter3/index.js:202:33)
    at DependencyGraph.emit (/home/george/hope/open-source/vsc/brighterscript/dist/DependencyGraph.js:79:30)
    at EventEmitter.<anonymous> (/home/george/hope/open-source/vsc/brighterscript/dist/DependencyGraph.js:114:28)
    at EventEmitter.emit (/home/george/hope/open-source/vsc/brighterscript/node_modules/eventemitter3/index.js:202:33)
    at DependencyGraph.emit (/home/george/hope/open-source/vsc/brighterscript/d...```

very easy to reproduce; just do component FOO extends FOO

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash with component FOO extends FOO, then start at src/files/XmlFile.ts and follow the event flow through src/DependencyGraph.ts; src/Logger.ts is also present in the stack trace. Done means this input no longer overflows the call stack and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.