sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Proper fix for line endings
Labels: feature-request,editor-textbuffer

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
Hi, i found out, there can be set preferred line ending. But issue i found is, how it is behaving on wrong line endings. To provide a specific example, its a misbehaving of some ftp servers. I found very helpful description of the issue on WinSCP site: 

Pure-FTPd FTP server: When downloading a file with Windows line-endings (CR+LF) in a text/ASCII mode, the server replaces LF with CR+LF, resulting in an incorrect **CR+CR+LF**. When opening such file in an Internal editor of WinSCP (or **VSCode too**), the **editor interprets the sequence as two line endings (CR and CR+LF)** resulting in a blank line after each and every content line. When the file is saved, the internal editor saves two Windows line endings CR+LF and CR+LF. On upload they get converted to two LF’s.

It seems, VS code has the same 'bug' - falsely expecting it to be 2 newlines. So, obviously, a nice fix would be, on opening the file, if a combination of CR+CR+LF is found within, then expect it to be from bad server, and replace it for either only one LF, or one CR+LF (removing the first CR)

Recently i had a much problems working on such server, using WinSCP + VSCode as external editor. 

I found quick fix would be using only binary mode even for text files, and setting VSCode to use LF (\n) only. But i believe this is a pretty generic case to fix that behaviour (if anyone can provide a scenario where on windows someone intentionally needs **CR+CR+LF** line endings, please leave a comment too)

if it would be a possible issue, maybe basing on filetype it could have additional fixes - i can imagine unexpected line merging may cause issues for example for slingle-line comments in JS or PHP, or other files, bc next line may get commented... but so far, testing on the ubuntu ftp serve ri have avalable, saving pure LF eol's is fine

most modern editors can handle the LF eol properly, so i thing removing the CR may be even good for lower file size. Maybe someone could also test and provide info on such action on MacOS, but for windows i believe  it would be a proper action to fix this (**CR+CR+LF**) to **LF**
Repository: puppeteer
Issue: promise with waitfornavigation+click doesnt timeout if socks connection fails
Labels: bug,confirmed,P3

Hello,

i use this code within try/catch to submit webpage and want to wait until loaded, using default timeout of 30 seconds

`    const [clickregbutton2] = await Promise.all([
      page.waitForNavigation(),
      page.click('#button-submit-register'),
    ]);`

however, if browser returns error during loading of the new page:
ERR_SOCKS_CONNECTION_FAILED

then no timeout occurs and we're not going to the catch block.
unfortunately due to connectivity issues seldomly ERR_SOCKS_CONNECTION_FAILED can occur sooner or later.

you may reproduce by:
using proxy to load any page
kill proxy
then navigate with above example code

also let me know if there is any workaround i can use for now.
Repository: PowerToys
Issue: QuickAccent
Labels: Needs-Triage

### Description of the new feature / enhancement

How to disable or turn off QuickAcent after turning the feature on
The window does not seem to go anyway after selecting an accent 
The only way to get rid of the window is to quit the PowerToys application and restart it

### Scenario when this would be used?

Activating QuickAccent

### Supporting information

_No response_
Repository: TypeScript
Issue: Instantiation expressions don't filter signatures with non-matching constraints
Labels: Suggestion,Experimentation Needed

# Bug Report

### 🔎 Search Terms

instantiation expression, overload

### 🕗 Version & Regression Information

- This is the behavior in every version I tried

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.9.3#code/CYUwxgNghgTiAEAzArgOzAFwJYHtVJxwB4AVeEADwxFWAGd4BrEATx0XgAkSBZAGQCiEEAFsaGElADmAOShieUAA4A+ABSwpALngkAlDu78ho8ZNnyQipQG0SAXQDcAKFCRYCFOmx4CxMpTUtAxGgsJiqBjqmjr6sS7OGCxKCABiWDB0GKmE8AC88Ekp7H5EAETAWABuZSouQA)

### 💻 Code

```ts
declare function foo<T extends keyof HTMLElementTagNameMap>(arg: T): HTMLElementTagNameMap[T];
declare function foo<T extends HTMLElement>(arg: T): T;

type FirstFoo = typeof foo<"div">; // Type 'string' does not satisfy the constraint 'HTMLElement'.(2344)
```

### 🙁 Actual behavior

This instantiation expression errors despite the fact that a matching signature exists.

### 🙂 Expected behavior

It sounds likely that most people would assume that this should work similarly to how overloads are chosen - but instead an intersection is being created based on all signatures with the same type arguments arity.

_originally reported by @herjiict [here](https://github.com/microsoft/TypeScript/pull/47607#issuecomment-1331744280)_
Repository: storybook
Issue: [Bug]: composeStories from @storybook/react does not work with components that have required props
Labels: bug,typescript

### Describe the bug

This is essentially a regression of https://github.com/storybookjs/testing-react/issues/4 and affects users migrating to use @storybook/react instead.

### To Reproduce

_No response_

### System

```shell
npmPackages:
    @storybook/addon-a11y: ^7.0.0-alpha.54 => 7.0.0-alpha.54
    @storybook/addon-actions: ^7.0.0-alpha.54 => 7.0.0-alpha.54
    @storybook/addon-docs: ^7.0.0-alpha.54 => 7.0.0-alpha.54
    @storybook/addon-essentials: ^7.0.0-alpha.54 => 7.0.0-alpha.54
    @storybook/addon-links: ^7.0.0-alpha.54 => 7.0.0-alpha.54
    @storybook/addon-storysource: ^7.0.0-alpha.54 => 7.0.0-alpha.54
    @storybook/node-logger: ^7.0.0-alpha.54 => 7.0.0-alpha.54
    @storybook/react-vite: 7.0.0-alpha.54 => 7.0.0-alpha.54
```


### Additional context

You can workaround this the same way as https://github.com/storybookjs/testing-react/issues/4 and use `composeStory`

### Potential Fix

I haven't tested this fully, and my typescript knowledge is not great, but the issue to me is the usage of Args in the Store_CSFExports type

https://github.com/storybookjs/storybook/blob/afcd26ccd1a3ef748073b35faf96522db9964b27/code/lib/types/src/modules/composedStory.ts#L19-L23

Maybe the fix could be to allow Args as a generic here:

```ts
type Store_CSFExports<TRenderer extends Renderer = Renderer, TArgs extends Args = Args> = {
    default: ComponentAnnotations<TRenderer, TArgs>;
    __esModule?: boolean;
    __namedExportsOrder?: string[];
};
```
and update composeStories to:

```ts
function composeStories<TModule extends Store_CSFExports<ReactRenderer, ComponentProps>>(
  csfExports: TModule,
  projectAnnotations?: ProjectAnnotations<ReactRenderer>
)
```

But not sure what implications that has
Repository: go
Issue: cmd/cgo:  __declspec(dllexport) generated in header file while building shared-c lib on windows
Labels: OS-Windows,NeedsInvestigation,compiler/runtime

I use go1.18 building dll on windows.
The header file cgo generated will have __declspec(dllexport) in function declarations.
So before I publish lib to my colleague, **I must change __declspec(dllexport) to __declspec(dllimport) handly**.

Is there a method to generate __declspec(dllimport) directly? Or is it an issue?


in go, build command: go build -buildmode=c-shared -o libadd.go.dll .
//export Add

func Add(a, b int) int {
  return a+b
}

in generated c header: libadd.go.h
extern  __declspec(dllexport) int Add(int a, int b);
Repository: pytorch
Issue: nn.CrossEntropy/nn.NLLLoss : Request for option to specify invalid ignore_index for perf. optimization
Labels: module: loss,triaged

### 🚀 The feature, motivation and pitch

nn.CrossEentropy and nn.NLLLoss functions have the argument "ignore_index" to specify the target index to be ignored during loss calculation
Eg: Pls ref:
https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html 

The default value is -100 and as per the definition at the above link, any value (even outside the usual class range) can be specified as ignore_index value.
And there is no option to specify that ingore_index value is not valid.( i.e, All elements of target are to be considered for loss calculation)
In fact some models seem to intentionally  set targets to be ignored as -100 since default ignore_index is -100.
(https://github.com/huggingface/transformers/blob/main/src/transformers/models/layoutxlm/tokenization_layoutxlm.py)

Looking for whether the target tensor contains any element with ignore_index value can have computational overhead especially with large target tensors.
But there is no target to be ignored in the case of many models.
So the current API results in unnecessary overhead in many cases.

Can PyTorch provide an option to indicate the backends whether the inore_index argument is invalid
(so that sifting though the target tensor for ignore_index can be avoided)
Say, with an API update with a "specific" ingore_index value or an additional argument?

This can improve the training times if going forward backends and training scripts can adopt this change.

When the default value was set as -100, was it intended to be used as as an invalid_ignore index?
Can models use -100 as invalid ignore_index? If yes, may be just a document update is enough from Pytorch side.
And hopefully existing models can make corresponding change when upgrading for a Pytorch version with this specification.

### Alternatives

_No response_

### Additional context

_No response_
Repository: godot
Issue: Document using autoloads safely in editor plugins
Labels: topic:editor,documentation,topic:plugin

### Godot version

4.0 beta 6

### System information

manjaro linux

### Issue description

When a plugin uses a Singleton, you know that until the singleton is added to Autoload, the engine doesnt recognize the the name in scripts, lets take dialogic as example, it uses a singleton called: `Dialogic` but since you open the project the Scripts are parsed and checked, and this generates error since Singleton isnt recognized, then the engine doesnt recognizing it thus you cant enable the plugin!

workaround:
* add the autoload manually before enabling the plugin

### Steps to reproduce

* Open Project
* Create a new plugin
* Make it using a singleton
* Disable plugin
* Close Project
* Open Project again
* Try to enable plugin

### Minimal reproduction project

just download dialogic and place it on your project

https://github.com/coppolaemilio/dialogic
Repository: create-react-app
Issue: dependency of dependency vulnerability: coa latest version
Labels: needs triage

while installing dependencies (from a project bootstrapped using cra), I had some notifications from my antivirus. 
It also stopped the installation of this dependency and prevented file to be copied. 

this is an already known issue: [ticket](https://github.com/veged/coa/issues/99)

workaround: I had to add the following lines to my package.json to use a specific version of that package. 

```
  "resolutions": {
    "coa": "2.0.2"
  },

```

fix: we should not use the latest version (2.1.1) of that package.
Repository: go
Issue: testing: document how to export unexported identifiers in *_test.go 
Labels: Documentation,NeedsInvestigation

While I am trying to introduce the usage of `export_test.go` to someone new to Go, I failed to find a document regarding this feature neither in [testing](https://pkg.go.dev/testing) nor in [go command](https://pkg.go.dev/cmd/go@go1.19.3#hdr-Testing_flags), not even in the wiki.

I am not sure if I overlooked somewhere, but I would propose documenting this somewhere more visible, such as the [testing](https://pkg.go.dev/testing) package's document.
Repository: stable-diffusion-webui
Issue: [Feature Request]: Img2Img-tab, Align and match size input/output images.
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Right now the input and output images are misaligned and different sizes,
1920x1080:
![img2imgUI_1](https://user-images.githubusercontent.com/113772485/204799360-98b23932-cdc7-4cae-9536-525d11765fa1.png)

2560x1440:
![img2imgUI_25601440](https://user-images.githubusercontent.com/113772485/204800567-07e54d06-de97-4dc6-8800-01e82293f9bc.png)


Is it possible to get it to look like this? (same size and next to each other) 
![img2imgUI_2](https://user-images.githubusercontent.com/113772485/204799531-18df36e1-dca2-47d1-9f5f-f999a0b653e4.png)


### Proposed workflow

1. Go to .... 
2. Press ....
3. ...


### Additional information

_No response_
Repository: animate.css
Issue: Can you add animations for more elements?
Labels: feature request,under consideration

### Is your feature request related to a problem? Please describe.

No, animate.css is really great
but its restricted to Text by default



### Describe the solution you'd like.

if you can add more animations specific to different html elements like
button, radio/check box, drop down controls, sliders, toggles and more

it would be great.
also if you can allow us to use remote animation scripts [like fontawesome] 
it will be even more terrific

### Describe alternatives you've considered.

lots of workarounds are there
animate.css as an extensive library would be great

### Additional Context

_No response_
Repository: vscode
Issue: Explore using `ArrayBuffer` as backend for editor text contents
Labels: debt,file-io

Explore to not use `string` but `ArrayBuffer` for the contents of a text editor which brings higher memory limits. See https://github.com/microsoft/vscode/issues/167719#issuecomment-1368141020

<details>
  <summary>Original Issue (now outdated)</summary>
I see how https://github.com/microsoft/vscode/issues/42839 introduced a way to avoid opening large files by telling the user to quit and restart with a larger `--max-memory`. First of all, I think asking the user to confirm opening a very large file is good because it may result in freezes or slowdown. However, I am no longer able to reproduce the endless freeze, even when opening a very large file (see comment [1] how to create a large file). Maybe given our work on sandboxing this issue is now different or not existent anymore?

At the same time, with the Electron 22 update, we get https://www.electronjs.org/blog/v8-memory-cage so I wonder if `--max-memory` is even still supported (maybe Deepak could clarify).

**This issue is to:**
* [ ] validate that our original assumptions for adding this still apply
* [ ] see if `--max-memory` still works with Electron 22
* [ ] and if not, maybe we change the UX to still block opening the file at first by asking the user for confirmation (similar to how we ask for confirmation before opening a binary file)

**[1] How to generate a large file**
Inspired by [this page](https://skorks.com/2010/03/how-to-quickly-generate-a-large-file-on-the-command-line-with-linux/), the following script that you can run from a macOS terminal produces a 4.23 GB random file for me after ~2min:

```zsh
ruby -e 'a=STDIN.readlines;100000000.times do;b=[];4.times do; b << a[rand(a.size)].chomp end; puts b.join(" "); end' < /usr/share/dict/words > file.txt
``` 

//cc @deepak1556 
</details>
Repository: next.js
Issue: next/script afterInteractive is not defering according to lighthouse
Labels: bug,Script (next/script)

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

    Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000
    Binaries:
      Node: 17.9.1
      npm: 8.11.0
      Yarn: 1.22.19
      pnpm: N/A
    Relevant packages:
      next: 13.0.6-canary.2
      eslint-config-next: 13.0.5
      react: 18.2.0
      react-dom: 18.2.0

### Which area of Next.js is affected? (leave empty if unsure)

Script optimizatzion (next/script)

### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

https://codesandbox.io/s/nextjs-script-defer-issue-mh6lnq

### To Reproduce

Add google tag scripts to your _app as stated in the next documentation.

```
<Script
  src={`https://www.googletagmanager.com/gtag/js?id=${trackingCode}`}
  strategy="afterInteractive"
/>
<Script id="gtag-init" strategy="afterInteractive">
  {`
  window.dataLayer = window.dataLayer || [];
  function gtag(){window.dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '${trackingCode}', {
    page_path: window.location.pathname,
  });
`}
</Script>
```


### Describe the Bug


The gtag scripts work correctly... however, when running lighthouse tests, you will see that the gtm scripts are still being loaded and block the main thread.

### Expected Behavior

The "afterInteractive" should defer scripts until after initial JS load so the main thread is not blocked.

### Which browser are you using? (if relevant)

chrome Version 107.0.5304.110 (Official Build) (arm64)

### How are you deploying your application? (if relevant)

GCP
Repository: kubernetes
Issue: no defined semantics for EndpointSlices of type "FQDN"
Labels: kind/bug,priority/backlog,sig/network,kind/documentation,help wanted,needs-triage

The API docs (and the end-user docs) state that "FQDN" is a valid value for EndpointSlice.AddressType, but nothing explains what the expected semantics of an FQDN slice are. And in fact, the expected semantics seem to be "[it gets ignored](https://github.com/kubernetes/kubernetes/blob/v1.26.0-rc.0/pkg/proxy/endpoints_test.go#L1590)".

We should document what FQDN slices are for, and if the answer is (and always will be) "nothing" then we should mark that value deprecated.

/assign @robscott 
/kind bug
/kind documentation
/sig network
/priority backlog
Repository: storybook
Issue: [Bug]: Documentation does not make clear which storybook packages must be installed
Labels: bug,needs triage

### Describe the bug

The documentation uses `npx storybook` and `build-storybook` but does not contain a minimal or full list of NPM packages that should be installed for storybook to work. For instance, I ran `npx storybook init` and I did not see any updates to my `package.json` and I did not see any list of packages in the command output. Should I include `@storybook/cli` in my package json so that I can run the commands for building? Should I always include `@storybook/addons-some-addon` in the package json? It is unclear from the documentation what to do if we aren't using `npx storybook`.

### To Reproduce

_No response_

### System

_No response_

### Additional context

_No response_
Repository: godot
Issue: tileMap GetLayersCount() return 1 while there is no layer
Labels: discussion,documentation,topic:2d

### Godot version

4.0.beta5.mono

### System information

MacOS 13.0.1

### Issue description

When there is no layer in tilemap

<img width="293" alt="image" src="https://user-images.githubusercontent.com/8757916/204826420-22e72733-1c19-4432-93d1-9f9ef5503bf4.png">

tileMap.GetLayersCount() still return 1

### Steps to reproduce

1. create a tilemap node
2. delete all layers inside it
3. run `GD.Print(tileMap.GetLayersCount());` it will show 1

### Minimal reproduction project

N/A
Repository: go
Issue: proposal: net/http/httptest: listen on IPv6/IPv4-agnostic loopback address 
Labels: Proposal

Related: 

 - https://github.com/golang/go/issues/29759
 - https://github.com/golang/go/issues/9334

Currently (1.20-dev), net/http/httptest listens preferentially on `127:0:0:1:0`, and falls back to `[::1]:0` [1]. At work, our (modified) Linux kernel/system is planned to start behaving like this:

 1. `net.Listen("tcp", "127.0.0.1:0")` succeeds (imagine it picked port 9999).
 2. `net.Dial("tcp", "localhost:9999")` resolves to `[::1]:9999`.

This causes tests to fail, as `httptest.NewServer` only registers on IPv4 in this case. Given that httptest is much more limited in scope than the `net.Listener` (https://github.com/golang/go/issues/9334), it may be feasible to change httptest behaviour to listen on `:0` so that both IPv4 and IPv6 are listened on.

The current behaviour in package net/http/httptest stems from f88abdad0fe9ac7659eb9cc8d0b703c98665dd19 (2011), it was copied as-is from the erstwhile fs_test aa9c213e564d58026fd6f822d43c8f3f6e66c68b. I couldn't really find a reasoning for why we explicitly listen on 127.0.0.1, so I thought I'd propose this and see what I missed.

[1]:

https://github.com/golang/go/blob/78472603c6bac7a52d42d565558b9c0cb12c3f9a/src/net/http/httptest/server.go#L60-L75
Repository: go
Issue: runtime: investigate a hybrid memory clearing strategy based on prove results
Labels: Performance,NeedsInvestigation,compiler/runtime

In some cases, it might be better/faster to have a hybrid memory clear where from prove we know that a clear will be at least X bytes long. 

We could use a static clear and then handle the unknown-sized remainder (either via a call to memclrNoHeapPointers or some inlined clear for the remainder). This could improve performance or allow more optimizations to fire due to the static clear part enabling things like DSE.
Repository: flutter
Issue: Evaluate isDense in ListTile, etc. versus VisualDensity
Labels: framework,f: material design,d: api docs,a: quality,team-design,triaged-design

Following up on https://github.com/flutter/flutter/pull/116194

In the M3 migration of ListTile,

> Note: Here I'm ignoring `isDense` and ListTiie drawer style since there is now a new widget `NavigationDrawer` that has its own drawer item that matches M3 specs. M3 `ListItem` specs don't have `isDense` and drawer style tokens and guidelines.

The previous `isDense` behavior may or may not be achieved through using `VisualDensity` instead. We should find out, and if so, consider deprecating `isDense` for a clearer solution with docs etc.

`isDense` is not used in a lot of places in the framework, in addition to ListTile there is DropdownMenuButton, InputDecoration & InputDecorationTheme. We should check all of these before.

cc @TahaTesser @darrenaustin @HansMuller
Repository: vscode
Issue: [remote tunnels] no notification shows up
Labels: bug,remote-tunnel

Testing #167455

1. Create new profiles on macOS and Windows machines.
2. Enable Settings sync on both machines, and configure it to only sync the UI state.
3. Confirm the Remote - Tunnels extension is not installed on either machine.
4. Because I used remote tunnels before, I already get a `remoteTunnelServiceUsed` key when checking the synced data with the "Settings Sync: Show Synced Data" command.
5. Start a tunnel on a machine, doesn't matter which.
6. :bug: No notification shows up on the other machine. At best, the value of the `remoteTunnelServiceUsed` key changes, but the version stays the same.
Repository: godot
Issue: Edit button not working in inspector for exported array with custom resource type
Labels: bug,topic:editor

### Godot version

v4.0.beta6.official [7f8ecffa5]

### System information

Windows 10

### Issue description

Can't edit custom resource properties in the inspector for exported typed array

### Steps to reproduce

Open MRP

1. Make a new Script that inherits from resource
2. Name it
3. Create a variable with export annotation
4. Create a _init function
5. Make a scene and attach a new script
6. Create a array with that custom resource type and export annotation
7. Try to edit it from inspector

### Minimal reproduction project

[Res Array Bug report.zip](https://github.com/godotengine/godot/files/10125313/Res.Array.Bug.report.zip)