sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: rustc emits calls to `__sync_` when using load/store with `+forced-atomics`
Labels: A-LLVM,T-compiler,A-atomic,A-target-feature

I went to start a new branch for the `gba` crate and things were going well *until* LLVM demanded that I add a bunch of definitions for atomic intrinsics:

```
  = note: arm-none-eabi-ld: D:\dev\gba\target\thumbv4t-none-eabi\debug\deps\libgba-e42d0bb0e1acbf2b.rlib(gba-e42d0bb0e1acbf2b.8ymripsqk83bpm.rcgu.o): in function `core::sync::atomic::atomic_store':
          C:\Users\Daniel\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\sync/atomic.rs:2948: undefined reference to `__sync_lock_test_and_set_4'
          arm-none-eabi-ld: D:\dev\gba\target\thumbv4t-none-eabi\debug\examples\hello-4b3a62c592de993e.5c84v82b0il7lif5.rcgu.o: in function `core::sync::atomic::atomic_store':
          C:\Users\Daniel\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\sync/atomic.rs:2948: undefined reference to `__sync_lock_test_and_set_2'
          arm-none-eabi-ld: D:\dev\gba\target\thumbv4t-none-eabi\debug\examples\hello-4b3a62c592de993e.5c84v82b0il7lif5.rcgu.o: in function `core::sync::atomic::atomic_load':
          C:\Users\Daniel\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\sync/atomic.rs:2963: undefined reference to `__sync_val_compare_and_swap_2'
```

These are all part of LLVM's [sync](https://llvm.org/docs/Atomics.html#libcalls-sync) function set, and they are probably caused by the atomic accesses I'm using:

* [lib.rs, u32 store](https://github.com/rust-console/gba/blob/v0.7.0-remake/src/lib.rs#L169)
* [hello.rs, u16 store](https://github.com/rust-console/gba/blob/v0.7.0-remake/examples/hello.rs#L26)
* [hello.rs, u16 load](https://github.com/rust-console/gba/blob/v0.7.0-remake/examples/hello.rs#L41)

Now the GBA is using the ARMv4T architecture, which *does not have* atomic instructions at the CPU level, but the `+forced-atomic` feature was recently added to many target definitions for older targets. My _understanding_ of how this was supposed to work is that an aligned atomic load/store will just use the normal load/store instruction, and then the "advanced" atomic actions like fetch_add would call a function. However, it seems to be the cast that (using the `thumbv4t-none-eabi` target) LLVM still wants to call functions for plain load/store.
Repository: go
Issue: net/netip: Document of `AddrFromSlice` doesn't mention that passing IPv4 `net.IP` made with `net.ParseIP` to `AddrFromSlice` creates IPv4 mapped IPv6 `netip.Addr`
Labels: Documentation,NeedsFix

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.19 linux/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
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/yutaro/.cache/go-build"
GOENV="/home/yutaro/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/yutaro/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/yutaro/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
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 -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2759925210=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
https://go.dev/play/p/Dnz95xrGio-

### What did you expect to see?
```
isIPv4: true, string: 10.0.0.1
isIPv4: true, string: 10.0.0.1
```

### What did you see instead?
```
isIPv4: true, string: 10.0.0.1
isIPv4: false, string: ::ffff:10.0.0.1
```

The issue happens because `net.IP` holds an IPv4 address in the form of an IPv4 mapped IPv6 address if I understand correctly. Since `AddrFromSlice` is not aware of the `net.IP` and it [only sees the length of the slice](https://cs.opensource.google/go/go/+/refs/tags/go1.19:src/net/netip/netip.go;l=345-353), so it is working as intended in that sense. However, the document of `AddrFromSlice` is a bit misleading.

```
Note that a net.IP can be passed directly as the []byte argument.
```

It can be read like we can use `AddrFromSlice` to convert `net.IP` to `netip.Addr`, but as mentioned in the https://github.com/golang/go/issues/37921, `net.IP` cannot distinguish IPv4 address and IPv4 mapped IPv6 address. Thus, users should always be aware of the address family of `net.IP` before calling `AddrFromSlice` and need to do `net.IP.To4()` when it is an IPv4 address. I think users should know this.
Repository: create-react-app
Issue: Add support for CJS files
Labels: needs triage,issue: bug report

### Describe the bug

If a dependency contains a `.cjs` file, then said file is not processed by babel due to the default webpack config, meaning it will not be loaded.

Also, some `cjs` file are not excluded when needed: https://github.com/facebook/create-react-app/issues/11889

### Did you try recovering your dependencies?

Tried but did not help

### Which terms did you search for in User Guide?

CJS, ESM, commonjs

### Environment

```
Environment Info:p@5.0.1
Ok to proceed? (y) y
  current version of create-react-app: 5.0.12c87c: timing idealTree:#root Completed in 1377ms
  running from /home/fryorcraken/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app

  System:
    OS: Linux 5.18 Fedora Linux 36 (Workstation Edition)
    CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Chrome: 104.0.5112.101
    Firefox: 103.0.2
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found
```

### Steps to reproduce

Use any npm package that contains `*.cjs` files.

### Expected behavior

The `.cjs` files are correctly loaded and the functions, variable, classes, defined in them are available.

### Actual behavior

The `.cjs` files notloaded and the functions, variable, classes, defined in them are `undefined`.

### Reproducible demo

I don't believe this is necessary as there at least 5 PRs opened to fix this issue:

- https://github.com/facebook/create-react-app/pull/12605
- https://github.com/facebook/create-react-app/pull/12578
- https://github.com/facebook/create-react-app/pull/12021
- https://github.com/facebook/create-react-app/pull/11674
- https://github.com/facebook/create-react-app/pull/12352

### Related issues

- https://github.com/facebook/create-react-app/issues/12155
Repository: godot
Issue: [3.5 Stable] DoubleClicking on a FileSystem tscn scene file does not open the scene file view when a script is open
Labels: bug,topic:editor

### Godot version

v3.5.stable.official [991bb6ac7]

### System information

Mac OS X (Catalina) 10.15.7

### Issue description

If you doubleclick on a tscn scene file in the FileSystem panel, while a script file is open, Godot does not open the .tscn file view. Instead you have to click the 2D tab.

The doubleclick scene file should always open in the scene view, regardless of the Text Editor > Navigation > Stay in Script flag setting. 



### Steps to reproduce

Create couple of scenes and couple of scripts. Double click on the scene file and then on a script file. Then try to doubleclick on the scene file. In addition if you have a scene in a subfolder, it will open it the first time in the view, but if you open a script and then doubleclick on the scene will not open it. 

Only workaround is clicking on the 2D or 3D tabs at the top.

### Minimal reproduction project

[FileSystemSceneOpenTest.zip](https://github.com/godotengine/godot/files/9474600/FileSystemSceneOpenTest.zip)
Repository: vscode
Issue: Startup profiler should use issue reporter instead
Labels: feature-request,debt,issue-reporter

https://github.com/microsoft/vscode/blob/6815774edeb1f5649cdf8e8713a04940acb88203/src/vs/workbench/contrib/performance/electron-sandbox/startupProfiler.ts#L114-L136

#159736 is a recent example of an issue created that way but lacking the clipboard-pasted info.

_Originally posted by @gjsjohnmurray in https://github.com/microsoft/vscode/issues/159688#issuecomment-1233891189_
Repository: TypeScript
Issue: No error on unconstrained type parameter in `>` comparison
Labels: Bug,Fix Available,Rescheduled

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

object is possibly undefined 4.8

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This changed between versions 4.7.4 and 4.8.2

### ⏯ Playground Link

TS playground on 4.8.0-beta [link](https://www.typescriptlang.org/play?ts=4.8.0-beta#code/KYDwDg9gTgLgBAMwK4DsDGMCWEVwLaYoA8AKgHwAUmMAXHAJIzBQCGARgDbClkCUdJOAB84KJBw5wA3gCg48uF3hRgAZ3G04gkWIlwAvKPEcA3HIUJocCmhyr4ANzgQEcar2nmFCzK4or1Dnh9EKM9IREAjTgyOAcPWW8khSiggzizZPkAXy84XO8VGCQoXFSYM1ygA).

(The playground doesn't seem to have 4.8.x releases, but I tested on 4.8.0-beta and nightly (4.9.0-dev.XXXXXXX).)

### 💻 Code

```ts
export function min<T>(it: Iterable<T>): T | null {
    let result: T | null = null;
    for (const v of it) {
        if (result === null || result > v) {
            result = v;
        }
    }
    return result;
}
```
```
error TS2532: Object is possibly 'undefined'.

        if (result === null || result < v) {
                               ~~~~~~
```

On that line, hovering over the first `result` shows `T | null`. Hovering over the second `result` shows `T & ({} | undefined)`.

### 🙁 Actual behavior

I get a type error.

### 🙂 Expected behavior

No error.
Repository: material-ui
Issue: Overlapping checking multiple checkboxes on mobile
Labels: component: checkbox

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

On mobile
if you select two checkboxes in a row, then when you click on the second one, it will affect the first

### Expected behavior 🤔

if you select two checkboxes in a row, then when you click on the second one, it should affect the second

### Steps to reproduce 🕹

Steps:

1. Open [Link](https://mui.com/material-ui/react-checkbox/) on mobile
2. Try to click two checkboxes in the row

https://user-images.githubusercontent.com/17977396/188072283-db5e9c19-41d2-41ac-ad4b-5ac38306259c.mp4



### Context 🔦

I have faced issues when I use [table with checkboxes](https://mui.com/material-ui/react-table/#sorting-amp-selecting) on mobile

### Your environment 🌎

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  System:
    OS: macOS 12.4
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chrome: 104.0.5112.101
    Edge: Not Found
    Firefox: Not Found
    Safari: 15.5
  npmPackages:
    @emotion/react: ^11.10.0 => 11.10.0
    @emotion/styled: ^11.6.0 => 11.10.0
    @mui/base:  5.0.0-alpha.92
    @mui/icons-material: ^5.4.2 => 5.8.4
    @mui/material: ^5.4.2 => 5.10.0
    @mui/private-theming:  5.9.3
    @mui/styled-engine:  5.10.0
    @mui/system:  5.10.0
    @mui/types:  7.1.5
    @mui/utils:  5.9.3
    @types/react: ^18.0.17 => 18.0.17
    react: ^18.2.0 => 18.2.0
    react-dom: ^18.2.0 => 18.2.0
    typescript: ^4.7.4 => 4.7.4
```
</details>

I have faced it in mobile safari and chrome
Repository: create-react-app
Issue: Option to create React project for specific version
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?
Yes
<!--
  Provide a clear and concise description of what the problem is.
  For example, "I'm always frustrated when..."
-->

Whenever we use create-react-app to make a project, it provides the latest version of react, react-dom, and testlibrary/react. The issue is that other npm packages are currently not supporting react v18, they have peer dependencies of v17 and/or v16. So  we need a way to tell CRA the version of react required, so that the template may build the package.json, package-lock, index.js, node_modules and other packages according to that specific version. Currently we have to do such modifications manually.

### Describe the solution you'd like

<!--
  Provide a clear and concise description of what you want to happen.
-->

I want a CRA template that takes react version as parameter, and makes the project according to that specific version, so that we may be able to use the older versions of react too, i.e, React v17 and v16.
### Describe alternatives you've considered

<!--
  Let us know about other solutions you've tried or researched.
-->

Currently this is the procedure that I am going through to make my project compatible with react [v16.]
(https://dev.to/lowla/create-react-app-with-a-previous-version-of-react-4g03)
### Additional context

<!--
  Is there anything else you can add about the proposal?
  You might want to link to related issues here, if you haven't already.
-->

(Write your answer here.)
Repository: PowerToys
Issue: Quick Window Switch
Labels: Product-Window Manager,Needs-Triage

### Description of the new feature / enhancement

When working with 2 screens, it would be great to be able to swap everything on one screen to the other, all at once. 
For clarity - all open windows on screen 1 go to screen 2, all open windows on screen 2 go to screen 1. 


### Scenario when this would be used?

Quickly swapping between my focus program screen and secondary screen. I use a 3d modelling program called Rhino, that runs a secondary program - grasshopper - on the second screen. 

Swapping would be much easier if it could be done in a single click!

### Supporting information

_No response_
Repository: next.js
Issue: Unexpected bundle Buffer ployfill into client chunks
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101
    Binaries:
      Node: 16.15.1
      npm: 8.11.0
      Yarn: 1.22.18
      pnpm: N/A
    Relevant packages:
      next: 12.2.5
      eslint-config-next: 12.2.5
      react: 18.2.0
      react-dom: 18.2.0

### What browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_

### Describe the Bug

A `typeof Buffer` check, for example: 

```js
const isNode = typeof Buffer !== 'undefined';
console.log({ isNode });
``` 

It causes a full `Buffer` ployfill (22.51Kb) to be put into the client bundle.

### Expected Behavior

A `typeof Buffer` check should just return `'undefined'` in browsers instead.

### Link to reproduction

https://github.com/chentsulin/nextjs-issue-40178-bundle-client-buffer

### To Reproduce

Add the following lines to the `pages/index.js` file:

```js
const isNode = typeof Buffer !== 'undefined';
console.log({ isNode });
```
Repository: material-ui
Issue: [TextField] Bad behavior when user edits box before hydration with SSR
Labels: new feature,breaking change,component: text field,package: material-ui

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

I'm using MUI's `TextField` to make a simple SSR login page with a username and password.

The problem is when the user is working over a slow network connection, so it takes some time for the Javascript to download and hydrate the page. As a result, they can edit the text box before hydration occurs.

In the picture below, the user has typed "bob" for the username prior to hydration. The helper text remains in place and it looks bad:

![Screenshot from 2022-09-01 19-47-09](https://user-images.githubusercontent.com/1634990/188048667-141b2f34-1876-465d-82ee-33e77d380056.png)

There is also a second problem: once hydration *does* complete, the `TextField` reverts to blank, losing the user's edits, which is not good UX.

### Expected behavior 🤔

The `TextField` should behave in a reasonable way prior to hydration. Reasonable could mean either a) don't allow edits, or b) handle the edits gracefully, with good styling and without losing them upon hydration.

### Steps to reproduce 🕹

I am doing my SSR setup with Razzle.js. I made a fork [here](https://github.com/thomasjm/razzle/tree/textfield-ssr/examples/with-material-ui) to showcase this.

1. Clone and build the repro:

```
git clone git@github.com:thomasjm/razzle.git
cd razzle/examples/with-material-ui
git checkout textfield-ssr
npm install
npm run build # Press Y
cd build
node server.js
```

2. Open `localhost:3000` in Chrome. Open the Chrome DevTools, go to the Network tab, and set the speed to "Slow 3G".
3. Refresh the page. Before the JS finishes downloading, try typing in the text box.


### Context 🔦

SSR is a popular technique for achieving fast page loads, and `TextField` should work gracefully with it.

### Your environment 🌎

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```

  System:
    OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    Yarn: 1.22.17 - ~/codedown/frontend/node_modules/.bin/yarn
    npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
  Browsers:
    Chrome: 104.0.5112.79
    Firefox: 104.0.1
  npmPackages:
    @emotion/react: ^11.8.2 => 11.8.2
    @emotion/styled: ^11.8.1 => 11.8.1
    @mui/base:  5.0.0-alpha.95
    @mui/core-downloads-tracker:  5.10.3
    @mui/icons-material:  5.0.5
    @mui/material: ^5.10.3 => 5.10.3
    @mui/private-theming:  5.10.3
    @mui/styled-engine:  5.10.3
    @mui/styles:  5.5.3
    @mui/system:  5.10.3
    @mui/types:  7.2.0
    @mui/utils:  5.10.3
    @types/react: ^17.0.43 => 17.0.43
    react: ^17.0.1 => 17.0.2
    react-dom: ^17.0.1 => 17.0.2
    typescript: ^4.8.2 => 4.8.2

```
</details>
Repository: pytorch
Issue: [c10d] Support a public API to retrieve default process group
Labels: oncall: distributed,feature,triaged,pt_distributed_rampup

### 🚀 The feature, motivation and pitch

- We should provide a public API to retrieve the default process group, as per the comment in https://github.com/pytorch/pytorch/pull/84105#issuecomment-1230519909, there is no documented way to get this, and as a result it makes it hard to use APIs that require a process group to be passed in.

Currently, we have `_get_default_group` as a private API, we should consider whether it is okay to make this a public API and if we can provide BC guarantees especially given the work around dispatchable collectives.

### Alternatives

_No response_

### Additional context

_No response_

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @kwen2501
Repository: flutter
Issue: [google_maps_flutter] `onTap` callbacks for `Polyline` required the `consumeTapEvents` property to be set to `true`
Labels: p: maps,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

Hey, I have a question regarding the [google_maps_flutter](https://github.com/flutter/plugins/tree/main/packages/google_maps_flutter/google_maps_flutter) plugin. 

When you add a polyline to a Google Maps map the following way, you must add the `consumeTapEvents` property and set it to true in order to have the callback to work properly. 
Is there any reason not to use the nullability of the `onTap` callback for this instead of having another property ? And in this case, I think we should have a clearer documentation in the `onTap` callback for this if it stays this way. 

```dart
const kLake = CameraPosition(
      target: LatLng(45.38, 6.59),
      zoom: 12.3,
    );
GoogleMap(
        initialCameraPosition: kLake,
        polylines: <Polyline>{
          Polyline(
            polylineId: const PolylineId('polyline_1'),
            onTap: () => print('polyline_1 tapped'),
            consumeTapEvents: true,
            visible: true,
            points: const <LatLng>[
              LatLng(45.38, 6.59),
              LatLng(45.4, 6.55),
            ],
            color: Colors.red,
            width: 10,
          ),
        },
      );
```
Repository: rust
Issue: The documentation of `Vec` contradicts itself regarding `with_capacity`
Labels: A-docs

<!--

Thank you for finding a documentation problem! 📚

Documentation problems might be grammatical issues, typos, or unclear wording, please provide details regarding the documentation including where it is present.

Note: If your issue is for one of these, please use their dedicated issue tracker instead:

- The Rust Book: https://github.com/rust-lang/book/issues
- Rust by Example: https://github.com/rust-lang/rust-by-example/issues
- The Edition Guide: https://github.com/rust-lang/edition-guide/issues
- The Cargo Book: https://github.com/rust-lang/cargo/issues
- The Clippy Book: https://github.com/rust-lang/rust-clippy/issues
- The Reference: https://github.com/rust-lang/reference/issues
- The Rustonomicon: https://github.com/rust-lang/nomicon/issues
- The Embedded Book: https://github.com/rust-embedded/book/issues

All other documentation issues should be filed here.

Or, if you find an issue related to rustdoc (e.g. doctest, rustdoc UI), please use the bug report or blank issue template instead.

-->

### Location

https://doc.rust-lang.org/std/vec/struct.Vec.html

### Summary

In section [Guarantees](https://doc.rust-lang.org/std/vec/struct.Vec.html#guarantees) the documentation says:

> `vec![x; n]`, `vec![a, b, c, d]`, and [`Vec::with_capacity(n)`](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.with_capacity), will all produce a Vec with exactly the requested capacity.

However in [`Vec::with_capacity(n)`](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.with_capacity) it says:

> This method is allowed to allocate for more elements than capacity.

And

> If it is imporant to know the exact allocated capacity of a Vec, always use the [capacity](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.capacity) method after construction.

These clearly contradict each-other. I guess it's better for performance to not guarantee capacity but maybe it'd break someones code to change it since it was already "documented". :(