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

[Spritelab] Fixes for validation code #42177

Merged
merged 1 commit into from
Aug 24, 2021
Merged

[Spritelab] Fixes for validation code #42177

merged 1 commit into from
Aug 24, 2021

Conversation

ajpal
Copy link
Contributor

@ajpal ajpal commented Aug 24, 2021

Reports came in that console.log was not working in validation code anymore, it turns out this was a regression from #42141. Along the way, I also found that the getBackground function needed an additional guard for the case where the background is undefined.

Slack threads:
https://codedotorg.slack.com/archives/C1B3PNDL7/p1629820166079300

@ajpal ajpal requested a review from a team August 24, 2021 18:22
@@ -1151,7 +1151,7 @@ P5Lab.prototype.initInterpreter = function(attachDebugger = true) {
this.JSInterpreter.parse({
code,
projectLibraries: this.level.projectLibraries,
blocks: this.isSpritelab ? [] : dropletConfig.blocks,
blocks: dropletConfig.blocks,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[not blocking this PR] why did this break validation code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because validation code often uses console.log and console.log was only getting populated into the interpreter state from Gamelab's droplet config. The change here makes it so that Spritelab will have access to gamelab's whole droplet config again, but that's just the fastest way to resolve this issue. Longer term, we need to figure out the right way to do this without the implicit dependence on Gamelab's droplet config.

@ajpal ajpal merged commit 5ee33a3 into staging Aug 24, 2021
@ajpal ajpal deleted the aug24-validation branch August 24, 2021 18:26
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.

None yet

2 participants