sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Tracking issue to stabilize --print target-spec-json
Labels: T-compiler,B-unstable,C-tracking-issue,S-tracking-design-concerns

This issue is meant to track the stabilization of the rustc flag `--print target-spec-json` which will output the currently selected target as a valid target spec that can be loaded with `--target` for only the same version of the compiler that generated it. This explicitly avoids saying that target specs are stable but instead intends to assist target spec users to know that their configuration will work with the current version of the compiler.

ref #38061
Repository: go
Issue: runtime: dlopen/dlsym without CGo
Labels: compiler/runtime

Hello,

Would it be possible to implement dlopen/dlsym functionality to match the Windows DLL loading functionality, for Linux/*nix platforms?

It has been discussed that this is possible with CGo, but that doesn't play as well with a simple build and cross-compile environment as your pure-Go tool-chain does.

Discussed in golang-nuts: https://groups.google.com/forum/#!topic/golang-nuts/QDEczMhlQBU
As I'd like to make this library for SQLite without CGo (https://github.com/iamacarpet/go-sqlite3-win64) cross platform.

They suggested following the code path from one of the libc implementations and re-writing it into Go.
This for the moment is quite a way beyond my capabilities, so I'd really love some help.

Regards,
iamacarpet
Repository: rust
Issue: Identity Result match mapping should optimize to an identity function
Labels: I-slow,C-enhancement,A-codegen,C-optimization

This was isolated by @stjepang in #37939 

This program: [(playground)](https://play.rust-lang.org/?gist=42f328079e316204cc8885e4c7b9ea22&version=nightly&backtrace=0)

```rust
pub fn id_result(a: Result<u64, i64>) -> Result<u64, i64> {
    match a {
        Ok(x) => Ok(x),
        Err(y) => Err(y),
    }
}
```

Should optimize to something that just copies the input to the output, with no conditionals.

Output on `rustc 1.15.0-nightly (daf8c1dfc 2016-12-05)` using `-Copt-level=3 --emit=llvm-ir` is this:

```rust
; ModuleID = 'id_result.cgu-0.rs'
source_filename = "id_result.cgu-0.rs"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"core::result::Result<u64, i64>" = type { i64, [0 x i64], [1 x i64] }

; Function Attrs: norecurse nounwind uwtable
define void @id_result(%"core::result::Result<u64, i64>"* noalias nocapture sret dereferenceable(16), %"core::result::Result<u64, i64>"* noalias nocapture readonly dereferenceable(16)) unnamed_addr #0 {
entry-block:
  %a.sroa.0.0..sroa_idx = getelementptr inbounds %"core::result::Result<u64, i64>", %"core::result::Result<u64, i64>"* %1, i64 0, i32 0
  %a.sroa.0.0.copyload = load i64, i64* %a.sroa.0.0..sroa_idx, align 8
  %a.sroa.4.0..sroa_idx2 = getelementptr inbounds %"core::result::Result<u64, i64>", %"core::result::Result<u64, i64>"* %1, i64 0, i32 2, i64 0
  %a.sroa.4.0.copyload = load i64, i64* %a.sroa.4.0..sroa_idx2, align 8
  %2 = getelementptr inbounds %"core::result::Result<u64, i64>", %"core::result::Result<u64, i64>"* %0, i64 0, i32 0
  %not.switch = icmp ne i64 %a.sroa.0.0.copyload, 0
  %. = zext i1 %not.switch to i64
  store i64 %., i64* %2, align 8
  %3 = getelementptr inbounds %"core::result::Result<u64, i64>", %"core::result::Result<u64, i64>"* %0, i64 0, i32 2, i64 0
  store i64 %a.sroa.4.0.copyload, i64* %3, align 8
  ret void
}

attributes #0 = { norecurse nounwind uwtable }
```
Repository: go
Issue: tools/cmd/present: don't show upcoming slide on the right
Labels: NeedsFix

The present tool shows some of the upcoming slide on the right.

This is particularly bad during some conferences (e.g. GothamGo) with wide screens. It distracts the audience who starts reading the next slide, and it can kill punchlines.

Fix this.

/cc @rsc @broady
Repository: go
Issue: cmd/compile: investigate closure capture issue
Labels: Performance,NeedsInvestigation,compiler/runtime

This change reduces allocations:

https://go-review.googlesource.com/c/33765/4/src/encoding/json/encode.go

Why? Can the compiler be changed instead?

(See test file in same CL for details)

/cc @randall77 @mdempsky @aclements
Repository: opencv
Issue: Any Simple Solution for conflicts with opencv2 ?
Labels: category: build/install,incomplete

I had installed opencv2.4 in /usr/local path, so when I compile opencv3, I encountered this error : 
`incomplete type 'cv::Mat' named in nested name specifier`
This is because the old version of the header file conflicts with the new version. In xcode project created by cmake,  the "Header search paths" setting of all schemes were all similar to the following examples:
```
HEADER_SEARCH_PATHS = (
	/Users/logic/Desktop/opencv/3rdparty/ippicv/unpack/ippicv_osx/include,
	/Users/logic/Desktop/opencv_contrib/build,
	/usr/local/include,
	/usr/local/include/eigen3,
	/Users/logic/Desktop/opencv/modules/imgcodecs/include,
	/Users/logic/Desktop/opencv/modules/videoio/include,
	/Users/logic/Desktop/opencv/modules/core/include,
	/Users/logic/Desktop/opencv/modules/imgproc/include,
	/Users/logic/Desktop/opencv/modules/highgui/include,
);
```
What we need to do is move `/usr/local/include` to the bottom, like this:
```
HEADER_SEARCH_PATHS = (
	/Users/logic/Desktop/opencv/3rdparty/ippicv/unpack/ippicv_osx/include,
	/Users/logic/Desktop/opencv_contrib/build,
	/usr/local/include/eigen3,
	/Users/logic/Desktop/opencv/modules/imgcodecs/include,
	/Users/logic/Desktop/opencv/modules/videoio/include,
	/Users/logic/Desktop/opencv/modules/core/include,
	/Users/logic/Desktop/opencv/modules/imgproc/include,
	/Users/logic/Desktop/opencv/modules/highgui/include,
        /usr/local/include,
);
```
However, the number of schemes in the project was too much, one by one manually move is a terrible experience. After nearly a hundred times the move operation, I almost go crazy.
How to modify the cmake file so that the path  `/usr/local/include`  is always in the final? In my opinion, this is also helpful for improving the applicability of cmake for compilation projects.
Repository: go
Issue: net/http/httptrace: add retry hook
Labels: Documentation,help wanted,NeedsInvestigation,FeatureRequest

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?

`go version go1.7.4 darwin/amd64`

### What operating system and processor architecture are you using (`go env`)?

```
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/benburkert"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7.4/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7.4/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qs/qkt9twmx4qg379d6f8kxl1vm0000gn/T/go-build714318584=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
```

### What did you do?

https://play.golang.org/p/odjH-4qcwa

### What did you expect to see?

The `WroteRequest` hook is called only once for the second request, as it is with the first request, and the program exits normally.

### What did you see instead?

The `WroteRequest` hook is called twice because the transport attempts to write the request to a dead connection then retries with a new connection. Both attempts call the hook. This causes the program to panic because of the send on the already closed channel during the second call.

```
panic: send on closed channel

goroutine 12 [running]:
panic(0x3167c0, 0x1070a648)
	/usr/local/go/src/runtime/panic.go:500 +0x720
main.request.func1(0x0, 0x0)
	/tmp/sandbox194689056/main.go:41 +0x40
net/http.(*Request).write.func1(0x10736780, 0x10716f18)
	/usr/local/go/src/net/http/request.go:452 +0x80
net/http.(*Request).write(0x10740880, 0x440890, 0x10733100, 0x0, 0x10733120, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/request.go:573 +0x10fb
net/http.(*persistConn).writeLoop(0x10746870, 0x0)
	/usr/local/go/src/net/http/transport.go:1644 +0x200
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1058 +0x13a0
```
Repository: go
Issue: x/build: make OpenBSD use a memory filesystem for its workdir
Labels: Performance,OS-OpenBSD,Builders

The OpenBSD builders are some of the slowest.

See if it's faster with a memory filesystem for its workdir.

See https://github.com/golang/go/issues/16951#issuecomment-266288016 for details. Basically just:

```
$ mount -t mfs -o rw,nodev,nosuid,-s=1G /dev/sd0b /tmp
```

Make the buildlet do that on start, like it already tweaks other system stuff.

/cc @mdempsky @4a6f656c
Repository: go
Issue: x/net/trace: support lazy logging in EventLog
Labels: NeedsInvestigation

Trace supports `LazyLog`/`LazyPrintf` which delays rendering of the event message until (and more importantly **if**) it is being displayed. This would be useful for `EventLog` as well, where large messages can cause noticeable slowdown.

I can work on the change if there is agreement on the new API. We can:
 - add `LazyPrintf/LazyErrorf` primitives, or
 - leave the current `Printf/Errorf` interface as is but document that the string is lazily generated.
Repository: TypeScript
Issue: Exact Types
Labels: Suggestion,Awaiting More Feedback

This is a proposal to enable a syntax for exact types. A similar feature can be seen in Flow (https://flowtype.org/docs/objects.html#exact-object-types), but I would like to propose it as a feature used for type literals and not interfaces. The specific syntax I'd propose using is the pipe (which almost mirrors the Flow implementation, but it should surround the type statement), as it's familiar as the mathematical absolute syntax.

```ts
interface User {
  username: string
  email: string
}

const user1: User = { username: 'x', email: 'y', foo: 'z' } //=> Currently errors when `foo` is unknown.
const user2: Exact<User> = { username: 'x', email: 'y', foo: 'z' } //=> Still errors with `foo` unknown.

// Primary use-case is when you're creating a new type from expressions and you'd like the
// language to support you in ensuring no new properties are accidentally being added.
// Especially useful when the assigned together types may come from other parts of the application 
// and the result may be stored somewhere where extra fields are not useful.

const user3: User = Object.assign({ username: 'x' }, { email: 'y', foo: 'z' }) //=> Does not currently error.
const user4: Exact<User> = Object.assign({ username: 'x' }, { email: 'y', foo: 'z' }) //=> Will error as `foo` is unknown.
```

This syntax change would be a new feature and affect new definition files being written if used as a parameter or exposed type. This syntax could be combined with other more complex types.

```ts
type Foo = Exact<X> | Exact<Y>

type Bar = Exact<{ username: string }>

function insertIntoDb (user: Exact<User>) {}
```

Apologies in advance if this is a duplicate, I could not seem to find the right keywords to find any duplicates of this feature.

Edit: This post was updated to use the preferred syntax proposal mentioned at https://github.com/Microsoft/TypeScript/issues/12936#issuecomment-267272371, which encompasses using a simpler syntax with a generic type to enable usage in expressions.
Repository: opencv
Issue: Why cv::resize with CV_8S and CV_32S type was disabled?
Labels: RFC

Using cv::resize function with cv::Mat in `CV_8S` and `CV_32S` type will cause an error:
`opencv/modules/imgproc/src/imgwarp.cpp:3368: error: (-215) func != 0 in function resize`
After review of the source code I found:
```
    static ResizeFunc linear_tab[] =
    {
        resizeGeneric_<
            HResizeLinear<uchar, int, short,
                INTER_RESIZE_COEF_SCALE,
                HResizeLinearVec_8u32s>,
            VResizeLinear<uchar, int, short,
                FixedPtCast<int, uchar, INTER_RESIZE_COEF_BITS*2>,
                VResizeLinearVec_32s8u> >,
        0,
        resizeGeneric_<
            HResizeLinear<ushort, float, float, 1,
                HResizeLinearVec_16u32f>,
            VResizeLinear<ushort, float, float, Cast<float, ushort>,
                VResizeLinearVec_32f16u> >,
        resizeGeneric_<
            HResizeLinear<short, float, float, 1,
                HResizeLinearVec_16s32f>,
            VResizeLinear<short, float, float, Cast<float, short>,
                VResizeLinearVec_32f16s> >,
        0,
        resizeGeneric_<
            HResizeLinear<float, float, float, 1,
                HResizeLinearVec_32f>,
            VResizeLinear<float, float, float, Cast<float, float>,
                VResizeLinearVec_32f> >,
        resizeGeneric_<
            HResizeLinear<double, double, float, 1,
                HResizeNoVec>,
            VResizeLinear<double, double, float, Cast<double, double>,
                VResizeNoVec> >,
        0
    };
```
This array corresponds to the type of Mat:
```
#define CV_8U   0
#define CV_8S   1
#define CV_16U  2
#define CV_16S  3
#define CV_32S  4
#define CV_32F  5
#define CV_64F  6
#define CV_USRTYPE1 7
```
The array value associated with `CV_8S` and `CV_32S` is 0, which led to error.
`cv::resize` is an important function, but the bug seems to exist for a long time, which have any special reasons?
Repository: vscode
Issue: Add support for capture groups in onEnterRules
Labels: feature-request,editor-input,editor-autoindent

From @siegebell in https://github.com/Microsoft/vscode/issues/3088#issuecomment-267236002

---

Before:
```
// comment
//     indented|
```
After:
```
// comment
//     indented
//     |
```

For this case, `onEnterRules` could be extended to support matching groups like find/replace currently does...
```typescript
languages.setLanguageConfiguration(modeID, {
    onEnterRules: [
        { // insert comment on new line while preserving the indent
            beforeText: /^\s*(\/\/\s*)\S.*$/,
            action: { indentAction: IndentAction.None, appendText: '$1' }
        }
    ]
});
```
Repository: TypeScript
Issue: Type Inference in for... in combined with typeof
Labels: Suggestion,Help Wanted

<!-- BUGS: Please use this template. -->


**TypeScript Version:**  2.1.4

The following code gives an error in TS 2.1:
It's not really nice code, but I think it should work never the less :)
```TypeScript
for (var a in this) {
            if (typeof this[a] === "function" && !ko.isObservable(this[a]))
                this[a] = this[a].bind(this);
        }
```


**Expected behavior:**
I would expect this[a] to be typed as this[keyof this] & Function:
```TypeScript
for (var a in this) {
            if (typeof this[a] === "function" && !ko.isObservable(this[a]))
                this[a] =( <this[keyof this] & Function> this[a]).bind(this);
        }
```
**Actual behavior:**
It gives an error, as of TS 2.1, it worked in TS 2.0 (because mapped types did not exist, this[a] was typed as any)
Repository: youtube-dl
Issue: daserste.ndr.de unsupported
Labels: site-support-request

I see ndr is supported via ndr.py, so maybe it is just the hostname that needs to be included
(daserste.ndr.de instead of www.ndr.de)

```
$ youtube-dl http://daserste.ndr.de/inas_nacht/videos/Inas-Nacht-mit-Heinz-Strunk,inasnacht4682.html
[generic] Inas-Nacht-mit-Heinz-Strunk,inasnacht4682: Requesting header
WARNING: Falling back on generic information extractor.
[generic] Inas-Nacht-mit-Heinz-Strunk,inasnacht4682: Downloading webpage
[generic] Inas-Nacht-mit-Heinz-Strunk,inasnacht4682: Extracting information
ERROR: Unsupported URL: http://daserste.ndr.de/inas_nacht/videos/Inas-Nacht-mit-Heinz-Strunk,inasnacht4682.html
```
Repository: flutter
Issue: `flutter analyze` should run `pub get` in directories it decides it is scanning if they contain pubspec.yaml files
Labels: tool,P2,team-tool,triaged-tool

If you run `flutter analyze` and it decides to analyze multiple directories containing multiple packages such that it will generate a big joint `.packages`, then we should run `pub get` in each of those packages as necessary (just as we would if we ran `flutter analyze` in that package directly).
Repository: go
Issue: x/net/http2: make Transport send GOAWAY?
Labels: help wanted,NeedsFix

We previously debated whether the Transport should send GOAWAY frames on shutdown, but couldn't think of a useful reason why.

The spec does say:

> When either endpoint chooses to close the transport-layer TCP connection, the terminating endpoint SHOULD first send a GOAWAY (Section 6.8) frame so that both endpoints can reliably determine whether previously sent frames have been processed and gracefully complete or terminate any necessary remaining tasks.

Or code is like:

```go
        // TODO: do clients send GOAWAY too? maybe? Just Close:                                                                                           
        cc.tconn.Close()
```

But I'm still not quite sure why a server would care.

/cc @mnot @tombergan
Repository: go
Issue: x/net/http2: Transport should handle 421 
Labels: help wanted

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?


### What operating system and processor architecture are you using (`go env`)?


### What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.


### What did you expect to see?


### What did you see instead?
Repository: go
Issue: cmd/go: applying swig's %go_import directive to non-builtin packages is not supported
Labels: NeedsInvestigation

One of swig's useful language-specific directives for the Go language is `%go_import`.  It allows defining typemaps and wrappers (with `%insert(go_wrapper)`), among others, using symbols defined in a user-defined package found under $GOPATH/src.  However, the go build system only allows `%go_import` of builtin packages.  User-defined packages are not accessible in the temporary workspace which go creates to build a package that uses swig interface files.

The following, while not really interfacing with any C/C++ library, demonstrates this problem.  It's using go1.7 on darwin/amd64.  But this problem is seen on all platforms.

The first attempt at making and executing the main package at swig-sandbox/import relies on the go build system's support for swig.  It fails.  The second attempt is made after invoking swig manually (removing *.swigcxx to prevent the go build system to also try to invoke swig).  It succeeds, obviously.

```
bash-3.2$ [ $GOPATH/src/swig-sandbox/import == $PWD ] && echo 'We are at swig-sandbox/import in Go sources directory'
We are at swig-sandbox/import in Go sources directory
bash-3.2$ ls -R
.:
main.i  main.swigcxx  mytime  printNextYear.go

./mytime:
consts.go
bash-3.2$ head *.{i,swigcxx,go} */*.go
==> main.i <==
%go_import("fmt", c "swig-sandbox/import/mytime")

%insert(go_wrapper) %{
  func myprint(a ...interface{}) {
    fmt.Print("[myprint] ")
    fmt.Println(a...)
  }
 func nextYear() uint {
   return c.Year + 1
 }

==> main.swigcxx <==
%include "main.i"

==> printNextYear.go <==
```
```go
package main

func main() {
	myprint("Next year is:", nextYear())
}
```
```
==> mytime/consts.go <==
```
```go
package consts

const Year uint = 2016
```
```
bash-3.2$ go build -o main && ./main
# swig-sandbox/import
/tmp/go-build726259823/swig-sandbox/import/_obj/main.go:40: can't find import: "swig-sandbox/import/mytime"
bash-3.2$ rm main.swigcxx 
bash-3.2$ swig -go -cgo -intgosize 64 -module main main.i
bash-3.2$ go build -o main && ./main
[myprint] Next year is: 2017
bash-3.2$
```

As can be seen, the workaround is to not use *.swigcxx files and instead do a two-step compilation -- explicitly invoke swig and then use go build.  But it's desirable to have the go build system to call swig.  Note also that `%go_import` of `"fmt"` was fine.  It was the `%go_import` of `"swig-sandbox/import/mytime"`, a user-defined package, that was problematic.
Repository: neovim
Issue: Feature request: file complete without user to remember where the asterisk should be
Labels: enhancement

The fishshell https://fishshell.com/ has a really nice feature IMO, your can type any part of file and hit `<tab>` to complete. In vim and other shells I know, user have to type exactly the leading part of file name to complete, that could be hard sometimes, for example, a directoy with many files starts with `controller-` or similar.

Looks like a easy job.
Repository: youtube-dl
Issue: Search by Filter
Labels: request

How to search any videos based on FEATURES filter such as 4K, Creative commons or 3D? i can see youtube-dl has ability to sort by upload date, min view etc but  i can't find for features. e.g : ytsearch:Chritsmas videos :creative commons
Repository: three.js
Issue: PointsMaterial's sizeAttenuation property should default to false
Labels: Suggestion

#### Description of the problem 
The default [PointsMaterial](https://threejs.org/docs/api/materials/PointsMaterial.html) sets `sizeAttenuation` to `true`. This produces unexpected results as drawing a _point_ should theoretically produce a single pixel location (unless `size` is set larger). This is how _lines_ (another primitive) work - why are points different?

Further, this default _really_ breaks when used with an Orthographic Camera. In theory, the `sizeAttenuation` property was added to allow points to feel somewhat more like "good citizens" when paired with a Perspective Camera. When paired with an Orthographic Camera, points become very bad citizens. On a personal note, this lead to a bunch of lost time trying to track down what was going on in a project - at one point the entire drawing surface was covered by attenuated "points" because they happened to be too close to the camera.

At the very least, the documentation doesn't outline _how_ the points attenuate in size: at what distance should we expect size to be 1:1? How quickly does size attenuate?

This is somewhat a continuation of #7517.

#### Three.js version

- [ ] Dev
- [x] r83
- [ ] ...

#### Browser

- [x] All of them
- [ ] Chrome
- [ ] Firefox
- [ ] Internet Explorer

#### OS

- [x] All of them
- [ ] Windows
- [ ] Linux
- [ ] Android
- [ ] IOS

#### Hardware Requirements (graphics card, VR Device, ...)
Nothing specific.
Repository: go
Issue: runtime: refactor assembly for C calls in signal handlers
Labels: compiler/runtime

On [change 34501](https://go-review.googlesource.com/#/c/34501/), @minux notes:
> It seems the complexity of runtime.sigtramp has got out of control. (sigtramp used to be only called by kernel, now with signal forwarding, it can also be called by foreign C code)
>
> Perhaps we need to separate the concern of saving callee saved register to another function, possbily reusing the existing runtime/cgo crosscall function?

@ianlancetaylor replies:
> Signal forwarding applied as soon as we started thinking about combining Go and C code together in the same program.  We're just continuing to grapple with it.
>
> Unifying C ABI register saving sounds like a good idea if we can figure out how to do it.
Repository: javascript
Issue: Braces with single-line if blocks
Labels: question

In point [16.1](https://github.com/airbnb/javascript/tree/master/#functions) you state the two block possibilities when it comes to in-line if blocks. These are:

```
if (test) return false;

if (test) {
  return false;
}
```

Is there any preference to use one or the other?

Personally, I use the first one only at the top of a function, when I have to verify trivial preconditions. (i.e. `if (!name) return 'Name is required';`.