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

Renaming a copied module refactors references to the orignal module #299

Open
harmboschloo opened this issue Jul 7, 2022 · 0 comments
Open

Comments

@harmboschloo
Copy link

Expected Behavior

When I have a module A with import B. And I Copy/Paste module B and then rename the copied module I would expect that the other modules remain untouched.

Current Behavior

When renaming B copy.elm to C.elm the import in module A gets changed from import B to import C.

Possible Solution

It seems the language server still associates the copied module with the original module, which should not be the case. Also it might be good to check if the module name is valid and matches the file name before doing any refactoring.

Steps to Reproduce (for bugs)

  1. Create module A with import B
  2. Create module B
  3. Copy/Paste module B
  4. Rename B copy.elm to C.elm

Context

This issue might be related: #298

Your Environment

  • Version used: 2.4.1
  • Editor name and version (e.g. VSCode 1.36.1): VSCode 1.68.1
  • Environment name and version (e.g. node.js 5.4): node.js 16.15.1
  • Operating System and version: Windows 11 Home
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant