Skip to content

v3: Migration tool fails to update pkgname attribute from {{.PackageName}} to {{.SrcPackageName}} #1047

@vrsarah

Description

@vrsarah

Description

The mockery migration tool fails to correctly update the pkgname attribute in configuration files. When migrating from an older version to a newer version, it does not convert outpkg: {{.PackageName}} to pkgname: {{.SrcPackageName}}, causing compatibility issues with newer mockery versions.

Reproducer

  1. Start with an older mockery config file containing:
outpkg: "{{.PackageName}}"
  1. Run the migration tool to convert to the newer version
  2. The migrated file still contains pkgname: "{{.PackageName}}" instead of pkgname: "{{.SrcPackageName}}"

Expected behavior

The migration tool should update the pkgname attribute from {{.PackageName}} to {{.SrcPackageName}} to ensure compatibility with newer versions of mockery.

Mockery version

v3.2.5

Installation Mechanism

  • go get
  • [] Pre-built release
  • [] homebrew
  • [] Other: [please describe]

Go version

go1.24.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions