sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Improve error messages for duplicate identifiers
Labels: Bug,Help Wanted

We need to split the "Duplicate identifier" error in to a suite of more detailed errors about various types of illegal merges. "Duplicate identifier" is too general. Some examples of cases that warrant their own message:
- Would be a legal merge (like module & module) but exports don't match
- Fundule in the wrong order
- Clodule in the wrong order
- Fundule in different files
- Clodule in different files
- Interface and enum can't merge
- Interface and class can't merge
- Class and enum can't merge
- Function and enum can't merge

Basically every illegal cell in the matrix of merges should have a separate error message (or some of them can be grouped together in terms of value/type/namespace space). For example:

Class cannot merge with any other type
Repository: TypeScript
Issue: Widening after inferring null or undefined for a type parameter should be an implicit any
Labels: Bug,Help Wanted,Effort: Moderate

Courtesy of @JsonFreeman 

```
function f<T>(t: T): T { return null }
f(null);
```

When compiling with -noImplicitAny, we don't get an error here, even though T is implicitly inferred to be any when we call f
Repository: rust
Issue: Unused assignment warning should trigger for structs
Labels: A-lints,T-compiler,C-bug

This code should ideally trigger warnings about unused assignments, but it doesn't.

``` rust
struct Pos {
    x: i32
}

fn foo() -> Pos{
    Pos{x: 2}
}

fn main() {
    foo().x += 1; // Unused assignment
    let mut f = Pos { x: 2 };
    f.x = 2; // Unused assignment
}
```

It could be useful in situations like this:

``` rust
struct Property {
    x: i32
}

struct Foo {
    prop: Property
}

impl Foo {
    fn prop(&self) -> Property {
        self.prop
    }
    fn mut_prop(&mut self) -> &mut Property {
        &mut self.prop
    }
}

fn main() {
    let mut foo = Foo{prop: Property{x: 2}};
    foo.prop().x += 2; // Oops, accidentally called prop() instead of mut_prop()
    foo.mut_prop().x += 2;
}
```


<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"LeSeulArtichaut"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: TypeScript
Issue: Convert HTMLElement and friends to classes to support Web Components/Custom elements
Labels: Suggestion,In Discussion,Domain: lib.d.ts

Please model HTMLElement and its subclasses as classes instead of interfaces in lib.d.ts to make it possible to subclass them.

My motivation is custom elements and web components. To create a custom element you need to create a subclass of HTMLElement and register it with the browser. Currently, HTMLElement etc are interfaces and can't be subclassed. I've been using a hacked lib.d.ts in my pet TypeScript project which uses web components.

Tutorial and info about how to use custom elements is here: http://www.html5rocks.com/en/tutorials/webcomponents/customelements/
Repository: youtube-dl
Issue: I'm failing to download d video from kanal2 website
Labels: site-support-request

$ youtube-dl http://kanal2.ee/pluss/video/\?id\=22216 --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['http://kanal2.ee/pluss/video/?id=22216', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.09.01.1
[debug] Python version 2.7.5 - Darwin-13.3.0-x86_64-i386-64bit
[debug] Proxy map: {}
[generic] ?id=22216: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ?id=22216: Downloading webpage
[generic] ?id=22216: Extracting information
ERROR: Unsupported URL: http://kanal2.ee/pluss/video/?id=22216; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 530, in _real_extract
    doc = parse_xml(webpage)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1472, in parse_xml
    tree = xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
    parser.feed(text)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: not well-formed (invalid token): line 16, column 91
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 521, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 178, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 869, in _real_extract
    raise ExtractorError('Unsupported URL: %s' % url)
Repository: TypeScript
Issue: Don't allow falsely discarded parameters when determining overloaded signature compatibility
Labels: Suggestion,Help Wanted

# Motivation

Libraries such as Knockout use overloaded functions, for example:

``` ts
var x = new MyKnockoutModel();
console.log(x.customerName()); // string
x.customerName('bob'); // OK
x.customerName(42); // Error, 42 is not a string
```

We can model these in TypeScript:

``` ts
interface KnockoutElement<T> {
  // Getter
  (): T;
  // Setter
  (value: T): void;
}
```

However, these overloads turn out to not be safe when used in callbacks. For example:

``` ts
function readFile(finished: (contents: string) => void) { /*... */ }
var ko: KnockoutElement<number>;
readFile(ko); // No error, but passes a string to a number-expecting setter!
```

This is because we look at all the candidate source signatures, reject the `(x :number) => void` signature for having an incompatible type, and accept the `() => T` signature because it has fewer parameters (an acceptable variance).

This behavior does not map to any actual runtime behavior. The invoker's side might check the `.length` property of the function to determine what kind of arguments to pass, and the invokee's side might check `arguments.length` to determine which overload was intended, but the invoker cannot tell what the expected parameter _type_ of the function is, and the invokee reasonably expects to be called with the correct _type_ given a certain _arity_.
# Proposal

As an example, if a callback declaration says it’s going to invoke `f` with two parameters, we should not consider overloads of `f` which take zero arguments if an overload with one or two arguments exists.

In 3.8.3 / 3.8.4:

> M is a non-specialized call or construct signature and S’ contains a call or construct signature N where […]

Change to

> M is a non-specialized call or construct signature and S’ contains a call or construct signature N where no other call or construct signature in S’ has more parameters than N but not more than M, and […]
# Analysis

A sample implementation of this rule breaks no existing tests. Check `stopParameterNeglect` branch for code/tests.
Repository: neovim
Issue: Use standard `x` functions on platforms that support them. (strlcpy/stpcpy/etc)
Labels: enhancement,build,performance

The use of `x` functions inhibits compiler optimizations by hiding the implementation in isolated compilation units. For example, the compiler can theoretically turn

``` c
strcpy(dst, a);
strcat(dst, b);
strcat(dst, c);
```

into

``` c
strcpy(stpcpy(stpcpy(dest, a), b) c);
```

but not if `xstpcpy` (as we use) has external linkage. The result is that `strlen` must be called on `dst` for every `cat`. Attributes help, but not in this specific instance.

There has been some prior discussion on this:

@aktau said (https://github.com/neovim/neovim/pull/1134#issuecomment-54714027)

> we should try to define stpcpy on platforms where it doesn't exist, and use the platfrom-supplied stpcpy if possible. It's faster and the compiler knows what these functions do (same for mempcpy, for example).
> 
> One "way" of doing that would be:
> 
> ``` c
> #ifndef HAVE_STPCPY
> char *stpcpy(...)
> {
>   // ...
> }
> #endif
> ```

@ZyX-I said (https://github.com/neovim/neovim/pull/1134#issuecomment-54724403)

> > But I'm not sure how this would interact with the automatic declarations generator, if at all. Any reason to believe changes are necessary, @ZyX-I?
> 
> For a number of reasons (one of them is that I use lots of macros for defining functions) declarations generator is run on a preprocessed file, so it is fine as long as HAVE_STPCPY is defined either with -D argument known by cmake at the makefile generation stage or in some included file.
> 
> AFAIR we already have some config.h file generated by cmake, that includes some similar things. Just listing the possibilities: generated Makefile will embed all globally enabled -D definitions known to CMake (except for INCLUDE_GENERATED_DECLARATIONS), as well as -I arguments so that preprocessor works, thus both locations are fine; even though I have strong opinion about where it will actually land without my advice.

Obviously this does not apply to the `xmalloc` family, nor `xmemdup(z)`, but it does to `stp(n)cpy`, `strlcpy`, `strlcat`, and at least one function I'd like to add to `memory.c`, `strchrnul` (https://github.com/splinterofchaos/neovim/commit/9a2cd2e4a417c2f52023d31eba792ceab656d2bd). In some cases, when `BACKSLASH_IN_FILENAME` is not defined, we could use [`strcasecmp`](http://linux.die.net/man/3/strcasecmp). 

Glibc actually ships with BSD functions, even on linux. For example, to get access to `strchrnul` requires this:

``` c
#define __USE_GNU
#include <string.h>
#undef __USE_GNU
```

So, the question is: How could we modify the build system to detect these functions and how do we modify the source to take advantage of them, and is it worth the trouble?
Repository: rust
Issue: Improve error messages involving type aliases
Labels: E-hard,C-enhancement,A-diagnostics,T-compiler,T-types

``` rs
extern crate libc;
fn main() {
    let a: libc::ssize_t = 0;
    let () = a;
}
```

```
$ rustc show-typedef.rs
show-typedef.rs:4:17: 4:19 error: mismatched types: expected `i64`, found `()` (expected i64, found ())
show-typedef.rs:4             let () = a;
                                  ^~
error: aborting due to previous error
```

It would be great if `rustc` could show `libc::ssize_t` as well as `i64` in the error message.  Compare it with GCC 4.9

```
$ g++49 show-typedef.cpp
show-typedef.cpp: In function 'int main()':
show-typedef.cpp:3:28: error: invalid operands of types 'void' and 'const size_type {aka const long unsigned int}' to binary 'operator+'
     (void)0 + std::string::npos;
                            ^
```

``` cpp
#include <string>
int main() {
    (void)0 + std::string::npos;
}
```
Repository: youtube-dl
Issue: Support format fallback (was: ERROR: giving up after 10 retries)
Labels: request

```
youtube-dl -f 137+140 -v https://www.youtube.com/watch?v=USzA8aBaRNc
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-f', '137+140', '-v', 'https://www.youtube.com/watch?v=USzA8aBaRNc']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.09.10.1
[debug] Python version 2.7.3 - Linux-3.2.0-4-amd64-x86_64-with-debian-7.5
[debug] Proxy map: {}
[youtube] Setting language
[youtube] Confirming age
[youtube] USzA8aBaRNc: Downloading webpage
[youtube] USzA8aBaRNc: Downloading video info webpage
[youtube] USzA8aBaRNc: Extracting video information
[debug] Invoking downloader on u'https://r1---sn-aiglln7d.googlevideo.com/videoplayback?sver=3&nh=IgpwcjAxLmxocjA3KgkxMjcuMC4wLjE&gir=yes&mm=31&signature=BE80A45DD6089031F21DD3F38F3467391E96B3E0.58497AD778D0AE7F8DD467E4D8BDD09A6068E990&key=yt5&id=o-AD9cD6UbVG6OKDOp9GVs-sZZVw-paoVpe1UUFYGwjEhd&dur=273.273&ipbits=0&initcwndbps=11841000&mv=m&ms=au&ip=88.150.175.147&clen=130976906&sparams=clen%2Cdur%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmm%2Cms%2Cmv%2Cnh%2Crequiressl%2Csource%2Cupn%2Cexpire&mt=1410428969&source=youtube&lmt=1410169303233178&expire=1410450636&fexp=900223%2C901082%2C904843%2C905024%2C927622%2C931983%2C932404%2C932623%2C934024%2C934030%2C946023%2C947209%2C951900%2C953801&itag=137&requiressl=yes&upn=-wkNkGrw3fw&ratebypass=yes'
[download] Got server HTTP error. Retrying (attempt 1 of 10)...
[download] Got server HTTP error. Retrying (attempt 2 of 10)...
[download] Got server HTTP error. Retrying (attempt 3 of 10)...
[download] Got server HTTP error. Retrying (attempt 4 of 10)...
[download] Got server HTTP error. Retrying (attempt 5 of 10)...
[download] Got server HTTP error. Retrying (attempt 6 of 10)...
[download] Got server HTTP error. Retrying (attempt 7 of 10)...
[download] Got server HTTP error. Retrying (attempt 8 of 10)...
[download] Got server HTTP error. Retrying (attempt 9 of 10)...
[download] Got server HTTP error. Retrying (attempt 10 of 10)...
ERROR: giving up after 10 retries
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/downloader/http.py", line 66, in real_download
    data = self.ydl.urlopen(request)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1244, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 407, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 445, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error
```
Repository: TypeScript
Issue: Refactoring support: Reorder parameters
Labels: Suggestion,Visual Studio,Domain: Refactorings

I would really like something like reorder parameters as a refactoring option, like C# already has: http://msdn.microsoft.com/en-us/library/5ss5z206.aspx

edit: 
This might be a bit hard when the info comes from a .d.ts file, though.
Repository: TypeScript
Issue: External modules with AMD always requires "exports" even when it is not used
Labels: Suggestion,Help Wanted

Here's a small external module that explicitly exports a module:

``` ts
module Foo {
    export var foo = 42;
}
export = Foo;
```

The code generated for this is:

``` js
define(["require", "exports"], function(require, exports) {
    var Foo;
    (function (Foo) {
        Foo.foo = 42;
    })(Foo || (Foo = {}));

    return Foo;
});
```

This feels like bad AMD since you are requiring the "exports" magic dependency, but then not using it and instead returning Foo directly. 

It's annoying for minimal AMD loaders since they can't assume the object return of your module is your "exports" object and have to guess that you really meant to return something that overrode the "exports" object you asked for.

Furthermore, why bother declaring a dependency on 'require' when it's not used?
Repository: youtube-dl
Issue: obizgo.tv
Labels: site-support-request,account-needed

fails to download video from this user pays site. I was already logged in and authenticated, copied the URL and pasted it next to the command line to download the video.
laptop is running latest ubuntu 14.04, completely updated and running latest version of youtube-dl
here is the error message
PC:~/Videos$ youtube-dl --verbose http://obizgo.tv/VoIrC/13851/468895
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://obizgo.tv/VoIrC/13851/468895']
[debug] Encodings: locale 'UTF-8', fs 'UTF-8', out 'UTF-8', pref: 'UTF-8'
[debug] youtube-dl version 2014.02.17
[debug] Python version 2.7.6 - Linux-3.13.0-35-generic-i686-with-Ubuntu-14.04-trusty
[debug] Proxy map: {}
[generic] 468895: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 468895: Downloading webpage
[generic] 468895: Extracting information
ERROR: Unsupported URL: http://obizgo.tv/VoIrC/13851/468895; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 493, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 158, in extract
    return self._real_extract(url)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 380, in _real_extract
    raise ExtractorError('Unsupported URL: %s' % url)
ExtractorError: Unsupported URL: http://obizgo.tv/VoIrC/13851/468895; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Repository: youtube-dl
Issue: [Feature Request] parallel downloads feature using a batch file
Labels: request

Is there a way to enable parallel download session fed in by a --batch-file.
Some sites have very slow band width per video, therefore instead of waiting to finish previous file, it is much efficient to run parallel downloads.
Repository: react
Issue: getEventKey implementation inconsistent with DOM3 spec / Firefox implementation
Labels: Type: Bug,Component: DOM

There are some inconsistencies between `getEventKey` and the DOM3 keyboard event spec (as well as what Firefox has implemented):
- `key` property is not correctly set for printable characters on `keydown` and `keyup` events. This works properly in Firefox, and my interpretation of the standard is that Firefox's behaviour is correct here. From the spec: _If the key generates a printable character, and there exists an appropriate Unicode code point, then the KeyboardEvent.key attribute must be a string consisting of the char value of that character._
- Enter key only fires keydown in Firefox, but fires both keydown and keypress in Chrome. This should be consistent across browsers
- CapsLock key only fires keydown when it is toggled on. When caps lock is toggled from on to off, no keydown event is fired (this may be a browser limitation in Chrome)

Repro: Test this page in Firefox and compare the result to Chrome: http://jsfiddle.net/63ycmLhe/1/
Repository: neovim
Issue: enhanced session/shada; shared (p2p) state
Labels: enhancement

This ticket/discussion accidentally covers two different (but related) goals:

- Enhance shada as a general store for plugins to persist things like cached data, session settings, etc. https://github.com/neovim/neovim/issues/984#issuecomment-49879240
- Standard/convenient mechanism to share state between Nvim peer instances.

---

~~Embedding SQLite?~~  http://www.sqlite.org/whentouse.html
Repository: youtube-dl
Issue: pitchfork advance support
Labels: site-support-request

It would be nice if youtube-dl would support pitchfork advance, see http://pitchfork.com/advance/
for instance: http://pitchfork.com/advance/544-a-place-to-stand/
These new album previews are always available for one week only.
Repository: rust
Issue: program without libc (without std lib) leads to cryptic error
Labels: C-enhancement,A-diagnostics,T-compiler

The code at http://doc.rust-lang.org/guide-unsafe.html#avoiding-the-standard-library requires libc. It isn't possible to remove this line or to replace it with the platform independent rlibc. The following error occurs (playpen: http://is.gd/GWl8YT):

```
error: linking with `cc` failed: exit code: 1
note: cc '-m64' '-L' '/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib' '-o' 'out' 'out.o' '-Wl,--whole-archive' '-lmorestack' '-Wl,--no-whole-archive' '-nodefaultlibs' '-Wl,--gc-sections' '-pie' '-Wl,--as-needed' '-Wl,-O1' '-L' '/home/rust/.rust' '-L' '/home/rust' '-Wl,--whole-archive' '-Wl,-Bstatic' '-Wl,--no-whole-archive' '-Wl,-Bdynamic' '-lcompiler-rt'
note: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../lib/Scrt1.o: In function `_start':
(.text+0x12): undefined reference to `__libc_csu_fini'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../lib/Scrt1.o: In function `_start':
(.text+0x19): undefined reference to `__libc_csu_init'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../lib/Scrt1.o: In function `_start':
(.text+0x25): undefined reference to `__libc_start_main'
collect2: error: ld returned 1 exit status

error: aborting due to previous error
```

I want to use libcore, that doesn't require libc (http://doc.rust-lang.org/core/). The libcore code example in the guide (http://doc.rust-lang.org/guide-unsafe.html#using-libcore) has no libc dependency, but the playpen link in the top right of the code example reinserts it and removing it leads to the same error as above (http://is.gd/sxVAr0).
Repository: kubernetes
Issue: Reverse lookup by labels
Labels: area/api,priority/awaiting-more-evidence,sig/api-machinery,kind/feature,lifecycle/frozen

LIST queries can be filtered by label selector.

It should also be possible to filter LISTs of replication controllers and services by _labels_. What this would do is return objects whose label selectors matched the specified labels. This would make it straightforward to figure out which service(s) targeted a particular pod, for instance, without creating a single label applied to both, which kubecfg currently does for its simple use case, but is an anti-pattern in the general case. Clients should apply the same labels to services as to the pods they control, but pods likely will carry a superset of the service labels.

Note that this functionality (though not the same API) is also needed in order to implement Watch of pods filtered by a label selector, since newly created pods need to be matched against outstanding Watches. It would also be useful to validate that there's at most one replication controller targeting a given pod at a time.

This may be a bit confusing right now, because label selectors look like sets of labels, and even use the parameter name "labels" in LIST queries, but really aren't labels, esp. once selectors are generalized (#341). I suggest we change that parameter to "selector" and use "labels" for this proposal. The "labels" parameter would only be valid for API objects containing selectors.

/cc @lavalamp