sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Unhelpful error when using the new module file layout
Labels: A-diagnostics,T-compiler

Given a project layout:
```
project/src/lib.rs
project/src/protocol/
project/src/protocol/status.rs
```

I was attempting to export the protocol module.

```rust
pub mod protocol;
```

The current output is:

```
error[E0583]: file not found for module `protocol`
  --> rust-proto-new/src/lib.rs:13:1
   |
13 | pub mod protocol;
   | ^^^^^^^^^^^^^^^^^
   |
   = help: to create the module `protocol`, create file "rust-proto-new/src/protocol.rs" or "rust-proto-new/src/protocol/mod.rs"

For more information about this error, try `rustc --explain E0583`.
error: could not compile `rust-proto-new` due to previous error
```

The extended output makes a similar recommendation.

Ideally the output should look like:

```
pub mod protocol {
    pub mod status;
}
```

This is apparently the style suggested in the docs.
https://doc.rust-lang.org/reference/items/modules.html

>  It is encouraged to use the new naming convention as it is more consistent, and avoids having many files named mod.rs within a project.

Here's my compiler verison.
`rustc -V`
`rustc 1.60.0 (7737e0b5c 2022-04-04)`
Repository: storybook
Issue: [Feature Request] Support per-folder configuration / decorators
Labels: feature request,needs triage

**Is your feature request related to a problem? Please describe**
We're using Storybook in a repo to surface UI for shared packages and apps. In our case, we have legacy and current design systems, which use different global styles. We're currently using [storybook-include](https://github.com/theKashey/storybook-include) but it would be nice to have a native solution.

**Describe the solution you'd like**
Storybook-include is a nice add-on, but it does a bit of Babel hackery to essentially wrap each story in a decorator. In our project, stories need different "base" decorators because they have different global styles. (We're using `styled-components` GlobalStyles feature to dynamically mount those styles when the component is mounted.) Ideally, the decorators from Storybook's `main.js` would be moved into something like a project (or source) root `.storybookrc.js`, which would define folder-level decorators / config settings. (Basically like `.eslintrc.js`, but for Storybook definitions.) (Other folder-level settings could be things like titlePrefix and story glob paths.)

**Describe alternatives you've considered**
https://github.com/theKashey/storybook-include

**Are you able to assist to bring the feature to reality?**
🤔  I can help define the need / feature?
Repository: rust
Issue: More accurate suggestion for missing binop trait bounds
Labels: A-diagnostics,P-low,T-compiler,A-suggestion-diagnostics,D-papercut,D-terse

https://github.com/rust-lang/rust/pull/94034#discussion_r858878655

We currently emit

```
LL | impl<B: std::ops::Add> Add for D<B> {
   |       +++++++++++++++
```

but it should be

```
LL | impl<B: std::ops::Add<Output = B>> Add for D<B> {
   |       +++++++++++++++++++++++++++
```

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"willcrichton"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: go
Issue: net/http: TestRequestWriteTransport failures with `unexpected Transfer-Encoding in request`
Labels: NeedsInvestigation

```
#!watchflakes
post <- pkg == "net/http" && test == "TestRequestWriteTransport" && `unexpected Transfer-Encoding in request` 
```

```
2022/04/26 00:35:58 http: TLS handshake error from 127.0.0.1:38617: EOF
--- FAIL: TestRequestWriteTransport (0.59s)
    requestwrite_test.go:794: test[2]: unexpected Transfer-Encoding in request: GET / HTTP/1.1
        Host: example.com
        User-Agent: Go-http-client/1.1
        Transfer-Encoding: chunked
        Accept-Encoding: gzip
        
        0
        
FAIL
FAIL	net/http	35.584
```

`greplogs --dashboard -md -l -e 'unexpected Transfer-Encoding in request'`

[2022-04-25T18:06:52-8619d3b/solaris-amd64-oraclerel](https://build.golang.org/log/cad4cf54dfca2633b07d1aadefc17072ea2ec7d9)
[2020-01-02T20:13:03-a4c579e/darwin-arm64-mn4m2zdaios](https://build.golang.org/log/d02384f4f3ae388dcc3a5dcf757558ccafa81d3e)

This failure rate is uncommon and has only been observed on non-first-class ports, so leaving on the Backlog for now.
Repository: pytorch
Issue: Suggestion to throw a UserWarning when a user forgot .eval() mode during inference
Labels: module: nn,module: molly-guard,triaged

### 🚀 The feature, motivation and pitch

It happens really often that during inference time, one forgets to put the model in eval mode `model.eval()` beforehand. When the network has layers with different train/test behavior, such as Dropout / BatchNorm, this can be a source of bugs that are really hard to trace afterwards.

I was wondering if it's possible for PyTorch to throw a warning when the user has forgotten `.eval()` before doing inference. Not sure if this proposal has been raised before.

The only technical caveat is, how should PyTorch detect if the user is inferring the model or not. I am thinking of ways based on `.grad` checking -- e.g. check if a tensor is passed through the network the second time, and no gradient has been calculated for the whole model between the first and the second call. Perhaps another way would be to throw the warning only within `torch.no_grad()` environment.

### Alternatives

_No response_

### Additional context

_No response_

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345
Repository: godot
Issue: SSAO combined with negative light values causes shadow corruption
Labels: bug,topic:rendering,topic:3d

### Godot version

3.3.4-stable

### System information

Linux Nvidia 1070, GLES3

### Issue description

![image](https://user-images.githubusercontent.com/682658/165351326-f8a5f910-fb8f-4e04-b557-95e9aa3e89b1.png)
When adding a negative light and enabling ssao in the environment the shadow color can wrap around ? and leave artifacts.

Workaround: don't combine negative lighting and ssao.

### Steps to reproduce

Create some perpendicular surfaces to generate ssao and a negative light. the scene must have some ambient light and the target surface must have an albedo texture.

### Minimal reproduction project

[negative-light-ssao.zip](https://github.com/godotengine/godot/files/8565471/negative-light-ssao.zip)
Repository: vscode
Issue: Notebook lightbulb action should stay around after clicking
Labels: feature-request,languages-guessing

Testing #148089

https://user-images.githubusercontent.com/35271042/165361638-a0954a85-0f84-491c-a6d4-3af1cd2842a6.mp4

I feel like clicking the lightbulb should stick around after clicking it in case the language detected is wrong or if i wanted to "cycle" the other languages detected. It feels like once you click it, there's no way to go back. Undo doesn't help here. So maybe it stays around until after you next run the cell?
Repository: pytorch
Issue: [checkpoint] Make prepare_sharded_tensor_read and prepare_sharded_tensor_write public
Labels: oncall: distributed,sharded_tensor

### 🚀 The feature, motivation and pitch

Those two functions are required by torchrec and should be part of the public API.

They currently lack good docstrings and unit tests, so those two itens must be addressed.

### Alternatives

_No response_

### Additional context

_No response_

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: vscode
Issue: Settings editor funnel button: What does `@lang` do?
Labels: settings-editor,under-discussion

Testing #147935

I tried searching with the `@lang` option, but I'm not sure what it's actually filtering by. Some of these options don't appear to be language-specific and appear for multiple languages.

As an example, what is the Java-specific aspect of these Files settings?

![image](https://user-images.githubusercontent.com/25310137/165362704-6810530b-1401-4dd4-935b-89b9959734bd.png)
Repository: pytorch
Issue: Error in DistributedDataParallel with 'CPU' device
Labels: oncall: distributed

I'm using DistributedDataParallel with 'CPU' device.

Although I'm setting device_ids=None, output_device=None in model = DistributedDataParallel(model, device_ids=None, output_device=None) 

Below error:
File "/opt/mnist/src/distributeddataparallel.py", line 142, in main
model = DistributedDataParallel(model, device_ids=None, output_device=None)
File "/opt/conda/lib/python3.6/site-packages/torch/nn/parallel/distributed.py", line 189, in __init__
output_device = device_ids[0]
IndexError: list index out of range

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: flutter
Issue: [google_maps_flutter] ObjC code can to be cleaned up.
Labels: team,platform-ios,p: maps,package,P3,team-ios,triaged-ios

There are several places in the plugin's OjbC code could be cleaned up. 

- [x] Some properties could be updated to (nonatomic) to enhance the performance. For example: https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/GoogleMapCircleController.h#L22
This pattern was initially introduced in one of the first plugin commits (https://github.com/flutter/plugins/commit/2db1f4b4f95faf6d307514842d567b96bb360dc2) and never documented why atomic was necessary. I did a scan of all the plugin code and didn't find a place where these properties are accessed or updated in different threads. 

- [x] Some method could be renamed to better ObjC naming convention. For example: https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/GoogleMapCircleController.h#L36 can be renamed to `removeCircleWithIdentifiers `

- [x] Objc properties can be used instead of local variables. For example:
https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/GoogleMapMarkerController.m#L12-L14

- [x] Some unnecessary static functions can be removed. For example:
https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/GoogleMapCircleController.m#L59

- [ ] Many Objective-C APIs do not have documents/comments, which makes the code hard to reason about. For example:
https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/GoogleMapController.h#L42

- [ ] Add generics to Collection objects, for example: NSArray<NSString *>*

- [ ] Make all the header files assume non-null and add nullability prefixes if necessary. See https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/FLTGoogleMapTileOverlayController.h#L8
Repository: pytorch
Issue: [checkpoint] SPMD distributed checkpoint coordination
Labels: oncall: distributed,sharded_tensor

### 🚀 The feature, motivation and pitch

The current implementation provides no coordination around completion or failure.

A call to `load_state_dict` or `save_state_dict` should complete either when: 

- the global checkpoint has successfully being written and sync'd to storage.
- one or more ranks ran into an error

It should be possible to know if a checkpoint ran to completion by only looking at the stored objects. As an initial approach, I suggest we follow the following sequence:

- all ranks write their data and fsync it (or equivalent)
- all_gather_object write results (stop here in case of failure)
- rank 0 write metadata and fsync it (or equivalent)
- rank 0 scatter result of metadata write results

The last collective should be enough to provide the required coordination among ranks.



### Alternatives

_No response_

### Additional context

_No response_

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: three.js
Issue: OBJExporter (also PLY and STL): Support for deformable meshes (skins & morphs)
Labels: Enhancement

**Is your feature request related to a problem? Please describe.**

We have a simulation using Three.js making use of both skinned meshes and morph targets. We want to be able to export a static mesh at a given frame. The OBJExporter in some ways works very well for this, however it doesn't deform vertex positions when saving.

**Describe the solution you'd like**

I'd like a way for the OBJExporter to be able to access a deformed version of meshes. This could also be used by the PLYExporter and STLExporter.

**Describe alternatives you've considered**

Exporting to GLTF and using a different tool to translate to OBJ - this is quite a janky workflow for me.
Repository: ant-design
Issue: Try onPopupScroll in Select for async loading options; dropdown closed after the request done
Labels: Inactive

### Reproduction link

[https://codesandbox.io/s/antd-reproduction-template-forked-qppxv3?file=/CusSelect.js](url)

### Steps to reproduce

Since the code involves asynchronous requests, I can't provide a good and complete example; but I've shown 99% of the logic of my code in this demo I think.
I am trying to do paginate for Options of Select component. Also, I saw you said in issue#33787 which let us use `open` and `onOpenChange`; I tried to use open to control which is not useful for me; and I can not find `onOpenChange` as valid in props.


### What is expected?

The dropdown of Select keeps showing before I actually make the general actions that are trigging to close it; or can be said as "don't lose the focus". 

### What is actually happening?

It loses focus after the request is done and the new list of options has been sorted.

| Environment | Info |
| --- | --- |
| antd | 4.18.2 |
| React | 17.0.2 |
| System | Windows11 |
| Browser | Chrome 100.0.4896.127 |

---
I also have a global "loading" component for the entire project; it's going to show at the top layer of the page when any request is posted. Would it affect the focus?

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: flutter
Issue: Objc class names should have unique prefix for each plugin in flutter/packages
Labels: team,platform-ios,package,P3,team-ios,triaged-ios

### Background 
See: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Conventions/Conventions.html
"Objective-C classes must be named uniquely not only within the code that you’re writing in a project, but also across any frameworks or bundles you might be including. As an example, you should avoid using generic class names like ViewController or TextParser because it’s possible a framework you include in your app may fail to follow conventions and create classes with the same names."

The TL;DR is: When different plugins are included in the same flutter app, all the ObjC classes need to have unique name. Because we test and compile plugins independently, it is possible to have classes with the same names in different plugin.

For example, consider ImagePicker plugin and VideoPlayerPlugin. We might create a new ObjcC class in ImagePicker plugin called `FLTVideoInfo`, and then also create a new ObjC class in the VideoPlayerPlugin with the same name without knowing that the same class exists in ImagePicker plugin. It causes a conflicts when an app includes both plugins to its dependencies. 

### Proposal
To avoid this issue as much as possible, we can enforce a unique class prefix for each plugin. I will list the current prefix used in all the flutter/plugins and the prefix I suggest to use here:

| Plugin             | Current          | Proposed |  TaskCompleted | 
| - | - | -| -|
| Camera   | FLT  | FCP |  |
| GoogleMaps| FLT | FGM |   |
| GoogleSignIn | FLT | FSI |  |
| ImagePicker | FLT | FIP |  |
| InAppPurchase | FIAP | FIA (3 characters are recommanded per ObjC style) |   |
| IOSPlatformImages | None | FPI |  |
| LocalAuth | FLT | FLA |  |
| PathProvider| FLT | FPP |  |
| QuickActions | FLT | FQA |  |
| SharedPreferences | FLT | FSP |  |
| URLLauncher| FLT | FUL |  |
| VideoPlayer | FLT | FVP |  |
| WebViewFlutter| FLT | FWV|  |

### Limitation
It is possible a plugin that is not authored by the Flutter team contains classes with the exact same name, or the app itself contains a class with the same name. We probably don't have any control over those scenarios, the app developer will be responsible to address these situation case by case.

### Enforce and Testing
To enforce all the ObjC classes in the plugins use the correct unique Prefix, we might need a dart script (in plugin tools) to scan all the @interfaces in all .h files under /ios/Classes/ to ensure they are using the correct prefix.
Repository: flutter
Issue: [scheduler] Implement deflaking backfiller
Labels: team-infra,good first issue,P2,triaged-infra

> It would be interesting to use this logic to rerun failed tests to surface flakes. Not needed in this PR though.

https://github.com/flutter/cocoon/pull/1776#discussion_r857897367

https://cs.opensource.google/flutter/cocoon/+/main:app_dart/lib/src/service/scheduler/policy.dart;l=1?q=policy.dart&sq=&ss=flutter%2Fcocoon

It would be nice if backfilling tried to rerun failed tasks to see if they passed.
Repository: storybook
Issue: Specific displayName causes syntax error
Labels: bug,react,typescript,argtypes

**Describe the bug**
If react component displayName contains "-" than where will be error in preview: `Uncaught SyntaxError: Invalid left-hand side in assignment` because it builds in this code:
```
try {
    // @ts-ignore
    my-button-name.displayName = "my-button-name";
    // @ts-ignore

```

**To Reproduce**
1. Install create-react-app with typescript
2. Install storybook with webpack5 support
3. In sample component "src\stories\Button.tsx" set displayName like this:
4. `Button.displayName = 'my-button-name'`
5. run storybook
6. storybook preview won't load (stops at loading state) and in console will be error messages:
`Uncaught SyntaxError: Invalid left-hand side in assignment`
![displayName](https://user-images.githubusercontent.com/47197404/165396834-4f604c65-85ba-4d0a-bade-7cbbebd66028.png)

**System**
Environment Info:

  System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz
  Binaries:
    Node: 16.14.2 - C:\tools\nodejs\node.EXE
    npm: 8.5.0 - C:\tools\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (100.0.1185.50)
  npmPackages:
    @storybook/addon-actions: ^6.4.22 => 6.4.22
    @storybook/addon-essentials: ^6.4.22 => 6.4.22
    @storybook/addon-interactions: ^6.4.22 => 6.4.22
    @storybook/addon-links: ^6.4.22 => 6.4.22
    @storybook/builder-webpack5: ^6.4.22 => 6.4.22
    @storybook/manager-webpack5: ^6.4.22 => 6.4.22
    @storybook/node-logger: ^6.4.22 => 6.4.22
    @storybook/preset-create-react-app: ^4.1.0 => 4.1.0
    @storybook/react: ^6.4.22 => 6.4.22
    @storybook/testing-library: ^0.0.11 => 0.0.11

**Additional context**
I am using Framework7 and for some reason I have to add `ListItem.displayName = "f7-list-item"` in components. Removing this line or modifing it to something like `ListItem.displayName = "f7_list_item"` fixes syntaxError, but it breakes styles.
Is there anyway to use "f7-list-item" as display name? May be some babel config changing?
Repository: pytorch
Issue: TorchFunction handling and overload resolution very slow in `torch.ops`
Labels: oncall: jit

### 🐛 Describe the bug

This was noticed while investigating a perf hit after using `torchbind` custom classes in the profiler api, see https://github.com/pytorch/pytorch/pull/72302#issuecomment-1107887355

We get a 30x slowdown on `_record_function_exit` after switching to the second of two overloads, changing from `Tensor` to `_RecordFunction` respectively. Tensor is much faster both because it's the first overload is the set, and fast-tracks `__torch_function__` checks by virtue of the `THPVariable_CheckTypeExact` special case in `check_has_torch_function`.

```python
import torch
record = torch.ops.profiler._record_function_enter_new('test')

# First call normally
%timeit torch.ops.profiler._record_function_exit(record)
# 30.3 µs ± 760 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)

with torch._C.DisableTorchFunction():
    # Now remove calls to `has_torch_function_attr`
    %timeit torch.ops.profiler._record_function_exit(record)
    # 12.1 µs ± 115 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)

    # Now also avoid overload resolution
    %timeit torch.ops.profiler._record_function_exit._RecordFunction(record)
    # 2.68 µs ± 5.87 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
```

### Versions

2291960d3f0ea0f7c4e99e955bc9a23783ef70a3
Repository: electron
Issue: [Feature Request]: Change input language programmatically
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/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.

### Problem Description

We have a desktop app built using `Electron` and it contains many forms where our users are switching the keyboard language between (English & Arabic) for specific text fields (which are many).

I'm planning to switch keyboard input language for those text fields programmatically, but I'm not able to find an API in Electron to do so.

I found [similar solutions](https://stackoverflow.com/a/60790883/2577302) for other frameworks, but not `Electron`

Thanks!

### Proposed Solution

An api to change the current input language

### Alternatives Considered

There is nothing in my mind

### Additional Information

_No response_
Repository: flutter
Issue: [flutter_tools] "_CastError: type 'Section' is not a subtype of type 'StringTable' in type cast"
Labels: tool,P2,team-tool,triaged-tool

on Flutter beta/2.13.0-0.2.pre

```
Thread 0 main thread _CastError: type 'Section' is not a subtype of type 'StringTable' in type cast
at CastIterator.current(cast.dart:62)
at MappedIterator.moveNext(iterable.dart:391)
at MapMixin.addEntries(maps.dart:177)
at new Map.fromEntries(map.dart:209)
at Elf.fromReader._cacheSymbolNames(elf.dart:1054)
at Elf.fromReader(elf.dart:1072)
at Dwarf.fromReader(dwarf.dart:1219)
at Dwarf.fromBytes(dwarf.dart:1228)
at _defaultTransformer(symbolize.dart:122)
at DwarfSymbolizationService.decode(symbolize.dart:178)
at SymbolizeCommand.runCommand(symbolize.dart:109)
at FlutterCommand.verifyThenRunCommand(flutter_command.dart:1342)
at <asynchronous gap>(async)
at FlutterCommand.run.<anonymous closure>(flutter_command.dart:1183)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at CommandRunner.runCommand(command_runner.dart:209)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand.<anonymous closure>(flutter_command_runner.dart:281)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand(flutter_command_runner.dart:229)
at <asynchronous gap>(async)
at run.<anonymous closure>.<anonymous closure>(runner.dart:62)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at main(executable.dart:94)
at <asynchronous gap>(async)
```