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]: Deprecated notation does not work correctly with resource functions #5831

Closed
chalindukodikara opened this issue Nov 28, 2023 · 2 comments
Labels
module/http Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Type/Bug

Comments

@chalindukodikara
Copy link

chalindukodikara commented Nov 28, 2023

Description

The deprecated notation produces an error for a resource function. Ballerina version = 2201.8.0

image

image

Steps to Reproduce

Repository where the error occurred.
https://github.com/wso2-enterprise/choreo-cp-configuration-service

Affected Version(s)

No response

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

Team/CompilerFE

Suggested assignee(s) (optional)

No response

@chalindukodikara chalindukodikara changed the title [Bug]: Deprecated notation does not function correctly with resource functions [Bug]: Deprecated notation does not work correctly with resource functions Nov 28, 2023
@MaryamZi MaryamZi transferred this issue from ballerina-platform/ballerina-lang Nov 28, 2023
@nipunayf
Copy link

The above problem can be reproduced with the following simple code.

import ballerina/http;

service on new http:Listener(8080) {

    @deprecated
    resource function accessor path() {
        
    }
}

It generates the error invalid resource method annotation type: expected http:ResourceConfig, but found deprecated for the ballerina/http, and the error is specific to this module. The error cannot be reproduced with the ballerina/udp module.

@TharmiganK
Copy link
Contributor

This should be fixed by removing the restriction in the resource level annotations

@TharmiganK TharmiganK added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/http Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Type/Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants