sjbarag / brs

An interpreter for the BrightScript language that runs on non-Roku platforms.
MIT License
113 stars 43 forks source link

feat(stdlib): Implement roAppInfo #643

Closed vbuchii closed 3 years ago

vbuchii commented 3 years ago

fixes #537

vbuchii commented 3 years ago

We're definitely getting closer here! I'd like to avoid re-parsing the manifest file if possible, but my bigger concern is around the use of process.cwd() in a static property of RoAppInfo — that won't work for our end-to-end tests (which you worked around by manually assigning to a private field), and will subtly break other use-cases as they arise.

Do you happen to know which manifest file is used when createObject("roAppInfo") is called from a ComponentLibrary? I imagine that will complicate things here a bit 😃

I was unable to find any related info about that in the Roku SDK. So, I've tested on a sample and seen that it is used the manifest file from root of the project. In other words, regardless of where the object is created, the main manifest is used.