sourcegraph / srclib-go

Go toolchain for srclib
https://sourcegraph.com/sourcegraph/srclib-go
MIT License
29 stars 13 forks source link

crude workaround for path collisions #100

Closed neelance closed 8 years ago

neelance commented 8 years ago

This is to avoid a path collision between an interface method's name and a parameter with the same name of another method of the same interface. Tried long to find some less radical workaround, found none. Proper fix needs major rewrite of this code based on AST traversal. Feeling bad...

beyang commented 8 years ago

Is it difficult to emit the path as ${interface_name}/${method_name}/${param_name}?

neelance commented 8 years ago

@beyang Yes it is, because the code currently traverses the scopes instead of the AST. The relationship between the parameter object and the interface/method is lost in those data structures. I really tried for a long time...

beyang commented 8 years ago

got it, LGTM