sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: create-react-app
Issue: Proposal: explicit named imports for non-JS/CSS assets
Labels: issue: proposal

## Problem

We currently allow you to do this:

```js
import logo from './logo.png';
```

After getting used to it, you’ll probably be comfortable with this giving you a URL.

But what about other types? For example, what should this return?

```js
import doc from './doc.md';
```

Markdown source? Compiled HTML? An AST?

What about this?

```js
import Icon from './icon.svg';
```

Should this give you a link? The SVG content? A React component?

The usual answer is “decide it for yourself in the configuration file”. However, that doesn’t work for CRA so we decided to treat all unknown extensions as URL imports. This is not ideal because in some cases it just doesn’t make any sense, and in others there are advanced (but still relatively common) use cases that aren’t satisfied.

## Proposal

What if we allowed to user to pick what they want, from a limited supported subset per filetype?

```js
import { url as logoUrl } from './logo.png';
import { html as docHtml } from './doc.md';
import { ReactComponent as Icon } from './icon.svg';
```

Named imports are checked by webpack so you’d get a compile error if you use an unsupported one.

Things that are unused will be tree shaken so if you only use e.g. HTML of Markdown files, their source won’t be bundled. Same for SVGs (whether you consume them as raw source, URLs, or React components).

Other zero-configuration tools can also adopt this approach.

## Concerns

* What do we do with the default import? Ideally I’d like to forbid it for anything other than JS/CSS because the intent is not clear for asset files (which version do you get?) We could do this with a lint rule.
* If we make the breaking change, how do we update the consumers? We could write a codemod (it should be very simple).
* It would be nice to coordinate this across at least a few other projects (e.g. @ndelangen Storybook). Maybe @KyleAMathews (Gatsby) @devongovett (Parcel) @rauchg (Next) would also be interested? I imagine we’ll need to write a multi-file Webpack loader for this, but I don’t see why other bundlers couldn’t adopt a similar convention.
* Build performance: generating all possible content variations [can be too slow](https://mobile.twitter.com/wSokra/status/950713344163446785). Ideally it would be nice if loaders had information about which import was used.

Thoughts?
Repository: go
Issue: cmd/internal/obj/x86: FSAVE assembled as FNSAVE
Labels: NeedsFix

### What version of Go are you using (`go version`)?

`go version go1.9.2 linux/amd64`

### Does this issue reproduce with the latest release?

Yes.

### What operating system and processor architecture are you using (`go env`)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/quasilyte/CODE/intel/avxgen"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build350631872=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

### What did you do?

1. Assemble this file by `go tool asm fsave.s`:
```asm
TEXT main·fsave(SB),0,$0
        FSAVE (AX)
        RET
```

2. Check output by `go tool objdump fsave.o`
```
TEXT main.fsave(SB) gofile../home/quasilyte/CODE/asm/fsave.s
  fsave.s:2		0x94			dd30			FNSAVE 0(AX)		
  fsave.s:3		0x96			c3			RET			
```

3. Note that disassembler prints "FNSAVE" (it's correct). You may also check it with external disassemblers like binutils objdump and Intel XED.

```bash
$ ./obj/examples/xed -64 -d dd30
DD30
ICLASS: FNSAVE   CATEGORY: X87_ALU   EXTENSION: X87  IFORM: FNSAVE_MEMmem108   ISA_SET: X87
SHORT: fnsave ptr [rax]
```

### What did you expect to see?

FSAVE instruction is assembled into FSAVE.
Result encoding is "9bdd30".

### What did you see instead?

FSAVE instruction is assembled into FNSAVE.
Result encoding is "dd30".

## Additional notes
- It's not only FSAVE/FNSAVE, there are more such instructions. I can provide more-or-less complete list later, potentially in a separate issue.
- It's impossible to select datasize as there is no FNSAVEL/FNSAVES variants, only FNSAVE (which is FSAVE right now). x86csv makes me believe that Go asm should have either suffixed version to make datasize selection possible.

```
$ cat src/x86/x86.csv | egrep 'fnsave|fsave'
"FNSAVE m94/108byte","FNSAVES/FNSAVEL m94/108byte","fnsaves/fnsavel m94/108byte","DD /6","V","V","","","w","",""
"FSAVE m94/108byte","FSAVE m94/108byte","fsave m94/108byte","9B DD /6","V","V","","pseudo","w","",""
```

I can send a CL that fixes this.
The only trouble is backwards-compatibility: if FSAVE becomes FNSAVE, what to do with existing code? 

Note that FSAVE is really a combination of FWAIT and FNSAVE.
Repository: godot
Issue: Object is not rendered behind Dof Near Blur distance on Android
Labels: bug,platform:android,topic:rendering,confirmed,topic:3d

<!-- 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. -->
4b414f45c

**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Android 7.0 / SM-955N (Galaxy S8+)

**Issue description:**
<!-- What happened, and what was expected. -->
Expected
![screenshot from 2018-01-09 22-52-06](https://user-images.githubusercontent.com/8281454/34724013-c6ec3896-f58f-11e7-8201-40a407ea4027.png)

What happened
![screenshot_20180109-223634](https://user-images.githubusercontent.com/8281454/34723918-7d231e28-f58f-11e7-956d-6228a0c8d032.png)

Object is not rendered behind Dof Near Blur distance on Android
Dof Far Blur works as expected. but not Dof Near Blur.

**Steps to reproduce:**
1. set Dof Near Blur distance in WorldEnvironment
2. run on Android

**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
[Test DOF.zip](https://github.com/godotengine/godot/files/1615263/Test.DOF.zip)
Repository: vscode
Issue: Heterogeneous DPI support on Linux
Labels: feature-request,upstream,linux,electron,workbench-os-integration,upstream-issue-linked

- VSCode Version: Code 1.19.1 (0759f77bb8d86658bc935a10a64f6182c5a1eeba, 2017-12-19T09:41:01.414Z)
- OS Version: Linux x64 4.14.11-300.fc27.x86_64

Steps to Reproduce:

1. A Wayland desktop session on a multi-display setup with heterogeneous DPI scaling. Mine is a HiDPI laptop display scaled at 200% and an external monitor using 100% scaling, resulting in xwayland scaled at 100% on all displays. gnome-shell is the compositor.
2. Launch Visual Studio Code.
3. Move the IDE window between the displays.

Like any other X11 application, Visual Studio Code cannot adapt to heterogeneous scaling.
Wayland support, discussed in #1739, is needed to enable this. I feel that opening a new issue is justified by the problem described, which was not mentioned by the commenters on that issue.

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
Repository: pytorch
Issue: Mixed Tensor/TensorList arguments in ATen functions with explicit derivatives
Labels: module: autograd,triaged,enhancement

Today, you cannot write a derivative for a function with signature `f(Tensor, TensorList)` (or any combination thereof) because our code generation does not support it.

The primary technical barrier to implementing this is the fact that autograd internals works with a completely flat list of tensors. To support mixed Tensor/TensorList arguments in general, one would also have to record enough metadata to reconstruct the intended groupings. This is only required when there are multiple TensorList arguments; with a single TensorList argument the correct grouping can be unambiguously inferred (though it takes some work to do so.)

We should decide what we want to do long term. Is it:

1. Never support mixed Tensor/TensorList; instead, require users to somehow work around the restriction in some way. (For example, `index(Tensor, TensorList)` can be decomposed into a series of differentiable operations that don't require mixed arguments.)
2. Support mixed Tensor plus a single TensorList. In this regime no special metadata is needed, and the wrapping code can look solely at the calling convention to determine how to unwrap
3. Support arbitrary mixed Tensor and TensorList. In this regime some extra metadata is needed to resolve the wrapping/unwrapping. If written in a robust way, this regime could be generalized to support arbitrary nested structures.

An ancillary consideration is ONNX, which also adopts the "single, flat list of tensors" model. ONNX has effectively bet that operators with complicated input tensor structures are unlikely, and you pay a big complexity cost if this is not the case.

cc @ezyang @SsnL @albanD @zou3519 @gqchen
Repository: go
Issue: cmd/compile: conversion error is a bit inaccurate
Labels: compiler/runtime

Please answer these questions before submitting your issue. Thanks!

#### 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.
```
package main

func main() {
	s := "s"
	_ = 'r' != s
	_ = 1 != s
	_ = 1.1 != s
}
```
#### What did you expect to see?
I expected to see "untyped rune", "untyped int", "untyped float".

#### What did you see instead?
"type untyped number" which is not a searchable keyword in the https://golang.org/ref/spec.
```
# command-line-arguments
./k.go:5:10: cannot convert 'r' (type untyped number) to type string
./k.go:5:10: invalid operation: 'r' != s (mismatched types rune and string)
./k.go:6:8: cannot convert 1 (type untyped number) to type string
./k.go:6:8: invalid operation: 1 != s (mismatched types int and string)
./k.go:7:10: cannot convert 1.1 (type untyped number) to type string
./k.go:7:10: invalid operation: 1.1 != s (mismatched types float64 and string)
```
To be precise, conversion error here is already inaccurate.
The error message implies `s := string('r')` is incorrect code, but it's not true.
Also "type untyped" is redundant expression to me.
```
cannot compare 'r' (untyped rune) to string
``` 
or
```
cannot assign 'r' (untyped rune) to string
```
is correct one. (initial one is better in this context)
#### Does this issue reproduce with the latest release (go1.9.2)?
I can see the conversion error, but I can't see "untyped number" in the error message. 

#### System details

```
go version devel +23aefcd9ae Wed Jan 10 00:00:40 2018 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hiro/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/hiro/.go"
GORACE=""
GOROOT="/Users/hiro/go"
GOTMPDIR=""
GOTOOLDIR="/Users/hiro/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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/wq/dwn8hs0x7njbzty9f68y61700000gn/T/go-build157306342=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version devel +23aefcd9ae Wed Jan 10 00:00:40 2018 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +23aefcd9ae Wed Jan 10 00:00:40 2018 +0000
uname -v: Darwin Kernel Version 17.3.0: Thu Nov  9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.13.2
BuildVersion:	17C88
lldb --version: lldb-900.0.64
  Swift-4.0
gdb --version: GNU gdb (GDB) 8.0.1
```
Repository: pytorch
Issue: `from` keyword in `random_` gives error
Labels: module: distributions,triaged

In `tensor.random_(from=foo)`, `from` cannot be used because it's reserved for imports. Trying to call that function using the keyword gives a `SyntaxError`.

cc @vincentqb @fritzo @neerajprad @alicanb @vishwakftw
Repository: youtube-dl
Issue: Error with Simpsonsworld.com / FXNetworks
Labels: tv-provider-account-needed

I used youtube-dl to successfully download one episode from simpsonsworld.com yesterday afternoon.  However, by yesterday evening, the same exact command was yielding the following error.  Thank you for your consideration.

~/Desktop/temp/Simpsons$ youtube-dl -U
youtube-dl is up-to-date (2018.01.07)

~/Desktop/temp/Simpsons$ youtube-dl --ap-mso Charter_Direct --ap-username blahblah@charter.net --ap-password blahblah --verbose http://www.simpsonsworld.com/video/273376835817
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--ap-mso', u'Charter_Direct', u'--ap-username', u'PRIVATE', u'--ap-password', u'PRIVATE', u'--verbose', u'http://www.simpsonsworld.com/video/273376835817']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.01.07
[debug] Python version 2.7.12 (CPython) - Linux-4.4.0-104-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv N-80901-gfebc862, avprobe N-80901-gfebc862, ffmpeg N-80901-gfebc862, ffprobe N-80901-gfebc862, rtmpdump 2.4
[debug] Proxy map: {}
[FXNetworks] 273376835817: Downloading webpage
[FXNetworks] 273376835817: Downloading Provider Redirect Page
[FXNetworks] 273376835817: Downloading Provider Login Page
[FXNetworks] 273376835817: Logging in
[FXNetworks] 273376835817: Confirming Login
[FXNetworks] 273376835817: Retrieving Session
### ERROR: Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . 
Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 517, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2198, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
Repository: flutter
Issue: request: better tools for notifying form changes
Labels: c: new feature,framework,f: material design,customer: crowd,c: proposal,P2,team-design,triaged-design

## Feature request

Taken from some samples and a gitter chat question, there is no proper way to see if a user has made any changes to a form. I was told to use a boolean _saveNeeded flag to track changes within the validator of the field. Now, that does not kick in until form.validate() is called.

The [TextFormField class](https://docs.flutter.io/flutter/material/TextFormField-class.html) does not offer a onChanged method, nor do FormField or [Form](https://docs.flutter.io/flutter/widgets/Form-class.html).

An escape is to use the autovalidate on Form, but this shows very ugly forms because all validation warnings are shown directly after load.

Without a dirty flag to the form, it is impossible to track the current state of the form during the onWillPop callback, in case the user exits the form accidentally without saving the content.

My suggestions are (one of multiple of the following)
- add a Dirty state to the formState
- add a parameter to onWillPop, indicating the dirty state
- add a onChanged method to Form, with the changed field as parameter
or
- add a onChanged method to FormField/TextFormField


```
new Form(
        key: formKey,
        autovalidate: false,
        onWillPop: _onWillPop,
        child: new ListView(
          padding: const EdgeInsets.all(16.0),
          children: <Widget>[
            //Description
            new TextFormField(
              initialValue: expenseJSON['description'],
              keyboardType: TextInputType.text,
              decoration: const InputDecoration(
                hintText: 'Description',
                labelText: 'Description *',
              ),
              obscureText: false,
              validator: (String value) {
                _saveNeeded = true;
                if (value.isEmpty)
                  return 'Description is mandatory';
                if (value.length < 3)
                  return 'Description is mandatory';
                final RegExp nameExp = new RegExp(r'^[A-Za-z ]+$');
                if (!nameExp.hasMatch(value))
                  return 'Description contains invalid characters.';
                return null;
              },
              onSaved: (String value) {
                print('Save description to JSON: ' + value);
                expenseJSON['description'] = value;
              },
            ),

```
Repository: flutter
Issue: Request sample code for *Transition widgets and subclasses of ImplicitlyAnimatedWidget
Labels: framework,a: animation,from: study,d: api docs,c: proposal,P2,team-framework,triaged-framework

As requested in #13932, we'd like to introduce *Transition widgets and subclasses of ImplicitlyAnimatedWidget for building simple animations before the tween animation tutorial. This issue requests adding sample code to these widgets' API docs, so users can understand how to use them after being referred to them by the Animations landing page or the Animations widget catalog.
Repository: flutter
Issue: Consider renaming vsync in AnimationController to tickerProvider
Labels: framework,a: animation,c: API break,from: study,c: proposal,P3,team-framework,triaged-framework

From the Animation API UX study, developers had trouble understanding what `vsync` meant and how it was related to TickerProvider, when they were defining an AnimationController object. It would be clearer to rename the `vsync` property to `tickerProvider`, so Flutter only introduces one new concept instead of two to developers new to the animations API.
Repository: TypeScript
Issue: Formatter: Place JSX closing tag on new line
Labels: Suggestion,Help Wanted,Domain: Formatter

<!-- BUGS: Please use this template. -->
<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->
<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  2.7.0-dev.20180108

**Code**

```ts
<div>
    wat</div>
```

**Expected behavior:**

```ts
<div>
    wat
</div>
```

**Actual behavior:**

No changes are made by the formatter.

**Related:**

While not directly related, I came across this while working on a fix for #20766. I can work on a fix for this issue as well.
Repository: rust
Issue: [Nightly Regression] False positive warning with constants in conditional
Labels: T-compiler,C-bug,A-const-eval

This is modified code from a real regression in my code:

```
#![allow(unused_variables)]
fn main() {
    const N: usize = 1_000;
    const M: usize = 4;
    const V: [u32; M] = [1, 2, 3, 4];

    let x = if N <= M {
        V[N - 1]
    } else {
        0
    };
}
```


```
warning: this expression will panic at run-time
 --> C:\lavoro\bugs\test.rs:9:9
  |
9 |         INIT[N - 1]
  |         ^^^^^^^^^^^ index out of bounds: the len is 4 but the index is 999



rustc 1.25.0-nightly (f62f77403 2018-01-10)
binary: rustc
commit-hash: f62f774035735a06c880c48c0b9017fcc0577e33
commit-date: 2018-01-10
host: x86_64-pc-windows-gnu
release: 1.25.0-nightly
LLVM version: 4.0
```

D language and C++17 avoid such problems using "static if" and "if constexpr".
Repository: youtube-dl
Issue: rec-tube.com
Labels: site-support-request,nsfw

 [x] Site support request (request for adding support for a new site)

https://rec-tube.com/watch/2017101813010487/?2
Repository: kubernetes
Issue: System-wide performance benchmarks & setting up CI-testing for them
Labels: sig/scalability,sig/scheduling,sig/testing,lifecycle/frozen

This has been under discussion for a while now and it's time to finally do it. Opening this issue as an umbrella for benchmarks across the system.
FMU there seem to be 2 kinds of those in the codebase atm:
- benchmark unit tests (e.g `BenchmarkQuantityMarshalJSON`, `BenchmarkWatchHTTP`, `BenchmarkRandomStringGeneration`): Like normal unit tests, these are runnable using a single test binary - and we seem to have quite a few of these, mainly around api-machinery and helper libraries.
- benchmark integration tests (e.g `BenchmarkScheduling`, `BenchmarkSchedulingAntiAffinity`, `test/e2e_node/jenkins/benchmark`): These require to also run 1 or 2 other components (like etcd, apiserver). I can currently find these only for some components (unless I'm missing sth), mainly around node and scheduler. IMHO we should have much more of these (for e.g controller-manager, apiserver?) as they often help us with identifying performance issues in a timely, cheap and easy way.

To start with, I'm going to work towards setting up scheduler benchmarks on our CI (possibly more). However, the onus of writing useful and informative benchmarks for the respective components lies with the SIGs. I'll be happy to assist (mostly from the CI-side) as much as I can here.

cc @kubernetes/sig-scalability-misc @kubernetes/sig-testing-misc 

FYI @wojtek-t @porridge @smarterclayton @davidopp @bsalamat (folks involved in the discussions so far)
Repository: go
Issue: plugin: using coverpkg when testing results in plugin version mismatch
Labels: help wanted,NeedsFix

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
1.9.2

### Does this issue reproduce with the latest release?
yes - 1.9.2 is the latest, stable release

### What operating system and processor architecture are you using (`go env`)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/vagrant/pluginbugs"
GORACE=""
GOROOT="/usr/local/go-1.9.2"
GOTOOLDIR="/usr/local/go-1.9.2/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build917652042=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"


### What did you do?

https://github.com/jdef/plugins1/blob/master/README.md

### What did you expect to see?
* all tests pass successfully

### What did you see instead?
* the `go test` invocation using `-coverpkg` fails with "plugin was built with a different version of package..." message