sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: neovim
Issue: treesitter:  syntax-aware structured diff
Labels: enhancement,treesitter,diff

I love `neovim` and have been using it since 2017 (just prior to version 0.2).  The features introduced in the latest 0.5 release (lua, LSP, treesitter etc.) make it even more awesome.

I'd like to request the devs to consider a structure-based diff implementation (to complete the existing suite of line-based diffing algorithms already present i.e. Myers, patience, longest subsequence distance, histogram etc.). I recently came across [`difftastic`](https://github.com/Wilfred/difftastic), a structure-based diffing tool (even though this is currently a rough, unfinished product). To my untrained eye, structure-based diffing looks like a nice orthogonal idea that is worthwhile to implement. The creator of difftastic further points out some interesting structure-based diff tools in the project's [wiki page](https://github.com/Wilfred/difftastic/wiki/Structural-Diffs).

Here are some further related readings/tools (originally linked in the aforementioned wiki):

1. [https://blog.trailofbits.com/2020/08/28/graphtage/](https://blog.trailofbits.com/2020/08/28/graphtage/)
2. [https://fosdem.org/2021/schedule/event/sexpressiondiff/](https://fosdem.org/2021/schedule/event/sexpressiondiff/)
3. [https://fazzone.github.io/autochrome.html](https://fazzone.github.io/autochrome.html)
4. [https://github.com/yinwang0/psydiff](https://github.com/yinwang0/psydiff)
5. [https://github.com/yinwang0/ydiff](https://github.com/yinwang0/ydiff)
6. [https://github.com/VictorCMiraldo/hdiff/tree/v0.0.5](https://github.com/VictorCMiraldo/hdiff/tree/v0.0.5)
7. [https://github.com/GumTreeDiff/gumtree](https://github.com/GumTreeDiff/gumtree)

I gather that structure-based diffing might be a reasonably hot topic in academia, with a few good PhD theses and papers being published e.g. [https://victorcmiraldo.github.io/data/MiraldoPhD.pdf](https://victorcmiraldo.github.io/data/MiraldoPhD.pdf). 

I am just a user of neovim, often using it for writing notes, papers and application-level code, and do not have the background in data structures required to implement a sophisticated idea like this. I hope that the community here might be able to have a healthy debate on the pros and cons of considering a structure-based diff implementation within neovim.
Repository: terminal
Issue: Settings should auto-save, or apply temporarily without having to click Save
Labels: Issue-Feature,Product-Terminal,Area-SettingsUI

# Description of the new feature/enhancement

Currently, users have to click Save for their changes to apply.
There are a few reasons this isn't ideal:

- Friends that were introduced to Terminal and explored the Settings for the first time were confused as to why their changes wouldn't apply immediately. First-time users expect immediate response to setting changes, given how the Settings app in Windows and other modern inbox applications work.
  - This is most jarring for appearance changes (changing colors, font size etc...), which benefit from immediate UI response.
  - While Win32 settings dialogs (such as those found in the Control Panel) do only apply changes upon clicking the OK / Apply buttons, Terminal looks and feels more like a modern UWP app, with its style bearing similar UI elements as the Windows Settings app, which applies changes immediately.
- "Save" does not clearly indicate that the changes are going to be applied. Currently, I would expect "Apply & save" or something similar to indicate changes being applied as well.

# Proposed technical implementation details (optional)

- Unsaved changes could apply temporarily until the user clicks the Save button. This would be useful to preview certain UI options, such as font & font size, effects, etc...
Closing the application without saving these settings should prompt the user about their unsaved changes.
- An even better implementation would be to simply auto-save every change, making the experience feel more seamless.
Repository: rust
Issue: Borrowed Fn closure gives "implementation of FnOnce is not general"
Labels: T-compiler,A-inference,C-bug

I tried this code: [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=99267c6aead07c71ea7208c90cafc598)

```rust
fn foo<F>(func: F)
where
    F: Fn(&str)
{
    func("sss");
}

fn main() {
    foo(|s| println!("{}",s)); // Ok
    foo(&|s| println!("{}",s)); // Error
}
```

The current output is:

```
   Compiling playground v0.0.1 (/playground)
error: implementation of `FnOnce` is not general enough
  --> src/main.rs:10:5
   |
10 |     foo(&|s| println!("{}",s)); // Error
   |     ^^^ implementation of `FnOnce` is not general enough
   |
   = note: closure with signature `fn(&'2 str)` must implement `FnOnce<(&'1 str,)>`, for any lifetime `'1`...
   = note: ...but it actually implements `FnOnce<(&'2 str,)>`, for some specific lifetime `'2`

error: aborting due to previous error

error: could not compile `playground`
```

This seems similar to https://github.com/rust-lang/rust/issues/70263 but wasn't sure so I figured I'd error on the side of opening a new one.
Repository: flutter
Issue: Proposal for (Enable) widget to enable/disable a group of widgets
Labels: framework,f: material design,f: cupertino,c: proposal,team-design,triaged-design

## Use case

This widget will make it easier to enable/disable a group of widgets based on an inherited value, without violating the local `enable` value of each widget.

## Proposal

`enable_widget.dart`
```dart
class Enable extends StatelessWidget {
  const Enable({
    Key? key,
    this.value = true,
    required this.child,
  }) : super(key: key);

  final bool value;
  final Widget child;

  static bool? of(BuildContext context) {
    return context.dependOnInheritedWidgetOfExactType<_InheritedEnable>()?.value;
  }


  /// In case the [Enable] widget was wrapped with another [Enable] widget.
  bool _isEnabled(BuildContext context) {
    return context.inheritedEnable ? value : false;
  }

  @override
  Widget build(BuildContext context) {
    return _InheritedEnable(
      value: _isEnabled(context),
      child: child,
    );
  }
}

class _InheritedEnable extends InheritedWidget {
  const _InheritedEnable({
    Key? key,
    required this.value,
    required Widget child,
  }) : super(key: key, child: child);

  final bool value;

  @override
  bool updateShouldNotify(_InheritedEnable old) => value != old.value;
}
```
`enable_extension.dart`
```dart
extension EnableContextExtension on BuildContext {
  bool get inheritedEnable {
    final temp = Enable.of(this);
    return temp == null ? true : temp;
  }
}
```
`my_widget.dart`

```dart
class MyWidget extends StatelessWidget {
  const MyWidget({
    Key? key,
    this.enable = true,
    required this.child,
  }) : super(key: key);

  final bool enable;
  final Widget child;


  bool _isEnabled(BuildContext context) {
    return context.inheritedEnable ? enable : false;
  }

  @override
  Widget build(BuildContext context) {
    final isEnabled = _isEnabled(context);

    return Container(
      width: 100,
      height: 100,
      color: isEnabled ? Colors.red : Colors.grey,
      child: child,
    );
  }
}
```
Repository: electron
Issue: [Feature Request]: Alternate method to implelement notification badges on task manager icons (Linux)
Labels: enhancement :sparkles:,platform/linux

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

### Problem Description

Currently, the method to have notification badges drawn on task manager icons on Linux relies on [libunity](https://launchpad.net/libunity), a library, for which the last stable release was nine years ago and for which for most non-Ubuntu-based distributions no package exists. Without libunity, there appear to be no notification badges.

### Proposed Solution

If possible, use dbus messaging to implement badge notifications instead of the [currently used method](https://www.electronjs.org/docs/api/app#appsetbadgecountcount-linux-macos).

### Alternatives Considered

N/A

### Additional Information

If any of the above information is inaccurate, please feel free to add clarifications or corrections, I am just an end-user who loves to have their notification badges on windows on all distributions.
Repository: create-react-app
Issue: Setting the /static path via environment variables?
Labels: stale

Hi! I ran into this same issue. It is not always convenient that all files are stored in a static folder, is there a way to change the folder, for example to "assets". 

### Discussed in https://github.com/facebook/create-react-app/discussions/11194

<div type='discussions-op-text'>

<sup>Originally posted by **Pixelatex** July  8, 2021</sup>
We can set the public folder path using the PUBLIC_URL but I need to change the static folder path. (out of my control but the hosted domain is not the same as the on that is serving it... blame our backend fellas for this)

So it's currently trying to get the assets from mysite.com/static/js/chunk.2323.js

While actually it should get it from somethingcomplete.different.co.au/random/static/js/chunk.2323.js

So basically, I need to replace everything before the /static. And this also needs to be handled by an env file. Is this even possible?</div>
Repository: pytorch
Issue: Function Request: scipy.ndimage.map_coordinates 
Labels: triaged,module: numpy,function request,module: interpolation

A request to implement SciPy's [scipy.ndimage.map_coordinates](https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.map_coordinates.html).

First requested here https://github.com/pytorch/pytorch/issues/50341#issuecomment-757460060

cc @mruberry @rgommers @heitorschueroff
Repository: transformers
Issue: `TestMarian_MT_EN::test_batch_generation_mt_en` Failing due to randomly generated tokens
Labels: WIP

The test fails with the following:

```
_________________ TestMarian_MT_EN.test_batch_generation_mt_en _________________
[gw0] linux -- Python 3.6.9 /usr/local/bin/python

self = <tests.test_modeling_tf_marian.TestMarian_MT_EN testMethod=test_batch_generation_mt_en>

    @slow
    def test_batch_generation_mt_en(self):
>       self._assert_generated_batch_equal_expected()

tests/test_modeling_tf_marian.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_modeling_tf_marian.py:366: in _assert_generated_batch_equal_expected
    self.assertListEqual(self.expected_text, generated_words)
E   AssertionError: Lists differ: ['Tou[19 chars] healed a man who was affected by the sad disease of leprosy.'] != ['Tou[19 chars] healed a man who was affected by▁kifkażUnjonik ill.']
E   
E   First differing element 0:
E   'Touc[17 chars]s healed a man who was affected by the sad disease of leprosy.'
E   'Touc[17 chars]s healed a man who was affected by▁kifkażUnjonik ill.'
E   
E   - ['Touching gently, Jesus healed a man who was affected by the sad disease of '
E   ?                                                          ^^^^^^ ^^^ ^^^^^^^^^
E   
E   + ['Touching gently, Jesus healed a man who was affected by▁kifkażUnjonik ill.']
E   ?                                                          ^^^^^ ^^^^^^ ^^^^^^ +
E   
E   -  'leprosy.']
```
Repository: flutter
Issue: Provide an option to implement a Platform View using Fragment
Labels: platform-android,engine,a: platform-views,c: proposal,P3,team-android,triaged-android



## Use case

Currently, when I create PlatformView in Android I have to implement View.

## Proposal

It would be great if I could also use Fragment.
Repository: go
Issue: testing: fuzz tests not discovered unless package path specified or GOMAXPROCS=1
Labels: NeedsInvestigation,fuzz

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel go1.17-988d0248b4 Thu Jul 8 16:39:05 2021 +0000 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes (release meaning `dev.fuzz`)


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/okokes/Library/Caches/go-build"
GOENV="/Users/okokes/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/okokes/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/okokes/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/okokes/sdk/gotip"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/okokes/sdk/gotip/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="devel go1.17-988d0248b4 Thu Jul 8 16:39:05 2021 +0000"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/okokes/git/smda3/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/81/4jydp7kn51n6p68z88sqnkzc0000gn/T/go-build934674902=/tmp/go-build -gno-record-gcc-switches -fno-common"

</pre></details>

### What did you do?

When running `go test -v -fuzz` with `GOMAXPROCS` > 1 and `./...` target, fuzzing doesn't start, the test binary just hangs. If I drop the `// +build gofuzzbeta` tag, the fuzzing sometimes does start (but it is not flushed to stdout).

_If I set GOMAXPROCS=1 or I specify the exact path of my fuzzed package, fuzzing starts almost immediately and all the logs flush every three seconds._

Here's a concrete reproducer. Sorry for using a pre-existing project - when I tried a minimal reproducer... it all worked all of a sudden.

```
# commit 7d9672fab55920d245a0b78636e4ba512c025930
git clone https://github.com/kokes/smda -b experiments/fuzzing
cd smda
# this hangs
GOMAXPROCS=2 gotip test -v -run=NONE -fuzz=FuzzDelimiter ./...
# these two work
GOMAXPROCS=1 gotip test -v -run=NONE -fuzz=FuzzDelimiter ./...
GOMAXPROCS=2 gotip test -v -run=NONE -fuzz=FuzzDelimiter ./src/database
```

I even tried building go from source, introducing various `fmt.Println`s around the codebase. It seemed like `CoordinateFuzzing` was never even triggered, but I couldn't figure out why.

----

To try and isolate as much of my local software as possible, I ran a clean `golang` Docker image, built Go's dev.fuzz from scratch and ran the test command than would hang on my Mac. It did the same thing on this linux/amd64 image, so I don't think it's specific to Darwin or my setup.

### What did you expect to see?
Fuzzing stats from `logStats`


### What did you see instead?

Nothing, `go test` hangs.
Repository: flutter
Issue: [integration_test] Allow driving native UI interactions from Dart
Labels: c: new feature,framework,c: proposal,f: integration_test,P3,team-framework,triaged-framework

## Use case

I use integration_test package to write UI tests on Dart for iOS and Android platforms. I also have webview in my app.

"find" depends on flutter elements (keys, icons, etc) and when you open a web view you're on a website that has a different scope to the app. 

When tests are being written I am unable to find elements to interact with.


## Proposal

I want to write test code using native flutter but for webviews
Repository: youtube-dl
Issue: Always shows download error
Labels: question

<!--

######################################################################
  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:
- Look through the README (http://yt-dl.org/readme) and FAQ (http://yt-dl.org/faq) for similar questions
- Search the bugtracker for similar questions: http://yt-dl.org/search-issues
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm asking a question
- [x] I've looked through the README and FAQ for similar questions
- [x] I've searched the bugtracker for similar questions including closed ones


## Question

<!--
Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient.
-->

WRITE QUESTION HERE

How to solve this problem ??

--> DownloadError: ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the verbose flag and include its complete output.
Repository: PowerToys
Issue: [Run-Plugin] [Program] doesn't find PowerPoint with the search string "ppt"
Labels: Idea-Enhancement,Run-Plugin

Start finds PowerPoint with "ppt", but Run finds Command Prompt. Finding "prompt" is OK, but PowerPoint would be a better hit. Maybe Start is including file extensions in its search?
Repository: TypeScript
Issue: Parentheses in nullish coalescing chains impacts type narrowing
Labels: Bug,Help Wanted

# Bug Report

### 🔎 Search Terms

nullish coalescing chain parentheses type narrowing prettier

### 🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about nullish coalescing. Note that at the time of writing, 4.3.5 was the latest stable release.

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.3.5#code/C4TwDgpgBAKlC8AoKUA+UDeUCGAuKAzsAE4CWAdgOYDcUARvkWVVAL7JqY6MkU30B+fAFdyAEwgAzChDFsO6LNiFRRE6eVm0GhXi1bVEiAMYB7ckSiUIwAEoQCwgDbAAjAigAKAG7YnwiFceZkpONSkZMQAaKF9-CAAmfBgASmC+BAA+TA5iG2Ficli-APcBAWL4hIA6bChyyoCaukMDIzMLYCsbe0cXBI8fEsD0lnRwjVkYuKbktN0QrJyUPOACopnA+oqhqtrtxsTquhTW6iA)

### 💻 Code

```ts
type T =
  | { a: string; b: string }
  | { a: string; b?: undefined }
  | { a?: undefined; b: string };

const getResult1 = (value1: string | undefined, value2: T): string => {
  return value1 ?? value2.a ?? value2.b;
};

const getResult2 = (value1: string | undefined, value2: T): string => {
  return value1 ?? (value2.a ?? value2.b);
};
```

### 🙁 Actual behavior

- `getResult1` throws a type error, as TypeScript incorrectly infers that `value2.b` has a type of `string | undefined`. 
- `getResult2` does not throw a type error, as TypeScript correctly infers that `value2.b` has a type of `string`. 

### 🙂 Expected behavior

The existence and placement of parentheses in nullish coalescing chains should not impact type narrowing, as to my knowledge (and `prettier`, as it automatically removes the parentheses seen in `getResult2`), `x ?? y ?? z` and `x ?? (y ?? z)` actually behave the same at runtime.
Repository: pytorch
Issue: `__torch_function__` always records default kwargs as kwargs
Labels: triaged,module: __torch_function__

## 🐛 Bug

`__torch_function__` may take a call that uses positional arguments and then pass it along as one that turns into kwargs. For example, `F.linear(input, weight, bias)` ends up turning bias into a kwarg due to the [following line](https://github.com/pytorch/pytorch/blob/d46689a2017cc046abdc938247048952df4f6de7/torch/nn/functional.py#L1846), no matter what the user provided


## Expected behavior

I'm not sure what the right behavior here should be.
- One possibility is that we should preserve what the user gives us; e.g. if the user passes bias as a positional arg, then it should be passed through torch_function as a positional arg.

Ed says: Maybe frame inspection could fix this.

## Environment

PT master

cc @hameerabbasi @rgommers @peterbell10 @ezyang
Repository: flutter
Issue: Include components version, component license(s) and component source/origin in all license components details
Labels: c: new feature,framework,engine,f: material design,c: proposal,P3,team-design,triaged-design

<!-- 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

Currently, [`showLicensePage`](https://api.flutter.dev/flutter/material/showLicensePage.html) shows licenses for software used by the application.

<img src="https://user-images.githubusercontent.com/42828461/125329274-dfc86e00-e377-11eb-93c8-0fa1faee974f.png" width="300">

On this page, all the components used in Flutter SDK were listed and could be opened to check its contents. For example, this content of the component `abseil-cpp`:

<img src="https://user-images.githubusercontent.com/42828461/125330422-53b74600-e379-11eb-98f4-7c620f5dc6c6.png" width="300">

It displays the name of the component which is `abseil-cpp`, and the text only. As developers, we need to track security vulnerabilities or if there are underlying licensing issues on the listed components. Therefore, companies/corporations require us developers to provide a complete Bill of Materials (BOM) of software used in building the application. Lets use `abseil-cpp` as an example:

* **Component name:** Abseil - C++ Common Libraries
* **Component version:** 20210324.2
* **Component license(s):** Apache-2.0
* **Component source/origin:** https://github.com/abseil/abseil-cpp

In all components, details like **component version**, **component license(s)**, **component source/origin** were not included in the displayed text.

[82264](https://github.com/flutter/flutter/issues/82264) is an open feature request related to this request.

_Note: Sample app was taken from [AboutListTile](https://api.flutter.dev/flutter/material/AboutListTile-class.html) example for demonstration purposes._

## Proposal

Include details such as **component version**, **component license(s)**, **component source/origin** to be displayed in the `showLicensePage` components contents.