WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Bug report

What is the current behavior?

When I try to import react-redux from my client code the server throws this error:

$ node dist/ssr-server.js
internal/modules/cjs/loader.js:1153
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/dev/testssr/node_modules/@babel/runtime/helpers/esm/extends.js
require() of ES modules is not supported.
require() of /home/dev/testssr/node_modules/@babel/runtime/helpers/esm/extends.js from /home/dev/testssr/dist/ssr-server.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename extends.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/dev/testssr/node_modules/@babel/runtime/helpers/esm/package.json.

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:13)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at eval (webpack:///external_%22@babel/runtime/helpers/esm/extends%22?:1:18)
at Object.@babel/runtime/helpers/esm/extends (/home/dev/testssr/dist/ssr-server.js:456:1)
at __webpack_require__ (/home/dev/testssr/dist/ssr-server.js:21:30)
at eval (webpack:///./client/node_modules/react-redux/es/components/connectAdvanced.js?:3:92)
at Module../client/node_modules/react-redux/es/components/connectAdvanced.js (/home/dev/testssr/dist/ssr-server.js:134:1) {
code: 'ERR_REQUIRE_ESM'
}

If the current behavior is a bug, please provide the steps to reproduce.

I've uploaded a simple reproduction of the error: https://github.com/l09a/webpack-babel-bug

To reproduce:

$ git clone https://github.com/l09a/webpack-babel-bug
$ cd webpack-babel-bug/client
$ npm i
$ cd ..
$ npm i
$ npm start
$ node dist/ssr-server.js

What is the expected behavior?

The code runs without error.

Other relevant information:

webpack version: 5.1.0

Node.js version: v12.18.4

Operating System: Ubuntu 20.04.1 LTS

Additional tools:

Issue 2:
Bug report

What is the current behavior?

When saving a file it appears Webpack is recompiling twice.

If the current behavior is a bug, please provide the steps to reproduce.

Create a barebones project test.zip. Run Webpack in watch mode. Save a file.

What is the expected behavior?

It should only recompile once.

Other relevant information:

webpack version: 5.69.1

Node.js version: 14.15.4

Operating System: Mac OS 11.6.4

Additional tools: yarn 1.22.5
Issue 1:
It would be great if we could use v-bind with an object of attributes to pass props to a component.

<component is="component" v-bind="data"></component>

Currently we need to explicitly state the props we are passing to the component.

<component is="component" :prop-a="propA" :prop-b="propB"></component>

http://jsbin.com/yudivokovi/edit?html,js,output

Issue 2:
What problem does this feature solve?

It's very difficult to read the docs for long time due to light theme. Please made a dark theme toggle

What does the proposed API look like?

.
Issue 1:
var x = function() {
if (!y) {
y = 1;
}
};
x();
var y = null;

The binding object for y:

constant: true,
references: 0,
referenced: false,

expected:

constant: false,
references: 2,
referenced: true,

Issue 2:
This results in a constant binding:

bar = 2;
var bar = 1;

So does this:

function foo() {
bar = 2;
}
var bar = 1;

According to scope.bindings.bar.constant, but I would expect it to be false.

(Babel 5.8.25)
Issue 1:
ShardingSphere v5.1.2 XA transaction has errors, When spring boot integrations start running.

The running logger info:

So, How should I use XA transactions? Thanks a lot.

Issue 2:
Which version of ShardingSphere did you use?

5.1.2

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-JDBC

Expected behavior

atomikos works well under 5.1.2. because it is normal in 5.0.0

Actual behavior

Caused by: java.lang.AbstractMethodError: com.atomikos.icatch.jta.JtaTransactionServicePlugin.beforeInit()V

at com.atomikos.icatch.config.Configuration.notifyBeforeInit(Configuration.java:417)

at com.atomikos.icatch.config.Configuration.init(Configuration.java:389)

at com.atomikos.icatch.config.UserTransactionServiceImp.initialize(UserTransactionServiceImp.java:100)

at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:189)

at org.apache.shardingsphere.transaction.xa.atomikos.manager.AtomikosTransactionManagerProvider.init

(AtomikosTransactionManagerProvider.java:46)

at org.apache.shardingsphere.transaction.xa.XAShardingSphereTransactionManager.init

(XAShardingSphereTransactionManager.java:56)

at org.apache.shardingsphere.transaction.ShardingSphereTransactionManagerEngine.lambda$init$0

(ShardingSphereTransactionManagerEngine.java:67)

at java.util.Map.forEach(Map.java:630)

at org.apache.shardingsphere.transaction.ShardingSphereTransactionManagerEngine.init

(ShardingSphereTransactionManagerEngine.java:67)

at org.apache.shardingsphere.transaction.context.TransactionContextsBuilder.build(TransactionContextsBuilder.java:54)

at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.createContextManager

(ClusterContextManagerBuilder.java:154)

at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.build

(ClusterContextManagerBuilder.java:76)

Reason analyze (If you can)

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

spring boot startup error

Example codes for reproduce this issue (such as a github link).
Issue 1:
Hi, the following attempt to take the gradient of a function involving a matrix exponential

import jax.numpy as jnp
import jax
from jax.scipy.linalg import expm

def foo(mat):
return jnp.sum(expm(mat))

grad = jax.grad(foo)(jnp.eye(2))

is failing with the following assertion error

~/anaconda3/envs/envname/lib/python3.7/site-packages/jax/interpreters/ad.py in linearize(traceable, *primals, **kwargs)
96 pval_primals, pval_tangents = tree_unflatten(out_tree(), out_pvals)
97 aval_primals, const_primals = unzip2(pval_primals)
---> 98 assert all(aval_primal is None for aval_primal in aval_primals)
99 if not has_aux:
100 return const_primals, pval_tangents, jaxpr, consts

AssertionError:

I'm using jax.__version__ == 0.1.62 and jaxlib.__version__ == 0.1.43, thanks!

Issue 2:
The pull request #2062 implements the jvp of the matrix exponential by using the Fréchet derivative. I think the vjp can be easily added by transposing the input matrix in expm_frechet:

defvjp(expm, lambda g, ans, matrix: expm_frechet(_T(matrix), g, compute_expm=False))

I can test and implement this solution if #2062 is merged.
Issue 1:
The "fetch" function does not allow to modify the "host" in the request header, resulting in the inability to implement the proxy request of the reverse proxy server.

This can be done in nodejs.

This is not possible in deno.

import { serve } from "https://deno.land/std@0.144.0/http/mod.ts";
import { assertEquals } from "https://deno.land/std@0.144.0/testing/asserts.ts";

Deno.test("http-request-host", async () => {
const ac = new AbortController();
const { signal } = ac;
const p = serve(async (req) => new Response(req.url), {
signal,
port: 5000,
});
const response = await fetch("http://127.0.0.1:5000/", {
headers: { host: "localhost.hello.world:9900" },
});
const text = await response.text();
assertEquals(text, "http://localhost.hello.world:9900/");
ac.abort();
await p;
});

http-request-host ... FAILED (30ms)

ERRORS

http-request-host => ./test.ts:4:6
error: AssertionError: Values are not equal:

[Diff] Actual / Expected

- http://127.0.0.1:5000/
+ http://localhost.hello.world:9900/

throw new AssertionError(message);
^
at assertEquals (https://deno.land/std@0.144.0/testing/asserts.ts:176:9)
at file:///C:/Documents/test/test.ts:15:5

FAILURES

http-request-host => ./test.ts:4:6

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out (59ms)

error: Test failed

Issue 2:
Hey, I've look for the similar problem in stackoverflow and here in the repository but I haven't found anything. I hope it's not a duplicate.

I'm running subprocess command using code like this:

const process = Deno.run({ cmd, stdout: "piped", stderr: "piped" });

const buffer = await process.output();
const str = new TextDecoder().decode(buffer);
console.log(str);

process.close();

The command that I'm running is "persistent"/"not exiting" and it doesn't close but just waits for the connections and then it displays some data to the output. However, Deno expects subprocess to close and then display some data. I've also tried iterating over stdout with Deno.iter but the same effect - nothing is logged to the console.

How can I run "persistent"/"not exiting" subprocess and still be able to get output whenever something is written to stdout?
Issue 1:
i have copied the code in the ”Usage“ part to my project，and i have imported the react.js and JSXTransformer.js in my project. But why there's no button appear in the browser?

Issue 2:
When I customized the fontSize of my Inputs, side-by-side Select and TextField components became vertically misaligned by one pixel:

The JSS for Select overrides the height, lineHeight, paddingTop, and paddingBottom of the input-singleLine class, wrecking the vertical alignment. It seems to me all of the vertical sizing properties should match.

I will create a PR in a moment.

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

Expected Behavior

Select has same height, lineHeight, and vertical padding as Input by default.

Current Behavior

Steps to Reproduce (for bugs)

Customize Input fontSize:

theme.overrides = {
MuiInput: {
root: {
fontSize: theme.typography.pxToRem(20),
},
},
}

Render a Select and a TextField side-by-side:

<table>
<tbody>
<tr>
<td>
<Select value="default">
<MenuItem value="default">Select</MenuItem>
<Select>
</td>
<td>
<TextField placeholder="TextField" />
</td>
<tr>
</tbody>
</table>

Workaround

Use the following theme override:

MuiSelect: {
// see https://github.com/mui-org/material-ui/issues/9826
select: {
padding: undefined,
paddingRight: theme.spacing.unit * 4,
height: undefined,
},
selectMenu: {
lineHeight: undefined,
},
},

Context

Your Environment

Tech
Version

Material-UI
1.0.0-beta.25

React
16.2.0

browser
Chrome 63.0.3239.132
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

The following template describes using a structural directive with 2 options:

<h1 *myDirective="firstOption: true; secondOption: false">Hello</h1>

But writing such a template results in the error: Error: Template parse errors: TypeError: Cannot read property 'toUpperCase' of undefined.

Expected behavior

<h1 *myDirective="firstOption: true; secondOption: false">Hello</h1>

should de-sugarize to:

<template myDirective [myDirectiveFirstOption]="true" [myDirectiveSecondOption]="false">
<h1>Hello</h1>
</template>

This is what the microsyntax documentation describes.

Minimal reproduction of the problem with instructions

http://plnkr.co/edit/sMFv2iGJoOdCRlWpIs40?p=preview

The plunker crashes with the described error.

Using the manually de-sugarized

<ng-template myDirective [myDirectiveFirstOption]="true" [myDirectiveSecondOption]="false">

makes it work fine.

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

When writing reusable components and directives, offering the asterisk syntax is an important part of making the API easy to learn and understand. It follows the *ngIf and *ngFor lead people are used to.

Angular version: 2.4.X

Browser: all

Language: all

Issue 2:
See example: http://plnkr.co/edit/9GdLbXM0mh5zHPKhcwCL?p=info

Both of these should parse correctly:

<div *bsPane="title exp"></div>
<div *bsPane="title: exp"></div>

Given:

@Directive({
selector: '[bsPane]'
})
class Foo {
@Input() bsPaneTitle: string;
}

instead get error:

Can't bind to 'bsPane' since it isn't a known native property ("
Demo:
<div [ERROR ->]*bsPane="title 'Overview'"></div>
<div *bsPane="title 'Summary'"></div>"): DiDemo@2:9
Property binding bsPane not used by any directive on an embedded template ("
Demo:
[ERROR ->]<div *bsPane="title 'Overview'"></div>
<div *bsPane="title 'Summary'"></div>"): DiDemo@2:4
Can't bind to 'bsPane' since it isn't a known native property ("
Demo:
<div *bsPane="title 'Overview'"></div>
<div [ERROR ->]*bsPane="title 'Summary'"></div>"): DiDemo@3:9
Property binding bsPane not used by any directive on an embedded template ("
Demo:
<div *bsPane="title 'Overview'"></div>
[ERROR ->]<div *bsPane="title 'Summary'"></div>"): DiDemo@3:4```

and

EXCEPTION: Template parse errors:
Parser Error: Unexpected token :, expected identifier, keyword, or string at column 13 in [bsPane title: 'Overview'] in DiDemo@2:9 ("
Demo:
<div [ERROR ->]*bsPane="title: 'Overview'"></div>
<div *bsPane="title: 'Summary'"></div>"): DiDemo@2:9
Parser Error: Unexpected token :, expected identifier, keyword, or string at column 13 in [bsPane title: 'Summary'] in DiDemo@3:9 ("
Demo:
<div *bsPane="title: 'Overview'"></div>
<div [ERROR ->]*bsPane="title: 'Summary'"></div>"): DiDemo@3:9
Issue 1:
Environment

Windows build number: 10.0.18363.836
PowerToys version: v0.18.0
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run

Steps to reproduce

Open Run with alt+space

Search for a file, for instance DNI.jpg

Run finds the file

Select the file and press enter or click on it

Expected behavior

The file should be opened.

Actual behavior

Run window is closed but file is not opened.

If I click on "Open containing folder", the explorer gets opened on "This PC" location.

Screenshots

Issue 2:
Environment

Windows build number: Microsoft Windows [Versione 10.0.19041.264]
PowerToys version: 0.18.0
PowerToy module for which you are reporting the bug (if applicable): launcher

Steps to reproduce

search a file, press enter

Expected behavior

I'm expecting that the file will be opened

Actual behavior

nothing

Screenshots
Issue 1:
Challenge Waypoint: Local Scope and Functions has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

function myFunction() {
var myVar = "Foo";
console.log(myVar);
}
myFunction();

// run and check the console
// myVar is not defined outside of myFunction
//console.log(myVar);

// now remove the console.log line to pass the test

Issue 2:
Challenge Waypoint: Local Scope and Functions has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.48 Safari/537.36.

The test asks you to remove the second console.log() to pass. When you remove the second console.log() it still fails. You have to remove both console.log() calls to pass(including the one inside myFunction().)

Reproducible every time by removing the console.log() outside of myFunction(), as asked by test. I'm assuming this is a bug in the test and not the text as there's no reason to remove the console.log() call within myFunction().
Issue 1:
I think I might have located the root of #8698

It seems that merge_duplicate_nodes is the reason that quantize_nodes malfunctions.

Whatever I do, whenever I apply a merge_duplicate_nodes somewhere during a graph transformation, the output becomes completely indifferent to the input.

(Unfortunately) I don't get any error messages concerning this...

Issue 2:
Hello everyone,

have the following problem after the tensorflow installation via pip:

>>> import tensorflow as tf I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 23, in <module> from tensorflow.python import * File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 94, in <module> from tensorflow.python.platform import test File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/test.py", line 62, in <module> from tensorflow.python.framework import test_util File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/test_util.py", line 41, in <module> from tensorflow.python.platform import googletest File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/googletest.py", line 32, in <module> from tensorflow.python.platform import benchmark # pylint: disable=unused-import File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/benchmark.py", line 112, in <module> class Benchmark(six.with_metaclass(_BenchmarkRegistrar, object)): File "/usr/lib/python2.7/dist-packages/six.py", line 617, in with_metaclass return meta("NewBase", bases, {}) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/benchmark.py", line 107, in __new__ if not newclass.is_abstract(): AttributeError: type object 'NewBase' has no attribute 'is_abstract'

I'm using Nvidia GTX Titan X (comp. capability 5.2) and CUDA 7.5. Does anybody have an idea?

Many thanks in advance for your help!

Cheers,

A
Issue 1:
In #7934 the support for this new flow call type parameters has been implemented, but it was guarded by some check, namely that the file is actually checked by flow.

The problem is that the check doesn't work properly for us, where the flow pragma comes after a copyright comment, eg:

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

// @flow

import * as React from 'react';

As a result the stripping behavior isn't triggered.

If possible, it would be much better to check other comments at the top of the file until the first code line.

Using babel 7.4.3.

Issue 2:
Bug Report

Current Behavior

When the @flow pragma is not specified as the first comment of a JS or JSX file, babel parser will not be able to parse any code that passes type arguments.

Input Code

// arbitrary comment
// @flow

const n: number = 5; // this works fine

const set = new Set<number>([1, 2, 3]);
// unexpected token^

Expected behavior/code

Flow should be able to parse functions that are called with type arguments so long as the @flow pragma exists before any code.

Babel Configuration (.babelrc)

{
presets: [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-flow",
]
}

Environment

Babel version: [^7.0.0]

Node/npm version: [Node 8.11.1]

OS: [OSX 10.13.4]

Monorepo: [yes]

How you are using Babel: [loader]

Possible Solution

It appears this line ignores the flow pragma if it isn't found in the first comment of the source file.

babel/packages/babel-parser/src/plugins/flow.js

Line 77
in
c586d4e

// to "@flow" or "@noflow" if we see a pragma. Transitions to null if we are

This could be changed a-la Flow-Strip-Types, which first checks all comments for a flow pragma before it begins transforming. (https://github.com/babel/babel/blob/c586d4e8cac816941bf2ba559472fd9cc3150921/packages/babel-plugin-transform-flow-strip-types/src/index.js). Perhaps a solution like this could be used here as well.
Issue 1:
The Git menu has a couple items that use terminology that doesn't originate from within Git. ("Sync", "Clean All", "Publish"? What are these going to do?) Even when they do, it's still not always clear what exactly will happen when you click them. ("Pull" pulls from where? Origin? Using its branch of of the same name as the one that's checked out on your repo?)

Hovering over any of these items should show the commands that these items correspond with, so you know exactly what they're going to do.

Issue 2:
Why does this action have a background while all the other do not have one?

Setting to feb for discussion
Issue 1:
This example uses rust-crypto 0.2.14. Failing to import the Encryptor trait that implements encrypt causes an unexpected error message. The trait isn't private and importing it compiles as expected.

extern crate crypto;

use crypto::{ buffer, aes, blockmodes };
use crypto::buffer::{ ReadBuffer, WriteBuffer };

fn enc(key: &[u8], iv: &[u8], data: &[u8]) {
// Don't import the trait that implements encrypt()
//use crypto::symmetriccipher::Encryptor;

let mut encryptor = aes::cbc_encryptor(aes::KeySize::KeySize256,
key, iv, blockmodes::PkcsPadding);

let mut read_buffer = buffer::RefReadBuffer::new(data);
let mut buffer = [0; 4096];
let mut write_buffer = buffer::RefWriteBuffer::new(&mut buffer);

// Expected error: type `_` does not implement any method in scope named `encrypt`
// Get error: source trait is private
encryptor.encrypt(&mut read_buffer, &mut write_buffer, true);
}

fn main() {
}

src/main.rs:19:5: 19:65 error: source trait is private
src/main.rs:19 encryptor.encrypt(&mut read_buffer, &mut write_buffer, true);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

rustc 1.0.0-nightly (706be5ba1 2015-02-05 23:14:28 +0000)

Issue 2:
My attempt to call Any::get_type_id() and use its return value of as an instance of fmt::Debug does not work without import of std::any::TypeId struct: http://doc.rust-lang.org/std/any/struct.TypeId.html

Example code:

use std::thread;
// use std::any::TypeId; // uncomment this line to make the compile work

fn main() {
let b1 = Box::new(3u64);
println!("hello world, b1: {:?}", b1);
let child = thread::Thread::scoped(|| {
let b2 = Box::new(4u64);
println!("other thread b2: {:?}", b2);
});
match child.join() {
Ok(()) => {}
Err(ref panic_arg) => {
if let Some(s) = panic_arg.downcast_ref::<&str>() {
println!("whoops child died with str: {}", s);
} else if let Some(s) = panic_arg.downcast_ref::<String>() {
println!("whoops child died with String: {}", s);
} else {
let id = panic_arg.get_type_id();
println!("whoops child died with unknown panic arg, id: {:?}", id);
}
}
}
}

Transcript of attempt to compile:

<anon>:19:26: 19:49 error: source trait is private
<anon>:19 let id = panic_arg.get_type_id();
^~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
playpen: application terminated with error code 101