Skip to content

Various bug fixes#32

Merged
wallstop merged 5 commits intomasterfrom
dev/wallstop/fix-dll-issues
Mar 11, 2026
Merged

Various bug fixes#32
wallstop merged 5 commits intomasterfrom
dev/wallstop/fix-dll-issues

Conversation

@wallstop
Copy link
Copy Markdown
Owner

✓ Fix Systems.Immutable cascading dependency issue
✓ Fix clear-history adding itself to history
✓ Fix extraneous warnings

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates DxCommandTerminal to support per-command opt-out from history recording, fixes default-command registration behavior when ignoreDefaultCommands is enabled, and removes the bundled System.Collections.Immutable DLL by replacing immutable sets with an internal read-only hash set wrapper.

Changes:

  • Add RegisterCommandAttribute.AddToHistory / CommandInfo.addToHistory / CommandShell.AddCommand(..., addToHistory) and stop recording clear-history in history.
  • Replace ImmutableHashSet<string> usages with ReadOnlyHashSet<string> and remove the bundled System.Collections.Immutable plugin assets.
  • Add/expand runtime tests covering argument parsing, history behavior, keyboard controller control-order integrity checks, and ignoreDefaultCommands.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Tests/Runtime/TryEatArgumentTests.cs (+.meta) New tests validating CommandShell.TryEatArgument parsing and remainder behavior.
Tests/Runtime/TerminalTests.cs Strengthens assertions and adds coverage for ignoreDefaultCommands behavior.
Tests/Runtime/TerminalKeyboardControllerTests.cs (+.meta) New tests validating control-order integrity warnings via reflection.
Tests/Runtime/CommandShellTests.cs Improves assertion messages (no functional behavior change).
Tests/Runtime/CommandHistoryTests.cs (+.meta) New unit/integration tests for CommandHistory.Count, Clear(), and clear-history behavior.
Runtime/DataStructures/ReadOnlyHashSet.cs (+.meta) Introduces ReadOnlyHashSet<T> wrapper used to replace immutables dependency.
Runtime/DataStructures/ReadOnlyHashSetExtensions.cs (+.meta) Adds ToReadOnlyHashSet helper for snapshot creation.
Runtime/CommandTerminal/Input/TerminalKeyboardController.cs Adjusts integrity check to warn only on missing control types (not duplicates).
Runtime/CommandTerminal/Backend/CommandShell.cs Wires AddToHistory into command registration and (partially) into history recording.
Runtime/CommandTerminal/Backend/CommandInfo.cs Adds addToHistory field with default true.
Runtime/CommandTerminal/Backend/CommandHistory.cs Adds Count property delegating to the underlying buffer.
Runtime/CommandTerminal/Backend/BuiltinCommands.cs Marks clear-history as AddToHistory = false.
Runtime/Attributes/RegisterCommandAttribute.cs Adds AddToHistory and fixes Default propagation in the internal ctor.
Runtime/Plugins.meta / Runtime/Plugins/System.Collections.Immutable.dll.meta Removes Unity plugin metadata for the bundled Immutable DLL.
package.json Bumps package version to 1.0.0-rc25.0.
CHANGELOG.md Converts to Keep a Changelog format and documents the new behavior/removals.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Runtime/CommandTerminal/Backend/CommandShell.cs
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 23 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CHANGELOG.md
Comment thread Tests/Runtime/TerminalTests.cs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 25 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread Runtime/AssemblyInfo.cs.meta Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 25 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread Runtime/AssemblyInfo.cs
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 25 out of 26 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

Runtime/CommandTerminal/Input/TerminalKeyboardController.cs:155

  • VerifyControlOrderIntegrity now only warns when controls are missing, but it no longer warns when _controlOrder contains entries that are not in ControlTypes (e.g., TerminalControlTypes.None or any out-of-range serialized enum value). Those extra entries will be silently ignored in Update() (no _inputChecks mapping), which makes inspector misconfiguration harder to detect. Consider also detecting extraControls = _controlOrder.Except(ControlTypes) and warning (or reverting to a SetEquals-style check but with clearer messaging for both missing and extra controls).
        private void VerifyControlOrderIntegrity()
        {
            TerminalControlTypes[] missingControls = ControlTypes.Except(_controlOrder).ToArray();
            if (missingControls.Length > 0)
            {
                Debug.LogWarning(
                    $"Control Order is missing the following controls: [{string.Join(", ", missingControls)}]. "
                        + "Input for these will not be handled. Is this intentional?",
                    this
                );
            }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@wallstop wallstop merged commit 95fa7c2 into master Mar 11, 2026
4 checks passed
@wallstop wallstop deleted the dev/wallstop/fix-dll-issues branch March 12, 2026 15:16
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