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

Inline fields of inlined types #25

Merged
merged 2 commits into from
Jul 4, 2022
Merged

Conversation

tenstad
Copy link
Contributor

@tenstad tenstad commented Mar 24, 2022

Closes #22

@cla-checker-service
Copy link

cla-checker-service bot commented Mar 24, 2022

💚 CLA has been signed

@tenstad tenstad changed the title Inline embedded fields Inline fields of inlined types Mar 24, 2022
@tenstad
Copy link
Contributor Author

tenstad commented Mar 24, 2022

Originally fields of all embedded types were inlined (including named types such as metadata). Modified the behavior to only inline embedded types that are not named.

@tenstad
Copy link
Contributor Author

tenstad commented Mar 31, 2022

Requesting review from @thbkrkr

@thbkrkr thbkrkr added the enhancement New feature or request label Jul 4, 2022
Copy link
Contributor

@thbkrkr thbkrkr left a comment

Choose a reason for hiding this comment

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

LGTM

Sorry for the long delay.

Comment on lines -268 to -272
if p.shouldIgnoreType(types.Key(typeDef)) {
zap.S().Debugw("Skipping excluded type", "type", typeDef.String())
return nil
}

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 this breaks the ignoreTypes setting which seems to be now ignored: https://github.com/elastic/cloud-on-k8s/pull/7608/files#discussion_r1528299014

@@ -355,10 +356,6 @@ func (p *processor) loadType(pkg *loader.Package, t gotypes.Type, depth int) *ty
}

typeDef := mkType(pkg, t)
if p.shouldIgnoreType(types.Key(typeDef)) {
Copy link
Contributor

@barkbay barkbay Mar 18, 2024

Choose a reason for hiding this comment

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

I think this breaks the ignoreTypes setting which seems to be now ignored: https://github.com/elastic/cloud-on-k8s/pull/7608/files#discussion_r1528299014

Or maybe it's this one... I'm lost...

for name, t := range gvi.types {
key := types.Key(t)

if p.shouldIgnoreType(key) {
Copy link
Contributor

@barkbay barkbay Mar 18, 2024

Choose a reason for hiding this comment

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

I think this is too late as it does not prevent some excluded types from being referenced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline embedded types
3 participants