sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/tools/cmd/present: add support for quote
Labels: Proposal,Proposal-Accepted,NeedsInvestigation

This proposal is about to add support for quote into the present tool.

An implementation is available here: golang/tools/pull/30

It introduces a "quote" function into the template to inject quotes and citations.

The text after ".quote" is embedded in a blockquote element after
processing styling. The text after the optional "//CITATION:" is treated
as a citation and embedded in a cite element after processing styling.

Example:

	.quote Never memorize something that you can look up //CITATION: Albert Einstein
Repository: rust
Issue: Nest array initialization is not optimized
Labels: I-slow,WG-llvm,A-mir-opt

See the following code:
```rust
pub fn foo() -> [[i32; 1000]; 1000] {
    [[0; 1000]; 1000]
}

pub fn bar() -> [i32; 1_000_000] {
    [0; 1_000_000]
}
```

Ideally they should generate the same code as `[[i32; 1000]; 1000]` is essentially just `[i32; 1_000_000]`. However, the first function does one `memset` to set a `[i32; 1000]` on the stack, then use `memcpy` to generate the big array, while the second just uses a single `memset`.

The code generated from the first is way larger than the second, and I would also expect it to be much slower given its repeatedly invoking `memcpy`.
Repository: go
Issue: net: *Conn.ReadMsgXXX documentation could be improved
Labels: Documentation,NeedsFix

Unfortunately, this is documentation/API request more than a 'bug'. I started this needing to know what interface a UDP message was received on, and immediately ran into an interface limitation.

Summary: ReadMsgXXX is impossible to use without _a priori_ knowledge of the underlying network API that Go uses. Furthermore, the documentation for said methods refers the user to another package, without explaining what to look for in said package.*


Either the documentation for UdpConn.ReadMsgUDP and/or the function's mere existence in it's current form are at _best_ useless (I understand how frustrating this statement is, but unfortunately this is the case). Additionally, while this message is primarily regarding UdpConn.ReadMsgUDP, it is likely equally applicable to all the net/x ReadMsgXXX (and possibly the WriteMsgXXX) functions as well.

The fundamental problem, which I'm certain you are aware of, is that every different OS stack behaves differently and reports different pieces of information in different ways. However, as written, the documentation does not explain _anything_ about what is the user needs to access the out-of-band data. It only says:

> The packages golang.org/x/net/ipv4 and golang.org/x/net/ipv6 can be used to manipulate IP-level socket options in oob.

But not anything about *how* to do that.

The user has to already understand the underlying network stack enough to connect the 'out-of-band' comment in the documentation for UdpConn.ReadMsgUDP to 'control message' in the overview examples of x/net/ipv4:

> The application might set per packet control message transmissions between the protocol stack within the kernel. When the application needs a destination address on an incoming packet, SetControlMessage of PacketConn is used to enable control message transmissions.

Finally, after determining that these are related the user is still required to manually call Parse on the out-of-band data array to finally convert it to the ControlMessage that they require. 

(As an aside, I'm fairly certain @bradfitz is correct here: https://github.com/golang/go/issues/28900#issuecomment-440464403)

*I believe this redirection is referring to SetControlMessage in x/net/ipvX. However, there is no indication that this will do anything to configure the 'out-of-band' data.
Repository: angular
Issue: HttpClient sends the wrong Accept header
Labels: type: bug/fix,breaking changes,freq1: low,area: common/http,state: confirmed,design complexity: low-hanging,P4

# 🐞 bug report

### Affected Package
@angular/common/http


### Is this a regression?
Not sure


### Description
The `get<T>` method on an HttpClient will send the following Accept header with a request if you do not override it:

`Accept: application/json, text/plain, */*`

This suggests that it is OK if the server responds with text/plain (i.e., not JSON).

However, if the server responds with something similar to this (truncated), you will get an error.

<pre><code>Content-Type: text/plain; charset=utf-8

59fb693e0302a519e0974379
</pre></code>

Clearly text/plain is not a valid response type, and the default Accept header should be:

`Accept: application/json`

## 🔬 Minimal Reproduction
I will add this later if deemed necessary.

## 🔥 Exception or Error
<pre><code>"error": {
   "name": "SyntaxError",
   "message": "Unexpected token f in JSON at position 2"
  }
</code></pre>


## 🌍  Your Environment

**Angular Version:**
<pre><code>     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 7.3.2
Node: 10.14.1
OS: win32 x64
Angular: 7.2.5
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.2
@angular-devkit/build-angular     0.13.2
@angular-devkit/build-optimizer   0.13.2
@angular-devkit/build-webpack     0.13.2
@angular-devkit/core              7.3.2
@angular-devkit/schematics        7.3.2
@angular/cdk                      7.3.2
@angular/cli                      7.3.2
@angular/material                 7.3.2
@ngtools/webpack                  7.3.2
@schematics/angular               7.3.2
@schematics/update                0.13.2
rxjs                              6.4.0
typescript                        3.2.4
webpack                           4.29.5
</code></pre>
Repository: godot
Issue: AnimationPlayer - Nodepath in a track in a animation stored in a PackedScene get their instance name automatically when other instance of that packed scene is reparented in the container scene.
Labels: bug,topic:editor,confirmed,topic:animation

<!-- 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. -->
5e837b3f13ab1e3b31bb8d705e87820fa4eff21e

**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Win7

**Issue description:**
<!-- What happened, and what was expected. -->

An Animation in PackedScene with an AnimationPlayer with a track called:
`EnemyPath2D/PathFollow2D:unit_offset`
is automatically renamed to:
`"../**InstancedPackedSceneName**/EnemyPath2D/PathFollow2D:unit_offset"`
on reparenting other copy of the PackedScene in the Scene that contains that PackedScene....

This change produces that **only the first packed scene** loaded in the **currentscene** can play the animation (because the **"InstancedPackedSceneName"** is stored in the animation), and only this instance can follow that track.  The packed scene remains inservible by itself (That packed scene **doesn´t have that track name outside the scene**). This behaviour happend with the unsaved resource or the animation stored in an independent tres file.

To note that InstancedPackedSceneName is unique per Node (godot doesn´t allow instances with the same name) and relative to every scene (you can change manually), so , **this name never should be added to the tracks from the original PackedScene** or the original resource (Godot should not change animation tracks names ever, this is not good behaviour, it can break to many things). If you change that track name manually, the animation is reproduced in all nodes, but on next saving, godot by itself destroy the reference other time.

**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
Will try...
Repository: TypeScript
Issue: Go to definition should still work for shorthand property declaration with no local binding
Labels: Suggestion,Experience Enhancement,Domain: Symbol Navigation

```ts
declare function foo(option: { [|abcd|]: number }): void;

foo({
    abcd/*use*/
});
```

Go to definition at `/*use*/`.

**Expected**: Language service gracefully finds `abcd`.
**Actual**: No definition is available.

This is frustrating because much of the time as I'm actually writing out the type, I want to ***know*** what `abcd` is so I'll jump to its definition. Instead, I can't get any functionality.
Repository: angular
Issue: router.navigate option to disable URI encoding
Labels: feature,freq2: medium,area: router,feature: under consideration

<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅

Oh hi there! 😄 

To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.

🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->


# 🚀 feature request

### Relevant Package
 This feature request is for @angular/router

### Description
The problem is that router.navigate automatically encodes a URL  ( using encodeURIComponent( .. )  I think),  but this encoding is not idempotent.
For example repeated encodes of a path with parameter segments will duplicate encoding of a '% '
Consequently, navigation from a path constructed from prior navigation will cause disaster when 
decodeURIComponent( .. ) is used to recover the parameter object .

### Describe the solution you'd like
An optional parameter to disable URL encoding.
Then the user can avoid this problem by encoding each parameter just once. 

This  parameter could be an option  in router.navigate,    (easy for a user to notice)

Alternatively a module option in
    RouterModule.forRoot(routes,
    {    enableTracing: true,
      initialNavigation: true,
      relativeLinkResolution: 'corrected',   // Fix Router BUG
      disableUrlEncoding: true                  //  Suggest something like this: but would need documentation
     }

### Describe alternatives you've considered
1.   navigateByUrl:   but I would prefer not to construct absolute URL's ( with possibly unexpected limitations) 
2.   Custom UrlSerializer:  but this seems unreasonably difficult for  an average user to investigate and implement.
Repository: TypeScript
Issue: Refactor rename file + rename function
Labels: Suggestion,Awaiting More Feedback,feature-request

## Search Terms

Rename refactor move file filename and function name matching

## Suggestion

We have a really common pattern: A file of name `MyFile.tsx` and a matching function of the types:

```ts
export default function MyFile() {}
export function MyFile() {}
export const MyFile = () => {}
```

## Use Cases

I find myself constantly doing a two part refactor. First refactor the function, then refactor the filename. Combining the two would save quite a lot of time and encourage better naming everywhere.
Repository: flutter
Issue: Need a way to make synchronous calls from plugin platform code to Dart code
Labels: c: new feature,engine,p: webview,P3,a: plugins,team-engine,triaged-engine

This came up as part of https://github.com/flutter/flutter/issues/25329:

The Android WebView API allows passing in a delegate that is invoked on the platform thread before a page is about to be loaded, the delegate needs to synchronously return true or false to determine whether to allow the navigation or to block it.

We needed to expose the same functionality in the webview_flutter plugin, ideally by delegating the decision to the Flutter application's Dart code. But this is currently impossible due to the combination of:
1. Communication over platform channels is asynchronous.
2. Messages sent from Dart to the platform channels are only delivered to the platform thread(by posting a task to the message loop).

Even if we were to block the platform thread waiting for the Dart code to make a decision, we would not be able to receive the message back from Dart(as the platform thread is blocked) and create a deadlock.

One potential approach for overriding this is to allow "platform channels" that deliver message to platform code on a separate thread. We could then:
1. Send a message to Dart from the platform thread.
2. Block the platform thread with some thread synchronization primitive.
3. Dart code will send the response to a dedicated thread.
4. The dedicated thread will release the latch that the platform thread is waiting on.

If we do this we should probably require that the "special thread" is always different from the platform thread.

For https://github.com/flutter/flutter/issues/25329 we're currently proceeding with a workaround that makes some security compromises(which means when an app sets a navigation delegate it should only load trusted content). But we should remove that workaround as soon as this issue is resolved.

cc @cbracken @jason-simmons
Repository: TypeScript
Issue: Emit Numerical Literal with different TokenFlags
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 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
emitter, numerical
<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion

Currently, all Numerical Literal has been emitted as Decimal number.
Hope to allow emit Hex Literal or Binary Literal etc


<!-- A summary of what you'd like to see added or changed -->

## Use Cases
```ts
ts.createLiteral('2', TokenFlags.BinarySpecifier) // 0b10
```

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->
That is useful to create a codegen

## Examples

<!-- Show how this would be used and what the behavior would be -->

## 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.)
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).

Related: https://github.com/Microsoft/TypeScript/pull/29897
Repository: go
Issue: cmd/compile: '_rt0_amd64_windows_lib' is not called when linking with VS2015
Labels: NeedsInvestigation,compiler/runtime

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
go version go1.11.5 windows/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes (go1.11.5)

### 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\Andreas Jonsson\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\Andreas Jonsson\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\ANDREA~1\AppData\Local\Temp\go-build314745786=/tmp/go-build -gno-record-gcc-switches
</pre></details>

### What did you do?

Compile any package with -buildmode=c-archive on Windows using Go1.11.5 and TDM-GCC-64 (mingw64). Link the library with a small application using VisualStudio 2015 and call any C exported Go function in the library.

### What did you expect to see?

Function should be executed just like when the application was built with Mingw.

### What did you see instead?

The application deadlocks when calling the function because runtime waits for the 'runtime_init_wait' object in src\runtime\cgo\gcc_libinit_windows.c:77. It looks like _rt0_amd64_windows_lib is never called if you link with VisualStudio 2015 (I suspect later versions have the same problem)

I also noted a warning during build "main.a(go.o) : warning LNK4078: multiple '.text' sections found with different attributes (60600060)" I'm not sure if this is the cause of the issue...?

[Go_minimal_c-archive.zip](https://github.com/golang/go/files/2893013/Go_minimal_c-archive.zip)
Repository: kubernetes
Issue: Tight retry loops should not cause cascading failure of the cluster
Labels: priority/important-soon,sig/scheduling,area/reliability,sig/api-machinery,kind/feature,sig/apps,sig/architecture,lifecycle/frozen

<!-- Please only use this template for submitting enhancement requests -->

**What happened**:
Problem found by accident during cluster stability testing. The application consumes nearly 7MB of memory per pod. 
While the helm chart was written the way that the deployment have set too low limits - see the snippet:
`containers:
......
  resources:
    limits:
      cpu: 200m
      memory: 4Mi
    requests:
      cpu: 100m
      memory: 4Mi `

_A pod was started; once initialized, it started consuming more memory than the limit allowed (7MB > 4MB) and pod was deleted by the system
It was happening fast enough to cause the hosting VM crash and in case of many replicas all the worker nodes crashed within a few minutes._

**Impact**:
It will lead to whole cluster crash.

**What need to enhance for K8s**
And here's the problem: we have no control over the chart contents in this area, and logical error may lead to crash of a whole cluster. There must be some mechanism introduced, which prevents the system from such tight loop of killing and restarting pods with memory limits set incorrectly**:

**Environment**:
Kubernetes version (use `kubectl version`): v1.12.2 and v1.12.2.
It shall be common issue, doesn't matter with releases. 

/sig node
/kind feature
/sig architecture
/sig scheduling
/sig cluster-lifecycle
Repository: flutter
Issue: flutter analyze should handle analyzer plugins
Labels: c: new feature,tool,dependency: dart,P3,team-tool,triaged-tool

I created an [analyzer_plugin to enforce Flutter Style Guide](https://github.com/a14n/flutter_style_guide_analyzer_plugin) and [registered it in flutter's packages](https://github.com/a14n/flutter/commit/558ed5910cfe32b2c2457153794a9926dcd77a89).

VSCode displays correctly the errors triggered by my plugin but `flutter analyze --flutter-repo` don't show any errors. (`flutter analyze --flutter-repo --watch` has the same behaviour)

Digging into the code `flutter analyze` stops once it receives an `{"isAnalyzing"::false}` event. But this event is sent before plugin responds.

I'm not sure what's the best way to fix that. Advices would be very welcome.

/cc @devoncarew @scheglov @bwilkerson
Repository: rust
Issue: Does the MIR generated for match still build in order-deps visible to MIR-borrowck?
Labels: P-medium,T-compiler,A-NLL,NLL-complete

Spawned off of PR #57609

The above PR has an interesting unit test that checks that we aren't assuming too much order dependence; the test (from file named "match-cfg-fake-edges.rs") looks like this ([play](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=f48fdf189e92c85e03ff3142f2aaa73c)):

```rust
fn all_previous_tests_may_be_done(y: &mut (bool, bool)) {
    let r = &mut y.1;
    // We don't actually test y.1 to select the second arm, but we don't want
    // borrowck results to be based on the order we match patterns.
    match y {
        (false, true) => 1, //~ ERROR cannot use `y.1` because it was mutably borrowed
        (true, _) => { r; 2 } // (use of "above" borrow)
        (false, _) => 3,
    };
}
```

while reviewing that test case, I wondered whether order-dependence, as implicitly defined by the above test, would also include this variant:

```rust
fn any_tests_may_be_done(y: &mut (bool, bool)) {
    let r = &mut y.1;
    // We don't test y.1 to select the first arm. Does this present
    // an instance where borrowck results are based on the order we
    // match patterns?
    match y {
        (true, _) => { r; 2 } // (use of "below" borrow)
        (false, true) => 1, //~ ERROR cannot use `y.1` because it was mutably borrowed
        (false, _) => 3,
    };
}
```

Today, `all_previous_tests_may_be_done` is rejected (with a warning under NLL migration mode, and a hard error if you opt into `#![feature(nll)`, but `any_tests_may_be_done` is accepted.

Is this an internally consistent policy?

----

Maybe my question is most simply put like this:
 * since we are adding some "fake edges" from some match-arms to the other arms that follow (to try to avoid prematurely tying ourselves to a particular code-generation strategy for MIR, in terms of what inputs MIR-borrowck will accept), ...
 * shouldn't we be adding even more such "fake edges" that go from the bottom arms *back up* to the ones before them?

That would increase our flexibility for MIR code-generation, in theory, even further, right?
Repository: TypeScript
Issue: Results of conditional types are not comparable (regression)
Labels: Needs Investigation

@RyanCavanaugh @weswigham @ahejlsberg Caused by #27697

**TypeScript Version:**  3.4.0-dev.20190222

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

```ts
type Falsy = undefined | false | 0 | '' | null | void;

type TEq<T, U> = [T] extends [U] ? [U] extends [T] ? true : false : false;
type If<S, T, U> = S extends Falsy ? U : T;

type StrictExtract<T, U> = T extends U ? U extends T ? T : never : never;
type StrictExclude<T, U> = T extends StrictExtract<T, U> ? never : T;

type ExcludeProp<T, V> =
  { [Q in { [P in keyof T]: If<TEq<V, never>, T[P] extends never ? never : P, If<Includes<T[P], V>, never, P>>; }[keyof T]]: T[Q]; };
type DeepExcludeProp<T, V, E extends object | undefined | null = never> =
  T extends E ? T :
  T extends V ? never :
  T extends readonly any[] | Function ? T :
  T extends object ? ExcludeProp<{ [Q in { [P in keyof T]: If<TEq<V, never>, T[P] extends never ? P : P, If<Includes<T[P], V>, T[P] extends E ? P : never, P>>; }[keyof T]]: StrictExclude<DeepExcludeProp<T[Q], V, E>, {}>; }, never> :
  T;
type Includes<T, U> = true extends (T extends U ? true : never) ? true : false;

type AD = { a: boolean; b: { a: boolean; b: boolean[]; c: undefined; d: undefined[]; e: boolean | undefined; f: Array<boolean | undefined>; }; c: { a: undefined; }; };

type a = DeepExcludeProp<AD, undefined, AD['b']>;
type b = ExcludeProp<AD, AD['c']>;
type c = {
  a: boolean;
  b: {
    a: boolean;
    b: boolean[];
    c: undefined;
    d: undefined[];
    e: boolean | undefined;
    f: Array<boolean | undefined>;
  };
};
type d = TEq<a, c>;
type e = TEq<b, c>;
type f = TEq<a, b>;
```

**Expected behavior:**

```ts
type d = TEq<a, c>; // true
type e = TEq<b, c>; // true
type f = TEq<a, b>; // true
```

**Actual behavior:**

```ts
type d = TEq<a, c>; // true
type e = TEq<b, c>; // true
type f = TEq<a, b>; // false
```

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

**Related Issues:** #30047