WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
One of the benefits of using { loose: ["es6.modules"] } is that import statements don't have to appear at the top level.

However, references to variable bindings created by nested import statements appear not to be rewritten:

function test() {
import x, {y as z} from "some/module";
console.log(x, z);
}

becomes

"use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function test() {
var _someModule = require("some/module");
var _someModule2 = _interopRequireDefault(_someModule);
console.log(x, z);
}

I would expect this code to become something like

function test() {
var _someModule = require("some/module");
var _someModule2 = _interopRequireDefault(_someModule);
console.log(_someModule2["default"], _someModule.y);
}

Issue 2:
One misunderstanding I have about Babel is why the example on the homepage has myOldWeirdJavaScript as the input and myNewTransformedJavaScript as the ouput. Isn't it the other way around, ES6->ES5? Nowhere on the site does it actually say babel compiles ES6 into ES5, as obvious at that may be. I confusingly thought it compiles ES5->ES6 based on the example.
Issue 1:
React 15.2 now warns of any DOM properties that are not valid HTML5. material-ui is producing a lot of these warnings as it is passing down props it shouldn't be to DOM components.

Issue 2:
Problem description

React is about to release a new version of React: v15.2.0. They are introducting a new warning.

For more details, react-bootstrap/react-bootstrap#1994 is a good place to start.

We are already aware of this issue (props forwarding down the tree) and we have tried to address it. However, I'm pretty sure it's not solve at 100% yet.
Issue 1:
Migrated issue, originally created by zaazbb (@zaazbb)

asyncio + uvloop is very fast now.

uvloop makes asyncio fast. In fact, it is at least 2x faster than nodejs, gevent, as well as any other Python asynchronous framework. The performance of uvloop-based asyncio is close to that of Go programs.

from: https://magic.io/blog/uvloop-blazing-fast-python-networking/

Issue 2:
Migrated issue, originally created by Ігор Горобець

Hello!

How about integrate it?

Is it even possible?
Issue 1:
We are in 2019 — we need a support SVG!

Issue 2:
Electron version: 1.6.10

Operating system: elementary OS 0.4.1 Loki

Expected behavior

It should be possible to set a tray image in SVG format. This would allow tray icons to adapt to the current theme (ie. appear white on black, or black on white).

Actual behavior

The image must be supplied as a PNG or a JPG and therefore does not adapt to the platform's theme.

How to reproduce

new Tray('/path/to/image.png');
Issue 1:
First of all you guys created an amazing framework. It looks great and it works great so far for everything I need it for.

But I find myself more and more creating some hacks around DatePicker and TextField. In case if user wants to reset the value of those controls I need to put "x" iconButtons outside of controls and then have a headache with styling to put the icon next to the control.

It would be amazing if there would be an option for those controls "addCloseButton" or something like that to the controls for a quick reset of the value.

I do not have a prototype per say but a good example would be http://jedwatson.github.io/react-select/ take a look how it has "x" icon I'm talking about.

Thanks!

Issue 2:
Once a DatePicker field is set, there is no way to clear it. You can only select a different date, not completely remove the date.
Issue 1:
5 machines now, Chrome and Firefox, Windows and ChromeOS, and i am seeing a common pattern.

All .rows have a negative margin.

Example: http://jsfiddle.net/Yd4ee/1/

Screenshot: http://d.pr/i/wIh1

At first i thought this had to be a usage issue.. Then i noticed that even the official documentation is suffering from the same negative margin on all of the machines i tested: http://d.pr/i/u2Vm

What is the cause? Is my only solution to hack it for now?

Issue 2:
I have tried to make my layout 100%. And for that I didn't use any <div class ="container">. Just started with <div class ="row">.

<div class="row">
<div class="col-md-3">
<div class="sectionLeft">
Sidebar Content
</div>
</div>
<div class="col-md-9">
Test content
</div>
</div>

but it showing horizontal scroll bar. I don't know why. But I saw that it may cause from margin-left and margin-right negative value.

But I am using Bootstrap v3.0.0 it should be fixed.

Please see my full code from http://bootply.com/81888
Issue 1:
When I run unit test with nodejs and use inject in beforeEach then throw me an error:

TypeError: Cannot read property 'getXHR' of null
at _runtimeCompilerBindings (angular2/src/testing/test_injector.ts:129:32)
at Object.createTestInjectorWithRuntimeCompiler (angular2/src/testing/test_injector.ts:141:48)
at Object.<anonymous> (angular2/src/testing/testing.ts:247:20)

becouse DOM is null in nodejs :(

function _runtimeCompilerBindings() {
return [
provide(XHR, {useClass: DOM.getXHR()}),
COMPILER_PROVIDERS,
];
}

Issue 2:
This issue was posted by @francois-appliware under angular/vladivostok and was gaining traction until the repo was merged into this one. I'm posting it here for visibility.

Hi,

I am working with the new router and had an issue that I "managed to resolve", but as I don't quite understand how everything works under the hood I prefer to open this issue and try to understand what is going on.

In my application, I have a few routes as following :

{ path: '/dashboard', component: DashboardComponent },
{
path: '/companies', component: CompanyComponent, children: [
{ path: '/details/:id', component: CompanyDetailComponent },
{ path: '/new', component: CompanyEditComponent },
{ path: '/', component: CompanyDetailComponent, index: true }
]
},
{
path: '/keys', component: KeyComponent, children: [
{ path: '/details/:id', component: KeyDetailComponent },
{ path: '/new', component: KeyEditComponent },
{ path: '/', component: CompanyDetailComponent, index: true }
]
}

When I am navigating from companies to keys, I have the following error :

Error {rejection: TypeError: Cannot read property '_routeConfig' of null
at GuardChecks.runCanDeactivate (http://l…, promise: ZoneAwarePromise, zone: Zone, task: ZoneTask, message: "Uncaught (in promise): TypeError: Cannot read property '_routeConfig' of null"}

So I went ahead and downloaded the code to see what was going on inside that "GuardChecks".

For what I understand, it is used for the CanActivate / CanDeactivate (that I do not use in any of my components). Also, from what I understand, it is working with nullable values (in my case, where I don't have such guards).

Problem is, at some point in adds a check with a null value that throws the previous error mentioned above.

I managed to solve my issue by replacing the following line inside "router.js" inside the method GuardChecks.prototype.runCanDeactivate = function (component, curr)

var canDeactivate = curr._routeConfig ? curr._routeConfig.canDeactivate : null;

by the following :

var canDeactivate = curr ? (curr._routeConfig ? curr._routeConfig.canDeactivate : null) : null;

(Yes, it's ugly but that's a hotfix so I can continue working)

I think the check can be set before the 'runCanDeactivate', where the checks are added, maybe in the traverseRoutes method inside GuardChecks.

Is this a known bug or a real bug and needs a fix or is it intended ?

Thank you.

This bug has been present in the 3.0.0 router since release and is still present in alpha-7. It makes the router unusable for production applications. Hopefully this can be resolved and released soon. Thanks!
Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

Variables

ANSIBLE VERSION

ansible 2.1.2.0

CONFIGURATION

No changes

OS / ENVIRONMENT

macOS Sierra (10.12)

SUMMARY

Variables defined as integers (without quotes) are converted to strings when using them in the definition of another variable.

STEPS TO REPRODUCE

---
- hosts: local
connection: local
gather_facts: no
vars:
some_integer: 5
some_other_integer: "{{ some_integer }}"
tasks:
- debug: var=some_integer
- debug: var=some_other_integer

EXPECTED RESULTS

LAY [local] *******************************************************************

TASK [debug] *******************************************************************
ok: [local] => {
"some_integer": 5
}

TASK [debug] *******************************************************************
ok: [local] => {
"some_other_integer": 5
}

PLAY RECAP *********************************************************************
local : ok=2 changed=0 unreachable=0 failed=0

ACTUAL RESULTS

LAY [local] *******************************************************************

TASK [debug] *******************************************************************
ok: [local] => {
"some_integer": 5
}

TASK [debug] *******************************************************************
ok: [local] => {
"some_other_integer": "5"
}

PLAY RECAP *********************************************************************
local : ok=2 changed=0 unreachable=0 failed=0

Issue 2:
With the addition of a lot of rax modules, there is a lot of duplicate code currently.

Migrate some duplicate boilerplate code that usually shows up in main() into lib/ansible/module_utils/rax.py

All rax modules should be updated to use it.

This is just a placeholder so that it's visible that this is being worked on.

I'll update this issue as things develop
Issue 1:
Hi,

I was expecting that an environment variable (eg: SYMFONY__VAR) would have precedence instead of the same var defined inside the parameters.yml file.

Instead, if the parameters.yml defines a var with the same name of an environment variable, the last one is ignored.

Issue 2:
I want to use the SYMFONY__* env variables that are detected in Kernel are overwritten by parameters of the same name in parameters.yml for example.

However i would suppose using the environment variables is a mechanism to overwrite the parameters.yml in production, so exactly the other way around.

Is the current behavior there for a reason? It doesn't make much sense to me.
Issue 1:
Environment

Windows build number:Version 10.0.19041.264
PowerToys version: 0.18.2
PowerToy module for which you are reporting the bug (if applicable): RUN

Steps to reproduce

The search result of Chinese character quite strange, some of them can get searching result, but some of cannot.

Screenshots

I attched same search result for PowerToys Run and Everything, Everything can get correct result, but RUN can not. Can you help investigate? Thanks

Issue 2:
Bluetooth device remover

Windows has serious problems removing bluetooth devices due to bugs in the bluetooth UI. See the hundreads of replies in the Microsoft community thread (plus many other duplicate threads and other forums around the web).

Turns out the fix is VERY simple, just call the BluetoothRemoveDevice function in the built-in BluetoothAPIs.dll.

I made a little c# program that did this but it was complicated to use because I was too lazy. Then another person in the thread made a powershell script that is very simple and quick to use so I put that on GitHub under lflfm/powerBTremover.

That is unofficial in every way and the words "powershell" probably scares off some non-tech people from attempting to use it so maybe you guys could make it a Power Toy...
Issue 1:
As discussed in #4987, the Atom installer installs a "Open with Atom" entry in the Windows Explorer context menu for every file and folder. It would be preferable, as @paulcbetts suggests, to have a prefence where it can be turned off or on entirely, or just for specific files and folders. For example, not many people will open images from Explorer with Atom.

@lee-dohm pointed out that the specific code which adds and removes the item is in https://github.com/atom/atom/blob/master/src/browser/squirrel-update.coffee.

Issue 2:
Is there an option to disable the "Open with Atom" shell entry? I can't find one, if there isn't, see this as a feature request :)
Issue 1:
Please do not remove the text below this line

DevTools version: 4.0.2-2bcc6c6

Call stack: at n.value (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:16552)

at m (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:292537)

at ml (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:292772)

at Ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:55890)

at bi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:62939)

at Xl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:99535)

at Hl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:84255)

at Fl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:81285)

at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:25363

at n.unstable_runWithPriority (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:4368)

Component stack: in ml

in div

in div

in Or

in Unknown

in n

in Unknown

in div

in div

in Ua

in le

in ve

in ko

in Fl

Issue 2:
Repro: https://codesandbox.io/s/xenodochial-lamarr-q71wt

Steps:

Profile

Select a component from the flame graph (important)

Click settings

Toggle "hide commits below ms" (In my case, it's 100ms)

Demo:

Please do not remove the text below this line

DevTools version: 4.0.2-2bcc6c6

Call stack: at n.value (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:16552)

at pl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:293513)

at Ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:55890)

at bi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:62939)

at Xl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:99535)

at Hl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:84255)

at Fl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:81285)

at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:25363

at n.unstable_runWithPriority (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:4368)

at kt (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:25092)

Component stack: in pl

in div

in ml

in div

in div

in Or

in Unknown

in n

in Unknown

in div

in div

in Ua

in le

in ve

in ko

in Fl
Issue 1:
Q
A

Bug report?
no

Feature request?
yes

BC Break report?
no

RFC?
no

Steps to reproduce:

Create a project:

composer create-project symfony/skeleton symfony-skeleton

Set the app environment to prod:

sed -i -e 's/APP_ENV=dev/APP_ENV=prod/g' .env

This can be shown also with setting the APP_ENV environment variable.

Add a simple controller and a route.

Add an .htaccess file in /public as follows (we use Apache):

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

Try to get "/foo". In the prod environment, ResourceNotFoundException is not caught or converted to a 404:

2018-01-18T15:53:46-05:00 [critical] Uncaught Exception: No route found for "GET
/foo" [Thu Jan 18 15:53:46.592760 2018] [php7:notice] [pid 66514] [client
::1:58156] PHP Fatal error: Uncaught
Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException in
var/cache/prod/srcProdProjectContainerUrlMatcher.php:38\nStack trace:\n#0
vendor/symfony/routing/Matcher/UrlMatcher.php(95):
srcProdProjectContainerUrlMatcher->match('/foo')\n#1
vendor/symfony/routing/Router.php(262): Symfony\\Component\\Routing\\Matcher\\Ur
lMatcher->matchRequest(Object(Symfony\\Component\\HttpFoundation\\Request))\n#2
vendor/symfony/http-kernel/EventListener/RouterListener.php(109): Symfony\\Compo
nent\\Routing\\Router->matchRequest(Object(Symfony\\Component\\HttpFoundation\\R
equest))\n#3 vendor/symfony/event-dispatcher/EventDispatcher.php(212): Symfony\\
Component\\HttpKernel\\EventListener\\RouterListener->onKernelRequest(Object(Sym
fony\\Component\\HttpKernel\\Event\\GetResponseEvent), 'kernel.request',
Object(Symfony\\Component\\EventDispatcher\\EventDispatcher))\n#4 /Users/cjm/Si
in vendor/symfony/http-kernel/EventListener/RouterListener.php on line 139

Issue 2:
Hi,

i've this issue when upgrading from sf2.3.22 to 2.3.23. I've created a processor for monolog with session based on this http://symfony.com/en/doc/current/cookbook/logging/monolog.html.

But this failed and i've this error:

_Failed to start the session: already started by PHP ($_SESSION is set)._

I debugged the code and i found that the SaveSessionListener is ending the session on kernel.response event but processor is still called after that to get data from session.
Issue 1:
Would be a good addition to the current Select. Found this old Issues (#5521) for this feature but nothing happend yet.

Maybe something like this

<Select>
+ <MenuGroup label="optgroup label">
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
+ </MenuGroup>
</Select>

https://www.w3schools.com/tags/tag_optgroup.asp

Issue 2:
Please add feature like this
Issue 1:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
2.8.18

I've tripped on an edge case where although @UniqueEntity fails the form is declared valid.

I have an entity with a unique constraint on two fields. I build a form that has one of those fields pre-selected and disabled. The user is supposed to see the value of the field, but not change it. The user is supposed to fill in the second field.

When this form is submitted the disabled field gets an 'error' message, but Form::getErrors skips the first field and declares it valid only because it's disabled. Source: Symfony/Component/Form/Form.php v2.8.18 line 765

This code says the form is valid, which results in a SQL constraint validation when attempting to save the entity.

Is there anything that I can do to get over this?

Why I'm doing this: I'm using EasyAdminBundle. It uses select2 for dropdowns. select2 won't implement 'read_only' in the latest version. I'm working on changing this to a hidden field plus a plain text row, but meanwhile I have this issue.

Here are some snippers of code that should help with replication:

The entity

/**
* MyEntity
*
* @ORM\Table(name="my_entity", uniqueConstraints={
* @ORM\UniqueConstraint(name="two_field_constraint", columns={"field1", "field2"})
* })
* @ORM\Entity()
* @UniqueEntity(fields={"field1", "field2"})
*/
class MyEntity
// ...

The form type

class MyEntityType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('field1', TextType::class, ['disabled' => true])
->add('field2', TextType::class)
;
}

public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'AppBundle\Entity\MyEntity'
));
}
//...
}

the initial data

INSERT INTO my_table ('value1', 'value2');

the test code trying to insert duplicate data

$builder = $this->container->get('form.factory')->createBuilder(MyEntityType::class, null, ['csrf_protection' => false]);

$form = $builder->getForm();

$data = [
'field1' => 'value1',
'field2' => 'value2',
];

$form->submit($data);
dump($form->isSubmitted(), $form->isValid());

Issue 2:
Submitted and disabled form is always valid. So in the situation:

if ($form->isSubmitted() && $form->isValid()) {
$data = $from->getData();
// handle data ...
}

Is it expected that code depending on $form->getData() is able to handle complete lack of data even if the from is valid? Or should I always check that form is not disabled? So instead recommended if ($form->isSubmitted() && $form->isValid()) { default to if ($form->isSubmitted() && $form->isValid() && !$from->isDisabled()) {?

@edit I'm asking the question because I saw deprecation of calling $form->isValid() when the form is not submitted, but the issue mentioned above bothers me much more. I'm curious if I'm missing something or the part if ($this->isDisabled()) { return true; } should be removed from there (or at least better documented).
Issue 1:
Ilanchezhian opened SPR-2617 and commented

During update by using JdbcTemplate.update(String sql, Object[] args), I encounter exception due to deadlock. This is thrown as an SQLException. Exception log is

exception: PreparedStatementCallback; uncategorized SQLException for SQL [UPDATE EMP_INFO SET ORG_NAME=?, EMP_MAME=?, WHERE EMP_ID=?]; SQL state [40001]; error code [1205]; Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.; nested exception is java.sql.SQLException: Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

In the above scenario, I encounter couple of issues:

From application program code there is no way I can capture this exception (SQLException), and provide the information message. To do this I am forced to capture root exception (Exception) and provide necessary information message.

Currently JdbcTemplate.update() method throws only 'DataAccessException' but when we look at source code we can see it internally executes PreparedStatementCallback.doInPreparedStatement() method, this method throws SQLException. But as root JdbcTemplate.update() throws only 'DataAccessException' so in this case I am not able to catch any SQLException. Please let me know is this a practice that I should not catch any SQLException in my application code?

Affects: 2.0.6

Issue Links:

#6388 SQL Server Error Code 1205 = DeadlockLoser ("duplicates")

Issue 2:
Seth Ladd opened SPR-1190 and commented

Browsing the ThemeResolver implementations, I noticed an oddity. The CookieThemeResolver does not extend from AbstractThemeResolver. This creates an odd schism in the hierarchy.

In my opinion, the CookieThemeResolver IS-A AbstractThemeResolver much more than a CookieGenerator. It can certainly use the CookieGenerator via HAS-A and delegatation. It would appear that no one uses the CookieThemeResolver directly as a CookieGenerator, so the change shouldn't break any client code.

It also creates some duplicate code and logic, as both AbstractThemeResolver and CookieThemeResolver implement a ORIGINAL_DEFAULT_THEME_NAME and setters. They are the same in both classes, and their intentions are the same. For this reason alone I believe CookieThemeResolver should extend AbstractThemeResolver directly.

Let me know if you'd like a patch.

Thanks!

Seth

Affects: 1.2.3
Issue 1:
Moving over from here: https://typescript.codeplex.com/workitem/2475

Issue 2:
type A = number
type B = string
type C = number|string

const cc: C[] = [1, 2, "a", "b"]

function isNumber(a): a is A {
return typeof a === 'number'
}

// OK
const dd = []
for (let n = 0; n < cc.length; n++) {
const d = cc[n]
if (typeof d === 'number') {
dd.push(d.toFixed())
}
}

// OK
const ee = []
for (let n = 0; n < cc.length; n++) {
const d = cc[n]
if (isNumber(d)) {
ee.push(d.toFixed())
}
}

// NOT OK - property 'toFixed' does not exist on type 'number' | 'string'
// (guard fails when using "cc[n]" instead of first assigning to "d")
const ff = []
for (let n = 0; n < cc.length; n++) {
if (typeof cc[n] === 'number') {
ff.push(cc[n].toFixed())
}
}

// NOT OK - property 'toFixed' does not exist on type 'number' | 'string'
// (guard fails when guarding the inverse)
const gg = []
for (let n = 0; n < cc.length; n++) {
const d = cc[n]
if (typeof d !== 'number') { continue }
gg.push(d.toFixed())
}

// NOT OK - property 'toFixed' does not exist on type 'number' | 'string'
// (guard fails when used in a filter)
// @see https://github.com/Microsoft/TypeScript/issues/7657
const hh = cc
.filter(isNumber)
.map(c => c.toFixed())