[Repo Assist] fix: re-enable ImplementInterface tests by trimming FCS trailing whitespace#1505
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
…espace FCS (since 43.7.200) emits trailing spaces on lines ending with '=' before a line break in generated interface stubs. This caused all ImplementInterface tests to fail, so the entire test suite was wrapped in ptestList (pending/skipped). Fix: post-process the generated stub from FormatInterface to trim trailing whitespace on each line. Re-enable tests: change ptestList to testList so the 40 previously- skipped tests now run and pass. Two remaining pending tests: - 'cursor position' sub-list (still uses the disabled without-type- annotation fix path, pending FCS #14698) - 'can implement setter when existing getter' (FCS 43.10.x does not detect inline getter 'member _.X with get () = val' as already implemented, causing both getter and setter to be regenerated; marked ptestCaseAsync pending investigation) Partially addresses #1054. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
20 tasks
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 is an automated pull request from Repo Assist.
Partially addresses #1054.
Problem
Since FCS 43.7.200,
InterfaceStubGenerator.FormatInterfaceemits trailing spaces on lines ending with=when followed by a line break (e.g. multiline method stubs). This caused all 40ImplementInterfacetests to fail, so the entire test suite was wrapped inptestList(skipped) with a comment pointing to the FCS version.Fix
Post-process the stub generated by
FormatInterfaceto trim trailing whitespace on each line before inserting it into the document:Build: ✅
dotnet build— 0 warnings, 0 errorsTests: ✅ 40/40 active tests pass
Format: ✅
dotnet fantomasapplied