sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Obscure error: Expected a value of type 'List[int]' for argument 'sizes' but instead found type 'immutable_list'
Labels: good first issue,triaged,oncall: pt2,module: dynamic shapes,module: pt2-dispatcher

### 🐛 Describe the bug

Repro:

```
import torch
import torch._dynamo

torch._dynamo.config.capture_scalar_outputs = True

torch.library.define("ezyang::split_with_sizes_and_clone", "(Tensor input, int[] sizes) -> Tensor[]")

def split_with_sizes_and_clone(input, sizes):
    return [t.clone() for t in torch.ops.aten.split_with_sizes.default(input, sizes)]

torch.library.impl("ezyang::split_with_sizes_and_clone", "default", split_with_sizes_and_clone)

@torch.library.impl_abstract("ezyang::split_with_sizes_and_clone")
def split_with_sizes_and_clone_abstract(input, sizes):
    # TODO: I'm lazy
    rs = torch.ops.aten.split_with_sizes.default(input, sizes)
    return [input.new_empty(r.size()) for r in rs]

@torch.compile()
def f(sz, x):
    s0, s1 = sz.tolist()
    r0, r1 = torch.ops.ezyang.split_with_sizes_and_clone.default(x, [s0, s1])
    return torch.ops.aten.sort.default(r1)

N = 7312
S0 = 420
S1 = N - S0

f(torch.tensor([S0, S1]), torch.randn(N))
```

fails with

```
torch._dynamo.exc.TorchRuntimeError: Failed running call_function ezyang.split_with_sizes_and_clone.default(*(FakeTensor(..., size=(7312,)), [u0, u1]), **{}):
ezyang::split_with_sizes_and_clone() Expected a value of type 'List[int]' for argument 'sizes' but instead found type 'immutable_list'.
Position: 1
Value: [u0, u1]
Declaration: ezyang::split_with_sizes_and_clone(Tensor input, int[] sizes) -> Tensor[]
Cast error details: Unable to cast Python instance of type <class 'torch.fx.immutable_collections.immutable_list'> to C++ type '?' (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)
```

Actually this has nothing to do with immutable_list though; I should have put SymInt in my schema rather than int. Would be good to have a better error in this case

### Versions

main

cc @chauhang @penguinwu @zou3519 @bdhirsh @msaroufim @anijain2305
Repository: next.js
Issue: Turbopack: respect a project’s browserslist config in both dev and build
Labels: Turbopack,created-by: Turbopack team,linear: turbopack

Right now the devserver uses a fixed browserlist that’s the latest versions of evergreen browsers. Instead, we should respect what the user has configured (`browserslist` field in package.json, `.browserslistrc`, etc.), like Next.js with webpack does.


<sub>[PACK-2882](https://linear.app/vercel/issue/PACK-2882/turbopack-respect-a-projects-browserslist-config-in-both-dev-and-build)</sub>
Repository: go
Issue: x/tools/gopls: extend LinkTarget to support http:// scheme and substitution of {package} and {version}
Labels: help wanted,gopls,Tools

### gopls version

0.15.2-1 (on arch linux)

### go env

(not relevant, I believe)
```shell
GO111MODULE=''
GOARCH='amd64'
GOPRIVATE=''
GOVERSION='go1.22.1'
```


### What did you do?

I have been developing [vanitydoc](https://code.pfad.fr/vanitydoc/) to be able to generate simple HTML documentation at the import path of my go libraries.

This library is also able to generate those files "on-the-fly", for instance running the following command serves the documentation of the standard library, as well as the documentation of the packages in my gomodcache locally:
```
vanitydoc -gomodcache=$(go env GOMODCACHE) /usr/lib/go/src
```

I have setup a service file to start this automatically under localhost: `http://localhost:8080` (actually I am using `http://pkg/`) and I ajusted the gopls settings inside vscode to:  `"ui.documentation.linkTarget": "http://pkg"`

### What did you see happen?

When clicking on a doc link, the `https://` gets prepended: `https://http://pkg/src.agwa.name/go-listener@v0.5.1#Open`

### What did you expect to see?

I would expect to be able to visit the `http` version: http://pkg/src.agwa.name/go-listener@v0.5.1#Open

### Editor and settings

`settings.json` of vscode:
```json
"gopls": {
    "ui.documentation.linkTarget": "http://pkg"
  }
```


### Possible fix

Currently the `s` of `https` is hard-coded `msg := fmt.Sprintf("https://%s/%s", options.LinkTarget, link.ImportPath)`
https://github.com/golang/tools/blob/c21ae4cabc44594caf9cbfa867a678ad4a2df387/gopls/internal/golang/comment.go#L29

I would propose to move the logic to settings.go:
https://github.com/golang/tools/blob/2d517d51b81102672a95b40c9fea60a65ba3620a/gopls/internal/settings/settings.go#L985

- if the variable is empty, don't do anything
- If no scheme is set, set it to https
- if a scheme is set, use it as-is
Repository: go
Issue: cmd/go: TestScript/mod_vendor_goversion failures
Labels: NeedsInvestigation

```
#!watchflakes
default <- pkg == "cmd/go" && test == "TestScript/mod_vendor_goversion"
```

Issue created automatically to collect these failures.

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

    === RUN   TestScript/mod_vendor_goversion
    === PAUSE TestScript/mod_vendor_goversion
    === CONT  TestScript/mod_vendor_goversion
        script_test.go:136: 2024-03-18T19:14:30Z
        script_test.go:138: $WORK=/home/swarming/.swarming/w/ir/x/t/cmd-go-test-1267430224/tmpdir2616650602/mod_vendor_goversion2385946927
    2024/03/18 19:14:30 serving /git/hello/git-upload-pack
        script_test.go:160: 
            PATH=/home/swarming/.swarming/w/ir/x/t/cmd-go-test-1267430224/tmpdir2616650602/testbin:/home/swarming/.swarming/w/ir/x/w/goroot/bin:/home/swarming/.swarming/w/ir/x/w/goroot/bin:/home/swarming/.swarming/w/ir/x/w/goroot/bin:/home/swarming/.swarming/w/ir/cache/tools/bin:/home/swarming/.swarming/w/ir/bbagent_utility_packages:/home/swarming/.swarming/w/ir/bbagent_utility_packages/bin:/home/swarming/.swarming/w/ir/cipd_bin_packages:/home/swarming/.swarming/w/ir/cipd_bin_packages/bin:/home/swarming/.swarming/w/ir/cipd_bin_packages/cpython3:/home/swarming/.swarming/w/ir/cipd_bin_packages/cpython3/bin:/home/swarming/.swarming/w/ir/cache/cipd_client:/home/swarming/.swarming/w/ir/cache/cipd_client/bin:/home/swarming/.swarming/cipd_cache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
            HOME=/no-home
            CCACHE_DISABLE=1
    ...
            > go build example.net/need117
            > ! go build example.net/bad114
            [stderr]
            # example.net/bad114
            bad114/bad114.go:15:2: duplicate method `Y'
            	bad114/bad114.go:14:2: other declaration of `Y'
            [exit status 1]
            > stderr '^bad114[/\\]bad114.go:15:2: duplicate method Y( .*)?$'
        script_test.go:160: FAIL: testdata/script/mod_vendor_goversion.txt:10: stderr '^bad114[/\\]bad114.go:15:2: duplicate method Y( .*)?$': no match for `(?m)^bad114[/\\]bad114.go:15:2: duplicate method Y( .*)?$` in stderr
    --- FAIL: TestScript/mod_vendor_goversion (0.19s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: go
Issue: x/build/cmd/watchflakes: possibly report newly-skipped tests
Labels: Builders,NeedsInvestigation,FeatureRequest

It's common for Go tests that require certain capability or dependency to skip themselves if the environment doesn't meet that requirement. For example, see the various `MustHave*` helpers in [`internal/testenv`](https://pkg.go.dev/internal/testenv).

Perhaps it'd be possible for `watchflakes` to detect instances of patterns where an existing test goes from passing to skipping, and report them in a useful way (i.e., a high enough signal to noise ratio). It might only be viable if it's possible to filter out cases where such changes are intended, e.g., a CL that directly adds a `t.Skip(…)` line to the test.

Filing this as a tracking issue.
Repository: flutter
Issue: Make sure focus works with platform views
Labels: c: new feature,engine,a: platform-views,platform-web,f: focus,P2,team-web,triaged-web

> [!NOTE]  
> This issue is a **continuation of**:
> * https://github.com/flutter/flutter/issues/137443
> * https://github.com/flutter/flutter/issues/144235

Ensure that the new focus system works well with platform views. Users should be able to tab in and out of platform views/web content as if they were using a normal web app.

(Some especial attention may be needed to handling mouse in/out if the platform view contains an `<iframe>`, because it's likely that we would never receive a `focusin` event coming from the iframe element itself.)
Repository: flutter
Issue: Skia Gold can take a screenshot before the application is launched.
Labels: platform-android,engine,team-infra,P2,triaged-infra

Or after it has crashed. This happened [in this instance](https://flutter-engine-gold.skia.org/search?issue=51496&crs=github&patchsets=2&corpus=flutter-engine) on [this patch](https://github.com/flutter/engine/pull/51496#issuecomment-2005164546).

The guidance in sheriffs chat was that it should not be triaged either negative or positive.


<img width="886" alt="image" src="https://github.com/flutter/flutter/assets/44085/7c0b0ce1-32b1-4061-93f0-c7577eb88911">
Repository: angular
Issue: Explicitly set ControlConfig as the parameter object's value type on FormBuilder#group
Labels: area: forms,forms: strictly typed

### Which @angular/* package(s) are relevant/related to the feature request?

forms

### Description

Submitting this as a feature but it could be considered a bug depending on your point-of-view.

On the `FormBuilder` service, there is the method `group` which has a myriad of people reporting GitHub bugs that aren't actually bugs, especially related to when a control's type is an array due to the less-than-intuitive nature of the syntax.

That method immediately calls the internal method `_reduceControls` which correctly constrains the type of its parameter `controls` to be: `{ [k: string]: T | ControlConfig<T> | FormControlState<T> | AbstractControl<T> }`. However, the input on the `group` method parameter named `controls` only has the constraint `{ [key: string]: any }` which is far more permissive but also far more error prone by end-users.

### Proposed solution

It'd be extremely beneficial for one of the two following solutions, with my heavy preference being on the first:

1. Update the input of `FormBuilder#group` to match that of `FormBuilder#_reduceControls` as described above.
2. Explain in either the API documentation for `FormBuilder#group` that the `any` should actually be `{ [k: string]: T | ControlConfig<T> | FormControlState<T> | AbstractControl<T> }` but is left as `any` for backwards compatibility. Then after an appropriate amount of time and deprecation notices, apply suggestion 1.

### Alternatives considered

Only real alternative for people to figure out all possible values of `group` is to read every single part of the Reactive Forms page and hope that they covered it all. From my looking, never once was `ControlConfig<T>` mentioned in any documentation.

I'm assuming that part of the reason `ControlConfig<T>` is avoided in the documentation because it causes bug reports such as the one in #48631, but as the old adage goes, "security through obscurity is not security."

I know that pinging devs directly is probably discouraged, but I want to make sure that @dylhunn sees this since he appears to be the most active participant in the various issues I checked before opening this ticket.
Repository: terminal
Issue: When a profile is removed by third-party software, the taskbar jump list remains.
Labels: Issue-Bug,Area-Settings,Product-Terminal

### Windows Terminal version

1.20.10572.0

### Windows build number

10.0.19045.0

### Other Software

Visual Studio 2022 Preview

### Steps to reproduce

Uninstall Visual Studio 2022 Preview.

### Expected Behavior

The items for the profiles automatically removed when Visual Studio 2022 Preview was uninstalled no longer appear in the taskbar jump list.

### Actual Behavior

The profiles were removed from Windows Terminal itself, but the items in the taskbar jump list remain.

The items in the New-Tab drop-down after uninstalling Visual Studio 2022 Preview.
![image](https://github.com/microsoft/terminal/assets/1977106/b7c25f16-3e72-4d37-ab28-1d249e89839e)

The items in the taskbar jump list after uninstalling Visual Studio 2022 Preview.
![image](https://github.com/microsoft/terminal/assets/1977106/6d883ffd-a88f-4b5a-b8bd-445f7088d63d)
Repository: ui
Issue: [Bug]: data-state attribute is not set on Dialog.Close because Radix Primitive don't pass it to the Close component.
Labels: bug

### Describe the bug

I notice an issue with `<Dialog/>` component where style is missing from Cross / Close button.

![Capture d’écran 2024-03-19 à 00 34 30](https://github.com/shadcn-ui/ui/assets/32040951/260e1ecd-f693-4175-8859-ca19f2f221fd)



### Affected component/components

Dialog

### How to reproduce

1. Use Dialog Primitive
2. Check in devtools if Close / X Button have `data-state`

### Codesandbox/StackBlitz link

https://stackblitz.com/~/github.com/MatteoGauthier/shadcn-ui-demo-issue-dialog-state

### Logs

_No response_

### System Info

```bash
System:
    OS: macOS 14.2.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 284.11 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - ~/Library/Caches/fnm_multishells/88432_1710758448642/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 10.1.0 - ~/Library/Caches/fnm_multishells/88432_1710758448642/bin/npm
    pnpm: 8.15.4 - /opt/homebrew/bin/pnpm
    bun: 1.0.25 - ~/.bun/bin/bun
    Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 122.0.6261.129
    Safari: 17.2.1
  npmPackages:
    next: 14.1.3 => 14.1.3
    react: ^18 => 18.2.0
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: next.js
Issue: Importing both a server component and client component causes both to be marked for client.
Labels: bug

### Link to the code that reproduces this issue

https://github.com/ChurroC/robotics

### To Reproduce

First I was trying to barrel export both a client component and a server component. Yet when I did this it gave me an error "next/headers" where I was getting cookies from and I realized it works if I import from separate files.
Though this is a small issue I wonder if there is a better way to keep client and server components separated. This would be nice so I could have both in one file instead of 2 if I'm just getting data from the server component.

### Current vs. Expected behavior

They should be independent and be marked as client or server accordingly and shouldn't both be called client.

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Thu Oct 5 21:02:42 UTC 2023
  Available memory (MB): 15867
  Available CPU cores: 20
Binaries:
  Node: 20.11.1
  npm: 10.2.4
  Yarn: N/A
  pnpm: 8.7.6
Relevant Packages:
  next: 14.2.0-canary.20 // There is a newer canary version (14.2.0-canary.30) available, please upgrade! 
  eslint-config-next: 14.1.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router

### Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local)

### Additional context

_No response_
Repository: TypeScript
Issue: Return type incorrectly inferred as void
Labels: Bug,Help Wanted

### 🔎 Search Terms

- return type, void, infer, undefined

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about

### ⏯ Playground Link

https://www.typescriptlang.org/play?ts=5.5.0-dev.20240318#code/FAFwngDgpgBAYgORgXhgCgJQoHwwAoBOA9gLYCWAzlADwCuAdgCZQBmZ9UjuAPjA82w6MA3MGABjIvQogYLegEYAXPCSpMOGAG9gMPTAJQQtAvVEBfURKky59AEwrEKdFmS4d+g0ZP0+TVnZOC1EgA

### 💻 Code

```ts
type FN = () => Promise<undefined> | undefined;

const fn1: FN = () => {
    return;
};

const fn2: FN = () => {
    return undefined;
};
```

### 🙁 Actual behavior

`fn1` is detected as returning `void`, while `fn2` is detected as returning `undefined`.

### 🙂 Expected behavior

I'm not sure it makes sense to me that the inferred type for these kinds of function is `void` rather than `undefined`, I would expect the more precise type to be inferred in this case.

Mainly there's no difference in JS between doing a `return;` and a `return undefined;`, unless `.toString()` is called on the function containing that, so TS differentiating between `return;` and `return undefined;` seems a bit weird to me.

Presumably this is something that has been considered and returning `void` is done on purpose and it's actually better on average, and requiring an explicit `return undefined;` makes sense, but I'd like to point out that there are some detectable cases where one is not `return`-ing to skip the following code, but one is explicitly returning `undefined` for no other reason than to be explicit about it, for example in this case, where the return statement is the last statement of the function, and it's not even inside an `else` branch. Like there is no other purpose to that `return` than to mean, in every way, what the longer `return undefined;` expresses, so perhaps the logic that decides whether `void` or `undefined` should be the returned type could be refined to account for this specific scenario.

Also if I'm passing a function like that as an argument that accepts `() => undefined` I feel like that should be taken into consideration, and the function in that case should "obviously" be considered as returning `undefined` rather than `void`.

### Additional information about the issue

I stumbled on this issue because at one point I'm accepting a function that has the following interface: `() => (Promise<undefined> | undefined)`, the idea is that if the function returns a promise I'll call its `then` function, and if it doesn't I'll call the `then` function on a fallback value, so I'll just end up calling something called `then` either way. Example code:

```ts
const FAKE_PROMISE = {
  then: fn => fn ()
};

const return = myFn() || FAKE_PROMISE;
 
return.then( () => {/* ... */} );
```
Repository: react
Issue: [DevTools Bug]: React Profiler reports higher hook numbers than shown in Components
Labels: Type: Bug,Component: Developer Tools

### Website or app

https://github.com/3perf/react-workshop-fwdays-mar24

### Repro steps

- Clone the https://github.com/3perf/react-workshop-fwdays-mar24 repository
- Switch to the branch called `day5`
- `cd widgets-editor && yarn && yarn start`
- An app will open. Reproduce the following interaction & record a Profiler trace:
   
   https://github.com/facebook/react/assets/2953267/fe0eb272-d136-44a6-bfe0-4f1b20ff27de
- Find the first render of the `ResizableComponent` component in the trace
- Observe React Profiler reporting “hook 32 changed” whereas the Components pane reporting only 30 hooks in the component (as in the video)

Sorry for not having a minimal repro! I was only able to reproduce this in big apps like the one attached. However, it reproduces reliably.

### How often does this bug happen?

Every time

### DevTools package (automated)

_No response_

### DevTools version (automated)

_No response_

### Error message (automated)

_No response_

### Error call stack (automated)

_No response_

### Error component stack (automated)

_No response_

### GitHub query string (automated)

_No response_
Repository: deno
Issue: Intercept requests originated from deno server
Labels: needs info

I want to build a project with optional server-side rendering. Deno was looking great for this purpose becouse of it similarity with browser APIs. But i face a problem that stops my further development: i cant catch requests from my modules on server side just how i do it for client side.

Just a very simplified example. I have a module with following content: `import('./qwe')`, and on server side i have interceptor for HTTP requests: `Deno.serve({ port: 80 }, () => new Response("Hello World"))` which is for example answering with Hello World for every HTTP request. So the final render for my module ran in browser will be a "Hello World" string. However if i try to render the same module on server i have no tools to reproduce the same response logic and as such will end up with something different (an error in case of this example becouse no such file as "./qwe" exists).

So i want my modules to work identical both on client and server. I already saw #16555 issue and i like the concept to use service workers and their fetch event as a tool to intercept requests originated from server but im totally fine with anything.
Repository: tensorflow
Issue: Aborted (core dumped) in tf.raw_ops.SparseMatrixZeros
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.13

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

binary

### TensorFlow version

tf 2.13

### Custom code

Yes

### OS platform and distribution

Ubuntu 20.04

### Mobile device

_No response_

### Python version

3.8

### Bazel version

_No response_

### GCC/compiler version

7.5.0

### CUDA/cuDNN version

12.0

### GPU model and memory

_No response_

### Current behavior?

Under specific input, `tf.raw_ops.SparseMatrixZeros` encounters "Aborted (core dumped)".
However, the parameters `dense_shape` and `type` meet the requirements in the API documentation. (https://tensorflow.google.cn/api_docs/python/tf/raw_ops/SparseMatrixZeros)

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
import numpy as np
dense_shape=tf.constant(value=np.random.randint(0,100,size=(1, 1)), shape=(1, 1), dtype=tf.int64)
type=tf.float64
name=None
tf.raw_ops.SparseMatrixZeros(dense_shape=dense_shape, type=type, name=name)
```


### Relevant log output

```shell
2024-03-19 02:18:57.223847: F tensorflow/core/framework/tensor_shape.cc:45] Check failed: NDIMS == dims() (1 vs. 2)Asking for tensor of 1 dimensions from a tensor of 2 dimensions
Aborted (core dumped)
```