Skip to content

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
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