sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Provide documentation on writing fourslash tests
Labels: Docs,Infrastructure

> You know what fourslash needs? Extensive documentation/comments on how fourslash works and the fourslash API. Half the time I can never figure out what I need to call to test something and have to dig through other tests to figure out when to use `/**/` or `[| |]`, etc.

&mdash; @rbuckton
Repository: TypeScript
Issue: Hovering on imported module shows path from TypeScript folder. 
Labels: Suggestion,Awaiting More Feedback

*TS Template added by @mjbvz*

**TypeScript Version**: 3.9.6

**Search Terms**
- quickinfo
- types
- javascript

---

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.46.1
- OS Version: Windows 10

Steps to Reproduce:

1. Require modules like yargs, validate in a nodejs project. (Installed in project folder)
2. On hover, TypeScripts node_modules path is shown instead of project's node_modules folder.
3. Packages not in TypeScript's node_modules folder has no such issue.

Hovering on yargs:
![yargs](https://user-images.githubusercontent.com/23120939/86369872-a2c59800-bc9c-11ea-81f2-506c90048cfe.png)

Hovering on chalk: 
![chalk](https://user-images.githubusercontent.com/23120939/86369934-b7099500-bc9c-11ea-9c19-b501841e3bbd.png)


<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
Repository: pytorch
Issue: [RFC] [RPC] Automatic retries of all requests in TensorPipe agent
Labels: triaged,module: rpc,module: tensorpipe

To increase resiliency to infra issues, we could provide an automatic transparent retry mechanism in the RPC agent.

There already exists something of that kind, but my understanding is that it's an internal API used only for RRef operations. A challenge of extending it to all requests is that, due to that retry system living outside the agent, it retries each failed request as a new separate request, and would thus only work for idempotent functions (the RRef ops are, but user functions may not be).

What I propose is to implement the retry inside the agent (in particular, I am thinking about the TensorPipe one; I'm not sure how it would work for the other ones). The idea is to assign each request and each response message a unique ID on the sender side, and then have the receiver confirm the transfer with an ACK message. The sender would keep a map from ID to data of all the messages to which it hasn't received an ACK yet. When a pipe fails and is re-established, the sender will re-send all those pending messages. The receiver will also keep a set of IDs that it has already received and dealt with, and can thus check if the sender is sending an ID for the second time, and in that case just send back the ACK without performing the operation anew. This way the operation becomes effectively idempotent. (Some details will still have to be ironed out, but this is the gist of the idea).

Note that the above works when there is an error in the transmission but both endpoints stay up and running and are able to reconnect. If one endpoint goes down and then comes up again this wouldn't work, as then its map of pending messages wouldn't be preserved. However, such a scenario seems out of scope, as retrying a stateful RPC call on a worker that has lost all its state will probably not make sense either. So we could probably safely assume that when one worker goes down it, it will never come back up or that all of them will be restarted (which I believe is what elastic does).

The alternatives to this approach are two:
- We could push the retry even further down, into TensorPipe. The problem there is that TensorPipe doesn't natively operate on a request-response protocol (this is added on top by the agent) and thus wouldn't normally send ACKs. Moreover, this would require TensorPipe to keep data alive even after it has finished sending it, just in case the transfer may later fail and it needs to send it again. This logic may not be desirable in all circumstances and IMO should live at a higher level of the stack.
- We could avoid retrying automatically and count on the user to catch exceptions in their RPC calls and, knowing which ones are idempotent and which ones aren't, pick their own logic of retrying. This seems burdensome on the user, and scales poorly, as each user would have to reimplement what is effectively a similar logic.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @xush6528 @jjlilley @osalpekar @jiayisuse @lw @beauby
Repository: godot
Issue: Invalid cast exception when using C# and GD Script
Labels: bug,topic:dotnet

**Godot version:**
3.2.2

**OS/device including version:**
Windows 10 64 bits

**Issue description:**
error when trying to conbine [this accessibility plugin](https://github.com/lightsoutgames/godot-accessibility) (that is in gdScript) with c# scripts that i want to use on my Project. 
I got a invalid cast exception when I try to compyle a simple hello world Project with a empty c# script. If I don't add any c# script to the Project, the plugin Works fine.
and no, isn't a option dont use the plugin, because that plugin brings accessibility to all the Godot ecosystem, the editor itself and the result game. On [this post](https://godotforums.org/discussion/22953/c-cant-create-a-simple-script-in-a-small-example-project) we got some more details.
I am using Godot 3.2, but if I downgrade to 3.1 it Works fine.
ERROR: debug_send_unhandled_exception_error: System.InvalidCastException: Specified cast is not valid.
At: modules/mono/mono_gd/gd_mono_utils.cpp:357
ERROR: call_build: An EditorPlugin build callback failed.
At: editor/editor_node.cpp:5268
ERROR: debug_send_unhandled_exception_error: System.InvalidCastException: Specified cast is not valid.
At: modules/mono/mono_gd/gd_mono_utils.cpp:357

**Steps to reproduce:**
1. download or clone [this project](https://github.com/lightsoutgames/godot-accessible-starter) and atach a c# script into it.
2. Run the project.
Repository: opencv
Issue: FR: Implement "smart" reference on js similar to tensorflow.tidy()
Labels: feature,category: javascript (js)


Developers are required to manually manage memory on OpenCV.js and keeping some of the references may led to cumbersome code, I suggest providing an mechanism similar to the Tensorflow.js tf.tidy, that is used to cleanup GPU textures after processing TF code: https://js.tensorflow.org/api/0.11.7/#tidy
Here is an example usage:

```
// y = 2 ^ 2 + 1
const y = tf.tidy(() => {
   // a, b, and one will be cleaned up when the tidy ends.
   const one = tf.scalar(1);
   const a = tf.scalar(2);
   const b = a.square();

   console.log('numTensors (in tidy): ' + tf.memory().numTensors);

   // The value returned inside the tidy function will return
   // through the tidy, in this case to the variable y.
   return b.add(one);
});

console.log('numTensors (outside tidy): ' + tf.memory().numTensors);
y.print();


```
Repository: go
Issue: cmd/doc: package search inconsistent with methods or fields
Labels: NeedsInvestigation

```
$ go version
go version devel +5de90d33c8 Thu Jul 2 22:08:11 2020 +0000 linux/amd64
```

Running `go doc rand`, as expected, gives the documentation for `crypto/rand`, as it finds that one before `math/rand`:

```
package rand // import "crypto/rand"

Package rand implements a cryptographically secure random number generator.

var Reader io.Reader
func Int(rand io.Reader, max *big.Int) (n *big.Int, err error)
func Prime(rand io.Reader, bits int) (p *big.Int, err error)
```

Running `go doc rand.rand`, however, gives the documentation for `math/rand.Rand`, as it uses the lack of the symbol in `crypto/rand` to know that that's not the right package. So far so good:

```
package rand // import "math/rand"

type Rand struct {
        // Has unexported fields.
}
    A Rand is a source of random numbers.

func New(src Source) *Rand
func (r *Rand) ExpFloat64() float64
func (r *Rand) Float32() float32
func (r *Rand) Float64() float64
func (r *Rand) Int() int
func (r *Rand) Int31() int32
func (r *Rand) Int31n(n int32) int32
func (r *Rand) Int63() int64
func (r *Rand) Int63n(n int64) int64
func (r *Rand) Intn(n int) int
func (r *Rand) NormFloat64() float64
func (r *Rand) Perm(n int) []int
func (r *Rand) Read(p []byte) (n int, err error)
func (r *Rand) Seed(seed int64)
func (r *Rand) Shuffle(n int, swap func(i, j int))
func (r *Rand) Uint32() uint32
func (r *Rand) Uint64() uint64
```

However, running `go doc rand.rand.int` fails:

```
doc: symbol rand is not a type in package rand installed in "crypto/rand"
exit status 1
```

It seems like it doesn't actually search past the first package if there's a method specified. Manually specifying the package, such as `go doc math/rand.rand.int`, works as expected.
Repository: pytorch
Issue: Will the model run slower when deployed using libtorch ?
Labels: module: performance,module: cpp,triaged

I'm trying to deploy a yolov5s model in my C++ program.
I followed the instructions in [https://gist.github.com/jakepoz/eb36163814a8f1b6ceb31e8addbba270](url) to get a torchscript converted model.
These are my C++ code, I put these code in a thread in ORBSLAM (a SLAM system), meanwhile there are other SLAM threads running.
```cpp
  modelpath = "yolov5s.torchscript";
  cout << "before loading" << endl;
  long start = time_in_ms();
  model = torch::jit::load(modelpath);
  long end = time_in_ms();
  cout << "it took " << end - start << " ms to load the model" << endl;
  torch::jit::getProfilingMode() = false;
  torch::jit::getExecutorMode() = false;
  torch::jit::setGraphExecutorOptimize(false);

  tensor_image = torch::zeros((1, 3, 640,640));
  long start = time_in_ms();
  std::vector<torch::jit::IValue> inputs;
  inputs.push_back(torch::ones({1, 3, 640, 640}));
  //inputs.emplace_back(tensor_image);
  torch::jit::IValue output = model.forward(inputs);
  long end = time_in_ms();
  cout << "it took " << end - start << " ms to run the model once" << endl;
```

It took 720ms to load the model and 1300ms to run the model once.
But when I run this model in python environment, it only takes 200ms.
I would like to know if it's reasonable or what should I do to accelerate this.







cc @yf225 @glaringlee @VitalyFedyunin @ngimel
Repository: TypeScript
Issue: JS Find function definition involving a function generator
Labels: Bug


*TS Template added by @mjbvz*

**TypeScript Version**: 4.0.0-dev.20200702

**Search Terms**
- go to definition

---

Issue Type: <b>Bug</b>

```
// x.js
module.exports.a = () => {return ()=>{}};

// y.js
let n = require('./x.js');
module.exports.b = n.a();

// anywhere other than y.js
let m = require('./y.js');
let c = m.b(); // ctrl-click b
```

ctrl-click b
leads to 2 definitions and the default is a's definition instead of b's

VS Code version: Code 1.46.1 (cd9ea6488829f560dc949a8b2fb789f3cdc05f5d, 2020-06-17T21:13:20.174Z)
OS version: Windows_NT x64 10.0.17134

<details><summary>Extensions (15)</summary>

Extension|Author (truncated)|Version
---|---|---
project-manager|ale|11.1.0
vscode-eslint|dba|2.1.5
clipboard-manager|Edg|1.4.2
vscode-npm-script|eg2|0.3.12
vscode-test-explorer|hbe|2.19.1
vscode-heroku|iva|1.2.6
docthis|joe|0.7.1
mongodb-vscode|mon|0.0.4
csharp|ms-|1.22.1
mssql|ms-|1.9.0
python|ms-|2020.6.91350
cpptools|ms-|0.28.3
prettier-now|rem|1.4.9
tabnine-vscode|Tab|2.8.6
poor-mans-t-sql-formatter-vscode|Tao|1.6.10


</details>
<!-- generated by issue reporter -->
Repository: godot
Issue: PhysicalBones do not move with skeleton when simulation is off
Labels: bug,confirmed,topic:physics

<!-- Please search existing issues for potential duplicates before filing yours:	
https://github.com/godotengine/godot/issues?q=is%3Aissue	
-->

**Godot version:**
<!-- Specify commit hash if using non-official build. -->


3.2.1.stable.custom_build.f0a489cf4

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->

Linux 5.7.6-arch1-1

**Issue description:**
<!-- What happened, and what was expected. -->

Maybe this is expected behavior, but it is a bit surprising.
When you create a physical skeleton, the `PhysicalBone`s will not move with the rig, but will remain in place until you start simulation.
However, they _do_ still detect collisions, which means you end up with these invisible blockades littered around your world.

You can see this in the [platformer demo](https://github.com/godotengine/godot-demo-projects/tree/master/3d/platformer):

![skel](https://user-images.githubusercontent.com/2496231/86425531-710bfb80-bcb3-11ea-8a7f-565aa882919a.png)


It would be nice if, before starting the simulation, the `PhysicalBone`s just followed the transforms of their parent bones.
Failing that, maybe they should at least not collide (or we should call out in the docs that the user should clear the collision layer/mask and set it when starting the simulation).

**Steps to reproduce:**

1. Generate PhysicalBones from a skeleton
2. Move the character
3. Note that you collide with your own frozen, invisible skeleton

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->

[platformer demo](https://github.com/godotengine/godot-demo-projects/tree/master/3d/platformer)
Repository: TypeScript
Issue: Adding a compilerOption to disable error on property override accessor in 4.0.beta
Labels: Suggestion,Awaiting More Feedback

## Search Terms
property override accessor

## Suggestion
Previously in 3.9, property can override an accessor with no emit errors. And in 4.0 beta, a break change was introduced by #33509.

It's reasonable to report an error on property override accessor in most case, but I'm using `experimentalDecorators` to inject a property accessor in prototype. 

Currently I cannot find a solution for this use case, so I'm suggesting to add a new compilerOption to disable this check(strictOnly?) for  compatibility.

## Use Cases

```
class Animal {
    private _age: number
    get age(){ return this._age }
    set age(value){ this._age = value }
}

class Dog extends Animal {
    @defaultValue(100) age: number;     // Unexpected error here
}

function defaultValue(value) {
    return (obj, name) => {
        Object.defineProperty(obj, name, {
            get() { return value }
        })
    }
}
```

## Checklist

My suggestion meets these guidelines:

* [ ] 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.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: go
Issue: proposal: crypto/x509: implement OCSP verifier
Labels: Proposal,Proposal-Hold,Proposal-Crypto

Although we have a golang.org/x/crypto/ocsp package, we don't in fact have an OCSP verifier. The existing package provides serialization and parsing, but not APIs for "get me an OCSP response for this certificate" and "given this certificate and this OCSP response tell me if it's revoked". (They are separate because you only want the latter when checking stapled responses.)

There is a lot of complexity, subtlety, and dark knowledge involved in OCSP unfortunately. Here are a few notes on things the verifier needs to do (from reading [this thread](https://groups.google.com/d/msg/mozilla.dev.security.policy/EzjIkNGfVEE/XSfw4tZPBwAJ)):

* check that the response is signed directly by the issuer (without needing the OCSP EKU) or that it's signed by a Delegated Responder issued directly by the issuer (with the OCSP EKU)
* for Delegated Responders, **not** require the EKU to be enforced up the chain
* check that the signer has the correct KeyUsage
* for Delegated Responders, require them to be End Entity certificates (i.e. not a CA; this is an off-spec Mozilla check that protected them from the mess of CAs giving the OCSP EKU away to intermediates)
* for Delegated Responders, maybe check that the `id-pkix-ocsp-nocheck` extension is present (this is a BR requirement, but if it's not an IETF requirement we might want to skip it)

There are definitely a lot more things to consider (for example, the `id-pkix-ocsp-nocheck` extension needs to be processed itself), the list above are just notes of things I learned from that one incident.

A difficult question is where to put the code, and how to surface it. We'll want to use it in crypto/tls for Must-Staple (#22274) but it feels like the wrong place for the code to live. An obvious answer would be golang.org/x/crypto/ocsp, but then we can't use it from crypto/x509 without an import loop. Should `x509.VerifyOptions` have an option to verify a stapled response? Probably, I feel like we'd regret doing OCSP verification separately from path building and certificate verification anyway. What about the API to fetch a response? Maybe that can stay in golang.org/x/crypto/ocsp, separating the concerns of obtaining responses and verifying them.

We should also look around the ecosystem, because surely someone had to implement this, and we should compare results.
Repository: flutter
Issue: Error connecting to the service protocol: failed to connect to http://127.0.0.1:1027/
Labels: platform-ios,tool,P2,c: fatal crash,team-ios,triaged-ios

###  Steps to Reproduce

I am trying to debug _Firebase Dynamic Links_ and I cannot reproduce the issue with the Simulator, so I need to debug on a physical device.  So from _Visual Code_, I choose my physical device and _Start Debugging_.  Alas, it crashes during startup with:
```
Error connecting to the service protocol: failed to connect to http://127.0.0.1:1027/
Exited (sigterm)
```

_What can I do?_

<details>
  <summary>Logs</summary>

```
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.5 19F101, locale en-US)
    • Flutter version 1.17.5 at /Users/anthony/flutter
    • Framework revision 8af6b2f038 (3 days ago), 2020-06-30 12:53:55 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc4)
    • Android SDK at /Users/anthony/Library/Android/sdk
    • Platform android-R, build-tools 30.0.0-rc4
    • 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 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 46.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.46.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.12.1

[✓] Connected device (3 available)
    • Anthony's iPhone X    • dd69530247333fb75a3729579a8510e4c02268d4 • ios • iOS 13.5.1
    • iPhone 11 Pro Max     • 24F5F921-BD98-497F-9DEF-7F99FEDA41E1     • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)
    • iPad (7th generation) • 9A327E6C-836E-497B-B174-86AD0B20D40E     • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)

• No issues found!
```

</details>
Repository: rust
Issue: rustc performs auto-ref when a raw pointer would be enough
Labels: T-compiler,A-MIR,C-bug,F-arbitrary_self_types

The following code:
```rust
#![feature(slice_ptr_len)]

pub struct Test {
    data: [u8],
}

pub fn test_len(t: *const Test) -> usize {
    unsafe { (*t).data.len() }
}
```
generates MIR like
```
        _2 = &((*_1).0: [u8]);
        _0 = const core::slice::<impl [u8]>::len(move _2) -> bb1;
```
This means that a reference to `data` gets created, even though a raw pointer would be enough. That is a problem because creating a reference makes aliasing and validity assumptions that could be avoided. It would be better if rustc would not implicitly introduce such assumptions.

Cc @matthewjasper
Repository: flutter
Issue: [google_sign_in] Can't sign in to youtube channels?
Labels: platform-android,d: stackoverflow,p: google_sign_in,package,P2,team-android,triaged-android

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

I'm trying to login with youtube channels (not just the Google account itself.) 

on the console, I've added auth/youtube to the OAuth screen (not sure if this is needed)


I've also added this to my scopes 

`GoogleSignIn googleSignIn = GoogleSignIn(
    scopes: [
      'email',
      'https://www.googleapis.com/auth/youtube', // Youtube scope
    ],
  );`

(I'm also using FirebaseUser to capture emails, not sure if this is possible to interlace?)

When I try to log in it shows me my e-mails and when selected it gives me a screen if I want to accept "project......" (not sure how to change this to the name app btw) to manage my youtube channels and whatnot. however when I press yes, it doesn't show me the channel list so I can select the one I want. So I don't really have access to the user channel stuff like playlists, name, memberships and subscriptions, image, etc... how could I fix this?

Here are the screens I DO get

![image](https://user-images.githubusercontent.com/47351773/86461014-48bae600-bd21-11ea-92ca-95d62905f9e1.png)
![image](https://user-images.githubusercontent.com/47351773/86461071-583a2f00-bd21-11ea-9d38-b1595cade8fd.png)

also here's my sign in code

````
class AuthService {
  String OAuthClientId = '*hidden but came from the dev console*'; //Don't use this for nothing?
  String discoveryDocs = 'https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest';
  String scopes = 'http://www.googleapis.com/auth/youtube.readonly';

  final FirebaseAuth auth = FirebaseAuth.instance;
  GoogleSignIn googleSignIn = GoogleSignIn(
    scopes: [
      'email',
      'https://www.googleapis.com/auth/youtube', // Youtube scope
    ],
  );
```

  Future<FirebaseUser> login() async {
    final GoogleSignInAccount googleSignInAccount = await googleSignIn.signIn();
    final GoogleSignInAuthentication googleSignInAuthentication = await googleSignInAccount.authentication;

    final AuthCredential credential = GoogleAuthProvider.getCredential(
      accessToken: googleSignInAuthentication.accessToken,
      idToken: googleSignInAuthentication.idToken,
    );
    // You'll need this token to call the Youtube API. It expires every 30 minutes.
    final token = googleSignInAuthentication.accessToken;

    final AuthResult authResult = await auth.signInWithCredential(credential);
    final FirebaseUser user = authResult.user;
    assert(!user.isAnonymous);
    assert(await user.getIdToken() != null);

    final FirebaseUser currentUser = await auth.currentUser();
    assert(user.uid == currentUser.uid);

    return currentUser; }`