try to validate assets before committing them#10480
Merged
Conversation
srietkerk
reviewed
Apr 7, 2025
| } | ||
|
|
||
|
|
||
| function set16Bit(buf: Uint8ClampedArray, offset: number, value: number) { |
Contributor
There was a problem hiding this comment.
Is this function supposed to be deleted?
microbit-grace
pushed a commit
to microbit-matt-hillsdon/pxt
that referenced
this pull request
Apr 16, 2025
riknoll
added a commit
that referenced
this pull request
Apr 17, 2025
riknoll
added a commit
that referenced
this pull request
Apr 17, 2025
* try to validate assets before committing them (#10480) * fix temporary asset ids when converting to named assets (#10507) * fix temporary asset ids when they're named * Update pxteditor/monaco-fields/field_tilemap.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix copilot typing error --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is me throwing spaghetti at the wall to prevent the weird asset disappearing bug from breaking projects. i still have no repro for that bug, but this change just puts in some common-sense checks to make sure that we don't ever overwrite assets with obviously invalid ones.
again, because i can't repro the actual issue, i'm not sure that this will actually fix anything. it's possible that when that bug occurs all of the assets get overwritten with perfectly valid transparent assets or all of the assets are just summarily deleted from the project. but the project in this comment at least has an invalid tilemap (it has a tile width of 0) so maybe this would have prevented that one specific problem. we'll see if that tick i added actually gets hit.