Skip to content

refactor: streaming go build output - #35

Merged
DaanV2 merged 11 commits into
mainfrom
refactor/streaming
Apr 19, 2026
Merged

DaanV2 merged 11 commits into
mainfrom
refactor/streaming

Conversation

@DaanV2

@DaanV2 DaanV2 commented Apr 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

@github-actions github-actions Bot added dependencies Pull requests that update a dependency file release labels Apr 19, 2026
- 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 Uri forms.
  • 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

  • findSourceEditor computes primaryEditor, but then uses visibleTextEditors.find(...) with a predicate that also matches non-primary editors. If another editor matches matchesSourceFile earlier in the list, it will be returned instead of primaryEditor, so the “exact URI match is prioritized” guarantee is not met. Return primaryEditor immediately 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.

Comment thread src/assembly/container.ts Resolved
Comment thread src/view/webviewHtml.ts Resolved
Comment thread src/view/lineMaps.ts Resolved
Comment thread src/view/sourceMatch.ts Resolved
Comment thread src/assembly/content.ts Resolved
Comment thread src/documents/tracker.ts Resolved
Comment thread src/assembly/container.ts Resolved
Comment thread src/assembly/container.ts Resolved
Comment thread src/commands/commands.ts Resolved
Comment thread src/cache/cache.ts Resolved
@DaanV2 DaanV2 changed the title Refactor/streaming refactor: streaming go build output Apr 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread src/commands/commands.ts Resolved
Comment thread src/view/webviewHtml.ts Resolved
Comment thread src/assembly/content.ts Resolved
Comment thread src/cache/cache.ts Resolved
Comment thread src/assembly/order.ts Resolved
Comment thread src/view/webview.ts Resolved
Comment thread src/view/webviewHtml.ts Resolved
Comment thread src/assembly/container.ts Resolved
Comment thread src/assembly/info.ts Resolved
DaanV2 and others added 2 commits April 19, 2026 17:13
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DaanV2
DaanV2 merged commit 6bc25fa into main Apr 19, 2026
2 checks passed
@DaanV2
DaanV2 deleted the refactor/streaming branch August 23, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants