sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Bizarre circular type false positive
Labels: Bug,Help Wanted

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.(7022)

### 🕗 Version & Regression Information
This changed between versions 4.6.2 and 4.7.0-beta

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.7.0-dev.20220408#code/C4TwDgpgBA6gTgQzJOUC8UDeAoKepwQIAmA9gHYA2IUxCwCAXFOQK4C2ARhKgD4utKlANzYAvqOwAzVuQDGwAJYUoEAB4J2YShAAUAd0TIezeEhQBKLLnyKpUA0ZQA6Og3RoMbIVcLBWcOSS+FBSpKi6chQAzsBQAPpQpPYA2gC6VjghIVHksbToUIbmPK70CKLZ+Ln5cRjElVVQNXGUivkYKQAMaY1Vdg5tsSnAGVhiNngTYkA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts repro
type Wrapper = {
    data: number | null;
};

function example(wrapper: Wrapper) {
    // The error goes away if this line is removed and `null` is removed from the type
    if (wrapper.data === null) return;

    // The error goes away if the loop body is inlined o_O
    for (const _ of []) {
        const d = wrapper.data;
        //    ^ 'd' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.

        // The error goes away without these lines o_O
        const t = d;
        const list = [0];
        if (list[t]) {}
    }
}
```

### 🙁 Actual behavior
Error: implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer

### 🙂 Expected behavior
No error
Repository: TypeScript
Issue: When possible, remove fully-excluded constituents of a union-constrained type parameter from the false arm of a conditional type
Labels: Suggestion,Awaiting More Feedback

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

narrow type, mapped type, union

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
**Tested on latest version 4.6.2**

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?target=99&pretty=true&ts=4.6.2#code/JYWwDg9gTgLgBAbzgYQuCA7AphmAVATzCzgF84AzKNOAIiiwEMBjGWgKHawA9JY4YREgFEANlhA4YqDAGcYURsFxwAvHADWWAhApwAUgGUAGgDoAkrijLZwZmIlTZcAD4o0kbLkLEAPIwwCAD5OHj54QWI4B0lcAAVqMFlfGKk4HhgcABNnVNwZeUVlGCC1dgBIPPgM7OdUdC98IV9lCiwoODiQ8oB+TrgALgMTCysbOyrZAG0qgF12AHoFuBXVtfW4AD0eoA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```tsx
import { ComponentType } from "react"

export type ElementConstraint = keyof JSX.IntrinsicElements | ComponentType<any>

export type ElementProps<Element extends ElementConstraint> =
	Element extends ComponentType<infer P>
	? P : JSX.IntrinsicElements[Element]
//                ^?
// WRONG: Here JSX.IntrinsicElements[Element] complains that Element cannot be used to index JSX.IntrinsicElements eventhoug we know it must be keyof JSX.IntrinsicElements...
```

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->

TS doesn't narrow the type and thus throws an error.

### 🙂 Expected behavior

<!-- What you expected to happen instead, and why -->

When generic is constrained by a union type (e.g. `A | B`) then the conditional type should narrow the type when checking against one of those types from the union. `T extends A ? <here we know it must be A type> : <here we know it must be B type>`
Repository: storybook
Issue: Setting `control: false` for a control doesn't seem to do anything
Labels: bug,addon: controls

**Describe the bug**
According to the docs, setting `control: false` in the `argTypes` should hide a control from the Controls addon, but keep it in the Docs page. However, I can't get this value to do anything, whether specified at the story level or file level.

**To Reproduce**
Set `control: false` for an arg.

**System**
```
Environment Info:

  System:
    OS: Windows 10 10.0.19044
    CPU: (4) x64 Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
  Binaries:
    Node: 16.13.0 - C:\Program Files\Node.js\node.EXE
    npm: 8.6.0 - C:\Program Files\Node.js\npm.CMD
  Browsers:
    Chrome: 100.0.4896.88
    Edge: Spartan (44.19041.1266.0), Chromium (100.0.1185.39)
  npmPackages:
    @storybook/addon-actions: 6.4.19 => 6.4.19
    @storybook/addon-controls: 6.4.19 => 6.4.19
    @storybook/addon-docs: 6.4.19 => 6.4.19
    @storybook/addons: 6.4.19 => 6.4.19
    @storybook/api: 6.4.19 => 6.4.19
    @storybook/components: 6.4.19 => 6.4.19
    @storybook/core: 6.4.19 => 6.4.19
    @storybook/core-events: 6.4.19 => 6.4.19
    @storybook/react: 6.4.19 => 6.4.19
    @storybook/theming: 6.4.19 => 6.4.19
```

**Additional context**
Setting `table: { disable: true }` _does_ work, but removes the arg from docs also, which is not what I want.
Repository: storybook
Issue: Raw strings in story source blocks aren't rendered with a sensible font
Labels: feature request,needs triage

**Is your feature request related to a problem? Please describe**

I'm using `@storybook/html`, if my source contains plain text, it doesn't get a font assigned:

<img width="644" alt="Screenshot 2022-04-15 at 00 31 19" src="https://user-images.githubusercontent.com/37534243/163488562-516ea48d-2f57-4268-b42f-d6136886ee0e.png">

**Describe the solution you'd like**

I would have preferred it to use the same monospace font as the rest of the story's source. This is obviously inspector-hacked:

<img width="646" alt="Screenshot 2022-04-15 at 00 32 29" src="https://user-images.githubusercontent.com/37534243/163488647-bd5063a0-afed-4f20-91c9-0c2281ed6b51.png">

**Describe alternatives you've considered**

Another option is to use the default sans font of storybook. My preference would be monospace tho, because it aligns better.

**Are you able to assist to bring the feature to reality?**

Given some pointers where the source parsing lives, sure.

**Additional context**

From what I've seen, the font is assigned to code spans with class "token", but these little text strings aren't considered tokens:

<img width="570" alt="Screenshot 2022-04-15 at 00 35 49" src="https://user-images.githubusercontent.com/37534243/163488939-a965fb81-818e-48e1-b4ed-a8438a702b73.png">
Repository: vscode
Issue: [css] Enable drop image into css to insert url
Labels: feature-request,css-less-scss

Follow up on #142990

## Feature request
I should be able to drag an image file from the explorer into a css file to insert a url. For example, with the workspace structure:

```
images/
    cat.gif
styles/
    main.css
```

If I drag `cat.gif` from the VS Code explorer into `main.css`, I should get a url such as:

```css
body {
    background-image: url(/images/cat.gif);
}
```

Users — especially beginners — may find drag and drop more natural than writing out the image path
Repository: storybook
Issue: Explore replacing express with fastify in dev server
Labels: feature request,help wanted

**Is your feature request related to a problem? Please describe**
Serving content via http2 is beneficial and greatly improves load times when serving many files. This is the case when using using a no-bundler such as the [builder-vite plugin](https://github.com/storybookjs/builder-vite)

When using builder-vite, file count can easily exceed 1k files. This causes load times to be 🐌 . We can alleviate this by enabling http2 when appropriate.

**Describe the solution you'd like**
When running storybook with https enabled:

```sh
# optionally we can also autogenerate the selfsigned cert
# maybe take inspiration from the selfsigned package on npm
start-storybook --https --ssl-cert selfsigned.crt --ssl-key selfsigned.key
```

storybook assets are served via http2

**Describe alternatives you've considered**
Accept http1.1 bottleneck

**Are you able to assist to bring the feature to reality?**
yes, I can...

**Additional context**
Repository: rust
Issue: cross-crate intra-doc failures generate a broken link instead of stripping the link
Labels: T-rustdoc,C-bug,A-intra-doc-links,A-cross-crate-reexports

Example: `tracing-subscriber` defines the `MakeWriter` trait with the `make_writer` method whose docs link to the `Metadata` type in `tracing_core`: https://docs.rs/tracing-subscriber/0.3.11/tracing_subscriber/fmt/writer/trait.MakeWriter.html#method.make_writer_for

`tracing-appender` has a type that implements `MakeWriter` and hence its docs reproduce the docs for the trait's methods: https://docs.rs/tracing-appender/0.2.2/tracing_appender/rolling/struct.RollingFileAppender.html#method.make_writer_for

The intra-doc link to `Metadata` didn't get resolved, and it just 404s: https://docs.rs/tracing-appender/0.2.2/tracing_appender/rolling/tracing_core::Metadata. `tracing-core` isn't a direct dependency of `tracing-appender` so I guess naming an item from `tracing-core` "in `tracing-appender`" doesn't work, even though the item is in scope where the doc comment physically exists.

Those crates live in a workspace at [tokio-rs/tracing](https://github.com/tokio-rs/tracing). 

Here's a smaller example without a workspace: https://ben0x539.github.io/intradoclinkbreakage/im/target/doc/im/struct.Im.html, from https://github.com/ben0x539/intradoclinkbreakage.

idk if this is a known limitation, and I'm currently unable to think of the right search terms to find out. Seems unfortunate though.

### Meta

```
 $ rustdoc --version --verbose
rustdoc 1.62.0-nightly (e7575f967 2022-04-14)
binary: rustdoc
commit-hash: e7575f9670f3c837def3d186ae09366c75c7632e
commit-date: 2022-04-14
host: x86_64-unknown-linux-gnu
release: 1.62.0-nightly
LLVM version: 14.0.0
```
Repository: flutter
Issue: BottomNavigationBar Tooltip cancels ink Ripple effect or other effects.
Labels: framework,f: material design,has reproducible steps,P3,found in release: 2.10,found in release: 2.13,team-design,triaged-design

The splash color disappears when the tooltip appears, needs to be like the native (Bottom Navigation Bar).

theme: ThemeData(
highlightColor: Colors.transparent,
splashFactory: InkRipple.splashFactory,
),
Repository: storybook
Issue: How to render mdx documentation page dynamically in react
Labels: feature request,needs triage

button.stories.mdx

<Meta
  title="Buttons/Button"
  component={Button}
  parameters={{
    "myAddonParameter": "url",
    "usageTab": "url",
  }}
/>
 
Instead of passing url, how to pass mdx documentaion and render it

How to render in usage.tsx

usage.tsx
export const Usage: React.FC<UsageProps> = ({ active }) => {
  // https://storybook.js.org/docs/react/addons/addons-api#useparameter
  const usageParamData = useParameter<string>(USAGE_KEY, "");
  return active ? <UsageContent url={usageParamData} /> : null;
};
Repository: rust
Issue: Rustdoc share link to public link
Labels: T-rustdoc,C-enhancement,A-rustdoc-ui

Currently most of the time I used to use `cargo doc` or `rustup doc --std` to read offline docs, when I need to share the link to some items, I need to go find the public link for that page and share that instead, it would be nice to have something that allows me to easily share the link to a publicly accessible page without me searching for the same publicly accessible page.

The solution might not work parts of the world that have censorship and firewalls like china, so maybe we need to take note on that.
Repository: create-react-app
Issue: invalite proxy in using axios with  formdata  to upload files
Labels: needs triage

If you have a general question about Create React App or about building an app with Create React App we encourage you to post in GitHub Discussions instead of this issue tracker. The maintainers and other community members can provide help and answer your questions there: https://github.com/facebook/create-react-app/discussions

If you're looking for general information on using React, the React docs have a list of resources: https://reactjs.org/community/support.html

If you've discovered a bug or would like to propose a change please use one of the other issue templates.

Thanks!
Repository: godot
Issue: Crash when attempting to load export template manager when mbedTLS is disabled in the editor build
Labels: bug,topic:editor,crash,topic:export

### Godot version

3.4 (not reproducible in official builds)

### System information

ArchLinux x11 

### Issue description

I expect it not to crash with error:  
```
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v3.4.5.rc.custom_build (5816a26c049ae2c1a348704f511680a34d70ccd3)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x42560) [0x7f59236a3560] (??:0)
[2] /home/bendn/godot/bin/godot.x11.opt.tools.64() [0x2bc6bc0] (??:0)
[3] /home/bendn/godot/bin/godot.x11.opt.tools.64() [0x1bf290d] (??:0)
[4] /home/bendn/godot/bin/godot.x11.opt.tools.64() [0x1bfcbf5] (??:0)
[5] /home/bendn/godot/bin/godot.x11.opt.tools.64() [0x1bd60be] (??:0)
[6] /home/bendn/godot/bin/godot.x11.opt.tools.64() [0x1bef022] (??:0)
[7] /home/bendn/godot/bin/godot.x11.opt.tools.64() [0x9d1970] (??:0)
[8] /home/bendn/godot/bin/godot.x11.opt.tools.64() [0x94579d] (??:0)
[9] /usr/lib/libc.so.6(+0x2d310) [0x7f592368e310] (??:0)
[10] /usr/lib/libc.so.6(__libc_start_main+0x81) [0x7f592368e3c1] (??:0)
[11] /home/bendn/godot/bin/godot.x11.opt.tools.64() [0x959865] (??:0)
-- END OF BACKTRACE --
```
When clicking the 
![image](https://user-images.githubusercontent.com/70787919/163530322-9d3a93aa-91da-43ec-ba20-652839e80f64.png)
shown button

### Steps to reproduce

Compile godot with 
```
scons target=release_debug tools=yes module_mbedtls_enabled=no use_lto=yes -j6 
```
- Run
- Create new project, go to project > export > add preset
- Click preset
- Red message "no export templates" will appear
- Press manage export templates
- crash


### Minimal reproduction project

_No response_
Repository: godot
Issue: Standard C# libs(`System`, etc.) giving errors in VSCode until the project solution is built
Labels: bug,topic:dotnet

### Godot version

v3.4.4.stable.mono.official [419e713a2]

### System information

Fedora 35

### Issue description

When you initially create a C# script and open it in VSCode(with C#, Mono Debug and C# Godot Tools extensions installed), there are errors that do not make sense such as `using System;` not working.

![Screenshot-2022-04-15,13-41-51](https://user-images.githubusercontent.com/25323231/163532086-4c2c9fcb-d62f-4259-929d-a77de72f035f.png)

They all go away after running the project(and thus building the project solution) and optionally restarting OmniSharp

### Steps to reproduce

1. Create a project
2. Create a new C# script
3. A bunch of errors about `System` not being there
4. Run the project
5. Optionally restart OmniSharp
6. Errors are gone

### Minimal reproduction project

_No response_
Repository: storybook
Issue: Include file content
Labels: feature request,needs triage

**Is your feature request related to a problem? Please describe**
I need to display some configuration files in my MDX files, and it would be better to reference a file (and lines if possible) to always have a fresh view of those files, instead of copy-past content in a code block.

I also need to display some interfaces.

**Describe the solution you'd like**
A simple way to display a file's content.
ASCIIDoc have this feature : https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#includes

**Describe alternatives you've considered**
I copy past files content, but if I forget to do it when those files change, I'm f*****.

**Are you able to assist to bring the feature to reality?**
No :(
Repository: flutter
Issue: [Proposal]Possibility to edit keyboard more deeply
Labels: a: text input,c: new feature,platform-ios,framework,c: proposal,P3,team-ios,triaged-ios

Hi,
I want to edit keyboard like twitter does. (@,#)
![IMG_0879](https://user-images.githubusercontent.com/56815552/163539933-704ff3a8-ef0c-42e3-8997-d795842085f2.jpg)
It will be nice to implement some better solution to do it or add a keyboarType for it, than using and editing native keyboard.
Repository: kubernetes
Issue: Validation of ContainerPorts
Labels: sig/apps,needs-triage

https://github.com/kubernetes/kubernetes/blob/c285e781331a3785a7f436042c65c5641ce8a9e9/pkg/apis/core/validation/validation.go#L2286-L2322

According above code, same port name in different container in the same pod is allowed, right?

e.g. `http` as the port name for container A and B both in the same pod.

https://github.com/kubernetes/kubernetes/blob/c285e781331a3785a7f436042c65c5641ce8a9e9/pkg/api/v1/pod/util.go#L30-L51

According above code, the first matched port will be chosen, right?

Should we do something to make it clear to avoid the use case?
Repository: storybook
Issue: addon-storysource does not capture stories written in StoryObj (CSF v3)
Labels: bug,needs triage

**Describe the bug**

addon-storysource does not capture the information of stories written in CSF v3.

**To Reproduce**
Please create a reproduction by running `npx sb@next repro` and following the instructions. Read our [documentation](https://storybook.js.org/docs/react/contribute/how-to-reproduce) to learn more about creating reproductions.
Paste your repository and deployed reproduction here. We prioritize issues with reproductions over those without.

Repro is not created yet.

**System**
Please paste the results of `npx sb@next info` here.

```
Environment Info:

  System:
    OS: macOS 11.6.4
    CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
  Binaries:
    Node: 14.19.0 - ~/.nodebrew/current/bin/node
    Yarn: 1.22.15 - ~/.nodebrew/current/bin/yarn
    npm: 7.14.0 - ~/Works/xxxx/node_modules/.bin/npm
  npmPackages:
    @storybook/addon-essentials: 6.4.21 => 6.4.21 
    @storybook/addon-interactions: 6.4.21 => 6.4.21 
    @storybook/addon-storysource: 6.4.21 => 6.4.21 
    @storybook/addons: 6.4.21 => 6.4.21 
    @storybook/angular: 6.4.21 => 6.4.21 
    @storybook/builder-webpack5: 6.4.21 => 6.4.21 
    @storybook/cli: 6.4.21 => 6.4.21 
    @storybook/jest: 0.0.10 => 0.0.10 
    @storybook/manager-webpack5: 6.4.21 => 6.4.21 
    @storybook/preset-scss: 1.0.3 => 1.0.3 
    @storybook/testing-library: 0.0.9 => 0.0.9 
```

**Additional context**
Add any other context about the problem here.
Repository: pytorch
Issue: INTERNAL ASSERT FAILED at "vulkan_rewrite.cpp":272
Labels: oncall: mobile

### 🐛 Describe the bug

```
from torch import nn
import torch
from torch.utils.mobile_optimizer import optimize_for_mobile

model = nn.Sequential(nn.Conv2d(3, 3, kernel_size=1))
model = model.cpu()
model.eval()

example0 = torch.rand(1, 3, 4, 4)
with torch.no_grad():
    traced = torch.jit.trace(model, example0)

print('torch version is', torch.__version__)
optimized_traced = optimize_for_mobile(traced, backend='vulkan')
optimized_traced._save_for_lite_interpreter("./traced_model_vulkan.ptl")
```
Message
```
torch version is 1.11.0
Traceback (most recent call last):
  File "/home/marat/OCR/yolo3/exmobile.py", line 15, in <module>
    optimized_traced = optimize_for_mobile(traced, backend='vulkan')
  File "/home/marat/anaconda3/envs/cexp/lib/python3.7/site-packages/torch/utils/mobile_optimizer.py", line 67, in optimize_for_mobile
    optimized_cpp_module = torch._C._jit_pass_vulkan_optimize_for_mobile(script_module._c, preserved_methods_str)
RuntimeError: falseINTERNAL ASSERT FAILED at "/opt/conda/conda-bld/pytorch_1646755861072/work/torch/csrc/jit/passes/vulkan_rewrite.cpp":272, please report a bug to PyTorch. Mobile optimizaiton only available with Vulkan at the moment. Vulkan is not enabled. Please build with USE_VULKAN=1
```


### Versions

torch 1.11.0 ubuntu 18.04 installed by 
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
Repository: flutter
Issue: [image_picker][iOS] Naming selected file in temporary directory with PHAsset local id
Labels: c: new feature,platform-ios,p: image_picker,package,c: proposal,P3,team-ios,triaged-ios

I looked the XFile name and it was like "..../image_picker_...local Id" But I think it's not local id.
## Use case

In some cases, developers may need to act on the selected file on the native platform. (e.g delete original image) To achieve this or etc., in some cases PHAsset id is required for native operations or flutter packages that do this. 

## Proposal
In the XFile that returns by image picker gives only path of the temp image. At least, file name that in this temp image path can include's original PHAsset Local Id e.g with timestamp. Thus, developer can access PHAsset Id by splitting file name.
Repository: terminal
Issue: Make sure to do the window owner thing for WPF too
Labels: Product-Terminal,Issue-Task,Priority-1,Area-WPFControl

Our friends at VS would like to remind us to port the #2988, #12526, #12799, #12899, #12900 series of fixes to the WPF control as well as the WinUI one.
Repository: godot
Issue: Godot 3.4.4 MeshLibrary conversion process ignores MeshInstance children of a MeshIstance
Labels: discussion,topic:editor,documentation,topic:3d

### Godot version

v3.4.4.stable.official [419e713a2]

### System information

Windows 10, GLES3

### Issue description

When I try to convert an assets collection scene into a MeshLibrary, all the MeshInstance objects that are children of Meshinstance objects are ignored in the convertion.

For example:

A : MeshInstance
├── B : MeshInstance
├── C : MeshInstance
└── static_collision : StaticBody

B and C are ignored and part of the mesh is lost 

Changing theMeshLibrary format ( .tres , .meshlib, .res ) doesn't change the final result.

![001](https://user-images.githubusercontent.com/24657635/163566000-25b46dd6-0977-416a-883d-c721974ff7bf.JPG)
![002](https://user-images.githubusercontent.com/24657635/163566003-a5a3bc88-2332-4e82-ac71-1df139460e8b.JPG)
![003](https://user-images.githubusercontent.com/24657635/163566006-46478f40-41ed-46e4-b98a-1e6f9862fdef.JPG)

### Steps to reproduce

- Using Blender, parent two meshes and export as .glb
- Import the .glb file in Godot as Instanced Sub-Scene
- Create a new "assets" scene to put all the Sub-Scenes
- Convert the "assets" scene into a meshlibrary




### Minimal reproduction project

[test.zip](https://github.com/godotengine/godot/files/8495552/test.zip)