Repository navigation
refactor: streaming go build output - #35
Merged
Merged
Conversation
- Introduced line offset handling in AssemblyContainer to correctly map lines across multiple blocks. - Updated extractLineInfo to accept an offset and filter for source files. - Implemented rebuildMaps method in AssemblyContainer for rebuilding line maps after block prioritization. - Enhanced updateView in AssemblyView to prioritize assembly blocks based on current file functions. - Modified getHtml and related functions to support rendering of prioritized assembly blocks. - Added tests for assembly block prioritization and adjusted line mapping tests for new functionality.
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the Go assembly viewer to support streaming assembly parsing/rendering, improves cross-platform source-path matching (notably Windows), and modernizes test/dependency setup for Node’s built-in test runner.
Changes:
- Add streaming command execution + streaming Go assembly parsing, and update the webview to render from streamed
AssemblyBlocks. - Rework source-path normalization/matching to better handle Windows paths and VS Code
Uriforms. - Update syntax highlighting and test suite (including new ordering tests) and refresh Node type/dependency config.
Reviewed changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Adds Node typings for the TypeScript build. |
| src/view/webviewHtml.ts | Adds block-based rendering + progress UI and extends syntax highlighting. |
| src/view/webview.ts | Switches assembly loading to streaming + uses AssemblyContainer for mappings. |
| src/view/sourceMatchTarget.ts | Reworks match-target creation using Uri.path (posix-style) rather than path. |
| src/view/sourceMatch.ts | Updates normalization and matching logic; adds Windows drive-letter normalization. |
| src/view/lineMaps.ts | Refactors line-map building/extraction logic (now shared with streaming container). |
| src/test/source-match.test.ts | Adds tests for Windows path normalization and matching behavior. |
| src/test/line-maps.test.ts | Updates tests to the new buildLineMaps signature (but expectations may now diverge). |
| src/test/assembly-order.test.ts | Adds unit tests for prioritizing current-file assembly blocks. |
| src/format/uris.ts | Removes path usage for filename() derivation. |
| src/extension.ts | Uses Uri.path for .go detection. |
| src/documents/tracker.ts | Changes package membership check to a Uri.path prefix check. |
| src/commands/commands.ts | Adds streamExecuteCommand for realtime stdout/stderr processing. |
| src/cache/cache.ts | Introduces a small caching utility namespace. |
| src/assembly/order.ts | Adds block ordering helper to keep current-file functions first. |
| src/assembly/info.ts | Extends AssemblyBlock with isolate() to support streaming parsing. |
| src/assembly/content.ts | Refactors command option/arg building and adds streamAsm() path. |
| src/assembly/container.ts | Adds container for streamed blocks + line/source mapping accumulation. |
| package.json | Updates Node types version and aligns dev deps with Node test runner usage. |
| package-lock.json | Lockfile update reflecting dependency changes/removals (mocha-related cleanup). |
| .gitignore | Ignores *.log artifacts. |
Comments suppressed due to low confidence (1)
src/view/webview.ts:38
findSourceEditorcomputesprimaryEditor, but then usesvisibleTextEditors.find(...)with a predicate that also matches non-primary editors. If another editor matchesmatchesSourceFileearlier in the list, it will be returned instead ofprimaryEditor, so the “exact URI match is prioritized” guarantee is not met. ReturnprimaryEditorimmediately when it exists, and only fall back to the matching search when it doesn’t.
sourceFileUri: Uri,
): TextEditor | undefined {
const primaryEditor = window.visibleTextEditors.find(
(e) => e.document.uri.toString() === sourceFileUri.toString(),
);
return window.visibleTextEditors.find(
(e) =>
e === primaryEditor ||
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/DaanV2/vscode-go-asm/sessions/742c6b3e-0e7f-4781-9ad5-36438947015c Co-authored-by: DaanV2 <2393905+DaanV2@users.noreply.github.com>
Agent-Logs-Url: https://github.com/DaanV2/vscode-go-asm/sessions/742c6b3e-0e7f-4781-9ad5-36438947015c Co-authored-by: DaanV2 <2393905+DaanV2@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 23 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.