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

DisposableStack is not implemented #20821

Open
sigmaSd opened this issue Oct 7, 2023 · 6 comments · May be fixed by #28119
Open

DisposableStack is not implemented #20821

sigmaSd opened this issue Oct 7, 2023 · 6 comments · May be fixed by #28119
Labels
bug Something isn't working correctly upstream Changes in upstream are required to solve these issues

Comments

@sigmaSd
Copy link
Contributor

sigmaSd commented Oct 7, 2023

The types are there, but it fails at runtime

interface DisposableStack {

@lucacasonato lucacasonato added feat new feature (which has been agreed to/accepted) upstream Changes in upstream are required to solve these issues labels Oct 9, 2023
@jsejcksn
Copy link
Contributor

jsejcksn commented Jan 25, 2024

Also for AsyncDisposableStack.

@lucacasonato Shouldn't situations like this — where compiling (type-checking) succeeds, but the compiled JavaScript result fails at runtime — be labelled as bug Something isn't working correctly ?

@NfNitLoop
Copy link

NfNitLoop commented Feb 21, 2024

This bug is still present in Deno v1.40.5.

And I agree, this seems like a bug. The VSCode extension and deno check don't give any error about using DisposableStack even though it's not implemented and not even a valid identifier in scope.

@lambdalisue
Copy link

lambdalisue commented Mar 5, 2024

Just fyi. I'm using the following polyfill and it seems working OK. (thanks to https://deno.land/x/dispose)

import {
  AsyncDisposableStack,
  DisposableStack,
} from "https://deno.land/x/dispose@1.0.1/mod.ts";

// DisposableStack and AsyncDisposableStack are not available yet.
// https://github.com/denoland/deno/issues/20821

// deno-lint-ignore no-explicit-any
(globalThis as any).DisposableStack ??= DisposableStack;
// deno-lint-ignore no-explicit-any
(globalThis as any).AsyncDisposableStack ??= AsyncDisposableStack;

lambdalisue added a commit to vim-fall/fall.vim that referenced this issue Mar 7, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
darrachequesne Damien Arrachequesne
DisposableStack and AsyncDisposableStack are available on types but
actually not available yet.

denoland/deno#20821
@ben-laird
Copy link

Bumping this. This issue is present on the latest canary version as of writing.

My deno --version:

deno 1.43.2+19c0633 (canary, aarch64-apple-darwin)
v8 12.4.254.12
typescript 5.4.5

@bartlomieju bartlomieju added bug Something isn't working correctly and removed feat new feature (which has been agreed to/accepted) labels May 9, 2024
@bartlomieju
Copy link
Member

There's been some movement on this one in the past weeks in V8: https://issues.chromium.org/issues/42203506

We will update to the version that implements DisposableStack as soon as possible.

@pmunin
Copy link

pmunin commented Feb 16, 2025

Feb 2025 the issue is still there. Even with included libs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly upstream Changes in upstream are required to solve these issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants