sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: export_name with unusual utf8 breaks new version script based linker
Labels: A-linkage,A-Unicode,C-feature-request

Unfortunately it looks like the awesome changes in #38117 caused breakage while linking when a weird export name is used (probably due to the version script requiring ascii, or some other esoterica):

```rust
        #[export_name="bad_∢"]
        pub extern fn bad(i: usize) {}
```

**NOTE** haven't checked this particular version, but certain combinations of values cause linker error complaining about invalid chars in version script.
Repository: go
Issue: cmd/compile: some local variables are missing from DWARF
Labels: Debugging,compiler/runtime

```
$ cat a.go
package main

func f(x int) {
        s := "string"
        for i := 0; i < x; i++ {
                println(i, s)
        }
}

func main() {
        f(10)
}
$ go build a.go
$ readelf -w a
...
 <1><1530f>: Abbrev Number: 2 (DW_TAG_subprogram)
    <15310>   DW_AT_name        : main.f        
    <15317>   DW_AT_low_pc      : 0x44cd50      
    <1531f>   DW_AT_high_pc     : 0x44cde4      
    <15327>   DW_AT_external    : 1     
 <2><15328>: Abbrev Number: 4 (DW_TAG_variable)
    <15329>   DW_AT_name        : i     
    <1532b>   DW_AT_location    : 4 byte block: 9c 11 68 22     (DW_OP_call_frame_cfa; DW_OP_consts: -24; DW_OP_plus)
    <15330>   DW_AT_type        : <0x16c15>     
 <2><15338>: Abbrev Number: 5 (DW_TAG_formal_parameter)
    <15339>   DW_AT_name        : x     
    <1533b>   DW_AT_location    : 1 byte block: 9c      (DW_OP_call_frame_cfa)
    <1533d>   DW_AT_type        : <0x16c15>     
 <2><15345>: Abbrev Number: 0
...
```

For function `f`, gc emits debug information about the formal parameter x and the local variable i, but not the local variable s.  In this instance I imagine the reason is that s is effectively constant, but still it would improve the debug view if such variables were included.  And in other programs, many other locals that are truly variable are omitted too.

(Is there a simple explanation for how the compiler currently decides which variables get a DW_TAG_variable record?)
Repository: TypeScript
Issue: Inconsistent errors for non-module entities
Labels: Bug

**TypeScript Version:**  nightly (2.2.0-dev.20161208)

**Code**

```ts
// @Filename: /node_modules/f/index.d.ts
declare const s: Static;
export = s;

interface Static {
    f(): void;
}

// @Filename: /node_modules/lib1/index.d.ts
import { f } from "f";
declare const _f: typeof f;
export = _f;

// @Filename: /node_modules/lib2/index.d.ts
import { f } from "f";
export = f;

// @Filename: /a.ts
import * as lib1 from "lib1";
import * as lib2 from "lib2";
lib1(); lib2();
```

**Expected behavior:**

Both imports are errors.

**Actual behavior:**

Only the second import is an error.
Repository: go
Issue: cmd/vet: duplicate struct field tag check does not handle XMLName 
Labels: help wanted,NeedsFix,Analysis

In Go 1.8beta1 a new check to detect duplicate names used in struct field tags was introduced to `go vet`  ([CL 16704](https://golang.org/cl/16704)). This check produces false positive warnings when XML attributes and the special `XMLName` field name are used:

- When fields are encoded as XML attributes, a warning is produced when an attribute reuses a name previously used for an element.
```
type Foo struct {
    First int `xml:"a"
    NoDup int `xml:"a,attr"` // warning about reuse of "a"
}
```
- When XMLName is used to set the name of the enclosing struct element, it is treated as a regular struct field.
```
type Bar struct {
    XMLName xml.Name `xml:"a"`
    NoDup   int      `xml:"a"` // warning about reuse of "a"
}
```
Both cases are addressed in [CL 34070](https://golang.org/cl/34070).

The original implementation does not take into account the specific behavior of `encoding/xml` regarding the `XMLName` field, and the fix only does so in order to eliminate false positive warnings.

No warning is currently generated for a struct field with `XMLName` field:
```
type Foo struct {
    Bar int `xml:"a"`
    Baz struct {
        XMLName xml.Name `xml:"a"`
    }
}
```
As `go vet` generates a warning about other naming collisions in tags, it should generate a warning in this case as well.

I am currently working on an implementation.

EDIT: added detailed description of original problem addressed by CL 34070
Repository: youtube-dl
Issue: Add support for Adobe Pass Auth TV Provider Cox Communications
Labels: tv-provider-account-needed

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.12.09**
- [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)
- [x] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other


### Description of your *issue*, suggested solution and other information

Would like to request support for Cox Communications as an Adobe Pass MSO option. I can provide a Cox login as needed.
Repository: rust
Issue: Can't step into libstd with gdb on Windows
Labels: A-debuginfo,C-enhancement,T-compiler,O-windows-gnu

```rust
fn main() {
    let mut input = String::new();
```
When I try to step in, I get:
`Source C:\bot\slave\nightly-dist-rustc-win-gnu-64\build\obj\../src/libcollections/string.rs is not available.`

When I set a breakpoint in string.rs and start a debug session, I get the error:
`No source file named d:\dev\gnu\rust\src\libcollections\string.rs.`
Note: this does not mean the file doesn't exist on the filesystem, it means it's not in the debug binary.

# Workaround:
Set `RUST_SRC_PATH=C:\bot\slave\nightly-dist-rustc-win-gnu-64\build\src`

Either:
- Copy/move rust source code to `C:\bot\slave\nightly-dist-rustc-win-gnu-64\build\src`
- Or, as administrator:
```
C:\bot\slave\nightly-dist-rustc-win-gnu-64>mklink build C:\Users\Elahn\.multirust\toolchains\nightly-x86_64-pc-windows-gnu\lib\rustlib
symbolic link created for build <<===>> C:\Users\Elahn\.multirust\toolchains\nightly-x86_64-pc-windows-gnu\lib\rustlib
```
Repository: rust
Issue: issues with ABIs and struct return types
Labels: A-FFI,T-lang,T-compiler,C-bug

With the MSVC x64 ABI, structs are returned in RAX if and only if they are <= 8 bytes in size, *and are effectively a POD type*.  See https://msdn.microsoft.com/en-us/library/7572ztz4.aspx . Unfortunately, I can't figure out how to tell Rust this.  In C++, `sk_sp<T>` has a user-defined constructor, destructor, etc.  In Rust, I couldn't figure out any way to do this.  It's defined as..
```
    #[repr(C)]
    #[derive(Debug, Copy, Clone)]
    pub struct sk_sp<T> {
        pub ptr: *mut T,
    }
```

This causes segfaults because the C++ calling convention isn't upheld.  A temporary workaround is to just add another dummy field, making this type bigger than 8 bytes.  This happens to work in this case since this type is only ever used as a smart pointer return type; params are passed as basic `T*`.

Is there any way to tell `rustc` to treat this type as non-POD when giving it to LLVM?  If not, can such a mechanism be added?
Repository: go
Issue: go/printer: adjust formatting of structs with unexported fields
Labels: NeedsFix

The documentation for [`sql.NamedArg`](https://tip.golang.org/pkg/database/sql/#NamedArg) currently looks like:
```go
type NamedArg struct {

    // Name of the parameter placeholder. If empty the ordinal position in the
    // argument list will be used.
    //
    // Name must omit any symbol prefix.
    Name string

    // Value of the parameter. It may be assigned the same value types as
    // the query arguments.
    Value interface{}
    // contains filtered or unexported fields
}
```

Can we fix the formatting to look nicer? I expect it to be like:
```go
type NamedArg struct {
    // Name of the parameter placeholder. If empty the ordinal position in the
    // argument list will be used.
    //
    // Name must omit any symbol prefix.
    Name string

    // Value of the parameter. It may be assigned the same value types as
    // the query arguments.
    Value interface{}

    // Contains filtered or unexported fields.
}
```

This applies to interfaces as well.
Repository: rust
Issue: llvm/msvc: IsStatement in codeview data is always false
Labels: A-debuginfo,P-low,T-compiler,O-windows-msvc,C-bug

Each entry in the line table FilenameSegments has a 'IsStatement' member. LLVM hardcodes this to 'false', while in MSVC they seem to basically be always 'true'. Changing the default, at the very least, is trivial, but we don't know what this does. None of the Google employees I have asked know (they have mentioned DWARF has something similar which is also unused though), so I'm trying to ask someone at Microsoft.

(cc @michaelwoerister)
Repository: opencv
Issue: cv::cuda::HoughCirclesDetector and cv::HoughCircles do not give the same results
Labels: category: imgproc,category: gpu/cuda (contrib),RFC

Hello,

##### System information (version)
OpenCV 3.1.0, Windows 7 64 bits, Visual Studio 2010, Cuda 8

##### Detailed description
I have noticed that for a similar input, cv::cuda::HoughCirclesDetector and cv::HoughCircles do not give the same results. I am not sure if it is normal, because the documentation does not tell that it should be the case (algorithms may be different).
However, it would be convenient, either to fix it, or explain how to circumvent it by adapting the parameters.

##### Steps to reproduce
Image provided as attachement, and here is a sample code :

```
cv::Mat img = cv::imread("test.png", cv::IMREAD_GRAYSCALE);

  float dp = 1;
  float minDist = 100;
  int cannyThreshold = 122;
  int accThreshold = 50;
  int minRadius = 1;
  int maxRadius = std::max(img.size().width, img.size().height);

  std::vector<cv::Vec3f> cpuCircles;
  cv::HoughCircles(img, cpuCircles, cv::HOUGH_GRADIENT, dp, minDist, cannyThreshold, accThreshold, minRadius, maxRadius);

  std::vector<cv::Vec3f> gpuCircles;
  cv::Ptr<cv::cuda::HoughCirclesDetector> gpuDetector = cv::cuda::createHoughCirclesDetector(dp, minDist, cannyThreshold, accThreshold, minRadius, maxRadius);
  cv::cuda::GpuMat gpuMat;
  cv::cuda::GpuMat gpuResult;
  gpuMat.upload(img);
  gpuDetector->detect(gpuMat, gpuResult);
  gpuCircles.resize(gpuResult.size().width);
  if (!gpuCircles.empty())
    gpuResult.row(0).download(cv::Mat(gpuCircles).reshape(3, 1));

  printf("CPU circles :\n");
  for(std::vector<cv::Vec3f>::const_iterator it = cpuCircles.begin() ; it != cpuCircles.end() ; ++it)
    printf("(%f,%f,%f)", it->val[0], it->val[1], it->val[2]);
  printf("\n");
  printf("GPU circles :\n");
  for(std::vector<cv::Vec3f>::const_iterator it = gpuCircles.begin() ; it != gpuCircles.end() ; ++it)
    printf("(%f,%f,%f)", it->val[0], it->val[1], it->val[2]);
  printf("\n");
```

Output result :
CPU circles :
(165.500000,329.500000,56.925388)
GPU circles :
(165.500000,328.500000,100.000000)(165.500000,328.500000,56.000000)(165.500000,3
28.500000,60.000000)(165.500000,328.500000,65.000000)(165.500000,328.500000,73.0
00000)(165.500000,328.500000,87.000000)(165.500000,328.500000,151.000000)(165.50
0000,328.500000,178.000000)(165.500000,328.500000,180.000000)(165.500000,328.500
000,183.000000)(165.500000,328.500000,185.000000)(165.500000,328.500000,187.0000
00)(165.500000,328.500000,190.000000)(165.500000,328.500000,224.000000)

![test](https://cloud.githubusercontent.com/assets/7251617/21050443/14b9393c-be1b-11e6-8cfe-061b284959b2.png)
Repository: create-react-app
Issue: Run Lint from the command line?
Labels: contributions: up for grabs!,issue: proposal,difficulty: starter

It would be great to be able to type
`eslint` into bash and have it run ESLint just like it was building. As it is, it can't find the config file unless I eject. Is ejection really necessary here?
Repository: material-ui
Issue: [Modal] Disable background scrolling in iOS
Labels: bug 🐛,external dependency,component: modal

Tested dialogs in http://www.material-ui.com/#/components/dialog. 
On desktop Chrome, background scrolling is disabled when dialogs are shown. 
However, it is not disabled in iOS Safari or Chrome.
Repository: vscode
Issue: Add SmartIndent capability
Labels: feature-request,api,editor-autoindent

Visual Studio has an extensibility point called SmartIndent:
https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.text.editor.ismartindent.aspx

This allows a language service to provide the editor, given a line, what the indentation level should be. If you click on a blank line in Visual Studio, it will automatically place the caret at the correct indent level based on the code above. This also works when using the arrow keys to move the caret. Currently in VSCode, it will place the caret at column 0 for blank lines.

This may come hand-in-hand with implementing virtual space (see #13960) as Visual Studio will not insert spaces, but just place the caret at the correct column in virtual space.

One thing to note is that in Visual Studio, when clicking on a blank line, the X position that you click at must be greater than the expected indentation column in order for this to work, otherwise it will place the caret at column 0. With the arrow keys, unless you are at column 0, your caret will always move to the correct indentation level for that blank line.
Repository: go
Issue: x/net/http2: TestTransportFlowControl takes 31 seconds on OpenBSD
Labels: Performance,OS-OpenBSD,NeedsInvestigation

TestTransportFlowControl takes 31 seconds on OpenBSD, but 1.8 seconds on the same hardware on Linux.

Why?

/cc @tombergan who suspects relation to #15899
/cc @mdempsky @4a6f656c
Repository: kubernetes
Issue: Harden addons & system pods
Labels: area/security,kind/cleanup,sig/auth,help wanted,priority/important-longterm,lifecycle/frozen

Our system pods should run using security best practices, both to enhance cluster security and serve as examples of best practices to users. We should audit all our system pod Dockerfiles, and make sure all security features are enabled with custom profiles when possible.

Low hanging fruit:

- Run as non-root (& disallow privilege escalation)
- Run with the default seccomp profile
- ReadOnlyRootFilesystem
- Avoid unnecessary HostPath volumes
- Don't mount service account token (unless required)

More advanced:

- Reduce depednencies in the base image (https://github.com/kubernetes/kubernetes/issues/40248)
- Custom seccomp profile
- Custom AppArmor profile
- Drop unneeded capabilities (e.g. `CAP_NET_RAW`)
- ~~Run with restricted service accounts~~ (done)

/cc @kubernetes/sig-auth @kubernetes/sig-cluster-lifecycle
Repository: create-react-app
Issue: Help wanted Using react-intl
Labels: issue: proposal

>## Note from Maintainers
>
>**Please try the solution in https://github.com/facebookincubator/create-react-app/issues/1227#issuecomment-297604621 and let us know if it works well for you.**

----

Hi all,

I'm following this tutorial https://medium.freecodecamp.com/internationalization-in-react-7264738274a0#.pgfd03878 to use internationalization in my app.
Apparently the integreation is done by modifying the .babelrc file but to do so I have to eject, and I prefer not to.
Is there any way to use React-Intl without ejecting create-react-app?
Repository: TypeScript
Issue: How tsconfig exclude pattern should actually work
Labels: Suggestion,Help Wanted

**TypeScript Version:**  2.1.1 / nightly (2.2.0-dev.201xxxxx)

Say we have a following structure to specially to test `exclude` pattern:

```
/node_modules
  /module/some.ts
nested/
  /node_modules
    /module/some.ts
  /deep-nested/
    /node_modules
      /module/some.ts
```
Will check this using `tsc --listFiles`

How *exclude* patterns work:
1) "node_modules" - will exclude **only** `/node_modules/module/some.ts`
2) "*/node_modules" (the same effect as */node_modules/*") - will exclude **only** `/nested/node_modules/module/some.ts`
3)  "**/node_modules" - will **exclude nothing**
4)  "**/node_modules/*" - will **exclude everything** (also nested, deep-nested)

Some behaviour seem strange to me 
- why in case 3 it excludes nothing (considering case 2 works)? 
- by default (if `exclude` not specified) case 1 will be effective, shouldn't it be 4) which excludes `node_modules` in nested folders as well?
Repository: TypeScript
Issue: Generalize `never` type handling for control flow analysis based type guard
Labels: Suggestion,In Discussion

<!-- 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 -->

I guess there would be some duplicates, but I cannot find it.

**TypeScript Version:**  2.1.14

**Code**

```ts
function throwError(): never {
    throw new Error();
}

let foo: string | undefined;

if (!foo) {
    throwError();
}

foo; // Expected to be `string` instead of `string | undefined`.
```
Repository: rust
Issue: Insufficient normalization
Labels: A-type-system,A-trait-system,T-compiler,C-bug,T-types

The following should work, as far as I know, but unfortunately doesn't. It seems like the type bound on `Bar` is getting ignored when used in `Foo`.

```rust
use ::std::io::Write;

pub trait Foo {
    type FooBaz: Bar;
    
    fn get_bars() -> Box<Iterator<Item = Self::FooBaz>>;
}

pub trait Bar where <Self::BarBaz as ToOwned>::Owned: Write {
    type BarBaz: ToOwned;
}
```

Of course, ideally I would specify the `where` clause on the associated type itself, but this currently isn't possible.
Repository: rust
Issue: Overloaded call inferred to be through Fn when only FnOnce works
Labels: P-medium,A-closures,T-compiler,C-bug

Repro: https://is.gd/AbO8K4

A wrapper around a closure `F` implements `FnOnce`, `FnMut` and `Fn` where `F` does. However, when the wrapper is created with a closure which implements only `FnOnce`, and then the wrapper is called, the compiler expects the closure to implement `FnMut` or `Fn`.

```
rustc 1.15.0-nightly (daf8c1dfc 2016-12-05)
binary: rustc
commit-hash: daf8c1dfce3b448fc581cc319f64632ec22bd0e1
commit-date: 2016-12-05
host: x86_64-apple-darwin
release: 1.15.0-nightly
LLVM version: 3.9
```

cc @eddyb (discussed on IRC)
Repository: neovim
Issue: :undo also undoes mark positioning since previous edit
Labels: bug-vim,needs:vim-patch

- `nvim --version`:
0.1.6
- Vim (version: ) behaves differently?
8.0  -- No, same problem
- Operating system/version:
Arch linux
- Terminal name/version:
XTerm(327)
- `$TERM`:
xterm-256color


### Actual behaviour
With the file `test.txt`
```
Hello there
I have text here simply
So that I can position marks on different lines
That makes the problem more obvious
```

Open with `nvim -u NONE test.txt`
Put a mark on the first line `:1mark d`
Move to the last line `:$`
Make some change to that line `dw`
Put the same mark used before on a different line `:2mark d`
Test that the mark has been moved with `'d`
Undo the previous change `:undo`
Observe that the mark positioning has been undone with `'d`

We end up on the first line of the file, the mark repositioning has been undone with `:undo`.

### Expected behaviour
We should end up on the second line of the file: the mark repositioning should not be affected by the `:undo` command (at least in this case where the position of the marks have nothing to do with the text that was changed).
Repository: TypeScript
Issue: Inference isn't working with constructor that contextually types 'this' with intersections of itself
Labels: Suggestion,Awaiting More Feedback

**TL;DR:** There should be no errors in the below example.

I am trying to model a library that takes an options bag for its constructor, and exposes those properties onto the instance that is eventually produced.

For example, if I wrote

```ts
let instance = new Component({
    methods: {
        hello() { }
        world() {
            this.hello();
        }
    }
});
```

I should be able to write `instance.hello()` or `instance.world()`.

Additionally, since `this` in `world` will be bound to the instance, `this.hello` should be legal and well-typed in the above example.

However, I'm not able to come up with a version of this that works.

```ts
/**
 * Ensures all properties have a `this` param of type `T`.
 */
interface ThisEnforced<T> {
    [prop: string]: (this: T, ...args: any[]) => any;
}

interface ComponentOptions<Methods> {
    methods?: Methods
}

interface Component<Methods extends ThisEnforced<Component<Methods> & Methods>> {
    $methods: Methods;
}

interface ComponentStatic {
    new <Methods extends ThisEnforced<Component<Methods> & Methods>>(options: ComponentOptions<Methods>):
        // Returns...
        Component<Methods> & Methods;
}
declare var Component: ComponentStatic;

let inst = new Component({
    methods: {
        hello() {
            // ...
        },
        world() {
            this.hello;
            //   ~~~~~
            // Error: Property `hello` does not exist on this type.
        }
    },
});

inst.hello;
//   ~~~~~
// Error: Property `hello` does not exist on this type.
```

In the above example, there should be no errors - however, it appears that no inferences are being drawn as a type argument for `Methods`, and both `this.hello` and `inst.hello` are causing errors.
Repository: youtube-dl
Issue: Support bmObject manifests (was: bloomberg-->add normal mp4s to format dict)
Labels: request

I can't find normal mp4s in -F output, only hls and frm
http://www.bloomberg.com/news/videos/2016-12-12/trump-tweets-f-35-jet-program-costs-out-of-control
is this link in format dict?:
http://cdn3.videos.bloomberg.com/m/Njk3MTgyNQ/MjMzMDc4Mw/Rothacker08511212d_440.mp4
Repository: gin
Issue: Response Content-Type Header not set when using c.JSON (while doc says it should)
Labels: bug

I am not sure but it seems this function just do nothing, so when using c.JSON, the Content-Type header is not set.

```
func writeContentType(w http.ResponseWriter, value []string) {
    header := w.Header()
    if val := header["Content-Type"]; len(val) == 0 {
        header["Content-Type"] = value
    }
}
```

I have the problem on my code and I opened this thread on Stackoverflow : http://stackoverflow.com/questions/41109065/golang-gin-gonic-content-type-not-setting-to-application-json-with-c-json
Repository: TypeScript
Issue: Changed behaviour in TS2.1 for Promise<void>
Labels: Suggestion,In Discussion

In typescript 2.0 any promise could be used a promise of type void, this does not seem to be the case in typescript 2.1. 

I couldn't find this listed as a breaking change or any existing tickets so raised this one.

**TypeScript Version:**  2.1.4

**Code**

```ts
function testVoidPromises(promiseA: Promise<void>, promiseB: Promise<void>): Promise<void> {
	return Promise.all([promiseA, promiseB]);
}
```

**Expected behavior:**
This compiles without errors in typescript 2.0

**Actual behavior:**
This fails to compile in typescript 2.1.4 with the following error:
test.ts(2,9): error TS2322: Type 'Promise<[void, void]>' is not assignable to type 'Promise<void>'.
  Type '[void, void]' is not assignable to type 'void'.