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

Visual studio code plugin #490

Open
basmasking opened this issue Feb 15, 2024 · 0 comments
Open

Visual studio code plugin #490

basmasking opened this issue Feb 15, 2024 · 0 comments
Labels
build Tasks related to development and ci/cd feature New feature or request help wanted Extra attention is needed

Comments

@basmasking
Copy link
Member

We would like to have our own VS code plugin to improve developer experience.

Because we have separated the deployment model from the runtime model, VS code is not able to help the developer to determine if an import will be available at runtime. This depends on the segment configuration.

We would like to have a nice VS code plugin that can read the segment information, and help the developer by highlighting imports that won't work at runtime. When, for example, a certain function is set to private in the segment configuration, then VS code should show a red highlight when a function from another segment wants to import that specific function.

If the configuration looks like below

{
    "./game/checkSecret": {
        "default": {
            "access": "protected"
        }
    },
    "./game/getSecret": {
        "default": {
            "access": "private"
        }
    }
}

We would like to have a red highlight for the following import

// a random function in another segment

import getSecret from '../game/getSecret';

export default randomFunction(secret: number)
{
    return secret === await getSecret();
}
...

But it should not highlight the import for any function that is in the same segment.

// function in the 'game' segment

import getSecret from './getSecret';

export default async function checkSecret(secret: number): Promise<boolean>
{
    return secret === await getSecret();
}

In case of protected access, some sort of warning highlight would be nice. This should help the developer understand that the function is only available from any server that has a trust key configured.

@basmasking basmasking added feature New feature or request help wanted Extra attention is needed build Tasks related to development and ci/cd labels Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Tasks related to development and ci/cd feature New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant