sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Allow Full State Dict with 2D FSDP + TP
Labels: oncall: distributed,triaged

### 🐛 Describe the bug

Torch does not allow 2D FSDP + TP to get FULL_STATE_DICT. However, if I remove checks here:
https://github.com/pytorch/pytorch/blob/3f62b05d31d4b29d60874b05adc0e5aedbad3722/torch/distributed/fsdp/_state_dict_utils.py#L303-L310
and warnings here:
https://github.com/pytorch/pytorch/blob/3f62b05d31d4b29d60874b05adc0e5aedbad3722/torch/distributed/fsdp/_state_dict_utils.py#L811-L815
it seems to work fine.

Is there a reason we need these checks? Can we remove them given things seem to work fine?

### Versions

Nightly.

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225
Repository: TypeScript
Issue: Error not issued when global type is an alias of an object type literal
Labels: Bug,Has Repro

### 🔎 Search Terms

array, constructor, bracket

### 🕗 Version & Regression Information

- This is a crash

### ⏯ Playground Link

https://www.typescriptlang.org/dev/bug-workbench/?noLib=true&target=99&ts=5.5.0-dev.20240227#code/PTAEAEDsHsBkEsBGAuUAXATgVwKYCgQI0BDDAcxzVRwGdIcAPNPPAExwGMAbUnUMrtETEuoAN55QoDtEg00oAIIYMxAJ6oJUqQB4AKqAC8oLJADWMAO6QAfAAoAdE9JkayYpDUBtALoBKVGVVNX0bSW16S1B9IxNzK0gAGnsnBxc3D29-QJV1UPCAXxYpNDUABz4gvL0bWK1tL3hUSCwAW0QcDB9UPXCpLhxIMjQAC2a2joxCvCKCMBFRaAAzdBG+DsEosngANz4AIgAFDGgKjFLQAHIBodHL0HgaUFbHmnghh8h0cr5LsQLLql9sg8ABuUB2LwARkSoAATLCAMz+UA0YhoR5LeC0JS5EItdqdGygsEQ6GwhGgZF+VHozHYp5iUA3YZjUAEyagAok9jcXjSWTyUCkKHNHB7DC+Uki2kYmhYnFMlmjcaEjBcnmcHgYPgyOQKUhw1WTKXgw2y+mK5mDVnGzpclhzVaPVEjaBYLisVYnKIeUCdE7qxBYBTwBSsaC0SCXZiEcBoGgAWkYFQ4aGTKmgU3BkJ8wqeHM6vhpaLlCqe8gw7zIUrwKazCiZBSAA

### 💻 Code

```ts repro
// @noLib: true
// @target: esnext

declare global {
  const Array: {
    <T = unknown>(...args:any[]): Array<T>
    new <T = unknown,>(...args:any[]): Array<T>
  }

  type Array<T> = {
    [i: number]: T
    length: number
  }
}

// all of the below give "Property 'length' is missing in type '{}'...":
; ([1, 2, 3]) satisfies Array<number>;
; ([1, 2, 3]) satisfies { length: number };
declare const ar1: never[]
; ar1 satisfies { length: number };
declare const ar2: number[]
; ar2 satisfies { length: number }


// this should throw an error but it doesn't
// @ts-expect-error
; ([] as number[]) satisfies string[]

export { }
```


### 🙁 Actual behavior

Types created with the `T[]` and objects created with the `[x as T]` syntax are not typed as `Array<T>` but instead as `{}`.

### 🙂 Expected behavior

I expect either:
- `T[]` syntax and `Array<T>` to be completely synonymous
- A compiler error that the `Array` type is not an instantiable type

### Additional information about the issue

Related to #57009.
Repository: vscode
Issue: Code action adds multiple headers
Labels: editor-code-actions,under-discussion

1. Have some code that needs multiple fixes, including adding the eslint header.
2. Load the quick fixes, then choose to resolve auto-fixable problems.
3. The header copies a bunch of times and nothing else gets auto-added.

https://github.com/microsoft/vscode/assets/31675041/23fb0c57-8771-4951-aa52-d2b8d22105d5
Repository: neovim
Issue: Lsp shutdown behavior - `on_exit` not triggered on :quit
Labels: enhancement,lsp

### Problem

heyja :> 
i wrote on discourse asking about the lsp shutdown behavior. its basically the question that is the title of this issue. the link to the discourse thread is [here](https://neovim.discourse.group/t/lsp-shutdown-behavior-on-exit-not-triggered-on-q-is-this-intentional/4712)
someone did point me to the autcommand help, and that generally gives of a ~vibe~ to me like "handle your own shutdown lol" but my reasonig or intuition would have been that the  lsp integration is a core feature of neovim, thus it would also integrate the part of exiting the lsps gracefully - thus calling the `on_exit` of every lsp it closes during shutdown. allthough i do get that this is users attaching any - be it default or custom - behavior to their lsp configs and thus that one could also expect the one writing the config to just attentively read the manual and then handle that the exits happen how they need them to or smth. allhthough i do still think just calling the `on_exit` on quitting is much more intuitive.  

this is somewhere between a design decision question, lsp bug and feature request so i didn't quite knew where to file :<


### Expected behavior

i expected the behavior that `on_exit` gets triggered by quitting the editor
Repository: opencv
Issue: Python API: Support MemoryView objects
Labels: feature,category: python bindings

### Describe the feature and motivation

Currently Python OpenCV uses np.ndarray objects as inputs when cv::Mats are expected, in order to use memoryview directly on Python one needs to cast it to a np.ndarray then use it. Allowing usage of memoryview objects will allow seamless integration with Cython.

### Additional context

_No response_
Repository: rust
Issue: Match on enum with a `non_snake_case` variable that has the same name as one of the enum variants is potentially confusing
Labels: A-lints,A-diagnostics,T-lang,L-non_snake_case

### Code

```Rust
enum Test {
    V1,
    V2,
    V3
}

fn process(t : &Test) -> u8 {
    match t {
        Test::V1 => 1,
        // here is the issue! Simple typo of missing '::' in Test::V2
        // results in errors of missing arms being removed and just few harmless
        // warnings emitted.
        TestV2 => 2,
    }
}

fn main() {
    let test_val = Test::V3;
    // to minimize amount of warnings, let's construct others too
    let _v1 = Test::V1;
    let _v2 = Test::V2;
    // let's process value which is "by mistake" not handled.
    let x = process(&test_val);
    println!("got: {}", x);
}
```


### Current output

```Shell
$ cargo build
   Compiling match1 v0.1.0 (/mnt/c/users/gardas/src/rust/bugs/match1)
warning: unused variable: `TestV2`
  --> src/main.rs:14:9
   |
14 |         TestV2 => 2,
   |         ^^^^^^ help: if this is intentional, prefix it with an underscore: `_TestV2`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: variable `TestV2` should have a snake case name
  --> src/main.rs:14:9
   |
14 |         TestV2 => 2,
   |         ^^^^^^ help: convert the identifier to snake case: `test_v2`
   |
   = note: `#[warn(non_snake_case)]` on by default

warning: `match1` (bin "match1") generated 2 warnings (run `cargo fix --bin "match1"` to apply 1 suggestion)
    Finished dev [unoptimized + debuginfo] target(s) in 2.25s
```


### Desired output

```Shell
$ cargo build
   Compiling match1 v0.1.0 (/mnt/c/users/gardas/src/rust/bugs/match1)
error[E0004]: non-exhaustive patterns: `&Test::V2` and `&Test::V3` not covered
 --> src/main.rs:9:11
  |
9 |     match t {
  |           ^ patterns `&Test::V2` and `&Test::V3` not covered
  |
note: `Test` defined here
 --> src/main.rs:2:6
  |
2 | enum Test {
  |      ^^^^
3 |     V1,
4 |     V2,
  |     -- not covered
5 |     V3
  |     -- not covered
  = note: the matched value is of type `&Test`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
  |
10~         Test::V1 => 1,
11~         &Test::V2 | &Test::V3 => todo!(),
  |

For more information about this error, try `rustc --explain E0004`.
error: could not compile `match1` (bin "match1") due to 1 previous error
```


### Rationale and extra context

_No response_

### Other cases

_No response_

### Rust Version

```Shell
rustc 1.76.0 (07dca489a 2024-02-04)
binary: rustc
commit-hash: 07dca489ac2d933c78d3c5158e3f43beefeb02ce
commit-date: 2024-02-04
host: x86_64-unknown-linux-gnu
release: 1.76.0
LLVM version: 17.0.6
```


### Anything else?

_No response_
Repository: ant-design
Issue: table filterSearch demo includes filterMode="tree" example which doesn't work
Labels: Inactive,improvement

### Reproduction link

[https://ant.design/components/table#components-table-demo-filter-search](https://ant.design/components/table#components-table-demo-filter-search)

### Steps to reproduce

Select filter on 'Name' column, attempt to search with 'Joe', 'Category 1' or 'Category 2'.

### What is expected?

The filter items are filtered by the search value.

### What is actually happening?

Nothing is filtering/changing.

| Environment | Info |
| --- | --- |
| antd | 5.14.2 |
| React | 18 |
| System | Windows 11 |
| Browser | Chrome |

---
filterSearch=true does not seem to work with filterMode='tree'.
The demo should have filterMode='tree' removed until support for filterMode='tree'  + filterSearch=true is added.

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: flutter
Issue: [flutter_tools] No such file or directory pipe_to_stdout in temp dir
Labels: P2,team-tool,triaged-tool

on beta/3.20.0-1.2.pre

```
PathNotFoundException: Cannot open file, path = '/var/folders/b0/nlrxnr5s1jb5w6c4v857c0r80000gn/T/flutter_tools.I6eYv8/flutter_ios_build_temp_dirq8Rt81/pipe_to_stdout' (OS Error: No such file or directory, errno = 2)
at _checkForErrorResponse(common.dart:55)
at _File.open.<anonymous closure>(file_impl.dart:381)
at _rootRunUnary(zone.dart:1407)
at _CustomZone.runUnary(zone.dart:1308)
at <asynchronous gap>(async)
at _File.readAsBytes.<anonymous closure>(file_impl.dart:562)
at <asynchronous gap>(async)
at _File.readAsString(file_impl.dart:621)
at <asynchronous gap>(async)
at LineSplitter.convert(line_splitter.dart:52)
at <asynchronous gap>(async)
at buildXcodeProject.listenToScriptOutputLine(mac.dart:358)
at <asynchronous gap>(async)
at buildXcodeProject.listenToScriptOutputLine(mac.dart:375)
at <asynchronous gap>(async)
```

This is an OS pipe we create in a temp directory: https://github.com/flutter/flutter/blob/3.20.0-1.2.pre/packages/flutter_tools/lib/src/ios/mac.dart#L355
Repository: pytorch
Issue: `torch.optim.lr_scheduler.{LRScheduler,*}`: lack of documentation
Labels: module: docs,triaged,actionable,module: LrScheduler

### 📚 The doc issue

The `torch.optim.lr_scheduler.LRScheduler` class [doesn't have](https://github.com/pytorch/pytorch/blob/v2.2.1/torch/optim/lr_scheduler.py#L33) docstring.

Some of its methods don't.

Because of this we don't know:

1. What the constructor's `last_epoch` argument is.
    And does epoch start from `0` or `1`?
    Also there are two terms - "epoch", "step" - are they the same?
2. That the constructor [relies on/creates the `'initial_lr'`](https://github.com/pytorch/pytorch/blob/v2.2.1/torch/optim/lr_scheduler.py#L51) property on the `.optimizer`. 
    (By the way, is the `Optimizer` class up with it?)
3. That `.get_last_lr()` and `.get_lr()` are totally different methods despite of naming.
    Wait, there are also `._get_closed_form_lr()` methods, hm...
4. That the constructor [does `.step()`](https://github.com/pytorch/pytorch/blob/v2.2.1/torch/optim/lr_scheduler.py#L85-L91) itself via `._initial_step()` method.
5. Which arguments the `.step()` method has.
    Or is it (the `epoch` argument) [deprecated](https://github.com/pytorch/pytorch/blob/v2.2.1/torch/optim/lr_scheduler.py#L156)?
6. What does `.step()` do?
    Does it modify (in some way) the `.optimizer`? (See also p.2.)
7. Are the `.last_epoch`, `.base_lrs` attributes public?
    (Don't know, maybe it is not accepted to publish such information.)
    (For `.last_epoch`, see also p.1a.)

In contrast, `torch.optim.Optimizer` has.

### Suggest a potential alternative/fix

Document the `torch.optim.lr_scheduler.LRScheduler` class.

cc @svekars @brycebortree @sekyondaMeta
Repository: go
Issue: x/telemetry/godev/internal/content: TestServer_ServeHTTP//noindex/ failures
Labels: NeedsInvestigation,telemetry

```
#!watchflakes
default <- pkg == "golang.org/x/telemetry/godev/internal/content" && test == "TestServer_ServeHTTP//noindex/"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8755092697476873841)):

    === RUN   TestServer_ServeHTTP//noindex/
        content_test.go:120: GET /noindex/ response body mismatch (-want, +got):
              (
              	"""
            + 	<!doctype html>
            + 	<meta name="viewport" content="width=device-width">
              	<pre>
              	<a href="noindex.html.out">noindex.html.out</a>
              	... // 2 identical lines
              	"""
              )
    --- FAIL: TestServer_ServeHTTP//noindex/ (0.00s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: go
Issue: x/build/cmd/buildlet: TestReverseDial failures
Labels: Builders,NeedsInvestigation

```
#!watchflakes
default <- pkg == "golang.org/x/build/cmd/buildlet" && test == "TestReverseDial"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8755005483764156769)):

    === RUN   TestReverseDial
    2024/02/26 18:48:49 Dialing coordinator [::]:32817 ...
    2024/02/26 18:48:49 Dialed coordinator [::]:32817.
    2024/02/26 18:48:49 Doing TLS handshake with coordinator (verifying hostname "[::]:32817")...
    2024/02/26 18:48:49 Registering reverse mode with coordinator...
    2024/02/26 18:48:49 Registering reverse buildlet "%H" ([::1]:42340) for host type test-reverse-dial; buildletVersion=28
    2024/02/26 18:48:49 Reverse connection %H/[::1]:42340 for test-reverse-dial did not answer status after 4.307µs: parse "http://%H/status": invalid URL escape "%H"
    2024/02/26 18:48:49 Connected to coordinator; reverse dialing active
        reverse_test.go:127: Buildlet failed to register within 1s.
        reverse_test.go:91: Server shutdown got err revdial: Listener closed want ErrServerClosed
    --- FAIL: TestReverseDial (1.01s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: go
Issue: x/build/cmd/buildlet: TestReverseDialRedirect failures
Labels: Builders,NeedsInvestigation

```
#!watchflakes
default <- pkg == "golang.org/x/build/cmd/buildlet" && test == "TestReverseDialRedirect"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8755005483350477201)):

    === RUN   TestReverseDialRedirect
    2024/02/26 18:49:59 Dialing coordinator [::]:40005 ...
    2024/02/26 18:49:59 Dialed coordinator [::]:40005.
    2024/02/26 18:49:59 Doing TLS handshake with coordinator (verifying hostname "[::]:40005")...
    2024/02/26 18:49:59 Registering reverse mode with coordinator...
    2024/02/26 18:49:59 Registering reverse buildlet "%H" (127.0.0.1:60864) for host type test-reverse-dial-redirect; buildletVersion=28
    2024/02/26 18:49:59 Connected to coordinator; reverse dialing active
    2024/02/26 18:49:59 Reverse connection %H/127.0.0.1:60864 for test-reverse-dial-redirect did not answer status after 3.72µs: parse "http://%H/status": invalid URL escape "%H"
        reverse_test.go:157: Buildlet failed to register within 1s.
        reverse_test.go:91: Server shutdown got err revdial: Listener closed want ErrServerClosed
    --- FAIL: TestReverseDialRedirect (1.00s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: go
Issue: net: TestClosingListener failures
Labels: Testing,NeedsFix

```
#!watchflakes
default <- pkg == "net" && test == "TestClosingListener"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8754997965866981617)):

    === RUN   TestClosingListener
        listen_test.go:721: listen tcp 127.0.0.1:64395: bind: address already in use
    --- FAIL: TestClosingListener (0.00s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: go
Issue: build: build failure on x_tools-go1.22-darwin-amd64-longtest
Labels: Builders,NeedsInvestigation

```
#!watchflakes
default <- builder == "x_tools-go1.22-darwin-amd64-longtest" && repo == "tools" && mode == "build"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8754992903337886305)):

    ERROR: rpc error: code = NotFound desc = stream path not found


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: rust
Issue: Fallout from expansion of redundant import checking
Labels: A-lints,A-resolve,T-lang,T-compiler,S-waiting-on-review,L-redundant_imports,I-lang-radar

I've noticed there is a lot of fallout from the changes in #117772 expanding redundant import checking. See discussion and backlinks on that issue as well as #118692 for some evidence.

I have a theory that redundant imports should be split out into their own lint group (this was [discussed](https://github.com/rust-lang/rust/pull/58805#issuecomment-474352971) in the past), and that in the future as a matter of policy, disruptive expansions like this should come with a machine-applicable fix to make rollout smoother.

For now, I'm opening this issue to collect data and feedback that I want to use to inform future policy discussions around lint expansions.
Repository: rust
Issue: Tracking Issue for `junction_point`
Labels: O-windows,T-libs-api,C-tracking-issue

Feature gate: `#![feature(junction_point)]`

This is a tracking issue for https://github.com/rust-lang/libs-team/issues/203

On Windows, it allows creating a juncture point. Which is useful if/when symlinks are not enabled.

### Public API

```rust
// std::os::windows::fs::junction_point
fn junction_point<P: AsRef<Path>, Q: AsRef<Path>>(
    original: P,
    link: Q
) -> Result<()>;
```

### Steps / History

- [ ] Implementation: #121711
- [ ] Final comment period (FCP)[^1]
- [ ] Stabilization PR

### Unresolved Questions

- None yet.

[^1]: https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html
Repository: node
Issue: test_runner: full diff option
Labels: assert,feature request

### What is the problem this feature will solve?

The constructor method for `AssertionError` currently uses hardcoded limits for showing expected vs actual output. For example, this is how the truncating logic is implemented for the case when the values are not equal:
```javascript
if (res.length > 512) {
  res = `${StringPrototypeSlice(res, 0, 509)}...`;
}
if (other.length > 512) {
  other = `${StringPrototypeSlice(other, 0, 509)}...`;
}
```

These limits are not configurable and there are situations where it would be useful to be able to change or entirely remove the limits.

### What is the feature you are proposing to solve the problem?

The [Jest](https://jestjs.io/) testing framework has an [--expand](https://jestjs.io/docs/cli#--expand) option that lets you see a full diff which can be useful at times.

The Node CLI could have a similar flag which would remove the default limits, e.g. `--assert-expand` (which would target the assert library directly).

### What alternatives have you considered?

This could be more related to the test runner, but the way it's currently set up, the truncating logic happens when an assertion error is created.
Repository: rust
Issue: Explain behaviour and performance of BinaryHeap for equal-ordered elements
Labels: C-enhancement,A-collections,T-libs-api,A-docs

### Location

- https://doc.rust-lang.org/stable/std/collections/index.html#use-a-binaryheap-when
- https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html

### Summary

The [`BinaryHeap`](https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html) collection type, unlike `BTreeMap`/`BTreeSet`, allows inserting multiple elements with an equal ordering ([`Ordering::Equal`](https://doc.rust-lang.org/stable/std/cmp/enum.Ordering.html#variant.Equal)). However, the documentation does not explicitly mention this capability anywhere I could find.

It is unclear if there are or aren't any guarantees about how multiple equally-ordered elements are treated by methods such as `peek`, `into_sorted_vec`, etc. They could be prioritized by insertion order, or their relative order could be arbitrary but stable, or it could change between method calls.
Whatever guarantees exist should be documented, or if there aren't any, that should also be explicitly documented.

Additionally, as the entire purpose of a `BinaryHeap` is to store elements in a manner determined by their ordering, and given that it's already documented that it has [pathological behaviour](https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#time-complexity-3) when elements are inserted in ascending order, it is not unreasonable for someone to assume that similarly pathological behaviour may exist when most or all of the elements in the heap have an equal ordering to eachother, considering that such a scenario presumably defeats most of the point of using an ordered collection over an unordered one.
If `BinaryHeap` has any noteworthy performance characteristics or caveats with regards to equal-ordered elements, these should be documented, or if equal-ordered elements are handled gracefully, that too should be documented.
Repository: rust
Issue: Tracking Issue for `char_max_len`
Labels: T-libs-api,C-tracking-issue

<!--
Thank you for creating a tracking issue!

Tracking issues are for tracking a feature from implementation to stabilization.

Make sure to include the relevant RFC for the feature if it has one.

If the new feature is small, it may be fine to skip the RFC process. In that
case, you can use `issue = "none"` in your initial implementation PR. The
reviewer will ask you to open a tracking issue if they agree your feature can be
added without an RFC.
-->

Feature gate: `#![feature(char_max_len)]`

This is a tracking issue for #45795.

<!--
Include a short description of the feature.
-->

### Public API

<!--
For most library features, it'd be useful to include a summarized version of the public API.
(E.g. just the public function signatures without their doc comments or implementation.)
-->

```rust
// core::char

impl char {
    pub const MAX_LEN_UTF8: usize = 4;
    pub const MAX_LEN_UTF16: usize = 2;
}

pub const MAX_LEN_UTF8: usize = char::MAX_LEN_UTF8;
pub const MAX_LEN_UTF16: usize = char::MAX_LEN_UTF16;
```

### Steps / History

<!--
For larger features, more steps might be involved.
If the feature is changed later, please add those PRs here as well.
-->

- [ ] Implementation: #120580 
- [ ] Final comment period (FCP)[^1]
- [ ] Stabilization PR

<!--
Once the feature has gone through a few release cycles and there are no
unresolved questions left, the feature might be ready for stabilization.

If this feature didn't go through the RFC process, a final comment period
(FCP) is always needed before stabilization. This works as follows:

A library API team member can kick off the stabilization process, at which point
the rfcbot will ask all the team members to verify they agree with
stabilization. Once enough members agree and there are no concerns, the final
comment period begins: this issue will be marked as such and will be listed
in the next This Week in Rust newsletter. If no blocking concerns are raised in
that period of 10 days, a stabilization PR can be opened by anyone.
-->

### Notes for Stabilization

When stabilizing this, [the documentation for the `char::encode_utf8` function](https://doc.rust-lang.org/std/primitive.char.html#method.encode_utf8) should be
adjusted to include these constants.

### Unresolved Questions

<!--
Include any open questions that need to be answered before the feature can be
stabilised. If multiple (unrelated) big questions come up, it can be a good idea
to open a separate issue for each, to make it easier to keep track of the
discussions.

It's useful to link any relevant discussions and conclusions (whether on GitHub,
Zulip, or the internals forum) here.
-->

- None yet.

[^1]: https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html