sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Imported modules not idenfied in subsequent Notebook Cells
Labels: feature-request,typescript,under-discussion,notebook

<!-- ⚠️⚠️ 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/No

<!-- 🪓 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: Stable
- OS Version: mac

Steps to Reproduce:

1. Install Jupyter Extension
2. Install the TypeScript Notebooks extension
2. Create a notebook & select the `TypeScript` kernel
3. Create a cell with the code `import * as fs from 'fs'`
4. You'll get completion for `fs` in the same cell.
5. Create a new cell, and type `fs.` and note how you'll get errors about `fs` not being defined & you'll not get any completions either (this however works for other identifiers, variables, functions, etc).

<img width="373" alt="Screen Shot 2021-07-26 at 21 14 31" src="https://user-images.githubusercontent.com/1948812/127094542-bed7da0c-812b-4029-87b4-0149f3ff7a5f.png">

@mattbierner /cc
Repository: vscode
Issue: [css] Wrong selector specificity values with :where
Labels: bug,help wanted,css-less-scss

<!-- ⚠️⚠️ 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/No

<!-- 🪓 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. -->
Issue Type: Bug

In CSS files :
It seems like selectors inside where pseudo class count as normal, and where pseudo class itself counted as class.

:where(.foo) li {...}

indicates

<element :where>
  …
    <li>
Selector Specificity: (0, 2, 1)

Specificity should be Selector Specificity: (0, 0, 1)

バージョン: 1.58.2
コミット: c3f126316369cd610563c75b1b1725e0679adfb3
日付: 2021-07-14T22:10:15.214Z
Electron: 12.0.13
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.18363

Extensions: none
Repository: go
Issue: testing: support subtests in fuzzer
Labels: NeedsDecision,fuzz

Consider the following test using `testing.F`:

```go
func FuzzAtoi(f *testing.F) {
    for _, tc := range []struct {
        s        string
        expected int
    }{
        {s: "1", expected: 1},
        {s: "0", expected: 1},
    } {
        actual, err := strconv.Atoi(tc.s)
        if err != nil {
            f.Fatal(err)
        }
        if tc.expected != actual {
            f.Error(actual)
        }
    }
}
```

It fails with an unhelpful error message:
```
=== RUN  FuzzAtoi
    atoi_test.go:77: 0
--- FAIL: FuzzAtoi (0.00s)
FAIL
```

It may be made better by adding additional context into `f.Error` line. But there is another way for that available to `testing.T`, but not `testing.F` - subtests:
```go
func TestAtoi(t *testing.T) {
    for _, tc := range []struct {
        s        string
        expected int
    }{
        {s: "1", expected: 1},
        {s: "0", expected: 1},
    } {
        tc := tc
        t.Run(tc.s, func(t *testing.T) {
            actual, err := strconv.Atoi(tc.s)
            if err != nil {
                t.Fatal(err)
            }
            if tc.expected != actual {
                t.Error(actual)
            }
        })
    }
}
```

This includes subtest name in the error message automatically, which is very helpful:
```
=== RUN   TestAtoi
=== RUN   TestAtoi/1
=== RUN   TestAtoi/0
    atoi_test.go:77: 0
--- FAIL: TestAtoi (0.00s)
    --- PASS: TestAtoi/1 (0.00s)
    --- FAIL: TestAtoi/0 (0.00s)
FAIL
```

In the end, I want to be able to do something like that:
```go
func FuzzAtoi(f *testing.F) {
    for _, tc := range []struct {
        s        string
        expected int
    }{
        {s: "1", expected: 1},
        {s: "0", expected: 1},
    } {
        tc := tc
        f.Run(tc.s, func(t *testing.T) { // note 1
            t.Parallel()

            actual, err := strconv.Atoi(tc.s)
            if err != nil {
                f.Fatal(err)
            }
            if tc.expected != actual {
                f.Error(actual)
            }

            f.Add(tc.s) // note 2
        })

        f.Add(tc.s) // note 3
    }

    f.Fuzz(func(t *testing.T, s string) {
        t.Parallel()

        // ...
    })
}
```

Note that `f.Run` accepts a function accepting `testing.T` instead of `testing.F`. That allows one to run subtests in parallel and also removes ambiguity about the fuzz corpus - this way, there is only one for the whole `FuzzAtoi` function.
`f.Add` could be called in both places - inside and outside of a subtest. So it should be made thread-safe.

This issue is different from #46780 as it requests subtests support for `testing.F` instead of more complicated subfuzz targets.
Repository: go
Issue: bytes: document capacity expectations of Split and Fields
Labels: Documentation,NeedsInvestigation

The `Split` function returns a slice of sub-slices from the original input. Presently, it does not document any expectations regarding the capacity of each individual sub-slice.

For example, what's the expected behavior of the following?
```go
lines := bytes.Split([]byte("foo\nbar\n", []byte("\n"))
lines[0] = append(lines[0], "XXXXX"...)
fmt.Println(lines[1]) // does this print "bar" or "XXX"?
```
Currently, it prints "bar" because the logic [explicitly caps the capacity to the length](https://cs.opensource.google/go/go/+/refs/tags/go1.16.6:src/bytes/bytes.go;l=360;drc=refs%2Ftags%2Fgo1.16.6), which is the behavior I would expect.
However, we should probably document that this is behavior users can depend on.
Repository: flutter
Issue: ReorderableListView throws NPE if any it's child has height > container height
Labels: framework,f: material design,f: scrolling,a: error message,has reproducible steps,a: null-safety,P2,found in release: 2.2,found in release: 2.4,team-design,triaged-design

There are only two items but it doesn't matter. If any item has height bigger scrollable area after reordering it throws en error:
```
======== Exception caught by gesture library =======================================================
The following _CastError was thrown while routing a pointer event:
Null check operator used on a null value

When the exception was thrown, this was the stack: 
#0      SliverReorderableListState._itemOffsetAt (package:flutter/src/widgets/reorderable_list.dart:801:51)
#1      SliverReorderableListState._dragEnd.<anonymous closure> (package:flutter/src/widgets/reorderable_list.dart:636:32)
#2      State.setState (package:flutter/src/widgets/framework.dart:1088:30)
#3      SliverReorderableListState._dragEnd (package:flutter/src/widgets/reorderable_list.dart:624:5)
#4      _DragInfo.end (package:flutter/src/widgets/reorderable_list.dart:1150:12)
...
====================================================================================================
```
To reproduce it just start an example, hold on the first item and drag it down until items are switch positions.

```Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] Connected device (3 available)

• No issues found!
```

```
import 'package:flutter/material.dart';

void main() => runApp(App());

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) => MaterialApp(home: Home());
}

class Home extends StatelessWidget {
  const Home({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final h = MediaQuery.of(context).size.height + 100;
    return Scaffold(
      appBar: AppBar(title: Text('ReorderableListView NPE')),
      body: ReorderableListView(
        onReorder: (p1, p2) {},
        children: [
          Container(
            key: Key('item 0'),
            height: 300,
            color: Colors.green,
          ),
          Container(
            key: Key('item 1'),
            height: h,
            color: Colors.red,
          ),
        ],
      ),
    );
  }
}
```
https://user-images.githubusercontent.com/15782257/127118098-6ba6d444-d3ba-4d05-b7bb-49f1e8b29098.mov
Repository: node
Issue: Correct `node -h` text for `-r, --require` option
Labels: doc,cli

### Version

v14.17.0

### Platform

Microsoft Windows NT 10.0.19043.0 x64

### Subsystem

_No response_

### What steps will reproduce the bug?

`node -h`

### How often does it reproduce? Is there a required condition?

always

### What is the expected behavior?

```
-r, --require <module>          module to preload (option can be repeated)
```

### What do you see instead?

```
-r, --require=...          module to preload (option can be repeated)
```

### Additional information

This is just a nit. The "=" is confusing, or even wrong with `-r=foo`:
- ok: `--require=foo`
- ok: `--require foo`
- fails: `-r=foo`
=> `C:\Program Files\nodejs\node.exe: bad option: -r=foo`
- ok: `-r foo`

The command-line options docs shows no "=" sign: `-r, --require module`
The behavior of this option isn't consistent, also compared to the rest of Node's CLI options.
Repository: create-react-app
Issue: Include version during build
Labels: stale

How to include the build version as a meta when running `npm run build` using the version in package.json

Right now I have a env variable `REACT_APP_VERSION_INFO=`

Inside the index.html, I have added `<meta name="version-info" content="%REACT_APP_VERSION_INFO%" />`

The only overhead is I have to update the version in the env file in addition to the usual version update in package.json.
Repository: pytorch
Issue: Support `torch.linalg.trace`
Labels: triaged,module: python array api

## 🚀 Feature
Support `torch.linalg.trace`.
In addition to the features of `torch.trace`, `axis1`, `axis2` and `offset` options are also wanted.
(cc: @mruberry, @rgommers, @emcastillo and @kmaehashi)

## Motivation and Pitch
To enhance the compatibility with NumPy’s interface and Python array API standard.

## Needs discussions
Should the axis name be `axis1` and `axis2`, or `dim0` and `dim1`? Both should be supported?

## References
* [Python array API linalg.trace](https://data-apis.org/array-api/latest/extensions/linear_algebra_functions.html#linalg-trace-x-axis1-0-axis2-1-offset-0)


cc @mruberry @rgommers @pmeier @asmeurer @leofang @AnirudhDagar @asi1024 @emcastillo @kmaehashi @heitorschueroff
Repository: vscode
Issue: Git - Images should not be `textconv`ed when pulled from Git for display in diff viewer
Labels: bug,git

<!-- ⚠️⚠️ 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: Win 10

Steps to Reproduce:

1. (Repro steps tested under Windows - to be adapted slightly for Linux.)
```batch
md tmp
cd tmp

git init
echo *.png diff=png > .git/info/attributes
echo [diff "png"] >> .git/config
echo   textconv = magick identify -format %wx%h >> .git/config

curl https://bellard.org/bpg/2.png -o Example.png
git add Example.png
git commit -m Test
curl https://bellard.org/bpg/3.png -o Example.png
git add Example.png
curl https://bellard.org/bpg/5.png -o Example.png

rem make sure you see a text diff, -800x600 and +300x300
git diff

code .
```
2. Ctrl+Shift+G G (Open Source Control)
3. Double click any of the two Example.png shown

Only one out of four is working:

![image](https://user-images.githubusercontent.com/12128514/127139265-3eee063b-ee3e-4693-a879-991de63b312f.png)

![image](https://user-images.githubusercontent.com/12128514/127139287-8ba5ce2f-03b0-4e5a-a1c8-f1e02975653a.png)

The issue is supposedly caused by https://github.com/microsoft/vscode/commit/3cc86855010e3049bbc19f366f44d55bf08859fb. That change makes sense in a lot of settings (decrypting encrypted files in git, ignoring certain things in determining clean/dirty state of working copy, etc) - but it does not make sense for visual comparison of images. It makes particularly little sense if the current file (received from the file system, not from git) is *not* `textconv`ed (bottom snapshot, right image).

The issue was first observed in https://github.com/microsoft/vscode-remote-release/issues/5379
Repository: transformers
Issue: Truncating the prefix of a sequence rather than the suffix
Labels: WIP

# 🚀 Feature request

Hi, tokenizers get `truncation` as an argument. When set to `True` the tokenizer will truncate the suffix of a sequence so it does not surpass the specified `max_length`. I'd like to have a functionality that truncates the prefix of the sequence, so the model will see the suffix of the sequence.

## Motivation

In many applications (e.g. Dialog, and QA) the most important part of the sequence is the suffix (e.g. the question after the context, or the last response of the dialog).

## Your contribution

Perhaps I'll submit a PR, but it might take me some time as I'm close to some deadlines of mine :(
Repository: vscode
Issue: Disassembly view: do not piggy back on existing step commands, introduce new ones
Labels: debug,debt,debug-disassembly

fyi @yuehuang010, @xisui-MSFT 

Code pointer https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/debug/browser/debugCommands.ts#L265

I already mentioned this in the PR review but it seems like we did not address this.

We should not check the value of the context inside the command, but we should have special STEP commands for the disassembly view.
That way the solution will be cleaner.
Repository: vscode
Issue: Disassembly view: not possible to set instruction breakpoint with keyboard
Labels: bug,debug,accessibility,debug-disassembly

Testing #129161

@yuehuang010, @xisui-MSFT

1. Open disassembly view, try to press F9 to add a breakpoint, nothing happens 🐛 
2. For accessibility reasons we have to have a way to add instructions breakpoints just using the keyboard. We should stick with `F9` since that works for normal editors.
Repository: youtube-dl
Issue: Download livestream from beginning
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 DESCRIPTION HERE

Hello!
Is it possible to download this livestream https://oe1.orf.at/player/20210727/645694 from beginning using the red timeline displayed?

youtube-dl **--hls-prefer-native** "https://orf-live.ors-shoutcast.at/oe1-q2a?player=radiothek_v1&referer=oe1.orf.at&userid=f9aa360b-320f-4278-aa9d-5b42ef883193" did not work
Repository: vscode
Issue: Disassembly view: introduce context menu
Labels: feature-request,debug,debug-disassembly

Testing #129161

@yuehuang010, @xisui-MSFT 

1. Currently it is not possible to copy anything out of the disassembly view (a user might want to copy an address?)
2. We should probably have a context menu. Not sure what other potential actions we should put there, put `Copy` should definitely be there
Repository: rust
Issue: v0 mangling should avoid backrefs when they're not shorter than their target.
Labels: A-linkage,C-enhancement,I-heavy

While working on #61486 / #87194 I came across backrefs in byte array values (with repeating elements), which I hadn't thought about (in terms of implications on optimizing the length of a symbol), but which is otherwise entirely expected. In order to demonstrate an edge case, I encoded `some...longer...path::<{ &[0, 0, 0, 0] }>` to get `KRAh0_B12_B12_B12_E`, which is parsed as follows:
```rust
K       // const generic
 R      //  &
  A     //   [
   h0_  //    0u8
   B12_ //    backref to "h0_" / `0u8`
   B12_ //    backref to "h0_" / `0u8`
   B12_ //    backref to "h0_" / `0u8`
  E     //   ]
```

Because this is a long enough symbol, the backrefs end up being (at least) 4 bytes each (to encode positions greater than 62), whereas an integer leaf constant with a `0..=15` value gets encoded as 3 bytes, so the backrefs are each adding an extra byte (and making more pointless work for the demangler).

We could avoid this by tracking the range, not just the start, of an encoded path/type/const, and one of:
* skip caching the backref position when encoding that position would require more bytes than the inline size
* record the range and make `print_backref` decide between actually printing the backref, and duplicating the contents of that range, inline, depending on which would be shorter

<hr/>

However, this isn't an urgent concern IMO because of the combination of these aspects:
* the encoder gets to choose whether to use a backref or to repeat the encoding inline, we don't have to update decoders if we change our backref generation heuristic
* most backrefs are either 3 or 4 bytes (for positions up to `62` or `62² = 3844`, respectively)
* we already special-case one-character leaves, to never record themselves for backrefs, so only less-trivial path/type/const syntax, which will produce 2 bytes or more, is relevant
* paths have to include a crate root leaf (at least ~16 bytes) or a backref (at least 3 bytes), so the shortest possible paths are 5 bytes (e.g. inherent `impl` on a builtin type, using a backref for the `impl` parent module)
  * this further implies that only types/consts that *don't* reference paths can be 2-3 bytes (e.g. `&str` is `Re`, `[u8]` is `Sh`, `fn()` is `FEu`, etc.)

It might be interesting to measure the size difference across some larger projects (including `rustc` and Cargo), by making this change (even inefficiently), after v0 becomes the default, but I don't expect a difference bigger than a handful of bytes per symbol, if that.

cc @michaelwoerister
Repository: vscode
Issue: Disassembly view: support keyboard navigation
Labels: feature-request,debug,debug-disassembly

Testing #129161

@yuehuang010, @xisui-MSFT 

1. Open disassembly view, focus one of the items
2. Start typing an address as a way to navigate to it -> nothing happens

I suggest to use the `keyboardNavigationLabelProvider`
Example https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/debug/browser/variablesView.ts#L128

That way it will make it possible for users to easily navigate the view by address
Repository: vscode
Issue: Instruction breakpoints should maybe use a different breakpoint icon
Labels: debug,under-discussion,debug-disassembly

https://github.com/microsoft/vscode/issues/129161

@yuehuang010, @xisui-MSFT 

Instructions breakpoints currently use the same icon as regular breakpoints.
We could introduce a new icon  to make them more distinguishable?

Maybe a red square? We already have a diamond and triangle. @misolori what do you think? (instruction breakpoint can be added from the disassembly view which we just introduced this milestone).
@yuehuang010 @xisui-MSFT what does Visual Studio use, regular red circle?

![Screenshot 2021-07-27 at 15 41 53](https://user-images.githubusercontent.com/1926584/127164478-c133e39e-df38-440b-bdb5-a8038bb62727.png)
Repository: pytorch
Issue: `periodic-pytorch-linux-xenial-cuda11.3-cudnn8-py3.6-gcc7-build` started to fail 
Labels: module: cuda,triaged

Last successful run on https://github.com/pytorch/pytorch/commit/200b6ccdc081c5c2e05e480c762d485aed5a5e7c : https://github.com/pytorch/pytorch/runs/3163906071
Next run https://github.com/pytorch/pytorch/runs/3165742121 fails to compile BinaryMiscOpsKernels.cu and UnaryGammaKernels.cu, which makes https://github.com/pytorch/pytorch/pull/61641  a potential culprit
Next run https://github.com/pytorch/pytorch/runs/3167288223 

cc @malfet @seemethere @walterddr @ezyang @pytorch/pytorch-dev-infra @ngimel
Repository: vscode
Issue: Instruction breakpoints can not be disabled
Labels: feature-request,debug,debug-disassembly

Testing #129161

Found by @yannickowow 
@yuehuang010, @xisui-MSFT 


1. Open disassembly view, add instruction breakpoint
2. Disable instruction breakpoint in the breakpoints view
3. Disassembly view still shows the breakpoint as enabled 🐛
Repository: vscode
Issue: "Remove all breakpoints" does not remove instruction breakpoints
Labels: bug,debug,debug-disassembly

Testing https://github.com/microsoft/vscode/issues/129161

@yuehuang010, @xisui-MSFT 
found by @yannickowow 

1. Open disassembly view, add instruction breakpoints
2. Context menu in the breakpoints view > remove all breakpoints
3. Instruction breakpoints do not get removed 🐛