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

fix: add reference to unstable types #279

Merged
merged 2 commits into from
Jun 22, 2023
Merged

fix: add reference to unstable types #279

merged 2 commits into from
Jun 22, 2023

Conversation

smitssjors
Copy link
Contributor

@smitssjors smitssjors commented Jun 21, 2023

As Deno KV is still unstable, its types are not included in deno.ns. This means that when opening the project in VS Code, it does not recognise functions such as Deno.openKv() (regardless whether the "deno.unstable": true VS Code option is set). By referencing deno.unstable we also include these types.

As Deno KV is still unstable, its types are not included in `deno.ns`. This means that when opening the project in VS Code, it does not recognise functions such as `Deno.openKv()`. Thus, by referencing `deno.unstable` we also include these types.
@iuioiua
Copy link
Contributor

iuioiua commented Jun 21, 2023

Thanks, @smitssjors. I don't see the same issue in my VS Code. Can you share exactly where you're seeing this?

@smitssjors
Copy link
Contributor Author

I freshly cloned the project and it is actually not showing up now but I am not sure why.

I first ran into this issue when creating a new fresh project. I figured as SaaSKit also uses KV it had some configuration which fixes it but upon cloning I ran into the same issue. After some looking around I did not find any relevant configuration differences as far as I know.

I also just created a new fresh project and the issue is still there.

This might be some weird stuff with VS and/or the plugin and/or deno lsp so im not sure where to look but adding the reference to the fresh project did fix it.

deno --version

deno 1.34.3 (release, x86_64-apple-darwin)
v8 11.5.150.2
typescript 5.0.4

VS Code

Version: 1.79.2
Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06
Date: 2023-06-14T08:58:52.392Z
Electron: 22.5.7
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin x64 22.5.0

Deno VS Code plugin version 3.19.1

@iuioiua
Copy link
Contributor

iuioiua commented Jun 22, 2023

How about we instead add "deno.unstable": true to .vscode/settings.json? That should be there anyway. We can revisit this if someone comes across this issue in the future.

@smitssjors
Copy link
Contributor Author

I checked in a new GitHub Codespace and the issue exists there too.
But the fact that you can use the unstable APIs without error even though it is not mentioned anywhere is probably a bug.

As this is not the place to discuss or fix it I'll close the PR and open an issue in the repo for the extension.

You can set "deno.unstable": true but for me it did not make a difference.

@iuioiua
Copy link
Contributor

iuioiua commented Jun 22, 2023

Actually, you were right. Let's add this in.

Ref: denoland/deno#19035 (comment)

@iuioiua iuioiua reopened this Jun 22, 2023
@iuioiua iuioiua changed the title Add reference to the unstable types fix: add reference to unstable types Jun 22, 2023
Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you.

@iuioiua iuioiua merged commit e8282b7 into denoland:main Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants