Type alias spec in oci package#2336
Conversation
|
@williammartin can you take a look and test this solution? |
Codecov Report
@@ Coverage Diff @@
## master #2336 +/- ##
==========================================
+ Coverage 44.99% 49.29% +4.29%
==========================================
Files 92 84 -8
Lines 9336 7421 -1915
==========================================
- Hits 4201 3658 -543
+ Misses 4457 3088 -1369
+ Partials 678 675 -3
Continue to review full report at Codecov.
|
|
Have asked the team to take a look, thanks. |
|
Any word on this fixing the issues you are seeing? |
|
@containerd/containerd-maintainers you can review this as well |
|
LGTM |
|
Thanks for chasing and sorry for the delay. The place where we get this error is actually on Line 199 in 1291671 I did try to play the same trick by adding: and changing the function signature to: But it didn't resolve anything (not sure if the type is leaking somewhere else): Can you point me to where you found that type alias would resolve vendor conflicts? I can’t seem to find anything about it and in a simplified case (https://github.com/williammartin/alias) type aliasing doesn’t seem to resolve conflicts (but it’s totally possible I’m doing something stupid). Maybe you can fill me in on what I’m missing. Finally, because of this, and a bunch of other reasons that have built up over time, we are in the process of switching all our vendoring to a more suitable scheme (dep or vndr) which as discussed previously, should flatten the vendor hierarchy and avoid this whole thing altogether. As such, I suspect we won't really need anything from |
|
@williammartin you actually have to change your implementations also to use |
This allows Go to build third party packages correctly without vendoring issues what want to create their own SpecOpts. Fixes containerd#2289 Signed-off-by: Michael Crosby <[email protected]>
|
@williammartin i also pushed an update changing the container opts to oci.Spec. I believe if you change your calling code from having specs.Spec to oci.Spec it will resolve the issues you are seeing like it did for me. I was having the same issues. |
|
@crosbymichael Ah you're right, when I did that in my test example it seemed to work. I can give this a go in Garden when I have a spare moment (infrequently I'm afraid!). |
|
LGTM |
This allows Go to build third party packages correctly without vendoring
issues what want to create their own SpecOpts.
Fixes #2289
Signed-off-by: Michael Crosby [email protected]