sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: electron
Issue: [Feature Request]: `setAutoResize` support for View/WebContentsView
Labels: enhancement :sparkles:,component/WebContentsView

### 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

WebContentsView does not currently support the ability to configure that it should automatically resize with its parent window. This was available on BrowserViews via `setAutoResize`.

### Proposed Solution

Expose a `setAutoResize` instance method on View/WebContentsView that automatically resizes the View when the dimensions of the parent window changes.

### Alternatives Considered

Currently using an event listener on the parent window's resize event to manually resize the WebContentsView.

```
this.browserWindow.on("resize", () => {
	const bounds = this.browserWindow.getBounds()
	this.webContentsView.setBounds({
		x: 0,
		y: 0,
		width: bounds.width,
		height: bounds.height,
	})
})
```

### Additional Information

_No response_
Repository: go
Issue: proposal: x/tools: tag and delete refactor/rename, refactor/importgraph, go/buildutil, cmd/gomvpkg
Labels: Proposal,Tools

While implementing this proposal:
- https://github.com/golang/go/issues/69360

I immediately realized that most of the logic is not in the cmd package but in the refactor/rename package, which has never worked with Go modules. Similarly, refactor/importgraph and go/buildutil have the same limitation. And cmd/gomvpkg is in a similar state to the (now deleted) cmd/gorename.

I propose to tag and delete all of them following a similar process.

(FWIW, the only seemingly valuable part of go/buildutil is TagsFlag, which doesn't actually work in conjunction with go/packages; one must use the syntax `gopackages -buildflag=-tags=... patterns...`.)
Repository: tensorflow
Issue: `tf.slice` triggers XLA recompilation on each call despite static shape, while `xla.dynamic_slice` does not
Labels: stat:awaiting tensorflower,comp:ops,comp:xla,type:performance,2.17

### Issue type

Performance

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

binary

### TensorFlow version

2.18.0-dev20240919

### Custom code

Yes

### OS platform and distribution

_No response_

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

When using `tf.function` with `jit_compile=True`, I've observed that `tf.slice` leads to XLA recompilation at each function call, even when the tensor shape are static. Explicitly using `tensorflow.compiler.tf2xla.python.xla.dynamic_slice` instead resolves this issue and prevents recompilation.

Expected behavior: `tf.slice` should not trigger XLA recompilation when shapes are static, similar to `xla.dynamic_slice`.

Actual behavior: `tf.slice` causes XLA recompilation on each call leading to a 100x slower performance.

Question: Shouldn't `tf.slice` be automatically converted to `xla.dynamic_slice` or an equivalent XLA operation to avoid unnecessary recompilation?

### Standalone code to reproduce the issue

```shell
import time

import tensorflow as tf
import tensorflow.compiler.tf2xla.python.xla as xla

@tf.function(jit_compile=True)
def func_xla_slice(n):
  range = tf.range(100)
  slice = xla.dynamic_slice(range, [n], [50])
  return slice

@tf.function(jit_compile=True)
def func_tf_slice(n):
  range = tf.range(100)
  slice = tf.slice(range, [n], [50])
  return slice

if __name__ == '__main__':
  print(tf.version.VERSION)

  # tracing calls
  func_xla_slice(tf.constant(0))
  func_tf_slice(tf.constant(0))

  start = time.time()
  for i in range(1, 50):
    func_xla_slice(tf.constant(i))
  print(f"XLA slice took {(time.time() - start) * 1000:.0f} ms")

  start = time.time()
  for i in range(1, 50):
    func_tf_slice(tf.constant(i))
  print(f"TF slice took {(time.time() - start) * 1000:.0f} ms")
```


### Relevant log output

```shell
XLA slice took 19 ms
TF slice took 2016 ms
```
Repository: storybook
Issue: Stop importing all of `@storybook/icons` in `@storybook/core`
Labels: BREAKING CHANGE,components,core

For backwards compatibility, `@storybook/icon` is imported as `*` in two places:

1. The `Icons` component in `@storybook/core/components`: https://github.com/storybookjs/storybook/blob/next/code/core/src/components/components/icon/icon.tsx/#L35-L62 this component is deprecated, and the new icons are supposed to be used and imported individually by users/addon authors

2. The globalisation in `@storybook/core/manager/globals: https://github.com/storybookjs/storybook/blob/next/code/core/src/manager/globals/runtime.ts/#L25 Which makes all of `@storybook/icons` globally available in the manager bundle. This ensures that `@storybook/icons` is only bundled in once in the manager, but ideally this shouldn't be necessary at all, if icons where imported individually instead.

Currently the `components` and `manager` entrypoints of `@storybook/core` both have all 190kb of `@storybook/icons` bundled in, which is significant given that icons could instead be imported individually, some being <1kb in size.

- `components`: https://635781f3500dd2c49e189caf-rjflqvpgls.chromatic.com/?path=/story/bench--es-build-analyzer&args=metafile:core_SLASH_components_DOT_esm_DOT_json
- `manager`: https://635781f3500dd2c49e189caf-rjflqvpgls.chromatic.com/?path=/story/bench--es-build-analyzer&args=metafile:core_SLASH_manager_DOT_esm_DOT_json

In Storybook 9.0 we should remove these wildcard imports so only the used icons are bundled in.
Repository: angular
Issue: Add recommended tools/extensions as part of the getting started tutorial
Labels: P2,area: docs

### Describe the problem that you experienced

After watching [this Twitch stream](https://www.twitch.tv/mouredev) I realized lots of folks who get started with Angular would be probably using suboptimal config of their text editor/IDE when building their first app.

We should recommend extensions/tools before people get started:
- Angular language service with VSCode
- WebStorm if folks are JetBrain users

### Enter the URL of the topic with the problem

https://angular.dev/tutorials/learn-angular
https://angular.dev/tutorials/first-app
Repository: PowerToys
Issue: Please add a gif/ png/ sprites viewer for those of us who like to work with pixel art.
Labels: Idea-New PowerToy,Needs-Triage,Product-Peek

### Description of the new feature / enhancement

I was hoping to find a file explorer add-on to see a preview image of my pixel art clearly. Yet just like the windows photo viewer it is still blurry. I have searched for ways to turn off anti-aliasing or smoothing effect with no success. It would be nice if PowerToys added this feature.

### Scenario when this would be used?

This would be used when i am searching for a specific sprite created. I do Voxel art and Cross stitch pattern creations and I am pretty sure this would benefit any game developers using pixel sprites as well. Please and Thank you

### Supporting information

### Photo example of File Explorer Preview Pane
![Photo example of file `explorer](https://github.com/user-attachments/assets/a13be704-7746-474c-98c8-fe03421f0df9)

### Photo Example on a Zoomed in default Windows 11 Photo Viewer
![Windows Photo viewer example](https://github.com/user-attachments/assets/269124be-0bd5-403a-9cb7-625698a25932)
Repository: godot
Issue: `ERROR: Parameter "data.tree" is null.` while `is_inside_tree()` is true.
Labels: bug,topic:core,needs testing,crash

### Tested versions

4.4.dev

### System information

Windows 10

### Issue description

Produced on a custom build.

Dumping the backtrace. Please include this when reporting the bug to the project developer.

couldn't map PC to fn name
.....

![image](https://github.com/user-attachments/assets/335d07e4-4793-490e-b0d8-2a947396b4f9)

This shouldn't happen! The only explanation is that it was caused by removing a child `OptionButton` while it's popup is visible and `WINDOW_EVENT_MOUSE_EXIT` was called for the popup.

![image](https://github.com/user-attachments/assets/e03694f3-ec0d-4150-b69d-b3bbba46789f)

### Steps to reproduce

It will be hard to provide a MRP, I'm using a custom `Inspector` and i clear all the children then i readd them again when `property_list_changed` is called, just to hide/show a property based on it's "usage".


https://github.com/user-attachments/assets/7163ee04-1159-4dc2-a9f8-7a4df1f9fcbc



### Minimal reproduction project (MRP)

N/A
Repository: rust
Issue: regression: cannot move a value of type `[u8]`
Labels: regression-from-stable-to-stable

  - https://crater-reports.s3.amazonaws.com/beta-1.82-rustdoc-1/beta-2024-09-05/reg/icu_locale_canonicalizer-0.6.0/log.txt


```
[INFO] [stdout] error[E0161]: cannot move a value of type `[u8]`
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/zerovec-0.8.1/src/flexzerovec/slice.rs:23:5
[INFO] [stdout]    |
[INFO] [stdout] 17 | #[derive(Eq, PartialEq)]
[INFO] [stdout]    |              --------- in this derive macro expansion
[INFO] [stdout] ...
[INFO] [stdout] 23 |     data: [u8],
[INFO] [stdout]    |     ^^^^^^^^^^ the size of `[u8]` cannot be statically determined
[INFO] [stdout]    |
[INFO] [stdout]    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
```

note: if the relevant team already accepted this breakage then this issue can be closed
Repository: godot
Issue: StreamPeerGzip::finish() fails when compressing with Condition "err != (p_close ? 1 : 0)" is true. Returning: FAILED 
Labels: bug,topic:core,confirmed

### Tested versions

Reproduced in the following versions

- v4.3.stable.official [77dcf97d8]
- v4.3.stable.mono.official [77dcf97d8]

### System information

Windows 11 Pro. i5-12600k

### Issue description

When attempting to compress some "large" data (around ~6kb json string), calling finish() fails with the following error and only the 10 byte gzip header is returned.

```
E 0:00:28:0506   global.gd:51 @ Gzip(): Condition "err != (p_close ? 1 : 0)" is true. Returning: FAILED
  <C++ Source>   core/io/stream_peer_gzip.cpp:115 @ _process()
```

[Link to Source](https://github.com/godotengine/godot/blob/77dcf97d82cbfe4e4615475fa52ca03da645dbd8/core/io/stream_peer_gzip.cpp#L115)

## My Code

```gdscript
static func Gzip(data: PackedByteArray, unzip := false) -> PackedByteArray:
	var gzip = StreamPeerGZIP.new()
	var err

	if unzip:
		err = gzip.start_decompression()
	else:
		err = gzip.start_compression()
		
	print("GZIP Start: " + str(err))
	err = gzip.put_data(data)
	print("GZIP Put Data: " + str(err))
	
	if !unzip:
		err = gzip.finish() #TODO: This throws an error when output is too large
		print("GZIP Finish: " + str(err))
	
	# Get all zipped content into one array
	var bytes: PackedByteArray = []
	while gzip.get_available_bytes() > 0:
		var res = gzip.get_partial_data(65535)
		if res[0] != 0:
			push_error("Error processing gzip data")
			return []
		bytes.append_array(res[1])
		
	return bytes
```

## Output When Error Occurs

```
GZIP Start: 0
GZIP Put Data: 0
GZIP Finish: 1
```

### Steps to reproduce

In my tests, this happens when the compressed **output** data is larger than 1034 bytes. In my case, this happened when trying to compress anything larger than ~6kb of json string data (with no whitespace)

Simply call the Gzip() func above, passing in data that will compress to anything larger than 1034 bytes

[lorem_bad.txt](https://github.com/user-attachments/files/17065890/lorem_bad.txt)
[lorem_bad.txt.gz](https://github.com/user-attachments/files/17065892/lorem_bad.txt.gz)
[lorem_ok.txt](https://github.com/user-attachments/files/17065893/lorem_ok.txt)
[lorem_ok.txt.gz](https://github.com/user-attachments/files/17065895/lorem_ok.txt.gz)


### Minimal reproduction project (MRP)

[gzip_mrp.zip](https://github.com/user-attachments/files/17065967/gzip_mrp.zip)
Repository: godot
Issue: Parser error on lambda corner case
Labels: bug,topic:gdscript

### Tested versions

- Reproducible in `master` latest (0a4aedb36065f66fc7e99cb2e6de3e55242f9dfb)

### System information

Ubuntu 24

### Issue description

The following script:
```gdscript
extends Node

func foo():
	pass

func _ready() -> void:
	get_tree().create_timer(1.0).timeout.connect(foo)  # works
	get_tree().create_timer(1.0).timeout.connect(func(): foo())  # works
	get_tree().create_timer(1.0).timeout.connect(
		func():
		foo()
	)  # works
	(
		get_tree()
		. create_timer(1.0)
		. timeout
		. connect(foo)
	)  # works
	(
		get_tree()
		. create_timer(1.0)
		. timeout
		. connect(func(): foo())
	)  # works
	(
		get_tree()
		. create_timer(1.0)
		. timeout
		. connect(
			func(): foo()
		)
	)  # works
	(
		get_tree()
		. create_timer(1.0)
		. timeout
		. connect(
			func():
				foo())
	)  # works !
	(
		get_tree()
		. create_timer(1.0)
		. timeout
		. connect(
			func():
				foo()
		)
	)  # doesn't work !
```

yields
```
SCRIPT ERROR: Parse Error: Unindent doesn't match the previous indentation level.
          at: GDScript::reload (res://tests/potential-godot-bugs/lambda_corner_case.gd:47)
ERROR: Failed to load script "res://tests/potential-godot-bugs/lambda_corner_case.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript.cpp:3005)
```

while IMO it should parse correctly.

### Steps to reproduce

Run the above using `godot --headless --check-only -s <script_name>`

### Minimal reproduction project (MRP)

See above.
Repository: rust
Issue: -plugin-opt linker flags require a leading dash when using GCC as a linker
Labels: A-codegen,T-compiler,A-gcc

Hi.
I was testing cross-language LTO with rustc_codegen_gcc (using GCC as the linker) and I needed to add a leading dash to the flags in [this code](https://github.com/rust-lang/rust/blob/d5a081981d166f6542a050d17035424062ef4aae/compiler/rustc_codegen_ssa/src/back/linker.rs#L395-L396) in order to make cross-language LTO working, so that it looks like this:
```rust
        self.link_args(&[
            &format!("-plugin-opt=-{opt_level}"),
            &format!("-plugin-opt=-mcpu={}", self.target_cpu),
        ]);
```
Otherwise, GCC will error out with:
```
          lto1: fatal error: open O3 failed: No such file or directory
          compilation terminated.
          lto-wrapper: fatal error: gcc returned 1 exit status
```

It would be nice to have the code working for both GCC and clang.
How would you support both?

Interestingly, `clang` seems to support a leading dash in the case of `-plugin-opt=-mcpu=x86-64`, but not `-plugin-opt=-O3`.
Thanks.
Repository: TypeScript
Issue: Proposal: Allow isolated declarations to infer results of constructor calls
Labels: Suggestion,Experimentation Needed

### 🔍 Search Terms

isolated declarations constructor generic infer

### ✅ Viability Checklist

- [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [X] This wouldn't change the runtime behavior of existing JavaScript code
- [X] This could be implemented without emitting different JS based on the types of the expressions
- [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [X] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

### ⭐ Suggestion

Add a new flag or change the behavior of `--isolatedDeclarations` so that in the following code which is currently disallowed by isolated declarations:
```ts
export const foo = new Foo(a);
```
if the type of `foo` is not `Foo`, there is a typecheck error. In return, the type of `foo` will be emitted as `Foo`.

Similarly, if somehow in
```
export const foo: new Foo<A>(a);
```
`foo` is not a `Foo<A>`, there is a typecheck error.


### 📃 Motivating Example

Currently under isolated declarations, code must redundantly declare the type of a variable which is the result of a constructor call.
```ts
export const foo: Foo = new Foo(a);
```

This setting would also eliminate https://github.com/microsoft/TypeScript/issues/59768

### 💻 Use Cases

^
Repository: rust
Issue: "Reference to data owned by current function" for a function owning no data.
Labels: A-diagnostics,A-borrow-checker,T-compiler,D-confusing

### Code

```rs
fn f(a: &mut Vec<u64>) -> &[u64] {
    let v = a;
    v.push(1);
    &v
}
```

### Current output

```
error[E0515]: cannot return reference to local variable `v`
 --> src/main.rs:4:5
  |
4 |     &v
  |     ^^ returns a reference to data owned by the current function
```

### Desired output

```
Type error: expected `&[u64]`, found `& &mut Vec<u64>`.
Suggestion: change `&v` to `v`.
```

### Rationale and extra context

It seems like the autoderef is making the borrowck confused here, or something? I had trouble interpreting the message because the function owns no data (only copy-able refs).

> @Kyuuhachi I don't know the exact details, but derefing a `&'local &'self mut [u64]` gives a `&'local [u64]`, not a `&'self [u64]` [[1]](https://discord.com/channels/442252698964721669/443150878111694848/1286433267351818302)

> @Kyuuhachi Kind of a weird edge case here I think, because if instead chose to first relax the mutref into a `&'local &'self [u64]` it would be able to get a `&'self [u64]` from that [[2]](https://discord.com/channels/442252698964721669/443150878111694848/1286433653894680657)

Not sure how to help more?

### Other cases

Changing `&v` to `v` makes it compile without error.

### Rust Version

```
$ rustc --version --verbose                                                                                                                                                                          
rustc 1.83.0-nightly (f79a912d9 2024-09-18)
binary: rustc
commit-hash: f79a912d9edc3ad4db910c0e93672ed5c65133fa
commit-date: 2024-09-18
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.0
```

### Anything else?

_No response_
Repository: deno
Issue: test --doc: allow import statements to be in a separate code block
Labels: suggestion,testing

I'm trying out the new `deno test --doc` feature in the Deno 2 release candidate. It works, but might be nicer if I didn't have to write out imports in each code block.

Version: 2.0.0-rc.4

## Example

````md
Here is an import that will be needed in the following examples:

```ts
import { assertEquals } from "@std/assert";
```

Here's an example of how to use assertEquals:

```ts
assertEquals("hello".length, 5);
```

Here's a second example:

```ts
assertEquals([1, 2, 3], [1, 2, 3]);
```
````

## What it does now:

```
Check file:///Users/skybrian/Projects/deno/repeat-test/docs/example.md$3-6.ts
Check file:///Users/skybrian/Projects/deno/repeat-test/docs/example.md$9-12.ts
Check file:///Users/skybrian/Projects/deno/repeat-test/docs/example.md$15-18.ts
error: TS2304 [ERROR]: Cannot find name 'assertEquals'.
    assertEquals([
    ~~~~~~~~~~~~
    at file:///Users/skybrian/Projects/deno/repeat-test/docs/example.md$15-18.ts:2:5

TS2304 [ERROR]: Cannot find name 'assertEquals'.
    assertEquals("hello".length, 5);
    ~~~~~~~~~~~~
    at file:///Users/skybrian/Projects/deno/repeat-test/docs/example.md$9-12.ts:2:5

Found 2 errors.
```

## What I'd like it to do:

Don't report any errors, because the imports were declared in a previous code block.

## How would it work?

I don't know what's best, but here are some alternatives:

 * When there is a code block that *only* contains imports, automatically prepend it to each of the following code blocks.
 * When there is a code block that has *no* imports, reuse the imports from the previous code block.

Or, perhaps both rules?
Repository: angular
Issue: Wrong content children order when using ngTemplateOutlet to render
Labels: area: core,core: queries

### Which @angular/* package(s) are the source of the bug?

core

### Is this a regression?

No

### Description

Content children should follow dom order but rendering conditionally with ngTemplateOutlet in a different order than ng-template declaration seems to confuse angular. I would expect the order to be based on the resulting DOM and not on the ng-template declaration order.

There should be no difference between:
```html
<app-parent>
  <app-child [order]="1"></app-child>
  <app-child [order]="2"></app-child>
</app-parent>
```
and
```html
<app-parent> <!-- WRONG ORDER -->
  <ng-container *ngTemplateOutlet="one"></ng-container>
  <ng-container *ngTemplateOutlet="two"></ng-container>
  <ng-template #two>
    <app-child [order]="2"></app-child>
  </ng-template>
  <ng-template #one>
    <app-child [order]="1"></app-child>
  </ng-template>
</app-parent>
```
and
```html
<app-parent> <!-- NOT WORKING AT ALL -->
  <ng-container *ngTemplateOutlet="one2"></ng-container>
  <ng-container *ngTemplateOutlet="two2"></ng-container>
</app-parent>
<ng-template #two2>
  <app-child [order]="2"></app-child>
</ng-template>
<ng-template #one2>
  <app-child [order]="1"></app-child>
</ng-template>
```

I might be doing something wrong - but is there a solution for it? I know switching the templates order "fixes" it but I can't do that and that's not a real fix.

### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-5qy9kg?file=src%2Fmain.ts

### Please provide the exception or error you saw

```true
The third example is out of order while the fourth example isn't even working
```


### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular 18
```


### Anything else?

_No response_
Repository: rust
Issue: Incorrect diagnostic "pattern requires `..` due to inaccessible fields" when matching in a macro
Labels: A-diagnostics,A-macros,T-compiler,D-confusing,A-hygiene

### Code

```rust
struct A {
    field1: String,
    field2: String,
}

fn test(x: A) {
    macro_rules! weird {
        () => { let A { field1 } = x; }
    }
    weird!();
}
```

### Current output

```
error: pattern requires `..` due to inaccessible fields
  --> a.rs:8:21
   |
8  |         () => { let A { field1 } = x; }
   |                     ^^^^^^^^^^^^
9  |     }
10 |     weird!();
   |     -------- in this macro invocation
   |
   = note: this error originates in the macro `weird` (in Nightly builds, run with -Z macro-backtrace for more info)
help: ignore the inaccessible and unused fields
   |
8  |         () => { let A { field1, .. } = x; }
   |                               ++++
```

### Desired output

```
error[E0027]: pattern does not mention field `field2`
 --> a.rs:8:21
  |
8 |         () => { let A { field1 } = x; }
  |                     ^^^^^^^^^^^^ missing field `field2`
  |
```

### Rationale and extra context

It seems this error message gets generated whenever an incomplete pattern shows up within a macro invocation, whether or not the fields are actually inaccessible.

### Other cases

_No response_

### Rust Version

rustc 1.83.0-nightly (f79a912d9 2024-09-18)
binary: rustc
commit-hash: f79a912d9edc3ad4db910c0e93672ed5c65133fa
commit-date: 2024-09-18
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.0

### Anything else?

_No response_