sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: react
Issue: React 18 - Using SSR with bundle splitting is possible with `renderToString`
Labels: Type: Discussion,React 18

I'm using Apollo Client with SSR, streaming is not an option for me, but bundle-splitting was always a pain point. I decided to investigate a bit. After a few hacks/adjustments, I'm having a fully working SSR site of React 18, Lazy components + Bundle splitting, and Apollo Client.

Docs/publications are stating that it's not possible because during render it'll immediately return upon finding a Promise. This is what was called limited Suspense support. However, in my case, I only need Suspense for Lazy.

I started to experiment with React 18 + Apollo's `getDataFromTree` (what I used before with 17 until now). I had to switch from `renderToStaticMarkup` to `renderToString` to preserve the special markers React is using during hydration. This wasn't a problem, Apollo supports passing a custom `renderFunction` which allowed me to replace.

Testing this simple setup with lazy components led to some interesting results. SSR was working, but on each refresh always new parts started to appear in the markup. After a few refresh the app reached it's final state and it was always correct from that point. I suspected first that Node's cached modules are the reason, tried to require all lazy modules on server side to pre-cache them, it didn't work.

Then I checked the source code of `renderToString` where I saw that lazy is actually caching the resolved values for later use.

I simply patched the created lazy modules to make it look like it's initialized, and voila, my application became sync on server side, everything works.

```
mod._payload._status = 1
mod._payload._result = require('pathToModule')
```

With all this, I was wondering if there's room later to provide an API for this. It's not a big deal IMO, and it'd be incredibly helpful to all people relying on `renderToString`.

For example something like `lazy(() => import('./Search'), typeof global !== 'undefined')`, where the second params is `evalute`. I'd even make it evaluated by default on server side, because why not?! :)
Repository: opencv
Issue: Using opencv with gradle documentation
Labels: feature,category: documentation,category: java bindings

Why is there no official documentation to use opencv from java/gradle or kotlin/gradle? For such a large project as opencv and for an ecosystem as large as java it just seems unreasonable and unacceptable. The basic documentation for using opencv in java is for opencv 3 and only covers eclipse and netbeans. I'm trying to make a basic java/gradle project that uses opencv and the only gradle documentation or support I find is for android which is very disappointing.

##### 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: TypeScript
Issue: Require "as const"?
Labels: Suggestion,Needs Proposal

# Suggestion

I have a factory function that takes a specification in the form of an object literal and returns a class. If the description passed in is a literal and annotated with `as const`, then the static properties it takes from the specification retain their exact types (like strings for instance), vs. the more generic "string" type:

```typescript
type Specification = { readonly type: string; };

function SourceNode<T extends Specification>(props: T) { 
    return { ...props }; // simplified to show a reduction.
};

export const Statment = SourceNode({
    type: "Statement"
} as const);

// This statically knows it will never enter this if
if (Statement.type === "pizza") {
}
```

However, if you forget `as const`, all of this of course falls apart. I'd like a way to immediately surface an error if you don't pass an `as const` object literal:

```typescript
// Would be nice if this yelled at you, or maybe could somehow infer that it's const since it's never used again?
export const Statement = SourceNode({
    type: "Statement"
});
```

I've tried every manner of annotation but haven't been able to accomplish this, but would love to know if there is a way to do this currently:

```typescript
function SourceNode<T extends Readonly<Specification>>(props: T)  { readonly [key in keyof T]: T[key] } { 
    return { ...props } as const;
};
```

## 🔍 Search Terms

`as const`, required, const annotation


## ✅ Viability Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: ant-design
Issue: 上传组件中进度条类型被固定为line类型
Labels: 💡 Feature Request,Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
ListItem.tsx 中代码 <Progress {...progressProps} type="line" percent={file.percent} /> 去除type="line"

### What does the proposed API look like?
<Progress {...progressProps}  percent={file.percent} />


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: Matrix multiplication is 30 times slower for integers than floats on CPU
Labels: module: performance,module: cpu,triaged,module: linear algebra

## 🐛 Bug

matrix multiplication is 30 times slower for integers than floats on CPU.

## Code example

```
import torch

tensor_int   = torch.ones((1000, 1000), dtype=torch.int)
tensor_float = torch.ones((1000, 1000), dtype=torch.float)

%timeit -n 10 tensor_int @ tensor_int
# 328 ms ± 14.1 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)

%timeit -n 10 tensor_float @ tensor_float
# 10.7 ms ± 772 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
```

## System Info
- PyTorch version: 1.9.0
- Python version: 3.6.9
- OS: Ubuntu 18.04.6 LTS

## Notes
There is a [sister issue](https://github.com/pytorch/pytorch/issues/44428#issuecomment-943262698) that is rather on the GPU performance. It is stated that, due to CUBLAS limitations, matrix multiplication for integer types is roughly x10 slower than float types. I wonder is there also a similar limitation on BLAS and help explain the performance difference on CPU?  


cc @VitalyFedyunin @ngimel @jianyuh @nikitaved @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @Lezcano
Repository: excalidraw
Issue: [Feature Request] Ability to apply sort the scene list
Labels: Excalidraw+

When you are in a collection and you are in a list of scenes, I would find value in being able to apply a few canned sort orderings like "by last updated", "by created date", "alpha" etc...

Potentially even manually sort as a future future idea.

Thanks!
Repository: ant-design
Issue: 4.17.X后table不再支持使用react-beautiful-dnd在expand区域内rows拖拽，似乎是因为expand的内容不再被parent包裹
Labels: Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/live/21c64722130)

### Steps to reproduce
把codesandbox中antd版本改成4.16.13即可正常使用

### What is expected?
向上兼容

### What is actually happening?
4.17.X之后table改动使其失效

| Environment | Info |
|---|---|
| antd | 4.18.5 |
| React | 16.14.0 |
| System | windows |
| Browser | chrome 87.0.4280.66 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: vscode
Issue: `Recently opened` project names get changed randomly
Labels: bug,label-provider

<!-- ⚠️⚠️ 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?: Yes

<!-- 🪓 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.64.0, 5554b12acf27056905806867f251c859323ff7e9, x64
- OS Version: Linux ignisda-arch 5.16.5-arch1-1 SMP PREEMPT Tue, 01 Feb 2022 21:42:50 +0000 x86_64 GNU/Linux

Steps to Reproduce:

This happens seemingly randomly. When I open a project in a devcontainer for the first time, its name in the `Recently opened` list is correct (for example the `developrs` project shown in the picture).

![2022-02-07_11-02](https://user-images.githubusercontent.com/60938164/152738227-235550f4-937a-4846-9a41-561108a4364f.png)

However, when I try to reopen an old project, the projects randomly get renamed to `workspace [Dev Container] /` (as shown in the first 3 projects in the picture). What I mean by randomly is that this does not always happen, only some times.

[Here](https://github.com/IgnisDa/ineview) is one of the repositories which has shown this problem.
Repository: go
Issue: x/pkgsite: align attribute gets stripped from headings in README.md
Labels: help wanted,NeedsFix,pkgsite

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What is the URL of the page with the issue?

https://pkg.go.dev/snai.pe/boa@v0.0.0-20220207080157-b18178b71668

### What is your user agent?

<!--
You can find your user agent here:
https://www.google.com/search?q=what+is+my+user+agent
-->

Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0

### Screenshot

<!--
Please paste a screenshot of the page.
-->

![2022-02-07_09:52:35](https://user-images.githubusercontent.com/977973/152755729-62cfeb49-2f2e-4854-ae17-b6ff1628dda7.png)

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
-->

Here is the source of the README: https://raw.githubusercontent.com/Snaipe/boa/9ac3c07bc342a675b3bd5dbda8ca58c5c5b0ea96/README.md

You'll notice on the first line that the `<h1>` tag has `align="center"`.

### What did you expect to see?

I expected the image to be centered. Github renders the image as such: https://github.com/Snaipe/boa/blob/9ac3c07bc342a675b3bd5dbda8ca58c5c5b0ea96/README.md

### What did you see instead?

The image is not centered. It seems to be because the align attribute is not allowed in the sanitized HTML: https://github.com/golang/pkgsite/blob/a70a3c2b473c9294b83bc93a6068c8ebcc9c4ecb/internal/frontend/readme.go#L169

I think allowing the attribute on heading seems innocent enough. Thoughts?
Repository: rust
Issue: A confusing compile error about lifetime
Labels: A-diagnostics,A-lifetimes,T-compiler,D-confusing,D-newcomer-roadblock,D-terse

rustc version
```shell
$ rustc --version
rustc 1.58.1 (db9d1b20b 2022-01-20)
```

suppose we have code like this:

```rust
struct Text<'txt> {
  content: &'txt str
}

struct RefText<'txt> {
  ptr: &'txt mut Text<'txt>
}

fn main() {
  let mut txt = Text {
      content: "eeee",
  };
  
  {
    // let r = &mut txt;
    let r = RefText {
      ptr: &mut txt,
    };
  }
  
  use_text(&mut txt);
}

fn use_text(t: &mut Text) {}
```

if we compile it, it will report error "cannot borrow `txt` as mutable more than once at a time":

```
error[E0499]: cannot borrow `txt` as mutable more than once at a time
   --> note1/src/fns.rs:202:12
    |
198 |       ptr: &mut txt,
    |            -------- first mutable borrow occurs here
...
202 |   use_text(&mut txt);
    |            ^^^^^^^^
    |            |
    |            second mutable borrow occurs here
    |            first borrow later used here
```

there is a way to fix it，make the lifetime in `struct RefText<'txt>` independent:

```rust
struct RefText<'txt, 'inner> {
  ptr: &'txt mut Text<'inner>
}
```

but, the question is：why if I bind the outer "Text" and the inner "str" with the same lifetime, it will cause r.ptr live long enough until the code "use_text", even I put it in a nested scope
Repository: material-ui
Issue: Can't use styled-engine-sc with jest and npm
Labels: package: styled-engine-sc

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

Hello.

I just migrated to material ui v5.
I'm using it with styled components.

Everything is OK when I start my app with craco and webpack with the alias config.

Now, i'm trying to launch my jest tests, but I have the engine problem (Module not found: Can't resolve '@emotion/react' )
`npm run test`
`scripts:{
  "test": "craco test
}`

As jest is not launched with webpack, the styled engine configuration is not applied.

What is the solution to use jest, mui with styled components, and npm ?


Thanks
Repository: PowerToys
Issue: Pressing keyboard shortcuts fastly with the same mofidier key fails sometimes
Labels: Issue-Bug,Product-Keyboard Shortcut Manager,Area-Quality

### Microsoft PowerToys version

0.55.1

### Running as admin

- [X] Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

1. In Keyboard Manager, map <kbd>Alt (Left)</kbd>+<kbd>J</kbd> to <kbd>Left</kbd>, and <kbd>Alt (Left)</kbd>+<kbd>L</kbd> to <kbd>Right</kbd>.
  ![image](https://user-images.githubusercontent.com/5000910/152764135-da93189a-89a4-4312-bf0e-bfce1eaeae89.png)
2. Open a text editor (in my case it's Visual Studio Code). Set the cursor into some texts.
3. While keeping pressing <kbd>Alt (Left)</kbd>, press and switch between <kbd>J</kbd> and <kbd>L</kbd> fastly.

### ✔️ Expected Behavior

The cursor should be moved left and right fastly.

### ❌ Actual Behavior

While the cursor is being moved, characters `j` and `l` are typed from time to time.

https://user-images.githubusercontent.com/5000910/152765372-7daf5d96-3939-459e-b52c-96ba2e9a5cd0.mp4

### Other Software

Visual Studio Code 1.64.0 (user setup)
Windows Notepad (10.2103.6.0)
Repository: yt-dlp
Issue: New option: Write all logging to a file
Labels: enhancement

### Checklist

- [X] I'm reporting a feature request
- [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
- [X] I've verified that I'm running yt-dlp version **2022.02.04**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Description

Currently, there is no option to write all the logging output into a file instead of (or in addition to) to the console.

I'm aware that on a base level, this can be accomplished by the shell used piping the output into a file.

However, this is not always convenient, or easily possible. It can't be added to the config file of yt-dlp, instead it needs to be added manually to the command every time (or turned into a script). It can also be problematic for the cases where yt-dlp is being used "under the hood" by other tools, instead of the user invoking it directly.

At its most basic, this would probably just be another option: `--log-file FILE`. If the option is present, the file is created and all logging output written to it. (There could be a second option that specifies whether it is _only_ written to file, or to both file and stdout+stderr - depends on what the default behavior would be.)

---

If this does not seem like enough of a justification, I would also like to point out that this feature could be expanded further in the future to allow for functionality that is currently not possible at all (that would be their own feature request issues, this one is only about the basic feature described above).
Some ideas have already been suggested in ytdl-org/youtube-dl#6990. Please see the following as just some brainstorming:

Personally, if this were to be added, I would like to see some support for templates (like the "output templates") added at some point after. I'm doing a lot of bulk downloading, with a separate call of yt-dlp for each channel/uploader, because I want separate download archive and log files for each of them (so they are independent from one another, can be separately moved and updated, and the like). Template support would allow the log file to be placed inside the created folder structure. (The same thing has also been requested for the "download archive", already.)
Even further down the line, the template support could potentially become more advanced and allow the log file to be split into one per video, and one global one. See the linked issue for an example use case. This would mostly be useful for identifying errors that happened later on. (Again, all of that would be separate feature requests.)
Repository: godot
Issue: Vulkan: GPUParticles trails show jagged shapes
Labels: bug,topic:rendering,topic:shaders,topic:3d

### Godot version

v4.0.alpha.custom_build [a6abeb6b2]

### System information

Linux Arch, Radeon RX 590, Vulkan renderer

### Issue description

Particle trails show jagged shapes, see video for more clarity.
On top, a quad mesh
On the bottom, a particle trail

They share the same shader

(Texture is made by me and CC-BY)

https://user-images.githubusercontent.com/7917475/152778286-9060e18b-1b92-4f0b-9f5c-748f7cbd2570.mp4



### Steps to reproduce

Open MRP

### Minimal reproduction project

[trailrepro.zip](https://github.com/godotengine/godot/files/8014748/trailrepro.zip)
Repository: react
Issue: React 18 Is there a way to use mongodb when using rsc
Labels: Type: Discussion,React 18

<!--
  Ask a question or share feedback about the React 18 release here.
-->
Since there is a package `react-pg` for people to use pg with rsc, I wonder that is there also a way to use mongodb with rsc
Repository: next.js
Issue: Livereload stops working after ~20s for data imported through `getStaticProps`
Labels: bug,Webpack

### What version of Next.js are you using?

12

### What version of Node.js are you using?

Confirmed with v14 and v16 (probably in others as well)

### What browser are you using?

Confirmed with Chrome and Safari

### What operating system are you using?

macOS

### How are you deploying your application?

-

### Describe the Bug

It seems that Next.js' livereload stops working after ~20s for data imported through `getStaticProps`.

Here is an explainer video:

https://user-images.githubusercontent.com/1567498/152780854-2f724d12-d65d-43cb-9718-26774c4b0a24.mp4



### Expected Behavior

Livereload should keep working

### To Reproduce

Open this project on Stackblitz: https://stackblitz.com/edit/nextjs-bmc4oy?file=pages%2Findex.js
Repository: godot
Issue: VoxelGI wrong ligthing calculation in x-minus z-minus direction
Labels: bug,topic:rendering,topic:3d

### Godot version

v4.0.alpha1.official [31a7ddbf8]

### System information

Windows 10, RTx 2070

### Issue description

VoxelGI Probe renders wrong GI when light is in minus x, minus z direction of the probe.
Does no light bounces, no color bleeding

![editor_screenshot_2022-02-07T135606](https://user-images.githubusercontent.com/21973505/152792938-c53bfb9e-c496-4ba4-a05e-1b8fda127f77.png)



### Steps to reproduce

create VoxelGI

Put lights in all four sectors of the probe

Ramp up Indirect-lighting to enhance the effect



### Minimal reproduction project

[VoxelGiProblem.zip](https://github.com/godotengine/godot/files/8015430/VoxelGiProblem.zip)
Repository: godot
Issue: The Inspector resource selection menu re-opens instead of just hiding after clicking on the arrow button
Labels: bug,enhancement,topic:editor,confirmed

### Godot version

3.x/4.0(be1adf491a6b40642cba186167e6635efca37f99)

### System information

Windows 10

### Issue description

I expect the popup menu will hide (or show when its hidden) and not re-open again when clicking on the arrow button on any resource property in the inspector:

![inspector_popup](https://user-images.githubusercontent.com/3036176/152797907-2d02cd5f-0c6d-4a6f-bf7b-a52fc7c5fbbf.gif)



### Steps to reproduce

Click on any resource/object property in the inspector

### Minimal reproduction project

_No response_
Repository: pytorch
Issue: Feature Request: A simpler decorator for disabling mixed precision
Labels: feature,triaged,module: amp (automated mixed precision)

### 🚀 The feature, motivation and pitch

I was working on reimplementing the YOLOX object detection method, with planned support for mixed prec, but in a part of it, I had to calculate binary crossentropy of a tensor, that itself was a product of two other tensors with sigmoid applied.
```python
...
cls_preds = (cls_preds.sigmoid() * obj_preds.sigmoid()).sqrt()
pair_wise_cls_loss = F.binary_cross_entropy(cls_preds, gt_cls_per_image, reduction="none")
...
```
Since `binary_cross_entropy` is numerically unstable, when using mixed precision the training exits with a RuntimeError. (And the meaning of the code snippet was that I cannot just remove the sigmoid and use logits for stability). To get around this problem, I wanted to locally disable autocast, just for these lines. It turned out that I had to specify the device to use the `torch.autocast()` function. When specifying `'cuda'` as the device, in case I was on GPU, it obviously worked as expected, but the funny thing was, that when the tensors were on *cpu*, it only showed a warning (a single time) then the training proceeded as expected.

So my question is, is it possible to add a *device agnostic* call to disable native mixed precision of PyTorch? It would make sense to me, since `device` is only needed to determine the dtype to use during mixed prec calculations, but as far as I know, `float32` is the default dtype for all devices.

### Alternatives

The alternative I tried (and worked, with a single warning):
```python
cls_preds = (cls_preds.sigmoid() * obj_preds.sigmoid()).sqrt()
with autocast('cuda', enabled=False):
    pair_wise_cls_loss = F.binary_cross_entropy(cls_preds, gt_cls_per_image, reduction="none")
```

### Additional context

I searched for similar issues but didn't manage to find anything. Sorry if I missed something 🤷 

cc @mcarilli @ptrblck
Repository: terminal
Issue: Open new tab with random color.
Labels: Issue-Feature,Help Wanted,Area-Settings,Product-Terminal



# Description of the new feature/enhancement

Currently we have to manualy  assign color to a tab when we open one. If there is feature which can assign random color to a new tab then it will be a good. First it looks cool and second it easy easiar to navigate to tabs.