ballerina-lang
ballerina-lang copied to clipboard
Add chain invocation for `$moduleInit()`, `$moduleStart()`, and `$configureInit()` methods
Purpose
During the codegen phase we generate a set of functions for initializing modules and their ballerina constructs. As of now, these initializations are done using a flattened dependency list for each ballerina module.
Fixes #42367
Approach
Changed the $moduleInit()
and $moduleStart()
BIRFunction generation boilerplate to generate a invocations of $moduleInit()
functions instead of <.init>()
functions. The new method generation will be as follows,
Did the same change for generated $configureInit()
methods inside $configurationMapper
class.
Samples
Full change samples can be found in this document.
Previous | New |
---|---|
Remarks
List any other known issues, related PRs, TODO items, or any other notes related to the PR.
Check List
- [x] Read the Contributing Guide
- [ ] Updated Change Log
- [ ] Checked Tooling Support (#<Issue Number>)
- [ ] Added necessary tests
- [ ] Unit Tests
- [ ] Spec Conformance Tests
- [ ] Integration Tests
- [ ] Ballerina By Example Tests
- [ ] Increased Test Coverage
- [ ] Added necessary documentation
- [ ] API documentation
- [ ] Module documentation in Module.md files
- [ ] Ballerina By Examples