sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: runtime: "interface {} is nil, not *main.T" on linux-amd64-noopt builder
Labels: NeedsInvestigation,compiler/runtime

[2020-02-22T04:31:41-059a5ac/linux-amd64-noopt](https://build.golang.org/log/9df8661fd5326a034504b9834d9e49931fdc7b41)
```
# go run run.go -- fixedbugs/issue13169.go
exit status 1
panic: interface conversion: interface {} is nil, not *main.T

goroutine 34 [running]:
main.main.func2(0xc00008c060, 0xc00008c0c0)
	/workdir/go/test/fixedbugs/issue13169.go:40 +0xc0
created by main.main
	/workdir/go/test/fixedbugs/issue13169.go:38 +0xd4
exit status 2

FAIL	fixedbugs/issue13169.go	1.089s
```

See previously #13169 (CC @aclements, @randall77, @mknyszek).

Perhaps some operation that the runtime assumes to be atomic no longer is in `noopt` mode? (#36110 may be related; CC @cherrymui)
Repository: vscode
Issue: Use VS Code's syntax highlighting in Markdown preview
Labels: feature-request,markdown,keep

Issue Type: <b>Bug</b>

When I use `"editor.semanticHighlighting.enabled": true,` TypeScript looks great, but now the Markdown code looks bad in comparison. Please see the screenshot.
![Screenshot from 2020-02-24 14-31-46](https://user-images.githubusercontent.com/12832280/75160748-7f00ad00-5712-11ea-963d-d53655328848.png)


VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:50:36.977Z)
OS version: Linux x64 4.18.0-147.5.1.el8_1.x86_64

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-4770S CPU @ 3.10GHz (8 x 3681)|
|GPU Status|2d_canvas: enabled<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>oop_rasterization: disabled_off<br>protected_video_decode: unavailable_off<br>rasterization: disabled_software<br>skia_renderer: disabled_off<br>surface_control: disabled_off<br>surface_synchronization: enabled_on<br>video_decode: unavailable_off<br>viz_display_compositor: enabled_on<br>viz_hit_test_surface_layer: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|1, 1, 0|
|Memory (System)|7.50GB (2.44GB free)|
|Process Argv|--no-sandbox --unity-launch /home/david/sites/Link to typing objects cheat-sheet.md|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (9)</summary>

Extension|Author (truncated)|Version
---|---|---
vscode-deno|axe|2.0.4
spellright|ban|3.0.50
vscode-eslint|dba|2.1.1
prettier-vscode|esb|3.20.0
shell-format|fox|7.0.1
debugger-for-chrome|msj|4.12.6
LiveServer|rit|5.6.1
shellcheck|tim|0.9.0
quokka-vscode|Wal|1.0.279


</details>
<!-- generated by issue reporter -->
Repository: go
Issue: x/exp/cmd/gorelease: add glossary-defined code next to each (in)compatible change
Labels: NeedsInvestigation,FeatureRequest

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel +151ccd4bdb Mon Feb 24 02:36:05 2020 +0000 linux/amd64
$ git rev-parse HEAD
7c80518d1cc79ffde9e571fe4fd281f321d36200
</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
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/myitcv/.cache/go-build"
GOENV="/home/myitcv/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/myitcv/gostuff"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/myitcv/gos"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/myitcv/gostuff/src/github.com/myitcv/govim/go.mod"
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-build347856664=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

Ran `gorelease` against `govim`:

```
$ gorelease -base=v0.0.29
github.com/govim/govim
----------------------
Compatible changes:
- EventUser: added

github.com/govim/govim/cmd/govim/config
---------------------------------------
Incompatible changes:
- Config.ExperimentalTempModfile: removed
Compatible changes:
- CommandHighlightReferences: added
- Config.HighlightReferences: added
- Config.TempModfile: added
- EnvVarGoplsGOMAXPROCSMinusN: added
- FunctionWorkspaceSymbol: added
- HighlightReferences: added

github.com/govim/govim/testsetup
--------------------------------
Compatible changes:
- EnvStrictVimBufferLifecycle: added

github.com/govim/govim/testdriver
---------------------------------
Compatible changes:
- Config.Vim: added
- VimConfig: added

Suggested version: v0.1.0
```


### What did you expect to see?

Some sort of code/reference against each change that allows me to refer to a glossary for more detail. Very much in the same vein as [`staticcheck`'s codes for each analysis](https://staticcheck.io/docs/checks).

### What did you see instead?

A plain presentation of the changes that were compatible/incompatible. 

cc @jayconrod
Repository: node
Issue: http module emits 'end' event after 'error' event being called
Labels: http

Hello

Update: Found another similar topic:
https://github.com/nodejs/node/issues/2156

Couldn't find solution, but, found similar issue related to TCP sockets
https://github.com/nodejs/node/issues/6083

* OS: Ubuntu 18.04.3 LTS
* node v12.16.1

What I need is to receive Github webhook request and handle it within 'End' event as 'Data' Event might not contain all data (as I understood the process). And, if there is a DoS attempt detected from a 3rd party just want to drop that connection to prevent node process to grow.

Code to reproduce:
```
const http = require('http');

console.log("Webhook Server: STARTING")

http.createServer((request, response) => {
  const { headers, method, url } = request;
  let body = [];

  request.on('error', (err) => {
        console.log("Webhook Server: Request Handler Error event: " + err);
  }).on('data', (chunk) => {
        console.log("Webhook Server: Data event");
        body.push(chunk);

        console.log("Webhook Server: Emitting Error");
        request.emit('error', "Error message");
  }).on('end', () => {
        console.log("Webhook Server: End event");
        response.on('error', (err) => {
             console.log("Webhook Server: Response Error")
             console.error(err);
        });

        response.writeHead(200, {'Content-Type': 'application/json'})
        const responseBody = { headers, method, url, body };

        response.end(JSON.stringify(responseBody))

    });
}).listen(3001, '127.0.0.1', function() {
    console.log("Webhook Server: LISTENING")
});

```

Getting:
Webhook Server: STARTING
Webhook Server: LISTENING
Webhook Server: Data event
Webhook Server: Emitting Error
Webhook Server: Request Handler Error event: Error message
Webhook Server: End event
Repository: vscode
Issue: [folding] context menu on expand/collapse arrow
Labels: feature-request,editor-folding

It would be nice if you can right click on expand/collapse code block arrow to get small menu to collapse/expand all blocks:

![2020-02-24_18-17-20](https://user-images.githubusercontent.com/3820367/75175215-3527bf00-5732-11ea-8502-cd910659864a.png)
Repository: flutter
Issue: Color.fromRGBO constructs color with wrong alpha value
Labels: engine,a: fidelity,a: quality,has reproducible steps,P3,team-engine,triaged-engine,found in release: 3.16,found in release: 3.18

Constructing colors using `fromRGBO` should return the same values as the CSS `rgba()` notation.

`rgba(0, 0, 255, 0.5)` is the same as `#0000ff80`

but `fromRGBO` sometimes creates a color with an off by one alpha value
```dart
expect(Color.fromRGBO(0, 0, 255, 0.5), Color(0x800000ff));
```
```
Expected: Color:<Color(0x800000ff)>
  Actual: Color:<Color(0x7f0000ff)>
```
if we use `withOpacity` to create the same color it returns the correct color:
```dart
expect(Color.fromRGBO(0, 0, 255, 1).withOpacity(0.5), Color(0x800000ff));
```

flutter/engine#13777 was an attempted fix but was reverted because it broke goldens and consensus was that it should be done in a non-breaking way.
Repository: go
Issue: cmd/compile: partial cse of phi inputs?
Labels: Performance,NeedsInvestigation,compiler/runtime

This is an optimization idea, one that is still very rough. I'm interested in feedback and ideas.

Consider the beginning of os/basename (on unix):

```go
func basename(name string) string {
	i := len(name) - 1
	// Remove trailing slashes
	for ; i > 0 && name[i] == '/'; i-- {
		name = name[:i]
	}
```

After decompose built-in, part of the loop here has SSA form

```
b2: ← b1 b4
    v11 (23) = Phi <int> v10 v41 (i[int], name+8[int])
    v74 (34) = Phi <int> v54 v11 (name+8[int])
    v13 (+23) = Greater64 <bool> v11 v12
    v82 (34) = StringMake <string> v50 v74
If v13 → b7 b5 (23)
```

b1 is the entry block. v11 is `i`. v74 is `len(name)`.

Consider v11's args in more detail.

v10 is `Add64 <int> v26 v54 (i[int])`. v41 is `Add64 <int> v26 v11 (i[int])`. (v26 is const -1.) They are the same except for the second arg.

So we could do a partial CSE and rewrite v11 as: `Add64 <int> v26 vNEW (i[int])`, where vNEW is `Phi <int> v54 v11`. Which is to say, vNEW is the same as v74!

So we end up with fewer phi values, and fewer Add64 values. We might even be able to eliminate a bounds check (v17) that was previously out of reach; I'm not sure.

Note that this transformation is I believe similar in effect to optimizing the code above to not modify name in the loop:

```go
func basename(name string) string {
	i := len(name) - 1
	// Remove trailing slashes
	for ; i > 0 && name[i] == '/'; i-- {
	}
	name = name[:i]
```

In this optimized code we have only a single phi value (for `i`), and we calculate `len(name)` from it when we need it. The CSE'ing approach discussed above generates code that has only a single phi value (for `len(name)`) and we calculate `i` from it when we need it.

In general terms, the idea is to look for phi values whose arguments are identical except for a single argument, and then to CSE those arguments, replacing the varying argument with a new phi value.

cc @randall77 @dr2chase @cherrymui
Repository: flutter
Issue: Safe area left and right of notch not clickable in iOS
Labels: platform-ios,framework,engine,a: layout,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-ios,triaged-ios

When using fullscreen widgets on iOS devices with a notch, the parts left and right of the safe area are not clickable.

## Steps to Reproduce

```
class FullPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    SystemChrome.setEnabledSystemUIOverlays ([]);

    return Scaffold(
      appBar: null,
      body: Stack(
        fit: StackFit.expand,
        overflow: Overflow.visible,
        children: <Widget>[
          Container(
            height: double.infinity,
            width: double.infinity,
            color: Colors.green,
          ),
          Positioned(
            top: 21.0,
            right: 24.0,
            child: InkWell(
              onTap: () {
                Navigator.pop(context);
              },
              child: Container(
                width: 20,
                height: 20,
                color: Colors.red
              ),
            )
          ),
        ],
      ),
    );
  }
}
```
**Expected results:** on iPhone 11: When tapping on the red container, the widget should close

**Actual results:** on iPhone 11: When tapping on the red container, nothing happens

```
flutter analyze
Analyzing app...                                               
No issues found! (ran in 16.3s)
```

```
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.3 19D76, locale en-AT)
    • Flutter version 1.12.13+hotfix.8 at /Users/x/Applications/flutter
    • Framework revision 0b8abb4724 (13 days ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at /Users/x/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • ANDROID_HOME = /Users/x/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_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 43.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (2 available)
    • iPhone 6  • x • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
    • iPhone 11 • x • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)

• No issues found!

```
Repository: godot
Issue: AnimationPlayer: Bezier Curves don't stay constant, when they should
Labels: bug,topic:core,confirmed

**Godot version:**
3.2.stable
**OS/device including version:**
Windows 10 1903
**Issue description:**
When adding a bezier curve animation for a property it doesn't stay constant when it should (Follow the cursor):
![grafik](https://user-images.githubusercontent.com/14185889/75176513-9486ce80-5734-11ea-83ed-f510cf16cc3a.png)
![grafik](https://user-images.githubusercontent.com/14185889/75176546-a49eae00-5734-11ea-99fb-a6b6957028be.png)
![grafik](https://user-images.githubusercontent.com/14185889/75176582-b41df700-5734-11ea-904f-4865c7106af3.png)
![grafik](https://user-images.githubusercontent.com/14185889/75177103-ca788280-5735-11ea-8314-b875e8e66882.png)


Which leads to jerky effects like this:
![bug](https://user-images.githubusercontent.com/14185889/75176821-2c84b800-5735-11ea-9fc8-89733634757e.gif)

I suspect the issue coming from rounding errors beeing extremyfied with rounding to an integer.
**Steps to reproduce:**

1. Add a PanelContainer
2. give it some content (a label or sth.)
3. Add an AnimationPlayer and create a new animation
4. Add a default keyframe for the margin left (Use bezier curves!)


5. Add another keyframe for the same margin
6. Add a third to a different (i.e. 0) value

**Minimal reproduction project:**
[anim_curve.zip](https://github.com/godotengine/godot/files/4245993/anim_curve.zip)
Repository: flutter
Issue: [animations] Code sample improvements
Labels: a: animation,a: accessibility,d: examples,package,p: animations,team-ecosystem,P3,triaged-ecosystem

Created off of https://github.com/flutter/flutter/issues/51300#issuecomment-590468967

- Add code samples to animations that make sense. For example, using the `PageTransitionsBuilder`s and describing how to handle hit testing for `FadeScaleTransition`.
- Link Material motion system article in the API documentation.
Repository: svelte
Issue: Perf: Frequently updating reactive variables cause garbage collection pressure & hitching
Labels: perf,temp-stale

We're seeing some hitches in a game we're developing that uses embedded webkit(Coherent GT) for the UI and I've narrowed this down to what appears to be GC pressure created when using reactive variables.

We're updating reactive variables within our components nearly every frame for things like health & positions.  In a normal web app, the GC times we're seeing(can get up to 20ms) wouldn't be an issue, but our UI has a small budget for each frame (~3ms).

I'm able to repro this in latest chrome with the following component in svelte 3.18.2:
```
<div data-amount="{amount}" />

<script>
let amount = 0;

setInterval(() => {
    amount = (amount + 1) % 100;
}, 4);
</script>
```
Here's what the memory looks like when profiling in chrome:
![image](https://user-images.githubusercontent.com/5530727/75188494-14934100-5701-11ea-8d1c-c3d20e27dcca.png)


A different approach that doesn't use reactive variables does not have this issue:
```
<div data-amount="{0}" bind:this={amountEl}/>

<script>
let amountEl;

setInterval(() => {
    amountEl.setAttribute("data-amount", (Number(amountEl.getAttribute("data-amount")) + 1) % 100);
}, 4);
</script>
```

Here's what the memory profile in chrome looks like when not using reactive variables:
![image](https://user-images.githubusercontent.com/5530727/75188851-d0547080-5701-11ea-935a-df0f58b01707.png)

I've looked at the generated output and tried to narrow down what might be causing a lot of the extra allocation, but haven't been able to nail anything down yet.  Any help would be appreciated!
Repository: go
Issue: cmd/compile: add a way to declare variables in rewrite rules
Labels: NeedsInvestigation,compiler/runtime

Consider this rewrite rule: `(Div32F (Const32F [c]) (Const32F [d])) && !math.IsNaN(float64(auxTo32F(c) / auxTo32F(d))) -> (Const32F [auxFrom32F(auxTo32F(c) / auxTo32F(d))])`

It'd be a lot easier to read and write (and compile) if we could declare a variable somewhere to hold the value `auxTo32F(c) / auxTo32F(d)`. I run into this a fair amount.

Maybe we could let the condition section contain short variable declarations?

`(Div32F (Const32F [c]) (Const32F [d])) && quo := auxTo32F(c) / auxTo32F(d) && !math.IsNaN(float64(quo)) -> (Const32F [auxFrom32F(quo)])`

It looks a bit weird. Other ideas?

Kinda related: https://github.com/golang/go/issues/30818

cc @mvdan @randall77
Repository: rust
Issue: Trait bounds on associated types not resolving correctly
Labels: A-trait-system,A-associated-items,T-compiler,C-bug,T-types

In [the attached gist](https://gist.github.com/myrrlyn/47b57e6a16371a34a1ca113d9c204bf0), I provide a demonstration of a trait resolution error, and an equivalent fix for it.

The summary is this:

I have a trait `A` that depends on other traits, including `core::ops` operator implementations. It depends on multiple versions of the same operator trait. I have another trait `B` that uses this as an associated type bound `AssocA: A`.

Values typed as `<B as AssocA>::A` fail to correctly select the operator trait that matches the expression, and instead insist that only the *last* operator trait variant in the requirements list, by source order, exists, and the expression must be reshaped to fit it.

Changing the type of the value from `<B as AssocA>::A` to `T where T: A` causes the expression to resolve its traits correctly.

Code summary:

```rust
trait A: 
  BitAnd<Self, Output = Self>
  + for<'a> BitAnd<&'a Self, Output = Self>
{}
trait B {
  type AssocA: A;
}

fn fails<T: B>(this: T::AssocA) -> T::AssocA {
  this & this // wants `this & &this`
}
call_fails::<Something>(<Something as B>::AssocA::default());

fn succeeds<T: A>(this: T) -> T {
  this & this
}
call_succeeds::<<Something as B>::AssocA>(a_value);
```

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.41.0 (5e1a79984 2020-01-27)
binary: rustc
commit-hash: 5e1a799842ba6ed4a57e91f7ab9435947482f7d8
commit-date: 2020-01-27
host: x86_64-pc-windows-msvc
release: 1.41.0
LLVM version: 9.0

rustc 1.43.0-nightly (58b834344 2020-02-05)
binary: rustc
commit-hash: 58b834344fc7b9185e7a50db1ff24e5eb07dae5e
commit-date: 2020-02-05
host: x86_64-pc-windows-msvc
release: 1.43.0-nightly
LLVM version: 9.0
```

### Reproduction

The two `.rs` source files in the gist are tests; put them in `tests/` of a new library. Add `funty = "1"` to the `Cargo.toml` manifest. Attempt to compile.
Repository: go
Issue: cmd/go: clean file paths in module replace directives
Labels: NeedsFix,modules,Tools

### What version of Go are you using (`go version`)?

<pre>
$ go version
1.14rc1
</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
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/jayconrod/Library/Caches/go-build"
GOENV="/Users/jayconrod/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/jayconrod/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/go/installed"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/go/installed/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/jayconrod/Code/test/go.mod"
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/rq/x0692kqj6ml8cvrhcqh5bswc008xj1/T/go-build479050676=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?

Create a `go.mod` file with a `replace` directive with an unclean path on the right side. For example, the path might have a trailing slash, or a `..` component in the middle.

Run any command that updates `go.mod`.

### What did you expect to see?

The `replace` directive should be updated with a clean path.

`go list -m -json` should report the clean path.

If `-mod=readonly` is used, `go list -m -json` should still report the clean path, but `go.mod` should not be updated.

### What did you see instead?

No change.

This partially caused #36193.
Repository: go
Issue: cmd/compile: investigate performance regression vs Go 1.13
Labels: Performance,NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?
<pre>
go1.14-almost
</pre>

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?
<pre>
Linux, AMD64, does not have the recent Intel microcode update (does not need it as far as I can tell).
</pre>

### What did you do?
This is a do-not-forget performance note.
Somewhere during 1.14 development, [performance of the "bent" benchmark](https://perf.golang.org/search?q=bentstamp%3A20200213T213137)
<pre>
github.com/ethereum/go-ethereum/common/bitutil
Encoding4KBVerySparse
</pre>
got worse by about 9% (it varies).  According to bisection this was linked to
[insertion of a dead code phase in the compiler to improve debugging output](https://go-review.googlesource.com/c/go/+/198479) but I have not tracked down the exact cause. It could be related to branch alignment, but superficially it "makes no sense".