sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Flutter Text widgets should have multiple wrapping modes
Labels: c: new feature,engine,a: typography,P2,team-engine,triaged-engine

See issue #24399

The Unicode spec (http://unicode.org/reports/tr14/#QU) describes a line wrapping method that attempts to accommodate the broadest language requirements possible; however, the wrapping at times makes no sense for English punctuation. For example, the Unicode standard specifies that a single whitespace character following a quotation mark and preceding another punctuation mark should be treated as "non-breaking." This particular method might make sense in many languages, but in English academic papers, where citations in parentheses often follow quotation marks, this line-breaking method is unacceptable.

Flutter currently follows the Unicode spec as it should. However, I contend that Flutter should implement a second wrapping method in addition to the Unicode specification for the following reasons.

A suggested workaround is to add an additional "zero width space" after each quotation mark that precedes another punctuation mark. This would work, but for any English app that pulls text from a web API and displays it in a text-wrapping widget, the developer cannot guarantee that such additional whitespace exists and therefore must run all text through a potentially expensive search and replace operation (depending on the length of text involved).

Furthermore, text wrapping is already a fairly expensive operation, and honoring all the edge cases of the Unicode spec, though certainly desirable for a global platform such as Flutter, makes an already expensive operation even moreso.

Finally, at least regarding the aforementioned wrapping behavior, the Chrome browser does not strictly follow the Unicode spec. As a result, developers who come from the web world will be unaware of this strict adherence to the Unicode standard and will be surprised by the Flutter method of line wrapping.

As proof of my point, the Github textbox in which I am currently writing does not honor the Unicode spec:

"This is a quote terminating in a long word followed by a parenthetical comment incididunteisumod" (Parenthetical comment is here)

On my browser (Chrome) supporting UTF-8, the Unicode wrapping spec is not honored, and the line breaks after the quotation mark in both the text edit box and also on the screen.

Therefore, I am not proposing that Flutter violate or ignore the Unicode standard. But, I am proposing that Flutter Text Widgets support at least two wrapping methods: a "strict" method and a "loose" method. The strict method would follow the Unicode spec exactly, while the loose method would wrap on any whitespace. Loose wrapping would work for the majority of cases, would replicate default browser wrapping, and would be faster to render while strict wrapping would exist for any developer who needs to hold to the Unicode spec.
Repository: flutter
Issue: Reset CupertionTimerPicker duration
Labels: c: new feature,framework,f: date/time picker,f: cupertino,P2,team-design,triaged-design

I would like to reset current duration in CupertionTimerPicker by clicking on a button, but it seems that there is no way to do that.
Are you going to add this possibility or is there any workaround?
Repository: flutter
Issue: [google_maps_flutter] Cannot set map bounds (cameraTargetBounds).
Labels: customer: crowd,p: maps,package,team-ecosystem,has reproducible steps,P2,found in release: 2.0,found in release: 2.2,triaged-ecosystem

Setting the map by providing bounds does not work. It is always zoomed out.
It should automatically adjust zoom according to the map bounds.
Currently, in the code, the bounds are set to new york.
![map](https://user-images.githubusercontent.com/14096113/49902698-ada6a680-fe32-11e8-819f-420405e20818.png)

### Code
```dart
@override
  Widget build(BuildContext context) {
    return GoogleMap(
        onMapCreated: _onMapCreated,
        options: GoogleMapOptions(
          cameraTargetBounds: new CameraTargetBounds(new LatLngBounds(
              northeast: LatLng(40.73215972821489, -73.980936957489),
              southwest: LatLng(40.7152797683329, -74.01919598687743)
            )
          ),
          zoomGesturesEnabled: true,
          mapType: MapType.normal,
          trackCameraPosition: true,
        ));
  }
```

### Flutter Doctor
```
[✓] Flutter (Channel beta, v1.0.0, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] Android Studio (version 3.2)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2018.2)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.29.1)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.
```
Repository: go
Issue: cmd/doc: show which version of Go introduced symbols 
Labels: help wanted,NeedsFix

#5778 introduced this feature in x/tools/cmd/godoc, but it is missing in cmd/doc, which replaces the godoc command line mode.

/cc @dmitshur
Repository: pytorch
Issue: Update third_party/googletest - Ability to skip tests in GTEST
Labels: module: tests,triaged,module: third_party

At the moment, all test skipping in open source in gtest is done as some variation of:

```
  if (skipCondition) return;
```

This is bad, because it means we report skipped tests as "passed". This makes it harder to tell if a test ran or not.

Inside fbcode, we have the convention that:

```
GTEST_FATAL_FAILURE_("Test skipped by client")
```

is not a real fatal failure, but instead means that the test is skipped. But this is just a convention; the TestPilot runner is responsible for reinterpreting this to mean skip, and simply doing this in fbcode would not work.

Newer versions of gtest support skipping but we cannot easily upgrade the version of gtest used in fbcode.

cc @mruberry @VitalyFedyunin @walterddr
Repository: pytorch
Issue: Use std::variant to represent C++ side enumerations (with binding support)
Labels: module: cpp,triaged

Today, we have an awkward problem in PyTorch, where we have no good way of representing enumerations. At the Python level, we prefer to represent enumeration options as strings (as they are convenient to type, and Python has no typing guarantees anyway.  However, in C++, it is not that great to represent enumerations as strings, because (1) they are not well-typed (you can easily mash in a string for an invalid option in a function) and (2) they require a O(n) in size of string equality test, which is totally pointless and unnecessary. The compromise we have right now is most enumerations are represented as ints in the C++ API, which is not good user experience. We don't really want to create a separate enum type for every function in C++ either, because you end up with an enum per function.

We can solve the API design problem in C++ using std::variant. std::variant is a C++17 class (with polyfills for C++11 available) that represents a type-safe union between different types. So, instead of defining an `enum class` for any given enum we need, we instead define the enum on the fly with std::variant with from a vocabulary of pre-defined "keywords".

So, for example, consider the following two functions which take enumerations:

* MSELoss argument 'reduction' takes 'none' | 'mean' | 'sum'
* KLDivLoss argument 'reduction' takes ‘none’ | ‘batchmean’ | ‘sum’ | ‘mean’

Both of these enumerations are quite similar, but because KLDivLoss also supports batchmean, an ordinary approach using 'enum class' would require two separate enums. With std::variant, we define this way:

```
namespace enum {
  struct None {}
  struct Mean {}
  struct Sum {}
  struct BatchMean {}
}
enum::None kNone;
enum::Mean kMean;
enum::Sum kSum;
enum::BatchMean kBatchMean;

Tensor MSELoss(std::variant<enum::None, enum::Mean, enum::Sum> reduction, ...);
Tensor KLDivLoss(std::variant<enum::None, enum::Mean, enum::Sum, enum::BatchMean> reduction, ...)

// Invoke as:
MSELoss(/*reduction=*/ kNone)
```

CC @tugrulates @gchanan @zou3519 @goldsborough 

cc @yf225
Repository: TypeScript
Issue: allow wildcards in getSupportedCodeFixes
Labels: Suggestion,In Discussion,API

I'm developing a LanguageService Plugin for a linter that creates fixable Diagnostics. Unfortunately I don't know the codes and if they are fixable before they actually occur.

AFAICT VSCode handles the case where a Diagnostic's code is supposed to be fixable and `getCodeFixes` returns no fix.

I'm proposing some kind of wildcard matching or a way to specify that all Diagnostics with a matching `Diagnostic.source` are considered fixable.
Repository: TypeScript
Issue: --noImplicitAny codefixes infer anonymous object types despite appropriate interfaces in (or out of) scope
Labels: Suggestion,Awaiting More Feedback

**TypeScript Version:**  3.3.0-dev.20181212

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** noimplicitany infer code fix codefix quick suggested

**Code**

```ts
interface IBox {
    x: number;
    y: number;
}

const shiftBox = (box) => {
    box.x += 1;
    box.y += 1;
}

const box = {
    x: 0,
    y: 0,
};

shiftBox(box);
```

**Expected behavior:**

`--noImplicitAny` suggested fix on the `box` parameter:

```typescript
const shiftBox = (box: IBox) =>
```

**Actual behavior:**

```typescript
const shiftBox = (box: { x: any; y: any; }) => {
```

**Related Issues:** #13243 _(parent tracking quick fixes)_ and #15114 _(discussion on inference difficulties)_

If there is an interface available that can satisfy an inferred type in a `--noImplicitAny` code fix, can we use that? Perhaps with an ordering of possibilities like:

1. Interfaces already available in the file, by how small they are
2. User-defined interfaces that could be imported, by how distant the file is
3. Module types already imported in a user file, by how distant the nearest import is

...where, if multiple interfaces could satisfy the best possibility of those three, we choose the one with the fewest fields?

In code bases that don't explicitly type when unnecessary (e.g. `: IBox` for variables), I'm finding the `--noImplicitAny` fixes to be a bit useless for anything other than primitives.
Repository: TypeScript
Issue: Warn when JSDoc type cast misses parentheses
Labels: Suggestion,In Discussion,Domain: JSDoc

<!-- 🚨 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

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->jsdoc. type cast

## Suggestion

<!-- A summary of what you'd like to see added or changed -->
JSDoc type cast currently requires parentheses for technical reasons (#18212), but it does not warn when they don't exist.

## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

```js
// This doesn't work, the JSDoc comment is silently ignored
// A warning message will help.
const img = /** @type {HTMLImageElement} */ document.getElementById('#cat')
img.src = 'cat.gif'
```

## Examples

<!-- Show how this would be used and what the behavior would be -->

```js
const img = /** @type {HTMLImageElement} */ document.getElementById('#cat')
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            ^ Warning: The JSDoc type cast misses parentheses and is being ignored
img.src = 'cat.gif'
```

## 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: TypeScript
Issue: Low readability when type casting by JSDoc
Labels: Suggestion,In Discussion,Domain: JSDoc

<!-- 🚨 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

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->jsdoc, type cast

## Suggestion

Currently type casting by JSDoc is not pretty 1) because the comment must be after variable declaration 2) it requires parentheses (#18212).

```js
// @ts-check
const img = /** @type {HTMLImageElement} */ (document.getElementById('#cat'))
img.src = 'cat.gif'
```

How about the JSDoc type declaration automatically casts the assigned type, only when the variable declaration has the value assigning part?



## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->
The code will be prettier: https://github.com/w3c/respec/pull/1949#discussion_r240971984

## Examples

<!-- Show how this would be used and what the behavior would be -->
Current:

```js
// @ts-check

/** @type {HTMLImageElement} */
const img = document.getElementById('#cat') // Error: Type 'Element' is not assignable to type 'HTMLImageElement'
img.src = 'cat.gif'
```

Suggestion:

```js
// @ts-check

/** @type {HTMLImageElement} */
const img = document.getElementById('#cat') // Element being casted as HTMLImageElement
img.src = 'cat.gif'

/** @type {HTMLImageElement} */
let img2;
img2 = document.getElementById('#cat') // Still an error
```

## 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: rust
Issue: Vec::append should swap if the lhs is empty
Labels: I-slow,T-libs-api

Here's a reasonable pattern:

```
let mut results = Vec::new();
for ... {
  results.append(new_results);
}
```

On the first append, we can just swap ourselves with the rhs, avoiding an allocation and copy. This is annoying for our users to remember to do, and is basically free to support given how much work this method otherwise does.

It should perhaps only be done if lhs.capacity is 0, just because we don't want to mess up a user who has preallocated a nice big buffer. Maybe lhs.capacity < rhs.capacity?
Repository: go
Issue: testing: t.FailNow() in a deferred function masks test panic
Labels: NeedsInvestigation

When a test panics, any deferred functions will still process allowing the test to properly clean up. If a deferred function executes `t.FailNow()` the test output will not include any information on the panic or the panic's goroutine trace. 

An example is shown here: https://play.golang.org/p/gWPDVluKaST
Despite that test clearly panicking with a `t.FailNow()` in the deferred function the test output only shows: 
```
--- FAIL: TestPanic (0.00s)
FAIL
```

The desired behavior would be along the lines of this example: https://play.golang.org/p/qrLtmYnkqAh. (Where the deferred function calls `runtime.Goexit()` instead) This produces the following output:
```
--- FAIL: TestPanic (0.00s)
panic: Test Panic
	panic: test executed panic(nil) or runtime.Goexit

goroutine 5 [running]:
testing.tRunner.func1(0x4560b0, 0xf)
	/usr/local/go/src/testing/testing.go:792 +0x460
runtime.Goexit()
	/usr/local/go/src/runtime/panic.go:397 +0x140
main.TestPanic.func1()
	/tmp/sandbox284554843/main.go:18 +0x20
panic(0x121940, 0x165a58)
	/usr/local/go/src/runtime/panic.go:513 +0x240
main.TestPanic(0x4560b0, 0xbab699fc)
	/tmp/sandbox284554843/main.go:20 +0x60
testing.tRunner(0x4560b0, 0x1558f8)
	/usr/local/go/src/testing/testing.go:827 +0x140
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:878 +0x3c0
```

I believe this is the result of this line: https://github.com/golang/go/blob/bbae8d55083d14c414f32af638d5a5174b8027cc/src/testing/testing.go#L813

`!t.finished` will return false because `t.Now()` marks the test finished and err will be nil because the `runtime.Goexit()` in `t.FatalNow()` is what is being recovered (not the original panic). 

This prevents the expected panic on this line: https://github.com/golang/go/blob/bbae8d55083d14c414f32af638d5a5174b8027cc/src/testing/testing.go#L827
Repository: vscode
Issue: Eager evaluation feature like Chrome debugger
Labels: feature-request,debug

<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
One amazing feature provided chrome debugger, is eager evaluation, see this for more details: https://developers.google.com/web/updates/2018/05/devtools#eagerevaluation

I am not sure if it is easy to support, but it is the main feature I missed from Chrome debugger
Repository: go
Issue: testing: Logf not reported outside of inner benchmark run
Labels: NeedsInvestigation

Applying the following patch illustrates the problem:

```Diff
diff --git a/src/go/format/benchmark_test.go b/src/go/format/benchmark_test.go
index 7bd45c0e95..62131e0977 100644
--- a/src/go/format/benchmark_test.go
+++ b/src/go/format/benchmark_test.go
@@ -58,6 +58,7 @@ var tests = []struct {
 }
 
 func BenchmarkFormat(b *testing.B) {
+       b.Logf("foo") // <<< not reported
        var src bytes.Buffer
        for _, t := range tests {
                src.Reset()
@@ -74,6 +75,7 @@ func BenchmarkFormat(b *testing.B) {
                }
 
                b.Run(fmt.Sprintf("%s-%d", t.name, t.n), func(b *testing.B) {
+                       b.Logf("foo") // <<< reported
                        b.SetBytes(int64(len(data)))
                        b.ReportAllocs()
                        b.ResetTimer()
```

When running this benchmark, the outer b.Logf call doesn't get reported in the output.

I expected to see both.
Repository: pytorch
Issue: Maybe a bug when using DataParallel
Labels: triaged,module: data parallel

## 🐛 Bug

There is (maybe) a bug when using DataParallel which will lead to exception.

If the sample count is not divisible by batch_size, the last batch (sample count is less than batch_size) will have some interesting behaviours.

For example,

If I have 4 GPUs and the batch_size is 32. 
When the input data in the shape of (32, x, y), after the `DataParallel.scatter`, the inputs will be splited into [(4, x, y), (4, x, y), (4, x, y), (4, x, y)].

If the dim of input data is (10, x, y), the `DataParallel.scatter` will generates [(3, x, y), (3, x, y), (3, x, y), (1, x, y)]

But when I input a (9, x, y) data, the `DataParallel.scatter` will gives me [(3, x, y), (3, x, y), (3, x, y)]. Only the first 3 GPUs will have valid data as input. The last GPU will not get input, which leads to exception `TypeError: forward() missing 1 required positional argument:`

However, when I input a (4, x, y) data, the `DataParallel.scatter` will split the data into [(1, x, y), (1, x, y), (1, x, y), (1, x, y)].

I think the data distribution for each GPU is `ceil(batch_size/gpu_count)` and then dispatcher data to each GPUs one by one. After data scattered to first `x` GPUs, the last `gpu_count-x` GPU will have no input data.

Is this a bug or a special design?

## Expected behavior

for 4 GPUs and batch_size=32

real input data  |                  data scattered to 4 GPUs          
(32, x, y) ---scatter---> [(4, x, y), (4, x, y), (4, x, y), (4, x, y)]
(10, x, y) ---scatter---> [(3, x, y), (3, x, y), (2, x, y), (2, x, y)]
(9, x, y)   ---scatter---> [(3, x, y), (2, x, y), (2, x, y), (2, x, y)]
(4, x, y)   ---scatter---> [(1, x, y), (1, x, y), (1, x, y), (1, x, y)]


## Environment

 - PyTorch Version (e.g., 1.0): 1.0
 - OS (e.g., Linux): Ubunto
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Build command you used (if compiling from source):
 - Python version: 3.7
 - CUDA/cuDNN version: 9.2
 - GPU models and configuration: Tesla V100
 - Any other relevant information:
Repository: godot
Issue: Strange script editor "jumps" when scrolling after changing position and size of editor
Labels: enhancement,topic:editor

**Godot version:**
3.1 c7cef29


**OS/device including version:**
Windows 10

**Issue description:**
When I place window at left side of monitor and I scroll page then everything works smoothly, but when I change editor position(and/or its size), then scrolling, even very little, cause that script editor jumps strange.

**Steps to reproduce:**
![jfile](https://user-images.githubusercontent.com/41945903/70704463-53a12100-1cd2-11ea-93fb-1f02c144ab57.gif)
Repository: vscode
Issue: Antimalware Service Executable is still spiking when  some project is loaded 
Labels: bug,upstream,search,confirmed

Problem still alive -> #63070 
When Im opening a some project under the git, Antimalvaware still spiking :( http://files.rjwebdesign.cz/i2/20181213-115016.png

And yes, i updated yesterday  release (1.30)

@roblourens
Repository: rust
Issue: Implement AsRawFd and FromRawFd for ReadDir
Labels: T-libs-api,C-feature-request

Most unixes provide `dirfd()`, which can be used to get a file descriptor from `struct DIR *`.

The two errors are `EINVAL` (`dirfd` called on invalid pointer), which can't occur in correct code, and `ENOTSUP` (not supported by implementation), which doesn't occur on most implementations.

Most unixes also provide `fdopendir()`, which opens a file descriptor as `struct DIR *`. It fails if the file descriptor is invalid or if it fails to allocate memory.