Auto-Import icon indicating copy to clipboard operation
Auto-Import copied to clipboard

When moving folders around auto-import renames import paths across entire project incorrectly.

Open CieloVistaSoftware opened this issue 6 years ago • 0 comments

Describe the bug

Environment: Using ng-serve while making changes. A determination is made to refactor a component or two or more. Ultimately, one or more folders are moved.

This app will attempt to rename paths but very often cannot do it properly. This winds up with many import path statements being wrong.

To Reproduce

Steps to reproduce the behavior:

  • In any project start it up using ng serve
  • Make changes and save, not that ng serve follows the changes
  • Now start moving folders around.
  • Continue until an error is seen indicating an import path issue.
  • Expected behavior

It should be able to track folder moves anywhere anytime.

Logs

Please attach two logs:

Next time I see it I will attach the log.

Screenshots

Next time I will attach screen shot.

Additional context

Sometimes when typing in a new import path it will pop up 4 or 5 possible selections. The text does not make it clear which one is the right one. This causes us to have to try multiple choices until the right one is found. In our environment the index.ts files are not updated until we specifically run the job, maybe this has something to do with it. In that case, there should be an option to ignore index.ts files because Angular requires all components to be put into the NgModule. Perhaps a NgModule only config option would be good.

CieloVistaSoftware avatar Sep 25 '20 14:09 CieloVistaSoftware