Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Can't provide a value to a configurable variable via the CLI when there are other configurable variables for which values cannot be provided via the CLI #42859

Open
MaryamZi opened this issue Jun 5, 2024 · 0 comments · May be fixed by #42978
Assignees
Labels
Area/Configurable Runtime configurable related issues Priority/High Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Bug

Comments

@MaryamZi
Copy link
Member

MaryamZi commented Jun 5, 2024

Description

$title.

Also, why can't we provide a value for variables of types like int? via the CLI? Here, we surely can support at least int values, even if we don't support nil?

Steps to Reproduce

import ballerina/io;

configurable int v1 = 1;
configurable int? v2 = ();

public function main() {
    io:println(v1);
    io:println(v2);
}
$ bal run test.bal -- -Cv1=1 
Compiling source
        test.bal

Running executable

error: value for configurable variable 'v2' with type 'int?' is not supported as a command line argument
        at .:0.0.0(test.bal:4)

Affected Version(s)

2201.9.0

OS, DB, other environment details and versions

No response

Related area

-> Runtime

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@MaryamZi MaryamZi added Type/Bug Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Area/Configurable Runtime configurable related issues Priority/High labels Jun 5, 2024
MaryamZi added a commit to MaryamZi/ballerina-sync-samples that referenced this issue Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Configurable Runtime configurable related issues Priority/High Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Bug
Projects
Status: PR Sent
2 participants