sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: react
Issue: head > meta > content escaping issue
Labels: Component: Server Rendering,Type: Needs Investigation

<!--
  Note: if the issue is about documentation or the website, please file it at:
  https://github.com/reactjs/reactjs.org/issues/new
-->

**Do you want to request a *feature* or report a *bug*?**

I'm guessing it's a bug.

**What is the current behavior?**

The following source code,

```jsx
<meta property="og:image" content="https://onepixel.imgix.net/60366a63-1ac8-9626-1df8-9d8d5e5e2601_1000.jpg?auto=format&q=80&mark=watermark%2Fcenter-v5.png&markalign=center%2Cmiddle&h=500&w=500&s=60ec785603e5f71fe944f76b4dacef08" />
```

, is being escaped once server side rendered:
```jsx
<meta property="og:image" content="https://onepixel.imgix.net/60366a63-1ac8-9626-1df8-9d8d5e5e2601_1000.jpg?auto=format&amp;q=80&amp;mark=watermark%2Fcenter-v5.png&amp;markalign=center%2Cmiddle&amp;h=500&amp;w=500&amp;s=60ec785603e5f71fe944f76b4dacef08"/>
```

You can reproduce the behavior like this:
```jsx
const React = require("react");
const ReactDOMServer = require("react-dom/server");
const http = require("http");

const doc = React.createElement("html", {
  children: [
    React.createElement("head", {
      children: React.createElement("meta", {
        property: "og:image",
        content:
          "https://onepixel.imgix.net/60366a63-1ac8-9626-1df8-9d8d5e5e2601_1000.jpg?auto=format&q=80&mark=watermark%2Fcenter-v5.png&markalign=center%2Cmiddle&h=500&w=500&s=60ec785603e5f71fe944f76b4dacef08"
      })
    }),
    React.createElement("body", { children: "og:image" })
  ]
});

//create a server object:
http
  .createServer(function(req, res) {
    res.write("<!DOCTYPE html>" + ReactDOMServer.renderToStaticMarkup(doc)); //write a response to the client
    res.end(); //end the response
  })
  .listen(8080); //the server object listens on port 8080
```
editor: https://codesandbox.io/s/my299jk7qp
output : https://my299jk7qp.sse.codesandbox.io/

**What is the expected behavior?**

I would expect the content not being escaped. It's related to https://github.com/zeit/next.js/issues/2006#issuecomment-355917446.
I'm using the `og:image` meta element so my pages can have nice previews within Facebook :).

![capture d ecran 2018-10-12 a 14 15 26](https://user-images.githubusercontent.com/3165635/46868650-52076f00-ce29-11e8-892f-cfbf924bba82.png)

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
16.5.2
Repository: go
Issue: cmd/go: allow replacement version to be omitted if the target module has a required version
Labels: NeedsInvestigation,modules

Currently you must add a version when entering a non-filesystem (remote) replacement for a module.  A foolish attempt to put `replace github.com/fsnotify/fsnotify => gitmirror.corp.xyz.com/fsnotify/fsnotify` provokes a rebuke from `go mod verify`: 
`go.mod:42: replacement module without version must be directory path (rooted or starting with ./ or ../)`  
- so you have to fix it to be: `replace github.com/fsnotify/fsnotify => gitmirror.corp.xyz.com/fsnotify/fsnotify v1.4.7`.

However, there _is_ already a version specification for that package in `go.mod` the `require` statement, for example:
`require github.com/fsnotify/fsnotify v1.4.7`
This seems to be the reasonable default value for the missing version in the `replace` directive for the same package - "if no replacement version is given, use the same as in the `require` directive for that specific package`.

What would be especially nice is when upgrading a package such as github.com/fsnotify/fsnotify to the future v1..4.8 version,  one would not need to first run `go get -u github.com/fsnotify/fsnotify` and then have to look up the new version and manually update the old version to the new one in the `replace` section (or worse, forgetting to do it and ending up with the unintended replacement with the old version).

@thepudds said on Slack that he wanted to suggest this as well.  @bcmills @rsc - does it seem reasonable to you?
Repository: go
Issue: net/http: add CONNECT bidi example
Labels: Documentation,help wanted,NeedsFix

https://go-review.googlesource.com/c/go/+/123156 is removing some documentation from http.Transport that says not to use CONNECT requests with Transport because it's adding CONNECT support.

We should also add examples. CL 123156 has a test which is close at least, but could be cleaned up and be made less unit-testy.
Repository: TypeScript
Issue: Computed Properties aren't bound correctly during Object/Class evaluation
Labels: Bug,Help Wanted,Effort: Moderate,Domain: Transforms

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.2.0-dev.20181011

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** computed property expression

**Code**

```ts
const classes = [];
for (let i = 0; i <= 10; ++i) {
  classes.push(
    class A {
      [i] = "my property";
    }
  );
}
for (const clazz of classes) {
  console.log(Object.getOwnPropertyNames(new clazz()));
}
```

**Expected behavior:** The log statements indicate that each class in `classes` has a different property name (`i` should be evaluated at the time of the class evaluation and all instances of that class should have a property name corresponding to that evaluation of `i`).

**Actual behavior:** Compiled code logs:

> [ '10' ]
> [ '10' ]
> [ '10' ]
> [ '10' ]
> [ '10' ]
> [ '10' ]
> [ '10' ]
> [ '10' ]
> [ '10' ]
> [ '10' ]
> [ '10' ]

[**Playground Link**](https://www.typescriptlang.org/play/index.html#src=const%20classes%20%3D%20%5B%5D%3B%0D%0Afor%20(let%20i%20%3D%200%3B%20i%20%3C%3D%2010%3B%20%2B%2Bi)%20%7B%0D%0A%20%20classes.push(%0D%0A%20%20%20%20class%20A%20%7B%0D%0A%20%20%20%20%20%20%5Bi%5D%20%3D%20%22my%20property%22%3B%0D%0A%20%20%20%20%7D%0D%0A%20%20)%3B%0D%0A%7D%0D%0Afor%20(const%20clazz%20of%20classes)%20%7B%0D%0A%20%20console.log(Object.getOwnPropertyNames(new%20clazz()))%3B%0D%0A%7D)
Repository: pytorch
Issue: Request for stripped down / inference only pytorch wheels
Labels: module: build,triaged

## 🚀 Feature
Creating a precompiled pytorch wheel file that is trimmed down, inference only version.

## Motivation

Right now pytorch wheels are on average ~400MB zipped -> 1.+ GB unzipped, which is not a big deal for training & prototyping as generally the wheels are only installed once - but that's not the case for productionizing using service providers like sagemaker / algorithmia / etc.

## Pitch

If we can create a trimmed down, potentially inference only capable wheel file - we can directly improve the load time performance of these algorithms in serverless algorithm delivery environments, which could directly pytorch's ability to compete in the HPC serverless marketplace.

## Alternatives

We could also provide a clear way for users to create their own wheels, by simplifying and documenting the build process somewhat to enable optional features during the compilation process. 

## Additional context

Full disclosure, I'm an employee at Algorithmia and this change would make my life much easier :smile: 


cc @malfet @seemethere @walterddr
Repository: opencv
Issue: opencv_createsamples app can fail if negative images are different sizes
Labels: feature,category: apps

##### System information (version)

- OpenCV => 3.4.3
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017

##### Detailed description

In the opencv_createsamples app, the cvCreateTestSamples() for loop calculates maxscale only once if it is initially passed with a negative value.  This works fine if all of the negative training images are the same size, but can cause an assertion to be raised if a smaller image is encountered.  (width or height becomes too large and results in x or y being negative)

#####
            for( i = 0; i < count; i++ )
            {
                icvGetNextFromBackgroundData( cvbgdata, cvbgreader );
                if( maxscale < 0.0 )   ///  maxscale is only < 0 once and is never recalculated
                {
                    maxscale = MIN( 0.7F * cvbgreader->src.cols / winwidth,
                                   0.7F * cvbgreader->src.rows / winheight );
                }

                if( maxscale < 1.0F ) continue;

                scale = theRNG().uniform( 1.0F, (float)maxscale );

                width = (int) (scale * winwidth);
                height = (int) (scale * winheight);
                x = (int) ( theRNG().uniform( 0.1, 0.8 ) * (cvbgreader->src.cols - width));
                y = (int) ( theRNG().uniform( 0.1, 0.8 ) * (cvbgreader->src.rows - height));

               //////
               // During loop execution, cvbgreader->src.cols and cvbgreader->src.rows may
               // change, but maxscale does not.  
               // width or height could thus be greater than src.cols or src.rows resulting in
               // negative x or y values which causes an assertion when icvPlaceDistortedSample()
               // is called
               //////

                if( invert == CV_RANDOM_INVERT )
                {
                    inverse = theRNG().uniform( 0, 2 );
                }
                icvPlaceDistortedSample( cvbgreader->src(Rect(x, y, width, height)), inverse, maxintensitydev,
                                         maxxangle, maxyangle, maxzangle,
                                         1, 0.0, 0.0, &data );
Repository: rust
Issue: Expected identifer error hides other expected tokens
Labels: C-enhancement,A-diagnostics,T-compiler,D-papercut

```
error: expected identifier, found `,`
 --> src/lib.rs:5:18
  |
5 | #[cfg_attr(all(),,)]
  |                  ^ expected identifier
```

I would expect the error message to say ``^ expected identifier or `)` ``. It doesn't because this diagnostic is created by [`expected_ident_found`](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/parser.rs#L797) which ignores the other expected tokens. I wonder if the suggestion can be added to [`expect_one_of`](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/parser.rs#L681) with the rest of the logic.

The same seems to happen for "expected type" e.g. `impl;` saying only "expected type" instead of also expecting a `<` for generics. I'm not sure if I should open another issue for that.
Repository: flutter
Issue: Using copyWith in a degenerative scenario
Labels: framework,c: proposal,a: null-safety,P2,team-framework,triaged-framework

NOTE: this feels like it might be a case of "too bad, too late" in terms of getting any changes into flutter, but I want to raise it anyway to see what feedback I can get.

It appears to be impossible to use `copyWith` in a degenerative scenario. Suppose, for instance, you have an `InputDecoration` and you want to ensure the `errorText` is `null`:

```dart
final effectiveDecoration = decoration.copyWith(errorText: null);
```

This won't have the desired effect because the `copyWith` method does this:

```dart
errorText: errorText ?? this.errorText,
```

So it ignores the request because it can't distinguish between wanting to set `errorText` to `null` and not wanting to set it at all. And in this particular case, one can't even work around it by setting `errorText` to `""` because that still causes an (empty) error message to appear.

The only workaround that I can find is to literally copy the entire object and set the `errorText` to `null`:

```dart
      final effectiveDecoration = InputDecoration(
        errorText: null,
        border: decoration.border,
        contentPadding: decoration.contentPadding,
        counterStyle: decoration.counterStyle,
        counterText: decoration.counterText,
        disabledBorder: decoration.disabledBorder,
        enabled: decoration.enabled,
        enabledBorder: decoration.enabledBorder,
        errorBorder: decoration.errorBorder,
        errorMaxLines: decoration.errorMaxLines,
        errorStyle: decoration.errorStyle,
        fillColor: decoration.fillColor,
        filled: decoration.filled,
        focusedBorder: decoration.focusedBorder,
        focusedErrorBorder: decoration.focusedErrorBorder,
        helperStyle: decoration.helperStyle,
        helperText: decoration.helperText,
        hintStyle: decoration.hintStyle,
        hintText: decoration.hintText,
        icon: decoration.icon,
        isDense: decoration.isDense,
        labelStyle: decoration.labelStyle,
        labelText: decoration.labelText,
        prefix: decoration.prefix,
        prefixIcon: decoration.prefixIcon,
        prefixStyle: decoration.prefixStyle,
        prefixText: decoration.prefixText,
        suffix: decoration.suffix,
        suffixIcon: decoration.suffixIcon,
        suffixStyle: decoration.suffixStyle,
        suffixText: decoration.suffixText,
      );
```

This is obviously super clumsy and not future-proof (fields added to `InputDecoration` will not be copied and won't break the build).

Suggestions?
Repository: rust
Issue: Missed optimization: layout optimized enums produce slow derived code
Labels: A-LLVM,I-slow,A-codegen,T-compiler

Changing

```rust
const FOO_A: u32 = 0xFFFF_FFFF;
const FOO_B: u32 = 0xFFFF_FFFE;
const BAR_X: u32 = 0;
const BAR_Y: u32 = 1;
const BAR_Z: u32 = 2;
struct Foo { u: u32 }
```

https://play.rust-lang.org/?gist=9d1ff0355fbfabbc0c47f15e78e94687&version=nightly&mode=debug&edition=2015

to

```rust
pub enum Bar {
    X, Y, Z
}
enum Foo {
    A,
    B,
    Other(Bar),
}
```

https://play.rust-lang.org/?gist=faf6db37cdc627b1c5f8d582ad5c6779&version=nightly&mode=release&edition=2015

While this will result in pretty much the same layout as before, any derived code on `Foo` will now generate less optimal code. Apparently llvm can't manage to clean that up.

The llvm IR for the first playground link is

```llvm
define zeroext i1 @_ZN10playground3foo17h7604dbf314c89374E(i32, i32) unnamed_addr #0 {
start:
  %2 = icmp eq i32 %0, %1
  ret i1 %2
}
```

while the one for the second link is

```llvm
define zeroext i1 @_ZN10playground3foo17ha662001f5519a11dE(i32, i32) unnamed_addr #0 {
start:
  %2 = add nsw i32 %0, -3
  %3 = icmp ult i32 %2, 2
  %narrow.i = select i1 %3, i32 %2, i32 2
  %4 = add nsw i32 %1, -3
  %5 = icmp ult i32 %4, 2
  %narrow8.i = select i1 %5, i32 %4, i32 2
  %6 = icmp eq i32 %narrow.i, %narrow8.i
  br i1 %6, label %bb6.i, label %"_ZN56_$LT$playground..Foo$u20$as$u20$core..cmp..PartialEq$GT$2eq17h647dd5d9c0e8f1fcE.exit"

bb6.i:                                            ; preds = %start
  %7 = icmp eq i32 %0, %1
  %not.or.cond.i = or i1 %3, %5
  %spec.select.i = or i1 %7, %not.or.cond.i
  br label %"_ZN56_$LT$playground..Foo$u20$as$u20$core..cmp..PartialEq$GT$2eq17h647dd5d9c0e8f1fcE.exit"

"_ZN56_$LT$playground..Foo$u20$as$u20$core..cmp..PartialEq$GT$2eq17h647dd5d9c0e8f1fcE.exit": ; preds = %start, %bb6.i
  %8 = phi i1 [ %spec.select.i, %bb6.i ], [ false, %start ]
  ret i1 %8
}
```

We can't improve the derives, because the derives on `Foo` can't see the definition of `Bar`.
Repository: rust
Issue: Functions still get personality function attached to them when landing pads are disabled
Labels: A-codegen,T-compiler

Compiling with `-Cpanic=abort` or `-Zno-landing-pads` should make associated personality functions entirely unnecessary, yet they still somehow end up getting attached to functions generated with the "current" CG.

Consider for example this function:

```rust
pub fn fails2(a: &mut u32, b: &mut u32) -> i32 {
    ::std::mem::swap(a, b);
    2 + 2
}
```

which when compiled (with or without optimisations) with `-Cpanic=abort`, will contain no personality functions in `1.27.1` but will contain them starting with `1.28`.

<details>
<summary>1.27.1</summary>

```llvm
define i32 @_ZN7example6fails217h8dd58cf9651f12a5E(i32* noalias nocapture dereferenceable(4) %a, i32* noalias nocapture dereferenceable(4) %b) unnamed_addr #0 !dbg !4 {
start:
  %0 = load i32, i32* %a, align 1, !dbg !7, !alias.scope !30, !noalias !33
  %1 = load i32, i32* %b, align 1, !dbg !35, !alias.scope !33, !noalias !30
  store i32 %1, i32* %a, align 1, !dbg !35, !alias.scope !30, !noalias !33
  store i32 %0, i32* %b, align 1, !dbg !36, !alias.scope !33, !noalias !30
  ret i32 4, !dbg !37
}
```

</details>

<details>
<summary>1.28</summary>

```llvm
define i32 @_ZN7example6fails217h203cd5a0beec258bE(i32* noalias nocapture dereferenceable(4) %a, i32* noalias nocapture dereferenceable(4) %b) unnamed_addr #0 personality i32 (i32, i32, i64, %"unwind::libunwind::_Unwind_Exception"*, %"unwind::libunwind::_Unwind_Context"*)* @rust_eh_personality !dbg !4 {
start:
  %tmp.0.copyload.i.i.i = load i32, i32* %a, align 4, !dbg !7, !alias.scope !21, !noalias !24
  %0 = load i32, i32* %b, align 4, !dbg !26, !alias.scope !24, !noalias !21
  store i32 %0, i32* %a, align 4, !dbg !26, !alias.scope !21, !noalias !24
  store i32 %tmp.0.copyload.i.i.i, i32* %b, align 4, !dbg !28, !alias.scope !24, !noalias !21
  ret i32 4, !dbg !31
}
```

</details>

This is technically a codegen regression, albeit very innocuous one.
Repository: vscode
Issue: Open next build error file+line based on regex parsing of build output.
Labels: feature-request,tasks

Edit: The proposed ability to jump to first/next build error should not be part of the "Problems" explorer system, since this requires code analysis. **The command should be based solely on regex parsing of the build output, and should work in absence of any language support aka extensions.** I shouldn't have to run 300mb and jvm in the background just to jump to build errors.

When I run a build task to compile my code, I would like a keyboard shortcut that will open the location of the first/next compile error by opening the file and jumping to the line.

This command should ignore non build related errors and warning (from linters / intellisense). I am not interested in general VSCode problem noise, I just want to be able to quickly and easily address compile errors. 

It should start at the first compile error in the terminal, and cycle from there. Basically, just go see how all other editors in the world jump to build errors with a shortcut.....do that.

Its a pretty basic and necessary feature.

1. Hit build.
2. Jump to error....

The problems view is not adequate.

**1. It requires the language support plugin to be installed.** This is totally unnecessary, as regex parsing of the build output is simpler, lighter, and tried tested and true.  

**2 It is more than a single hotkey press.** In sublime when I build, I press a single shortcut to jump to error, then I fix error, I press a single shortcut to jump to next error....rinse and repeat.

In VSCode I...
-press a shortcut to focus problems
-I press down to highlight error
-I press ENTER to focus editor and the fix error
-I press shortcut to focus problems view again

Its so much more work! 

**3. It does not cycle problems in order.** This is important, as when compiling, often the first build error is also causing the subsequent errors.
Repository: go
Issue: cmd/go: retry failed fetches
Labels: NeedsInvestigation,FeatureRequest,early-in-cycle,modules

```
$ go version
go version go1.11.1 darwin/amd64
```

```go
package main

import (
	_ "github.com/google/go-cloud/wire/cmd/wire"
)

func main() {
	//
}
```

```
go build -o a.out
go: finding github.com/google/go-cloud/wire/cmd/wire latest
go: finding github.com/google/go-cloud/wire/cmd latest
go: finding github.com/google/go-cloud/wire latest
go: finding google.golang.org/api v0.0.0-20180606215403-8e9de5a6de6d
go: google.golang.org/api@v0.0.0-20180606215403-8e9de5a6de6d: git fetch -f https://code.googlesource.com/google-api-go-client refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /Users/chai/go/pkg/mod/cache/vcs/9e62a95b0409d58bc0130bae299bdffbc7b7e74f3abe1ecf897474cc474b8bc0: exit status 128:
        error: RPC failed; curl 18 transfer closed with outstanding read data remaining
        fatal: The remote end hung up unexpectedly
        fatal: early EOF
        fatal: index-pack failed
go: error loading module requirements
```
Repository: godot
Issue: Need 'brush_transfer' func for 3.0/3.1
Labels: enhancement,topic:core

**Godot version:**
3.1  alpha

**Issue description:**
Miss function in Image Class compared with Godot 2.1.
Repository: vscode
Issue: Centered layout should be per workbench, not per editor area
Labels: feature-request,layout,workbench-zen

With centered editor layout enabled (with or without zen mode), toggling the side bar on/off will resize the sashes. Even though there is enough real-estate for the side bar to show without doing so. To illustrate this behavior, look at the left sash in both these screenshots.

1.
![1](https://user-images.githubusercontent.com/30827238/46919994-db64a000-cfe7-11e8-8ff8-7d718cf85880.PNG)

2.
![2](https://user-images.githubusercontent.com/30827238/46919995-de5f9080-cfe7-11e8-98ae-44910a3764db.PNG)

This illustrates the "jumpiness" when opening the side bar in this scenario. It would be preferable that the sashes were not moved unless needed.
Repository: create-react-app
Issue: Check Node version early
Labels: tag: enhancement,difficulty: starter,contributions: claimed,good first issue

We need to add better Node version checks. The current one doesn’t cover all requirements (like Node >= 8.9.0).
Repository: flutter
Issue: ListView should have a addKeepAlive field
Labels: c: new feature,framework,f: scrolling,P3,team-framework,triaged-framework

ListView adds AutomaticKeepAlives by default. When things scroll off screen, the list items are deleted. To work around this, I've been calling `KeepAliveNotification(KeepAliveHandle()).dispatch(context)` for every item in the `ListView`. I believe it would be cleaner to have an option for adding a `KeepAlive` instead of an `AutomaticKeepAlive`.
Repository: create-react-app
Issue: Compile JSX to direct createElement() calls
Labels: contributions: up for grabs!,tag: enhancement,difficulty: medium

Due to how webpack works today with CommonJS, we pay the cost of *three* object property accesses (`ReactWebpackBinding.default.createElement`) for every JSX call. It doesn't minify well and has a minor effect on runtime performance. It's also a bit clowny.

We should fix this to compile JSX to something like

```js
var createElement = require('react').createElement

createElement(...)
```

Could be a custom Babel transform. Could be a transform that inserts `_createReactElement` into scope and specifies it as the JSX pragma.
Repository: three.js
Issue: ArrayCamera: Compute frustum based on sub-cameras.
Labels: Enhancement

ArrayCamera only extends and only supports Perspective Cameras.