sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: create-react-app
Issue: Cannot load macro with .cjs extension in package with type: module
Labels: stale,needs triage,issue: bug report

I made a package with a [`macro.cjs`](https://npmfs.com/package/patronum/1.3.0-next.1/macro.cjs) file, that added to [`package.json:exports`](https://npmfs.com/package/patronum/1.3.0-next.1/package.json#L40), please note [package.json has `type: module`](https://npmfs.com/package/patronum/1.3.0-next.1/package.json#L5).

### Describe the bug

I got [an error](https://github.com/effector/patronum/runs/3848203844):

```
Cannot find module '@effector/patronum/macro' from '/home/runner/work/patronum/patronum/integration/cra/src'

    Require stack:
      src/App.js
      src/App.test.js


    However, Jest was able to find:
    	'./demo.test.ts'
    	'./demo.ts'

    You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['web.js', 'js', 'web.ts', 'ts', 'web.tsx', 'tsx', 'json', 'web.jsx', 'jsx', 'node'].
```

I checked up babel-plugin-macros has support for `.cjs` macros: https://github.com/kentcdodds/babel-plugin-macros/blob/master/src/index.js#L5

### Did you try recovering your dependencies?

Yep

### Which terms did you search for in User Guide?

### Environment

```
Environment Info:

  current version of create-react-app: 4.0.3
  running from /Users/sova/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app

  System:
    OS: macOS 11.5.2
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 16.5.0 - ~/.nvm/versions/node/v16.5.0/bin/node
    Yarn: 1.22.11 - ~/.nvm/versions/node/v16.5.0/bin/yarn
    npm: 7.19.1 - ~/.nvm/versions/node/v16.5.0/bin/npm
  Browsers:
    Chrome: 94.0.4606.81
    Edge: Not Found
    Firefox: 90.0.2
    Safari: 14.1.2
  npmPackages:
    react: ^17.0.1 => 17.0.2
    react-dom: ^17.0.1 => 17.0.2
    react-scripts: ^4.0.3 => 4.0.3
  npmGlobalPackages:
    create-react-app: Not Found
```

### Steps to reproduce

Also, I made an integration test for CRA:
1. I publish the package to the GitHub registry
2. Installed it to the app based on CRA
3. Ran [tests](https://github.com/effector/patronum/blob/main/integration/cra/src/demo.test.ts) on [file](https://github.com/effector/patronum/blob/main/integration/cra/src/demo.ts)


### Expected behavior

CRA should load macro with .cjs extension from another package.

### Actual behavior

![image](https://user-images.githubusercontent.com/5620073/137443246-6bb7e67e-c530-44a2-824a-7b9a29bf7ebb.png)


### Reproducible demo

https://github.com/effector/patronum/tree/main/integration/cra/src

https://github.com/effector/patronum/runs/3848203844

---

I can't change `.cjs` to `.js` in `type:module`, because module system will think it is ESModule in `.js` file.

![image](https://user-images.githubusercontent.com/5620073/137443969-552a8205-3ae6-4f6d-ab9e-3c3f991372ba.png)

But CRA doesn't allow me to import `macro.cjs`
Repository: material-ui
Issue: [Gatsby+MUI] SSR issue using @mui/styled-engine-sc
Labels: package: styled-engine-sc

Title is pretty much all there is. Some really weird bugs happened on my home page after I switched a <p> node to a <Typography> node in a different page.

- [x] The issue is present in the latest release.
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Current Behavior 😯

Home page loads fine, but clicking into /blog and then back causes the CSS to be all messed up.

However, if you load into /blog first, everything is fine even after switching back and forth multiple times.

## Expected Behavior 🤔

CSS should not be messed up.

## Steps to Reproduce 🕹

Steps:

1. Check out https://github.com/fterh/fabianterh.me/tree/weird-mui
2. gatsby build && gatsby serve
3. Home page loads fine, clicking into /blog and back works
4. git reset --mixed HEAD~
5. gatsby build && gatsby serve
6. Home page loads fine, clicking into /blog and back reproduces described bug
7. See the last commit - last commit isolates the buggy change

## Context 🔦
Build a personal website

## Your Environment 🌎

<details>
  <summary>`npx @mui/envinfo`</summary>
  
```
System:
    OS: macOS 11.0.1
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 25.10 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.3.0 - ~/.nvm/versions/node/v16.3.0/bin/node
    Yarn: 1.22.15 - /usr/local/bin/yarn
    npm: 7.15.1 - ~/.nvm/versions/node/v16.3.0/bin/npm
  Managers:
    Homebrew: 3.2.14 - /usr/local/bin/brew
    pip3: 21.2.4 - /usr/local/bin/pip3
    RubyGems: 3.0.3 - /usr/bin/gem
  Utilities:
    Make: 3.81 - /usr/bin/make
    GCC: 4.2.1 - /usr/bin/gcc
    Git: 2.33.0 - /usr/local/bin/git
    Clang: 12.0.0 - /usr/bin/clang
  Servers:
    Apache: 2.4.46 - /usr/sbin/apachectl
  IDEs:
    Nano: 2.0.6 - /usr/bin/nano
    VSCode: 1.60.2 - /usr/local/bin/code
    Vim: 8.2 - /usr/bin/vim
    Xcode: /undefined - /usr/bin/xcodebuild
  Languages:
    Bash: 3.2.57 - /bin/bash
    Java: javac 17 - /usr/bin/javac
    Perl: 5.28.2 - /usr/bin/perl
    PHP: 7.3.22 - /usr/bin/php
    Python: 2.7.16 - /usr/bin/python
    Python3: 3.9.7 - /usr/local/bin/python3
    Ruby: 2.6.3 - /usr/bin/ruby
  Databases:
    SQLite: 3.32.3 - /usr/bin/sqlite3
  Browsers:
    Chrome: 94.0.4606.81
    Firefox: 92.0.1
    Safari: 14.0.1
```
</details>
Repository: youtube-dl
Issue: youtube-dl and Sky News Australia
Labels: request

<!--I have youtube-dl up to date in my Ubuntu PC, however, recently, skynews.com.au have changed how their news videos are stored and youtube-dl no longer works in downloading a news video from https://www.skynews.com.au/

Is there any way to overcome this issue so I may download skynews news videos?

Thanks

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.06.06. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a feature request
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [x] I've searched the bugtracker for similar feature requests including closed ones


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
-->

WRITE DESCRIPTION HERE
Repository: three.js
Issue: Lightmaps and metals
Labels: Needs Investigation

In MeshStandardMaterials lightmaps are applied to the diffuse light component, but not the specular reflections. This makes sense because shadows don't fall on mirrors, but I think the logic isn't quite right for rough metals. Obviously smooth metals are a special case, but rough metals such as brushed aluminium do have shadows.

Blender's Principled BSDR shader in Cycles renders shadows on metal:

<img width="492" alt="Screenshot 2021-10-14 at 13 14 46" src="https://user-images.githubusercontent.com/303516/137449612-b5b25b3c-ce83-4a40-9ad5-fcb46901c719.png">

The pods in the scene are arranged with roughness going from 0% to 100% bottom-to-top and metallic going from 0% to 100% left-to-right.

If I generate a lightmap for this scene in Blender and export that for use in three.js (via Mozilla Hubs using their GLTF extension) I get the following output:

<img width="492" alt="Screenshot 2021-10-14 at 13 19 16" src="https://user-images.githubusercontent.com/303516/137449941-6d261b44-d964-4fe9-a883-c4edf9ca14b0.png">

The top row clearly shows the shadow effect diminishing with the increase of the metallic factor.

In simplistic terms, this could be fixed if the scattered light from the rough metal surface (the diffuse-like part of the specular component) was also attenuated by the lightmap.
Repository: neovim
Issue: treesitter: #offset! doesn't work on @language
Labels: bug,treesitter

### Neovim version (nvim -v)

0.6 commit 88e16a7f30b23c03c2207086f613190e685a67c3

### Vim (not Nvim) behaves the same?

unrelated

### Operating system/version

NixOS unstable

### Terminal name/version

unrelated

### $TERM environment variable

unrelated

### Installation

built from source

### How to reproduce the issue

I want to inject highlighting to indented strings with a language-indicator comment in nix-lang. Like,
```nix
/* bash */ ''
  echo foo
''
```

I write dynamic injection like this.
```
(
  ((comment) @language
    (#match? @language "^/\\* [A-Za-z][A-Za-z_-]* \\*/$")
    (#offset! @language 0 3 0 -3)) ; Strip comment delimiters.
  .
  ((indented_string) @content
    (#offset! @content 0 2 0 -2))) ; Strip quotes.
```


### Expected behavior

It works.

### Actual behavior

It doesn't. The content is still highlighted as normal string.

I tried to `(#set! "language" @language)` after the `offset!` but it still doesn't.
It works only when I manually set `language` to `bash`.
```
(
  ((comment) @language
    (#match? @language "^/\\* [A-Za-z][A-Za-z_-]* \\*/$")
    (#offset! @language 0 3 0 -3) ; Strip comment delimiters.
    (#set! "language" "bash"))
  .
  ((indented_string) @content
    (#offset! @content 0 2 0 -2))) ; Strip quotes.
```

So I believe it have trouble retrieving language string from the comment.

In the handler code of `offset!`, it always put the result range into `metadata.content` and the capture information is not saved at all.

https://github.com/neovim/neovim/blob/5fd4557573c73a6b41b702b1ee39151b5bd7e5fd/runtime/lua/vim/treesitter/query.lua#L323

When retrieving `@language`, it directly pull text from the node without respecting any offset.

https://github.com/neovim/neovim/blob/5fd4557573c73a6b41b702b1ee39151b5bd7e5fd/runtime/lua/vim/treesitter/languagetree.lua#L343-L344

Related: #14046 
cc @steelsojka
Repository: flutter
Issue: [video_player] [android] Add possibility to restart video after error (for instance connection loss)
Labels: c: new feature,p: video_player,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

## Use case

For now I need to recreate controller if video player has connection loss. That makes complicated work with video_player.

## Proposal

Handle this on native side. I don't know exactly how to implement this with AVPlayer but Exoplayer has something like that.

```
final class CustomPolicy
        extends DefaultLoadErrorHandlingPolicy {

  @SuppressWarnings("deprecation")
  @Override
  public long getRetryDelayMsFor(
          int dataType,
          long loadDurationMs,
          IOException exception,
          int errorCount) {
      return 5000;
  }

  @Override
  public int getMinimumLoadableRetryCount(int dataType) {
    return Integer.MAX_VALUE;
  }
}
```
Repository: flutter
Issue: [Proposal] Deprecate `Stepper` widget for third-party solution
Labels: framework,f: material design,c: proposal,team-design,triaged-design

`Stepper` has been removed from official Material Design components and the old design has been [archived](https://material.io/archive/guidelines/components/steppers.html#).

**Edit:**
The component is not officially deprecated but the page, where it was present, has been archived and there is no Stepper on the updated page, subsequently no design update for new material.

There are a still bunch of [issues](https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+Stepper+label%3A%22f%3A+material+design%22) for `Stepper`. Since official material design dropped this widget, it is better to let third-party developers add value here for developers who use this type of widget in their apps, instead of keeping the official widget with existing bugs and new feature issues. 


This also means `Stepper` doesn't have official Material 3 specs, migration to new Material You for this widget would be custom?
Repository: rust
Issue: `where` clause hides `f64: Div<f64>` impl
Labels: A-trait-system,T-compiler,C-bug

This code:
```rust
use std::ops::Div;

pub fn f<T>(_: T) -> f64
where
    f64: Div<T, Output = f64>,
{
    1.0 / 2.0
}
```
Results in this error:
```
error[E0308]: mismatched types
 --> src/lib.rs:7:11
  |
3 | pub fn f<T>(_: T) -> f64
  |          - this type parameter
...
7 |     1.0 / 2.0
  |           ^^^ expected type parameter `T`, found floating-point number
  |
  = note: expected type parameter `T`
                       found type `{float}`
```
But I expected it to compile fine, since `f64: Div<f64, Output = f64>` also exists unconditionally. It seems that the bound on `f64` hides the existing `f64: Div<f64>`.

This seems to happen on all versions of Rust since 1.0.
Repository: react-native
Issue: Images on Android only extremely low quality.
Labels: Platform: Android,Component: Image,Needs: Triage :mag:

## Description
I am trying to load high quality images in React Native for a chart application and I am getting low quality images being displayed on Android, Zooming in does not help either, instead it makes the issue worse. iOS is fine, but viewing the same image on Android gives dire results and does not look the same quality as iOS.

I have attached an Expo snack example so that you can compare and Zoom in to see the issue.

<img width="1439" alt="Screenshot 2021-10-15 at 16 13 14" src="https://user-images.githubusercontent.com/64401775/137511636-4a63a31a-72d4-4a67-8b23-26aeb2d1ee53.png">

## React Native version:
0.66

## Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.

1. Use a high quality PNG image.
2. Load the image in an Image Viewer or Image Tag.

## Expected Results
Describe what you expected to happen.

**I expect the image quality to be the same regardless of the platform.**

## Snack, code example, screenshot, or link to a repository:
https://snack.expo.dev/@joelpateljp/low-quality-image-android-example
Repository: storybook
Issue: Disable ReactNode controls by default if no options provided
Labels: feature request,addon: controls

**Is your feature request related to a problem? Please describe**
We have such components, where some options are React components or React nodes, e.g.
![image](https://user-images.githubusercontent.com/13823215/137517938-e1ce09e2-0dfa-4e84-8701-ecb5db5864b6.png)

Usually, in such stories, we provide values for these props in the story itself, e.g.:

```javascript
function Template(args) {
  return <Component {...args} content={<AnotherComponent />} />
}
```

In this case, we don't need to use value from controls passed via args, and those controls have no effect on change.

To make it obvious we disable such fields via
```js
export default {
  argTypes: {
    content: { control: false },
  }
}
```
However, with this feature, we can omit this boilerplate automatically, especially if thinking that we can't provide valid React component or node from Web UI.

**Describe the solution you'd like**
The solution would be to always disable controls of type ReactNode, ReactComponent, etc.

**Describe alternatives you've considered**
The only known way to achieve it, is a mentioned workaround.

**Are you able to assist to bring the feature to reality?**
Yes, I can, if you bring it into the project.

**Additional context**
The only case, when we need it enabled, is when we provide array of options to be able to select either component or rendered React node via select or radio button.
Repository: rust
Issue: Consider dynamically link to `libgcc_s` when targeting `windows-gnu`
Labels: O-windows

## Description

Rust now choose to statically link to `libgcc_eh` and `libpthread` when no `-C prefer-dynamic` is specified:
https://github.com/rust-lang/rust/blob/1ddd4e6d7ed446934abd428a08e18535faef5e03/compiler/rustc_target/src/spec/windows_gnu_base.rs#L50-L58

It is because that some software end users may not have MinGW64 runtimes installed, and it may be complicated for developers to bundle the MinGW64 runtime. However, this case should have been correctly handled with `-C target-feature=+crt-static`.

## Pros

**Smaller binary size:** We could simply link with the system MinGW64 runtime, and it will help reduce some of the binary size. The distributed binary will also benifit from newer MinGW64 runtime without recompiling.

**No sidebacks when using `crt-static`:** MinGW64 doesn't statically link to `msvcrt` due to license restrictions. Therefore the modification here won't make difference when using `crt-static`. It should perform as usual, and simply bundle the MinGW64 runtime.

**Future exception safety:** I've noticed the [in design](https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md) feature for future exception safety. Then it needs the rust binary to dynamically link to the MinGW64 runtime.

**Behavior consistence:** Most other targets only link to the unwind runtime statically when feature `crt-static` is on. We could set it on as default in the `windows-gnu` target, but leave the choice to the developers.

## Cons

**MISC breaking:** Some crates may assume the original behavior, although I haven't found one.

## Other notes
Not only the `windows_gnu_base.rs` should be modified, `library/unwind/src/lib.rs` should also be modified to properly deal with `crt-static` feature. Also, it should be investigated that where to link `libpthread` statically.

I came to this idea when developing with Rust and GTK. GTK depends on a lot of other libraries, for example, harfbuzz, which itself is written by C++ and links to `libgcc_s`. Therefore I needn't statically link to `libgcc_eh`, because anyway I need to ship the binaries with a `libgcc`. However, I couldn't find a switch to turn it off. I couldn't use `-C prefer-dynamic`, because I don't want to dynamically link to `libstd-xxxxxxx`, which only increases the final binaries size. In addition, some crates, for example, [hyper](https://github.com/hyperium/hyper), blocks the `prefer-dynamic` build, because of its (maybe wrongly written) `crate-type`.
Repository: go
Issue: runtime: audit lock/atomic-free accesses in pollDesc
Labels: NeedsInvestigation,compiler/runtime

#48925 identified a bug that was ultimately due to non-atomic access to `pollDesc.rg`/`pollDesc.wg`. This is fixed by https://golang.org/cl/355952, but `pollDesc` is full of other fields accessed non-atomically which may be problematic (`everr` stands out to me as suspicious), plus many fields that are _almost_ always protected by the lock.

We should vet the current fields for issues, and clean up the documentation and semantics for better maintainability.

cc @mknyszek
Repository: angular
Issue: Consider generating only one branch of i18n message (based on the config)
Labels: feature,area: i18n,area: compiler,state: needs more investigation,feature: in backlog

### Which @angular/* package(s) are relevant/releated to the feature request?

compiler

### Description

Currently Angular compiler generates 2 sections for any i18n message in a template. For the template like `<div i18n>Hello</div>` the following code will be generated:

```
  let I18N_1;
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
      const MSG_XYZ = goog.getMsg("Hello");
      I18N_1 = MSG_XYZ;
  } else {
      I18N_1 = $localize `Hello`;
  }
```
First branch is needed for Closure Compiler i18n mechanics, the second branch is used by the i18n extraction tooling provided by Angular.

In an app only one branch will be used, so we are doing extra work to tree-shake-away the results later. We should consider generating just one branch, depending on a config option (most likely `annotateForClosureCompiler` one).

We should make sure there are no cases (for example with libraries) where this change might make it impossible/problematic to use a component in an app.

// cc @petebacondarwin
Repository: rust
Issue: Rust complains about mismatched types, but the types are identical
Labels: A-diagnostics,T-compiler,D-confusing

When I compile the following code:

```
use std::future::Future;

pub async fn async_magic<F, R>(f: F) -> Vec<u8>
where
    F: FnOnce(&mut Vec<u8>) -> R,
    R: Future,
{
    todo!()
}

async fn push_zero(v: &mut Vec<u8>) {
    todo!()
}

pub async fn test_async_magic() {
    async_magic(push_zero).await;
}

async fn sleep() {}
```

I get the error message:

```
error[E0308]: mismatched types
  --> src/lib.rs:16:5
   |
16 |     async_magic(push_zero).await;
   |     ^^^^^^^^^^^ lifetime mismatch
   |
   = note: expected associated type `<for<'_> fn(&mut Vec<u8>) -> impl for<'_> Future {push_zero} as FnOnce<(&mut Vec<u8>,)>>::Output`
              found associated type `<for<'_> fn(&mut Vec<u8>) -> impl for<'_> Future {push_zero} as FnOnce<(&mut Vec<u8>,)>>::Output`
   = note: the required lifetime does not necessarily outlive the empty lifetime
note: the lifetime requirement is introduced here
  --> src/lib.rs:5:32
   |
5  |     F: FnOnce(&mut Vec<u8>) -> R,
   |                                ^
```

I'm sure the 'expected' and 'found' types are indeed different somehow, but there's nothing in the output that would allow us to distinguish them.

EDIT: Output from `rustc -vV`:

```
binary: rustc
commit-hash: c8dfcfe046a7680554bf4eb612bad840e7631c4b
commit-date: 2021-09-06
host: x86_64-unknown-linux-gnu
release: 1.55.0
LLVM version: 12.0.1
```
Repository: vscode
Issue: Nit: searching for markdown in language picker
Labels: bug,quick-pick

In a new file, click the "select language" text and search for "md" in the language picker. There isn't an exact match for markdown and the first result is Batch which is a bit annoying. Other language choices in this list seem to have the file extension in the (parentheses), should it read "Markdown (md)" for a better match?

![image](https://user-images.githubusercontent.com/9721254/137539960-8bcc1c7c-13fb-4961-825e-a8377ce91b41.png)
Repository: excalidraw
Issue: Control points not showing up for line/curve after updating iPad OS to v15
Labels: bug,triage

I am using the excalidraw npm package and when a line/curve is drawn and then when trying to activate the control points by double tapping it, doesnt work. This worked fine on the iPad OS v14. After the update its a hit or miss with the control point activation.