WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
TypeScript Version:

1.8.0

Code

// A self-contained demonstration of the problem follows...
class A {
constructor(a: number, b: boolean) {

}
foo() {

}
bar: boolean;
}

function doIt(a: A) {
if (a instanceof A) {

}
}

doIt(new A(1, true));

doIt({ foo() { }, bar: false }); // expect type check error

Expected behavior:

The second to doIt should raise a type check error.

Actual behavior:

It does not. I assume it was a conscious decision and I wonder why? This break assumptions the instanceof operator makes and has led to subtle bugs on our side.

Issue 2:
TypeScript Version:

1.8.x and nightly

Code

class C1 { item: string }
class C2 { item: string[] }
class C3 { item: string }

function Foo(x: C1 | C2 | C3): string {
if (x instanceof C1)
return x.item;
else if (x instanceof C2)
return x.item[0];
else if (x instanceof C3)
return x.item; // Error property item does not exist on C2
}

Expected behavior:

Code should compile

Actual behavior:

Code has an error as shown

More

The following works i.e. if C1 and C3 differ in structural compatibility:

class C1 { item: string }
class C2 { item: string[] }
class C3 { items: string }

function Foo(x: C1 | C2 | C3): string {
if (x instanceof C1)
return x.item;
else if (x instanceof C2)
return x.item[0];
else if (x instanceof C3)
return x.items; // Ok
}

🌹
Issue 1:
Hello,

I found out that Atom collects analytic data to improve the program. There is nothing bad about this idea. But I think, it would be a better way to ask the user to Opt-In this analytics.

Currently, the user has to disable the metrics plugin (= do an Opt-Out), but I think there should be at least a clear information at the first run to tell the user that data is collected and if he/ she wants to allow the collection of this data.

Otherwise, this situation could cause maybe sooner or later problems in countries with stricter data privacy laws, e. g. Germany. And nobody wants that.

Please correct me if I just over read an info about this topic or this issue is a duplicate.

Kind regards

squarerootfury

Issue 2:
That's one long line that's been broken up according to something I don't understand, and I'm going to end of line (cmd-rightarrow) and hitting delete.

If you're wondering, the text is copy/pasted from my friend Sommer Gentry's thesis, which I happen to have on my computer in PDF format.
Issue 1:
ISSUE TYPE

Feature Idea

COMPONENT NAME

yum module

ANSIBLE VERSION

2.3

SUMMARY

From @halberom on 2015-12-10T12:46:34Z

version

ansible v2, devel

issue

when changing multiple yum repos (e.g. in a common/base role), it can be necessary to clean the cache so yum will refresh and any future actions will get the updated meta.

current

it's necessary to either run a shell/command,

- command: yum clean all

which currently gives a warning [WARNING]: Consider using yum module rather than running yum

Or put update_cache: yes in at least one yum (present, installed, latest) task after the repo changes. If there isn't such a yum task after repo changes, then we don't get the updates. Which means we'd need to put update_cache: yes elsewhere we use yum - which is likely overkill.

desired

the ability to use update_cache as a standalone action

(optional) a param to clean XYZ.

Copied from original issue: ansible/ansible-modules-core#2667

Issue 2:
ISSUE TYPE

Feature Idea

COMPONENT NAME

ANSIBLE VERSION

ansible 2.3.1.0
config file = /opt/uss/ansible/config/2.3.1.cfg
configured module search path = [u'/usr/share/ansible']
python version = 2.7.5 (default, Oct 11 2015, 17:47:16) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]

CONFIGURATION

OS / ENVIRONMENT

SUMMARY

STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

From the original issue:

version

ansible v2, devel

issue

when changing multiple yum repos (e.g. in a common/base role), it can be necessary to clean the cache so yum will refresh and any future actions will get the updated meta.

current

it's necessary to either run a shell/command,

command: yum clean all

which currently gives a warning [WARNING]: Consider using yum module rather than running yum

Or put update_cache: yes in at least one yum (present, installed, latest) task after the repo changes. If there isn't such a yum task after repo changes, then we don't get the updates. Which means we'd need to put update_cache: yes elsewhere we use yum - which is likely overkill.

desired

the ability to use update_cache as a standalone action
(optional) a param to `clean XYZ`.

LINK: ansible/ansible-modules-core#2667
Issue 1:
Environment

C:\>ver
Microsoft Windows [Version 10.0.18362.175]

C:\>where wt.exe
C:\Users\Roy\AppData\Local\Microsoft\WindowsApps\wt.exe

C:\>echo %LocalAppData%
LOCALAPPDATA=C:\Users\Roy\AppData\Local

Steps to reproduce

Setting "CodePage" within the registry doesn't result in the correct code page within the wt terminal window.

Neither this ...

C:\>C:\Windows\System32\reg.exe add HKCU\Console\%LocalAppData^%_Microsoft_WindowsApps_wt.exe /v CodePage /t REG_DWORD /d 65001 /f
The operation completed successfully.

nor this ...

C:\>C:\Windows\System32\reg.exe add HKCU\Console\C:_Users_Roy_AppData_Local_Microsoft_WindowsApps_wt.exe /v CodePage /t REG_DWORD /d 65001 /f
The operation completed successfully.

result in the correct codepage within the wt terminal window..

Expected behavior

C:>chcp
Active code page: 65001

Actual behavior

C:\>chcp
Active code page: 437

Issue 2:
Environment

Platform ServicePack Version VersionString

Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0

Windows Terminal

0.4.2382.0

Powershell version

$PSVersionTable.PSVersion Major Minor Build Revision

5 1 18362 145

Any other software?

no

Steps to reproduce

Type a poorly formed Export-Certificate powershell command such as

Export-Certificate -Type CERT -FilePath "cert:\LocalMachine\my\blah" -Force

Don't supply any details and hit enter when prompted for

"Supply values for the following Parameters CERT:

Get a great long exception stack trace that you can't read before windows closes as it crashes to desktop ending the WindowsTerminal process.

Expected behavior

Get a stack trace, and the terminal doesn't actually close and crash back to desktop.

Actual behavior

Closes window and Crashes back to desktop after printing out stack trace.
Issue 1:
Step 0:

Step 1:

Step 2 (after Invalid keyboard event):

Step 3 （click new window, Previous accidental closure）:

I didn't find the same issues.

I know it's not a friendly operation, but I think it's an unexpected problem.

Issue 2:
Description of the new feature/enhancement

As a user I want to be able to paste long commands that are spread over multiple lines where the linebreaks are escaped with \. Example below

sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common

ACTUAL

The actual behavior is that terminal tries to execute each line immediately . See example below

learn@DESKTOP-4FCRN5Q:~/projects$ sudo apt-get install \
>
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
learn@DESKTOP-4FCRN5Q:~/projects$ apt-transport-https \
>
apt-transport-https: command not found
learn@DESKTOP-4FCRN5Q:~/projects$ ca-certificates \
>
ca-certificates: command not found
learn@DESKTOP-4FCRN5Q:~/projects$ curl \
>
curl: try 'curl --help' or 'curl --manual' for more information
learn@DESKTOP-4FCRN5Q:~/projects$ gnupg-agent \
>
gnupg-agent: command not found

EXPECTED

The multiline command from above example is treated as on command and after being paste waits for the user to press ENTER before it is executed.

NOTE: The Ubuntu WSL is a good example of how it should behave correctly
Issue 1:
[Enter steps to reproduce below:]

...

...

Atom Version: 0.165.0

System: Mac OS X 10.10.1

Thrown From: Atom Core

Stack Trace

Uncaught Error: spawn gofmt ENOENT

At events.js:85

Error: spawn gofmt ENOENT
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1051:32)
at child_process.js:1142:20
at process._tickCallback (node.js:378:11)

Commands

2x -4:34.2 core:save (input.hidden-input)
3x -3:03.9 core:backspace (input.hidden-input)
2x -3:02.5 core:save (input.hidden-input)
-2:40.0 core:confirm (input.hidden-input)
8x -2:21.9 core:backspace (input.hidden-input)
-2:19.8 core:confirm (input.hidden-input)
2x -1:19.6 core:backspace (input.hidden-input)
-1:18.0 core:confirm (input.hidden-input)
-0:00.0 core:save (input.hidden-input)

Config

{
"core": {},
"editor": {
"invisibles": {},
"fontSize": 14
}
}

Installed Packages

# User
go-format, v1.0.7
go-plus, v3.0.13
gofmt, v0.2.0
linter-golint, v0.2.0

# Dev
No dev packages

Issue 2:
Hi. I just install go-plus and try to edit file which is created by command in terminal so when I click save I get the exception. Here is the step to reproduce this bug.

Edit file.go

Command+s then I get this exception.

Atom Version: 0.165.0

System: Mac OS X 10.10.1

Thrown From: Atom Core

Stack Trace

Uncaught Error: spawn gofmt ENOENT

At events.js:85

Error: spawn gofmt ENOENT
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1051:32)
at child_process.js:1142:20
at process._tickCallback (node.js:378:11)

Commands

2x -1:23.9 tree-view:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-0:24.7 golang:goinfo (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-0:16.6 editor:newline (input.hidden-input)
2x -0:07.9 core:move-right (input.hidden-input)
-0:00.0 core:save (input.hidden-input)

Config

{
"editor": {
"fontSize": 12
}
}

Installed Packages

# User
atom-beautify, v0.17.2
autocomplete-plus, v1.0.0
go-plus, v3.0.11
gofmt, v0.2.0

# Dev
No dev packages
Issue 1:
I added the code in .vimrc:

let &t_SI.="\e[5 q"
let &t_SR.="\e[4 q"
let &t_EI.="\e[1 q"

cursor style can be changed but the word under the cursor is not visible

Issue 2:
In the new Terminal properties page, you can set your "Cursor shape and color"... Cool! But right now you can only set the cursor fg color, and you can not set bg color. For example, I'm trying to set up the "terminal" to look like an old "green screen" terminal. To do so I set console bg color to black and fg color to green. I also set my cursor shape to "box", but when I move the cursor over a char I would like it to 'swap' the bg and fg colors so that the cursor text is green bg and black fg (not "inverse" them because that would make cursor bg White and cursor text dim Magenta)
Issue 1:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/34624/kubernetes-pull-build-test-gci-e2e-gce/2334/

Failed: [k8s.io] Kubectl client [k8s.io] Simple pod should support exec {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:321
Oct 13 22:23:22.442: Unexpected kubectl exec output. Wanted "running in container", got ""
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:295

Happened on a presubmit run in #34624.

Previous issues for this test: #28426 #32168

Issue 2:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gci-gce/478/

Failed: [k8s.io] Kubectl client [k8s.io] Simple pod should support exec {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:321
Sep 29 07:00:46.480: Unexpected kubectl exec output. Wanted "running in container", got ""
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:295

Previous issues for this test: #28426 #32168
Issue 1:
I've setup the default dags that come with the installation. Celery/RabbitMQ is working now and when I run a task, I get this error:

sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: task_instance.task_id, task_instance.dag_id, task_instance.execution_date [SQL: u'INSERT INTO task_instance (task_id, dag_id, execution_date, start_date, end_date, duration, state, try_number, hostname, unixname, job_id, pool, queue, priority_weight) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: ('print_the_context', 'example_python_operator', '2015-01-01 00:00:00.000000', '2015-07-28 05:27:40.692490', None, None, 'running', 1, 'SRV01', 'root', '8', None, 'celery', 11)]

Issue 2:
I have a DAG I want to run at 10:30am and 3:30pm every day, but I'm not sure what the best way to specify this is in Airflow. I can't just set the schedule interval on a single DAG, because the interval between jobs is not uniform (alternates between 5 and 19 hours).

Is there an easy way to make a DAG for the 10:30 case, and then duplicate it with a different name and change the start time to 3:30pm?
Issue 1:
Currently I think the only way to perform multiple commands in succession is to create an extension. It would be good if this was supported by keybindings.json.

See http://stackoverflow.com/q/37009184/1156119

Issue 2:
When creating keyboard shortcuts, it would be nice if you could pass an array of commands (to execute like a macro) that would run the commands in that order.

So take this for example:

{
"key": "ctrl+s",
"command": [
"editor.action.format",
"editor.action.trimTrailingWhitespace",
"workbench.action.files.save"
],
"when": "editorTextFocus"
}

It would format the file, remove trailing white space then save the file.
Issue 1:
The problem I found can be reproduced with the following code, on typescript version 1.7.5. The problem exists in typescript from the release when class expressions (#497) were introduced.

function builder() {
return new class House {
public open():void {
console.info('house is open');
}
}
}
const house = builder();
house.open();

is compiled to

function builder() {
return new (function () {
function House() {
}
House.prototype.open = function () {
console.info('house is open');
};
return House;
})();
}
var house = builder();
house.open();

and looks good, but throws in the console:

Uncaught TypeError: house.open is not a function

Thats, because from builder() is returned constructor of House instead of an instance. The example above works, when we assign constructor to a variable and then, create instance with the new keyword.

Issue 2:
tested on 690b87c

source code.

new class {
hi() {
return "Hi!";
}
}().hi();

expected.

new ((function () {
function class_1() {
}
class_1.prototype.hi = function () {
return "Hi!";
};
return class_1;
})())().hi();

actual.

new (function () {
function class_1() {
}
class_1.prototype.hi = function () {
return "Hi!";
};
return class_1;
})()().hi();

$ tsc --target es5 test.ts
$ node test.js
/private/tmp/tsc-1.6/test.js:8
})()().hi();
^

TypeError: Cannot read property 'hi' of undefined
at Object.<anonymous> (/private/tmp/tsc-1.6/test.js:8:7)
at Module._compile (module.js:430:26)
at Object.Module._extensions..js (module.js:448:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:471:10)
at startup (node.js:117:18)
at node.js:951:3
Issue 1:
Not able to create Cloud9 account.

Its asking credit card details to create an account.

Issue 2:
c9.io has been acquired by AWS and now requires the use of a credit card. Heroku also requires the use of a credit card for hosting - and also requires learning a bunch of Heroku-specific concepts - so it was never an optimal solution either.

Many people outside of the US (and many people under the age of 18) do not have credit cards, and are understandably intimidated about entering them into services where they could screw up and end up owing hundreds of dollars.

So let's step back and examine the underlying goals. We want campers to be able to:

build the back end projects

tie in databases and other services as necessary

host these projects somewhere permanently accessible

Essential tools for these projects

Development:

c9.io (free, requires credit card)

local development on machine

hyperdev.com (free)

Hosting:

Heroku (free, requires credit card)

hyperdev.com (free, no credit card)

AWS (free for 1 year, requires credit card - https://aws.amazon.com/free/)

Mongo databases:

MLAB (free 0.5 gb, no credit card)

Compose (free 30-day trail, requires credit card)

Cloud development

My thinking at this point is that we could recommend HyperDev for development and hosting, and MLAB for the database. This setup would be free, with no credit card required. As far as I can tell, HyperDev projects remain publicly accessible indefinitely, so these URLs could be submitted as the live demo links.

The main drawback with this is HyperDev is a limited environment (it's just Node, without Git, Linux, and many of the features of c9.io). But this limitation actually makes it much easier to use for beginners, in the same way that CodePen and JSBin abstract away file systems and web servers. HyperDev is essentially CodePen for Node.js development.

Local Development

I also recommend we finalize a good tool for Node/Express development. In the past we've explored Vagrant and Docker.

We could even create an image that we could load onto a bootable USB with Linux. This way, people who only have access to Windows machines (or public computers) could do their work right on a USB. They wouldn't need to download gigabytes of files.

We could put the images for these bootable drives on Bit Torrent and even distribute the USBs in bulk through mail to Campsites.

I'm looking forward to hearing your thoughts on this.
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

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

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

Issue Details

Node Version:

v12.16.1

Electron Version:

v11.0.0-beta.13

Electron-builder Version:

v22.9.1

Operating System:

macOS 10.15.2

Last Known Working Electron version:

v10.1.4

Hello,

I am not sure this is the right place to post this or if I should create this on electron-builder, but considering the behavior changed between version 10.x and 11 of electron it might be relevant. Please tell me if I should open it elsewhere instead. We are having an issue when building our application with version 11-beta using electron-builder. We rely on static binaries to be included in our build (ffmpeg, to name it), but when starting the built app we get a JS error saying the package.json file for this module is invalid (Unexpected end of JSON input).

Expected Behavior

The production application should run similarly to the dev

Actual Behavior

Production build crashes on start

When looking at the content of the generated .app the (unpacked) app.asar has properly included the dependencies, and the package.json is valid.

To Reproduce

The project runs fine on dev, it's the finalized built version that has an issue. I created a repo with the base project, as well as uploaded the built version in the 1.0.0 release of this repo.

$ git clone https://github.com/lmancel/electron-tests.git
$ yarn install
$ yarn build

Built binary:

https://github.com/lmancel/electron-tests/releases/download/1.0.0/electron-test-1.0.0-mac.zip

Screenshots

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:

11.0.0-beta.1

Operating System:

macOS 10.15.6

Last Known Working Electron version:

11.0.0-beta.1

Expected Behavior

No Error

Actual Behavior

Uncaught Exception:

SyntaxError: Error parsing /Applications/electron11.app/Contents/Resources/app.asar/node_modules/ffmpeg-static/package.json: Unexpected end of JSON input

To Reproduce

packages:

"electron-builder": "^22.8.0",

"ffmpeg-static": "^4.2.0",

in main.js ：

var pathToFfmpeg = require('ffmpeg-static');

console.log('pathToFfmpeg ',pathToFfmpeg);

npm run build

install dmg and open the app

Screenshots

Additional Information
Issue 1:
Hi,

I used to have (with Symfony 2.6) parameters in app/config/config.yml in this form :

...
parameters:
my-parameter: 123

I was able to access these using ContainerInterface->getParameter('my-parameter');, however this now throws an InvalidArgumentException with the message "The parameter "my-parameter" must be defined." starting from Symfony 2.7.

There's no trace of this change in the change log nor in the UPGRADE-2.7.md file, is this a bug or is this new behavior intended ?

Thanks.

Issue 2:
The TimezoneType Field Type uses \DateTimeZone::listIdentifiers() to get the texts that are shown in the generated select HTML tag. Of course these are in perfect english. I've added all the texts needed to translate it in my AppBundle YAML translation files and configured the form like this so it gets translated with them:

class ProfileFormType extends AbstractType
{
...
public function buildForm(FormBuilderInterface $builder, array $options)
{
$constraint = new UserPassword();

$this->buildUserForm($builder, $options);

$builder
->add('timezone', 'timezone', array(
'label' => 'form.timezone.label',
'translation_domain' => 'AppBundle',
'choice_translation_domain' => true,
))
;
}
...
}

@javiereguiluz suggested me that those texts may be could be included in the Intl component like other resource bundles as Currrency, Regions, etc. If the community thinks this could be a new feature I would be glad to do the Spanish translations and could try to do the PR itself.
Issue 1:
Templates exist to resolve placeholders in pieces of text and can only be used in indexed scripts and ingest. While scripts are used in many other places and exist to flexible execute custom logic related to the context it is running in.

Templates are integrated into the script infrastructure (mustache implements ScriptEngineService interface, Template extends from Script and all places that use templates are hardcoded to use mustache language). I think it makes sense to strip templates from the script infrastructure and let it be its own thing. For example Template should be not extend from Script, template implementations would implement TemplateEngineService and all of the template features would be accessible from a TemplateService.

The following is a list of tasks to work towards a separated TemplateService:

Add ScriptService#compileTemplate and cut some script compilations to that method (#24280)

Cut all script compilation to ScriptService#compileTemplate (#24280)

Create a Template class similar to the Script class that we can use to parse templates and use that with ScriptService#compileTemplate

Make a replacement for ScriptEngineService for templates, us it in ScriptService#compileTemplate, and make mustache implement that instead.

Remove template specific stuff from Script and ScriptEngineService (I'm starting to get fuzzy on exactly what this is so we'll have to clarify later)

Issue 2:
could you also change src/main/java/org/elasticsearch/index/mapper/core/TypeParsers.java (line 66) to support empty array for "fields"?

} else if (fieldName.equals("fields")) {
Map<String, Object> fieldsNode = (Map<String, Object>) fieldNode;

similar to #5887