sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Make Autocomplete show a custom options view while `optionsBuilder` future is being resolved
Labels: c: new feature,framework,c: proposal,P2,team-text-input,triaged-text-input

### Use case


Currently in `RawAutocomplete`, when the field is changed, `updateOptionsViewVisibility` is only called after the `optionsBuilder` future has resolved:

```
  // Called when _textEditingController changes.
  Future<void> _onChangedField() async {
    final TextEditingValue value = _textEditingController.value;
    final Iterable<T> options = await widget.optionsBuilder(value);
    ...

    // Make sure the options are no longer hidden if the content of the field
    // changes (ignore selection changes).
    if (value.text != _lastFieldText) {
      _lastFieldText = value.text;
      _updateOptionsViewVisibility();
    }
  }

```

This means that users cannot currently display a custom options view while waiting for options from `optionsBuilder`. This might be useful, for example, if the user wants to display a loading message while waiting for options:

![ScreenRecording2024-04-25at9 53 14AM-ezgif com-video-to-gif-converter](https://github.com/flutter/flutter/assets/77553258/e489d156-0be3-46a0-abb6-5d37dd98fab2)


### Proposal

Allow users display a custom options view while waiting for options from `optionsBuilder`.
Repository: deno
Issue: Tracking issue for using WebGPU to render on the window of the desktop environment
Labels: webgpu

So far we have WebGPU and [BYOW](https://github.com/denoland/deno/issues/21713), but it need more work to use the front-end graphics ecology.

Repository for testing and integrating: https://github.com/chirsz-ever/deno-webgpu-window-demos

## Seamlessly use WebGPU-backended frameworks

- [three.js](https://github.com/mrdoob/three.js) would be useful since r164 (https://github.com/mrdoob/three.js/pull/28192) 
- [pixijs](https://github.com/pixijs/pixijs): TODO
- [Babylon.js](https://github.com/BabylonJS/Babylon.js): TODO

### Bugs and requirements

- [x] #22649
  - #23518
  - support formats other than RGBA8, at least RGB
  - support more MIME types, like `"image/jpeg"`
- [x] #23509
- [x] #23433
- [x] #23508
- [ ] #23407
- [ ] #23576
- [ ] #24313
- [x] #24317 

## Creating and managing native windows

We already have [deno_sdl2](https://github.com/littledivy/deno_sdl2) and [dwm](https://github.com/deno-windowing/dwm) for creating windows. But they rely on third-party libraries SDL2 and GLFW.

Maybe we need some methods to create windows without any third-party libraries? I have two ideas:

- ~import [winit](https://github.com/rust-windowing/winit) and design a set of interfaces to use it;~[^1]
- only write JavaScript code, use FFI to create window on respective platform, as a third-party library.

The first idea is easier to implement, but add a built-in component increases deno's compatibility costs and technical debt.

## `Canvas`, `CanvasRenderingContext2D` and `WebGL`

Related issues: #5701 #1629

If deno support `Canvas`, `CanvasRenderingContext2D` and WebGL, it would be more easy to use front-end graphics libraries. 

`Deno.UnsafeWindowSurface` is analog to `Canvas`, and it can use `getContext("webgpu")` to create a `GPUCanvasContext`. It is worthwhile to support other contexts,  `getContext("2d")`, `getContext("webgl")`, `getContext("webgl2")` and `getContext("bitmaprenderer")`.

How to implement CanvasRenderingContext2D (`Canvas.getContext("2d")`)? There are many methods in #5701, which mostly introduces skia or similar graphics libraries like [Vello](https://github.com/linebender/vello).

~For WebGL, we can just use the native OpenGL implementation (gluton)[https://github.com/deno-windowing/gluten], or import [ANGLE](https://github.com/google/angle) to maximize compliance of the WebGL standard.~[^1]

Maybe we can do something named "Canvas2D over WebGPU" and "WebGL over WebGPU", which only use JavaScript to implement `CanvasRenderingContext2D` and WebGL with WebGPU.

If we resolve all above, implementing `OffscreenCanvas` and `ImageBitmapRenderingContext` (`Canvas.getContext("bitmaprenderer")`) seems not hard.

[^1]: Removed by https://github.com/denoland/deno/issues/23563#issuecomment-2077777430
Repository: pytorch
Issue: [distributed] First NCCL barrier does not respect timeout
Labels: high priority,triage review,oncall: distributed,triaged

### 🐛 Describe the bug

It seems that when using the NCCL backend, the first barrier does not respect the timeout that has been set. That is, if you run the below script with `torchrun --nnodes 1 --nproc-per-node 2 --master-addr 127.0.0.1 <script>.py 1 0`, it will _not_ timeout as it should. GLOO backend works as expected.

Reproduction script:
```
import torch.distributed as dist
import os
from datetime import timedelta
import time

_sleep_time = 25
_timeout_delta = 15
_comm_framework = 'nccl'  # 'gloo' or 'nccl'
_start_barrier: bool = False  # False reproes timeout failure, True enables expected timeout

def main(sleep_rank, sleep_barrier):
    print(f"entering main {sleep_rank=}, {sleep_barrier=}")

    dist.init_process_group(_comm_framework, rank=int(os.environ['RANK']), world_size=2, timeout=timedelta(seconds=_timeout_delta))

    _rank = dist.get_rank()
    print(f"Past dist init {_rank=}")
    if _start_barrier:
        dist.barrier()

    if _rank == sleep_rank and sleep_barrier == 0:
        print(f"Sleeping {_rank=}")
        time.sleep(_sleep_time)
    dist.barrier()
    print(f"Past first barrier, {_rank=}")

    if _rank == sleep_rank and sleep_barrier == 1:
        print(f"Sleeping {_rank=}")
        time.sleep(_sleep_time)
    print(f"At second barrier, {_rank=}")
    dist.barrier()
    print(f"Past second barrier. {_rank=}")


if __name__ == '__main__':
    import sys
    sleep_rank = int(sys.argv[1])
    sleep_barrier = int(sys.argv[2])
    main(sleep_rank, sleep_barrier)
```

### Versions

I ran this both on 2.2.1 and a 2.3 nightly from January. I believe @lessw2020 reprod it on latest pytorch as well.

cc @ezyang @gchanan @zou3519 @kadeng @msaroufim @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225 @chauhang @d4l3k @rohan-varma
Repository: kubernetes
Issue: A library function to calculate Pod resource utilization
Labels: sig/scheduling,sig/node,kind/feature,triage/accepted

### What would you like to be added?

We currently have this function https://github.com/kubernetes/kubernetes/blob/ae02f87bb47cd3e10e702ffe19225ff2dba73578/pkg/api/v1/resource/helpers.go#L50

It is used by both kube-scheduler and kubelet to calculate resource utilization.

It would be useful to have it in a library package, such as `k8s.io/component-helpers`.

### Why is this needed?

Multiple downstream projects need to calculate resource utilization, for quota management, billing, etc.

The resource calculation might always change, so these projects always have to catch up. The most recent change that I'm aware of is sidecar containers.
Repository: material-ui
Issue: [system] Unnecessary media query with 0px breakpoints
Labels: package: system

### Steps to reproduce

Link to live example: https://codesandbox.io/p/sandbox/responsive-value-in-sx-prop-wjy9r9

Inspect the texts of the demo to see how each one of them has some style applied under a `@media (min-width: 0px)` media query.

<img width="174" alt="Screenshot 2024-04-25 at 19 20 28" src="https://github.com/mui/material-ui/assets/7225802/530c2273-bcac-489a-b620-5742a2bbab91">



### Current behavior

Responsive values in `0px` breakpoints (although it would be the same for `0rem`, `0em`, etc.) end up inside a media query like `@media (min-width: 0px)`. It happens for object and array syntax alike.

<img width="188" alt="Screenshot 2024-04-25 at 18 45 22" src="https://github.com/mui/material-ui/assets/7225802/46234309-982d-4d48-9d9d-4adcc40be4da">


### Expected behavior

Styles for breakpoints with a value of `0px` (or `0rem`, `0em`, etc.) aren't placed inside a media query.



### Context

The benefits of removing unnecessary media queries are:
- Smaller CSS bundle size (using build-time extraction once Pigment CSS is ready).
- Easier to read styles in browser DevTools.

Note: media queries don't affect specificity, so it's fine to remove them in that regard.

### Your environment

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
  Binaries:
    Node: 20.9.0 - /usr/local/bin/node
    npm: 9.8.1 - /usr/local/bin/npm
    pnpm: 8.10.2 - /usr/local/share/npm-global/bin/pnpm
  Browsers:
    Chrome: Not Found
  npmPackages:
    @emotion/react: ^11.11.4 => 11.11.4 
    @emotion/styled: ^11.11.5 => 11.11.5 
    @mui/system: 5.15.15 => 5.15.15 
    @types/react: latest => 18.2.79 
    react: latest => 18.3.0 
    react-dom: latest => 18.3.0 
    typescript: latest => 5.4.5 
```
</details>


**Search keywords**: system, media query
Repository: kubernetes
Issue: Finish removing `kubectl get all`
Labels: sig/architecture,needs-triage

As has been extensively discussed on prior occasions (see https://github.com/kubernetes/kubectl/issues/151), `kubectl get all` is not recommended, has been removed from documentation, and should be removed.

It appears that the primary reason this has not yet been completed is because the issue was filed against the kubernetes/kubectl issue tracker instead of kubernetes/kubernetes. At the request of the kubectl maintainers in https://github.com/kubernetes/kubectl/issues/1584#issuecomment-2077738119, the issue is being copied over to here.

The requested change is that `kubectl get all` is formally deprecated and eventually removed - or, fixed so that it does what it says it does.
Repository: pytorch
Issue: PRs with unbalanced quotes can not be merged
Labels: triaged,module: infra

### 🐛 Describe the bug

See https://github.com/pytorch/pytorch/pull/124932#issuecomment-2077742781

### Versions

MergeBot?
Repository: go
Issue: proposal: encoding/xml: Collect metadata, like order and line numbers when parsing XML
Labels: Proposal

### Proposal Details

When parsing / Unmarshalling an XML Elements, collect order and line numbers.

Use field tags, like below:

type Vehicle struct {
	Make      string  `xml:"make"`
	Model     string  `xml:"model"`
	Wheelbase float32 `xml:"wheelbase"`
	ProblemsXML
}

 type ProblemsXML struct {
	XMLName  Name
	UnkElems []XMLElement    `xml:",any"`
	UnkAttrs []Attr          `xml:",any,attr"`
	Ooois    OutOfOrderItems `xml:",ooorder"`
	Order    int             `xml:",order"`
	Line     int             `xml:",line"`
}

Example:
line 1	<vehicle>
line 2		<make>Chevrolet</make>
line 3		<wheelbase>107.2</wheelbase>
line 4		<model>Corvette</model>
line 5	</vehicle>
line 6	<vehicle>
line 7		<make>Chevrolet</make>
line 8		<wheelbase>107.2</wheelbase>
line 9		<model>Corvette</model>
line 19	</vehicle>

Vehicle[0].Order == 1
Vehicle[0].Line == 1
Vehicle[1].Order == 2
Vehicle[1].Line == 6

I have the code, not very complicated.
Is the next step to wait for approval before a pull request?
Repository: rust
Issue: `obligations_for_self_ty` leaks placeholders
Labels: P-low,A-closures,A-inference,T-types

```rust
trait Foo<'a> {}
fn needs_foo<T>(_: T)
where
    for<'a> Wrap<T>: Foo<'a>,
{}

struct Wrap<T>(T);
impl<'a, T> Foo<'a> for Wrap<T> where T: Fn(&'a i32) {}

fn main() {
    needs_foo(|x| println!("{x}"));
}

```
During typeck, the signature of `|x| println!("{x}")` gets inferred to `fn(&'!a i32)` where `'!a` is a placeholder which is not nameable by the closure. This is unsound as in "it breaks a core invariant of the type system". As all regions are erased after hir typeck and rechecked during mir borrowck it should not cause any "allows for UB at runtime" unsoundness.

This is still something we should fix, ideally by "pulling down" the inference variables of the closure signature into the root universe when deducing it. The same issue exists for all uses of `obligations_for_self_ty`.

This may cause some ICEs in the future if we improve our validation of type system invariants in the future.

cc @rust-lang/types

*edit: for now this is actually not too different from how higher ranked relate works in general. However, the same issue exists with `feature(non_lifetime_binders)` and we want to more eagerly handle these placeholder constraints in the future to handle where-bounds on binders*
Repository: next.js
Issue: Intercepted page in dynamic route with route groups gets called when linked from another segment
Labels: bug,Parallel & Intercepting Routes

### Link to the code that reproduces this issue

https://github.com/tjabbe/parallel-intercepting-with-dynamic-route

### To Reproduce

1. Go to https://parallel-intercepting-with-dynamic-route.vercel.app/dynamic-route/list and click on the link
It will call the intercepted page, which it shouldn't since we're not in the [slug] segment

2. Go to https://parallel-intercepting-with-dynamic-route.vercel.app/dynamic-route and click on the first link "Single Clip Page"
it will correctly call the non-intercepted page, which is expected behaviour that I would expect while in `/list`


### Current vs. Expected behavior

I would expect that the non-intercepted page would be called when clicking on a link from another segment, here from `/list` to `[slug]/clips/[id]`

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030
  Available memory (MB): 36864
  Available CPU cores: 12
Binaries:
  Node: 20.11.1
  npm: 10.2.4
  Yarn: 1.22.21
  pnpm: N/A
Relevant Packages:
  next: 14.3.0-canary.23 // Latest available version is detected (14.3.0-canary.23).
  eslint-config-next: N/A
  react: 18.3.0
  react-dom: 18.3.0
  typescript: 5.1.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Parallel & Intercepting Routes

### Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local), Vercel (Deployed), Other (Deployed)

### Additional context

Hello!

This issue only seems to happen if the intercepting page is called from another segment. It works fine if it's called from the "root" page.

I have also included a `static-route` example which doesn't use a dynamic route, and it works fine there with the same route groups setup.

Thank you!
Repository: vscode
Issue: Discard Changes and Stage Changes buttons are way to close together
Labels: diff-editor

The Discard Changes and Stage Changes buttons are super small and super close together so it's very easy to accidentally click on wrong button and I have many times lost code because of this. These are the new buttons recently added in the vertical bar separating the two versions. And there is not even a confirmation dialog when undoing. I recommend the approach vs2022 takes. Their buttons hover over the affected code. The buttons are large and separated. If this is too much at least put the buttons on separate sides not in the middle next to each other so it is clear which side you are adopting. This is causing a lot of unneeded brain fatigue.
Repository: next.js
Issue: Rewritten paths cause a client side redirect unexpectedly when set up with basePath: false and an active basePath
Labels: bug,Pages Router

### Link to the code that reproduces this issue

https://github.com/mareksuscak/router-bug/blob/main/next.config.mjs#L5-L18

### To Reproduce

1. Start the application in development mode (next dev)
2. Navigate to <http://localhost:3000/destination>

### Current vs. Expected behavior

Expected: page is displayed and the address bar in the browser reads `/destination`, not `/prefix/destination`
Current: page is displayed and the address bar in the browser reads `/prefix/destination`, not `/destination`


### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:37 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6031
  Available memory (MB): 65536
  Available CPU cores: 16
Binaries:
  Node: 20.11.1
  npm: 10.2.4
  Yarn: 1.22.22
  pnpm: 8.15.5
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.0
  react-dom: 18.3.0
  typescript: 5.4.5
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Pages Router

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)

### Additional context

I tested latest canary release 14.3.0-canary.23 and the bug is still present there. It's been happening for months. What's interesting is that this seems to be a client-side triggered redirect because the server returns HTTP 200 initially and the path changes in the browser right after. I've also tried writing a middleware to handle the rewrite instead of using `rewrites` in the config and it's still happening - likely a bug in the client side routing code. Here's the middleware I tried:

```ts
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

export function middleware(request: NextRequest) {
  if (request.nextUrl.pathname.startsWith('/destination')) {
    return NextResponse.rewrite(new URL('/prefix/destination', request.url))
  }
}
```
Repository: go
Issue: net: TestSendfile does not use sendfile on Windows
Labels: NeedsFix

https://go.dev/cl/581778 extends the existing `TestSendfile*` tests in the `net` package to check to see if sendfile (or the platform equivalent) is actually used.

It appears that in the case of `TestSendfile` on Windows, we aren't using `TransmitFile`. Other tests, such as `TestSendfileParts` are using `TransmitFile`. I'm not sure what's going wrong. I'll make the test skip the check on Windows for now; filing a bug to keep track of the problem.
Repository: godot
Issue: Type errors only show in the currently open file.
Labels: enhancement,topic:gdscript,topic:editor

### Tested versions

4.2.1

### System information

Windows 11

### Issue description

Type errors only show on the currently open script in the editor window, even when untyped variables is set to give errors in project settings. Errors in other scripts are not found until that script is navigated to or the program crashes while running.

By opting into type safety you can find needles in a haystack before they crash your game. In projects of reasonable complexity where there are hundreds of individual script files from multiple people, the ability to know when changing code in one file breaks another anywhere else is essential and is a basic function of IDEs for typed languages.

A solution could be running the Language Server on every .gd file after a script is saved that way errors can be thrown.

### Steps to reproduce

In the example project, open Enums.gd and rename bar to Bar. Foo.gd has a variable bar typed as Enums.bar but the editor does not show an error until you navigate to it.

### Minimal reproduction project (MRP)

[Code Analyzer Test.zip](https://github.com/godotengine/godot/files/15121852/Code.Analyzer.Test.zip)
Repository: node
Issue: Tracking issue: compile cache
Labels: module,esm

Follow up to https://github.com/nodejs/node/issues/47472 . Some items that can be investigated:

- [x] Initial implementation, enabled via `NODE_COMPILE_CACHE` environment variable: https://github.com/nodejs/node/pull/52535
- [x] Exposing an API for user code to control the caching https://github.com/nodejs/node/pull/52535#issuecomment-2059390083
- [x] An API for flushing the cache: https://github.com/nodejs/node/pull/54971
- [ ] Idle-time cache serialization like what Blink does, to avoid penalizing the first load
- [ ] Other hashing algorithm (CRC32 may be good enough for our use case. In the initial implementation, it was chosen because it can be used on no-crypto builds and fast enough. For reference, ccache has used md4 and later BLAKE2b -> BLAKE3)
- [ ] Other directory layout (splitting the cache for each file and read on the fly seems to be fast enough and I don't really see I/O showing up in the profile anyway) or using a db (if/when we implement Web Storage?)
- [ ] Embedder API for configuring the storage
- [ ] Inode caching like https://github.com/ccache/ccache/pull/577 (note that CRC32 also barely shows up in the profile, it may not worth the complexity).
- [ ] Avoid UTF8 transcoding by directly reading the source code as buffer from disk (this needs to dance with CJS loader monkey patching)
- [ ] Move the flushing operations off-thread so that they can be done as soon as the code cache is ready and can be done concurrently https://github.com/joyeecheung/node/tree/parallel-compile-cache
- [ ] Implement TS -> JS caching https://github.com/nodejs/node/issues/54741
Repository: node
Issue: Tracking issue: require(esm)
Labels: module,esm

Before it's unflagged

- [x] Figure out default export interop with transpilers, either adding `__esModule` to required ESM on our end (https://github.com/nodejs/node/pull/52166), or transpilers update themselves to check the result returned by `require()`: 
- [x] conditional exports for module, regardless of whether it's loaded by `require` or `import`. Something like `module` which is recognized by Webpack and Rollup would be good (maybe this doesn't need to block unflagging, but should be done before stablization) https://github.com/nodejs/node/pull/54648
- [x] Move experimental warning to where `require()` is actually handling a ESM

Before it is promoted to be stable:

- [x] Implement detection https://github.com/nodejs/node/pull/52047
- [x] Some marker to customize the default exports returned by require(esm) https://github.com/nodejs/node/pull/54563
- [x] Support module customization hooks https://github.com/nodejs/loaders/pull/198

Nice-to-haves:

- [x] https://github.com/nodejs/node/issues/52180
- [x] https://github.com/nodejs/node/issues/52599 (fixed in https://github.com/nodejs/node/pull/52762)
- [ ] Better documentation on how to publish packages in a post-require-esm era/migration guide: https://github.com/nodejs/package-examples

Bug fixes & changes:

- https://github.com/nodejs/node/pull/52264
- https://github.com/nodejs/node/pull/52487
- https://github.com/nodejs/node/pull/52047
- https://github.com/nodejs/node/pull/52868
- https://github.com/nodejs/node/pull/52166
- https://github.com/nodejs/node/pull/54592
- https://github.com/nodejs/node/pull/54648
- https://github.com/nodejs/node/pull/55250
- https://github.com/nodejs/node/pull/55397
- https://github.com/nodejs/node/pull/55496
- https://github.com/nodejs/node/pull/55502
- https://github.com/nodejs/node/pull/55520
- https://github.com/nodejs/node/pull/55960
- https://github.com/nodejs/node/pull/56122
- https://github.com/nodejs/node/pull/56194

Related features that interoperate with require(esm) and need to be considered when being backported together:

- https://github.com/nodejs/node/pull/53619
- https://github.com/nodejs/node/pull/53725

For v22.x backport (see a summary of regression analysis in https://github.com/nodejs/node/pull/55217#issuecomment-2388704035)
- https://github.com/nodejs/node/pull/55241
- https://github.com/nodejs/node/pull/55243
- https://github.com/nodejs/node/pull/55286
- https://github.com/nodejs/node/pull/55217

For v20.x backport: TBD