sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Destructuring a possibly `undefined` object not caught, throws an error at runtime
Labels: Bug,Help Wanted

### 🔎 Search Terms

`destructuring`, `Cannot destructure as it is undefined`, `optional chaining destructuring`

### 🕗 Version & Regression Information

- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______


### ⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.6.2#code/MYewdgzgLgBAlmADgVygLhgbwLACgYEwCGA-BpjAEZlYzAbQBOCA5jAL4d6cC8tRGZGAAmAUwBmCUcK648oSLAoA6VZQ4w+CFFGWlllIA

### 💻 Code

```ts
const input: {
    a?: { b?: { c: string } }
} = { a: undefined }

const { ...b } = input.a?.b
```


### 🙁 Actual behavior

No error reported by TypeScript.

### 🙂 Expected behavior

TypeScript should have an indicative error, since this expression might result in `undefined`, which cannot be destructured.

Similar to this:
![Image](https://github.com/user-attachments/assets/fc4e6236-ab48-4a89-ba76-3d4728dbf327)

> Rest types may only be created from object types.(2700)

### Additional information about the issue

The error in the JavaScript being ran is:
> Uncaught TypeError: Cannot destructure '(intermediate value)' as it is undefined.
Repository: neovim
Issue: I have to manual `:redraw!` to make `nvim_set_decoration_provider` work
Labels: bug,display,marks

### Problem

Somehow I want to show something on the top right of current window, source the code:
```lua
local ns_id = vim.api.nvim_create_namespace("floating_text")

vim.api.nvim_set_decoration_provider(ns_id, {
    on_win = function(_, winid, bufnr, top_row, bot_row)
        local virt_text = "I want to show something"

        vim.api.nvim_buf_set_extmark(bufnr, ns_id, top_row, 0, {
            virt_text = {{virt_text, "Error"}},
            virt_text_pos = "right_align",
            ephemeral = true,
        })
    end,
})
```

The problem is, the virt_text was not showed at the window's top right as I expected. It's not show, or show many the same line in different line.

but`CTRL-L` or `:redraw!` or `mode` will make the thing right.

![Image](https://github.com/user-attachments/assets/54a35a13-df4a-4387-ae17-d7cad52f3977)


### Steps to reproduce

nvim -u NONE
put the lines:
```lua
local ns_id = vim.api.nvim_create_namespace("floating_text")

vim.api.nvim_set_decoration_provider(ns_id, {
    on_win = function(_, winid, bufnr, top_row, bot_row)
        local virt_text = "I want to show something"

        vim.api.nvim_buf_set_extmark(bufnr, ns_id, top_row, 0, {
            virt_text = {{virt_text, "Error"}},
            virt_text_pos = "right_align",
            ephemeral = true,
        })
    end,
})
```
source it 

### Expected behavior

whenevev I scroll line or window with like `<C-E>` `<C-y>` `<C-f>` `<C-b>`, the line always show on window's first line (top_row).

### Nvim version (nvim -v)

NVIM v0.11.0-dev-939+g0264870c0-Homebrew Build type: Release LuaJIT 2.1.1727870382

### Vim (not Nvim) behaves the same?

no

### Operating system/version

macos 15

### Terminal name/version

alacritty

### $TERM environment variable

alacritty

### Installation

brew install neovim --HEAD
Repository: tauri
Issue: [feat] Use ksni crate for tray icons on Linux
Labels: type: feature request,platform: Linux

### Describe the problem

Currently Tauri uses libappindicator to create tray icons on Linux. But it has far fewer features than the xdg standard, as well as macOS and Windows.
There are multiple bug reports and feature requests regarding tray icon issues on Linux.
In particular it's not possible to handle left clicks and to add tool tips.

### Describe the solution you'd like

I would like to use the xdg standard for tray icons, which is supported on all Linux desktop environments and has many more features than libappindicator. Also libappindicator looks pretty dead. The last commit to the src folder is 15 years old.
https://bazaar.launchpad.net/~indicator-applet-developers/libappindicator/trunk/files

It looks to me like https://github.com/iovxw/ksni is a great fit for this task. It should be fairly easy to integrate it into Tauri.

I'm ready to write the necessary code myself. I just want to know if you are interested in merging it and if you would like to keep libappindicator as a choice, or if I can remove it.

### Alternatives considered

_No response_

### Additional context

_No response_
Repository: godot
Issue: Movie writer inconsistent deltas at start set movie writer fps to 30
Labels: bug,topic:core,confirmed

### Tested versions

- Reproducible 4.3.stable & 4.2.1.stable

### System information

Godot v4.3.stable.mono - Windows 10.0.22631 - Vulkan (Forward+) - integrated Intel(R) UHD Graphics 630 (Intel Corporation; 31.0.101.2127) - Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 Threads). Also windows 11 desktop with AMD 7950x and RTX 3090.  Vaguely remember trying on old linux box too.

### Issue description

The first few frames have differing deltas when in movie mode set to 30 fps.  If I set physics ticks to 30 then deltas are constant.

### Steps to reproduce

Create 2D or 3D scene and add this script:

```
var previousDelta:float = 0
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	if (previousDelta != 0 && previousDelta != delta):
		push_error('delta is different')
	previousDelta = delta
```

Set project settings movie writer fps to 30. Turn on movie maker mode and play and the error will trigger a few times at start then disappear.

### Minimal reproduction project (MRP)

[deltaproblem.zip](https://github.com/user-attachments/files/17317496/deltaproblem.zip)
Repository: flutter
Issue: Use a markup language that allows for comments in //flutter/ci/builders/*
Labels: engine,c: proposal,team-infra,P2,triaged-infra

We use JSON today. But the manifests are fairly large and hard to parse. As a relative newbie to tinkering on these, I would like to add additional inline documentation via comments. But JSON makes this hard to do.

Don't have a particularly strong opinion on a specific markup language, just want to express a frustration with JSON as we use it today.
Repository: pytorch
Issue: Issue including and linking libtorch into OMNeT++
Labels: needs reproduction,module: windows,module: cpp,triaged

I am trying to include libtorch into OMNeT++, so my inet project can use libtorch. I have included `libtorch/include` and `api/include`. As well as linking the libraries for `torch`,` torch_cpu `and `c10`.

I get the following error:
`'c10::impl::raw_local_dispatch_key_set' cannot be thread local when declared 'dllimport'`
 on line 68 in LocalDispatchKeySet.h: `extern C10_API thread_local PODLocalDispatchKeySet raw_local_dispatch_key_set;`

Does anyone know the cause and how to fix it?

cc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex @jbschlosser
Repository: kubernetes
Issue: [Compatibility Version] Configuration APIs Lifecycle
Labels: sig/api-machinery,triage/accepted

With compatibility version, we check emulation version in deciding whether to serve a resource: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/server/deleted_kinds.go#L119. Thus, if a resource was introduced in a later version than the emulation version, the resource will be disabled. 

Kubernetes also has other API types that are not directly served but used for configuration files (under the apiserver group). One example is AuthorizationConfiguration (currently in beta). Adding a new version involves directly adding to the `install.go` script, bypassing any compatibility version checks and allowing it to be used in the scheme for conversion/decoding to the internal type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/apis/apiserver/load/load.go#L73. 

This type is planned to go GA in 1.32, which means that configuration files are able to use the v1 type when declaring their `AuthorizationConfiguration`, even when emulating a previous version.

Is it fine to allow these new configuration types to be used during emulation? I see these similar to adding a new CLI flag, we generally don't version apiserver CLI flag options. Furthermore these types are not persisted to etcd so we have no prerelease lifecycle information on them. 

/cc @jpbetz @aaron-prindle
Repository: pytorch
Issue: [MPS] `torch.linspace` produces different results that CPU implementation for integral types
Labels: triaged,module: correctness (silent),module: mps

### 🐛 Describe the bug

Probably problem is this operator
https://github.com/pytorch/pytorch/blob/16a2c2cfd4ac58eecb05accbdf6b845a1ffbd9cf/aten/src/ATen/native/mps/operations/RangeFactories.mm#L237-L239

For example see this one:
```
>>> torch.linspace(4.3, -3, 50, dtype=torch.int8)
tensor([ 4,  3,  3,  3,  3,  3,  3,  3,  2,  2,  2,  2,  2,  2,  2,  1,  1,  1,
         1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, -1,
        -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2, -3],
       dtype=torch.int8)
>>> torch.linspace(4.3, -3, 50, dtype=torch.int8, device="mps")
tensor([ 4,  4,  4,  3,  3,  3,  3,  3,  3,  2,  2,  2,  2,  2,  2,  2,  1,  1,
         1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
        -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2],
       device='mps:0', dtype=torch.int8)
```

### Versions

All of them :/

cc @kulinseth @albanD @DenisVieriu97 @jhavukainen
Repository: PowerToys
Issue: File and folder searches aren’t working
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.85.1

### Installation method

GitHub

### Running as admin

None

### Area(s) with issue?

Always on Top

### Steps to reproduce

After updating PowerToys to the latest version, I've encountered an issue with the file and folder search on my laptop. When I type "?" and the name of a file or folder, no results appear. I've tried uninstalling and reinstalling the software, but the problem persists.

### ✔️ Expected Behavior

The search option should find the file or folder matching the name. 

### ❌ Actual Behavior

However, no results show up when searching matching file or folder names.

### Other Software

_No response_
Repository: deno
Issue: Issues regarding integration of Clerk with NextJS
Labels: bug,node compat,nextjs

Version: Deno 2.0

### What is the issue?
Basically, if you are trying to integrate Clerk with NextJS it will immediately crash when the first page is trying to compile.
It passes the middleware compilation, but when it hits the page compilation; it crashes immediately.

**Note:** A default NextJS application, with no Clerk added will **not** crash. Its when Clerk is added, it crashes.


Error that occurs upon page compilation:
```
error: Uncaught TypeError: Failed to decompress
    at BrotliDecompress.transform [as _transform] (ext:deno_node/_brotli.js:69:23)
    at BrotliDecompress.Transform._write (ext:deno_node/_stream.mjs:4563:12)
    at writeOrBuffer (ext:deno_node/_stream.mjs:3520:16)
    at _write (ext:deno_node/_stream.mjs:3465:14)
    at BrotliDecompress.Writable.write (ext:deno_node/_stream.mjs:3468:14)
    at Readable.ondata (ext:deno_node/_stream.mjs:2744:26)
    at Readable.emit (ext:deno_node/_events.mjs:393:28)
    at resume_ (ext:deno_node/_stream.mjs:2915:7)
    at processTicksAndRejections (ext:deno_node/_next_tick.ts:36:15)
    at runNextTicks (ext:deno_node/_next_tick.ts:75:3)
    at eventLoopTick (ext:core/01_core.js:182:21)
error: Uncaught (in promise) TypeError: Unknown signal: 0
    at toDenoSignal (ext:deno_node/internal/child_process.ts:389:11)
    at ChildProcess.kill (ext:deno_node/internal/child_process.ts:298:53)
    at handleSessionStop (file:///F:/Scripts/ClerkDenoTesting/node_modules/.deno/next@14.2.15/node_modules/next/dist/cli/next-dev.js:84:51)
    at ChildProcess.<anonymous> (file:///F:/Scripts/ClerkDenoTesting/node_modules/.deno/next@14.2.15/node_modules/next/dist/cli/next-dev.js:253:23)
    at ChildProcess.emit (ext:deno_node/_events.mjs:393:28)
    at ext:deno_node/internal/child_process.ts:277:16
    at eventLoopTick (ext:core/01_core.js:175:7)
```


### How to reproduce?
Its quite simple to reproduce.
Just follow these small steps and you should be having the same issues:

1. Create a new NextJS project with: `deno run -A npm:create-next-app@latest` and follow the setup instruction.
2. When created, follow the default Clerk integration: https://clerk.com/docs/quickstarts/nextjs, the only thing needed from here is adding the packages, adding tokens to the `.env` file, adding the middleware.ts file and adding the `ClerkProvider` to your layout.tsx.
3. Run up the application with: `deno task dev`, let it start up and try opening the page.

If you followed the instructions correctly, it should have crashed by now! :)
Repository: deno
Issue: Deno install is not working
Labels: needs info,node compat,install

Version: Deno 2.0.0

I am using
Darwin Christians-MacBook-Pro.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 arm64

<img width="1177" alt="Screenshot 2024-10-09 at 22 49 48" src="https://github.com/user-attachments/assets/c72dd473-68fd-4ba2-a67e-8e8d109c85ff">
Repository: rust
Issue: Emscripten metadata file size is wrong
Labels: P-high,I-unsound,C-bug,T-libs,O-wasi,O-emscripten

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
std::fs::read("my-file")
```

for a file that is <1MB large.

I expected to see this happen: The read should allocate a vec that is as large as the file content. The heap size in Emscripten should not meaningfully change.

Instead, this happened: The Emscripten heap grows by 1.8GB

I looked into the implementation of fs::read. Since it uses the file metadata size to pre-allocate the output vector, I debug printed the file size, which is around 1.8GB.

Since my Rust code is running inside Pyodide 0.25, I also checked Python's os.stat of the file, which reports the correct file size. Reading the file in Python also succeeds without the enormous over-allocation. It seems that this is a Rust-specific bug in getting the correct file size information from Emscripten.

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

My Rust toolchain is pinned to nightly-2024-07-21, the last nightly for 1.81.
Repository: deno
Issue: Fails with http2 in fastify
Labels: bug,node compat,node:http

Version: Deno 2, Windows 11

This code:
```javascript
import Fastify from "fastify";
import { readFile } from "node:fs/promises";
import { join } from "node:path";

const fastify = Fastify({
  http2: true,
  https: {
    key: await readFile(join(process.cwd(), "localhost-key.pem")),
    cert: await readFile(join(process.cwd(), "localhost.pem")),
  },
});
fastify.get("/", (_req, reply) => {
  reply.send("Hello World");
});
await fastify.listen({ port: 3000, host: "::" });
```

fails with error:

```bash
PS C:\Users\...> deno run -A example.ts  
error: Uncaught (in promise) Error: Not implemented: http2.createSecureServer
    at notImplemented (ext:deno_node/_utils.ts:9:9)
    at Object.createSecureServer (node:http2:1296:3)
    at getServerInstance (file:///C:/Users/.../node_modules/fastify/lib/server.js:278:24)
    at createServer (file:///C:/Users/.../node_modules/fastify/lib/server.js:24:18)
    at fastify (file:///C:/Users/.../node_modules/fastify/fastify.js:181:30)
    at file:///C:/Users/.../example.ts:5:17
    at eventLoopTick (ext:core/01_core.js:175:7)
```

However, it will work without http2 but logs: `Not implemented: Server.setTimeout()`
Repository: deno
Issue: Deno panic when configuring import with file:// in workspace
Labels: bug,cli,workspaces

I might be totally misconfiguring things. Saw the Deno 2.0 announcement and decided to try migrating a small npm monorepo to Deno, but ran into a panic when configuring an import to another project in the workspace.

Repro:

- Clone the `deno` branch from https://github.com/mattjennings/game-engine-2/tree/deno 
- Run `deno install`
- cd into `examples/deno` and run `deno run dev`

Output:

```bash
RUST_BACKTRACE=1 deno run dev
Task dev deno run --watch main.ts
Watcher Process started.

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos aarch64
Version: 2.0.0
Args: ["/Users/mattjennings/.deno/bin/deno", "run", "--watch", "main.ts"]

thread 'main' panicked at cli/graph_util.rs:1001:48:
called `Result::unwrap()` on an `Err` value: ()
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: <deno::graph_util::FileWatcherReporter as deno_graph::source::Reporter>::on_load
   4: deno_graph::graph::Builder::fill::{{closure}}
   5: deno_graph::graph::ModuleGraph::build::{{closure}}
   6: deno::graph_util::ModuleGraphBuilder::build_graph_with_npm_resolution::{{closure}}
   7: deno::module_loader::ModuleLoadPreparer::prepare_module_load::{{closure}}
   8: <deno::module_loader::CliModuleLoader<TGraphContainer> as deno_core::modules::loaders::ModuleLoader>::prepare_load::{{closure}}
   9: deno_core::modules::recursive_load::RecursiveModuleLoad::prepare::{{closure}}
  10: deno::worker::CliMainWorker::execute_main_module_possibly_with_npm::{{closure}}
  11: deno::worker::CliMainWorker::run_for_watcher::{{closure}}
  12: deno::tools::run::run_script::{{closure}}
  13: deno::spawn_subcommand::{{closure}}
  14: <deno_unsync::tokio::task::MaskFutureAsSend<F> as core::future::future::Future>::poll
  15: tokio::runtime::task::raw::poll
  16: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```

This is from a `file://` import in `example/deno/deno.json`

```json
"imports": {
    "game-engine": "file://../../packages/game-engine"
  }
```

Removing `file://` avoids the panic, but it still fails to find the project, so I'm probably misconfiguring something here.

Let me know if there's any more info you need.
Repository: PowerToys
Issue: cannot update 0.84.1
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.84.0

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

General

### Steps to reproduce

![Image](https://github.com/user-attachments/assets/e4c0d8c1-b059-438c-99df-5d3dc9ed3e11)

It just go off after small popup really fast. 


### ✔️ Expected Behavior

_No response_

### ❌ Actual Behavior

_No response_

### Other Software

_No response_
Repository: vscode
Issue: Debug toolbar trapped in issue reporter
Labels: bug,issue-reporter

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.95 Insiders
- OS Version: macOS

Steps to Reproduce:

1. Debug
2. Open Issue Reporter
3. 🐛 the debug toolbar is trapped in the issue reporter 


![Image](https://github.com/user-attachments/assets/2c28d645-f58d-4a50-9b01-f3bc1c81f974)
Repository: storybook
Issue: [Bug]: Code in .md file throws error
Labels: bug,has workaround,addon: docs,nextjs,sev:S3

### Describe the bug

Importing basic markdown into a story works as expected. Including any inline or block code (using "`" or "```") crashes the page with: `Cannot read properties of undefined (reading 'fonts')`.

### Reproduction link

https://stackblitz.com/edit/github-wj2kwd?file=src%2Fstories%2FTestBroken.md

### Reproduction steps

1. Go to the stackblitz link above
2. Open the `Test` Example
3. Observe that `Working` works without error
4. Observe that `Broken` throws the above error
5. See `Test.stories.js`, `TestWorking.md`, and `TestBroken.md` for the example source 

### System

  System:
    OS: macOS 14.7
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.17.0 - ~/.nvm/versions/node/v20.17.0/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v20.17.0/bin/npm <----- active
    pnpm: 9.9.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 129.0.6668.91
    Edge: 129.0.2792.79
    Safari: 18.0.1
  npmGlobalPackages:
    storybook: 8.1.7

### Additional context

I was eventually able to work around this issue by converting the md files to mdx and adjusting the story usage slightly. However, I would prefer most common (non-MDX) markdown, including code blocks, to work without error.
Repository: TypeScript
Issue: Uninitialized local check still permits provably erroneous use-before-assign in closure
Labels: Suggestion,Awaiting More Feedback

### 🔎 Search Terms

uninitialized, local, use before assign, control flow

### 🕗 Version & Regression Information

- This changed in commit or PR https://github.com/microsoft/TypeScript/pull/55887

### ⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.7.0-dev.20240925#code/DYUwLgBAZg9jBcEDOYBOBLAdgcwNwCh8BjGTFZcAMTggF4IAKASkQDcZ0ATOgPggG98ECOiiNYMAHSgcYABYQAPBACMTAUOHQa9AOQTdBYQF98xgvhAAPAA4xUkfqaA

### 💻 Code

```ts
let foo: string;

const setFoo = (): void => {
  if (foo.length < 1) {
    foo = 'foo';
  }
};

export {}
```


### 🙁 Actual behavior

No TS Error

### 🙂 Expected behavior

Variable 'foo' is used before being assigned.(2454)

### Additional information about the issue

(this error _is_ correctly reported if we never assign at all, as below)

```ts
let foo: string;

const setFoo = (): void => {
  if (foo.length < 1) {
  }
};

export {}
```

Related, https://github.com/microsoft/TypeScript/issues/60064.

Otherwise this can be solved by not considering assignments which occur unconditionally after a read.