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]: Signature help not provided client resource access action #38755

Closed
IMS94 opened this issue Nov 21, 2022 · 2 comments
Closed

[Bug]: Signature help not provided client resource access action #38755

IMS94 opened this issue Nov 21, 2022 · 2 comments
Labels
Area/SignatureHelp Issues related to Language Server Signature Help implementation Reason/Other None of the other reasons. Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug

Comments

@IMS94
Copy link
Contributor

IMS94 commented Nov 21, 2022

Description

I have the following client:

import ballerina/http;

public isolated client class Client {
    final http:Client clientEp;
    # Gets invoked to initialize the `connector`.
    #
    # + config - The configurations to be used when initializing the `connector` 
    # + serviceUrl - URL of the target service 
    # + return - An error if connector initialization failed 
    public isolated function init(string serviceUrl, ConnectionConfig config =  {}) returns error? {
        http:ClientConfiguration httpClientConfig = {httpVersion: config.httpVersion, timeout: config.timeout, forwarded: config.forwarded, poolConfig: config.poolConfig, compression: config.compression, circuitBreaker: config.circuitBreaker, retryConfig: config.retryConfig, validation: config.validation};
        do {
            if config.http1Settings is ClientHttp1Settings {
                ClientHttp1Settings settings = check config.http1Settings.ensureType(ClientHttp1Settings);
                httpClientConfig.http1Settings = {...settings};
            }
            if config.http2Settings is http:ClientHttp2Settings {
                httpClientConfig.http2Settings = check config.http2Settings.ensureType(http:ClientHttp2Settings);
            }
            if config.cache is http:CacheConfig {
                httpClientConfig.cache = check config.cache.ensureType(http:CacheConfig);
            }
            if config.responseLimits is http:ResponseLimitConfigs {
                httpClientConfig.responseLimits = check config.responseLimits.ensureType(http:ResponseLimitConfigs);
            }
            if config.secureSocket is http:ClientSecureSocket {
                httpClientConfig.secureSocket = check config.secureSocket.ensureType(http:ClientSecureSocket);
            }
            if config.proxy is http:ProxyConfig {
                httpClientConfig.proxy = check config.proxy.ensureType(http:ProxyConfig);
            }
        }
        http:Client httpEp = check new (serviceUrl, httpClientConfig);
        self.clientEp = httpEp;
        return;
    }
    # Get total sales
    #
    # + year - Query param to specify the year   
    # + quarter - Optional query param quarter 
    # + return - Ok 
    resource isolated function get .(int year, string? quarter = ()) returns Sales[]|error {
        string resourcePath = string `/`;
        map<anydata> queryParam = {"year": year, "quarter": quarter};
        resourcePath = resourcePath + check getPathForQueryParam(queryParam);
        Sales[] response = check self.clientEp->get(resourcePath);
        return response;
    }
}

and I try to use it as:

 sales:Client salesClient = check new("http://localhost:8080/sales");
 salesClient->/(<cursor>)

At cursor, I don't get the signature help for it's parameters

Steps to Reproduce

See description

Affected Version(s)

2201.3.0-rc2

OS, DB, other environment details and versions

No response

Related area

-> Editor

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@IMS94 IMS94 added Type/Bug Team/LanguageServer Language Server Implementation related issues. #Compiler Area/SignatureHelp Issues related to Language Server Signature Help implementation labels Nov 21, 2022
@malinthar
Copy link
Contributor

Closing as fixed
image

@github-actions
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.

@IMS94 IMS94 added the Reason/Other None of the other reasons. label May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/SignatureHelp Issues related to Language Server Signature Help implementation Reason/Other None of the other reasons. Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug
Projects
None yet
Development

No branches or pull requests

2 participants