sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/compile: explore optimizations for fixed-length array copies
Labels: Performance,NeedsInvestigation

https://github.com/golang/go/issues/46505#issuecomment-853372667 reports these results for [this benchmark](https://play.golang.org/p/BkYM9Gbi4t2):

```
BenchmarkNamed-8        201051339                6.263 ns/op
BenchmarkCopy-8         172203873                6.071 ns/op
BenchmarkPointer-8      1000000000               1.031 ns/op
```

We should see if cmd/compile can optimize the first two as efficiently as the last.

One observation though is they have different semantics: `SumNamed` and `SumCopy` need to support partial copies if `len(b) < Size256`, but `SumPointer` panics in this case.

We could probably efficiently handle `copy(ret[:], b[:Size256])` though, by rewriting it into `ret = *(*[Size256]byte)(b)` in the frontend.

Marking for Go 1.18 to at least explore possibilities here.

Related #20859.

/cc @randall77 @bradfitz @katiehockman
Repository: flutter
Issue: Consider a standard xcconfig of warning settings for flutter/packages
Labels: team,platform-ios,package,P3,team-ios,triaged-ios

In most iOS projects I've worked on we have a non-trivial list of warnings that we enable (Googlers, see also go/objc-recommended-warnings), since Xcode's defaults aren't particularly rigorous. I don't think we have anything like that in flutter/plugins; we should strongly consider making such a list as an xcconfig file (for ease of maintenance) and add it to all our plugins, fixing anything it turns up.

/cc @jmagman
Repository: pytorch
Issue: pytorch build failure on arm64
Labels: module: build,module: cuda,triaged,module: arm,module: jetson

hi -

On Nvidia Jetson Xavier, I am building pytorch (v1.8.1): it looks like gcc issued a garbled, cut-off option: `-n1 .2-a+fp16+rcpc+dotprod+crypto`, which should have been `-march=armv8.2-a+fp16...`, any ideal how it ended up like this?

 
```
...
running build_ext
-- Building with NumPy bindings
-- Detected cuDNN at ,
-- Detected CUDA at /usr/local/cuda
-- Not using MKLDNN
-- Not using NCCL
-- Building with distributed package

Copying extension caffe2.python.caffe2_pybind11_state
Copying caffe2.python.caffe2_pybind11_state from torch/lib/python3.9/site-packages/caffe2/python/caffe2_pybind11_state.cpython-39-aarch64-linux-gnu.so to /home/f7b/pytorch/build/lib.linux-aarch64-3.9/caffe2/python/caffe2_pybind11_state.cpython-39-aarch64-linux-gnu.so

Copying extension caffe2.python.caffe2_pybind11_state_gpu
Copying caffe2.python.caffe2_pybind11_state_gpu from torch/lib/python3.9/site-packages/caffe2/python/caffe2_pybind11_state_gpu.cpython-39-aarch64-linux-gnu.so to /home/f7b/pytorch/build/lib.linux-aarch64-3.9/caffe2/python/caffe2_pybind11_state_gpu.cpython-39-aarch64-linux-gnu.so
building 'torch._C' extension
gcc -pthread -B /home/f7b/miniconda3/envs/deep/compiler_compat -Wl,--sysroot=/ -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /home/f7b/miniconda3/envs/deep/include -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /home/f7b/miniconda3/envs/deep/include -fPIC -I/home/f7b/miniconda3/envs/deep/include/python3.9 -c torch/csrc/stub.c -o build/temp.linux-aarch64-3.9/torch/csrc/stub.o -Wall -Wextra -Wno-strict-overflow -Wno-unused-parameter -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-deprecated-declarations -fno-strict-aliasing -Wno-missing-braces
gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
gcc: error: unrecognized command line option ‘-n1’; did you mean ‘-n’?
gcc: error: unrecognized command line option ‘-n1’; did you mean ‘-n’?
error: command '/usr/bin/gcc' failed with exit code 1
```


cc @malfet @seemethere @walterddr @ngimel
Repository: go
Issue: cmd/vet: report strings.Trim/TrimLeft/TrimRight with duplicate runes in cutset
Labels: Proposal,Proposal-Accepted,Analysis

`go vet` should ideally report likely misuses of standard library functions especially when it comes to providing constant(-ish) string arguments, e.g. (note: the following list is absolutely not exhaustive)

- `strings.(Trim|TrimLeft|TrimRight)` with a [`cutset` containing duplicated runes](https://github.com/golang/go/issues/46446#issuecomment-851767418)
- `net/http.NewRequest` with an invalid HTTP `method` or a non-HTTP `url`
- `net/http.(Do|Get|Post)` with a non-HTTP `url`
- `regexp.(Must)?Compile` with an invalid `regexp`
- `(text|html)/template.Template.Parse` with an invalid template `text`
- (and so on, for all functions/structs where it makes sense; not all of them need to be added right away, coverage will likely improve over time)
Repository: kubernetes
Issue: Add conformance tests for required SANs (like kubernetes.default) in apiserver serving certificate
Labels: kind/feature,help wanted,sig/architecture,area/conformance,lifecycle/frozen,needs-triage

#### What would you like to be added:

E2E / conformance tests that verify names like `kubernetes.default`, `kubernetes.default.svc`, etc. are part of Subject Alternate Name (SAN) list in the Kubernetes API server serving certificate. (The full list of PQDNs and FQDNs that should be validated may need to be determined).

#### Why is this needed:

There are already E2E / conformance tests for in-cluster DNS resolution of the above names, but there are no tests that validate the corresponding SANs in the serving certificate. Kubernetes distributions that fail to include one of these in the SANs list of serving certificate will pass the conformance tests, but in-cluster clients attempting to establish HTTPS connection to the API server using a name without a corresponding SAN entry will fail (at SSL/TLS handshake). 

While many in-cluster clients (including client-go, it seems) rely on KUBERNETES_SERVICE_HOST environment variable instead, some (many?) don't. Note that `https://kubernetes.default.svc` is suggested as the proper endpoint in many places, including Kubernetes documentation (e.g. [here](https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/#directly-accessing-the-rest-api)).
Repository: excalidraw
Issue: free draw thickness and scaling
Labels: Candidate P1

Two issues I've had while using Excalidraw are:

- Even the thinnest free draw option is too thick;
- Scaling down drawn objects does not scale down their thickness, and that means scaling down is almost unusable.

I'd love to have thinner line options, and for scaling to scale down thickness.

Also, this is an aside but touch input is very slow on my laptop, could this be because it has little to no VRAM? I haven't experienced slow drawing input in any other software, so it's pretty weird to see it in Excalidraw.
Repository: transformers
Issue: Add SENet Blocks in Encoding Layers
Labels: Feature request

# 🚀 Feature Request

I read the article "[SesameBERT: Attention for Anywhere](https://arxiv.org/pdf/1910.03176.pdf)" and would like to add SENet blocks in the Huggingface implementation. The article's authors made an implementation with [Tensorflow](https://github.com/ICLR2020Sesame/SesameBert/blob/master/modeling.py), but I would like to use the lib in pytorch.

## Motivation

The use of ([Squeeze-and-Excitation Networks](https://arxiv.org/abs/1709.01507)) SENet Blocks has obtained state-of-the-art results. And they seem to be promising in NLP.

## Your contribution

I know that it is possible to modify the [[BertLayer()](https://github.com/huggingface/transformers/blob/61c506349134db0a0a2fd6fb2eff8e29a2f84e79/src/transformers/models/bert/modeling_bert.py#L430)] and [[BertEnconder()](https://github.com/huggingface/transformers/blob/61c506349134db0a0a2fd6fb2eff8e29a2f84e79/src/transformers/models/bert/modeling_bert.py#L513)] classes

Any suggestions on how to modify the code so that you can apply the idea used in the article?

![image](https://user-images.githubusercontent.com/25322394/120578580-0f3ca000-c3f4-11eb-9a14-93bf610c3a60.png)
Repository: rust
Issue: slice docs could use example functions, clear header
Labels: C-enhancement,T-libs-api,A-docs,A-slice

The API docs for the [slice type] describes what `[T]` is and explains the meaning of `&[T]` and `&mut [T]`, but this can still be vague for Rust programmers. A programmer with even a modest interest in using Rust for what it's been strongly advertised for, systems programming, is very likely to encounter the need to slice bytes between days 0 to 7, when they have not yet adjusted to Rust syntax and are not clear on why the type's identification in a function signature or type annotation is not the same as its name. In addition, it is easy to miss the type annotations in the existing examples.

Recently, on nightly, the struct declaration of e.g. `std::vec::Vec` has been made visible, making an easy to read "header" that quickly gives an example of the type. This is very nice for generated structs, especially ones with type parameters, but primitives have a harder time of it, as there's no obvious "declaration" to give to a reader. Instead, the problem to address is an immediate "okay, what does this look like in usage?" So, a clear example of a very simple function signature as one of the visible examples, and possibly raising the descriptions of `&[T]` and `&mut [T]` towards the top of the page, may help clarify this.

[slice type]: https://doc.rust-lang.org/nightly/std/primitive.slice.html

### Reproducer
We tried the documentation page for the [slice type].
We expected to see an easy-to-read example of a function that accepts or returns slices.
Instead, we scanned the page without finding a clear example of such, and found it easy to miss the existing examples.
May require being mildly tired or undercaffeinated to reproduce.

### Docs Version
```bash
# at the time of this issue, this could use improvement for both the stable and nightly std API docs
rustc 1.54.0-nightly (9111b8ae9 2021-05-26)
rustc 1.52.1 (9bc8c42bb 2021-05-09)
```
Repository: godot
Issue: Viewports are messy and displayed wrong
Labels: topic:core,needs testing

Hi there,

i want to use a viewport to show a label as texture on a plane. But I have some issues with using viewports.

1. When using a viewport nothing shows up: https://pasteall.org/pic/bbdf47657f364a0b903610284cd0e9a1
2. Everything seems to work fine when using no viewport but a viewportcontainer only: https://pasteall.org/pic/cd21b28fa64f4e83bb495ec22cea8638 but if this is intended what are viewports even made for?
3. When using a viewportcontainer and a viewport it only displays parts of what I want to show and it is stretched looks bad and the BIGGER i make the viewport the more clinched and smaller it shows everything as shown here with size 500: https://pasteall.org/pic/8c75cdf7a77b46f8b6fc46bdf6e26858 and size 100(nothing else was changed here, all other values, objects, the whole scene stayed the same): https://pasteall.org/pic/a58efb8e8c3e4d17ab0b48e2c2b00740

How to get my text to display properly and get rid of those issues?
Repository: vscode
Issue: Move notebook integration tests off commands
Labels: debt,notebook

The notebook integration tests rely on `executeCommand` a lot and that isn't good. We should modernize them and use API that came into existence, e.g instead of `executeCommand('vscode.openWith', resource, 'notebookCoreTest');` the `vscode.window.showNotebookDocument` API should be used. 

* use `openNotebookDocument` to create notebook document
* use `showNotebookDocument` to open an editor
* never assume the active notebook editor is "stable" use return value from above function instead
* use the `WorkspaceEdit` and not things like `executeCommand('notebook.cell.delete')`
Repository: flutter
Issue: Path() constructor is very expensive
Labels: engine,c: performance,perf: speed,P2,team-engine,triaged-engine

I wrote a little graphics library in Dart (https://github.com/google/iconvg/tree/main/src/dart) and when I profiled it by running its decoder pipeline in a tight loop, i discovered that literally half the time was spent in the `Path` constructor. Changing the code from using `path = Path()` to using `path.reset()` when I need a new path almost halved the time per iteration (from 114,092ns per decode to 61,256ns per decode).

We should fix this so the Path constructor is fast.

Failing that we should at least call it out in the API docs and point people to `reset`.

cc @dnfield
Repository: rust
Issue: rustdoc intra-doc links cannot disambiguate inherent methods on generic types
Labels: T-rustdoc,C-bug,A-intra-doc-links

```rust
struct A;
struct B;
struct My<T>(T);
type MyA = My<A>;
type MyB = My<B>;

impl MyA { pub fn foo() {} }
impl MyB { pub fn foo() {} }

/// * fails: [MyA::foo]
/// * links to MyA::foo: [My<A>::foo]
/// * fails: [MyB::foo]
/// * links to MyA::foo: [My<B>::foo]
/// * links to MyA::foo: [My::foo]
/// * fails: [My<B>::foo-1]
pub fn main() {}
```

In this example, there are two implementations of `My::foo` for specific instantiations of the parameter. These both show up in the page for `struct My`, which is fine, I guess, and the links to the two methods are respectively `struct.My.html#method.foo` and `struct.My.html#method.foo-1`, so the URL scheme has difficulty with differentiating them. But I don't think intra-doc links have any analogous way to disambiguate these kinds of methods, and the substitution syntax `My<A>::foo` doesn't seem to work (it assumes that `A` is a type variable, not a struct).

This is similar to issues #74563 and #62834, and the (incorrectly closed) #54172 is about the version of this issue for trait impls, but here it's just inherent methods for different substitutions and/or type aliases. (I would like to use the type alias in the doc link, but really any way to refer to both items in the presence of this kind of ambiguity would be great.)
Repository: PowerToys
Issue: Color picker returns incorrect values when an icc color profile is used on monitor
Labels: Idea-Enhancement,Help Wanted,Product-Color Picker

### Microsoft PowerToys version

0.37.2

### Running as admin

- [X] Yes

### Area(s) with issue?

ColorPicker

### Steps to reproduce

If your monitor has an icc profile applied, the return values differs from what is actually stored in the program that displays the color.

### ✔️ Expected Behavior

It seems to be a problem on screenshots in general and I guess color picker uses screenshot functionnality at some point. If I do a screenshot when having an icc profile, I have to go to photoshop and assign my icc monitor profile on the image, then convert to srgb to get the good values back.

There should be 2 options for icc profile for color picker :

- 1 to set the icc profile of the monitor
- 1 to choose the desired icc profile for output the value (srgb by default I guess).

The value displayed in the color picker would be first assigned in the color space of the monitor then converted to the output icc profile choosen.

As a bonus, there should be an hotkey to do this color assign/convert to images in the clipboard. So you can make a screenshot, do the color correction with hotkey directly in the clipboard, then just paste the image in the document.

### ❌ Actual Behavior

As an example I color picked the red "Issue-Bug" label on the right of this bug report.

The color picked value is returned as : rgb(199, 55, 23)
But in the source of the page, the correct value is : rgb(230, 0, 0)


### Other Software

_No response_
Repository: node
Issue: HTTP2 `res.writableFinished` without calling `.end()`
Labels: http,stream,http2

I noticed this from an assertion i production. A http2 response can become `writableEnded` and `writableFinished` without the user ever calling `response.end()`. I believe there is some special logic for `HEAD` requests that causes this behavior.

I think this is suboptimal from a streams perspective but could still be considered ok behavior. I don't think "self ending" streams are a good idea. However, from a http1 compat perspective it does differ in behavior from http1 response which can cause unexpected problems if one assumes that a http2 compat response behaves exactly like a http1 response.

I basically had something like this in our code:

```js
function onUpstreamComplete (trailers) {
    const { res } = this

    // Ensure we don't have a bug somewhere "corrupting" state by prematurely ending or destroying response. 
    assert(!res.destroyed)
    assert(!res.writableEnded)
    assert(!res.writableFinished)
    
    writeTrailers(res, trailers)

    res.end()
} 


```
Repository: vscode
Issue: Remote terminals don't respect strictEnv
Labels: bug,remote,terminal-process

extension code like:
```
	makeCommand('createNamedTerminal', () => {
		const t = vscode.window.createTerminal({ name: 'My Terminal :)', env: { myvar: 'hello:)' }, strictEnv: true });
		t.show();
		return t;
	});

	context.environmentVariableCollection.append('HOME', 'homey');


	vscode.window.onDidOpenTerminal(t => {
		console.log('new terminal', t.creationOptions);
		t.sendText('ls', true);
	});
```

settings json like:
```
    "terminal.integrated.env.linux": {
        "oogy": "boogy"
    },
    "terminal.integrated.env.osx": {
        "oogy": "boogy"
    }
```

On my local machine (mac), creating the created terminal has neither `HOME` nor `oogy` modified, however when I do the same on remote-ssh/linux I get that they've both been applied:

![image](https://user-images.githubusercontent.com/8586769/96325578-c4455800-0fdd-11eb-9865-54cabf0f8d41.png)
Repository: TypeScript
Issue: Renaming file doesn't update imports in other projects which reference this project
Labels: Suggestion,Experience Enhancement

# 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.
-->

rename file folder move project references

### 💻 Code

Reduced test case: https://github.com/OliverJAsh/ts-project-references-rename-bug-test-44411

`tsconfig.json`:
```json
{
    "files": [],
    "references": [
        {
            "path": "./app/tsconfig.json"
        },
        {
            "path": "./shared/tsconfig.json"
        }
    ]
}
```

`shared/tsconfig.json`:
```json
{
    "compilerOptions": {
        "composite": true
    }
}
```

`shared/foo.ts`:
```ts
export const foo = 1;
```

`shared/bar.ts`:
```ts
import { foo } from "./foo";

foo
```

`app/tsconfig.json`:
```json
{
  "compilerOptions": {
    "composite": true,

    "paths": {
      "shared/*": ["../shared/*"]
    }
  },
  "references": [
    {
      "path": "../shared/tsconfig.json"
    }
  ]
}
```

`app/main.ts`:
```ts
import { foo } from "shared/foo";

foo;
```

### Steps to reproduce

1. Open VS Code and navigate to `shared/foo.ts`
1. Wait for VS Code to finish initialising TS.
1. Rename the file to something else e.g. `foo2.ts`

### 🙁 Actual behavior

- File is renamed
- Imports in the current project are updated
- Imports in other projects which reference this project **are not** updated

[tsserver.log](https://github.com/microsoft/TypeScript/files/6625895/tsserver.log)

### 🙂 Expected behavior

- File is renamed
- Imports in the current project are updated
- Imports in other projects which reference this project **are** updated. For example, `app/main.ts` which imports `shared/foo.ts`.
Repository: TypeScript
Issue: Type inference worked in 4.2.3 but fails in 4.3.2
Labels: Bug

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

type inference

### 🕗 Version & Regression Information

4.3.2

<!--
"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:
-->
- This is a crash
[x] This changed between versions _4.2.3_ and _4.3.2_
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______

### ⏯ 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?strictNullChecks=false&ts=4.2.3#code/JYOwLgpgTgZghgYwgAgApQPYFsAOYDCAFhsEgPJ7AYgDOAPACrIQAekIAJjcjWFKAHMAfMgDeAKACQAGzgAjCNIBcPPoIDcUuQFcwYait78QAzZI4R426WAD8KhmYTFSEGiqgQ4HatICeyAAUyEwAPsgA2qrGAgA0IcgAusgAlBGJmgC+4uIw2iAIYFQgyDiYuAQuSIzMbBCc3EaCQsEYlNQ09mhwUEVw0nTo2HhEJOTttIxCIili4sgLyJ5g2lAlbUUdtgB0zmNuO1EADEnItrbIINbS6sgA9Hc8wLjSwDDAEBzi2eIIHWDIPauZAAXlK5RGVQgwVEyFkCmUyAA5Kw4C8IEj4jo9AZkTRFBBCpjAVD3JF5osokirtJpMSadIkrEKQsqWQQBj4kjqBimSzIsiGAB3DDEpFgEVIvmLAVIhiETyc5FgBUQXmJcTJTKpTRAA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
(strict null checks off)
```ts
interface PromptChoiceOptions<T extends string> {
	label: string;
	button: string;
	default?: T;
	choices: readonly ( T | [ string, T ] )[];
}

function promptChoice<T extends string>( options?: Partial<PromptChoiceOptions<T>> ) {
    return options?.choices?.[ 0 ] ?? null; // simplified
}

const choice = promptChoice( { label: 'example', button: 'select', choices: [
    [ 'null', null ], // problem seems to be related to this line
    [ 'One', 'one' ],
    [ 'Two', 'two' ],
    [ 'Three', 'three' ]
] } );
```

### 🙁 Actual behavior

Type `[string, "two"]` is not assignable to type `[string, "one"]`

### 🙂 Expected behavior

`choice` is inferred to be `'one'|'two'|'three'`


---
In creating a minimal repro for this, I discovered that commenting out the `null` choice makes the code behave properly.  Also, changing the type of `choices` to `readonly ( T | [ string, T|null] )[];` with strict null checking makes the problem always occur.
Repository: flutter
Issue: Allow SwitchListTile, CheckboxListTile and RadioListTile to also be able to change horizontalTitleGap, minVerticalPadding, minLeadingWidth
Labels: c: new feature,framework,f: material design,c: proposal,team-design,triaged-design



## Use case

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

Allow SwitchListTile, CheckboxListTile and RadioListTile to also be able to change horizontalTitleGap, minVerticalPadding, minLeadingWidth like here: https://github.com/flutter/flutter/pull/64222

## Proposal

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->

I have a PR ready to go, just creating this ticket to be able to link to it.