sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: #[macro use] should suggest #[macro_use] and similar
Labels: C-enhancement,A-diagnostics,T-compiler,A-suggestion-diagnostics

I swapped an underscore for a space while typing out the attribute. It'd be nice if the error message said that instead of the mess it shows here:

```
error: expected identifier, found reserved keyword `macro`
 --> src/bin/factoid.rs:3:3
  |
3 | #[macro use]
  |   ^^^^^ expected identifier, found reserved keyword

error: cannot find macro `setup_panic!` in this scope
  --> src/bin/factoid.rs:13:5
   |
13 |     setup_panic!(Metadata {
   |     ^^^^^^^^^^^

error[E0658]: The attribute `r#macro` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
 --> src/bin/factoid.rs:3:1
  |
3 | #[macro use]
  | ^^^^^^^^^^^^

error: expected one of `(` or `=`, found `use`
 --> src/bin/factoid.rs:3:9
  |
1 | extern crate clap;
  | - expected one of `(` or `=` here
2 | extern crate exitcode;
3 | #[macro use]
  |         ^^^ unexpected token
```

This should also happen for all the other macros with underscores in them:

* `crate_name`
* `crate_type`
* `no_builtins`
* `no_main`
* `no_start`
* `no_std`
* `recursion_limit`
* `windows_subsystem`
* `no_implicit_prelude`
* `link_args`
* `linked_from`
* `link_name`
* `macro_use`
* `macro_reexport`
* `macro_export`
* `no_link`
* `export_name`
* `no_mangle`
* `link_section`
* `cfg_attr`
* `must_use`
Repository: flutter
Issue: Color codes in error messages are probably escaped when using the iOS simulator
Labels: platform-ios,tool,customer: crowd,has reproducible steps,P3,found in release: 3.0,found in release: 3.1,team-ios,triaged-ios

I'm adding ANSI color codes such as `\u001B[31;1m` (bright red) to error messages.
They render fine when using the Android emulator.
But with the iOS simulator, they seem to get escaped and appear as below:
`**\^[[31;1m**Material widget ancestor required by TextField widgets not found.**<…>**`
Repository: flutter
Issue: Binding a Flutter Canvas / PictureRecorder to a Texture?
Labels: c: new feature,engine,P2,team-engine,triaged-engine

I'm looking into rendering Flutter canvas graphics onto an Android surface from another plugin.

Currently I have the following:

Android flutter plugin that obtains an Android Surface.

- option 1: flutter app renders `Canvas`, save with `PictureRecorder`, copy RGBA bytes to plugin, draw to `Surface`
- option 2: flutter app sends messages to plugin to draw on an Android `Canvas`, draw to `Surface`

option 2 is significantly faster - but requires mirroring `Canvas` methods in the UI with plugin methods, 

e.g.

```dart
// Draw UI
canvas
  .. drawPaint(paint)
  .. drawLine(pt1, pt2, paint);

// Render same thing to plugin
plugin
  ..drawPaint(paint);
  ..drawLine(pt1, ot2, paint);
```

In our case - we currently only need a subset of Canvas methods, so this isn't too burdensome for now.

Ideally, however, this could look something like this:

```dart
// Draw UI
canvas
  .. drawPaint(paint)
  .. drawLine(pt1, pt2, paint);

// Render same thing to plugin
canvas = new Canvas(new PictureRecorder(plugin.textureId))
  ..drawPaint(paint);
  ..drawLine(pt1, pt2, paint);
```

Is there a way to let a `PictureRecorder` record canvas operations to a texture?

Thanks!
Repository: go
Issue: cmd/cover: misleading coverage indicators for channel operations in 'select' statements
Labels: NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?
go version go1.10.3 windows/amd64

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?
set GOHOSTARCH=amd64
set GOHOSTOS=windows

### What did you do?

main.go:

```go
package main

import (
	"fmt"
	"time"
)

var vars struct {
	chanStruct    chan struct{}
	chanInt       chan int
	chanOneClosed chan struct{}
	spamNumber    int
}

func main() {
	vars.chanStruct = make(chan struct{})
	vars.chanInt = make(chan int, 1024)
	vars.chanOneClosed = make(chan struct{})
	vars.spamNumber = 20

	go feed()
	go aLoop()

	time.Sleep(time.Second)

	close(vars.chanStruct)

	select {
	case <-vars.chanOneClosed:
	}

	time.Sleep(time.Second)
}

// a comment
func feed() {
	// a comment
	for i := 0; i < 10; i++ {
		// a comment
		vars.chanInt <- i
		// a comment
	}
	// a comment
}

// a comment
func aLoop() {
Loop:
	// a comment
	for {
		// a comment
		select {
		// a comment
		case <-vars.chanStruct:
			// a comment
			close(vars.chanOneClosed)
			// a comment
			break Loop
		// a comment
		case myInt := <-vars.chanInt:
			// a comment
			if myInt < vars.spamNumber {
				// a comment
				vars.chanInt <- myInt + 1
				// a comment
			}
			// a comment
		}
		// a comment
	}
	// a comment
	fmt.Println("closed")
	// a comment
}
```

main_test.go:

```go
package main

import (
	"testing"
	"time"
)

func TestALoop(t *testing.T) {
	vars.chanStruct = make(chan struct{})
	vars.chanInt = make(chan int, 1024)
	vars.chanOneClosed = make(chan struct{})
	vars.spamNumber = 20

	go feed()
	go aLoop()

	time.Sleep(time.Second)

	close(vars.chanStruct)

	select {
	case <-vars.chanOneClosed:
	}

	time.Sleep(time.Second)
}
```

Then run:
```
go test -coverprofile=coverage.out -v test
go tool cover -html=coverage.out
```

### What did you expect to see?
Coverage report with green and black, with only red in main, similar to this:

![image](https://user-images.githubusercontent.com/14301945/44179067-fa0eef00-a0a9-11e8-97f0-52494986e9d7.png)

Note, remove the follow code from main to get coverage report to be "correct"
```go
	close(vars.chanStruct)

	select {
	case <-vars.chanOneClosed:
	}

	time.Sleep(time.Second)
```

### What did you see instead?

Coverage report with red marks in comments, function, and case:

![image](https://user-images.githubusercontent.com/14301945/44179094-101caf80-a0aa-11e8-832d-45980024f7d0.png)

### Note:
This is similar to https://github.com/golang/go/issues/22545 but that one is only comments.
Repository: TypeScript
Issue: Cannot use type side of a namespace in JsDoc after `declare global ...` workaround for UMD globals
Labels: Bug,Domain: JSDoc

I hit this while writing an electron app using `checkJs` where you can both `require` code in (thus making your file a module), and there may also be script tags loading code in the HTML for the app. For example, by main page has the below as it is using D3. Thus the 'd3' object is available globally.

```html
    <script src="node_modules/d3/dist/d3.js"></script>
    <script src="./app.js"></script>
```

Trying to use the global D3 in my `app.js` however results in the error `'d3' refers to a UMD global, but the current file is a module...`, so I've added the common workaround below to avoid this via a .d.ts file.

```ts
import {default as _d3} from 'd3';


declare global {
    // Make the global d3 from directly including the bundle via a script tag available as a global
    const d3: typeof _d3;
}
```

When the above .d.ts code is present (and only when), JSDoc gives an error on trying to use types from the namespace, i.e. the below code

```js
/** @type {d3.DefaultArcObject} */
var x;
```

Results in the error `Namespace '"./@types/d3/index".d3' has no exported member 'DefaultArcObject'.` Yet the below TypeScript continues to work fine:

```ts
var x: d3.DefaultArcObject;
```

The below also continues to work fine in JavaScript, but is kind of ugly and a pain to have to repeat (especially if you need to use a lot of type arguments)

```js
/** @type {import('d3').DefaultArcObject} */
var x;
```

Personally I'd rather not have to do the .d.ts workaround at all and just be able to use the `d3` global in my modules (see the highly controversial #10178). That not being the case, JsDoc should be able to access the types still with the workaround in place.
Repository: rust
Issue: Rust should embed /DEFAULTLIB linker directives in staticlibs for pc-windows-msvc
Labels: A-linkage,A-LLVM,T-compiler,O-windows-msvc

This would significantly improve the user experience as they wouldn't have to call `--print native-static-libs` to figure out what libraries they need to link to and then tell their build system to link them. Instead the linker would just know to automatically link to those libraries.

Examples of issues that wouldn't exist with this:
https://github.com/rust-lang/rust/issues/52892
Repository: TypeScript
Issue: quick fix for merge duplicate import or export declaration
Labels: Suggestion,In Discussion,Domain: Refactorings,Experience Enhancement

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.

-->

## Search Terms
quickfix, import, export
<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion

provide a quickfix for merge two(or more)  import or export declaration

<!-- A summary of what you'd like to see added or changed -->

## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->
it's useful for resolve git conflict 

## Examples
```ts
// ====
import { a, b, c } from 'mod'
// ====
import { b, d, e } from 'mod'
// ====
```

keep each other for git conflict:

```ts
import { a, b, c } from 'mod'
import { b, d, e } from 'mod'
```

<!-- Show how this would be used and what the behavior would be -->

after merge:
```ts
import { a, b, c, d, e } from 'mod'

```

## 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. new expression-level syntax)
Repository: pytorch
Issue: [Caffe2] Error C2375 when building DLL. 
Labels: caffe2

## Issue description

VS complains about `C2375` due to missing dllimport/dllexport.

```
caffe2\core\operator_schema.cc(403): error C2375: 'caffe2::operator <<': redefinition; different linkage
caffe2\core\db.cc(15): error C2375: 'caffe2::db::Caffe2DBRegistry': redefinition; different linkage
caffe2\core\blob_serialization.cc(323): error C2375: 'caffe2::BlobSerializerRegistry': redefinition; different linkage
caffe2\core\net.cc(22): error C2375: 'caffe2::NetRegistry': redefinition; different linkage
```

## System Info
- PyTorch or Caffe2: C2
- How you installed PyTorch (conda, pip, source): src
- Build command you used (if compiling from source): cmake
- OS: Win10
- PyTorch version: master
- VS version (if compiling from source): 2017
- CMake version: 3.12
Repository: vscode
Issue: Method separator 
Labels: feature-request,editor-rendering

Issue Type: <b>Feature Request</b>

Please add method separator in class and shortcut for go back to previous Edit/last edit location ... Thanks 

VS Code version: Code 1.26.0 (4e9361845dc28659923a300945f84731393e210d, 2018-08-13T16:20:44.170Z)
OS version: Darwin x64 17.7.0


<!-- generated by issue reporter -->
Repository: pytorch
Issue: [BUG]: unstable happend in saving model.
Labels: module: serialization,triaged

## Issue description

When I save my model, I met the errors.

My environment:

system: debian 8   
python: python3   
pytorch: 0.4.1

## Code 

```python
    def save_model(self, epoch):

        # for example: save_path = '~/Documents/my_model_1.pth'.
        save_path = self.model_prefix + '_' + str(epoch) + '.pth'

        # note that my net: self.net is trained on GPU.
        torch.save(self.net.state_dict(), save_path)

        self.logging.info('Saved model in {}'.format(save_path))
```

## Error

```
Traceback (most recent call last):
  File "train_network.py", line 64, in <module>
    main()
  File "train_network.py", line 60, in main
    netutil.save_model(epoch)
  File "/opt/tiger/reid/attribute_net/network.py", line 169, in save_model
    torch.save(self.net.state_dict(), save_path)
  File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 209, in save
    return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
  File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 134, in _with_file_like
    return body(f)
  File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 209, in <lambda>
    return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
  File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 288, in _save
    serialized_storages[key]._write_file(f, _should_read_directly(f))
RuntimeError: Unknown error -1
```
Repository: go
Issue: x/mobile: manual declaration of uses-sdk in AndroidManifest.xml not supported
Labels: mobile

We need to set the minSdkVersion and targetSdkVersion in the AndroidManifest.xml file. But it won't build, gomobile will exit with err:
```
manual declaration of uses-sdk in AndroidManifest.xml not supported
```
minSdkVersion and targetSdkVersion is a commonly used in Android. If not set, app market like Google Play will refused to accept the app.
Repository: three.js
Issue: GLTFExporter: Normal Texture handedness
Labels: Needs Investigation


GLTF Loader: Fix for handedness in Normal Texture:
https://github.com/mrdoob/three.js/pull/11825

https://github.com/KhronosGroup/glTF/issues/952

https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/GLTFLoader.js#L2204
material.normalScale.y = - material.normalScale.y;

Given that the loader needs to adjust this, should the exporter be adjusting this as well?

Please do correct me if I'm wrong, but the current code does not seem to account for this.

			if ( material.normalMap ) {

				gltfMaterial.normalTexture = {

					index: processTexture( material.normalMap )

				};

				if ( material.normalScale.x !== - 1 ) {

					if ( material.normalScale.x !== material.normalScale.y ) {

						console.warn( 'THREE.GLTFExporter: Normal scale components are different, ignoring Y and exporting X.' );

					}

					gltfMaterial.normalTexture.scale = material.normalScale.x;

				}

			}

##### Three.js version

- [x ] Dev
- [ ] r95
- [ ] ...

##### Browser

- [x] All of them
- [ ] Chrome
- [ ] Firefox
- [ ] Internet Explorer

##### OS

- [x] All of them
- [ ] Windows
- [ ] macOS
- [ ] Linux
- [ ] Android
- [ ] iOS

##### Hardware Requirements (graphics card, VR Device, ...)
Repository: opencv
Issue: Run the official face-detection sample and find the problem
Labels: incomplete

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

Please:

* Read the documentation to test with the latest developer build.
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
* Try to be as detailed as possible in your report.
* Report only one problem per created issue.


This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.4
- Operating System / Platform => Android
- Compiler => cmake
-->

- OpenCV => 3.4
- Operating System / Platform => Android
- Compiler => cmake

##### Detailed description

<!-- your description -->
Run the official face-detection sample and find that the value detected by the face is incorrect. It is clear that the current screen has no face, but the detected rectangular frame is still displayed.
##### Steps to reproduce
code segment

     mJavaDetector.detectMultiScale(mGray, faces, 1.1, 2, 2, // TODO: objdetect.CV_HAAR_SCALE_IMAGE
                        new Size(mAbsoluteFaceSize, mAbsoluteFaceSize), new Size());
      Rect[] facesArray = faces.toArray();
        for (int i = 0; i < facesArray.length; i++)
            Imgproc.rectangle(mRgba, facesArray[i].tl(), facesArray[i].br(), FACE_RECT_COLOR, 3);
<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->
Repository: opencv
Issue: Unable to open video stream
Labels: wontfix,category: videoio

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

Please:

* Read the documentation to test with the latest developer build.
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
* Try to be as detailed as possible in your report.
* Report only one problem per created issue.


This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example

-->

- OpenCV => 3.4.1
- Operating System / Platform => Ubuntu 16.04 arm64
- Compiler => gcc

##### Detailed description

Not able to open video stream using function cvCaptureFromCAM() in C language.
Gets following error:
```
[ WARN:0] cvCreateFileCaptureWithPreference: backend FFMPEG doesn't support legacy API anymore.
NvMMLiteOpen : Block : BlockType = 261 
TVMR: NvMMLiteTVMRDecBlockOpen: 7907: NvMMLiteBlockOpen 
NvMMLiteBlockCreate : Block : BlockType = 261 
TVMR: cbBeginSequence: 1223: BeginSequence  1280x720, bVPR = 0
TVMR: LowCorner Frequency = 100000 
TVMR: cbBeginSequence: 1622: DecodeBuffers = 5, pnvsi->eCodec = 4, codec = 0 
TVMR: cbBeginSequence: 1693: Display Resolution : (1280x720) 
TVMR: cbBeginSequence: 1694: Display Aspect Ratio : (1280x720) 
TVMR: cbBeginSequence: 1762: ColorFormat : 5 
TVMR: cbBeginSequence:1776 ColorSpace = NvColorSpace_YCbCr601
TVMR: cbBeginSequence: 1904: SurfaceLayout = 3
TVMR: cbBeginSequence: 2005: NumOfSurfaces = 12, InteraceStream = 0, InterlaceEnabled = 0, bSecure = 0, MVC = 0 Semiplanar = 1, bReinit = 1, BitDepthForSurface = 8 LumaBitDepth = 8, ChromaBitDepth = 8, ChromaFormat = 5
TVMR: cbBeginSequence: 2007: BeginSequence  ColorPrimaries = 2, TransferCharacteristics = 2, MatrixCoefficients = 2
Allocating new output: 1280x720 (x 12), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3464: Send OMX_EventPortSettingsChanged : nFrameWidth = 1280, nFrameHeight = 720 

GStreamer-CRITICAL **: gst_query_set_position: assertion 'format == g_value_get_enum (gst_structure_id_get_value (s, GST_QUARK (FORMAT)))' failed
[ WARN:0] cvCreateFileCaptureWithPreference: backend GSTREAMER doesn't support legacy API anymore.
TVMR: TVMRFrameStatusReporting: 6369: Closing TVMR Frame Status Thread -------------
TVMR: TVMRVPRFloorSizeSettingThread: 6179: Closing TVMRVPRFloorSizeSettingThread -------------
TVMR: TVMRFrameDelivery: 6219: Closing TVMR Frame Delivery Thread -------------
TVMR: NvMMLiteTVMRDecBlockClose: 8105: Done 
Failed to query video capabilities: Inappropriate ioctl for device
libv4l2: error getting capabilities: Inappropriate ioctl for device
VIDEOIO ERROR: V4L: device test.mp4: Unable to query number of channels
Couldn't connect to webcam.
: Bad file descriptor
Opened the streamAborted (core dumped)
```
Repository: go
Issue: x/tools/present: fix rendering on mobile
Labels: help wanted,NeedsFix,Tools

Trying to follow a presentation on a mobile device is currently very difficult. Some of the issues include:

* Scrolling left or right sometimes doesn't move one slide; rather, it scrolls through the visible horizontal slides
* The screens tend to be tall, meaning that the text is too small by default.
* Trying to zoom in our out easily breaks the UI; one can end up with slides that are cut off.

Below is a screenshot I took after zooming in and out on a presentation of mine.

<img src="https://user-images.githubusercontent.com/3576549/44208641-de165680-a158-11e8-9a73-ce07db61b9f1.png" width="300">

My HTML/JS skills are limited, so I don't know if this would be a major rework for mobile, or just some tweaking to have it behave better on small/tall screens.
Repository: vue-element-admin
Issue: Is there any ways to set up a new small admin with another backend framwrok
Labels: enhancement :star:

So I use laravel node and nuxt js with node. I want to use this admin as an  independent  library to fit into other projects. How can I easily separate the components, all styles and use in any other project?
Repository: go
Issue: encoding/json, encoding/xml: update documentation to use embedded fields instead of anonymous fields.
Labels: Documentation,help wanted,NeedsFix

This is a documentation issue.

The [json.Marshal documentation](https://tip.golang.org/pkg/encoding/json/#Marshal) refers to "anonymous struct fields," which the spec has been calling "embedded" struct fields since f8b4123613a2cb0c453726033a03a1968205ccae. This is confusing to readers who want to know how embedded struct fields are marshaled and aren't aware of the historic terminology.

Searching the codebase for "anonymous struct" suggests that the encoding/xml godoc has the same issue.
Repository: TypeScript
Issue: Prototype assignment of constructor nested inside a class confuses type resolution
Labels: Bug

From chrome-devtools-frontend, in ui/ListWidget.js:

```js
var UI = {}
UI.ListWidget = class { };

UI.ListWidget.Delegate = function() {};
UI.ListWidget.Delegate.prototype = {
  renderItem() {},
};

/** @type {UI.ListWidget} */
var l = new UI.ListWidget();
```

**Expected behavior:**

The type of `l` is the same as `new UI.ListWidget()` &mdash; `UI.ListWidget`.

**Actual behavior:**
It's `{ renderItem() {} } & { renderItem() {} }` -- the structural type of UI.ListWidget.Delegate, duplicated. This also causes an assignability error from `new UI.ListWidget()`.

Note that this has been broken for some time; it's not a 3.1 regression.
Repository: vscode
Issue: Allow extensions to be installed for all users
Labels: feature-request,extensions

I'm the instructor a college Python programming course. I'd love to adopt VS Code for this course, but the fact that extensions are installed on a per-user basis is a major problem. For education and enterprise markets, there needs to be support for pre-installing extensions for all users.

It's important that we be able to provide a ready-to-use environment to students on login. I have 50 students in my class. I can't afford to lose class time to making students install the Python extension each time they use a new computer or to help troubleshooting students when they have problems.

I've put together a very hackish workaround where I've created a batch file that installs the plugin and then launches VS Code. I've added shortcuts to this batch file, but it's messy and I fear brittle.

Please add a flag to code --install-extension that allows users to specify the extension is to be installed for all users.

FWIW, @rhyspaterson mentioned needing this same functionality in a comment on Issue #27972.