sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: create-react-app
Issue: Add React version into eslint-config-react-app
Labels: issue: proposal

Hello everyone,

### Is this a bug report?
No

### Situation

I'm working on a project that use React (**react@15.6.2**). I use **react-scripts** (1.0.11) to start and build my project.

According to my React version, I use some deprecated function: 

- **componentWillMount** (https://reactjs.org/docs/react-component.html#unsafe_componentwillmount)
- **componentWillReceiveProps** (https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops)

These functions are deprecated in 16.3.0 of React.

### Problems
Now, when I start or build my project, I get several warnings inside console and browser for this deprecated function.

### Explanation
I try to understand why I got this message for the React 15.6.2 which are not concern by this warning. In fact, the package **eslint-config-react-app@2.1.0** set the ESLint configuration for the actions of **react-scripts**.

The ESLint's plugin **eslint-plugin-react** have a rule: "_react/no-deprecated_" that created the warnings. This rule match on deprecated code, according to the configured React version number given in the ESLint config file. But, in this case, **eslint-config-react-app** does not define React version. So, as explain here: https://github.com/yannickcr/eslint-plugin-react#configuration, the default value is the latest React stable release.

That explain why I got warnings aiming React 16.3 in my project which use React 15.6.2.

### Solution
I suggest as solution to define React version in the configuration file of **eslint-config-react-app**.

I resolve my problem on adding this:
```
settings: {
  react: {
    version: require('react').version
  }
},
```
inside the file index.js of **eslint-config-react-app**.

This solution could have some problems, especially, the package **react** is now mandatory (we could add a verification if package **react** exist before).


I know, that I could also "_eject_" my project and edit the config files, but I think this modification should be helpful for other users.

### Discussion
In first time, I enjoy to know if my solution is correct on the content and the style. In second time, if people agree with me, I will create a pull request to integrate this modification inside the project.

Thanks for the reading. I hope that my post is clear enough.
Repository: vue
Issue: Make vue available to other libraries without having to import it
Labels: discussion

Title needs work, idk what to call this. 

### What problem does this feature solve?
Writing a component library with typescript requires importing Vue so you can use `Vue.extend(...)` to get typings. This causes problems when webpack decides to load a different instance of vue. 
See https://github.com/vuetifyjs/vuetify/issues/4068

### What does the proposed API look like?
[Local registration](https://vuejs.org/v2/guide/components-registration.html#Local-Registration) to accept a function that **synchronously** returns a component, calling it with the parent vue instance. 

The library can then do:
```ts
export default function MyComponent (Vue: VueConstructor) {
  return Vue.extend({ ... })
}
```

And be used like:
```js
import MyComponent from 'some-library'

export default {
  components: { MyComponent }
}
```

Of course that would then cause other problems, particularly where we use methods directly from other components. Maybe something that adds types like `Vue.extend()` but doesn't have any runtime behaviour would be better instead?

```ts
// When used, this will behave the same as a bare options object, instead of being an entire vue instance
export default Vue.component({
  ...
})
```

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: flutter
Issue: ListTile needs Material Design guidance: title overflow, textScaleFactor != 1.0
Labels: framework,f: material design,P2,team-design,triaged-design

We've updated the Flutter ListTile (like list items) widget to match: https://material.io/design/components/lists.html#specs

There are still some loose ends that the spec doesn't cover:

- Overflow: what happens when the title or subtitle wraps?
- Text scale factor: how should the layout scale when the text scale factor != 1.0?

There were also some issues with centering and the implicit case analysis in the specs. We need to confirm that the following rules are correct:

- If a leading widget is specified then the leading edge of the titles is 56.0, unless the leading widget's intrinsic width is > 40. In that case title's begin at leading_width + 16
- The leading and trailing widgets are always centered within the list tile.
Repository: rust
Issue: Problem with type inference resolution
Labels: A-trait-system,T-compiler,A-inference,T-types

A problem was found with the type inference resoultion when the env_logger crate was imported. The issue was reported on [reddit](https://old.reddit.com/r/rust/comments/8n83ph/compile_issue_when_adding_a_dependency) and errors on the latest stable and nightly.

```rust 
// Uncomment this and it breaks...
extern crate env_logger;

fn main() {
    let string = String::new();
    let str = <&str>::from(&string);

    println!("{:?}", str);
}
```
Repository: vscode
Issue: Support customisable alias for commands in command palette
Labels: feature-request,quick-open

- VSCode Version: 1.23.0
- OS Version: Linux

----

**Is there a way to define an alias for a command so that the command can be called under multiple different names (original name and the alias)?**

This is useful in different cases:

- If you switch from a different editor that uses a command palette (like emacs, ... ) you might have learned the names of commands over many years. Relearning takes more time than making an alias once. This would also allow to use two editors in parallel without interference. Before I came to VSCode I used emacs. I regularly want to call `diff-buffer-with-file` and it takes me some time to figure out that in VSCode it's called `Compare active file with saved`.
- You could define abbreviations that are quicker to type than selecting regular command names with the fuzzy search, e.g. `tt`.  This is quite popular in emacs, see e.g. http://ergoemacs.org/emacs/emacs_alias.html 
- if you regularly hit keys in the wrong order an alias might be useful for command you regularly use.

I think I'm not the only one who likes such a feature: When I used emacs I checked quite a few popular user configurations that users keep on github. A lot of these contain aliases by using the command `(defalias ...)` - including popular/influential ones like [spacemacs](https://github.com/syl20bnr/spacemacs/), [abo-abo's oremacs](https://github.com/abo-abo/oremacs), the [config of the emacs maintainer](https://github.com/jwiegley/dot-emacs) ... 

This has been asked on [Reddit](https://www.reddit.com/r/vscode/comments/8bj63w/can_i_set_an_alias_for_the_command_palette/) and [stackoverflow](https://stackoverflow.com/questions/50143258/add-alias-for-commands-in-command-palette) without any useful answer.
Repository: vscode
Issue: Support folding ranges inside a line
Labels: feature-request,editor-folding

Hey, I have read through the folding-related issues (like #3422, the linked ones and some other ones related to the `FoldingRangeProvider` API specifically), but I don't seem to have come across a conversation about inline folding ranges.

Has this been discussed - or is it okay to start a discussion on the topic now?

I am interested in these, because I'd like to improve readability of MarkDown documents (using an extension) by collapsing MarkDown link targets (the URLs - which can be quite long) and instead linkifying the text range (using a `DocumentLinkProvider`).

Researching the `FoldingRange` API though, I can see it only has start and end lines, not `Position`s. Is this an immutable deliberate design decision or something open to alternative with enough support behind it?

I think other possible use cases could be folding of ternary expression branches, one-liner `if` statements and stuff like that. (But I'm mostly interested in my use-case described above.)
Repository: rust
Issue: rustdoc: accept a "test runner" argument to wrap around doctest executables
Labels: T-rustdoc,C-enhancement,A-doctests

Unit tests are currently built and run in separate steps: First you call `rustc --test` to build up a test runner executable, then you run the executable it outputs to actually execute the tests. This provides a great advantage: The unit tests can be built for a different platform than the host. Cargo takes advantage of this by allowing you to hand it a "test runner" command that it will run the tests in.

Rustdoc, on the other hand, collects, compiles, and runs the tests in one fell swoop. Specifically, it compiles the doctest as part of "running" the test, so compile errors in doctests are reported as test errors rather than as compile errors prior to test execution. Moreover, it runs the resulting executable directly:

https://github.com/rust-lang/rust/blob/fddb46eda35be880945348e1ec40260af9306d74/src/librustdoc/test.rs#L338-L354

This can be a problem when you're trying to run doctests for a platform that's fairly far removed from your host platform - e.g. for a different processor architecture. It would be ideal if rustdoc could accept some wrapper command so that people could run their doctests in e.g. qemu rather than on the host environment.
Repository: flutter
Issue: Improve error message when a qualified import should be relative
Labels: a: tests,team,framework,a: error message,P2,team-framework,triaged-framework

I had a PR validation fail because I used a fully qualified import where I should have used a relative import.  The error message in the out was as follows:

```bash
dart ./dev/bots/test.dart
SHARD=analyze
⏩ RUNNING: cd examples/hello_world; ../../bin/flutter inject-plugins
Unhandled exception:
NoSuchMethodError: The getter 'iterator' was called on null.
Receiver: null
Tried calling: iterator
#0      Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
#1      _deepSearch (file:///tmp/flutter%20sdk/dev/bots/test.dart:520:17)
#2      _deepSearch (file:///tmp/flutter%20sdk/dev/bots/test.dart:525:28)
#3      _verifyNoBadImportsInFlutter (file:///tmp/flutter%20sdk/dev/bots/test.dart:454:31)
<asynchronous suspension>
#4      _analyzeRepo (file:///tmp/flutter%20sdk/dev/bots/test.dart:100:9)
<asynchronous suspension>
#5      main (file:///tmp/flutter%20sdk/dev/bots/test.dart:56:26)
<asynchronous suspension>
#6      _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)
```

We should have a better error message that points in the direction of the problem.

The specific import was in:
`circle_avatar.dart`

I initially imported material colors with full qualification:
`import 'package:flutter/src/material/colors.dart';`

The correct import was a relative one:
`import 'colors.dart'`
Repository: TypeScript
Issue: Add a Mutable type (opposite of Readonly) to lib.d.ts
Labels: Suggestion,Awaiting More Feedback,Fix Available

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.

-->

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
mutable, mutable type
## Suggestion

lib.d.ts contains a `Readonly` type, but not a `Mutable` type. This type would be the opposite of `Readonly`, defined as:
```typescript
type Mutable<T> = {
  -readonly[P in keyof T]: T[P]
};
```

## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

This is useful as a lightweight builder for a type with readonly properties (especially useful when some of the properties are optional and conditional logic is needed before assignment).
 
## Examples

<!-- Show how this would be used and what the behavior would be -->
```typescript
 type Mutable<T> = {-readonly[P in keyof T]: T[P]};
 
 interface Foobar {
   readonly a: number;
   readonly b: number;
   readonly x?: string;
 }

 function newFoobar(baz: string): Foobar {
   const foobar: Mutable<Foobar> = {a: 1, b: 2};
   if (shouldHaveAnX(baz)) {
     foobar.x = 'someValue';
   }

   return foobar;
 }
```

## 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: go
Issue: runtime/pprof: possible sampling error with large memprofile rate
Labels: NeedsInvestigation,compiler/runtime

Split out from #25096, where @hyangah wrote:

> With the default memprofile sampling rate, however, the results look different. The results are different from the results with -memprofilerate=1, too. The order in the top15 list varies a lot. This seems to me errors from sampling-based estimation, not the bug the original report suggested.

This is an issue to investigate that.
Repository: puppeteer
Issue: Support ServiceWorkers
Labels: feature,chromium

We need an API to connect and manage ServiceWorkers.

At the very least, we need to:
- have a way to shut down service worker (requested at https://github.com/GoogleChrome/puppeteer/issues/1396)
- have a way to see service worker traffic (requested at https://github.com/GoogleChrome/puppeteer/issues/2617)
- support code coverage for service workers (requested at https://github.com/GoogleChrome/puppeteer/issues/2092)
Repository: rust
Issue: Tracking issue for the OOM hook (`alloc_error_hook`)
Labels: A-allocators,T-libs-api,B-unstable,C-tracking-issue,Libs-Tracked

PR #50880 added an API to override the std OOM handler, similarly to the panic hook. This was discussed previously in issue #49668, after PR #50144 moved OOM handling out of the `Alloc`/`GlobalAlloc` traits. The API is somewhat similar to what existed before PR #42727 removed it without an explanation. This issue tracks the stabilization of this API.

Defined in the `std::alloc` module:

<del>

```rust
pub fn set_oom_hook(hook: fn(Layout) -> !);
pub fn take_oom_hook() -> fn(Layout) -> !;
```

</del>

```rust
pub fn set_alloc_error_hook(hook: fn(Layout));
pub fn take_alloc_error_hook() -> fn(Layout);
```

CC @rust-lang/libs, @SimonSapin 

## Unresolved questions
- [x] ~~Name of the functions. The API before #42727 used `_handler`, I made it `_hook` in #50880 because that's the terminology used for the panic hook (OTOH, the panic hook returns, contrary to the OOM hook).~~  #51264
- [ ] Should this move to its own module, or stay in `std::alloc`?
- [x] Interaction with unwinding. `alloc::alloc::oom` is marked `#[rustc_allocator_nounwind]`, so theoretically, the hook shouldn't panic (except when panic=abort). Yet if the hook does panic, unwinding seems to happen properly except it doesn't.
- [ ] Should we have this, or https://github.com/rust-lang/rust/issues/51540, or both?
- [ ] https://github.com/rust-lang/unsafe-code-guidelines/issues/506
Repository: angular
Issue: Angular remove some of html entities between tags
Labels: type: bug/fix,freq1: low,area: compiler,state: confirmed,core: basic template syntax,P3,compiler: parser

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
</code></pre>

## Current behavior
Angular remove `&emsp;`, `&thinsp;` and maybe another html entites.


## Expected behavior
Save my entities, please!


## Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/angular-vs-htmlentity?file=src/app/app.component.html
![image](https://user-images.githubusercontent.com/2697890/40776670-15797790-64d4-11e8-9815-77ed75fa6b28.png)



## What is the motivation / use case for changing the behavior?
I want use all of html entities in my html templates.


## Environment
Angular 5.2.0 and actual version at stackblitz.com
Repository: angular
Issue: APP_INITIALIZER contract not honoured with TestBed
Labels: type: bug/fix,area: testing,freq1: low,P3

<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
-->

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
</code></pre>

## Current behavior

When importing a Module providing a promise-based APP_INITIALIZER into a TestBed, the tests are executed before the promise is fully resolved.

There was an issue for this very problem (#16204) but the reporter closed because he found a workaround.

## Expected behavior
<!-- Describe what the desired behavior would be. -->

The promise of an APP_INITIALIZER should be fully resolved, exactly as when running the application that uses this module normally.

## Minimal reproduction of the problem with instructions

Hadn't had the time, but I expect that it should be simple to know if is already implemented or not to behave like expected. If yes, I will produce a repro.

## What is the motivation / use case for changing the behavior?

Same contract with tests or real app.

## Environment

<pre><code>
Angular version: 6.0.7
</code></pre>
Repository: pytorch
Issue: [Caffe2] place some nodes of the same network on GPU and others on CPU?
Labels: caffe2

## Issue description

 When I use multi-GPU to run the baseline X152, I get an error of "out of memory", but I have no better device. Can I run some network nodes on the CPU?
Repository: TypeScript
Issue: Cannot augment global namespace from module due to shadowing(?)
Labels: Bug

**TypeScript Version:**  2.8.3, 3.0.0-dev.20180531

**Search Terms:** global augment

**Code**
Briefly, declare a namespace in a script, then attempt to augment it in a module, and it shadows rather than augments.

```ts
// global.d.ts, note: a script
declare namespace X {
  interface Iface {
    x: string;
  }
}

// module.ts
export {}  // make it a module

declare global {
  namespace X {
    // This declaration doesn't matter, it's just showing that
    // the user was intending to augment the namespace.
    const augment: number; 
  }

  function f(): X.Iface;
}
```

**Expected behavior:**
The module augments the global namespace X.

**Actual behavior:**
module.d.ts:8:19 - error TS2694: Namespace 'global.X' has no exported member 'Iface'.

It appears that the 'X' inside the 'declare global' shadows the other 'X', rather than augmenting it.  If you comment out the module.d.ts decl of the X namespace it compiles.

Also it's weird that the error message talks about "global.X", maybe an error reporting bug?

**Playground Link:** n/a, needs multiple files.

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: pytorch
Issue: [Caffe2] VideoInput/LMDB Reader to Standalone Predictor Question
Labels: caffe2

Hey Caffe2/PyTorch team,

I had a question about going from a trained model (.mdl format) to a standalone predictor model. I've been able to load the .mdl file as follows:
```
meta_net_def = pred_exp.load_from_db('trained_model.mdl', 'minidb')
init_net = core.Net(
    pred_utils.GetNet(meta_net_def, predictor_constants.GLOBAL_INIT_NET_TYPE)
)
predict_net = core.Net(
    pred_utils.GetNet(meta_net_def, predictor_constants.PREDICT_NET_TYPE)
)
```

However, the model, once loaded, is expecting to be executed on a GPU and initiated via an LMDB reader:
**init_net proto:**
```
input: "!!PREDICTOR_DBREADER"
output: "gpu_0/conv1_middle_w"
output: "gpu_0/conv1_middle_spatbn_relu_s"
output: "gpu_0/conv1_middle_spatbn_relu_b"
output: "gpu_0/conv1_w"
output: "gpu_0/conv1_spatbn_relu_s"
output: "gpu_0/conv1_spatbn_relu_b"
output: "gpu_0/comp_0_conv_1_middle_w"
output: "gpu_0/comp_0_spatbn_1_middle_s"
...
name: ""
type: "Load"
```

**first two layers in predict_net proto:**
```
input: "trained_init/CreateDB"
output: "gpu_0/data"
output: "gpu_0/label"
name: "data"
type: "VideoInput"
arg {
... bunch of VideoInput args ...
}
device_option {
  device_type: 1
  cuda_gpu_id: 0
}

input: "gpu_0/data"
output: "gpu_0/data"
name: ""
type: "StopGradient"
device_option {
  device_type: 1
  cuda_gpu_id: 0
}

{convolutional layers, etc...}
```

My questions are:
a) how would I go about removing/modifying the top layer(s) of the init and predict nets to allow for individual predictions (without requiring the creation of an LMDB, etc)? (I'd like to be able to point predict.py to a folder or to a single video, load the data into np arrays or otherwise, then feed those into the Caffe2 model for predictions)

b) how would I go about switching from GPU to CPU execution?

c) is there anything else I might be missing when going from a training 'checkpoint' .mdl file to a prediction model?

Thanks so much!
Repository: go
Issue: cmd/compile: inconsistent acceptance of cyclic variable declaration (esoteric)
Labels: NeedsInvestigation,compiler/runtime

Another test case for handling of cycle detection:
https://play.golang.org/p/DAftfsYBsrX
is accepted and appears to run correctly. The similar (and functionally identical) program
https://play.golang.org/p/AChHOplAHzp
is not accepted with an incorrect type alias cycle error. And the simplified version eliminating the type name T
https://play.golang.org/p/ozYsLzyDax8
is not accepted with a type checking loop error.

Yet all of them are functionally the same. Either all of them should be accepted or none of them should be accepted.
Repository: angular
Issue: Make possible to configurable style compiler constants
Labels: feature,area: core,core: stylesheets,feature: under consideration

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[x] Performance issue
[x] Feature request
</code></pre>

## Current behavior
Compiler variable and attr is constant.
https://github.com/angular/angular/blob/master/packages/compiler/src/style_compiler.ts#L16
```ts
const COMPONENT_VARIABLE = '%COMP%';
const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;
```

## Expected behavior
Compiler variable and attr must have default values and possible to configurable.


## What is the motivation / use case for changing the behavior?
Currently that constants is part of build js/css files and made files more large.
For example, statistics for my not very large project (`main.bundle.ts` 1 MB)
```
%COMP% - 1528 matches (9 168 bytes)
_nghost- - 332 matches (2 656 bytes)
_ngcontent- - 1195 matches (13 145 bytes)
Total - 24 969 excess bytes
```

But, maybe I konw what I do and can replace this constatns to `☺`, `☻`, `♥` (just for example).
This action will save 21 914 butes just for my example or more for bigger project with many css rules.