sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: POST request succeeds for pages with next dev
Labels: good first issue,bug,linear: next

### Verify canary release

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

### Provide environment information


    Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64
    Binaries:
      Node: 16.14.0
      npm: 8.12.0
      Yarn: 1.22.17
      pnpm: 7.5.2
    Relevant packages:
      next: 12.2.3-canary.15
      eslint-config-next: 12.2.2
      react: 18.2.0
      react-dom: 18.2.0


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

_No response_

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

_No response_

### Describe the Bug

When you send a POST request to a page running with `next dev`, it succeeds with 200 status even though it fails with 405 status when running with `next start`

### Expected Behavior

Non-GET/HEAD requests fail with 405 status code in the same way with `next start`

### Link to reproduction

https://github.com/vercel/next.js/tree/canary/examples

### To Reproduce

```sh
$ next dev

# on another terminal
$ curl http://localhost:3000 -X POST -v
```

The problem should happen on any apps.
Repository: rust
Issue: orphan check incorrectly handles projections
Labels: A-trait-system,E-mentor,A-associated-items,P-high,I-unsound,E-medium,C-bug,T-types,A-coherence,S-triggers-future-incompat-lint

We consider projections to be foreign types during orphan check

https://github.com/rust-lang/rust/blob/7ed044c075fc0e7ad2574d3144ca00ba14608d8f/compiler/rustc_trait_selection/src/traits/coherence.rs#L780-L782

but do not consider them to be parameters when checking for uncovered types https://github.com/rust-lang/rust/blob/ceeb5ade201e4181c6d5df2ba96ae5fb2193aadc/compiler/rustc_trait_selection/src/traits/coherence.rs#L621

This is more obvious after #99552

this means that the following impl passes the orphan check even though it shouldn't
```rust
// crate a
pub trait Foreign<T, U> {
    type Assoc;
}

// crate b
use a::Foreign;

trait Id {
    type Assoc;
}

impl<T> Id for T {
    type Assoc = T;
}

pub struct B;
impl<T> Foreign<B, T> for <T as Id>::Assoc {
    type Assoc = usize;
}
```
The impl in `b` overlaps with an impl `impl<U> Foreign<T, LocalTy> for LocalTy` in another crate `c` which passes the orphan check.

While I wasn't able to cause runtime UB with this, I was able to get an ICE during `codegen_fulfill_obligation`: https://github.com/lcnr/orphan-check-ub

cc @rust-lang/types 

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"atsuzaki"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: pytorch
Issue: grid_sample and mode='bilinear' induces errors at discrete pixel locations
Labels: module: nn,triaged

### 🐛 Describe the bug

For an tensor `I`, if location `x` and `y` are integers (before normalisation), the result of bilinear interpolation of `I` at `(x,y)` should be strictly equal to `I(x,y)`. This is not currently the case when using `grid_sample` with `mode='bilinear'`.

### Reproduction steps

```python
import torch
print(f'Running PyTorch version: {torch.__version__}')

torchdevices = [torch.device('cpu')]
if torch.cuda.is_available():
  torchdevices.append(torch.device('cuda'))
  print('Default GPU is ' + torch.cuda.get_device_name(torch.device('cuda')))

for torchdevice in torchdevices:
  print('Running on ' + str(torchdevice))

  img = torch.rand(1, 1, 40, 40, device=torchdevice)
  theta = torch.zeros(1,2,3, device=torchdevice)
  theta[0,0,0] = 1
  theta[0,1,1] = 1

  align_opts = [True, False]
  for align_opt in align_opts:
    grid = torch.nn.functional.affine_grid(theta, img.shape, align_corners=align_opt)
    out = torch.nn.functional.grid_sample(img, grid, mode='bilinear', align_corners=align_opt)
    print(f"Residual with align_corners={align_opt}: {torch.linalg.vector_norm(out-img, ord=torch.inf).cpu().numpy()}")
```

### Observed behavior

```
Running PyTorch version: 1.12.0+cu113
Default GPU is Tesla T4
Running on cpu
Residual with align_corners=True: 2.768472768366337e-06
Residual with align_corners=False: 1.914799213409424e-06
Running on cuda
Residual with align_corners=True: 2.562999725341797e-06
Residual with align_corners=False: 1.0468065738677979e-06
```

### Expected behavior

`out` should be equal to `img` for an identity transformation.

### Additional context

The errors are seen in both CPU and GPU mode. This issue was first observed as part of using kornia:
https://github.com/kornia/kornia/issues/1799

### Versions

- PyTorch Version (e.g., 1.0): 1.12.0+cu113
- OS (e.g., Linux): Google colab
- How you installed PyTorch (`conda`, `pip`, source): Google colab default version
- Build command you used (if compiling from source): N/A
- Python version: 3.7.13 (default, Apr 24 2022, 01:04:09)
- CUDA/cuDNN version: cu113
- GPU models and configuration: Tesla T4
- Any other relevant information: N/A

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are
Repository: create-react-app
Issue: npm run build hangs
Labels: needs triage

npm run build  hangs
console this Creating an optimized production build... 
Compiler.run is not work
Please help me!
Repository: storybook
Issue: Svelte source code in docs shows slots and events wrong way
Labels: bug,svelte,block: source

**Describe the bug**
I have a Svelte Component with a slot and an event. On the docs page the generated source code is wrong.

Story:
```html
<Template let:args>
    <Button {...args} on:click={args.event_click}>
        {args.slot_default}
    </Button>
</Template>

<Story name="Primary" args={{primary: true, slot_default: 'Button Label'}} />
```

How source code **should** be generated:
```html
<Button primary>Button Label</Button>
```

How the source code **is actually** generated:
```html
<Button primary slot_default="Button Label" event_click={undefined}/>
```

**To Reproduce**
I created a repository to reproduce the issue https://github.com/vekunz/storybook-svelte-docs-source-bug. Just follow the instructions in the Readme.

**System**
```
  System:                                                 
    OS: Windows 10 10.0.19044                             
    CPU: (12) x64 Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
  Binaries:                                               
    Node: 16.15.1 - C:\Program Files\nodejs\node.EXE      
    npm: 8.13.2 - C:\Program Files\nodejs\npm.CMD         
  Browsers:                                               
    Chrome: 103.0.5060.114                                
    Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.62)
  npmPackages:
    @storybook/addon-actions: 6.5.9 => 6.5.9
    @storybook/addon-essentials: 6.5.9 => 6.5.9
    @storybook/addon-interactions: 6.5.9 => 6.5.9
    @storybook/addon-links: 6.5.9 => 6.5.9
    @storybook/addon-svelte-csf: 2.0.6 => 2.0.6
    @storybook/builder-vite: 0.2.0 => 0.2.0
    @storybook/svelte: 6.5.9 => 6.5.9
    @storybook/testing-library: 0.0.13 => 0.0.13
```


**Additional context**
I use Storybook to describe Svelte components. In addition I use `@storybook/addon-svelte-csf` to write the stories in `.svelte` files (otherwise it would not be possible to describe Slots).
Repository: material-ui
Issue: [Menu] ARIA APG: Disabled menu items should be focusable with keyboard navigation
Labels: accessibility,component: menu

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

1. Enter into a Menu with a disabled item
2. Use keyboard to navigate Menu
3. Observe that disabled items cannot be focused

### Expected behavior 🤔

1. Enter into a Menu with a disabled item
2. Use keyboard to navigate Menu
3. Disabled items can be focused
4. Disabled items cannot be activated

### Steps to reproduce 🕹

Steps:
https://codesandbox.io/s/mui-disabled-menu-item-keyboard-navigation-8k3rwl
1. Move focus into Menu
2. Use keyboard to navigate
3. Observe behaviour


### Context 🔦

According to APG menu/menubar pattern[1], disabled menu items should be focusable but cannot be activated (see "NOTE" in [1]).

The APG menu button pattern[2] does not override these requirements, and instead specifies that the specifications of Menu/Menubar should be followed after a menu is opened.

[1] https://www.w3.org/WAI/ARIA/apg/patterns/menu/
[2] https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/
Repository: pytorch
Issue: RuntimeError: CUDA error: no kernel image is available for execution on the device
Labels: module: cuda,triaged

### 🐛 Describe the bug

I am deploying a model using torchserve. It was easily deployed on Tesla K80 GPU. But now when i shifted it to newer GPU Nvidia A30. I am getting this error



```
torch_version: '1.12.0+cu113'
cudnn_version: 8302
```

![new](https://user-images.githubusercontent.com/89393062/180234274-d891796c-428c-412c-8ad3-e41676fa1c7b.png)


cc @ngimel
Repository: TypeScript
Issue: TypeScript reports spurious self-reference error 7022 when reading evolving array's length in variable definition
Labels: Suggestion,Experience Enhancement

# Bug Report

### 🔎 Search Terms

> implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer (7022)

> evolving array push length inference circular

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about inference
    - 4.8.0-beta (playground)
    - 4.7.4 (playground)
    - 4.6.2 (locally)
    - 3.3.3333 (playground)

### ⏯ Playground Link

https://www.typescriptlang.org/play?ts=4.7.4#code/MYewdgzgLgBCCuUAyBLaMC8MDaBdA3AFABmIATjABSiSwCmANnQLZ1iwjE4CMANDACZ+AZlwBKGAG9CMWTBroQAa0yyEyNFAB0TMAHMoAC3wwA9KZgowxOmTJ0AJjCggYhgIYA3Os4CeABx8AAzB4ZgAjWyDCGTkFWDAQKAB5FSx1VGgdNgNjMwsAckSUpQLLZn8GFGAUKAZfN3cIP0CYAvcwXwLYuV6+-oGB8xhI4Hd4CB9amAcQOmbixu8Ydxa6HsHNrd7hjuL3KBRwFbAnNBh7G3swYEcN7YehiwcUe2A6hvJLU9e6d-rvpYoM0QAB3MD3R5Q2TDKy1FDuKoAL1sWkoAHYAAwCARiDYZTRafwTQyUYqpMREAC+MXicCUmVgWDwRFIFGo4HQjBYbA4XGwfEEInEUnxDMJxIgpOUjOy+iMlMINJlmhMw1CEVseEIQA

### 💻 Code

```ts
const outList = [];
for (const element of [1, 2, 3]) {
    const ok =  outList.length; // inferred to have type `number`

    const notOk = outList.length; // 'notOk' implicitly has type 'any'
                                  // because it does not have a type
                                  // annotation and is referenced
                                  // directly or indirectly in its own
                                  // initializer.(7022)
    outList.push(notOk);
}

const okList = [];
for (const element of [1, 2, 3]) {
    okList.push(okList.length);
}
okList; // number[]

```

### 🙁 Actual behavior

The type of `notOk` cannot be inferred, and an error confusingly mentions that it references itself indirectly in its initializer. This happens for other initializations referencing `outList.length` which should have obvious types, such as `` `a string ${outList.length}` `` and `{[outList.length]: 1}` as well.

Not introducing the variable and directly `push`ing it is OK (see `okList`), resulting in correctly inferred `number[]` for `okList`.

Introducing the variable but not pushing it correctly infers the type of `outList.length` to be `number` (see `ok`).

Pushing the `outList.length` to `outList` without introducing a variable correctly infers the type of the array to be `number[]`.

### 🙂 Expected behavior

The `notOk` variable should be inferred to have type `number`, like the `ok` variable is.

As a result, the `outList` should be inferred to have type `number[]`, like the `okList` is.
Repository: material-ui
Issue: InputAdornment does not inherit FormControl disabled state 
Labels: support: question,component: text field

When placed inside a FormControl an InputBase will inherit the "Mui-disabled" class from its parent when the disabled prop is set on the FormControl. When including an InputAdornment inside said InputBase, shouldn't the same inheritance be passed to the InputAdornment? I don't see the disabled class appearing on the adornment.

I currently work around this by manually adding the "Mui-disabled" class to the InputAdornment when disabled is set, then styling on that class in the theme. I attempted to target the InputAdornment as a sibling of the InputBase with the "Mui-disabled" class but could not get it to work.
Repository: flutter
Issue: [Proposal]Add `isValid` method to FormState
Labels: a: text input,c: new feature,framework,c: proposal,P3,team-framework,triaged-framework

This feature was already requested in https://github.com/flutter/flutter/issues/48874 , and was partially developed in https://github.com/flutter/flutter/pull/48948
However, the part about having the `isValid` method on the FormState was rejected, because if we use it to disable the "submit" button, the user might not know what the errors are. https://github.com/flutter/flutter/pull/48948#issuecomment-584234140
I believe this was a good choice back then, but now we have `autovalidateMode: AutovalidateMode.onUserInteraction` where the error message would show up at the correct time. 
Therefore I'm asking you to re-evaluate this feature request.
@tjonganthony I copied your original Use case and Proposal which were perfect descriptions. I hope it's fine.

## Use case

`FormState.validate` causes all field to be validated even though the field has never been touched. There are cases when I want to only check whether the current form is valid without triggering UI changes on all the field.

For example:
I have a `Form` with 15 `FormField` and a submit button. I want to enable/disable the submit button based on whether there's a field that is notValid.
so I added `onChanged: _updateSubmitButton()` and `_updateSubmitButton()` will use the value from `formKey.currentState.validate()` to determine whether to enable or disable the submit button.

This will cause changing field 1 to make all the 15 fields to be validated and maybe show error just in order for me to disable the submit button.


## Proposal

Add an `isValid()` method to `FormState` that will check whether all the field is valid.
This will also require `isValid()` to be added to `FormFieldState` in order not to rely on `FormFieldState.validate()` which will cause the error text to appear.
Repository: next.js
Issue: duplicate meta tags in head
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: darwin
      Arch: x64
      Version: Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64
    Binaries:
      Node: 14.20.0
      npm: 6.14.17
      Yarn: 1.22.18
      pnpm: N/A
    Relevant packages:
      next: 12.2.2
      eslint-config-next: 12.0.10
      react: 17.0.2
      react-dom: 17.0.2


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

chrome, safari

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

_No response_

### Describe the Bug

some meta tags in the head are duplicated.

this can be even seen on the official nextjs page (viewport meta tag):

<img width="477" alt="Bildschirmfoto 2022-07-21 um 18 25 32" src="https://user-images.githubusercontent.com/1972353/180265292-22831eac-455e-4aeb-b9f6-c6da8c586b5d.png">

interestingly, in chrome this happens on my computer only when in a guest / icognito window.

those duplication are not present on the SSR source, so its a hydration problem

### Expected Behavior

no duplicate tags

### Link to reproduction

https://nextjs.org/

### To Reproduce

open https://nextjs.org/

use inspector, look at the head
Repository: flutter
Issue: [Proposal] Disable the browser navigation stack in the Flutter web app 
Labels: c: new feature,framework,platform-web,c: proposal,P3,customer: quake (g3),team-web,triaged-web

Disable the browser navigation stack in the Flutter web app to allow a Flutter app to act more like a Single Page Application (SPA) and manage its navigation internally 
## Use case

We have an application for iOS, Android and Web. The app works perfectly on mobile platforms, but the browser back button causes mayhem for the web application. The application has many dynamically generated pages, which makes the browser history very difficult to manage. If the user uses the navigation in the flutter app, everything is good. If the user starts using the browser's back and forward navigation, The app will regularly fall over due to this being wrong. We have no requirement for deep linking and would use the app as if it was SPA and let Flutter manage the navigation separately from the browser. i.e. if you hit back on the browser, you leave the page.    

We have looked at various ways to manage or override this behaviour, including route guards, but have failed to find a reasonable solution. 
We also tried using w iFrame, which caused cross-site scripting issues with our authentication. 

We have written several web apps in Flutter, and all of them have experienced this issue in some way.

## Proposal

What we like is the ability to switch a flutter web app from a website with full navigation controlled by the browser and Flutter to a web app that handles its own navigation. Similar to it being contained in an iframe.  

If there is already a way to do this, I would love to know. Alas, I have not found a way to this as yet.
Repository: pytorch
Issue: Dependency header directory is not properly expanded in the utils.cpp_extention in ninja mode
Labels: module: cpp-extensions,triaged

### 🐛 Describe the bug

Build pytorch_sparse use torch.utils cpp_extension throws error of no such file or directory with `use_ninja=True`
```
fatal error: parallel_hashmap/phmap.h: No such file or directory
 | #include "parallel_hashmap/phmap.h"
```

In the pytorch_sparse, setup.py file, a third_party dependency is set with relative path. It is not expanded to a absolute paths when ninja build was used. 

Proposed solution: 
Adding `convert_to_absolute_paths_inplace(include_dirs)` under this line 
https://github.com/pytorch/pytorch/blob/94090150942cea8625b9d6068e41cf2c2a88429a/torch/utils/cpp_extension.py#L601.

### Versions

PyTorch version: 1.13.0a0+08820cb
Is debug build: False
CUDA used to build PyTorch: 11.7
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.4 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.23.2
Libc version: glibc-2.31

Python version: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:10)  [GCC 10.3.0] (64-bit runtime)
Python platform: Linux-4.15.0-36-generic-x86_64-with-glibc2.10
Is CUDA available: True
CUDA runtime version: 11.7.99

cc @malfet @zou3519
Repository: PowerToys
Issue: User Feedback for Mouse Utilities to know when they get turned on
Labels: Idea-Enhancement,Area-User Interface,Product-Mouse Utilities

### Description of the new feature / enhancement

Provide the option for a system notification to fire when Mouse Pointer Crosshairs or Mouse highlighter is activated that will inform the user the tool has been activated as well as how to deactivate the tool.

### Scenario when this would be used?

Currently, mouse highlighter has no feedback to signify when it's been activated until you click for the first time, which can be slightly disorienting. However, this also comes in handy for users who use the feature infrequently, activate it by accident, then can't figure out how to deactivate it without referencing the power toys settings.

### Supporting information

_No response_
Repository: vscode
Issue: File Decorations for Search Folders 
Labels: feature-request,search

Currently, there are file decorations on individual file matches, but not for the directory that they are in. By adding `fileDecorations: { colors: true, badges: true }` within the `setFile` options [here](https://github.com/microsoft/vscode/blob/7dc8e247b7583c79659ca6c8c6ff6605ec1cf991/src/vs/workbench/contrib/search/browser/searchResultsView.ts#L118) and [here](https://github.com/microsoft/vscode/blob/7dc8e247b7583c79659ca6c8c6ff6605ec1cf991/src/vs/workbench/contrib/search/browser/searchResultsView.ts#L120), this adds file decorations on the directories, but these correspond to everything contained in the directory, even those that aren't visible in the search results.

Ideally, the directories would have indicators that actually reflect that contained search results' decorations.
Repository: rust
Issue: Tracking Issue for Transmutability Trait: `#[transmutability]`
Labels: T-libs-api,C-tracking-issue,F-transmutability

Feature gate: `#![feature(transmutability)]`

This is a tracking issue for [MCP411: *Lang Item for Transmutability*](https://github.com/rust-lang/compiler-team/issues/411). The MCP defines an experimental, compiler-implemented trait that can be used to audit whether a particular transmutation (or other form of bit-reinterpretation cast) is safe. 

At this time, this feature is **NOT** on track to stabilization. It has been specified in an MCP, not an RFC, and will likely require an RFC to be tracked for stabilization.

### Public API

The public API of this feature (which may have evolved since this issue's last update), is roughly as follows:
```rust
pub unsafe trait TransmuteFrom<Src, const ASSUME: Assume = { Assume::NOTHING }>
where
    Src: ?Sized,
{
    unsafe fn transmute(src: Src) -> Self
    where
        Src: Sized,
        Self: Sized,
    {
        ...
    }
}

#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub struct Assume {
    pub alignment: bool,
    pub lifetimes: bool,
    pub safety: bool,
    pub validity: bool,
}

impl Assume {
    pub const NOTHING: Self =
        Self { alignment: false, lifetimes: false, safety: false, validity: false };

    pub const ALIGNMENT: Self = Self { alignment: true, ..Self::NOTHING };
    pub const LIFETIMES: Self = Self { lifetimes: true, ..Self::NOTHING };
    pub const SAFETY: Self = Self { safety: true, ..Self::NOTHING };
    pub const VALIDITY: Self = Self { validity: true, ..Self::NOTHING };

    pub const fn and(self, other_assumptions: Self) -> Self { ... }
    pub const fn but_not(self, other_assumptions: Self) -> Self { ... }
}
```

### Steps / History

- [x] MCP: https://github.com/rust-lang/compiler-team/issues/411
- [ ] Implementation:
  - [x] https://github.com/rust-lang/rust/pull/92268
  - [x] https://github.com/rust-lang/rust/pull/100726
- [ ] RFC: #...
- [ ] Final comment period (FCP)[^1]
- [ ] Stabilization PR

### Unresolved Questions
Virtually all aspects of this experimental feature are unresolved. 

* [What can we transmute to and from a union?](https://github.com/rust-lang/rust/pull/92268#discussion_r925254503)
* Naming of fields: 
    * https://github.com/rust-lang/rust/pull/121681#discussion_r1507906666
* [What kind of transmute to model?](https://rust-lang.zulipchat.com/#narrow/stream/216762-project-safe-transmute/topic/What.20'kind'.20of.20transmute.20to.20model.3F) 
* [Is the transmute-via-union example fully specified?](https://github.com/rust-lang/rust/pull/129032#discussion_r1728026738)

[^1]: https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html