Conversation
- Added `GetRoot` and `GetEnv` to `tinygo` package for safe environment handling. - Added unit tests for new environment functions in `env_test.go`. - Created `client/wasmbuild.go` implementing the `GetEnv` pattern, replacing the use of global `os.Setenv`. - Verified all tests pass and the new package compiles correctly. Co-authored-by: cdvelop <44058491+cdvelop@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR implements Stages 4 and 5 of the TinyGo installation plan.
Changes:
env.go: AddedGetRoot()to determine the TinyGo root directory andGetEnv()to generate a modified environment slice containingTINYGOROOTand an updatedPATH. This avoids mutating the global process environment.env_test.go: Added comprehensive unit tests for both system and local installation scenarios, ensuring correct environment construction and lack of global mutation.client/wasmbuild.go: Introduced a newclientpackage that demonstrates the fix for theos.Setenvbug. It usestinygo.GetEnv()to inject the necessary environment variables directly into the compiler subprocess.All changes have been verified with
go test ./...andgo build ./client/....PR created automatically by Jules for task 11817058800369912870 started by @cdvelop