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

siderophile trait impl output doesn't have full trait paths #1

Open
rozbb opened this issue May 21, 2019 · 1 comment
Open

siderophile trait impl output doesn't have full trait paths #1

rozbb opened this issue May 21, 2019 · 1 comment
Labels
output mismatch Output of siderophile does not match the corresponding callgraph label

Comments

@rozbb
Copy link
Contributor

rozbb commented May 21, 2019

Example: siderophile would output

<rand_pcg::pcg128::Mcg128Xsl64 as RngCore>::next_u64

whereas the label in the crate's callgraph would be

<rand_pcg::pcg128::Mcg128Xsl64 as rand_core::RngCore>::next_u64

This might end up being quite hard to implement, since the tools only looks at source code, and trait path resolution happens at compile time.

@rozbb rozbb added the output mismatch Output of siderophile does not match the corresponding callgraph label label May 22, 2019
rozbb added a commit that referenced this issue May 23, 2019
…es.py; removed prose in siderophile output; updated README; kinda fixes issue #1
@rozbb
Copy link
Contributor Author

rozbb commented May 24, 2019

So it doesn't seem like there's an easy way to solve this issue. However, it turns out that stripping all but the last component in the fully-qualified trait path does not increase ambiguity in practice. That is to say, I have yet to find an example of a two distinct paths outputted by siderophile whose fully-qualified path truncations are identical. Even if there were, I think the false positive that this would produce is well worth the complexity that a better solution would likely bring.

All this said, this doesn't technically resolve the issue, so I'll leave it open for the time being. I might be missing something obvious here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
output mismatch Output of siderophile does not match the corresponding callgraph label
Projects
None yet
Development

No branches or pull requests

1 participant