Skip to content

Remove the saved Sublime Text session before each Docker run - #309

Merged
deathaxe merged 1 commit into
SublimeText:masterfrom
rchl:docker-clear-saved-session
Oct 29, 2026
Merged

deathaxe merged 1 commit into
SublimeText:masterfrom
rchl:docker-clear-saved-session

Conversation

@rchl

@rchl rchl commented Oct 29, 2026

Copy link
Copy Markdown
Member

Sublime Text is killed after the tests, so the Docker cache volume keeps the session that it last saved, with the views that tests had open at that time. The next run restores those views before the tests start. Tests that expect no open views then fail locally, while they pass on CI, where every run starts without a session.

For example, after a full run of the LSP tests, tests/test_documents.py failed on its own run: the restored testfile.txt view made LSP start sessions for the test configs before the test expected any.

The entrypoint now removes Local/*.sublime_session before each run. With that, a full LSP run followed by test_documents.py on its own passes.

Sublime Text is killed after the tests, so the cache volume keeps the
session that it last saved, with the views that tests had open at that
time. The next run restored those views before the tests started, which
made tests that expect no open views fail locally, while they passed on
CI, where every run starts without a session.
@deathaxe

Copy link
Copy Markdown
Member

Maybe ST should run with hot_exit: false

@rchl

rchl commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Haven't tried but that would possibly mean that:
a) ST asks to safe files before exit
b) I think ST still saves the session and restores it on application opening after a crash (remember that UT doesn't exit application cleanly but kills it)

@deathaxe
deathaxe merged commit 533b582 into SublimeText:master Oct 29, 2026
21 checks passed
@deathaxe

Copy link
Copy Markdown
Member

Not sure about the origin, but it feels a bit hard to just kill the app

@rchl
rchl deleted the docker-clear-saved-session branch October 29, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants