Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Local Development Environments Advanced Tooling Refactoring

Is it normal for the type migration to take over an hour?

Hello,

I am very new to java and programming in general, so I apologize if this is user error. I am running IntelliJ IDEA Community Edition 2016.3.3(64) which I know is an updated version compared to what was used in the video. When refactoring the Song to SongRequest, I followed the exact steps from the video. After Craig selects ignore, the changes are immediate, however I have been watching a pop up bar that says Type Migration that has been running various tasks such as searching for read, searching for set, and many more. This has been going on for well over an hour plus the time it took for me to shower and eat a meal. Not sure what I did wrong, or if this is normal. Has anyone else had this happen? Should I just continue to wait it out? Thank you for the help.

Tagging Craig Dennis

8 Answers

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

Whoa no, should be pretty close to the video in terms of speed. I can't really think of anything other than a hidden dialog box somewhere, which usually IntelliJ is pretty good at taking care of. Can you try closing IntelliJ and coming back? I didn't find anything on the Intertubes about this error specifically.

Christopher Mlalazi
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Christopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 Points

I got it Craig Dennis, type migration is delaying because in it's pop up where we change Song to SongRequest, there is a default setting titled "Choose scope where change signature may occur' and it is set to 'All Files.' I watched the tutorial video carefully, and saw that in that video (tutorial), this is set to the 'Project Files' option. So if you refactor from Project Files, implementation is instantaneous. Hope this helps.

Ok all good now. Thank you for the prompt help guys. Closing out and coming back did the trick. Should have tried that first, but I didn't know if exiting in the middle of it would cause any problems. Learning new things everyday.

I am having a similar to Sinans. I have the same build for my Macs and each one takes ~for ever~ that is over an hour, to look for space, objects, inheritors, all that. I've gone as far as closing everything down except FireFox and IntelliJ to no avail. What ~did~ work for me was to correctly close down all applications with IntelliJ being the last one. The shut down the PC. Reminds me of my old Windows days ;-) After re-powering, the process of refactoring is exactly the same as Craig's video. Whew!

Christopher Mlalazi
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Christopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 Points

I have the same problem the Type Migration pop out is running endlessly. Okay I can shut down the application and on again but that does not solve anything as I will meet this again in the future.

Christopher, I was pretty much in the same boat until I reverted to the 'subatomic' option: Close all open apps/widgets (even if just idle) except IntelliJ - don't forget to save your work! After saving your code, close IntelliJ. Power down your computer. No, restarting doesn't help; leave off for 30 seconds. Power up and retest the migration steps. It worked for me on my Mac and on my Windows 7 box. Good luck!

Christopher Mlalazi
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Christopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 Points

@Will Anderson thanks for the tip I am using a Mac. I switched IntelliJ off and on and started the process again and again it's taking the long journey right now it says 'looking for Usages.' Of course if it fails this time again I will power off, but that seems to me rather drastic - I mean, does it mean that everytime I want to refactor I have to power off and on?

@Christopher Mlalazi I'm MACOS Sierra, and the power cycle, in the order I mentioned is the only way it worked for me. The atomic option is format/re-install, but the problem re-appears! But once it's fixed, it stays fixed. I'm preparing a bug report for JetBrains, with my thought that the run option used is actually the migration is 'everything', even though you've just selected the selected element, I think it's a bug in IntelliJ's latest build. 2016.3.

Christopher Mlalazi
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Christopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 Points

Hi @Will Anderson it's not a bug I found out the issue if we are talking about the same thing. Check this reply I made below: I got it Craig Dennis, type migration is delaying because in it's pop up where we change Song to SongRequest, there is a default setting titled "Choose scope where change signature may occur' and it is set to 'All Files.' I watched the tutorial video carefully, and saw that in that video (tutorial), this is set to the 'Project Files' option. So if you refactor from Project Files, implementation is instantaneous, and if you refactor from the default setting of All Files, the app searches all your files and this is what is causing the delay. Hope this helps.

I'm having the same issue. It's been a fun day... learning a bit about the internals of IntelliJ-C. I created a VMware Workstation Player Win7-64 Pro VM on Win7-64 Pro for a training environment. Everything has worked fine in it. What I've learned - it seems I can't delete and rebuild a project; I resorted to uninstalling, then deleting the c:\Users<user account>\IdeaIC2016.3 directory before reinstalling. If there IS a way to rebuild a project without going through this process, it would be great to know.

For data backup purposes, I created the project directory on a network mount to a directory on the parent system's C: drive. Apparently, since it is not local, IntelliJ can't "watch" the files for changes so it forces a full scan synch even in the "Project Files" mode. It would be nice to be able to override the forced resync - in other words, signifying that the drive is not going to have external changes made to the files. I guess the next step is rebuild the project again using the default location and then copy the project files to the mount directory for backup. [sigh]