sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: flutter/engine 'traitCollectionDidChange` is deprecated in iOS 17.0
Labels: platform-ios,engine,P3,c: tech-debt,team-ios,triaged-ios

```
'traitCollectionDidChange:' is deprecated: first deprecated in iOS 17.0 - Use the trait change registration APIs declared in the UITraitChangeObservable protocol [-Werror,-Wdeprecated-declarations]
```

The deprecated method is also overriden by FlutterViewController:

```
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h:158:1: note: method 'traitCollectionDidChange:' declared here
- (void)traitCollectionDidChange:(nullable UITraitCollection *)previousTraitCollection API_DEPRECATED("Use the trait change registration APIs declared in the UITraitChangeObservable protocol", ios(8.0, 17.0), xros(1.0, 1.0));
```

From Apple's document:
```
Use registerForTraitChanges:withHandler: or registerForTraitChanges:withTarget:action: instead.
```

See: https://developer.apple.com/documentation/uikit/uitraitenvironment/1623516-traitcollectiondidchange?language=objc
Repository: flutter
Issue: Some UINotification APIs used in flutter/engine are deprecated in iOS 10
Labels: platform-ios,engine,P3,c: tech-debt,team-ios,triaged-ios

**To reproduce the deprecation warnings**

1. Go to local build root folder, typically located one level up of the engine directory. Then change the `ios_deployment_target` to 17.0: https://github.com/flutter/buildroot/blob/master/build/config/ios/ios_sdk.gni#L19 
1. Add -Wdeprecated-declarations and -Wdeprecated-implementations in flutter_clags_objc https://github.com/flutter/engine/blob/main/common/config.gni#L60 
1. Build the local engine like you normally would.


**List of deprecated APIs**

'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Werror,-Wdeprecated-declarations]

 'UILocalNotification' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationRequest [-Werror,-Wdeprecated-declarations]

'application:didRegisterUserNotificationSettings:' is deprecated: first deprecated in iOS 10.0 - See -[UIApplicationDelegate application:didRegisterUserNotificationSettings:] deprecation [-Werror,-Wdeprecated-declarations]

 'application:didReceiveLocalNotification:' is deprecated: first deprecated in iOS 10.0 - See -[UIApplicationDelegate application:didReceiveLocalNotification:] deprecation [-Werror,-Wdeprecated-declarations]

/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:318:1: note: method 'application:didRegisterUserNotificationSettings:' declared here
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings API_DEPRECATED("Use UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:]", ios(8.0, 10.0)) API_UNAVAILABLE(xros) API_UNAVAILABLE(tvos);


/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:326:1: note: method 'application:didReceiveLocalNotification:' declared here
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification API_DEPRECATED("Use UserNotifications Framework's -[UNUserNotificationCenterDelegate willPresentNotification:withCompletionHandler:] or -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]", ios(4.0, 10.0)) API_UNAVAILABLE(xros) API_UNAVAILABLE(tvos);


**We should be able to safely replacing these APIs with the variants in UserNotifications Framework**
Repository: flutter
Issue: UIApplication openURL methods in the flutter/engine are deprecated in iOS 9.0
Labels: platform-ios,engine,P2,c: tech-debt,team-ios,triaged-ios

**To reproduce the deprecation warnings**

1. Go to local build root folder, typically located one level up of the engine directory. Then change the `ios_deployment_target` to 17.0: https://github.com/flutter/buildroot/blob/master/build/config/ios/ios_sdk.gni#L19 
1. Add -Wdeprecated-declarations and -Wdeprecated-implementations in flutter_clags_objc https://github.com/flutter/engine/blob/main/common/config.gni#L60 
1. Build the local engine like you normally would.


**List of deprecated APIs**

/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:299:1: note: method 'application:handleOpenURL:' declared here
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url API_DEPRECATED_WITH_REPLACEMENT("application:openURL:options:", ios(2.0, 9.0)) API_UNAVAILABLE(xros) API_UNAVAILABLE(tvos);

/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:300:1: note: method 'application:openURL:sourceApplication:annotation:' declared here
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(nullable NSString *)sourceApplication annotation:(id)annotation API_DEPRECATED_WITH_REPLACEMENT("application:openURL:options:", ios(4.2, 9.0)) API_UNAVAILABLE(xros) API_UNAVAILABLE(tvos);

**This is trivial to fix by replacing them with `application:openURL:options:`**
Repository: flutter
Issue: UIApplication save and restore state methods used in flutter/engine are deprecated in iOS 13.2
Labels: platform-ios,engine,P3,c: tech-debt,team-ios,triaged-ios

**To reproduce the deprecation warnings**

1. Go to local build root folder, typically located one level up of the engine directory. Then change the `ios_deployment_target` to 17.0: https://github.com/flutter/buildroot/blob/master/build/config/ios/ios_sdk.gni#L19 
1. Add -Wdeprecated-declarations and -Wdeprecated-implementations in flutter_clags_objc https://github.com/flutter/engine/blob/main/common/config.gni#L60 
1. Build the local engine like you normally would.


**List of deprecated APIs**

- (BOOL)application:(UIApplication*)application shouldSaveApplicationState:(NSCoder*)coder {
^
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:395:1: note: method 'application:shouldSaveApplicationState:' declared here
- (BOOL)application:(UIApplication *)application shouldSaveApplicationState:(NSCoder *)coder API_DEPRECATED("Use application:shouldSaveSecureApplicationState: instead", ios(6.0, 13.2)) API_UNAVAILABLE(xros);

- (BOOL)application:(UIApplication*)application shouldRestoreApplicationState:(NSCoder*)coder {
^
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:396:1: note: method 'application:shouldRestoreApplicationState:' declared here
- (BOOL)application:(UIApplication *)application shouldRestoreApplicationState:(NSCoder *)coder API_DEPRECATED("Use application:shouldRestoreSecureApplicationState: instead", ios(6.0, 13.2)) API_UNAVAILABLE(xros);


**This is trivial to fix by replacing them with the suggested APIs in the warning message**
Repository: flutter
Issue: flutter/engine shouldAutorotate deprecated in iOS 16.0
Labels: platform-ios,engine,P3,c: tech-debt,team-ios,triaged-ios

**To reproduce the deprecation warnings**

1. Go to local build root folder, typically located one level up of the engine directory. Then change the `ios_deployment_target` to 17.0: https://github.com/flutter/buildroot/blob/master/build/config/ios/ios_sdk.gni#L19 
1. Add -Wdeprecated-declarations and -Wdeprecated-implementations in flutter_clags_objc https://github.com/flutter/engine/blob/main/common/config.gni#L60 
1. Build the local engine like you normally would.


**List of deprecated APIs**

/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h:350:37: note: method 'shouldAutorotate' declared here
@property(nonatomic, readonly) BOOL shouldAutorotate API_DEPRECATED("Update supported interface orientations and call setNeedsUpdateOfSupportedInterfaceOrientations to indicate a change.", ios(6.0, 16.0), xros(1.0, 1.0)) API_UNAVAILABLE(tvos);
Repository: vscode
Issue: Fix a browser sniff for Firefox support of async clipboard
Labels: bug,editor-core,firefox

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: current
- OS Version: all

Steps to Reproduce:
This is a bug in VSCode's Monaco JS editor, [in this source code](https://github.com/microsoft/vscode/blob/b8fe761e224d85fe5c80dc3dfb9976b38d3c36cc/src/vs/editor/contrib/clipboard/browser/clipboard.ts#L27-L30)

The check for `document.queryCommandSupported('paste')` should instead be something like `'readText' in navigator.clipboard`, as the former is a check for support of `document.execCommand('paste')`, which is not the same API. The result is that even when Firefox supports the async clipboard API, VSCode will still behave otherwise.

At least one web site has copy-and-pasted this bug, and so will also have the same problem (see https://github.com/webcompat/web-bugs/issues/123378#issuecomment-1587948974).

It would be awesome to have this fixed as soon as possible, as Firefox devs are actively working on implementing the async clipboard API.
Repository: rust
Issue: `rustdoc-js-std` tester doesn't always pick the latest `search.js` file
Labels: A-testsuite,T-rustdoc,C-bug,A-doctests

It means that we then have outdated results for the tests, which is quite annoying when realizing it after opening a PR when the CI fails. A solution could be to remove the target doc directory before regenerating it?
Repository: PowerToys
Issue: Mouse utility cross hair needs to hide and then only appear when moving the mouse and for a period time time or until mouse click
Labels: Needs-Triage

### Description of the new feature / enhancement

The cross hairs should activate on mouse move.
The cross hair should hide if the mouse stops moving for X (configurable) amount of time.
The cross hair should hide on click and/or typing a key so they disappear while typing.


### Scenario when this would be used?

Always or at at least allow this as a customization to the tool.  As it is pretty good but the cross hairs aren't needed much of the time.  When they are, they should be there.  When they are not, hide it.

### Supporting information

_No response_
Repository: vscode
Issue: If Markdown in Edit status -> collapse the markdown, the tip "1 cell hidden" doesn't show
Labels: bug,notebook-folding

Originally reported in https://github.com/dotnet/interactive/issues/2948 

* Create a markdown cell with a header, and a couple of code cells below
* Turn markdown cell to preview mode, fold (click on the chevron button), code cells will disappear and we should see "x cells hidden"
* Unfold, turn the markdown cell to editing mode (press enter or double click), fold, we didn't show "x cells hidden"
Repository: rust
Issue: Lifetime parameter used by a generic parameter is considered to be unused
Labels: A-diagnostics,A-lifetimes,A-trait-system,T-compiler,C-bug,S-has-mcve

<!--
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.
-->

For the following code:

```rust
struct SomeStruct<'a, T: SomeTrait<'a>> {
    some_field: T
}

trait SomeTrait<'a> {}
```

I expected it to compile as the lifetime `'a` was being used by the generic `T` which was being used the field `some_field`. 

However, the compiler complained about the lifetime `'a` not being used:

```
error[E0392]: parameter `'a` is never used
 --> src/lib.rs:1:19
  |
1 | struct SomeStruct<'a, T: SomeTrait<'a>> {
  |                   ^^ unused parameter
  |
  = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`

For more information about this error, try `rustc --explain E0392`.
```

### 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.72.0-nightly (37998ab50 2023-06-11)
binary: rustc
commit-hash: 37998ab508d5d9fa0d465d7b535dc673087dda8f
commit-date: 2023-06-11
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
not applicable
```

</p>
</details>
Repository: three.js
Issue: Calls to clearBufferuiv and clearBufferiv are incorrect
Labels: Enhancement

### Description

this line

https://github.com/mrdoob/three.js/blob/ed2bfb2e56ee84077372735acdf4425d96549fea/src/renderers/WebGLRenderer.js#L618

and this line

https://github.com/mrdoob/three.js/blob/ed2bfb2e56ee84077372735acdf4425d96549fea/src/renderers/WebGLRenderer.js#L626

Don't seem correct?

According to the spec: https://registry.khronos.org/webgl/specs/latest/2.0/#3.7.11

the signatures for `clearBufferiv` and  `clearBufferuiv` are

```
clearBufferiv(GLenum buffer, GLint drawbuffer, Int32List values, optional GLuint srcOffset = 0)
clearBufferuiv(GLenum buffer, GLint drawbuffer, Uint32List values, optional GLuint srcOffset = 0)
```

Notice 2nd argument `drawbuffer` is `GLint` but AFAIK that's not what's being passed in the code here. Instead `WebGLFramebuffer` object is being passed.

It's used in https://threejs.org/examples/webgl_interactive_cubes_gpu.html and strangely does not generate an error. I can only guess it's being coerced to zero and running by luck?



### Reproduction steps

1. see above


### Code

See above

### Live example

see above

### Screenshots

_No response_

### Version

dev

### Device

_No response_

### Browser

_No response_

### OS

_No response_
Repository: electron
Issue: [Bug]: video files not seekable with protocol.handle 
Labels: component/protocol,bug :beetle:,platform/all,status/confirmed,has-repro-gist,25-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

25.1.0

### What operating system are you using?

Other Linux

### Operating System Version

Linux Mint 21.1

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

I'm using a custom protocol in place of `file://` URLs for a video player. This works:
```js
protocol.registerFileProtocol("video", (request, callback) => {
  callback(request.url.slice("video://".length))  // simplified path for this example
})
```
Since `protocol.registerFileProtocol` got deprecated in version 25, I tried the suggested alternative `protocol.handle` as per the [update notes](https://www.electronjs.org/blog/electron-25-0#breaking-changes):
```js
protocol.handle("video", (request) => {
  return net.fetch(request.url.replace(/^video:/, "file:"))  // simplified path
})
```
This allows me to play videos. However now when I set `.currentTime`on a `<video>` element with a `video://…` source, it just jumps back to zero. `video.seekable.end()` is always `0`. This breaks seeking in HTML5 videos with custom protocol URLs.

I've also tried this, with the same result:
```js
protocol.handle("video", (request) => {
  return new Response(fs.readFileSync(request.url.replace(/^video:/, "file:")))
})
```

Not sure if it matters, the scheme is registered like this:
```js
protocol.registerSchemesAsPrivileged([
  {
    scheme: "video",
    privileges: {
      secure: true,
      bypassCSP: true,
      stream: true,
    },
  },
])
```
Expected behavior: The documented alternative to `protocol.registerFileProtocol` should allow serving seekable video files.

### Actual Behavior

See above.

### Testcase Gist URL

_No response_

### Additional Information

_No response_
Repository: stable-diffusion-webui
Issue: [Bug]: Installing On Ubuntu 22.04 with lambda stack and a 3060.
Labels: asking-for-help-with-local-system-issues

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

when it goes to start up it says there is no GPU. But there is and other programs can see it and use it. 

### Steps to reproduce the problem

1. Ran the wget command
2. then when it goes to start after installing it says it cant launch because there is no GPU.


 * I'm thinking it has to do with the virtual environment


### What should have happened?

It should have found my 3060 and started the program

### Commit where the problem happens

baf6946e06249c5af9851c60171692c44ef633e0

### What Python version are you running on ?

Python 3.10.x

### What platforms do you use to access the UI ?

Linux

### What device are you running WebUI on?

Other GPUs

### What browsers do you use to access the UI ?

Mozilla Firefox

### Command Line Arguments

```Shell
No
```


### List of extensions

No

### Console logs

```Shell
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on dev user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Cannot locate TCMalloc (improves CPU memory usage)
Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0]
Version: v1.3.2
Commit hash: baf6946e06249c5af9851c60171692c44ef633e0
Traceback (most recent call last):
  File "/home/dev/Downloads/stable-diffusion-webui/launch.py", line 38, in <module>
    main()
  File "/home/dev/Downloads/stable-diffusion-webui/launch.py", line 29, in main
    prepare_environment()
  File "/home/dev/Downloads/stable-diffusion-webui/modules/launch_utils.py", line 257, in prepare_environment
    raise RuntimeError(
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
```


### Additional information

_No response_
Repository: pytorch
Issue: [Inductor] Optimize More Cases of Int32 -> Int64 
Labels: feature,triaged,enhancement,module: inductor

### 🚀 The feature, motivation and pitch

Inductor has [an existing](https://github.com/pytorch/pytorch/blob/main/torch/_inductor/optimize_indexing.py#L313-L317) optimization which will convert indirect indexing that is done in int64 to int32 for index expressions we can prove are expressible in int32. However this optimization is incomplete.

1. We do not propagate the bounds of tensors from one kernel to the other. 
2. We do not change the dtype of temporary tensors which could be converted to int32. 
3. We use ValueRange Analysis to strength reduce on indices whose bounds we can prove. However, in some cases, as in the kernel below, we are indexing from Tensor values whose bounds we don't know.

For the following repro:

```
import torch
import triton

inp = torch.rand([6, 3, 352, 352], device="cuda", requires_grad=False)
inp2 = torch.rand([6, 352, 352, 2], device="cuda", requires_grad=False)

def grid(inp, inp2):
    return torch.ops.aten.grid_sampler_2d.default(inp, inp2, 0, 0, False)

def invoke_grid():
    return grid(inp, inp2)

median_ms = triton.testing.do_bench(
            lambda: invoke_grid()
)

grid_opt = torch.compile()(invoke_grid)

median_ms2 = triton.testing.do_bench(
            lambda: grid_opt()
)

print(f"Eager Execution time: {median_ms} secs")
print(f"Compiled Execution time: {median_ms2} secs")
```

Inductor is significantly slower than eager (25%) which can be reduced to 10% with int64->int32 conversions. 
 
[Original code](https://gist.github.com/eellison/cb422e219f8be58a3d8787a0dea75401), and then [optimize code](https://gist.github.com/eellison/91b80dac72c088344a92da17411161b9), where the int64 has been replaced with int32.

This could be optimized, but it's a bit tricky. If we guard on the tensor used in the second kernel having numel < 2^32, we can set the bounds of this final expression to also be in the range[0, 2^32). 

```
tmp61 = tl.load(in_ptr6 + (x0 + (123904*x2)), None, eviction_policy='evict_last')
tmp64 = tl.load(in_ptr7 + (x0 + (123904*x2)), None, eviction_policy='evict_last')
```

From there, we would need to propagate the bounds backwards. There is initial work to do that by @ysiraichi in https://github.com/pytorch/pytorch/pull/97963, and we could extend it for the set of ops that appears in this kernel to start. Once the bounds are propagated we could reduce the dtype of the int64 to int32, as well as the ops that construct those tensors.

I originally wrote this up as starter task but it might be a bit complicated for that lol.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler @Xia-Weiwen @ngimel @ezyang, @lezcano for other thoughts here



### Alternatives

_No response_

### Additional context

_No response_