sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Allow the Dart VM to post idle task callbacks.
Labels: c: new feature,engine,c: performance,dependency: dart,P2,team-engine,triaged-engine

A mechanism for the engine to notify the Dart VM that an idle time slice was available for bookkeeping tasks was added in https://github.com/flutter/engine/pull/4012. Based on feedback from @rmacnak-google, this results in a lot of calls into the VM where there isn't much work to be done. Instead, it was suggested that the VM could post tasks into the engine for execution at a point in time the engine determines is safe (i.e. won't cause jank). Along with a callback, the VM would also give an approximation of the time it think it will take to service that callback. Based on this information, the engine can decide to prioritize the idle tasks. It is not clear if this mechanism is a replacement of the current scheme or just an addition.

cc @zanderso, @a-siva
Repository: flutter
Issue: Make Material Icons font a package 
Labels: framework,f: material design,c: proposal,P2,team-design,triaged-design

Currently there are special logic that pulls the font file from https://storage.googleapis.com/flutter_infra/flutter/fonts as a tool artifact cache, and a special yaml entry lets the tool add it to the flx. 

Use the generic logic used in Cupertino to host a new package on pub that user apps can add dependencies on to indirectly get the font instead. See #12559 for Cupertino. See #12160 for mechanism. 

Remove special logic from tools.
Repository: flutter
Issue: PageController needs documentation about how the pages are laid out when viewportFraction is not 1.0
Labels: framework,f: scrolling,d: api docs,P2,team-framework,triaged-framework

It appears that the page is centered in the available space rather than top or bottom aligned (in the case of vertical paging)
Repository: vue
Issue: vue SSR webpack plugin support template syntax for filename option
Labels: feature request

### What problem does this feature solve?
multiple entry and output point, because webpack plugin option of filename don't support template syntac like [name]、[id], so It's not convenient on this situation. 

### What does the proposed API look like?
new VueSSRServerPlugin({
        filename: '[name]/vue-ssr-server-bundle.json'
 })

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: puppeteer
Issue: Change dpi of PDFs
Labels: feature,chromium

It seems that we can't change dpi of generated PDFs, will it be a feature ?
For some case, it would be useful.
Repository: youtube-dl
Issue: Support connection reuse / keep-alive
Labels: request

### What is the purpose of your *issue*?
- [ ] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [x] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

----

Many videos from YouTube contain a lot of small video chunks. Creating one connection per file download significantly slows down the speed. I only get up to 200-500KiB/s for a chunk then the connection is closed and another is made for the next chunk. When downloading a big video file from YouTube I can get 5-6MiB/s. (The actual speed difference depends on the available bandwidth and round-trip time.)

TCP slow start significantly limits the speed when the connection is starting. With connection reuse / HTTP keep-alive we can avoid all the speeding-up phrase.
Repository: puppeteer
Issue: [Feature] Call `page.goto()` as a POST request and/or with custom headers
Labels: feature,upstream,chromium

Actually the only way to request a page through a POST or/and with custom headers is by trapping the request with `page.setRequestInterceptionEnabled(true)` (as proposed [here](https://github.com/GoogleChrome/puppeteer/issues/669#issuecomment-326797345)) or by building a custom html page with a `<form>` tag and submitting it (this solution prevent us to set custom headers).

Both of these solutions are very hackish…

It would be better to have a second parameter to `page.goto()` in which we can specify the request params like [`request.continue()`](https://github.com/GoogleChrome/puppeteer/blob/v0.12.0/docs/api.md#requestcontinueoverrides):
```javascript
{
    method: 'POST',
    postData: '…', 
    headers: {…}
}
```  
What do you think?
Repository: every-programmer-should-know
Issue: What do you think about adding theoretical computer science in this  list ? 
Labels: Needs some ❤️
Repository: pytorch
Issue: Sparse tensor .new(size) can be confusing
Labels: module: sparse,triaged

Say `x` is a sparse tensor. When calling `y = x.new(x.size())`, it automatically creates a new sparse tensor with `y.dimensionI = x.dimensionI + x.dimensionV` and `y.dimensionV = 0`, regardless of `x.dimensionV`. This causes extremely confusing behaviors like the following, where `x.new(x.size()) + x` errors but `x.new(x.size()).resize_as_(x) + x` works:

```
(Pdb) x
FloatTensor of size 10x3 with indices:

    1     2     4     5     4     1     3     1     3     2     0
[torch.cuda.LongTensor of size 1x11 (GPU 0)]
and values:

    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
[torch.cuda.FloatTensor of size 11x3 (GPU 0)]

(Pdb) y = x.new(x.size())
(Pdb) y
FloatTensor of size 10x3 with indices:
[torch.cuda.LongTensor with no dimension]
and values:
[torch.cuda.FloatTensor with no dimension]

(Pdb) y + x
*** RuntimeError: cadd operands have incompatible sizes or dimension types at /home/ssnl/sftp/pytorch/torch/lib/THCS/generic/THCSTensorMath.cu:358
(Pdb) yy = x.new(x.size()).resize_as_(x)
(Pdb) yy
FloatTensor of size 10x3 with indices:
[torch.cuda.LongTensor with no dimension]
and values:
[torch.cuda.FloatTensor with no dimension]

(Pdb) yy + x
FloatTensor of size 10x3 with indices:

    1     2     4     5     4     1     3     1     3     2     0
[torch.cuda.LongTensor of size 1x11 (GPU 0)]
and values:

    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
    1     1     1
[torch.cuda.FloatTensor of size 11x3 (GPU 0)]
```

cc @vincentqb
Repository: TypeScript
Issue: "Debugging Language Service in VS Code" documentation is weird
Labels: Docs

The "Debugging Language Service in VS Code" wiki is vague and sometimes confusing.

>Update your user settings to use your development version of typescript, located in the .../TypeScript/built/local directory. The corresponding setting/path is
>```
>{
>   "typescript.tsdk": "/path/to/repo/TypeScript/built/local"
>}
>```
User settings are stored per folder and it's not clear which folder should be used.  Both typescript and vscode have been downloaded.  There have been no instructions to open either version of code yet.

>Debugging tsserver (server-side)
>...
>2. Update launch.json with an option to attach to the node instance, with sourcemaps from your built/local folder.

Again, which launch.json is being spoken about?
>3. Launch an instance of development vs code, and open a ts file.
>4. Launch an instance of stable vs code.
>5. Attach the stable vs code instance to the development instance.

Wouldn't it be easier to open an instance of code, change the launch.json and then open a .ts file or attach to the other instance?

It would be helpful to list the steps in order and with more detail, perhaps with an example path so that it's clear which instance of code is being opened, which folder said instance is opening (if any) and which files are being edited.

Given that there aren't too many steps, it should be quite reasonable to list all steps for each debugging excercise.
Repository: TypeScript
Issue: Provide a way to apply quick fixes/refactorings/code actions in a bulk automated fashion
Labels: Suggestion,Needs Proposal,Domain: Refactorings,Domain: Quick Fixes

Currently, we have several quick fixes and refactorings. Some of these are generally to help reorganize your codebase/fix issues, some are more to migrate from JS to TS more easily, and some are to more-easily opt in to a more strongly-typed version of TypeScript.

The problem here is that these quick fixes/refactorings can become painful when manually applied. Sometimes we want to apply them *en masse* - altoghether. But perhaps the way I see this as is something that could be applied granularly (individually), altogether at once, or in a one-at-a-time but nonetheless automated fashion (supervised).

Some prior art here we may want to look at for inspiration are [jscodeshift](https://github.com/facebook/jscodeshift).
Repository: go
Issue: cmd/compile: odd inlining heuristic under mid-stack inlining
Labels: Performance,NeedsInvestigation,compiler/runtime

Suppose:

    func F() { ...; G(); ... }
    func G() { ... }

When midstack inlining (#19348) is enabled (-l=4), F is inlinable under two conditions:

1. G is inlineable, and F's total cost including the cost of inlining G falls under the max budget.
2. G is not inlineable, and F's total cost (excluding the cost of inlining G, since it won't be inlined) falls under the max budget.

However, this leaves out a third possibility:

3. G is inlineable, and F's total cost falls under the max budget as long as G is not inlined.

This seems counter-intuitive to me: that simplifying G from being non-inlineable (case 2) to inlineable (case 3), might cause F to no longer be inlineable.

On the other hand, maybe this is desirable: if we can't inline F+G, maybe it's better to make non-inline calls to F+G, than to inline F and make a non-inline call to G.

What inlining heuristics do other compilers use in situations like this?

/cc @ianlancetaylor
Repository: TypeScript
Issue: Support yarn in `Install @types/<package>` code fix
Labels: Suggestion,Awaiting More Feedback,Domain: Quick Fixes

https://github.com/Microsoft/TypeScript/pull/19130 added a code fix to install packages from `@types`. This will always use `npm` to install the package. This works for updating `package.json` and `package-lock.json`, but not `yarn.lock`
Repository: vscode
Issue: [theming] editor.selectionForeground is not working
Labels: feature-request,debt,themes,editor-theming

- VSCode Version: Code 1.17.2 (b813d12980308015bcd2b3a2f6efa5c810c33ba5, 2017-10-16T13:57:00.652Z)
- OS Version: Linux x64 4.8.0-59-generic

---

Steps to Reproduce:

1. Add customization for `workbench.colorCustomizations.editor.selectionForeground`
2. Save settings

Expected result: a text selection should use the configured foreground color
Actual result: it doesn't.

I notice that the tooltip in the settings editor says "Color of the selected text for high contrast". I'm not sure what that means, my only thought was that it might apply to the "High Contrast" theme I see mentioned in the docs. I tried to switch to that theme, but it doesn't make any difference whatsoever (seriously, none at all - it's weird because I thought I did that before and things looked different then - is high contrast broken now?).

In any case, I'd like to see selection foreground color implemented regardless of theme. For presentation purposes, I want a bright selection background color (my preference is bright yellow), and this is generally incompatible with any kind of syntax-highlight colored text.

![image](https://user-images.githubusercontent.com/4730969/31724478-b77f65f2-b419-11e7-9944-998d784acd6b.png)
Repository: TypeScript
Issue: Create Annex B lib target
Labels: Suggestion,Help Wanted,Committed,Effort: Moderate


![image](https://user-images.githubusercontent.com/6685088/31733404-5e9a4746-b3f0-11e7-829f-2d69855322a3.png)

[Annex B](https://www.ecma-international.org/ecma-262/6.0/#sec-additional-ecmascript-features-for-web-browsers) is the 🚽 of JavaScript with such features like a broken `escape` method and the `blink` method for `string`s. We shouldn't offer broken functions by default, and (almost) no one wants to see `fontcolor` in their string completion list, but it *is* "standard", so we should have a separate `lib` target (in the same category as e.g. `dom`) for `annex-b` that squirrels away the Annex B declarations so people can still opt in if they want to.
Repository: vscode
Issue: Support fontName in textMateRules
Labels: feature-request,editor-theming

This is a feature request, and I am not sure how it will be received. Probably not overwhelmingly positive, but nonetheless:

I would like to have support to change font family in my textmate theme. Right now you support `fontStyle`, `fontSize` and `foreground`. I believe the correct term is `fontName` as per https://github.com/textmate/markdown.tmbundle/issues/7 which would control the css `font-family` property,

E g something like

```
  "editor": {
    "fontFamily": "Fira Code",
    "fontSize": "16",
    "tokenColorCustomizations": {
      "textMateRules": [
        {
          "name": "Variables",
          "scope": "variable",
          "settings": {
            "fontName": "Script12 BT",
          }
        }
      ]
    }
  }
```

This would be in order to conditionally change font-family and be able to support more creative themes.
Repository: bitcoin
Issue: Block Re-announcement post-compact-fast-announcement after a GETHEADERS or GETBLOCKS request
Labels: P2P

BIP 152, in the "Pre-Validation Relay and Consistency Considerations" section, point 3, suggests that nodes "SHOULD re-announce" a "block using the associated announcement methods after validation has completed if it is not included in the original response [to a GETHEADERS/GETBLOCKS message]". This is a pretty strange requirement that we currently do not meet (it implies that, if you announce a compact block to a peer using HB mode, and it then requests the header/block inv from you, and you do not supply it as you have not yet finished connecting the block, you need to, once you finish connecting the block, send the header/inv. Because this requirement is not there for GETDATA messages directly (BIP 152 instead requires that the message-processing-pipline stall until you've connected the block), this does not effect our usage of compact blocks, but technically we are not faithfully implementing BIP 152.

Adding a check for this case and handle it explicitly (by watching for GETHEADERS/GETBLOCKS and then setting pindexBestHeaderSent back if we have a most_recent_block which is not included but which has more work than our tip) is doable, but somewhat gross. Personally, I'd prefer that BIP 152 either be changed to drop this SHOULD, or make a note that Bitcoin Core does not meet this SHOULD and implementations SHOULD NOT rely on this behavior.
Repository: TypeScript
Issue: Anonymous function expressions aren't covered for 'infer from usage'
Labels: Bug,Domain: Quick Fixes

I'm not getting any codefixes on the parameters in the following example:

```ts
var f = function(x, y, z) {
    return 0 + x + y + z;
}

f(1, 2, 3)
```

At the very least, `x`, `y`, and `z` should infer from their bodies.

Optimally, we should climb up looking for `PropertyAssignment`s, `PropertyDeclaration`s, and `BinaryExpression`s (with `=` tokens), and `VariableDeclarations`. For those, we should find all references and figure out the type there.

Should also test for default exports as well.
Repository: go
Issue: cmd/gofmt: unexpected formatting of comments
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
`go version go1.9.1 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/xxx/go"
GORACE=""
GOROOT="/usr/lib64/go"
GOTOOLDIR="/usr/lib64/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="x86_64-pc-linux-gnu-gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build052197988=/tmp/go-build -gno-record-gcc-switches"
CXX="x86_64-pc-linux-gnu-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?

The following code (https://play.golang.org/p/yWr8ET9ZUg) is laid out with comments as I would expect:
```
package main

import "os/exec"

func main() {
	exec.Command("nmap",
		"-sV",          // Get version information
		"-oA", "blah",  // Save all versions as output
		"-oG", "-",     // Output Greppable format to stdout
		"-Pn",          // Skip Ping scan to force scanning everything
		"-p-",          // Scan all ports
		"-v",           // Increase verbosity (shows down hosts now)
	)
}
```

However, the output of `gofmt` gives the following (https://play.golang.org/p/My_W9bkZrY):

```
package main

import "os/exec"

func main() {
	exec.Command("nmap",
		"-sV",         // Get version information
		"-oA", "blah", // Save all versions as output
		"-oG", "-", // Output Greppable format to stdout
		"-Pn", // Skip Ping scan to force scanning everything
		"-p-", // Scan all ports
		"-v",  // Increase verbosity (shows down hosts now)
	)
}
```

It seems to appear that the first two lines are treated as one block, the third line by itself, and the last three lines are treated as another block.

### What did you expect to see?
I would expect no change in the formating of the comments

### What did you see instead?
The comments changed, as shown above.

First time bug for me, so hopefully this is OK. Let me know if there is anything more you need. I'm also keen to help fix it, but I'm also new to go so may take a while :)

Cheers,

Hugh
Repository: go
Issue: x/crypto/ocsp: the responder cert is not provided along with the OCSP response signature
Labels: NeedsInvestigation

The docs on [`ocsp.CreateResponse`](https://github.com/golang/crypto/blob/ed5229da99e3a6df35c756cd64b6982d19505d86/ocsp/ocsp.go#L658) state that:

```
// The responder cert is used to populate the responder's name field, and the
// certificate itself is provided alongside the OCSP response signature.
```

But in the [code](https://github.com/golang/crypto/blob/ed5229da99e3a6df35c756cd64b6982d19505d86/ocsp/ocsp.go#L727), the responder cert is only used to populate the `rawResponderID`.

The certificate provided with the OCSP response signature seem to come from [`template.Certificate`](https://github.com/golang/crypto/blob/ed5229da99e3a6df35c756cd64b6982d19505d86/ocsp/ocsp.go#L761-L765) instead of the responder cert.

Is this an error in the docs/code or am I missing something?
Repository: pytorch
Issue: Add safety checks in `index_add`/`scatter_add`
Labels: triaged

Consider this snippet:
```python
a = torch.ones(5)
i = torch.ones(5)
a.index_add_(0, i, a)
```
Idk if we support repeated indices in `i` (we should), but we definitely shouldn't support adding to itself, as the result depends on the order of processing the additions.
Repository: opencv
Issue: setMouseCallback core dumped
Labels: incomplete

##### System information (version)

- OpenCV => 3.3
- Operating System / Platform => Ubuntu 16.04
- Compiler => gcc


##### Detailed description

Core dumped when setMouseCallback added.

##### Steps to reproduce

```
import cv2


point = [0,0]

def on_mouse(event,x,y,flags,params):

    global point
    if event == cv2.EVENT_LBUTTONDOWN:
        point[0] = x
        point[1] = y



cap = cv2.VideoCapture('video.mp4')
waitTime = 50

(grabbed, frame) = cap.read()
while(cap.isOpened()):

    cv2.namedWindow('frame')
    cv2.setMouseCallback('frame', on_mouse)

    cv2.imshow('frame',frame)

    key = cv2.waitKey(waitTime)

    if key == 27:
        break

cap.release()
cv2.destroyAllWindows()
```
Repository: flutter
Issue: Align the Hero widget API doc with the Hero animation tutorial
Labels: framework,a: animation,d: api docs,f: routes,c: proposal,P2,team-framework,triaged-framework

Please update the [Hero widget API doc](https://docs.flutter.io/flutter/widgets/Hero-class.html) to reflect terminology used in the new [Hero animations tutorial](https://flutter.io/animations/hero-animations/). Specifically, mention that the Hero widget implements a style of animation also known as Shared Element Transitions. 

In addition, it would be helpful to add a link to the tutorial from the API doc and a snippet of sample usage.

Cc: @HansMuller @Sfshaza
Repository: kubernetes
Issue: Subresource for metadata
Labels: sig/api-machinery,kind/feature,lifecycle/frozen

This is a tracker to consider the idea of a subresource for object metadata. In particular, for Secrets, you may want to grant a controller permission to read/edit metadata without granting access to the data.

Forked from https://github.com/kubernetes/community/pull/1163/files#r143342579:

@smarterclayton wrote:
> Somewhat of a red flag in that it gives those controllers access to all secrets in the system.

@bgrant0607 wrote:
> If we're concerned about permissions, we could create a subresource for updating ownerReferences, finalizers, and possibly other metadata in order to facilitate lifecycle management without privilege escalation.
Repository: rust
Issue: Rust compiler has unintuitive lifetime for returned mutable borrow in loops
Labels: A-lifetimes,A-borrow-checker,T-compiler,C-bug

Pardon if I have an incorrect view of how the borrow/lifetime system works.

Compiler complains about multiple mutable borrows in a loop, if a mutable borrow can be returned from the function.

Consider the following:

```
use std::collections::VecDeque;
struct Something;
struct Struct1 {
    list: VecDeque<usize>,
    thing: Something,
}
impl Struct1 {
    fn get_mut(&mut self) -> &mut Something {
        for _ in self.list.iter() {
            let a = &mut self.thing;
            if true {
                return a;
            }
        }
        panic!("hi");
    }
}
```


I get the following compilation 

```
error[E0499]: cannot borrow `self.thing` as mutable more than once at a time
  --> src/main.rs:20:26
   |
20 |             let a = &mut self.thing;
   |                          ^^^^^^^^^^ mutable borrow starts here in previous iteration of loop
...
27 |     }
   |     - mutable borrow ends here
...
error: aborting due to previous error
```

It is not expected to me that the lifetime of the mutable reference would clash. It seems that the only reason the lifetime of a is considered so long is because it can be returned. However, if it is being returned, I don't see why it should be considered a conflict, as it won't continue with the loop.

I'm not familiar with the details of the compiler, but I would expect, and I would want, the compiler to end the lifetime of the mutable borrow at the end of the loop. Or at the end of containing braces if there are any.