sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: You-Dont-Know-JS
Issue: "this & object prototypes": node.js REPL environment differences
Labels: for second edition

Just started reading, great book. I got to here:
https://github.com/getify/You-Dont-Know-JS/blob/master/this%20&%20object%20prototypes/ch2.md#implicitly-lost

This snippet:

``` js
function foo() {
    console.log( this.a );
}

var obj = {
    a: 2,
    foo: foo
};

var bar = obj.foo; // function reference/alias!

var a = "oops, global"; // `a` also property on global object

bar(); // "oops, global"
```

When run in node.js, it logs `undefined`, see http://runnable.com/me/VHKV6afPSmV9xlkJ

When run in browser environment (tested in Chrome Version 41.0.2228.1 canary (64-bit) and http://repl.it/languages/JavaScript/), logs `oops, global`.

Does this have to do with node's lack of `window` object?
Repository: youtube-dl
Issue: Site Request: nos.nl.
Labels: site-support-request

For example, [this url](http://nos.nl/artikel/2005405-rutte-meer-openheid-financi-n-navo.html) contains one video on the right-hand side of the screen. It would be nice if `youtube-dl` would notice that, and subsequently download the video.

Thank you.
Repository: TypeScript
Issue: Consider property access a form of type guards
Labels: Suggestion,Awaiting More Feedback

This is a proposal for using property access as another form of type guards (see #900) to narrow union types. While we're investigating expanding the power of type guards (#1007) this feature would support the natural style that JavaScript programmers have in their code today.
### Using property access to narrow union types

``` ts
var x: string|number;
if (x.length) { // no error even though number lacks a length property
    var r = x.charAt(3); // x is of type string inside this block
}

var r2 = x.length || x * x; // no error, x narrowed to number on right hand side, r3 is number

var y: string[]|number[]|string;
if (y.length && y.push) {
    // y is string[]|number[] now
    var first = y[0]; // first is string|number
    if (first.length) {
        // first is string in here
    } else {
        // first is number in here
    }
}
```

We do not expand the situations in which types are narrowed, but we do expand the known type guard patterns to include basic property access. In these narrowing contexts it would be an error to access a property that does not exist in at least one of the constituent types of a union type (as it is today). However, it would now be valid to access a property that exists in at least one, but not all, constituent types. Any such property access will then narrow the type of the operand to only those constituent types in the union which do contain the accessed property. In any other context property access is unchanged.
### Invalid property access

``` ts
var x: string|number;

var r = x.length; // error, not a type guard, normal property access rules apply

if (x.len) { } // error, len does not exist on type string|number 

var r3 = !x.len && x.length; // error, len does not exist on type string|number 

var r4 = x.length && x.len; // error, len does not exist on type string
```
### Issues/Questions
- Should the language service behave differently in these type guard contexts? Should dotting off a union type in a type guard list all members on all types rather than only those that exist on all of them?
- Need to understand performance implications

I have a sample implementation and tests in a branch here: https://github.com/Microsoft/TypeScript/tree/typeGuardsViaPropertyAccess. There're a couple bugs remaining but examples like the above all work and no existing behavior was changed.
Repository: rust
Issue: Surpress, mark, or order superflous trait resolution type errors correctly
Labels: C-enhancement,A-diagnostics,T-compiler

During a `rusti` session on IRC, a confusing class of type errors has been discovered. This piece of code:

```
fn main() {
    "1 2 3".split(" ").collect::<Vec<_>>()
}
```

Currently emits these two error messages:

```
figment_sketch.rs:2:13: 2:23 error: the trait `core::str::CharEq` is not implemented for the type `&str`
figment_sketch.rs:2     "1 2 3".split(" ").collect::<Vec<_>>()
                                ^~~~~~~~~~
figment_sketch.rs:2:24: 2:43 error: type `core::str::CharSplits<'_, &str>` does not implement any method in scope named `collect`
figment_sketch.rs:2     "1 2 3".split(" ").collect::<Vec<_>>()
                                           ^~~~~~~~~~~~~~~~~~~
```

Where `&str` does not implement `CharEq` and `split()` is defined as `fn split<Sep: CharEq>(&self, s: Sep) -> CharSplit<, Sep>`

Both are correct type errors, however the second error is confusing because its not he actual cause, AND it depends on the other type error existing, which IS the actual cause.
Furthermore, sometimes those two errors are emitted in a different order, making it even more confusing to understand.

The basic reasoning here is "&str does not implement CharEq" and "CharSplits<'_, &str> does not Implement something that provides collect() because the only candidate, Iterator, is only implemented if &str implements CharEq". However, the `split` invocation only typechecks if `&str` implements `CharEq`, and hence any type error on the return type becomes irrelevant, as the type would not be valid to begin with.

If possible, typecheck should construct a dependency graph between the type errors it encounters, so that for every pair of type errors `a, b` it is known if `b` depends on `a`. 

Using this information, the error messages could be improved in a few ways:
1. Only emit all type errors that are not depended on other type errors (suppressing the superfluous errors)
2. Emit all errors, but in the order of their dependencies so that the actual relevant errors are always the first ones.
3. Emit all errors, but mark all that have any dependencies with a note like "This might be a spurious error"
Repository: TypeScript
Issue: Some comments not emitted - upgrade 1.0.1 to  1.3.0
Labels: Bug,Help Wanted

> more file.ts
> 
> ``` javascript
> // test
> var f = ''
> // test #2
> module foo {
>         function bar() { }
> }
> // test #3
> module empty {
> }
> // test #4
> ```
> 
> more file.js
> 
> ``` javascript
> // test
> var f = '';
> // test #2
> var foo;
> (function (foo) {
>     function bar() {
>     }
> })(foo || (foo = {}));
> ```

Looks like comments _after_ a 'block' aren't emitted. Could it be a missing emitTrailingComments(node) ?
Repository: youtube-dl
Issue: Support iltalehti.fi (first? tabloid website of Finland)
Labels: site-support-request

https://en.wikipedia.org/wiki/Iltalehti

$ youtube-dl --verbose http://www.iltalehti.fi/iltvdigi/201411290140927_v4.shtml
[debug] System config: ['--prefer-free-formats']
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.iltalehti.fi/iltvdigi/201411290140927_v4.shtml']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.11.27
[debug] Python version 2.7.5 - Linux-3.17.2-200.fc20.x86_64-x86_64-with-fedora-20-Heisenbug
[debug] exe versions: ffmpeg 2.1.3, ffprobe 2.1.3
[debug] Proxy map: {}
[generic] 201411290140927_v4: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 201411290140927_v4: Downloading webpage
[generic] 201411290140927_v4: Extracting information
ERROR: Unsupported URL: http://www.iltalehti.fi/iltvdigi/201411290140927_v4.shtml; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/bin/youtube-dl/youtube_dl/extractor/generic.py", line 651, in _real_extract
    doc = parse_xml(webpage)
  File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 1411, in parse_xml
    tree = xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1300, in XML
    parser.feed(text)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: syntax error: line 24, column 0
Traceback (most recent call last):
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 553, in extract_info
    ie_result = ie.extract(url)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 240, in extract
    return self._real_extract(url)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1044, in _real_extract
    raise ExtractorError('Unsupported URL: %s' % url)
ExtractorError: Unsupported URL: http://www.iltalehti.fi/iltvdigi/201411290140927_v4.shtml; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Repository: youtube-dl
Issue: www.wienerstadtgespraech.at is not supported
Labels: site-support-request

E.g. http://www.wienerstadtgespraech.at/video/bude/

```
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-F', '--verbose', 'http://www.wienerstadtgespraech.at/video/bude/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.11.23.1
[debug] Python version 2.7.6 - Linux-3.13.0-40-generic-i686-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.16-6, avprobe 9.16-6, rtmpdump 2.4
[debug] Proxy map: {}
[generic] bude: Requesting header
WARNING: Falling back on generic information extractor.
[generic] bude: Downloading webpage
[generic] bude: Extracting information
ERROR: Unsupported URL: http://www.wienerstadtgespraech.at/video/bude/; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
```
Repository: youtube-dl
Issue: [youtube.com] Issue with detecting already downloaded files
Labels: request

Hello,

I noticed that youtube-dl is not able to detect wether a youtube video is already downloaded if it was downloaded as two separated dash streams and merged with avconv and both streams are deleted afterwards.

For example if you download a video with the format 299+141 youtube-dl only checks if there are files called FILENAME.f299.mp4 and FILENAME.f141.m4a and not FILENAME.mp4. This makes it difficult to have a script download whole youtube channels without re-downloading all videos each time.

It would be nice if you could this functionality.
Repository: youtube-dl
Issue: video download from serviziopubblico.it
Labels: site-support-request

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.serviziopubblico.it/puntate/ricchezza-e-nobilta/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.12.03
[debug] Python version 2.7.6 - Darwin-14.0.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.4.4, ffprobe 2.4.4
[debug] Proxy map: {}
[generic] ricchezza-e-nobilta: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ricchezza-e-nobilta: Downloading webpage
[generic] ricchezza-e-nobilta: Extracting information
ERROR: Unsupported URL: http://www.serviziopubblico.it/puntate/ricchezza-e-nobilta/; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 651, in _real_extract
    doc = parse_xml(webpage)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1411, 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: undefined entity: line 23, column 0
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 553, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 241, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1044, in _real_extract
    raise ExtractorError('Unsupported URL: %s' % url)
ExtractorError: Unsupported URL: http://www.serviziopubblico.it/puntate/ricchezza-e-nobilta/; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Repository: rust
Issue: Method lookup goes down the auto-deref rabbit hole when it doesn't need to
Labels: P-low,T-lang,C-bug

Here's a pathological example of two types, each implementing `Deref` on the other:

``` rust
use std::ops::Deref;
use std::rc::Rc;

struct Foo;
struct Bar;

impl Deref<Bar> for Foo {
    fn deref<'a>(&'a self) -> &'a Bar {
        panic!()
    }
}

impl Deref<Foo> for Bar {
    fn deref<'a>(&'a self) -> &'a Foo {
        panic!()
    }
}

fn main() {
    let foo = Rc::new(Foo);
    let foo2 = foo.clone(); 
}
```

```
<anon>:21:20: 21:27 error: reached the recursion limit while auto-dereferencing alloc::rc::Rc<Foo> [E0055]
<anon>:21     let foo2 = foo.clone();
                             ^~~~~~~
```

Even though `Rc<T>` implements `Clone` and thus has a `clone` method, method resolution still tries to look up methods available via deref. This also happens for trying to call inherent methods on a `Foo` directly (without using `Rc`).


## Update:

Modern code on playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2ca8f056b69c0cd8e4ce0365a6356f02

Current error (as of 2024):
```
error[E0055]: reached the recursion limit while auto-dereferencing `Foo`
  --> src/main.rs:23:20
   |
23 |     let foo2 = foo.clone(); 
   |                    ^^^^^ deref recursion limit reached
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`playground`)

For more information about this error, try `rustc --explain E0055`.
```
Repository: youtube-dl
Issue: [site-support-request] Please add support for www.icourse163.org 
Labels: site-support-request

PeterdeMacBook-Pro:~ Lin$ youtube-dl --verbose http://www.icourse163.org/learn/nudt-9004?tid=109001#/learn/content?type=detail&id=200005&cid=216009
[1] 34720
[2] 34721
PeterdeMacBook-Pro:~ Lin$ [debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.icourse163.org/learn/nudt-9004?tid=109001#/learn/content?type=detail']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.12.03
[debug] Python version 2.7.5 - Darwin-13.4.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[generic] content?type=detail: Requesting header
[redirect] Following redirect to http://www.icourse163.org/course/nudt-9004?tid=109001
[generic] nudt-9004?tid=109001: Requesting header
WARNING: Falling back on generic information extractor.
[generic] nudt-9004?tid=109001: Downloading webpage
[generic] nudt-9004?tid=109001: Extracting information
ERROR: Unsupported URL: http://www.icourse163.org/course/nudt-9004?tid=109001; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 651, in _real_extract
    doc = parse_xml(webpage)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1411, 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: undefined entity: line 1, column 16152
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 553, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 241, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1044, in _real_extract
    raise ExtractorError('Unsupported URL: %s' % url)
ExtractorError: Unsupported URL: http://www.icourse163.org/course/nudt-9004?tid=109001; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Repository: youtube-dl
Issue: Add support for nzz.ch
Labels: site-support-request

rudolffischer@BueroPC-RF:~$ youtube-dl "http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209" -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209', '-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.12.06.1
[debug] Python version 2.7.6 - Linux-3.13.0-39-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: rtmpdump 2.4
[debug] Proxy map: {}
[generic] 30-jahre-herzschmerz-aus-saas-fee-1: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 30-jahre-herzschmerz-aus-saas-fee-1: Downloading webpage
[generic] 30-jahre-herzschmerz-aus-saas-fee-1: Extracting information
ERROR: Unsupported URL: http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 651, in _real_extract
    doc = parse_xml(webpage)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1425, in parse_xml
    tree = xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: not well-formed (invalid token): line 2, column 42
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 553, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 241, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1044, in _real_extract
    raise ExtractorError('Unsupported URL: %s' % url)
ExtractorError: Unsupported URL: http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

rudolffischer@BueroPC-RF:~$
Repository: go
Issue: proposal: spec: various changes to :=
Labels: LanguageChange,Proposal,LanguageChangeReview

<pre>This code is subtly wrong:

func f() (err os.Error) {
  v, err := g();
  if err != nil {
    return;
  }
  if v {
    v, err := h();
    if err != nil {
      return;
    }
  }
}

The := in the if statement causes a new err variable that shadows the 
return parameter.

Maybe doing this should be an error. Maybe return parameters should be 
special so that := doesn't ever shadow them. (I like the latter.)</pre>
Repository: go
Issue: cmd/vet: warn about unused struct or array, ignoring assignment to field or element
Labels: help wanted,NeedsFix,Analysis

by **RyanneDolan**:

<pre>What steps will reproduce the problem?

v := new(struct{i int})
v.i = 1

What is the expected output? What do you see instead?

Should get &quot;v declared and not used&quot; error.  Instead, compiles fine.

What is your $GOOS?  $GOARCH?

linux/386

Which revision are you using?  (hg identify)

54392bd03d06 tip

Please provide any additional information below.

The dot operator should mark its left operand as &quot;used&quot; only when it 
appears on the RHS.

a = 1    // 'a' is not marked as used (CORRECT)
v.i = 1  // 'v' is marked as used (WRONG)
a = v.i  // 'v' is marked as used (CORRECT)

This bug is important to fix for consistency, and because it confuses new 
programmers who might expect reference semantics:

for _,v := range arr {v.i = 1} // doesn't do anything

Mentioned here:

<a href="http://groups.google.com/group/golang-">http://groups.google.com/group/golang-</a>
nuts/browse_thread/thread/342fe61c78916496/fbb57f693f1aca72</pre>
Repository: go
Issue: gccgo: compilation fails on Darwin
Labels: ExpertNeeded,help wanted,NeedsInvestigation

by **f.guerrieri**:

<pre>What steps will reproduce the problem?
1. After the fix of <a href="https://golang.org/issue/392">issue #392</a> I updated the svn repo
2. from a clean objdir run configure and make
3. wait for the compilation to fail

What is the expected output? What do you see instead?

go1: warning: internal and protected visibility attributes not supported in
this configuration; ignored
go1: warning: internal and protected visibility attributes not supported in
this configuration; ignored
/var/folders/q1/q1Dz7ZzsFY4lXXLuWTaMgU+++TI/-Tmp-//cc2HM7VZ.s:31:Expected
comma after segment-name
/var/folders/q1/q1Dz7ZzsFY4lXXLuWTaMgU+++TI/-Tmp-//cc2HM7VZ.s:31:Rest of
line ignored. 1st junk character valued 32 ( ).
/var/folders/q1/q1Dz7ZzsFY4lXXLuWTaMgU+++TI/-Tmp-//cc2HM7VZ.s:31:Junk
character 92 (\).
/var/folders/q1/q1Dz7ZzsFY4lXXLuWTaMgU+++TI/-Tmp-//cc2HM7VZ.s:31:Rest of
line ignored. 1st junk character valued 49 (1).
make[3]: *** [runtime/libruntime.a] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libgo] Error 2
make: *** [all] Error 2


What is your $GOOS?  $GOARCH?
darwin, 386

Which revision are you using? 

~/projects/gccgo 506 $ svn info
Path: .
URL: svn://gcc.gnu.org/svn/gcc/branches/gccgo
Repository Root: svn://gcc.gnu.org/svn/gcc
Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4
Revision: 155457
Node Kind: directory
Schedule: normal
Last Changed Author: ian
Last Changed Rev: 155452
Last Changed Date: 2009-12-24 08:51:30 +0100 (Gio, 24 Dic 2009)


Please provide any additional information below.

Tell me if you need the output of make and/or of configure. I get a good
number of warning during the build.</pre>