sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: I/O safety forbids the "pass FD via env var" pattern (e.g., jobserver)
Labels: T-lang,T-libs-api,A-io

In #114780 we have clarified what is meany by I/O safety. In particular:
```
//! To uphold I/O safety, it is crucial that no code acts on file descriptors it does not own or
//! borrow, and no code closes file descriptors it does not own. In other words, a safe function
//! that takes a regular integer, treats it as a file descriptor, and acts on it, is *unsound*.
```
This is unfortunately in conflict with a reasonably common pattern on Unix systems: `exec`ing a process with a file descriptor initialized somewhere, and setting an env var to tell it where to find the FD. This pattern is used, for instance, by the jobserver protocol. The jobserver crate hence just takes an integer from an env var, turns it into a file descriptor, and reads/writes to that -- a violation of I/O safety. Crates like `cc` hence are technically unsound when they expose a safe function that internally uses the jobserver crate. The potential concern here is that the env var might be wrong, the jobserver crate now acts on a random FD by someone else, and that someone might have relied on I/O safety to protect their FD from foreign influence.

Assuming that we don't want to tell the `cc` maintainer that `cc::Build::new()` must be unsafe, what shall we do about this?
There's been a lot of prior discussion:
- https://github.com/rust-lang/rust/issues/114167
- https://github.com/rust-lang/unsafe-code-guidelines/issues/434
- [Zulip, t-opsem thread](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/I.2FO.20unsafety.20and.20UB.20in.20the.20std.20io.20raw.20functions)
- [Zulip, t-lang thread](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Should.20lang.20be.20consulted.20on.20I.2FO.20safety.3F)

I'm aware of the following proposals to resolve this situation:
1. "export" the safety burden to the environment: starting a process that uses `cc` and setting the env var the wrong way is violating a precondition of this process, and Rust's soundness guarantees do not apply. This is undermined by `set_var` though; even if we make that `unsafe` we'd have to phrase its safety contract very carefully if it want to go this route.
2. Weaken the entire concept of I/O safety to no longer provide any protection against random FDs being read/written, and only protect against random FDs being closed.
3. Develop some elaborate system of "initially existing global FDs" that `cc`/`jobserver` could use to be sure that the FD they work on already existed when the program started, and is not some other crate's private property. See [here](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Should.20lang.20be.20consulted.20on.20I.2FO.20safety.3F/near/386088852) for a bit of elaboration on that idea.

We should pick one, or develop some alternative that provides a satisfying answer to how `cc::Build::new()` can be a sound function.
Repository: godot
Issue: dragging a resource from inspector to file system displays the resource in the inspector
Labels: bug,topic:editor,usability

### Godot version

4.1.1

### System information

linux

### Issue description

may be related to https://github.com/godotengine/godot/issues/81323, I don't think so but it's basically the same ux problem

you can drag resources from the inspector to the filesystem to save them as files quickly.
But doing so displays the resource in the inspector, rather than the resource owner that was previously shown:

[simplescreenrecorder-2023-09-22_13.34.46.webm](https://github.com/godotengine/godot/assets/71937306/730c5949-6ed5-444b-b617-cebe010be47a)

When saving such a resource as a file, I'm not working on the resource! I'm working on the resource owner, the scene. The actual node that is not displayed anymore!

When doing that, the displayed thing in the inspector should not change I think.

### Steps to reproduce

1. save the mesh of a meshinstance to the disk by draging it on the file system
2. notice how your meshinstance3d node is not shown in the inspector anymore

### Minimal reproduction project

a meshinstance3d with a cubemesh
Repository: storybook
Issue: [CI]: Test prereleases separately
Labels: bug,needs triage

### Describe the bug

**This is a project for the Storybook team**

More and more projects are starting to make prereleases/canaries/RCs that we should test so we can catch bugs before their stable releases, for instance:
- Angular 17
- Vite 5
- Svelte 5
- Next canaries (as there are breaking changes in almost every minor)

Therefore we should start testing more prereleases, but separately from the main CI tasks that we run.

There's a PR here that started some work regarding this, which could be continued by whoever works on this: https://github.com/storybookjs/storybook/pull/24188/files
Repository: flutter
Issue: Wrap widgets according to minimum size and then stretch them to fill available width
Labels: c: new feature,framework,c: proposal,P3,has partial patch,team-framework,triaged-framework

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Wrap cannot contain Expanded widgets, so is there another way to have its children laid out according to their minimum required width, but then make them fill the space using spaceBetween to stretch only with respect to the specified spacing? Respective discussion on [stackoverflow](https://stackoverflow.com/questions/59546354/wrap-widgets-according-to-minimum-size-and-then-stretch-them-to-fill-available-w).

**Expected results**
|---item---| |--item--|
|--------item---------|

**Actual results**
|-item-| |-item-|
|-item-|

### Proposal

There should be some properties which can stretch the last child in `Wrap` There is a [workaround ](https://github.com/Jozott00/flex_list/blob/main/lib/flex_list.dart)for this but going for [external plugin](https://pub.dev/packages/flex_list) for such simple case is not good
Repository: next.js
Issue: Sub-folders having pages within slots should affect URL structure
Labels: bug,Navigation

### Link to the code that reproduces this issue

https://github.com/mleimer/nextjs-slots-page

### To Reproduce

1. Start the application using `npm run dev` or `npm run build` and `npm run start`
2. Go to http://localhost:3000/ -> The parallel routes & slots render correctly
3. Go to http://localhost:3000/members

### Current vs. Expected behavior

**Current**
A "404: This page could not be found" exception is thrown 

**Expected**
The page is rendered as described in https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#convention

> Slots are not route segments and do not affect the URL structure. The file path /@team/members would be accessible at /members.

Although slots DO NOT affect the URL structure. I understand it this way, that as soon as add a sub-folder with a page to that slot, that it should be a public route again. Otherwise I misunderstand this quote.

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #7-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 23 15:37:39 UTC 2023
Binaries:
  Node: 18.13.0
  npm: 9.2.0
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 13.5.3-canary.1
  eslint-config-next: 13.5.2
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router, Routing (next/router, next/navigation, next/link)

### Additional context

_No response_
Repository: next.js
Issue: Pages Router + getInitialProps = Static worker unexpectedly
Labels: bug

### Link to the code that reproduces this issue

https://github.com/ifier/next-js-SIGINT

### To Reproduce

1. Don't start app
2. Run `npm run build`
3. See list of errors
```
Static worker unexpectedly exited with code: null and signal: SIGINT
Static worker unexpectedly exited with code: null and signal: SIGINT
Static worker unexpectedly exited with code: null and signal: SIGINT
Static worker unexpectedly exited with code: null and signal: SIGINT
Static worker unexpectedly exited with code: null and signal: SIGINT
...
```

If you will go to `_app` and comment out `getInitialProps` section fully - it will build with no errors.

### Current vs. Expected behavior

I would expect not to see this list

### Verify canary release

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

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:25 PDT 2022; root:xnu-8020.140.41~1/RELEASE_X86_64
    Binaries:
      Node: 16.14.0
      npm: 8.3.1
      Yarn: 1.22.19
      pnpm: N/A
    Relevant Packages:
      next: 13.5.2
      eslint-config-next: 13.5.2
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.2.2
    Next.js Config:
      output: N/A
```


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

Not sure

### Additional context

_No response_
Repository: godot
Issue: Thumbnails shown on scene tab hover can get stuck there
Labels: bug,topic:editor,confirmed

### Godot version

4.1.1

### System information

linux, but it happens on windows too

### Issue description

![image](https://github.com/godotengine/godot/assets/71937306/e595b9e6-17e7-433d-9552-004ca0f15db6)

when hovering a scene tab, it shows a little popup with the thumbnail. Sometimes, the preview doesn't go away with the mouse and you have to hover again and leave again to have it leave.

### Steps to reproduce

idk. use the engine for long enough. I didn't manage to reproduce it on purpose.

### Minimal reproduction project

any
Repository: flutter
Issue: `lookupKeyForAsset` docs are misleading, and API is problematic on macOS
Labels: platform-ios,engine,platform-mac,a: desktop,P2,a: plugins,team-macos,triaged-macos

While working on macOS support for `video_player` I discovered that `lookupKeyForAsset:` doesn't seem to do what the docs suggest, and it doesn't seem to work the way it needs to on macOS; code that works in that plugin for loading videos from assets on iOS does not work on macOS.

The docs say:
```
/**
 * Returns the file name for the given asset. If the bundle with the identifier
 * "io.flutter.flutter.app" exists, it will try use that bundle; otherwise, it
 * will use the main bundle.  To specify a different bundle, use
 * `+lookupKeyForAsset:fromBundle`.
 *
 * @param asset The name of the asset. The name can be hierarchical.
 * @return the file name to be used for lookup in the main bundle.
 */
```

What it actually seems to return is not a file name, but a relative path from the main bundle. That appears to work for NSBundle lookup on iOS (I'm actually not sure why it *does* work), but not on macOS. The `video_player` example app's flow is:

## iOS

1. Dart code requests loading of the asset `assets/Butterfly-209.mp4`.
2. Native code calls `lookupKeyForAsset:@"assets/Butterfly-209.mp4"` on the registrar and gets back `Frameworks/App.framework/flutter_assets/assets/Butterfly-209.mp4` (the relative path from the main bundle).
3. Native code calls `[[NSBundle mainBundle] pathForResource:<the path above> ofType:nil]` and gets back an absolute path.
4. Native code loads that video.

## macOS

1. Dart code requests loading of the asset `assets/Butterfly-209.mp4`.
2. Native code calls `lookupKeyForAsset:@"assets/Butterfly-209.mp4"` on the registrar and gets back `Contents/Frameworks/App.framework/Resources/flutter_assets/assets/Butterfly-209.mp4` (still the correct relative path from the main bundle).
3. Native code calls `[[NSBundle mainBundle] pathForResource:<the path above> ofType:nil]` and gets back `nil`.
4. Native code fails to load the video because the path is `nil`.

So while our API does itself have the same behavior on macOS and iOS, that behavior doesn't actually *work* for what it's supposed to do on macOS.
Repository: flutter
Issue: Accessibility Enhancement Suggestion for Flutter
Labels: c: new feature,framework,a: accessibility,c: proposal,P3,team-framework,triaged-framework

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Dear Team,

I would like to suggest an improvement for accessibility in Flutter.

Currently, developers need to manually add labels to interactive UI elements using the **Semantics** widget. This can be a time-consuming and tedious process, especially for large and complex applications.

### Proposal

To address this issue, I propose incorporating a labelSemantics feature into development widgets. Developers would simply specify the label for the widget, and the labelSemantics would be generated automatically.

This would make accessibility more accessible for all developers, regardless of their level of experience.

Furthermore, having labelSemantics built into development widgets would make applications more accessible by default. This is because developers would not have to remember to add labels to interactive UI elements.

Here are some specific ways in which built-in labelSemantics in development widgets could improve accessibility:

- Reduces developer workload. Developers would not have to manually add labels to interactive UI elements.

- Makes accessibility more accessible to all developers. Even developers with limited accessibility experience could make their apps accessible.

- Makes apps more accessible by default. Developers would not have to remember to add labels to interactive UI elements.

I believe that having labelSemantics built into development widgets would be a significant improvement for accessibility.
Repository: godot
Issue: Array.pick_random() is not uniform (very minor issue)
Labels: discussion,topic:core,documentation

### Godot version

v4.1.1.stable.official [bd6af8e0e]

### System information

Godot v4.1.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 31.0.15.3623) - 11th Gen Intel(R) Core(TM) i5-11400F @ 2.60GHz (12 Threads)

### Issue description

Array.pick_random() uses the same modulo-solution that is suggested in the documentation. However, for array lengths that don't divide the random number's range evenly, this method leads to a distribution that is not uniform but biased towards the lower side of the range.

The reason is simple: When using modulo, the last repetition is cut short. For example, `(0..8) % 5` will produce `0,1,2,3,4, 0,1,2`, thus producing one extra set of `0,1,2`.

With pick_random() (and `a[randi() % a.size()]`) the bias usually is very small, as the random number range typically is much bigger than result range. However, in my opinion, an engine should not be producing biased results (unless there's a clear warning in the documentation), even if it won't affect 99.9% of its users.

Proposed solution: As the bias is very small when using pick_random() due to array sizes being limited by RAM and nowhere near the RNG range, I suggest adding a warning to the documentation about the bias. I find it hard to construct an example where the bias would be noticeable in a game.

### Steps to reproduce

This needs a selection from a huge array and/or millions of calls to be visible. To show that the general effect does exist, a RNG with a smaller range can be used:

```
	var a = [0,1,2,3,4,5,6,7,8]
	var d = [0,0,0,0,0,0,0,0,0]
	for i in range(100_000_000):
		d[ a[ (randi() & 0xf) % a.size() ] ] += 1
	for i in a:
		print("Number %d got %6.3f%%, %d votes" % [i, d[i] * 100.0 / 100_000_000, d[i]])
```

```
Number 0 got 12.497%, 12497089 votes
Number 1 got 12.501%, 12500656 votes
Number 2 got 12.502%, 12501931 votes
Number 3 got 12.499%, 12498787 votes
Number 4 got 12.498%, 12498340 votes
Number 5 got 12.499%, 12498876 votes
Number 6 got 12.502%, 12502284 votes
Number 7 got  6.252%, 6251961 votes
Number 8 got  6.250%, 6250076 votes
```

As the difference between the RNG range (0..15) and the used range (0..8) is minimal, we can see the bias clearly. The bigger the size differences between the ranges get, the smaller the bias becomes.

### Minimal reproduction project

see above
Repository: flutter
Issue: [go_router] Support multiple nested routes of the same type
Labels: c: new feature,package,c: proposal,P3,p: go_router,team-go_router,triaged-go_router

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Not sure if it's already possible to implement this use case with the current set of features from `go_router`, but I couldn't find helpful documentation regarding this.

We have a navigation setup similar to this:
```
- /form
  - /form/field
  - /form/section
    - /form/section/field
    - /form/section/section...
```
The top-level `form` route contains a list of sections and fields. If a user taps in the field, the field details route is shown fine. If the user taps in the section, the section details route is shown fine. The section details route contains a list of fields and/or sections. The amount of nested sections is indeterminate, since the forms are provided from a different service, can change over time and might include more nesting levels than the ones that are defined in the `GoRouter` object.

For this, we would like to set the routes of `/form` to be `/section/:id` and `/field/:id`. However, `/section/:id` should be able to contain itself again as a route, which means it should always have  `/section/:id` and `/field/:id` as subroutes.

### Proposal

Allow an option to set a specific route to be able to contain itself again as a subroute, for an indeterminate amount of nesting levels
Repository: PowerToys
Issue: Peek doesn't close on Escape after clicking inside a text file that can be previewed
Labels: Issue-Bug,Priority-1,Status-Reproducible,Product-Peek

### Microsoft PowerToys version

0.73.0

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

Peek

### Steps to reproduce

1. Preview a text file that Peek can actually preview (a `.txt` or a `.ini`)
2. Click somewhere in the file, so that it places your text cursor
3. Press <kbd>Esc</kbd>

I couldn't get a screen recording of this, but I hope that you will be able to reproduce this from the provided steps.

### ✔️ Expected Behavior

The Peek window should close

### ❌ Actual Behavior

The window doesn't close

### Other Software

_No response_
Repository: next.js
Issue: Dynamic routes - Unmount & mount uppon navigation
Labels: bug

### Link to the code that reproduces this issue

https://github.com/omerman/next13-unmounts-reproduction/

### To Reproduce

1. Start dev
2. navigate to /path1/1
3. wait and see the page refreshes every 3 seconds.

### Current vs. Expected behavior

Currently when we navigate to a page, if it renders the same page we are in now, it will unmount & mount.
This behavior can only be reproduced using dynamic routes, and if the dynamic path changes.

When a dynamic slug changes, if it renders the same page, page should not be replaced(unmounted & mounted) by the new page, since they are identical.

Let me know if you need anything more from me

### Verify canary release

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

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 22.6.0: Wed Jul  5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64
Binaries:
  Node: 18.17.1
  npm: 9.6.7
  Yarn: 1.22.19
  pnpm: 7.29.3
Relevant Packages:
  next: 13.5.3-canary.1
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A
```


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

Not sure, App Router

### Additional context

I tested more versions, but it seems as if it's happening for quite some time. tested  up until 13.4.1
Repository: angular
Issue: Long standing problems with template driven forms
Labels: feature,area: forms,feature: insufficient votes

### Which @angular/* package(s) are the source of the bug?

forms

### Is this a regression?

No

### Description

- built-in validators like `required` are still imported with `FormsModule`
- `ngModel` type and type of the corresponding custom value accessor are not checked, effectively `[ngModel]` has `any` type and there is zero typecheck, you can pass any property of any type to `[ngModel]` (e.g `Date` instead of `string`) and compiler will be happy.
- control value accessor does not have access to its validity status, component can only rely on css classes like `ng-valid`, but it wont work in case you want to show a dropdown which simply does not inherit these classes because it is rendered outside of the component
- no way to disable built-in css classes like `ng-valid`
- validation errors are still not propagated to the parent form
- `[ngModel]` still delays write operation one tick compared to any other input property

### Please provide a link to a minimal reproduction of the bug

_No response_

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

_No response_

### Anything else?

_No response_
Repository: electron
Issue: [Bug]: DevTools bypass custom https scheme handler for source maps
Labels: platform/windows,component/devtools,bug :beetle:,has-repro-gist,25-x-y,26-x-y,27-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

25.8.2

### What operating system are you using?

Windows

### Operating System Version

Windows 11 Enterprise 22H2 22621.2283

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

If I intercept the `https` scheme via `protocol.handle()` and serve `js` Responses from elsewhere (e.g. the filesystem), the JavaScript source is correctly loaded. If I open the DevTools I expect the same CustomScheme handler to be invoked to load the source map for the JavaScript-source.
So I would expect the Testcase to produce the following output after opening the DevTools (in addition to correctly loading the source map):
```
Recieved request for:  https://app.invalid/
Recieved request for:  https://app.invalid/app.js
Recieved request for:  https://app.invalid/app.js.map
```

### Actual Behavior

The CustomScheme handler is not invoked to retrieve the source map, i.e. the Testcase only outputs:
```
Recieved request for:  https://app.invalid/
Recieved request for:  https://app.invalid/app.js
```
Furthermore the following warning is displayed by the DevTools Console:
![grafik](https://github.com/electron/electron/assets/5796962/60393b57-68ce-49f8-8290-9967bd1702a6)

### Testcase Gist URL

https://gist.github.com/BurningEnlightenment/862c68b66a65c0971bb6a0edcf79a541

### Additional Information

I tried to workaround #26812 by intercepting the https protocol and serving my app in a reserved DNS namespace instead of a custom protocol scheme like `app:` (it works great except the source map issue).

EDIT: typo