Skip to content

[codegen 1.5] Fix handling of Functions as Top in the presence of Procs#3696

Closed
copybara-service[bot] wants to merge 1 commit intomainfrom
test_857274640
Closed

[codegen 1.5] Fix handling of Functions as Top in the presence of Procs#3696
copybara-service[bot] wants to merge 1 commit intomainfrom
test_857274640

Conversation

@copybara-service
Copy link

[codegen 1.5] Fix handling of Functions as Top in the presence of Procs

This fixes an issue where if the top block of a package was a function, but there were procs present in the package using global channels, the global channel stitching pass would accidentally displace the function while creating the stitching block.

The ScheduledBlockConversionPass is also updated to apply the module_name from CodegenOptions to the converted block when the top is a function, ensuring that we have the correct block name.

We found this while fixing issues in the BlockConversionPassPipeline tests that were causing certain tests to use Codegen 1.0 rather than Codegen 1.5.

This fixes an issue where if the top block of a package was a function, but there were procs present in the package using global channels, the global channel stitching pass would accidentally displace the function while creating the stitching block.

The `ScheduledBlockConversionPass` is also updated to apply the `module_name` from `CodegenOptions` to the converted block when the top is a function, ensuring that we have the correct block name.

We found this while fixing issues in the BlockConversionPassPipeline tests that were causing certain tests to use Codegen 1.0 rather than Codegen 1.5.

PiperOrigin-RevId: 857274640
@copybara-service copybara-service bot closed this Feb 2, 2026
@copybara-service copybara-service bot deleted the test_857274640 branch February 2, 2026 15:18
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