sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: VSCode version 1.58.2 Not able to add new imports in Typescript rush monorepos
Labels: Needs Investigation,Domain: Auto-import

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.58.2
- OS Version: macOS Big Sur 11.4
- Extension ids: [coenraads.bracket-pair-colorizer, wmaurer.change-case, streetsidesoftware.code-spell-checker, dbaeumer.vscode-eslint, file-icons.file-icons, eamodio.gitlens, esbenp.prettier-vscode, netcorext.uuid-generator, vscodevim.vim]

Steps to Reproduce:

1. Create an interface Foo in a new location
2. Create a class that depends on the Foo interface and try to auto import the definition through the VSCode auto import feature (highlight the interface and use `command + .` to open the suggested actions)
3. The only option it will give the user if nothing has been imported from this location before is to extract to a type alias
4. If something had been imported from the same location however, it can add the import to the existing list of imports

What should happen:

VSCode should suggest creating a new import statement for that interface at the top of the class file

What actually happens:
using `command + .` yields only the option to `Extract to type alias`.
Repository: bitcoin
Issue: Net code contains some UB -- violations of strict aliasing rules in C++
Labels: Bug,P2P

<!-- This issue tracker is only for technical issues related to Bitcoin Core.

General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com.

For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.

If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

<!-- Describe the issue -->

**Expected behavior**

No undefined behavior in bitcoin's C++ code.

<!--- What behavior did you expect? -->

However, the Bitcoin code does contain UB in the net code in particular.  All of the code that works with `struct sockaddr` needs to be inspected and fixed. For example here: https://github.com/bitcoin/bitcoin/blob/b620b2d58a55a88ad21da70cb2000863ef17b651/src/netaddress.cpp#L988

It is illegal/UB in C++ to do this type of aliasing and dereference a pointer that is `reinterpre_cast`ed in this way.  C++ has stricter aliasing rules than C. For reference, see this: https://en.cppreference.com/w/cpp/language/reinterpret_cast#Type_aliasing

**Suggested Fix**

Use `std::memcpy` to copy the structs around and dereference them after copying them.


<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

<!--- How reliably can you reproduce the issue, what are the steps to do so? -->

<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->

<!-- Any extra information that might be useful in the debugging process. -->
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
Repository: kubernetes
Issue: Support multiple IPv4 address ranges for service Cluster IPs
Labels: sig/network,kind/feature,triage/accepted

#### What would you like to be added:
Kubernetes should allow you to add additional IP ranges for ClusterIP services as your clusters grow.

#### Why is this needed:
Kubernetes clusters naturally grow over time and at large enterprises you can't hand out massive address ranges to each kubernetes cluster on the day they are created given how small the available number of private IPv4 IPs is.

We currently have a cluster which has existed since the beginning of our kubernetes endeavors several years ago and has utilized all possible ClusterIPs. The adjacent IP ranges are utilized, so we can't simply restart the control plane with a different prefixlen on the CIDR. So right now, the only way to remediate this situation is to incur significant downtime by:
1. Deleting all ClusterIP services in the cluster
2. Restarting the control plane and kube-proxies with a new range
3. Recreating all ClusterIP services so that they'll have IPs assigned from the new range
4. Reconfiguring and/or restarting all systems that relied on the fact that ClusterIPs are supposed to be static. This effectively means any pod that uses incluster config to access the API, any systems that are bad at re-resolving DNS and communicate with ClusterIP services, and so much more in various applications.

If the kubernetes control-plane could simply allow multiple IPv4 ranges as an argument then all that would be required is restarting several kubernetes components and moving on, with no downtime incurred for existing services. The caveat is that if your cluster configuration requires that kube-proxy or your CNI plugins need to know the ClusterIP range to function, then there's a risk that new ClusterIPs may not be routeable while the changes make their way out to all nodes, however, that constraint feels so much more acceptable than the alternative of breaking every service and it can be well-documented that you must roll the change out to nodes and potentially must restart all pods before updating the control-plan to ensure this is seamless.
Repository: flutter
Issue: BIDI text painting skipped tests.
Labels: a: text input,team,framework,a: internationalization,P2,c: tech-debt,team: skip-test,team-framework,triaged-framework

As part of the latest [skip test audit](https://github.com/flutter/flutter/issues/86396), there are still several tests that are skipped in `text_painter_rtl_test.dart` that don't have a bug to track them. We can use this as a tracking bug for getting them turned back on or marked as intentional if that is the just behaviour we want.

The tests in question are:

https://github.com/flutter/flutter/blob/40739568ab80988d8f2671bf6ec43539ce983771/packages/flutter/test/painting/text_painter_rtl_test.dart#L37

https://github.com/flutter/flutter/blob/40739568ab80988d8f2671bf6ec43539ce983771/packages/flutter/test/painting/text_painter_rtl_test.dart#L169

https://github.com/flutter/flutter/blob/40739568ab80988d8f2671bf6ec43539ce983771/packages/flutter/test/painting/text_painter_rtl_test.dart#L327

https://github.com/flutter/flutter/blob/40739568ab80988d8f2671bf6ec43539ce983771/packages/flutter/test/painting/text_painter_rtl_test.dart#L360

https://github.com/flutter/flutter/blob/40739568ab80988d8f2671bf6ec43539ce983771/packages/flutter/test/painting/text_painter_rtl_test.dart#L415

https://github.com/flutter/flutter/blob/40739568ab80988d8f2671bf6ec43539ce983771/packages/flutter/test/painting/text_painter_rtl_test.dart#L481

https://github.com/flutter/flutter/blob/40739568ab80988d8f2671bf6ec43539ce983771/packages/flutter/test/painting/text_painter_rtl_test.dart#L563

https://github.com/flutter/flutter/blob/40739568ab80988d8f2671bf6ec43539ce983771/packages/flutter/test/painting/text_painter_rtl_test.dart#L608
Repository: pytorch
Issue: Instructions for CMAKE_PREFIX_PATH seem to be broken
Labels: module: build,module: docs,triaged

## Instructions in README.md for CMAKE_PREFIX_PATH don't work for me.

The Main README.md says:

```
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
python setup.py install
```

However, `which conda` on my machine expands to a bash function (I think), so `dirname <bash function contents>` is not valid.

Instead, I had to say `which "$CONDA_EXE"`.

```
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which "$CONDA_EXE))/../"}
python setup.py install
```

Happy to provide more information - this is for a linux machine (devvm).


cc @malfet @seemethere @walterddr @brianjo @mruberry
Repository: flutter
Issue: Initial route's initState and build methods run on reloading page on any of the other routes
Labels: tool,framework,t: hot reload,f: routes,platform-web,has reproducible steps,P2,found in release: 2.2,team-web,triaged-web

Steps to reproduce:

Code: 
```

import 'package:flutter/material.dart';

void main() {
  runApp(
    MaterialApp(
      title: 'Named Routes Demo',
      // Start the app with the "/" named route. In this case, the app starts
      // on the FirstScreen widget.
      initialRoute: '/',
      routes: {
        // When navigating to the "/" route, build the FirstScreen widget.
        '/': (context) => const FirstScreen(),
        // When navigating to the "/second" route, build the SecondScreen widget.
        '/second': (context) => const SecondScreen(),
      },
    ),
  );
}

class FirstScreen extends StatefulWidget {
  const FirstScreen({Key? key}) : super(key: key);

  @override
  State<FirstScreen> createState() => _FirstScreenState();
}

class _FirstScreenState extends State<FirstScreen> {
  @override
  void initState() {
    super.initState();
    print("FirstScreen initState");
  }

  @override
  Widget build(BuildContext context) {
    print("FirstScreen build");
    return Scaffold(
      appBar: AppBar(
        title: const Text('First Screen'),
      ),
      body: Center(
        child: ElevatedButton(
          // Within the `FirstScreen` widget
          onPressed: () {
            // Navigate to the second screen using a named route.
            Navigator.pushNamed(context, '/second');
          },
          child: const Text('Launch screen'),
        ),
      ),
    );
  }
}

class SecondScreen extends StatelessWidget {
  const SecondScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Second Screen'),
      ),
      body: Center(
        child: ElevatedButton(
          // Within the SecondScreen widget
          onPressed: () {
            // Navigate back to the first screen by popping the current route
            // off the stack.
            Navigator.pop(context);
          },
          child: const Text('Go back!'),
        ),
      ),
    );
  }
}

```

- Run the app. 
- Click the button to go to /second screen
- Reload the page.
- See both print statements (`print("FirstScreen initState");` and `print("FirstScreen build");`) in the console

Flutter doctor

[✓] Flutter (Channel dev, 2.5.0-1.0.pre, on Linux Mint 20.1 5.4.0-58-generic,
    locale en_US.UTF-8)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 4.1)
[✓] Android Studio
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1)
[✓] VS Code (version 1.56.2)
[✓] Connected device (2 available)
Repository: flutter
Issue: [Web] Skipped test 'TextPainter widget span' still isn't working correctly.
Labels: team,framework,platform-web,P2,c: tech-debt,team: skip-test,team-web,triaged-web

The 'TextPainter widget span' test in:

https://github.com/flutter/flutter/blob/9664a109d94699fcc91a97a59e332cc7e5f27a45/packages/flutter/test/painting/text_painter_test.dart#L657

is skipped and pointing at issue: #42086. This appears to have been fixed, but when I tried to reenable the test it still fails with: 

```
00:02 +10 ~3 -1: TextPainter widget span [E]                                                                                                                                                                                                                                                                      
  Expected: <56>
    Actual: <106>
  
  ../dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49      throw_
  ../packages/test_api/src/expect/async_matcher.dart.js 164:22                         fail
  ../packages/test_api/src/expect/async_matcher.dart.js 159:12                         _expect
  ../packages/test_api/src/expect/async_matcher.dart.js 86:12                          expect$
  ../packages/flutter_test/src/deprecated.dart.js 7250:12                              expect$
  text_painter_test.dart.js 2390:21                                                    <fn>
```
Repository: terminal
Issue: Consider performing font fallback analysis only if the chosen font is not adequate
Labels: Area-Rendering,Area-Performance,Product-Terminal,Issue-Task

# Description of the new feature/enhancement

Right now the `_AnalyzeFontFallback` is always called if the text is "complex":

https://github.com/microsoft/terminal/blob/e7108332f72a3c14c72a65484d091c4e79ab28b2/src/renderer/dx/CustomTextLayout.cpp#L246-L247

We already know that even for pure ASCII characters, some fonts will treat them as "complex". But the real need for font fallback emerges *only* when the font don't actually contains the needed glyph. For example when dealing with "ABC中文". You have to find "Microsoft YaHei" as fallback, otherwise "中文" is nowhere to be find in "Cascadia Code“.

# Proposed technical implementation details (optional)

To avoid the unnecessary overhead of finding fallbacks (`MapCharacters`, which is relatively expensive), my proposed solution is to delay the fallback analysis and put it in `_ShapeGlyphRun`. Inside `_ShapeGlyphRun`, the method `GetGlyphs` will tell you precisely if there are available glyphs inside the desired font (`_glyphIndices`):

https://github.com/microsoft/terminal/blob/e7108332f72a3c14c72a65484d091c4e79ab28b2/src/renderer/dx/CustomTextLayout.cpp#L414

<!-- 
A clear and concise description of what you want to happen.
-->

If no glyphs can be found (which I assume is a rather rare case), then the fallback analysis is necessary.
Repository: flutter
Issue: [Web] TextPainter line-height tests are skipped with html renderer.
Labels: team,framework,platform-web,P2,c: tech-debt,team: skip-test,team-web,triaged-web

As part of the [skip test audit](https://github.com/flutter/flutter/issues/86396):

Attempting to reenable the 'TextPainter line-height' test group:

https://github.com/flutter/flutter/blob/9664a109d94699fcc91a97a59e332cc7e5f27a45/packages/flutter/test/painting/text_painter_test.dart#L840

It fails with: 

```
00:02 +11 ~6 -1: TextPainter line-height half-leading [E]                                                                                                                                                                                                                                                         
  Expected: <9.5>
    Actual: <0>
  
  ../dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49      throw_
  ../packages/test_api/src/expect/async_matcher.dart.js 164:22                         fail
  ../packages/test_api/src/expect/async_matcher.dart.js 159:12                         _expect
  ../packages/test_api/src/expect/async_matcher.dart.js 86:12                          expect$
  ../packages/flutter_test/src/deprecated.dart.js 7250:12                              expect$
  text_painter_test.dart.js 2514:23                                                    <fn>
```
Repository: flutter
Issue: [Web] TextPainter invalid UTF-16 test doesn't work for web.
Labels: team,framework,platform-web,P2,c: tech-debt,team: skip-test,team-web,triaged-web

As part of the [skip test audit](https://github.com/flutter/flutter/issues/86396):

Attempting to reenable the 'TextPainter handles invalid UTF-16' test:

https://github.com/flutter/flutter/blob/9664a109d94699fcc91a97a59e332cc7e5f27a45/packages/flutter/test/painting/text_painter_test.dart#L960

It fails with: 

```
00:02 +11 ~11 -1: TextPainter handles invalid UTF-16 [E]                                                                                                                                                                                                                                                          
  Expected: <20>
    Actual: <221>
  
  ../dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49      throw_
  ../packages/test_api/src/expect/async_matcher.dart.js 164:22                         fail
  ../packages/test_api/src/expect/async_matcher.dart.js 159:12                         _expect
  ../packages/test_api/src/expect/async_matcher.dart.js 86:12                          expect$
  ../packages/flutter_test/src/deprecated.dart.js 7250:12                              expect$
  text_painter_test.dart.js 2589:21                                                    <fn>
```
Repository: godot
Issue: Godot C# Array doesn't override Equals?
Labels: bug,topic:dotnet

### Godot version

3.3.1.stable.mono

### System information

Windows 10

### Issue description

From my testing, and inspection of the implementation of [Array.cs](https://github.com/godotengine/godot/blob/6f7d45d2109246e3888fc2b16136915e6fec89fd/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs) it seems there's no method for comparing arrays in C#. Am I missing something here?

On the gdscript side you can do `arr1 == arr2` to compare contents, but there is not a matching method in C#. The default implementation of `==` and `.Equals` will reference compare arrays. This will lead to unintended behavioral differences between gdscript and C# code.

I also think Dictionary should have a `.Equals` method that compares values for consistency sake. I understand there's a whole discussion around this for gdscript (see #27615) but in C# we have access to `ReferenceEquals` so I think providing a value-based `.Equals` makes sense.

### Steps to reproduce

Just compare two arrays in C# via `arr1.Equals(arr2)` or `arr1 == arr2` or `object.Equals(arr1, arr2)` and they all compare by reference, unlike the gdscript `arr1 == arr2` which compares by value.

### Minimal reproduction project

_No response_
Repository: electron
Issue: [Bug]: accelerator on Arch Linux isn't correctly displayed
Labels: platform/linux,component/menu,bug :beetle:,status/confirmed,11-x-y,12-x-y,13-x-y,14-x-y,15-x-y

### 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

13.1.7, 12.0.15, 9.4.4

### What operating system are you using?

Other Linux

### Operating System Version

Arch Linux 5.13.5-arch1-1

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

If I set a menuItem's accelerator to `Alt+Command+I`, I'm expecting the shown accelerator to be `Alt+Meta+I`.

### Actual Behavior

When the accelerator is `Alt+Command+I`, It's shown as `Alt+I`.
But the shortcut is still working as expected.

### Testcase Gist URL

https://gist.github.com/daiyam/8882c79856cf94f74a176b3c5b233ad9

### Additional Information

_No response_
Repository: pytorch
Issue: add gamma to CosineAnnealingWarmRestarts so max lr can decrease in cycles
Labels: module: optimizer,triaged,module: LrScheduler

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

add gamma to CosineAnnealingWarmRestarts so max lr can decrease in cycles

## Motivation

<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->

In current [implementation](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.CosineAnnealingWarmRestarts.html), 
the max lr is the same in each cycle. It would be great if the max lr (`\eta_max` )can be set to decreasing.

## Pitch

<!-- A clear and concise description of what you want to happen. -->

add an `gamma` option to `CosineAnnealingWarmRestarts`, so the max learning rate decreases after each cycle

## Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->

## Additional context

Similar implementation: https://github.com/katsura-jp/pytorch-cosine-annealing-with-warmup#args

I'll be glad to send a PR

<!-- Add any other context or screenshots about the feature request here. -->


cc @vincentqb @jbschlosser @albanD @iramazanli
Repository: node
Issue: Expose internal stream utils
Labels: stream

I think it would be useful for the ecosystem if we exposed some of our stream utility function from https://github.com/nodejs/node/blob/master/lib/internal/streams/utils.js.

In particular:

```
isReadableNodeStream(obj)
isWritableNodeStream(obj)
isNodeStream(obj)
isDestroyed(stream)
isWritableEnded(stream)
isWritableFinished(stream, strict)
isReadableEnded(stream)
isReadableFinished(stream, strict)
isReadable(stream)
isWritable(stream)
isFinished(stream, opts) 
isClosed(stream)
isDisturbed(stream)
```

Additionally maybe some that we don't have yet:

```
isAborted(stream)
```

One problem I see atm is the confusion/ambiguity between web and node streams, e.g. in https://github.com/nodejs/node/pull/39628 we are working on `isDisturbed` which works no both node and web streams.