sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Hide nonlocal doc(hidden) types and impls from "the following other types implement trait"
Labels: A-diagnostics,T-compiler

### Code

```rust
// types/src/lib.rs

pub trait Trait {}

pub struct Public;

impl Trait for Public {}

#[doc(hidden)]
pub struct HiddenStruct;

impl Trait for HiddenStruct {}

pub struct HiddenImpl;

#[doc(hidden)]
impl Trait for HiddenImpl {}

#[doc(hidden)]
pub mod private {
    pub struct HiddenModule;

    impl crate::Trait for HiddenModule {}
}
```

```rust
// src/main.rs

fn require_trait<T: types::Trait>() {}

fn main() {
    require_trait::<u8>();
}
```

### Current output

```console
error[E0277]: the trait bound `u8: Trait` is not satisfied
 --> src/main.rs:4:21
  |
4 |     require_trait::<u8>();
  |                     ^^ the trait `Trait` is not implemented for `u8`
  |
  = help: the following other types implement trait `Trait`:
            HiddenImpl
            HiddenModule
            HiddenStruct
            Public
note: required by a bound in `require_trait`
 --> src/main.rs:1:21
  |
1 | fn require_trait<T: types::Trait>() {}
  |                     ^^^^^^^^^^^^ required by this bound in `require_trait`
```

### Desired output

```diff
-   = help: the following other types implement trait `Trait`:
-             HiddenImpl
-             HiddenModule
-             HiddenStruct
-             Public
+   = help: the trait `Trait` is implemented for `Public`
```

### Rationale and extra context

`HiddenStruct` should not be volunteered to the user in an error message because that type is `doc(hidden)`.

`HiddenImpl` should not be volunteered as implementing `Trait` because its `impl Trait for HiddenImpl` is `doc(hidden)`.

`HiddenModule` is also not public, although indirectly.

Context: this came up in https://github.com/serde-rs/serde/pull/2558#issuecomment-2428102654.

### Rust Version

```console
rustc 1.84.0-nightly (439284741 2024-10-21)
binary: rustc
commit-hash: 4392847410ddd67f6734dd9845f9742ff9e85c83
commit-date: 2024-10-21
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.1
```

### Anything else?

There is longstanding precedent for `#[doc(hidden)]` affecting what suggestions rustc tries to make.

For example when suggesting imports. See https://github.com/rust-lang/rust/pull/119151 and https://github.com/rust-lang/rust/blob/814df6e50eaf89b90793e7d9618bb60f1f18377a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs.

Also when suggesting struct fields. See https://github.com/rust-lang/rust/pull/93214 and https://github.com/rust-lang/rust/blob/814df6e50eaf89b90793e7d9618bb60f1f18377a/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs.
Repository: react-native
Issue: Swipe / scroll actions on Flatlist gets registered as click event
Labels: Issue: Author Provided Repro,Component: FlatList,Needs: Repro,Needs: Attention

### Description

I have a my page like this :

<FlatlistComponent>
  <Pressable>
     {children}
  </Pressable>
</FlatlistComponent>

Sometimes while user scrolls /swipes to. go back. the click event gets triggered( navigating to a screen)

I read few issues , the only solution i got so far is to track the scroll with handlePressIn & handlePressOut , then calculate the pageX,pageY difference do decide whether its a drag or click action.

Adding this affects my  scroll performance , (large list of products).

Any solution to this, without compromising the app performance?

### Steps to reproduce

n/a

### React Native Version

0.75.4

### Affected Platforms

Runtime - iOS

### Output of `npx react-native info`

```text
System:
  OS: macOS 15.0.1
  CPU: (8) arm64 Apple M3
  Memory: 107.28 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.20.2
    path: ~/.nvm/versions/node/v18.20.2/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v18.20.2/bin/yarn
  npm:
    version: 10.5.0
    path: ~/.nvm/versions/node/v18.20.2/bin/npm
  Watchman:
    version: 2024.05.06.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.15989.150.2411.11948838
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.4
    wanted: 0.75.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
```


### Stacktrace or Logs

```text
N/A
```


### Reproducer

[snack.expo.dev/@srimarajexpo/delicious-violet-ramen](https://snack.expo.dev/@srimarajexpo/delicious-violet-ramen)

### Screenshots and Videos

_No response_
Repository: next.js
Issue: Instrumentation in NextJS using custom library + altering RSC payload at Proxy layer
Labels: Output (export/standalone),Instrumentation

### Link to the code that reproduces this issue

https://github.com/soniankur948/RN-flicker (please note that it's very early version of code and library/complete app is on internal company codebase)

### To Reproduce

1. I've custom library to capture error, latency and count for an API/activity and trying to collect server side instrumentation for app route (next 14) but with the fact that page and layout renders in parallel it does not work. 
2. Similarly in our company we keep red data in encrypted form and only deccrypt that at closed layer to browser (which comes one layer up than Next Layer like Proxy Layer->Next). But it ends up altering the data in RSC payload which creates hydration issues in browser

### Current vs. Expected behavior

For
1. I see two feasible options - i. use custom server ii. calculate metrics for page and layout separately. Is there any other alternative or way to put interceptor to trace the request ?
2. Is there any way to mark the data for which hydration does not fail for RSC data alternation?

### Provide environment information

```bash
next info does not work due to internal npm dependencies. The setup is on node 20.x and uses next 14.
```


### Which area(s) are affected? (Select all that apply)

Instrumentation

### Which stage(s) are affected? (Select all that apply)

Other (Deployed)

### Additional context

The application is deployed on ECS Fargate server. The next standalone gets copied on server and assets are served through CDN. We uses middleware for authentication hence all requests pass through that for app routes and route handlers. Instrumentation using the library works perfectly for route handler instrumentation and client side instrumentation.
Repository: pytorch
Issue: The default setting of PyTorch should show warning always.
Labels: module: nn,triaged,module: nestedtensor

### 🐛 Describe the bug

PyTorch shows warning once by default as shown below. *I reported it to [JupyterLab](https://github.com/jupyterlab/jupyterlab/issues/16825) but it seems like it's a PyTorch problem because it happens on not just JupterLab but also Colab:

```python
import torch
from torch import nn

tensor1 = torch.tensor([[8., -3., 0., 1.]])
tensor2 = torch.tensor([[5., 9., -4., 8.],
                        [-2., 7., 3., 6.]])
torch.manual_seed(42)

tran = nn.Transformer(d_model=4, nhead=2) # Warning
```

> UserWarning: enable_nested_tensor is True, but self.use_nested_tensor is False because encoder_layer.self_attn.batch_first was not True(use batch_first for better inference performance)
  warnings.warn(f"enable_nested_tensor is True, but self.use_nested_tensor is False because {why_not_sparsity_fast_path}")

But the default setting of showing warning once is problematic because some people including me will think warning is solved.

So, I suggest that the default setting should show warning always.


### Versions

```python
import torch

torch.__version__ # 2.4.1+cu121
```

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @cpuhrsch @bhosmer @drisspg @soulitzer @davidberard98 @YuqingJ @erichan1
Repository: next.js
Issue: Can't override headers via middleware
Labels: bug,Middleware

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/great-elbakyan-jty6yh

### To Reproduce

Start the application and inspect the headers. You'll see that new headers can be added, but existing headers can't be modified.

### Current vs. Expected behavior

We should be able to replace or remove headers when rewriting.

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:54 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T8122
  Available memory (MB): 24576
  Available CPU cores: 8
Binaries:
  Node: 20.14.0
  npm: 10.7.0
  Yarn: N/A
  pnpm: 9.12.2
Relevant Packages:
  next: 15.0.0 // Latest available version is detected (15.0.0).
  eslint-config-next: N/A
  react: 19.0.0-rc-65a56d0e-20241020
  react-dom: 19.0.0-rc-65a56d0e-20241020
  typescript: 5.6.3
Next.js Config:
  output: N/A
```


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

Middleware

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

next dev (local)

### Additional context

We have a small Next.js app that is designed to proxy between two other apps sharing a single domain.

These apps have headers that we want to modify/remove when their pages are served via the proxy.

We can add headers, but we are not able to modify or remove headers.
Repository: tauri
Issue: [docs] how to open tauri in Xcode and attach process
Labels: type: documentation

I'm experiencing a crash which produces no output before the app crashes. I have the apple crash file (.ips) however without a UI it's impossible to understand where it is crashing.

Is there anyway to generate the macOS .xcodeproj so that Tauri can be launched from Xcode and it catches the crash?
Repository: pytorch
Issue: DISABLED test_record_stream_cuda_float32 (__main__.TestNestedTensorSubclassCUDA)
Labels: triaged,module: flaky-tests,module: nestedtensor,skipped

Platforms: linux

This test was disabled because it is failing in CI. See [recent examples](https://hud.pytorch.org/flakytest?name=test_record_stream_cuda_float32&suite=TestNestedTensorSubclassCUDA&limit=100) and the most recent trunk [workflow logs](https://github.com/pytorch/pytorch/runs/31860766496).

Over the past 3 hours, it has been determined flaky in 5 workflow(s) with 6 failures and 5 successes.

**Debugging instructions (after clicking on the recent samples link):**
DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs.
To find relevant log snippets:
1. Click on the workflow logs linked above
2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
3. Grep for `test_record_stream_cuda_float32`
4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.



<details><summary>Sample error message</summary>

```
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/test/test_nestedtensor.py", line 4271, in test_record_stream
    self.assertEqual(len(data_ptrs.intersection(nt_data_ptrs)), 0)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 3901, in assertEqual
    raise error_metas.pop()[0].to_error(
AssertionError: Scalars are not equal!

Expected 0 but got 1.
Absolute difference: 1
Relative difference: inf

To execute this test, run the following from the base repo dir:
    python test/test_nestedtensor.py TestNestedTensorSubclassCUDA.test_record_stream_cuda_float32

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
```

</details>


Test file path: `test_nestedtensor.py`

ConnectionTimeoutError: Connect timeout for 5000ms, GET https://raw.githubusercontent.com/pytorch/pytorch/main/test/test_nestedtensor.py -2 (connected: false, keepalive socket: false, socketHandledRequests: 1, socketHandledResponses: 0)
headers: {}

cc @clee2000 @cpuhrsch @jbschlosser @bhosmer @drisspg @soulitzer @davidberard98 @YuqingJ
Repository: angular
Issue: Client-side hydration renders content before the app is stable
Labels: area: core,area: server,core: hydration

### Which @angular/* package(s) are the source of the bug?

core

### Is this a regression?

No

### Description

When client hydration is enabled, I expected the app to use the SSR view until it's stable, then switch over to the client-rendered view. If there are pending network requests or anything else blocking stabilisation on the client side, it shouldn't show any loading states or similar. Instead, any loading states render on top of the SSR view, which causes flickers on the page.

This is consistently replicable when making any network requests `withNoHttpTransferCache()`, or when making uncacheable requests (eg. POST requests before they were supported).

Is this the expected behaviour? It is possible to work around via making sure everything does get cached properly, but it seemed a bit strange. I was used to the way (pre-hydration) Preboot only replaced the page after everything loaded and this has resulted in a behaviour change under some circumstances.

### Please provide a link to a minimal reproduction of the bug

https://github.com/henry-alakazhang/hydration-stable-flicker

### Please provide the exception or error you saw

Expected: page renders smoothly, ie. content is hidden until stable or it's rendered separately to the SSR content.
Actual: page flickers while frontend is updating state.

Note that, depending on how certain things are implemented, this can happen even when the `HttpTransferCache` is enabled. If the template depends on an asynchronous function that doesn't emit on first tick, the flicker can occur (just shorter) even if the request is cached (or the state is transferred via `TransferState`)

### Please provide the environment you discovered this bug in (run `ng version`)
```
Angular CLI: 18.2.9
Node: 18.20.3
Package Manager: yarn 1.22.22
OS: darwin arm64

Angular: 18.2.8
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1802.9
@angular-devkit/build-angular   18.2.9
@angular-devkit/core            18.2.9
@angular-devkit/schematics      18.2.9
@angular/cli                    18.2.9
@angular/ssr                    18.2.9
@schematics/angular             18.2.9
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.14.10
```

### Anything else?

_No response_
Repository: next.js
Issue: Unable to process favicon
Labels: bug,Turbopack,linear: turbopack

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/romantic-ace-vn6rqz

### To Reproduce

1. Place in the app folder the specific favicon.ico I have provided in the codesandbox
2. Run dev with turbo enabled
3. Receive the following error:
```
 ⨯ ./app/favicon.ico
Processing image failed
unable to decode image data

Caused by:
- failed to fill whole buffer
```

### Current vs. Expected behavior

Would expect the following the favicon to render:
![image](https://github.com/user-attachments/assets/b42c083a-519e-475c-ac67-4ec55faef867)

but instead get:
![image](https://github.com/user-attachments/assets/aed283e9-2640-466e-a701-91f9a0aaddf2)


### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 15.0.0 // Latest available version is detected (15.0.0).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: N/A
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Turbopack

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

This error started occuring on `next@15.0.0-rc.1` and persists on `next@15.0.0`. It was not occuring on `next@15.0.0-rc.0`.
Repository: ant-design
Issue: 服务端渲染-整体导出样式不生效 + 使用插件会造成浏览器崩溃
Labels: Inactive

### Reproduction link

[https://github.com/BruceCham/antd-ssr](https://github.com/BruceCham/antd-ssr)

### Steps to reproduce

npm install && npm run dev

### What is expected?

自定义样式生效

### What is actually happening?

1、自定义样式不生效
2、chrome安装有第三方插件时候，会报ssr异常，比如【Mokku 2.0.11、 Highlight This】
Cannot read properties of null (reading 'children')

| Environment | Info |
| --- | --- |
| antd | 5.21.5 |
| React | 18.2.0 |
| System | mac pro |
| Browser | chrome lts |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: rust
Issue: Silent failure of std::sync::Once when in const variable
Labels: A-lints,T-compiler,C-bug

I tried this code [playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=e872d18e2c2ee6a806f7872052fbd744):

```rust
use std::sync::Once;

const INIT: Once = Once::new();

fn main() {
    INIT.call_once(|| {
        println!("Global Once::call_once first call");
    });
    INIT.call_once(|| {
        println!("Global Once::call_once second call");
    });
}
```

The problem is that my Once is in a `const` and not a `static`. However, I would expect a compile error or a runtime error instead of broken behavior here. The same behavior is exhibited in `std::sync::LazyLock` and probably `std::sync::OnceLock`, due to using a Once internally.

Thanks for considering this!

### Meta
Checked on 1.82.0 and on nightly.
Repository: pytorch
Issue: [CI] Continuous spam of PyTorch CI build status notifications in fork
Labels: module: ci,triaged,actionable

Ever since forking the PyTorch repo, in just a month I have received over 200+ notifications from the CI build status. Such notifications should only be triggered for the specific changes the author made (say when opening a PR) just like other repos.

GitHub's global CI notifications option turns off all, so that isn't quite the solution.

cc @seemethere @malfet @pytorch/pytorch-dev-infra
Repository: langchain
Issue: DOC: outdated documentation for Playwright tool, introducing the Agents
Labels: 🤖:docs,stale

### URL

https://python.langchain.com/docs/integrations/tools/playwright/

### Checklist

- [X] I added a very descriptive title to this issue.
- [X] I included a link to the documentation page I am referring to (if applicable).

### Issue with current documentation:

The current documentation for using agents with LangChain offers an incorrect or incomplete flow. Specifically, the following examples fail:

` from langchain.agents import AgentType, initialize_agent
from langchain_anthropic import ChatAnthropic

llm = ChatAnthropic(
    model_name="claude-3-haiku-20240307", temperature=0
)  # or any other LLM, e.g., ChatOpenAI(), OpenAI()

agent_chain = initialize_agent(
    tools,
    llm,
    agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
    verbose=True,
) `

**While the documentation suggests ChatOpenAI() and OpenAI() are supported, the functionality fails when using these LLMs, even with the updated agent initialisation:**

`
agent_chain = create_structured_chat_agent(
    llm=llm,
    tools=tools,
    prompt=chat_prompt
)
`

**Error encounter:**
`Traceback (most recent call last):
  File "/path/to/file.py", line 58, in <module>
    agent_chain = create_structured_chat_agent(
  File "/path/to/langchain/structured_chat/base.py", line 283, in create_structured_chat_agent
    tools=tools_renderer(list(tools)),
  File "/path/to/langchain_core/tools/render.py", line 58, in render_text_description_and_args
    args_schema = str(tool.args)
  File "/path/to/pydantic/main.py", line 853, in __getattr__
    return super().__getattribute__(item)  # Raises AttributeError if appropriate
  File "/path/to/langchain_core/tools/base.py", line 446, in args
    return self.get_input_schema().model_json_schema()["properties"]
  File "/path/to/pydantic/json_schema.py", line 2277, in model_json_schema
    raise AttributeError('model_json_schema() must be called on a subclass of BaseModel, not BaseModel itself.')
AttributeError: model_json_schema() must be called on a subclass of BaseModel, not BaseModel itself.
`
Observations:
The issue seems to stem from tool.args and how it handles the schema with Pydantic. The error is raised when model_json_schema() is called on an object that isn't a subclass of BaseModel.
This problem occurs regardless of using initialize_agent or create_structured_chat_agent. The provided tools are not handled correctly in either approach.
Expected Behavior:
The agent should be able to use tools, and their arguments should be processed correctly without raising schema-related errors.






### Idea or request for content:

the documentation needs the update
Repository: godot
Issue: Parser bug when a script declaring a class has a reference to a scene with that class
Labels: bug,topic:gdscript

### Tested versions

Reproducible in 4.3 stable, 4.4 dev3

### System information

Godot v4.4.dev3 - Windows 10.0.19045 - Multi-window, 1 monitor - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 4070 Laptop GPU (NVIDIA; 32.0.15.5612) - 13th Gen Intel(R) Core(TM) i7-13620H (16 threads)

### Issue description

In a script which declares a class, having a reference to the scene of the class it declares causes a parser error in 4.4 dev3 and a run-time error (could not resolve class) in 4.3 stable.

### Steps to reproduce

For minimal reproduction project:
1: open project
2: click run project
3: you get either a parser error on 4.4 dev3 or a could not resolve class on 4.3 stable

### Minimal reproduction project (MRP)

[min reproducible bug - Copy.zip](https://github.com/user-attachments/files/17473006/min.reproducible.bug.-.Copy.zip)