When the ballerinax/mi is imported the connector for MI should be generated only when the bal tool mi command is run. But even when the bal run command is invoked in a project where the ballerinax/mi is imported this generates the zip file.
Steps to Reproduce
Create a ballerina project
Add the following content to a ballerina file.
import ballerinax/mi;
@mi:ConnectorInfo
public function calculateTotal(xml invoice) returns xml {
xml prices = invoice/**/;
int total = from xml:Element element in prices
let int|error price = int:fromString(element.data())
where price is int
collect sum(price);
return xml <total>${total}</total>;
}
3. Run the `bal run` command.
This would generate the zip file.
### Version
v0.1.2
### Environment Details (with versions)
_No response_
Description
When the
ballerinax/mi
is imported the connector for MI should be generated only when thebal tool mi
command is run. But even when thebal run
command is invoked in a project where theballerinax/mi
is imported this generates the zip file.Steps to Reproduce
@mi:ConnectorInfo public function calculateTotal(xml invoice) returns xml { xml prices = invoice/**/;
int total = from xml:Element element in prices
let int|error price = int:fromString(element.data())
where price is int
collect sum(price);
return xml
<total>${total}</total>
; }