Skip to content

[codex] fix Buffer deprecations#393

Merged
bobzhang merged 1 commit into
mainfrom
codex/fix-buffer-deprecations
May 27, 2026
Merged

[codex] fix Buffer deprecations#393
bobzhang merged 1 commit into
mainfrom
codex/fix-buffer-deprecations

Conversation

@bobzhang

Copy link
Copy Markdown
Contributor

Summary

Replace the deprecated @buffer.new() constructor with Buffer().

This PR is intentionally scoped to Buffer deprecations only, split out from #392.

Changed files

  • src/fs/tmpdir.mbt
  • src/http/send.mbt
  • examples/tcp_server_benchmark/main.mbt

Validation

  • moon check --deny-warn
  • moon check --target js --deny-warn
  • moon check examples/tcp_server_benchmark --deny-warn
  • git diff --check

Known follow-up

  • moon test src/fs src/http still hits the existing cold-build src/fs/lock_test.mbt race from [codex] fix MoonBit deprecations #392; I left that out of this PR to keep this split focused on Buffer only.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 357

Coverage increased (+0.03%) to 79.379%

Details

  • Coverage increased (+0.03%) from the base build.
  • Patch coverage: 1 of 1 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4190
Covered Lines: 3326
Line Coverage: 79.38%
Coverage Strength: 80304.02 hits per line

💛 - Coveralls

@bobzhang bobzhang marked this pull request as ready for review May 27, 2026 13:07

Copy link
Copy Markdown
Contributor Author

Split/CI status for this Buffer-only PR:

  • Scope is intentionally limited to @buffer.new() -> Buffer() replacements: 3 one-line changes.
  • Local validation passed:
    • moon check --deny-warn
    • moon check --target js --deny-warn
    • moon check examples/tcp_server_benchmark --deny-warn
    • git diff --check
  • GitHub Actions: all build/test/coverage/sanitizer jobs passed. The remaining red checks are repo-wide toolchain drift that I kept out of this PR to preserve the split:
    • moon-format wants broad formatter updates plus moon.mod.json -> moon.mod migration.
    • moon-info wants generated .mbti signature syntax updates.

I will handle those as a separate split instead of folding them into this Buffer-only PR.

@bobzhang bobzhang merged commit d9a8e20 into main May 27, 2026
15 of 17 checks passed
@bobzhang bobzhang deleted the codex/fix-buffer-deprecations branch May 27, 2026 13:08
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