Sublime Forum

Dev Build 3167

#1

Dev Build 3167 is out now at https://www.sublimetext.com/3dev

8 Likes

#2

Simply out of curiosity, when updating Sublime, what’s it doing when it says “applying patch”? Is it updating the installer? Like, is sublime_text.exe updating the installer first, then the installer updates sublime_text.exe?

1 Like

#3

It’s building a new version of Sublime Text based on the current version and the downloaded patch. We use bsdiff to generate a patch, to minimise the download size.

The update installer itself is very minimal: it just deletes the old version of Sublime Text, moves the new one in place of the old one, and then starts Sublime Text up again.

4 Likes

#4

It would be aces if the updater could somehow maintain the same permissions that the original files from the install had.

On Windows, the initial install is available to all users on the system (I have a separate user for recording screencasts with for example), but if Sublime hot-patches itself the permissions change so that only administrators (and the user that did the update) can access it, requiring one to do a reinstall with a full installer to get things working again (see this issue).

0 Likes

#5

Windows update rarely works for me. Almost always, it can’t delete the original one and gives up. Only on very rare occasions does it work, so I just download the full installer every time.

0 Likes

#6

I spent some time looking into that before, but unfortunately it ended up looking really thorny to solve, so I deferred on it for a while. It could just be that I was missing a simple solution.

0 Likes

#7

That’s more or less what I expected to be the case; I’ve experienced way more hairy permissions problems on Windows than on anything else over the years. In the general case it probably doesn’t matter for the most part since I imagine most people aren’t running multiple users anyway.

On the whole like @facelessuser I tend to download a full installer anyway, if for no other reason than it’s easier to test things out on prior builds. :slight_smile:

0 Likes

#8

There’s a regression bug: In this version, the command palette “forgets” the last command you entered after applying it, i.e. the command palette input is empty after opening it again. It should have the previous contents and they should be selected, like before.

0 Likes

#9

this has also been logged at

0 Likes

#10

Right, I actually posted there, too - since it’s a regression in this version, I wanted to make sure it’s brought up.

1 Like

#11

On Windows, kill the plugin_host.exe subprocess before answer yes to the update message.
Maybe this could be done by ST itself ?

0 Likes

#12

I’d be interested to see if manually killing plugin_host.exe solves the issue for others too.

We do attempt to kill plugin host before running the update installer: first we ask nicely, and if it still hasn’t exited 500ms later, then we call TerminateProcess on it and wait again.

Looking at the code though, it seems we don’t pass in PROCESS_TERMINATE to the OpenProcess call before TerminateProcess, so its likely that the TerminateProcess call just fails.

0 Likes

#13

I attempted an upgrade to 3168 by killing plugin_host first. It worked, so I imagine it probably is plugin_host preventing the upgrade for me.

1 Like