WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
// file: foo.ts
import BluebirdPromise from 'bluebird';
export async function foo(): BluebirdPromise { }

// file: foo.js
function foo() {
return __awaiter(this, void 0, BluebirdPromise, function* () { });
}
exports.foo = foo;

(Compiled with target=ES6, module=commonjs, noEmitHelpers=true).

The BluebirdPromise import has been elided in the generated code, resulting in "ReferenceError: BluebirdPromise is not defined" at runtime.

The elision occurs because BluebirdPromise only appears in a type position which up until v1.7 meant that the compiler could safely elide it. But the compiler now emits this type annotation into the JavaScript output so that elision assumption is no longer safe.

IMO the problem here is not the elision logic, its the fact that the compiler now emits code that depends on type annotaitons, so the type system no longer enjoys the quality of being fully erasable, which I understood to be a core design principle of the language. I thought the idea of using type annotations to change runtime behaviour would have been smacked down by @ahejlsberg and the team before it got into production.

Regardless of that contended side-topic, I believe this is a bug.

Issue 2:
The generated JS code is missing a dependency onto the references promise implementation. Steps to reproduce:

install bluebird promises

create the following bluebird.d.ts.

declare module 'bluebird' {
interface Promise<T> {
then<U>(onFulfilled: (value: T) => U, onRejected: (reason: any) => U): Promise<T>;
}

var Promise: {
new<T>(resolver: (resolve: (value: T) => void, reject: (reason: any) => void) => void): Promise<T>;
}
}

create a test file

import * as bluebird from 'bluebird';

async function firstName(): bluebird.Promise<string> {
return "Dirk";
}

async function lastName(): Promise<string> {
return "Baeumer";
}

async function use() {
var first = await firstName();
var last = await lastName();
return `${first} ${last}`;
}

if (require.main === module) {
var p = use();
p.then((value) => console.log(value));
}

compile and run.

Observe: you get an exception. Problem is that the generated code is missing a

var bluebird = require('bluebird');

statement.
Issue 1:
this example works great

function test(value: string[]| string){
var result: string;
if (value instanceof Array){
result = value.join('');
}
}

but this

interface IFoo {
value: string[] | string;
}

function bar(options: IFoo) {
var result: string;
if (options.value instanceof Array) {
result = options.value.join('')
}
}

property join does not exists on type string[] | string

i think i'ts compiler mistake

Issue 2:
var data : { value: string | number } = { value: 'hey' };
if (typeof data.value === 'string') {
alert(data.value.toLowerCase()); // <-- type of value is undecided
}
Issue 1:
EDIT: For the impatient ones, Skip down to my comment below with directions on how to install all dependencies for Julia on Ubuntu 12.04.

It'd be great to have an Ubuntu PPA that collects all the software that Julia needs to compile. This could significantly cut down on compile times, and would be a nice first step toward having actual binary packages of Julia for debian.

From my tests, the following packages work with/are necessary to build Julia:

gfortran
llvm-3.1-dev (ppa:dr-graef/llvm-3.1.precise)
libblas-dev
liblapack-dev
libarpack2
libpcre3-dev
libglpk-dev
lighttpd
libgmp-dev
libunwind7-dev
libreadline-dev

This leaves SuiteSparse (Only 3.4.0 is available, no 4.0.2, as far as I can see), FFTW (Installing libfftw3-dev didn't work for me; I got the dreaded LoadError, so I figured I'd just let Julia compile her own which works), zlib (It doesn't come with large file support by default), and whatever else I'm missing.

Issue 2:
Noticing this on Windows:

julia> versioninfo()
Julia Version 0.3.0-prerelease+2584
Commit 951e027* (2014-04-10 13:40 UTC)
Platform Info:
System: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
LAPACK: libopenblas
LIBM: libopenlibm

julia> println("Typing a long input line at the REPL displays extra copies of th
julia> println("Typing a long input line at the REPL displays extra copies of th
julia> println("Typing a long input line at the REPL displays extra copies of th
e line when wrapping to the next line")

Or if I SSH into a Linux machine using either Putty or Cygwin, I see the same basic problem with Linux-Julia (same commit) but with only one extra copy instead of two.
Issue 1:
I'm trying to make a terms facet of an IP address field (with the ip type). It returns numbers, not IP addresses. It works if the type is string. I thought it was fixed in #678. I'm using 0.90.3.

The idea is to use Kibana to draw a pie of the top IP addresses in my logs.

Issue 2:
Terms facet on ip field returns raw integers instead of ip addresses.

When asked:

curl -XGET http://172.16.0.134:9200/nginx-2013.07.12/_search?pretty -d'
{
"facets": {
"pie": {
"terms": {
"field": "clientip",
"size": 10,
"exclude": []
},
"facet_filter": {
"fquery": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "*"
}
},
"filter": {
"range": {
"@timestamp": {
"from": "2013-07-12T12:09:30.122Z",
"to": "2013-07-12T12:14:30.122Z"
}
}
}
}
}
}
}
}
},
"size": 0
}'

it sais:

{
"took" : 43,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 1308357,
"max_score" : 1.0,
"hits" : [ ]
},
"facets" : {
"pie" : {
"_type" : "terms",
"missing" : 0,
"total" : 14220,
"other" : 7100,
"terms" : [ {
"term" : 1472557106,
"count" : 1727
}, {
"term" : 1501212747,
"count" : 1621
}, {
"term" : 1556945832,
"count" : 1616
}, {
"term" : 1498126311,
"count" : 566
}, {
"term" : 1541613928,
"count" : 438
}, {
"term" : 1541613412,
"count" : 346
}, {
"term" : 2488386185,
"count" : 227
}, {
"term" : 3245280414,
"count" : 208
}, {
"term" : 2999036429,
"count" : 198
}, {
"term" : 1299254797,
"count" : 173
} ]
}
}
}

Mappings:

curl -XGET http://172.16.0.134:9200/nginx-2013.07.12/_mapping?pretty
{
"nginx-2013.07.12" : {
"nginx" : {
"_all" : {
"enabled" : false
},
"_source" : {
"compress" : true
},
"properties" : {
"@timestamp" : {
"type" : "date",
"format" : "dateOptionalTime"
},
"agent" : {
"type" : "string"
},
"app_id" : {
"type" : "string"
},
"auth" : {
"type" : "string"
},
"bytes" : {
"type" : "integer"
},
"clientip" : {
"type" : "ip"
},
"duration" : {
"type" : "float"
},
"hosting" : {
"type" : "string"
},
"httpversion" : {
"type" : "string"
},
"ident" : {
"type" : "string"
},
"message" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"physical" : {
"type" : "string"
},
"referrer" : {
"type" : "string"
},
"request" : {
"type" : "string"
},
"request_size" : {
"type" : "integer"
},
"response" : {
"type" : "integer"
},
"source" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"source_host" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"source_path" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"tags" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"timestamp" : {
"type" : "date",
"format" : "dateOptionalTime"
},
"type" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"verb" : {
"type" : "string"
},
"vhost" : {
"type" : "string"
}
}
}
}
}
Issue 1:
From @egamma on January 22, 2016 9:10

Setup

{

"compilerOptions": {

"module": "commonjs",

"target": "es5",

"allowJs": true

},

"exclude": [

"node_modules"

]

}

Create a single file with a single function.

Copied from original issue: microsoft/vscode#2172

Issue 2:
interface Foo {
x;
}
interface Bar { }

var foo: Foo;
var bar: Bar;

foo = bar;
// Type 'Bar' is not assignable to type 'Foo':
// Property 'x' is missing in type 'Bar'.

foo = bar;
// Type 'Bar' is not assignable to type 'Foo'.

This happens because we cache the results of assignability checks. And the elaboration portion of an assignability error is obtained by side effects that get short circuited on a cache hit.
Issue 1:
Samuel Fung opened SPR-9370 and commented

My app use an exception reporting framework that depends on the fact that all exceptions should be serializable. When org.springframework.web.client.HttpStatusCodeException is thrown in a RestTemplate method, the exception reporting framework complains that a Charset object in the HttpStatusCodeException is not serializable.

Affects: 3.1.1

Issue Links:

#13911 HttpStatusCodeException cannot be serialized ("duplicates")

Issue 2:
Liu, Yinwei David opened SPR-7308 and commented

Hi,

Do you have any plan to provide a high level cache API in Spring container? such as TransacationManager which manages different transaction resource.

Currently, we have a lot different cache implementations, e.g. EHCache, H2, and so on. Each cache needs a different api to get data from the underlying cache. It is a kind of barrier to disallow people easily switch from one cache to another cache, we always need a extra layer to decouple the our code with the actual cache.

I think it would be great if Spring can provide a high level cache api which can allow people easily choose a underlying cache.

Please let me know your thoughts, thanks.

David

Affects: 3.0.3

Issue Links:

#10491 HTTP cache and conditional requests support in RestTemplate

6 votes, 11 watchers
Issue 1:
We need ability to pass custom config information at runtime to the browser, in the same fashion next.js passes assetPrefix from next.config.js.

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

Expected Behavior

Ability to add custom information (like graphql endpoint) to next.config.js, something like:

module.exports = {
assetPrefix: process.env.CDN_PREFIX,
config: {
graphql: {
uri: process.env.GRAPHQL_ENDPOINT
},
myCustomThing: '2345678',
myCustomList: [ 'a', 'b', 'c' ]
}
};

and a way to consume it in the app running in the browser, like:

const { config } = __NEXT_DATA__

Current Behavior

Nothing happens

Context

We're building immutable images that later deployed to the different environments, so there is no way for us to mutate the code and bake in API endpoints, we need this feature to provide API endpoints via environment variables at runtime.

Thank you.

Issue 2:
Feature request

Is your feature request related to a problem? Please describe.

Currently, the logic to move things into the commons chunk is based on the count of pages (ie. files in the pages/ directory). I think this approach doesn't scale very well and is too simplistic.

If we have a larger app with different sets of pages that have shared dependencies, they won't be moved to up to shared chunks. For example, when 30% of pages depend on module "a".

Even if we "cheat" by importing things into more pages, they will only get moved to the single commons chunk where they're unnecessary by all other pages (in our example, "a" will end up in commons but is not needed on 70% of pages)

If I interpret the generated bundles correctly, there are no shared chunks created for anything that isn't a page.

Describe the solution you'd like

Ideally, the 30% of pages which depend on module "a" should have a shared chunk containing "a". This chunk would not be loaded/used by the other 70% of pages

Non-page modules should also be able to have shared chunks

In short: chunk splitting should be more granular. I believe with the move to webpack 4 in #4639 this shouldn't be too hard, as it would generally mean giving more control over the chunking back to webpack.

I haven't analyzed the situation with the current canary branch, so my observations are still based on the current stable webpack 3 based approach. However, the same logic is in place at the moment:

https://github.com/zeit/next.js/blob/f4988e7fa3152920125498778dbcb9656be24072/build/webpack.js#L86-L94

If this sounds interesting @timneutkens, I'd be happy to spend some time on this by trying out a solution.

Additional context

https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
Issue 1:
Isssue

tel and callto links not opened in app despite having been registered with setAsDefaultProtocolClient

It is very similar (identical?) to this issue. It is 6 months old and has received 7 thumbs up but no further attention, hence this new attempt.

Specifics:

Output of node_modules/.bin/electron --version:

v.3.0.10

Operating System (Platform and Version):

Windows 10

Version 1709

OS Build 16299.125

Output of node_modules/.bin/electron --version on last known working Electron version (if applicable):

Not applicable

Expected Behavior

app.setAsDefaultProtocolClient('tel') and app.setAsDefaultProtocolClient('callto') should make your application become available in the list of apps appearing when opening a tel: or callto: link.

Actual behavior

Application is not included in the list of apps appearing when clicking a tel or callto link.

To Reproduce

Download the latest Electron demo (v2.0.1)

In function createWindow found in main.js, add these two lines:

const defaultProtocolSet = app.setAsDefaultProtocolClient('tel'); //can also be set to 'callto' instead of 'tel'
console.log('defaultProtocolSet? ', defaultProtocolSet);

Open Windows's Command Prompt and run npm install && run dev

You should now see 'defaultProtocolSet? true' in the Command Prompt window

Open a browser and in the address field enter tel://0123456789(replace number with number of your choice) and press return. Alternatively you can click on any tel link you have available.

Result:

A menu with a list of applications will be opened, but your app will not be represented here.

Additional Information

There does not seem to be a problem registering and opening custom protocol links, such as 'myOwnTestProtocol'

Thanks for your time and consideration!

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

Electron Version:

v5.0.2

Operating System:

macOS 10.13.6

Last Known Working Electron version:

Haven't tried on other electron versions.

Expected Behavior

I have an app which runs in electron <webview>. I need to render multiple iframes inside this <webview> and dynamic add or remove them.

Actual Behavior

When I remove one <iframe> from the dom tree, the whole <webview> crashes. I didn't use JS to remove iframe node, instead, I just delete one <iframe> from the dom inspector, and the <webview> crashes.

To Reproduce

This is an example : https://github.com/cloudsere/electron-quick-start. You can run commands below to reproduce.

$ git clone https://github.com/cloudsere/electron-quick-start
$ npm install
$ npm start
Issue 1:
function Decoration() {}
function PropertyDecoration(target: any) {
console.log(target);
}

@Decoration
export class ClassName {

@PropertyDecoration
property: string = 'null';
}

compiles to:

function Decoration() { }
function PropertyDecoration(target) {
console.log(target);
}
let ClassName = class {
constructor() {
this.property = 'null';
}
};

However this means that the console.log result will be {}. Removing the @Decoration class decorator outputs:

function PropertyDecoration(target) {
console.log(target);
}
class ClassName {
constructor() {
this.property = 'null';
}
}

with the better console.log result of ClassName {}.

Issue 2:
const bar = (target: any, name: any, value: any) => {
const parentName = target.constructor.name
console.log(parentName)
}
class a {
@bar
public foo() {
}
}

It works. But

const bar = (target: any, name: any, value: any) => {
const parentName = target.constructor.name
console.log(parentName)
// it would be an empty string here!!!!!!!!
}
const log = (target: any) => {}

@log
class a {
@bar
public foo() {
}
}

these code is ok when compile target was ES5, but missing class name when target was ES6
Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

logstash callback plugin

ANSIBLE VERSION

ansible 2.3.0.0
config file = /root/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]

CONFIGURATION

callback_plugins = callback_plugins
callback_whitelist = logstash

OS / ENVIRONMENT

centos7

SUMMARY

When custom callback plugin with same name as built in plugin is defined, the plugin gets called twice. The plugin called is the one in runtime folder.

STEPS TO REPRODUCE

Add a callback plugin to "runtime folder/callback_plugins" and enable it. Tested with logstash plugin only.

EXPECTED RESULTS

Only relevant lines i found are:

Using /root/ansible/ansible.cfg as config file
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
Loading callback plugin logstash2 of type aggregate, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc

When using different name (logstash2).

ACTUAL RESULTS

Using /root/ansible/ansible.cfg as config file
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
Loading callback plugin logstash of type aggregate, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
Loading callback plugin logstash of type aggregate, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc

When using same name (logstash).

Issue 2:
ISSUE TYPE

Feature Idea

COMPONENT NAME

vault

ANSIBLE VERSION

2.x

CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

SUMMARY

Inspired by #8340. I'm not sure if vault or the file loader already has such a feature, but if it could index loaded files by checksum, it wouldn't have to decrypt the same content multiple times.

STEPS TO REPRODUCE

Make a bunch of duplicate vars files that are vault encrypted.

EXPECTED RESULTS

Only decrypt once.

ACTUAL RESULTS

Decryption for every file.
Issue 1:
System info

Playwright Version: 1.34.3

Operating System: Windows 11

Browser: Chromium

Other info: n/a

Source code

I provided exact source code that allows reproducing the issue locally.

Link to the GitHub repository with the repro

kumarchandresh/playwright-issues

Steps

Run the test.

See it fail.

Replace /ancestor:: with xpath=/ancestor:: or //ancestor:: in the source code.

Run the test again.

See it pass.

Expected

Test should NOT fail at step 2.

NOTE: If xpath=/ancestor:: is a valid selector for Playwright, then /ancestor:: should be too since Playwright can auto detect the type of selector being used.

Actual

Test fails at step 2.

Issue 2:
For send array "data[product]" I write

"data[product][]:18

data[product][]:55"

In postman it looks like this:

How to make similar array to playwright?

The following method is not working properly:

"data[product_ids][]": [18, 55]
Issue 1:
function safeFindIndex<T extends object>(
array: ReadonlyArray<T>,
matcher: Partial<T>,
recordName: string,
assertMatcher: Partial<T> | undefined
): number {
const index = findIndex(array, matcher) // ERROR HERE: immutable-array.ts:21
if (index === -1) {
reportError(new TypeError(`Couldn't find ${recordName}`), { extra: { matcher } })
} else {
const found = array[index]
if (assertMatcher !== undefined && !isMatch(found, assertMatcher)) {
reportError(
new TypeError(`${recordName} was in unexpected state`),
{ extra: { record: found, assertMatcher } }
)
}
}
return index
}

This code causes this error:

ERROR in [at-loader] TS2321: Excessive stack depth comparing types 'Partial<T>' and 'string | [string, any] | ListIterator<T, boolean> | PartialDeep<T> | undefined'.

ERROR in [at-loader] ./app/assets/javascripts/utilities/immutable-array.ts:21:34
TS2321: Excessive stack depth comparing types 'Partial<T>' and 'string | [string, any] | ListIterator<T, boolean> | PartialDeep<T> | undefined'.

package versions

@types/lodash@4.14.108

typescript@2.8.1

This is not an issue with @types/lodash@4.14.106

cc: @aj-r @andy-ms

Issue 2:
Search Terms:

"excessive depth"

"generic partial"

Code

const fn = <T>(arg: T) => {
((arg2: RecursivePartial<T>) => {
// ...
})(arg); // <-- here
};

type RecursivePartial<T> = {
[P in keyof T]?: RecursivePartial<T[P]>;
};

Expected behavior:

Comparing a generic with a partial of that generic working without errors.

Actual behavior:

Getting "Excessive stack depth comparing types 'T' and 'RecursivePartial'." since upgrading to 2.7.x. (Also errors in 2.8.x). Working in 2.6.1.

Playground Link:

https://www.typescriptlang.org/play/index.html#src=class%20Greeter%20%7B%0D%0A%20%20%20%20greeting%3A%20RecursivePartial%3Cstring%3E%3B%0D%0A%20%20%20%20constructor(message%3A%20string)%20%7B%0D%0A%20%20%20%20%20%20%20%20this.greeting%20%3D%20message%3B%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20greet()%20%7B%0D%0A%20%20%20%20%20%20%20%20return%20%22Hello%2C%20%22%20%2B%20this.greeting%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Alet%20greeter%20%3D%20new%20Greeter(%22world%22)%3B%0D%0A%0D%0Alet%20button%20%3D%20document.createElement('button')%3B%0D%0Abutton.textContent%20%3D%20%22Say%20Hello%22%3B%0D%0Abutton.onclick%20%3D%20function()%20%7B%0D%0A%20%20%20%20alert(greeter.greet())%3B%0D%0A%7D%0D%0A%0D%0Adocument.body.appendChild(button)%3B%0D%0A%0D%0Aconst%20fn%20%3D%20%3CT%3E(arg%3A%20T)%20%3D%3E%20%7B%0D%0A%20%20%20%20((arg2%3A%20RecursivePartial%3CT%3E)%20%3D%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20%2F%2F%0D%0A%20%20%20%20%7D)(arg)%3B%0D%0A%7D%3B%0D%0A%0D%0Atype%20RecursivePartial%3CT%3E%20%3D%20%7B%0D%0A%20%20%20%20%5BP%20in%20keyof%20T%5D%3F%3A%20RecursivePartial%3CT%5BP%5D%3E%3B%0D%0A%7D%3B

Related Issues:

None?
Issue 1:
this most appears with a lot chars in a line

Issue 2:
Reported in Halp:

support/b47caffcaba511e3903bfcd96bef4da2

If I have a paragraph in CJK characters and toggle soft wrap, the wrapping point (should be the right edge of current window) is far away than the current edge and some characters are displayed out of window which is not visible.

I think this may because of the wrong processing of character wide. A latin letter has a width "one character width", but usually a CJK character has a width twice as a latin letter, it's "two character width". Hope this information may help you.

The debug info auto attached should include the test text I open now. It's include (from up to down): Chinese, Japanese, Korean, English. Actully they tell the same thing:)

I can reproduce this in Atom 0.75.0. (notice how CJK characters are not wrapped correctly at the right edge of the app)
Issue 1:
In the image below i have a snippet. In the body of the loop the syntax colors seem messed up.

The way to fix it is adding a space before the < and then the colors are normal.

I have this problem in version 0.10.10 and had it in the previous version.

Snippet:

for(var i=0;i<10;++i){
// Weird colors
for(var i=0;i<10;++i){
// Weird colors
}
}
// Normal color
for(var i=0;i <10;++i){
for(var i=0;i <10;++i){
}
}

Issue 2:
Ported from microsoft/TypeScript-Sublime-Plugin#285

Related to microsoft/TypeScript-Sublime-Plugin#265.

Issue:

Correct:
Issue 1:
Very minor issue but if Atom is already open and one uses the 'atom' command in the Terminal to open a new file the Dock temporarily experiences two Atom icons before returning to the proper one.

In an ideal world, we'd never see this second icon.

Issue 2:
Having Atom running, when you open additional files (or try to open a file that you have already open) from the Terminal, OS X's Dock will show a temporary second Atom icon (and then it goes away). This should not be the case.

See how TextMate 1.5.x doesn't do this when you use the mate shell command. Same for opening Sublime Text running subl from the terminal.