Skip to content

CI: add Go 1.27 to CI - #3070

Merged
aldas merged 1 commit into
labstack:masterfrom
cxlblm:add-go1.27-to-ci
Aug 24, 2026
Merged

CI: add Go 1.27 to CI#3070
aldas merged 1 commit into
labstack:masterfrom
cxlblm:add-go1.27-to-ci

Conversation

@cxlblm

@cxlblm cxlblm commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Update LATEST_GO_VERSION from Go 1.26 to Go 1.27.
  • Add Go 1.27 to the cross-platform test matrix.
  • Remove TestHandlerName_differentFuncSameName, which depends on compiler-generated closure symbol names.

Background

Go 1.27 changed how function literals and closures are named by the compiler. A function literal now uses the same symbol name regardless of inlining, and multiple closure instances may share the same code and symbol name.

As a result, the following handlers:

h1 := handlerCreator("name1")
h2 := handlerCreator("name2")

previously had different names under older Go versions, but both resolve to the following name with Go 1.27:

github.com/labstack/echo/v5.TestHandlerName_differentFuncSameName.func1.func1

This behavior is documented in the Go 1.27 release notes. The reflect.Value.Pointer documentation also states that a function code pointer is not guaranteed to uniquely identify a function value.

Test removal

TestHandlerName_differentFuncSameName asserted exact compiler-generated names and required two closure instances to have different names. Neither behavior is guaranteed across Go versions, so the test has been removed.

This part may need further discussion. If retaining coverage for closure handlers is preferred, the test could instead verify only version-independent behavior, such as:

  • HandlerName returns a non-empty value for a closure.
  • Repeated calls for the same handler return a stable value.

It should not assert that separate closure instances have either equal or different names.

Verification

  • go test ./... with Go 1.27.0
  • All packages pass.

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.71%. Comparing base (dcb05f0) to head (b8b1f3b).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3070      +/-   ##
==========================================
+ Coverage   93.34%   95.71%   +2.36%     
==========================================
  Files          43       44       +1     
  Lines        4735     4035     -700     
==========================================
- Hits         4420     3862     -558     
+ Misses        192      173      -19     
+ Partials      123        0     -123     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread route_test.go

@aldas aldas 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.

LGTM

@aldas
aldas merged commit e552b4d into labstack:master Aug 24, 2026
13 checks passed
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