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

Support generic struct types #145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

aaronjwood
Copy link

This is the first phase for supporting generics. Attaching the generated SVG from the testingsupport code here for reference:

design

@aaronjwood
Copy link
Author

aaronjwood commented Oct 19, 2022

I've included a fix for breakages on codebases which use generic method receivers. For example, this used to incorrectly parse to "":

type Foo[T string] struct {
}

func (h *Foo[T]) SomeMethod() {}

@daniel-santos
Copy link

oops, I started doing the same thing :( But I stuck the patch in issue #148 -- mine doesn't support interfaces yet. I hate duplicating effort!

@daniel-santos
Copy link

Hello @aaronjwood ,
Please never include reformatting or refactoring in a patch that makes functional changes, as this makes it very difficult to review. Separate out reformatting and whitespace changes into a separate patch, refactoring into another and the actual functional changes into a third.

I'm comparing your approach to mine, so I needed to separate these out, so here's an example: https://github.com/daniel-santos/goplantuml/tree/awood-cleaned-up (that I won't promise is correctly separated out).

@daniel-santos
Copy link

Hello @aaronjwood !

I just wanted to let you know that I'm working on a patch set, but it's a fairly dramatic departure, so it might end up a fork ☹️ Anyway, I'm using some of your code, mostly the test cases. I'm not actually sure that I know what I'm doing, but I guess we'll see where it ends up!

I was originally testing using an old version of plantuml without realizing it and things weren't coming out right. The big thing to me is the ability of plantuml to be able to export to xmi now. What would help me the most for my project would be to have my model imported into a UML editor and be able to render multiple class and sequence diagrams and then be able to update those diagrams as my code changes (by just updating the model part of the .xmi file).

Thanks for your work on this!

@glacials
Copy link

@jfeliu007 any news on whether this will be merged?

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

Successfully merging this pull request may close these issues.

4 participants