sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: `EditorPlugin.edit` is not called when `EditorPlugin.handles()` returns `true` for objects inside collections
Labels: bug,topic:editor,topic:plugin

### Godot version

v3.4.stable.official [206ba70f4]

### System information

Windows 11 x64

### Issue description

![bXJZwHN1fa](https://user-images.githubusercontent.com/7025991/149585539-358e64c9-8793-4281-ba32-f77a8f6a23ad.gif)

If you're making a plugin and you try to edit a resource that you plugin handles, you'll notice that your `edit()` function is not called and that the array inspector is not opening the default editor.

As you can see in the gif, `handles()` method is called, but `edit()` is not. 

No idea if those lines are related to it:

https://github.com/godotengine/godot/blob/6fac314b5dcc72bb49cf814ddeeca77bc216a32b/editor/editor_properties_array_dict.cpp#L206

https://github.com/godotengine/godot/blob/6fac314b5dcc72bb49cf814ddeeca77bc216a32b/editor/editor_properties.cpp#L2428

https://github.com/godotengine/godot/blob/6fac314b5dcc72bb49cf814ddeeca77bc216a32b/editor/editor_plugin.cpp#L650

### Steps to reproduce

1. Create a plugin
2. Make it handles Resource
3. Create the `edit()` function and put a print there
4. In any other script, export an array and fill it with resources, the `edit()` is never called.

or
1. Download the reproduction project
2. Enable test_plugin

### Minimal reproduction project

[handles_test.zip](https://github.com/godotengine/godot/files/7873260/handles_test.zip)
Repository: rust
Issue: Require explicit opt-in when combining `HashStable` with custom `PartialEq`
Labels: T-compiler,A-incr-comp,C-bug

The [`HashStable` trait](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/stable_hasher/trait.HashStable.html) requires that a `HashStable` impl agree with the `PartialEq` impl for the same type: `x == y` if and only if `hash_stable(x) == hash_stable(y)`.

Unfortunately, it's currently easy to violate this requirement by accident. A type may start out with a manual `PartialEq` impl - this may be perfectly fine on its own, but then become invalid if a `#[derive(HashStable)]` attribute is later added.

For example, the `Ident` struct acquired a manual `PartialEq` impl [four years ago](https://github.com/rust-lang/rust/commit/baae274fb72c91dbee441e20622cffdc218bdcb5#diff-9589e2d82ff438a80167897af5df86abc549367645c129d3447907c9a83c9480R53-R57), which ignored the location of the `Span` field (only the `SyntaxContext` is compared). At the time, that was fine - however, `Ident` now implements `HashStable`, making that impl incorrect.

I propose that we add a new `#[marker]` trait called something like `PartialEqSafeForHashStable`, and have `trait HashStable: PartialEqSafeForHashStable`. When `HashStable` is derived, we can emit `impl PartialEqSafeForHashStable for MyType where MyType: StructuralPartialEq`, which will give us the desired impl automatically when `#[derive(PartialEq)]` is used. If a manual impl of `HashStable` and/or `PartialEq` is written, a manual impl of the trait will be needed to assert that the impls are actually compatible.

Without negative bounds, we can't have `impl PartialEqSafeForHashStable for T where T: !PartialEq`. However, we could allow writing `#[stable_hasher(no_partial_eq)]`, and make that use the [assert *not* implemented](https://docs.rs/static_assertions/latest/static_assertions/macro.assert_not_impl_all.html) trick to enforce that the user really didn't write a `PartialEq` impl.
Repository: pytorch
Issue: [RFC] Gossip SGD (as a DDP Communication Hook)
Labels: oncall: distributed,feature,module: optimizer,triaged,module: ddp

### 🚀 The feature, motivation and pitch

## Need for An Replacement of AllReduce Communication Collective

Nowadays powerful industry users (not necessarily in FAANG) like Cruise, Microsoft, and Tesla are moving towards scaling large-scale training to 100+ or even 1K+ GPUs. DDP, as the most well-adopted data parallelism implementation in PyTorch, all-reduces the gradients of all the processes at each iteration by default. Since allreduce is a communication collective, this does not allow us to effectively target a certain individual process. This can cause a few issues in some scenarios:

1.  If some processes are stragglers, allreduce makes it almost impossible to target these individual stragglers and very hard to mitigate this issue. By contrast, parameter-server architecture can often tackle stragglers in a much easier way, such as discarding the late updates and/or [preparing some backup workers](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45187.pdf).
2. Let's say if we scale out training to 1K relatively low-end GPUs, fault tolerance could be a concern. The current common solution is restarting from the most recent checkpoint and re-initializing the entire large process group, even if only one worker fails. This can be very inefficient if the large process group initialization is slow and the failure is not rare. Therefore, we may need a finer-grained fault-tolerance mechanism at the communication layer.

## A Promising Approach: Gossip SGD

I believe one potential solution could be Gossip SGD ([example](https://arxiv.org/abs/1803.05880)), which has no need for a communication collective. Note that Gossip SGD is also mentioned in this [composable DDP proposal](https://github.com/pytorch/pytorch/issues/37002) back in 2020.

### Alternatives

An alternate solution is parameter-server architecture for the synchronization. However, this architecture can also have some other disadvantages over AllReduce, and such solution often requires more drastic changes to the overall architecture/config. In comparison, gossip SGD can be implemented as a communication hook and seamlessly replace the vanilla allreduce in PyTorch.

### Additional context

This can be considered as a DDP feature request. To facilitate the triage:

Labels: feature, module:ddp, oncall:distributed.
CC PyTorch Distributed DDP developers: @mrshenli @pritamdamania87 @zhaojuanmao @rohan-varma

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @vincentqb @jbschlosser @albanD
Repository: pytorch
Issue: Change the order of checks for tensor indexing errors
Labels: triaged,module: advanced indexing

### 🐛 Describe the bug


![image](https://user-images.githubusercontent.com/7935430/149586895-cc8b6fbc-986d-40d5-9a8b-846326ca92a5.png)

Given the above behavior it seems that for tensor indexing, the length of the "index object" is first checked (in the above example 'ab' is 2 chars) which results in an error not indicative of the true cause. Probably it is better to first check for "TypeError: new(): invalid data type 'str'" and then check for "IndexError: too many indices for tensor of dimension 1"

### Versions

![image](https://user-images.githubusercontent.com/7935430/149587586-4511280d-b9e8-42d3-8b53-8bf4ad757d42.png)
Repository: godot
Issue: class_name extending EditorPlugin breaks in exported project
Labels: discussion,topic:plugin,topic:export

### Godot version

3.5 / 4.0 c1e78f7

### System information

W10

### Issue description

When you make an EditorPlugin, give it a `class_name` and then use it somewhere in your project, that code won't work in exported project. There is error saying that EditorPlugin class cannot be found.

This is not really a bug, but it would be nice if there was some warning when using `class_name` with EditorPlugin. Otherwise you export the project not expecting anything and suddenly it breaks.

### Steps to reproduce

1. Add script extending EditorPlugin
2. Give it a class_name
3. Use it somewhere in the project (optional?)
4. Export the project and run

### Minimal reproduction project

_No response_
Repository: TypeScript
Issue: Formatter doesn't recognize file type change
Labels: Bug,Help Wanted,Effort: Moderate,Domain: Formatter

Possibly related to #47446.

In VS Code, use an anonymous buffer whose language starts as "TypeScript" and switches to "TypeScript React". The formatter doesn't adapt correctly.

```tsx
let x = <div>
    <div>
    </div>
</div>;
```

Format.

**Expected**

No change

**Actual**

```tsx
let x = <div>
    <div>
    </div>
    < /div>;
```
Repository: flutter
Issue: Some iOS unit tests fail when run on a iOS 13.0 simulator
Labels: engine,P2,team-engine,triaged-engine

By default the iOS unit tests run on the latest simulator available.  If you explicitly run the tests on the iOS 13.0 simulator some tests fail.  I'm not sure if these actually represents bugs or is a quirk of how the tests are written.

## Tests that fail
### testInputViewsHaveUIInteractions in FlutterTextInputPluginTest
```
Test: testInputViewsHaveUIInteractions in FlutterTextInputPluginTest failed on iPhone 11
Assertions: Assertion Failure at FlutterTextInputPluginTest.mm:1140: ((inputView.interactions.count) greater than (0ul)) failed: ("0") is not greater than ("0")
File: FlutterTextInputPluginTest.mm:1140
```
### testVerticalFlutterScrollableSemanticsObjectNoWindow in SemanticsObjectTest
```
Test: testVerticalFlutterScrollableSemanticsObjectNoWindow in SemanticsObjectTest failed on iPhone 11
Assertions: Assertion Failure at SemanticsObjectTest.mm:275: ((CGRectEqualToRect(actualFrame, expectedFrame)) is true) failed - Scroll view <FlutterSemanticsScrollView: 0x7fc17c0ca600; baseClass = UIScrollView; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x600002393fc0>; layer = <CALayer: 0x600003121d00>; contentOffset: {3, 40}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}> frame is {{0, 0}, {0, 0}}, expected {{2.5, 2.5}, {25, 50}}
File: SemanticsObjectTest.mm:275

Assertions: Assertion Failure at SemanticsObjectTest.mm:282: ((CGSizeEqualToSize(actualContentSize, expectedContentSize)) is true) failed - Scroll view <FlutterSemanticsScrollView: 0x7fc17c0ca600; baseClass = UIScrollView; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x600002393fc0>; layer = <CALayer: 0x600003121d00>; contentOffset: {3, 40}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}> size is {0, 0}, expected {25, 175}
File: SemanticsObjectTest.mm:282

Assertions: Assertion Failure at SemanticsObjectTest.mm:289: ((CGPointEqualToPoint(actualContentOffset, expectedContentOffset)) is true) failed - Scroll view <FlutterSemanticsScrollView: 0x7fc17c0ca600; baseClass = UIScrollView; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x600002393fc0>; layer = <CALayer: 0x600003121d00>; contentOffset: {3, 40}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}> offset is {3, 40}, expected {0, 37.5}
File: SemanticsObjectTest.mm:289
```

cc @jmagman
Repository: rust
Issue: rustdoc fails to build an intra doc link when linking through 3 crates without explicit use
Labels: T-rustdoc,C-bug,A-intra-doc-links

With three crates:
* Crate C export a public struct
* Crate B depends on crate C and export a public struct with doc linking to the crate C pub item
* Crate A reexport everything from crate B

When building doc for crate A, the intra doc link will not work without a warning.

This is what's happening in Bevy on [the doc for `DefaultPlugins`](https://docs.rs/bevy/latest/bevy/struct.DefaultPlugins.html) (https://github.com/bevyengine/bevy/issues/3654).

I managed to write a UI test reproducing the issue: https://github.com/mockersf/rust/commit/1c4d4784fdfa320edf9c6328ca4734089f873c86

<details><summary>Test failure message</summary>
<p>

```
14: @has check failed
	`XPATH PATTERN` did not match
	// @has 'issue_zzzz/struct.Reexported.html' '//div[@class="docblock"]/p/a[@href="../issue_zzzz_internal/struct.Internal.html"]' 'issue_zzzz_internal::Internal'

Encountered 1 errors
```

</p>
</details>

<img width="1002" alt="Screenshot 2022-01-15 at 00 00 31" src="https://user-images.githubusercontent.com/8672791/149597541-52c4a82f-6903-4d8c-a7d3-808e82c743f0.png">
The link is not replaced, even though rustdoc was able to correctly link the struct in the definition.

<details><summary>If I uncomment the `extern crate` in the reexported crate (crate B from above), the link works</summary>
<p>
<img width="1002" alt="Screenshot 2022-01-15 at 00 00 00" src="https://user-images.githubusercontent.com/8672791/149597662-ab6e9c1a-4871-4db2-bb17-deabbe7e9282.png">
</p>
</details>

Ideally I would like the link to work. I'm guessing it's something about the external crate not being in context for link resolution when it's not explicitly used, but it seems it is later on as the link is correct for the struct definition. I tried to follow the code to where the context could be different between the two but didn't manage to find it.

If it's not possible, would it be OK to issue a warning?

### Meta

Reproduced with rust 1.57, 1.58, nightly 1bd4fdc94 2022-01-12 and 256721ee519f6ff15dc5c1cfaf3ebf9af75efa4a
Repository: godot
Issue: Renaming a script file, doesn't auto update the name everywhere
Labels: bug,topic:editor

### Godot version

v3.4.1.stable.official [aa1b95889]

### System information

Windows 10 21H1

### Issue description

Renaming a script in the FileSystem panel, by right clicking and choosing: `Rename...`

Doesn't auto update the name in the Script panel, or at the top of the Inspector.

### Steps to reproduce

In the FileSystem panel
- Right click and choose: `New script...`
- Click `Create` to use the default values
- Double click on `new_script.gd` to open the Script editor
- Make sure that the Script panel is open:
`File > Toggle Script Panel` (at the bottom of the menu)
- In the FileSystem panel, right click on `new_script.gd`
- Choose `Rename...`
- The name `new_script` is selected
- Type: `newer`
(make sure that the name ends in `.gd`,
otherwise the file disappears from the FileSystem panel,
without a warning. The file still exists in the project directory.)
- Press: `Enter` to confirm

### Observed
The Script panel didn't update the name.
and the script name at the top of the Inspector,
still shows the name from when `new_script.gd` was double clicked.

The name updated instantly in:
- FileSystem panel
- `Inspector > Resource > Path`

The Script panel name usually updates as soon as one right clicks,
maybe Godot redraws everything when the right click menu opens.

But in the screen recording below, the name didn't update when right clicking.

https://user-images.githubusercontent.com/13420573/149601044-c42b1522-f5cb-4dd4-b08d-215bde2ac733.mp4


### Expected
The script name should auto update instantly everywhere where it's visible.


### Notes
Sometimes the Script panel updates the script name automatically,
with the following steps:
- Mouse select the script in the FileSystem panel
- Press `F2`
- Type the new name
- Confirm by pressing: `Enter`

But that still doesn't change the name at the top of the Inspector.

And the Script panel doesn't update automatically,
if the `F2` renaming window is confirmed by
mouse clicking on the `Rename` button,
instead of pressing `Enter`.

Near the end of the screen recording above,
the Script panel didn't update the name, after renaming the script to `newest.gd`,
with `F2` and confirming with `Enter`,
until the FileSystem panel was right clicked.


### Minimal reproduction project

_No response_
Repository: rust
Issue: rustdoc: make tests easier to understand and fix
Labels: A-testsuite,T-rustdoc,A-contributor-roadblock

Rustdoc's tests fail easily, and it's not always easy to figure out _why_ they are failing and how to fix them. That presents a barrier to participation, which we should fix. Some ideas:

For the XPath tests:
 - When we fail to find a match, we should print what part of the XPath expression (if any) matched, and what part failed to match.
 - If we got a partial path match, we should print a summary of the elements at the next level below.
 - If we find the appropriate element but fail the text match, we should print the actual text we found (with some limit, say 100 characters).
  - Failed tests should print the full path to the HTML file, so people can check against it.
  - We should offer a command line tool that can take an HTML file and an XPath expression, and run a match without the full overhead of building and running the tests.

For the browser UI tests: We should offer a debugging mode, accessible from x.py, for instance:

```
./x.py test src/test/rustdoc-gui/anchors.goml  --debug
```

This should (a) turn on headless mode, (b) turn on --show-text, and (c) stop on assertion errors, but leave the browser open so the user can evaluate what went wrong.

In general:

In the [Rustdoc overview](https://rustc-dev-guide.rust-lang.org/rustdoc.html) we should include instructions for installing all tools that are used when locally debugging tests: node, npm, tidy, and configuring a git pager with `git config --global core.pager less`.

We should also consider whether the "diff against nightly" is useful to show whenever an XPath test fails. Personally I've never used it; I've also heard people say they want it. It obscures the "normal" error output. Maybe it should be a debugging flag?

@pierwill, you recently worked on getting rustdoc tests to pass after a big change. Do you have any thoughts on what might have made it a better process?
Repository: storybook
Issue: Build-storybook on CRA: TypeError MiniCssExtractPlugin is not a constructor
Labels: bug,react,cra

On latest version of Storybook with CRA:

```
$ npx sb@next repro -t cra cra-repro-next
$ cd cra-repro-next && yarn build-storybook
...
ERR! TypeError: MiniCssExtractPlugin is not a constructor
ERR!     at module.exports (/Users/shilman/projects/testing/cra-repro-next/node_modules/react-scripts/config/webpack.config.js:664:9)
ERR!     at Object.webpack (/Users/shilman/projects/testing/cra-repro-next/node_modules/@storybook/preset-create-react-app/dist/index.js:115:57)
ERR!     at /Users/shilman/projects/testing/cra-repro-next/node_modules/@storybook/core-common/dist/cjs/presets.js:279:28
ERR!     at async Object.build (/Users/shilman/projects/testing/cra-repro-next/node_modules/@storybook/builder-webpack5/dist/cjs/index.js:165:16)
ERR!     at async Promise.all (index 1)
ERR!     at async buildStaticStandalone (/Users/shilman/projects/testing/cra-repro-next/node_modules/@storybook/core-server/dist/cjs/build-static.js:175:28)
ERR!     at async buildStatic (/Users/shilman/projects/testing/cra-repro-next/node_modules/@storybook/core-server/dist/cjs/build-static.js:195:5)
```
Repository: rust
Issue: Improve diagnostic when lifetime parameter is elided in return positions
Labels: A-diagnostics,T-compiler

Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=b413ed034f662797ddfe5dfc6772a277

```rust
struct Scanner<'a> {
    input: &'a str
}

impl<'a> Scanner<'a> {
    pub fn scan(&self) -> Token {
        Token {
            input: self.input
        }
    }
    
}

struct Token<'a> {
    input: &'a str

}

fn scan(input: &str) -> Token {
    Scanner { input }.scan()
}
```

The current output is:

```
error[E0515]: cannot return reference to temporary value
  --> src/lib.rs:20:5
   |
20 |     Scanner { input }.scan()
   |     -----------------^^^^^^^
   |     |
   |     returns a reference to data owned by the current function
   |     temporary value created here

For more information about this error, try `rustc --explain E0515`.
error: could not compile `playground` due to previous error
```

<!-- The following is not always necessary. -->
Ideally the output should look like:

```
    pub fn scan(&self) -> Token {
                              ^ try adding <'a>: `Token<'a>`
```
but more pretty
Repository: svelte
Issue: Support for Exclusively Special Characters in Component Filenames
Labels: compiler

### Describe the bug

Certain component filenames will throw the error: `Could not derive component name from file {FILENAME}.svelte`.

Examples of filenames that will throw an error:
@.svelte
&.svelte
...

Examples of filenames that will not throw an error:
%.svelte
$.svelte

The reason for why this is happening is that function [get_name_from_filename](https://github.com/sveltejs/svelte/blob/master/src/compiler/compile/utils/get_name_from_filename.ts) replaces certain characters with underscores and if these underscores happen to be leading characters, then they get deleted. 

The behavior is somewhat inconsistent, because certain equivalent filenames, but with a different special character do work just fine. 

Additionally, this is not how HTML and the web generally work. You may very well have a file named just "@" if you want.

This is a bigger issue in SvelteKit, because now urls like `example.com/something/@` are essentially second class citizens (yes the problem can be fixed by creating a directory and a index.svelte file, but this is in some cases extra boilerplate).

**Potential fix**

It is relatively easy to fix this problem. In the function [get_name_from_filename](https://github.com/sveltejs/svelte/blob/master/src/compiler/compile/utils/get_name_from_filename.ts) the following code is the culprit:

```
const base = parts.pop()
  .replace(/%/g, 'u')
  .replace(/\.[^.]+$/, '')
  .replace(/[^a-zA-Z_$0-9]+/g, '_')        // This line replaces "@" => "_"
  .replace(/^_/, '')                       // This line replaces leading "_" => "" and thus causes the bug
  .replace(/_$/, '')
  .replace(/^(\d)/, '_$1');
```

To fix this problem, either change `.replace(/%/g, 'u')` to take in other special characters as well, like so:  `.replace(/[%@#]/g, 'u')`. However, this leads to the question of what special characters are to be supported. Maybe there is some way to regex them all? Additionally, should all of these be replaced with "u"?

Alternatively, leading "_" should not be discarded if they are the only characters.

### Reproduction

https://svelte.dev/repl/392f9371025f48f88a6274a5f6e6d8ee?version=3.46.2

### Logs

```shell
Could not derive component name from file @.svelte
```


### System Info

```shell
REPL
```


### Severity

annoyance
Repository: godot
Issue:  Script inherits from native type 'x', so it can't be instanced in object of type: 'ScriptEditorDebuggerInspectedObject' 
Labels: bug,topic:gdscript

### Godot version

3.4.2.stable.official [45eaa2daf]

### System information

Manjaro with Plasma KDE, Atx Radeon 580 GLES3

### Issue description

In the code editor, if I have a particular script open when I save, I get the following error:

`Script inherits from native type 'x', so it can't be instanced in object of type 'ScriptEditorDebuggerInspectedObject'.`

Even though I don't use ScriptEditorDebuggerInspectedObject anywhere on my project.

After some testing in a new project it turns out this happens if

- You have a tool script open
- You are running your project
- There has been a runtime error

You don't even need to set the scene inspector to Remote.

Related to #29506, which is closed, but I've managed to reproduce the bug in a minimal project.

### Steps to reproduce

- Create a tool script.
- Run your project.
- Cause an error (assert(false) suffices).
- Save the tool script.

### Minimal reproduction project

[RemoteToolError.zip](https://github.com/godotengine/godot/files/7874620/RemoteToolError.zip)