WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
fn main() {
let mut x = 1us;
let y = &x;
&mut x;

}

test2.rs:10:2: 10:2 note: previous borrow ends here
test2.rs:1 fn main() {
...
test2.rs:10 }
^

Issue 2:
For example, in this case there should be two spaces between 8 and fn instead of one.

test2.rs:8:1: 12:2 warning: code is never used: `foo`, #[warn(dead_code)] on by default
test2.rs:8 fn foo() {
test2.rs:9
test2.rs:10
test2.rs:11
test2.rs:12 }
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I need to bump up the default 100KB bodyParser raw.js limit but I can't seem to figure out the right way in Next.js 5.1.0

I tried adding it to index.js but with no effect:

expressApp.use(bodyParser.raw({ limit: '5mb' }));

I also modified the raw.js vendor file to make sure it would work if the value was increased.

Long story short, how would I go about modifying the raw body-parser limit?

PayloadTooLargeError: request entity too large at readStream (/Users/xxx/node_modules/raw-body/index.js:155:17) at getRawBody (/Users/xxx/node_modules/raw-body/index.js:108:12) at read (/Users/xxx/node_modules/body-parser/lib/read.js:77:3) at jsonParser (/Users/xxx/node_modules/body-parser/lib/types/json.js:134:5) at Layer.handle [as handle_request] (/Users/xxx/node_modules/express/lib/router/layer.js:95:5)

Issue 2:
The build process does not recognise shared files when your pages export an imported or wrapped component.

A common way of batching multiple getInitialProps is to wrap your pages in multiple HOC's - however doing this causes these issues described here.

I'll try to explain using moment as an example dependency.

These three files are identical.

pages/one/index.js
pages/two/index.js
pages/three/index.js

Broken Page Structure

Doesn't bundle correctly, one.js, two.js and three.js include the moment code.

import View from './View';
import moment from 'moment';

export default View;

Working Page Structure

Bundles correctly, app.js includes the moment code

import moment from 'moment';

export default () => "page one"

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

The app.js file to include all shared files between pages regardless of how the page is exported.

Current Behavior

Each page is bundled with the same files causing duplicate code to be downloaded across pages.

Steps to Reproduce (for bugs)

Clone https://github.com/stevebluck/next-test

yarn install

yarn build

yarn start-broken

Open a new terminal tab and run yarn start-working

Open 2 browser tabs at http://localhost:3000/one and http://localhost:4000/one

Compare the bundles, port 4000 is the working version

Context

Bundles are too large

Your Environment

Tech
Version

next
canary

node
8.9.0

OS
MacOS high Sierra 10.13.3

browser
Chrome/any
Issue 1:
Nicholas Daley (at Firecrest) opened SPR-6070 and commented

CookieGenerator.cookieMaxAge's setter uses the primitive type 'int', but the getter uses 'Integer'. This seems to stop this property from being configured through the spring configuration xml file.

If it's important, I'm actually using a subclass of CookieGenerator.

Somebody in the forums had a similar problem:

http://forum.springsource.org/showthread.php?p=254675

Partial stacktrace:

Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'cookieMaxAge' of bean class [org.jasig.cas.web.support.CookieRetrievingCookieGenerator]: Bean property 'cookieMaxAge' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:850)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:701)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:60)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1330)
... 55 more

Affects: 3.0 M4

Issue Links:

#10750 cookieMaxAge field fails in org.springframework.web.servlet.i18n.CookieLocaleResolver ("is duplicated by")

Referenced from: commits d0c8545

Issue 2:
Ihor Mysak opened SPR-9668 and commented

our old methods with signature like:

@RequestMapping(value = "/write-review", method = RequestMethod.POST)

public Object writeReview(.....

was successfully works with response:

return "redirect:/some-url";

on old DefaultAnnotationHandlerMapping/AnnotationMethodHandlerAdapter

but after migration on RequestMappingHandlerMapping/RequestMappingHandlerAdapter this method was broken.

We fix it just rename return-type from Object to String.

But we waste a lot of time to find the problem. Will be great to fix it, or at least to document this behavior.

Affects: 3.1.1

Issue Links:

#14256 Backport "Value-oriented return method handling broken in 3.1" ("duplicates")
Issue 1:
Version

2.7.14

Reproduction link

stackblitz.com

Steps to reproduce

// Comp.vue
defineProps<{ msg: boolean | null }>();

<!-- App.vue -->
<template>
<Comp :msg="null" />
</template>

What is expected?

No warnings

Vue 3: https://sfc.vuejs.org/#__DEV__eNp9kLtuwzAMRX+F0JIEiKXdcAMU3Tq0BbpqcRzaVWA9QMkpClf/XqrpIw8gmy55eUWeWdyHIA8Tilo0sSMTEkRMU9hoZ2zwlODB2wA9eQsLqYoo9oV2jTr62ckioQ1jm5AVQNOVmbr3/k4LN42jFqC406g/m1iLY35l2yD30TveYC7D+qcRtajhu1Jq/GfRWrylFGKtVOy7ssg+Sk+D4pekySVjUWK01Zb8e0TiYC3WJxmKiwekitDtkJBuZV5Yr3JLbNYu8ym/WC4pwti6gRmUY/j+HfbG4Qv5EJsZGE8NW+9HbB18QuEEebNcnaH9BzvP8Pj6/CRjIuMG038sOWAFOZ9SzV97tqJr

What is actually happening?

Invalid prop type: "null" is not a constructor and Invalid prop: type check failed for prop "msg". Expected Boolean, , got Null warnings

Additional notes

Warnings per se are not the issue, they can be fixed by changing the prop definition to msg?: boolean which also accepts booleans, the issue is that this behaviour is not same as in Vue 3

Issue 2:
What problem does this feature solve?

Redundant properties (and low cohesion for each) for asynchronous evaluation:

为了异步求值虚设条目（并降低每个功能的内聚性）：

<template>
<div>{{ result1 }} {{ result2 }}</div>
</template>

<script>
export default {
props: ["url1", "url2"],
data () {
return {
result1: "",
result2: ""
};
},
watch: {
async url1 (url1) {
this.result1 = await getPromise(url1);
},
async url2 (url2) {
this.result2 = await getPromise(url2);
}
}
};
</script>

What does the proposed API look like?

<template>
<div>{{ result1 }} {{ result2 }}</div>
</template>

<script>
export default {
props: ["url1", "url2"],
computed: {
result1 () {
return getPromise(this.url1);
},
result2 () {
return getPromise(this.url2);
}
}
};
</script>
Issue 1:
Currently the Configure Task Runner action generates a large task.json file with many different task configurations, that the user has to clean-up eventually, that is, delete the configs that do not apply.

Instead of generating one large file we should allow the user to select what kind of task that should be configured and then to only generate this one. This is similar to how we generate the launch configurations.

Issue 2:
I have three questions:

first of all why do I have eight process of VS Code?

then why VS Code is consuming something like 522096KB of memory? Isn't that too much?

and last, if electron allow 64-bit build why VSC still target 32-bit ?http://electron.atom.io/docs/v0.36.0/development/build-instructions-windows/#64bit-build

Extra info:

I'm running windows 7 ultimate x64. 6GB memory, and this processor http://www.notebookcheck.net/AMD-A-Series-A6-3400M-Notebook-Processor.55753.0.html. VSC version 0.10.6

I took that screenshot with a small project (12 files, and 18 folders) on VSC, and with no file editing.
Issue 1:
The following code results in corrupt output: (Ubuntu 12.04 LTS, rust master pulled 25th Feb)

let arr : ~[&str] = std::os::args()[1].split_str("::").collect();
std::io::println("first " + arr[0]);
std::io::println("first again " + arr[0]);

$ rustc isolate_issue.rs

$ ./isolate_issue "foo::bar"

first fir

first again

Ashish Myles noted that an earlier version of rust failed to compile this code, giving an error about the reference to the return value of std::os::args() not being valid for the duration of its use.

https://mail.mozilla.org/pipermail/rust-dev/2014-February/008796.html

Pulling 'args' into a separate local variable works:

let args = std::os::args();
let arr : ~[&str] = args[1].split_str("::").collect();
std::io::println("first " + arr[0]);
std::io::println("first again " + arr[0]);

$ ./isolate_issue "foo::bar"

first foo

first again foo

Issue 2:
Updated bug

The compiler allows this code when it shouldn't

fn main() {
let a = ~"";
let b: ~[&str] = a.lines().collect();
drop(a);
for s in b.iter() {
println!("{}", *s);
}
}

Original description

The following code is buggy:

let foo = ~"hello";
let foo: ~[&str] = foo.words().collect();
let invalid_string = foo[0];

Invalid string contains, as the name suggests, an invalid string; sometimes I get a string filled with \x00, sometimes just garbage, and usually it will eventually assert that the string contains invalid characters.

It appears that the first foo gets dropped when the second one is assigned?

Either the first foo is supposed to be dropped as happens now, and the borrow checker should forbid this code (since the old foo no longer exists, &str cannot have a lifetime), or it should let the first foo live until the end of the current scope, and make the above work.
Issue 1:
I try to load an image with opencv and work further on it with the tensorflow framework. Unfortunately I get a really weird behaviour:

The image is loaded without problems using cc_binary(...) in Bazel. Changing it to tf_cc_binary(...) doesn't stop the code from compilation or running, but opencv can't load any images any more.

Source code / logs

This is my BUILD file:

load("//tensorflow:tensorflow.bzl", "tf_cc_binary")

#tf_cc_binary( <-- using this, no image could be loaded anymore
cc_binary(
name = "main",
srcs = ["main.cpp"],
linkopts = [
"-lopencv_core",
"-lopencv_highgui",
"-lopencv_imgcodecs",
"-lopencv_imgproc",
],
visibility=["//visibility:public"]
)

I use the standard example code from the opencv website. Again, it is working and the image gets loaded using cc_binary(:

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main( int argc, char** argv )
{
Mat image;
image = imread("tensorflow/test/imageHolder/data/example.jpg", CV_LOAD_IMAGE_COLOR); // Read the file

if(! image.data ) // Check for invalid input
{
cout << "Could not open or find the image" << std::endl ;
return -1;
}

namedWindow( "Display window", WINDOW_AUTOSIZE );// Create a window for display.
imshow( "Display window", image ); // Show our image inside it.

waitKey(0); // Wait for a keystroke in the window
return 0;
}

This is my file structure in case it matters:

├── data
├── example.jpg
└── src
├── BUILD
├── main.cpp

Issue 2:
Environment info

Operating System: Ubuntu 14.04.

If installed from sources, provide the commit hash: f952246

Steps to reproduce

$ python2 -c "import tensorflow; import cv2; print cv2.imread('cat.jpg')"
None

What have you tried?

import cv2 before tensorflow works.

This problem also exists on CentOS 7. It doesn't happen on a latest ArchLinux.

It's likely due to that tensorflow has it's own libjpeg that conflicts with opencv on some platforms.
Issue 1:
I am trying to compile Rust 0.12 on Debian Sid and it fails at the docs step.

Running make docs will show the same issue:

root@deli:/home/borisov/src/rust-0.12.0 # make docs
cfg: build triple x86_64-unknown-linux-gnu
cfg: host triples x86_64-unknown-linux-gnu
cfg: target triples x86_64-unknown-linux-gnu
cfg: enabling more debugging (CFG_ENABLE_DEBUG)
cfg: host for x86_64-unknown-linux-gnu is x86_64
cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu
cfg: using CC=gcc (CFG_CC)
cfg: no llnextgen found, omitting grammar-verification
latex compiler: doc/guide.pdf
This is LuaTeX, Version beta-0.79.1 (TeX Live 2015/dev/Debian) (rev 4971)
restricted \write18 enabled.
/home/borisov/src/rust-0.12.0/mk/docs.mk:216: recipe for target 'doc/guide.pdf' failed
make: *** [doc/guide.pdf] Error 1

I haven't a found any log file with more information, but I admit I didn't look too hard. Let me know what more information I can provide.

Issue 2:
rustdoc: doc/guide.html
pandoc: doc/guide.tex
/usr/bin/pandoc --standalone --toc --number-sections --include-before-body=doc/version.tex --from=markdown --include-before-body=doc/footer.tex --to=latex /home/liigo/rust/rust/src/doc/guide.md --output=doc/guide.tex
latex compiler: doc/guide.pdf
This is LuaTeX, Version beta-0.70.2-2012070300 (TeX Live 2012/Debian)
restricted \write18 enabled.
make: *** [doc/guide.pdf] Error 1
Issue 1:
Hello,

I'm using axios 0.17.1.

When I send a request to my API with axios and that my server returns a 302 status code (redirection), the error.response object is undifined on catch function. The error object I have when a 302 request is send :

My server is working properly and returning code 302, I can see it in firefox console. I also tried the request on postman.

Is anyone can help me ?

Thank you,

Ben.

Issue 2:
Summary

Sending a JSON response with status code 302 and some payload from the server (Laravel 5.5) results in error.response.data being undefined in error handler on IE only (Chrome, Firefox, Safari, Opera do not seem affected, payload data is available as you would expect). error.response.request.response and error.response.request.responseText are empty string as well. Seems like IE is notorious for having these kind of issues

Context

axios version: v0.17.0

Environment: php v7.0.22, edge 16, windows 10
Issue 1:
As above - this particular structure causes the following fold to duplicate when unfolded, then throws an error on further folding.

Dev console spits out

Uncaught TypeError: Cannot call method 'getBufferRange' of undefined

/Applications/Atom.app/Contents/Resources/app/src/editor-view.js:846

Issue 2:
Every time I go to add a file to Ignored Names the settings page scrolls to the bottom on me and I have to manually scroll back up.
Issue 1:
In Electron's repo, there are some kinds of other foreign languages' documents translated by some contributors(Thanks all for them).

It's quite nice for the native beginner, but there is an out-of-date issue of them. As the project developed, many new-added features and changes will cause the document updated. Right now we only keep the official document(English) updated.

I think we should figure out a way to keep all the translated document updated. I post a discussion here.

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

App crashing after file upload window appears

Electron Version:

6.0.0 beta 3

Operating System:

macOS 10.14.5 / 10.14.6 beta 1

Last Known Working Electron version:

5.0.1

Expected Behavior

Electron does not crash

Actual Behavior

App crashing after file upload window appears

To Reproduce

Install Electron v6.0.0 beta 3

Add input type file

Click on upload file input

Repo fork:

https://github.com/JB1905/electron-quick-start
Issue 1:
I'm submitting a ... (check one with "x")

[X ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

A routed component cannot use a relative path to navigate to another component; whether from the primary changing the named router outlet, or from a named router changing the primary.

The issue is written up here.

The closest routerLink syntax to navigating to a new named router outlet component is:

<a [routerLink]="['', {outlets: {aux: ['details']}}]">Details</a>

However, when a routed component is already in the aux named route, this routerLink produces an extra set of parenthesis.

auth/portfolio/(home/1//aux:details)(aux:details)

If a routed component isn't already in the aux named route, then the url generated is malformed anyway.

auth/portfolio/(home/1)(aux:details)

Expected behavior

I would expect to be able to change to another route via a routerLink like the documentation says, regardless of the depth I am in the URL tree.

Minimal reproduction of the problem with instructions

https://plnkr.co/edit/uoUBG6yDfNb6P0oLKN16?p=preview

What is the motivation / use case for changing the behavior?

We have an application where the named router outlet is used to display lists of entities. Upon selecting an entity, the application replaces the primary router outlet with the details of the entity. Entity details control which lists are available, so navigation occurs in the primary router outlet to change which component is showing in the named router outlet.

Please tell us about your environment:

Azure App Services

Angular version: 2.4.7

https://unpkg.com/@angular/router@3.4.7/bundles/router.umd.js

Browser:

Chrome 56

Language: [all | TypeScript X.X | ES6/7 | ES5]

Node (for AoT issues): node --version =

Issue 2:
I'm submitting a ...

[X] bug report

Current behavior

I have some routes like:

const routes = [
{ path: "", component: HomeComponent, pathMatch: "full" },
{ path: "profile", component: ProfileComponent },
{ path: "menu", component: MenuComponent, outlet: "sidebar" },
];

When the route http://localhost/(sidebar:menu) is open, then I'm able to remove the named outlet and go to http://localhost/ by clicking an anchor like the following:

<a [routerLink]="['', {outlets: {sidebar: null}}]">
Close
</a>

What doesn't work is navigating away from the sidebar and also going to another route like http://localhost/profile.

<a [routerLink]="['/profile', {outlets: {sidebar: null}}]">
Close
</a>

The link that is rendered is http://localhost:3971/profile(sidebar:menu)

Expected behavior

The link that should be rendered is http://localhost:3971/profile.

Repro

https://github.com/tinchou/router-repro

Please tell us about your environment:

Windows 10, Visual Studio 2017

Angular version: 2.3.1 (didn't work with 2.1.0 either)

Browser: all

Language: TypeScript 2.0.10
Issue 1:
This results in a brand new init of a React Native project template failing on yarn tsc --noEmit -p . as raised in this issue here: react-native-community/react-native-template-typescript#203

As of right now, the solution is to patch one of the two type libraries to remove the AbortSignal and AbortController definitions.

Issue 2:
I tried using the @types/xxxx package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @rbuckton

It seems that there is some issues with the 0.9.37 core-js package and tsc 2.2.1

I get a lot of compiler errors: (just a clipout of them)

node_modules/@angular/core/src/facade/lang.d.ts(12,17): error TS2693: 'Map' only refers to a type, but is being used as a value here.

node_modules/@angular/core/src/facade/lang.d.ts(13,17): error TS2693: 'Set' only refers to a type, but is being used as a value here.

node_modules/@types/core-js/index.d.ts(47,36): error TS2304: Cannot find name 'Iterable'.

node_modules/@types/core-js/index.d.ts(350,48): error TS2304: Cannot find name 'PropertyKey'.

node_modules/@types/core-js/index.d.ts(351,52): error TS2304: Cannot find name 'PropertyKey'.

node_modules/@types/core-js/index.d.ts(352,34): error TS2304: Cannot find name 'PropertyKey'.

node_modules/@types/core-js/index.d.ts(353,34): error TS2304: Cannot find name 'PropertyKey'.

node_modules/@types/core-js/index.d.ts(354,34): error TS2304: Cannot find name 'PropertyKey'.

node_modules/@types/core-js/index.d.ts(355,61): error TS2304: Cannot find name 'PropertyKey'.

.....

node_modules/@types/core-js/index.d.ts(2103,41): error TS2339: Property 'toStringTag' does not exist on type 'SymbolConstructor'.

node_modules/@types/core-js/index.d.ts(2107,41): error TS2339: Property 'unscopables' does not exist on type 'SymbolConstructor'.

node_modules/rxjs/Observable.d.ts(69,60): error TS2693: 'Promise' only refers to a type, but is being used as a value here.

node_modules/rxjs/operator/toPromise.d.ts(3,79): error TS2693: 'Promise' only refers to a type, but is being used as a value here.

typescript\shared\login.component.ts(81,62): error TS2339: Property 'find' does not exist on type 'Unit[]'.

typescript\shared\login.component.ts(81,62): error TS2339: Property 'find' does not exist on type 'Unit[]'.

With the 0.9.35 everything works as expected.

I am wondering if it is the change in ts.config from es5 to ef2017 that causes this? Can't really see that any of the other changes could have done this?
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

v9.0.4

Operating System:

Windows 10 (1903), macOS 10.15.5, SparkyLinux 5.11 (Debian Buster)

Last Known Working Electron version:

Unknown

Expected Behavior

Use either setSize or setBounds to resize a window to the dimensions of the background image (explicit dimensions passed).

Actual Behavior

In Linux, this behavior works as expected. In Windows and macOS, it does not work as expected. When running getBounds, it matches what is set with setBounds, however, the background image (which has identical dimensions) is cut off.

To Reproduce

Occurs in my repo here. The code is specifically:

const win = require("electron").remote.BrowserWindow.getFocusedWindow();
win.setMinimumSize(skinJson.width, skinJson.height)
win.setBounds({width: skinJson.width, height: skinJson.height})

Where skinJson.width and skinJson.height are the dimensions of the background image.

Screenshots

Here is an example of it working correctly in Linux.

Here is an example of not working correctly in Windows and an example in macOS.

Additional Information

This is closest to #16711, but it was closed for being a duplicate of #15560, but that's not the case. With regards to the latter, the workaround of setMinimumSize works to resize smaller. However, setSize and setBounds (tested both) work differently in Windows and macOS than it does in Linux. Having resizeable be true or false has no impact on it's functionality (however I ended up setting it to true just to allow users to fit the background image, but that's not a desirable outcome).

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

11.x, 12.x, 13.x

What operating system are you using?

Windows

Operating System Version

Windows 10 Pro (10.0.19042 Build 19042)

What arch are you using?

x64

Last Known Working Electron version

N/A

Expected Behavior

This revives #7049 for recent versions of electron.

When using 32bit electron on 64bit windows, the renderer should not crash.

Actual Behavior

Loading certain pages will cause the web contents to crash if 32bit electron is installed on a 64bit windows machine. A few examples:

https://www.similarweb.com/

https://www.calm.com/

Testcase Gist URL

No response

Additional Information

Here's a minimally reproducible example which crashes with a stack overflow on 64bit windows:

32bit-electron-demo.zip

To run:

npm install --arch=ia32 electron
node_modules/.bin/electron main.js

It can take up to 20s for the crash to happen.