Skip to content

Conversation

tchssk
Copy link
Member

@tchssk tchssk commented Sep 3, 2025

Related to goadesign/goa#3721

@tchssk tchssk marked this pull request as ready for review September 3, 2025 00:57
@tchssk tchssk requested a review from Copilot September 3, 2025 00:58
Copy link

@Copilot 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

This PR refactors test files to use non-global root expressions by capturing the return value from httpcodegen.RunHTTPDSL instead of relying on the global expr.Root variable. This change improves test isolation and prevents potential issues with shared state between tests.

Key changes:

  • Replace global expr.Root usage with local root variables returned from httpcodegen.RunHTTPDSL
  • Update function calls to use the local root variable instead of the global one
  • Remove unused expr package imports where no longer needed

Reviewed Changes

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

Show a summary per file
File Description
i18n/generate_test.go Updates two test functions to use local root variables and removes dependency on global eval context
goakit/mount_files_test.go Replaces global expr.Root with local root variable and removes unused import
goakit/generate_test.go Updates three test functions to use local root variables and removes unused import
goakit/encode_decode_files_test.go Updates two test functions to use local root variables and removes unused import
cors/generate_test.go Updates test function to use local root variable and removes unused import

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@raphael
Copy link
Member

raphael commented Sep 14, 2025

this is great, thank you!

@raphael raphael merged commit 5c75d4c into v3 Sep 14, 2025
5 checks passed
@raphael raphael deleted the non-global-root branch September 14, 2025 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants