Yesterday somebody messaged me about channel of mine, "it wouldn't load (exited to the home screen) - is this a firmware bug or is it no longer available?"
I tried and it worked for me, remove/re-add also worked. Huh. Short story short, turned out problem happens on fw6 beta.
Luckily, i had the opportunity to side-load the channel on fw6.1 box and check the console:
*** ERROR compiling /pkg:/source/main.brs:
SUB or FUNCTION defined twice. (compile error &had) in /common/LibCore/v30/bslDefender.brs(44)
SUB or FUNCTION defined twice. (compile error &had) in pkg:/source/main.brs(1)
main.brs(1) is
Library "v30/bslDefender.brs"So apparently a new version of
bslDefender has defined a function with the same name that i have - plus i had been gullible enough to think i can safely import
v30/bslDefender.brs.
Things like that happen, sure. But RokuCo
adding new names to a library should not break already working channels.
Is there something that can be done to avoid that? Yes, i think i have the solution: make the diagnostic of SUB/FUNCTION re-definition spit one of them new-fangled warnings:
Warning - SUB or FUNCTION defined twice: "RGBA"
AND
keep the latter function definition, then continue compilation. This will ensure that even if new names pop up in common:/LibCore files, channels will keep running undisturbed - spare a warning on the console if someone is watching (bonus: warnings will coax developer into moving to a new name... eventually - and w/o disturbing execution).