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

Const compilation issue #666

Closed
tomek-r opened this issue Aug 17, 2022 · 3 comments · Fixed by #674
Closed

Const compilation issue #666

tomek-r opened this issue Aug 17, 2022 · 3 comments · Fixed by #674

Comments

@tomek-r
Copy link

tomek-r commented Aug 17, 2022

Hey
I am experiencing some issues when working with consts

Error when calling plugin BscPlugin.beforeFileTranspile: TypeError: Cannot read property 'getConstFileLink' of undefined at BrsFilePreTranspileProcessor.processExpression (/node_modules/brighterscript/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.js:70:46

brighterscript version is 0.55.0
the code:

namespace Settings
    const KEY = "Key"
end namespace

It compiles after all but produces the error. I have no additional plugins installed.

@TwitchBronBron
Copy link
Member

I can't seem to reproduce this. Would you be able to put together either
a) some steps on how to reproduce this issue?
b) a small sample app that reproduces the issue?

@xgouchet
Copy link
Contributor

xgouchet commented Aug 22, 2022

I'm running on the same issue when I started setting up bslint + roca.

Because I want bslint to apply on my test files as well, I'm using the following bsconfig.json:

{
    "rootDir": "src",
    "files": [
        "manifest",
        "source/**/*.*",
        "components/**/*.*",
        "images/**/*.*",
        "tests/**/*.*"
    ],
    "plugins": [
        "@rokucommunity/bslint"
    ]
}

And then in my src/tests folder, I have a sample roca test:

function main(args as object) as object
    return roca(args).describe("test suite", sub()
        m.pass()
    end sub)
end function

I don't have any other *.brs or *.xml files in my source or components folders.

@TwitchBronBron
Copy link
Member

TwitchBronBron commented Aug 22, 2022

@xgouchet great, thanks! I was able to reproduce this issue with that example. I'll looking into what's causing this crash.

image

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

Successfully merging a pull request may close this issue.

3 participants