Repository navigation
Runtime: a source ending in a // comment compiles - #88
Merged
Merged
Conversation
The entry wrapper appended its closing code directly to the source, so a last line that was a comment without a line break swallowed it and the widget failed to compile. The wrapper now ends the source with a line break, in the Swift runtime and in the shared JavaScript that Android, Windows, Linux and the browser preview run. No source line number moves. The compiler fingerprint stays: artifacts compiled before remain correct for their source, so no widget needs recompiling. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.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.
Outcome
A widget whose last line is a
//comment with no line break after it failed to compile on every platform: the entry wrapper appended its closing code to the source and the comment swallowed it. The wrapper now ends the source with a line break.ScriptWidgetCompiler.wrappedSource(Apple) andwrappedSourceinWeb/preview-engine/src/contract.js(browser preview, Android, Windows, Linux) change together; the contract test holds them equal.Security and compatibility
No permission or limit changes. Sources that compiled before compile to the same program.
Checks run (Mac, Apple silicon)
npm testinWeb/preview-engine: 200 passed. The new kernel test fails without the fix.ScriptWidgetRuntimeTests: 829 tests, 795 passed, 34 skipped, 0 failed, including the newtestSourceEndingInALineCommentWithoutLineBreakCompiles.Not run
release-readiness.shas a whole.🤖 Generated with Claude Code