1pkg/gopium

embedding struct tags

Frosin opened this issue · 4 comments

if click gopium pack:
image
after:
image
result:
struct have invalid tags

1pkg commented

@Frosin thank you for reporting, I will check it out.

1pkg commented

Okay, it should be resolved now in v1.3.0 (hopefully). @Frosin please try it out.
The issue was long running issue about multiple embedded fields sorting for structure memory packing #2. I figured, that just using naked types without extra indexes should be enough for embedded fields. Because go forbids having two embedded types with exact the same type hence type by itself should be unique identifier for embedded fields.

P.S.
@Frosin, I've even added your example to the tests https://github.com/1pkg/gopium/blob/master/tests/data/embedded/file.go#L16
https://github.com/1pkg/gopium/blob/master/walkers/wast_test.go#L360
Hope you don't mind about this.

1pkg commented

Closing this as resolved.

It works thanks