Skip to content

feat(js/ts/python): add missing StringBuilder.Append overloads for numeric types#4568

Merged
dbrattli merged 2 commits into
mainfrom
repo-assist/improve-stringbuilder-append-overloads-5d413da2e18adba0
Apr 27, 2026
Merged

feat(js/ts/python): add missing StringBuilder.Append overloads for numeric types#4568
dbrattli merged 2 commits into
mainfrom
repo-assist/improve-stringbuilder-append-overloads-5d413da2e18adba0

Conversation

@fable-repo-assist
Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Adds missing StringBuilder.Append overloads for numeric types to the TypeScript and Python targets, bringing them to parity with the Rust target (which already had all of these) and .NET's StringBuilder.

Overloads added: int8, byte, int16, uint16, uint32, int64, uint64, float32

Closes #2636

Root cause

The original implementation only included Append(int), Append(float), Append(bool), Append(char), and Append(string). Missing numeric type overloads caused compile errors or fell back to Append(obj) with potential formatting differences.

Changes

  • src/fable-library-ts/System.Text.fs — add 8 numeric overloads
  • src/fable-library-py/fable_library/System.Text.fs — same additions
  • tests/Js/Main/StringTests.fs — new test for numeric overloads
  • tests/Python/TestString.fs — new test for numeric overloads

The Dart and Beam targets share the same System.Text.fs (Dart has its own, and both are equivalent in scope) — they can be updated in a follow-up if needed.

Trade-offs

All new overloads delegate to string<T> conversion, which is consistent with the existing pattern and matches .NET semantics.

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@51c8f6ad4357d2ecc06e47120031b3d75e80227d

@fable-repo-assist fable-repo-assist Bot added automation Automated changes repo-assist Created by Repo Assist labels Apr 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Python Type Checking Results (Pyright)

Metric Value
Total errors 33
Files with errors 4
Excluded files 4
New errors ✅ No
Excluded files with errors (4 files)

These files have known type errors and are excluded from CI. Remove from pyrightconfig.ci.json as errors are fixed.

File Errors Status
temp/tests/Python/test_hash_set.py 18 Excluded
temp/tests/Python/test_applicative.py 12 Excluded
temp/tests/Python/test_nested_and_recursive_pattern.py 2 Excluded
temp/tests/Python/fable_modules/thoth_json_python/encode.py 1 Excluded

@MangelMaxime
Copy link
Copy Markdown
Member

/repo-assist Rebase this PR on the latest version of main branch

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 26, 2026

✓ Repo Assist completed successfully, see workflow run.

@fable-repo-assist
Copy link
Copy Markdown
Contributor Author

Issue created: #4576

Generated by 🌈 Repo Assist, see workflow run. Learn more.

@fable-repo-assist
Copy link
Copy Markdown
Contributor Author


Note

The pull request was not created — a fallback review issue was created instead due to protected file changes: #4576

🤖 Repo Assist here. I've rebased this PR on the latest main branch. The branch is now up to date.

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@51c8f6ad4357d2ecc06e47120031b3d75e80227d

@dbrattli dbrattli changed the title feat: add missing StringBuilder.Append overloads for numeric types feat(js/ts/python): add missing StringBuilder.Append overloads for numeric types Apr 27, 2026
fable-repo-assist Bot and others added 2 commits April 27, 2026 22:38
Add Append overloads for int8, byte, int16, uint16, uint32, int64,
uint64, and float32 to match the full set available in .NET's
StringBuilder. The Rust target already had all these overloads;
this brings TypeScript and Python targets to parity.

Closes #2636

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dbrattli dbrattli force-pushed the repo-assist/improve-stringbuilder-append-overloads-5d413da2e18adba0 branch from fd2ab6e to 7d3128a Compare April 27, 2026 20:39
@dbrattli dbrattli marked this pull request as ready for review April 27, 2026 20:42
@dbrattli dbrattli merged commit b402c30 into main Apr 27, 2026
25 checks passed
@dbrattli dbrattli deleted the repo-assist/improve-stringbuilder-append-overloads-5d413da2e18adba0 branch April 27, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation Automated changes repo-assist Created by Repo Assist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StringBuilder missing some Append overloads

2 participants