Skip to content

Expose custom runtime configuration in settings UI#15

Open
Alexanderbtw wants to merge 1 commit into
JetBrains:mainfrom
Alexanderbtw:feature/custom-runtime
Open

Expose custom runtime configuration in settings UI#15
Alexanderbtw wants to merge 1 commit into
JetBrains:mainfrom
Alexanderbtw:feature/custom-runtime

Conversation

@Alexanderbtw
Copy link
Copy Markdown

No description provided.

@smolchanovsky smolchanovsky self-requested a review May 18, 2026 10:43
@smolchanovsky
Copy link
Copy Markdown
Member

smolchanovsky commented May 18, 2026

Hey @Alexanderbtw, thanks for the contribution, the PR looks great! I have a couple of minor notes that I'll add shortly, then we should be good to merge

Copy link
Copy Markdown
Member

@smolchanovsky smolchanovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth knowing: a CoreCLR build can contain multiple JIT variants (clrjit_universal_arm64_x64.dll, clrjit_win_x86_x64.dll, etc) for targeting different architectures, but currently users can only use the default clrjit.dll. Would be a nice follow-up PR if you're interested :)

val runAppMode: Boolean get() = runAppModeCheckbox.isSelected
val disassemblyTimeoutSeconds: Int get() = timeoutSpinner.value as Int
val useCustomRuntime: Boolean get() = useCustomRuntimeCheckbox.isSelected
val pathToLocalCoreClr: String? get() = pathField.text.takeIf { it.isNotBlank() && useCustomRuntime }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to add a validation to warn the user when "Use Custom Runtime" is checked but the path is empty - otherwise they only find out something's wrong when the disassembler actually runs

.addLabeledComponent(AsmViewerBundle.message("runtime.timeout.label"), timeoutSpinner.withHelp(timeoutHelp))
.addVerticalGap(10)
.addComponent(useCustomRuntimeCheckbox.withHelp(customRuntimeHelp))
.addLabeledComponent(AsmViewerBundle.message("runtime.custom.runtime.path.label"), pathField)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path field stretches to fill the full dialog width as the window resizes - could you constrain its width?

.addComponent(runAppModeCheckbox.withHelp(runAppModeHelp))
.addLabeledComponent(AsmViewerBundle.message("runtime.timeout.label"), timeoutSpinner.withHelp(timeoutHelp))
.addVerticalGap(10)
.addComponent(useCustomRuntimeCheckbox.withHelp(customRuntimeHelp))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path field below is visually at the same level as the checkbox, making it hard to tell they're related. Would be nice to indent it slightly to show the dependency - same way noRestoreCheckbox is indented under the build radio buttons

runtime.custom.runtime=Use Custom Runtime (local dotnet/runtime build)
runtime.custom.runtime.help=Use a locally built dotnet/runtime repo instead of the system .NET SDK. Requires .NET 7+ target framework.
runtime.custom.runtime.path.label=Path to dotnet/runtime:
runtime.custom.runtime.path.placeholder=e.g. C:\dotnet\runtime
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This key doesn't seem to be used anywhere


public class JitPathUtils
{
private static string OsPrefix =>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this is a computed property so it calls RuntimeInformation.IsOSPlatform on every access - static readonly field might be more appropriate here

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