sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/compile: flashing optimization indexing into arrays bounded by a modulo bellow or equal to the length only works if the modulo is a sub expression of the indexing
Labels: Performance,NeedsFix,compiler/runtime

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.21.1 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 envGO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/hugo/.cache/go-build'
GOENV='/home/hugo/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/hugo/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/hugo/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/hugo/Documents/Scripts/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/hugo/Documents/Scripts/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.1'
GCCGO='/usr/bin/gccgo'
GOAMD64='v3'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2448092634=/tmp/go-build -gno-record-gcc-switches'
</pre></details>

### What did you do?

Compile:
```go
func Minimized(x uint, arr *[100]uint) uint {
    i := x % 100
    return arr[i]
}
```

### What did you expect to see?

No bound check

### What did you see instead?

A bound check is present.

---

However this:
```go
func Minimized(x uint, arr *[100]uint) uint {
    return arr[x % 100]
}
```
correctly omits the bound check.

### Why is this broken ?

```go
func Minimized(x uint, arr *[100]uint) uint {
    i := x % 100
    return arr[i]
}
```
Fails to be picked up by prove because opt rewrites it to something along the lines of:
```go
func Minimized(x uint, arr *[100]uint) uint {
    i := 100 - (-6640827866535438581 * (x >> 1) * 100)
    return arr[i]
}
```
which it has no idea what to do with.
`arr[x % 100]` is specially handled with `internal/ir`.

I think a simple enough fix is to delay strength reduction to late opt (except for powers of two since prove knows how to handle theses), this will make it miss the main CSE passes but I don't think it's *that* bad, there is still lowered cse, need to experiment and see what this yields.
Repository: godot
Issue: [EditorPlugin] Mouse Click Input doesn't work in a SubViewport when running it in the Editor.
Labels: bug,topic:editor,topic:input

### Godot version

4.2.dev5

### System information

Godot v4.2.dev5 - Windows 10.0.22621 - Vulkan (Forward+) - dedicated AMD Radeon(TM) RX 6500 XT () - Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz (12 Threads)

### Issue description

Mouse Click Input doesn't work in a SubViewport when running it in the Editor.

https://github.com/godotengine/godot/assets/57235054/33ee09fc-9747-45fd-b585-2d7c36c05e31



### Steps to reproduce

1. Create Project
2. Add Plugin with Control that contains SubViewport
3. Attach to dock or main

### Minimal reproduction project

[EditorCameraTest.zip](https://github.com/godotengine/godot/files/12667836/EditorCameraTest.zip)
Repository: flutter
Issue: [flutter_tools] crash parsing assets from pubspec.yaml when path is invalid
Labels: P2,team-tool,triaged-tool

On command `flutter run`
Flutter version beta/3.15.0-15.1.pre

```
FileSystemException: Exists failed, path = 'C:\flutter_app\assets\my_asset.json\' (OS Error: The filename, directory name, or volume label syntax is incorrect.
, errno = 123)
at _Directory.existsSync(directory_impl.dart:92)
at ForwardingFileSystemEntity.existsSync(forwarding_file_system_entity.dart:43)
at ErrorHandlingDirectory.existsSync.<anonymous closure>(error_handling_io.dart:492)
at _runSync(error_handling_io.dart:590)
at ErrorHandlingDirectory.existsSync(error_handling_io.dart:491)
at ManifestAssetBundle._parseAssetsFromFolder(asset.dart:886)
at ManifestAssetBundle._parseAssets(asset.dart:799)
at ManifestAssetBundle.build(asset.dart:261)
at <asynchronous gap>(async)
at ResidentWebRunner._updateDevFS(resident_web_runner.dart:503)
at <asynchronous gap>(async)
at ResidentWebRunner.restart(resident_web_runner.dart:385)
at <asynchronous gap>(async)
at TerminalHandler._commonTerminalInputHandler(resident_runner.dart:1774)
at <asynchronous gap>(async)
at TerminalHandler.processTerminalInput(resident_runner.dart:1827)
at <asynchronous gap>(async)
```
Repository: next.js
Issue: Route Handlers ending with "index" is ignored from the build when deployed.
Labels: bug,Runtime

### Link to the code that reproduces this issue

https://github.com/adrocodes/next-api-index-bug

### To Reproduce

There are three routes of interest:

1. `/api/test`
2. `/api/test/index`
3. `/api/test/other`

Starting the local dev server (`npm run dev`) and hitting those endpoints will return the expected result.

Hitting those endpoints on the [deployed site](https://next-api-index-bug.vercel.app) the `/api/test/index` route will return a 405 error.

I initially thought that `/api/test/index` was weirdly being treated as `/api/test` but that wasn't the case.

### Local

![image](https://github.com/vercel/next.js/assets/122238442/14cf398b-e9c5-499a-9f88-32b65d3938e5)

### Deployed

![image](https://github.com/vercel/next.js/assets/122238442/355f4a24-8108-4886-9c6b-ba47d7bd0b8f)


### Current vs. Expected behavior

I'd expect that routes I define and test locally would behave in a similar way when deployed to Vercel.

I checked the "Functions" tab in the deployed and it appears that the `/api/test/index` function was not deployed at all.

<img width="741" alt="image" src="https://github.com/vercel/next.js/assets/122238442/e54796b2-03bc-4362-af03-e633da8de3b7">


### Verify canary release

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

### Provide environment information

```bash
N/A
```


### Which area(s) are affected? (Select all that apply)

App Router, Middleware / Edge (API routes, runtime)

### Additional context

_No response_
Repository: neovim
Issue: feat: Add a callback option to `vim.lsp.buf.code_action()`
Labels: enhancement,lsp

### Problem

It's currently impossible to get information about the selected code action using `vim.lsp.buf.code_action`.

### Expected behavior

Why would that be useful? 
It would allow us to play around with code actions, for example: get the last code action context and apply the same code action to all diagnostics with the same context in the current workspace, or get the last code action edits and reuse it by implementing it as a dot repeat.

---

Related: #28004
Repository: PowerToys
Issue: [Peek] Change preview when selected file changed
Labels: Idea-Enhancement,Needs-Triage,Product-Peek

### Description of the new feature / enhancement

The peak function should work with just clicking space bar, Similar to quicklook application and also when selection of next or diffrent file is made it automatically preview the new file just same as quicklook feature

### Scenario when this would be used?

Almost everytime to preview a pdf, image and video, specially images, opening in image viewer takes time so power toys peek is the best feature 

### Supporting information

_No response_
Repository: pytorch
Issue: Extends the functionality of  `nn.BatchNorm1d`.
Labels: oncall: distributed,module: nn,triaged,needs research

### 🚀 The feature, motivation and pitch

This feature request proposes the extension of `BatchNorm1d` to the PyTorch library. `NaiveSyncBatchNorm1d` is an extension of the existing `nn.BatchNorm1d` module, designed to support synchronization across multiple devices, either locally or globally. 

The motivation behind this feature request is to enhance PyTorch's capabilities in distributed deep learning scenarios. the proposed `NaiveSyncBatchNorm1d` module would fill this gap.

I propose the addition of the `NaiveSyncBatchNorm1d` module to PyTorch. The module provides the following features:
- Synchronization of batch normalization statistics (mean and variance) across multiple devices.
- Support for both global synchronization and local synchronization based on user requirements.

### Alternatives

While there are alternative ways to implement synchronized batch normalization, `NaiveSyncBatchNorm1d` offers a simple and efficient solution. 


### Additional context

Here's an example of how `NaiveSyncBatchNorm1d` can be used in PyTorch:

```python
sync_bn = NaiveSyncBatchNorm1d(num_sync_devices=4, global_sync=False, num_features=64)
output = sync_bn(input_tensor)
```

Source: https://github.com/facebookresearch/pytorchvideo/blob/64e5a17ccefcd6b93ad331d1a9c2a130f179ff44/pytorchvideo/layers/batch_norm.py#L10C44-L10C44

I would like to create a PR for the same.

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: godot
Issue: The editor crashes when switching to 2D and changing the size of the left or right tabs for the first time.
Labels: bug,topic:editor,crash,topic:2d

### Godot version

v4.1.1.stable.official [bd6af8e0e]

### System information

Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Mobile) - integrated Intel(R) UHD Graphics (Intel Corporation; 31.0.101.3358) - 12th Gen Intel(R) Core(TM) i3-1215U (8 Threads)

### Issue description

The description is as the title says.
I tried changing the tab size in various ways, 
but I couldn’t figure out the pattern of the crash, so I only reported the sure way.
(I'm not good at English, so I have ChatGPT translate it for me. Sorry if it's hard to understand.)

### Steps to reproduce

1: Create a project with the “Renderer” setting set to “Mobile”
2: Switch the editor to 2D
3: Drag and change the size of either the left or right tab

### Minimal reproduction project

N/A
Repository: go
Issue: crypto/tls: SNI name with trailing dot (absolute name) fails tls handshake
Labels: NeedsInvestigation

Note: I don't think this is a bug in Go crypto/tls, but its strict handling may cause interoperability issues.

### Go version

go1.21.1, probably earlier too.

### What did you do?

Start a crypto/tls-based webserver. Browse to it with a popular browser (firefox, chromium, safari) with a URL that has a trailing dot, e.g. https://www.xmox.nl./

### What did you expect to see?

You may expect to see a website.

### What did you see instead?

A TLS handshake error.

It looks like the popular browsers do not remove the trailing dot from the SNI name used in their TLS handshake. Crypto/tls correctly (according to the TLS RFC) refuses the connection. See https://github.com/golang/go/blob/go1.21.1/src/crypto/tls/handshake_messages.go#L447

For firefox, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1008120
For chromium, see: https://bugs.chromium.org/p/chromium/issues/detail?id=593952

Curl does strip the trailing dot from SNI, so `curl https://www.xmox.nl./` can get to the HTTP response (though in this case the domain with trailing dot is not configured).

For most websites I tried to access with an absolute domain name (that are likely not running a crypto/tls-based HTTPS-webserver) the connections do work, e.g.: https://www.google.com./ https://www.amazon.com./

Some more examples that don't work: https://caddyserver.com./, https://nu.nl./ (appears to use skipper).

From memory (about 6 months ago), I first ran into this when using a crypto/tls-based webserver to offer email account autodiscovery to Microsoft Outlook. The incoming autodiscovery HTTPS connections had a trailing dot in the SNI name, so autodiscovery failed. Outlook seems to have made up the absolute URL itself.

To summarize: I don't think this is a bug in crypto/tls, and I like its correct/strict behaviour, but that may cause interoperability issues. I'm mostly filing this bug for future reference and possible discussion and after a hint from @FiloSottile.
Repository: go
Issue: proposal: net: deprecate DNSConfigError
Labels: Proposal

It is unused since [CL 9380](https://go.dev/cl/9380) and documented as not used.

```go
// DNSConfigError represents an error reading the machine's DNS configuration.
// (No longer used; kept for compatibility.)
type DNSConfigError struct {
	Err error
}
```

Any reason why it is not deprecated properly yet?
Repository: ant-design
Issue: 虚拟列表滚动条滚动效果和原生不一致
Labels: Inactive,unconfirmed

### What problem does this feature solve?

感觉虚拟列表的滚动效果比原生的快了很多 手感差很多  考虑优化下？

### What does the proposed API look like?

尽肯能和原生的手感 阻尼啥的保持一致

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: material-ui
Issue: [code-infra] Utilize typescript project references to speed up type-checking
Labels: typescript,core

Running `yarn typescript` spins up a separate TypeScript compiler in all workspace projects, leading to projects being type-checked several times. Introducing project references for both type-checking and emitting declarations, and referencing all projects in the root tsconfig should save some CI time.

Since TypeScript project references can't form cycles, we must solve #39067 first.

Preliminary work has been done in #30200.
Repository: ant-design
Issue: 固定表头带children & [fixed:'right']的样式问题
Labels: 🐛 Bug,help wanted,Inactive

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/biao-tou-fen-zu-antd-5-9-2-forked-4nw8lq?file=/demo.tsx)

### Steps to reproduce

```js
const columns = [
{
    title: "Name",
    dataIndex: "name",
    key: "name",
    width: 100,
    fixed: "left",
},
...,
{
    title: "Gender",
    children: [
      {
        title: "vvv",
        dataIndex: "vvv",
        key: "vvvvv",
        width: 80,
        fixed: "right"
      }
    ]
  }
]
```

### What is expected?

右侧`Gender`表头的className应当包括`ant-table-cell-fix-right-first`，即滚动时应当带有阴影和边框

### What is actually happening?

样式缺失

| Environment | Info |
| --- | --- |
| antd | 5.9.2 |
| React | 18.0.0 |
| System | macos |
| Browser | chrome 116.0.5845.187 |

---
源码只对叶子节点添加了这个样式，按理来说相关叶子节点的父节点都应该添加该样式

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: next.js
Issue: Error in root layout at nested route does not use parent `global-error.tsx`
Labels: bug,Navigation

### Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/nifty-ioana-9rdm6g

### To Reproduce

1. Create a root `global-error.tsx` file
2. Throw an error in the root layout but in a nested route that exists, say `/signin`
3. Start the application with `next start` (not dev mode)
4. Navigate to `/signin` and see that `global-error.tsx` is unused, and instead the default Next "Application error" page appears

<img width="663" alt="image" src="https://github.com/vercel/next.js/assets/38569176/ac22fadd-a804-4068-9d0b-f0438483040c">

5. If I create a `global-error.tsx` file next to the nested layout page (see `app/sample-page/unused-global-error.tsx` in the CodeSandbox) it will correctly show the error page.

### Current vs. Expected behavior

When the Root Layout throws an error, the **current behavior** is to show the `global-error.tsx` at the same segment of the target route. If no `global-error.tsx` file exists for that route, Next's default "Application Error: a server-side exception occurred" page appears.

My expected behavior would be to look for that route's `global-error.tsx` file (like it does now), and if it does not find it, use the root `global-error.tsx` (not doing it, it's defaulting to Next's default server-error page).

### Verify canary release

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

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
Binaries:
  Node: 16.17.0
  npm: 8.15.0
  Yarn: 1.22.19
  pnpm: 7.1.0
Relevant Packages:
  next: 13.5.1-canary.1
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router, Routing (next/router, next/navigation, next/link)

### Additional context

#52993 appears to be closely related but they describe the error happening in dev mode as well.
Repository: deno
Issue: Automatic file renaming ignores import map
Labels: upstream,lsp,tsc

Consider monorepo-like structure

```
a/
b/
deno.json
import_map.json
```

and import map

```json
{
  "scopes": {
    "./a/": { "b/": "./b/" },
    "./b/": { "a/": "./a/" },
  }
}
```

On Deno 1.37 renaming a file inside `b/` would make import-map-based path inside `a/` point to relative path.

This is needed for non-monorepo project too. We're using multiple repos via opening parent folder in VSCode and using a custom tool to manage / merge configs (including import maps) for LSP and other tools to being able to handle them. While these repos referencing each other via self-hosted CDN, we're able to redirect them to the local copies via top-level import map.
Repository: material-ui
Issue: [docs][material-ui] Add explanations for the Progress page circular demos
Labels: docs,package: material-ui,component: progress

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

Hello, thanks for the opportunity to create this issue!

I have a bad developer experience while utilizing the demo documentation for the Progress API. I would love each demo to have detailed but concise explanations of WHAT NEEDS TO BE ADDED to implement that particular variant.

This should be done for each sections as it is with most of the other APIs. This also applies to both the `Circular` and `Linear` Progress APIs.

As a seasoned technical documentation writer and React engineer, I would love to propose this change through a PR, however I would love a go-ahead from the maintainers.

I look forward to hearing from you.

### Examples 🌈

![Screenshot (20)-mh](https://github.com/mui/material-ui/assets/63825997/24d9b386-129c-4497-a4f1-c6e3e3697aab)


### Motivation 🔦

Most developers are always on "work mode", what this means is that they need to know what a particular API does at the INSTANT they go through its docs.
This means they need to be able to highlight the differences in two API variants in terms of what they need to add or what they need to modify. Not just in the code snippet but in words too!


I use MUI library on a daily basis and over the years, I have come to appreciate this library as the best component library ever created in the React ecosystem. It would be an honour to be on this project. Thank you!
Repository: pytorch
Issue: Make standard container classes satisfy container Protocols.
Labels: module: nn,triaged,needs research

### 🚀 The feature, motivation and pitch

The container classes in [`torch/nn/modules/container`](https://github.com/pytorch/pytorch/blob/b30ee35a6f141d3247a24fd09f96ea50a7e2b3c7/torch/nn/modules/container.py) satisfy the necessary methods to use corresponding `collections.abc` Mixins, I propose to either subclass these, or to satisfy the protocols manually:

- `nn.Sequential` -> `MutableSequence[M]`
- `nn.ModuleList` -> `MutableSequence[M]`
- `nn.ModuelDict` -> `MutableMapping[str, M]`
- `nn.ParameterList` -> `Sequence[P]` (missing: `__delitem__` and `insert` for `MutableSequence[M]`)
- `nn.ParameterDict` -> `MutableMapping[str, P]`
- `M` would be a `TypeVar` bound to `nn.Module`.
- `P` would be a `TypeVar` bound to `nn.Parameter`.

### Alternatives

_No response_

### Additional context

_No response_

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: storybook
Issue: [Bug]: automatic control generation does not work when importing from barrel files
Labels: bug,needs triage

### Describe the bug

I'm trying to let storybook detect the options of a dropdown automatically.
In most cases, this worked perfectly. But in some cases, only a string-input was generated, or even a "Set Object" button.
I tried a few things and found out, that the issue only occurs, if the type is imported from a barrel file.

### To Reproduce

Create a file setup like this:
- types
  -  Variant
     - index.ts
- components
  - MyComponent
    - MyComponent.ts
    - MyComponent.stories.ts

```ts
// types/Variant/index.ts
export type Variant = 'a' | 'b';

// components/MyComponent/MyComponent.ts
import { Variant } from '~types/Variant';

export type MyComponentProps = {
    variant: Variant
}

export function MyComponent(props: MyComponentProps): JSX.Element {
    return <div />;
}
```

The above, when rendering a story, does not generate the correct control.

However, if you change `import { Variant } from '~types/Variant';` to `import { Variant } from '~types/Variant/index';`, it works.
So it seems, that the storybook code analyzer is not able to automatically detect the inferred index file and read it.

### System

```bash
System:
    OS: Linux 5.15 Manjaro Linux
    CPU: (16) x64 AMD Ryzen 7 PRO 5850U with Radeon Graphics
  Binaries:
    Node: 16.20.0 - ~/.nvm/versions/node/v16.20.0/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.19.4 - ~/.nvm/versions/node/v16.20.0/bin/npm
  npmPackages:
    @storybook/addon-a11y: 7.4.2 => 7.4.2 
    @storybook/addon-actions: 7.4.2 => 7.4.2 
    @storybook/addon-designs: 7.0.5 => 7.0.5 
    @storybook/addon-essentials: 7.4.2 => 7.4.2 
    @storybook/blocks: 7.4.2 => 7.4.2 
    @storybook/manager-api: 7.4.2 => 7.4.2 
    @storybook/react: 7.4.2 => 7.4.2 
    @storybook/react-webpack5: 7.4.2 => 7.4.2 
    @storybook/theming: 7.4.2 => 7.4.2
```


### Additional context

_No response_
Repository: godot
Issue: SoftBody vertex error
Labels: bug,confirmed,topic:physics,topic:3d

### Godot version

4.1.1 [stable]

### System information

Windows 10

### Issue description

set_vertex_position: Condition "p_index >= (int)map_visual_to_physics.size()" is true.
  <C++ Source>   servers/physics_3d/godot_soft_body_3d.cpp:333 @ set_vertex_position()

When I size or move a softbody the error occurs. I try to animate and it still gives this error. So I remove the animation and the error persists. The error is spam in the log and does not crash the project.

### Steps to reproduce

1 -  Create a softbody
2 - Set attachs to an MeshInstance3D
3 - Try to scale or animate this

### Minimal reproduction project

![image](https://github.com/godotengine/godot/assets/51931284/0e156f0c-edb7-49d1-9cac-683c53f6a831)

![image](https://github.com/godotengine/godot/assets/51931284/ea9a2ea5-dc28-4c85-9ee2-d6a629f143f4)

![image](https://github.com/godotengine/godot/assets/51931284/d9b70582-610a-4449-bb04-b1f3cfedbc9a)