sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Pasting a large amount of content in a json file will leave the cursor in the middle of the pasted content
Labels: bug,editor-autoindent

Repro:

1. Copy the content of this file: [content.md](https://github.com/user-attachments/files/17232398/content.md)
2. Open settings.json
3. Move to the middle of the file, after some key
4. Paste, 🐛 the cursor is in the middle of the pasted content

Observation:

Undoing will remove the indentation and put the cursor at the end, so I suspect the cursor position is the original offset and not taking into account the inserted indentation. So maybe some race condition related to that?

![Image](https://github.com/user-attachments/assets/5a5b4ae4-bd3d-4500-840a-0642d4fe723a)
Repository: vscode
Issue: indicate next edit suggestion availability to screen reader users
Labels: feature-request,accessibility

1. Enable a screen reader and the settings to have edit suggestions
2. Make an edit - here, I accepted an inline completion (thus the view this in the accessible view message)
3. Visually, I see an edit suggestion. There's no indication of this to screen reader users. We probably should have an accessibility signal for this and want to indicate how to navigate there via keyboard in the editor's a11y help dialog. cc @afre100

![Image](https://github.com/user-attachments/assets/1a3bfb53-df47-4152-93f2-edf44185677b)
Repository: PowerToys
Issue: pow(x,y) `Failed to calculate the input` if x isn't a float
Labels: Issue-Bug,Product-PowerToys Run,Status-Reproducible

### Microsoft PowerToys version

0.84.1 (I checked it works in 0.85.0 as well)

### Installation method

Microsoft Store

### Running as admin

No

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

Start PowerToys Run with `alt+space`, type in `=pow(a,b)` where `a` and `b` are integers.

![image](https://github.com/user-attachments/assets/3e72a37a-414d-499b-a75a-901fd17615ac)

If `a` is a float, e.g., `3.0`, it works. Such as: `=pow(2.0,3)`

![image](https://github.com/user-attachments/assets/00adcf52-f82c-4bc4-92a3-a820beb04db9)




### ✔️ Expected Behavior

Integers and floats to work as the first parameter.

### ❌ Actual Behavior

Integers don't work—floats do work.

### Other Software

_No response_
Repository: rust
Issue: absent precision parameter for floating point format string is undocumented
Labels: A-docs,C-bug,T-libs,A-floating-point,A-fmt

I am talking about format strings of the form `format!"{:.}", 1.234)`. The corresponding documentation for the precision argument is [here](https://doc.rust-lang.org/std/fmt/index.html#precision). The documentation writes that the format is `.N` where `N` is an integer specifying the precision.

The bug is that it is not documented that `N` can also be absent. Either this should not be accepted by the compiler or it should be documented.

I believe the intention is that an absent `N` means the same thing as if there was no precision specified at all (no `:.`). Note that this is not the same as "as much precision as needed".
Repository: pytorch
Issue: Need clarification on torch.nn.CrossEntropyLoss
Labels: module: docs,module: nn,module: loss,triaged

### 📚 The doc issue

URL: https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html

When sending class indices as target to this function, one must do this:

1. The shape of the target must be 1D: (batch_size,). Even  (batch_size, 1) will not be tolerated and will be treated as class probability instead.
2. The target tensor must be of type ``torch.long``. Without that you get error ``RuntimeError: expected scalar type Long but found Float``.

The documentation, while very good, is slightly lacking.

### Suggest a potential alternative/fix

Item 2 about type needs to be mentioned in the documentation.

Item 1 is discussed in the **Shape:** section of the page. But it could use a bit more clarification. When the target is 1D it could mean either ``(C)`` for probability or ``(N)`` for class index. How does the function distinguish the two scenarios?

cc @svekars @brycebortree @sekyondaMeta @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: PowerToys
Issue: add explorer restart after update instead of system restart
Labels: Needs-Triage

### Description of the new feature / enhancement

add explorer restart after update instead of system restart

### Scenario when this would be used?

add explorer restart after update instead of system restart

### Supporting information

add explorer restart after update instead of system restart
Repository: deno
Issue: `deno test --doc`: generated docs tests in JSDoc should it for naming (e.g. `@example`, token name, etc.)
Labels: suggestion,testing

Currently the `@example` JSdoc annotation can be used to title examples in generaed documentation.
(Example `@std/fmt/bytes`)

<img src="https://github.com/user-attachments/assets/c99daff3-aa0e-4913-9151-72b689d56cef" width="400">

When using `deno doc --test` currently the name are auto-generated with the filename/lines, but for long files it makes it a bit cryptic to map them back easily.

A solution would be to use the `@example` value (if defined) to set the `Deno.test` name.
Eventually, the name of the token could be used too (e.g. the name of the documented function, variable, etc.)

```
vscode ➜ /workspaces/fmt/bytes $ deno test --allow-read --doc test.ts 
Check file:///workspaces/fmt/bytes/test.ts
Check file:///workspaces/fmt/bytes/test.ts$7-14.ts
Check file:///workspaces/fmt/bytes/test.ts$79-86.ts
Check file:///workspaces/fmt/bytes/test.ts$89-95.ts
Check file:///workspaces/fmt/bytes/test.ts$98-105.ts
Check file:///workspaces/fmt/bytes/test.ts$108-114.ts
running 0 tests from ./test.ts
running 1 test from ./test.ts$7-14.ts
file:///workspaces/fmt/bytes/test.ts$7-14.ts ... ok (0ms)
running 1 test from ./test.ts$79-86.ts
file:///workspaces/fmt/bytes/test.ts$79-86.ts format: Basic usage ... ok (0ms)
running 1 test from ./test.ts$89-95.ts
file:///workspaces/fmt/bytes/test.ts$89-95.ts format: Include bits representation ... ok (0ms)
running 1 test from ./test.ts$98-105.ts
file:///workspaces/fmt/bytes/test.ts$98-105.ts format: Include sign ... ok (0ms)
running 1 test from ./test.ts$108-114.ts
file:///workspaces/fmt/bytes/test.ts$108-114.ts format: Change locale ... ok (16ms)
```

Maybe also there may be no need to put the full file url, as the `running X test from ./...` is relative, it'd be less verbose to not be an absolute url/path but just a relative one
Repository: vscode
Issue: Only expose chat code blocks to languages once they are complete
Labels: debt,panel-chat

Currently we expose the live text model, which updates as the code block is streamed in. This probably isn't needed and may cause problems/perf issues for language extensions as the code is incomplete and updated so rapidly
Repository: deno
Issue: `deno test --doc`: restrict permissions using shebangs
Labels: suggestion,testing

Currently seems like shebang in example testing are not supported (cause a parsing error).

Also it'd be nice if it could also parse the permissions flags and forwards them to `Deno.test({ permissions })`
```ts
/**
 * Documentation of my function.
 *
 * @example Usage
 * ```ts
 * #!/usr/bin/env -S deno run --allow-read
 * foo("bar")
 * ```
 * @example Missing permissions
 * ```ts 
 * #!/usr/bin/env -S deno run --deny-read
 * foo("bar") // failing test
 * ```
 */
export function foo(s:string) {
  return Deno.readTextFileSync(import.meta.filename!)
}
```

Because currently these tests are running with the full current permissions, which may not necessary be wanted.
It'll also helps documenting which permissions would be required to end users too

Also if the permissions feature gets implemented, I think the default for flags should be "inherit" rather than `true`.
For example, when running `deno test --doc --allow-read=/tmp`, if the shebang in the doc test is `#!/usr/bin/env -S deno run --allow-read` the `--allow-read` would be converted to `{ permissions: { read: "inherit" } }` rather than `{ permissions: { read: true } }` (so the doc test would actually be run with `--allow-read=/tmp` too)
Repository: angular
Issue: Reference doc api links may not navigate to the correct documentation in the sidebar.
Labels: area: docs-infra

### Describe the problem that you experienced

When looking at the reference documentation, clicking on a property or function in the api may not pull up the corresponding documentation in the sidebar. I've noticed this on several pages, though most recently on the FormGroup page. Likewise, clicking on one of the sidebar cards does not always highlight the correct item in the api. The offset seems to be fairly consistent per problematic page, though not all pages may have the same offset (i.e. clicking a property may pull up a doc for an item two down instead. This +2 offset will stay the same on that page, but another page may have a +1 offset). This may be related to properties that are not supposed to be publicly exposed (such as those starting with theta on the FormGroup page, which do not appear in the sidebar cards), but I can't say this definitively.

It seems that when a property is clicked and the card is brought up, the route registered in the browser correctly corresponds with the revealed card, but not with the actual property click. For example, if I click `readonly override valueChanges: Observable<TValue>;`, the route registered in the browser is instead `https://angular.dev/api/forms/FormGroup#setValidators`, and indeed, the setValidators card appears.

### Enter the URL of the topic with the problem

https://angular.dev/api/forms/FormGroup

### Describe what you were looking for in the documentation

_No response_

### Describe the actions that led you to experience the problem

_No response_

### Describe what you want to experience that would fix the problem

Clicking on a property in the reference documentation should register the route for that property and expose the card for that property.

### Add a screenshot if that helps illustrate the problem

![Image](https://github.com/user-attachments/assets/b1a4692d-0268-4d5e-b5b8-7895b3bd0254)


### If this problem caused an exception or error, please paste it here

_No response_

### If the problem is browser-specific, please specify the device, OS, browser, and version

_No response_

### Provide any additional information here in as much as detail as you can

_No response_
Repository: PowerToys
Issue: [New+] Not able to create new files in folders that require higher privilege
Labels: Issue-Bug,Priority-1,Cost-Medium,Status-Reproducible,Product-New+

### Microsoft PowerToys version

0.85

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

New+

### Steps to reproduce

1. Go to a folder that require higher privileges (Like program files)
2. Right click and choose a template
3. A dialog will come up asking for privileges to copy
![image](https://github.com/user-attachments/assets/7c205e68-5479-481a-8038-e43f76b5e417)
4. Click continue

### ✔️ Expected Behavior

After giving permission the file should be created there.

### ❌ Actual Behavior

The progress dialog freezes after some time and the template does not get created in the selected folder

### Other Software

_No response_
Repository: go
Issue: runtime/pprof: block/mutex profile stacks can sometimes miss leaf frames
Labels: NeedsInvestigation,compiler/runtime

### Go version

go version go1.23.1 darwin/arm64

### Output of `go env` in your module/workspace:

```shell
n/a
```


### What did you do?

Built this program with PGO and ran it:

```go
package main

import (
	"os"
	"runtime"
	"runtime/pprof"
)

func main() {
	runtime.SetBlockProfileRate(1)
	ch := make(chan struct{})
	go func() {
		close(ch)
	}()
	<-ch
	pprof.Lookup("block").WriteTo(os.Stdout, 1)
}
```

### What did you see happen?

If I build with PGO using a profile where `runtime.blockevent` is hot, then I see this output:

```
--- contention:
cycles/second=999458200
97416 1 @ 0x4cd357 0x438c4b 0x4709a1
#	0x4cd356	main.main+0x76		/home/junk/simple.go:17
#	0x438c4a	runtime.main+0x28a	/usr/local/go/src/runtime/proc.go:272
```

<details>

<summary>Example program which generates such a CPU profile:</summary>

```go
package main

import (
	"os"
	"runtime"
	"runtime/pprof"
	"time"
	_ "unsafe"
)

//go:linkname blockevent runtime.blockevent
func blockevent(cycles int64, skip int)

func main() {
	runtime.SetBlockProfileRate(1)
	pprof.StartCPUProfile(os.Stdout)
	defer pprof.StopCPUProfile()
	now := time.Now()
	for time.Since(now) < 5*time.Second {
		for i := 0; i < 100000; i++ {
			blockevent(1, 1)
		}
	}
}
```

</details>

### What did you expect to see?

I expected to see `chanrecv1` in the root frame:

```
--- contention:
cycles/second=999008970
54083 1 @ 0x406312 0x4cd357 0x438c4b 0x4709a1
#	0x406311	runtime.chanrecv1+0x11	/usr/local/go/src/runtime/chan.go:489
#	0x4cd356	main.main+0x76		/home/junk/simple.go:17
#	0x438c4a	runtime.main+0x28a	/usr/local/go/src/runtime/proc.go:272
```

I see that if I run the program with frame pointer unwinding disabled (`GODEBUG=tracefpunwindoff=1`) or if I run it with Go 1.22.

The problem is that if `runtime.saveblockevent` is inlined into `runtime.blockevent`, then `getfp()` will return one of `runtime.saveblockevent`'s callers frame pointers [here](https://cs.opensource.google/go/go/+/master:src/runtime/mprof.go;l=563;drc=49e542aa85b7c2d9f6cf50de00843b455bc1e635), and `runtime.fpTracebackPartialExpand` will start frame pointer unwinding from the wrong frame, making the skip values incorrect. Depending on how much inlining there is, we might see even more missing frames.
Repository: PowerToys
Issue: Launch Workspace on User Logon
Labels: Needs-Triage,Product-Workspaces

### Description of the new feature / enhancement

It would be very helpful if a Workspaces could be configured to be launched automatically on user logon.

### Scenario when this would be used?

When a user logs on.

### Supporting information

_No response_
Repository: rust
Issue: The target information for `mips64-openwrt-linux-musl` seems wrong
Labels: O-MIPS,T-compiler,C-bug

Target triples are generally `arch-vendor-os-env` (with lots of exceptions), but the `mips64-openwrt-linux-musl` target (added in https://github.com/rust-lang/rust/pull/92300) seems to be confused about the vendor?

The target `cfg`s are currently (trimmed from `rustc --print cfg --target mips64-openwrt-linux-musl`):
```
target_arch="mips64"
target_vendor="unknown"
target_os="linux"
target_env="musl"
```

I think there's a few ways to fix this:
- Declare OpenWRT as the vendor (which is also the position in the triple that it's currently located), and set `target_vendor="openwrt"`.
- Rename the target to `mips64-unknown-openwrt-musl` or similar, and set `target_os="openwrt"`.
  - A rename could be beneficial anyhow, since it actual uses `target_abi = "abi64"`, and so the target name should contain `muslabi64`.

CC target maintainer @Itus-Shield
Repository: ui
Issue: [bug]: update installation instructions
Labels: bug

### Describe the bug

in the current docs, the installation instructions for vite, they point to paste this code into the `vite.config.ts` file  

code:
`import path from "path"
import react from "@vitejs/plugin-react"
import { defineConfig } from "vite"

export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "./src"),
    },
  },
})
`

however, this code does not include the tailwindcss as part of its plugins, which means the css styling never gets loaded. as such, we need to included it in postcss like this

code:
`import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from 'tailwindcss'

export default defineConfig({
  plugins: [react()],
  css: {
    postcss: {
      plugins: [tailwindcss()],
    },
  }
})`



### Affected component/components

NA

### How to reproduce

just paste the current code provided on the docs into your vite.config.ts file and you'll see that none of your styles are being applied at all

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
macos
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: TypeScript
Issue: Destructuring object with generic key should reject undefined
Labels: Bug,Help Wanted

### 🔎 Search Terms

destructure, generic key, undefined

### 🕗 Version & Regression Information

This is the behavior in every version I tried (back to at least 5.0), and I reviewed the FAQ for entries about destructuring


### ⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.7.0-dev.20241002&ssl=7&ssc=1&pln=7&pc=2#code/JYOwLgpgTgZghgYwgAgCrIN7LgfgFzICuIA1iAPYDuIA3MgEb5GkXV0JPFlUjIC+AKAExiCMMHK8YAHgAyyCAA9IIACYBnZCQgBPcjDQA+ABQkCsgDTIwBdAB9mqiDFARVASgJdWvDAOTICJLqYJjIANokALoEAG78yAC81sgA9KnI6gAW5IQANqoKUFDkUMjGCFBw2RCawAahxE4uIG7u-oHBoQD6sQBMSdaRUWkZEACOhMCxcHkQ4J1OVqrktUUlUB1QEGCEULyxAnxAA

### 💻 Code

```ts
interface T { a?: unknown; b?: unknown; c?: unknown }

function f<L extends keyof T>(k: L, t: T | undefined): unknown {
  const { [k]: v } = t // should error (crashes if t undefined)
  const _v2 = t[k] // equivalent code, does error
  return v
}
```


### 🙁 Actual behavior

TS does not error on the destructuring, even though it will crash at runtime if `t` is `undefined`, and it errors on equivalent code using object-access syntax.

### 🙂 Expected behavior

TS should error on the indicated line.

### Additional information about the issue

This is simplified from an actual example in our codebase. Obviously in this case it's silly to destructure but this was part of a larger block of destructuring so the code would at a glance seem reasonable.

Note that the destructured value does end up having a funky type `(T | undefined)[L]`, which presumably it's hard to do anything with. But of course it's still assignable to `unknown`, and thus usable in various ways. (In the actual code in question, the authors were doing other complicated things, running an issue similar to #40312, and ended up casting through unknown to the type they wanted.)
Repository: go
Issue: runtime:cpu4: TestBigGOMAXPROCS failures
Labels: NeedsInvestigation,compiler/runtime

```
#!watchflakes
default <- pkg == "runtime:cpu4" && test == "TestBigGOMAXPROCS"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8735175529435966529)):

    === RUN   TestBigGOMAXPROCS
    === PAUSE TestBigGOMAXPROCS


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: pytorch
Issue: Setting `nn.TransformerEncoder()` and `nn.TransformerDecoder()` to `nn.Transformer()` doesn't get any errors with `nn.Transformer()`'s arguments having wrong type values
Labels: module: nn,triaged

### 🐛 Describe the bug

Setting [nn.TransformerEncoder()](https://pytorch.org/docs/stable/generated/torch.nn.TransformerEncoder.html) and [nn.TransformerDecoder()](https://pytorch.org/docs/stable/generated/torch.nn.TransformerDecoder.html) to [nn.Transformer()](https://pytorch.org/docs/stable/generated/torch.nn.Transformer.html) doesn't get any errors with `nn.Transformer()`'s arguments having wrong type values as shown below:

```python
import torch
from torch import nn

tensor1 = torch.tensor([[8., -3., 0., 1.]])
tensor2 = torch.tensor([[5., 9., -4., 8.],
                        [-2., 7., 3., 6.]])

encoder_layer = nn.TransformerEncoderLayer(d_model=4, nhead=2)
transformer_encoder = nn.TransformerEncoder(encoder_layer, num_layers=6)

decoder_layer = nn.TransformerDecoderLayer(d_model=4, nhead=2)
transformer_decoder = nn.TransformerDecoder(decoder_layer, num_layers=6)

torch.manual_seed(42)

tran = nn.Transformer(d_model=4.+0.j, nhead='Hello', num_encoder_layers='Hello',
                      num_decoder_layers='Hello', dim_feedforward='Hello', dropout='Hello',
                      activation='Hello', layer_norm_eps='Hello', batch_first='Hello',
                      norm_first='Hello', bias='Hello', device='Hello', dtype='Hello',
                      custom_encoder=transformer_encoder, custom_decoder=transformer_decoder)
                    # ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
tran(src=tensor1, tgt=tensor2)
# tensor([[-1.3637, -0.5454, 1.0559, 0.8532],
#         [-1.1270, -0.4331, 1.5941, -0.0341]],
#         grad_fn=<NativeLayerNormBackward0>)
```

### Versions

```python
import torch

torch.__version__ # '2.3.0'
```

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @bhosmer @cpuhrsch @erichan1 @drisspg
Repository: flutter
Issue: A more formal Flutter tree health/gardener process
Labels: team-infra,P2,triaged-infra,monorepo

As we merge `flutter/engine` and `flutter/flutter`, we'll likely need to rethink our various "build health" rotations (i.e. Flutter Engine Sheriff, Flutter Tree Gardener), not immediately perhaps, but soon (TM), as there will be a single source of build and build health issues instead of split across two trees/repositories.

Here are some ideas in the back of my head, I'd be happy to be involved or help organize:

- Formal hand-off doc that is updated at least once a week (as rotations change) with what happened
- One merged rotation with a primary and a secondary (instead of two rotations with only a primary)
- More clear guidance on how time is expected to be spent during the rotation (i.e. little/no core work)
- More clear guidance on working hours/core hours (if someone helps fix the tree at 2am PST but is unavailable at 10am PST it sort of defeats the purpose of the rotation)
Repository: flutter
Issue: [pigeon] Expose custom object IDs for testing on Linux
Labels: platform-linux,package,team-ecosystem,p: pigeon,P2,triaged-ecosystem

The way custom `FlValue` objects work on Linux, the ID they use is part of the API contract (to identify them, since there's no inherent runtime typing), but currently those assignments are an implementation detail of the generated Pigeon code. That's an issue for native unit tests, because in order to call `fl_value_new_custom_object` to make arguments to call handlers, the right ID is required.

This isn't high priority since it can be worked around by hard-coding the IDs in the tests, but that means that tests are subject to breakage when updating the Pigeon generation, which is obviously not ideal. We should make public constants for each of the Pigeon-generated class IDs, so that tests can be written using the constants, and get any updates automatically.
Repository: rust
Issue: Warn if supposedly unreachable code is provably reachable
Labels: A-lints,T-lang,T-compiler,C-feature-request

### Code

 `if true { unsafe { unreachable_unchecked() } };`
 `if true { unreachable!() };`

### Current output

No warnings

### Desired output

1. warning: this is ub if called...
2. warning: this will panic when called...

### Rationale and extra context

_No response_

### Other cases

_No response_

### Rust Version

rustc 1.83.0-nightly (c52c23b6f 2024-09-16)


### Anything else?

_No response_
Repository: PowerToys
Issue: Keyboard manager rebind for specific enviroment
Labels: Needs-Triage

### Description of the new feature / enhancement

For whatever reason we do not have it

### Scenario when this would be used?

I would like to use default Win in desktop for standard shortcuts, etc.... but have rebinded to smth like "/" key in games.

### Supporting information

_No response_