sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: `--globalPlugins` and `--pluginProbeLocations` default to list with empty string
Labels: Bug

**TypeScript Version:**  2.5.0-dev.20170629

**Code**

src/server/server.ts, line 758:
```ts
    const globalPlugins = (findArgument("--globalPlugins") || "").split(",");
    const pluginProbeLocations = (findArgument("--pluginProbeLocations") || "").split(",");
```

**Expected behavior:**

`--globalPlugins` and `--pluginProbeLocations` default to empty list (`[]`).

**Actual behavior:**

`--globalPlugins` and `--pluginProbeLocations` default to list with empty string (`[""]`).

This causes unnecessary attempts to load `""` as a module when the server is started:

```shell
$ mkdir project && cd project
$ npm install typescript@2.5.0-dev.20170629
$ touch index.ts tsconfig.json
$ export TSS_LOG="-traceToConsole true -level verbose"
$ echo '{"seq":1,"type":"quickinfo","command":"open","arguments":{"file":"index.ts"}}' | node node_modules/typescript/lib/tsserver.js
Info 0    Binding...
Info 1    request: {"seq":1,"type":"quickinfo","command":"open","arguments":{"file":"index.ts"}}
Info 2    Search path: 
Info 3    Config file name: tsconfig.json
Info 4    Loading  from project/node_modules/typescript/lib/tsserver.js/../../.. (resolved to project/node_modules/node_modules)
Info 5    Failed to load module: {}
Info 6    Loading  from  (resolved to project/node_modules)
Info 7    Failed to load module: {}
```
Repository: vscode
Issue: CLI proxy support
Labels: feature-request,proxy

- VSCode Version: Code 1.13.1 (379d2efb5539b09112c793d3d9a413017d736f89, 2017-06-14T18:21:47.485Z)
- OS Version: Windows_NT ia32 6.1.7601
- Extensions: none
---

Steps to Reproduce:
Without http.proxy set
1. run "code --install-extension HookyQR.beautify" in CLI
2. Error: getaddrinfo ENOTFOUND marketplace.visualstudio.com marketplace.visualstudio.com:443
    at errnoException (dns.js:28:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)

With
1. run "code --install-extension HookyQR.beautify" in CLI
2. result says "Found 'HookyQR.beautify' in the marketplace.
Installing..."


But it does not install. 
Please I need help . Thanks in advance
![extension](https://user-images.githubusercontent.com/11145777/27724739-e09a5ffc-5da5-11e7-8fe6-6f539cb5e86c.PNG)
![extension2](https://user-images.githubusercontent.com/11145777/27724751-f3425038-5da5-11e7-8f0a-bae203d0e4f2.PNG)
Repository: opencv
Issue: VideoCapture::set (CAP_PROP_POS_FRAMES, frameNumber) not exact in opencv 3.2 with ffmpeg
Labels: bug,priority: low,category: videoio,category: 3rdparty

Example and confirmed effect:

http://answers.opencv.org/question/162781/videocaptureset-cap_prop_pos_frames-framenumber-not-exact-in-opencv-32-with-ffmpeg/
Repository: go
Issue: math/big: underflow panic in roundShortest
Labels: help wanted,NeedsFix

```go
	f := new(big.Float).SetPrec(big.MaxPrec).SetFloat64(1)

	b := f.Append(nil, 'g', -1)
```

panics with the following stack trace:

```
panic: underflow

goroutine 1 [running]:
math/big.nat.sub(0x0, 0x0, 0x0, 0x104402c0, 0x0, 0x6, 0x180010, 0x1, 0x1, 0x0, ...)
	/usr/local/go/src/math/big/nat.go:129 +0x3e0
math/big.roundShortest(0x10429f38, 0x10429f90)
	/usr/local/go/src/math/big/ftoa.go:195 +0x1c0
math/big.(*Float).Append(0x10429f90, 0x0, 0x0, 0x0, 0x10429f67, 0xffffffff, 0x104340b0, 0x371f, 0x0, 0x1040a130)
	/usr/local/go/src/math/big/ftoa.go:97 +0x680
main.main()
	/tmp/sandbox082194187/main.go:11 +0xc0
```

(https://play.golang.org/p/68rBsop-pW)
Repository: TypeScript
Issue: HTMLCanvasElement.getContext() wrong typings when used with attributes.
Labels: Bug

<!-- 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 -->

**TypeScript Version:**  2.4.1
**Code**

```ts
declare const canvas: HTMLCanvasElement;

//correct typing
const gl1 = canvas.getContext('webgl', { preserveDrawingBuffer: true, depth: false });

// wrong typing for gl2
const attributes = { preserveDrawingBuffer: true, depth: false };
const gl2 = canvas.getContext('webgl', attributes);

// If we copy HTMLCanvasElement.getContext() signatures it works
function getContext2(contextId: '2d', contextAttributes?: Canvas2DContextAttributes): CanvasRenderingContext2D | null;
function getContext2(contextId: 'webgl' | 'experimental-webgl', contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
function getContext2(contextId: string, contextAttributes?: {}): CanvasRenderingContext2D | WebGLRenderingContext | null { 
    return null;
 }


// correct typing
const gl3 = getContext2('webgl', attributes);
```

You can copy/paste that code on the playground to see it live (couldn't share: 'Text buffer too large to share').

**Expected behavior:**

Typing of all `gl` var should be `WebGLRenderingContext`.

**Actual behavior:**

Typing for  `gl2` is `Canvas2DContextAttributes | WebGLRenderingContext`. 
I wanted to try to resolve this by changing the typings but then I found out that if we copy the exact same signature it works as expected. 
So the typing indeed seem correct, dunno what's going on.
Repository: go
Issue: cmd/compile: add OpAMD64CMPptr and friends?
Labels: NeedsDecision,compiler/runtime

amd64.rules contains a fair number of rules that are conditional on config.PtrSize, to support amd64p32. See CL 46870 for a recent example. To reduce duplication, I suggest we add ops whose lowering depends on pointer size. So for example, instead of:

```
(IsInBounds idx len) && config.PtrSize == 8 -> (SETB (CMPQ idx len))
(IsInBounds idx len) && config.PtrSize == 4 -> (SETB (CMPL idx len))
```

we would have only:

```
(IsInBounds idx len) -> (SETB (CMPptr idx len))
```

where CMPptr is treated as CMPQ for amd64 and CMPL for amd64p32. Similarly so for other such duplicated rules.

Opinions or objections, @randall77 @cherrymui?
Repository: go
Issue: testing: consider calling ReadMemStats less during benchmarking
Labels: Performance,NeedsFix

https://golang.org/cl/36791 reduced the number of times benchmarks call ReadMemStats. However, the implementation was incorrect (#20590, #20863), and it was rolled back (https://golang.org/cl/46612 and https://golang.org/cl/47350).

The rationale for the rollback is that ReadMemStats is now fast (https://golang.org/cl/34937). However, using tip as of June 30, 2017 (445652f45361d4935a828f394d7f0322faa6d9ad), cpuprofiling of package sort's benchmarks still shows almost half of all execution time in ReadMemStats. See [sort-cpu.pdf](https://github.com/golang/go/files/1116678/o.pdf).

So for 1.10, either ReadMemStats should be made cheaper still, or we should re-roll https://golang.org/cl/36791 with a better implementation; see the initial patchsets of https://golang.org/cl/46612 for improvements.

cc @bradfitz @aclements @meirf @ALTree
Repository: opencv
Issue: Non-ASCII symbols in source code files
Labels: bug

Example (marked by `--> <--`):
```
202:In the figure below, the Delaunay-->’<<--s triangulation is marked with black lines and the Voronoi
856://! Guil, N., Gonz-->á<--lez-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038.
958:    @param rect -->–<-- Rectangle that includes all of the 2D points that are to be added to the subdivision.
```

About 68 lines.

Some files has BOM header again (64 files).
Repository: go
Issue: cmd/compile: []byte(string) incurs allocation even when it does not escape
Labels: Performance,help wanted,NeedsFix

The following Go program reports that the function makes an allocation to do the string to []byte conversion, even though the compiler reports the conversion as non-escaping.

https://play.golang.org/p/y2d2RiYqK5

It prints:

      48 B/op	       1 allocs/op

Given that the compiler has marked it as non-escaping, I'd expect no allocations.

go version devel +eab99a8 Mon Jun 26 21:12:22 2017 +0000 linux/amd64
Repository: rust
Issue: Confusing error message:  the trait `std::ops::Fn<(char,)>` is not implemented for `T`
Labels: C-enhancement,A-diagnostics,T-compiler,D-confusing

Hey I am a newbie trying to learn rust following th rust-book(2nd edition). So, I  was trying to implement the greps project and I am stuck at the search function.

    fn search<'a, T>(query: &T, contents: &'a str) -> Vec<&'a str> {
        let mut results = Vec::new();
    
        for line in contents.lines() {
            if line.contains(query) {
                results.push(line);
            }
        }
        results
    }

I am getting this error. :

    rustc 1.18.0 (03fc9d622 2017-06-06)
    error[E0277]: the trait bound `T: std::ops::Fn<(char,)>` is not satisfied
      --> <anon>:39:17
       |
    39 |         if line.contains(query) {
       |                 ^^^^^^^^ the trait `std::ops::Fn<(char,)>` is not implemented for `T`
       |
       = help: consider adding a `where T: std::ops::Fn<(char,)>` bound
       = note: required because of the requirements on the impl of `std::ops::FnOnce<(char,)>` for `&T`
       = note: required because of the requirements on the impl of `std::str::pattern::Pattern<'_>` for `&T`
    
    error[E0277]: the trait bound `T: std::ops::FnOnce<(char,)>` is not satisfied
      --> <anon>:39:17
       |
    39 |         if line.contains(query) {
       |                 ^^^^^^^^ the trait `std::ops::FnOnce<(char,)>` is not implemented for `T`
       |
       = help: consider adding a `where T: std::ops::FnOnce<(char,)>` bound
       = note: required because of the requirements on the impl of `std::str::pattern::Pattern<'_>` for `&T`
    
    error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
      --> <anon>:57:40
       |
    57 |         assert_eq!(vec!["KAMEHAMEHA"], search(query, contents));
       |                                        ^^^^^^ the trait `std::marker::Sized` is not implemented for `str`
       |
       = note: `str` does not have a constant size known at compile-time
       = note: required by `search`
    
    error: aborting due to 3 previous errors

Why do I need the Fn trait? And also adding that trait isn't solving my problem. I am using generics, and I know I don't really need generics here but I am trying to understand the topic. Rust-playground gist: https://play.rust-lang.org/?gist=ca11eb8e51982f63a61ff05c542ec0db&version=stable&backtrace=0
Repository: flutter
Issue: Use a more resilient mechanism for showing the icons on the Icons page
Labels: framework,f: material design,d: api docs,c: proposal,P2,team-design,triaged-design

The source code for `icons.dart` looks like this:

```dart
  /// <p><i class="material-icons md-36">4k</i> &#x2014; material icon named "4k".</p>
  static const IconData four_k = const IconData(0xe072, fontFamily: 'MaterialIcons');

  /// <p><i class="material-icons md-36">ac_unit</i> &#x2014; material icon named "ac unit".</p>
  static const IconData ac_unit = const IconData(0xeb3b, fontFamily: 'MaterialIcons');

  /// <p><i class="material-icons md-36">access_alarm</i> &#x2014; material icon named "access alarm".</p>
  static const IconData access_alarm = const IconData(0xe190, fontFamily: 'MaterialIcons');
```

This HTML shows up in the IDE:

![Icons](https://user-images.githubusercontent.com/1078012/27770228-80f92dec-5f32-11e7-81b8-c5e018c54b1e.png)

I don't know what's expected here - even if I was able to get the IDE tooltips to handle the HTML (though [the docs say](https://www.dartlang.org/guides/language/effective-dart/documentation#avoid-using-html-for-formatting) avoid HTML) the icons wouldn't render correctly because the CSS isn't being loaded in the tooltips.
Repository: flutter
Issue: Flutter tool fails to build on macOS if "gnu-tar" is installed
Labels: c: crash,tool,a: first hour,P2,team-tool,triaged-tool

## Steps to Reproduce

Follow the steps from the website:
```
$ git clone -b alpha https://github.com/flutter/flutter.git
$ export PATH=`pwd`/flutter/bin:$PATH
```
Then, an error message is produced:
```
Building flutter tool...
gzip: (stdin): trailing garbage ignored
gzip: (stdin): trailing garbage ignored
tar: Child returned status 1
tar: Error is not recoverable: exiting now
gzip: (stdin): trailing garbage ignored
gzip: (stdin): trailing garbage ignored
Write failed (OS Error: Broken pipe, errno = 32), port = 0
```

The fix was to uninstall gnu-tar from homebrew: `brew uninstall gnu-tar`. The version of tar from homebrew is much newer, so it's useful to have installed.
Repository: youtube-dl
Issue: [dnvod] Site support request
Labels: site-support-request

## Please follow the guide below

- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your *issue* (like that [x])
- Use *Preview* tab to see how your issue will actually look like

---

### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.07.02*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.07.02**

### Before submitting an *issue* make sure you have:
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones

### What is the purpose of your *issue*?
- [ ] Bug report (encountered problems with youtube-dl)
- [x] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other


---

### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single video: http://www.dnvod.tv/Movie/Readyplay.aspx?id=wnLClIqsPII%3d

Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights.

---
Repository: vscode
Issue: Language services should be able to provide debug console IntelliSense
Labels: feature-request,debug

### Scenario
Currently, debug adapters can provide IntelliSense in the console. This is great for untyped or weakly typed languages like JavaScript/TypeScript. But for statically typed languages, such as C#, the best way to do this is to let the regular language service provide IntelliSense just like in the editor.

### Basic proposal
In the language service registration for an extension, a language service can indicate that it supports debug console IntelliSense. If the language of the document of the current stack frame opts into this, then instead of going down the path where completion is requested from debug adapter, it is instead requested from the language service. VS Code would need to provide the location of the active stack frame in the same way that regular intellisense works. Then it would need to provide the text and position of the line being edited in the debug console.

Assuming that VS Code is eventually interested in supporting this, https://github.com/OmniSharp/omnisharp-vscode/issues/1609 tracks the work in the C# extension to support this.
Repository: rust
Issue: rustdoc: it would be nice to have a way to extract the doctest source without building it
Labels: T-rustdoc,C-feature-request,A-doctests

It would be nice to have a way to extract the doctest sources into a file without compiling or running the test. I would like to integrate doctests into our current build system, and it looks like that would be easiest if I could extract the doc tests as source, then just build them as normal unit tests.
Repository: rust
Issue: rustdoc: add the ability to build a doctest executable without running it
Labels: T-rustdoc,C-feature-request,A-doctests

For flexibility of integration with other testing frameworks/infrastructure, it would be nice if rustdoc had a mechanism to build doctest executables without running them, so that they can be later run within a separate test coordination framework.
Repository: rust
Issue: rustdoc: allow full set of compiler options to be specified
Labels: T-rustdoc,C-feature-request,A-doctests

`rustdoc` doesn't accept the full set of compiler options (in particular `-C`), so it isn't possible to build doctests in the same way as crates, binaries and normal unit tests. The ideal would be to just allow the test source to be extracted (#43029), so that building the doctest is identical to other code.

Failing that, some systematic way of converting a rustc compiler command line to a rustdoc one for building doctests would be OK.

(Filed separately, the ability to just build a test without running it: #43030)
Repository: rust
Issue: Tracking issue for RFC 1985: Tiered browser support
Labels: B-RFC-approved,T-infra,C-tracking-issue

[RFC](https://github.com/rust-lang/rfcs/pull/1985)

- [ ] Document our tiered browser support policy as agreed upon in the RFC 
  - [ ] In [the forge](https://github.com/rust-lang-nursery/rust-forge) - should "browser support" get a different page or should it be added to the [platform support page](https://forge.rust-lang.org/platform-support.html)?
  - [ ] In crates.io/cargo's docs ([faq](http://doc.crates.io/faq.html)? [policies](http://doc.crates.io/policies.html)? [contributing.md](https://github.com/rust-lang/crates.io/blob/master/docs/CONTRIBUTING.md)? all of the above? somewhere else?)
  - [ ] Somewhere for rustdoc (this is sort of in flux right now)
  - [ ] [rust-lang.org's README](https://github.com/rust-lang/rust-www/)
  - [ ] [blog.rust-lang.org's README](https://github.com/rust-lang/blog.rust-lang.org)
  - [ ] the playground's README (this is sort of in flux right now)
  - [ ] [thanks.rust-lang.org's README](https://github.com/rust-lang-nursery/thanks)
- [ ] Should we add a note about this to these repos' issue templates?
- [ ] Add automated testing using BrowserStack to start testing some functionality in each of the the supported browsers. The following sites are complex enough that they deserve testing IMO, the rest are mostly static content and we can rely on bug reports:
  - [ ] For crates.io
  - [ ] For rustdoc
  - [ ] For the playground
- [ ] Close any issues in repos that only apply to browsers that we've decided are unsupported
Repository: electron
Issue: Make desktop notification clickable on Linux
Labels: enhancement :sparkles:,platform/linux

This is a feature request. As of now notifications are clickable on macOS and Windows but not on Linux.
Repository: go
Issue: x/crypto/bcrypt: API to check hash format
Labels: NeedsInvestigation

golang.org/x/crypto/bcrypt [1] does not provide an official API to verify that the hash format is good one. The current sources indicates [2] that one can use bcrypt.Cost() as that parses and verifies the whole hash string. But the documentation does not reflect that a successful return from the function indicates a valid hash. Also the documentation implies that bcrypt.ErrHashTooShort can only be returned from CompareHashAndPassword when the Cost function can also return it. 

It would be nice to have an explicit API to check hash format and perhaps check that it was created by older version so a password change can be scheduled in such case.

[1] - https://godoc.org/golang.org/x/crypto/bcrypt
[2] - https://github.com/golang/crypto/blob/6c586e17d90a7d08bbbc4069984180dce3b04117/bcrypt/bcrypt.go#L118
Repository: opencv
Issue: cvStartWindowThread implementations are still missing for multiple ui frameworks 
Labels: feature,category: highgui-gui

##### System information (version)
- OpenCV => 3.1
- Operating System / Platform => Ubuntu/Mac
- Compiler => gcc/clang

##### Detailed description
cvStartWindowThread is only implemented only for gtk. The implementations for cocoa, qt and winrt, carbon, etc are still missing.
Repository: TypeScript
Issue: (Proposal) syntax for contextual typing of a function declaration
Labels: Suggestion,In Discussion

Currently, it is possible to give a function a contextual type if it is a function expression. This is often used by callback types, and by certain interface types that add properties, or specify the parameter types / return type of a function.

A common use, in the declaration case, is `React.SFC`:

```tsx
interface Props {
  propName?: string
}
const Component: React.SFC<Props> = props => <div>{props.propName!}</div>
Component.defaultProps = { propName: 'propName' }
```

In the snippet above, `props` is contextually typed, and the function is only allowed to return a `React.Element` or `null`. The function object also has several keys added to it, most notably `defaultProps`, `displayName` and `propTypes`.

However, there is no code reason for why `Component` needs to be a function expression. It could as well be a function declaration. However, making it a function declaration prevents it from being typed as `React.SFC`.

Not being able to give it a type requires that all parameters have the types manually written, and also prevents attaching the extra property keys such as `defaultProps`. It will also not validate the function's return type -- you will instead get an error when you attempt to use the function if it happens to be incompatible.

The idea here is to have a way to tell the compiler what the "contextual type" of a function declaration should be.

One possible syntax could be appropriating the `implements` keyword used for `class`:

```ts
interface Props {
  propName?: string
}
Component.defaultProps = { propName: 'propName' }
function Component (props) implements React.SFC<Props> {
  return <div>{props.propName!}</div>
}
```

This would make it so `Component` uses `React.SFC<Props>` type as its type, similar to if it was a function expression that has a context given to it. This should have no effect on code emit and can simply be stripped on emit; similarly to the `class` `implements` clause.

In more generic terms,

```ts
function FunctionName (...ArgumentList) implements TypeExpression FunctionBody
```

should behave similarly to

```ts
var FunctionName: TypeExpression = function (...ArgumentList) FunctionBody
```

but be an actual hoisted function declaration.

---

Having a way of specifying the type like this also could make for easier refactoring of callbacks -- when extracting a callback from being given as an expression to being a named declaration, you often have to go to the type declaration and copy&paste the signature types to the extracted declaration.

With something like the proposed `implements`, you will still need to add a type, but it will only be the original context type; which then removes the need of explicitly giving types to each argument and the return type.
Repository: kubernetes
Issue: StatefulSet numbering offset
Labels: area/usability,kind/feature,area/stateful-apps,sig/apps,lifecycle/frozen

/kind feature

Hi
it would be nice if StatefulSets could set an offset to their numbering - a lot of applications often start counting from 1 making it a bit messy translating from 0 to 1 between applications ("app part 1 runs on app-0.app.default.svc.cluster.local" etc). Or when having one load spread across multiple clusters - one going 0-20 and second going 21-40 for example to spread failover capabilities or just spread the load.

Ashley