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]: Fail to capture the preceding part of the backslash in resource functions #41878

Closed
Nuvindu opened this issue Dec 14, 2023 · 2 comments · Fixed by #41885
Closed

[Bug]: Fail to capture the preceding part of the backslash in resource functions #41878

Nuvindu opened this issue Dec 14, 2023 · 2 comments · Fixed by #41885
Assignees
Labels
Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Bug
Milestone

Comments

@Nuvindu
Copy link
Contributor

Nuvindu commented Dec 14, 2023

Description

When using resource methods in Ballerina services, it seems that the preceding part of the backslash in the resource path is not being properly captured.

Steps to Reproduce

Run the following code.

public client class Client {

    resource function get v1\.2/greeting() returns string {
        return "Hello World!";
    }
}

public function main() {
    Client clientEP = new;
    string greeting = clientEP->/v1\.2/greeting;
    io:println(greeting);
}

The error output as follows

error: No such method: 1$accounts$^$users$^$signatures
        at nuvindu.docuSign.0:main(main.bal:9)
@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Dec 14, 2023
@LakshanWeerasinghe LakshanWeerasinghe added Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. and removed needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Dec 14, 2023
@LakshanWeerasinghe
Copy link
Contributor

For now you can have a work around for this,

  resource function get ["v1.2"]/greeting() returns string {
        return "Hello World!";
    }

@LakshanWeerasinghe LakshanWeerasinghe added Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime and removed Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels Dec 14, 2023
@LakshanWeerasinghe LakshanWeerasinghe self-assigned this Dec 14, 2023
Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

@LakshanWeerasinghe LakshanWeerasinghe added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Jan 19, 2024
@LakshanWeerasinghe LakshanWeerasinghe added this to the 2201.9.0 milestone Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants