Copilot keeps importing unwanted modules. #32895
Replies: 11 comments 3 replies
-
|
Hello @albas99 Our engineering team is looking into this issue |
Beta Was this translation helpful? Give feedback.
-
|
@albas99 Can you please share more details on the issues that you're seeing? Ideally concrete examples where you see suboptimal completions being generated. |
Beta Was this translation helpful? Give feedback.
-
|
@tilmann1 It's not about suboptimal completion being generated, it's about copilot importing packages/libraries I don't want/need. This happens when for example I type some method or function |
Beta Was this translation helpful? Give feedback.
-
|
I also have this issue all the time, suprised this has not gotten more attention. |
Beta Was this translation helpful? Give feedback.
-
|
I have this issue too. This is my #1 complaint about Copilot. (I'm enjoying it, otherwise!) I'm also using VS Code. My most recent example: I have a function called subscribeCallback() and Copilot imported a random library with a function named "subscribe". I probably typed "subs..." and hit tab and it completed the word "subscribe" and added an import at the top of the file. The frustrating aspect of this is the change is at the top of the file. I don't see the change. Later, when my code doesn't run or does run properly, I'm looking at the code that I changed and not at the top of the file. @iamcjwilliams One possible fix is to change Copilot, but another possible fix is to improve the user interface: making sure VS Code notifies the user of a change outside the viewable area. |
Beta Was this translation helpful? Give feedback.
-
|
That is an extremely annoying issue that I think only started happening recently. If fixing it so that somehow Copilot could be more accurate when inserting imports is not possible, I would really like to have an option to disable inserting import statements completely so instead I could rely on code actions only. It is tiresome to check the top of the file for rubbish imports even if you changed just one line with Copilot. |
Beta Was this translation helpful? Give feedback.
-
|
Same here, I'd rather have Pycharm show me a big red error when I forgot the import than copilot adding a random one and discovering it when my pipeline fails 5 minutes later. |
Beta Was this translation helpful? Give feedback.
-
|
Any update on this front? I'm enjoying Copilot but this is making me disable it more and more often. |
Beta Was this translation helpful? Give feedback.
-
|
Crazy behavior from co-pilot on VSCode, "Oh you wrote merge in a string? I'm gonna add |
Beta Was this translation helpful? Give feedback.
-
|
This issue is still there, is there anything going on with it? It was reported in 2022 and nothing happened??? |
Beta Was this translation helpful? Give feedback.
-
|
Any update? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been having issues with Github Copilot importing stuff I don't need randomly into my code. Sometimes it might just be a method I'm using from a different library or package I'm using and Copilot would just import another package that I don't need into my code and sometimes even cause buggy behavior. How can I make it to stop doing this?
Beta Was this translation helpful? Give feedback.
All reactions