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

Formatting problems using Go 1.18 #57

Closed
zyedidia opened this issue Dec 16, 2021 · 6 comments
Closed

Formatting problems using Go 1.18 #57

zyedidia opened this issue Dec 16, 2021 · 6 comments

Comments

@zyedidia
Copy link

In preparation for the release of Go 1.18, I have been testing out generics. I noticed that gomarkdoc doesn't always use correct formatting when generic types are involved. See https://github.com/zyedidia/generic/tree/master/avl for an example.

I realize this might be a bit ahead of time, but just wanted to document the issue so it can be resolved before the release of 1.18. Thanks!

@zyedidia zyedidia changed the title Errors using Go 1.18 Formatting problems using Go 1.18 Dec 16, 2021
@nwillc-paxos
Copy link

Saw the BADRECV issue as well w/ 1.18beta1. I'm very impressed how much it does handle though.

@princjef
Copy link
Owner

Thanks for reporting the issue @zyedidia! I can see the same formatting at the link you provided when running with gotip. Is the incorrect formatting you're referring to the *BADRECV part or is there something else that's incorrect? I'll have to dig in a bit and see if I can figure out where things are going wrong

@zyedidia
Copy link
Author

That is the main issue. I also sometimes see issues with generic functions in the index, for example the New function here: https://github.com/zyedidia/generic/tree/master/interval. It seems like BADRECV is maybe returned by the Go stdlib (https://cs.opensource.google/go/go/+/master:src/go/doc/reader.go;l=35?q=badrecv&ss=go%2Fgo) so fixing the issue may just involve waiting for the Go team to fix that.

@nwillc-paxos
Copy link

I'm looking at this. The BADRECV isn't from in gomarkdoc itself is from https://github.com/golang/go/blob/95b240b2cd63e9631b3d0be72a10a3f2cc6f1d28/src/go/doc/reader.go

@nwillc-paxos
Copy link

Looks like it's been targeted.

golang/go@95b240b

@princjef
Copy link
Owner

princjef commented Jan 6, 2022

Yep just saw the same fix and that appears to have resolved it. After updating to the latest gotip I'm seeing the right information generated in the receiver.

I'm going to mark this resolved, but feel free to reactivate the issue if not or open a new one if you encounter any additional problems with the tool when using go 1.18. I appreciate you two kicking the tires with the new generics changes so that things work well with the new version on day 1.

@princjef princjef closed this as completed Jan 6, 2022
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

No branches or pull requests

3 participants