sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: angular
Issue: Add ability to set URL for ngsw.json at runtime
Labels: area: service-worker

### Which @angular/* package(s) are relevant/related to the feature request?

service-worker

### Description

TL;DR: We cannot serve `ngsw-worker.js` and `ngsw.json` from the same origin, so we'd like a way to configure where `ngsw.json` is fetched from.

Our setup requires us to serve the application (i.e files produced by `ng build`) from an external CDN. The CDN URL and path cannot be known at build-time, and is set by the server when the index file is rendered (e.g with [Thymeleaf](https://www.thymeleaf.org)). Think:

```html
// index.html
<script>
  window.APP_CONFIG = {
    cdnUrl: [[${CDN_URL}]]
  };
</script>

<script th:src="@{${CDN_URL}+'polyfills.js'}"></script>
<script th:src="@{${CDN_URL}+'runtime.js'}"></script>
<script th:src="@{${CDN_URL}+'main.js'}"></script>
```

When trying to add  `@angular/service-worker` for offline support into the mix, we run into the issue that the `ngsw-worker.js` script cannot be served from the CDN like other files, because of browser restrictions.

We *can* work around this by having the `ngsw-worker.js` be served from the page origin. However, we'd still like for the `ngsw.json` manifest to be served together with the rest of the app from the CDN. And this is the issue. There is no way to tell the service worker to fetch the manifest from a different path/url.

### Proposed solution

Add a *runtime* config property that allows to override the default `ngsw.json` path. For example: 

```typescript
ServiceWorkerModule.register("ngsw-worker.js", {
	// ...
	manifestUrl: `${window.APP_CONFIG.CDN_URL}/ngsw.json`,
}),
```

Note that for our setup, the CDN URL is not known at build-time, so it cannot be a part of `ngsw-config.json`.

EDIT:
Another possible solution would be something like:
```typescript
ServiceWorkerModule.register("ngsw-worker.js", {
	// ...
	ngswOrigin: "sw-scope" | "import-meta",
}),
```
...where `"sw-scope"` would be default (and the way it works right now), and `"import-meta"` would become a URL that is based on where the `main.js` script is loaded from. Possibly based on `import.meta.url`.

EDIT2:
I forgot to add: If the `ngsw.json` is served from an external URL, then there must also be a way to tell the service worker that the URL:s inside of it are relative. Like so:

```json
// https://the.cdn/path/to/ngsw.json
{
  "assetGroups": [
    {
      "urls": [
          "main.js" // Service Worker should interpret this as https://the.cdn/path/to/main.js
        ],
    }
  ],
}
```

### Alternatives considered

One alternative we tried was to serve `ngsw.json` from the page origin (i.e the same as `ngsw-worker.json`).

However this is not ideal, as the CDN files are deployed more or less independently from the index page.
Repository: godot
Issue: [TRACKER] Cyclic dependencies related issues
Labels: bug,topic:core,topic:gdscript,tracker

### Godot version

4.2 dev

### Issue description

Anything related to cyclic dependencies/requirements of resources. Note that cyclic references (`RefCounted`) can be a slightly different issue.

```[tasklist]
### Bugs
- [ ] #7038
- [ ] #24146
- [ ] #38768
- [ ] #39153
- [ ] #39294
- [ ] #55615
- [ ] #56628
- [ ] #59116
- [ ] #64330
- [ ] #65393
- [ ] #69508
- [ ] #70985
- [ ] #73589
- [ ] #73615
- [ ] #74253
- [ ] #74806
- [ ] #74837
- [ ] #74915
- [ ] #75268
- [ ] #76019
- [ ] #76641
- [ ] #77090
- [ ] #77436
- [ ] #77513
- [ ] #78074
- [ ] #78128
- [ ] #78211
- [ ] #79197
- [ ] #79545
- [ ] #79625
- [ ] #80043
- [ ] #80324
- [ ] #80379
- [ ] #80645
- [ ] #80714
- [ ] #80981
- [ ] #81462
- [ ] #81685
- [ ] #83539
- [ ] #83803
- [ ] #87397
- [ ] #94242
- [ ] #98551
- [ ] #100100
```

```[tasklist]
### PRs
- [ ] #80854
- [ ] #92326
- [ ] #93346
```
Repository: react-native
Issue: Memory Leak with Fetch
Labels: Issue: Author Provided Repro,🌐Networking,Needs: Triage :mag:

### Description

I have encountered a memory leak issue when using the ﻿fetch function in my React Native application. The memory usage gradually increases over time in iOS, leading to performance degradation and potential crashes.

![CleanShot 2023-08-22 at 09 33 37](https://github.com/facebook/react-native/assets/5475805/706ad29c-3e8c-46f5-b8ec-a90d386306d1)


### React Native Version

0.72.4

### Output of `npx react-native info`

```System:
  OS: macOS 13.5
  CPU: (10) arm64 Apple M1 Pro
  Memory: 758.45 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.16.0
    path: ~/.nvm/versions/node/v18.16.0/bin/node
  Yarn:
    version: 1.22.19
    path: /opt/homebrew/bin/yarn
  npm:
    version: 9.5.1
    path: ~/.nvm/versions/node/v18.16.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.12.1
    path: /Users/clemens/.rvm/gems/ruby-2.7.5/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10406996
  Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.19
    path: /usr/bin/javac
  Ruby:
    version: 2.7.5
    path: /Users/clemens/.rvm/rubies/ruby-2.7.5/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.4
    wanted: 0.72.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
```

### Steps to reproduce

	1.	Create a React Native project with the necessary dependencies.
	2.	Implement a screen or component that utilizes the ﻿fetch function to make API requests.
	3.	Monitor the memory usage of the application over an extended period.
	4.	Observe that the memory usage consistently increases during and after making multiple fetch requests.

### Snack, screenshot, or link to a repository

minimal example:
https://github.com/clemensmol/rn-fetch-memoryleak
Repository: godot
Issue: [Android] Application ID overwritten after build Android Studio project
Labels: bug,platform:android,topic:thirdparty,topic:export

### Godot version

4.2.dev.custom_build.8e0346bad

### System information

macOS

### Issue description

When exporting an Android project, the application id is properly set
```java
public final class BuildConfig {
  public static final String APPLICATION_ID = "com.company.name";
}
```
However, after building and running the project, the applicaiton id is changed to a default one
```java
public final class BuildConfig {
  public static final String APPLICATION_ID = "com.godot.game";
}
```

### Steps to reproduce

1) In the export preset, set a custom application id
2) Export the project
3) Open the project in Android Studio
4) Open the `BuildConfig` file and notice that the application id is set to the same as in the Godot Android preset
5) Build & Run the project
6) Notice that the `BuildConfig` now show the default application id `com.godot.game`

### Minimal reproduction project

[AndroidTest.zip](https://github.com/godotengine/godot/files/12406390/AndroidTest.zip)
Repository: opencv
Issue: VideoCapture: wrong colors with BT2020 (HDR) colorspace videos
Labels: bug,category: videoio

### System Information

OpenCV version: 4.8.0.76
Operating System / Platform: Ubuntu 18.04
Python version: 3.9.16

### Detailed description

Reading HDR video with VideoCapture results in complete different colors. Also combining frames back to HDR video with ffmpeg results in visible artefacts.

### Steps to reproduce

Example HDR video 


https://github.com/opencv/opencv/assets/2921717/df788db5-c315-47ca-8778-98f544444cc7


`ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,pix_fmt,color_range,color_space,color_primaries,color_transfer,bit_rate -of json example.mov`:
```
"codec_name": "hevc",
"pix_fmt": "yuv420p10le",
"color_range": "tv",
"color_space": "bt2020nc",
"color_transfer": "arib-std-b67",
"color_primaries": "bt2020",
"bit_rate": "12231190"
```

script for reading frames:
```
import cv2
import os

# Input video file path
video_path = 'example.mov'

# Output directory to save frames
output_directory = 'frames/'

# Create output directory if it doesn't exist
os.makedirs(output_directory, exist_ok=True)

# Open the video file
cap = cv2.VideoCapture(video_path)

frame_number = 0
while cap.isOpened():
    ret, frame = cap.read()

    if not ret:
        break

    frame_number += 1
    frame_filename = os.path.join(output_directory, f'frame_{frame_number:04d}.png')

    # Save the frame as an image file
    cv2.imwrite(frame_filename, frame)

    print(f"Saved {frame_filename}")

# Release the video capture
cap.release()
```

The result frames have visible color shift:
<img width="300" alt="frame_1.png" src=https://github.com/opencv/opencv/assets/2921717/f72ef247-82fa-4d79-aa6b-196e7f59c15e>

Combine back with ffmpeg:
`ffmpeg -i frames/frame_%04d.png -c:v hevc -pix_fmt yuv420p10le -color_range tv -colorspace bt2020nc -color_primaries bt2020 -color_trc arib-std-b67 -b:v 12231190 -tag:v hvc1  out.mov`


https://github.com/opencv/opencv/assets/2921717/517bcac9-bceb-419e-9589-44a5cbc6a868

The result video has visible artifacts:

<img width="300" alt="out.png" src="https://github.com/opencv/opencv/assets/2921717/d7c307af-2017-4abc-9875-9482a93f0c5b">




### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: rust
Issue: `extern "C"` functions returning ZSTs
Labels: A-FFI,T-lang,C-discussion,A-ABI

Currently, for `extern "C"` functions returning ZSTs the compiler returns `void` (as well as for other ABIs, but this is not related). However, `improper_ctypes_definitions` fire for such functions (if they don't return `()`), e.g.:
```rust
// #[repr(C)] // Adding that does not change the outcome.
pub struct Zst;

pub extern "C" fn foo() -> Zst {
    Zst
}
```
```
warning: `extern` fn uses type `Zst`, which is not FFI-safe
 --> src/lib.rs:4:28
  |
4 | pub extern "C" fn foo() -> Zst {
  |                            ^^^ not FFI-safe
  |
  = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
  = note: this struct has unspecified layout
note: the type is defined here
 --> src/lib.rs:2:1
  |
2 | pub struct Zst;
  | ^^^^^^^^^^^^^^
  = note: `#[warn(improper_ctypes_definitions)]` on by default
```
[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2fcc78d1fc447c9fddc3646a04e03533).

It's pretty clear we do not want to guarantee the FFI-safety of ZST _arguments_. But what about the FFI safety of ZST _return types_? Do we want to guarantee they'll keep translating to `void`, or keep this not guaranteed?

Context: https://stackoverflow.com/q/76950446/7884305.

@rustbot label T-lang
Repository: material-ui
Issue: [material-ui][Snackbar] Disabled button are hard to read
Labels: bug 🐛,component: snackbar,package: material-ui,design

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/lively-voice-vvlghg?file=/Demo.tsx

Steps:

1. Open the example
2. Observe the disabled buttons in the snackbar
3. Use the theme switcher to see the issue in light and dark mode


### Current behavior 😯

Buttons are very hard to read. I've added disabled buttons in a theme of the opposite mode for comparison.

![Screenshot 2023-08-22 at 11 24 06](https://github.com/mui/material-ui/assets/2109932/38977bec-c93d-409b-aa7a-068cd500717c)

In dark mode the button even disappears

![Screenshot 2023-08-22 at 11 23 56](https://github.com/mui/material-ui/assets/2109932/5dae53ff-7225-444c-85e1-1fe13b6fd53d)


### Expected behavior 🤔

Disabled buttons are readable in a snackbar

### Context 🔦

Ran into this while adding a loading button in the Snackbar

### Your environment 🌎

https://codesandbox.io/s/lively-voice-vvlghg?file=/Demo.tsx
Repository: angular
Issue: class names are not retained when host is used with Component decorator
Labels: area: core,area: elements,core: host and host bindings,P4,bug

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

core, elements

### Is this a regression?

No

### Description

Consider following example.

```ts
@Component({
  selector: 'my-app',
  template: `
    <h1>Hello from {{name}}!</h1>
    <a target="_blank" href="https://angular.io/start">
      Learn more about Angular 
    </a>
  `,
  host: {
    class: 'xyz',
  },
});
```

when used as custom element like below

```html
<my-app-element class="abc"></my-app-element>
```

The `abc` class is removed and only `xyz` class is applied. 

Expected behavior would be to have both class applied on element whene rendered on DOM.

 



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

https://stackblitz.com/edit/stackblitz-starters-qzdgyq?description=An%20angular-cli%20project%20based%20on%20@angular/animations,%20@angular/common,%20@angular/compiler,%20@angular/core,%20@angular/forms,%20@angular/platform-browser,%20@angular/platform-browser-dynamic,%20@angular/router,%20core-js,%20rxjs,%20tslib%20and%20zone.js&file=src%2Fmain.ts,src%2Findex.html&title=Angular%20Starter

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 16.1.5
Node: 16.19.0
Package Manager: yarn 1.22.17
OS: darwin arm64

Angular: 16.1.5
... animations, cdk, cli, common, compiler, compiler-cli, core
... elements, forms, language-service, localize
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1601.5
@angular-devkit/build-angular   16.1.5
@angular-devkit/core            16.1.5
@angular-devkit/schematics      16.1.5
@schematics/angular             16.1.5
ng-packagr                      16.1.0
rxjs                            6.6.7
typescript                      4.9.5
zone.js                         0.13.1
```


### Anything else?

_No response_
Repository: material-ui
Issue: [remix] Buffer is not defined
Labels: bug 🐛,external dependency,package: system,examples

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Steps to reproduce 🕹

Link to live example:

Steps:

1. Create a new Remix project using `npx create-remix@latest`
2. Add the necessary MUI (following the remix example) and Cloudflare dependencies and configurations
3. run the app `npm run dev`

repository: https://github.com/matrixersp/remix-with-mui

### Current behavior 😯

I get the following error:

```
service core:user:worker: Uncaught ReferenceError: Buffer is not defined
  at regd1tya9jj.js:21735:58 in node_modules/html-tokenize/node_modules/buffer-from/index.js
  at regd1tya9jj.js:82:50
  at regd1tya9jj.js:23774:22 in node_modules/html-tokenize/index.js
  at regd1tya9jj.js:25708:49 in node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.cjs.dev.js
  at regd1tya9jj.js:82:50
  at regd1tya9jj.js:25810:22 in node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.cjs.js

  at regd1tya9jj.js:82:50

✘ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
```

### Expected behavior 🤔

The app should run successfully.

### Context 🔦

Trying to add MUI to a Remix app that runs on Cloudflare

### Your environment 🌎

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
System:
    OS: Linux 6.4 Fedora Linux 38 (Workstation Edition)
  Binaries:
    Node: 18.14.2 - ~/.nvm/versions/node/v18.14.2/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 9.8.0 - ~/.nvm/versions/node/v18.14.2/bin/npm
  Browsers:
    Chrome: 116.0.5845.96
  npmPackages:
    @emotion/react: ^11.11.1 => 11.11.1 
    @emotion/styled: ^11.11.0 => 11.11.0 
    @mui/base:  5.0.0-beta.11 
    @mui/core-downloads-tracker:  5.14.5 
    @mui/material: ^5.14.5 => 5.14.5 
    @mui/private-theming:  5.14.5 
    @mui/styled-engine:  5.13.2 
    @mui/system:  5.14.5 
    @mui/types:  7.2.4 
    @mui/utils:  5.14.5 
    @types/react: ^18.0.35 => 18.2.20 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    typescript: ^5.0.4 => 5.1.6 
```
</details>
Repository: transformers
Issue: Make 🤗Transformers tests device agnostic
Labels: Feature request

### Feature request

We would like to make the testing suite in this repository more device agnostic. It seems there has already been some work towards this, however the majority of tests will still only run on either GPU or CPU. This would require a number of changes to all tests present in the library, however it would not alter the behaviour of Huggingface's CI runners.

A non-exhaustive list of changes would be:
- Add a new test decorator `@require_torch_with_accelerator` that largerly supersedes (but does not replace) `@require_torch_gpu`. This new decorator can be used for any test that is device agnostic that we would like to accelerate. We would keep `@require_torch_gpu` for tests that truly require CUDA features, such as ones that check device memory utilisation (such as in model parallelism or lower precision tests) or use custom CUDA kernels (such as Flash Attention).
- Certain tests could be made device agnostic quite easily, such as tests that only check for CUDA devices to enable fp16, tests that use backend specific PRNG initialisation, or tests that clear cache before executing. This could be done by adding device agnostic variants to `testing_utils.py` that compare the current device in use and dispatch to the appropriate backend specific function if available.
    - For example, rather than the comparison `torch_device == 'cuda'` to check if we can run with fp16, we could call a function `testing_utils.accelerator_is_fp16_available(torch_device)` or similar. Similar functions already exist to check for tf32 or bf16 support.
    - Crucially, in upstream we would only have settings for CUDA and CPU devices – as well as any other of your supported backends. However, we would expose functions to register your own device in user code so third parties can test custom backends without upstreaming changes.

### Motivation

As Huggingface libraries and models make up a significant part of the current ML community, it makes sense when developing custom PyTorch backends to test against these model libraries as they cover a large proportion of the most users' use cases.

However, the current testing suite does not easily allow for custom devices – not without maintaining a custom private fork that needs to be continuously kept up to date with the upstream repository. This reason, and because the number of changes required is not especially significant, is why we are making this proposal.

### Your contribution

We would write and submit a PR to implement these changes following discussion and approval with 🤗Transformers maintainers.

I am collaborating with @joshlk and @arsalanu
Repository: vscode
Issue: env.shell API should not be the empty string on start up
Labels: bug,api,terminal-process

Currently `env.shell` always starts as `undefined`, since the cost to evaluate it is 50-100ms we don't want to do this before the extension host launches. We could cache the value optimistically across sessions though and in the off chance that it is wrong it will fire the [upcoming event](https://github.com/microsoft/vscode/issues/160694) quickly.

Context: https://github.com/microsoft/vscode/issues/160694#issuecomment-1255939816
Repository: vscode
Issue: Go To indicator does not show up unless cell is clicked
Labels: bug,notebook-globaltoolbar

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.81.1
- OS Version: Windows 11

Steps to Reproduce:

1. Run the following:

import time
time.sleep(60)

The "Go To" execution indicator does not show up unless the user clicks on one of the cells, which makes little sense. I always want to know whether kernel is busy, this shouldn't depend on which UI element is active.

![image](https://github.com/microsoft/vscode/assets/10067941/56c78e62-2a8d-43f9-827d-334006f73977)

![image](https://github.com/microsoft/vscode/assets/10067941/77b26e85-c651-4bb4-a606-a566fc351434)

Also, I don't really see why the blue execution indicator is above the cell, rather than below it. If a cell is long it makes it more difficult to understand whether it is running or not. There is the spin indicator, but it is kind of difficult to notice. Is there a way to move the blue indicator below the cell, and make it thicker through settings.json?

![image](https://github.com/microsoft/vscode/assets/10067941/21ab4f0d-7ccb-47f3-97a3-70e7d4223c88)
Repository: godot
Issue: Screen Space Reflections are not anti-aliased
Labels: topic:rendering,documentation,topic:3d

### Godot version

v4.2.dev3.official

### System information

Godot v4.2.dev3 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 6700 XT (Advanced Micro Devices, Inc.; 31.0.21023.2010) - Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz (6 Threads)

### Issue description

SSR is not being anti-aliased resulting in it looking weird

SMAA x8 + FXAA
![image](https://github.com/godotengine/godot/assets/102416174/a523d0a9-1513-4aa6-ad63-70809f1b8dbe)

None
![image](https://github.com/godotengine/godot/assets/102416174/ea9dc153-91de-43b8-8e49-075eb36cf4cf)


### Steps to reproduce

1. Have objects in your scene that can reflect things using the appropriate Material settings for Metallic and Roughness
2. Enable SSR in Environment
3. Play with the Anti-Aliasing settings

### Minimal reproduction project

[SSR-AntiAlias-ReproductionProject.zip](https://github.com/godotengine/godot/files/12408857/SSR-AntiAlias-ReproductionProject.zip)