Develop - #4
Merged
Merged
Conversation
Added the <Configurations> property to ConsolePlusFeaturesSamples.csproj, ConsolePlus.csproj, and ConsolePlus.Tests.csproj to specify Debug, Release, and ReleaseDoc build configurations.
…t; audit and correct docs Three real bugs found during a docs audit: - ConsolePlusExtends.ClearLine recursed into itself with no base case, causing a StackOverflowException on any call. - AnsiConsoleAdapter/NoAnsiConsoleAdapter's HideCursor/ShowCursor always returned a fixed value regardless of whether the native call succeeded, contradicting their own documented contract; NoAnsiConsoleAdapter's HideCursor was also missing a catch clause ShowCursor already had. - The two repos' physically-duplicated test driver sources had drifted (3 of 8 files); re-synced from PromptPlus's copy. Removed IProfileSetup, a public interface with zero implementers or callers that contradicted the profile-immutability decision; the real override path (ConsoleProfile.json, read before any caching) already covered everything it promised and is now documented. Fixed the ReleaseDoc build configuration, which had never actually been wired to the DefaultDocumentation generator (still gated on Release). Corrected the rest of the docs audit catalog: wrong method names/arity, missing constructor parameters, incorrect Color casing, a fictional Emoji API model, a mostly-wrong markup error-handling table, a fabricated ANSICON injection mechanism (also in ADR0005), and several smaller behavioral gaps across reading-input/markup/widgets/advanced-api. Consolidated ADR0005, and two new ADRs for the IProfileSetup removal and ReleaseDoc fix, as revisions of the existing ADR0005/ADR0002/ADR0015 records rather than new sequence numbers, per project policy.
Console.CursorVisible throws IOException ("The handle is invalid")
when no real console is attached (headless processes, some test
hosts) rather than PlatformNotSupportedException, so the earlier
success/failure fix didn't cover it. Broadened the catch on both
adapters to match the "Safe" pattern EnvironmentUtil already uses for
the same class of failure.
This was blocking ConsolePlusExtends.* from being unit-tested at all,
since touching any of its methods forces the ConsolePlus singleton to
construct a real console adapter. Restores the ClearLine regression
test that previously crashed the whole run.
ConsolePlusExtendsTests forces ConsolePlusLibrary.ConsolePlus's real static ctor to run, which populates BaseClassCI's process-wide environment-variable cache via EnrichersCI(). ProfileExtensionsTests manages that same cache by hand (reflection reset per test) to simulate CI providers in isolation, which only worked because nothing else touched it. With xUnit parallelizing different test classes by default, the two could race, intermittently stomping the simulated env-var snapshot with a real one (seen on a macOS CI run: TF_BUILD detection failed because ChangedColorDepth came back false). Added GlobalStateCollection (DisableParallelization) and put both classes in it, matching PromptPlus's SerializedGlobalStateCollection pattern for the same class of shared-static-state risk.
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.
This pull request updates several ADR (Architecture Decision Record) documents and the advanced API documentation to reflect recent implementation and documentation audits. The main changes include corrections and clarifications to previous ADRs, removal of outdated or incorrect information, and improvements to the advanced API documentation to match the current codebase.
ADR document updates and corrections:
docs/adr/README.md) to reference new revision numbers and corrected titles for ADR0002, ADR0005, and ADR0015. [1] [2]ConsoleProfile.json), removes a dead API (IProfileSetup) that contradicted the ADR, and clarifies that the only supported override is via a JSON file at startup. [1] [2] [3] [4]ReleaseDocbuild configuration (notRelease), and updates the build/project file conditions accordingly. [1] [2] [3]Advanced API documentation improvements:
EmacsConsoleBuffernow documents a fourth constructor argument (enableEmacsKeys), and example code is updated to include this parameter. [1] [2]TruncateToDisplayWidth(int maxWidth)andGetRuneWidth()(onRune).These changes ensure the documentation accurately reflects the current implementation, clarifies supported behaviors, and removes outdated or misleading information.