sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: ant-design
Issue: Tree rendered 之后设置 treeData，expandedKeys 没有生效
Labels: 🐛 Bug,Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/jiben-antd4165-forked-tehoi?file=/index.js)

### Steps to reproduce
1. 设置 expandedKeys 为一个常量数组
2. 在 useEffect 中设置 treeData
3. expandedKeys 对应节点没有被展开

### What is expected?
expandedKeys 对应节点为展开状态

### What is actually happening?
expandedKeys 未生效

| Environment | Info |
|---|---|
| antd | 4.16.5 |
| React | 16.14.0 |
| System | Windows |
| Browser | Chrome |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: go
Issue: testing: colorize output on failing tests
Labels: NeedsInvestigation,FeatureRequest


### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.16.2 windows/amd64
</pre>

</pre></details>

### Proposal
Can we have color print when unit test case fail?


### What did you expect to see?
Maybe we can have color print when unit test pass or fail, we can make a switch in `pkg testing`  like `t.RedErrorf(...)`or `cmd go test` like `go test ./... --color`

### What did you see instead?
When we have many test cases, and normally we will add -v to debug, it's hard to find the failed case.
Because we have many test flags,like`go test $(go list ./... | grep -v "/neverTest") -coverprofile=cover.out -covermode=conut -gcflags=all=-l -v`,  the `go test` cmd will be placed in a `unit_test.sh` typically. 
We won't change the script, keeping `-v`, which will bring many debug messages, resulting in the fact that it's hard for us to find which case failed.

> By the way, do we have some better ways to only test some dirs, or exclude some dirs?
Repository: pytorch
Issue: Potential memory leaks reported by static analysis tool
Labels: oncall: jit

Hi, there are several bug reports about memory leaks from static analysis.

Could you please help confirm them?

**1**

In file torch/csrc/jit/tensorexpr/kernel.cpp, function `TensorExprKernel::compile()`.

There is a memory leak on `block` when an exception is thrown. (those `std::runtime_error`s)

**2**

In file torch/csrc/jit/tensorexpr/ir_simplifier.cpp, function `mulMultilane`.

In the constructor of `Broadcast` (line 144), a `malformed_input` of "dtype lanes dont match" may be thrown, causing a memory leak on `new Mul(...)`.

Same as function `combineMultilane`, which may cause a memory leak on `new Op(...)`.

**3**

These are memory leaks when `torchCheckFail` is called.

In file torch/csrc/jit/runtime/profiling_record.cpp, function `ProfilingRecord::instrumentGraph`.

There might be a check fail in `new_g->appendNode(pop)`, causing a memory leak on `pop`.

In file torch/csrc/jit/passes/fixup_trace_scope_blocks.cpp, function `convertTracedForksToRealForks`.

There might be a check fail in `g->insertNode(...)`, causing a memory leak on `g->create(...)`.

**Thanks**

cc @gmagogsfm
Repository: create-react-app
Issue: create-react-app is just creating package.json and nodemodules
Labels: stale,needs triage,issue: bug report

in terminal i see this: ... react, react-dom, and react-scripts with cra-template, and before i did not see cra-template
1-i deleted create react app globally
2-i deleted the nodejs and npm
3-i did clear cache
4-i did use yarn and npm again but no way, it did not work
could it be a problem from my OS ?
Repository: flutter
Issue: [in_app_purchase] No events are emitted on canceling user credentials on restorePurchases on iOS
Labels: platform-ios,a: quality,p: in_app_purchase,package,c: proposal,P2,team-ios,triaged-ios

I've implemented a restore button for my in app purchase, which when pressed it starts the `restorePurchases` process and opens a credentials dialog. My problem is that if the user decides to cancel this, the app can't tell that this dialog was canceled. No error is caught by the `purchasedStream` and the method `_iap.restorePurchases` also doesn't throw any error.
It is weird, because `_iap.buyPurchases` throws an error if the user cancels the credentials.

Has anyone else had this problem and managed to solve it?
Repository: neovim
Issue: add a 'tabcloseleft' option
Labels: enhancement,needs:vim-patch

I have to open a new terminal on left for opening previous tab when a tab is closed.

```vim
tnoremap <C-O> <C-\><C-N>:bd!<CR>
nmap <leader>t :-1tabnew term://bash<CR>
```

[vim will add a 'tabcloseleft' option](https://groups.google.com/g/vim_dev/c/3fq0WJmlHeg).

Will Neovim add a 'tabcloseleft' option ?
Repository: kubernetes
Issue: Re-entrant apiserver calls are not part of the same trace
Labels: kind/bug,sig/api-machinery,sig/instrumentation,triage/accepted

Part of enhancement: kubernetes/enhancements#647

This is a continuation of the discussion in https://github.com/kubernetes/kubernetes/pull/94942#discussion_r657114027, which was a discussion of the risks of abuse that might be possible   To summarize, the [`otelhttp.WithPublicEndpoint()`](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/6d226aff737e650125fd98e18ccba66428f328f7/instrumentation/net/http/otelhttp/config.go#L103) option causes spans generated by the API Server handler to be the start of a new trace (with a link to the incoming trace), rather than be children of the incoming request.

Note: I think there is a bug in OpenTelemetry in which parent contexts are still used for sampling decisions: https://github.com/open-telemetry/opentelemetry-go/issues/2031.  I'll make sure that is fixed separately.

However, one of the use-cases outlined in the [KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/647-apiserver-tracing#tracing-api-requests) is tracing reentrant API calls.  Using WithPublicEndpoint make reentrant calls difficult to visualize, because they are each their own trace now.  We should probably keep the default behavior as using WithPublicEndpoint, but expose an option to make it non-public.  But first, we should discuss and document what the abuse implications are for an actor with the ability to send requests to the kubernetes API with a span context.  The implications discussed thus far are:

* If the actor has access to the Trace ID from another trace, they can append spans to it.  This wouldn't impact any other spans in the trace, but would append the span to the trace.
* The actor can set sampled=true in their request to cause the apiserver to record spans for all of their requests.  They could potentially overwhelm a tracing backend, or cause other spans to be dropped.

One unanswered question from the thread from @liggitt:
> @lavalamp, you've thought about the abuse vectors more w.r.t. priority and fairness... do you have thoughts on this?
Repository: pytorch
Issue: Record file/line number when creating test data, and then report it in backtraces associated with this data
Labels: feature,module: tests,triaged

One of the big problems with metaprogrammed tests is that it is not obvious where the test data that generated the metaprogrammed test lives. For example, here is a recent backtrace I got from a test:

```
Traceback (most recent call last):
  File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_device_type.py", line 402, in instantiated_test
    raise rte
  File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_device_type.py", line 397, in instantiated_test
    result = test_fn(self, *args)
  File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_device_type.py", line 369, in test_wrapper
    return test(*args, **kwargs)
  File "test_ops.py", line 685, in test_inplace_grad
    self._grad_test_helper(device, dtype, op, self._get_safe_inplace(op.get_inplace()))
  File "test_ops.py", line 656, in _grad_test_helper
    return self._check_helper(device, dtype, op, variant, 'gradcheck', check_forward_ad=check_forward_ad)
  File "test_ops.py", line 637, in _check_helper
    check_forward_ad=check_forward_ad))
  File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py", line 2303, in gradcheck
    return torch.autograd.gradcheck(fn, inputs, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/torch/autograd/gradcheck.py", line 1265, in gradcheck
    return _gradcheck_helper(**args)
  File "/opt/conda/lib/python3.6/site-packages/torch/autograd/gradcheck.py", line 1273, in _gradcheck_helper
    func_out = func(*tupled_inputs)
  File "test_ops.py", line 622, in fn
    output = op.gradcheck_wrapper(variant, *inputs, **sample.kwargs)
  File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_methods_invocations.py", line 497, in <lambda>
    gradcheck_wrapper=lambda op, *args, **kwargs: op(*args, **kwargs),  # wrapper function for gradcheck
  File "test_ops.py", line 590, in _fn
    return inplace_variant(t.clone(), *args, **kwargs)
RuntimeError: result tensor does not match matmul output shape
```

Do you know where the data for this tests lives? In fact, it is very difficult to make this determination based on the backtrace alone. The best technique that I know about is to look at the test name, guess where the "split" between the op info test name (`test_inplace_grad`) and the operator name (`addmm`) and the variant (empty in this case) and then grep for the operator name in a folder (but not the `test/` folder, that would make too much sense).

There is a very simple thing we can do to make an uninformed end user's life much easier: record a file/line number (or even backtrace, if you wanna be fancy) when we create the test data, and then augment error reporting in test cases to report the data that generated the metaprogrammed test in question (this probably is most easily done by catching exceptions being thrown and adding more information to the exception).

cc @mruberry @VitalyFedyunin @walterddr
Repository: flutter
Issue: [web:canvaskit] call getGlyphIDs directly on Typeface instead of Font
Labels: engine,dependency: skia,a: typography,platform-web,e: web_canvaskit,P2,team-web,triaged-web

When https://bugs.chromium.org/p/skia/issues/detail?id=12113 is available, we should stop artificially wrapping `Typeface` objects in `Font` objects just to call getGlyphIDs. This should clean up some code and reclaim a couple of CPU cycles from the extra indirection.
Repository: PowerToys
Issue: [Idea-New PowerToy] A Utility to Show Folder Sizes in Treemap Mode
Labels: Idea-New PowerToy

### Description of the new feature / enhancement

It would be nice to have a utility to monitor and visual the size of folders.

![TreeSizeFree_w1350xh770-068](https://user-images.githubusercontent.com/63317259/123463614-fb561980-d600-11eb-9878-ff4c4c33b984.png)


### Scenario when this would be used?

We all have been there where our hard drive indicators get red without us even knowing how it could happen. Then we would have to think or go inside folders one by one to find the possible huge files in deep sub-folders. Using this tool users can save a lot of time and see what is eating their hard drive with just a click of a button.

### Supporting information

There is free utility provided by JAM software that does this on its own interface.

https://www.jam-software.com/treesize_free
Repository: vscode
Issue: Git - Inconsistent use of git.path variable if containing ${execPath}
Labels: bug,git


Issue Type: <b>Bug</b>

VSCode is used in portable mode on a USB stick. Consider following directory structure:
x:\Tools - Portable\CommonFiles\MinGit-BusyBox-64-bit
x:\Tools - Portable\Visual Studio Code

"git.path" is set to "${execPath}/../../CommonFiles/MinGit-busybox-64-bit/cmd/git.exe"

git.exe is found and the git options are displayed. But actually using it does not work.

During the "find" phase it is correctly searched for in the correct folder. But during usage it is searched for in ->workspace folder<-/../../CommonFiles/MinGit-busybox-64-bit/cmd/git.exe as if the ${execPath} part is ignored.

I set "python.defaultInterpreterPath" the same way and there it is working independent of an open workspace.

partly workaround: setting git.path as "/Tools - Portable/CommonFiles/MinGit-busybox-64-bit/cmd/git.exe" works as long as the workspace resides on the same drive. If not, it fails as well

VS Code version: Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48, 2021-06-17T13:28:07.755Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz (24 x 3504)|
|GPU Status|2d_canvas: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: enabled<br>opengl: enabled_on<br>rasterization: enabled<br>skia_renderer: enabled_on<br>video_decode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|63.69GB (58.53GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (12)</summary>

Extension|Author (truncated)|Version
---|---|---
svgeditor|hen|2.9.0
xml|Dot|2.5.1
vscode-python-test-adapter|lit|0.6.8
csharp|ms-|1.23.12
vscode-solution-explorer|fer|0.4.3
dotnet-test-explorer|for|0.7.5
svg|joc|1.4.7
vscode-test-explorer|hbe|2.20.4
test-adapter-converter|ms-|0.0.10
python|ms-|2021.6.944021595
jupyter|ms-|2021.6.999662501
powershell|ms-|2021.6.2


</details>
<!-- generated by issue reporter -->
Repository: terminal
Issue: Window scaling issue on systems with mixed monitor sizes
Labels: Needs-Repro,Issue-Bug,Area-UserInterface,Product-Terminal,Priority-3

### Windows Terminal version (or Windows build number)

10.0.19042.1052

### Other Software

_No response_

### Steps to reproduce

System with two monitors (1x 1920x1080 and 1x 4k)

1. Open Windows Terminal on the 1920x1080 monitor
2. Minimize Windows Terminal
3. Reopen Windows Terminal


### Expected Behavior

The size of the window should be the same as before minimizing the window

### Actual Behavior

The width of the Window increases. This does not happen when you minimize and reopen Windows Terminal on the 4K screen.

Before minimizing:
![grafik](https://user-images.githubusercontent.com/34042618/123469240-102bb080-d5f3-11eb-81d2-67100879247c.png)

After opening the minimized window
![grafik](https://user-images.githubusercontent.com/34042618/123469273-17eb5500-d5f3-11eb-90e9-01ed3b70b511.png)
Repository: rust
Issue: rustdoc: trait implementors sections contains duplicate entries
Labels: T-rustdoc,C-bug,A-cross-crate-reexports

Live: https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html#impl-IntoIterator-30

trait implementors sections contains duplicate entries (in the example below, the BinaryHeap impl appears twice)

![image](https://user-images.githubusercontent.com/5961244/123470495-cba11480-d5f4-11eb-8e9f-5d1ead8e73e8.png)

```
rustdoc 1.55.0-nightly (7c3872e6b 2021-06-24)
```

Stable also has this issue.
Repository: rust
Issue: rustdoc: some trait implementors don't have src link
Labels: T-rustdoc,C-bug,A-cross-crate-reexports

Live: https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html

Some trait implementors don't have src link and anchors:

![image](https://user-images.githubusercontent.com/5961244/123471238-c7c1c200-d5f5-11eb-81b1-6601e2bf7bf3.png)

```
rustdoc 1.55.0-nightly (7c3872e6b 2021-06-24)
```
Repository: pytorch
Issue: _foreach_maximum returns "incompatible type" mypy error unexpectedly
Labels: module: typing,triaged

While implementing Multi-Tensor Adam Optimizer in Functional form we have noticed while both ```max_exp_avg_sq``` and ```exp_avg_sq``` having List[Tensor] type the following line

```
max_exp_avg_sq = torch._foreach_maximum(max_exp_avg_sq, exp_avg_sq) # type: ignore
```

gets the following mypy error

```
torch/optim/_multi_tensor/_functional.py:38:26: error: Incompatible types in assignment (expression has 
type "Union[Tuple[Tensor, ...], List[Tensor]]", variable has type "List[Tensor]")  [assignment]
```

It would be nice to have a solution for this error.

cc @ezyang @malfet @rgommers @xuzhao9 @gramster
Repository: rust
Issue: Trait bound claims missing requirements despite those bounds being implied by the trait
Labels: A-trait-system,T-compiler,C-bug,T-types

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code: [Playground Link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=bad85946a6fbab31976393d7a7419316)

I expected to see this happen: Only one error: `Foo` cannot be implemented for `Bar`, the function should compile.

Instead, this happened: The function complains about missing bounds, despite the fact that those bounds should be implicit by the requirements of the trait.

Zulip Discussion: [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/Unexpected.20error.20on.20trait.20where.20bounds)

### 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.
-->
Using 1.53.0 on the playground, bug still present on latest nightly.
Repository: rust
Issue: Path attribute on module fails to compile on non-windows platforms when going up a directory
Labels: A-resolve,T-compiler,C-bug

I tried this code:

```rust
mod my_module {
   #[path = "../dir/my_file.rs"]
   mod my_file;
}
```

I expected to see this happen: To be consistent across platforms. Maybe compile on Linux and Mac as it does on Windows when `./dir/my_file.rs` exists.

Instead, this happened: Only on Linux and Mac...

```
couldn't read tests/my_module/../dir/my_file.rs: No such file or directory (os error 2)
```

### Meta

```
# also occurs for
rustc 1.55.0-nightly (7c3872e6b 2021-06-24)
```

`rustc --version --verbose`:
```
rustc 1.53.0 (53cb7b09b 2021-06-17)
binary: rustc
commit-hash: 53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b
commit-date: 2021-06-17
host: x86_64-unknown-linux-gnu
release: 1.53.0
LLVM version: 12.0.1
```

**Workaround 1**

```rust
#[path = "dir"]
mod my_module {
   #[path = "my_file.rs"]
   mod my_file;
}
```

**Workaround 2**

```rust
#[path = ""]
mod my_module {
   #[path = "dir/my_file.rs"]
   mod my_file;
}
```

By the way, I didn't end up using this or wanting this in the end, but just letting you know.
Repository: create-react-app
Issue: Allow manual mocks with same name
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

I am currently implementing a bunch of tests with manual mocks. I'd planned to name most of them `index.tsx?` to mock a component or hook folder exposed through an `index.ts` file, and I was not able to properly do it since I got this famous message:

```
jest-haste-map: duplicate manual mock found: index
```

I tried to use the "modulePathIgnorePatterns" Jest configuration to ignore local manual mocks files, but CRA does not support this option OOTB.

I then changed to use explicit names, such as `AccountMenu` (which leaded to do a mock call `jest.mock('path/to/AccountMenu/AccountMenu')`, which is not very convenient). I however reached the limit as I was expecting, since now some components share the same name for different contexts, and I get the warning message again.


### Describe the solution you'd like

As a developer, I want to use the manual mock names of my choice, regardless of their uniqueness, so I can easily create standardized mocks in my application, withoutt having any kind of warning in my CI pipeline or in my local environment console.

The best solution would be just not to worry about it anymore as a developer. A default implementation of that configuration in the `scripts/utils/createJestConfig.js` would be great.

```
// Something in those lines
+ modulePathIgnorePatterns: [
+     '<rootDir>/src/.*/__mocks__',
+ ],
```

### Describe alternatives you've considered

The whitelisting of the `modulePathIgnorePatterns` Jest configuration key would also be an acceptable solution, so any developer can manually adjust the configuration
Repository: flutter
Issue: Generate/update secondary BUILD.gn files with `dart_library()` targets for fuchsia
Labels: engine,dependency: fuchsia,a: build,P2,team-engine,triaged-engine

flutter/buildroot#472 adds `build/secondary/third_party/.../BUILD.gn` files with `dart_library()` targets, to support Fuchsia build rules, when building tests with dart library dependencies. The initial set of files were copied and adapted from the Fuchsia source tree; and those files were automatically generated by a python script.

These targets should eventually be generated via script, in the `flutter/*` repo, in the future. Until then, the current handful of BUILD.gn scripts will need to be updated by hand.
Repository: pytorch
Issue: AccumulateGrad short circuits before calling variable hooks when the incoming grad is None
Labels: module: autograd,triaged

https://github.com/pytorch/pytorch/blob/7188d84ccfa54760c1078c171993b1dd9ad471ed/torch/csrc/autograd/functions/accumulate_grad.cpp#L28-L37

@albanD says this is a bug, filing so we don't forget.

"Variable hooks" means hooks registered on the leaf via `leaf_tensor.register_hook` (not to be confused with AccumulateGrad function hooks registered via e.g. leaf_tensor.expand_as(leaf_tensor).grad_fn.next_functions[0][0].register_hook, which _do_ still fire even if the incoming grad is None).

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: pytorch
Issue: Bug in `pytorch/benchmarks/tensorexpr/pt_engine.py`
Labels: triaged,op-bench

## 🐛 Bug

https://github.com/pytorch/pytorch/blob/dd045ab540ad47e0205cc1c53be400947f4e7477/benchmarks/tensorexpr/pt_engine.py#L21
should be replaced by `return t.detach().cpu().numpy()`

## To Reproduce

Steps to reproduce the behavior:

1. Run `python -m benchmarks.tensorexpr --device cpu`

```
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/pytorch/benchmarks/tensorexpr/__main__.py", line 323, in <module>
    main()
  File "/pytorch/benchmarks/tensorexpr/__main__.py", line 266, in main
    run_default_configs(benchmark_cls, allow_skip=True)
  File "/pytorch/benchmarks/tensorexpr/__main__.py", line 221, in run_default_configs
    bench.run(args)
  File "/pytorch/benchmarks/tensorexpr/benchmark.py", line 136, in run
    return self.run_impl(True)
  File "/pytorch/benchmarks/tensorexpr/benchmark.py", line 171, in run_impl
    self.check()
  File "/pytorch/benchmarks/tensorexpr/benchmark.py", line 52, in check
    self.reference(), self.numpy(self.compute()), atol=1e-2
  File "/pytorch/benchmarks/tensorexpr/elementwise.py", line 59, in reference
    [d1, d2, d3, d4] = [self.numpy(d) for d in [self.d1, self.d2, self.d3, self.d4]]
  File "/pytorch/benchmarks/tensorexpr/elementwise.py", line 59, in <listcomp>
    [d1, d2, d3, d4] = [self.numpy(d) for d in [self.d1, self.d2, self.d3, self.d4]]
  File "/pytorch/benchmarks/tensorexpr/pt_engine.py", line 21, in numpy
    return t.cpu().numpy()
RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.
```

## Expected behavior

This error shouldn't be encountered

## Environment

Built from source
Repository: deno
Issue: Deno.test() should support timeout option
Labels: feat,testing

`Deno.TestDefinition` should allows to specify a timeout for a test case:

```ts
Deno.test({
   name: "some net test",
   timeout: 5000 // in ms
   async fn() {
      //
   }
});
```