Open krojew opened 3 years ago
Hi, I could not reproduce it. Could you please post a code snippet where this happens? Thank you.
Unfortunately, I can't since it's both complex and proprietary. I can give more detailed steps of what exactly happened in my case:
This process was a bit more convoluted than my trivial example, but it might provide some more insight.
I see. If you click on the green arrow in the left column next to the method that you have refactored inside the trait in crate B (it should invoke find implementations), does it find the method impl that was missed by the refactoring?
Yes, it jumps to the impl without problems.
I tried a few situations where the impl was in another file and I added an unresolved type from a different crate, but so far I couldn't reproduce it.
I wonder where that error about the function ceasing to be visible came from, that might be the source of the problem. So it might be related to visibility conflict detection.
Another reason might be that if the impl had a wrong signature before the refactoring (for example a different amount of parameters), the refactoring would not touch it.
I'm not sure how to reproduce the error though. @Undin any ideas?
That's unfortunate. I am able to reproduce it 100% of times.
Seems like I can replicate the problem also with primitive parameters, and in various places. In fact, each time I use "change signature" I get this error. This makes even more confusing why you can't replicate it.
Do you see any IDE errors when you run the refactoring? (a red exclamation mark at the bottom right corner).
It would be great if you could find a minimal reproducible example that would demonstrate the error.
I don't see a red exclamation mark, but I found something interesting - after I open the refactoring window, change nothing and click preview, I get the visibility problems error. Maybe there are some logs I can attach?
Environment
Problem description
After adding a parameter using "change signature", corresponding impls are not updated. It's possible this only happens when adding non-trivial parameters.
Steps to reproduce