sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: Loading heavy resources on demand
Labels: discussion,topic:core

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
3.1.1 stable

**OS/device including version:**
All

**Issue description:**
I seek the ability to not have all "heavy" resources (like models, textures etc.) loaded immediately upon loading the scene, but on demand, if necessary. Please hear my reasoning before ridiculing me :)

I'm having much fun with Godot since 2.0, experimenting and trying different things, and I finally decided to write a 3d dungeon crawler from first-person perspective, with **randomly generated levels**. I already have a working PoC and it works very nice. My problem lies with the randomness in relation to the objects to fill level with. Let's say I want to generate a "cave" level. Since caves are all about spiders and such, I'd like to only fill the level with "spider" monsters. Now, I have several types of spiders, each one in a different .tscn, with a specific script, sounds, models, etc. Now, how to actually find all these scenes and choose from them to place a monster?

_Attempt 1_: Master scene containing all the monsters and a script to get_monster_type. Nice idea, but guess what, all the resources will be loaded anyway with the scene even if I only want a single spider type. Can you see where I'm going with this?

_Attempt 2_: A custom node tree containing _string_ paths to .tscn files and some metadata, for example biomes the monster appears in etc. Works, but you need to synchronize your library of monsters and the "database", so it's easy to forget something (or specify wrong path). Besides that, you will have redundancy (the database and the monster will definitely share some metadata, so you need to watch out for differences). And you lose self-containment of a monster .tscn, which I just love (a monster is a complete component, that will simply work if placed under a parent that supports it, like a level).

_Attempt 3_: Editor plugin to scan all monster scenes before running/deploying the game and producing metadata library with all the necessary info about monsters into a .json file. Pretty nice, but still something may break, and besides that, the editor must load everything to scan the .tscn. Besides that, it's still a workaround.

We have this beautiful (I really mean it) editor, which makes it easy to have a game object **completely self-contained** in a .tscn and I really don't like to being actually forced to make workarounds around it. I was also pretty surprised, that loading PackedScene actually loads everything inside it, even before instantiating it; a lightweight PackedScene would be enough for me (my "database" node tree would reference the monsters, so it could become Autoload without loading all monster resources).

Please comment on my plight, perhaps some of you had similar experience or a better idea?
Repository: pytorch
Issue: Build reconfiguration should consistently honor env variables
Labels: module: build,triaged

Per discussion here: https://github.com/pytorch/pytorch/pull/23323#issuecomment-515168182

We currently have

(plainly == no additional build options passed in to setup.py)

for clean tree:

- configuration only: `--cmake-only`
- configuration + build: invoke setup.py plainly

For rebuild:

- reconfiguration without rebuild: `--cmake-only --cmake` (unreliable), or edit CMakeCache.txt and run cmake directly
- rebuild without reconfiguration: invoke setup.py plainly, all build options persist
- reconfiguration + rebuild: `--cmake` (unreliable), or edit CMakeCache.txt and invoke setup.py plainly

We need to make the two "unreliable" spots "reliable".
Repository: terminal
Issue: Don't resize the terminal buffer until dragging is released
Labels: Issue-Feature,Help Wanted,Area-UserInterface,Product-Terminal

Add a _setting_ to enable this behavior. 

Maybe the user might not want to reflow the buffer in real-time as they resize the window. Maybe they only want to have the resize occur when they _finish_ resizing.

I'd love to see an E2E spec of this scenario before code starts getting written, because I feel it might be a little wonky in certain scenarios. Questions that would be good to be answered:
* How will we communicate the start of a move/size loop from WindowsTerminal down to the TerminalApp?
* How will this play with panes that aren't terminals?
* how do we handle maximize/restore?
* Should we pause rendering while this is happening? How should this _look_ to the user?

From discussion in #1465
Repository: terminal
Issue: Lock and Unlock in conhost should decouple Ctrl+C dispatch and use smarter handling
Labels: Product-Conhost,Area-Server,Issue-Task

The Lock and Unlock procedures in Conhost.exe are fraught with error.

For one, we are using intricate details of how many recursive entries there are on the lock to count when it is fully unlocked and dispatch Ctrl+C events. We're not supposed to be dependent on the lock count at all.

Additionally, there's multiple layers at which the locks can be processed, some of which DO dispatch the Ctrl+C events on the last unlock and some of which do NOT.

Finally, the lock/unlock procedure is bad in that it is easy to not unlock something since it's not in any sort of smart RAII-type object. This is sort of mitigated by wil::scope_exit in many places, but that function is also discouraged when you can use something better.

This issue encompasses rooting around and finding a better overall way to do all of this.

It does NOT encompass more granular locks than already exist.
Repository: godot
Issue: AnimationNodeStateMachinePlayback Issues/Mistakes
Labels: bug,confirmed,topic:animation

**Godot version:**
3.1.1


**OS/device including version:**
Windows


**Issue description:**
The state machine playback lack of methods and features and your single method hurt state machine concepts. 
Problems:
- no methods for consume your transitions, making obrigatory use the raw parent class methods (graph methods), and use endless conditions for check state of state machine, no make sense for me. 
- travel method is a the graph method only, he will perform his state independent of any transition, hurt state machine concept.
- the worst problem: the current state accessing unaccessable transitional conditions.

Set your condition for true and see her running in any current state and forever, make obrigatory use of the endless conditions, again.

Reproduce:
States:
- stand (start node)
- cast (one-shot animation)

Transition between:
- stand to cast
       advance codition: cast_action == true
- cast to stand
       no transition

Set for true:
AnimationTree::set("path_to/cast_action ", true)

Result:
Re-execution animation forever. it's wrong, because cast is a final state and he execute a one-shot animation.

**My Conclusion**
Usable in cutscenes only with switch mode AtEnd and auto advance enabled, because you will have to program the state machine over a state machine. 
Is a state machine without state machine features.
A note in the documentation, warning about lack of functionalities for new users of godot.

**Solutions Suggested**
Correct travel, r method and advance condition in transiton.

_Sorry if there is any mistake of mine_

**Steps to reproduce:**
Create AnimationTree with AnimationNodeStateMachine
Repository: pytorch
Issue: MultiheadAttention output changes if input order is not exactly same
Labels: needs reproduction,module: nn,triaged

## 🐛 Bug

I have trained a transformer model and the results seem to be wrong

## To Reproduce

Steps to reproduce the behavior:

1. Train a model using the multi head attention (encoder only) 
2. construct vector x = [x1,x2] and xx = [x3,x1] where x1, x2, and x3 are two inputs 
3. calculate y = transformer(x) and yy = transformer(xx)

## Expected behavior

y[0] = yy[1]

Believe the issue due to the reshaping of q,k,v in torch\nn\modules\activation.py (lines 804-808) and as a consequence the softmax at line 860 in the same file. 

## Environment


 - PyTorch Version (e.g., 1.0): 1.1.0
 - OS (e.g., Linux): windows
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source): na
 - Python version: 3.7.3
 - CUDA/cuDNN version: na
 - GPU models and configuration: na
 - Any other relevant information:

## Additional context
Repository: flutter
Issue: Add API to query main Isolate's stack trace
Labels: c: new feature,framework,c: performance,dependency: dart,customer: countless,P3,team-framework,triaged-framework

## Use case

To identify performance bottlenecks of real user devices in the wild, we need a release-mode Flutter app to be able to use another Isolate to sample the main Isolate's stack trace. This is an ask from "customer: countless". They currently do similar things on Android using `Looper.getMainLooper().getThread().getStackTrace();`.

## Proposal

Add a `getStackTrace` API to Dart `Isolate` class: https://github.com/dart-lang/sdk/issues/37664

We may also need to work on the Flutter side a little bit to make it convenient to create a dedicated Isolate just to sample the main Isolate's stack trace.
Repository: godot
Issue: Stretch Mode 2D, Mouse Position scaled incorrectly 
Labels: bug,topic:core,confirmed,topic:input

**Godot version:**
Release 3.1.1 (Latest)

**OS/device including version:**
Windows 10

**Issue description:**
My project is configured at the resolution 1600x900.
When the project is scaled up (I.E Fullscreen) the Viewport size is increased to 1920x1080. However, if the mouse is moved to the bottom right, the value is about 1600,900 (Actually around half a pixel less)

Note: If this is not a bug:
Documentation of Viewport states that the mouse position is relative to the viewport...
![image](https://user-images.githubusercontent.com/14253836/62101927-ed988d80-b24b-11e9-8725-59bb672fd9bf.png)

**Steps to reproduce:**
Make a brand new project, change the stretch mode to 2D.
Write a script that prints the mouse position.
Scale the window and check what the mouse position is claimed to be.

**Minimal reproduction project:**
[Test.zip](https://github.com/godotengine/godot/files/3445248/Test.zip)
Repository: go
Issue: x/mobile/bind/testdata/testpkg: Readasset() fails in ios 
Labels: NeedsInvestigation,mobile

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.12.7 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/wucanrui/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/wucanrui/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.7/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.7/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/0_/j6m36l9s0psg9xm5ggt2_b680000gp/T/go-build235355928=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?
gomobile bind -target=ios golang.org/x/mobile/bind/testdata/testpkg
And then use the testpkgReadasset by using testpkg.Framework.

### What did you expect to see?
Everything is ok.

### What did you see instead?
Cannot find assets/hello.txt
Repository: go
Issue: cmd/gofmt: canonicalize octal literals to the '0o' form
Labels: NeedsDecision

Go 1.13 adds the `0o` form for octal numbers: instead of writing `0644` we can write `0o644`. Gofmt is also changing to canonicalize `0O` to `0o`.

We should go one step further and have gofmt canonicalize the old style of octal literals to the `0o` style: `0644` should be changed to `0o644`.

Octal numbers are a surprising feature for programmers coming from a language that does not have them, or where they are rarely used. It's unintuitive that adding a leading zero to an integer changes its meaning. Some modern languages, such as Rust and Swift, have opted to omit the 0-prefix syntax altogether and *only* support the 0o form. Removing the 0-prefix syntax from Go would be too disruptive now, but we should strongly encourage use of the 0o form via this gofmt rule.

As a separate justification, with the new octal syntax there will be two different octal styles the programmer can choose. It's better for gofmt to remove this choice and enforce a single standard.

This will cause some churn in code bases, mostly around os.OpenFile and similar calls, but I believe the change is well worth it.
Repository: TypeScript
Issue: Translate JSX elements based on objects
Labels: Suggestion,Domain: JSX/TSX,Awaiting More Feedback

When using a custom `jsxFactory`, it is currently only possible to use something that is a `string` or callable as the JSX element tag. I do not see a reason why there should be such limitation. In my use case I would like to use objects as "blueprints" for my jsx factory.

**TypeScript Version:**  3.5.1

**Search Terms:**
jsx jsxFactory object TS2604

**Code**

```tsx
/*
 * @jsx h
 */

function h (...args: any[]): string {
  return 'something';
}

function FuncComponent() {
  return '';
}
const StringComponent = 'test';
const ObjectComponent = { key: 'test '};

// works
const dom1 = <FuncComponent text="hello world" />;

// works
const dom3 = <StringComponent text="hello world" />;

// doesnt work
const dom4 = <ObjectComponent text="hello world" />;

```

**Expected behavior:**
JSX element `<ObjectComponent text="hello world" />` should be translated to `h(ObjectComponent, { text: "hello world" })`.

**Actual behavior:**
Typescript throws an error: `JSX element type 'ObjectComponent' does not have any construct or call signatures.`

**Playground Link:**
https://www.typescriptlang.org/play/index.html?jsx=2#code/PQKgsAUABCUAICsDOAPKALSNiUgMwFcA7AYwBcBLAeyIygAoA6ZgQwCcBzJALihaICeAbQC6ASl5IybCkQ5QA3lihsApmQJtaAciRUAtuvSyO2gNyQAvrgiFSlGlABixEgGEDABxqqiZemKKymoaWlDa5laQJDRSUADK0iYe+t5EvmRQALzhZKpSkRAxRHEA8gBGCKrkKWkZ2YpQANaqArzaeXHalhYQkMDAUADuVGxNSNGxmQAmBgCMDQA8LqS1Pn5QeShkWQBE6KoANodUw6OH07tQwAB8vf2DI2MTRVNQs-oAzEuJMnJr6Q2Wx2+yOJzObAuV1u9wgA3eVHyGyeTUmJRmBgALEsKlUal51plgXsDsdTk8odc7pAgA

**Related Issues:**
N/A
Repository: flutter
Issue: PlatformView MotionEventDispatcher removes source from motion events.
Labels: framework,a: platform-views,c: proposal,P3,team-framework,triaged-framework

As seen in the source code here:
https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/rendering/platform_view.dart#L682
The source (e.g. touch screen, pointer,...) for motion events is set to 0. When implementing platform views, this stops certain 3rd party tools (such as Unity) to not recognise touch input events (as they don't seem to originate from device hardware).

This requires making manual changes to the touch events coming from Unity to the PlatformView (see https://github.com/snowballdigital/flutter-unity-view-widget/pull/16/files)

Is this planned to be implemented, as Flutter should have the original hardware source of these events available, or was this a design decision to set the source hardcoded to 0?
Repository: rust
Issue: Immutable reference can't be destructured from a mutable reference.
Labels: T-lang,C-feature-request

Just a minor papercut & inconsistency. [Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1ad8eba40e76d644b07dba5ca4d48f5c):
```rust
// Motivating example.
let foo = &mut [0, 3, 2, 1];
foo.sort();
for &x in foo {
    println!("{}", x);
}

// Which of course doesn't work, because this doesn't work
let &_g = &mut 0;

// But this does!
fn f(_: &i32) {}
f(&mut 0);
```
Repository: vscode
Issue: Add a shortcut or a button to restart extension host.
Labels: feature-request,extension-host

<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
Right now if the extension host crashes we have to restart the editor , it would be awesome if we could add a button or shortcut for the same.
Repository: godot
Issue: Can't create folder in a redirected folder on Windows
Labels: bug,platform:windows,topic:editor

I'm using Godot on a Windows computer that uses redirected folders. I have saved the godot folder on C and used the _sc_ file to save everything in that folder. 

But, Godot can't seem to access anything outside of my redirected user folder and it can't create a folder within this folder structure. 

![image](https://user-images.githubusercontent.com/4022361/62144854-7b15c500-b2c0-11e9-9579-53c05f462a60.png)
Repository: go
Issue: cmd/go: allow local replacements without a corresponding explicit requirement?
Labels: NeedsDecision,modules

In [CL 153157](https://golang.org/cl/153157), I added code so that a module path that has a `replace` directive resolves to a pseudo-version of the form `vX.0.0-00010101000000-000000000000` rather than checking for upstream dependencies.

That unblocks builds, but means that the module graph may indicate a commit that doesn't actually exist. There are use-cases for such a configuration, such as testing against unpublished commits of upstream modules (see https://github.com/golang/go/issues/26241#issuecomment-409907166 and #32776), but since the commit does not actually exist, the requirement graph of the resulting module _cannot_ be used without a corresponding `replace` directive in every downstream consumer.

Since this pseudo-version has an unambiguous and very unique commit hash (all zeroes!), I propose that we special-case it (if unreplaced) and treat it as equivalent to an empty commit.

CC @jayconrod @thepudds @rogpeppe
Repository: svelte
Issue: Debugging: Decouple debug logging from breakpoints
Labels: feature request,temp-stale

**Is your feature request related to a problem? Please describe.**

Currently, using `{@debug}` statements to watch variables is an exercise in frustration when using Svelte to create apps (as opposed to developing Svelte itself) due to the `debugger` statements injected along with the console output unconditionally.

While it is neat that the language includes breakpoints in generated code and super useful for tracking down framework bugs, it really should be decoupled from the act of simply logging variables.

**Describe the solution you'd like**

Add a directive, say, `{@watch}`, that only logs the value of vars when they change.
The `{@debug}` directive can stay as it is to prevent unintended consequences of changing the behavior.

**Describe alternatives you've considered**

An alternative would be to expose the `dev` flag  or have entire blocks of conditionally compiled code available to users; however, these alternatives really go against the grain of less boilerplate code in applications.

**How important is this feature to you?**

I personally stay away from the debug directive because of the unconditional breakpoints and end up having to `console.log()` all the time so it would be a big help in a production environment.

**Additional context**

The idea was prompted by a user asking for help regarding framework supported debugging for components. Being able to get started quickly and ramp up to being productive is a real big sell for Svelte. A major aspect of being able to do that is to iterate quickly and debug your code.
Repository: terminal
Issue: Divide by 0 exception in DimensionsTests::TestGetLargestConsoleWindowSize() & DimensionsTests::TestSetConsoleScreenBufferInfoEx()
Labels: Product-Conhost,Area-Server,Issue-Bug

_migrated from 21432343_
Repository: terminal
Issue: Several Dbcs Tests fail when "UseDx = 1"
Labels: Product-Conhost,Area-Rendering,Issue-Bug

_migrated from 21433270_
Repository: terminal
Issue: Make BeginResize a RAII thing
Labels: Product-Conhost,Issue-Task,Area-CodeHealth

Uh, maybe this method should just return an RAII object that stops the resize when it is destroyed like what we envision good locks to do.

_Originally posted by @miniksa in https://github.com/microsoft/terminal/pull/2149_
Repository: flutter
Issue: Suppress Xcode warnings originating from Flutter plugins as pods in Flutter apps
Labels: platform-ios,tool,t: xcode,c: proposal,P3,a: plugins,team-ios,triaged-ios

## Use case
Flutter plugins often contain code that causes Xcode warnings.  These warnings show up in Flutter apps, but are not fixable by Flutter app developers.  The sheer number of these warnings can hide actually fixable warnings.

## Proposal
- Suppress warnings from Flutter plugins and Flutter engine in apps when installed from CoocaPods
- Do not suppress warnings in plugin example apps so plugin developers can see and fix their own warnings

## Note
Modules already have this behavior as of https://github.com/flutter/flutter/commit/bd47a31e32d7c65ef35524f3bf18655e513e3a5b#diff-b528f954e369c153bb31a631a8033be3R37 so host apps do not see Flutter pod warnings.

See https://github.com/flutter/flutter/issues/30110 for example of an issue where plugin warnings completely drown any actual errors.
Repository: terminal
Issue: Implement a helper function either in terminal or the textbuffer that allows easy movement of text from 1 location to another
Labels: Product-Terminal,Issue-Task,Area-CodeHealth

DeleteCharacter and InsertCharacter both require moving text while retaining their text attributes. The logic used to do that movement should be put into a separate helper function so that other operations can make use of it as well. 

_Originally posted by @PankajBhojwani in https://github.com/_render_node/MDIzOlB1bGxSZXF1ZXN0UmV2aWV3VGhyZWFkMTg5NzIxMjU3OnYy/pull_request_review_threads/discussion_
Repository: TypeScript
Issue: ts2367 Comparing non-comparable types not detected with optional property
Labels: Suggestion,In Discussion

**TypeScript Version:**  3.6.0-dev.20190730 (also with 3.5.1)

**Search Terms:** compare types, comparable, always false comparison, optional property, properties

**Code**

```ts
enum X {
  A= 'A'
}

function x(res: {action: string}):boolean {
  return res === X.A // error
}

function y(res: {action: string | undefined}):boolean {
  return res === X.A // error
}

function z(res: {action?: string}):boolean {
  return res === X.A // no error, but always false
}

function correct(res: {action: string}):boolean {
  return res.action === X.A // what the code should have been
}
```

**Expected behavior:**

The comparison in function `z` should have resulted in `error TS2367: This condition will always return 'false' since the types '{ action?: string; }' and 'X.A' have no overlap.`

**Actual behavior:**

Functions `x`, `y` give the correct error. Function `z` has no compiler error, but the condition will always evaluate to false since it is comparing an object and a string.

**Playground Link:** https://www.typescriptlang.org/play/#code/KYOwrgtgBAGlDeBYAUFNUCCBeKByDuKAviigGZggDGALgJYD2IUAHgBQBOwAzgFwIBDWoxD9uNDnRABzIgEpeAIwYMANsAHMkyLjTAdmXblCynYAOgxQA9NajAOHBh2KlkFavSZQAnpx788EJeolDikjJQAD5QlAAmwGRSwHHySirqmggouvqGPCZmMJY2dg5OLsgkyOSUwt4AXv58gvUgAPxiElKyCspqGlo5wHoGUEaFOMVWtlAgDPaOzgA0UIpgNFACqgDuAj7GZNvcwK417nUhUFTOXLTNgcEiXRG96QNZ2rljRuZP3qYpiVZjsABYCTY0UHAa4MBJhUEMMCqOJQcEANxhimAoDOQA

**Related Issues:** n/a