sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: node
Issue: Modules not correctly resolved when in another subdirectory installed
Labels: module

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console (Windows)
Subsystem: if known, please specify affected core module name
-->

* **Version**:

v14.16.0

* **Platform**:

MacOSX Mojava 10.14.6: Darwin 18.7.0 Darwin Kernel Version 18.7.0: Tue Jan 12 22:04:47 PST 2021; root:xnu-4903.278.56~1/RELEASE_X86_64 x86_64
Also on other platforms (ubuntu, windows)

* **Subsystem**:

### What steps will reproduce the bug?

We have a very uncomment directory structure: https://github.com/alexander-schranz/build-error-reproducer and so our babel plugins are installed in a none parent directory of our submodules. 

To reproduce the issue:

```
git clone git@github.com:alexander-schranz/build-error-reproducer.git
cd assets/admin
npm install
npm run build
```

It will error with module not found as node does not look for the module in the `process.cwd` directory. 

### How often does it reproduce? Is there a required condition?

### What is the expected behavior?

Babel module should be found which is loaded over `require.resolve`.

### What do you see instead?

Does not find babel module.

### Additional information

Submodules which are no direct parent of the directory. Node should look into process.cwd directory also as fallback for type of uncommen directory structure.
Repository: TypeScript
Issue: Wrong value type is accepted when key is accessed through an object
Labels: Bug

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  4.3.2

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** 

**Code**

```ts
enum TheKeys {
    k1 = 'k1',
    k2 = 'k2',
}

const someObj = { someProp: TheKeys.k1 }

const a: { [k in TheKeys]?: { prop: string }} = { [someObj.someProp]: 1 } // no error, but should be
const b: { [k in TheKeys]?: { prop: string }} = { [TheKeys.k1]: 1 } // error as expected
```

**Expected behavior:**
(To my understanding) the type error that's generated for `b` should be generated for `a` as well.

**Actual behavior:**
No error is generated for 'a'.

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> 
https://www.typescriptlang.org/play?ts=4.2.3#code/KYOwrgtgBAKgFsA0sAngZygbwFBT1AawEYoBeKAcmIoBpd8CAmMyp27AX22wGMB7EGgAuUNHwjAA8gCMAVi0yjxwAAoAnPgAcAXLATJ0AOmJQuvAcKgBDXYoDaBKAEsQepKjQBdAPy2omjR1RITUXAHNTDgUoOzEJGVlDONVAz10SKIB6TKgQPihgNQ01GihpMBE0OD4wABsAEzLgc0ERaT8HZ1d4d3QfPwCtXWFQkAiOKPJ7HoM0YyI0qAyobIKivjVrDGAAD01gHiFgeqA

**Related Issues:**
None that I know of.
Repository: storybook
Issue: Actions panel not clickable
Labels: bug,ui,addon: actions

All controls on the Actions panel are not clickable. Can't expand data object, close or clear panel.

**To Reproduce**
Steps to reproduce the behavior:

1. Create a story with the name `Settings/AnyComponentName` (Settings is essential)
2. Try to click on the Clear, Close Addon, or Change orientation buttons
3. Add action to the story
4. Click on the button to emit value to the actions panel
5. Data object also not clickable/expandable

**Expected behavior**
Possibility to expand data in the actions panel

**Screenshots**
![Screenshot 2021-03-09 at 17 18 19](https://user-images.githubusercontent.com/31763603/110493729-9206d500-80fb-11eb-8459-1878c021275b.png)
![Screenshot 2021-03-09 at 17 20 28](https://user-images.githubusercontent.com/31763603/110493963-ca0e1800-80fb-11eb-9380-0e86b3a9d4f3.png)


**Code snippets**
```TypeScript
export default {
  title: "Settings/Button",
  component: Button
};
```

**System**
MacOS 11.2.2
Firefox 86.0, Chrome 88.0.4324.192
Storybook 6.1.21

**Additional context**
Created code sandbox https://codesandbox.io/s/red-hooks-06och?file=/src/stories/1-Button.stories.ts with this issue.
Any other names for stories work fine. Only `Settings` causes this behavior.
Looks like some overlay with class `.css-1sua4me` added when the name contains Settings. This overlay has 100% height and overlaps the action panel.
Repository: flutter
Issue: [Google_maps_flutter] : Proposal to add onMarkerClick when a marker is clickd or tapped to be inline with native interface.
Labels: c: new feature,p: maps,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

File: `packages/google_maps_flutter/google_maps_flutter/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java`

Function:  `boolean onMarkerTap(String googleMarkerId) `

The corresponding dart code is `  final VoidCallback onTap` which obviously can't be used to provide a return value for the `onMarkerTap` above.
The replacement surrogate seems to be `  final bool consumeTapEvents` which is counter-intuitive and, contrary to native implementation, static.

## Steps to Reproduce

1. Have a `GoogleMap` widget in your app with some markers.
2. Tap on any marker.

**Expected results:** The dart side should have control over the default behavior.

**Actual results:** The default behavior (map scrolls to marker) always occurs.

Related SO question: https://stackoverflow.com/questions/14497734/dont-snap-to-marker-after-click-in-android-map-v2
Repository: transformers
Issue: Implementing efficient self attention in T5
Labels: New model

# 🌟 New model addition

My teammates and I (including @ice-americano) would like to use efficient self attention methods such as Linformer, Performer and Nystromformer

## Model description

These new methods serve as approximations of regular attention, but reduce complexity from quadratic in the inputs to linear.  We would like to add a parameter to T5 where users can specify an efficient attention method to use instead of regular attention.  Ideally, this would be implemented across all models, but the models tend to have varying implementations of attention, rendering this generalization fairly tedious.

## Open source status

* [x] the model implementation is available: repos are https://github.com/mlpen and https://github.com/lucidrains/performer-pytorch
* [ ] the model weights are available: N/A
* [x] who are the authors: @mlpen and @lucidrains
Repository: pytorch
Issue: Properly design manual_cpp_binding (make it less error prone)
Labels: module: cpp,triaged,module: language binding

Prompted @gchanan

manual_cpp_binding works but it is kind of error prone, and doesn't have all the performance characteristics you would necessarily like:

1. It requires you to implement the functionality twice (once in the direct C++ binding, and once in native). This presents the opportunity for the two implementations to be different. Because only the C++ binding is most heavily tested (JIT is less well tested), you may not notice subtle divergences.
2. There is no performance payoff for JIT operators that are not primops (as they go straight to dispatcher)

Gregory suggested that instead of the current design, it would be better to define the implementation once (the direct c++ binding), and then directly register *that* to the dispatcher. The `__dispatch_` operator would then be an honest to goodness native function that we bind in the normal way. This wouldn't solve (2); we'd need some more fancy mechanism for generating "inline" JIT Operators.

cc @yf225 @glaringlee @smessmer
Repository: opencv
Issue: DNN/TF(EfficientNet): add Fill layer, ONNX: add Split layer default axis + const-propagation
Labels: category: dnn,category: dnn (onnx)

##### System information (version)

- OpenCV => 4.5.1
- Operating System / Platform => Mac OS
- Compiler => Xcode

##### Detailed description

Using efficient lite model trained in Keras, then exported through tf crashes upon load using DNN. I've tried several different avenues. tf1 / tf2/ onnx. None seem to work. I've included 2 attempts through tensor flow. Both have different crashes.

##### 
**Attempt 1.**

`.1/modules/dnn/src/tensorflow/tf_importer.cpp:591: error: (-2:Unspecified error) Input [batch_normalization_1/cond/ones_like] for node [batch_normalization_1/cond/FusedBatchNorm] not found in function 'getConstBlob'
`
Empty model can be accessed here.
https://www.dropbox.com/s/jfpisyrqokqxagl/frozen_graph.pb?dl=0

##### 
**Attempt 2.**

`/opencv/opencv-4.5.1/modules/dnn/src/dnn.cpp:614: error: (-2:Unspecified error) Can't create layer "model_2/global_max_pooling2d_1/Max" of type "Max" in function 'getLayerInstance'
`
Empty model can be accessed here.
https://www.dropbox.com/s/rxl1ng4h6gcn0y0/frozen_graph2.pb?dl=0

##### 
**Attempt 3.**

This was done using tf2Onnx. So converting directly from Keras to Onnx.

```
[ERROR:0] global /opencv/opencv-4.5.1/modules/dnn/src/onnx/onnx_importer.cpp (1878) handleNode DNN/ONNX: ERROR during processing node with 3 inputs and 1 outputs: [Conv]:(model_2/efficientnet-b2/stem_bn/FusedBatchNormV3:0)
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(4.5.1) opencv/opencv-4.5.1/modules/dnn/src/onnx/onnx_importer.cpp:1887: error: (-2:Unspecified error) in function 'handleNode'
> Node [Conv]:(model_2/efficientnet-b2/stem_bn/FusedBatchNormV3:0) parse error: OpenCV(4.5.1) opencv/opencv-4.5.1/modules/dnn/src/layers/convolution_layer.cpp:96: error: (-213:The function/feature is not implemented) Unsupported asymmetric padding in convolution layer in function 'BaseConvolutionLayerImpl'
> 
terminating with uncaught exception of type cv::Exception: OpenCV(4.5.1) opencv/opencv-4.5.1/modules/dnn/src/onnx/onnx_importer.cpp:1887: error: (-2:Unspecified error) in function 'handleNode'
> Node [Conv]:(model_2/efficientnet-b2/stem_bn/FusedBatchNormV3:0) parse error: OpenCV(4.5.1) /opencv/opencv-4.5.1/modules/dnn/src/layers/convolution_layer.cpp:96: error: (-213:The function/feature is not implemented) Unsupported asymmetric padding in convolution layer in function 'BaseConvolutionLayerImpl'
>

```
Empty model can be accessed here.
https://www.dropbox.com/s/03l9myisk15zfye/model.onnx?dl=0
Repository: go
Issue: x/tools/gopls: do not suggest names from unimportable internal packages
Labels: gopls,Tools,gopls/imports

### Describe the bug

__Getting internal packages to show up in autocomplete of absolutely unrelated projects.__

### Notes

There are nested module ( with different import path) in workspace `a uses b`, `b located (temporary) under a`, while in __b__ getting __e__ in autocomplete. __a__ and __b__ not use __e__, __b__ uses something that uses _c_
    - a (domain/a)
    - b (domain/b)  
    - c (domain/c)
    - e (domain/c/internal/e)

### Screenshots or recordings

![image](https://user-images.githubusercontent.com/651824/110061306-10681d80-7d70-11eb-94ca-8251d7e2aa31.png)

### What version of Go, VS Code & VS Code Go extension are you using?
```shell
 > gopls version
golang.org/x/tools/gopls v0.6.6
    golang.org/x/tools/gopls@v0.6.6 h1:GmCsAKZMEb1BD1BTWnQrMyx4FmNThlEsmuFiJbLBXio=
 > go version
go version go1.16 darwin/amd64
 > code --version
1.53.2
622cb03f7e070a9670c94bae1a45d78d7181fbd4
x64
```
Repository: pytorch
Issue: torch.arange() issue
Labels: oncall: distributed,module: multiprocessing,triaged,module: regression

## 🐛 Bug

in version 1.8.1, the torch.arange() function would be stacked at subprocess when you using torch mutiprocessing module. While in version 1.7.1, there is no problems. (Windows seems fine)
OS: Linux 

## To Reproduce
```
import torch.distributed as dist
from torch.multiprocessing import Process
import os
import torch


def init_process(rank, size, backend='gloo'):
    """ Initialize the distributed environment. """
    os.environ['MASTER_ADDR'] = '127.0.0.1'
    os.environ['MASTER_PORT'] = '243266'
    dist.init_process_group(backend, rank=rank, world_size=size)
    torch.arange(20)

if __name__ == "__main__":
    torch.set_num_threads(2)
    size = 2

    processes = []
    for rank in range(size):
        p = Process(target=init_process,
                    args=(rank, size))
        p.start()
        processes.append(p)

    for p in processes:
        p.join()
```


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu
Repository: pytorch
Issue: test_metal.py must skip when not compiled with metal support
Labels: module: tests,triaged

Steps to reproduce:
1. `python test/test_metal.py` on a non-metal build of PyTorch

Result:
```
======================================================================
ERROR: test_conv (__main__.TestMetalRewritePass)
----------------------------------------------------------------------
Traceback (most recent call last):                                                                           
  File "test/test_metal.py", line 84, in test_conv   
    TestMetalRewritePass.validate_transformed_module(Conv2D(), pattern_count_map, data_shape)
  File "test/test_metal.py", line 34, in validate_transformed_module
    torch.jit.save(scripted_model, buffer)
  File "/data/users/ezyang/pytorch-tmp/torch/jit/_serialization.py", line 83, in save
    ret = m.save_to_buffer(_extra_files=_extra_files)                                                        
  File "/data/users/ezyang/pytorch-tmp/torch/jit/_script.py", line 515, in save_to_buffer
    return self._c.save_to_buffer(*args, **kwargs)
RuntimeError:    
Schema not found for node. File a bug report.                                                                
Node: %29 : Tensor = metal_prepack::conv2d_prepack(%3, %4, %11, %14, %17, %8, %28, %28)
```

There shouldn't be an error here. Actually, arguably, schema should always be found (but there should be no implementations)

cc @mruberry @VitalyFedyunin @walterddr
Repository: rust
Issue: Unnecessary stack writes when using write_volatile with arrays
Labels: A-LLVM,I-slow,A-codegen,T-compiler,A-intrinsics

Labels: I-slow
Maybe this is an LLVM issue rather than a rustc issue, but `std::ptr::write_volatile`, when used with arrays, results in highly non-optimal assembly on x86_64.

For example
```rust
#[repr(align(8))]
pub struct B8 (
    [u8; 8]
);
impl B8 {
    const ZERO: Self = Self([0; 8]);
}

pub fn zeroize_b8(bytes: &mut B8) {
    let ptr: *mut B8 = bytes as *mut B8;
    unsafe {
        std::ptr::write_volatile(ptr, B8::ZERO);
    }
}
```
results in
```asm
playground::zeroize_b8:
	pushq	%rax
	movq	$0, (%rsp) # write 0u64 to the stack
	movq	(%rsp), %rax # read this 0u64 from the stack to rax
	movq	%rax, (%rdi) # perform the actual write operation
	popq	%rax
	retq
```
It first writes the value to the stack, than reads it from the stack into a register, and finially writes that register to the memory pointed at by `ptr`.
This takes 3 move instructions while we only need 1!
```asm
playground::zeroize_b8_handwritten_asm:
	movq	$0, (%rdi) # perform the actual write operation
	retq
```
Using a `u64` instead of an eight byte array works fine, and only issues a single move. (In fact it emits asm identical to the handwritten asm above.)
[Try it on playground](https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=322997010abe0182a26302cc6e8cbcbb)
Repository: flutter
Issue: [web] <input> too big in date picker "input" mode
Labels: a: text input,engine,a: accessibility,platform-web,P2,team-web,triaged-web

To reproduce, enable TalkBack on Android and open a date picker in the "Pickers" demo in the old Flutter Gallery. Activate the "Switch to input". Navigate to the edit box. Observe that the box size is too big and sticks out of the dialog at the bottom.

Here's the visualized semantics tree from Chrome on Android:

![input-size-in-date-picker](https://user-images.githubusercontent.com/211513/110529686-69b4b180-80ce-11eb-8b28-a233d3113ea3.png)

The HTML for the `<input>` tag is indeed incorrect (the parent `<flt-semantics>` correctly sets the height to 98px, but `<input>` sets it to 346px):

```html
<flt-semantics
    aria-label="Enter Date mm/dd/yyyy"
    style="position: absolute; outline: green solid 1px; width: 282px; height: 98px; transform-origin: 0px 0px 0px; transform: matrix(1, 0, 0, 1, 24, 120);">
  <flt-semantics-value style="font-size: 12px;">
    Enter Date mm/dd/yyyy
  </flt-semantics-value>
  <input spellcheck="false" autocorrect="off" autocomplete="off" data-semantics-role="text-field" style="position: absolute; top: 0px; left: 0px; width: 282px; height: 346px;">
</flt-semantics>
```
Repository: pytorch
Issue: torch.unsafe_chunk and torch.unsafe_split 's documentation does not render on the website.
Labels: module: docs,triaged,module: viewing and reshaping

Both `torch.unsafe_chunk` and `torch.unsafe_split` have doc entries in [`_torch_docs.py`](https://github.com/pytorch/pytorch/blob/a496520c1da831313c263d8eb0f5e56e71212f73/torch/_torch_docs.py#L1454-L1482) but are missing entries in `torch.rst`.

cc @brianjo @mruberry
Repository: flutter
Issue: [web] add a runtime switch that enables and visualizes the semantics tree
Labels: c: new feature,tool,engine,a: accessibility,platform-web,c: proposal,P3,team-web,triaged-web

On the web we can visualize the semantics tree for debugging. However, this functionality is behind a constant. As of https://github.com/flutter/engine/pull/24903 this constant is configurable via `--dart-define`. However, that does not support `--debug` mode and is not convenient when debugging issues related to runtime accessibility mode switching.

An improvement would be to allow switching semantics at runtime via:

- The Flutter tool CLI.
- A function available from the browser JS console, e.g. `window.flutter.debugSetSemanticsTreeVisible(true/false)`.
Repository: flutter
Issue: Add more tests to common accessibility bridge unittest
Labels: a: tests,engine,a: accessibility,P2,c: tech-debt,team-engine,triaged-engine

The current accessibility bridge in common library does not have good test coverage. We have existing unittests
https://github.com/flutter/engine/blob/dcb57f003bd3f5f8fbb3c75cd94443e8096ade94/shell/platform/common/accessibility_bridge_unittests.cc

We should add more test to test different semantics update scenarios.
Repository: go
Issue: cmd/compile: map lookup with result of inlined method cannot use fast path
Labels: Performance,NeedsDecision

<pre>
$ go version
go version devel +142a76530c Tue Mar 9 22:00:50 2021 +0000 linux/amd64
</pre>

```
type Bytes []byte

func (e Bytes) S() string {
	return string(e)
}
```

Given the above type definition, I would expect a map lookup of `x.S()` to compile to the same code as a map lookup of `string(x)`, but it does not.

That is, the following `lookup1` function is slower than `lookup2`, which it should not be:

```
func lookup1(m map[string]struct{}, name Bytes) bool {
	_, ok := m[name.S()]
	return ok
}

func lookup2(m map[string]struct{}, name Bytes) bool {
	_, ok := m[string(name)]
	return ok
}
```

Here's the code in a benchmark: https://play.golang.org/p/uw-AHzeos-v

Here are the benchmark results:

```
direct conversion:  6883083	       174.4 ns/op     1024 B/op	       1 allocs/op
conversion in method call: 27336484	        44.18 ns/op        0 B/op	       0 allocs/op
```
Repository: pytorch
Issue: torch.autograd.functional.jacobian/hessian allow tensor in addition to function
Labels: feature,module: autograd,triaged

## 🚀 Feature


## Motivation

`torch.autograd.functional.jacobian/hessian` require a function that is applied to the provided input. I can imagine that in many cases people already have the output of this function. Instead of computing the function a second time, it would be great to simply provide the output instead of the function to `jacobian/hessian`.

## Pitch

The first argument to `jacobian/hessian` should be of type `Union[torch.Tensor, Callable]`.

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer
Repository: electron
Issue: [Bug]: Context menu showing paste option on elements that aren't pastable
Labels: platform/windows,platform/macOS,bug :beetle:,has-repro-gist,12-x-y,has-repro-repo

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

12.0.0

### What operating system are you using?

Windows

### Operating System Version

10

### What arch are you using?

x64

### Last Known Working Electron version

1.87

### Expected Behavior

When focus is on an input field and you right click on a button, the context menu for the button is shown.

### Actual Behavior

Starting in Electron 2.0.0, the context menu seems to provide options based on where focus was previously, not based on what element the right click occurred on. When I have focus on the input field and right click a button, I get the context menu options for the input field.

### Testcase Gist URL

_No response_

### Additional Information

To Reproduce
$ git clone https://github.com/gadamsgh/electron-quick-start.git
$ cd electron-quick-start/
$ npm install
$ npm start

Place focus in input field. Right click on Submit button. See paste option appear on submit button. Revert to pre-2.0.0 and see different behavior.

Screenshots
Before (1.8.7):
![image](https://user-images.githubusercontent.com/39625845/40550525-f290577c-5fff-11e8-9416-04c56ebfa6d0.png)

After (2.0.0):
![image2](https://user-images.githubusercontent.com/39625845/40550530-f6ffd706-5fff-11e8-86be-5107d61e17ff.png)


continuation of [this closed issue](https://github.com/electron/electron/issues/13072)
Repository: electron
Issue: [Bug]: setMinimumSize refreshes BrowserWindow after a delay
Labels: platform/windows,bug :beetle:,component/BrowserWindow,12-x-y,has-repro-comment

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

11.1.0

### What operating system are you using?

Windows

### Operating System Version

10

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

I set a window's minimum size to be greater than the current size. I expect the BrowserWindow to increase in immediately size to match the new minimums.

### Actual Behavior

The window takes some time to increase in size

### Testcase Gist URL

_No response_

### Additional Information

```
const { app, BrowserWindow } = require('electron')

async function createWindow() {
	const mainWindow = new BrowserWindow({ width: 500, height: 500 });
	mainWindow.setMinimumSize(700, 700); // size only increases to this after moving the window
}

app.on('ready', createWindow)
```

![gif](https://user-images.githubusercontent.com/6374473/110555346-0cd2ee80-8102-11eb-9897-e5dab2ff35f5.gif)

continuation of [this closed issue](https://github.com/electron/electron/issues/20613)