rokucommunity / rokucommunity/brighterscript

Import enhancements

Open
#182 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We should add support for importing only a single function from a file. Like this:

Import printDebug from "./printHelpers".bs
Import printInfo, printWarning from "./printHelpers.bs"
'also allow renaming
Import printDebug as debug, printWarning as warn from "./printHelpers.bs"

In it's basic form, this would result in the compiler rewriting the function calls to match the original function names and still importing the entire file, but it adds a lot of naming fexibility into the importer's code.

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

Start by tracing the compiler entry points that parse and process Import statements; no specific files or tests are named in the issue. Compare the single-function, multi-function, and aliased examples, then verify that the accepted syntax preserves the described rewriting behavior while importing the file.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.