Skip to content

[Proc testing] Transform function-based proc tests into test procs in - #4874

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_972724962
Sep 8, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_972724962

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

[Proc testing] Transform function-based proc tests into test procs in
ParseAndTypecheckModule so they can be executed by the test runner.
This was done by serializing the transformed module to a string and
sending it back through parsing & typechecking.

In addition, this CL:

  • Preserves the lifetime of the original module in the TypeInfo cache,
    preventing heap-use-after-free crashes. Ideally, we'd completely
    remove all remnants of the old Module from TypeInfo, but
    this turned out to be nigh infeasible, after multiple attempts.
  • Skips compiler-derived functions in Impl::ToString() to avoid
    serialization errors during re-parsing. This was causing trait methods
    (e.g., spawn), which do not have bodies, to show up in the
    ToString output. These trait methods weren't parseable so now they're
    skipped.

@copybara-service copybara-service Bot changed the title [Proc testing] Call TestFunctionTransformer from [Proc testing] Transform function-based proc tests into test procs in Sep 8, 2026
`ParseAndTypecheckModule` so they can be executed by the test runner.
This was done by serializing the transformed module to a string and
sending it back through parsing & typechecking.

In addition, this CL:
- Preserves the lifetime of the original module in the `TypeInfo` cache,
  preventing heap-use-after-free crashes. Ideally, we'd completely
  remove all remnants of the old `Module` from `TypeInfo`, but
  this turned out to be nigh infeasible, after multiple attempts.
- Skips compiler-derived functions in `Impl::ToString()` to avoid
  serialization errors during re-parsing. This was causing trait methods
  (e.g., `spawn`), which do not have bodies, to show up in the
  `ToString` output. These trait methods weren't parseable so now they're
  skipped.

PiperOrigin-RevId: 978150035
@copybara-service
copybara-service Bot merged commit 13cbabb into main Sep 8, 2026
7 checks passed
@copybara-service
copybara-service Bot deleted the test_972724962 branch September 8, 2026 22:41

This branch was previously deployed

1 inactive deployment
github-pages — 13cbabb6 Deployed Sep 8, 2026 by copybara-service[bot] via deploy #12696
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.

1 participant