sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Suggest wrapping code into `fn main() {}` when encountering `let` within `main.rs`
Labels: A-diagnostics,T-compiler

### Code

```Rust
let hello = "xyz";
```


### Current output

```Shell
error: expected item, found keyword `let`
 --> src/main.rs:1:1
  |
1 | let hello = "xyz";
  | ^^^ consider using `const` or `static` instead of `let` for global variables

error: could not compile `thing` (bin "thing") due to 1 previous error
```


### Desired output

```Shell
error: expected item, found keyword `let`
 --> src/main.rs:1:1
  |
1 | let hello = "xyz";
  | ^^^^^^^^^^^^^ consider wrapping this code within `fn main() {}`

error: could not compile `thing` (bin "thing") due to 1 previous error
```


### Rationale and extra context

Sometimes users copy code from a crate's readme or doctests and expect it to run as is. In some cases like `reqwest` [^1] or `sqlx` [^2] it does, but in others like ours [^3] it doesn't.

In our case we are thinking of adding `fn main() {}` to the readme, but this doesn't solve the case where e.g. the doctests don't have it, which thanks to how rustdoc works [^4] they don't in most cases.

If the file is `main.rs`, `fn main() {}` hasn't been declared yet and `let` is encountered, the compiler should be able to suggest wrapping the code into `fn main() {}`.

[^1]: https://github.com/seanmonstar/reqwest/tree/v0.12.7?tab=readme-ov-file#example
[^2]: https://github.com/launchbadge/sqlx/tree/v0.8.1?tab=readme-ov-file#quickstart
[^3]: https://github.com/lettre/lettre/issues/983
[^4]: https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html#pre-processing-examples

### Other cases

_No response_

### Rust Version

```Shell
rustc 1.82.0-nightly (1f12b9b0f 2024-08-27)
binary: rustc
commit-hash: 1f12b9b0fdbe735968ac002792a720f0ba4faca6
commit-date: 2024-08-27
host: x86_64-unknown-linux-gnu
release: 1.82.0-nightly
LLVM version: 19.1.0
```


### Anything else?

_No response_

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

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

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: ant-design
Issue: DatePicker.RangePicker 特定场景下选择结束日期后，不触发 onChange 事件
Labels: 💡 Feature Request,Inactive

### Reproduction link

[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/antd-reproduce-5x-a66ggu?file=demo.tsx)

```tsx
import React, { useState } from 'react';
import { DatePicker } from 'antd';
import dayjs from 'dayjs';

const App: React.FC = () => {
  const [date, setDate] = useState([dayjs('2024-08-20'), dayjs('2024-09-30')]);

  return (
    <DatePicker.RangePicker
      disabled={[true, false]}
      allowClear={false}
      placeholder={['开始日期', '结束日期']}
      disabledDate={(current) => {
        return current < dayjs().startOf('day');
      }}
      value={date}
      onChange={setDate}
    />
  );
};

export default App;
```

### Steps to reproduce

选择结束时间即可复现

### What is expected?

选择结束时间后，正常触发 onchange 事件

### What is actually happening?

选择结束时间后，不触发 onchange 事件

| Environment | Info |
| --- | --- |
| antd | 5.20.3 |
| React | 18.3.3 |
| System | mac |
| Browser | chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: go
Issue: x/tools/gopls: feature: repair the syntax
Labels: FeatureRequest,gopls,Tools

When editing, it is common for the code to be ill-formed, because for example you have opened a block with `{` but not yet closed it, or pasted some code into the middle of a function and not yet integrated it. A parser with good error recovery (i.e. better than go/parser, at least [for now](https://github.com/golang/go/issues/58833)) can often produce an AST with minimal lossage, implicitly inserting the missing close braces and suchlike. In principle, the difference between the pretty-printed repaired AST and the actual source could be a offered as a completion candidate or a quick fix, "repair the syntax".

Even with our not-very-fault-tolerant parser, I suspect we could do a good job with modest effort by a pre-scan of the input file from both ends that matches each paren with its partner, exploiting indentation (column numbers). This would quickly localize the region of damage to a particular function, or even a block, statement, or expression within it. We would then parse and pretty-print just the errant subtree, causing missing parens (etc) to be inserted; Bad{Expr,Stmt,Decl}s would be replaced by `/* ... */` comments. The result would be a well-formed tree that would allow the user to save, gofmt, and perhaps build and run tests. It may also re-enable use of cross-references and other features that are crippled in the vicinity of the syntax error. (And given the parser's current lack of fault tolerance, the "vicinity" may be more accurately described as a "blast radius".) 

(The inspiration was a conversation about LLMs with @josharian.)
Repository: stable-diffusion-webui
Issue: [Bug]: issue with tokenizers
Labels: bug-report

### Checklist

- [x] The issue exists after disabling all extensions
- [x] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [x] The issue exists in the current version of the webui
- [x] The issue has not been reported before recently
- [x] The issue has been reported before but has not been fixed yet

### What happened?

can't open because of the tokenizers can't build

### Steps to reproduce the problem

idk
it just pop up

### What should have happened?

it run as usual but now it bonked

### What browsers do you use to access the UI ?

_No response_

### Sysinfo

from my console can't open the webUI

### Console logs

```Shell
Traceback (most recent call last):
  File "/workspace/file/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/workspace/file/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/workspace/file/stable-diffusion-webui/modules/launch_utils.py", line 423, in prepare_environment
    run_pip(f"install -r \"{requirements_file}\"", "requirements")
  File "/workspace/file/stable-diffusion-webui/modules/launch_utils.py", line 144, in run_pip
    return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/file/stable-diffusion-webui/modules/launch_utils.py", line 116, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install requirements.
Command: "/home/gitpod/.pyenv/versions/3.12.4/bin/python" -m pip install -r "requirements_versions.txt" --prefer-binary
Error code: 1
```


### Additional information

_No response_
Repository: flutter
Issue: [native_assets] Stop doing dry run in `flutter run`
Labels: P2,team-tool,triaged-tool

We introduced `dry-run`s to build hooks due to `flutter run` running concurrently with the inner `flutter assemble`.

Now we have made the `native_assets_builder` wait on concurrent invocations, we should be able to do full builds in `flutter run` which will then be picked up by `flutter assemble` also invoking the `native_assets_builder`.

This will simplify the user experience, as there is no longer any reasoning about dry runs or not.

For more info:

* https://github.com/dart-lang/native/issues/1485
Repository: react-native
Issue: [RN][Android] Fix <Image/> Logbox feedback loop
Labels: Platform: Android,Component: Image,Needs: Repro,Needs: Attention,Type: New Architecture

### Description

When src is null, the `<Image/>` component [displays a warning in `LogBox`](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt#L670-L682).

The feedback loop:
* Some component renders an `<Image/>`
* Fabric preallocates the image, setting `null` src.
* `ReactImageView` receives `null` src, emits warning.
* Warning [dispatches native -> js call](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/util/RNLog.kt#L94), rendering `LogBox`, which uses `<Image/>`
* Fabric preallocates the image, setting `null` src.
* Goto 3

This feedback loop was originally deactivated in bridgeless. 

**Why:** In step 4, [this line](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/util/RNLog.kt#L94) would never execute: [context.hasActiveReactInstance()](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/util/RNLog.kt#L93) would always return false. (`ThemedReactContext` was broken but we fixed it).

We should fix this feedback loop, and re-enable this warning in bridgeless. 
Hint at a potential fix:
* Prevent view preallocation from assigning a null src to preallocated views

### Steps to reproduce

N/A

### React Native Version

0.75.2

### Affected Platforms

Runtime - Android

### Areas

Fabric - The New Renderer

### Output of `npx react-native info`

```text
N/A
```


### Stacktrace or Logs

```text
N/A
```


### Reproducer

https://github.com/facebook/react-native/packages/rn-tester

### Screenshots and Videos

_No response_
Repository: godot
Issue: Error [ Condition "p_elem->_root" is true. ] spamming the console
Labels: needs testing,topic:2d

### Tested versions

v4.3.stable.official [77dcf97d8]

### System information

Mac Mini M1 with newest MacOS

### Issue description

I have a very simple script attached to a TileLayer Node. As soon as it gets triggered, it spams the console with
`Condition "p_elem->_root" is true.`
errors. The weird part is that if I add (as built in) or attach (as a gdscript file) the same script to another TileLayer node, it works fine. The project is so simple that I can't see what could be causing it and was unable to isolate it.

### Steps to reproduce

This is the script that's causing the errors:

```
extends TileMapLayer

# metadata container
#@export var data : Node

# metadata array names that hold the relevant data
#@export var slide_tiles : String # LayerTransformPlayer
#@export var slide_phase : String # LayerTransformPlayerTimer

#const Tile_Size = 100

@warning_ignore("unused_parameter")
func _use_tile_data_runtime_update( C : Vector2i ): return true # Coordinates, Vector2i

@warning_ignore("unused_parameter")
func _process ( delta ) : notify_runtime_tile_data_update()


@warning_ignore("unused_parameter")
func _tile_data_runtime_update ( C: Vector2i, TD: TileData):
	pass
```

As it can be seen it does nothing (I commented out and deleted everything). From my testing it looks like just using "_tile_data_runtime_update" makes it go bad.

### Minimal reproduction project (MRP)

Unfortunately I can't retrigger it outside of my own project (which is a super simple test project with barely a few nodes in it). The problem is that the script works fine on other TileLayer nodes. There's nothing special about the Node that can't handle this script. I'm not using any terrains, physics, pathfinding, nothing. It's just a super simple TileLayer.
Repository: PowerToys
Issue: tray icons for all powertoys apps 
Labels: Needs-Triage

### Description of the new feature / enhancement

The color picker and more are very useful, having the in the tray helps but i wish you could put apps icon in the system tray 
![Poer toys](https://github.com/user-attachments/assets/dfed723b-f4f5-47c7-a321-04f9fe8e5f3f)


### Scenario when this would be used?

To access apps fast

### Supporting information

_No response_
Repository: godot
Issue: Inspector folding not working properly.
Labels: bug,topic:editor,confirmed

### Tested versions

v4.4.dev1.official [28a72fa43]

### System information

w10 64

### Issue description

Watch the video, the indicators take on states without me clicking on them, then to correct it I have to make several extra clicks to get the indicator back to its correct state


https://github.com/user-attachments/assets/9e1847a8-a728-48ff-9fe2-317cc3158ce7



### Steps to reproduce

see the video

### Minimal reproduction project (MRP)

...
Repository: vscode
Issue: Zoom : The left commonly used section tree view content gets disappear when viewing the page at 200% browser zoom and a 1280-pixel viewport width. 
Labels: bug,accessibility,settings-editor

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.92.2
- OS Version: 14.6.1 (23G93)

Steps to Reproduce:

1. On VSCode while the left commonly used section tree view content gets disappear when viewing the page at 200% browser zoom and a 1280-pixel viewport width. 

2. Open Settings to view the tree view of User | Workspace. Zoom in the browser and the tree view is disappeared. For users with low vision who need to resize text will be prevented from accessing this tree view content.
<img width="2559" alt="vscode zoom defect" src="https://github.com/user-attachments/assets/cbf89c75-c5f7-4757-a537-1dd28a049a02">
Repository: go
Issue: cmd/compile: deadstores and nilchecks solvable after memory to ssa renames are not handled
Labels: NeedsInvestigation,compiler/runtime

### Go version

go version devel go1.24-7fcd4a7 Mon Aug 19 23:36:23 2024 +0000 linux/amd64

### What did you do?

I was reading https://www.dolthub.com/blog/2024-08-23-the-4-chan-go-programmer and there was a piece of code that caught my attention (keep in mind that it is a contrived example, but could reveal a bigger problem). So I decided to check the generated assembly (https://go.godbolt.org/z/oxqbPnPxn).

```go
package test

func f() {
	i := 1
	setInt1(&i)
}

func setInt1(i *int) {
	setInt2(&i)
}

func setInt2(i **int) {
	setInt3(&i)
}

func setInt3(i ***int) {
	setInt4(&i)
}

func setInt4(i ****int) {
	****i = 100
}
```

### What did you see happen?

In some of the functions there were redundant instructions (marked with `; REDUNDANT`).

`setInt4` is compiled to:
```asm
MOVQ    (AX), AX
MOVQ    (AX), AX
MOVQ    (AX), AX
MOVQ    $100, (AX)
RET
```

`setInt3` is compiled to:
```asm
MOVQ    AX, command-line-arguments.i+8(SP) ; REDUNDANT
MOVQ    (AX), AX
MOVQ    (AX), AX
XCHGL   AX, AX
MOVQ    $100, (AX)
RET
```

`setInt2` is compiled to:
```asm
MOVQ    AX, command-line-arguments.i+8(SP)  ; REDUNDANT
LEAQ    command-line-arguments.i+8(SP), AX  ; REDUNDANT
MOVQ    (AX), AX                            ; REDUNDANT
MOVQ    (AX), AX
XCHGL   AX, AX
XCHGL   AX, AX
MOVQ    $100, (AX)
RET
```

`setInt1` is compiled to:
```asm
(...stack handling...)
MOVQ    AX, command-line-arguments.i+24(SP)  ; REDUNDANT
LEAQ    command-line-arguments.i+24(SP), AX  ; REDUNDANT
MOVQ    AX, command-line-arguments.i(SP)     ; REDUNDANT
LEAQ    command-line-arguments.i(SP), AX     ; REDUNDANT
MOVQ    (AX), AX                             ; REDUNDANT
MOVQ    (AX), AX                             ; REDUNDANT
NOP
XCHGL   AX, AX
XCHGL   AX, AX
MOVQ    $100, (AX)
(...stack handling...)
RET
```

### What did you expect to see?

I expected to see no redundant instructions.
Repository: ollama
Issue: TensorRT Support
Labels: feature request

Does ollama leverage TensorRT and if not, can support for it be added?
Repository: vscode
Issue: Content that appears on hover or focus may be dismissed by the user 
Labels: bug,accessibility,settings-editor,confirmed

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.92.2
- OS Version: 14.6.1 (23G93)

Steps to Reproduce:

1. The setting is not specific to the current profile, and will retain its value when switching profiles" tooltip content that appears on hover, obscures other content, and cannot be dismissed without moving focus or the cursor.

2. Screen magnification users will have difficulty moving the cursor or focus off the trigger while still keeping the content behind the revealed content in view. Keyboard users will be unable to review the content behind the revealed content.

3. The best way to do this is to allow the hover/focus content to be hidden with the Esc key.

<img width="1389" alt="Hover on the content" src="https://github.com/user-attachments/assets/2259eacb-ea72-4b76-8993-9fd0b03cf70e">
Repository: tensorflow
Issue: tf.math.floordiv produces incorrect result when the denominator is `-inf`
Labels: stat:awaiting tensorflower,type:bug,comp:ops,2.17

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

2.17.0

### Custom code

Yes

### OS platform and distribution

_No response_

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

Based on the documentation https://www.tensorflow.org/api_docs/python/tf/math/floordiv, `tf.math.floordiv` should be equivalent to python's `//` operator. However, when the `x=1.4` and `y=-np.inf`, `tf.math.floordiv` outputs `-0.0` while `//` outputs `-1.0`.

I also checked Numpy and PyTorch's APIs, both output `-1.0`. 

It seems that the implementation of `tf.math.floordiv` is different from others, it would be nice if you can fix the implementation inconsistency, or make this inconsistency in the documentation.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
import torch
import numpy as np
a = 1.4
b = -np.inf
print("Numpy's result: ", np.floor_divide(a, b))
print("Python's // result: ", a // b)
print(f"TF's result: {tf.math.floordiv(a, b)}")
print(f"PyTorch's result: {torch.floor_divide(torch.tensor(a, dtype=torch.float32), torch.tensor(b, dtype=torch.float32))}")
```
```


### Relevant log output

```shell
Numpy's result:  -1.0
Python's // result:  -1.0
TF's result: -0.0
PyTorch's result: -1.0
```
Repository: TypeScript
Issue: Design Meeting Notes, 8/30/2024
Labels: Design Notes

# Adding Compile-Caching Entry Points

#59720

* Node.js now supports V8 compilation caching.
    * Recent PR to Node.js to add `module.enableCompilerCache()`.
    * Previously were ways to do this with 3rd party packages on npm.
* Node.js doesn't do this by default, but things like ts-node does on supported versions of Node.js.
* What's the downside?
    * You need to have `require` to make this work, awkward for ESM.
    * This is being worked on.
* tsc and tsserver start up about 2.3x faster.
* For executables this is a no-brainer. We can actually use `import()` there too.
* For libraries, questionable. So the PR doesn't do it.
* The PR must introduce a new entry point for the library. Is this worth the perf improvement?
    * Yes.
    * Just add a comment telling people what's going on and it's fine.
* Another risk - in development we recompile over and over, and that can pollute the cache.
    * The files are pretty small - not a huge risk.
    * We can add `hereby clear-node-cache`.
* Not going to be immediate - Node-specific work would need to be back-ported in in Node.js 22; otherwise only noticeable in Node 23+.
Repository: pytorch
Issue: Fakifying subclass tensors that don't implement have certain metadata
Labels: triaged,module: nestedtensor,tensor subclass,oncall: pt2,module: compiled autograd

### 🐛 Describe the bug

`RuntimeError: Internal error: NestedTensorImpl doesn't support sizes. Please file an issue.`  came up when I'm trying to save tensor metadata when compiling saved tensor hooks: https://github.com/pytorch/pytorch/pull/134754/files#r1737877026. 

To correctly trace the unpack hook and the downstream uses of the unpacked tensor, we need the correct metadata for the returned Proxy. But not all subclasses seem to have these metadata, e.g. NestedTensor.

Is there a proper FakeTensor representation for a NestedTensor? Is an alternative to move compiled autograd tracing to pre-dispatch? cc @cpuhrsch @jbschlosser @bhosmer @drisspg @soulitzer @davidberard98 @YuqingJ @ezyang @albanD @chauhang @penguinwu @bdhirsh 




### Versions

main
Repository: rust
Issue: Point at unit structs in type errors when they are the pattern of a let binding
Labels: A-diagnostics,T-compiler,D-confusing,D-papercut,D-terse

We currently already do this when the unit struct is from the current crate:

```
error[E0308]: mismatched types
 --> fi.rs:8:9
  |
1 | struct percentage;
  | ----------------- unit struct defined here
...
8 |     let percentage = 4i32;
  |         ^^^^^^^^^^   ---- this expression has type `i32`
  |         |
  |         expected `i32`, found `percentage`
  |         `percentage` is interpreted as a unit struct, not a new binding
  |         help: introduce a new binding instead: `other_percentage`
```

but we must do that also when they come from other crates as well.

_https://hachyderm.io/@LGUG2Z/113052067582966834_