-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Make self update work on top of run mechanism #291
Conversation
Ooh, you should've just force-pushed into previous PR branch, that PR has some interesting discussion, but oh well. |
Thanks a lot for the work! I can see that there are still issues. I describe them below, follows with a proposal to mitigate.
My proposed solution: Implement a way to prevent people with certain old haxelib version downloading new versions of "haxelib_client". We can let the haxelib client add an additional GET param that states it version when downloading libraries. The server will return an error if the requesting client has an version incompatible to the new version. For existing haxelib clients, they will not send out this GET param, thus the server will know that it must be an old client. What do you think? If you agree and don't have another design, you may merge this PR and we can start to work from here. |
Actually, on windows I think they will be able, since it nekoboots a new executable. The problem is with unixes that was discussed in #284
I wonder if that can/should be implemented by using our "api version" mechanism. This requires more thought as we clearly don't want to introduce a lot of code for such migration. |
Point one: Indeed we are dependent of how run works, but on the other hand we use it here because we know it's working really well. Point two: no they can, and it'd work as long as they keep the first "new" haxelib the upgrade to, unless it's broken already for them (bundled nekobooted version from an haxe installer on linux) but nothing we can do here. (edit, just like @nadako said) Interesting solution, so filtering the result of The |
Okay, I looked at the Maybe it would be better to conform the current run protocol and check for Personally, I'm not a fan of this cwd dance, but at least it would be consistent. And we have another issue about reworking that (#272). |
As for forbidding updates, another option would be to just rename the library, so it won't be updated for older clients, but newer ones will check for the new name. I think I like this approach, since it's not like people are expecting selfupdate to work anyways :) |
For the changeDir, that would indeed allow to let run as is, I'll change it. I like the renaming approach, and it would fully work, how about just |
Ok with me |
@andyli do you think this gets it all covered? |
I'm itching to merge this \o/ |
The lib name isn't changed yet, should other people vote on it? Not like it's a big deal. |
I don't think anyone besides Andy cares as long as it works :) |
Yeah, I think the plan is all good now. I like renaming "haxelib_client". I understand the existing haxelibs may selfupdate correctly, but they may not as well, so I think it is good to force everyone to get the new haxelib alongside with haxe 3.3, and selfupdate will work reliably from now on. I still think that it would be useful to send additional params when the clients request to install new libs. It could gives us statistics about the number of currently active haxe/haxelib versions etc. But it could be implemented later. So, please go ahead to change the |
Okay, then I'll merge this and then change library name and cleanup leftovers. After that I think there's some work to do regarding installers, linux/homebrew packages and whatnot. Will you handle that @andyli? |
No problem, I will handle those. It is merely changing the haxe Makefile to use a nekobooted haxelib instead of the scripted version. |
Merged manually in b4799e8 |
Oh, one more consideration: |
Hmm, maybe we should check if installed version greater than current! |
I made a meta-issue with current stuff related to this: #293 |
#284 (comment)