sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Ability to infer lifetime of closure argument depends on syntax
Labels: T-compiler,A-inference,C-bug

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
use futures::future::BoxFuture;
use futures::FutureExt;
use std::sync::Arc;

type Result<T, E = String> = std::result::Result<T, E>;
struct InterpreterInner;

pub struct Interpreter {
    inner: Arc<InterpreterInner>,
}

enum Value {
    Pumpkin,
}

enum Node {
    A,
    B,
}

impl Interpreter {
    fn visit<'a>(
        &self,
        node: Node,
    ) -> Arc<dyn (Fn(&Arc<InterpreterInner>) -> BoxFuture<'static, Result<Value>>) + Send + Sync>
    {
        match node {
            Node::A => Arc::new(self.visit_object(vec![])),
            _ => panic!(),
        }
    }

    fn visit_object<'a>(
        &self,
        values: Vec<Node>,
    ) -> impl Fn(&Arc<InterpreterInner>) -> BoxFuture<'static, Result<Value>> {
        let values = values
            .into_iter()
            .map(|x| {
                match x {
                    Node::B => {
                        /* THIS VERSION WORKS

                        Arc::new(move |_: &'_ _| { async move { Ok(Value::Pumpkin) }.boxed() })
                        */

                        Arc::new(move |_| async move { Ok(Value::Pumpkin) }.boxed())
                    }
                    x => self.visit(x),
                }
            })
            .collect::<Arc<[_]>>();

        move |_inner| {
            let _values = Arc::clone(&values);

            async move { Ok(Value::Pumpkin) }.boxed()
        }
    }
}
```

I expected to see this happen: The code should compile

Instead, this happened: The code only compiles if I use the commented out version of the innermost closure (i.e. specify explicitly that I'd like the lifetime to be inferred).

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.75.0-nightly (9d1e4b787 2023-10-11)
binary: rustc
commit-hash: 9d1e4b7870f0aecb9f53e71f3cca3529b21d677a
commit-date: 2023-10-11
host: x86_64-unknown-linux-gnu
release: 1.75.0-nightly
LLVM version: 17.0.2
```
Repository: pytorch
Issue: [dynamo] Skipping the entire frame when graph breaking in for/while loop is excessive
Labels: triaged,enhancement,oncall: pt2,module: dynamo

### 🚀 The feature, motivation and pitch

If instead, one allows the entirety of the for/while loop region to become a graph break, then one can instead create a call to resume after the for/while loop (as an epilogue).

We can use the backedge detection to know which regions of code have backedges and which are straight line.

So instead of doing this:
```python
# break the graph
self.output.compile_subgraph(
    self, reason=GraphCompileReason("store_attr", [self.frame_summary()])
)
self.output.add_output_instructions([copy.copy(inst)])
self.popn(2)
self.output.add_output_instructions(
    self.create_call_resume_at(self.next_instruction)
)
```

Do something like this

```python
if self.has_backedge():
    # The smallest offset of the relevant backedges's destination
    self.output.reset_to_natural_loop_entry(self.natural_loop_entry)
    self.output.compile_subgraph(
        self, reason=GraphCompileReason("store_attr", [self.frame_summary()])
    )
    # Relevant backedges = backedge that will return to offset prior to current offset
    loop_code, next_instruction = self.get_instructions_for_current_natural_loop()
    self.output.add_output_instructions(loop_code) 
    self.popn(2)
    self.output.add_output_instructions(
        self.create_call_resume_at(next_instruction)
    )
```

Anw, there's a concept in compiler theory - "natural loops" - to be more precise about what region we need to suspend tracing on.

cc @ezyang @anijain2305 @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @msaroufim @wconstab @bdhirsh @zou3519 @aakhundov
Repository: flutter
Issue: Feat: add a query parameter on goBranch
Labels: c: new feature,c: proposal,P3,p: go_router,team-go_router,triaged-go_router

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

In my case I have query parameter should also pass on next page. But in my case I am using StatefulShellRoute so I am using the `goBranch` method but the problem is that this goBranch does not have queryParameter in function

### Proposal

Add a query params on `goBranch`
Repository: godot
Issue: Blender imported objects do not keep set transforms in embeded scenes after re-saving the blend file.
Labels: bug,needs testing,topic:import

### Godot version

v4.1.1.stable.mono.official [bd6af8e0e]

### System information

Godot v4.1.1.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 6600 (Advanced Micro Devices, Inc.; 31.0.14051.1000) - AMD Ryzen 7 2700X Eight-Core Processor (16 Threads)

### Issue description

Imported .blend file objects reset their transform back to the world origin after saving the blend file, only if the object is embedded in another scene.

Expected behavior is that the object keeps its transform in Godot, even after saving the object in blender.

### Steps to reproduce

1. Create a .blend file with the default cube.
2. Save the cube into the resources folder of the Project from blender. (its important that you save directly into the resources folder to not confuse blender, or yourself.)
3. Create two scenes in Godot. I named them "Game Scene" and "Level Scene" for simplicity.
4. Place the "Level Scene" into the "Game Scene".
5. In Godot, Drag and Drop the blend file into the "Level Scene" and place it away from the scene origin.
6. Save "level scene".
7.  Re-save the blend file in blender (you can make an edit to it to confirm its been changed.)
8. In Godot, compare the location of the object between the "level scene" and the "game scene" - The level scene should retain the correct transform of the object, while the game scene has the object's transform set to the scene's origin.

### Minimal reproduction project

N/A
Repository: pytorch
Issue: Multi Scale Deformable Attention Support
Labels: feature,module: nn,triaged,module: sdpa

### 🚀 The feature, motivation and pitch

Multi-scale deformable attention has gained traction in many recent birdseye view and 3d model papers. It provides a lot of performance improvements over doing full attention as it samples a subset of the possible queries rather than computing attention across all keys.

Example Papers:
* https://arxiv.org/abs/2010.04159
* https://arxiv.org/abs/2302.12251
* https://arxiv.org/abs/2203.17270

There's a handful of fragmented implementations available. It would be great to have this be usptreamed to PyTorch core given the number of papers using it now.

These existing implementations have a lot of issues such as not supporting different data types and not using the torch ops registration.

Example Implementations
* https://github.com/open-mmlab/mmcv/blob/1.x/mmcv/ops/multi_scale_deform_attn.py#L23
* https://github.com/fundamentalvision/Deformable-DETR/blob/main/models/ops/functions/ms_deform_attn_func.py

The existing implementations are licensed under Apache 2.0 -- is it possible to upstream as is or would it require a complete rewrite or relicensing under BSD to match PT core?

### Alternatives

Installing a third party library from source or using mmcv which has many many dependencies

### Additional context

_No response_

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @bhosmer @cpuhrsch @erichan1 @drisspg
Repository: excalidraw
Issue: Images not appearing in Collaborative view
Labels: images

Hi there 

I spent a lot of time preparing a board to share with my team and once I made it live I found that none of the images I uploaded are appearing. This is what it looks like 
![image](https://github.com/excalidraw/excalidraw/assets/1919707/56806c05-b333-4034-92b1-2bdd7cd57882)
Is there a way I can get images to load in Collaborative view? 
I drag and dropped them into Excalidraw

Kind regards
Repository: vscode
Issue: API: WorkspaceEdit definition documentation does not match behavior
Labels: bug,api,under-discussion,workspace-edit

The WorkspaceEdit class API documentation incorrectly states that set will **replace** edits with the same resource when the implementation actually **appends** edits.


```ts
/**
 * Set (and replace) text edits or snippet edits for a resource.
 */
```

https://github.com/microsoft/vscode/blob/6e1425c35a4e7ee5fab4cc9cfec6c0dc0642a256/src/vscode-dts/vscode.d.ts#L3941-L3947


```ts
if (!edits) {
    // remove all text, snippet, or notebook edits for `uri`
    /* ... */
} else {
    // append edit to the end
    /* ... */
```


https://github.com/microsoft/vscode/blob/6e1425c35a4e7ee5fab4cc9cfec6c0dc0642a256/src/vs/workbench/api/common/extHostTypes.ts#L869-L888

I believe the `vscode.d.ts` file should be changed to match the behavior.
Repository: PowerToys
Issue: Office365 programs not using complete zone when using multiple monitors
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.75.1

### Installation method

PowerToys auto-update

### Running as admin

No

### Area(s) with issue?

FancyZones

### Steps to reproduce

Fancyzones doesn't use the complete zone for some programs when I use my ultrawide monitor and my laptop screen.
This only happens with office365 programs (outlook, onenote, word).
When using only one screen (ultrawide or laptop screen) fancyzones works like it should.

Ultrawide resolution 3440x1440
Laptop resolution 2880x1800

Right corner of the zone not being used
![image](https://github.com/microsoft/PowerToys/assets/95379285/dfc8f174-97c9-4381-9b0b-235a7f58703c)
Fancyzone settings
![image](https://github.com/microsoft/PowerToys/assets/95379285/acd53c2f-bd24-4029-94d3-727406ff7090)



### ✔️ Expected Behavior

That the zone would be used completely with office365 programs

### ❌ Actual Behavior

The left and right corners of the zone are not being used with office365 programs

### Other Software

Office365 version 2310 (build 16924.20124 click to run)
Repository: opencv
Issue: When running the C++OpenCV code on RK3588 hardware, the program was able to run normally before, but would occasionally crash at some point. The Log showed that the error occurred in the   CV::Mat::Copyto.::upload functiong
Labels: bug,category: ocl,platform: arm

### System Information

OpenCV version: 4.7.0
Operating System / Platform: Ubuntu 20.04
Compiler & compiler version: GCC 11.3



### Detailed description

We are working on a 360 panoramic splicing project.  In the code, we use the CV::Mat::Copyto function under multi-threading to copy the pictures obtained by the camera from the CPU to the GPU, and convert them from mat to Umat format. Then it runs normally on the bus, but the program crashes after about a week. This has happened three times. Through the logs, it is found that it is a problem with the copyto::upload function code in Opencv. We cannot reproduce this problem in the laboratory environment because it can always run normally in the laboratory. Therefore, we suspect that it is a problem with the opencv::copyto function.

The detailed log is as follows

0x00000071b287968 in cv::error (cv: Exception const&) () from /mnt/system/mvsystem/lib/libKeylabAVM.so
0x0000007fb28b8b9c in cv::error (int, Cxx11: :basic_ string<char, std:: char_ traits, std: :allocator > const&, char const*, char const*, int) () from /mnt/system/mvsystem/lib/libKeylabAVM.so
0x0000007fb284b47c in cv::oc1::OpenCLAllocator: :upload (cv::UMatData*, void const*, int, unsigned long unsigned long const*, unsigned long const*, () from /mnt/system/mvsystem/lib/libKeylabAVM.so 579 580 581 282 583 584 585 ：86 587
0x0000007£b2762988 in cv: Mat: :copyTo (cv: :_OutputArray consts) from /mnt/system/mvsystem/lib/libKeylabAVM.so
 0x00000071b26791a8 in nameKeylabAVM: KeylabAVMOnline:: Inference RectifyBird

### Steps to reproduce

![278255766-509eae80-0715-4b6e-b7f7-ac2482f44675](https://github.com/opencv/opencv/assets/39620243/985de8d7-ec23-4c43-8218-437e0ad293c2)


### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: go
Issue: x/tools/gopls: staticcheck QF1003 quickfix produces corrupted textedit
Labels: NeedsInvestigation,gopls,Tools

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### gopls version

<!--
Output of `gopls -v version` on the command line
-->
Build info
----------
golang.org/x/tools/gopls v0.14.1
    golang.org/x/tools/gopls@v0.14.1 h1:XaTETpi7Q67XO8nftquJitcx+9c2bPclO8Kz2sBVvec=
    github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
    github.com/google/go-cmp@v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/exp/typeparams@v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW
6Y=
    golang.org/x/mod@v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
    golang.org/x/sync@v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
    golang.org/x/sys@v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
    golang.org/x/telemetry@v0.0.0-20231011160506-788d5629a052 h1:1baVNneD/IRxmu8JQdBuki78zUqBtZxq8smZXQj0X2Y=
    golang.org/x/text@v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
    golang.org/x/tools@v0.14.1-0.20231026192422-8b5abd452b28 h1:5YgdZAe2w0x3Xrjv0+GXrI0jvm7qCQK/ySGFfiEHMfU=
    golang.org/x/vuln@v1.0.1 h1:KUas02EjQK5LTuIx1OylBQdKKZ9jeugs+HiqO5HormU=
    honnef.co/go/tools@v0.4.5 h1:YGD4H+SuIOOqsyoLOpZDWcieM28W47/zRO7f+9V3nvo=
    mvdan.cc/gofumpt@v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=
    mvdan.cc/xurls/v2@v2.4.0 h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc=
go: go1.20.7



### go env

<!--
Output of `go env` on the command line in your workspace directory
-->
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/toad/Library/Caches/go-build"
GOENV="/Users/toad/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/toad/work/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/toad/work"
GOPRIVATE=""
GOPROXY="https://goproxy.io,direct"
GOROOT="/Users/toad/go/go1.20.7"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/toad/go/go1.20.7/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20.7"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/toad/work/demo5/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-pre
fix-map=/var/folders/g1/tgmnlrdn3vxgv08kdgh9vpkw0000gn/T/go-build1758453573=/tmp/go-build -gno-record-gcc-switc
hes -fno-common"

### What did you do?

https://github.com/golang/go/assets/14021602/5c47c32c-c56d-416c-bf32-2b4b8e3056d7

### What did you expect to see?

https://github.com/golang/go/assets/14021602/243dcbf8-f4f7-4559-b848-2c8ff2c902be

I found the problem on "honnef.co/go/tools" and I will commit PR to that repository for fixing the problem.
Repository: deno
Issue: Loading unprepared module: npm:react
Labels: bug,swc

I have the following configuration:

```json
{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "npm:react"
  }
}
```

And this code:

```jsx
const TabButton = (tab) => {
  const props = { className: tab };

  return (
    <button {...props} key={tab}>
      {tab}
    </button>
  )
}
```

When I run it, I get the following error:

```
error: Loading unprepared module: npm:react, imported from: file:///Users/oscarotero/www/jsx/main.jsx
```

If I change the order of the properties (`key` first) it works fine:

```jsx
const TabButton = (tab) => {
  const props = { className: tab };

  return (
    <button key={tab} {...props}>
      {tab}
    </button>
  )
}
```

It works fine also with other properties names that are not `key`:

```jsx
const TabButton = (tab) => {
  const props = { className: tab };

  return (
    <button {...props} foo={tab}>
      {tab}
    </button>
  )
}
```

or after removing the object destructuring:

```jsx
const TabButton = (tab) => {
  return (
    <button className={tab} key={tab}>
      {tab}
    </button>
  )
}
```

In summary, JSX seems to fail if there's a destructuring assignment syntax before the `key` property. A very weird error.
Repository: deno
Issue: Deno has panicked reading from stdin with the `--unstable-hmr` flag
Labels: bug,--watch

I was testing the new HMR feature introduced in Deno 1.38 and noticed that the following code makes Deno to panick:

```
echo "import './main.js'" | deno run --unstable-hmr -
```
Repository: flutter
Issue: [webview_flutter] Handle long press link on ios
Labels: c: new feature,platform-ios,p: webview,package,P2,team-ios,triaged-ios

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

When I navigate in the iOS app, clicking on a link redirects me to the URL and works as expected. However, if the user long-presses the link, a popup appears:

![1ead1c25-ceda-4cbe-821e-cee6fc6d52e4](https://github.com/flutter/flutter/assets/51075493/87cc19f8-22f5-4c87-8aad-42274a6a93ae)

When the user clicks 'Open Link,' it

    Launches the URL in a browser instead of inside the app.

I want this popup to simply disappear. How can I disable it?"

### Proposal

I've read this github issue and updated it with my issues and specs : https://github.com/flutter/flutter/issues/43792

the solution found in this issue not working with new version of webview_flutter.

https://github.com/flutter/flutter/issues/43792#issuecomment-1792268827

thank you for helping with this :)
Repository: three.js
Issue: OrbitControls: `zoomToCursor` weird behavior after certain rotations.
Labels: Addons

### Description

I found this using zoomToCursor enabled with screenSpacePanning set to false, after certain rotations the zoom to cursor become inconsistent and sometimes goes back to normal after rotating again.
I was able to reproduce this in the map controls example too.

### Reproduction steps

1. go to [map example](https://threejs.org/examples/#misc_controls_map)
2. enable zoomToCursor
3. change rotation to go the lowest possible in the city (there may be other ways but this make it happen consistently)
4. try to zoom


### Code

https://threejs.org/examples/#misc_controls_map

### Live example

https://threejs.org/examples/#misc_controls_map

### Screenshots

https://github.com/mrdoob/three.js/assets/18497523/77b1c234-bb29-413d-b3e0-a98e33cfe331



### Version

r158

### Device

Desktop

### Browser

Chrome

### OS

MacOS
Repository: pytorch
Issue: High dimensional grid sample
Labels: module: cuda,triaged,enhancement

### 🚀 The feature, motivation and pitch

 I want to implement an arbitrary dimensional grid sampler within PyTorch. However, PyTorch only implements a 2D/3D grid sampler. I think some C++/CUDA codes in `GridSampler.xxx` located in `aten/src/ATen/native/cuda `should be modified, but I do not know whether other files in other folders should be modified? Any Tips are appreciated.

### Alternatives

_No response_

### Additional context

_No response_

cc @ptrblck
Repository: pytorch
Issue: CSR matrix on MPS
Labels: module: sparse,triaged,module: mps

### 🚀 The feature, motivation and pitch

I'm working on language models and other nlp tasks and would like convert classic script sparse matrix to torch car and run it on MPS device to be possible. 

```
X = v.transform(samples.iloc[[1, 2, 3]]["query"])

X
```

<3x214000 sparse matrix of type '<class 'numpy.float64'>'
	with 92 stored elements in Compressed Sparse Row format>

```
torch.sparse_csr_tensor(torch.tensor(X.indices, dtype=torch.int64),
                        torch.tensor(X.indptr, dtype=torch.int64),
                        torch.tensor(X.data), dtype=torch.double).to(device)
```
                        
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
[/Users/fedorkurusin/Documents/work/entity_classification/category_model.ipynb](https://file+.vscode-resource.vscode-cdn.net/Users/fedorkurusin/Documents/work/entity_classification/category_model.ipynb) Cell 20 line 6
      [1](vscode-notebook-cell:/Users/fedorkurusin/Documents/work/entity_classification/category_model.ipynb#X36sZmlsZQ%3D%3D?line=0) # crow_indices = [0, 2, 4]
      [2](vscode-notebook-cell:/Users/fedorkurusin/Documents/work/entity_classification/category_model.ipynb#X36sZmlsZQ%3D%3D?line=1) # col_indices = [0, 1, 0, 1]
      [3](vscode-notebook-cell:/Users/fedorkurusin/Documents/work/entity_classification/category_model.ipynb#X36sZmlsZQ%3D%3D?line=2) # values = [1, 2, 3, 4]
      [4](vscode-notebook-cell:/Users/fedorkurusin/Documents/work/entity_classification/category_model.ipynb#X36sZmlsZQ%3D%3D?line=3) torch.sparse_csr_tensor(torch.tensor(X.indices, dtype=torch.int64),
      [5](vscode-notebook-cell:/Users/fedorkurusin/Documents/work/entity_classification/category_model.ipynb#X36sZmlsZQ%3D%3D?line=4)                         torch.tensor(X.indptr, dtype=torch.int64),
----> [6](vscode-notebook-cell:/Users/fedorkurusin/Documents/work/entity_classification/category_model.ipynb#X36sZmlsZQ%3D%3D?line=5)                         torch.tensor(X.data), dtype=torch.double).to(device)

RuntimeError: Unsupported device type for SparseCsr layout: mps

### Alternatives

_No response_

### Additional context

_No response_

cc @alexsamardzic @nikitaved @pearu @cpuhrsch @amjames @bhosmer @kulinseth @albanD @malfet @DenisVieriu97 @razarmehr @abhudev