-
Notifications
You must be signed in to change notification settings - Fork 47
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
bslib ropm support #334
bslib ropm support #334
Conversation
remove config option.
src/Scope.ts
Outdated
@@ -835,6 +836,10 @@ export class Scope { | |||
let referencedFile = this.getFileByRelativePath(scriptImport.pkgPath); | |||
//if we can't find the file | |||
if (!referencedFile) { | |||
//skip the default bslib file, it will exist at transpile time but should not show up in the program during validation cycle | |||
if (s`${scriptImport.pkgPath}` === `source${path.sep}bslib.brs`) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need path.sep
? Does scriptImport.pkgPath
need to be normalized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we need path.sep right now. Until #329 merges, pkgPath uses windows separators on windows and unix slashes everywhere else.
I'll check on whether scriptImport is already normalized elsewhere, perhaps we can skip this normalization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, scriptImport has already been normalized, so this is redundant. i removed it. good catch!
@elsassph i believe ci have addressed all of your concerns. |
auto-detect if bslib is installed as a ropm module, and don't copy our version of bslib during transpile if true (in favor of using the version from ropm).