Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): upgrade Go to v1.23.0 and bump wapc-go #149

Merged
merged 3 commits into from
Feb 2, 2025

Conversation

madflojo
Copy link
Member

@madflojo madflojo commented Jan 26, 2025

Upgraded Go for performance because it's always good to stay current. Also bumped wapc-go to v0.7.1, to address issues with TinyGo 0.35.0

Summary by CodeRabbit

  • Chores
    • Updated Go version to 1.23.0
    • Updated project dependencies
    • Added new toolchain version
    • Updated WebAssembly-related dependencies
    • Specified a specific version of the TinyGo Docker image for the build process across multiple Makefiles

Upgraded Go for performance because it's always good to stay current.
Also bumped wapc-go to v0.7.1, because who doesn't like a little
version inflation?
Copy link
Contributor

coderabbitai bot commented Jan 26, 2025

Walkthrough

The pull request focuses on updating the Go module configuration in the go.mod file and several Makefiles. The changes include upgrading the Go version from 1.22.6 to 1.23.0, adding a new toolchain version, and updating several dependencies, including wapc-go and wazero. Additionally, the version of the TinyGo Docker image has been updated to 0.34.0 in multiple Makefiles used for building WebAssembly functions. These modifications ensure compatibility with the latest Go ecosystem and improve the build process.

Changes

File Change Summary
go.mod - Upgraded Go version from 1.22.6 to 1.23.0
- Added toolchain go1.23.2
- Updated github.com/wapc/wapc-go from v0.7.0 to v0.7.1
- Added new dependency github.com/wapc/wapc-go/engines/wazero
- Updated indirect dependency github.com/tetratelabs/wazero from v1.7.3 to v1.8.2
example/echo/go/Makefile - Updated TinyGo version from 0.25.0 to 0.34.0
example/tac/go/Makefile - Updated TinyGo version from 0.25.0 to 0.34.0
testdata/base/default/Makefile - Updated TinyGo version from latest to 0.34.0
testdata/base/fail/Makefile - Updated TinyGo version from latest to 0.34.0
testdata/base/function/Makefile - Updated TinyGo version from latest to 0.34.0
testdata/base/kv/Makefile - Updated TinyGo version from latest to 0.34.0
testdata/base/logger/Makefile - Updated TinyGo version from latest to 0.34.0
testdata/base/sql/Makefile - Updated TinyGo version from latest to 0.34.0
testdata/base/successafter5/Makefile - Updated TinyGo version from latest to 0.34.0
testdata/sdkv1/kv/Makefile - Updated TinyGo version from latest to 0.34.0
testdata/sdkv1/logger/Makefile - Updated TinyGo version from latest to 0.34.0
testdata/sdkv1/sql/Makefile - Updated TinyGo version from latest to 0.34.0

Possibly related PRs

Poem

🐰 Hop, hop, go mod update time!
Versions dancing, dependencies climb
From 1.22 to 1.23 we soar
Wazero and wapc open a new door
Toolchain ready, dependencies bright
A rabbit's code update feels just right! 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Raised the wattage on wazero for a brighter future. Farewell to wasmtime—your time has ticked away.
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.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d18b662 and e029abf.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (2)
go.mod (2)

96-96: LGTM: wazero version update

The update of the indirect dependency github.com/tetratelabs/wazero to v1.8.2 is valid and aligns with the wapc-go upgrade.


Line range hint 26-96: Verify dependency compatibility

Let's ensure all WebAssembly-related dependencies are compatible and check for any breaking changes.

✅ Verification successful

Dependencies are compatible and up-to-date

The WebAssembly-related dependencies are compatible, and the recent updates contain only bug fixes and improvements. Module verification completed successfully with no issues detected.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for compatibility issues between WebAssembly-related dependencies

# Get go.mod contents from relevant versions
echo "Checking wapc-go v0.7.1 dependencies..."
curl -s "https://raw.githubusercontent.com/wapc/wapc-go/v0.7.1/go.mod"

echo -e "\nChecking wazero v1.8.2 release notes for breaking changes..."
curl -s "https://api.github.com/repos/tetratelabs/wazero/releases/tags/v1.8.2" | jq -r '.body'

echo -e "\nVerifying module compatibility..."
go mod verify

Length of output: 799

Updating TinyGo is like upgrading from a tricycle to a bicycle—wobbly at first, but way faster!
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.

Actionable comments posted: 0

🧹 Nitpick comments (2)
testdata/sdkv1/logger/Makefile (1)

5-5: Consider avoiding root user in Docker build.

While the TinyGo version update is good, running the container as root (-u root) might pose unnecessary security risks. Consider if root privileges are actually required for the build process.

-	docker run --rm -v `pwd`/:/build -w /build -u root tinygo/tinygo:0.34.0 tinygo build -o /build/tarmac.wasm -target wasi /build/main.go
+	docker run --rm -v `pwd`/:/build -w /build tinygo/tinygo:0.34.0 tinygo build -o /build/tarmac.wasm -target wasi /build/main.go
testdata/base/kv/Makefile (1)

5-5: Consider consolidating common build commands.

The build command is identical across multiple Makefiles. Consider creating a shared Makefile or using Make includes to reduce duplication and maintain consistency.

Example approach:

  1. Create a shared Makefile (e.g., build/common.mk):
TINYGO_VERSION := 0.34.0

define build_wasm
	docker run --rm -v `pwd`/:/build -w /build tinygo/tinygo:$(TINYGO_VERSION) tinygo build -o /build/tarmac.wasm -target wasi /build/main.go
endef
  1. Include in each Makefile:
include ../../build/common.mk

build:
	$(call build_wasm)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e029abf and 8408f7d.

📒 Files selected for processing (12)
  • example/echo/go/Makefile (1 hunks)
  • example/tac/go/Makefile (1 hunks)
  • testdata/base/default/Makefile (1 hunks)
  • testdata/base/fail/Makefile (1 hunks)
  • testdata/base/function/Makefile (1 hunks)
  • testdata/base/kv/Makefile (1 hunks)
  • testdata/base/logger/Makefile (1 hunks)
  • testdata/base/sql/Makefile (1 hunks)
  • testdata/base/successafter5/Makefile (1 hunks)
  • testdata/sdkv1/kv/Makefile (1 hunks)
  • testdata/sdkv1/logger/Makefile (1 hunks)
  • testdata/sdkv1/sql/Makefile (1 hunks)
✅ Files skipped from review due to trivial changes (9)
  • testdata/sdkv1/sql/Makefile
  • testdata/sdkv1/kv/Makefile
  • testdata/base/fail/Makefile
  • example/tac/go/Makefile
  • testdata/base/function/Makefile
  • testdata/base/successafter5/Makefile
  • testdata/base/sql/Makefile
  • testdata/base/default/Makefile
  • testdata/base/logger/Makefile
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: tests
  • GitHub Check: redis
  • GitHub Check: mysql
  • GitHub Check: postgres
  • GitHub Check: in-memory
  • GitHub Check: boltdb
  • GitHub Check: golangci
  • GitHub Check: cassandra
  • GitHub Check: build
🔇 Additional comments (1)
example/echo/go/Makefile (1)

5-5: Verify TinyGo version compatibility.

The PR objectives mention compatibility with TinyGo 0.35.0, but the Makefile is being updated to use version 0.34.0. Please confirm if this is intentional or if we should be using version 0.35.0 instead.

✅ Verification successful

TinyGo version 0.34.0 is correctly specified

The version choice is consistent with all other Makefiles in the project, maintaining uniformity across test data and examples. While the PR aims for 0.35.0 compatibility, using 0.34.0 for builds appears to be the project standard.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check TinyGo version compatibility with the project

# Check if there are any version constraints or compatibility notes in project docs
fd -t f -e md | xargs rg -i "tinygo.*version|compatibility.*tinygo"

# Check if there are any version-specific configurations in other files
rg -i "tinygo.*0.3[45]"

Length of output: 2064

@madflojo madflojo merged commit 5a0e6e0 into tarmac-project:main Feb 2, 2025
9 checks passed
@madflojo madflojo deleted the deps-update branch February 2, 2025 19:51
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.

1 participant