You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The framework includes some test value types in the internal/testing/types package. However since the import name matches the exported value types in the types package, most usages need to use an import alias:
This also confuses the Go language server and automatic editor suggestions to add the test types import since the package information cannot be determined by typing types... or testtypes....
Proposal
git mv internal/testing/types internal/testtypes and replace package types in internal/testtypes files with package testtypes. Replace any testtypes "github.com/hashicorp/terraform-plugin-framework/internal/testing/types" imports with "github.com/hashicorp/terraform-plugin-framework/internal/testtypes".
The text was updated successfully, but these errors were encountered:
bflad
added
tech-debt
Issues tracking technical debt that we're carrying.
types
Issues and pull requests about our types abstraction and implementations.
labels
Apr 12, 2023
… collisions
Reference: #724
This was a mechanical migration consisting of the following steps:
- `git mv internal/testing/types internal/testing/testtypes`
- In `internal/testing/testtypes`, replace `package types` with `package testtypes`
- Replace `testtypes "github.com/hashicorp/terraform-plugin-framework/internal/testing/types"` with `"github.com/hashicorp/terraform-plugin-framework/internal/testing/testtypes"`
Other than removing the import aliasing, this now enables the Go language server to automatically suggest and import when typing `testtypes.`.
… collisions (#773)
Reference: #724
This was a mechanical migration consisting of the following steps:
- `git mv internal/testing/types internal/testing/testtypes`
- In `internal/testing/testtypes`, replace `package types` with `package testtypes`
- Replace `testtypes "github.com/hashicorp/terraform-plugin-framework/internal/testing/types"` with `"github.com/hashicorp/terraform-plugin-framework/internal/testing/testtypes"`
Other than removing the import aliasing, this now enables the Go language server to automatically suggest and import when typing `testtypes.`.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Module version
Use-cases
The framework includes some test value types in the
internal/testing/types
package. However since the import name matches the exported value types in thetypes
package, most usages need to use an import alias:This also confuses the Go language server and automatic editor suggestions to add the test types import since the package information cannot be determined by typing
types...
ortesttypes...
.Proposal
git mv internal/testing/types internal/testtypes
and replacepackage types
ininternal/testtypes
files withpackage testtypes
. Replace anytesttypes "github.com/hashicorp/terraform-plugin-framework/internal/testing/types"
imports with"github.com/hashicorp/terraform-plugin-framework/internal/testtypes"
.The text was updated successfully, but these errors were encountered: