sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: diagnostics: missing "consider borrowing here" when passing format!() as &str
Labels: C-enhancement,A-diagnostics,A-macros,T-compiler,A-suggestion-diagnostics,D-papercut,D-newcomer-roadblock,D-terse

````rust
fn borrow_string(_s: &String) {}

fn main() {
    borrow_string(String::new());
    borrow_string(format!("Hello world"));
}
````

I noticed that rustc suggests borrowing for the first function call but not the second, although borrowing would fix both errors.
````
error[E0308]: mismatched types
 --> src/main.rs:2:19
  |
2 |     borrow_string(String::new());
  |                   ^^^^^^^^^^^^^
  |                   |
  |                   expected `&String`, found struct `String`
  |                   help: consider borrowing here: `&String::new()`

error[E0308]: mismatched types
 --> src/main.rs:3:19
  |
3 |     borrow_string(format!("Hello world"));
  |                   ^^^^^^^^^^^^^^^^^^^^^^ expected `&String`, found struct `String`
  |
  = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
````

it would be nice to have the borrowing suggestion on the second warning as well. :)
Repository: svelte
Issue: `file://` URLs should be treated as absolute when populating sourcemap sources
Labels: stale-bot,temp-stale

**Describe the bug**
If you pass `filename` and `outputFilename` options to `svelte.compile`, the `sources` property of the resulting sourcemap will contain a relative path from `outputFilename` to `filename` (and likewise for `cssOutputFilename`). This is the only thing `outputFilename` is used for. 

`sources` is used inconsistently in the wild; it's often unclear whether it's supposed to be describing filepaths or URLs. We treat it as a an array of filepaths, but that sometimes yields unwanted results: https://github.com/snowpackjs/snowpack/discussions/1941#discussioncomment-210899.

In the case where `to` is absolute, `relative(from, to) === to` should be true. `file://` URLs are absolute, but we don't treat them as such.

**To Reproduce**
```js
const { pathToFileURL } = require('url');
const { compile } = require('svelte/compiler');
const assert = require('assert');

const source = `<h1>Hello world!</h1>`;

const filename = pathToFileURL('index.svelte').href;
const outputFilename = '/components/index.svelte';

const result = compile(source, {
  filename,
  outputFilename
});

assert.deepEqual(
  result.js.map.sources,
  [filename]
);
```

**Expected behavior**
`outputFilename` should be disregarded, `sources` should equal `[filename]`. Instead we get `../../../file:///path/to/project/index.svelte`.

**Severity**
Not critical — possible to workaround.
Repository: flutter
Issue: Make it more obvious when images are taking more memory than they need to
Labels: framework,a: images,c: proposal,perf: memory,P2,team-framework,triaged-framework

For example, we could:

- Enable the `debugInvertOversizedImages` by default in debug mode.
- Make decoding an image at larger than full screen resolution opt-in only (today we default to decoding it at its native size).
- Warn users if an image is not used in the image cache for a specified time period (or before being evicted).
Repository: TypeScript
Issue: Allow transformers to run without type-checking
Labels: Suggestion,Awaiting More Feedback

## Search Terms

transformer, type check, transpileModule

## Suggestion

Run transformers, but skip type checking.

## Use Cases

The majority of compile times are type checking. 

Some projects (e.g. Angular stylesheet integration) require transformers to run.

I would like to skip type checking, ala transpileModule, but still run the transformer.

https://github.com/angular/angular-cli/issues/19587

## Examples

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: pytorch
Issue: [doc] how to prevent pytorch-nightly from being replaced by a released version on pip install
Labels: module: binaries,module: docs,oncall: releng,triaged

## 📚 Documentation

I found an issue with pytorch-nightly and pip install of some packages depending on pytorch. 

If a user installs pytorch-nightly using:
```
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu110/torch_nightly.html -U
```
which allows for pre-released versions as prescribed on https://pytorch.org/get-started/locally/, e.g.:

installing some other packages that include `torch` in their requirements with:
```
pip install package1 package2
```
will wipe out the nightly build and install the latest release instead. 

I'm not 100% sure yet when this happens. I think it might be the case for python pip packages that don't have a binary wheel and need to be built from source and perhaps depend on pytorch to build.

For example this happens with `fairscale` (no binary wheel provided) but doesn't happen with `fairseq` which provides a binary wheel on pypi. It happened before with other packages - I will try to identify the correct group.

The solution in such circumstances is to pass the same `--pre --f https://download.pytorch.org/whl/nightly/cu110/torch_nightly.html` used to install the nightly to `pip install package-depending-on-pytorch` to keep the pre-released version installed. e.g.:
```
pip install fairscale --pre --f https://download.pytorch.org/whl/nightly/cu110/torch_nightly.html
```

 I have no idea where this could be documented.

cc @ezyang @seemethere @malfet @walterddr @jlin27 @mruberry
Repository: opencv
Issue: Can not use ffmpeg on windows
Labels: question (invalid tracker),category: build/install

##### System information (version)
<!-- Example
- OpenCV => 4.5
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017
-->

- OpenCV =>4.5
- Operating System / Platform => Windows 64 Bit
- Compiler =>Visual Studio 2017

##### Detailed description

<!-- your description -->

i have an project,it use opencv VideoWriter to write video in windows and then  i want use ffmpeg to finish it.
i rebuild opencv sourcecode,in camke
![image](https://user-images.githubusercontent.com/12858618/102298783-bc2d7880-3f8c-11eb-85e6-21b14d0c34c0.png)
![image](https://user-images.githubusercontent.com/12858618/102298806-c8b1d100-3f8c-11eb-9432-b833ec93529a.png)
![image](https://user-images.githubusercontent.com/12858618/102298838-dc5d3780-3f8c-11eb-874e-1a11e01221a6.png)

and  i found ffmpeg in my workspace after camke finished
![image](https://user-images.githubusercontent.com/12858618/102299050-3cec7480-3f8d-11eb-89c8-9b40ad117090.png)

so ,i open OpenCV.sln,and i build ALL_BUILD project, then install it
there are no error in this during this time, and i get install folder,**but ffmpeg not work,MSMF is Work.**
![image](https://user-images.githubusercontent.com/12858618/102299901-cc465780-3f8e-11eb-8616-22aac9560265.png)

i found it return null,so ffmpeg not work,and i don't know why.
![image](https://user-images.githubusercontent.com/12858618/102300074-28a97700-3f8f-11eb-9cfa-6a3fe50888b2.png)

![image](https://user-images.githubusercontent.com/12858618/102300218-7faf4c00-3f8f-11eb-838d-93b2cf566813.png)


I have no idea to configure camke to include ffmpeg related in my project solution.
`cap_ffmpeg.cpp`
`cap_ffmpeg_impl.hpp`



please help me,i am new to opencv,have a good nice day
Repository: create-react-app
Issue: Error
Labels: needs triage,issue: bug report

┌─[sambhrama@parrot]─[~]
└──╼ $npx create-react-app basaveshwar_hardwares
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EHOSTUNREACH: request to https://registry.npmjs.org/create-react-app failed, reason: connect EHOSTUNREACH 104.16.26.35:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.

Creating a new React app in /home/sambhrama/basaveshwar_hardwares.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

^A[       ...........] | idealTree:type-fest: sill fetch manifest type-fest@^0.6[        ..........] / idealTree:snapdragon-util: sill npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! request to https://registry.npmjs.org/coa/-/coa-2.0.2.tgz failed, reason: Socket timeout

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/sambhrama/.npm/_logs/2020-12-16T07_20_06_826Z-debug.log

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... node_modules
Deleting generated file... package.json
Deleting basaveshwar_hardwares/ from /home/sambhrama
Done.
npm ERR! code 1
npm ERR! path /home/sambhrama
npm ERR! command failed
npm ERR! command sh -c create-react-app basaveshwar_hardwares

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/sambhrama/.npm/_logs/2020-12-16T07_20_12_208Z-debug.log
┌─[✗]─[sambhrama@parrot]─[~]
└──╼ $
Repository: flutter
Issue: [video_player] Support for keyframe based seekTo option
Labels: c: new feature,p: video_player,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

My application needs to be able to loop a small segment of a video repeatedly. With the default frame perfect seekTo method that the video player plugin is currently using, each seek causes a considerable delay. Are there any plans to support an option to seekTo using keyframes (like ExoPlayer provides)?
Repository: ant-design
Issue: Image preview config does not working with Image.PreviewGroup
Labels: 💡 Feature Request,Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/c9e5af93-09f2-421d-a8c1-3bbfeb1416fe-forked-6zsqi?file=/index.js)

### Steps to reproduce
Click on Image.
onVisibleChange method does not invoke, preview container is wrong.

Comment out Image.PreviewGroup wrapper.
Everything works smooth.

### What is expected?
Preview config should work as for single Image.

### What is actually happening?
Preview config is ignored.

| Environment | Info |
|---|---|
| antd | 4.9.3 |
| React | React 16.14.0 |
| System | Macos |
| Browser | Chrome Version 87.0.4280.88  |

---
Moving preview config to PreviewGroup container also does not work.


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: flutter
Issue: Support for English fallback even when an unsupported language is selected
Labels: framework,a: internationalization,c: proposal,P3,team-framework,triaged-framework

By @brickpop in https://github.com/flutter/flutter/issues/72284:
"
The point is that we have the strings, but the material widgets throw an error when the (unsupported) language is selected.

If some language is unsupported, would it be possible to at least bypass the error on the Material boundaries and use a fallback there? This would allow us to display our localized strings, even if the widget tooltips remain in English.
"

I'll try to come up with a reproducible sample in a small app, but if you get the chance before I do, could you share one @brickpop? It helps with confirming that the issue is fixed and provides a good template for a test to prevent regressions.
Repository: pytorch
Issue: Impossible to run tests target with LibTorch as dependency inside a cocoapods.
Labels: triaged,module: ios

## 🐛 Bug

Impossible to run tests target with LibTorch as dependency inside a cocoapods.

## To Reproduce

Steps to reproduce the behavior:

1. Download or clone my demo project at [https://github.com/hschouman/DemoPytorchLib](https://github.com/hschouman/DemoPytorchLib)
2. Go into Example folder
3. Do "pod install"
4. Open the .xcworkspace project with Xcode and run it 

The run will fail because of the test target with the following error (on simulator) :
Undefined symbols for architecture x86_64:
  "_clog_vlog_error", referenced from:
      pytorch_qnnp_log_error(char const*, ...) in libtorch_cpu.a(qconv_prepack.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Same error with arm64 on device.

The main target works well. You can try this by unchecking the tests target boxe from "Run" column inside Edit Scheme > "Build" section.

## Expected behavior

A successful run for tests target.

## Environment

 - PyTorch Version (e.g., 1.0): 1.7.1
 - OS (e.g., Linux): MacOS
 - How you installed PyTorch (`conda`, `pip`, source): Cocoapods
 - Build command you used (if compiling from source): none
 - Python version: 2.7.16
 - Xcode 12.2
 - CUDA/cuDNN version:
 - GPU models and configuration:
 - Any other relevant information:


cc @jerryzh168 @jianyuh @dzhulgakov @raghuramank100 @jamesr66a @vkuzo
Repository: rust
Issue: Failed analysis of index dominance
Labels: A-LLVM,I-slow,C-enhancement,T-compiler,A-mir-opt

rustc 1.50.0-nightly (f76ecd066 2020-12-15) on this code:

```rust
pub fn foo(data: &[u8], i: usize, j: usize) -> u8 {
    if i < data.len() && j <= i {
        data[j]
    } else {
        0
    }
}
```

Can't remove the array bound test (compiling even with aggressive optimizations):

```asm
foo:
    push    rax
    cmp     rdx, rsi
    jae     .LBB0_4
    cmp     rcx, rdx
    ja      .LBB0_4
    cmp     rcx, rsi
    jae     .LBB0_3
    mov     al, byte ptr [rdi + rcx]
    pop     rcx
    ret
.LBB0_4:
    xor     eax, eax
    pop     rcx
    ret
.LBB0_3:
    lea     rdx, [rip + .L__unnamed_1]
    mov     rdi, rcx
    call    qword ptr [rip + core::panicking::panic_bounds_check@GOTPCREL]
    ud2
```

This shows that value range analysis could be useful.

Godbolt: https://rust.godbolt.org/z/jPoY6Mnx6
Repository: flutter
Issue: gn host cannot generate --enable-vulkan
Labels: engine,d: api docs,P3,team-engine,triaged-engine

I'm trying to use the enable-vulkan engine in android.
1.`gn host
    ./flutter/tools/gn --unopt --runtime-mode=profile --android-cpu=arm64` 
2. `gn android
  ./flutter/tools/gn --unopt --runtime-mode=profile --android --android-cpu=arm64  --enable-vulkan`
3. `ninja build
ninja -C out/host_profile_unopt_arm64
ninja -C out/android_profile_unopt_arm64_vulkan`

4.flutter run demo use local engine
`flutter run --local-engine-src-path=/Users/bytedance/workspace/engine_1.22/src --local-engine=android_profile_unopt_arm64`


<img width="1511" alt="截屏2020-12-16 下午7 50 42" src="https://user-images.githubusercontent.com/74553848/102346723-494aee80-3fda-11eb-8ac0-d394a6857d14.png">

5.try to gn --enable-vulkan
<img width="1321" alt="截屏2020-12-16 下午7 50 04" src="https://user-images.githubusercontent.com/74553848/102346804-6ed7f800-3fda-11eb-8840-b96f49abf533.png">

SO,flutter tools or gn may need to be modified?
Repository: pytorch
Issue:  This error occurs occasionally during the run
Labels: module: crash,module: cudnn,triaged

## 🐛 Bug

## Environment
torch1.7.0

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

```
Traceback (most recent call last):
  File "E:/yolov5-master11/V5/train.py", line 496, in <module>
    train(hyp, opt, device, tb_writer, wandb)
  File "E:/yolov5-master11/V5/train.py", line 296, in train
    scaler.scale(loss).backward()
  File "E:\anaconda\envs\newyolo\lib\site-packages\torch\tensor.py", line 221, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "E:\anaconda\envs\newyolo\lib\site-packages\torch\autograd\__init__.py", line 130, in backward
    Variable._execution_engine.run_backward(
RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR
You can try to repro this exception using the following code snippet. If that doesn't trigger the error, please include your original repro script when reporting this issue.

import torch
torch.backends.cuda.matmul.allow_tf32 = True
torch.backends.cudnn.benchmark = True
torch.backends.cudnn.deterministic = False
torch.backends.cudnn.allow_tf32 = True
data = torch.randn([8, 160, 160, 160], dtype=torch.half, device='cuda', requires_grad=True)
net = torch.nn.Conv2d(160, 160, kernel_size=[1, 1], padding=[0, 0], stride=[1, 1], dilation=[1, 1], groups=1)
net = net.cuda().half()
out = net(data)
out.backward(torch.randn_like(out))
torch.cuda.synchronize()

ConvolutionParams 
    data_type = CUDNN_DATA_HALF
    padding = [0, 0, 0]
    stride = [1, 1, 0]
    dilation = [1, 1, 0]
    groups = 1
    deterministic = false
    allow_tf32 = true
input: TensorDescriptor 0000026CC467C760
    type = CUDNN_DATA_HALF
    nbDims = 4
    dimA = 8, 160, 160, 160, 
    strideA = 4096000, 25600, 160, 1, 
output: TensorDescriptor 0000026CC467C840
    type = CUDNN_DATA_HALF
    nbDims = 4
    dimA = 8, 160, 160, 160, 
    strideA = 4096000, 25600, 160, 1, 
weight: FilterDescriptor 0000026CCA474AC0
    type = CUDNN_DATA_HALF
    tensor_format = CUDNN_TENSOR_NCHW
    nbDims = 4
    dimA = 160, 160, 1, 1, 
Pointer addresses: 
    input: 000000145FB66000
    output: 000000146EE5E000
    weight: 0000001346DEE200

```


cc @ezyang @gchanan @zou3519 @bdhirsh @csarofeen @ptrblck
Repository: go
Issue: go/types, types2: missing error for invalid cycle in function declaration
Labels: NeedsInvestigation

The following invalid cycle is currently detected by the compiler with the error "typechecking loop involving f".

```
func f([unsafe.Sizeof(f)]int) {}
```
https://play.golang.org/p/cfAFJHgsAkX

However no error is detected by go/types, both at master and in the `dev.typeparams` branch (where there have been some changes to cycle detection in function declarations).

CC @griesemer
Repository: flutter
Issue: [webview_flutter] Enable Sandboxed JavaScript Injection
Labels: c: new feature,platform-ios,p: webview,package,c: proposal,P3,team-ios,triaged-ios

The plugin utilizes the **WKWebView** APIs that allow the App to inject JavaScript into web content without also leveraging platform APIs to sandbox the JavaScript from untrusted code.

Starting with iOS 14, **WKWebView** offers the following APIs that enable injecting JavaScript into a web page while also mitigating collision attacks from untrusted JavaScript:

```
evaluateJavaScript:inFrame:inContentWorld:completionHandler: 
```
```
callAsyncJavaScript:arguments:inFrame:inContentWorld:completionHandler:
```
By providing a **WKContentWorld** instance to the **inContentWorld:** parameter to these methods, iOS will ensure that the JavaScript injected into the web page will run in a sandboxed environment from the JavaScript originating from the web, which may be untrusted.

Without the use of **WKContentWorld** injected App JavaScript and native web JavaScript run in a shared environment. This may lead to multiple attacks and bug scenarios, such as when a malicious web page intentionally declares new JavaScript functions or symbols with the same names as JavaScript injected by the App. Additionally, the WebKit team observed malicious analytics SDKs intentionally communicating with web JavaScript to pass along user tracking information only available through native APIs. As unsandboxed JavaScript injection may result in a variety of unexpected behaviors, as well as data leakage, all JavaScript injection should be performed within an isolated sandbox.

https://developer.apple.com/documentation/webkit/wkwebview/3656442-evaluatejavascript
Repository: flutter
Issue: Remove exit() calls in integration_test integrationDriver() function.
Labels: a: tests,framework,d: api docs,f: integration_test,P2,team-framework,triaged-framework

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

I would like to use the new `integration_test` package to test my app, but already have many driver tests which are also run as benchmarks using `flutterDriver.traceAction()`. However, when migrating, I ran into the following issue:

```dart
final driver = await FlutterDriver.connect();  // to setup a message handler
final timeline = await driver.traceAction(() => integrationDriver(driver: driver));

// then write timeline summary to disk
```

However, all code paths through `integrationDriver()` end in calls to `exit()`, so the app terminates, so the timeline-related code never gets run. 


## Proposal

Can this be removed, to allow benchmarking (or other post-test code) to be run on the host machine.
Or, if there is a good reason why execution must stop after finishing the tests, can some mechanism of benchmarking these runs be provided/explained in documentation?

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->
Repository: flutter
Issue: Investigate cross context image memory usage and determine if there is some way to mitigate
Labels: engine,c: performance,a: images,perf: memory,perf: speed,P2,team-engine,triaged-engine

Customers have reported that turning cross context image decoding on led to increases in memory usage, and even now manually disabling it in the engine leads to lower memory usage when dealing with images.

We should see if there's any way to mitigate this. Cross context images allow for faster image rendering and less jank when rendering images, but we should better understand whether there is some strategy to mitigate memory usage or whether there are some images we should not create as cross context.

See https://github.com/flutter/engine/blob/9e3803b36718367a47e628990c069e58aaffffb4/lib/ui/painting/image_decoder.cc#L187-L214 - in the first branch there we call `MakeFromRaster`, doing CPU decoding, but in the second branch (which is typically used by all clients now) we call `MakeCrossContextFromPixmap`.

/cc @leonscroggins @brianosman who might be able to provide some help on this from Skia.
/cc @chinmaygarde @jason-simmons 
/cc @ds84182