sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/tools/gopls: explore UX of fillstruct for partially populated nested structs
Labels: FeatureRequest,gopls,Tools

Continuation of https://github.com/golang/go/issues/39804, in which in [cl262018](https://go-review.googlesource.com/c/tools/+/262018) we introduce basic support for partially filled structs: how should this work for nested structs? Should all levels of the nested structs populate? Or only one level? If one level, which level, when the cursor is between two of the nested struct levels, like,

```
f := Foo{
  Bar: {}, // cursor is on the closing bracket: fill Foo, or Bar, or both?
}
```
Repository: godot
Issue: GridMap only supports 16bit IDs while MeshLibrary supports 32bit IDs
Labels: topic:core,documentation,topic:3d

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:** v3.2.3.stable.mono.official
<!-- Specify commit hash if using non-official build. -->


**OS/device including version:** Microsoft Windows 19041.630
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->


**Issue description:** I am working on a very simple game and decided I wanted to use gridmap to paint the terrain. I wrote a tiny bit of C# script to take a list of textures and build simple 3d mesh tiles using them to create my mesh library. For the MeshLibrary IDs I decided to just hash the texture names so the IDs would stay consistent every time I regenerated the MeshLibrary. This is the important bit because I generated those ids like this:
`Math.Abs(itemName.GetHashCode())`

This generated entirely valid MeshLibrary entries:
![image](https://user-images.githubusercontent.com/2555227/100156739-4be47900-2e5e-11eb-8f81-2a63ca14b411.png)

However when I went to actually draw my grid tiles nothing happened (looking like this):
![GridMapBroken](https://user-images.githubusercontent.com/2555227/100156839-7a625400-2e5e-11eb-992d-218359b92dfb.gif)

The problem is this code from [gridmap.cpp](https://github.com/godotengine/godot/blob/90edd839d5f67d4252923a720feeef6ad0d76107/modules/gridmap/grid_map.cpp):


```
void GridMap::set_cell_item(const Vector3i &p_position, int p_item, int p_rot) {
   // ... Lots of unrelated stuff ...
	Cell c;
	c.item = p_item;
	c.rot = p_rot;

	cell_map[key] = c;
}

```

Cell is defined like this:
```
	union Cell {
		struct {
			unsigned int item : 16;
			unsigned int rot : 5;
			unsigned int layer : 8;
		};
		uint32_t cell;
                // Constructor omitted...
	};
```
And there's the problem. Item is bitmapped to only the first 16 bits. This means that the latter 16 bits are just chopped right off without any error or warning! The shorter and completely wrong ID is then stored in the gridmap.

In summary:

- MeshLibrary supports 32 bit positive IDs
- GridMap only supports 16 bit IDs
- GridMap takes 32 bit IDs and then cuts off the top 16 bits without any warning or error

This issue was very frustrating since GridMap doesn't even bother to put out a warning on invalid IDs. I suggest adding a warning (at least to the editor). As for actually fixing the issue I'm not sure what would be best, maybe switch MeshLibrary to use a short so this specific mistake becomes impossible? Also set_cell_item should absolutely take a short.

**Minimal reproduction project: [GridMapKeyLimitation.zip](https://github.com/godotengine/godot/files/5592986/GridMapKeyLimitation.zip)**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
Repository: material-ui
Issue: [Autocomplete] Support values other than raw options
Labels: new feature,waiting for 👍,component: autocomplete

- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Summary 💡

Right now (at least if you use `multiple`) Autocomplete/useAutocomplete the `value` that comes back in `onChange` is always the raw option data. i.e. If you use `options=[{value: 'a', label: 'A'}, {value: 'b', label: 'B'}]` and select the "A" option then value will be `[{value: 'a', label: 'A'}]`.

Ideally it would be possible to provide `multiple=true options=[{value: 'a', label: 'A'}, {value: 'b', label: 'B'}]` and get back values like `['a']`. Autocomplete does feel like this is intended to be supported, because you can provide a `getOptionSelected` and it's used to identify selected options instead of doing any comparisons on the option itself. However when it comes to adding an item to a `multiple` array, all useAutocomplete does is `newValue.push(option);`. There is no way to control what part of option is actually used as the value.

I think a `getOptionValue(option)` function would fit the current options implementation the most.

## Examples 🌈

```js
<Autocomplete
  multiple
  getOptionSelected={(option, value) => option.value === value}
  getOptionValue={(option) => option.value}
  options={[{value: 'US', label: 'United States', {value: 'CA', label: 'Canada'}]}
  />
```

## Motivation 🔦

MUI's `<Select>` easily supports this. It uses children instead, so all it takes is `options.map(item => <MenuItem key={item.value} value={item.value}>{item.value}</MenuItem>)` to do this in Select and pretty much every project I've worked on uses Select this way. It would be strongly preferred if it were easy to use useAutocomplete the same way.
Repository: flutter
Issue: PageView animateToPage issue on Android only
Labels: platform-android,framework,a: animation,f: material design,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-android,triaged-android

I have a PageView, for which I set a list of children dynamically.
When I add a child to the list (inside setState) and then trigger 'animateToPage' to that new child, the PageView still doesn't know the new child exists, and not changing until I trigger 'animateToPage' again.
So, basically I have to click the "Next" button twice to get to the next page.
It works, if I add the 'animateToPage' inside a Future.delayed of 200 milliseconds (not less).
NOTE: This is only on Android - both simulator and physical device. 
On iOS works perfectly with the exact same code:

```
final PageController _pageController = new PageController();
List<Widget> _pages;

void _goNext(){
    setState(() {
      _pages.add(Container(color: Colors.blue));
      _pageController.animateToPage(_pages.length-1, duration: Duration(milliseconds: 200), curve: Curves.easeOut);
    });
}

@override
void initState() {
    super.initState();
    _pages = new List<Widget>();
    _pages.add(
        InkWell(
          onTap: (){_goNext();},
          child: Container(color: Colors.red)
        )
    );
}

@override
Widget build(BuildContext context){
  retun Container(
    child: PageView(
        physics: NeverScrollableScrollPhysics(),
        controller: _pageController,
        children: _pages
     )
  )
}
```
Repository: vscode
Issue: Typing } changes the indentation (autoIndent "none" doesn't work)
Labels: bug,editor-autoindent,c++,on-unit-test

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: Latest VS Code (1.51.1) or VS Code Insiders
- OS Version: Windows

Steps to Reproduce:
I'm using a test.cpp file (C/C++ extension can be disabled)
```
int func() {

        
// type } on the line above
```

You can set editor.autoIndent to "none" but it doesn't fix it.

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

I saw some similar reports, but I couldn't tell if this was a duplicate or not.
Repository: TypeScript
Issue: window.parent should have the same global variables as window
Labels: Suggestion,Domain: lib.d.ts,Awaiting More Feedback

**TypeScript Version:**  4.1.2

**Search Terms:** `window.parent`, `window.Element`, `globalThis`

**Code**

```ts
window.HTMLDivElement;
window.parent.HTMLDivElement; // Error here
```

**Expected behavior:**

The `window.parent` object should have the same base global variables as the `window` object. If not in the context of iframe, then `window === window.parent` so all global variables should be the same in such a case. When being in the iframe context `window !== window.parent` however it should still have all the base global variables, so that we can do for example `element instanceof window.parent.Element`. You could think, why don't just write `element instanceof Element`? The answer is that it would work in almost all browsers beside Chrome. And Chrome is actually the one implementing it correctly. Both global window and iframe window have their own global context so `window.parent.Element !== window.Element`. In TS all the global variables are defined in the `globalThis` so the type for the `window.parent` should be `declare var parent: Window & typeof globalThis;`

**Actual behavior:**

The `window.parent.HTMLDivElement;` does not exist on type Window.

**Playground Link:** https://www.typescriptlang.org/play?#code/O4SwdgJg9sB0ASAVAsgGQCIgG4FEA2ApgLYFgAuA3AFCiQywAOAhgE6lkIobb7HsVA
Repository: transformers
Issue: Converting all model Config classes to dataclasses
Labels: Feature request

It seems that we could save a lot of boilerplate code and potentially prevent some bugs if we migrated all of the model config classes over to being dataclasses. Already many of our classes (BaseModelOutput, TrainingArguments, etc.) are dataclasses, so we are already committed to having dataclasses as a dependency.

It's relatively low priority, but I would be willing to help implement the change since I'm kind of a neat freak about code.
Repository: tensorflow
Issue: GFile does not create file when nothing is written.
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.9

**System information**
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS Catalina
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: NA
- TensorFlow installed from (source or binary): binary (pip3)
- TensorFlow version (use command below): v2.3.0-54-gfcc4b966f1 2.3.1
- Python version: 3.8.2
- Bazel version (if compiling from source): NA
- GCC/Compiler version (if compiling from source): NA
- CUDA/cuDNN version: NA
- GPU model and memory: NA

**Describe the current behavior**

`tf.io.gfile.GFile` does nothing to the filesystem when it is closed without any write operations:
```python
with tf.io.gfile.GFile('foo', 'wb') as fp:
  fp.write('test')  # 'foo' is created.

with tf.io.gfile.GFile('bar', 'wb'):
  pass  # 'bar' is not created.
```

**Describe the expected behavior**

The same behavior with builtin `open`: creates a file even if no write operation is invoked.

**Standalone code to reproduce the issue**
Already described above.

**Other info / logs**
NA
Repository: material-ui
Issue: [Tabs] Avoid forced reflow 
Labels: performance,component: tabs

In Tabs.js,
https://github.com/mui-org/material-ui/blob/79ebf71d31cca2c73143891960ea54ec1132bdeb/packages/material-ui/src/Tabs/Tabs.js#L137
, getBoundingClientRect is called. In our application, in the developer tools, the performance profile of our application complains that "Warning Forced reflow is a likely performance bottleneck". According to [this](https://gist.github.com/paulirish/5d52fb081b3570c81e3a), it seems that calling getBoundingClientRect  may cause performance problems in some scenarios. Is it possible that getBoundingClientRect is replaced by something else that doesn't cause a forced reflow?
Repository: go
Issue: cmd/go: "go env" returns default value for GOPATH/GOSUMDB/GOPROXY, but not for GOBIN/GO111MODULE/GOTMPDIR
Labels: help wanted,NeedsFix


### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.15.3 linux/amd64
</pre>

### What did you do?

```
$ go env GOPROXY
https://proxy.golang.org,direct
$ go env GOSUMDB
sum.golang.org
$ go env GOPATH
/home/d630/go
$ go env GOBIN

$ go env GO111MODULE

$ go env GOTMPDIR

$ 
```

None of these envs are set specifically.

### What did you expect to see?

I expect `go env GOBIN` to be evaluated as `<gopath>/bin` in a shell script.

### What did you see instead?

`go env GOBIN` is evaluated as blank.
Repository: flutter
Issue: FlutterActivity should extend AppCompatActivity instead of Activity
Labels: platform-android,engine,a: platform-views,c: proposal,P3,team-android,triaged-android

Just like [#45678](https://github.com/flutter/flutter/issues/45678), but if I want to inflate a `CustomView` with themes, the `FlutterActivity` should extend `AppCompatActivity`, or a `FlutterCompatActivity` extend `AppCompatActivity`
Repository: pytorch
Issue: cudnn convolution modifies the input Tensor metadata inplace when it tries to `.resize_()` it
Labels: module: cudnn,module: convolution,triaged,module: memory format

## 🐛 Bug

runtime error when channel last and checkpoint used together.

## To Reproduce
```
import torch
from torch.utils.checkpoint import checkpoint

input = torch.randint(1, 10, (2, 8, 4, 4), dtype=torch.float32, device="cuda", requires_grad=True)
model = torch.nn.Conv2d(8, 4, 3).cuda().float()

input = input.contiguous(memory_format=torch.channels_last)
model = model.to(memory_format=torch.channels_last) # Module parameters need to be Channels Last

out = checkpoint(model, input).sum()

out.backward()
```
## Expected behavior

no errors should be thrown.

## Environment

PyTorch version: 1.7.0+cu110
Is debug build: True
CUDA used to build PyTorch: 11.0
ROCM used to build PyTorch: N/A

OS: CentOS Linux 7 (Core) (x86_64)
GCC version: (GCC) 5.4.0
Clang version: Could not collect
CMake version: Could not collect

Python version: 3.6 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: 

Nvidia driver version: 455.32.00
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip] numpy==1.17.3
[pip] torch==1.7.0+cu110
[pip] torchaudio==0.7.0
[pip] torchvision==0.8.1+cu110


cc @csarofeen @ptrblck @VitalyFedyunin @jamesr66a @ppwwyyxx
Repository: PowerToys
Issue: [PT Run][Registry Plugin] Copy registry key/value in REG format
Labels: Idea-Enhancement,Product-PowerToys Run,Run-Plugin

## 📝 Provide a description of the new feature

Add a possibility that will copy the current selected registry key/ registry value in the *.REG format to the clipboard,
so that users can add this direct in a *.REG file (or use as a full *.REG file)

```
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\HARDWARE\RESOURCEMAP\System Resources\Physical Memory]
".Translated"=hex(8):01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,09,00,00,\
  00,03,01,00,00,00,10,00,00,00,00,00,00,00,f0,08,00,00,00,00,00,03,01,00,00,\
  00,10,09,00,00,00,00,00,00,f0,00,00,00,00,00,00,03,01,00,00,00,00,10,00,00,\
  00,00,00,00,00,f0,03,00,00,00,00,03,01,00,00,00,a0,00,04,00,00,00,00,00,60,\
  cf,05,00,00,00,00,03,01,00,00,00,00,00,0a,00,00,00,00,00,00,00,01,00,00,00,\
  00,03,01,00,00,00,00,02,0b,00,00,00,00,00,50,78,ce,00,00,00,00,03,01,00,00,\
  00,70,d5,da,00,00,00,00,00,50,40,00,00,00,00,00,03,01,00,00,00,a0,58,dc,00,\
  00,00,00,00,60,a7,02,00,00,00,00,07,01,00,02,00,00,00,00,01,00,00,00,00,38,\
  1f,03,00,00,00,00
```

I will work on this after #7951 is finished
Repository: rust
Issue: Restore Servo’s `style` crate in cargotest?
Labels: A-testsuite,T-infra

`src/tools/cargotest` in this repository runs `cargo test` for a few crates as part of CI, including some of https://github.com/servo/servo/. This used to select the `selectors` and `stylo_tests` crates, whose dependency graph include most Servo crates that don’t rely on unstable language or std features.

In https://github.com/rust-lang/rust/pull/54451#issuecomment-427548626 `stylo_tests` was removed. This in turn greatly reduced the coverage of what ends up being compiled during this test, since `stylo_tests` depended on the `style` crate which is one of the big components. With only the `selectors` crate and its dependency graph, much less of Servo is compiled which makes including Servo in `cargotest` less useful. On the other hand, compiling more stuff might increase the time taken by CI.

Some options here are:

* Add `style_tests` (note `e` v.s. `o`), which depends on the `style` crate, to the crates being tested in order to restore test coverage to roughly what it was before #54451
* Remove Servo entirely from `cargotest` in order to reduce CI time spent cloning a large repository only to compile a small part
* No functional change, but remove this comment which is outdated since #54451:

https://github.com/rust-lang/rust/blob/b387f62d4d0e9aa109660c6ede426ec48cb67d53/src/tools/cargotest/main.rs#L48-L49
Repository: angular
Issue: Document compileNonExportedClasses  compiler option
Labels: P3,docsarea: testing,area: docs

<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅

Oh hi there! 😄

To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.

🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->


# 🐞 bug report

### Affected Package

<!-- ✍️edit: --> The issue is caused by ngc

### Is this a regression?

<!-- Did this behavior use to work in the previous version? -->
<!-- ✍️--> Yes, the previous version in which this bug was not present was: non-Ivy

### Description

<!-- ✍️--> 
Testing a component inside a test host, according to:
https://angular.io/guide/testing-components-scenarios#component-inside-a-test-host

`ngc` throws error (but only when Ivy is enabled).

But everything else works just fine (test, build, serve).

Disable Ivy in `tsconfig.json`, re-run `ngc` and it will pass successfully.

This problem is also valid for previous Angular 10.

## 🔬 Minimal Reproduction

https://github.com/wojciechpolak/ng11-test-host-problem

## 🔥 Exception or Error
<pre>$ npx ngc
src/app/foobar/foobar.component.spec.ts:12:14 - error NG8001: 'app-foobar' is not a known element:
1. If 'app-foobar' is an Angular component, then verify that it is part of this module.
2. If 'app-foobar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

12   template: `&lt;app-foobar [abc]="'xyz'">&lt;/app-foobar>`
                ~~~~~~~~~~~~~~~~~~~~~~~~~~
src/app/foobar/foobar.component.spec.ts:12:26 - error NG8002: Can't bind to 'abc' since it isn't a known property of 'app-foobar'.
1. If 'app-foobar' is an Angular component and it has 'abc' input, then verify that it is part of this module.
2. If 'app-foobar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

12   template: `&lt;app-foobar [abc]="'xyz'">&lt;/app-foobar>`
                            ~~~~~~~~~~~~~
</pre>

## 🌍  Your Environment

**Angular Version:**
<pre><code>$ ng version

Angular CLI: 11.0.2
Node: 14.15.1
OS: linux x64

Angular: 11.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.2
@angular-devkit/build-angular   0.1100.2
@angular-devkit/core            11.0.2
@angular-devkit/schematics      11.0.2
@schematics/angular             11.0.2
@schematics/update              0.1100.2
rxjs                            6.6.3
typescript                      4.0.5
</code></pre>

**Anything else relevant?**

Run `ng test` to execute the unit tests.
This should pass successfully with or without Ivy. However, `ngc` fails with Ivy.
Repository: rust
Issue: ICE with unsizing an extern type
Labels: I-ICE,T-compiler,C-bug,F-unsized_locals,requires-nightly,glacier,F-extern_types,S-bug-has-test

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.

http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/

-->

### Code

```Rust
#![feature(extern_types)]
#![feature(unsized_locals)]

extern { 
    type Device;
}

unsafe fn make_device() -> Box<Device> {
    Box::from_raw(0 as *mut _)
}

fn main() {
    let d: Device = unsafe { *make_device() };
}
```


### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.50.0-nightly (1c389ffef 2020-11-24)
```

### Error output

```
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `false`,
 right: `true`', compiler/rustc_codegen_llvm/src/builder.rs:445:9
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>Backtrace</strong></summary>
<p>

```
stack backtrace:
   0: rust_begin_unwind
             at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/core/src/panicking.rs:92:14
   2: <rustc_codegen_llvm::builder::Builder as rustc_codegen_ssa::traits::builder::BuilderMethods>::load_operand
   3: rustc_codegen_ssa::mir::operand::<impl rustc_codegen_ssa::mir::FunctionCx<Bx>>::codegen_consume
   4: rustc_codegen_ssa::mir::operand::<impl rustc_codegen_ssa::mir::FunctionCx<Bx>>::codegen_operand
   5: rustc_codegen_ssa::mir::block::<impl rustc_codegen_ssa::mir::FunctionCx<Bx>>::codegen_block
   6: rustc_codegen_ssa::mir::codegen_mir
   7: rustc_codegen_ssa::base::codegen_instance
   8: <rustc_middle::mir::mono::MonoItem as rustc_codegen_ssa::mono_item::MonoItemExt>::define
   9: rustc_codegen_llvm::base::compile_codegen_unit::module_codegen
  10: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  11: rustc_codegen_llvm::base::compile_codegen_unit
  12: rustc_codegen_ssa::base::codegen_crate
  13: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  14: rustc_interface::queries::Queries::ongoing_codegen
  15: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  16: rustc_span::with_source_map
  17: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: internal compiler error: unexpected panic
```

</p>
</details>