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

Add a proto.to_any method #83

Merged
merged 9 commits into from
Sep 30, 2020

Conversation

idiamond-stripe
Copy link
Contributor

This PR uses the code from #46 and responds to the review feedback on this PR.

I've removed the gogo code entirely to be consistent with the rest of the provided functions in proto_api.go, which don't support gogo protos.

This PR is also quite old so I've also rebased it onto master.

@idiamond-stripe
Copy link
Contributor Author

r? @jmillikin-stripe

The build is failing but I'm confused as to why given the dependencies don't appear to have changed.

Copy link
Contributor

@jmillikin-stripe jmillikin-stripe left a comment

Choose a reason for hiding this comment

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

Looks generally good -- two minor comments.

"go.starlark.net/starlark"
yaml "gopkg.in/yaml.v2"
"gopkg.in/yaml.v2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you keep this import alias as-is? It's nice to have explicitly named imports when upstream uses a non-default package name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is a holdover/cargo-cult from the first iteration of this change. Let me change the alias back.

return nil, err
}

// Disambiguate between golang encoded proto messages.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure why this branch is needed. Why not any, err := ptypes.MarshalAny(msg.msg)? Was there a case you encountered where a protobuf message has no type name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is a holdover/cargo-cult from the first iteration of this change. I'll remove it.

@jmillikin-stripe
Copy link
Contributor

The build is failing but I'm confused as to why given the dependencies don't appear to have changed.

It looks like something in Go: master is unhappy with the contents of go.mod. No idea why, but since it's not affecting any stable release I think it's fine to ignore.

We should probably drop Go: master from the CI suite since I don't see an obvious way to make Travis test failures informational.

@dilyevsky
Copy link
Contributor

dilyevsky commented Sep 30, 2020 via email

@idiamond-stripe
Copy link
Contributor Author

idiamond-stripe commented Sep 30, 2020

Updated the conditional and import, and dropped go master.

ptal @jmillikin-stripe

@idiamond-stripe idiamond-stripe marked this pull request as ready for review September 30, 2020 04:32
@jmillikin-stripe jmillikin-stripe merged commit 64f84d0 into stripe:master Sep 30, 2020
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.

3 participants