sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: Basis.slerp and Quat tolerance failure errors are misleading and probably too tight
Labels: bug,topic:core


**Godot version:**
3.2.3.stable

**OS/device including version:**
Windows 10

**Issue description:**

I am sending a player's global_transform position in VR across the network at a low frame rate but filling in the missing frames using interpolation.  I do this using the following code to make the interpolated position transforms:

```GDscript
var lam = inverse_lerp(pp["Ltimestamp"], pp1["Ltimestamp"], t)
global_transform = Transform(pp["playertransform"].basis.slerp(pp1["playertransform"].basis, lam), 
                             lerp(pp["playertransform"].origin, pp1["playertransform"].origin, lam))
```

Unfortunately the `slerp()` function sometimes produces bad values.  I have isolated a minimal example:

```GDscript
  var a = str2var(" Basis( -0.0831023, 0, 0.996529, 0, 1, 0, -0.996529, 0, -0.0831023 )")
  print("Qa: ", Quat(a))
```
**Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quat() or call orthonormalized() instead.**
Qa: (0, 0, 0, 1)

```GDscript
  print("Sa: ", a.slerp(a, 1))
```
**Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quat() or call orthonormalized() instead.
Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quat() or call orthonormalized() instead.**
Sa: ((0.999988, 0, 0), (0, 1, 0), (0, 0, 0.999988))

This error would have been a lot more helpful if:
 1) It reported the correct function name (slerp instead of Quat)
 2) It reported a GDscript line number (like you get with Division By Zero in operator '/')
 3) It did not substitute a return value of a unit Quat without warning you about it.
 
The [get_quat()](https://github.com/godotengine/godot/blob/fc481db1c3187688d54b5afdb7a1ebb3e4d506c2/core/math/basis.cpp#L774) code shows it's rejecting the Basis if the determinant is not between 0.99999 and 1.00001, while here `a.determinant() = 0.999976`

The [get_rotation_quat()](https://github.com/godotengine/godot/blob/fc481db1c3187688d54b5afdb7a1ebb3e4d506c2/core/math/basis.cpp#L371) calls `orthonormalized()` on the input Basis before the `Quat` conversion, which is an expensive calculation to apply to every input value, when most of them don't need it.

Also, it looks like the `Quat` conversion function should be able to tolerate a lot bigger margin of error in its input without causing any problems.

```GDscript
  print(" a: ", a)
  var b = a.orthonormalized()
  print("Na: ", b)
```
 a: ((-0.083102, 0, 0.996529), (0, 1, 0), (-0.996529, 0, -0.083102))
Na: ((-0.083103, 0, 0.996541), (0, 1, 0), (-0.996541, 0, -0.083103))

As a result of this I am going to have to work around the `slerp()` function and make my own implementation that tolerates a wider margin of error without randomly returning unit values which cause glitches.  

**Steps to reproduce:**
See above

**Minimal reproduction project:**
See above
Repository: PowerToys
Issue: Remove translation of PowerToy module names
Labels: Issue-Bug,Area-Localization

Currently items like "Color Picker" got translated.  lets be consistent since items like FancyZones won't and will be an issue for getting debug information.
Repository: go
Issue: gollvm:  cross compiling 
Labels: NeedsInvestigation

Dear Sir,
      I want to compile a program in the x86_64 environment, this program can run in the aarch64 environment, and I try " go build -o output -gccgoflags="--target=aarch64-linux"", but it cannot work.
Repository: TypeScript
Issue: export default type
Labels: Suggestion,Awaiting More Feedback

## Search Terms

export default type

## Suggestion

Allow `export default` for `type`.

## Use Cases

It would be very nice to have `export default type` to match with other default exports such as classes and interfaces.

Right now it looks very inconsistent to be able to export anything as default and only types with named export:

```typescript
export default class MyClass {}
export default interface MyInterface {}
export type MyType = {}
```

The only way to achieve this now is to use annoying workaround:

```typescript
type X = number | string

export { X as default }
```

This may cause confusion for newbies as there are no clear reasons why classes and interfaces can be exported as default, but not the types.

## Examples

```typescript
// x.ts
export default type X = {}

// main.ts
import X from './x'
```

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).

_(not sure on the last)_
Repository: flutter
Issue: [Web] : BlendMode.srcOut and BlendMode.dstOut colorfilters have no effects.
Labels: framework,engine,platform-web,a: images,e: web_html,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-web,triaged-web

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

1. Open [DartPad Example](https://dartpad.dev/09c0048e94e12b4a3ab43471dfce9b41).

**Expected results:** <!-- what did you want to see? -->

![image](https://user-images.githubusercontent.com/8766034/98193479-43340d80-1f58-11eb-8fd5-0235fa1dbcc9.png)


**Actual results:** <!-- what did you see? -->

![image](https://user-images.githubusercontent.com/8766034/98193499-4e873900-1f58-11eb-8b7f-3b931e937d46.png)

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->

```
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
 Flutter (Channel beta, 1.23.0-18.1.pre, on Mac OS X 10.15.7 19H2 x86_64, locale zh-Hans-CN)
    • Flutter version 1.23.0-18.1.pre at /Users/caden/flutter
    • Framework revision 198df796aa (3 weeks ago), 2020-10-15 12:04:33 -0700
    • Engine revision 1d12d82d9c
    • Dart version 2.11.0 (build 2.11.0-213.1.beta)

```

</details>
Repository: rust
Issue: Missing comma in 1-tuple type should suggest adding comma there, not removing comma in value
Labels: C-enhancement,A-diagnostics,T-compiler,A-suggestion-diagnostics,D-incorrect

Code:

```rust
fn main() {
    let x: (i32) = (1,);
}
```

Current Output:

```
   Compiling playground v0.0.1 (/playground)
warning: unnecessary parentheses around type
 --> src/main.rs:2:12
  |
2 |     let x: (i32) = (1,);
  |            ^^^^^ help: remove these parentheses
  |
  = note: `#[warn(unused_parens)]` on by default

error[E0308]: mismatched types
 --> src/main.rs:2:20
  |
2 |     let x: (i32) = (1,);
  |             ---    ^^^^ expected `i32`, found tuple
  |             |
  |             expected due to this
  |
  = note: expected type `i32`
            found tuple `({integer},)`

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0308`.
error: could not compile `playground`.

To learn more, run the command again with --verbose.
```

Suggested Output:

```
   Compiling playground v0.0.1 (/playground)
warning: missing comma on type
 --> src/main.rs:2:12
  |
2 |     let x: (i32) = (1,);
  |                ^ help: add comma before here
  |

error[E0308]: mismatched types
 --> src/main.rs:2:20
  |
2 |     let x: (i32) = (1,);
  |             ---    ^^^^ expected `i32`, found tuple
  |             |
  |             expected due to this
  |
  = note: expected type `i32`
            found tuple `({integer},)`

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0308`.
error: could not compile `playground`.

To learn more, run the command again with --verbose.
```
Repository: pytorch
Issue: unbalanced gpu memory when using DistributedDataParallel
Labels: oncall: distributed,triaged

I was using DistributedDataParallel to train a model on single machine 8 gpus. I thought by using DistributedDataParallel, memory on each gpu should be approximately the same, however, there is one gpu with significantly more memory usage. Could anyone know what might cause this? Thanks!
![image](https://user-images.githubusercontent.com/45524636/98215459-c4a09580-1f82-11eb-8916-eb99f8d9166f.png)

```py
train_sampler = torch.utils.data.distributed.DistributedSampler(train_dataset, num_replicas=args.world_size, rank=args.rank)
train_loader = torch.utils.data.DataLoader(dataset=train_dataset, batch_size=args.batch_size, shuffle=False, num_workers=32, pin_memory=True, sampler=train_sampler)
train_dataprovider = DataIterator(train_loader)

print('load data successfully')

dist.init_process_group(backend='nccl', init_method="file:///mnt/nas1/share_file", world_size=args.world_size, rank=args.rank)
torch.cuda.set_device(args.local_rank)

channels_scales = (1.0,)*20
model = ShuffleNetV2_OneShot(architecture=list(args.arch), channels_scales=channels_scales)
device = torch.device(args.local_rank)
model = model.cuda(args.local_rank)

optimizer = torch.optim.SGD(get_parameters(model),
                            lr=args.learning_rate,
                            momentum=args.momentum,
                            weight_decay=args.weight_decay)
criterion_smooth = CrossEntropyLabelSmooth(1000, 0.1)

scheduler = torch.optim.lr_scheduler.LambdaLR(optimizer,
                lambda step : (1.0-step/args.total_iters) if step <= args.total_iters else 0, last_epoch=-1)

model = torch.nn.parallel.DistributedDataParallel(model, device_ids=[args.local_rank], find_unused_parameters=False)#,output_device=args.local_rank) # ,
loss_function = criterion_smooth.cuda()
```

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar @jiayisuse @agolynski
Repository: godot
Issue: `get_stack()` returns wrong line info on multiline formatted code
Labels: bug,topic:gdscript

**Godot version:**
Godot Engine v3.2.3.stable.mono.official


**OS/device including version:**
Windows 10 /MacOS


**Issue description:**
When using multiline formatted code the get_stack() contains wrong line info


**Steps to reproduce:**
* create a simple scene and put this code into

```gdscript
extends Control

func _ready():
	test_single_line()
	test_multi_line()
	get_tree().quit()
	
	
func test_single_line():
	prints("test_single_line")
	var line = FluentScript.new().foo().bar().print_stack_trace()
	assert(line == 11, "Expect get_stack() on line 11")
	prints()

func test_multi_line():
	prints("test_multi_line")
	var line = FluentScript.new() \
		.foo() \
		.bar() \
		.print_stack_trace() # this line produces the stack trace
	assert(line == 20, "Expect get_stack() on line 20 but is %d" % line)
```

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
Repository: flutter
Issue: Debug apk of existing Android app integrated with release version of Flutter module
Labels: c: new feature,platform-android,tool,t: gradle,a: existing-apps,P3,team-android,triaged-android

Hey guys,
Integrated flutter sub module with some screens to our existing Android project. 
Trying to figure out if there is an option to build an unsigned debug apk of existing android project with release flutter sub module.

Tried to change flutter variant to "release" but the app still builds with debug flutter varian.
<img width="701" alt="Screen Shot 2020-11-05 at 10 53 44" src="https://user-images.githubusercontent.com/33596616/98219087-3f52bc00-1f55-11eb-987c-77d0cfc9dc41.png">

any ideas how to get it work as release?

flutter doctor -v 
```
`[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.7 19H2, locale en-IL)
    • Flutter version 1.22.2 at /Users/roman/bin/flutter
    • Framework revision 84f3d28555 (3 weeks ago), 2020-10-15 16:26:19 -0700
    • Engine revision b8752bbfff
    • Dart version 2.10.2


[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/roman/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • ANDROID_HOME = /Users/roman/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (1 available)
    • Pixel 4 XL (mobile) • 9A221FFBA002BF • android-arm64 • Android 11 (API 30)`
```
Thanks
Repository: react
Issue: Bug: Input minLength not working after type changed
Labels: Type: Bug,Browser: Safari,Component: DOM

I have an input with type password with minLength 8, and i have a toggle to change the type to text (password toggle).
when i type with length < 8 and press submit, it prevent to submit. but, when i toggle the password so it change the type to text and submit the form, it can submitted. btw i using useRef()

React version:
react: ^17.0.1
react-dom: ^17.0.1

## Steps To Reproduce

1. type character < minLength
2. submit form
3. toggle form type
4. submit form

Link to code example: [DEMO](https://codesandbox.io/s/young-shape-4tciw)

## The current behavior
The form get submitted even when it under minLength

## The expected behavior
The form not get submitted when it under minLength
Repository: TypeScript
Issue: [Question or bug] One fourslash test file might be wrong.
Labels: Needs Investigation

<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  4.2.dev

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** fourslash

**Code**

File name is `completionForStringLiteralNonrelativeImport15.ts`

```ts
// @Filename: tests/test0.ts
//// import * as foo1 from "//m*import_as0*/            // <---- I think this should be "/m/*import_as0*/ or something else
...
verify.completions({ marker: test.markerNames(), exact: ["/module1", "/module2"], isNewIdentifierLocation: true });
```

**Expected behavior:**


**Actual behavior:**
it passes, always, even when I change "exact" array.


**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: vscode
Issue: Add a hotkey to go back one level of breadcrumbs
Labels: feature-request,breadcrumbs

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

VSCode has breadcrumbs feature that looks like this:

[![enter image description here][1]][1]

Is it possible to go back one level in these breadcrumbs using a hotkey? So in the case above, I am inside `propTypes`. I press hotkey and I go to `BatchTypesTable`.

I can achieve this already by clicking on the breadcrumb itself but I want to have a hotkey to do this.

[1]: https://i.stack.imgur.com/4AXC3.png
Repository: create-react-app
Issue: ReactRefresh in monorepo fails to update when more than one react-app present in the page 
Labels: needs triage,issue: bug report

### Describe the bug

Unfortunately it is hard to provide a repro repo for this.
in a typescript monorepo(lerna and yarn workspaces enabled) with 2 cra started simultaneous in dev mode updates do not happen as expected.

i have a index.html that loads code from both react apps (meaning it has two different root divs) so i have 2 bundles present and 2 ws monitoring updates from react-refresh. 

crashes in any of the apps get the overlay to react correctly. the apps load correctly and everything compiles correctly.

the problem is changes do not get reflected in the browser. if i remove one of the bundles being loaded, everything is back working.

### Did you try recovering your dependencies?

yes, everything is fresh. using yarn, removed node_modules and yarn lock, in root and in packages.

### Which terms did you search for in User Guide?

cra v4, monorepo

### Environment

Environment Info:

  current version of create-react-app: 4.0.0
  running from /Users/.../.config/yarn/global/node_modules/create-react-app

  System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  Binaries:
    Node: 10.15.3 - /usr/local/opt/node@10/bin/node
    Yarn: 1.22.0 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/opt/node@10/bin/npm
  Browsers:
    Chrome: 86.0.4240.183
    Edge: 86.0.622.63
    Firefox: Not Found
    Safari: 14.0
  npmPackages:
    react:  17.0.1 
    react-dom:  17.0.1 
    react-scripts:  4.0.0 
  npmGlobalPackages:
    create-react-app: Not Found

### Steps to reproduce

1. create monorepo
2. have index.html load 2 react-apps
3. start with lerna run start
4. change one file and wait for updates

### Expected behavior

updates get to dom

### Actual behavior

updates do not happen

### Reproducible demo

hard to do
Repository: create-react-app
Issue: CRA 4 fails to compile when css background-image ulr('url') not resolved
Labels: needs triage,issue: bug report

I have a css file that is imported in my react app, it is something like:

styles.css

`.flag {
...
    background-image: url("/img/flags.png") !important;
}`

It is imported in my react file -> import './styles.css';

In the previous version of CRA it works well, and when I build the app it was also okay, since I have the /img/flags.png in my 'public' directory.

After CRA 4 it fails to compile

Best regards
Repository: PowerToys
Issue: [Run][New Plugin] Search Edge Profiles
Labels: Idea-Enhancement,Product-PowerToys Run,Run-Plugin

## 📝 Provide a description of the new feature

When a user searches for Edge it would be nice to see all of the Edge Profiles available to open the correct one. Currently it always opens to the default profile.

_What is the expected behavior of the proposed feature?  What is the scenario this would be used?_
Search "Edge" - results lists Edge - Profile Name (for each profile)

It would be used when I need to open a specific profile

---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: pytorch
Issue: how to use torch.utils.checkpoint + gru with variable length sequence?
Labels: module: rnn,triaged

I just want to use torch.utils.checkpoint on GRU to save gpu memory.

```py
def check(self, packed):
    out, _ = self.rnn(packed)
    padded = pad_packed_sequence(out, batch_first=True)

    return padded

def forward(self, x, lengths):
    """Handles variable size captions
    """
    x = self.embed(x)

    packed = pack_padded_sequence(x, lengths, batch_first=True)
    padded = checkpoint(self.check, packed)
```
my code is shown above.

i got a warning:
**UserWarning: None of the inputs have requires_grad=True. Gradients will be None**
because packed is a PackedSequence, it has no attribute requires_grad

then, i tried another way to do it
```py
def check(self, x, lengths):
    packed = pack_padded_sequence(x, lengths, batch_first=True)
    out, _ = self.rnn(packed)
    padded = pad_packed_sequence(out, batch_first=True)

    return padded

def forward(self, x, lengths):
    """Handles variable size captions
    """
    x = self.embed(x)
    padded = checkpoint(self.check, x, lengths)
```
than i got a error. 

Traceback (most recent call last):
  File "D:\安装程序\PyCharm 2019.2.3\helpers\pydev\pydevd.py", line 2073, in <module>
    main()
  File "D:\安装程序\PyCharm 2019.2.3\helpers\pydev\pydevd.py", line 2067, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "D:\安装程序\PyCharm 2019.2.3\helpers\pydev\pydevd.py", line 1418, in run
    return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
  File "D:\安装程序\PyCharm 2019.2.3\helpers\pydev\pydevd.py", line 1425, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "D:\安装程序\PyCharm 2019.2.3\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "D:/study/workspace/Python/xxxx/train.py", line 300, in <module>
    main()
  File "D:/study/workspace/Python/xxxx/train.py", line 144, in main
    train(opt, train_loader, model, epoch, val_loader)
  File "D:/study/workspace/Python/xxxx/train.py", line 181, in train
    model.train_emb(*train_data)
  File "D:\study\workspace\Python\SCAN\model.py", line 632, in train_emb
    loss.backward()
  File "D:\Environment\Anaconda\envs\PyTorch\lib\site-packages\torch\tensor.py", line 185, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "D:\Environment\Anaconda\envs\PyTorch\lib\site-packages\torch\autograd\__init__.py", line 127, in backward
    allow_unreachable=True)  # allow_unreachable flag
<b>RuntimeError: element 1 of tensors does not require grad and does not have a grad_fn</b>

so, i want to know how can i use torch.utils.checkpoint on gru with variable length sequence

thank you 

cc @zou3519