fix(utils): restore FileWithLineNum caller depth and add regression test#7717
fix(utils): restore FileWithLineNum caller depth and add regression test#7717smf-h wants to merge 1 commit intogo-gorm:masterfrom
Conversation
|
Thanks for the fix! LGTM on the approach: keeping CallerFrame() semantics stable while making FileWithLineNum() explicitly select its own skip depth via an internal helper makes the call-stack sensitivity much clearer. The wrapped-call regression test is also a good addition and matches the pre-v1.31.1 behavior. I ran go test ./... locally and it passed. CI looks mostly green; the only failing job is tests/mysql (mysql:9, 1.24) which seems flaky across several recent PRs. Could you please re-run the failed job / workflow? If it goes green, this should be good to merge. |
|
Thanks for the rerun. I checked the latest failed job: This failure is different from the previous flaky test failure. It fails during dependency resolution, before test execution: go: github.com/microsoft/go-mssqldb@v1.9.8 requires go >= 1.25.7 (running go 1.24.13) In CI, tests/tests_all.sh runs Could a maintainer advise whether to pin deps / avoid |
|
I don’t seem to have permission to rerun workflows on this PR from my side, so I’m unable to trigger the failed job directly.Could you rerun it,please? |
Summary
Root cause
After #7610, stack scanning was extracted into CallerFrame(). The call path for FileWithLineNum() gained an extra wrapper frame, while fixed caller-depth handling caused wrapper-level frame resolution in v1.31.1.
Validation
Fixes #7715