sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/cover: incorrect coverage for source file generated by x/tools/cmd/goyacc
Labels: NeedsInvestigation

# What version of Go are you using?

go version go1.12.7 windows/amd64

### What did you do?

~~~
go get github.com/rillig/go-yacc-examples
cd $GOPATH/src/github.com/rillig/go-yacc-examples/json
go generate
go test -test.coverprofile coverage.out
~~~

### What did you expect to see?

The `coverage.out` file contains coverage markers for `json.y`, as that is where the source code comes from, according to the `//line` comments.

### What did you see instead?

The `coverage.out` file contains:
~~~
github.com/rillig/go-yacc-examples/json/y.go:25.0,27.0 1 0
~~~

y.go lines 25 to 27 contain:
~~~
var yyToknames = [...]string{
	"$end",
	"error",
~~~

There is no code to be covered here, and these lines do not form a block at all.

Some lines below that, y.go contains:
~~~
//line yaccpar:1
~~~

The output of `go tool objdump` on the test executable contains:
~~~
TEXT github.com/rillig/go-yacc-examples/json.(*yyParserImpl).Lookahead(SB) yaccpar
  yaccpar:25		0x586a00		b801000000		MOVL $0x1, AX
  yaccpar:25		0x586a05		488d0d74341e00		LEAQ something(SB), CX
  yaccpar:25		0x586a0c		f00fc101		LOCK XADDL AX, 0(CX)
  yaccpar:26		0x586a10		488b442408		MOVQ 0x8(SP), AX
  yaccpar:26		0x586a15		488b8010010000		MOVQ 0x110(AX), AX
  yaccpar:26		0x586a1c		4889442410		MOVQ AX, 0x10(SP)
  yaccpar:26		0x586a21		c3			RET
~~~

This makes me suspect that the file name `yaccpar` is not taken into account when generating the coverage data.

See https://youtrack.jetbrains.com/issue/GO-7513
Repository: pytorch
Issue: [jit] Dict iterator invalidation doesn't match Python
Labels: oncall: jit,triaged,jit-backlog

This runs in TorchScript but throws an error in Python

```python
@torch.jit.script
def fn():
    a_dict = {'a': 1, 'b': 2, 'c': 3}
    sum = 0
    for key in a_dict:
        a_dict[str(a_dict[key])] = 1
        sum += a_dict[key]
    return sum

print(fn())
```

It outputs

```
6
```

but should output

```
Traceback (most recent call last):
  File "../test.py", line 15, in <module>
    print(fn())
  File "../test.py", line 10, in fn
    for key in a_dict:
RuntimeError: dictionary changed size during iteration
```

cc @suo
Repository: rust
Issue: Audit sources of shared state across rustc
Labels: T-compiler,WG-compiler-performance,A-parallel-queries

Infrastructure for parallel compilation has landed in rustc, but the shared state involved has not been fully documented (in terms of what state exists, invariants, atomicity, lock ordering, etc) or assessed for removal by refactoring.

This issue tracks the PR history for parallelization infrastructure, which is being re-audited to seed an initial list of shared state to assess. The initial output of the audit is [this paper doc](https://paper.dropbox.com/doc/rustc-shared-state-audit--Ai__733hU70wACu6fchZrhFMAg-zsOrKjkMZbBYZJWhgXPke), which will ultimately be turned into a set of individual issues.

### PR List

- [x] #46709
- [x] #46779
- [x] #47906
- [x] #48586
- [x] #48587
- [x] #48690
- [x] #48691
- [x] #48808
- [x] #48811
- [x] #48904
- [x] #48936
- [x] #49030
- [ ] #49045 - make queries thread-safe
- [x] #49349
- [x] #49396
- [x] #49558
- [ ] #49732 - make incremental compilation thread-safe
- [x] #49834 - Make SelectionCache and EvaluationCache thread-safe
- [ ] #49882 -  More thread-safety changes
- [ ] #49894 - Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString
- [x] #50108 - Make GlobalCtxt thread-safe
- [x] #50699 - Blocking Rayon queries
- [x] #51383 - Run some stuff in parallel
- [x] #51487 - Make more passes incremental
- [x] #56614 - Replace LockCell with atomic types
- [x] #56946 - Add support for using a jobserver with Rayon
- [x] #57065 - Optimize try_mark_green and eliminate the lock on dep node colors
- [x] #57232 - Parallelize and optimize parts of HIR map creation
- [x] #57308 - Make CompileController thread-safe
- [x] #58010 - Move privacy checking later in the pipeline and make some passes run in parallel
- [x] #58019  - Combine all builtin late lints and make lint checking parallel
- [x] #58679 - Refactor passes and pass execution to be more parallel
- [x] #59540 -  Use arenas to avoid Lrc in queries #1
- [x] #59545 - Use arenas to avoid Lrc in queries #2
- [x] #59804  - Clean up jobserver integration
- [x] #59809 - Make trait_methods_not_found use a lock

### Issue creation

- [ ] Issues created for individual pieces of state, together with a tracking issue
Repository: flutter
Issue: Re-evaluate findBundlePath() because it has been changed to simply return a constant.
Labels: platform-android,engine,P2,team-android,triaged-android

Re-evaluate findBundlePath() because it has been changed to simply return a constant.

There may still be add-to-app situations where a developer wants to provide their own app bundle path.
Repository: flutter
Issue: Expose canvas transform matrix
Labels: c: new feature,engine,P3,team-engine,triaged-engine

## Use case

dart:ui canvas doesn't expose the current trasformation matrix. We can use canvas.translate(), scale(), rotate() to manipulate it but we can't get the resulting matrix after the transformations have been added. Skia exposes it (https://skia.org/user/api/SkCanvas_Reference#SkCanvas_getTotalMatrix), just Flutter doesn't.

Why? For hit testing, for instance. There is hit testing at the canvas level, but if, say, I draw many objects to my canvas and later need to learn where the user has tapped, the normal way would be to ask for the actual matrix after drawing each object, calling a MapRect(bounds) so that its bounds are mapped according to the transform, store the resulting rect and use that later for hit testing.

There is a workaround: duplicate all transform manipulation functions in your code and in addition to passing them on to the canvas, also calculate the same transformation for yourself and use that later. Not really nice, requires implementing all matrix operations and stack support for save/restore while the real solution wouldn't mean any extra work for Flutter at all, just allowing a single function to get through to the engine below.

## Proposal

Add this getTotalMatrix() function.
Repository: rust
Issue: missing symbol issue in some environments (rustdoc bug?)
Labels: A-linkage,O-linux,T-rustdoc,T-compiler,C-bug,E-needs-mcve

I have encountered an issue whereby I get a missing symbol error, specifically in Ubuntu Xenial and Bionic Beaver environments on travis, but not Trusty. I believe it is either a rustdoc bug, or an issue with differences in system libs/utilities it uses.

It relates specifically only to a symbol guarded by a cargo feature flag.

I have [a set of crates](https://github.com/jnqnfe/pulse-binding-rust) for binding to the PulseAudio (PA) system libraries.

The crates all have a set of features relating to system library version compatibility. The crates are compatible with PA versions 8-12. PA v12 added a single new function symbol, use of which is controlled via a cargo feature. PA did not add any new functions after v8 until v12.

This issue has suddenly cropped up since travis has shifted their default environment over from Trusty to Xenial...

I want to cut through a lot of the mess that resulted in my arriving here, issues with trying to use workspaces+features which I now know are not supported and such, you can read discussion [here](https://travis-ci.community/t/failure-due-to-system-libs-now-being-older/4712) if you *really* want to, but for simplicity, please just ignore the mess of travis and workspace changes, and look past the fact that in the below tests we're enabling PA v12 features on PA v4/8/11 systems; the point here is investigating the wierdness of the missing symbol error I've noticed. (and apologies if already reported, there we 90 pages of 'symbol' related issues and i gave up trying to look for an existing report).

The short version of what is relevant is that I believe that parts of my library that are not directly used in a test get optimised out of the tests, hence no missing symbol linking errors when the system lib is too old a version; hence why tests passed successfully on Trusty which only had PA v4.x. However for some reason this one specific symbol does not get optimised out (i guess) resulting in a missing symbol error on Xenial/Bionic environments only. This is despite this symbol itself not being involved in any tests...

Compare the following travis tests:
Trusty (PA v4): https://travis-ci.org/jnqnfe/pulse-binding-rust/jobs/572936139
Xenial (PA v8): https://travis-ci.org/jnqnfe/pulse-binding-rust/jobs/572946063
Bionic (PA v11): https://travis-ci.org/jnqnfe/pulse-binding-rust/jobs/572936129

The only difference is the Ubuntu version selected in the travis config. Trusty passes, while the other two complain about the symbol. All three are using the same version of `rustc` and `cargo`...

Only `rustdoc` tests are involved in the failure, with the entire set either being 'ignored' or 'failed'. It passes on Trusty though.

edit: typo fixes
Repository: rust
Issue: inline attribute on async fn doesn't work properly
Labels: I-slow,A-attributes,A-codegen,T-compiler,C-bug,A-async-await,AsyncAwait-Triaged,requires-nightly

[Playground link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=3e8d2c145ac7edf44e6eb84ae65e1390)

In the playground, an `async fn` is marked `#[inline(always)]`:
```rust
#[inline(always)]
pub async fn test() -> i32 {
    12345
}
```

However, if you compile it in debug mode (where inlining only happens for `#[inline(always)]` functions), and search for `12345` in the generated assembly, you can see that it is not inlined.

Indeed, there are multiple levels of function calls that are not inlined:

`run_it`
→ `GenFuture<T>::poll`
→ `std::future::set_task_context`
→ `GenFuture<T>::poll::{closure}`
→ `playground::test::{{closure}}`

That last closure is the generator that contains the actual body of `test`.

`#[inline(always)]` *is* taking effect on the post-transformation function `test`, but all that does is initialize the generator struct.

As long as async is implemented based on generators, this will be hard to fix.  Even if the generator itself were marked `alwaysinline`, that wouldn't affect `GenFuture` or `set_task_context`, both of which are from `libstd`.

Related to #62918, since if you want an async fn to be `#[inline(always)]`, you probably also want to get rid of the TLS usage by `set_task_context`.
Repository: godot
Issue: Cannot load GDNative DLL from within the PCK file
Labels: enhancement,platform:windows,confirmed,topic:gdextension

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if non-official. -->
3.1.1

**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Linux cross compiling to Windows

**Issue description:**
<!-- What happened, and what was expected. -->
GDnative libraries cannot be loaded from the .pck file when the pattern `*.dll` is included in the resources regex on the export tab.

**Steps to reproduce:**


**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
Repository: TypeScript
Issue: Provide TypeScript as an ESM
Labels: Suggestion,Awaiting More Feedback

## Search Terms

commonjs, esm, lib/typescript

## Suggestion

Currently `lib/typescript.js` and other `lib` files do not support being loaded as ES modules.  They only support loading as a global script or a CommonJS module.

## Use Cases

For runtimes that want to load TypeScript as a module and not in the global namespace, they have to do some pre-processing using a packager like webpack, rollup, etc. to be able to load TypeScript as an ES Module.

In addition, there are useful CDNs like [Pike](https://www.pika.dev/cdn) which can parse npm packages, find the ES modules, and will host an optimised version designed for loading in greenfield modern/browsers.

## Examples

For example, it is impossible to currently load `lib/typescript.js` in Deno as it only supports ESM and each `import` is assumed to be a module, and therefore the `var ts` is scoped to the module.  Also loading directly as a module in a browser would be possible.

## Checklist

My suggestion meets these guidelines:

* [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [X] This wouldn't change the runtime behavior of existing JavaScript code
* [X] This could be implemented without emitting different JS based on the types of the expressions
* [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [X] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: neovim
Issue: Excessive memory usage with large job output (OOM)
Labels: bug,needs:design,job-control,needs:discussion

Given t-oom.vim:
```vim
function! F(...) abort
endfunction

let j = jobstart(
      \ 'rg -H --no-heading --vimgrep --sort-files .', {
      \ 'on_stdout': function('F'),
      \ })
echom j
echom string(jobwait([j]))
```

Run it using `nvim -u t-oom.vim` in Neovim's source directory.

After ~15s it gets killed by the OOM killer for me.

> Out of memory: Killed process 2782 (nvim) total-vm:16207288kB, anon-rss:13903108kB, file-rss:2544kB, shmem-rss:0kB

This basically gets triggered through ripgrep's `--vimgrep` option repeating
lines for every match ("." in this case).

This produces a lot of output, but it seems like it gets not freed internally,
after being passed to the output handler?

Using `stdout_buffered` results in a quicker OOM.

(I have noticed this with vim-grepper initially, where it was triggered by a
legit query, but which got found multiple times in JSON fixtures with very long
lines seemingly.  In this case it gets added to the quickfix list a lot, but
there it is limited to 1024 bytes/chars)

This is on master (e56f62e9a).  Neovim 0.3.8 shows the same behavior.
Repository: rust
Issue: rustc hangs/spins on example involving associated types
Labels: A-trait-system,A-associated-items,T-compiler,C-bug,I-hang

The following 5-line example causes `rustc` to spin:

```rust
pub struct Chicken<'a, T: Trait>(&'a Frog<'a, T::Item>);

pub struct Frog<'a, T: Trait>(&'a Chicken<'a, T>);

pub trait Trait {
    type Item;
}
```

The spin happens with or without the `--edition=2018` flag.

This may be the same issue as #62430, just an even simpler reproduction case.

Output of `rustc --version --verbose`:
```
rustc 1.36.0 (a53f9df32 2019-07-03)
binary: rustc
commit-hash: a53f9df32fbb0b5f4382caaad8f1a46f36ea887c
commit-date: 2019-07-03
host: x86_64-apple-darwin
release: 1.36.0
LLVM version: 8.0
```

Using the [Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=48ead29154c28e6dd4d0384e4569782e), I also reproduced the issue with stable Rust 1.37.0, beta Rust 1.38.0-beta.1, and nightly Rust 1.39.0 2019-08-15.
Repository: rust
Issue: Non-exhaustive patterns lead to bogus "unused variable" / "dead code" warnings
Labels: A-lints,T-compiler,C-bug

Consider this code:
```rust
fn foo() -> Option<i32> { None }

pub fn bar(x: i32) {
    match foo() {
        Some(_) => return,
    }
    
    let _val = Box::new(x);
}
```
This generates the following diagnostics on current nightly:
```
warning: unreachable statement
 --> src/lib.rs:8:5
  |
8 |     let _val = Box::new(x);
  |     ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unreachable_code)]` on by default

error[E0004]: non-exhaustive patterns: `None` not covered
 --> src/lib.rs:4:11
  |
4 |     match foo() {
  |           ^^^^^ pattern `None` not covered
  |
  = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms

warning: unused variable: `x`
 --> src/lib.rs:3:8
  |
3 | pub fn bar(x: i32) {
  |        ^ help: consider prefixing with an underscore: `_x`
  |
  = note: `#[warn(unused_variables)]` on by default
```
The "unused variable" and "dead code" lints are spurious, and not helpful. This only seems like dead code because there's a missing match arm. After adding `_ => {}` in the match, all diagnostics go away.
Repository: scrcpy
Issue: Scripts to unlock the phone and to swipe up - mainly for non touchscreen devices
Labels: feature request

I am testing scrcpy on a lenovo t430 without a touchscreen, my phone is locked and these are the steps to unlock it:

adb shell input keyevent 26 && adb shell input swipe 200 500 200 0 && adb shell input text "your pin"

The second command

adb shell input swipe 200 500 200 0

allows me to perform a swipe up action, which is needed to go to the app drawer.

It could be useful to bind such events to a preconfigured key combination.

Very nice piece of software, anyway,
Repository: youtube-dl
Issue: --max-filesize may not work
Labels: bug,mpd,hls

## Checklist

- [* ] I'm reporting a broken site support issue
- [* ] I've verified that I'm running youtube-dl version **2019.08.13**
- [* ] I've checked that all provided URLs are alive and playable in a browser
- [ *] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [* ] I've searched the bugtracker for similar bug reports including closed ones
- [ *] I've read bugs section in FAQ


## Verbose log

```
:~/test# youtube-dl --max-filesize 20m https://www.youtube.com/watch?v=h2zkV-l_TbY
[youtube] h2zkV-l_TbY: Downloading webpage
[youtube] h2zkV-l_TbY: Downloading video info webpage
[download] Destination: ☕ Restaurant Ambience • 10H Busy Coffee Shop Background Noise-h2zkV-l_TbY.f313.webm
[download]   0.2% of 5.55GiB at  5.91MiB/s ETA 15:59^C
ERROR: Interrupted by user
```


## Description

Hello,

I notice that the "--max-size" function no longer works on youtube-dl updated.
Repository: rust
Issue: Some closures are not inlined in release mode
Labels: A-LLVM,I-slow,A-codegen,T-compiler,C-bug

Consider the following code ([playground](https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=e58aaff523a8948c15e6f60d11efd952)):

```
fn main() {
    let err = Err(());
    let _: usize = err.unwrap_or_else(|err| err_exit(err));
    unreachable!();
}

fn err_exit(_: ()) -> ! {
    std::process::exit(1);
}
```

When compiled with rustc 1.36, it gives the following assembly:

```
core::result::Result<T,E>::unwrap_or_else:
	pushq	%rax
	callq	playground::main::{{closure}}
	ud2

playground::main:
	pushq	%rax
	callq	core::result::Result<T,E>::unwrap_or_else
	ud2

playground::main::{{closure}}:
	pushq	%rax
	callq	playground::err_exit
	ud2

playground::err_exit:
	pushq	%rax
	movl	$1, %edi
	callq	*std::process::exit@GOTPCREL(%rip)
	ud2
```

Note how the closure is not inlined, even though it would be trivial to do so (replace `	callq	playground::main::{{closure}}` with `	callq	playground::err_exit`).
Repository: rust
Issue: Local rustdoc search doesn't work with --no-deps
Labels: T-rustdoc,E-needs-test,C-bug,A-rustdoc-search

I'm having an issue that is similar to https://github.com/rust-lang/docs.rs/issues/316, but it's about local docs.

I'm using `cargo doc --no-deps --open`, and on the opened page the search does not work. It shows "Loading search results..." and doesn't complete, just like in the link above.

The JS console says: `TypeError: paths is undefined (main.js:95:15458)`, and in the JS debugger I see the following: It's trying to access `rawSearchIndex['byteorder'].p`, but `rawSearchIndex['byteorder']` does not have `p`. It looks like the following:

```
rawSearchIndex['byteorder']: {…}
doc: "This crate provides convenience methods for encoding and decoding numbers in either [big-endian or little-endian order]."
items: (265) […]
paths: (5) […]
<prototype>: {…}
```

However, for my own crate it works correctly:
```
rawSearchIndex['climeta']: {…}
doc: ""
i: (2184) […]
p: (143) […]
<prototype>: {…}
```

Actually I guess there should be nothing about `byteorder` at all in the index, because I built the docs with `--no-deps`, and alas, when building without `--no-deps`, the search works!

Now, I tried to build again with `--no-deps`, and it still works. Apparently it was trying to load some old index file that had an outdated format ...

It's great when a problem gets solved while writing the issue report 😆, but I think this issue might still serve a purpose, so I'll open it anyway, if only for others to find it. And maybe rustdoc should try harder to not load outdated index files.
Repository: TypeScript
Issue: test-262 integration
Labels: Suggestion,Experience Enhancement

## Search Terms

test-262, test262

## Suggestion

Run [test-262](https://github.com/tc39/test262) on TS downlevel

## Use Cases

> What do you want to use this for?

- Verify that downleveling is spec-compliant to avoid issues when changing the test target.

- Possible benefits for TS team:
    - Reduce triage overhead by catching semantic errors quickly
    - Reduce duplicate effort by putting creative testing work into the test-262 project


## Examples

```sh
gulp runtests  # runs relevant test-262 tests
```

## Checklist

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).