sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Read-only --extensions-dir break remote extension installation
Labels: bug,extensions

<!-- ⚠️⚠️ 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?: No. (The issue is about _installing_ extensions on a remote system.)

<!-- 🪓 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.67.2
- OS Version: Ubuntu 18.04

Steps to Reproduce:

1. Start VSCode with `code --extensions-dir /path/to/read-only-tree-of-extensions`. (Why read-only? Because that's how [Nix](https://github.com/nixos/nix) does software deployment. This command just reproduces how `vscode-with-extensions` from [Nixpkgs](https://github.com/nixos/nixpkgs) works.)
2. Check that the extensions from the local tree is available.
3. Open a remote ssh connection and try to install one of the local extensions to the remote system.
4. VSCode errors out with `Unable to write file '/home/$USER/.vscode-server/extensions/.6661fce6-c826-4679-8f01-8421850781b5/package.json' (EntryWriteLocked (FileSystemError): Error: EACCES: permission denied, open '/home/$USER/.vscode-server/extensions/.6661fce6-c826-4679-8f01-8421850781b5/package.json')`

It seems VSCode first copies files from the local system `/path/to/read-only-tree-of-extensions` to `~/.vscode-server/` on the remote host and then tries to update `~/.vscode-server/extensions/.UUID/package.json` (still on the remote), which fails because the file still has read-only permissions.

I tried to chmod the files myself, but it seems VSCode creates a new UUID every time, so it doesn't work.

When copying extensions/files from somewhere to $HOME on a remote machine, with the intention to update some of the files, I think it's reasonable to explicitly set the writeable bit on said files, after the copy operation completes.
Repository: flutter
Issue: Can't drag to select with a mouse in TextField on iOS/iPadOS
Labels: a: text input,framework,f: material design,found in release: 3.0,found in release: 3.1,team-design,triaged-design

Dragging to select with a mouse on a TextField should select the range of text from the position where the drag started to the position where the drag moves to. On iPad it selects a few characters and stops.

Tested on master & stable.

https://user-images.githubusercontent.com/948037/172697035-39036d12-a1e1-4d1d-8295-02010af12cf5.mov

### To reproduce

  1. Run any app with text field, such as the one below.
  2. Focus the field and enter a couple of lines of text.
  3. Drag from one position in the text to another position.


Expected: The text between the start position of the drag and moved position of the drag is selected.
Actual: Few characters are selected and then stops.

<details>

<summary>Code</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final TextEditingController _controller = TextEditingController(text: 'Atwater Peel Sherbrooke Bonaventure');

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: TextField(
          controller: _controller,
        ),
      ),
    );
  }
}
```

</details>
Repository: pytorch
Issue: Redundant info are saved when using torch.save to save part of torch.tensor
Labels: module: serialization,triaged

### 🐛 Describe the bug

I am trying to save part of a very large torch.tensor by indexing it. But the saved partial tensor is always as the same size as the original one. 

To reproduce:
```python
import torch

a = torch.ones([100,100])
torch.save(a, 'full.pt') #file full.pt is 40.7kB (size is reported by nautilus on Ubuntu 20.04)
torch.save(a[0], 'partial0.pt') #file partial0.pt is 40.7kB
torch.save(a[:1], 'partial1.pt') #file partial1.pt is 40.7kB


b = torch.ones([1,100])
torch.save(b, 'partial2.pt') #file partial2.pt is 1.1kB
```
But when I load the file ```partial0.pt``` and ```partial1.pt``` back to torch.tensor, they are of the size that I want. 


### Versions

PyTorch version: 1.11.0
Is debug build: False
CUDA used to build PyTorch: 11.3
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.16.3
Libc version: glibc-2.31

Python version: 3.10.4 (main, Mar 31 2022, 08:41:55) [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.14.0-1042-oem-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: 11.6.124
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3070
Nvidia driver version: 510.47.03
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.4.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.22.3
[pip3] torch==1.11.0
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               11.3.1               h2bc3f7f_2  
[conda] libblas                   3.9.0            12_linux64_mkl    conda-forge
[conda] mkl                       2021.4.0           h06a4308_640  
[conda] mkl-service               2.4.0           py310h7f8727e_0  
[conda] mkl_fft                   1.3.1           py310hd6ae3a3_0  
[conda] mkl_random                1.2.2           py310h00e6091_0  
[conda] numexpr                   2.8.0           mkl_py310h22e654f_0    conda-forge
[conda] numpy                     1.22.3          py310hfa59a62_0  
[conda] numpy-base                1.22.3          py310h9585f30_0  
[conda] pytorch                   1.11.0          py3.10_cuda11.3_cudnn8.2.0_0    pytorch
[conda] pytorch-mutex             1.0                        cuda    pytorch


cc @mruberry
Repository: godot
Issue: [GodotPhysics] Thin RigidDynamicBody3D oscillates and doesn't settle in simple box-box collisions
Labels: bug,confirmed,topic:physics,topic:3d

___

***Bugsquad note:** This issue has been confirmed several times already. No need to confirm it further.*

___

### Godot version

v4.0.alpha9.official [fc18891db]

### System information

Windows 10

### Issue description

Dropping a RigidDynamicBody3D with a BoxShape collider onto a StaticBody3D with a BoxShape collider often results in the rigid body oscillating continuously after landing.

The expectation is that the rigid body will settle to a complete stop.

[Video](https://user-images.githubusercontent.com/81129/172707523-f1ea7bf6-354f-42f5-aac6-213d8a2d2aec.mp4)

### Steps to reproduce

Click to drop the tile onto the floor. Watch it wobble!

All physics properties on both the tile and the floor are defaults. Gravity has been increased in the project settings to match the project where I was experiencing the issue, but the issue still occurs with the default 9.8.

### Minimal reproduction project

[BugPhysicsOscillation.zip](https://github.com/godotengine/godot/files/8864724/BugPhysicsOscillation.zip)
Repository: kubernetes
Issue: Ways tune conformance test "garbage collector should orphan pods created by rc if delete options say so"
Labels: sig/api-machinery,kind/feature,help wanted,sig/testing,triage/accepted

### What would you like to be added?

I want to be able to tune (or have some ways to make the test to pass) the conformance test "garbage collector should orphan pods created by rc if delete options say so". e.g. can we deploy less number of pods, so it won't cause CPU pressure?

### Why is this needed?

I am running the conformance test against a single-node cluster and this test keeps failing about half of the time with the following error:

```
• Failure [42.737 seconds]
[sig-api-machinery] Garbage collector
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/apimachinery/framework.go:23
  should orphan pods created by rc if delete options say so [Conformance] [It]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:630

  Jun  8 18:51:29.857: expect 88 pods, got 87 pods
```

I found that one of the pod got preempted by istiod (which got autoscaled up by with reason "cpu").

scheduler log:
```
Jun  8 18:51:29.874: INFO: At 2022-06-08 18:51:17 +0000 UTC - event for simpletest.rc-rsx5r: {default-scheduler } Preempted: Preempted by xxx-system/istiod-xxx on node vm-control-0--723553120d2237b-5a0b43f6762f5487.lab.anthos
```
Repository: PowerToys
Issue: [AlwaysOnTop] Sound played when pin/unpin fail
Labels: Issue-Bug,Help Wanted,Area-Quality,Product-Always On Top

### Microsoft PowerToys version

0.59.0

### Running as admin

- [ ] Yes

### Area(s) with issue?

Always on Top

### Steps to reproduce

- Sound is played if you try to pin/unpin desktop/taskbar/taskview/start but there is no window to pin/unpin.
- If for some reason pin/unpin of a window fail, the sound is played the same (PT Running non elevated and try to pin an elevated window).

https://github.com/microsoft/PowerToys/blob/a11f9ab4c9852265c396a167b8d73fb3d516cedd/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.cpp#L162
Result of `UnpinTopmostWindow` and `PinTopmostWindow` is not checked.

### ✔️ Expected Behavior

Sound played

### ❌ Actual Behavior

Sound not played

### Other Software

_No response_
Repository: pytorch
Issue: PyTorch/XLA's DDP XLABackend is broken by upstream change
Labels: oncall: distributed,triaged,module: xla,module: ddp

### 🐛 PyTorch/XLA's DDP hangs

 In https://github.com/pytorch/xla/commit/841e0d3cab9555ce6ca03de5e0498c1310a01ba2 @hjm-aws introduced the `XLABackend` which enabled the DDP for PyTorch/XLA. However this is currently broken due to that subclassing of `Work` class(PyTorch/XLA has a `WorkXla`) is broken. The result is that when `wait` is being called `WorkXla::wait` is not correctly trigger and the default wait will be used and process will hang. 

More detail XLA issue can be found in https://github.com/pytorch/xla/issues/3625

### Versions

PyTorch: nightly
PyTorch/XLA: nightly

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @kwen2501 @bdhirsh
Repository: rust
Issue: Can't return reference to passed-in referent that is assigned in a loop
Labels: A-borrow-checker,T-compiler,A-NLL,C-bug,A-control-flow,fixed-by-polonius

I tried this code:

```rust
struct C;

fn inout<'cfg>(c_out: &'cfg mut C) -> &'cfg C {
    loop {
        *c_out = C;
        let r = &*c_out;
        if true {
            break r;
        }
    }
}

fn main() {
    let mut c = C;
    inout(&mut c);
}
```

I expected to see this happen: it compiles and runs

Instead, this happened: it [fails to compile](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=16baa5da9afc285b01d8a351bdd28bbd) with the error:

```
error[E0506]: cannot assign to `*c_out` because it is borrowed
 --> src/main.rs:5:9
  |
3 | fn inout<'cfg>(c_out: &'cfg mut C) -> &'cfg C {
  |          ---- lifetime `'cfg` defined here
4 |     loop {
5 |         *c_out = C;
  |         ^^^^^^^^^^ assignment to borrowed `*c_out` occurs here
6 |         let r = &*c_out;
  |                 ------- borrow of `*c_out` occurs here
7 |         if true {
8 |             break r;
  |                   - returning this value requires that `*c_out` is borrowed for `'cfg`
```

It's worth noting that the code builds fine if the `break` is unconditional.

Even though the reproduction is somewhat different, this _feels_ related to https://github.com/rust-lang/rust/issues/92984

### Meta

Happens on 1.61.0 stable, beta, and nightly.

Nightly Rust version from playground:
```
1.63.0-nightly
2022-06-07 5435ed6916a59e8d5acb
```

### Hard mode

If you're looking for test cases, may also be worth including this one, which "launders" the lifetime through a `for<'a>`:

```rust
struct C;

fn inout<'cfg, F>(c_out: &'cfg mut C, f: F) -> &'cfg C
where
    for<'c> F: Fn(&'c C) -> &'c C,
{
    loop {
        *c_out = C;
        let c = &*c_out;
        let r = f(c);
        if true {
            break r;
        }
    }
}

fn main() {
    let mut c = C;
    inout(&mut c, |c| c);
}
```
Repository: pytorch
Issue: _make_elementwise_unary_reference and other function factories in torch._refs don't set __name__ correctly
Labels: triaged,module: primTorch

### 🐛 Describe the bug

```
>>> import torch._refs
>>> torch._refs.abs.__name__
'_ref'
```

This is problematic for FX because FX uses the `__name__` to recompile the function back into Python, and cannot do so if it looks like this; it will silently miscompile the code.

functools.wraps does not help as there is no "real" function to wrap.

### Versions

master

cc @ezyang @mruberry @ngimel
Repository: go
Issue: cmd/compile: opt should match rules through phis
Labels: Performance,NeedsInvestigation,compiler/runtime

The ssa opt pass currently abort matching if the rule go through a phis.

For example:
```go
if c {
  y = -y
} else {
  y *= 2
}
x += y
```
Should be rewriten:
```go
if c {
  x -= y
} else {
  x += y * 2
}
```
The necessary rules for that optimization already exists, but they can't be applied since a phi node is in the way.

When encountering a phi node opt should start a routine to apply the rule on all branches where that would remove uses of the previous values in that branch (this is because we don't want to generate dupped code that would slower) (and generate a new fallback block that applies the current operation for branches that didn't matched).

This could lead to a jump in codesize since multiple branches might have the same rules applies to them.
A pass that perform CSE but downward in the control flow would regain that lost space.

The extra compilation time cost might not be worth it.
Repository: flutter
Issue: [Proposal] Access l18n Translations with Dynamic Keys
Labels: c: new feature,framework,a: internationalization,customer: crowd,c: proposal,P3,team-framework,triaged-framework

## Use case
In my app i have dynamic states for which i would need to show the correct translated string.
Let's say the .arb files contain key/value pairs like
```
"localStateError": "An error has occurred",
"localStateSuccess": "The transaction was successful",
```
If my available states in the source code are then 'Error' and 'Success' i currently cannot access the correct string by using e.g.
```
context.l10n['localState$state']
```
## Proposal
A possibility to access translations with dynamic strings as keys without using reflection.
Repository: flutter
Issue: Clipboard on Android 13: Allow defining copied content as sensitive
Labels: a: text input,c: new feature,platform-android,framework,c: proposal,customer: money (g3),e: OS-version specific,P3,team-android,triaged-android

Internal: b/242213606

## Use case

Copying data into the clipboard on android 13 will show the user a notification. There is a new API to define clipboard data as sensitive: https://developer.android.com/about/versions/13/behavior-changes-all#copy-sensitive-content

## Proposal

Expand API for `ClipboardData` to define a property `isSensitive` and pass it through to the android APIs.
Repository: godot
Issue: Debugger unexpectedly skips lines when stepping through code
Labels: bug,topic:gdscript,needs testing

### Godot version

3.4.4.stable

### System information

Windows 11

### Issue description

When using "Step Into" or "Step Over" in the debugger when a breakpoint has triggered, sometimes lines are skipped. For example when I press "Step Over" I expect the debugger to land in the next line, but that doesn't happen sometimes. 

### Steps to reproduce

For some reason, now that I am trying to reproduce it, it doesn't happen anymore. I am sorry, I know this looks bad. 
Once, I thought it had something to do with where my cursor was placed when pressing "Step Over", but that doesn't consitently reproduce the bug either.

I'll try to describe a scenario where this issue would occur. Let's say I have the following code:
```
var x = 3
x = 4
if x = 3:
  print("3")
```
The debugger stops at the first line and I press "Step Over". I expect it to land on `x=4`, but it lands on the if-statement.

**Edit**: It just skipped from line 60 to 62 when I pressed F10, which is "Step Over" for me.
<img width="369" alt="image" src="https://user-images.githubusercontent.com/26558776/172833982-c0c8ca13-a367-45a7-94a8-bc78d268945c.png">

### Minimal reproduction project

_No response_
Repository: opencv
Issue: Difference in corners between findChessboardCorners() and findChessboardCornersSB()
Labels: category: calib3d,needs investigation

Hi,
a found a difference in the order of corner retrieval between findChessboardCorners() and findChessboardCornersSB().
This issue is present in both MacOs and Ubuntu.

These are two different frames of an image sequence. They are practically the same.

![A](https://user-images.githubusercontent.com/907951/172825314-73366e8b-01d3-4f4e-8851-6f54a081b343.png)
![B](https://user-images.githubusercontent.com/907951/172825340-7c0f4f22-4262-4d02-a30f-fe2c8797896f.png)

Unexpectedly if I try to recognize the corners with the function findChessboardCornersSB() the order of the corners comes out different. As you can see from the screenshots below.

![A_ResultSB](https://user-images.githubusercontent.com/907951/172833204-2b03410e-c129-4609-bcd4-3dd0863cc1bc.png)
![B_ResultSB](https://user-images.githubusercontent.com/907951/172833232-1ef41ed7-98f6-468c-932c-6ee23f0c1459.png)

The order of the corners remains the same if I use the function findChessboardCorners() instead.
This is the result with findChessboardCorners():

![A_Result](https://user-images.githubusercontent.com/907951/172833568-7913ec6c-0813-4e35-ab08-5e20d7b8587b.png)
![B_Result](https://user-images.githubusercontent.com/907951/172833597-958cff1a-5497-47e9-9057-7d6ede7a181a.png)

I think the most correct thing is that findChessboardCornersSB() returns the same order as findChessboardCorners() always.

Here the example code I used:

```
 int main(int argc, const char * argv[]) {
 
   std::vector<cv::Point2f> corners;
   
   cv::Mat image = cv::imread("A.tif", cv::IMREAD_GRAYSCALE);
 
   bool patternfound = cv::findChessboardCornersSB(image, cv::Size(18,12), corners, cv::CALIB_CB_EXHAUSTIVE | cv::CALIB_CB_ACCURACY);
 
   //bool patternfound = cv::findChessboardCorners(image, cv::Size(18,12), corners, cv::CALIB_CB_ADAPTIVE_THRESH | cv::CALIB_CB_NORMALIZE_IMAGE);
   
   cvtColor(image, image, cv::COLOR_GRAY2RGB);
  
   cv::drawChessboardCorners(image, cv::Size(18,12), cv::Mat(corners), patternfound);
   
   cv::imwrite("Result.tif", image);
   
   return 0;
 
 }
```
Repository: flutter
Issue: Add `libclang` to LUCI bots so that we can run `package:ffigen`
Labels: team-infra,P2,triaged-infra

In order to run `package:ffigen` on bots, we need `libclang`.

* https://github.com/flutter/flutter/issues/105513
* https://github.com/flutter/flutter/pull/105688

Without `libclang` available, `package:ffigen` cannot find the dynamic library provided by libclang.

Installation instructions: https://github.com/dart-lang/ffigen#installing-llvm

I'm unfamiliar with the setup on our Flutter LUCI bots, so I cannot recommend how to get/package them. Maybe @athomas has suggestions if the bots are sufficiently similar to the Dart bots.

The install location does not matter, default locations are the best. We can add these to `package:ffigen` and automatically detect it. Alternatively, we can also pass in a path to the test as a commandline argument.
Repository: storybook
Issue: preview-body does not work as expected on the DocsPage when using inline rendering
Labels: bug,needs triage

**Describe the bug**
We currently use the `.storybook/preview-body.html` file in order to add some custom elements. While on the canvas tab everything works as expected. However, when switching to the DocsPage which uses inline rendering (as opposed to iframes) the elements will be added to the `docs-root` element just once instead of each "story canvas" on its own.

This way when accessing the custom elements and appending elements to it they appear in the context of the whole DocsPage instead of just the relevant story.

**Workaround**

Use iframes instead of inline rendering by configuring the docs inside your `.storybook/preview.js` as described in  https://storybook.js.org/docs/react/writing-docs/docs-page#inline-stories-vs-iframe-stories 

```javascript
// .storybook/preview.js

export const parameters = {
  docs: {
    // Opt-out of inline rendering
    inlineStories: false,
  },
};
```
Repository: pytorch
Issue: [bug] fill_, masked_fill_ : fill ops allow lossy downcasting of fill value
Labels: module: bc-breaking,triaged,topic: bc breaking,module: primTorch

### 🐛 Describe the bug

```python
>>> import torch
>>> t = torch.ones(3, dtype=torch.int32)
>>> t.fill_(3.14)
tensor([3, 3, 3], dtype=torch.int32)
>>> t.masked_fill_(t > 0, 3.14)
tensor([3, 3, 3], dtype=torch.int32)
# binary ops and other ops correctly error out
>>> t.add_(3.14)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: result type Float can't be cast to the desired output type Int
```

cc: @mruberry 


### Versions

master

cc @ezyang @gchanan @mruberry @Lezcano @peterbell10 @ngimel