sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: create-react-app
Issue: [ModuleScopePlugin] problem with nested package.json in linked dependencies
Labels: issue: needs investigation

### Is this a bug report?

Yes

### Did you try recovering your dependencies?
### Which terms did you search for in User Guide?
### Environment

^ irrelevant sections

### Steps to Reproduce

Repro case here - https://github.com/Andarist/module-scope-plugin-repro . The repository has a postinstall script which automatically links local package (which is in repro repository here, but in my real world use case it is not).

I've tried to reproduce the issue with exact same package (same structure) installed with a package manager, but it's working properly then. So it seems that it has to do something with the package being linked.

The structure (nested package.json reaching for `../dist/*` - relative to its location) is unusual, but is correct. It's allowed by webpack (as it's allowed by node.js - https://nodejs.org/api/modules.html#modules_all_together) and should work here.

Also - the normal main/module from the root of the package are working "correctly", but I believe it's kinda by accident because it comes to a situation when the "regular" entry is requested with such values (coming from scope, webpack request and similar)
```js
{
  "descriptionFileRoot": "/linked_packages/package_name",
  "contextIssuer": "/application/src/index.js",
  "innerRequest": "./dist/package_entry.esm.js",
  "requestFullPath": "/application/src/dist/package_entry.esm.js"
}
```

`requestFullPath` is completely wrong here, such file doesn't exist and is not requested, but when relative paths - from app source to the requested path are compared the check reports back everything is OK as path of this non-existent file lies witin app source boundary.

Let's compare it to same values for the "request" causing trouble:
```js
{
  "descriptionFileRoot": "/linked_packages/package_name",
  "contextIssuer": "/application/src/index.js",
  "innerRequest": "../dist/alternative_package_entry.esm.js",
  "requestFullPath": "/application/dist/alternative_package_entry.esm.js"
}
```

`requestFullPath` is again completely wrong and it doesn't exist on the filesystem, but this time it falls out of the source directory and thus fails the check and causes this bug.

### Expected Behavior

The requested file should be properly recognized as located outside of the source directory (it's in node_modules!)


### Actual Behavior

Can't import it as it's being reported as being outside of the source directory.


### Reproducible Demo

given in "Steps to reproduce" section
Repository: rust
Issue: rustc --print file-names wrongly prints .rlib for --emit=metadata 
Labels: A-driver,T-compiler,C-bug

For sccache to cache rustc builds it uses `rustc --print file-names` to figure out which files get emitted so it cache them for later. For `--emit metadata` builds it appears that `rustc` prints that it would emit a `.rlib` file which seems to be false, only `.rmeta` files get emitted.

Trying to find out where this happens but so far no luck (it might actually be correct behavior and the fix should be in sccache).

See https://github.com/mozilla/sccache/issues/301#issuecomment-427412157
Repository: rust
Issue: Using types like i1, u24, or other nonstandard integer sizes.
Labels: T-lang,needs-rfc

LLVM itself supports arbitrary bitlength integers, however Rust does not. This would be useful for some less common, but still fairly normal cases, like 24-bit integers for emulating CPUs like the MC68000 (Some models use 24-bit address busses instead of 32-bit), or for memory constrained systems where you need all the space you can get, and as such packed bitfields are the best for storing data.
Repository: angular
Issue: preserveWhitespaces: false alters expressions in templates
Labels: type: bug/fix,freq1: low,area: compiler,state: confirmed,core: basic template syntax,core: binding & interpolation,design complexity: major,P3,compiler: parser

Setting `preserveWhitespaces: false` has an unexpected side effect that whitespace in interpolated bindings is also affected. Ordinarily there is no harm in stripping whitespace inside expressions, but _string literals_ within those expressions are also affected. This means that `preserveWhitespaces` alters the semantics of a template beyond whether extra whitespace is rendered.

Example:

```html
{{'    '.length}}
```

With `preserveWhitespaces: true` this outputs `4` as expected. With `preserveWhitespaces: false`, this outputs `1` as whitespace removal happens before the parsing of interpolations within the text nodes.

See example here: https://stackblitz.com/edit/ng-preserve-whitespace-weird
Repository: TypeScript
Issue: Allow to add a call signature to the Mapped Type OR to remove all `Function.prototype` methods
Labels: Suggestion,Awaiting More Feedback

## Search Terms

add a call signature to the Mapped Type; remove all `Function.prototype` methods

## Suggestion

Being able to create a callable type, but without Function.prototype methods. 

## Use Cases

Imagine one creates some API that exposes a function that is (because function is an object) also have some custom properties. This function is not supposed to be `call`-ed, `apply`-ed, `bind`-ed, etc, in fact all the `Function.prototype` methods are removed from it (e.g. with setPrototypeOf..null). However IDE will still suggest the `Function.prototype` methods.

*Desired behavior:*
```ts
let callableObject = () => 'foo'
Object.setPrototypeOf(callableObject, null)
callableObject.bar = 'baz'

callableObject() // 'foo'
callableObject // {bar: 'baz'}
callableObject.call // <---------- error
```
*Current behavior:*
```ts
let callableObject = () => 'foo'
Object.setPrototypeOf(callableObject, null)
callableObject.bar = 'baz'

callableObject() // 'foo'
callableObject // {bar: 'baz'}
callableObject.call // <---------- OK
```

*What I tried:*
```ts
type ExcludeFunctionPrototypeMethods<T extends () => any> = {
    [K in Exclude<keyof T, keyof Function>]: T[K]
}
// the type above "lacks a call signature" and I have no Idea how to add it there.
```

## Checklist

My suggestion meets these guidelines:
* [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. new expression-level syntax)
Repository: node
Issue: https.request timeout options doesn't work
Labels: help wanted,https

Node version 8.11.3. 64-bit Windows 8.1

As I understood from docs, `timeout `property in `https.request` options sets socket connection timeout.
I set it to minimum - 1 millisecond and it should definitely trigger 'timeout' event.
```
    const options = {
        host: 'yobit.net',
        path: '/api/3/depth/ltc_btc',
        timeout: 1
    }
    const req = https.request(options, res => {
    });
    
    req.on('timeout', () => {
        console.error('request timeout');
    })
    req.end();
```
I expect 'reqest timeout' console message but it doen't appear. 

However, when I create my custom https Agent with overriden `createConnection `method that sets initial socket timeout to 1 millisecond there: 
```
MyAgent.prototype.createConnection = function() {
    const socket = https.Agent.prototype.createConnection.apply(this, arguments);
    socket.setTimeout(1);
    return socket;
}
```
and run the first code with agent parameter set to my custom agent, now it fires 'timeout' event.
Repository: go
Issue: cmd/compile: optimize field access after type assertion
Labels: Performance,compiler/runtime

### What version of Go are you using (`go version`)?

go version go1.11.1 windows/amd64

### Does this issue reproduce with the latest release?

yes

### What did you do?

```go
package performance

type Large struct {
	padding1 [1024]string
	interesting string
	padding2 [1024]string
}

func ExtractInteresting(x interface{}) string {
	return x.(Large).interesting
}
```

### What did you expect to see?

The generated code of `ExtractInteresting` only copies the interesting string, not the padding around it.

### What did you see instead?

The generated code first initializes a variable of type `Large` on the stack (`repz stosq`). Then it copies the whole struct to the stack (`repz movsq`). Then it extracts the interesting field.

A real-life example of this pattern can be found in the [pkglint](https://github.com/rillig/pkglint/blob/10000ff/mkline.go#L20) project, where an interface is used to emulate a union type. That interface is accessed in many of the accessor methods, such as [Varname](https://github.com/rillig/pkglint/blob/10000ff/mkline.go#L202). In that code I used a struct instead of a pointer to struct, since I wanted to avoid the extra dereference. I had expected that avoiding the pointer would result in faster code.
Repository: TypeScript
Issue: Infer type arguments from 'super()' calls
Labels: Suggestion,In Discussion

```ts
interface Component {
  whatever: number;
}

type ComponentConstructor = new <T = {}>(extra: T) => Component & T;
declare const Component: ComponentConstructor;

class ReallyOldComponent extends Component {
  constructor() {
    super({ name: "Methuselah", age: 969 });
  }
  blah() {
    this.whatever;
    this.age;
  }
}
```

Ideally this would produce no errors; in fact, ideally I wouldn't need to specify any type parameter defaults on `ComponentConstructor`'s signature. However, instead, `T` is inferred as `{}` and in `blah` it is an error to access `this.age`.
Repository: godot
Issue: Mono:  Exported projects don't include runtime assemblies from nuget packages for its platform
Labels: bug,confirmed,topic:dotnet

**Godot version:**
3.0.6, 3.1 Alpha Snapshot and Master


**OS/device including version:**
Windows 10


**Issue description:**
When you use a nuget package it'll properly add the initial nuget package dll's, but on export it doesn't include the runtime dll's (if they exist) in the assemblies folder.


**Steps to reproduce:**
1. Create a new project that creates runtime libraries like sqlite
2. Export project
3. Notice that your app is asking about a missing dl


**Minimal reproduction project:**

Here's my current project, it includes the packages folder to save time. You'll notice inside the packages/sqlite core folder there's a `runtimes` folder with dll's for each individual platform under `linux-x64` `osx-x64` `win-x64` `win-x32`. Inside includes the corresponding dll's 

https://g4mr.itch.io/brickhouse (30mb)

**Notes**

- A workaround would be to manually check each package library and move the runtimes for each platform over to it's appropriate folder.

- Nuget packages with platform specific runtime libs have no problem running inside the editor.
Repository: rust
Issue: Proc-macros have no way to determine if their invocation context is `no_std`
Labels: A-macros,T-lang,C-feature-request,A-proc-macros

While writing [this response on Reddit](https://www.reddit.com/r/rust/comments/9lu9xo/_/e79ivl0?context=1000) I realized that there's no way for a proc-macro to determine if it's being invoked from `no_std` code and thus should use types from `core` instead of `std`. I'm not sure what this would look like, maybe a free function in `proc_macro`.

cc @dtolnay
Repository: go
Issue: cmd/compile: clearer error message for unkeyed composite literal with unexported field
Labels: help wanted,NeedsFix

I have a struct:
```
package df

type SortKey struct {
	Key interface{}
	SortDesc bool
	seriesIndex int
}
```

From an outside package:

**TRY 1**

```
z := df.SortKey{"n", false}
```

`Compiler error: too few values in df.SortKey literal`


**TRY 2**
```
z := df.SortKey{"n", false, 0}
```

`Compiler error: implicit assignment of unexported field 'seriesIndex' in df.SortKey literal`

You can't win. Perhaps it should just be disallowed for Go 2 - It messes up backwards compatibility anyway amongst minor versions of packages (eg. net/http.Request and Context situation).
Repository: go
Issue: cmd/gofmt: unaligned end-of-line comments in switch cases
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

go version go1.11.1 windows/amd64

### Does this issue reproduce with the latest release?

yes.

### What did you do?

https://play.golang.org/p/hMeljDlfiZJ

### What did you expect to see?

When I click Format, all end-of-line comments should be aligned in the same column.

### What did you see instead?

The first comment is not aligned with the other ones.
Repository: rust
Issue: Rustdoc: allow collapsing "Methods from Deref" blocks
Labels: T-rustdoc,C-feature-request

Similar to how you can fold/hide all methods from an impl block, it would be nice if you could collapse / hide an entire "Methods from Deref" block.
Repository: go
Issue: runtime: L2 arena maps are not accounted for in any runtime.MemStats field
Labels: NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?

`go version devel +2bb91e093c`, but this is also true in go 1.11.1 and every version since ec252105645 landed.

### Does this issue reproduce with the latest release?

Yes.


### What operating system and processor architecture are you using (`go env`)?

linux/amd64, but the issue is general.

### What did you do?

Build and run this program on linux/amd64 and compare its reported value for MemStats.Sys against the value that eg `pmap` will report.

````package main

import (
        "fmt"
        "os"
        "runtime"
        "time"
)

func main() {
        var ms runtime.MemStats
        fmt.Printf("PID %d\n", os.Getpid())
        runtime.ReadMemStats(&ms)
        fmt.Printf("MemStats %#v\n", ms)
        time.Sleep(time.Second * 100000)
}
````

On my machine, there is a significant difference; MemStats.Sys is short by 32 MB or so and shows very little allocation outside of HeapSys. If you look at the Linux kernel memory map (with eg `pmap`) or use `strace -e trace=%memory` on the program, it is clearly false, because there is a large 32 MB allocation that is not reflected in MemStats. This allocation is the L2 arena map, allocated in *mheap.syAlloc (currently [here](https://github.com/golang/go/blob/master/src/runtime/malloc.go#L625)). Because this allocation is made by calling `persistentalloc()` with the last parameter being `nil`, it is not accounted for in any memstats value, and on modest Go programs it may amount to a significant amount of their runtime OS level memory usage.

(If this is deliberate I believe it's not the right approach, but I suspect it may be an oversight and the CL for the commit doesn't contain any discussion of it either way that I could see. The related `heapArena` structure is accounted for, for example.)
Repository: rust
Issue: Tracking issue for RFC 2412, "The optimize attribute"
Labels: B-RFC-approved,T-lang,B-unstable,B-RFC-implemented,C-tracking-issue,S-tracking-impl-incomplete

This is a tracking issue for the RFC "The optimize attribute" (rust-lang/rfcs#2412).

**Steps:**

- [x] Implement the RFC. Partially done, see https://github.com/rust-lang/rust/issues/54882#issuecomment-457824508.
- [ ] Adjust documentation ([see instructions on forge][doc-guide])
- [ ] Stabilization PR ([see instructions on forge][stabilization-guide])

[stabilization-guide]: https://forge.rust-lang.org/stabilization-guide.html
[doc-guide]: https://forge.rust-lang.org/stabilization-guide.html#updating-documentation

**Unresolved questions:**

- [x] Should we also implement `optimize(always)`? `optimize(level=x)`?
    - [x] Left for future discussion, but should make sure such extension is possible.
- [ ] Should there be any way to specify what global optimization for speed level is used in
  conjunction with the optimization for speed option (e.g. `-Copt-level=s3` could be equivalent to
  `-Copt-level=3` and `#[optimize(size)]` on the crate item);
    - [ ] This may matter for users of `#[optimize(speed)]`.
- [ ] Are the propagation and `unused_attr` approaches right?
- [ ] The RFC specifies we should emit an unused_attributes warning when misapplied, but similar attributes emit an error instead. Should this emit an error too?
Repository: rust
Issue: Define `fn [_]::try_split_at(&self, usize) -> Option<(&Self, &Self)>`
Labels: T-libs-api,C-feature-request

PR #54887
Repository: rust
Issue: Crawl doc.rust-lang.org for dead links on a regular basis
Labels: T-infra,C-feature-request

Refiling from https://github.com/rust-lang/rfcs/issues/669.

> And open tickets here via the GitHub API :)
Repository: godot
Issue: [3.x] Auto-complete not working for autoloaded global scripts
Labels: bug,topic:gdscript,topic:editor


**Godot version:**

Godot Engine v3.0.6.stable.official

**OS/device including version:**

Windows 8.1 Pro & Windows 10 Home


**Issue description:**

Member functions not auto-completing when the variable is in autoload global.gd 

**Steps to reproduce:**
global.gd

`var array = ["zero", "one", "two"]`

script.gd

`print(global.array.size())` global.array autocompletes correctly but it doesn't complete the function size()

**Minimal reproduction project:**

[minimal reproduction.zip](https://github.com/godotengine/godot/files/2453886/minimal.reproduction.zip)
Repository: create-react-app
Issue: JetBrains Toolbox apps are not detected by guessEditor
Labels: issue: proposal

`react-dev-utils` looks for a process named `/Applications/IntelliJ IDEA.app/Contents/MacOS/idea` but when installing IntelliJ IDEA from [JetBrains Toolbox](https://www.jetbrains.com/toolbox/) the apps are installed in `~/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/182.4505.22/IntelliJ IDEA.app/Contents/MacOS/idea` instead.

### Is this a bug report?

Yes

### Environment

Environment:
  OS:  macOS 10.14
  Node:  10.11.0
  Yarn:  1.10.0
  npm:  6.4.1
  Watchman:  4.9.0
  Xcode:  Xcode 10.0 Build version 10A255
  Android Studio:  Not Found

Packages: (wanted => installed)
  react: ^16.4.1 => 16.4.1
  react-dom: ^16.4.1 => 16.4.1
  react-scripts: ^2.0.4 => 2.0.4

### Steps to Reproduce

1. Start with a cra project
2. Start IntelliJ IDEA (installed via JetBrains Toolbox)
2. Cause a runtime error in your project
3. Click the path of the file of the error


### Expected Behavior

The running IntelliJ IDEA instance would be detected and launched.


### Actual Behavior

App is not launched, instead a warning about setting the app explicitly via env var appears.
Repository: pytorch
Issue: `pstrf` on positive semi-definite matrices
Labels: triaged,module: linear algebra,function request

## 🐛 Bug

[`pstrf`](https://pytorch.org/docs/stable/torch.html#torch.pstrf) does not work on Positive Semi-Definite matrices while the documentation says it should.

The issue might be a misunderstanding on my part of the documentation.
Any correction to this misunderstanding is welcome :)

I am assuming that for `M` to be a Positive SemiDefinite matrix, it needs to hold that for any real vector `x`, `x.t() @ M @ x >= 0`,
whereas to be Positive Definite, it needs to hold that `x.t() @ M @ x > 0`.

## To Reproduce

Using Pytorch 0.4.1, on CPU
```
import torch 
Zero = torch.tensor([0.0]).view(1,1)
print(torch.pstrf(Zero))
```
throws 
```
RuntimeError: 
Lapack Error pstrf : 
matrix is rank deficient or not positive semidefinite at 
c:\programdata\miniconda3\conda-bld\pytorch_1532505617613\work\aten\src\th\generic/THTensorLapack.cpp:744
```

## Expected behavior

[`pstrf`](https://pytorch.org/docs/stable/torch.html#torch.pstrf) is supposed to 
> Computes the pivoted Cholesky decomposition of a positive semidefinite matrix `a`. returns matrices `u` and `piv`.

In the example provided above, I would expected `u` should be `[[0]]` and `piv` should be `[0]`

## Additional Details

I don't understand the error message,
```
matrix is rank deficient or not positive semidefinite
```
From my understanding, Positive SemiDefinite matrices that are not Positive Definite are by definition rank deficient.

cc @jianyuh @nikitaved @pearu @mruberry @heitorschueroff @walterddr @IvanYashchuk
Repository: rust
Issue: Use the "efficient "pivot pointer" scheme" for Rc<Trait>
Labels: C-enhancement,T-compiler

Refiling what remains of https://github.com/rust-lang/rfcs/issues/981 here...

This might already be done... but @eddyb wrote:

> [...] it doesn't use the efficient "pivot pointer" scheme, though.
Maybe a sepparate issue should be opened for that.
Repository: godot
Issue: Tilemap save settings
Labels: enhancement,topic:editor,usability,topic:2d

It would be very useful and time saving if the tilemap & tileset editor settings were saved.
For example:
- Tilemap zoom-level
- Tilemap window size
- Zoom-level of the tileset editor
- Region snap options

Every time you open Godot you have to adjust all these settings again.
Repository: TypeScript
Issue: Allow to specify return type of constructor
Labels: Suggestion,In Discussion



## Search Terms

constructor return type

## Suggestion

Add an ability to specify return type of a class constructor.
Right now the compiler produces the following error: "Type annotation cannot appear on a constructor declaration."

## Use Cases

Consider this example:

```
interface MyInterface {
  readonly data: ReadonlyArray<string>

  add(item: string): void
  remove(item: string): void

  // ...more
}

class MyClass implements MyInterface {
  data = [] as string[]
  
  constructor(): MyInterface {} // right now it's an error

  add(item: string) {
    this.data.push(item)
  }

  // ...more
}
```

Current behavior:
```
const c = new MyClass() // typeof c == MyClass
c.data = [] // oops! no error from the compiler
```

Suggested behavior:
```
const c = new MyClass() // typeof c == MyInterface
c.data = [] // the compiler generates an error here, correct behavior
```

Of course, there are several ways to achieve this result (like using private constructor with factory function, or using a type converter like this: 
`type AsInterface<T, C> = C extends new (...args: infer A) => T ? new (...args: A) => T : never`
But I think that the proposed feature is more concise

## Checklist

My suggestion meets these guidelines:
* [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. new expression-level syntax)
Repository: opencv
Issue: Linking against Intel-OpenMP
Labels: category: build/install

##### System information (version)

- OpenCV => master - #a9c8a52
- Operating System / Platform => Linux
- Compiler => GCC 7 + NVCC

##### Detailed description

Currently OpenCV cannot be linked easily to Intel OpenMP by passing `-liomp5 -lpthread -L<icc_dir>/lib` as mentioned in [Intel User Guide - using the OpenMP Libraries](https://software.intel.com/en-us/node/522690) due to CMake.

Also following limitations in the current [MKL-DNN with TBB](https://github.com/intel/mkl-dnn#intel-mkl-dnn-with-intel-tbb), both Intel MKL and MKL-DNN are built with OpenMP on my system.

As I'm linking OpenCV to MKL for the BLAS and LAPACK functionalities, it's probably best to also use OpenMP for OpenCV.

Following the recommendation of MKL-DNN I'm trying to link against Intel OpenMP but I'm stuck.

##### Steps to reproduce

- Install Intel MKL
- Install MKL-DNN
- Try to build OpenCV with `WITH_OPENMP=ON`
- Check the parallel lib during cmake config, it will be `pthread`