sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/compile: parser rejects unambiguous unparenthesized TypeName composite literals in Condition expression of ForClause
Labels: NeedsDecision,compiler/runtime

This package is rejected as syntactically invalid by go/parser and cmd/compile (and Go 1.4's 6g), but accepted by gccgo:

```
package p

type T struct{}

func F() {
	for ; T{} == T{}; {}
}
```

The Go spec says [emphasis added]:

> A parsing ambiguity arises when a composite literal using the TypeName form of the LiteralType appears as an operand between the keyword and the opening brace of the block of an "if", "for", or "switch" statement, and the composite literal is not enclosed in parentheses, square brackets, or curly braces. In this rare case, the opening brace of the literal is erroneously parsed as the one introducing the block of statements. **To resolve the ambiguity, the composite literal must appear within parentheses.**

I think the intention here is that this is a gccgo parser issue for allowing TypeName composite literal between `for` and `{` without enclosing it in parentheses.

However, arguably this case isn't *actually* ambiguous: we've seen one semicolon after the `for` keyword, so we know to expect another `;` before the `{`. And so the emphasized sentence technically doesn't apply as there's no ambiguity to resolve, and the program *should* be accepted.

/cc @griesemer @ianlancetaylor
Repository: godot
Issue: Pivot Mode misaligns Sprite's children nodes
Labels: bug,topic:editor,topic:2d

### Godot version

3.3.stable

### System information

Windows 10

### Issue description

When changing the pivot of a sprite, its children keep their old position, misaligning the nodes:

https://user-images.githubusercontent.com/89750373/131898251-257a82a2-7acd-4bc7-b5b1-bf3baa03dfe3.mp4

### Expected behaviour:

Pivot Mode should update the position of Sprite's children to keep all nodes aligned:

https://user-images.githubusercontent.com/89750373/131899658-c037859a-fea3-48b8-9050-f79e03a63f7f.mp4

Maybe this should also happen when the offset property of a Sprite is changed directly? (In-editor only, for consistency and quality of life)

### Steps to reproduce

1. Add a Sprite node to the scene;
2. Add a children node to the Sprite node;
3. Change the offset of the Sprite node, directly or using the Pivot Mode ("Click to change object's rotation pivot.") on the toolbar.

### Minimal reproduction project

_No response_
Repository: go
Issue: x/sys/unix: add ParseDirent variant that doesn't allocate?
Labels: Performance,NeedsInvestigation,FeatureRequest,compiler/runtime

I recently wrote a function:

```go
func CurrentOpenFDs() int { .... }
```

... to return how many file descriptors are open by the process. For Linux, the naive implementation is:

```go
func CurrentOpenFDs() int {
	ents, _ := os.ReadDir("/proc/self/fd")
	return len(ents)
}
```

... but that allocates a bunch. Enough that it showed up disturbingly high in profiles. (worse: the more FDs open, the worse it is)

With some unsafe and Linux-specific stuff, you can get it down to zero allocations (e.g. https://github.com/tailscale/tailscale/pull/2785).

Any objections to a `unix.ParseDirent` variant that parses dirents without allocating?

Then https://pkg.go.dev/golang.org/x/tools/internal/fastwalk could also use it.

/cc @ianlancetaylor @tklauser @crawshaw @dsnet
Repository: flutter
Issue: Make sure the `TextEditingValue` in the platform text input plugin and the framework converge after concurrent edits
Labels: a: text input,framework,engine,c: proposal,P2,team-engine,triaged-engine

Currently platform text input plugins and the framework have their own local replicas of the document being edited by the user. A local update to one document will be sent to update the other (remote) document to keep both in sync, using a platform channel message. It is crucial that both replicas having the exact same state when all communications are finished, to make sure the platform (and the system services like IME, autofill, etc,.) and the framework are looking at the same document.

Our current strategy is to encode the entire document in each update message to the remote document and overwrite the remote document. To avoid sending the same document over and over (echoing), both the platform text input plugin and the framework have logic to track the last known state of the remote document and only send updates when the local document's state is different from the last known remote state. There's a (not so slim) chance the states of the 2 replicas diverge after concurrent edits on both documents: 

![document_sync drawio](https://user-images.githubusercontent.com/31859944/131902246-ef1905c1-33e2-45cd-ba90-cf8d917d326b.png)
*The text input plugin and the framework's documents are initially synced, both start from `S(0, 0)`. If a local edit brings the text input plugin's state to `S(1, 0)` and before the change can be synced to the remote document, the remote document also makes a change that brings its state to `S(0, 1)`, with the current implementation the 2 documents simply exchange states thinking the other document is in the same state.*

With the current implementation the consistency is likely to be quickly restored, when the next update arrives (thanks to the redundancy in each update message) , however this may still cause unexpected behaviors, for instance the IME's predictive text bar may show completely irrelevant suggestions when this happens.

As https://github.com/flutter/flutter/issues/87972 is being implemented it's likely that in the future we'd like to remove the redundancy in each diff-based update message to free up the bandwidth/memory, which will absolutely require both documents to converge (otherwise they're going to diverge further and further).
Repository: TypeScript
Issue: Prettier OOM in user tests
Labels: Bug,Infrastructure,Crash,Rescheduled

Would be good to figure out what caused this, at least.

https://github.com/typescript-bot/TypeScript/pull/201/files#diff-a5ae8c317b5840b52eb30224e457b39403bd5da2dc9262e340a945060cad44f2R18-R36
Repository: go
Issue: internal/fuzz: revisit use of shared memory-mapped files for marshaled inputs
Labels: NeedsInvestigation,fuzz

Currently, the fuzzing coordinator process creates a 100MB temporary file for each worker process. Both the coordinator and worker read and write the file via a shared memory map. The file is currently used for 1) a few "header" fields such as iteration count and PRNG state, and 2) passing *marshaled* inputs for fuzzing in both directions.

We still need to use shared memory for the header fields. If a worker process terminates unexpectedly, the coordinator needs to be able to reconstruct the input that caused the crash using the initial input (sent from the coordinator), the call count, and the PRNG state.

However, it's not strictly necessary to write marshaled inputs to shared memory. It would be simpler to pass these through the pipes we use for RPCs. If we only supported unmarshaled byte slices, there would be a performance advantage to writing and mutating those directly in shared memory without incurring the cost of marshaling and pipe I/O. Since we need to marshal inputs anyway, it's not clear the extra complexity is worthwhile.

We should investigate the performance difference and pass inputs through pipes if it's not too bad. This would simplify our implementation, and would let us use much smaller shared memory files.

Additionally, for inputs that can be read from files, such as those in testdata or the cache, we can pass file names over pipes instead of reading, and sending that data over pipes. The coordinator doesn't need to hold that data in virtual memory at all.
Repository: flutter
Issue: Add flag to pass iOS and macOS app-level environment variables 
Labels: platform-ios,tool,c: proposal,P3,team-ios,triaged-ios

Under the covers, the Flutter tool is using ios-deploy for deploying the built app to device.  We should surface ios-deploy's `-env` flag to the flutter tool so we can launch iOS apps with memory debugging tools like NSZombies.  Otherwise, the only way to do it is launching the app through Xcode.

cc @jmagman
Repository: go
Issue: archive/zip: Writer drops fs.FileMode data
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.17 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOENV="/home/user/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/user/go/pkg/mod"
GOOS="linux"
GOPATH="/home/user/go"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.17"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2958766942=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
Two zips were created with Info-ZIP 3.0 and `Writer`:
(it was assumed that the archive files may not be identical, but the input files were) 
- [info.zip](https://github.com/golang/go/files/7102171/info.zip)
```sh
mkdir -p path/to/ dir/
touch path/to/file
chmod 0666 path/to/file dir/
zip info.zip path/to/file dir/
```
- [stdlib.zip](https://github.com/golang/go/files/7102173/stdlib.zip)
```go
w := zip.NewWriter(os.Stdout)
w.Create("path/to/file")
w.Create("dir/")
w.Close()
```

We can see that both (according to `Reader`) have the same permissions: https://play.golang.org/p/SLK2LT1e1Gs
```
[stdlib] path/to/file: 0o666
[stdlib] dir/: 0o20000000666
[infozip] path/to/file: 0o666
[infozip] dir/: 0o20000000666
```

Thus we would expect `unzip` (still Info-ZIP 3.0), to unpack them identically:
```
[user@localhost ~]$ unzip /path/to/file.zip
Archive:  /path/to/file.zip
  inflating: path/to/file
   creating: dir/
 ```
### What did you expect to see?
(from `info.zip`)
```
[user@localhost ~]$ ls -lR
.:
total 0
drw-rw-rw- 2 user users 40 Dec 31  1979 dir
drwxr-xr-x 3 user users 60 Sep  2 21:45 path

./dir:
total 0

./path:
total 0
drwxr-xr-x 2 user users 60 Sep  2 21:45 to

./path/to:
total 0
-rw-rw-rw- 1 user users 0 Dec 31  1979 file
```

### What did you see instead?
(from `stdlib.zip`)
```
[user@localhost ~]$ ls -lR
.:
total 0
drw-r-xr-x 2 user users 40 Dec 31  1979 dir
drwxr-xr-x 3 user users 60 Sep  2 21:45 path

./dir:
total 0

./path:
total 0
drwxr-xr-x 2 user users 60 Sep  2 21:45 to

./path/to:
total 0
-rw-rw-rw- 1 user users 0 Dec 31  1979 file
```
Repository: flutter
Issue: Clean up the benchmark key choices in the perf_tests
Labels: a: tests,team,framework,P2,c: tech-debt,team-framework,triaged-framework

There are some common set of benchmark keys expected for tests run from the perf_tests.dart mechanism, but many benchmarks still hard-code the keys they produce and the default keys in that file aren't necessarily available in all benchmark tests. Many benchmarks have different modes they run in (e2e/timeline/memory/semantics) and each variant can produce a different set of keys and may not be interested in other keys that are produced under the same style of run.

For example, one run may be testing performance and so it would want those keys that reflect performance and not others that reflect memory or other conditions. Other tests are recording memory statistics and may necessarily induce frequent GC and other cleanup in order to evaluate leaks and other memory pressure constraints - those tests might not want to report frame timings.

Right now there is a confusion of some cases of automatically declared benchmark keys and other cases where benchmarks have to manually list the keys they want reported for them. There should be a more flexible way to specify which kinds of keys matter for a given benchmark run and which are available without having to have many lists of string keys throughout the benchmark source files.
Repository: PowerToys
Issue: Selective Application Color Inversion 
Labels: Idea-New PowerToy

### Description of the new feature / enhancement

Selectively invert colors of applications, override the default 'light mode' rendering via the magnifier's 'docked mode':

Example of how it is done: [LINK](https://superuser.com/questions/341227/how-to-invert-colors-of-a-specific-application-or-window-only-using-magnifier) 

From the above link (Greenonline's answer):
>So to achieve what you require, you will have to use in Docked mode, specifying a region occupied by a window (adjust the window to your particular tastes beforehand). Unfortunately, you can not thereafter move the window and expect the magnifier to follow it, but you can always "re-dock" the magnifier to the new window position. Not ideal, but better than nothing.

The above-provided answer does not perfectly work as it follows 
My intention is to make this "re-docking" automated with the help of power toys. Hence, providing a perpetual dark mode.

### Scenario when this would be used?

Let's say that you are working in a dark system theme, and have configured most of your applications in dark mode, but there is a new app that cannot be configured into dark mode. Consider that we need to follow a workflow that requires this 'light /default mode' app to run alongside the dark mode apps. This would cause eye strain. 

The selective app color invert can be used to invert the colors of the selected application in an easy manner. reopening the app would still be overridden with the color inversion applied. 

Example:
I always use my apps in dark mode, but Veroroute is in light mode by default:
![Screenshot (41)](https://user-images.githubusercontent.com/37873142/131930374-3b7c12ab-46d6-4b46-9ab8-90a663419422.png)

However, using the magnifiers' (docked mode +invert colors), it is easy on the eyes... almost:
![Screenshot (40)](https://user-images.githubusercontent.com/37873142/131930453-d109faa6-8a95-4ce7-8516-de95885bdea5.png)


### Supporting information

[LINK](https://superuser.com/questions/341227/how-to-invert-colors-of-a-specific-application-or-window-only-using-magnifier) to the answer. (same as mentioned above).
Repository: PowerToys
Issue: PowerToys Run Idea : Option to change Ctrl+C to Copy the file instead of copying the File Path
Labels: Idea-Enhancement,Help Wanted,Needs-Community Feedback,Product-PowerToys Run,Run-Plugin

### Description of the new feature / enhancement

PowerToys Run: Allow user to change what Ctrl+C does.

Personally, I don't see the point in only copying the File Path. 
To me, as someone who works in design, it would be great to have the option to copy the file instead.

### Scenario when this would be used?

It would be great to quickly copy-paste files into e.g File Explorer, Photoshop, Illustrator, etc. directly from Powertoys Run with ctr+c.

### Supporting information

_No response_
Repository: terminal
Issue: Quake mode doesn't scale width when changing monitor size
Labels: Help Wanted,Issue-Bug,Product-Terminal,Priority-3,Area-Windowing

### Windows Terminal version (or Windows build number)

1.11.2421.0

### Other Software

Windows 10 20H2 build 19042.1165

### Steps to reproduce

1. Start Windows Terminal while using wider monitor on laptop dock and open quake window
2. Unplug laptop from dock
2. Show the quake window (may not be necessary)
3. Hide the quake window (may not be necessary)
4. Plug back into dock
5. Show the quake window

### Expected Behavior

When I plug back into my external monitor I'd expect the width of the quake window to fit the width of the monitor, or at the very least, to be able to resize the quake window horizontally to make this be the case.

### Actual Behavior

The quake window stays sized to the narrower monitor, even after switching back to a wider monitor (see screenshot below).

![image](https://user-images.githubusercontent.com/803016/131936946-f1c2e3bf-014b-4f12-9f71-f9139d63d684.png)
Repository: TypeScript
Issue: Cannot use `override` keyword to override methods of `Object` without explicitly extending `Object`
Labels: Suggestion,Awaiting More Feedback

# Bug Report

### 🔎 Search Terms

override, TS4112

### 🕗 Version & Regression Information

It happens in 4.4.2 and has been there since the introduction of `override` keyword (#39669).

### ⏯ Playground Link

https://www.typescriptlang.org/play?#code/MYGwhgzhAECC0G8BQ1oHsBuBTATjglgCZbQAuaAyqQQHYDmAFAJSKo5akCuON0A5ADM0aPgG5oAXyQSgA

### 💻 Code

```ts
class A {
  override toString() { return 'foo'; }
}
```

### 🙁 Actual behavior

`TS4112: This member cannot have an 'override' modifier because its containing class 'A' does not extend another class.`

### 🙂 Expected behavior

It should be allowed, since the method overrides `Object.prototype.toString`.

Per ECMAScript spec [§15.7.12.7](https://tc39.es/ecma262/multipage/ecmascript-language-functions-and-classes.html#_ref_17670), a class without an explicit `extends` clause  would be implicitly inheriting from `Object`. Therefore, such classes should be allowed to explicitly override methods declared in [Object](https://github.com/microsoft/TypeScript/blob/a53ab0935dc769b03f453d09ef4dda697380ba2f/lib/lib.es5.d.ts#L120).
Repository: vscode
Issue: Git - git warnings show an error popup with cancel button
Labels: feature-request,git

<!-- ⚠️⚠️ 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.59.1
- OS Version: windows 10

Steps to Reproduce:

1. trigger a warning (ie. try to add a file with CRLF)
2.
![image](https://user-images.githubusercontent.com/57028336/131953024-e413ab94-ad48-473f-bca5-5d90f4893be4.png)

the icon should be more like
![image](https://user-images.githubusercontent.com/57028336/131953108-07a8229b-84bf-4fd3-be4a-af43226f404f.png)


and the "Cancel" button should say "OK". arguably, they shouldn't even be modal popups and instead they should just appear as a notification on the bottom right
Repository: excalidraw
Issue: Provide option to hide activity of other users when in a collaboration session
Labels: enhancement,good first issue

Seeing the cursor and selection of other users in a live collaboration session can be very useful but on other occasions it is a significant distraction. Providing the option to hide the activity of the other users, i.e selection and cursor position, would be a great and hopefully simple addition. 

Note: this would be particularly valuable for those experiencing the bug report in [#2780](https://github.com/excalidraw/excalidraw/issues/2780)
Repository: godot
Issue: Area2D prints an error when the node is removed from the scene tree during a `mouse_entered` or `mouse_exited` method call
Labels: bug,topic:physics,topic:input

### Godot version

3.3.3stable gdscript

### System information

windows 10, gles3, gtx 1050ti

### Issue description

I found a bug in Area2D. If you destroy yourself during mouse entry and click events, it will report an error.

### Steps to reproduce

![image](https://user-images.githubusercontent.com/6943500/131961054-e7c6addf-be3a-4fbc-b259-7d665293ee13.png)


### Minimal reproduction project

[aaa.zip](https://github.com/godotengine/godot/files/7103775/aaa.zip)
Repository: pytorch
Issue: torch.onnx.export crash while export quantized model
Labels: module: onnx,triaged

## 🐛 Bug
I used torch.quantization.quantize_dynamic quantize a model to int8, the result is nice.
But, when I exported the quantized model to onnx with torch.onnx.export, I got error as bellow:
    torch.onnx.export(model, (dummy_input, hidden), path)
  File "C:\Users\???\AppData\Roaming\Python\Python37\site-packages\torch\onnx\__init__.py", line 280, in export
    custom_opsets, enable_onnx_checker, use_external_data_format)
  File "C:\Users\???\AppData\Roaming\Python\Python37\site-packages\torch\onnx\utils.py", line 94, in export
    use_external_data_format=use_external_data_format)
  File "C:\Users\???\AppData\Roaming\Python\Python37\site-packages\torch\onnx\utils.py", line 695, in _export
    dynamic_axes=dynamic_axes)
  File "C:\Users\???\AppData\Roaming\Python\Python37\site-packages\torch\onnx\utils.py", line 459, in _model_to_graph
    _retain_param_name)
  File "C:\Users\???\AppData\Roaming\Python\Python37\site-packages\torch\onnx\utils.py", line 422, in _create_jit_graph
    graph, torch_out = _trace_and_get_graph_from_model(model, args)
  File "C:\Users\???\AppData\Roaming\Python\Python37\site-packages\torch\onnx\utils.py", line 373, in _trace_and_get_graph_from_model
    torch.jit._get_trace_graph(model, args, strict=False, _force_outplace=False, _return_inputs_states=True)
  File "C:\Users\???\AppData\Roaming\Python\Python37\site-packages\torch\jit\_trace.py", line 1160, in _get_trace_graph
    outs = ONNXTracedModule(f, strict, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs)
  File "C:\Users\???\AppData\Roaming\Python\Python37\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\Users\???\AppData\Roaming\Python\Python37\site-packages\torch\jit\_trace.py", line 132, in forward
    self._force_outplace,
RuntimeError: Only tensors or (possibly nested) dict or tuples of tensors can be inputs to traced functions. Got __torch__.torch.classes.rnn.CellParamsBase (of Python compilation unit at: 0000000000000000)

## Environment

 - PyTorch Version (e.g., 1.0): '1.9.0+cu111'
 - OS (e.g., Linux): Window Server 2019
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source):
 - Python version: 3.7.9
 - CUDA/cuDNN version: cuda 11
 - GPU models and configuration: 2080ti
 - Any other relevant information: onnx version '1.10.1'



cc @BowenBao @neginraoof
Repository: transformers
Issue: Unified freezing interface
Labels: Good Second Issue,WIP

# 🚀 Feature request

We can freeze the backbone of individual models by finding the field name of the backbone (e.g., `bert` in `BertForSequenceClassification`) and setting `.requires_grad`. However, because the name of this field differs for different models, I don't think there's currently an easy way to do this that works for all models. This contradicts the philosophy that `AutoModel(ForXXX)` should hide all the implementation details.

Ideally, we can pass a `trainable_backbone` flag in the config or to the `__init__` function directly that controls this behavior.