-
-
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 #284
Conversation
…l print different names
Because nekotools server doesn't have file upload feature. And setting up mod_neko/tora is just too complex.
It could be reproduced using the integration tests.
It's great to see you worked so quick! One question: Will existing haxelib able to selfupdate to this? |
On windows, current selfupdate rebuild and nekoboots haxelib.exe which is actually the right thing to do if we want to migrate to the proposed mechanism. |
The separation run.n/haxelib.n may not be necessary indeed. Didn't think of selfupdate to that version, mostly assumed people would overwrite it with haxe 3.3. On unix it'll likely fail (can't change haxelib exe while running haxelib), but it's unrelated to this. |
Why? We nekoboot it - it'll run without |
Because we pop the last argument in the run script, since it was added by the doRun function and we want to pretend it wasn't the case, |
Actually we could add an argument to doRun to control the add of the cwd that defaults to true and pass false when proxying to the updated haxelib, That will prevent Or conditionally add the cwd if the lib isn't haxelib_client, that's a little less clean, but would work. |
Conflicts: test/IntegrationTests.hx
Nice! Now what shall we do with the shell script... |
The one people have right now? |
Well, and what if they just selfupdate without updating haxe? Will this PR still work through a shellscript? |
In that case, if the selfupdate works, the shell script will interp the main class, won't have If they selfupdate a second time (new version) then it'll still work, but the shell script won't be updated so they can't remove the old haxelib_client that was hardcoded in it (or move the haxelib folder, but that's already the case). I guess we could try and detect it and replace the shell script with a nekobooted version of run.n, |
So it'll run
That sucks, but maybe we could simply document the migration process, I doubt many people run selfupdate often or at all, since it's released really rarely.
Is this also true for shell scripts? O_o |
Yeah.
Tried and it doesn't lock on shell scripts, which makes sense since they are not the one running. |
TBH, I'm not sure it worth working on. This will complicate everything, because we have to check this each time on start and it's not clear how to detect that. Maybe it's really better to just document this one-time migration well. |
So, I guess we're waiting for Andy to review this? |
Conflicts: test/IntegrationTests.hx
The commit history looks ugly now. Could you squash commits into one? |
Yeah, even more since I realized I was branching of master and not develop, I'll do that now. |
See #172
Works for me, need haxelib.n next to run.n in the root folder.