Skip to content

Bump github.com/maxbrunsfeld/counterfeiter/v6 from 6.12.2 to 6.13.0 - #2086

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/go_modules/github.com/maxbrunsfeld/counterfeiter/v6-6.13.0
Open

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/go_modules/github.com/maxbrunsfeld/counterfeiter/v6-6.13.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 15, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/maxbrunsfeld/counterfeiter/v6 from 6.12.2 to 6.13.0.

Release notes

Sourced from github.com/maxbrunsfeld/counterfeiter/v6's releases.

v6.13.0

It's been a while since a release here had anything in it but dependency bumps. This one closes some of the oldest issues on the tracker: fakes can be generated into the interface's own package or into <package>_test, flags on the -generate line apply to every directive, loading is two to three times faster, and the README documents every flag.

counterfeiter now requires go 1.26. go 1.27 is out, and counterfeiter follows go's support policy, so 1.26 and 1.27 are the supported versions.

Where fakes can go

  • 🆕 A fake can be generated into the same package as its interface. Point -o at the package's own directory (-o ., or -o fake_foo_test.go so it is only compiled for tests) and the fake becomes a member of that package: no self-import, unqualified names, and the compile-time assertion stays, unexported interfaces included. Tests inside the package can use generated fakes without an import cycle. There is no new flag; detection is by directory, so fakes written anywhere else come out exactly as before. A stale same-package fake that no longer compiles does not stop you regenerating it. (#378, fixes #103, #121, #210, #262, and #68 from 2016)
  • 🆕 -test writes the fake into the external test package, <package>_test, as a _test.go file next to the tests that use it. It works for interfaces from other packages in your module, the standard library and third-party modules, so -test io.WriteCloser puts FakeWriteCloser in <package>_test, the package that tests <package>'s public API, and writes nothing anywhere else. @​nkovacs proposed and prototyped this in #135 in 2019. Thanks Nikola. (#383, fixes #135)
  • 🆕 The package clause of a fake follows whatever package already lives in the output directory, and is named after the directory only when there is nothing there yet. So fakes/ can hold package impl_fakes: add a doc.go declaring it and generate. Existing fakes packages are unaffected, their files already match the directory. (#384, fixes #249)
  • A fake of an unexported interface generated into its own package is unexported too: gadget gets fakeGadget, not FakeGadget. -fake-name is left alone. (#386)

Flags on the -generate line are defaults

  • 🆕 -o, -header, -q, -test and the new -fake-name-template given alongside -generate apply to every counterfeiter:generate directive in the package. A directive's own flags still win. -fake-name-template is a text/template over {{.TargetName}}, so -generate -o fake -fake-name-template '{{.TargetName}}' puts every fake in a fake package named after its interface, written once instead of -o and -fake-name on every line. This is @​matt-royal's design and fixture from #195, re-applied on the current tree. Thanks Matt. (#379, fixes #191)

⚡️ moar speed

  • Only the target package is type-checked from source now. Everything it imports is read from export data through the go build cache, instead of the whole dependency graph being type-checked on every run, stdlib included. On cloudfoundry/cli's actor/v7action (11 fakes) with a warm build cache:

    • one //go:generate line per fake: 4.7 seconds, was 11
    • the same package on a single -generate directive: 1.0 second, was 1.4, on a third of the CPU
    • a single fake on its own: 0.48 seconds, was 1.1
    • the repository benchmark: 130ms per uncached generate, was 600ms, allocating 7MB instead of 570MB

    The generated fakes are byte-for-byte identical across the fixture corpus. (#380, related #120, #181)

  • 🐛 Type errors in the target package that have nothing to do with the interface no longer stop generation: an import that can't be resolved in a sandboxed build, a broken file elsewhere in the package mid-refactor. A file that does not parse is still fatal. Otherwise generation fails only if the interface's own signatures use a type that could not be loaded, and the error names the method and quotes the load errors behind it. Based on @​navijation's #183. Thanks Navneeth. (#380, fixes #182)

Fixes

  • 🐛 Generic fakes with comparable, union or ~T constraints compile. The assertion lives in a blank generic function now, so any constraint works, and the packages constraints come from are imported instead of guessed from the type string. (#378, fixes #365)
  • 🐛 Reading Invocations() on a function fake while another goroutine calls it could deadlock. Interface fakes got this fix in v6.11.3; function fakes were missed. (#387, related #41, #44)
  • 🐛 Variadic arguments are recorded as a copy, like every other slice, so changing the slice after the call no longer changes what ArgsForCall and Invocations report. (#387)
  • 🐛 counterfeiter io.WriteCloser - prints to stdout, as the usage text says, instead of failing with "No such file/directory/package". (#383)
  • 🐛 A fake generated into a directory whose name differs from its package (go-foo holding package foo) compiles. (#383)
  • 🐛 generator.Cache, generator.CachedFileReader and Fake.Generate are safe to use from several goroutines, for anyone driving the generator as a library. The CLI never hit this. (#388)

📖 Docs

  • The README is rewritten so it's a bit more approachable for someone new to the tool: go get -tool and -generate as the recommended setup, a table of the defaults and how to change each, the common setups, the fake API, and the full -help output, which a test keeps in sync with the tool. The help text was wrong about -p and had no entry for -q. (#385, fixes #102)

🧹 Housekeeping

  • 🔁 CI actions updated to current majors by @​katsugtgz (#377)
  • ⬆️ dependency updates (gomega 1.43.0, x/tools 0.50.0, x/text 0.42.0)
  • the test suite runs in parallel and CI is about 40% faster on Linux (#388)

New Contributors

... (truncated)

Commits
  • 3f09632 Merge pull request #388 from maxbrunsfeld/faster-ci
  • 4f3f1ed run the race detector only where something is concurrent
  • 5db1011 make the caches safe to share and check the generator under concurrent use
  • fc28428 load each package once in the specs that only inspect the target
  • 80b1057 run the generator and integration specs in parallel
  • 9bd0b71 build the title caser per call so Generate can run concurrently
  • 305aa22 drop the install and build steps from the CI scripts
  • f26ad9d Merge pull request #387 from maxbrunsfeld/fake-race-audit
  • 7530f8b invoke counterfeiter with go run in the sql fixture like every other fixture
  • 77d1b5f record variadic arguments as a copy like other slices
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/maxbrunsfeld/counterfeiter/v6](https://github.com/maxbrunsfeld/counterfeiter) from 6.12.2 to 6.13.0.
- [Release notes](https://github.com/maxbrunsfeld/counterfeiter/releases)
- [Commits](maxbrunsfeld/counterfeiter@v6.12.2...v6.13.0)

---
updated-dependencies:
- dependency-name: github.com/maxbrunsfeld/counterfeiter/v6
  dependency-version: 6.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Sep 15, 2026
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 532a09e4-81d7-4ca7-b86c-be19b6c67181

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

openshift-ci Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign grokspawn for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants