Moving file inserts incorrect imports and removes needed imports for macro invocations
I moved a .scala file containing a macro invocation to a subpackage, using drag and drop in the Package Explorer. The import of the macro itself disappeared, so the compilation failed, but some bogus new imports were added - probably because the refactoring code is seeing the results of the macro expansion, instead of the original code.
But my more fundamental question is: why is such a move removing imports (except ones that are members of the destination package) at all? That is an unwanted anti-feature. If you really want to remove unnecessary imports, just press ctrl+shift+O afterwards - there should be no need for this to be done as part of the move.
But my more fundamental question is: why is such a move removing imports (except ones that are members of the destination package) at all? That is an unwanted anti-feature. If you really want to remove unnecessary imports, just press ctrl+shift+O afterwards - there should be no need for this to be done as part of the move.
Leave a comment