Repository navigation
Separate Studio instance per --oneware-appdata-dir - #423
Merged
Merged
Conversation
A Studio started with its own application data directory (e.g. a portable copy) now uses its own single-instance lock and IPC channel, so it neither forwards its launch to nor receives requests from the default instance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
StudioInstanceChannel.Defaultnow depends onONEWARE_APPDATA_DIR. When Studio is started with--oneware-appdata-dir, the lock file, named pipe and Unix socket get a short SHA-256 suffix of the normalized directory path. Without the option, the names are unchanged.StudioInstanceChannel.ForAppDataDirectory(string?).Programcreates the channel lazily, after the startup arguments were applied (it was a static field initialized before parsing).OneWareCloudCliModule,StudioProcessController) pick up the same channel throughDefault.Why
Portable copies of Studio (for example ONE AI's "Export as portable app") start with their own data and appdata directories. Until now they forwarded their launch to an already running normal Studio, which opened the request with the wrong settings and packages.
Validation
dotnet test tests/OneWare.Essentials.UnitTests --filter StudioInstanceChannel: 15 passed (3 new tests).dotnet build studio/OneWare.Studio.Desktop: 0 errors.