sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: JSDoc: module.exports direct literal assignment not type checked
Labels: Suggestion,Help Wanted,Domain: JSDoc,Experience Enhancement

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

First of all, thanks for your continued work on TypeScript and the ecosystem 🙌

Using `module.exports = <object literal>` with a JSDoc-style annotation before it does not check the type of the assigned value.

Using `module.exports = <object literal>` is a common pattern in tooling in the JS/TS ecosystem.

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

module.exports, node, Node.js, CommonJS, JSDoc

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about Modules

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?filetype=js#code/MYewdgzgLgBAtjAvDA3gXwFAYPQCpcwACUAngA4CmqKMAhgFwwCMMaaMu2GcAdBQB5kQAJygQkqDDGl1GAJgA0MbNhiBQchgBRYcJFLa4gZWBQKAEwxoA3FjwFi5KihoNmrdp24gzAVwA2FHyCImISKFIyrorKqoC8G4ClOzAAciAwFDp6MD5gRhQm5pYYQA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->

```ts
const m = {}

/** @type {{ a: 1 }} */
m.exports = {
    a: 2, // ✅ Error, as expected
};

/** @type {{ a: 1 }} */
module.exports = {
    a: 2, // 💥 No error, unexpected
}
```

This also happens with a non-nested object:

```ts
/** @type {{ a: 1 }} */
const exports = {
    a: 2, // ✅ Error, as expected
};

/** @type {{ a: 1 }} */
module.exports = {
    a: 2, // 💥 No error, unexpected
}
```

[Playground](https://www.typescriptlang.org/play?filetype=js#code/PQKhAIAEBcE8AcCm4DeLwEMBc4CM4BfA8EYAKAGMB7AOwGdpxEAPeKgJ2jvAF5UzwgzDgBMAGnDBg4QKDk4AKLt2HCRm4skFaIgAmZAgG4yZUBBgJkaYXkLFSZALZUdAVwA2iAHQaOXXvyFrcUlpQF4NwFKd8AA5KiYlFXAXGg1ELV19MiA)

### 🙁 Actual behavior

`module.exports` object is not type checked with JSDoc, but a variable is.

### 🙂 Expected behavior

`module.exports` should also be type checked against the type

### Related issues

- https://github.com/microsoft/TypeScript/issues/42283
Repository: next.js
Issue: Internationalized routing not working with basePath set
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro
    Binaries:
      Node: 19.1.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.0.0
      eslint-config-next: 13.0.0
      react: 18.2.0
      react-dom: 18.2.0

### Which area(s) of Next.js are affected? (leave empty if unsure)

Internationalization (i18n), Routing (next/router, next/navigation, next/link)

### Link to the code that reproduces this issue

https://github.com/seanbailey28/reproduction-app

### To Reproduce

Add both `basePath` and `i18n` to nextconfig: 

![image](https://user-images.githubusercontent.com/16669830/206510122-d5cba686-6714-49fb-b119-eea78649cc4d.png)

Create a component that uses `NextLink` or router that includes the locale:

![image](https://user-images.githubusercontent.com/16669830/206510604-b9e78311-db87-4b14-a090-75e86943f71c.png)

When navigating, the locale and href is used but the basePath is removed

### Describe the Bug

When using both basePath and internationalized routing, the basePath isn't provided in the URL.

### Expected Behavior

When navigating between pages, the basePath and the locale should both be in the URL

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: vscode
Issue: VS Code for the Web: Settings for outline view not functioning well on iPadOS’s browser
Labels: bug,menus,workbench-views,web,ios-ipados

<!-- ⚠️⚠️ 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

<!-- 🪓 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.74.0 and 1.75.0-insider
- OS Version: iPadOS 16.1.1

Steps to Reproduce:

1. open vscode.dev site, open a file with symbols
2. click outline view’s option button, sometimes it makes the outline view folded, or open option box in a wrong place. when option box opened, click some items will not take effect
3. I tried all major browser on iPadOS include FireFox, Chrome, Edge, Safari, Opera in their latest version

https://user-images.githubusercontent.com/24841978/206520997-58b4e548-c00d-4962-be0c-139c1d5e4fdb.MOV
Repository: PowerToys
Issue: Paste colour code into color picker
Labels: Idea-Enhancement,Help Wanted,Product-Color Picker

### Description of the new feature / enhancement

I wanted to paste a hex code into the hex field to see what the color was, but it wouldn't allow me to do this.
It appears I can only choose the color and copy the color code.

Could you make it so we can paste as well as copy?

### Scenario when this would be used?

I have a color in my css code and I wanted to know what color it is?
Copied the hex code (although it would be great if we could paste into all color codes) and tried to paste it into the hex field.
Wouldn't allow me to do this.

Simply make the copy fields have the ability to edit copy and paste.
Whatever is in the field is the color shown.

Thank you.

### Supporting information

_No response_
Repository: go
Issue: runtime: diagnostics improvements tracking issue
Labels: NeedsInvestigation,compiler/runtime

As the Go user base grows, more and more Go developers are seeking to understand the performance of their programs and reduce resource costs. However, they are locked into the relatively limited diagnostic tools we provide today. Some teams build their own tools, but right now that requires a large investment. This issue extends to the Go team as well, where we often put significant effort into ad-hoc performance tooling to analyze the performance of Go itself.

This issue is a tracking issue for improving the state of Go runtime diagnostics and its tooling, focusing primarily on `runtime/trace` traces and heap analysis tooling.

To do this work, we the Go team are collaborating with @felixge and @nsrip-dd and with input from others in the Go community. We currently have a virtual sync every 2 weeks (starting 2022-12-07), Thursdays at 11 AM NYC time. Please ping me at `mknyszek -- at -- golang.org` for an invite if you're interested in attending. This issue will be updated regularly with meeting notes from those meetings.

Below is what we currently plan to work on and explore, organized by broader effort and roughly prioritized. Note that this almost certainly will change as work progresses and more may be added.

### Runtime tracing
**Tracing usability**
- [x] All STW events appear in the trace ([CL](https://go.dev/cl/494495))
- [x] Tracer overhaul (#60773)
  - [x] Public design document (CC @mknyszek)
- [x] Public trace parsing API (#62627)
- [x] Explore a "flight recorder" mode (#63185)
- [ ] Integrate pprof labels into traces (#56295) (CC @nsrip-dd, @felixge)
- [ ] Explore Perfetto integration and replacement of our existing trace viewer (#57159)
- [ ] Explore API for registering a runtime/trace handler and namespace (TODO)
  - [ ] Explore having standard library packages use this for additional information (TODO)

**Tracing performance**
- [x] Establish baseline performance with benchmarks (CC @mknyszek, @felixge)
  - [x] Add trace overhead benchmarking support to Sweet (CC @mknyszek)
- [ ] API for filtering events that appear in a trace (CC @felixge, @nsrip-dd)
- [x] Faster tracebacks
  - [x] `gentraceback` refactoring (#54466) (CC @felixge, @aclements)
  - [x] Explore frame pointer unwinding (#16638)

### Heap analysis (see #57447)
- [ ] Update `viewcore`'s internal core file libraries (`gocore` and `core`) to work with Go at tip.
- [ ] Ensure that `gocore` and `core` are well-tested, and tested at tip.
- [ ] Make `gocore` and `core` externally-visible APIs, allowing Go developers to build on top of it.
- [ ] Write go.dev documentation on how to do heap analysis with viewcore.
  
CC @aclements @prattmic @felixge @nsrip-dd @rhysh @dominikh
Repository: godot
Issue: SpringArm3D with child Camera3D clips through geometry
Labels: bug,topic:physics,topic:3d

### Godot version

v4.0.beta.custom_build [204715ae9]

### System information

Windows 10

### Issue description

A SpringArm3D with a child Camera3D incorrectly goes through geometry at certain angles (not at all extreme).

Example from MRP:
<video src="https://user-images.githubusercontent.com/115422160/206534259-e1f68332-34d7-48c8-8920-16e1351a58aa.webm">

If one increases the 'spring_length' of SpringArm3D to, for example, 3, it's easy to see it ignores the collision entirely at some angles, pic example:
![image](https://user-images.githubusercontent.com/115422160/206535209-cfa10d28-2618-420b-aa5b-d0e3b5f01d2f.png)

According to https://github.com/godotengine/godot/pull/53354 , the camera's pyramid shape should be used for the cast, if no shape is supplied, which I think is indeed happening.
Perhaps if the pyramid shape is already inside geometry it doesn't detect it? In that case there's no way to set something like 'hit_from_inside' of PhysicsRayQueryParameters3D to 'true'.

### Steps to reproduce

Run the MRP and use the mouse to move as shown in vid.

### Minimal reproduction project

[SpringArm3D clipping.zip](https://github.com/godotengine/godot/files/10188446/SpringArm3D.clipping.zip)
Repository: TypeScript
Issue: Intellisense stops working inside nested `Array.map`
Labels: Suggestion,Help Wanted,Domain: Completion Lists,Experience Enhancement

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

Intellisense stops working inside `Array.map`

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- Version 4.9.3

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?#code/C4TwDgpgBAwgFgSwDYBMBOEB2UC8UDeAsAFBRlSYCGAthAFxQDOwaCmA5gNwkC+3xJUJCgAFShkzBcBEuSgBjRKgkN4ydFgDaAXX58SJJBClhxWYIwZiJwHdJ0A6apTAAKVwEpcAPiiv8CkoamAyOzm6ePn74PB5esR5AA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
type Children = {
    name: string;
};

type Parent = {
    children: Children[];
};

let parents: Parent[] = [].map(() => ({ children: [].map(() => ({ /* Missing `name` property in intellisense */ })) }))
```

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->

Missing `name` property in intellisense
![image](https://user-images.githubusercontent.com/34211799/206534943-ba588ccb-a5a2-458d-b115-6a15997d4d73.png)

### 🙂 Expected behavior

<!-- What you expected to happen instead, and why -->

Have `name` property in intellisense

### Note
I know I can put `map<Children>` to show intellisense, but using complex types like [prisma](https://github.com/prisma/prisma), and with a lot of nested array, it wouldn't be very convenient to keep putting `map<Type>` (even worse if the type is in another file needs to be imported)
Repository: rust
Issue: Resolve errors for unknown binding should consider commented out code
Labels: A-diagnostics,A-resolve,P-low,T-compiler,D-terse

When refactoring code, it is not uncommon to comment out pieces of code try try alternatives. When doing so, it's easy to forget to uncomment at least one of the alternatives. Given code like

```rust
fn main() {
    let option = Some("");
    // let Some(string) = x else { return; };
    println!("{string}");
}
```
the compiler should emit output similar to

```
error[E0425]: cannot find value `string` in this scope
 --> src/main.rs:4:16
  |
3 |     // let Some(string) = x else { return; };
  |     --          ------ you might have meant to use this commented out binding
  |     |
  |     note the comment starts here
4 |     println!("{string}");
  |                ^^^^^^ not found in this scope
```

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"Ezrashaw"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: pytorch
Issue: Tensor indexing and slicing documentation should explicitly state that indexing follows numpy semantics and link to the numpy indexing documentation.
Labels: module: docs,triaged,module: numpy

### 📚 The doc issue

It's my understanding that indexing a tensor with `[]`/`Tensor.__getitem__`/`Tensor.__setitem__` works like numpy, but this is not mentioned in the [Indexing, Slicing, Joining, Mutating Ops](https://pytorch.org/docs/stable/torch.html#indexing-slicing-joining) docs.


Related discussion: https://discuss.pytorch.org/t/selecting-from-a-2d-tensor-with-rows-of-column-indexes/167717

### Suggest a potential alternative/fix

Add to the [tensor indexing](https://pytorch.org/docs/stable/torch.html#indexing-slicing-joining) docs that this works like numpy, and link to the numpy indexing docs. Maybe https://numpy.org/doc/stable/user/basics.indexing.html or https://numpy.org/doc/stable/user/basics.indexing.html#advanced-indexing. 

cc @svekars @carljparker @mruberry @rgommers
Repository: flutter
Issue: Run time for tasks can show incorrect time, impossibly high runtime
Labels: team-infra,P3,triaged-infra

Was looking at tasks in the dashboard and found one that says it has been running for 27842180 minutes!

![image](https://user-images.githubusercontent.com/32242716/206560025-437346b1-512f-4d22-b8bf-34abda1a6015.png)
Repository: storybook
Issue: [Feature Request]: Deisgner Component, maybe Integration in Storybook
Labels: feature request,needs triage

### Is your feature request related to a problem? Please describe

I'm workin on a Designer WebComponent. Maybe it would be possible / interesting to include the component in storybook, so it could be used to test the components documented in storybook directly in a Designer.

Don't have an exact idea how this could look like, but maybe someone has?

see what I've got at the moment here: https://node-projects.github.io/web-component-designer-demo/index.html

### Describe the solution you'd like

It's no problem, it's only a idea at the moment

### Describe alternatives you've considered

_No response_

### Are you able to assist to bring the feature to reality?

yes, I can

### Additional context

_No response_
Repository: godot
Issue: Vulkan: VoxelGI looks incorrect when using an orthogonal camera
Labels: bug,topic:rendering,confirmed,topic:3d

### Godot version

4.0.beta7

### System information

Fedora 36, Vulkan Forward Plus, AMD Radeon RX 6900 XT

### Issue description

VoxelGI looks incorrect when using an orthogonal camera. Notice how an orange horizontal line becomes visible in the pillar's shadow on the right as the camera moves:

[output.webm](https://user-images.githubusercontent.com/180032/206589098-2e419d7c-1c08-49c6-8dc8-027c654e2f6d.webm)

*Note: The incorrect reflection for transparent materials is an unrelated issue, and is tracked in https://github.com/godotengine/godot/issues/69783.*


### Steps to reproduce

This incorrect appearance seems to apply to both diffuse and specular reflections. 

### Minimal reproduction project

[test_voxelgi_reflection_orthogonal_camera.zip](https://github.com/godotengine/godot/files/10190598/test_voxelgi_reflection_orthogonal_camera.zip)
Repository: pytorch
Issue: Functionalization on inplace_views should properly reflect autograd metadata
Labels: module: bootcamp,triaged,module: functionalization,oncall: pt2,module: pt2-dispatcher,internal ramp-up task

There's a bug in AOT Autograd today:
```
from functorch.compile import aot_function, nop

def f(x):
    out = x * 2
    out.unsqueeze_(0)
    return out

# works
f(torch.ones(2, requires_grad=True)).mul_(2)

compiled_f = aot_function(f, fw_compiler=nop)

# Fails
compiled_f(torch.ones(2, requires_grad=True)).mul_(2)
# prints:
RuntimeError: Output 0 of CompiledFunctionBackward is a view and is being modified inplace. This view was created inside a custom Function (or because an input was returned as-is) and the autograd logic to handle view+inplace would override the custom backward associated with the custom Function, leading to incorrect gradients. This behavior is forbidden. You can fix this by cloning the output of the custom Function.
```

The problem is that:

(1) In the eager code, `out` is not a (differentiable) view. `out._is_view() == False`

(2) In the compiled code, functionalization runs and converts the program into:
```
def f_functionalized(x):
    out = x * 2
    out_updated = x.unsqueeze(0)
    # out_updated is a view! out_updated._is_view() == True
    return out_updated
```

When we return an output that has `._is_view()` from an `autograd.Function.forward()`, we are not allowed to mutate it.

From talking with @ezyang, a reasonable fix would be inside of functionalization: functionalization should respect the autograd view metadata when handling inplace_view ops. One way to do that is:

(1) For every inplace view op (e.g. `transpose_()`), and a corresponding `_unsafe_transpose()` op , that autograd doesn't know is an aliasing operator

(2) When functionalization sees `x.transpose_()`, it should decide to dispatch into either `.transpose()` or `._unsafe_tranpose()`, depending on whether `x` is currently a differentiable view.

cc @ezyang @msaroufim @wconstab @anijain2305 @zou3519 @soumith @ngimel
Repository: pytorch
Issue: Can torchrun have a shell completion?
Labels: oncall: distributed

### 🚀 The feature, motivation and pitch

Like

- <https://github.com/andreafrancia/trash-cli/blob/master/setup.cfg#L31-L33>
- <https://github.com/inducer/pudb/blob/main/setup.py#L24>
- <https://github.com/piccolomo/plotext/blob/master/setup.py#L25>
- <https://github.com/wookayin/gpustat/blob/master/setup.py#L116>

```
❯ torchrun -<TAB>
option
--help               show this help message and exit
-h                   show this help message and exit
--log_dir            Base directory to use for log files (e.g. /var/log/torch/elastic). The same directory is re-used for multiple runs (a unique job-level sub-directory is created with rdzv_id as the prefix).
--master_addr        Address of the master node (rank 0). It should be either the IP address or the hostname of rank 0. For single node multi-proc training the --master_addr can simply be 127.0.0.1; IPv6 should have the pattern `[0:0:0:0:0:0:0:1]`.
--master_port        Port on the master node (rank 0) to be used for communication during distributed training.
--max_restarts       Maximum number of worker group restarts before failing.
-m                   Change each process to interpret the launch script as a Python module, executing with the same behavior as 'python -m'.
--module             Change each process to interpret the launch script as a Python module, executing with the same behavior as 'python -m'.
--monitor_interval   Interval, in seconds, to monitor the state of workers.
--nnodes             Number of nodes, or the range of nodes in form <minimum_nodes>:<maximum_nodes>.
--node_rank          Rank of the node for multi-node distributed training.
...
```

### Alternatives

```
shtab -s zsh torch.distributed.run.get_args_parser --prog torchrun| sudo tee /usr/share/zsh/site-functions/_torchrun
```

See <https://docs.iterative.ai/shtab>

### Additional context

_No response_

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu