sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/tools/gopls: add examples from <pkg>/examples_test.go to hover info
Labels: Thinking,FeatureRequest,gopls,Tools

Hello everyone,

i'd be a good addition to add an option to show code examples for hover. I figured out pkg.go.dev simply parses the packages `example_test.go` file/function. So f.e. regexp.ReadAllString -> regexp/examples_test.go `ExampleRegexp_ReadAllString`.

I tried a very naive approach just as a POC and got this result:

![Screenshot_20220722_170426](https://user-images.githubusercontent.com/7055955/180470668-998a4f4d-7464-411c-9229-7babfc38747d.png)

Regards
Repository: puppeteer
Issue: [Bug]: Screenshot reloads the page and resets viewport to default
Labels: bug,screenshot,confirmed,P3

### Bug description

Taking a full page screenshot causes large page to reload. This in turn causes page to reset dimensions to 800x600 and throw away any lazy loaded content. Moreover, the width of screenshot is as expected (1366x1.5 in my case) and therefore it is not possible to detect if screenshot function failed and reloaded just by inspecting the size of screenshot. 
```

   const puppeteer = require('puppeteer');
   const imageSizeOf = require('image-size')   
   const browser = await puppeteer.launch({
        headless: true,
        defaultViewport: null,
        args: [
            '--window-size=1366,768',
            '--disable-dev-shm-usage',
            '--shm-size=3gb',
        ]
    });


    let page = await browser.newPage();
    await page.setViewport({ width: 1366, height: 768, deviceScaleFactor: 1.5 });
    let response = await page.goto("https://www.sinsay.com/si/sl/sale/woman/view-all-clothes", { waitUntil: "networkidle2" });
    await autoScroll(page); // not really necessary
    await page.evaluate(() => window.scrollTo(0, 0)); // not really necessary
    await page.screenshot({ path: desktopPath, fullPage: true });

    await browser.close();    


```


```
 async function autoScroll(page) {
    let results = await page.evaluate(async () => {
        try {
            return await new Promise((resolve, reject) => {
                let totalHeight = 0;
                let distance = 200;
                let counter = 0;
                let timer = setInterval(() => {
                    counter++;
                    var scrollHeight = document.body.scrollHeight;
                    window.scrollBy(0, distance);
                    totalHeight += distance;

                    if ((totalHeight >= scrollHeight - window.innerHeight) || counter > 80) {
                        clearInterval(timer);
                        resolve();
                    }
                }, 250);
            });

        } catch (e) {
            console.log("we got scrolling error:");
            console.log(e);

        }
    });
}
```


### Puppeteer version

14.3.0

### Node.js version

v16.15.0

### npm version

8.5.5

### What operating system are you seeing the problem on?

macOS

### Relevant log output

_No response_
Repository: angular
Issue: Depricate renderer2, and and explainer on docs
Labels: action: discuss,area: core,state: needs eng review,core: DOM rendering,P2,area: docs

### Description

As `Renderer2` is mostly tied to Viewengine, it should be marked as deprecated.
Also, there should be a note in the docs explaining why renderer2 is no longer the recommended way to DOM manipulation.
This is needed because in the Angular community, there is still this idea that they should use it, and this idea is watched up by time, but most missed the notice.


### What is the affected URL?

nvt

### Please provide the steps to reproduce the issue

nvt

### Please provide the expected behavior vs the actual behavior you encountered

_No response_

### Please provide a screenshot if possible

_No response_

### Please provide the exception or error you saw

_No response_

### Is this a browser-specific issue? If so, please specify the device, browser, and version.

_No response_
Repository: rust
Issue: Figure out why `x.py test --stage 0 rust-analyzer` doesn't work
Labels: P-low,T-bootstrap,A-contributor-roadblock

(This issue only makes sense after #99603 lands)

@jyn514 is convinced it should if the proper sysroot is used to compile both the `proc-macro-srv` and `proc-macro-test-impl` crates.

There's one nested invocation of rustc in `proc-macro-srv`'s build script, but it uses `$RUSTC` (all it does is grab the trimmed output of `rustc -v`).

There's one nested invocation of cargo in `proc-macro-test`'s build script (to build `proc-macro-test-impl` in a temp dir), but it uses `$CARGO`.

Here's the output of `./x.py test --stage 0 -vv rust-analyzer --test-args like_macro_clone_literals`: https://gist.github.com/fasterthanlime/3de46b62906d0762c8c3ac0e295892a4
Repository: pytorch
Issue: linspace cpu and sometimes cuda is wrong on integral types
Labels: triaged,module: correctness (silent),module: python frontend,module: edge cases

Repro:
```python
import torch

print("cpu")
for dtype in (torch.int8, torch.int16, torch.int32, torch.int64):
    print(torch.linspace(0, 4, 50, dtype=dtype, device="cpu").bincount())

print("cuda")
for dtype in (torch.int8, torch.int16, torch.int32, torch.int64):
    print(torch.linspace(0, 4, 50, dtype=dtype, device="cuda").bincount())
```
prints:
```
cpu
tensor([13, 12, 12, 12,  1])
tensor([13, 16,  8, 12,  1])
tensor([16, 16,  8,  9,  1])
tensor([16, 12, 12,  9,  1])
cuda
tensor([13, 12, 12, 12,  1], device='cuda:0')
tensor([13, 12, 12, 12,  1], device='cuda:0')
tensor([13, 12, 12, 12,  1], device='cuda:0')
tensor([13, 12, 12, 12,  1], device='cuda:0')
```
int8 is correct for some reason
Repository: godot
Issue: Godot bumps project.godot modification time when exporting
Labels: bug,topic:editor,topic:export

### Godot version

3.5-rc6

### System information

ArchLinux

### Issue description

When exporting a project using CLI with `--no-window`, the modification time of `project.godot` changes.
This leads to a "Files changed on disk" pop-up appearing in the Godot editor if it's running during the export process.

This is not a major issue but it makes working on a project annoying if you're frequently exporting a project for multiple platforms while keeping the editor open.

It seems like this behavior might be intentional, so I'm really wondering what's the reason for Godot CLI exporter to bump the modification time of `project.godot`.

**Update:** this can be prevented by setting `project.godot` as immutable with `chattr +i` (export still works without issues), but then the Godot editor starts spitting errors about being "unable to lock the project".

### Steps to reproduce

1. Create a new project
2. Open if in the Godot editor
3. While keeping the editor open, run exporter: `godot --no-window --export preset_name -q --verbose`
4. Observe the "Files changed on disk" pop-up in the Godot editor

### Minimal reproduction project

_No response_
Repository: flutter
Issue: `Incorrect use of ParentDataWidget` exception may not appear visually in debug mode. 
Labels: framework,a: debugging,a: error message,has reproducible steps,P2,found in release: 3.0,found in release: 3.1,team-framework,triaged-framework

I think `Column(Padding(Expanded))` should fail in debug mode, because it is ultra hard to debug it is wrong in release mode in a complex layout:

<img width="927" alt="image" src="https://user-images.githubusercontent.com/351125/180503995-48879148-2095-4aa0-a089-2c25c8079186.png">

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(body: Demo()),
    );
  }
}

class Demo extends StatelessWidget {
  const Demo({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: const [
        Padding(
          padding: EdgeInsets.all(16),
          child: Expanded(
            child: Text("This is only shown in debug mode!"),
          ),
        ),
      ],
    );
  }
}
```

```
➜ flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on macOS 11.4 20F71 darwin-x64, locale
    en-BR)
    • Flutter version 3.0.5 at /usr/local/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (9 days ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2
```
Repository: angular
Issue: Feedback: Using the Unified Angular Location Service
Labels: area: upgrade,P3

### Description

I'm trying to inject the $locationShim factory into my AngularJS application so that Angular router can route for the whole app.

The ngUpgrade docs show using import() in the third code sample in the [Using the Unified Angular Location Service](https://angular.io/guide/upgrade#using-the-unified-angular-location-service) section. That sample seems a little confusing to me as an experienced AngularJS 1.x developer; it assumes that the AngularJS application must be using typescript.  Very likely it is not.

So I think, "Okay, let me look up higher in the document where they talk about how to inject an Angular component into the AngularJS framework. That should help clarify." Well, it doesn't. :)

In ([Using Angular Components from AngularJS Code](https://angular.io/guide/upgrade#using-angular-components-from-angularjs-code), second code example), the docs show angular.module getting called from app.module.ts, However, "angular" isn't defined in this context, and I can't see anything in the docs that would make it available. 

It almost looks like maybe the scaffolding for that code widget was copied and the title was never fixed... is it referring to the old angularJS app.js?  If so, how do I get the $locatorShim into the old AngularJS (app.js) context?   If not, how do I get "angular" to resolve in app.module.ts?

### What is the affected URL?

https://angular.io/guide/upgrade#using-the-unified-angular-location-service

### Please provide the steps to reproduce the issue

n/a

### Please provide the expected behavior vs the actual behavior you encountered

I expect to be able to use the documentation to build my hybrid application.

### Please provide a screenshot if possible

_No response_

### Please provide the exception or error you saw

```true
n/a
```


### Is this a browser-specific issue? If so, please specify the device, browser, and version.

```true
no
```
Repository: flutter
Issue: impellerc compilation error could be a bit terser
Labels: engine,a: quality,P3,team-engine,triaged-engine

For wiring up shader compilation to hot reload, all of the stderr lines are prefixed with the path to the shader that failued to compile. The error would be much easier to read if that were only included at the beginning or end of the message.

Also warning about versioning might be a fluke?

```
An Observatory debugger and profiler on Pixel 6 Pro is available at:
http://127.0.0.1:59048/l5LfRUU5988=/
ext.flutter.connectedVmServiceUri
The Flutter DevTools debugger and profiler on Pixel 6 Pro is available at:
http://127.0.0.1:9104?uri=http://127.0.0.1:59048/l5LfRUU5988=/

Compilation failed.
C:\Users\Jonah\flutter\examples\hello_world\shaders\example.frag: GLSL to SPIRV failed;
Compilation error. 1 error(s) and 1 warning(s).
C:\Users\Jonah\flutter\examples\hello_world\shaders\example.frag: warning: (version, profile)
forced to be (460, core), while in source code it is (320, es)
C:\Users\Jonah\flutter\examples\hello_world\shaders\example.frag:8: error: '' :  syntax error,
unexpected FLOATCONSTANT, expecting RIGHT_PAREN or COMMA




Performing hot reload...
Try again after fixing the above error(s).
```
Repository: next.js
Issue: Failed to load parser './parser.js' declared in .eslintrc.json
Labels: Upstream,bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

`next info` output

```
    Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:25 PDT 2022; root:xnu-8020.140.41~1/RELEASE_X86_64
    Binaries:
      Node: 16.16.0
      npm: 8.11.0
      Yarn: 3.2.2
      pnpm: N/A
    Relevant packages:
      next: 12.2.3-canary.17
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
```

`package.json`

```json
{
  "name": "web",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "info": "next info"
  },
  "dependencies": {
    "next": "canary",
    "react": "18.2.0",
    "react-dom": "18.2.0"
  },
  "devDependencies": {
    "eslint": "8.20.0",
    "eslint-config-next": "12.2.3"
  }
}
```

### What browser are you using? (if relevant)

NA

### How are you deploying your application? (if relevant)

NA

### Describe the Bug

`next dev` is working fine, but `next lint` is failing with the following error.

```shell
info  - SWC minify release candidate enabled. https://nextjs.link/swcmin
Failed to load parser './parser.js' declared in '.eslintrc.json » eslint-config-next/core-web-vitals » /Users/sumit.goel/Development/monorepo/.yarn/__virtual__/eslint-config-next-virtual-c1b113f562/0/cache/eslint-config-next-npm-12.2.3-8aa11ec9cd-bba70ac318.zip/node_modules/eslint-config-next/index.js': eslint-config-next tried to access next, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: next (via "next/dist/compiled/babel/eslint-parser")
Required by: eslint-config-next@virtual:569035de073023aa8b0b5018956311b227b0a904329a09033178811fc3e35e666a9055672cf1571918d7dc6006c37bb02ee20b7a6a08428927cea962afec4a25#npm:12.2.3 (via /Users/sumit.goel/Development/monorepo/.yarn/__virtual__/eslint-config-next-virtual-c1b113f562/0/cache/eslint-config-next-npm-12.2.3-8aa11ec9cd-bba70ac318.zip/node_modules/eslint-config-next/)

Require stack:
- /Users/sumit.goel/Development/monorepo/.yarn/__virtual__/eslint-config-next-virtual-c1b113f562/0/cache/eslint-config-next-npm-12.2.3-8aa11ec9cd-bba70ac318.zip/node_modules/eslint-config-next/parser.js
- /Users/sumit.goel/Development/monorepo/.yarn/cache/@eslint-eslintrc-npm-1.3.0-1f3c51be25-a1e734ad31.zip/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
```

### Expected Behavior

The `next lint` command is successful with no errors.

### Link to reproduction

Please check the steps below to reproduce.

### To Reproduce

```shell
$ mkdir monorepo && cd "$_"
$ yarn init -2 -p -w
$ yarn create next-app packages/web
$ yarn workspace web add next@canary
$ yarn workspace web run lint
```
Repository: electron
Issue: [Bug]: ServiceWorker cannot cache custom scheme URLs
Labels: bug :beetle:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

v19.0.9

### What operating system are you using?

Other Linux

### Operating System Version

Gentoo

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

Register custom scheme:

```
electron.protocol.registerSchemesAsPrivileged([
  {
    'app',
    privileges: {
      standard: true,
      secure: true,
      allowServiceWorkers: true,
      bypassCSP: true,
      supportFetchAPI: true,
      corsEnabled: true,
      stream: true,
    },
  },
])
```

In the Service Worker:

```
const cache = await self.caches.open('myCache')
const response = await fetch(request)
cache.put(request, response)
```

Expected that the cache can store the URL.

### Actual Behavior

With the url `app://index.html/b/test` the fetch works perfectly but `cache.put` returns an error:

```
TypeError: Failed to execute 'put' on 'Cache': Request scheme 'app' is unsupported
```

### Testcase Gist URL

_No response_

### Additional Information

_No response_
Repository: vscode
Issue: I can't scroll screen using Windows Ink
Labels: feature-request,trackpad/scroll

Issue Type: <b>Bug</b>

Plug a pen device into computer, and use the pen to scroll the page
![NRA0tmPVir](https://user-images.githubusercontent.com/46141631/180582326-f2f56527-8e87-4566-90d0-487c99b0a0b8.gif)

VS Code version: Code 1.69.1 (b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a, 2022-07-12T08:21:24.514Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5 CPU       M 560  @ 2.67GHz (4 x 2660)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: unavailable_off<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: enabled<br>video_encode: unavailable_off<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: unavailable_off|
|Load (avg)|undefined|
|Memory (System)|7.68GB (2.69GB free)|
|Process Argv|--crash-reporter-id 8ee42260-0a47-4278-b843-504ce733ff76|
|Screen Reader|no|
|VM|0%|
</details>
<!-- generated by issue reporter -->
Repository: pytorch
Issue: [PyTorch/XLA] Improve the XLA PR landing process
Labels: module: ci,triaged,module: xla

### 🚀 The feature, motivation and pitch

# Current situation
Currently to merge a XLA breaking pr, we follow these procedures
1. PyTorch/XLA merge the fix PR, which will break the PyTorch/XLA head CI
2. PyTorch PR rebased and updated the [xla_hash](https://github.com/pytorch/pytorch/blob/master/.github/ci_commit_pins/xla.txt)
3. PyTorch merge the xla break pr
4. PyTorch/XLA rerun the head CI and it should be green again

# User expericncen flaw
This process has help a lot for pytorch CI stability. However it creates quite a lot of burden on the PyTorch/XLA maintainer side because
1. PyTorch/XLA CI will be broken when fix pr merged and won't be fix until corresponding PyTorch PR merged. 
2. Merging a pytorch pr is a lot more effort than merging a pytorch/xla PR. In step 2 pytorch pr needs to be rebased hence will rerun all test. Waiting for all tests to finish will take hours and might fail for various reason. In this whole time PyTorch/XLA head will be broken
3. using `merge -f` will help this merging delay but people are generally concern about this command because it is somewhat dangerous for such a complcaited codebase like pytorch.
4. PyTorch/XLA maintainer needs to closely monitor the upstream pr until it is merged.

# Proposal 
I am proposing a new merge process hopefully can address above issue
1. PyTorch/XLA rebased the "fix pr"
2. PyTorch pr rebased and pin to the PyTorch/XLA pr's branch in [xla.txt](https://github.com/pytorch/pytorch/blob/master/.github/ci_commit_pins/xla.txt)
3. PyTorch pr started a merge job and can wait until all test green(xla test should pass too)
4. PyTorch/XLA merge the fix pr (need to turn off auto-delete branch after merge)
5. PyTorch bot will update the [xla.txt](https://github.com/pytorch/pytorch/blob/master/.github/ci_commit_pins/xla.txt) to the new PyTorch/XLA master hash which will also have the fix

The advantage of this approach ares
1. PyTorch and PyTorch/XLA pr will be both green all the time
2. PyTorch/XLA maintainer only need to merge the fix pr the same day(before pytorch bot started). This requires much less coordination work between two sides.

# Work that needs to be done
PyTorch CI need to understand  [xla.txt](https://github.com/pytorch/pytorch/blob/master/.github/ci_commit_pins/xla.txt) can contain both branch name and commit.

FYI @suo @bdhirsh @wconstab 

### Alternatives

_No response_

### Additional context

_No response_

cc @seemethere @malfet @pytorch/pytorch-dev-infra @bdhirsh
Repository: pytorch
Issue: [Misleading] The doc started using Tensorflow terminology in the document to explain how to use the Pytorch code.
Labels: module: docs,triaged

### 📚 The doc issue

![image](https://user-images.githubusercontent.com/21982975/180585585-6077a456-c2d9-4e15-a1f6-014b93feb13b.png)
 the model must be executed in inference mode and operate on input tensors that do not collect gradient tape information (e.g., running with torch.no_grad).

### Suggest a potential alternative/fix

 the model must be executed in inference mode and operate on input tensors that do not collect gradient tape information (e.g., running with torch.no_grad).
Change it to be:
the model must be executed in inference mode and operate on input tensors that does not accumulate gradient. (e.g, setting the model with torch.no_grad).

cc @svekars @holly1238
Repository: rust
Issue: Rustdoc displays private internals of associated constants when reexporting types
Labels: T-rustdoc,C-bug,A-cross-crate-reexports,A-rustdoc-ui

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->
`types/src/lib.rs`:
```rust
pub struct HasPrivateFields {
    _private: (),
}

impl HasPrivateFields {
    pub const ASSOC: Self = Self { _private: () };
}
```

`main/src/lib.rs`:
```rust
pub use types::HasPrivateFields;
```

This leaks private fields:
![Doc page displaying private fields in associated constant initializers](https://user-images.githubusercontent.com/44050761/180588518-cbb80554-af09-47f3-af6e-0f036a8dad15.png)

Tested with `cargo clean && cargo +nightly doc`.

Note that this also applies to verbose initializers.

This issue was first brought up in #97933. The previous issue was closed due to a hotfix implemented in PR #98814. However, the hotfix fails to handle the case in this issue.

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc +nightly --version --verbose`:
```
rustc 1.64.0-nightly (848090dcd 2022-07-22)
binary: rustc
commit-hash: 848090dcd18553b790461132ca9d2a020aeea9a2
commit-date: 2022-07-22
host: x86_64-pc-windows-msvc
release: 1.64.0-nightly
LLVM version: 14.0.6
```


<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"fmease"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: neovim
Issue: Mouse popup showing menu in insert-visual mode while it reports no menu
Labels: bug-vim

### Neovim version (nvim -v)

0.8.0-dev+519-g6f6286e4f9

### Vim (not Nvim) behaves the same?

no, vim 8.2

### Operating system/version

linux 5.15.19-1-MANJARO

### Terminal name/version

alacritty 0.10.1

### $TERM environment variable

alacritty

### Installation

AUR

### How to reproduce the issue

```
nvim --clean
:set mouse=a
isome text <C-o>V
```
right click visually selected area.
left click on `cut`

### Expected behavior

Either:
Text being cut
Or:
There being no popup menu

### Actual behavior

An error is raised:
`E335: Menu not defined for Insert mode`