Skip to content

Switch to github.com/coder/websocket#698

Merged
lmars merged 1 commit intomainfrom
update-websocket-dep
Feb 24, 2026
Merged

Switch to github.com/coder/websocket#698
lmars merged 1 commit intomainfrom
update-websocket-dep

Conversation

@lmars
Copy link
Member

@lmars lmars commented Feb 23, 2026

This is the new home of the nhooyr.io/websocket package (see https://coder.com/blog/websocket).

Summary by CodeRabbit

  • Chores
    • Updated websocket library dependency and associated package imports.

This is the new home of the nhooyr.io/websocket package.

Signed-off-by: Lewis Marshall <lewis.marshall@ably.com>
@sacOO7
Copy link
Collaborator

sacOO7 commented Feb 23, 2026

Let me take a look, thanks for adding as a reviewer

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

Walkthrough

The pull request replaces the websocket library dependency from nhooyr.io/websocket to github.com/coder/websocket, updating all import paths, error messages, and go.mod entries accordingly. No functional logic or control flow changes are introduced.

Changes

Cohort / File(s) Summary
Websocket library migration
ably/websocket.go, ably/websocket_internal_test.go
Updated import paths from nhooyr.io/websocket to github.com/coder/websocket and corrected error message reference.
Dependency management
go.mod
Replaced nhooyr.io/websocket v1.8.7 with github.com/coder/websocket v1.8.12; removed indirect dependency github.com/klauspost/compress v1.10.3.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A hop, a skip, through libraries we go,
From nhooyr's path to coder's flow,
Dependencies bundled, imports refreshed with care,
Websockets dancing through cleaner air! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the main change: switching the websocket dependency from nhooyr.io/websocket to github.com/coder/websocket, which is reflected throughout the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-websocket-dep

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
go.mod (1)

7-7: Consider upgrading to v1.8.14 (latest)

The latest release of github.com/coder/websocket is v1.8.14, two patch versions ahead of the pinned v1.8.12. Subsequent releases include a rewrite of how the library handles connection closing and a fix for an unaligned load error on 32-bit architectures. The close-handling rewrite in particular is directly relevant to this library's usage.

⬆️ Proposed version bump
-	github.com/coder/websocket v1.8.12
+	github.com/coder/websocket v1.8.14
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` at line 7, Update the pinned module version for
github.com/coder/websocket from v1.8.12 to v1.8.14 in go.mod to pull in the
close-handling rewrite and 32-bit unaligned load fix; after editing the version
string run `go get github.com/coder/websocket@v1.8.14` (or `go mod tidy`) and
run the test suite/build to confirm no breakages.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@go.mod`:
- Line 7: Update the pinned module version for github.com/coder/websocket from
v1.8.12 to v1.8.14 in go.mod to pull in the close-handling rewrite and 32-bit
unaligned load fix; after editing the version string run `go get
github.com/coder/websocket@v1.8.14` (or `go mod tidy`) and run the test
suite/build to confirm no breakages.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3dad1b1 and eceffad.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • ably/websocket.go
  • ably/websocket_internal_test.go
  • go.mod

@sacOO7
Copy link
Collaborator

sacOO7 commented Feb 23, 2026

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the project’s WebSocket dependency to use the new module path (github.com/coder/websocket), which is the new home of the former nhooyr.io/websocket package.

Changes:

  • Replaced nhooyr.io/websocket with github.com/coder/websocket in module requirements.
  • Updated imports in the Ably WebSocket implementation and internal tests accordingly.
  • Refreshed module sums consistent with the dependency change.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
go.mod Switches required module from nhooyr.io/websocket to github.com/coder/websocket.
go.sum Updates checksums to match the new websocket module path and tidied dependency set.
ably/websocket.go Updates the websocket import and adjusts an error message to reference the new module path.
ably/websocket_internal_test.go Updates test import to the new websocket module path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

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

lgtm

@lmars lmars merged commit 17f5d49 into main Feb 24, 2026
33 of 37 checks passed
@lmars lmars deleted the update-websocket-dep branch February 24, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants