WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

When I use ListItem with rootRef I get a Warning-Message in console in Chrome:

Warning: React does not recognize the rootRef prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase rootref instead. If you accidentally passed it from a parent component, remove it from the DOM element.

(i need rootRef because i want to show a popover on the listItem, and the listItem should be the anchorElement)

"material-ui": "1.0.0-beta.23"

"react": "16.2.0"

Chrome: Version 62.0.3202.94

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

Expected Behavior

The same as ListItemSecondaryAction

Current Behavior

No (simple) ability to implement a secondary action

Context

Some quick-access-like actions from expansion panel's head.

Your Environment

Tech
Version

Material-UI
v1.0.0-beta.30

React
16
Issue 1:
Is there an existing issue for this?

I have searched the existing issues

Current Behavior

Since NPM v7:

When installing a new dependency from a public repository (github:foo/bar), this creates a git+ssh://git@github.com/foo/bar) in the package-lock.json.

This breaks when running npm ci in a GitHub Action because it doesn't have the SSH agent configured. And it shouldn't need to, because the dependency is public.

Expected Behavior

Don't put git+ssh there but github:.

Steps To Reproduce

npm i github:foo/bar

Environment

OS: macOS Big Sur

Node 16

npm v7.12.1

Issue 2:
Current Behavior:

When I use a git repository via an HTTP link NPM "takes liberties" with it, which breaks my build:

$ npm init -y
Wrote to /Users/eugene.lazutkin/Work/temp/package.json:

{
"name": "temp",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}

$ npm i --save https://github.com/uhop/stream-chain.git

added 1 package, and audited 2 packages in 3s

found 0 vulnerabilities

It produces package-lock.json:

{
"name": "temp",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"stream-chain": "github:uhop/stream-chain"
}
},
"node_modules/stream-chain": {
"version": "2.2.4",
"resolved": "git+ssh://git@github.com/uhop/stream-chain.git#459f5a1708c138b6e0abaae4cf103c3488e1e78e",
"license": "BSD-3-Clause"
}
},
"dependencies": {
"stream-chain": {
"version": "git+ssh://git@github.com/uhop/stream-chain.git#459f5a1708c138b6e0abaae4cf103c3488e1e78e",
"from": "stream-chain@github:uhop/stream-chain"
}
}
}

Note that https://github.com/uhop/stream-chain.git was replaced with github:uhop/stream-chain, which is probably OK in this case. But other two links (?) are rewritten from https://github.com/uhop/stream-chain.git to git+ssh://git@github.com/uhop/stream-chain.git, which is clearly bad.

The problem is that a build bot we use in similar situations can access private git repositories using HTTP, but not SSH for security reasons. It fails on an authentication. Rewriting https://github.com/uhop/stream-chain.git to git+ssh://git@github.com/uhop/stream-chain.git is not acceptable for that reasons.

The fix is relatively minor yet unpleasant: we have to replace npm ci with npm i, which takes more time and introduced instabilities with other dependencies.

Expected Behavior:

When running npm ci it should use the original URL with the HTTP authentication instead of SSH.

Steps To Reproduce:

See the description and do the same steps using git repositories (github only?) as dependencies.

Environment:

OS: Mac

Node: 15.7.0

NPM: 7.4.3
Issue 1:
Symfony version(s) affected: 4.1.8

Description

Symfony crashes php server without providing any error log.

The server log provides me with the following information:

[OK] Server listening on http://127.0.0.1:8000

// Quit the server with CONTROL-C.

PHP 7.2.12 Development Server started at Wed Nov 28 15:20:14 2018
Listening on http://127.0.0.1:8000
Document root is /Users/christianbieg/Documents/Websites/symfony-test/public
Press Ctrl-C to quit.

[ERROR] The process has been signaled with signal "11".

How to reproduce

composer create-project symfony/website-skeleton symfony-test && cd symfony-test

php bin/console server:run

and then open the website on http://localhost:8000

Issue 2:
Symfony version(s) affected: 4.1.8

Description

(in built in server)[ERROR] The process has been signaled with signal "11".

How to reproduce

In any new project, if you clone symfony/website-skeleton run built-in server

Additional context

I think it has a relationship with latest [Routing] fixes @Route
Issue 1:
#6497 (checked by bisection) let to pick events reporting incorrect events for step plots.

MWE:

from pylab import *
plot(rand(100), picker=5, drawstyle="steps-pre") # 5 points tolerance
def on_pick(event):
print(event.ind)
cid = gcf().canvas.mpl_connect('pick_event', on_pick)
show()

On 1.5.1, clicking on the "right" part of the plot reports an index close to 100 (that is, the number of points). On master, the index is instead close to 200 (because each point is "duplicated" in the path).

While the previous behavior could "easily" be restored, it may be a good time to revisit what the "index" returned by Line2D.contains actually means. Specifically:

For non-step plots, I think the indices should actually be floats, that indicate where between which two points the projection of the click onto the line falls (for each line for which the projection is close enough), and how close to each extremity of the segment. (This would be only a minor backwards incompatibility if the returned index is used, well, to index the data: recent numpys would emit a warning about indexing with a float.)

For step plots, it is less clear what the correct solution is. Perhaps keeping the status quo and returning the index of the preceding point(s) would be enough.

Issue 2:
The weekly build with nightly wheels from numpy and pandas

has failed. Check the logs for any updates that need to be

made in matplotlib.

https://github.com/matplotlib/matplotlib/actions/runs/2175468878
Issue 1:
The scope of a block of PHP code that is enclosed inside of a separate language (ie. within a JS block in a page) is not detected properly if the enclosing PHP tags are both on the same line. If the tags are not separated onto different lines then Atom thinks the code is just part of the enclosing code block.

For example, this bit of code is incorrectly detected as part of the JavaScript block:

<html>
<head>
<script type="text/javascript">
<?php echo 'test'; ?>
</script>
</head>
</html>

While this code is properly detected as being a PHP block:

<html>
<head>
<script type="text/javascript">
<?php
echo 'test';
?>
</script>
</head>
</html>

This issue is present on a completely fresh Atom installation, as well as one with a multitude of plugins.

Atom Version: 1.0.0

Operating Systems:

Ubuntu 15.04 x64

Windows 8.1 x64

Issue 2:
A thread has come up on the forum that points out that <?php ... ?> doesn't get matched as PHP code when on the same line. I did a little bit of poking around and found that the embedded whitespace pattern has a negative lookahead (?![^?]*\\?>) that, when removed, allows single-line PHP comments to display. The thing is, I can't figure out what that negative lookahead was put there to check against. My fork of this package seems to work just fine.

Does anybody know what the negative lookahead was meant to guard against?
Issue 1:
Bug Report

Current Behavior

Some const assertions result in errors. Seems like the check introduced in this PR is too strict? Because I didn't see any errors in VSCode till I started webpack dev server.

Input Code

function foo() {
const a = getObjectAWithLongAssType();
const b = getObjectBWithLongAssType();

return [a, b] as const; // no errors in tsc or vscode
// Previously: return [a,b] as [typeof a, typeof b]
}

Expected behavior/code

VSCode outputs the expected readonly tuple type, so I don't expect any errors in babel.

Babel Configuration (.babelrc, package.json, cli command)

"@babel/core": "^7.4.0",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/polyfill": "^7.4.0",
"@babel/preset-env": "^7.4.2",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.3",

Possible Solution

@tanhauhau is there a need for tsCheckLiteralForConstantContext to happen in babel? To me it seems like it's enough to parse as const expressions as assertions and move on, since TypeScript is actually in charge of ensuring the assertions are valid.

Issue 2:
Issue originally made by @s-panferov

Bug information

Babel version: any

Node version: >= 4

Input code

import * as crypto from 'crypto';

Description

_interopRequireWildcard iterates through export object properties and this fires deprecation warning because of deprecated property access.
Issue 1:
This program:

pub fn main() {
let s: &str = "foo";
fail!(s);
}

generates this error:

<std-macros>:37:13: 37:36 error: instantiating a type parameter with an incompatible type `&str`, which does not fulfill `Send`
<std-macros>:37 ::std::rt::begin_unwind($msg, file!(), line!())
^~~~~~~~~~~~~~~~~~~~~~~
<std-macros>:32:5: 42:6 note: in expansion of fail!
badfail.rs:3:5: 3:14 note: expansion site
error: aborting due to previous error

It does point you to the right place if you read it close, but I missed it myself the first few times.

Issue 2:
Followup to #1970.

One of the two tests in struct-return.rs doesn't work on x86. Works on x64 though.

The double/byte/double one winds up feeding garbage memory to the callee. Valgrind gets upset. Program crashes.
Issue 1:
maintenance/1.9.x:

In [8]: ap = np.array([0, 2, 4, 6, 8, 10])

# Passing an empty 'k' array to partition is a no-op:
In [9]: ap.partition(np.array([], dtype=np.int64))

In [10]: ap
Out[10]: array([ 0, 2, 4, 6, 8, 10])

1.10.1:

In [2]: ap = np.array([0, 2, 4, 6, 8, 10])

In [3]: ap.partition(np.array([], dtype=np.int64))
---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
<ipython-input-3-c708b3f943a6> in <module>()
----> 1 ap.partition(np.array([], dtype=np.int64))

MemoryError:

Noticed this because it's breaking some tests in patsy.

Issue 2:
If np.unique is used with return_index=True and the input is empty, the resulting array has dtype bool instead of int.

In [1]: import numpy as np

In [2]: np.unique([], return_index=True)
Out[2]: (array([], dtype=float64), array([], dtype=bool))

In [3]: np.unique([1,], return_index=True)
Out[3]: (array([1]), array([0]))
Issue 1:
The demo uses a simple Quiz application (just the routing part).

Steps to reproduce -

Start the quiz

Navigate forward

Click the back button and notice that the component does not render properly

See Plunker - http://plnkr.co/edit/8LMo0VLCLIuM06itCifn?p=preview

Current behavior

usage of the browser's back button does not cause component to re-render properly

Expected/desired behavior

usage of the browser's back button does cause the component to re-render properly (see Google Chrome behavior for expected behavior)

Other information

I also posted a question to Stack Overflow about this for additional context

Issue 2:
I am using Angular 2.0.0-beta.11 on OS X El Capitan. When Safari's browser history back function is used, OnInit does not get fired. It seems to work fine on Chrome.

Steps to reproduce:

Fire up the official Tour Of Heroes Demo

Click on any hero in the dashboard

Use the browser back button or click the "back" button in the demo. The dashboard doesn't populate.

Related: #4809
Issue 1:
Currently we have "something" that shows up in the overlay onDrag that will then follow your finger and the original Draggable doesn't move or change. I want it to look like the original is following my finger.

Issue 2:
What I want to be able to do:

Lets say I have a vertical list of five draggables. Dragging one from the middle should make it appear it is being/has been removed from the list during the drag.

Draggable's API doesn't support this use case atm.
Issue 1:
I was running Julia 1.6.1, and typed gc into the REPL. This led to the errors shown below.

I also have the current master branch of Julia installed (which identifies as Julia 1.8).

Note that the first error mentions the file name /Users/eschnett/.julia/environments/v1.8/Manifest.toml, which is the manifest for Julia 1.8.

I think each version of Julia should either be able to read other versions' manifests, or should handle such incompatibilities gracefully.

(@v1.6) pkg> gc
┌ Error: Could not parse entry for `deps`
└ @ Pkg.Types ~/src/julia-1.6/usr/share/julia/stdlib/v1.6/Pkg/src/manifest.jl:150
┌ Warning: Reading manifest file at /Users/eschnett/.julia/environments/v1.8/Manifest.toml failed with error
│ exception =
│ MethodError: no method matching get(::Pair{String, Any}, ::String, ::Nothing)
│ Closest candidates are:
│ get(::DataStructures.Accumulator, ::Any, ::Any) at /Users/eschnett/.julia/packages/DataStructures/ixwFs/src/accumulator.jl:47
│ get(::Test.GenericDict, ::Any, ::Any) at /Users/eschnett/src/julia-1.6/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1663
│ get(::DataStructures.RobinDict{K, V}, ::Any, ::Any) where {K, V} at /Users/eschnett/.julia/packages/DataStructures/ixwFs/src/robin_dict.jl:384
│ ...
└ @ Pkg.API ~/src/julia-1.6/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:504
┌ Error: Could not parse entry for `deps`
└ @ Pkg.Types ~/src/julia-1.6/usr/share/julia/stdlib/v1.6/Pkg/src/manifest.jl:150
┌ Warning: Reading manifest file at /Users/eschnett/.julia/environments/v1.7/Manifest.toml failed with error
│ exception =
│ MethodError: no method matching get(::Pair{String, Any}, ::String, ::Nothing)
│ Closest candidates are:
│ get(::DataStructures.Accumulator, ::Any, ::Any) at /Users/eschnett/.julia/packages/DataStructures/ixwFs/src/accumulator.jl:47
│ get(::Test.GenericDict, ::Any, ::Any) at /Users/eschnett/src/julia-1.6/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1663
│ get(::DataStructures.RobinDict{K, V}, ::Any, ::Any) where {K, V} at /Users/eschnett/.julia/packages/DataStructures/ixwFs/src/robin_dict.jl:384
│ ...
└ @ Pkg.API ~/src/julia-1.6/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:504
Active manifest files: 54 found
Active artifact files: 208 found
┌ Error: Could not parse entry for `deps`
└ @ Pkg.Types ~/src/julia-1.6/usr/share/julia/stdlib/v1.6/Pkg/src/manifest.jl:150
┌ Error: Could not parse entry for `deps`
└ @ Pkg.Types ~/src/julia-1.6/usr/share/julia/stdlib/v1.6/Pkg/src/manifest.jl:150
Active scratchspaces: 18 found
Deleted 1 artifact installation (4.654 MiB)

Issue 2:
This looks valid syntax but is not accepted.

julia> is_array(::T) :: Bool where {T<:AbstractArray} = true
ERROR: UndefVarError: T not defined
Stacktrace:
[1] top-level scope at none:0

Using the same syntax, but with function keyword is accepted.

julia> function is_array(::T) :: Bool where {T<:AbstractArray}
return true
end
is_array (generic function with 1 method)

Removing the return type is also accepted.

julia> is_array_(::T) where {T<:AbstractArray} = true
is_array_ (generic function with 1 method)

Somewhat related issues: #31378, #31542
Issue 1:
Basically, every time setState is called and a rerender happens, I get this error:

Invariant Violation: dangerouslyRenderMarkup(...): Cannot render markup in a worker thread.
Make sure `window` and `document` are available globally before requiring React
when unit testing or use React.renderToString for server rendering.

I've created a very bare repo where you can recreate the issue:

https://github.com/dmatteo/setStateBoom

The component + test suite is so small that I can copy/paste it here:

import React, {Component} from 'react/addons';
import jsdomify from 'jsdomify';
import expect from 'unexpected';

class MyComponent extends Component {
constructor(props) {
super(props);
this.displayName = 'MyComponent';
this.state = {
bananas: 'bananas'
};
}

render() {
return <div>{this.state.bananas}</div>
}
}

describe('setState test', () => {

before(() => {
// this leaks document and window to global
jsdomify.create();
});

it('should render', () => {
let instance = React.addons.TestUtils.renderIntoDocument(<MyComponent></MyComponent>);
expect(instance, 'to be defined');
});

it('should not throw', () => {
let instance = React.addons.TestUtils.renderIntoDocument(<MyComponent></MyComponent>);
let foo = () => {
instance.setState({bananas: 'apples'});
};
expect(foo, 'not to throw');
})

});

Do you have any idea what is happening and what can I do about it? (if anything)

Issue 2:
Currently React relies on a global window (and document and navigator).

This works in a browser and it works in other environments if one sets a global window.

However, relying on globals prevents multiple independent React engines from running together.

Testing, for example, benefits strongly from isolated environments. It would be nice if one could run separate tests with jsdom without manually cleaning up the window every time.

Another use case is for programatic behaviour inspection. It's interesting to load multiple windows with jsdom and compare the behavior of one's library with different calls. If React is involved, however, this is impossible.

Avoiding relying on globals can be added in a backwards-compatible fashion. If there is a global window and document, keep the existing behavior. If there isn't, instead of exposing an API, expose a factory taking a window and returning an API. For example, see how jQuery did it.

A decision to avoid globals means refactoring existing code base to pass window explicitly everywhere, and maintaining that attitude in the future. What is your opinion on such a feature?
Issue 1:
Summary of the new feature/enhancement

By default, the PowerShell tab opens. And even with a single open CMD tab, PowerShell always opens.

Proposed technical implementation details

The user uses only CMD and should be able to select the default tab type (CMD or PowerShell)

Issue 2:
Description of the new feature/enhancement

Option to let terminal be always on top of all windows, just like the new calculator app. This would be useful for people learning how to do stuff, as it can be on top of the tutorial window while not suffering from text going on to the next line during resizing.
Issue 1:
I just updated from beta7 to beta8. After compiling my js file I am seeing the following error in my console Uncaught SyntaxError: Unexpected token ).

Looking at the line where the error occurred I can see that there is an extra closing parenthesis.

Below is the generated code. (I've indented it so I could read it better)

var _default = /* harmony import */__WEBPACK_IMPORTED_MODULE_1_redux_actions__["handleActions"].call(
undefined,
_handleActions = {},
_defineProperty(
_handleActions,
/* harmony import */__WEBPACK_IMPORTED_MODULE_0__constants_properties__["a"] + '_GET_SUCCESS',
function undefined(state, _ref) {
var payload = _ref.payload;
return /* harmony import */__WEBPACK_IMPORTED_MODULE_2_lodash___default.a.assign(
{},
state,
{
propertyIDs: /* harmony import */__WEBPACK_IMPORTED_MODULE_2_lodash___default.a.union(state.propertyIDs, payload.result)
}
);
}
),
_defineProperty(
_handleActions,
/* harmony import */__WEBPACK_IMPORTED_MODULE_0__constants_properties__["b"] + '_GET_SUCCESS',
function undefined(state, _ref2) {
var payload = _ref2.payload;
return /* harmony import */__WEBPACK_IMPORTED_MODULE_2_lodash___default.a.assign(
{},
state,
{
propertyIDs: /* harmony import */__WEBPACK_IMPORTED_MODULE_2_lodash___default.a.union(state.propertyIDs, payload.result)
}
);
}
),
_handleActions), // <- extra paren
initialState);

Looking over the commits it looks like maybe it might have been caused by this commit 75b93a1 I could be wrong though.

Issue 2:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

A few large dependencies (slate / react-slate / immutable) shared by two pages are not put in a shared chunk (a large number of dependencies are the same including components). See visualization below:

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

splitChunks: {
chunks: 'all',
name: false,
}

What is the expected behavior?

In my understanding this should not happen by default, so I'd like to see if this is incorrect behaviour. If this is the case I'll happily provide more information to investigate.

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

webpack version: 4.5.0.
Issue 1:
I think, it would be nice to define isa(T) to return a curried version, because it's consistent with similar functions like in and often useful in any or all. It's a builtin function, so this would probably require some small changes, but it's already possible to shadow isa locally, so I believe this should be doable.

Issue 2:
It would be nice to have a single argument isa for cleaner filtering code.

filter(x -> !isa(x, AbstractFloat), [1, 2.0])
# could become
filter(!isa(AbstractFloat), [1, 2.0])

This would provide some consistency with other functions, such as isequal, but since isa is a builtin function, defining other variants doesn't seem trivial.

julia> Core.isa(::Type{T}) where {T} = (x) -> isa(x, T)
ERROR: cannot add methods to a builtin function
Issue 1:
Issue summary

When multiple 3d quiver arrows are plotted, using different colours, the arrow heads and tails have different colours. The two ticks of the arrow heads also differ in colour.

Sample code

import numpy as np
import matplotlib.pyplot as plt
%matplotlib notebook

# Three unit vectors
x = [1,0,0]
y = [0,1,0]
z = [0,0,1]

ax = plt.figure().add_subplot(projection='3d')

# The documentation of quiver says that additional kwargs are delegated to LineCollection
# colors parameter of LineCollection, as per documentation, takes a sequence of RGBA tuples.
ax.quiver(0,0,0,x,y,z,colors=[(1,0,0,1),(0,1,0,1),(0,0,1,1)]) # red, green and blue, with alpha=1.0
ax.set_xlabel('x')
ax.set_ylabel('y')
ax.set_zlabel('z')
ax.set_xlim(-2,2)
ax.set_ylim(-2,2)
ax.set_zlim(-2,2)

# ax.quiver(0,0,0,x,y,z,colors=['r','g','b']) shows similar results

Original output

Expected output

Each arrow, head to tail, should be of a single colour.

Versions

Matplotlib: 3.4.1

Python: 3.8.5

Platform: Jupyter Notebook version 6.1.4

Issue 2:
Bug report

Bug summary

The color of the 3D arrow head does not match that of the arrow body. (In fact, the two segments of head itself don't even match.)

Not sure if it is related to #11746, so I posted it separately just to make things clearer.

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

x = np.zeros(10)
y = np.zeros(10)
z = np.arange(10.)
dx = np.zeros(10)
dy = np.arange(10.)
dz = np.zeros(10)

fig = plt.figure()
ax = fig.gca(projection='3d')

arrow_color = plt.cm.Reds(dy/dy.max())

ax.quiver(x, y, z, dx, dy, dz, colors=arrow_color)
ax.set_ylim(0,10)
plt.show()

Actual outcome

Expected outcome

The entire arrow should have a single color.

Matplotlib version

Operating system: macOS 10.13.6

Matplotlib version: 2.2.2

Matplotlib backend (print(matplotlib.get_backend())): MacOSX

Python version: 2.7.15

Jupyter version (if applicable): 5.6.0

Other libraries:

matplotlib and Python were installed with Anaconda.