-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add migration path from Hyper2 config location to Hyper3 #3610
Conversation
@Stanzilla fixed. Weird that I have that installed as a indirect dependency but you don't. Anyway that's a terrible module that I'm hoping goes away when we update dependencies:
|
So from a technical standpoint, the migration works, but it would be nice to get some message out to the user as to what happened. Could just be a simple alert ala |
@Stanzilla, Added this but also rewrote it so that it handles plugin migration in the same way |
@juancampa Three things here: a) the migration did not work here, the |
Thanks! I'll fix that. I haven't got time to thoroughly test this |
Frankly: Should not update install code. but rather do it with scripting. Such as a prompt: file found. want to move file to new destinations or not? |
We should totally rename |
Thanks @ppot, I actually considered that option, but I don't see any reason for users not wanting their files migrated, so why not do it automatically? There are also other complications that I don't think are worth handling right now: dialog would keep popping up forever until they migrate? Or just once? what if they dismiss it by accident? AFAIK we don't have a convenient way to add an arbitrary action to a popup, except for a URL link. I definitely agree about the name being weird! I don't want to introduce more breaking changes atm though |
@juancampa Why pop-up? I was implying of a shell script. With a question in a shell pty session and response so a single flag on update or install after this. nada. |
@ppot I see what you're saying, I like that approach because it can show any errors to the user. Main issue is that we'd need to write a portable |
OTOH this works and we need to get this out ASAP. It's already too late unfortunately :( |
@juancampa what about my point c)? |
@juancampa @Stanzilla Here why my shell script since we can export the whole |
Small problem with the last commit, you copy the |
@Stanzilla, can't repro, are you testing the latest latest? I changed the order so that I first copy and then create the backup folder 🤔, so |
I tested 41e4e12 let me try again |
Oh I think what you're seeing is the backup of the new |
Yeah, it is in the destination dir but it is not empty. Fun fact, this only happens when running the installer, not when starting Hyper normally. Otherwise seems to be good apart from one thing. If we don't copy |
@Stanzilla so many edge cases! Ok adding |
Oh actually, I'm not going to migrate it. The notification says to restart hyper, that should also do it, right? |
Hrm not the best of UX but should be okay. |
Does this check whether the new file has already been modified by the user? many of us have already done this. |
@pcnate It doesn't but it backs it up for that case |
@juancampa good enough. looks like needs testing. is there a short howto for how to test PRs? |
@pcnate, what I've been doing is testing different scenarios, installling from scratch with old files, without old files, etc. @Stanzilla would you say that it works correctly on Windows? |
@juancampa sadly not, a restart does not trigger the installation of plugins, a manual trigger is still required, copying |
That might just be a hyper bug in general, maybe it should update plugins right after startup? |
yeah, it works on Linux so I'm surprised about that one |
Merging this and running more tests on windows before publishing a canary |
not sure if this applies but I saw some .hyper.js hardcoded floating around. :) hope that helps and if not, sorry for bothering! |
This PR adds a migration path from Hyper2 config file locations to Hyper3 file locations.
The idea is to use the old file by moving it to the new location. While creating back ups for any existing files.
The old file is also renamed so that this happens only on the first run.