rokucommunity / rokucommunity/brighterscript
Not gracefully handling unclosed conditional compilation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 208
- Forks
- 68
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 39
Description
Getting the following in vscode when I was modifying the contents of a file and only had an opening #if block for conditional compilation but not a closing one. Would be great for the language server to gracefully handle this as best it can.

[Error - 11:36:11 AM] Request textDocument/codeAction failed.
Message: Request textDocument/codeAction failed with message: TypeError: Cannot read property 'end' of undefined
at Util.rangesIntersect (/Users/bleighty/.vscode/extensions/rokucommunity.brightscript-2.22.2/node_modules/brighterscript/dist/util.js:438:15)
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 unmatched #if case in VS Code and trace the textDocument/codeAction request to Util.rangesIntersect in brighterscript's util module. Done means code actions no longer fail with a TypeError when conditional compilation is left unclosed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100