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

Build fails with Go 1.23 because of changed testing.testDeps #391

Closed
stefanb opened this issue Jul 4, 2024 · 6 comments · Fixed by #392
Closed

Build fails with Go 1.23 because of changed testing.testDeps #391

stefanb opened this issue Jul 4, 2024 · 6 comments · Fixed by #392

Comments

@stefanb
Copy link

stefanb commented Jul 4, 2024

When trying to build with Go 1.23 rc1 in

It failed at

m := testing.MainStart(nopTestDeps{}, nil, nil, nil, nil)

with error:

  # github.com/hofstadter-io/hof/script/runtime
  script/runtime/exe_next.go:52:26: cannot use nopTestDeps{} (value of type nopTestDeps) as testing.testDeps value in argument to testing.MainStart: nopTestDeps does not implement testing.testDeps (missing method InitRuntimeCoverage)

InitRuntimeCoverage was added by @rsc in:
golang/go@180ea45#diff-36f401ff1ffadb7d7a39cf41c2329615b159fa95cf2e14c1f58d8c46331af429R208

See

Given the NOP nature of nopTestDeps a possible workaround could be to just implement a dummy/nop function InitRuntimeCoverage() in the nopTestDeps:

func (nopTestDeps) InitRuntimeCoverage() (mode string, tearDown func(string, string) (string, error), snapcov func() float64) {
	return
}
@verdverm
Copy link
Member

verdverm commented Jul 9, 2024

Living on the edge eh?! Thanks for the heads up and initial investigation

We've seen this before, it's one area where Go is not API stable :[

I can probably roll over the old/new exe files and the build directives therein

@verdverm
Copy link
Member

verdverm commented Jul 15, 2024

@stefanb please let me know if _dev branch (our main branch) works for you now

I'm going to look at updating CUE to 0.9.1+ or maybe a 0.10.0-beta/rc and then cut a new version

@stefanb
Copy link
Author

stefanb commented Jul 26, 2024

@verdverm the most i could (quickly) test is if it builds or run some unit tests, not all the functionality in practice. Would that really be enough?

@verdverm
Copy link
Member

yeah, just whatever is failing for you. I find it unlikely this changed any behavior you rely on, unless you are using the hidden hof run command (which is based on the testscript package both Go & CUE use, but exposed as a scripting language)

@stefanb
Copy link
Author

stefanb commented Aug 16, 2024

Still needs a release > v0.6.9 that includes fix from #392, see: https://github.com/hofstadter-io/hof/releases

stefanb added a commit to Homebrew/homebrew-core that referenced this issue Aug 17, 2024
use "go" again after hofstadter-io/hof#391 is fixed and released

Follow-up to:

* #175310
@verdverm
Copy link
Member

@stefanb just cut a new release candidate

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 a pull request may close this issue.

2 participants