Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed ListNestedAttributesOptions, SetNestedAttributesOptions and MapNestedAttributesOptions types, as they were empty (no fields) and unused #349

Merged
merged 6 commits into from
May 25, 2022

Conversation

detro
Copy link
Contributor

@detro detro commented May 25, 2022

No description provided.

Ivan De Marino added 4 commits May 25, 2022 16:50
…nd `MapNestedAttributesOptions` types, as they were empty (no fields) and unused.

Because of this, `ListNestedAttributes`, `SetNestedAttributes` and `MapNestedAttributes` functions lost the second argument `opts`, as it was unused.
@detro detro requested a review from a team as a code owner May 25, 2022 15:59
@@ -73,7 +73,7 @@ type NestedAttributes interface {
type nestedAttributes map[string]Attribute

func (n nestedAttributes) GetAttributes() map[string]Attribute {
return map[string]Attribute(n)
return n
Copy link
Contributor Author

@detro detro May 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goland made me do it ®

@@ -111,7 +111,7 @@ func (n nestedAttributes) AttributeType() attr.Type {
// configuration.
func SingleNestedAttributes(attributes map[string]Attribute) NestedAttributes {
return singleNestedAttributes{
nestedAttributes(attributes),
attributes,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goland made me do it ®

Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor documentation note, otherwise looks good to me 🚀

@@ -522,7 +522,7 @@ func (t exampleThingResourceType) GetSchema(_ context.Context) (Schema, diag.Dia
Required: true,
Type: types.StringType,
},
}, ListNestedAttributesOptions{}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep the design documentation with the original context/decision here and below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with it, even though I can foresee someone coming here, reading the doc, and getting confused.

But we already discussed this, so 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted.

@bflad bflad added enhancement New feature or request breaking-change This PR introduces a breaking change or the resolution of this issue may require a breaking change. labels May 25, 2022
@bflad bflad added this to the v0.9.0 milestone May 25, 2022
@detro detro merged commit 211f10a into main May 25, 2022
@detro detro deleted the detro/fix_ListNestedAttributes branch May 25, 2022 16:33
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change This PR introduces a breaking change or the resolution of this issue may require a breaking change. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants