Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrectly renames packages to undefined, when importing. #69

Open
georgejecook opened this issue May 14, 2023 · 0 comments
Open

incorrectly renames packages to undefined, when importing. #69

georgejecook opened this issue May 14, 2023 · 0 comments

Comments

@georgejecook
Copy link
Contributor

background

roku-log (https://github.com/georgejecook/roku-log) uses the rokucommunity@bslib. However, when transpiled it uses bslib, without rokucommunity namespace. don't know why. described here: rokucommunity/brighterscript#809.

When I import roku-log as a named npm import in projects, such as maestro, I find that the packages are corrupted, and replaced with /undefined/bslib.brs.

steps to reproduce

You will observe the roku-log, xml files are now broken. e.g.

HTTPTransport.xml

<?xml version='1.0' encoding='UTF-8' ?>
<component name='log_HTTPTransport' extends='Group'>
    <interface>
        <field id='maxLinesBeforeSending' type='integer' value='20' />
        <field id='maxSecondsBeforeSending' type='integer' value='5' />
        <field id='url' type='string' value='' />
        <field id='sendNow' type='boolean' value='false' alwaysNotify='true' onChange='sendLogsNow' />
        <field id='sendAutomatically' type='boolean' value='true' />
        <function name='logItem' />
        <function name='sendLogsNow' />
    </interface>
    <script type="text/brightscript" uri="pkg:/components/roku_modules/log/HTTPTransport.brs" />
    <script type="text/brightscript" uri="pkg:/source/roku_modules/undefined/bslib.brs" />
    <children />
</component>
<!--//# sourceMappingURL=./HTTPTransport.xml.map -->

I have had to workaround this with a script that I use to spot and fix these. Other users of my libraries are now hitting these problems, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant