sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/mobile/exp/audio: Windows support
Labels: OS-Windows,mobile

# The problem

The [current al implementation](https://github.com/golang/mobile/tree/master/exp/audio/al) does not allow for Windows builds.  A while ago I posted [this](https://groups.google.com/forum/#!topic/golang-nuts/mfaRRJc1-gI) on the forums. 
# The fix

This feels a bit hacky, but I managed to update the C-import stuff to this (on both the `al_notandroid.go` and `alc_notandroid.go` file, and updating all build tags to include Windows):

``` C
#cgo darwin   CFLAGS:  -DGOOS_darwin
#cgo linux    CFLAGS:  -DGOOS_linux
#cgo windows  CFLAGS:  -DGOOS_windows -I E:/src/golang.org/x/mobile/exp/audio/al/include/
#cgo darwin         LDFLAGS: -framework OpenAL
#cgo linux          LDFLAGS: -lopenal
#cgo windows,386    LDFLAGS: E:/src/golang.org/x/mobile/exp/audio/al/bin/Win32/soft_oal.dll
#cgo windows,amd64  LDFLAGS: E:/src/golang.org/x/mobile/exp/audio/al/bin/Win64/soft_oal.dll

#ifdef GOOS_darwin
#include <stdlib.h>
#include <OpenAL/alc.h>
#endif

#ifdef GOOS_linux
#include <stdlib.h>
#include <AL/alc.h>
#endif

#ifdef GOOS_windows
#include <stdlib.h>
#include <AL/alc.h>
#endif
```
# The caveats
1. I have no idea how to replace `E:` by something like `$GOPATH` (since `GOPATH == E:`), maybe someone knows? 
2. Those `bin` and `include` directories that are expected to be within the directory, are those from the binaries from https://github.com/kcat/openal-soft . Not sure if we can safely redistribute those? (licensing etc.) 
3. If Go cannot redistribute those files (I dunno, could be the case), would there be _any_ way to allow people to do this themselves? Without having to fork the al implementation? Or could we reference some kind of path and expect Windows-developers to put those files there? 

I don't need any attribution, therefore there's no PR associated, but it would be nice to let this "fix" be part of Go, instead of having to fork it.
Repository: kubernetes
Issue: Scheduling of pods with RWO volumes
Labels: priority/important-soon,sig/scheduling,sig/storage,kind/feature,lifecycle/frozen

Since RWO volumes work only on a single host, wouldn't it be reasonable for the scheduler to schedule pods for a {RC,RS,D,etc.} that uses such a volume on the same node? Otherwise, pods that land on different nodes are essentially blocked. Deployments are the most affected since you can have a Deployment with just one pod and maxSurge=1 (which is actually the default currently) and with a RWO volume, it will block.

@kubernetes/sig-scheduling @kubernetes/deployment @kubernetes/sig-storage
Repository: youtube-dl
Issue: Site support request: ComedyCentral UK
Labels: site-support-request,geo-restricted

Example URL: http://www.comedycentral.co.uk/friends/articles/sitcom-cameos.

The site is geo-restricted to the UK.
Repository: go
Issue: cmd/vet: check for duplicate cases in switches
Labels: Analysis

Consider:

``` go
type A [1]int

func f(x A) {
    switch x {
    case A([1]int{1}):
    case A([1]int{1}):
    }
}
```

This is almost certainly a typo; the second case is unreachable. The compiler may reject duplicate constant cases in expression switches, but not e.g. `nil` or composite literals containing constants. (See #15896 for discussion.) Perhaps cmd/vet should step in to help catch these likely bugs. This issue is a reminder to investigate.
Repository: go
Issue: cmd/vet: printf findings can be arbitrarily long
Labels: NeedsDecision,Analysis

When vet reports a printf problem such as this one:

```
fmt.Printf("%d", func() { ... }) // arg in printf call is a function value, not a function call
```

it prints out the entire body of the function literal, which can be quite long.
For example, given the program at https://play.golang.org/p/f8W0zpISww, vet prints

```
% go vet ~/a.go
../../../../a.go:6: arg func() {
        println("blah")
        println("blah")
        println("blah")
... dozens more lines...
        println("blah")
        println("blah")
        println("blah")
} in printf call is a function value, not a function call
```

Perhaps it should not print the function body at all.
Repository: rust
Issue: Argument names in foreign functions, function types and trait methods are not resolved
Labels: A-resolve,T-compiler,C-bug

Arguments in foreign functions, function types and traits are pattern bindings like all other function arguments and supposedly they should be resolved in the same way, however they are not resolved at all.
It doesn't make _much_ difference because these bindings can't be used in function bodies, however it makes _some_ difference, for example foreign functions can reuse constant names for their arguments, while other functions can't (whether it's good or bad is a separate question).

Accidentally, some function arguments being unresolved also affect lints like `non_snake_case`, such lints don't report warnings for them. This may be reasonable for foreign functions though, because such functions may follow foreign naming conventions. If this lint is "fixed" it may affects crates like `winapi` (cc @retep998). This is not so reasonable for trait methods however.

Examples:

``` rust
#![allow(dead_code, unused_variables)]

const SOD: u8 = 0;
const SOB: u8 = 0;
const MOD: u8 = 0;
const MDC: u8 = 0;
const DRI: u8 = 0;

// warning: variable `SOD` should have a snake case name
// error: let variables cannot be named the same as const variables
fn f(SOD: u8) {}

trait Tr {
    // warning: variable `SOB` should have a snake case name
    // error: let variables cannot be named the same as const variables
    fn g(SOB: u8) {}

    // No warnings, no errors
    fn h(MOD: u8);
}

// No warnings, no errors
type A = fn(MDC: u8);

extern "C" {
    // No warnings, no errors
    fn k(DRI: u8);
}

fn main() {
}
```
Repository: youtube-dl
Issue: [Python3][Tumblr] Infinite redirect when using proxy feature
Labels: cant-reproduce

`version 2016.05.30.2`

`youtube-dl -j "http://sythnmsvntn.tumblr.com/post/145116566731/little-kid-dancing-to-seventeens-pretty-u-this-is`

**WITHOUT proxy:**

Request 1:

> GET /post/145116566731/

(why is youtube-dl removing part of the url here?)

Response:

> HTTP/1.1 301 Moved Permanently
> Location: http://sythnmsvntn.tumblr.com/post/145116566731/little-kid-dancing-to-seventeens-pretty-u-this-is#_=_

Request 2:

> GET /post/145116566731/little-kid-dancing-to-seventeens-pretty-u-this-is HTTP/1.1

OK, page is now sent and youtube-dl handles it correctly.

**WITH proxy:**

Same as before, but request 2 looks like this:

> GET http://sythnmsvntn.tumblr.com/post/145116566731/little-kid-dancing-to-seventeens-pretty-u-this-is#_=_

Notice the not removed `#_=_` at the end. This causes tumblr to respond with yet another 301 redirect (as in first response) resulting in infinite loop:

> ERROR: Unable to download webpage: HTTP Error 301: The HTTP server returned a redirect error that would lead to an infinite loop.
Repository: rust
Issue: The `meta` fragment specifier is considered as a single TT.
Labels: A-macros,C-bug

At various locations of the FOLLOW sets analysis for `macro_rules!`, `meta` is considered as always matching a single TT. This is not the case: `ident = ...` and `ident(...)` are both valid `meta`s.

That being said the only consequence of this is that `meta` can be followed by anything, and I think it's not unreasonable to assume that the syntax of `meta` will not be expanded in the future... But still, we might want to check that.
Repository: rust
Issue: [rustdoc] Rustdoc should prevent long file names.
Labels: T-rustdoc,C-feature-request

I'm not actually certain if handling absurdly long method names should be a goal for rustdoc, but currently they produce filenames that are too long for the filesystem. I discovered this while working with [opencv-rust](https://github.com/kali/opencv-rust) which auto generates c-wrapper methods for opencv, some of which have very long names. A possible proposed solution was that rustdoc abbreviate filenames, I suggest that a good solution might be splitting the name into 255 char chunks.

Eg the problem file: `/home/benjamin/dev/opencv-rust/target/doc/opencv/sys/fn.cv_calib3d_cv_solvePnPRansac_InputArray_objectPoints_InputArray_imagePoints_InputArray_cameraMatrix_InputArray_distCoeffs_OutputArray_rvec_OutputArray_tvec_bool_useExtrinsicGuess_int_iterationsCount_float_reprojectionError_int_minInliersCount_OutputArray_inliers_int_flags.html`

Would become something like: `/home/benjamin/dev/opencv-rust/target/doc/opencv/sys/fn.cv_calib3d_cv_solvePnPRansac_InputArray_objectPoints_InputArray_imagePoints_InputArray_cameraMatrix_InputArray_distCoeffs_OutputArray_rvec_OutputArray_tvec_bool_useExtrinsicGuess_int_iterationsCount_float_reprojectionErr/or_int_minInliersCount_OutputArray_inliers_int_flags.html`

Previous discussion on the rust subreddit: https://www.reddit.com/r/rust/comments/4m29tk/solution_to_file_name_too_long_for_cargo_doc/
Repository: youtube-dl
Issue: Add Support for Hubspot Academy
Labels: bug

I ran the update command, but it updated to 2016.5.30.2.
- [X] I've **verified** and **I assure** that I'm running youtube-dl **2016.5.30.2**
- [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
- [X] Bug report (encountered problems with youtube-dl)
- [X] Site support request (request for adding support for a new site)

```
➜  ~ youtube-dl -v http://academy.hubspot.com/ic16/essentials-of-an-effective-inbound-strategy
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://academy.hubspot.com/ic16/essentials-of-an-effective-inbound-strategy']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.05.30.2
[debug] Python version 2.7.10 - Linux-4.2.0-36-generic-x86_64-with-Ubuntu-15.10-wily
[debug] exe versions: ffmpeg 2.7.6-0ubuntu0.15.10.1, ffprobe 2.7.6-0ubuntu0.15.10.1
[debug] Proxy map: {}
[generic] essentials-of-an-effective-inbound-strategy: Requesting header
WARNING: Falling back on generic information extractor.
[generic] essentials-of-an-effective-inbound-strategy: Downloading webpage
[generic] essentials-of-an-effective-inbound-strategy: Extracting information
[Wistia] 87h8tffa9w: Downloading JSON metadata
ERROR: Error while getting the playlist
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 676, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 341, in extract
    return self._real_extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/wistia.py", line 49, in _real_extract
    'Error while getting the playlist', expected=True)
ExtractorError: Error while getting the playlist

```

I've tested this in 2 countries...
Repository: go
Issue: reflect: StructOf doesn't generate wrapper methods for embedded fields
Labels: NeedsFix,compiler/runtime

```
% go version
go version devel +bbd1dcd Wed Jun 1 21:32:46 2016 +0000 linux/amd64
% cat ~/a.go
package main

import (
        "bytes"
        "io"
        "reflect"
        "sync"
)

func main() {
        t := reflect.StructOf([]reflect.StructField{
                {Type: reflect.TypeOf(sync.Mutex{}), Anonymous: true},
                {Type: reflect.TypeOf(bytes.Buffer{}), Anonymous: true},
        })
        x := reflect.New(t).Interface()
        _ = x.(io.Writer)
}

% go run ~/a.go
panic: interface conversion: *truct { sync.Mutex; bytes.Buffer } is not io.Writer: missing method Write
```

I expected that x would have generated wrapper methods for Mutex.Lock, etc.

Interestingly, adding this declaration inside func main (not at package level):

```
var _ interface{} = new(struct {
      sync.Mutex
      bytes.Buffer
})
```

causes the program to succeed.  Presumably it causes the compiler to generate the correct type information, which `reflect.StructOf` then finds.
Repository: go
Issue: cmd/compile: SSA performance regression due to array zeroing
Labels: Performance,NeedsFix,compiler/runtime

go version devel +bbd1dcd Wed Jun 1 21:32:46 2016 +0000 darwin/amd64

https://github.com/hydroflame/go1.7bench
This very simple program take 2 4 element vector and performs component wise addition.
If you run the benchmark with SSA and without you will see that it is much faster without SSA.

```
$ go test -run NONE -bench . -gcflags -ssa=0 > nossa.txt
testing: warning: no tests to run
$ go test -run NONE -bench . -gcflags -ssa=1 > ssa.txt
testing: warning: no tests to run
$ benchcmp nossa.txt ssa.txt 
benchmark          old ns/op     new ns/op     delta
BenchmarkAdd-4     2.45          11.4          +365.31%
```

I expect that the binary generated with SSA would be at least the same speed as the old one.

This particular example is extracted from one of my bigger library: `github.com/luxengine/glm`
for more example of SSA bad performance run benchmarks in
- github.com/luxengine/glm
- github.com/luxengine/glm/geo
Repository: youtube-dl
Issue: Show the title of excluded videos (was: How To Use The "forcetitle" Option)
Labels: request

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.06.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)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [x] Question
- [ ] Other

---
### Description of your _issue_, suggested solution and other information

I'm testing some searches with youtube-dl using the --dateafter option.  Whenever a video is excluded due to the --dateafter option it gives the generic message "upload date is not in range" but doesn't include the title of the video or any other information.  Is there a way to force it to print the title of the video that was excluded?  I tried --forcetitle that I thought I found in the source code on the github page https://github.com/rg3/youtube-dl/blob/master/youtube_dl/YoutubeDL.py , but that didn't work.

Thank you!
Repository: rust
Issue: Immutable borrow as argument for mutable borrow does not compile
Labels: A-borrow-checker,T-compiler,C-bug

I have the following piece of code which I expect to work but the borrow checker does not agree:

```
fn main() {
    let mut data = vec![1; 100];
    {
        let (left, right) = data.split_at_mut(data.len() / 2);
    }
    println!("{:?}", data);
}
```

Please note that the extra scope is in principle not related to the issue I'm describing, I'm just doing it such that I can use the `println!` macro to ensure that the compiler does not optimize the code away because I'm not using it thereafter. (I'm new to Rust so I don't know the exact rules)

The error I get is the following:

```
main.rs:4:47: 4:51 error: cannot borrow `data` as immutable because it is also borrowed as mutable [E0502]
main.rs:4         let (left, right) = data.split_at_mut(data.len() / 2);
                                                        ^~~~
main.rs:4:29: 4:33 note: previous borrow of `data` occurs here; the mutable borrow prevents subsequent moves, borrows, or modification of `data` until the borrow ends
main.rs:4         let (left, right) = data.split_at_mut(data.len() / 2);
                                      ^~~~
main.rs:5:6: 5:6 note: previous borrow ends here
main.rs:3     {
main.rs:4         let (left, right) = data.split_at_mut(data.len() / 2);
main.rs:5     }
              ^
```
However what I would expect is the following:
1. `data.len()` takes an immutable borrow.
2. `data.len()` returns the immutable borrow and divides the obtained `u32` by `2`.
3. `data.split_at_mut()` takes a mutable borrow.

It seems like the borrow checker currently evaluates the statement in the wrong order.

The following workaround is available, but it feels like this is a place where we should not have the need to (rightfully) fight the borrow checker.

```
fn main() {
    let mut data = vec![1; 100];
    {
        let len = data.len();
        let (left, right) = data.split_at_mut(len / 2);
    }
    println!("{:?}", data);
}
```
Repository: react
Issue: Changing state in onFocus and onChange for a select multiple element does not work in Firefox
Labels: Type: Bug,Component: DOM

I want to use a controlled `<select multiple={true} />` component in React. In addition to the value I also want to keep the focused state of the select in the state. To do this, I update the state with `setState` in the `onChange`, `onFocus` and `onBlur` event handlers. Unfortunately there is an issue in Firefox: Firefox will only update the value on a change event after the select has gained focus. This means that a user has to click twice on the select element to change its value when it does not have focus. I would expect the select to gain focus and change the value at the same click.

I created a jsFiddle to demonstrate the prolem: [React select multiple issue in Firefox demonstration](https://jsfiddle.net/fugf1kw9/2/)

I only see this problem in Firefox and with select multiple. In IE and Chrome it is working as expected, and in Firefox it is working as expected for other form elements (simple select, checkbox, radio, text input, textarea).

My environment:
- Firefox 46.0.1 under Win7 x64
- React 15.1.0
Repository: youtube-dl
Issue: add support for volafile.io - rip entire room / all movie files
Labels: site-support-request

example URL

`https://volafile.io/r/08wJOs`
warning URL only temporary and will expire
Repository: go
Issue: runtime: main_init_done can be implemented more efficiently
Labels: Performance,NeedsFix,compiler/runtime

A C thread in a -buildmode={c-archive,c-shared} may call back into Go code before Go initialization is complete, in which case it must wait.  It currently waits using a channel called `main_init_done`.  In the review of https://golang.org/cl/23610 Dmitry points out that this can be done more efficiently.  The callback will necessarily go through `runtime·needm`.  We can arrange for `needm` to wait for initialization to be complete.  It already waits for a new `M` to be created.

In fact, `needm` already has a race condition.  It crashes if `cgoHasExtraM` is not true.  That global variable is set to true early in Go initialization, but that initialization will be running in a separate thread.  If a C thread is fast enough in calling Go, the program will crash because Go initialization has not yet reached the required point.  We should avoid crashing if `islibrary || isarchive`; we should simply wait.
Repository: rust
Issue: Provide mechanism for documenting known bugs or shortcomings
Labels: T-rustdoc,C-feature-request

Go has a [fairly poorly documented](https://github.com/golang/go/issues/5060) feature that lines marked with `BUG` are shown under "Bugs" in documentation for a package. The keywords can be configured using the (again poorly documented) `-notes` argument to [`godoc`](https://godoc.org/golang.org/x/tools/cmd/godoc). This can be used to document known bugs and shortcomings of a package alongside the package's main documentation. For examples, see the bottom of [`net`](https://golang.org/pkg/net/), [`sync/atomic`](https://golang.org/pkg/sync/atomic/), or [`encoding/xml`](https://golang.org/pkg/encoding/xml/). 

Having a similar feature in `rustdoc` would be really useful, as it establishes a standard way of communicating known problems, which could prevent unnecessary bug reports, and encourage dialogue about known limitations. If it were also possible to link to the discussion for a given feature or bug, that would make it even better.

Thoughts?
Repository: youtube-dl
Issue: Blogspot falls back on generic 
Labels: site-support-request

### 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

```
youtube-dl --ignore-config --v http://vida420armonia.blogspot.com/2015/02/blog-post_18.html
```

```
[debug] System config: []
[debug] User config: ['--download-archive', '~/.ytdlarchive', '--retries', '100', '--no-overwrites', '--call-home', '--continue', '--write-info-json', '--write-description', '--write-thumbnail', '--write-annotations', '--all-subs', '--write-sub', '--add-metadata', '-f', 'bestvideo+bestaudio/best', '--merge-output-format', 'mkv', '--prefer-ffmpeg', '--embed-thumbnail']
[debug] Command-line args: ['-v', 'http://vida420armonia.blogspot.com/2015/02/blog-post_18.html']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.05.30.2
[debug] Python version 3.5.1+ - Linux-4.4.0-22-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.6-1ubuntu2, ffprobe 2.8.6-1ubuntu2, rtmpdump 2.4
[debug] Proxy map: {}
[debug] Public IP address: 172.58.169.123
WARNING: You are using an outdated version (newest version: 2016.06.02)! See https://yt-dl.org/update if you need help updating.
[generic] blog-post_18: Requesting header
WARNING: Falling back on generic information extractor.
[generic] blog-post_18: Downloading webpage
[generic] blog-post_18: Extracting information
ERROR: Unsupported URL: http://vida420armonia.blogspot.com/2015/02/blog-post_18.html
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 676, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/common.py", line 341, in extract
    return self._real_extract(url)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/generic.py", line 2134, in _real_extract
    raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: http://vida420armonia.blogspot.com/2015/02/blog-post_18.html
```