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

Add parsing of docstring (args, return) to VSCode extension #2514

Open
tedim52 opened this issue Jul 9, 2024 · 0 comments
Open

Add parsing of docstring (args, return) to VSCode extension #2514

tedim52 opened this issue Jul 9, 2024 · 0 comments
Labels
feature request painful Painful bug sdk for bugs/FRs relating to our SDK

Comments

@tedim52
Copy link
Contributor

tedim52 commented Jul 9, 2024

Background & motivation

When writing Starlark, I have to go to the github repo of a package I'm importing to know what I can pass into it and what it returns. eg.

postgres = import_module("github.com/kurtosis-tech/postgres-package/main.star")
grafana = import_module("./grafana-package/main.star")

def run(plan, args):
    postgres_service = postgres.run(plan)

    db = {
        "URL": postgres_service. <---- now I need to go to github to see if postgres package returns some URL info on the `postgres_service`
    }
    grafana.run(plan, 
    postgres_database=[db])

Desired behaviour

It would be great if the vscode extension could parse the (args, return) of a package via its docstring (eg. the postgres package

postgres = import_module("github.com/kurtosis-tech/postgres-package/main.star")
grafana = import_module("./grafana-package/main.star")

def run(plan, args):
    postgres_service = postgres.run(plan, <-- insert autocomplete to fill in all the args that need to be populated)

    db = {
        "URL": postgres_service. <--- insert VSCode intellisense drop down allowing me to select what fields to take
    }
    grafana.run(plan, 
    postgres_database=[db])

How important is this to you?

Painful; the lack of this feature makes using Kurtosis frictionful.

What area of the product does this pertain to?

SDK: the Software Development Kit libraries - Typescript, Go, etc.

@github-actions github-actions bot added painful Painful bug sdk for bugs/FRs relating to our SDK labels Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request painful Painful bug sdk for bugs/FRs relating to our SDK
Projects
None yet
Development

No branches or pull requests

1 participant