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

Incompatibilities with brighterscript 0.53+ #185

Closed
ZeeD opened this issue Aug 23, 2022 · 10 comments
Closed

Incompatibilities with brighterscript 0.53+ #185

ZeeD opened this issue Aug 23, 2022 · 10 comments

Comments

@ZeeD
Copy link
Contributor

ZeeD commented Aug 23, 2022

(I've found this starting using the rooibos-roku-demo, and the after an update of bs)

it seems that using brighterscript 0.53+ there are some errors with the plugin:


node_modules/rooibos-roku/dist/lib/framework/BaseTestSuite.bs:41:47 - error BS1001: Cannot find name 'Rooibos_Matcher_anyString'

 41      protected anyStringMatcher = { "matcher": Rooibos_Matcher_anyString }
 __                                                ~~~~~~~~~~~~~~~~~~~~~~~~~


node_modules/rooibos-roku/dist/lib/framework/BaseTestSuite.bs:42:45 - error BS1001: Cannot find name 'Rooibos_Matcher_anyBool'

 42      protected anyBoolMatcher = { "matcher": Rooibos_Matcher_anyBool }
 __                                              ~~~~~~~~~~~~~~~~~~~~~~~


node_modules/rooibos-roku/dist/lib/framework/BaseTestSuite.bs:43:47 - error BS1001: Cannot find name 'Rooibos_Matcher_anyNumber'

 43      protected anyNumberMatcher = { "matcher": Rooibos_Matcher_anyNumber }
 __                                                ~~~~~~~~~~~~~~~~~~~~~~~~~


node_modules/rooibos-roku/dist/lib/framework/BaseTestSuite.bs:44:43 - error BS1001: Cannot find name 'Rooibos_Matcher_anyAA'

 44      protected anyAAMatcher = { "matcher": Rooibos_Matcher_anyAA }
 __                                            ~~~~~~~~~~~~~~~~~~~~~


node_modules/rooibos-roku/dist/lib/framework/BaseTestSuite.bs:45:46 - error BS1001: Cannot find name 'Rooibos_Matcher_anyArray'

 45      protected anyArrayMatcher = { "matcher": Rooibos_Matcher_anyArray }
 __                                               ~~~~~~~~~~~~~~~~~~~~~~~~


node_modules/rooibos-roku/dist/lib/framework/BaseTestSuite.bs:46:45 - error BS1001: Cannot find name 'Rooibos_Matcher_anyNode'

 46      protected anyNodeMatcher = { "matcher": Rooibos_Matcher_anyNode }
 __                                              ~~~~~~~~~~~~~~~~~~~~~~~
@ZeeD
Copy link
Contributor Author

ZeeD commented Aug 23, 2022

As a temporary fix I changed the lines in
https://github.com/georgejecook/rooibos/blob/a3e4c42482e50c8c480f34f3df0534ccb50ee674/framework/src/source/BaseTestSuite.bs#L41-L46
(in my node_modules folder)
replacing Rooibos_Matcher_XXX with rooibos.Matcher.XXX

@georgejecook
Copy link
Collaborator

I've got a branch open for this and will push a release sometime this week.

@georgejecook
Copy link
Collaborator

please try again with rooibos 5.3.0, and let me know if it works

@ZeeD
Copy link
Contributor Author

ZeeD commented Nov 7, 2022

Hi @georgejecook !
thanks for the update. I find that now most of the problems have gone away. Thanks!
Still, I have some troubles:

it seems to me there are some incompatibilities between the "style" of the tests and the compiler, specifically regarding the sub / function differences between the return.

My old tests where sub; after the update I managed to use bslint and it suggested to replace them with functions (as I saw in other projects), but I'm not sure what is the appropriate value to return. for the moment I just put return invalid but please tell me if I should use another value.

@ZeeD
Copy link
Contributor Author

ZeeD commented Nov 7, 2022

another thing: I'm not sure if it is rooibos or bsc, but for some reason while I create the .zip file to deploy, I see that https://github.com/georgejecook/rooibos/blob/fdbc7bad2e1f5bd9f2bf615785ac049439e83c55/framework/src/source/ConsoleTestReporter.bs#L4-L14 is translated to

function __rooibos_ConsoleTestReporter_builder()
    instance = __rooibos_BaseTestReporter_builder()
    instance.super0_new = instance.new
    instance.new = function(testRunner)
        m.super0_new()
        m.lineWidth = 60

        m.super0_new(testRunner)
        if m.config.lineWidth <> invalid
            m.lineWidth = m.config.lineWidth
        else
            m.lineWidth = 60
        end if
    end function

that blows up because m.super0_new is called twice, the first time with the wrong number of parameters.

@freemanchari
Copy link

@ZeeD did you ever find a solution to this?

@georgejecook
Copy link
Collaborator

you need to use latest bsc and rooibos-bsc plugin.

@freemanchari
Copy link

Thanks @georgejecook that worked. Maybe this part of the docs needs to be updated Rooibos currently requires brighterscript version 0.52.3 - please use only this version

@georgejecook
Copy link
Collaborator

georgejecook commented Feb 6, 2023 via email

@ZeeD
Copy link
Contributor Author

ZeeD commented Feb 7, 2023

In any case I think I can close this ticket, then

@ZeeD ZeeD closed this as completed Feb 7, 2023
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

3 participants