Closed hablix closed 2 years ago
Thanks for your detailed issue comments. I'm going to try to recreate your scenario but I may need to request a few more details.
I'll comment again shortly.
Regards
Tom
Hello @hablix
I've recreated a component with the same name as yours in a test app/repo here: https://github.com/tomwhite007/test-issue29 - and renaming works fine on my component. This proves that there must be a difference in your configuration that we haven't noted yet. It'd be great if you could clone the repo and see if you can rename it too.
Here's some questions to try to get to the bottom of your issue. If you're willing, I'd be happy to receive any answers you have time to give. Don't feel you have to answer all of them unless you can.
"renameAngularComponent.debugLog": true
and restart VS Code. This will create a log file called rename-angular-component-debug-log.txt
(when you rename a component) in the root of your app. Then you can attach the file to this issue.Hello @hablix Have you managed to try renaming other components successfully? I cannot recreate your problem without you providing further information to the questions in the comment above I would very much like to help if you can reply.
Hello Tom,
Thanks for the effort so far I can answer you the following questions: other questions I can only answer you next week BC I'm on vacation right now.
Haven't tried it on another app.
4 and 5. Thanks for the hint, I will do this by next week.
Best regards Hannes
Tom White @.***> schrieb am Di., 14. Juni 2022, 08:09:
Hello @hablix https://github.com/hablix Have you managed to try renaming other components successfully? I cannot recreate your problem without you providing further information to the questions in the comment above https://github.com/tomwhite007/rename-angular-component/issues/29#issuecomment-1145437070 I would very much like to help if you can reply.
— Reply to this email directly, view it on GitHub https://github.com/tomwhite007/rename-angular-component/issues/29#issuecomment-1154756443, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH2VDIXJDYFMVIQCFXV6YBLVPAO2LANCNFSM5XQMHSPQ . You are receiving this because you were mentioned.Message ID: @.***>
same here
Hi @hablix and @MohRaouf
The current info provided by @hablix is very helpful but not enough for me to debug against. If either or both of you can provide info to questions 4 or 5 above, that could help a lot.
At the moment my suspicions relate to file access / rights on your machines. If it is something like that, I believe my current PR, Feat/use vscode workspace fs #31 could fix your issue. You could watch this PR and when its merged and released, try again.
If you are able to answer 4 or 5 in the meantime, that would help me confirm (or pivot) before release.
Regards
Tom
Hi. A quick update. I'm closing Feat/use vscode workspace fs #31 for performance reasons, so that won't help this issue. If either of you can answer 4 or 5 above, I can progress this issue. Hope to hear from you soon.
Hello ! I have the same issue and have done 4. rename-angular-component-debug-log.txt
Hi @elmehdielhamdi
That was really helpful. Thank you. Your log file highlighted a gap that I need more details from.
I've released a new version to add extra logging around the files it looks for after you enter the new name. Would you mind updating to v2.1.2 and running the same process again? Then if you send me the log file again, I'm hopeful I'll find the issue is related to Windows paths.
Thanks again
Hi @tomwhite007 !
I'm glad that it helped 😀. I installed the update and did the same process, here is the new log file: rename-angular-component-debug-log.txt
Hi @elmehdielhamdi , @MohRaouf , @hablix
Thanks to all of you for your comments, help and feedback.
I believe I now have a solution. PR #37 will close this issue today and the new version 2.1.3
will be deployed. If you still have the same problem after you recieve the update in VSCode, please comment on this issue thread, and I'll reopen it.
Regards
Tom White
Describe the bug Cannot rename Componet. Always getting Error: "The component class file must use the same file naming convention as 'controlarea.component.ts' for this process to run." But component class file IS already using the same file naming convention.
It doesn't matter what the new name should be. Always getting the same error mesage.
All files are already following the angular style guide: https://angular.io/guide/styleguide#style-02-01
controlarea.component.ts controlarea.component.html controlarea.component.css and selector: app-controlarea and class name: ControlareaComponent
Screenshots or Demo Repo