Skip to content

Some packages import themselves at older versions #25769

@jim-minter

Description

@jim-minter

Bug Report

In latest main,

sdk/resourcemanager/resources/armresources/go.mod defines package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/v3, yet it also requires github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources@v1.2.0 (the same package without the /v3 suffix).

The same happens in sdk/resourcemanager/batch/armbatch/go.mod, which defines package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3 and also requires github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch@v1.2.1.

Although Go doesn't complain about this, Bazel/Gazelle does, for example, preventing compilation:

$ bazel test //...
ERROR: /path/to/external/gazelle++go_deps+com_github_azure_azure_sdk_for_go_sdk_resourcemanager_resources_armresources_v2/BUILD.bazel:40:8: Label '@@gazelle++go_deps+com_github_azure_azure_sdk_for_go_sdk_resourcemanager_resources_armresources_v2//:armresources' is duplicated in the 'deps' attribute of rule 'armresources_test'
ERROR: /path/to/BUILD.bazel:3:11: Target '@@gazelle++go_deps+com_github_azure_azure_sdk_for_go_sdk_resourcemanager_resources_armresources_v2//:armresources' contains an error and its package is in error and referenced by '//...'
ERROR: Analysis of target '//...' failed; build aborted: Analysis failed

I think this is probably accidental bad practice in azure-sdk-for-go; please could it be fixed?

Metadata

Metadata

Assignees

Labels

ARMMgmtThis issue is related to a management-plane library.needs-author-feedbackWorkflow: More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions