diff --git a/cmd/mockery.go b/cmd/mockery.go index 7666ea47..d4348e82 100644 --- a/cmd/mockery.go +++ b/cmd/mockery.go @@ -12,7 +12,6 @@ import ( "github.com/chigopher/pathlib" "github.com/mitchellh/go-homedir" - "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -235,12 +234,6 @@ func (r *RootApp) Run() error { if err != nil { return fmt.Errorf("failed to get package from config: %w", err) } - warnBeta( - ctx, - "use of the 'packages' config variable is currently in a beta state. Use at your own risk.", - map[string]any{ - "discussion": "https://github.com/vektra/mockery/discussions/549", - }) parser := pkg.NewParser(buildTags) if err := parser.ParsePackages(ctx, configuredPackages); err != nil { @@ -283,6 +276,10 @@ func (r *RootApp) Run() error { } } } else { + log.Warn(). + Fields(map[string]any{"url": "https://vektra.github.io/mockery/features/#packages-configuration"}). + Msg("DEPRECATION: use of the legacy config semantics is deprecated and will be removed in v3. " + "Please use the packages feature in the provided URL.") + if r.Config.Name != "" && r.Config.All { log.Fatal().Msgf("Specify --name or --all, but not both") } else if (r.Config.FileName != "" || r.Config.StructName != "") && r.Config.All { @@ -308,15 +305,6 @@ func (r *RootApp) Run() error { log.Fatal().Msgf("Use --name to specify the name of the interface or --all for all interfaces found") } - infoDiscussion( - ctx, - "dynamic walking of project is being considered for removal "+ - "in v3. Please provide your feedback at the linked discussion.", - map[string]any{ - "pr": "https://github.com/vektra/mockery/pull/548", - "discussion": "https://github.com/vektra/mockery/discussions/549", - }) - if r.Config.Profile != "" { f, err := os.Create(r.Config.Profile) if err != nil { @@ -401,29 +389,3 @@ func (r *RootApp) Run() error { return nil } - -func warn(ctx context.Context, prefix string, message string, fields map[string]any) { - log := zerolog.Ctx(ctx) - event := log.Warn() - if fields != nil { - event = event.Fields(fields) - } - event.Msgf("%s: %s", prefix, message) -} - -func info(ctx context.Context, prefix string, message string, fields map[string]any) { - log := zerolog.Ctx(ctx) - event := log.Info() - if fields != nil { - event = event.Fields(fields) - } - event.Msgf("%s: %s", prefix, message) -} - -func infoDiscussion(ctx context.Context, message string, fields map[string]any) { - info(ctx, "DISCUSSION", message, fields) -} - -func warnBeta(ctx context.Context, message string, fields map[string]any) { - warn(ctx, "BETA FEATURE", message, fields) -} diff --git a/docs/features.md b/docs/features.md index 53f29f73..7ad9f175 100644 --- a/docs/features.md +++ b/docs/features.md @@ -92,10 +92,7 @@ func (_m *Handler) HandleMessage(m pubsub.Message) error { `packages` configuration ------------------------ -:octicons-tag-24: v2.21.0 ยท :material-test-tube: Beta Feature - -!!! warning - This feature is considered beta. The feature set has been solidifed, but we are asking users to beta-test for any bugs. Use at your own risk. This warning will be updated as this feature matures. +:octicons-tag-24: v2.31.0 !!! info See the [Migration Docs](/mockery/migrating_to_packages/) on how to migrate to this new feature. diff --git a/docs/requirements.txt b/docs/requirements.txt index f8866aff..37ad63ec 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,7 @@ +cairosvg +mike mkdocs mkdocs-glightbox mkdocs-material mkdocs-open-in-new-tab -cairosvg pillow