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

bslib ropm support #334

Merged
merged 12 commits into from
Feb 27, 2021
Merged

bslib ropm support #334

merged 12 commits into from
Feb 27, 2021

Conversation

TwitchBronBron
Copy link
Member

@TwitchBronBron TwitchBronBron commented Feb 25, 2021

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).

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`) {
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member Author

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!

src/util.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@TwitchBronBron
Copy link
Member Author

@elsassph i believe ci have addressed all of your concerns.

@TwitchBronBron TwitchBronBron merged commit bcdf02a into master Feb 27, 2021
@TwitchBronBron TwitchBronBron deleted the bslib-ropm-package branch February 27, 2021 12:15
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 this pull request may close these issues.

2 participants