id
int64 393k
2.82B
| repo
stringclasses 68
values | title
stringlengths 1
936
| body
stringlengths 0
256k
β | labels
stringlengths 2
508
| priority
stringclasses 3
values | severity
stringclasses 3
values |
---|---|---|---|---|---|---|
422,410,646 | bitcoin | Optimize CheckMultiSig by using public key recovery. | I had a recent chat with @sipa about an idea I had to reimplement the CheckMultiSig operations to use public key recovery without altering their semantics.
New new proposed implementation would proceed as follows.
1. For each signature in a `k`-of-`n` CheckMultiSig operation, the message hash is computed (calling find-and-delete if required).
1. For each of `k` signature and message hash pairs, public key recovery is run to produce a list of sets of points in Jacobin coordinates. This requires at least one modular square root operation (and very rarely two), similar in cost to a pubkey decompression, per signature. The resulting list has `k` sets and each set has 2 points (or very rarely 4 points).
1. All of the recovered points are batch converted from Jacobian coordinates to affine coordinates at the cost of one modular inverse operation for the entire batch.
1. The list of sets of recovered points are compared, in order, to the list of serialized pubkeys passed to CheckMultiSig, using a new "compare affine point to serialized pubkey" function. No pubkey decompression need be done.
The advantage of this proposed method over the current "try-and-fail" method is that the number of elliptic curve operations is now roughly proportional to `k`, the number of signatures, rather than `n` the number of pubkeys.
For non-`n`-of-`n` CheckMultiSig operations, I expect this method should be faster than the current implementation. For `n`-of-`n` CheckMultiSig operations, the proposed method is not likely to be faster than local (`n` signature) batch verification and certainly not faster than global batch verification (for `OP_CHECKMULTISIGVERIFY`).
Unfortunately, I don't have time to pursue a PR to implement this proposal at the moment, and maybe someone else would like to pick up this issue. | Brainstorming,Up for grabs | low | Minor |
422,433,032 | vscode | Custom Variables Support In Workspace Settings | ### Feature Request
Custom variables support in workspace settings.
### Example
```
{
"workbench.customVariables": {
"themeColors": {
"darkColor": "#121212"
}
}
"workbench.colorCustomizations": {
"[Monokai Light Theme]": {
"tab.activeBackground": "${themeColors.darkColor}"
}
}
}
``` | feature-request,config | medium | Major |
422,492,576 | TypeScript | Move to new file doesn't maintain prologues directives, ts-check | ```js
// @ts-check
"use strict";
export function foo() {
return bar();
}
function bar() {
return 100;
}
```
Use a refactoring to move `bar` to a new file.
**Expected**
```js
// @ts-check
"use strict";
export function bar() {
return 100;
}
```
**Actual**
```js
export function bar() {
return 100;
}
``` | Bug,Help Wanted,Effort: Moderate,Domain: Refactorings | low | Minor |
422,506,882 | pytorch | JIT does not batch linear layers in an ensemble | I am trying to speed up a case where I have an ensemble identically structured models.
Tracing my model and running a jitted version results in some speed up, but since the layers are small it still does not achieve good utilization of the GPU.
if torch.bmm were used to batch compute the mm for layer[0] across the K models, then layer[1] across the K models etc it would help a lot.
See code sample.
Code sample:
http://paste.ubuntu.com/p/kSdJwDsQqB/
bmm is mentioned as a future optimization [here](https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/passes/batch_mm.cpp).
If torch.bmm was used, I would expect to get a significant speedup.
## Environment
PyTorch version: 1.0.0.dev20190318
Is debug build: No
CUDA used to build PyTorch: 10.0.130
OS: Ubuntu 16.04.6 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
CMake version: version 3.5.1
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration:
GPU 0: Quadro P5000
GPU 1: Quadro P5000
Nvidia driver version: 418.39
cuDNN version: Could not collect
Versions of relevant libraries:
[pip] numpy==1.15.4
[pip] torch==1.0.0.dev20190318
[pip] torchfile==0.1.0
[conda] blas 1.0 mkl
[conda] mkl 2019.1 144
[conda] mkl_fft 1.0.6 py36hd81dba3_0
[conda] mkl_random 1.0.2 py36hd81dba3_0
[conda] pytorch-nightly 1.0.0.dev20190318 py3.6_cuda10.0.130_cudnn7.4.2_0 pytorch
[conda] torchfile 0.1.0 <pip>
cc @suo | oncall: jit,triaged | low | Critical |
422,528,337 | create-react-app | decorators on generator functions parse error with --typescript | <!--
PLEASE READ THE FIRST SECTION :-)
-->
### Is this a bug report?
(write your answer here)
Yes
<!--
If you answered "Yes":
Please note that your issue will be fixed much faster if you spend about
half an hour preparing it, including the exact reproduction steps and a demo.
If you're in a hurry or don't feel confident, it's fine to report bugs with
less details, but this makes it less likely they'll get fixed soon.
In either case, please fill as many fields below as you can.
If you answered "No":
If this is a question or a discussion, you may delete this template and write in a free form.
Note that we don't provide help for webpack questions after ejecting.
You can find webpack docs at https://webpack.js.org/.
-->
### Did you try recovering your dependencies?
<!--
Your module tree might be corrupted, and that might be causing the issues.
Let's try to recover it. First, delete these files and folders in your project:
* node_modules
* package-lock.json
* yarn.lock
Then you need to decide which package manager you prefer to use.
We support both npm (https://npmjs.com) and yarn (http://yarnpkg.com/).
However, **they can't be used together in one project** so you need to pick one.
If you decided to use npm, run this in your project directory:
npm install -g npm@latest
npm install
This should fix your project.
If you decided to use yarn, update it first (https://yarnpkg.com/en/docs/install).
Then run in your project directory:
yarn
This should fix your project.
Importantly, **if you decided to use yarn, you should never run `npm install` in the project**.
For example, yarn users should run `yarn add <library>` instead of `npm install <library>`.
Otherwise your project will break again.
Have you done all these steps and still see the issue?
Please paste the output of `npm --version` and/or `yarn --version` to confirm.
-->
(Write your answer here.)
npm --version
6.4.1
### Which terms did you search for in User Guide?
<!--
There are a few common documented problems, such as watcher not detecting changes, or build failing.
They are described in the Troubleshooting section of the User Guide:
https://facebook.github.io/create-react-app/docs/troubleshooting
Please scan these few sections for common problems.
Additionally, you can search the User Guide itself for something you're having issues with:
https://facebook.github.io/create-react-app/
If you didn't find the solution, please share which words you searched for.
This helps us improve documentation for future readers who might encounter the same problem.
-->
(Write your answer here if relevant.)
decorators on generator functions parse error with --typescript
### Environment
<!--
To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required.
This enables the maintainers quickly reproduce the issue and give feedback.
Run the following command in your React app's folder in terminal.
Note: The result is copied to your clipboard directly.
`npx create-react-app --info`
Paste the output of the command in the section below.
-->
(paste the output of the command here)
Environment Info:
System:
OS: Windows 10
CPU: x64 Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
Binaries:
Yarn: 1.10.1 - C:\Program Files\nodejs\yarn.CMD
npm: 6.1.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 42.17134.1.0
Internet Explorer: 11.0.17134.1
npmPackages:
react: ^16.8.4 => 16.8.4
react-dom: ^16.8.4 => 16.8.4
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
### Steps to Reproduce
<!--
How would you describe your issue to someone who doesnβt know you or your project?
Try to write a sequence of steps that anybody can repeat to see the issue.
-->
(Write your steps here:)
1. create-react-app my-app typescript
2. add experimentalDecorators in tsconfig.json
3. add related code
```
@effect() // define async action handle
* addAsync(count: number) {
yield delay(2000);
this.add(count); // type check here
}
```
### Expected Behavior
<!--
How did you expect the tool to behave?
Itβs fine if youβre not sure your understanding is correct.
Just write down what you thought would happen.
-->
(Write what you thought would happen.)
parse success
### Actual Behavior
<!--
Did something go wrong?
Is something broken, or not behaving as you expected?
Please attach screenshots if possible! They are extremely helpful for diagnosing issues.
-->
(Write what happened. Please add screenshots!)
```
./src/AppModel.ts
SyntaxError: C:\Users\zeroone\Desktop\my-app\src\AppModel.ts: Unexpected token (17:30)
15 | export default class AppModel extends Model<AppState> {
16 | @effect() // define async action handle
> 17 | * addAsync(count: number) {
| ^
18 | yield delay(2000);
19 | this.add(count); // type check here
20 | }
```
### Reproducible Demo
<!--
If you can, please share a project that reproduces the issue.
This is the single most effective way to get an issue fixed soon.
There are two ways to do it:
* Create a new app and try to reproduce the issue in it.
This is useful if you roughly know where the problem is, or canβt share the real code.
* Or, copy your app and remove things until youβre left with the minimal reproducible demo.
This is useful for finding the root cause. You may then optionally create a new project.
This is a good guide to creating bug demos: https://stackoverflow.com/help/mcve
Once youβre done, push the project to GitHub and paste the link to it below:
-->
(Paste the link to an example project and exact instructions to reproduce the issue.)
<!--
What happens if you skip this step?
We will try to help you, but in many cases it is impossible because crucial
information is missing. In that case we'll tag an issue as having a low priority,
and eventually close it if there is no clear direction.
We still appreciate the report though, as eventually somebody else might
create a reproducible example for it.
Thanks for helping us help you!
-->
| issue: needs investigation,issue: typescript | low | Critical |
422,602,252 | pytorch | [docs] How to achieve high-order derivation in my .cpp? | ## β Questions and Help
### Please note that this issue tracker is not a help form and this issue will be closed.
We have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:
- [Discussion Forum](https://discuss.pytorch.org/)
cc @ezyang @SsnL @albanD @zou3519 @gqchen @yf225 | module: docs,module: cpp,module: autograd,triaged,actionable | low | Minor |
422,664,731 | go | net/url: URL.String() does not escape Query | ### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.12.1 linux/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes.
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/kiril/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/kiril/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build120012875=/tmp/go-build -gno-record-gcc-switches"
</pre></details>
### What did you do?
```go
url.Parse("https://ΡΠ΅ΡΡ.Π±Π³/ΠΏΡΡ?ΠΊΠ»ΡΡ=ΡΡΠΎΠΉΠ½ΠΎΡΡ#ΡΡΠ°Π³ΠΌΠ΅Π½Ρ")
```
https://play.golang.org/p/xe9E6LAZhLs
### What did you expect to see?
```
https://%D1%82%D0%B5%D1%81%D1%82.%D0%B1%D0%B3/%D0%BF%D1%8A%D1%82?%D0%BA%D0%BB%D1%8E%D1%87=%D1%81%D1%82%D0%BE%D0%B9%D0%BD%D0%BE%D1%81%D1%82#%D1%84%D1%80%D0%B0%D0%B3%D0%BC%D0%B5%D0%BD%D1%82
```
### What did you see instead?
```
https://%D1%82%D0%B5%D1%81%D1%82.%D0%B1%D0%B3/%D0%BF%D1%8A%D1%82?ΠΊΠ»ΡΡ=ΡΡΠΎΠΉΠ½ΠΎΡΡ#%D1%84%D1%80%D0%B0%D0%B3%D0%BC%D0%B5%D0%BD%D1%82
```
Notice how that `ΠΊΠ»ΡΡ=ΡΡΠΎΠΉΠ½ΠΎΡΡ` is left unescaped. | help wanted,NeedsInvestigation | low | Critical |
422,723,594 | node | Track Environment fields in heap snapshot? | At the moment, the Environment fields are not tracked by the heap snapshot (unless they are referenced by some other objects that implements the `MemoryRetainer` interface) - for example, you can't see any of the `AliasedBuffer` in the Environment when looking at a heap snapshot taken after bootstrap. Considering the amount of things we attach to the Environment, it should be pretty useful to track those fields in the heap snapshot instead of keeping them invisible for no particular reason.
I am thinking about having Environment implmement `MemoryRetainer`, are there any concerns around having it inherit from an abstract class? (considering this is semi-exposed to embedders). | lib / src | low | Minor |
422,741,784 | go | x/text: first string in catalog returned when the given string is not in the catalog | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.11.5 darwin/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes.
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="~/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="~/Code/kace/agent"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/8w/05w3j5xj4q34m1z6w9ynmcf80000gp/T/go-build628007696=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>
### What did you do?
Generate a catalog.go file with the following strings (for example):
1. "This is the first string in the catalog"
2. "This is the second string in the catalog"
Now, translate a string that's not in the catalog.
```
p := message.NewPrinter(message.MatchLanguage("en"))
p.Println("This string is not in the catalog")
```
### What did you expect to see?
I would expect to get back the original string I passed to the p.Println() function if it does not match any string in the catalog.
In this case, I expect to get back: `This string is not in the catalog`.
### What did you see instead?
p.Println() returns the first string in the catalog. In this case, I get back: `This is the first string in the catalog`.
| NeedsInvestigation | low | Critical |
422,747,680 | opencv | munmap_chunk() invalid pointer problem, in cvStartFindContours_Impl() | - OpenCV => 4.0.1
- Operating System / Platform => ARM64
- Compiler => GCC 7.3
-->
at line 307, modules/imgproc/src/contours.cpp, in cvStartFindContours_Impl(), the src and dst ptr is the same one for cvThreshold, but cvThreshold requires a const src pointer, that will cause memory crash for some cases. | bug,category: imgproc,needs reproducer | low | Critical |
422,752,526 | angular | Detect ng-content changes | # π feature request
### Relevant Package
This feature request is for @angular/core
### Description
Add the ability to detect "ng-content" changes into [OnChanges](https://angular.io/api/core/OnChanges) method like @Input.
### Describe the solution you'd like
SimpleChanges can be expose a special prop. ngContent that contains the old and the new value of ng-content, eg.:
```ts
@Component({selector: 'my-cmp', template: `<ng-content></ng-content>`})
class MyComponent implements OnChanges {
ngOnChanges(changes: SimpleChanges) {
console.log(changes.ngContent);
}
}
```
### Describe alternatives you've considered
Add a new lifecycle hook that is called when ng-content change, eg.:
```ts
@Component({selector: 'my-cmp', template: `<ng-content></ng-content>`})
class MyComponent implements OnNgContentChanges {
ngOnNgContentChanges() {
console.log('ng-content change!');
}
}
```
| feature,area: core,core: content projection,feature: under consideration | medium | Critical |
422,788,837 | vscode | Visual Studio Code for ipad | can use the Visual Studio Code on a ipad
| feature-request,ios-ipados | high | Critical |
422,811,353 | vue-element-admin | Change tab url with router | Hi, I have a question about when I have a tab window when I change the tab, I do not change the url


| need repro :mag_right: | low | Major |
422,839,931 | kubernetes | drain daemonsets | **What would you like to be added**:
a flag to drain to support draining daemonset managed pods too.
**Why is this needed**:
I needed to blow out container runtime images completely to fix an issue. daemonsets tried to keep pods running. | priority/backlog,sig/node,kind/feature,sig/apps,lifecycle/stale,needs-triage | high | Critical |
422,841,308 | go | testing: benchmark performance misaligned for fast tests | ### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.12.1 darwin/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/ondrej.kokes/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/ondrej.kokes/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.1/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/mk/dqryy0_947936yjsdw8jl6v00000gp/T/go-build420651873=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>
### What did you do?
I ran some fast tests, where each iteration took less than a nanosecond. This led to the results table to be misaligned.
Here's a reproducible example:
```goo
package foo
import (
"testing"
"time"
)
func BenchmarkFoo(b *testing.B) {
for j := 0; j < b.N; j++ {
time.Sleep(time.Millisecond)
}
}
func BenchmarkBar(b *testing.B) {
for j := 0; j < b.N; j++ {
}
}
```
### What did you expect to see?
```
goos: darwin
goarch: amd64
BenchmarkFoo-4 1000 1357941 ns/op
BenchmarkBar-4 2000000000 0.32 ns/op
```
### What did you see instead?
```
goos: darwin
goarch: amd64
BenchmarkFoo-4 1000 1357941 ns/op
BenchmarkBar-4 2000000000 0.32 ns/op
```
### Thoughts
I guess this has to do with performance numbers [being printed](https://github.com/golang/go/blob/master/src/testing/benchmark.go#L436) as `%8d`, so anything larger than that will get shifted. | Testing,NeedsInvestigation | low | Critical |
422,854,111 | TypeScript | Ambient imports are not removed when importing an interface from a package & emitDecoratorMetadata is enabled | <!-- π¨ STOP π¨ π¦π§π’π£ π¨ πΊπ»πΆπ· π¨
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!
Please help us by doing the following steps before logging an issue:
* Search: https://github.com/Microsoft/TypeScript/search?type=Issues
* Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
Please fill in the *entire* template below.
-->
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 3.4.0-dev.20190319
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
emitDecoratorMetadata emit decorator metatdata import interface package experimental decorators experimentalDecorators
**Code**
With the following enabled:
- `experimentalDecorators`
- `emitDecoratorMetadata`
This happens specifically when you import an interface (and nothing else) from a package, and try to add a decorator onto a class (I haven't checked with functions yet) that uses the interface. If you are doing the same with a file in the same compilation, then it works fine.
```ts
import { SampleInterface } from 'package';
function TestDecorator(constructor: Function) {
console.log(constructor);
}
@TestDecorator
class Test {
public constructor(public readonly obj: SampleInterface) {}
}
const t = new Test({
a: 'a',
b: 2
});
```
If you need a more concrete example, I can try and publish a small example library and try to reproduce it with that.
**Expected behavior:**
The import to `package` should be removed from the output (the same as importing from a local file).
**Actual behavior:**
The import is left in the output, and is never used. | Bug | low | Critical |
422,854,725 | flutter | make background execution as developer-friendly as possible | Most app these days has a need to run in the background and on certain event make calls to callback functions. Using flutter this has been a really tedious task that mostly requires hacks.
Searching around for possible solutions, I found this article on medium.
https://medium.com/flutter-io/executing-dart-in-the-background-with-flutter-plugins-and-geofencing-2b3e40a1a124
But then it is not so user friendly and I think it only targets advanced developers.
-----------------------------------------------------------------
I have thought about possible simple solutions;
Is it possible to Provide a wrapper around runApp() that will enable whatever app it wraps run in background mode and also accepts callback functions to be called on certain events that might be triggered.l?
Secondly, is there a way to make the class housing the parent material app (where app theme, fonts, accent colors etc are set) to extend another class/mixin which then provides the background execution feature and also handy functions to override and set callbacks, etc.? | c: new feature,framework,P3,team-framework,triaged-framework | low | Minor |
422,863,696 | pytorch | Update weight initialisations to current best practices | ## π Feature
Update weight initialisations to current best practices.
## Motivation
The current weight initialisations for a lot of modules (e.g. `nn.Linear`) may be ad-hoc/carried over from Torch7, and hence may not reflect what is considered to be the best practice now. At least they are now documented (https://github.com/pytorch/pytorch/pull/9038), but it would be better to pick something sensible now and document it (as opposed to e.g. what happened with `nn.Conv2d`: https://twitter.com/jeremyphoward/status/1107869607677681664).
## Pitch
Update the weight initialisations for modules to the following (using `nn.init` where applicable):
- `Linear`: ? weight, zero bias
- `Bilinear`: ? weight, zero bias
- `Embedding`: ? weight
- `EmbeddingBag`: ? weight
- `Conv{Transpose}{1,2,3}d`: ? weight, zero bias
- `RNN{Cell}`: ? weight_ih, ? weight_hh, zero bias_ih, zero bias_hh
- `LSTM{Cell}`: ? weight_ih, ? weight_hh, zero bias_ih, zero bias_hh (though perhaps +1 forget gate bias)
- `GRU{Cell}`: ? weight_ih, ? weight_hh, zero bias_ih, zero bias_hh
- `BatchNorm{1,2,3}d`: ones weight, zero bias
- `GroupNorm`: ones weight, zero bias
- `InstanceNorm{1,2,3}d`: ones weight, zero bias
- `LayerNorm`: ones weight, zero bias
The current proposal is to have new weight initialisations as default, acknowledge that this is a breaking change, but have a (global?) flag to revert to the original initialisations in order to preserve backwards compatibility if necessary.
cc @ezyang @gchanan @zou3519 @SsnL | high priority,module: bc-breaking,feature,module: nn,triaged,quansight-nack | high | Critical |
422,865,948 | go | x/text/language/display: request to change British to UK | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.12.1 linux/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes, v0.3.0
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mhorn/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mhorn/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/golang"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build634574407=/tmp/go-build -gno-record-gcc-switches"
</pre></details>
### What did you do?
Using "golang.org/x/text/language/display" tags to display the language name.
https://play.golang.org/p/kCvmNJvgrHO
I was asked to change the "British English" to "English (UK)", but I see a few others that seem to be "non-standard"?
Should I be using a different API for this format? Or has "text/language" fallen behind current updates?
### What did you expect to see?
<pre>
Tag Name Language Name (Display Name)
-------- ------------- (------------)
English (Antigua & Barbuda) English (English)
English (Australian) Australian English (English)
English (Botswana) English (English)
English (Canadian) Canadian English (English)
English (UK) British English (English)
English (Hong Kong SAR China) English (English)
English (Ireland) English (English)
English (Israel) English (English)
English (India) English (English)
English (Nigeria) English (English)
English (New Zealand) English (English)
English (Philippines) English (English)
English (Seychelles) English (English)
English (Singapore) English (English)
English (US) American English (English)
English (South Africa) English (English)
English (Zambia) English (English)
English (Zimbabwe) English (English)
</pre>
### What did you see instead?
<pre>
Tag Name Language Name (Display Name)
-------- ------------- (------------)
English (Antigua & Barbuda) English (English)
Australian English Australian English (Australian English)
English (Botswana) English (English)
Canadian English Canadian English (Canadian English)
British English British English (British English)
English (Hong Kong SAR China) English (English)
English (Ireland) English (English)
English (Israel) English (English)
English (India) English (English)
English (Nigeria) English (English)
English (New Zealand) English (English)
English (Philippines) English (English)
English (Seychelles) English (English)
English (Singapore) English (English)
American English American English (American English)
English (South Africa) English (English)
English (Zambia) English (English)
English (Zimbabwe) English (English)
</pre> | NeedsDecision | low | Critical |
422,872,651 | react | eslint-plugin-react-hooks - autofix useCallback/useMemo behaviour | **Do you want to request a *feature* or report a *bug*?**
Discussion for new feature
**What is the current behavior?**
useCallback/useMemo hook's do nothing when there is no second argument provided for deps. The eslint plugin reports this but does not autofix
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
16.8.4
**PR to implement:**
https://github.com/facebook/react/pull/15146
Currently, the eslint plugin does not autofix useCallback/useMemo to infer deps if there isn't a second argument provided to the hook. We can autofix it to infer deps if needed, or autofix to remove the hook altogether if there no deps needed (according to https://reactjs.org/docs/hooks-reference.html#usememo, if no second argument is provided it behaves as if the hook doesn't exist anyways).
What would be the best way to implement this autofix? In my opinion, linting shouldn't be breaking functionality on an autofix, so autofixing to remove the hook is the safest to implement. Autofixing to infer deps will change behavior in code so I was thinking of having a config option the dev needs to specify so that linting changes that is affecting behavior is explicit.
| Type: Discussion,Component: ESLint Rules | medium | Critical |
422,874,408 | react | Effect memoization and immutable data structures | Current design of `useEffect` requires dependencies to be either primitive values or references to the same object, because shallow equality check relies on `Object.is` which is an identity check for objects.
The above means that there's no way to perform structural comparison, which is needed for immutable data structures when identity check fails.
To maintain backwards compatibility a comparator function could be provided as the third argument to `useEffect`:
```js
useEffect(fn, deps, depsComparator);
```
The goal here is to preserve an ease of use of the API with immutable data structures in order to provide an idiomatic usage of `useEffect` in ClojureScript and other environments that rely on immutability e.g. Immutable.js
cc @mhuebert @Lokeh @orestis | Type: Discussion | medium | Critical |
422,889,412 | godot | ResourceSaver.save() discards instanciation of inherited scenes | ___
***Bugsquad note:** This issue has been confirmed several times already. No need to confirm it further.*
___
**Godot version:**
3.1.stable.official
**OS/device including version:**
Manjaro Linux
**Issue description:**
When saving a node to disk with ResourceSaver.save() and the node is an inherited scene, the instantiation in the saved scene is discarded.
It does not happen with instantiated child nodes of the saved node, only if the saved node itself is an instanced scene.
**Steps to reproduce:**
1. Open Project in Editor.
2. Open SaveMe.tscn
3. Run the Project
- running the project will save the instanced SaveMe in Main into res://save/
4. Compare `res://SaveMe.tscn` with `res://save/SaveMe.tscn`
**Minimal reproduction project:**
[resource-saver.zip](https://github.com/godotengine/godot/files/2984977/resource-saver.zip)
| bug,topic:core,confirmed | low | Critical |
422,899,673 | godot | AnimationPlayer track values overlapping | <!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->
**Godot version:**
3.1 stable
**OS/device including version:**
Win
**Issue description:**
Track values are illegible because they overlapp each other visually, especially if the are longer or the keyframes closer together.

Proposed solution: Hide the text of the previous value where the next keyframe starts. | bug,topic:editor,confirmed,usability | low | Major |
422,960,547 | godot | Add texture channel choice for all BW/Greyscale textures in Spatial Materials | **Feature proposal**
3D / Spatial Material / Material colors, maps and channels
if it isnβt a technical limitation, it would be useful to have the possibility to choose whatever channel we want for any grayscale /BW texture we use in the Spatial material. We already can for some of them (ie : Metallic /Roughness/ AO) but not for Depth or the Detail Mask.
| enhancement,topic:rendering | low | Minor |
422,983,927 | rust | Better diagnostics for multiple borrowed fields with non-unified lifetimes | [The following code](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=881a7cde8e12b2b441de99c478aa9a99)
```
struct Foo<'a> { a: &'a usize }
fn get_account_value<'l>(
flag: bool,
a: &'l mut Foo,
b: &'l mut Foo,
) {
let _ = if flag { a } else { b };
}
```
Produces the following output:
```
error[E0623]: lifetime mismatch
--> src/main.rs:8:34
|
5 | a: &'l mut Foo,
| ---
6 | b: &'l mut Foo,
| --- these two types are declared with different lifetimes...
7 | ) {
8 | let _ = if flag { a } else { b };
| ^ ...but data from `b` flows into `a` here
error[E0623]: lifetime mismatch
--> src/main.rs:8:34
|
5 | a: &'l mut Foo,
| --- these two types are declared with different lifetimes...
6 | b: &'l mut Foo,
| ---
7 | ) {
8 | let _ = if flag { a } else { b };
| ^ ...but data from `a` flows into `b` here
error: aborting due to 2 previous errors
```
It seems like the borrow checker could handle this case better. Particularly, the fact that `Foo` has a lifetime makes the errors more puzzling than they need to be. | C-enhancement,A-diagnostics,A-lifetimes,T-compiler,fixed-by-NLL | low | Critical |
422,994,250 | rust | Tracking issue for musl host toolchain | TODO:
- [x] Installable host toolchain (https://github.com/rust-lang/rust/pull/58575)
- [x] Rustup support (https://github.com/rust-lang/rustup.rs/pull/1882)
- [x] Tests passing as the host (https://github.com/rust-lang/rust/pull/60474)
- [ ] Transition musl targets to dynamically link libc by default
- MCP approving this: https://github.com/rust-lang/compiler-team/issues/422
- [x] static-pie support https://github.com/rust-lang/rust/issues/53968 (done in https://github.com/rust-lang/rust/pull/70740)
- [x] Update to musl 1.2 https://github.com/rust-lang/rust/issues/91178
For people looking how to use as it dynamic target:
```bash
RUSTFLAGS="-C target-feature=-crt-static" cargo build
``` | T-compiler,O-musl,C-tracking-issue,S-tracking-impl-incomplete | high | Critical |
422,999,320 | go | x/net/idna: context validation | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.11.5 linux/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
</pre></details>
### What did you do?
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
I wrote an example to convert a-label to u-label an viceversa and also perform IDNA2008 validation based on the provided a-label.
I checked the results with other IDNA tools and found that with net/idna I am not getting context errors that other libraries are reporting.
Here is the main code of the example:
```
func main() {
p = idna.New(
idna.BidiRule(),
idna.MapForLookup(),
idna.StrictDomainName(true),
idna.Transitional(false),
idna.ValidateForRegistration(),
idna.ValidateLabels(true),
idna.VerifyDNSLength(true))
alabel := os.Args[1]
ulabel, error := p.ToUnicode(alabel)
if error != nil {
fmt.Printf("Error converting string: %v\n", error)
os.Exit(1)
}
fmt.Println(alabel,ulabel)
convertedAlabel, error := p.ToASCII(ulabel)
if error != nil {
fmt.Printf("Error converting string: %v\n", error)
os.Exit(1)
}
if convertedAlabel != alabel {
fmt.Printf("Provide a-label doesn't match converted a-label: %v\n", convertedAlabel)
fmt.Println(convertedAlabel)
os.Exit(1)
}
}
```
Here are some label examples:
```
xn--diethealth-zp5i
xn--diy-ps4bb
xn--pfs-ps4bb
```
Can you please confirm if this is missing validation of IDNA2008?
Could it be possible to include one new method/flag to get full IDNA2008 validation with the function?
### What did you expect to see?
Here are the errors reported for 2 other idna utilities:
```
xn--diethealth-zp5i,string contains a forbidden context-o character,Codepoint U+30FB not allowed at position 5 in 'dietγ»health'
xn--diy-ps4bb,string contains a forbidden context-o character,Codepoint U+30FB not allowed at position 2 in 'dγ»iγ»y'
xn--pfs-ps4bb,string contains a forbidden context-o character,Codepoint U+30FB not allowed at position 2 in 'pγ»fγ»s'
```
### What did you see instead?
```
xn--diethealth-zp5i dietγ»health
xn--diy-ps4bb dγ»iγ»y
xn--pfs-ps4bb pγ»fγ»s
```
| NeedsInvestigation | low | Critical |
423,017,275 | go | net/http: http.Client calls can stall when a persistent connection is slow to close | go1.12's http.Client supports supplying a customized RoundTripper as the transport. A custom Dial can be supplied, e.g., to implement tunneling or proxying through nonstandard protocols, and returns objects implmenting net.Conn, which in turn includes a Close(). The native implementation of Close() on UNIX is a close(2) on the underlying socket, which is a local syscall and rarely blocks, especially in HTTP. However, if the supplied Dial returns a net.Conn with a longer shutdown (e.g. because it's tunneling over another protocol that requires doing a round trip on the underlying protocol to gracefully terminate), it can block for longer - potentially as long as the network RTT to a distant server plus that server's internal processing time.
The http implementation tries to keep persistent connections around, and when a new request is initiated to a "key" (scheme+protocol+host+port), it has an LRU cache of idle connections to choose from in getIdleConn() (https://golang.org/src/net/http/transport.go#L829). Before choosing one, it calls isBroken() on the corresponding http.persistConn (https://golang.org/src/net/http/transport.go#L848) in case the connection had just died an instant before. However, isBroken() requires acquiring the persistConn's mutex (https://golang.org/src/net/http/transport.go#L1533) before returning the nil-ness of persistConn.closed. That same mutex is held by persistConn.ReadLoop() (https://golang.org/src/net/http/transport.go#L1642), which can call pc.readLoopPeekFailLocked(), which calls pc.closeLocked(), which finally calls Close() on the net.Conn. This isn't a deadlock, but it does block with the persistConn.mu lock held for as long as it takes that Close() to finish, and so any calls to getIdleConn() that end up picking that connection will end up blocking as well. getIdleConn() removed the pconn from its idleLRU cache, but did not remove it from its list of idle connections, so it may end up getting picked.
Even for cases without a custom transport, there might be a tail-case optimization here for clients that make repeated use of the same HTTP server endpoint with finite re-usability of the TCP connections that could currently block bystander threads unnecessarily on the close() syscall.
Reference Google-internal bug 128442309. | NeedsInvestigation | low | Critical |
423,017,438 | godot | Visual scripting methods from parent class not showing | <!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->
**Godot version:**
<!-- Specify commit hash if non-official. -->
3.1
**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Ubuntu 18.04
**Issue description:**
<!-- What happened, and what was expected. -->
When dragging a node which is an "inherited scene" on to the visual scripting area, I'm able to see methods I've added to the child class, but not methods from the parent class. Also, functions that I have overridden seem to show up twice.
**Steps to reproduce:**
- Create a scene with a script that has `func a` and `func b`
- Create an inherited scene with and extend the script to overrid `func a`
- Add child scene to a new scene as a node and create visual script
- Drag instance of child scene to visual script
- Click `Function` under `VisualScriptFunctionCall` and note only `func a` shows up (twice) but not `func b`
**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
[vsinheritance.zip](https://github.com/godotengine/godot/files/2986073/vsinheritance.zip) | bug,confirmed,topic:visualscript | low | Critical |
423,038,306 | go | math/big: large fibonacci calculation is faster in GMP | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
go1.12.1 windows/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Philip\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\Philip\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Philip\AppData\Local\Temp\go-build593709294=/tmp/go-build -gno-record-gcc-switches
</pre></details>
### What did you do?
I wrote a Fibonacci calculator in Go using the math/big library. It was ~instant in run time up until n=10^7, after which it was extremely slow. I then used https://github.com/ncw/gmp to replace math/big with a gmp wrapper. No code was changed.
### What did you expect to see?
A small performance benefit, maybe 2x or 3x.
### What did you see instead?
With the same set of code, gmp quickly calculates n=10^8 in 5 seconds, while the normal math/big library takes more than 5 minutes. Gmp is even able to calculate n=10^9 after 1 minute.
| Performance,NeedsInvestigation | medium | Critical |
423,039,671 | pytorch | Rename ignore_index to ignore_target in CrossEntropyLoss | ## π Documentation
`ignore_index` is a little confusing because if I want to ignore the target value 0, `ignore_index` suggests (unless one reads the explanation twice over or more) that it's going to ignore the 0th index in the target list which is not what I want as the target value 0 can be at any index/indices in the list.
`ignore_target` makes it quite self-explanatory in my opinion. | module: nn,low priority,triaged,enhancement,small | low | Minor |
423,042,855 | flutter | Make `Material` cheaper when elevation = 0 | From https://github.com/flutter/flutter/pull/21896#discussion_r267128669 @HansMuller suggested that a `Material` widget with an `elevation` of 0 may be more expensive than it should be.
Perhaps we could optimize `Material` for case where `elevation = 0` to use something like a `Container`. | c: new feature,framework,f: material design,c: proposal,P3,team-design,triaged-design | low | Minor |
423,061,077 | vscode | [folding] custom folding text for folded ranges | Currently when you create custom folds using a FoldingRangeProvider, there is no option to edit the text that is displayed when the text is folded. The editor just displays the first line of the fold with a three dots symbol after it.
`#region Some region description...`
It would be helpful if it was possible for `FoldingRangeProvider` instances to return ranges with a RangeDisplayName property that would be displayed when the folding range wass collapsed. I'd suggest that the display text would replace the ... symbol and the first line would no longer be displayed as per the behaviour in Visual Studio.
| feature-request,editor-folding | medium | Critical |
423,061,505 | godot | "No valid library handle, can't terminate GDNative object" - Output Error | **Godot version:**
3.1
**OS/device including version:**
Latest OSX
**Issue description:**
I moved **from 3.1 beta 10 to 3.1** and I started seeing this in my output as an error everytime Godot refreshes (unfocus Godot and then focus it again).
```
modules/gdnative/gdnative.cpp:393 - No valid library handle, can't terminate GDNative object
```
I get these errors whenever I run the debug project:
```
** Debug Process Started **
modules/gdnative/gdnative.cpp:488 - No valid library handle, can't get symbol from GDNative object
modules/gdnative/gdnative.cpp:393 - No valid library handle, can't terminate GDNative object
```
I've tried removing all my GDNative objects, and I still get those errors in output.
The game runs completely fine, no issues it seems, no crashes. It might be some type of overzealous error output?
Unfortunately, I haven't been able to find a minimal project to reproduce this.
Any ideas? | bug,topic:editor,confirmed,topic:gdextension | medium | Critical |
423,083,789 | go | cmd/compile: bounds checking for unrolled loops is weird | ### What version of Go are you using (`go version`)?
<pre>
$ go version
1.12 (but also 1.11)
</pre>
### Does this issue reproduce with the latest release?
seems to
### What operating system and processor architecture are you using (`go env`)?
amd64, but N/A-ish?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
</pre></details>
### What did you do?
Tried to unroll a loop, then tried to reduce bounds checking. Here's the godbolt page with the assembly I was looking at.
https://godbolt.org/z/GQuZaf
### What did you expect to see?
A lot less bounds checking.
### What did you see instead?
It's obvious to me that `i := 0; i < 1024; i += 4` produces no values of i such that i+3 is is outside a :1024 slice.
However, there's an even weirder thing: If I do that loop, I get three bounds checks, one for each of the three lines that uses a value computed from i.
But if I change it to `i < 1024-3`, which does not actually change what values i can ever take, it *adds* a bounds check for the plain i+0 line! That can't possibly be right. If I know the loop's limit is definitely *smaller* than the size I've already checked the slice to have, that should allow eliminating some bounds checks. (Interestingly, if I set the limit to 1020, then all the bounds checks go away. I suppose I could just unroll the last four entries separately.) | Performance,NeedsInvestigation,compiler/runtime | low | Major |
423,084,437 | go | cmd/compile: runtime check for availability of popcount is spammy | ### What version of Go are you using (`go version`)?
<pre>
$ go version
1.12 (but also 1.11)
</pre>
### Does this issue reproduce with the latest release?
seems to
### What operating system and processor architecture are you using (`go env`)?
amd64
### What did you do?
Was looking at an unrolled loop.
https://godbolt.org/z/GQuZaf
### What did you expect to see?
A test for whether the target system had popcount.
### What did you see instead?
Four separate tests per unrolled loop, and the tests repeating every time through the loop.
This seems like it should be a cacheable result. It might even be worth generating two copies of the loop; the cost of all those branches is large, and doing a single branch up front would be nicer. I don't think there's any facility available to me to let me write the branch in my own code. | Performance,NeedsInvestigation,compiler/runtime | low | Minor |
423,095,775 | pytorch | [JIT] bitwise NOT does not handle tensor shapes correctly under JIT | ## π Bug
It seems that `~` operator does not generalize to different tensor shapes under JIT. Refer to https://github.com/pyro-ppl/pyro/issues/1784.
## To Reproduce
```python
>>> def f(x): return ~x
>>> jit_fn = torch.jit.trace(f, (torch.tensor([0], dtype=torch.uint8),))
>>> jit_fn(torch.tensor([0], dtype=torch.uint8))
tensor([1], dtype=torch.uint8)
>>> jit_fn(torch.tensor([0, 0], dtype=torch.uint8))
RuntimeError:
output with shape [1] doesn't match the broadcast shape [2] (compute_shape at /Users/soumith/mc3build/conda-bld/pytorch_1549593514549/work/aten/src/ATen/native/TensorIterator.cpp:534)
frame #0: c10::Error::Error(c10::SourceLocation, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 64 (0x11341bff0 in libc10.dylib)
frame #1: at::TensorIterator::compute_shape() + 1568 (0x11c1078f0 in libcaffe2.dylib)
frame #2: at::TensorIterator::Builder::build() + 39 (0x11c106907 in libcaffe2.dylib)
frame #3: at::TensorIterator::binary_op(at::Tensor&, at::Tensor const&, at::Tensor const&) + 434 (0x11c1064b2 in libcaffe2.dylib)
frame #4: at::native::sub_out(at::Tensor&, at::Tensor const&, at::Tensor const&, c10::Scalar) + 718 (0x11bfad4ae in libcaffe2.dylib)
frame #5: at::native::sub_(at::Tensor&, at::Tensor const&, c10::Scalar) + 35 (0x11bfadc73 in libcaffe2.dylib)
frame #6: at::TypeDefault::sub_(at::Tensor&, at::Tensor const&, c10::Scalar) const + 232 (0x11c3878e8 in libcaffe2.dylib)
frame #7: torch::autograd::VariableType::sub_(at::Tensor&, at::Tensor const&, c10::Scalar) const + 1254 (0x11f4d44d6 in libtorch.1.dylib)
frame #8: std::__1::__function::__func<torch::jit::(anonymous namespace)::$_492, std::__1::allocator<torch::jit::(anonymous namespace)::$_492>, int (std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue> >&)>::operator()(std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue> >&) + 163 (0x11fa89423 in libtorch.1.dylib)
frame #9: torch::jit::InterpreterStateImpl::runImpl(std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue> >&) + 455 (0x11faf86f7 in libtorch.1.dylib)
...
```
## Expected behavior
Function gives correct results with tensors of arbitrary shape.
## Environment
```
$ python collect_env.py
Collecting environment information...
PyTorch version: 1.0.1.post2
Is debug build: No
CUDA used to build PyTorch: None
OS: Mac OSX 10.14.3
GCC version: Could not collect
CMake version: Could not collect
Python version: 3.6
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Versions of relevant libraries:
[pip3] numpy==1.15.4
[pip3] torch==1.0.1.post2
[pip3] torchfile==0.1.0
[pip3] torchvision==0.2.1
[conda] blas 1.0 mkl
[conda] mkl 2019.1 144
[conda] mkl_fft 1.0.10 py36h5e564d8_0
[conda] mkl_random 1.0.2 py36h27c97d8_0
[conda] pytorch 1.0.1 py3.6_2 pytorch
[conda] torchfile 0.1.0 <pip>
[conda] torchvision 0.2.1 py_2 pytorch
```
cc. @apaszke
cc @suo | oncall: jit,triaged | low | Critical |
423,131,489 | vue | vue-template-compiler lacks a stringify API | ### What problem does this feature solve?
when i use vue-template-compiler parseComponent a vue file, and use @babel/parser @babel/traverse @babel/generator modify some code at vueTemplateComplier AST.script content
But can not find a api to auto generate file from vueTemplateComplier AST it to origin file.
### What does the proposed API look like?
const fileContent = compiler.generateComponent(<vueTemplateComplier AST>, {
pad: 'space'
});
// fileContent is same as *.vue file content
<!-- generated by vue-issues. DO NOT REMOVE --> | feature request | low | Major |
423,225,844 | vscode | Ability to vary completion item insertion (based on chosen commit character?) | `CompletionItem` allows setting a list of commit characters that can be used to select the item. However, what you can do with that in practice is limited, since the insertion will always be the same no matter which commit character was used.
It would be very powerful if the insertion could vary depending on which commit character was selected (`insertText`, `additionalTextEdits`).
Here's an example of one of the use cases we wanted to support in the Haxe extension:
- When inserting an unimported type, we have two options: generate an import via `additionalTextEdits`, or insert the fully qualified path instead. You don't always want the same behavior here, so it would be neat if you could for instance:
- use <kbd>Enter</kbd> to generate the import and insert the unqualified name
- use <kbd>Tab</kbd> to insert the fully qualified name
- Right now, there's two workarounds:
- Duplicate each completion item, so you have one for auto-importing and one for inserting fully quallified names. However, this would make for a very messy completion list, so we don't do this in the Haxe extension.
- Have a setting that controls which behavior should be used. We _do_ have this in the Haxe extension, but as mentioned before, sometimes you want to decide which one to use "in the moment", without having to mess with settings.
There's precedent for this sort of behavior in other IDEs. For instance in IntelliJ (Java), you can use <kbd>Alt</kbd>+<kbd>Enter</kbd> to open a code action menu _on completion items_. There you can for instance choose to import a method statically:

Perhaps allowing "code actions" on completion items like that is better than basing it purely on which commit character was used, as it's much more explicit.
Thoughts? | feature-request,suggest | low | Minor |
423,255,008 | youtube-dl | Kanopy site support? | ## Please follow the guide below
- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`)
- Use the *Preview* tab to see what your issue will actually look like
---
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2019.03.18*. If it's not, read [this FAQ entry](https://github.com/ytdl-org/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2019.03.18**
### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/ytdl-org/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/ytdl-org/youtube-dl#faq) and [BUGS](https://github.com/ytdl-org/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/ytdl-org/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser
### What is the purpose of your *issue*?
- [ ] Bug report (encountered problems with youtube-dl)
- [x] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other
---
### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue*
---
### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:
Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):
```
C:\Users\****\Downloads>youtube-dl -v --cookies kanopy.cookies.txt https://nypl.kanopy.com/video/ken-burns-empire-air
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--cookies', 'kanopy.cookies.txt', 'https://nypl.kanopy.com/video/ken-burns-empire-air']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.03.18
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: ffmpeg 4.1.1, ffprobe 4.1.1
[debug] Proxy map: {}
[generic] ken-burns-empire-air: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ken-burns-empire-air: Downloading webpage
[generic] ken-burns-empire-air: Extracting information
ERROR: Unsupported URL: https://nypl.kanopy.com/video/ken-burns-empire-air
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpcs52imf5\build\youtube_dl\YoutubeDL.py", line 794, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpcs52imf5\build\youtube_dl\extractor\common.py", line 529, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpcs52imf5\build\youtube_dl\extractor\generic.py", line 3320, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: https://nypl.kanopy.com/video/ken-burns-empire-air
<end of log>
```
---
### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single video: https://nypl.kanopy.com/video/battleship-potemkin [PUBLIC DOMAIN, see description below]
- Playlist: https://nypl.kanopy.com/playlist/5597146
Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/ytdl-org/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
---
### Description of your *issue*, suggested solution and other information
[Kanopy](https://kanopy.com) is [very popular with libraries in the US](https://www.nytimes.com/2017/08/24/watching/kanopy-criterion-collection-library-card.html), most notably the [NYPL](https://www.nypl.org/). You should check to see if [your local library](https://www.kanopy.com/wayf) is supported. Anyway, Kanopy is a treasure trove of educational and/or [public domain films](https://en.wikipedia.org/wiki/Public_domain_film#United_States) and would be an excellent supported site addition to this already excellent app. THANK YOU!
| account-needed | low | Critical |
423,273,307 | pytorch | Context Manager that disables training mode with in a nn.Module. | ## π Context Manager that disables training mode with in a nn.Module.
When running inference on validation datasets, you need to put some modules in evaluation mode and its desirable to stop gradient calculation. Currently `with torch.no_grad():` can be used to disable gradient calculation temporarily while batchnorm and drop out layers have to be set to evaluation mode using `model.train(True)` followed by a `model.train(False)` once evaluation is complete. Currently this syntax is used,
```python
model.train(False)
with torch.no_grad():
outputs = model(inputs)
model.train(True)
return outputs
```
. This is a potential source of bugs, as people will sometimes instead use `model.eval()` and forget to set the model back to training mode at the end of inference. Suggest having the following syntax,
```python
with torch.no_train(model):
with torch.no_grad():
outputs = model(inputs):
return outputs
```
. This syntax would stop this type of bug from occurring.
| feature,module: nn,triaged | medium | Critical |
423,321,504 | go | cmd/vet: add math check for erroneous math expressions | Go constants can be extended to support -0, NaN, +Inf, and -Inf, as constant values.
There is no special name for any of these constants; this is support for values, not new tokens. The model for this is mythical "IEEE Reals", which is the combination of Real numbers (not floating point) with the rules for IEEE -0, NaN, +Inf, and -Inf added where they fit, in accordance with the rules for IEEE floating point.
Why should we do this?
1. It brings us closer to no-surprises support for IEEE floating point. I would say "zero surprises" except that there are still cases where large-precision constant arithmetic provides different answers; I think we handle that using the "IEEE real numbers" explanation.
2. A corollary of the first, is that numerically oriented people and code coming from other languages will experience one fewer surprise or speed bump in their use of Go. Sure, the workaround is easy, but it's not as easy as not needing to know it.
3. It brings constant evaluation slightly closer to run-time evaluation of Go programs; one more difference/surprise is avoided.
4. It breaks zero programs except for tests targeted specifically to this behavior.
5. I have never, ever, heard of support for these constant values causing problems for anyone in any other language that supports them.
The following conversion-from-constant-value rules are added: when converting to integer, -0 becomes 0, and NaN and Inf become errors. When converting to floating point (or component of a complex number), the obvious mapping to IEEE floats occurs. In the case of tiny negative fraction underflow when converting to float, -0 results; in the case of positive or negative overflow on conversion to float, +Inf or -Inf results, as appropriate.
This arithmetic rules are enumerated in the following tables, which were checked against the IEEE specification and run-time arithmetic evaluation in both Java (expected to conform to IEEE) and Go (since this [commit for 1.13](https://github.com/golang/go/commit/653579138555ff2728ba16f841b640e06deab8df) , believed to conform to IEEE).
Legend:
```
R = real numbers
P = { x in R such that x > 0} (but not +Inf)
N = { x in R such that x < 0} (but not -Inf)
Z = 0
NZ = -0
PI = positive infinity
NI = negative infinity
NaN = not-a-number
```
In the tables below, "R" as a result means to use the rules for real numbers. "RZ" means use the rule for real numbers with NZ replaced by Z.
addition|P|N|Z|NZ|PI|NI|NaN
-|-|-|-|-|-|-|-
P|R|R|R|RZ|PI|NI|NaN
N|R|R|R|RZ|PI|NI|NaN
Z|R|R|R|Z|PI|NI|NaN
NZ|RZ|RZ|Z|NZ|PI|NI|NaN
PI|PI|PI|PI|PI|PI|NaN|NaN
NI|NI|NI|NI|NI|NaN|NI|NaN
NaN|NaN|NaN|NaN|NaN|NaN|NaN|NaN
subtraction (column - row)|P|N|Z|NZ|PI|NI|NaN
-|-|-|-|-|-|-|-
P|R|R|R|RZ|NI|PI|NaN
N|R|R|R|RZ|NI|PI|NaN
Z|R|R|R|Z|NI|PI|NaN
NZ|RZ|RZ|NZ|Z|NI|PI|NaN
PI|PI|PI|PI|PI|NaN|PI|NaN
NI|NI|NI|NI|NI|NI|NaN|NaN
NaN|NaN|NaN|NaN|NaN|NaN|NaN|NaN
multiplication|P|N|Z|NZ|PI|NI|NaN
-|-|-|-|-|-|-|-
P|R|R|Z|NZ|PI|NI|NaN
N|R|R|NZ|Z|NI|PI|NaN
Z|Z|NZ|Z|NZ|NaN|NaN|NaN
NZ|NZ|Z|NZ|Z|NaN|NaN|NaN
PI|PI|NI|NaN|NaN|PI|NI|NaN
NI|NI|PI|NaN|NaN|NI|PI|NaN
NaN|NaN|NaN|NaN|NaN|NaN|NaN|NaN
division (row/column)|P|N|Z|NZ|PI|NI|NaN
-|-|-|-|-|-|-|-
P|R|R|PI|NI|Z|NZ|NaN
N|R|R|NI|PI|NZ|Z|NaN
Z|Z|NZ|NaN|NaN|Z|NZ|NaN
NZ|NZ|Z|NaN|NaN|NZ|Z|NaN
PI|PI|NI|PI|NI|NaN|NaN|NaN
NI|NI|PI|NI|PI|NaN|NaN|NaN
NaN|NaN|NaN|NaN|NaN|NaN|NaN|NaN
remainder (row REM column)|P|N|Z|NZ|PI|NI|NaN
-|-|-|-|-|-|-|-
P|R|R|NaN|NaN|x|x|NaN
N|R|NZ|NaN|NaN|x|x|NaN
Z|Z|Z|NaN|NaN|Z|Z|NaN
NZ|NZ|NZ|NaN|NaN|NZ|NZ|NaN
PI|NaN|NaN|NaN|NaN|NaN|NaN|NaN
NI|NaN|NaN|NaN|NaN|NaN|NaN|NaN
NaN|NaN|NaN|NaN|NaN|NaN|NaN|NaN
equality|P|N|Z|NZ|PI|NI|NaN
-|-|-|-|-|-|-|-
P|R|R|R|RZ|F|F|F
N|R|R|R|RZ|F|F|F
Z|R|R|R|RZ|F|F|F
NZ|RZ|RZ|RZ|RZ|F|F|F
PI|F|F|F|F|T|F|F
NI|F|F|F|F|F|T|F
NaN|F|F|F|F|F|F|F
less than (row < column) |P|N|Z|NZ|PI|NI|NaN
-|-|-|-|-|-|-|-
P|R|R|R|RZ|T|F|F
N|R|R|R|RZ|T|F|F
Z|R|R|R|RZ|T|F|F
NZ|RZ|RZ|RZ|RZ|T|F|F
PI|F|F|F|F|F|F|F
NI|T|T|T|T|T|F|F
NaN|F|F|F|F|F|F|F
| Proposal,Proposal-Accepted,Analysis | medium | Critical |
423,387,812 | pytorch | Add support for tuple type deduction in C++ custom operators | ## π Feature
Right now RegisterOperators support deduction of schema and "auto converting" values for multiple types, including lists and dicts. We should support tuples (as mapped to std::tuple in C++) too.
## Pitch
All reasonable torchscript types should be easily mappable to C++ operators. following code should work:
```
RegisterOperators reg({createOperator(
"foo::tuple((int, float, Tensor) arg) -> float",
[](const std::tuple<int, double, at::Tensor>& arg) { return std::get<1>(); })});
```
## Additional context
Places to change:
https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/core/ivalue.h#L803 (generic_to)
https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/core/jit_type.h#L1026 (getTypePtr_)
Some metaprogramming would be required
@smessmer might be interested or up for grabs | module: internals,module: bootcamp,triaged,enhancement | low | Minor |
423,388,403 | flutter | Investigate `onPerformClick` and `onTouchEvent` in both `FlutterView`s | The engine Android linter is complaining that we have implemented `onTouchEvent()` but not `performClick()`. This relationship needs to be investigated and we either need to implement what is expected, or update the linter rules to avoid blocking PRs on this check.
https://developer.android.com/reference/android/view/View#onTouchEvent(android.view.MotionEvent)
https://developer.android.com/reference/android/view/View.html#performClick()
CC @gspencergoog | platform-android,engine,a: accessibility,P2,team-android,triaged-android | low | Minor |
423,431,339 | TypeScript | Feature Request: allow exclusion of node_modules when skipLibCheck is false | ## Search Terms
`skipLibCheck node_modules`, `skipLibCheck`
All I've found is this lonely [SO post](https://stackoverflow.com/questions/49985943/skip-library-check-only-in-node-modules). As that user notes, there are a lot of posts around Angular and excluding node_modules from typechecking on one dimension or another, but they all end up suggesting turning _on_ `skipLibCheck`.
## Suggestion
Allow the exclusion of files in node_modules (regardless of their inclusion in the Project) from lib checking when `skipLibCheck` is set to `false`.
## Use Cases
I want to be able to typecheck _my own_ `.d.ts` files without being responsible for all of the types my dependencies import. My local configuration is `strict` and it may be that the types provided in my packages were not intended `strict`ly, or other configurations in my local JSON run up against the way other packages have written theirs.
I am assuming the counterargument is that it's all-or-nothing, but then why do `.ts` files that _rely on_ `.d.ts` files typecheck fine when my `.d.ts` files are not typechecked? Can't that behavior be applied to definitions in node_modules?
## Examples
Not sure how to show an example here. I would like to be able to run `tsc --noEmit` on my codebase and get errors for my own definitions files without having a bunch of noise from unfixable errors in `node_modules/@types` etc.
## Checklist
My suggestion meets these guidelines:
* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
_If implemented as some additional flag?_
* [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).
I think so?
| Suggestion,In Discussion | high | Critical |
423,456,104 | godot | AnimationPlayer: Timeline cursor should jump to wherever I leftclick in the track | **Godot version:**
3.1
**Issue description:**
The AnimationPlayer currently only updates the 2D view when the user clicks on the timeline and therefore moves timeline cursor/timestamp (https://github.com/godotengine/godot/issues/27277)
If the user wants to insert a keyframe, they should be able to do so not by first clicking on the timeline, but directly on the location within the track where they want to insert or paste (https://github.com/godotengine/godot/issues/27280#) a keyframe. For my understanding for this to work, the timeline cursor/timestamp should jump to wherever the user leftclicks in the track. This would also allow the user to immediately see the state of the animation the user wants to change at this location. Right now, if they want to see what state the animation is at a given location on a track, the user always has to go up to the timeline and find the time, then go back down to the track. This is especially tedious the more tracks the animation has. | enhancement,topic:editor,usability | medium | Major |
423,460,223 | react | dangerouslySetInnerHTML is left empty on client render on top of bad server markup when rendering HTML | This seems to be an edge case of https://github.com/facebook/react/issues/11789 fixed in https://github.com/facebook/react/pull/13353/files.
I ran into this when trying to hydrate content rendered with https://github.com/prismicio/prismic-dom `asHtml` method.
**Do you want to request a *feature* or report a *bug*?**
Bug? I think.
**What is the current behavior?**
Current behavior:
1. Server-side stuff comes in from server and contains the things we need
2. Hydration mismatch happens
3. dangerouslySetInnerHTML is called with correct value but an empty string gets rendered instead
I tried to replicate the issue on https://codesandbox.io/s/2xojk10jln but failed.
The following testcase for `packages/react-dom/src/__tests__/ReactDOMServerIntegrationElements-test.js` produces the same result (I tried it first with the same PrismicDOM.RichText.asHtml(obj) call I have in the app) but I am not sure if it's correct:
```js
# test case
itRenders(
'a div with dangerouslySetInnerHTML set to html inserted',
async render => {
const obj = '<li>bar</li>';
const e = await render(
<div dangerouslySetInnerHTML={{__html: obj }} />,
);
expect(e.childNodes.length).toBe(1);
expect(e.firstChild.tagName).toBe('LI');
expect(e.firstChild.childNodes.length).toBe(1);
},
);
```
```bash
β renders a div with dangerouslySetInnerHTML set to html return value of function called with server string render (190ms)
β renders a div with dangerouslySetInnerHTML set to html return value of function called with server stream render (52ms)
β renders a div with dangerouslySetInnerHTML set to html return value of function called with clean client render (37ms)
β renders a div with dangerouslySetInnerHTML set to html return value of function called with client render on top of good server markup (74ms)
β renders a div with dangerouslySetInnerHTML set to html return value of function called with client render on top of bad server markup (34ms)
β ReactDOMServerIntegration βΊ ... βΊ renders a div with dangerouslySetInnerHTML set to html return value of function called with client render on top of bad server markup
expect(received).toBe(expected) // Object.is equality
Expected: "bar"
Received: ""
```
**What is the expected behavior?**
The client render would have rendered `<li>bar</li>`
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
commit c05b4b8 (latest master) and >16.8.
Sorry for a bit vague bug report.
| Type: Bug,Type: Needs Investigation | low | Critical |
423,461,459 | rust | Suggest & when a lifetime precedes a type. | If one types
```rust
fn foo(bar: 'static SomeStruct) { ... }
```
the compiler could suggest adding a `&` before the lifetime. This can be more useful in a generic parameter, where a high concentration of special characters makes it easy to not notice the mistake:
```rust
fn foo(bar: &mut HashSet<'static SomeStruct>) { ... }
```
Currently, the error message is just ``expected one of `,` or `>`, found `SomeStruct` ``. | A-parser,T-compiler,A-suggestion-diagnostics | low | Critical |
423,465,468 | go | net/http/httputil: support RFC 7239 Forwarded header in ReverseProxy | Revival of #20526 which was frozen due to age
I've been using services that make use of Go's Reverse Proxy, and think there's some substantial improvements in the Forwarded header that were overlooked in the original discussion.
Forwarded includes not just previous client IP, it also has the host and protocol, information that is currently haphazardly implemented in a few other non-standard X headers `X-Forwarded-Proto` and `X-Forwarded-Host` _most_ of the time. There's also `X-Real-IP` competing with `X-Forwarded-For`, and while much less adopted, is used.
The protocol and host info also tends to not get nicely appended in the other headers as comma separated lists, and instead just clobbered by the most recent. If you're more than one proxy down, the chances of recovering that info is slim to nil, where as Forwarded would be a combined mechanism to ensure its survival.
Forwarded also specifies the format to put IPv6 addresses in, where as this is also somewhat mixed in implementation of `X-Forwarded-For` and requires a bunch of edge-case decoding.
Considering the RFC provides [migration guidelines](https://tools.ietf.org/html/rfc7239#section-7.4) on how to build a Forwarded header in the presence of an `X-Forwarded-For` header, I see no reason we couldn't supply both and help push adoption.
I've got code and tests for such a feature [on a branch](https://github.com/golang/go/compare/master...AndrewBurian:rfc7239-forwarded), and would be more than happy to open a PR if there's interest. | NeedsDecision,FeatureRequest | low | Major |
423,468,859 | rust | Type mismatching cased by duplicate associated type resolution | Apologize that I could not give any code example right now. I'm working on creating one but it seems tricky.
The compiler is complaining about `[E0308]: mismatched types` where it said it's expecting for a trait `SomeTrait<Apple=SomeApple, Apple=SomeApple, Banana=SomeBanana, Banana=SomeBanana>` but got `SomeTrait<Apple=SomeAPple, Banana=SomeBanana>`. Only some of the associated types in that trait are repeated once and there are few others are not repeated.
The example I gave in #59324 is an intermediate result of my attempt to create a minimal reproducible code to this issue. The type mismatch happened at the `with_factory` method when resolving concrete type for `ThriftService`.
The error happened when I'm doing the update from 1.32.0 to 1.33.0 so it's clearly a regression.
Also, please let me know if you have any suggestion on bypassing this problem or tips on re-creating the problematic code.
Thanks. | A-type-system,A-diagnostics,T-compiler,C-bug,D-incorrect,T-types | low | Critical |
423,485,476 | flutter | Android: Only include the repos in places where we need them | By default, Flutter generates the Android gradle scripts that most Flutter apps/plugins use. For the Flutter app generation, the gradle scripts put the follow at the top level gradle script:
```
allprojects {
repositories {
google()
jcenter()
}
}
```
This is great practice for a top level gradle script that is managing many modules, but itβs a not so good practice for an one module app. The one module app should place this at the lower level app level gradle script. For the official Flutter script, having gold standard practices would prevent propagating this misunderstanding.
For the Flutter plugin generation, we have the following:
```
rootProject.allprojects {
repositories {
google()
jcenter()
}
}
```
It's forcing all apps that use this plugin to use those repositories and the plugin could only be used for that plugin. We should only be setting the repository only where it is needed.
References:
https://docs.gradle.org/current/userguide/multi_project_builds.html
https://guides.gradle.org/creating-multi-project-builds/#configure_from_above
| c: new feature,platform-android,tool,t: gradle,P3,team-android,triaged-android | low | Minor |
423,561,062 | rust | Wrong unused warning for type alias | This code:
```
struct Runner;
type RuntimeImpl = Runner;
trait Runtime {
fn run(&mut self);
}
impl Runtime for &mut RuntimeImpl {
fn run(&mut self) { }
}
fn main() {
let mut runner = Runner;
(&mut runner).run();
}
```
takes the warning:
```
Compiling playground v0.0.1 (/playground)
warning: type alias is never used: `RuntimeImpl`
--> src/main.rs:3:1
|
3 | type RuntimeImpl = Runner;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default
```
But removing this alias introduces a compilation error :thinking:
The link to the nightly playground example: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=22a044608f4d67680bcf1cc7fd23a381 | A-lints,T-compiler,C-bug | low | Critical |
423,570,688 | flutter | Support embedding non-virtual a11y hierarchies for platform views on Android | Currently we only support embedding virtual a11y trees, this works for things like WebView.
But we should also look into supporting non virtual a11y trees. | platform-android,framework,a: accessibility,a: platform-views,c: proposal,P2,platform-views: vd,team-android,triaged-android | low | Minor |
423,633,301 | rust | closures with async blocks have concrete argument lifetimes | ```rust
#![feature(async_await, futures_api)]
use std::future::Future;
trait Foo<'a> {
type Future: Future<Output = u8> + 'a;
fn start(self, f: &'a u8) -> Self::Future;
}
impl<'a, Fn, Fut> Foo<'a> for Fn
where
Fn: FnOnce(&'a u8) -> Fut,
Fut: Future<Output = u8> + 'a,
{
type Future = Fut;
fn start(self, f: &'a u8) -> Self::Future { (self)(f) }
}
fn foo<F>(f: F) where F: for<'a> Foo<'a> {
let bar = 5;
f.start(&bar);
}
fn main() {
foo(async move | f: &u8 | { *f });
foo({ async fn baz(f: &u8) -> u8 { *f } baz });
}
```
~~([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=8ed7f0ec4b60119dceb5d7c860296e08)) currently errors with~~
([updated playground (with 2021 ed)](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=0cbbfb5886e0d0150c794f22addde627)) currently errors with:
```
error: implementation of `Foo` is not general enough
--> src/main.rs:27:5
|
27 | foo(async move | f: &u8 | { *f });
| ^^^
|
= note: Due to a where-clause on `foo`,
= note: `Foo<'1>` would have to be implemented for the type `[closure@src/main.rs:27:9: 27:37]`, for any lifetime `'1`
= note: but `Foo<'_>` is actually implemented for the type `[closure@src/main.rs:27:9: 27:37]`, for some specific lifetime `'2`
```
You can see that the `async fn` correctly satisfies the HRLB required by `foo`, but the async closure has a concrete lifetime for the argument instead of being for any lifetime. | T-compiler,C-bug,A-async-await,AsyncAwait-Triaged | low | Critical |
423,634,554 | TypeScript | Detect dead exports as well as per-module dead code | ## Search Terms
dead code
## Suggestion
Add a feature to detect dead code not just within modules, but within the build as a whole.
I've looked at https://github.com/Microsoft/TypeScript/issues/16939 which is currently locked so can't comment there. This really does need to be part of the Typescript compiler as no other program is really going to understand all the subtleties; the emitted JS doesn't contain all the information about interfaces and that kind of thing. Furthermore, this is not a file level operation- you're talking about tracking each individual interface/function/etc and not files. With these two factors it's no surprise that there are no current tools that can accomplish this- you would have to reimplement the compiler.
This would probably not be useful for library projects, as by definition things they export are not dead, therefore a separate compiler switch would be useful that application developers can enable.
The exact behaviour should be that exported top-level declarations may be considered "dead" if they are not visibly imported, as well as if they are not used from within the current module. The compiler will error on unused exports. The compiler should detect dynamic imports if the module path is hardcoded- the compiler already supports proper type inference in this case so feels like the compiler can already figure this one out.
This does not have to extend to properties/members of classes or anything like that- that can be a future improvement.
The compiler should ignore exports with a leading underscore, offer a built-in decorator to override a declaration as used, or both to handle any weird cases or entry points.
## Use Cases
We already detect dead code across individual files, but not across our whole project. We wish to do so across the entire project. We currently inspect runtime metadata of modules imported/exported as a unit test; unfortunately this is limited because TypeScript will emit modules that don't have any runtime code (e.g. just define an interface) but won't emit references to them. In addition, this approach can only detect whole modules as dead and not parts of them.
## Examples
The user would simply turn this on in their tsconfig.json, mark up the entry point for their app, then run the build.
## Checklist
My suggestion meets these guidelines:
* [*] This wouldn't be a breaking change in existing TypeScript/JavaScript code- existing users don't have to turn on the flag if they don't want to and it probably shouldn't be part of --strict either.
* [*] This wouldn't change the runtime behavior of existing JavaScript code
* [*] This could be implemented without emitting different JS based on the types of the expressions
* [*] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [*] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals). | Suggestion,Awaiting More Feedback | low | Critical |
423,641,735 | react | React callback ref cleanup function | At the time React added callback refs the main use case for them was to replace string refs. A lot of the callback refs looked like this:
```jsx
<div ref={node => this.node = node} />
```
With the introduction of `createRef` and `useRef` this use case is pretty much replaced by these alternatives so the use case of callback refs will shift to advanced use cases like [measuring DOM nodes](https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node).
It would be nice if you could return a cleanup function from the callback ref which is called instead of the callback with null. This way it will behave more like the `useEffect` API.
```jsx
<div ref={node => {
// Normal ref callback
return () => {
// Cleanup function which is called when the ref is removed
}
}} />
```
This will be super helpful when you need to set up a Resize-, Intersection- or MutationObserver.
```jsx
function useDimensions() {
const [entry, setEntry] = useState()
const targetRef = useCallback((node) => {
const observer = new ResizeObserver(([entry]) => {
setEntry(entry)
})
observer.observe(node)
return () => {
observer.disconnect()
}
}, [])
return [entry, targetRef]
}
function Comp() {
const [dimensions, targetRef] = useDimensions()
return (
<pre ref={targetRef}>
{JSON.stringify(dimensions, null, 2)}
</pre>
)
}
```
Currently, if you want to implement something like this you need to save the observer into a ref and then if the callback ref is called with null you have to clean up the observer from the ref.
To be 99% backward compatible we could call both the callback ref with null and the cleanup function. The only case where it isn't backward compatible is if currently someone is returning a function and doesn't expect the function to be called.
```jsx
function ref(node) {
if (node === null) {
return
}
// Do something
return () => {
// Cleanup something
}
}
``` | Type: Discussion | high | Critical |
423,645,103 | kubernetes | Creating Kubemark cluster on GCE requires exporting environmental variables to work | **What happened**:
Some environmental variables are not propagated, so creating a kubemark-based cluster on GCE requires exporting e.g. `KUBE_GCE_NETWORK` and `INSTANCE_PREFIX`.
I suspect the problem is because of actual propagation (there are multiple layers of sourcing defaults when running `go run hack/e2e.go`) or there are some assumptions backed in..
**What you expected to happen**:
Defaults are set and propagated correctly, no need to state any variables, which can be inferred directly.
**How to reproduce it (as minimally and precisely as possible)**:
Create cluster (I can paste an actual command, once I sanitize it).
**Environment**:
GCE
/sig scalability
| kind/bug,sig/scalability,lifecycle/frozen | medium | Major |
423,652,700 | node | http2: cannot negotiate ALPN besides http/1.1 | The documentation for `'unknownProtocol'` says this:
> The `'unknownProtocol'` event is emitted when a connecting client fails to
negotiate an allowed protocol (i.e. HTTP/2 or HTTP/1.1). The event handler
receives the socket for handling. If no listener is registered for this event,
the connection is terminated.
The logic seems wrong though. It only passes through nothing (no protocol negotiated) or http/1.1, everything else is ignored:
https://github.com/nodejs/node/blob/11f8024d992c385d3db196ab64678311bfdabd84/lib/internal/http2/core.js#L2614-L2634
Caveat: if the check is loosened, care should be taken not to introduce an information leak.
For an attacker it should not be possible to deduce whether the server has `{ allowHTTP1: true }` and an `'unknownProtocol'` listener installed by sending messages with the ALPN proto set to `http/1.1` and e.g. `hax/13.37`, and then comparing the responses he gets back. | help wanted,http2 | low | Major |
423,671,031 | pytorch | [caffe2] Broken Operators Catalog | ## π Documentation
The Operators Catalog only displays operators from APMeter to CountUp.
https://caffe2.ai/docs/operators-catalogue.html
| caffe2 | low | Critical |
423,721,627 | go | image: add sample fuzz tests for prototype of "fuzzing as a first class citizen" | ### Summary
As a follow-up to #30719 and in support of the proposal to "make fuzzing a first class citizen" in #19109, the suggestion here is to add `Fuzz` functions for the following three standard library packages:
1. `image/jpeg`, using https://github.com/dvyukov/go-fuzz-corpus/blob/master/jpeg/jpeg.go
2. `image/png`, using https://github.com/dvyukov/go-fuzz-corpus/blob/master/png/png.go
3. `image/gif`, using a modified https://github.com/dvyukov/go-fuzz-corpus/blob/master/gif/gif.go (some additional discussion below).
Note that this issue is solely about the `Fuzz` functions themselves, and this issue does not cover checking in any resulting fuzzing corpus (which is likely going to be a separate repository such as `golang/x/corpus` or `golang.org/x/fuzz` or perhaps using oss-fuzz; the intent is to discuss that aspect separately in a follow-up issue).
### Background
See the "Background" section of #30719 or https://github.com/golang/go/issues/19109#issuecomment-441442080.
### Additional Details
Following the pattern set by #30719 and https://golang.org/cl/167097, the following are likely true for how to proceed here:
1. The build tag should be `// +build gofuzz`
2. The name of the files should be `fuzz.go`
3. The license header should be the Go standard library license. @dvyukov might need to make a similar statement as he made in [CL 167097](https://go-review.googlesource.com/c/image/+/167097/1/tiff/fuzz.go#1).
4. In general, even for `Fuzz` functions guarded by a build tag, care should be taken to avoid introducing new dependencies, especially with the introduction of modules. Note that `go mod tidy` looks across all build tags, so `+build gofuzz` does not reduce module dependencies.
For reference, here is a gist showing the [diff](https://gist.github.com/thepudds/de47bc3558e2d4613bc8bf3392359725/revisions) between [dvyukov/go-fuzz-corpus/tiff/tiff.go](https://github.com/dvyukov/go-fuzz-corpus/blob/master/tiff/tiff.go) and the [final form](https://github.com/golang/image/blob/master/tiff/fuzz.go) of that file as merged into `golang/x/image` repo as part of #30719. For the first two listed above (`image/png` and `image/jpeg`), hopefully it would be as straightforward as that diff illustrates.
For [`dvyukov/go-fuzz-corpus/gif`](https://github.com/dvyukov/go-fuzz-corpus/blob/master/gif/gif.go#L74), it currently depends on "github.com/dvyukov/go-fuzz-corpus/fuzz" for a utility function `fuzz.DeepEqual`. I think that dependency on `dvyukov/go-fuzz-corpus` would need to be eliminated prior to putting `go-fuzz-corpus/gif/gif.go` into the standard library. Possible solutions might be: (a) to start, that piece of the `Fuzz` function could simply be eliminated for now, or (b) a roughly corresponding `DeepEqual` from the standard library could be substituted, or (c) that `github.com/dvyukov/go-fuzz-corpus/fuzz` utility function could temporarily be placed directly in `image/gif/fuzz.go`, or (d) some other solution.
Happy to discuss any aspect of this, and of course happy to be corrected if any of the above is different than how people would like to proceed here.
CC @dvyukov @josharian @nigeltao @FiloSottile @acln0
| NeedsInvestigation | low | Major |
423,774,011 | godot | source_code property of inner classes should return source. | 3.1
The source_code property of scripts has been very helpful in parsing GDScripts dynamically for plugins. However when it comes to inner classes, the source_code will always return empty.
```
extends Node
class Example:
func greet():
print("Hello World")
func _ready():
print(Example.source_code.empty())
```
Outputs true
Returning source_code for inner classes would be a huge benefit for more complex tool-making. It could also have the extra benefit of
`var source = Inner.get_base_script().source_code`
making more sense if dealing with non-inner class parents. | bug,topic:gdscript,confirmed | low | Minor |
423,780,283 | TypeScript | Not possible to have optional object property compatible with both Closure Compiler and Intellisense | <!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.32.3 x64
- OS Version: Ubuntu 18.04
Steps to Reproduce:
1. Enable "checkJs": true in jsconfig.json.
2. Create a Javascript file:
```js
class A {
/**
* @param {{field: string|undefined}} obj
*/
constructor(obj) {
this.obj = obj;
}
}
let a = new A({});
```
Results in this error:

Adding error text here for duplicate detection:
Argument of type '{}' is not assignable to parameter of type '{ field: string; }'.
Property 'field' is missing in type '{}' but required in type '{ field: string; }' .ts(2345)
<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
Expected behaviour:
Some way to mark object properties as optional compatible both with Closure Compiler and VsCode intellisense. Either through @typedef, through structural interfaces with @record, direct @param notation using string|undefined, or something similar.
This notation works fine today, but it is not recognized by Closure Compiler. It is debatable whether this is an issue with Intellisense or lacking support from Closure Compiler.
```js
class A {
/**
* @param {AParam} obj
*/
constructor(obj) {
this.obj = obj;
}
}
/** @typedef {{field?: string|undefined}} */
var AParam;
let a = new A({});
``` | Suggestion,Needs Proposal | low | Critical |
423,795,416 | go | proposal: x/net/nettest: add MakeLocalPipe to construct local listener and connections | I'm currently implementing my own `net.Conn` type and am working on tests using `nettest.TestConn`: https://godoc.org/golang.org/x/net/nettest#TestConn.
The `nettest.MakePipe` function provides adequate functionality for my needs, but a fair amount of boilerplate is required to create a `nettest.MakePipe` that can:
- set up a local `net.Listener`
- dial and point a `net.Conn` at the listener
- do appropriate cleanup and error handling
As it turns out, there's a pretty useful function to make a local pipe in one of the tests: https://go.googlesource.com/net/+/refs/heads/master/nettest/conntest_test.go
I propose we generalize and export this function for use with `net.Listener` and `net.Conn` implementations of any type. I'm happy to accept name suggestions, but my proposed signature and WIP documentation is as follows:
```go
// MakeLocalPipe creates a local net.Listener and points another net.Conn at the
// listener, producing a MakePipe function suitable for use with TestConn.
//
// The listen function should produce a net.Listener, but should not invoke Accept or
// any other methods on the listener. The dial function receives the address of the
// listener, and should produce a net.Conn pointed at the listener. If dial is nil,
// net.Dial will be invoked with the network and address information from addr.
func MakeLocalPipe(
listen func() (net.Listener, error),
dial func(addr net.Addr) (net.Conn, error),
) nettest.MakePipe
```
Usage is as follows:
Producing a local pipe with a TCP listener and connection, using net.Dial as a default dial function.
```go
nettest.TestConn(t, nettest.MakeLocalPipe(
func() (net.Listener, error) {
return net.Listen("tcp", ":0")
},
// dial: net.Dial(addr.Network(), addr.String())
nil,
))
```
Producing a local pipe with a custom listener and connection implemented outside of the stdlib (https://github.com/mdlayher/vsock)
```go
nettest.TestConn(t, nettest.MakeLocalPipe(
func() (net.Listener, error) {
return vsock.Listen(0)
},
func(addr net.Addr) (net.Conn, error) {
a := addr.(*vsock.Addr)
return vsock.Dial(a.ContextID, a.Port)
},
))
```
I don't mind putting this code in my own repository or similar if deemed unnecessary, but it seems like this would be an appropriate addition to `nettest`, since it enables easy setup of scaffolding for use with `nettest.TestConn`.
/cc @dsnet @mikioh | Proposal | low | Critical |
423,830,242 | flutter | PageView with height based on current child | Is there a way a PageView can adapt to the size of the currently displayed item?
I wan't to create something like a carousel, so I would use a PageView thats inside a Column or a ListView. However I can't give my PageView a constant height, because my items of the PageView have a variable height.
[I have asked on Stackoverflow](https://stackoverflow.com/questions/54522980/flutter-adjust-height-of-pageview-horizontal-listview-based-on-current-child) a while ago but didn't get an answer. | c: new feature,framework,d: stackoverflow,customer: crowd,P2,team-framework,triaged-framework | low | Critical |
423,830,638 | rust | edition 2018 support for mod #[path=] attribute | If module files have edition 2018 style file structure and try to import one of them by path attribute:
```
#[path=modname.rs]
mod modname;
```
compiler tries to find submodules in submodname.rs or submodname/mod.rs, but not in
**modname**/submodname.rs where it is really located. | A-resolve,T-lang,C-feature-request | low | Major |
423,870,438 | pytorch | Doubly freed pointer in torch::cat error handling when called via pybind11. | ## π Bug
Calling `torch::cat` with an illegal concatenation dimension in a pybind11-exposed C++ function results in a malloc error:
```
python3(47071,0x1147385c0) malloc: *** error for object 0x7f9e916be8d8: pointer being freed was not allocated
python3(47071,0x1147385c0) malloc: *** set a breakpoint in malloc_error_break to debug
```
## To Reproduce
Steps to reproduce the behavior:
1. Clone the code in the gist at https://gist.github.com/heiner/c03aa5df92408974922aea7ec499405c via `git clone https://gist.github.com/c03aa5df92408974922aea7ec499405c.git catbug`.
2. Run `cd catbug; python3 setup.py build develop`.
3. Run `python3 run.py`.
The relevant point in the backtrace is at
```
frame #4: 0x0000000119063f94 torchloops.cpython-37m-darwin.so`pybind11::cpp_function::dispatcher(self=0x0000000118df7b10, args_in=0x0000000118df5f60, kwargs_in=0x0000000000000000) at pybind11.h:691
688 }
689 PyErr_SetString(PyExc_SystemError, "Exception escaped from default exception translator!");
690 return nullptr;
-> 691 }
692
693 auto append_note_if_missing_header_is_suspected = [](std::string &msg) {
694 if (msg.find("std::") != std::string::npos) {
```
## Expected behavior
The underlying `c10::Error` should be raised in C++ and surfaced to the user.
## Environment
```
$ python3 collect_env.py
Collecting environment information...
PyTorch version: 1.0.0.dev20190313
Is debug build: No
CUDA used to build PyTorch: None
OS: Mac OSX 10.14.3
GCC version: Could not collect
CMake version: version 3.12.2
Python version: 3.7
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Versions of relevant libraries:
[pip3] numpy==1.16.2
[conda] blas 1.0 mkl
[conda] mkl 2019.1 144
[conda] mkl-include 2019.1 144
[conda] mkl_fft 1.0.10 py37h5e564d8_0
[conda] mkl_random 1.0.2 py37h27c97d8_0
[conda] pytorch-nightly 1.0.0.dev20190313 py3.7_0 pytorch
[conda] torchgym 0.0.0 dev_0 <develop>
[conda] torchgymatari 0.0.0 pypi_0 pypi
``` | module: cpp,module: error checking,triaged | medium | Critical |
423,879,054 | go | cmd/go: can't build go1.10 from source using go1.12 | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
Go 1.12
### Does this issue reproduce with the latest release?
yes
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/matloob/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/matloob/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/f4/9p58ddnj40x58zchdb36p7lr004_sl/T/go-build724269079=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>
### What did you do?
I have Go 1.12 installed on my system. I cloned the go repo and checked out the tag go1.10.8.
Then i cd'd to the go repo's src directory and ran make.bash
### What did you expect to see?
a successful build
### What did you see instead?
matloob-macbookpro2:src matloob$ ./make.bash
Building Go cmd/dist using /usr/local/go.
go: cannot determine module path for source directory /Users/matloob/go110 (outside GOPATH, no import comments)
But make.bash *does work* when GO111MODULE is unset | NeedsFix,modules | low | Critical |
423,895,493 | rust | Move to using annotate-snippets-rs for producing snippets | @zbraniecki created https://github.com/zbraniecki/annotate-snippets-rs which basically does Rust-style formatting of code snippets for errors, to be used within [Fluent](http://github.com/projectfluent/fluent-rs).
I think we should try and move our snippet code out of tree, preferably merging it with annotate-snippets-rs (which is already close to what rustc does), so that it's reusable.
@zbraniecki has agreed to make whatever changes necessary to the crate to make it usable within rustc.
cc @estebank | C-enhancement,A-diagnostics,T-compiler,D-diagnostic-infra | medium | Critical |
423,977,235 | TypeScript | No intellisense for require in ts files | **TypeScript Version:** 3.4.0-rc
**Search Terms:** require, intellisense
Typescript does not resolve modules of require expressions as it does in plain js files.
**Code**
```ts
require("s:\\dev\\easy-attach\\")({
eagerExitDebugProxy: true,
port: "preconfigured",
});
```
**Expected behavior:**
This is what I get in VS Code in plain js files:

**Actual behavior:**
However, the module is not resolved in ts files:

Probably this is intended and my use case is a very special one.
However, typescripts repository description still says:
> TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
In this case, typescript has better support for `require` in `js` than in `ts` which is a little bit confusing considering typescript being a superset of javascript.
| Suggestion,In Discussion | low | Critical |
423,978,101 | rust | Optimization regression in 1.32+ | The following function:
```
pub fn num_to_digit(num: char) -> u32 {
if num.is_digit(8) { num.to_digit(8).unwrap() } else { 0 }
}
```
With 1.31 produced the following:
```
add edi, -48
xor eax, eax
cmp edi, 8
cmovb eax, edi
ret
```
Which looks reasonable, as `unwrap()` should never fail.
But in 1.32 and above it produces an unnecessary panic branch:
```
push rax
mov ecx, edi
and ecx, -8
xor eax, eax
cmp ecx, 48
jne .LBB0_3
add edi, -48
mov eax, edi
cmp edi, 8
jae .LBB0_2
.LBB0_3:
pop rcx
ret
.LBB0_2:
lea rdi, [rip + .L__unnamed_1]
call qword ptr [rip + _ZN4core9panicking5panic17h6f50c0de2dcd7974E@GOTPCREL]
ud2
```
Interestingly, when I manually inline `is_digit`: https://github.com/rust-lang/rust/blob/89573b3c8b629507130b1ec8beeaf550fdc0e046/src/libcore/char/methods.rs#L58-L61
```
pub fn num_to_digit_fast1(num: char) -> u32 {
if num.to_digit(8).is_some() { num.to_digit(8).unwrap() } else { 0 }
}
```
Or just use `unwrap_or`:
```
pub fn num_to_digit_fast2(num: char) -> u32 {
num.to_digit(8).unwrap_or(0)
}
```
It produces good code on all compiler versions.
Godbolt instance I tested this on: https://godbolt.org/z/8yg7x0 | I-slow,A-codegen,E-needs-test,P-medium,T-compiler,regression-from-stable-to-stable,C-optimization | low | Major |
423,987,986 | react | Edge 18 & IE 11 server mismatch with SVG icons | **Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
React raises a warning:

https://codesandbox.io/s/k91nr3xzy5
```jsx
import React from "react";
export default () => (
<div>
2
<svg>
<path d="M0 0h24v24H0z" />
</svg>
</div>
);
```
**What is the expected behavior?**
No warning
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
React: 16.8.4
Browser: Edge 18 | Component: Server Rendering,Type: Needs Investigation | medium | Critical |
423,993,801 | pytorch | NCCL backend fails when calling broadcast from different threads | ## π Bug
When I use the NCCL backend, `torch.distributed.broadcast()` results in a `NCCL error` when called from multiple threads (each thread uses a separate process group). `broadcast()` works fine from multiple threads when using the Gloo backend; NCCL backend works fine in the same environment when using a single thread.
## To Reproduce
Code to reproduce:
```python
import argparse
import os
import threading
import time
import torch
import torch.distributed as dist
NUM_TRIALS = 20
def receive_tensor_helper(tensor, src_rank, group, tag, num_iterations,
intra_server_broadcast):
for i in range(num_iterations):
if intra_server_broadcast:
dist.broadcast(tensor=tensor, group=group, src=src_rank)
else:
dist.recv(tensor=tensor, src=src_rank, tag=tag)
print("Done with tensor size %s" % tensor.size())
def send_tensor_helper(tensor, dst_rank, group, tag, num_iterations,
intra_server_broadcast):
for i in range(num_iterations):
if intra_server_broadcast:
dist.broadcast(tensor=tensor, group=group, src=1-dst_rank)
else:
dist.send(tensor=tensor, dst=dst_rank, tag=tag)
print("Done with tensor size %s" % tensor.size())
def start_helper_thread(func, args):
helper_thread = threading.Thread(target=func,
args=tuple(args))
helper_thread.start()
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='Test lightweight communication library')
parser.add_argument("--backend", type=str, default='gloo',
help="Backend")
parser.add_argument('-s', "--send", action='store_true',
help="Send tensor (if not specified, will receive tensor)")
parser.add_argument("--master_addr", required=True, type=str,
help="IP address of master")
parser.add_argument("--use_helper_threads", action='store_true',
help="Use multiple threads")
parser.add_argument("--rank", required=True, type=int,
help="Rank of current worker")
parser.add_argument('-p', "--master_port", default=12345,
help="Port used to communicate tensors")
parser.add_argument("--intra_server_broadcast", action='store_true',
help="Broadcast within a server")
args = parser.parse_args()
num_ranks_in_server = 1
if args.intra_server_broadcast:
num_ranks_in_server = 2
local_rank = args.rank % num_ranks_in_server
torch.cuda.set_device(local_rank)
os.environ['MASTER_ADDR'] = args.master_addr
os.environ['MASTER_PORT'] = str(args.master_port)
world_size = 2
dist.init_process_group(args.backend, rank=args.rank, world_size=world_size)
tensor_sizes = [10, 100, 1000, 10000, 100000, 1000000, 10000000]
groups = []
for tag in range(len(tensor_sizes)):
if args.intra_server_broadcast:
group = dist.new_group([0, 1])
groups.append(group)
for tag, tensor_size in enumerate(tensor_sizes):
if args.intra_server_broadcast:
group = groups[tag]
else:
group = None
if args.send:
if args.intra_server_broadcast:
tensor = torch.tensor(range(tensor_size), dtype=torch.float32).cuda(
local_rank)
else:
tensor = torch.tensor(range(tensor_size), dtype=torch.float32).cpu()
if args.use_helper_threads:
start_helper_thread(send_tensor_helper,
[tensor, 1-args.rank,
group, tag, NUM_TRIALS,
args.intra_server_broadcast])
else:
send_tensor_helper(tensor, 1-args.rank, group, tag,
NUM_TRIALS, args.intra_server_broadcast)
else:
if args.intra_server_broadcast:
tensor = torch.zeros((tensor_size,), dtype=torch.float32).cuda(
local_rank)
else:
tensor = torch.zeros((tensor_size,), dtype=torch.float32).cpu()
if args.use_helper_threads:
start_helper_thread(receive_tensor_helper,
[tensor, 1-args.rank,
group, tag, NUM_TRIALS,
args.intra_server_broadcast])
else:
receive_tensor_helper(tensor, 1-args.rank, group, tag,
NUM_TRIALS, args.intra_server_broadcast)
```
Commands to reproduce the error (on the same multi-GPU server):
```bash
python harness.py --master_addr localhost --rank 0 --intra_server_broadcast --backend nccl --use_helper_threads --send
python harness.py --master_addr localhost --rank 1 --intra_server_broadcast --backend nccl --use_helper_threads
```
Error trace:
```bash
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/opt/conda/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "harness.py", line 15, in receive_tensor_helper
dist.broadcast(tensor=tensor, group=group, src=src_rank)
File "/opt/conda/lib/python3.6/site-packages/torch/distributed/distributed_c10d.py", line 741, in broadcast
work = group.broadcast([tensor], opts)
RuntimeError: NCCL error in: ../torch/lib/c10d/ProcessGroupNCCL.cpp:260, unhandled system error
```
These commands work as expected:
```bash
python harness.py --master_addr localhost --rank 0 --intra_server_broadcast --backend gloo --use_helper_threads --send
python harness.py --master_addr localhost --rank 1 --intra_server_broadcast --backend gloo --use_helper_threads
```
```bash
python harness.py --master_addr localhost --rank 0 --intra_server_broadcast --backend nccl --send
python harness.py --master_addr localhost --rank 1 --intra_server_broadcast --backend nccl
```
## Expected behavior
No runtime error / tensors successfully broadcasted among participating ranks.
## Environment
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).
```
Collecting environment information...
PyTorch version: 1.0.0a0+056cfaf
Is debug build: No
CUDA used to build PyTorch: 10.0.130
OS: Ubuntu 16.04.5 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
CMake version: version 3.5.1
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.0.130
GPU models and configuration:
GPU 0: Tesla V100-PCIE-16GB
GPU 1: Tesla V100-PCIE-16GB
GPU 2: Tesla V100-PCIE-16GB
GPU 3: Tesla V100-PCIE-16GB
Nvidia driver version: 384.130
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.4.2
Versions of relevant libraries:
[pip] msgpack-numpy==0.4.3.2
[pip] numpy==1.15.4
[pip] torch==1.0.0a0+056cfaf
[pip] torchtext==0.4.0
[pip] torchvision==0.2.1
[conda] blas 1.0 mkl
[conda] magma-cuda100 2.4.0 1 pytorch
[conda] mkl 2018.0.3 1
[conda] mkl-include 2019.1 144
[conda] mkl_fft 1.0.6 py36h7dd41cf_0
[conda] mkl_random 1.0.1 py36h4414c95_1
[conda] torch 1.0.0a0+056cfaf <pip>
[conda] torchtext 0.4.0 <pip>
[conda] torchvision 0.2.1 <pip>
``` | high priority,oncall: distributed,triaged,module: nccl | medium | Critical |
424,014,498 | pytorch | [jit] Trace perform weirdly on BatchNorm | ## π Bug
I have use jit to trace a model which is based on ResNet. When the batch size of the input is 1, the result is correct. However, if the batch size is not 1, the result have a little difference. And I think it's caused by the different behavior of BatchNorm.
## To Reproduce
I use the code below.
```python
import torch
import torchvision
resnet = torchvision.models.resnet18(True)
resnet.eval()
traced_net = torch.jit.trace(resnet,torch.randn((3,3,224,224)))
traced_net.eval()
def check(inp):
out1 = resnet(inp)
out2 = traced_net(inp)
return torch.sum(out1==out2)
for i in range(5):
print(check(torch.randn((1,3,224,224))))
for i in range(5):
print(check(torch.randn((3,3,224,224))))
#output
#tensor(1000)
#tensor(1000)
#tensor(1000)
#tensor(1000)
#tensor(1000)
#tensor(2009)
#tensor(2066)
#tensor(2119)
#tensor(2049)
#tensor(2023)
```
## Expected behavior
With the input shape of (3,3,224,224), the result should be 3*1000=3000, but it's just around 2000.
## Environment
PyTorch version: 1.0.1.post2
Is debug build: No
CUDA used to build PyTorch: 9.0.176
OS: Ubuntu 16.04.5 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
CMake version: version 3.13.1
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 9.0.176
[pip3] numpy==1.14.3
[pip3] numpydoc==0.8.0
[pip3] torch==1.0.1.post2
[pip3] torchvision==0.2.0 | oncall: jit | low | Critical |
424,022,418 | pytorch | [FR] support default size (scalar) in torch.randint | ## Motivation
This will be useful for people implementing stochastic algorithms and want the script to respect pytorch seed. np also has this.
cc @mruberry @rgommers | triaged,module: numpy,module: tensor creation,function request | low | Major |
424,033,417 | rust | `unused_variables` lint fires for E0005 error | E0005 has started issuing warnings for unused variables. It seems to just add noise, since the code is incorrect, the warning is a little misguided.
```rust
fn main() {
let x = Some(1);
let Some(y) = x; //~ ERROR E0005
}
```
displays:
```
error[E0005]: refutable pattern in local binding: `None` not covered
--> E0005.rs:3:9
|
LL | let Some(y) = x; //~ ERROR E0005
| ^^^^^^^ pattern `None` not covered
warning: unused variable: `y`
--> E0005.rs:3:14
|
LL | let Some(y) = x; //~ ERROR E0005
| ^ help: consider prefixing with an underscore: `_y`
|
= note: #[warn(unused_variables)] on by default
```
This started in #59050. I can't really tell which PR in that rollup is responsible.
This is a pretty minor issue, and perhaps issuing warnings makes more sense in other cases. Feel free to close this if it doesn't seem like an issue.
| C-enhancement,A-lints,A-diagnostics,T-compiler | low | Critical |
424,035,228 | pytorch | Add a RandomBatchSampler ? | ## π Feature
Shuffle samples by batch
## Motivation
I'm working on a variable length sequence classification problem and use collate_fn to padding zeros in each batch. Sorting the samples approximates the length of the samples within a batch to avoid excessive padding. So I would prefer to shuffle only by batch rather than by sample.
## Pitch
Shuffle by batch in each epoch
## Alternatives
I write a RandomBatchSampler that works well.
```
import torch
from torch.utils.data import Sampler
class RandomBatchSampler(Sampler):
r"""Yield a mini-batch of indices with random batch order
Arguments:
data_source (Dataset): dataset to sample from
batch_size (int): Size of mini-batch
drop_last (bool): If ``True``, the sampler will drop the last batch if
its size would be less than ``batch_size``
"""
def __init__(self, data_source, batch_size, drop_last):
if not isinstance(batch_size, int) or batch_size <= 0:
raise ValueError("batch_size should be a positive integeral "
"value, but got batch_size={}".format(batch_size))
if not isinstance(drop_last, bool):
raise ValueError("drop_last should be a boolean value, but got "
"drop_last={}".format(drop_last))
self.data_source = data_source
self.batch_size = batch_size
self.drop_last = drop_last
self.fragment_size = len(data_source) % batch_size
def __iter__(self):
batch_indices = range(0, len(self.data_source) - self.fragment_size, self.batch_size)
for batch_indices_idx in torch.randperm(len(self.data_source) // self.batch_size):
yield list(range(batch_indices[batch_indices_idx], batch_indices[batch_indices_idx]+self.batch_size))
if self.fragment_size > 0 and not self.drop_last:
yield list(range(len(self.data_source) - self.fragment_size, len(self.data_source)))
def __len__(self):
if self.drop_last:
return len(self.data_source) // self.batch_size
else:
return (len(self.data_source) + self.batch_size - 1) // self.batch_size
```
## Additional context
<!-- Add any other context or screenshots about the feature request here. -->
cc @SsnL @VitalyFedyunin @ejguan | module: dataloader,triaged,enhancement | low | Critical |
424,043,857 | godot | ColorPicker metrics incorrectly scaled on HiDPI displays |
**Godot version:**
v3.1.stable.official (also on v3.0)
**OS/device including version:**
macOS Mojave 10.14.2
MacBook Pro (Retina, 15-inch, 2015)
iMac (Retina 5K, 27-inch, 2017)
**Issue description:**
The color picker is defaced every time it's opened and it can't be used unless you open it twice in a row. Using any of the inputs closes the dialog, I guess because I am technically clicking outside the container box.
Clicking on the color picker again fixes this issue. Basically I need to open it twice every time I want to use it.
This is how it looks:
<img width="295" alt="Screen Shot 2019-03-21 at 9 28 49 PM" src="https://user-images.githubusercontent.com/905216/60373806-6b038080-99b6-11e9-9e90-d115b61703e7.png">
https://cl.ly/ddf9c480d756
**Steps to reproduce:**
Select any Node2D like a Sprite, then click on the color picker for Modulate or Self modulate.
**Additional notes:**
Both my devices have a retina display (high DPI), so it could be related to that.
**Minimal reproduction project:**
Start a new blank project and create a Node2D object.
P.S: Thanks for your hard work guys! | enhancement,topic:editor,usability | low | Major |
424,062,747 | go | x/blog: improve modules tutorial with information on using the module | There is a new [modules tutorial](https://blog.golang.org/using-go-modules) on [blog.golang.org](https://blog.golang.org/).
It shows how to create a module, add subdependencies, update subdependencies, etc. Unfortunately one important point is missing: How do I use the newly created module?
I think this is especially important because at this point that is kind of the only thing about modules that is unclear to me. How do I point from one module to another? With `replace`? Where do I put this `replace`? It's local to my machine after all, so it doesn't belong in the repository. | Documentation,NeedsInvestigation | low | Minor |
424,110,539 | TypeScript | 'bigint' is not comparable to 'number' with loose equality | <!-- π¨ STOP π¨ π¦π§π’π£ π¨ πΊπ»πΆπ· π¨
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!
Please help us by doing the following steps before logging an issue:
* Search: https://github.com/Microsoft/TypeScript/search?type=Issues
* Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
Please fill in the *entire* template below.
-->
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 3.3.3
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** bigin == number not comparable loose equality
**Code**
```ts
1n == 1
```
error:
```
This condition will always return 'false' since the types 'bigint' and 'number' have no overlap.
```
but in chrome 72.0.3626.121
```
> 1n == 1
< true
```
and in MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt

And similar issues
```ts
let x = [1, 2, 3]
x[1n]
```
error:
```
Type '1n' cannot be used as an index type.
```
in Chrome
```
> let x = [1, 2, 3]
x[1n]
< 2
```
**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
http://www.typescriptlang.org/play/index.html#src=1n%20%3D%3D%201
http://www.typescriptlang.org/play/index.html#src=let%20x%20%3D%20%5B1%2C%202%2C%203%5D%0D%0Ax%5B1n%5D
**Related Issues:** <!-- Did you find other bugs that looked similar? -->
https://github.com/Microsoft/TypeScript/issues/30655
| Suggestion,Awaiting More Feedback | low | Critical |
424,138,842 | rust | Tracking issue for Seek::{stream_len, stream_position} (feature `seek_convenience`) | This is a tracking issue for `Seek::{stream_len, stream_position}`. Proposed and implemented in https://github.com/rust-lang/rust/pull/58422.
Unresolved questions:
- [ ] Override `stream_len` for `File`? (is metadata syncing a problem? [comment a](https://github.com/rust-lang/rust/pull/58422#issuecomment-472732378), [comment b](https://github.com/rust-lang/rust/pull/58422#issuecomment-472965275))
- [ ] Final names:
- Rename to `len` and `position`? (but that's a strange signature for `len` and `position` clashes with `Cursor`
- ...
| T-libs-api,B-unstable,C-tracking-issue,A-io,Libs-Tracked,Libs-Small | medium | Critical |
424,199,719 | angular | Remove private properties/methods from publicApi interfaces | # π bug report
### Affected Package
All @angular packages are affected
### Is this a regression?
I am not sure, possibly at some point.
### Description
If an angular class has any private properites/methods we cannot use it, but this will prevent us creating mock of that class for testing.
## π¬ Minimal Reproduction
```
export declare class QueryList<T> {
readonly dirty = true; // <-- Also an error, this should be boolean
private _results;
readonly changes: Observable<any>;
readonly length: number;
readonly first: T;
readonly last: T;
// ...
}
export QueryListMock<T> implements QueryList<T> {
readonly dirty = true as true;
private _results;
readonly changes: Observable<any>;
readonly length: number;
readonly first: T;
readonly last: T;
// ...
}
```
As this is typescript relate issue I have typescript playground: [here](https://www.typescriptlang.org/play/#src=class%20Observable%3CT%3E%20%7B%20%7D%0D%0Aclass%20BehaviorSubject%3CT%3E%20extends%20Observable%3CT%3E%20%7B%0D%0A%09value%3A%20T%3B%0D%0A%09next(v%3A%20T)%3A%20void%20%7B%20%7D%3B%0D%0A%0D%0A%09constructor(v%3A%20T)%20%7Bsuper()%7D%0D%0A%7D%0D%0A%0D%0Adeclare%20class%20QueryList%3CT%3E%20%7B%0D%0A%20%20%20%20readonly%20dirty%20%3D%20true%3B%0D%0A%20%20%20%20private%20_results%3B%0D%0A%20%20%20%20readonly%20changes%3A%20Observable%3Cany%3E%3B%0D%0A%20%20%20%20readonly%20length%3A%20number%3B%0D%0A%20%20%20%20readonly%20first%3A%20T%3B%0D%0A%20%20%20%20readonly%20last%3A%20T%3B%0D%0A%20%20%20%20%2F**%0D%0A%20%20%20%20%20*%20See%0D%0A%20%20%20%20%20*%20%5BArray.map%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FArray%2Fmap)%0D%0A%20%20%20%20%20*%2F%0D%0A%20%20%20%20map%3CU%3E(fn%3A%20(item%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20U)%3A%20U%5B%5D%3B%0D%0A%20%20%20%20%2F**%0D%0A%20%20%20%20%20*%20See%0D%0A%20%20%20%20%20*%20%5BArray.filter%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FArray%2Ffilter)%0D%0A%20%20%20%20%20*%2F%0D%0A%20%20%20%20filter(fn%3A%20(item%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20boolean)%3A%20T%5B%5D%3B%0D%0A%20%20%20%20%2F**%0D%0A%20%20%20%20%20*%20See%0D%0A%20%20%20%20%20*%20%5BArray.find%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FArray%2Ffind)%0D%0A%20%20%20%20%20*%2F%0D%0A%20%20%20%20find(fn%3A%20(item%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20boolean)%3A%20T%20%7C%20undefined%3B%0D%0A%20%20%20%20%2F**%0D%0A%20%20%20%20%20*%20See%0D%0A%20%20%20%20%20*%20%5BArray.reduce%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FArray%2Freduce)%0D%0A%20%20%20%20%20*%2F%0D%0A%20%20%20%20reduce%3CU%3E(fn%3A%20(prevValue%3A%20U%2C%20curValue%3A%20T%2C%20curIndex%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20U%2C%20init%3A%20U)%3A%20U%3B%0D%0A%20%20%20%20%2F**%0D%0A%20%20%20%20%20*%20See%0D%0A%20%20%20%20%20*%20%5BArray.forEach%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FArray%2FforEach)%0D%0A%20%20%20%20%20*%2F%0D%0A%20%20%20%20forEach(fn%3A%20(item%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20void)%3A%20void%3B%0D%0A%20%20%20%20%2F**%0D%0A%20%20%20%20%20*%20See%0D%0A%20%20%20%20%20*%20%5BArray.some%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FArray%2Fsome)%0D%0A%20%20%20%20%20*%2F%0D%0A%20%20%20%20some(fn%3A%20(value%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20boolean)%3A%20boolean%3B%0D%0A%20%20%20%20toArray()%3A%20T%5B%5D%3B%0D%0A%20%20%20%20toString()%3A%20string%3B%0D%0A%20%20%20%20reset(res%3A%20Array%3CT%20%7C%20any%5B%5D%3E)%3A%20void%3B%0D%0A%20%20%20%20notifyOnChanges()%3A%20void%3B%0D%0A%20%20%20%20%2F**%20internal%20*%2F%0D%0A%20%20%20%20setDirty()%3A%20void%3B%0D%0A%20%20%20%20%2F**%20internal%20*%2F%0D%0A%20%20%20%20destroy()%3A%20void%3B%0D%0A%7D%0D%0A%0D%0Aexport%20class%20QueryListMock%3CT%3E%20implements%20QueryList%3CT%3E%20%7B%0D%0A%09private%20get%20_results()%20%7B%20return%20this.changes.value%3B%20%7D%0D%0A%09private%20set%20_results(value%3A%20T%5B%5D)%20%7B%20this.changes.next(value)%3B%20%7D%0D%0A%0D%0A%09dirty%20%3D%20true%20as%20true%3B%0D%0A%09changes%3A%20BehaviorSubject%3CT%5B%5D%3E%3B%0D%0A%0D%0A%09constructor(initialQueryResult%3A%20T%5B%5D%20%3D%20%5B%5D)%20%7B%0D%0A%09%09this.changes%20%3D%20new%20BehaviorSubject(initialQueryResult)%3B%0D%0A%09%7D%0D%0A%0D%0A%09get%20elements()%20%7B%0D%0A%09%09return%20this.changes.value%3B%0D%0A%09%7D%0D%0A%0D%0A%09get%20length()%20%7B%0D%0A%09%09return%20this.changes.value.length%3B%0D%0A%09%7D%0D%0A%09get%20first()%20%7B%0D%0A%09%09return%20this.changes.value%5B0%5D%3B%0D%0A%09%7D%0D%0A%09get%20last()%20%7B%0D%0A%09%09return%20this.changes.value%5Bthis.length%20-%201%5D%3B%0D%0A%09%7D%0D%0A%09map%3CU%3E(fn%3A%20(item%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20U)%3A%20U%5B%5D%20%7B%0D%0A%09%09return%20this.changes.value.map(fn)%3B%0D%0A%09%7D%0D%0A%09filter(fn%3A%20(item%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20boolean)%3A%20T%5B%5D%20%7B%0D%0A%09%09return%20this.changes.value.filter(fn)%3B%0D%0A%09%7D%0D%0A%09find(fn%3A%20(item%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20boolean)%3A%20T%20%7C%20undefined%20%7B%0D%0A%09%09return%20this.changes.value.find(fn)%3B%0D%0A%09%7D%0D%0A%09reduce%3CU%3E(fn%3A%20(prevValue%3A%20U%2C%20curValue%3A%20T%2C%20curIndex%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20U%2C%20init%3A%20U)%3A%20U%20%7B%0D%0A%09%09return%20this.changes.value.reduce(fn%20as%20any)%20as%20any%3B%0D%0A%09%7D%0D%0A%09forEach(fn%3A%20(item%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20void)%3A%20void%20%7B%0D%0A%09%09return%20this.changes.value.forEach(fn)%3B%0D%0A%09%7D%0D%0A%09some(fn%3A%20(value%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20boolean)%3A%20boolean%20%7B%0D%0A%09%09return%20this.changes.value.some(fn)%3B%0D%0A%09%7D%0D%0A%09toArray()%3A%20T%5B%5D%20%7B%0D%0A%09%09return%20this.changes.value%3B%0D%0A%09%7D%0D%0A%09toString()%3A%20string%20%7B%0D%0A%09%09return%20this.changes.value.toString()%3B%0D%0A%09%7D%0D%0A%09reset(res%3A%20(any%5B%5D%20%7C%20T)%5B%5D)%3A%20void%20%7B%0D%0A%09%09this.changes.next(res%20as%20any)%3B%0D%0A%09%7D%0D%0A%09notifyOnChanges()%3A%20void%20%7B%7D%0D%0A%09setDirty()%3A%20void%20%7B%7D%0D%0A%09destroy()%3A%20void%20%7B%7D%0D%0A%7D%0D%0A)
## π₯ Exception or Error
<pre><code>
Class 'QueryListMock<T>' incorrectly implements class 'QueryList<T>'. Did you mean to extend 'QueryList<T>' and inherit its members as a subclass?
Types have separate declarations of a private property '_results'.
</code></pre>
## π Your Environment
**Angular Version:**
<pre><code>
Angular CLI: 7.1.2
Node: 9.11.1
OS: win32 x64
Angular: 7.2.4
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.11.2
@angular-devkit/build-angular 0.11.2
@angular-devkit/build-optimizer 0.11.2
@angular-devkit/build-webpack 0.11.2
@angular-devkit/core 7.1.2
@angular-devkit/schematics 7.1.2
@angular/cli 7.1.2
@ngtools/webpack 7.1.2
@schematics/angular 7.1.2
@schematics/update 0.11.2
rxjs 6.4.0
typescript 3.2.4
webpack 4.23.1
</code></pre>
**Anything else relevant?**
This is due to https://github.com/Microsoft/TypeScript/issues/18499, as it seems, they wont resolve that anytime soon.
| freq1: low,area: core,core: queries,type: confusing,P4 | low | Critical |
424,208,320 | go | x/build/cmd/gopherbot: auto-reviewers selected for WIP change |
While working on a bugfix this week, I uploaded a CL [168818](https://go-review.googlesource.com/c/go/+/168818) and then immediately marked it "Work in Progress").
The bot went ahead and auto-assigned reviewers anyhow, which seems a little weird (the point of the WIP label is to say "I'm not quite ready to share this yet"). It would be a nicer workflow if the bot assigned reviewers when the WIP label was removed.
| Builders,NeedsInvestigation | low | Critical |
424,216,081 | vue | Performance: compile default slots to functions | ### What problem does this feature solve?
The original v-slot implementation was not available in `this.$slots`, but that was added in 2.6.4. Scoped slots reduce unnecessary re-renders with nested slots, so this change would hopefully provide a performance improvement for component libraries.
### What does the proposed API look like?
`<foo>default slot</foo>`
should output
```js
_c('foo',{scopedSlots:_u([{key:"default",fn:function(){return [_v("default slot")]},proxy:true}])})
```
Equivalent to `<foo v-slot>default slot</foo>`
---
Note #9580 could be a problem if lots of people rely on that behaviour.
<!-- generated by vue-issues. DO NOT REMOVE --> | improvement | low | Major |
424,240,272 | youtube-dl | New Site Support request: Woodworking | ## Please follow the guide below
- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`)
- Use the *Preview* tab to see what your issue will actually look like
---
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2019.03.18*. If it's not, read [this FAQ entry](https://github.com/ytdl-org/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2019.03.18**
### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/ytdl-org/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/ytdl-org/youtube-dl#faq) and [BUGS](https://github.com/ytdl-org/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/ytdl-org/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser
### What is the purpose of your *issue*?
- [ ] Bug report (encountered problems with youtube-dl)
- [x] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other
---
### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue*
---
### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:
Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):
```
PS D:\YoutubeDL 2> youtube-dl "https://videos.popularwoodworking.com/catalog?labels=%5B%22The%20Woodwright%27s%20Shop%22%5D&values=%5B%22Seasons%2016-20%22%5D" -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://videos.popularwoodworking.com/catalog?labels=%5B%22The%20Woodwright%27s%20Shop%22%5D&values=%5B%22Seasons%2016-20%22%5D', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.03.09
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: none
[debug] Proxy map: {}
[generic] catalog?labels=["The Woodwright's Shop"]&values=["Seasons 16-20"]: Requesting header
WARNING: Could not send HEAD request to https://videos.popularwoodworking.com/catalog?labels=%5B%22The%20Woodwright%27s%20Shop%22%5D&values=%5B%22Seasons%2016-20%22%5D: HTTP Error 404: Not Found
[generic] catalog?labels=["The Woodwright's Shop"]&values=["Seasons 16-20"]: Downloading webpage
WARNING: Falling back on generic information extractor.
[generic] catalog?labels=["The Woodwright's Shop"]&values=["Seasons 16-20"]: Extracting information
ERROR: Unsupported URL: https://videos.popularwoodworking.com/catalog?labels=%5B%22The%20Woodwright%27s%20Shop%22%5D&values=%5B%22Seasons%2016-20%22%5D
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\YoutubeDL.py", line 794, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\extractor\common.py", line 522, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\extractor\generic.py", line 3320, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: https://videos.popularwoodworking.com/catalog?labels=%5B%22The%20Woodwright%27s%20Shop%22%5D&values=%5B%22Seasons%2016-20%22%5D
...
<end of log>
```
---
### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single video: https://videos.popularwoodworking.com/learn/course/the-woodwrights-shop-s18-ep02-chip-carving/video/video
- Playlist: https://videos.popularwoodworking.com/catalog?labels=%5B%22The%20Woodwright%27s%20Shop%22%5D&values=%5B%22Seasons%2016-20%22%5D
Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/ytdl-org/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
---
### Description of your *issue*, suggested solution and other information
Site support request.
Thank you for a great program! I would love if you could also support the site below!
https://videos.popularwoodworking.com/
I am specifically interested in the The Woodwright's Shop videos Seasons 1-34. Link below is specifically 1-5, but other seasons are included in links on the page.
https://videos.popularwoodworking.com/catalog?labels=%5B%22The%20Woodwright%27s%20Shop%22%5D&values=%5B%22Seasons%201-5%22%5D
Site will require username and password. Monthly subscription is required. Requesting support for all legal purposes. If you need assistance with account access, contact me.
| site-support-request,account-needed | low | Critical |
424,245,681 | vue | Equivalent for this.$listeners for native events? | ### What problem does this feature solve?
Imagine a wrapper component where you need to pass events to a child component. This is possible for non native events using `this.$listeners`, but it strips out native events. It would be good if we had something like `this.$nativeListeners` so that we can pass native events down to child components as well.
In the meantime, Is there a workaround to pass events to child components?
### What does the proposed API look like?
`this.$nativeListeners`
<!-- generated by vue-issues. DO NOT REMOVE --> | feature request | low | Major |
424,254,324 | vscode | Git - .gitignore'd files sometimes not greyed-out | Hi π
Sometimes files and folders that are in `.gitignore` and normally greyed-out just stop being greyed-out. #70099 may be related, see how in the first image in comment https://github.com/Microsoft/vscode/issues/70099#issuecomment-471596614 `node_modules` directory is not greyed out, however in the second one it is properly greyed-out again.
Here is a quick gif (I do <kbd>β</kbd><kbd>β§</kbd><kbd>P</kbd> β Reload window in the middle of it):

Unfortunately, cannot reproduce π
- VSCode Version: 1.32.3
- OS Version: 10.14.3
| bug,help wanted,git | high | Critical |
424,307,967 | kubernetes | [e2e] Decoupling cloud providers from the e2e testing framework | parent issue:
https://github.com/kubernetes/kubernetes/issues/75601
tests that a part of the framework and the framework as a whole should not vendor cloud provider code. we need to think of a way how to interface this and possibly plan on how to bundle the resulted test suite(s).
some steps to perform here:
- enumerate tests that import cloud provider specifics.
- possibly think of way to interface a generic provider or a generic storage driver or .... etc.
- plan what tests will move and under what structure.
- start moving the tests to a location outside of the framework.
- think of ways how the e2e.test (suite) is going to continue to work and include everything so that we don't break this with the push of button - e.g. compile and run multiple suites but still have the separation in the background.
/area test
/sig testing
/sig cloud-provider
/kind design
/assign @timothysc @andrewsykim
cc @pohly
| area/test,kind/feature,sig/testing,priority/important-longterm,lifecycle/frozen,sig/cloud-provider,area/e2e-test-framework,needs-triage | low | Major |
424,325,971 | flutter | fromHero's createRectTween not used | In my application, I have a page with a hero that needs a non-standard animation. The mechanics of this are easy enough - simply add a createRectTween. However, the page that the hero starts on can transition to any number of different pages each with their own hero.
Currently, if you set a `createRectTween` on the `to` hero, it replaces the `HeroController`'s `createRectTween`. However, the `createRectTween` on the `from` hero is completely ignored. This means that for my use-case, I need to make sure each of the pages I'm transitioning to have (an identical) `createRectTween` set.
I propose that the logic choosing the `createRectTween` to use is changed from `to ?? HeroController's` to `to ?? from ?? HeroController's`. This would allow set createRectTween once on the `from` hero and not have to worry about the `to` hero controllers at all. Existing applications that set the `to` controller's shouldn't be affected as `to`is still given priority over `from`.
So it would only be a breaking change for the case where the `from` hero was also used as a `to` hero elsewhere already, as it would now override the HeroController's createRectTween where it didn't used to when it was treated as a `from` hero.
I can do a PR for this but I'd like a go-ahead from someone on the flutter team that it's an acceptable change first as it could be a breaking change (although hopefully for a very small number of cases). | framework,a: animation,f: routes,c: proposal,P2,team-framework,triaged-framework | low | Minor |
424,379,258 | pytorch | Port SpatialConvolutionMM and VolumetricConvolutionMM to ATen | LARGE
| triaged,module: porting | low | Major |
424,405,415 | go | x/tools/go/analysis/passes/nilness: no position information with error | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
1.12
</pre>
### Does this issue reproduce with the latest release?
yes
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/reilly/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/reilly/league/services:/Users/reilly/go:"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gz/4ytqr0r12q1fbx8ct_w3k_880000gn/T/go-build175674008=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>
### What did you do?
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
Ran the nilness analyzer on this (simplified) package:
```go
package foo
import (
"fmt"
)
func Foo() {
var x []int
for _, a := range x {
fmt.Println(a)
}
}
```
### What did you expect to see?
Ideally: a different error about how you're iterating over a nil slice
Less ideally: the same error, but with information telling me where the error is
### What did you see instead?
`-: nil dereference in index operation`
This kind of error is pretty hard to track down if I'm running the analyzer over a large codebase, because it doesn't say which file or package is failing. | NeedsInvestigation,Tools,Analysis | low | Critical |
424,415,233 | rust | error: libgkrust.a(gkrust-a279530142e91ae7.gkrust.eonniity-cgu.0.rcgu.o) 0x8b0015d2867: adding range [0x4b4e7f-0x4b4ea7) which has a base that is less than the function's low PC 0x59fde0. | I get this from lldb when building https://github.com/zakorgy/gecko-dev/tree/ff_66_0b6_rel_gfx-mtl with rust 1.33. The error also shows up with rust-lldb. | A-debuginfo,T-compiler,E-help-wanted,C-bug | low | Critical |
424,422,251 | TypeScript | Type narrowing for awaited values | <!-- π¨ STOP π¨ π¦π§π’π£ π¨ πΊπ»πΆπ· π¨
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.
-->
## Search Terms
promise, type narrowing, await
<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
## Suggestion
The type narrowing that occurs inside `if` statements, should work with awaited values
Though generally speaking a type is used for values that are already
<!-- A summary of what you'd like to see added or changed -->
## Examples
```ts
type A = {
kind: 'a'
a: string
}
type B = {
kind: 'b'
b: string
}
let data: A | B
async function valueTest() {
if ((await data.kind) === 'a') {
// 'data' hasn't been narrowed to type 'A'
data.a // Error
}
// Works fine without await
if (data.kind === 'a') {
data.a // Okay
}
}
```
## 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).
| Suggestion,Awaiting More Feedback | low | Critical |
424,440,795 | pytorch | Cleanup code in register_c10_ops.cpp | This code, https://github.com/pytorch/pytorch/blame/13f03a42d2ad143341ed19a7f1e0d2c7d821ded2/torch/csrc/jit/register_c10_ops.cpp#L45, is a _huge copy/paste_ of already existing functionality that is going to make it really hard to make changes to tracing and the IR in the future. There is a TODO in the code, but I am opening this issue to track progress on cleaning it up.
Note the equivalent code in custom_operator.h, which does almost exactly the same thing, is:
```
Node* node = nullptr;
if (jit::tracer::isTracing()) {
node = getTracedNode<Is...>(schema, arguments);
}
// Call into the actual, original, user-supplied function.
auto return_value =
std::forward<Implementation>(implementation)(std::get<Is>(arguments)...);
if (jit::tracer::isTracing()) {
jit::tracer::addOutput(node, return_value);
}
``` | oncall: jit | low | Minor |
424,466,210 | pytorch | C++ inference (CPU-only) stalls in Android, and crashes on Mac/Linux | ## π Bug
I tried to deploy a Facebook detectron model (https://github.com/facebookresearch/Detectron) trained with my custom dataset (and converted to pb files) onto an Android app through JNI. In the beginning I follow the AICamera example (https://github.com/caffe2/AICamera). But apparently the prebuilt libraries in this example are old, not from the latest pytorch repo, and it does not contain detectron ops. As a result, I re-compile all libraries in pytorch using its build_android.sh script (which includes libcaffe2_detectron_ops.a), and follow the AICamera_new example (https://github.com/wangnamu/AICamera_new) to deploy to Android. It works fine to load the pb files, but upon calling predictions, it gets stuck, does not output anything, nor does it output any error messages.
The part of the code that causes the problem is:
<img width="670" alt="Screen Shot 2019-03-22 at 10 17 33 PM" src="https://user-images.githubusercontent.com/27031781/54862008-c86d9e80-4cf0-11e9-9e7e-7ab1a965d9c9.png">
Then I try to write a simple C++ code on my Mac (CPU-only) and a Linux server to do inference with detectron pb files to see if it works. I call the build_local.sh script in pytorch to build local libraries and write same lines of code on my Mac to do inference. But exactly for the same function `predictor->operator()(input_vec, &output_vec)`, I got the following errors:
<img width="746" alt="Screen Shot 2019-03-22 at 10 24 03 PM" src="https://user-images.githubusercontent.com/27031781/54862029-59dd1080-4cf1-11e9-896e-265af6a13488.png">
My understanding is that the error occurs at the convolution operator...
I guess the source of the bug is because I did not pass the data (which is an opencv image in my case) to the Tensor structure of Caffe2 successfully? But apparently there has been a drastic change to the Tensor API, and I tried hard but did not see a good example that teaches me how to pass an image data into a Tensor in C++........
Could anyone please point me a direction or reference?
## Environment
- PyTorch Version (e.g., 1.0): pytorch 1.0, and caffe2.
- OS (e.g., Linux): Mac Sierra 10.12.6/ Android Studio 3.3, NDK r17.
- How you installed PyTorch (`conda`, `pip`, source): source.
- Build command you used (if compiling from source): scripts/build_android.sh, scripts/build_local.sh.
- Python version: 2.7
- CUDA/cuDNN version: No, CPU-only.
- GPU models and configuration: N/A.
| caffe2,module: android | low | Critical |
424,498,806 | flutter | Make animation parameter in [AnimatedList.removeItem] optional | Hello.
It would be great if the animation parameter in [AnimatedList.deleteInsert] could be made optional, simply so we can use the [Dismissible] widget along with an [AnimatedList] without the animations overlapping each other when an item is removed by [Dismissible] and [AnimatedList.deleteInsert] is required, so no logical errors within the [AnimatedList] occurs. | framework,a: animation,c: API break,c: proposal,P3,team-framework,triaged-framework | low | Critical |
424,514,572 | node | /etc/localtime symlink handling | <!--
Thank you for reporting a possible bug in Node.js.
Please fill in as much of the template below as you can.
Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify the affected core module name
If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you can.
-->
* **Version**: v11.7.0
* **Platform**: Linux gallium 4.19.25 1-NixOS SMP PREEMPT Sat Feb 23 08:07:27 UTC 2019 x86_64 GNU/Linux
* **Subsystem**:
<!-- Please provide more details below this comment. -->
Node has trouble figuring out the timezone if /etc/localtime is an indirect symlink. Here's some examples in the REPL
```
> Date()
'Sun Mar 24 2019 01:42:40 GMT+1000 (GMT+10:00)' # Wrong, it's GMT+11 in Sydney right now
> new Date().toLocaleString()
'3/24/2019, 1:42:55 AM' # Similarly to above
> Intl.DateTimeFormat().resolvedOptions().timeZone
undefined
```
Even worse, in electron:
```
> new Date().toLocaleString()
VM575:1 Uncaught RangeError: Unsupported time zone specified undefined
at new DateTimeFormat (native)
at Date.toLocaleString (native)
at <anonymous>:1:12
```
This is the cause of FreeTubeApp/FreeTube#233. It might also be the cause of ValveSoftware/steam-for-linux#5609 and flathub/im.riot.Riot#32. | help wanted,i18n-api | medium | Critical |
424,545,332 | vscode | Enabled Text-Highlighting and Copying in Playground | Enabled Text-Highlighting and Copying of documentation in Playground (_not_ talking about code samples)
VS Code version: Code 1.32.3 (a3db5be, 2019-03-14T23:43:35.476Z)
OS version: Windows_NT x64 10.0.17763 | feature-request,interactive-playground | low | Minor |
424,545,458 | go | cmd/go: special case for chiselapp.com interferes with '.fossil' extension | ### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.12.1 linux/amd64
</pre>
### Does this issue reproduce with the latest release?
yes
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build279953534=/tmp/go-build -gno-record-gcc-switches"
</pre></details>
### What did you do?
I tried to clone a fossil repo from chiselapp using the `.fossil` to test self-hosted fossil repos. It looks like the `chiselapp.com/user/kyle/repository/fossilgg` format is handled separately in [`cmd/go/internal/get/vcs.go`](https://github.com/golang/go/blob/master/src/cmd/go/internal/get/vcs.go#L1023).
```bash
$ go get chiselapp.com/user/kyle/repository/fossilgg.fossil
```
### What did you expect to see?
The `go get` succeeds and documentation can be listed via `go doc` for confirmation:
```bash
$ go doc -u -all -src fossilgg
package fossilgg.fossil // import "chiselapp.com/user/kyle/repository/fossilgg.fossil"
CONSTANTS
const greeting = "Hello from fossil!"
FUNCTIONS
func Hello() string {
return greeting
}
```
### What did you see instead?
The `fossil clone` fails:
```
# cd .; fossil clone https://chiselapp.com/user/kyle/repository/fossilgg.fossil /home/user/go/src/chiselapp.com/user/kyle/repository/fossilgg.fossil/.fossil
redirect limit exceeded
server returned an error - clone aborted
package chiselapp.com/user/kyle/repository/fossilgg.fossil: exit status 1
```
This also leaves behind an empty `fossilgg.fossil` directory in `$GOPATH` that has the side effect of preventing future calls to `go get`:
```bash
$ go get chiselapp.com/user/kyle/repository/fossilgg.fossil
can't load package: package chiselapp.com/user/kyle/repository/fossilgg.fossil: no Go files in /home/user/go/src/chiselapp.com/user/kyle/repository/fossilgg.fossil
```
``` | NeedsInvestigation | low | Critical |
424,565,641 | flutter | Scheduler.scheduleTask API has problems | `SchedulerBinding.scheduleTask` enqueues a function to be executed in the next event loops and ensures that a frame is scheduled. There are only two usages I could find, in the widget_inspector and licenses in material.
Problems:
- Usage of Flow will definitely cause dart:developer to be retained in a production application (this is the case for licenses).
- PriorityQueue requires package:collection, or for us to fork and maintain one. Given that we don't even have examples of multiple tasks being scheduled, it seems unlikely that we're taking advantage of this structure.
### widget_inspector
```
SchedulerBinding.instance.scheduleTask(
selectionChangedCallback,
Priority.touch,
);
```
### licenses
```
await SchedulerBinding.instance.scheduleTask<List<LicenseParagraph>>(
() => license.paragraphs.toList(),
Priority.animation,
debugLabel: 'License',
flow: flow,
);
```
For reference the documentation of scheduleTask:
```
/// Schedules the given `task` with the given `priority` and returns a
/// [Future] that completes to the `task`'s eventual return value.
///
/// The `debugLabel` and `flow` are used to report the task to the [Timeline],
/// for use when profiling.
///
/// ## Processing model
///
/// Tasks will be executed between frames, in priority order,
/// excluding tasks that are skipped by the current
/// [schedulingStrategy]. Tasks should be short (as in, up to a
/// millisecond), so as to not cause the regular frame callbacks to
/// get delayed.
///
/// If an animation is running, including, for instance, a [ProgressIndicator]
/// indicating that there are pending tasks, then tasks with a priority below
/// [Priority.animation] won't run (at least, not with the
/// [defaultSchedulingStrategy]; this can be configured using
/// [schedulingStrategy]).
```
### Mitigation
Update the license dialog to not use dart:developer.
### Alternative: Soft deprecation?
- Change the type of Flow to Object and stop reporting it to the timeline.
- Replace PriorityQueue with FIFO or similar.
- Replace API with something like schedulePostFrameCallback, but that is guaranteed to schedule a frame? | framework,c: API break,c: proposal,P3,team-framework,triaged-framework | low | Critical |
424,572,778 | flutter | Option to show elided frames in debug as run parameters | ## Steps to Reproduce
Dependencies from pubspec.yaml
```
dependencies:
flutter:
sdk: flutter
adhara: ^0.3.2
fluttertoast: ^3.0.1
firebase_messaging: ^3.0.1
flutter_local_notifications: ^0.5.1+2
flutter_svg: ^0.12.0
```
## Logs
```
[ +3 ms] DevFS: Starting sync from LocalDirectory: '/Users/rohit/workspace/os-projects/coromandel/gromor-store/app/gromor_shakti'
[ ] Scanning project files
[ +39 ms] Scanning package files
[ +249 ms] Scanning asset files
[ +5 ms] Scanning for deleted files
[ +33 ms] Compiling dart to kernel with 918 updated files
[ +17 ms] /Users/rohit/flutter/bin/cache/dart-sdk/bin/dart /Users/rohit/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot
--sdk-root /Users/rohit/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --strong --target=flutter --output-dill
build/app.dill --packages /Users/rohit/workspace/os-projects/coromandel/gromor-store/app/gromor_shakti/.packages --filesystem-scheme org-dartlang-root
[ +30 ms] I/flutter (10314): βββ‘ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE βββββββββββββββββββββββββββββββββββββββββββββββββββββ
[ +1 ms] I/flutter (10314): The following assertion was thrown resolving an image codec:
[ ] I/flutter (10314): Unable to load asset:
[ +8 ms] I/flutter (10314):
[ ] I/flutter (10314): When the exception was thrown, this was the stack:
[ ] I/flutter (10314): #0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
[ ] I/flutter (10314): <asynchronous suspension>
[ ] I/flutter (10314): #1 AssetBundleImageProvider._loadAsync (package:flutter/src/painting/image_provider.dart:433:44)
[ ] I/flutter (10314): <asynchronous suspension>
[ ] I/flutter (10314): #2 AssetBundleImageProvider.load (package:flutter/src/painting/image_provider.dart:418:14)
[ ] I/flutter (10314): #3 ImageProvider.resolve.<anonymous closure>.<anonymous closure>
(package:flutter/src/painting/image_provider.dart:285:105)
[ +1 ms] I/flutter (10314): #4 ImageCache.putIfAbsent (package:flutter/src/painting/image_cache.dart:157:22)
[ +1 ms] I/flutter (10314): #5 ImageProvider.resolve.<anonymous closure> (package:flutter/src/painting/image_provider.dart:285:82)
[ +1 ms] I/flutter (10314): (elided 13 frames from package dart:async)
[ +1 ms] I/flutter (10314):
[ ] I/flutter (10314): Image provider: AssetImage(bundle: null, name: "")
[ ] I/flutter (10314): Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#7cc99(), name: "", scale: 1.0)
[ ] I/flutter (10314): ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[ +690 ms] I/flutter (10314): Syncing data...
[ +60 ms] I/flutter (10314): NoSuchMethodError: The method '[]' was called on null.
[ ] I/flutter (10314): Receiver: null
[ ] I/flutter (10314): Tried calling: []("role")
[+3851 ms] Updating files
[+4713 ms] DevFS: Sync finished
[ +4 ms] Syncing files to device ONEPLUS A5010... (completed in 9,715ms, longer than expected)
[ ] Synced 7.2MB.
[ +2 ms] Sending to VM service: _flutter.listViews({})
[ +36 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x7592b94318, isolate: {type: @Isolate, fixedId: true, id:
isolates/933176188, name: main.dart$main-933176188, number: 933176188}}]}
[ +3 ms] Connected to _flutterView/0x7592b94318.
[ +5 ms] π₯ To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
[ +2 ms] An Observatory debugger and profiler on ONEPLUS A5010 is available at: http://127.0.0.1:51805/
[ +3 ms] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
```
flutter analyze
```
Analyzing gromor_shakti...
info β’ Unused import: 'package:gromor_shakti/screens/account/HomePage.dart' β’ lib/GromorStoreApp.dart:6:8 β’ unused_import
info β’ Unused import: 'package:gromor_shakti/widgets.dart' β’ lib/Routes.dart:24:8 β’ unused_import
info β’ Don't explicitly initialize variables to null β’ lib/datainterface/AppDataInterface.dart:345:53 β’ avoid_init_to_null
info β’ Unused import: 'package:gromor_shakti/utils.dart' β’ lib/screens/ScreenTransitionHandler.dart:4:8 β’ unused_import
info β’ The exception variable 'e' isn't used, so the 'catch' clause can be removed β’ lib/screens/account/ChangePassword.dart:75:29 β’
unused_catch_clause
info β’ The exception variable 'e' isn't used, so the 'catch' clause can be removed β’ lib/screens/account/EnterOTP.dart:71:25 β’ unused_catch_clause
info β’ Unused import: 'package:gromor_shakti/datainterface/bean/User.dart' β’ lib/screens/account/ForgotPassword.dart:5:8 β’ unused_import
info β’ The exception variable 'e' isn't used, so the 'catch' clause can be removed β’ lib/screens/account/ForgotPassword.dart:31:29 β’
unused_catch_clause
info β’ Unused import: 'package:flutter/services.dart' β’ lib/screens/account/HomePage.dart:3:8 β’ unused_import
info β’ The method '_buildSliverList' isn't used β’ lib/screens/account/HomePage.dart:249:14 β’ unused_element
info β’ The exception variable 'e' isn't used, so the 'catch' clause can be removed β’ lib/screens/account/MobileVerification.dart:28:25 β’
unused_catch_clause
info β’ Unused import: 'package:gromor_shakti/datainterface/bean/Zone.dart' β’ lib/screens/account/RegistrationForm.dart:8:8 β’ unused_import
info β’ Unused import: 'package:gromor_shakti/datainterface/bean/Area.dart' β’ lib/screens/account/RegistrationForm.dart:9:8 β’ unused_import
info β’ Unused import: 'package:gromor_shakti/datainterface/bean/State.dart' β’ lib/screens/account/RegistrationForm.dart:10:8 β’ unused_import
info β’ Unused import: 'package:flutter/services.dart' β’ lib/screens/account/ResetPassword.dart:3:8 β’ unused_import
info β’ The exception variable 'e' isn't used, so the 'catch' clause can be removed β’ lib/screens/account/ResetPassword.dart:50:29 β’
unused_catch_clause
info β’ Unused import: 'package:gromor_shakti/res/res.dart' β’ lib/screens/orders/OrdersList.dart:6:8 β’ unused_import
17 issues found. (ran in 10.4s)
```
flutter doctor -v
```
[β] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.3 18D109, locale en-US)
β’ Flutter version 1.2.1 at /Users/rohit/flutter
β’ Framework revision 8661d8aecd (5 weeks ago), 2019-02-14 19:19:53 -0800
β’ Engine revision 3757390fa4
β’ Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
[β] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
β’ Android SDK at /Users/rohit/Library/Android/sdk
β’ Android NDK location not configured (optional; useful for native profiling support)
β’ Platform android-28, build-tools 28.0.3
β’ ANDROID_HOME = /Users/rohit/Library/Android/sdk
β’ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
β’ All Android licenses accepted.
[β] iOS toolchain - develop for iOS devices (Xcode 10.1)
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ Xcode 10.1, Build version 10B61
β’ ios-deploy 2.0.0
β’ CocoaPods version 1.5.3
[β] Android Studio (version 3.1)
β’ Android Studio at /Applications/Android Studio.app/Contents
β’ Flutter plugin version 29.0.1
β’ Dart plugin version 173.4700
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[β] Connected device (1 available)
β’ ONEPLUS A5010 β’ 192.168.1.206:5555 β’ android-arm64 β’ Android 9 (API 28)
β’ No issues found!
```
| c: new feature,framework,a: debugging,a: error message,P3,team-framework,triaged-framework | low | Critical |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.