sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: [SelectableText] Add support for Changing style of selected text
Labels: c: new feature,framework,a: typography,c: proposal,P3,team-framework,triaged-framework

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

I am trying to change the text style of the selected part of the text (`SelectableText`) to increase readability by changing the contrast of the colors. As you can see on the following image, the contrast between yellow and white is not pleasant to eye. I'd like to be able to change the white color to black only on the selected part of the text.

![contrast_example](https://user-images.githubusercontent.com/45696119/155881146-2aa5b7fe-3fe4-4dfe-9612-eb9f7af20056.png)

## Proposal

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching something showing what you are imagining:
      * images
      * videos
      * code samples

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->

Be able to change the text style of only the selected part of the text, like the following:

![selection_example](https://user-images.githubusercontent.com/45696119/155881058-67ad096d-df65-4f3f-b070-bd6ab2133d62.png)

In the above image, the text was initially blue but it was changed to white when selected
Repository: youtube-dl
Issue: Add a way to not follow redirects
Labels: request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.12.17. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a feature request
- [x] I've verified that I'm running youtube-dl version **2021.12.17**
- [x] I've searched the bugtracker for similar feature requests including closed ones


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
-->

The generic extractor currently follows redirects blindly. This is not an issue when running youtube-dl locally, however when it is used in a web app this can allow an attacker to run a SSRF attack.
Even if the web app does not allow calling youtube-dl on internal URLs, an attacker could still craft an external URL redirecting to an internal resource.
Because of this, apps sending requests to arbitrary external URLs [should disable redirects in the HTTP client](https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html#application-layer) but youtube-dl provides no easy way to do this.

I see two solutions to this:
* Add a way to disable the generic extractor
* Add a flag that would make this extractor not follow redirects
Repository: godot
Issue: Windows 10 Build with MinGW UnicodeDecodeError
Labels: bug,platform:windows,topic:buildsystem

### Godot version

4.0.dev (ff877adf0f)

### System information

Windows 10 21H2, AMD Ryzen 5 3600

### Issue description

At least, if anyone can confirm that this works on their windows 10 machine I would be glad to help here finding the issue :)

Needed dependencies installed on my machine for building godot:

- Python 3.9.10
- SCons v4.3.0.559790274f66fa55251f5754de34820a29c7327a
- MinGW installation recommended from the documentation

I build godot from source and got a python error "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 180: invalid start byte..."

I read the documentation stating for MinGW that it needs to be setup for posix thread model, but I did not found any setting for that in an obvious spot, so I took the default settings. I hope this is maybe some simple error which could be improved by documentation because I configured something wrong :)

### Steps to reproduce

1. Clone master version above (older version even had the same error)
2. go to repository root and perform ` scons platform=windows`
3. Build fails very early with:

```scons: Reading SConscript files ...
Configuring for Windows: target=debug, bits=default
Using MinGW
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 180: invalid start byte:
  File "C:\Users\peter\source\repos\godot\SConstruct", line 487:
    cc_version = methods.get_compiler_version(env) or {
  File "methods.py", line 889:
    version = subprocess.check_output([env.subst(env["CXX"]), "--version"]).strip().decode("utf-8")
```

The command performed in the script is the following:


```
cc_version = methods.get_compiler_version(env) or {
        "major": None,
        "minor": None,
        "patch": None,
        "metadata1": None,
        "metadata2": None,
        "date": None,
    }
```
Repository: flutter
Issue: Flutter module: access module variables from native apps
Labels: platform-android,framework,d: examples,a: existing-apps,P2,team-android,triaged-android

I followed the [add-to-app](https://docs.flutter.dev/development/add-to-app) guide for Flutter module, and added a working Flutter engine to my native android app.

I would like to expose some variables from the module to the native host applications, kind of a constants file that contains the method channel identifier, flutter engine ID etc..

I tried using 'export' keyword at the module's 'main.dart' file but it didn't work.
What's the right way to have shared variables with the module and the host native application?
 
## Steps to Reproduce
1. Create Flutter module
2. Add the module to a native Android app 
3. Access a variable from the module inside the native app

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel stable, 2.10.0, on macOS 12.1 21C52 darwin-arm, locale
    en-IL)
    • Flutter version 2.10.0 at /Users/yuval/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5f105a6ca7 (4 weeks ago), 2022-02-01 14:15:42 -0800
    • Engine revision 776efd2034
    • Dart version 2.16.0
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version
    32.1.0-rc1)
    • Android SDK at /Users/yuval/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554                        •
      android-arm64  • Android 12 (API 32) (emulator)
    • iPhone 13 (mobile)          • F2842A66-12F9-4D8D-9EB0-3EA69532C16D • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)
    • Chrome (web)                • chrome                               •
      web-javascript • Google Chrome 97.0.4692.99

[✓] HTTP Host Availability
    • All required HTTP hosts are available
```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->
Repository: PowerToys
Issue: Cannot use keyboard to wake laptop after put it to sleep with PowerToys run "sleep"
Labels: Issue-Bug,Product-PowerToys Run,Status-In progress,Run-Plugin

### Microsoft PowerToys version

v0.55.2

### Running as admin

- [X] Yes

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

in PowerToys Run, type sleep, hit Enter. Then hit any keys on the external usb keyboard to try wake the laptop.

### ✔️ Expected Behavior

the PowerToys Run "sleep" should behave the same as the one that you on the Windows menu Power option. Or provide a setting to be the same.

### ❌ Actual Behavior

cannot wait laptop with usb keyboard

### Other Software

_No response_
Repository: TypeScript
Issue: Syntax for explicit tuple literal type
Labels: Suggestion,Awaiting More Feedback

# Suggestion

Though closely related to #10195 and #16656, I am opening this issue because the proposed syntax, purpose and demonstration are different.

## Motivation

Previously I wrote [a library](https://www.npmjs.com/package/ndarray-methods) that manipulates nested arrays:
```ts
import NDArray from "ndarray-methods";

NDArray.buildShape([2, 3], 0) // [[0, 0, 0], [0, 0, 0]]
// Works like Python’s numpy.zeros()
```
But without tuple its type is being inferred as `NDArray<number>`, of which `NDArray` is defined as
```ts
type NDArray<T> = (T | NDArray<T>)[]
```

## The Problem
I know there are at least 3 ways to cast it as a tuple:
```ts
/* 1 */ NDArray.buildShape([2, 3] as const, 0)            // constant tuple
/* 2 */ NDArray.buildShape([2, 3] as [number, number], 0) // number tuple
/* 3 */ NDArray.buildShape(tuple(2, 3), 0)                // utility function
```
of which the `tuple` function is defined as
```ts
function tuple<T extends unknown[]>(...args: T) { return args; }
```
In these 3 cases, the program correctly infers the type of the results as `number[][]`.

But these 3 ways all have their problems:

For 1, it is not necessary to make the numbers constants.

For 2, we will have to write `number,` many times for higher-dimensional arrays (I know we can use a utility type, but I don’t think it’s desirable).

For 3, there are considerable runtime effects and it might cause serious performance problems, especially when it is transpiled down to something like
```ts
function tuple() {
  for (var a = [], i = 0; i < arguments.length; i++) a.push(arguments[i]);
  return a;
}
```
Also, in a module-based application, this utility function will have to be defined or imported before using, which pollutes the namespace.

Most importantly, for 1 and 2, we are using the `as` keywords, which is not favorable for TypeScript codes in general (and **ESLint gets angry** too).

I also know the existence of the [Record & Tuple Proposal](https://github.com/tc39/proposal-record-tuple), but since there will be compatibility problems in the near future, and people might not want to refactor the existing codes, the current tuple-like array will still be used by a significant amount of projects.

## Solution

In my opinion, a syntax without `as` like `tuple [2, 3]` should be created, or we should at least provide a way to let TypeScript infer a literal array as tuple for a certain function parameter.

## Prior Use

The tuple utility function is included in many repositories, and even in the release note:

- [Sourcegraph Search](https://sourcegraph.com/search?q=context:global+function+tuple%3CT+extends+any%5B%5D%3E&patternType=literal)
- [TypeScript 3.0 Release Note](https://github.com/microsoft/TypeScript-Website/blob/v2/packages/documentation/copy/en/release-notes/TypeScript%203.0.md#rest-elements-in-tuple-types)
Repository: godot
Issue: Windows MINGW Build enable_virtual_terminal_processing not found
Labels: bug,platform:windows,topic:buildsystem

### Godot version

3.4.3-stable

### System information

Windows 10 / MINGW 8.1.0 / Intel Core i7-8700 AMD64

### Issue description

When trying to compile with MINGW from sources, there is an error during the process.
I have verified that Visual Studio have installed Window SDK 10, and all the recommendation from the documentation.
I have also gcc that is in the PATH (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0

The error:
```
+ scons platform=windows bits=64 use_mingw=yes -j9
scons: Reading SConscript files ...
Configuring for Windows: target=debug, bits=64
Using MinGW
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
Compiling ==> platform\windows\os_windows.cpp
...
Compiling ==> thirdparty\bullet\BulletCollision\NarrowPhaseCollision\btPersistentManifold.cpp
=====
b"platform\\windows\\os_windows.cpp: In member function 'bool OS_Windows::_is_win11_terminal() const':\nplatform\\windows\\os_windows.cpp:2236:21: error: 'ENABLE_VIRTUAL_TERMINAL_PROCESSING' was not declared in this scope\n   return ((dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) == ENABLE_VIRTUAL_TERMINAL_PROCESSING);\n                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nplatform\\windows\\os_windows.cpp:2236:21: note: suggested alternative: 'MM_SPECTRUM_SIGNAL_PROCESSING'\n   return ((dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) == ENABLE_VIRTUAL_TERMINAL_PROCESSING);\n                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n                     MM_SPECTRUM_SIGNAL_PROCESSING\n"
=====
Compiling ==> thirdparty\bullet\BulletCollision\NarrowPhaseCollision\btRaycastCallback.cpp
Compiling ==> thirdparty\bullet\BulletCollision\NarrowPhaseCollision\btSubSimplexConvexCast.cpp
Compiling ==> thirdparty\bullet\BulletCollision\NarrowPhaseCollision\btVoronoiSimplexSolver.cpp
Compiling ==> thirdparty\bullet\BulletCollision\NarrowPhaseCollision\btPolyhedralContactClipping.cpp
scons: *** [platform\windows\os_windows.windows.tools.64.o] Error 1
Compiling ==> thirdparty\bullet\BulletDynamics\Character\btKinematicCharacterController.cpp
scons: building terminated because of errors.
[Time elapsed: 00:00:10.590]
```

### Steps to reproduce

Try to compile with my configuration and this script :

```
#!/bin/bash -e
mkdir -p ./GodotEngine
cd ./GodotEngine
myRepo=$(pwd)

VERSION=3.4.3-stable
CORES=9

echo "Version $VERSION"

if [  ! -d "$myRepo/godot"  ]; then
    echo "cloning godot"
    git clone --branch $VERSION https://github.com/godotengine/godot
else
    cd godot
    git checkout $VERSION
    cd ..
fi

pushd godot
set -x
scons platform=windows bits=64 use_mingw=yes -j$CORES

setx GODOT_DIR "$myRepo\godot"
setx GODOT_BUILD "bin"
echo "Add %GODOT_DIR% to user environment path."
popd
```

### Minimal reproduction project

_No response_
Repository: pytorch
Issue: Rename `keep_vars` in `nn.Module.state_dict`
Labels: module: nn,triaged

Initially proposed by albanD in https://github.com/pytorch/pytorch/issues/72778#issuecomment-1039263869
> We should definitely update the doc to properly document the `prefix` and `keep_vars` arguments (we most likely should rename the second one since it doesn't make sense any more).

albanD in https://github.com/pytorch/pytorch/issues/72778#issuecomment-1040475717
> Not sure what the new name for this should be tbh. "detached"?

jbschlosser in https://github.com/pytorch/pytorch/issues/72778#issuecomment-1042006887
> Sure, `detached=True` better describes what that flag does. Note that `detached == not keep_vars` so it's not quite a direct find / replace. Agree that we should do this in a follow-up PR.

Are we decided it will be `detached`? cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345
Repository: rust
Issue: Make sure our handling of partially initialized values is compatible with LLVM / We cannot use LLVM poison semantics
Labels: A-LLVM,A-codegen,T-compiler,A-MIR,T-opsem

The intent is for types like `MaybeUninit<u64>` to support dealing with partially initialized data: e.g., if we have a `(u32, u16)` (and assuming for a second we could rely on its layout), it should be sound to transmute that to `MaybeUninit<u64>` and back *even though* the padding between the two tuple fields might be uninitialized. Code like https://github.com/rust-lang/rust/pull/94212 relies on this.

The thing is, we are compiling `MaybeUninit<u64>` to `i64` for LLVM -- `MaybeUninit` is `repr(transparent)`. This was required to avoid codegen regressions when `MaybeUninit` started to be used in some hot data copying loops inside libcore. So, for this all to work out, we better be sure that `i64` correctly preserves partially initialized data.

LLVM has two kinds of "uninit" data, `undef` and `poison`.

- `undef` is per-bit and precisely preserved in all `iN` types, so we should be fine here.
- `poison`, however, is per-value: when loading an `i64` and any of its bytes is `poison`, the entire result is `poison`. That is exactly *not* what we want for `MaybeUninit<u64>`. However, at least in current LLVM, `poison` is only created in very few situations (such as "nowrap" arithmetic that overflows), and AFAIK none of them can happen in a UB-free Rust program -- so, basically "uninit" in Rust only ever corresponds to `undef` in LLVM, never to `poison`. (But I might have missed places where LLVM generates `posion`.)

So I think *right now* we are good. However, LLVM is slowly moving away from `undef` and towards `posion`, since `undef` is seriously ill-behaved in many ways. And if that ever means that "uninit" in Rust could correspond to LLVM `poison`, then we have a problem here -- we have to keep monitoring this situation, and it might be good for us to be involved in the relevant LLVM discussions here as well to make sure they are aware of this problem.

Similarly, as we evolve the MIR semantics we have to make sure that no UB-free program can generate `poison` after compilation to LLVM.

A very elegant solution to this issue would be for LLVM to adopt the ["byte type" proposal](https://lists.llvm.org/pipermail/llvm-dev/2021-June/150883.html), however, so far my impression is the LLVM community is not convinced they need such a type. With a byte type, `MaybeUninit<u64>` could be easily compiled to `b64` in LLVM, and a byte type *would* preserve `poison` precisely, so we'd be all good.

I am mostly opening this so we have some place to track the current situation, and to make sure everyone agrees on what the main concerns are here -- and to get input from folks with more LLVM experience in case I got some of this wrong.
Cc @rust-lang/wg-unsafe-code-guidelines @rust-lang/wg-llvm
Repository: vscode
Issue: Feature Request: Add way of getting all the color presentations in a specific range of a document in the vscode API
Labels: feature-request,api,editor-color-picker

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
I would be really nice if it was possible to do such a thing because it is really easy to conflict with the bulitin color picker and ColorPresenations from other extension leading in a result like this
<img width="180" alt="Example of duplicate color pickers" src="https://user-images.githubusercontent.com/87304130/155894738-7a66f0fb-86de-484d-bf8d-5da5a142b281.png">
To avoid something like this there could be a way in the vscode api to get all the ColorPresentations in a specific range in a document and then conditionally display the one from the extension. I can't seem to find any way to do it with the current functions provided by the api
Repository: yt-dlp
Issue: HGTV extractor ignoring cookies option
Labels: account-needed,site-bug

### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.02.04**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [ ] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

USA

### Description

HGTVUsa extractor suggests to use --cookies for authorization but appears to ignore option when provided.  Tested on several HGTV shows. This appears similar to #2645 

### Verbose log

```shell
yt-dlp.exe https://watch.hgtv.com/video/tough-love-with-hilary-farr-hgtv-atve-us/coming-back-to-america --cookies cookie-hgtv.txt -vU
[debug] Command-line config: ['https://watch.hgtv.com/video/tough-love-with-hilary-farr-hgtv-atve-us/coming-back-to-america', '--cookies', 'cookie-hgtv.txt', '-vU']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2022.02.04 [c1653e9] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19043-SP0
[debug] exe versions: ffmpeg git-2020-01-24-e931119, ffprobe git-2020-01-24-e931119
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.02.04, Current version: 2022.02.04
yt-dlp is up to date (2022.02.04)
[debug] [HGTVUsa] Extracting URL: https://watch.hgtv.com/video/tough-love-with-hilary-farr-hgtv-atve-us/coming-back-to-america
[debug] Using fake IP 6.230.234.14 (US) as X-Forwarded-For
[HGTVUsa] tough-love-with-hilary-farr-hgtv-atve-us/coming-back-to-america: Downloading JSON metadata
ERROR: [HGTVUsa] tough-love-with-hilary-farr-hgtv-atve-us/coming-back-to-america: This video is only available for registered users. You may want to use --cookies.
  File "yt_dlp\extractor\common.py", line 612, in extract
  File "yt_dlp\extractor\dplay.py", line 369, in _real_extract
  File "yt_dlp\extractor\dplay.py", line 92, in _get_disco_api_info
  File "yt_dlp\extractor\dplay.py", line 50, in _process_errors
```