id
int64 393k
2.82B
| repo
stringclasses 68
values | title
stringlengths 1
936
| body
stringlengths 0
256k
⌀ | labels
stringlengths 2
508
| priority
stringclasses 3
values | severity
stringclasses 3
values |
---|---|---|---|---|---|---|
447,946,431 | three.js | THREE.FBXLoader: 3dsMax|maps|texmap_diffuse map is not supported in three.js, skipping texture | ##### Description of the problem
When attempting to load the FBX file contained within the example below, we are seeing the following error:
`
THREE.FBXLoader: 3dsMax|maps|texmap_diffuse map is not supported in three.js, skipping texture
`
`THREE.FBXLoader: unknown material type "unknown". Defaulting to MeshPhongMaterial`
Causing Mapping Failure。
##### Three.js version
- [ ] Dev
- [x] r105
- [ ] ...
##### Browser
- [ ] All of them
- [x] Chrome
- [ ] Firefox
- [ ] Internet Explorer
##### OS
- [ ] All of them
- [ ] Windows
- [x] macOS
- [ ] Linux
- [ ] Android
- [ ] iOS
##### Hardware Requirements (graphics card, VR Device, ...)
| Loaders | low | Critical |
447,962,276 | go | cmd/pprof: proportionally account CPU time spent in GC to the allocating frames | When troubleshooting CPU usage of production services it would be useful to have an **_option_**, at least in the flamegraph/dot visualization, to proportionally assign the CPU time spent in GC to the frames that cause heap allocations.
Currently the way I do is take both CPU and memory allocation profiles, and then "mentally account" proportional GC CPU time based on which frames are actually causing allocations.
If pprof were to offer this option, such a proportional assignment would not have to be extremely precise: for my purposes, it would be OK even if it was based on an estimation of the amount of memory that is allocated.
Similarly, it would not be required to show how time is spent *inside* the runtime when this option is enabled. The rationale for this is that when I'm tracking down excessive GC CPU usage, I normally don't expect to be hitting a GC bug, but rather excessive allocations in my code. Also, I guess, it would make the implementation of this option much easier.
The way I imagine this could work in the flamegraph would be by having an additional "virtual" single-level stack frame as a child of each one of the frames that are performing heap allocations; the virtual stack frame would be called something like "GC (estimated)". In the graphviz output there would be a single virtual GC node, with its CPU time proportionally assigned to the incoming edges coming from frames that allocate.
I don't have strong opinions about whether GC assist time (if any) should be included in the virtual GC stack-frame, or kept separate. | NeedsInvestigation,FeatureRequest,compiler/runtime | low | Critical |
447,965,864 | go | cmd/pprof: account CPU and allocations of goroutines to the frame where they are created | When troubleshooting CPU usage of production services it would be useful to have an **_option_**, at least in the flamegraph visualization, to account the CPU time and memory allocations of a goroutine to the frame that created the goroutine.
Currently, the way I do this is take a CPU or memory profile, and then go through the code to reconstruct where goroutines were created, so that I can then proceed to identify the full stacktrace that lead to excessive CPU or memory usage.
The way I imagine this could work in the flamegraph would be by considering stack traces to include not just the the stack of the goroutine, but also the transitive stacks of the goroutines that created the current goroutine (up to a maximum limit that - if reached - would cause the option to be disabled).
Currently AFAIK this would be hard to do as described as we only record the PC of where the goroutine is created. I am not knowledgeable enough to know if there are some other ways to do (now, or in the future) what I described above; if such a way existed it would make profiling much more effective and easier to use when dealing with large codebases that are `go`-happy. | NeedsInvestigation,FeatureRequest,compiler/runtime | low | Major |
447,986,368 | terminal | adjust associative containers to support heterogeneous lookup | [Heterogeneous lookup](https://en.wikipedia.org/wiki/C%2B%2B14#Heterogeneous_lookup_in_associative_containers) has been supported since C++14. To quote the linked article,
>C++14 allows the lookup to be done via an arbitrary type, so long as the comparison operator can compare that type with the actual key type. This would allow a map from `std::string` to some value to compare against a `const char*` or any other type for which an `operator<` overload is available. It is also useful for indexing composite objects in a `std::set` by the value of a single member without forcing the user of `find` to create a dummy object (for example creating an entire `struct Person` to find a person by name).
Now, it's _magic_ in that you enable it by specifying `std::less<>` as the third template argument to an associative container; that is:
```c++
std::map<std::string, std::string > map1;
std::map<std::string, std::string, std::less<>> map2;
```
`map2` supports heterogeneous lookup, whereas `map1` does not. | Help Wanted,Product-Terminal,Issue-Task,Area-CodeHealth | low | Minor |
448,061,446 | TypeScript | Type logical operators "and", "or" and "not" in extends clauses for mapped types | ## Search Terms
Pretty much the ones in the title...
## Suggestion
I would like the ability to use logical operators for types.
I am aware that [`not` is already planned as a feature](https://github.com/Microsoft/TypeScript/pull/29317), but I would like to make sure that this gets further extended to other logical operators, and I couldn't find any hints that this is in your minds already.
## Use Cases
Type composition, better readability...
## Examples
Current tricks to get to the desired behavior:
```ts
type Not<T extends boolean> = T extends true ? false : true
type Or<A extends boolean, B extends boolean> = A extends true
? true
: B extends true
? true
: false
type Or3<A extends boolean, B extends boolean, C extends boolean> = Or<A, Or<B, C>>
type And<A extends boolean, B extends boolean> = A extends true
? B extends true
? true
: false
: false
```
A few arbitrary use cases:
```ts
type Primitive = boolean | number | string | symbol | null | undefined | void
type IsA<T, E> = T extends E ? true : false
type IsIndexSignature<P> = Or<IsA<string, P>, IsA<number, P>>
type IsCallback<F extends Function> = F extends (...args: any[]) => any
? And<Not<IsA<Parameters<F>[0], Primitive>>, IsA<Parameters<F>[0], Event>> extends true
? true
: false
: false
```
All together in the Playground: [here](https://www.typescriptlang.org/play/#src=type%20Not<T%20extends%20boolean>%20%3D%20T%20extends%20true%20%3F%20false%20%3A%20true%0D%0A%0D%0Atype%20Or<A%20extends%20boolean%2C%20B%20extends%20boolean>%20%3D%20A%20extends%20true%0D%0A%20%20%20%20%3F%20true%0D%0A%20%20%20%20%3A%20B%20extends%20true%0D%0A%20%20%20%20%20%20%20%20%3F%20true%0D%0A%20%20%20%20%20%20%20%20%3A%20false%0D%0A%0D%0Atype%20Or3<A%20extends%20boolean%2C%20B%20extends%20boolean%2C%20C%20extends%20boolean>%20%3D%20Or<A%2C%20Or<B%2C%20C>>%0D%0A%0D%0Atype%20And<A%20extends%20boolean%2C%20B%20extends%20boolean>%20%3D%20A%20extends%20true%0D%0A%20%20%20%20%3F%20B%20extends%20true%0D%0A%20%20%20%20%20%20%20%20%3F%20true%0D%0A%20%20%20%20%20%20%20%20%3A%20false%0D%0A%20%20%20%20%3A%20false%0D%0A%0D%0Atype%20Primitive%20%3D%20boolean%20%7C%20number%20%7C%20string%20%7C%20symbol%20%7C%20null%20%7C%20undefined%20%7C%20void%0D%0Atype%20IsA<T%2C%20E>%20%3D%20T%20extends%20E%20%3F%20true%20%3A%20false%0D%0A%0D%0Atype%20IsIndexSignature<P>%20%3D%20Or<IsA<string%2C%20P>%2C%20IsA<number%2C%20P>>%0D%0A%0D%0Atype%20IsCallback<F%20extends%20Function>%20%3D%20F%20extends%20(...args%3A%20any%5B%5D)%20%3D>%20any%0D%0A%20%20%20%20%3F%20And<Not<IsA<Parameters<F>%5B0%5D%2C%20Primitive>>%2C%20IsA<Parameters<F>%5B0%5D%2C%20Event>>%20extends%20true%0D%0A%20%20%20%20%20%20%20%20%3F%20true%0D%0A%20%20%20%20%20%20%20%20%3A%20false%0D%0A%20%20%20%20%3A%20false%0D%0A)
Desired syntactic sugar to write the same:
```ts
type IsIndexSignature<P> = IsA<string, P> or IsA<number, P>
type IsCallback<F extends Function> = F extends (...args: any[]) => any
? not IsA<Parameters<F>[0], Primitive> and IsA<Parameters<F>[0], Event> extends true
? true
: false
: false
```
It would make the most sense to accompany this with better support for boolean checks in type definitions. That is, to allow to use the ternary operator directly without the constant need for `extends true` everywhere. Possibly, a new sort of "boolean type declaration" could be introduced, as to avoid having to propagate the boolean value all the way. For example, it should be possible to define [KnownKeys](https://stackoverflow.com/questions/51465182/typescript-remove-index-signature-using-mapped-types) (not full implementation here) like this:
```ts
type KnownKeys<T> = {
[P in keyof T]: IsIndexSignature<P> ? never : T[P]
}
```
Without the need to do:
```ts
type KnownKeys<T> = {
[P in keyof T]: IsIndexSignature<P> extends true ? never : T[P]
}
```
## 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).
| Suggestion,Awaiting More Feedback | low | Major |
448,066,871 | angular | ngmodelOptions.updateon: 'blur' and input onblur event updating model value only for the first time | I have a textbox which has ngModel, ngModelOptions(updateOn: 'blur') and it has onblur event handler. Now i am validating input value on blur event callback and if the value is less than 100 i will show error message and i will empty the text box value.
Issue: If I enter the value lessthan 100 then the textbox value is clearing properly only for the first time. From second time onwards the value is not emptied.
for example: enter 12 in input box and blur the input box we are getting the error message and it is lessthan 100 so value is set to empty(""). Now, i remove the 12 in input box and entered 55 this time the error message is showing up but the value is not clearing. It is showing the previous value.
Note: I tried to trigger angular change detection(detechChanges()) on blur event(after setting value to empty) even though the value is not clearing second time onwards.
can you please have a look at the stackblitz link(https://stackblitz.com/edit/angular-oyzcf8?file=src/app/app.component.ts) and let me know if there is anything I am missing here. Thanks | type: bug/fix,freq3: high,area: forms,state: confirmed,forms: ngModel,P3 | low | Critical |
448,071,515 | TypeScript | Allow identifying readonly properties in mapped types | ## Search Terms
Pretty much the ones in the title...
## Suggestion
Any TypeScript modifier should be allowed to be easily identified in mapped types. In particular, `readonly` should, but possibly others too, such as `?`.
## Use Cases
Define mapped types where the values depend on whether the property is readonly or not. At the moment, the following madness is necessary for this:
```ts
type Or<A extends boolean, B extends boolean> = A extends true
? true
: B extends true
? true
: false
type Equals<X, Y> =
(<T> () => T extends X ? 1 : 2) extends
(<T> () => T extends Y ? 1 : 2)
? true
: false
type IsReadonly<O extends Record<any, any>, P extends keyof O> =
Not<Equals<{[_ in P]: O[P]}, {-readonly [_ in P]: O[P]}>>
```
I would like to see some syntactic sugar similar to (not intended to be a full implementation):
```ts
type Writable<T> = {
[P in keyof T]: isreadonly T[P] ? never : T[P]
}
```
In my case, I would like to define a hyperscript-style function which accepts a series of attributes for the creation of HTML elements. For this, I reuse the interfaces that TypeScript defines, such as `HTMLAnchorElement`, but obviously readonly properties (among others) need to be excluded.
Other people seem to have similar use cases, e.g. https://stackoverflow.com/questions/52443276/how-to-exclude-getter-only-properties-from-type-in-typescript
## 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). | Suggestion,Awaiting More Feedback | low | Major |
448,083,406 | rust | Some tests fail when built with debuginfo | Discovered while working on https://github.com/rust-lang/rust/pull/60568.
The lists of failing tests are below, testing was done on `x86_64-pc-windows-gnu` target. | A-testsuite,A-debuginfo,A-codegen,T-compiler | low | Critical |
448,087,103 | flutter | Some suggestions on Texture Widget. | Hello!When I use texture widget to implement video rendering, I found that flutter native framework only provide `copyPixelBuffer` to receive CVPixelBuffer on iOS.
When the texture widget 's aspect radio is not equal to the CVPixelBuffer 's aspect radio, The image in the texture will be extend.So, I hope that flutter native api could provide a new api to control its fit, such as input view's width , view's height and rendering mode(scale to fill, scale to fit or extend).
About rendering mode:
1. scale to fill: The aspect ratio of the image is adjusted to the aspect ratio of the view by scaling and cropping
2.scale to fit: The aspect ratio of the image is adjusted to the aspect ratio of the view by filling in the black edges
3. extend: No special operations. | c: new feature,framework,a: video,c: proposal,P3,team-framework,triaged-framework | low | Minor |
448,245,103 | create-react-app | Chrome Framework Fund Proposal Umbrella | This issue is part of our application for the Chrome Framework Fund: https://docs.google.com/forms/d/e/1FAIpQLSdwM-2Xw-HXa5fqT8MsGW7AsMv9KC1VEoprJtXxrwdH9_Q1_Q/viewform
There are a number of performance related improvements we can make in Create React App. We'll collect them here and add to this list as we think of more.
## Proposed Improvements
* Modern build mode with module/nomodule - #4964
* Better performance budget reporting
* Encourage/demonstrate route-based code splitting in default template
* Upgrade to webpack 5
* Improve service worker and other PWA features (possibly by creating a dedicated template for PWAs) | issue: proposal | low | Major |
448,263,697 | terminal | Validate that VT adapter tests cover all mock possibilities | All of the various mock definitions don't seem to be in use. When I stood up the original parser years ago and wrote the mock, every mock was checked somehow. Over time, it probably decayed and the only thing left is that the mock has to be implemented to satisfy compilation of the interface.
_Originally posted by @miniksa in https://github.com/microsoft/terminal/pull/891/review_comment/create_
The goal here would be to run through all the tests and ensure that the mocks are involved somehow in each operation to validate that we're getting what we expect back through the adapter interface for all potential results. | Product-Conhost,Help Wanted,Area-VT,Issue-Task,Area-CodeHealth | low | Minor |
448,273,037 | go | cmd/go: automatically tidy go.sum | Now that we can authenticate new entries in go.sum,
there is less concern about keeping old ones around
that are not part of the current module graph.
If we update go.mod from v0.1.0 to v0.2.0 of a module
and v0.1.0 is no longer referenced in the build graph,
we should probably drop v0.1.0 from the go.sum.
Not sure about Go 1.13 vs Go 1.14.
Depends on how much work it is. | NeedsInvestigation,modules | low | Major |
448,313,466 | terminal | Panes should be resizable with the mouse | Probably depends on #991 getting done first
Drag a separator to (recursively) resize the panes that are separated by that separator. | Help Wanted,Area-UserInterface,Product-Terminal,Issue-Task,In-PR,Priority-2 | high | Critical |
448,313,626 | terminal | Scenario: Add support for panes | 
This is the megathread for tracking all the work related to [Panes](https://docs.microsoft.com/en-us/windows/terminal/panes) in the Windows Terminal.
### 1.0 Features
<details>
<summary>1.0 Features</summary>
* [x] Original issue: #532 -> added in #825
* [x] #991 Panes should be resizable with the keyboard. (fixed PR #1207)
* [x] #995 The user should be able to navigate the focus of panes with the keyboard, instead of requiring the mouse. (PR #1910)
* [x] #993 There's no keyboard shortcut for "ClosePane"
* [x] #998 Open panes with a specific profile
* [x] #994 There should be some sort of UI to indicate that a particular pane is focused, more than just the blinking cursor. `tmux` accomplishes this by colorizing the separators adjacent to the active pane. Another idea is displaying a small outline around the focused pane (like when tabbing through controls on a webpage). (PR:#3060)
* [x] #999 If you click on the separator's between panes, then no panes will be focused (PR #3540)
* [x] #3045 Moving focus between panes doesn't always work (PR #3958)
* [x] #3544 Add a default keybinding for panes, to enable them by default. (PR #3585)
* [x] #2834 Snap to character grid when resizing window (PR #3181)
* [x] #3960 Automatic splits similar to tiling window managers
</details>
### 1.x features / bugs
* [x] #1756 The user should be able to configure what profile is used for splitting a pane. Currently, the default profile is used, but it's possible a user might want to create a new pane with the parent pane's profile.
* [ ] #992 Panes should be resizable with the mouse. The user should be able to drag the separator for a pair of panes, and have the content between them resize as the separator moves.
* [ ] #4692 Pane focus movement doesn't remember where it came from
### 2.0 Features / Bugs
* [x] #2398 Move focus to the visually adjacent pane, not just the first pane on the other side of the separator.
- [ ] Also: #4692 Pane focus movement doesn't remember where it came from
* [x] #3062 Add a configuration object for focused vs unfocused state
* [x] #996 The user should be able to zoom a pane, to make the pane take the entire size of the terminal window temporarily.
* [x] #5803 `moveFocus` to pane using number (See also #5464)
* [ ] #3917 Panel split background ignores `requestedTheme`, follows system app mode
* [x] Add a `percent` parameter to `SplitPane` #3997
* [x] wt split-pane (multiple copies) seems to have occasional focus issues #6586
* [x] #2871 Add ~~`nextPane` and~~ `prevPane` keybindings (in PR #8183)
* [x] #1001 Panes should have an optional motion effect on entrance
* [x] Panes should have an animation when they're closed, too #7366
### Panes Titlebar Follow-ups - See #4998
* [ ] Add title to split window #4717
* [x] #7075 Allow moving panes to other tabs
* [ ] Panes should have editable titles #7290
### Backlog items
* [ ] The user should be able to tear-off tabs and dock them as a split (See [this comment](https://github.com/microsoft/terminal/issues/443#issuecomment-519077162))
* [ ] #4587 Drag & Drop Tabs to create a Pane
* [ ] Related, but different: Drag entries from the new tab menu to create panes #9229
* [ ] #997 A pane doesn't necessarily need to host a terminal. It could potentially host another UIElement. One could imagine enabling a user to quickly open up a Browser pane to search for a particular string without needing to leave the terminal. (spec #1080)
* [ ] #3656 Add support for `tmux` Control Mode
* [x] #2634 Support broadcast input (Spec #9365)
* [ ] #4259 Open a new pane with the environment vars of the parent
* [x] #4340 Choose Direction to Split Pane
* [x] A switch panes option? Like a `switchLeft`, `switchRight`, `switchUp`, `switchDown`, to allow the user to rearrange the panes layout (https://github.com/microsoft/terminal/issues/1000#issuecomment-578665067) (#10638)
* [ ] #4922 Swap panes
* [x] #4941 Please add support closePaneRight/Left/Up/Down
* [x] #5025 Open panes without keybindings
* [ ] #6002 Split panes equally in size
* [x] #6219 Pass through `moveFocus` keys when the user has no panes
* [x] #6459 Pane focus follows mouse (PR: #8965)
* [x] Moving focus with a zoomed pane should just zoom the adjacent pane #7215
* [ ] Add a fluent animation for pane zooming #7216
* [ ] Pane opening animation should not flash the default pane backdrop #7365
* [ ] Use a Clip rect for Pane animations instead of the Width/Height #7436
* [ ] Golden Ratio mode #8562
* [ ] #3586 Open a new pane by prompting the user for which profile to use
* [x] #10665
* [x] #10733
* [ ] #10757
* [x] #10909 Allow moving through panes in ID order
* [ ] #12186
* [ ] #16083
### Theming items
* [ ] #3061 Add a setting to manually set the Pane highlight color ~~(PR #3752)~~
- [ ] Add configurable Pane border _hover_ color #8564
* [ ] #3063 Add a setting to manually set the Pane border width
* [ ] #3708 Add option for more subtle pane focus border
| Area-UserInterface,Product-Terminal,Issue-Scenario | high | Critical |
448,328,890 | flutter | flutter tool should output subprocess stdout/stderr on command failure | If installing an app on iOS fails, this is what you currently see:
```
Launching catalog/app/lib/main.dart on iphone_7plus in debug mode...
Error launching application on iphone_7plus.
```
User would need to know to run the command with `-v` to get the full trace output to see the actual error message from the installer.
Could we look at the RunResult and print the process output if the command was not successful? (or at the very least, print a message to tell the user to run the command with `-v` to see failures). https://github.com/flutter/flutter/blob/a30ffb60adf2d33f930bc3d5bcdfb3647f8349aa/packages/flutter_tools/lib/src/base/process.dart#L238 | tool,c: proposal,P3,team-tool,triaged-tool | low | Critical |
448,338,360 | rust | no method named `join` found for type `&[std::ffi::OsString]` | I think join should be implemented for arrays of OsString.
@alexcrichton implements something similar here:
https://github.com/alexcrichton/cc-rs/blob/master/src/lib.rs#L2269
Would be nice if that code would be just `self.args.join(' ')` | A-FFI,T-libs-api,C-feature-request | low | Major |
448,355,740 | pytorch | torch.full_like missing documentation for out input variable | ## 📚 Documentation
https://pytorch.org/docs/stable/torch.html#torch.full_like
The behavior when the out tensor does not match type or device of input tensor is not obvious. | module: docs,triaged | low | Minor |
448,364,005 | flutter | `flutter --no-color doctor -v` and `flutter doctor -v` produce different output | `flutter --no-color doctor -v`
https://pastebin.com/UnZEjpaq
`flutter doctor -v`:
https://pastebin.com/W5qWCNHJ
---
EDIT by @christopherfujino
This bug can also be seen by comparing `flutter doctor -v` and `flutter doctor -vv`, as described in the issue https://github.com/flutter/flutter/issues/53680. I'm copying and pasting @jmagman's repro here for reference:
For example, flutter doctor doesn't show NDK location.
```
$ flutter doctor
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
```
flutter doctor -v does.
```
$ flutter doctor -v
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/magder/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
```
flutter doctor -vv doesn't reference NDK location.
```
$ flutter doctor -vv
[ +14 ms] executing: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
...
[ +18 ms] executing: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version
...
[ +25 ms] executing: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
...
[ +99 ms] executing: /usr/bin/plutil -convert json -o - /Applications/IntelliJ IDEA CE.app/Contents/Info.plist
...
[ +5 ms] executing: /usr/bin/plutil -convert json -o - /Applications/IntelliJ IDEA CE.app/Contents/Info.plist
...
[ +284 ms] [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
...
``` | tool,t: flutter doctor,P3,team-tool,triaged-tool | low | Critical |
448,369,795 | terminal | Add more rules to the static analysis ruleset | There is a ruleset file for static analysis checks at `/src/StaticAnalysis.ruleset` but it currently has only two rules that it checks for. More should be added. | Product-Meta,Issue-Task,Area-CodeHealth | low | Minor |
448,380,572 | flutter | Can't run `flutter packages pub global` outside of a flutter project | From my home directory (not a flutter project):
```bash
~ $ flutter packages pub global activate devtools
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.
Do not run this command from the root of your git clone of Flutter.
```
`pub global` is supposed to be usable from anywhere (hence the global name). This command does work correctly if you just invoke the pub command directly:
```bash
~ $ pub global activate devtools
Package devtools is currently active at version 0.1.0.
Resolving dependencies... (2.8s)
```
It also works if you use `flutter pub global`:
```bash
flutter pub global activate devtools
Package devtools is currently active at version 0.1.0.
Resolving dependencies...
```
| tool,a: quality,P3,team-tool,triaged-tool | low | Critical |
448,382,347 | flutter | Initial console on Windows wraps poorly | 
- [ ] it's too tall, you can't see the whole banner
- [ ] the === line is one character too long
- [ ] the last line of text isn't wrapped at all | tool,platform-windows,a: first hour,P2,team-tool,triaged-tool | low | Minor |
448,382,674 | node | test: fixtures key/certs cause failures when openssl security level > 1 | <!--
Thank you for reporting a possible bug in Node.js.
Please fill in as much of the template below as you can.
Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-b
it (Windows)
Subsystem: if known, please specify the affected core module name
If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you can.
-->
* **Version**: v13.0.0-pre 5b8df5e956680dc1a38b631e53f5e70a905fd917
* **Platform**: Linux alexaub.svl.corp.google.com 4.19.37-2rodete1-amd64 #1 SMP Debian 4.19.37-2rodete1 (2019-05-15 > 2018) x86_64 GNU/Linux
* **Subsystem**: test
<!-- Please provide more details below this comment. -->
In Debian testing, the latest openssl sets the default required security level to 2 in `/etc/ssl/openssl.cnf` ([link](https://tracker.debian.org/news/953618/accepted-openssl-111pre6-1-source-into-experimental/)). This requires (among other things, described [here](https://www.openssl.org/docs/man1.1.0/man3/SSL_CTX_get_security_level.html)) that certs/keys be at least of a certain length depending on cipher.
Some of the keys under `test/fixtures/` don't satisfy seclevel 2, and cause tests to fail when node's openssl reads that `openssl.cnf`.
Here's the [output](https://github.com/nodejs/node/files/3218802/test.log) of `python tools/test.py -J -p tap --logfile=test.log`. 180 tests fail due to errors like `ERR_SSL_EE_KEY_TOO_SMALL`.
The issue can be avoided by changing the line `CipherString = DEFAULT@SECLEVEL=2` to `CipherString = DEFAULT@SECLEVEL=1` in `/etc/ssl/openssl.cnf`. However beware that this is globally reducing the required security on your machine.
I figure that this issue can be solved by regenerating the troublesome keys/certs with a greater size -- probably 2048 bits for RSA/DSA/DH and 256 for ECC. I've been looking into this, and I would be happy to take a crack at it! The changes would be similar to #3759, and I think that it would also be good to move the certs under `test/fixtures/` to be under `test/fixtures/keys/` and generate them in the Makefile. | crypto,test | low | Critical |
448,388,898 | rust | cleaner output when dbg!() is given a literal value | Hello! I'm unsure if this should be an RFC but it seems similar to #57845, so I'll start by filing an issue here.
## The problem
Often I end up writing `dbg!` code with constant values, usually strings, to trace control flow.
```Rust
dbg!("Start loop");
while condition {
dbg!("Phase 1");
unsafe { libc::do_something() }
...
dbg!("Phase 2");
...
}
```
The output is a bit noisier than I'd like.
`[lib/emscripten/src/syscalls/unix.rs:826] "Start loop" = "Start loop"`
## The solution
Detect if the argument to the macro is a literal value (assuming this is possible) and make the output just:
`[lib/emscripten/src/syscalls/unix.rs:826] "Start loop"`
## Alternatives considered:
- `eprintln!`: doesn't have line and file info. It's a separate macro, so it's less aesthetically pleasing and less intuitive in my opinion.
- `debug!`: usually I'm already using these for other tasks and filtering them out is harder and less convenient than `dbg!`; `dbg!` is nice because it's explicitly a temporary debugging tool
- a custom macro: it'd be nice to be able to use this consistently anywhere | C-enhancement,T-libs-api | low | Critical |
448,400,564 | terminal | Guidance around const by-value function parameters | Clarification is needed around const by-value function parameters. I noticed in a lot of the code, by-value function parameters are marked const. Some code doesn't follow this rule though.
Examples in interactivity/win32/Clipboard.cpp
void Clipboard::Copy(bool fAlsoCopyHtml)
void Clipboard::StoreSelectionToClipboard(bool const fAlsoCopyHtml)
In the CppCoreGuidelines
[Con.1: By default, make objects immutable](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#con1-by-default-make-objects-immutable)
They have an exception
Exception
Function arguments are rarely mutated, but also rarely declared const. To avoid confusion and lots of false positives, don't enforce this rule for function arguments.
> void g(const int i); // pedantic
What is the team's stance on this?
This issue is just a reminder when we create the styleguide in #890 to include something around the team's rule.
| Issue-Docs,Product-Meta,Area-CodeHealth | low | Major |
448,403,267 | godot | TextEdits with borders have a small sub-pixel gap. | **Godot version:**
v3.1.1.stable.official
**OS/device including version:**
Ubuntu 18.04.2 LTS
Geforce GTX 1060
NVIDIA Driver: 418.56
**Issue description:**
Left container contains a panel container, right container contains a text edit with the same style.
They seem to get sqooshed slightly.

**Steps to reproduce:**
Add a TextEdit to a container, style it with a 1px border and set size flags to expand.
**Minimal reproduction project:**
[textedit.zip](https://github.com/godotengine/godot/files/3219022/textedit.zip)
| bug,topic:gui | low | Minor |
448,407,048 | rust | Cannot infer type should state how to specify the type | [For example](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=d544b677c3662f6d7120337e2df30d86):
```
error[E0282]: type annotations needed
--> src/os_str_join.rs:54:43
|
54 | assert_eq!(OsString::from(""), [].join("-".as_ref()));
| ^^^^ cannot infer type
```
Without googling, I have no way of understanding how to annotate my empty array with a type. | C-enhancement,A-diagnostics,T-compiler,A-inference,A-suggestion-diagnostics,D-verbose | low | Critical |
448,435,711 | go | proposal: spec: support read-only and practical immutable values in Go | The full proposal is here: https://github.com/go101/immutable-value-proposal/blob/master/README-v9.a.md
Please note, the new syntax in this proposal is not the core of the proposal. I know it is not perfect, welcome to suggest any alternative better ones for the syntax.
This propsoal is not intended to be accepted, at least soon. It is more a documentation to show the problems and possible solutions in supporting immutable and read-only values in Go. | LanguageChange,Proposal,LanguageChangeReview | medium | Major |
448,459,468 | react | Controlled input makes browser not saving submitted value (for autocomplete) | **Bug** (behaves different per browser, but generally inconsistent to uncontrolled inputs)
**Current behavior**
Reproduce with https://jsfiddle.net/bootleq/hos4r6qd/
1. Type `a` in *name* field, and `b` in *uncontrolled* field.
2. Submit.
3. Re-run the fiddle.
4. Focus input fields to see if browser "saves" previous input.
**Expected behavior**
Browser provides `a` suggestion for *name* and `b` for *uncontrolled* field.
Controlled and uncontrolled elements should behave the same.
**Actual result**
Uncontrolled input has `b` suggestion, but controlled input (*name*) has **no** suggestion.
Tested on Windows 7, Google Chrome 74.0.3729.169.
And on Firefox 68.0b4, we can click the *workaround* button before submit, by reset the `value` DOM attribute it behaves as expected. | Type: Bug,Component: DOM | medium | Critical |
448,481,316 | svelte | Build Error if multiple incompatible versions of svelte are detected | I ran into [strange issues](https://github.com/sveltejs/svelte/issues/2862) that were due to multiple versions of svelte (3.4.2 & 3.2.2) being built.
It would be useful to have a build error if multiple incompatible versions of svelte are being used. | feature request | low | Critical |
448,484,773 | go | encoding/gob: Encoder.Encode fails to encode maps with keys of type url.URL | ### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.12.5 linux/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/xxx/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/xxx/gocode"
GOPROXY=""
GORACE=""
GOROOT="/home/xxx/go"
GOTMPDIR=""
GOTOOLDIR="/home/xxx/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build478246212=/tmp/go-build -gno-record-gcc-switches"
</pre></details>
### What did you do?
https://play.golang.org/p/8-8Qws7ogyH
### What did you expect to see?
Gob encoder successfully encodes a value of type `map[url.URL]something`.
### What did you see instead?
There's an error: `gob: unaddressable value of type *url.URL`, despite the fact that the map keys are of type `url.URL`, not `*url.URL`. | NeedsInvestigation | low | Critical |
448,495,582 | rust | rustdoc: Primitive data type methods like min/max/clamp are not discoverable | Currently, searching the rust stdlib docs for, as an example, 'i32 min', will not find any info at all, and the the `i32` page (https://doc.rust-lang.org/std/primitive.i32.html) is not searchable with standard CTRL-F in some browsers like Firefox, since `min`/`max`/`clamp` are hidden under the by-default-collapsed section on `Ord`. This lack of searchability/discoverability extends to Google results.
I'm not sure what the bets method to remedy this is, but fixing the on-site search to know about these is probably a good start. | T-rustdoc,C-enhancement | medium | Major |
448,505,316 | rust | Error about missing `From` impl when using `try_from` | There are probably some generic trait implementations that cause rustc to follow this line of reasoning.
```rust
use std::convert::TryFrom;
fn main() {
f64::try_from(4usize);
}
```
([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=9d9a573c294b1348419e5b59caaa1ca8))
Errors:
```
Compiling playground v0.0.1 (/playground)
error[E0277]: the trait bound `f64: std::convert::From<usize>` is not satisfied
--> src/main.rs:4:5
|
4 | f64::try_from(4usize);
| ^^^^^^^^^^^^^ the trait `std::convert::From<usize>` is not implemented for `f64`
|
= help: the following implementations were found:
<f64 as std::convert::From<f32>>
<f64 as std::convert::From<i16>>
<f64 as std::convert::From<i32>>
<f64 as std::convert::From<i8>>
and 3 others
= note: required because of the requirements on the impl of `std::convert::Into<f64>` for `usize`
= note: required because of the requirements on the impl of `std::convert::TryFrom<usize>` for `f64`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
``` | C-enhancement,A-diagnostics,A-trait-system,T-compiler,F-on_unimplemented | low | Critical |
448,505,379 | TypeScript | Arobases in an example section of a jsdoc is considered a jsdoc section | Issue Type: <b>Bug</b>
1. Create a `foo.ts` file
2. Add the following code into it:
```javascript
class Foo {
protected baz: boolean;
public constructor() {
this.baz = true;
}
/**
* Set baz to false.
* @return {Foo}
* @example
* import { Foo } from "@khalyomede/foo";
*
* const foo = new Foo();
*
* foo.bar();
* @since 0.1.0
*/
public bar(): this {
this.baz = false;
return this;
}
}
export default Foo;
```
3. Pass your mouse over the `bar` method: you should see that `@khalyomede` is considered a jsdoc section
I made a screenshot of the issue: [https://i.ibb.co/dkKbMqV/vscode-arobases-in-comment-issue.png](https://i.ibb.co/dkKbMqV/vscode-arobases-in-comment-issue.png)
VS Code version: Code 1.34.0 (a622c65b2c713c890fcf4fbf07cf34049d5fe758, 2019-05-15T21:59:37.030Z)
OS version: Windows_NT x64 10.0.17763
<details>
<summary>System Info</summary>
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2808)|
|GPU Status|2d_canvas: enabled<br>checker_imaging: disabled_off<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>native_gpu_memory_buffers: disabled_software<br>rasterization: enabled<br>surface_synchronization: enabled_on<br>video_decode: enabled<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|15.89GB (8.84GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (14)</summary>
Extension|Author (truncated)|Version
---|---|---
vscode-new-file|dku|4.0.2
apacheconf-snippets|eim|1.2.0
vsc-material-theme|Equ|2.8.2
vsc-material-theme-icons|equ|0.12.0
prettier-vscode|esb|1.9.0
php-intellisense|fel|2.3.10
sftp|lix|1.12.7
php-namespace-resolver|Meh|1.1.8
vetur|oct|0.21.0
laravel5-snippets|one|1.5.0
sass-indented|rob|1.5.1
stylelint|shi|0.49.0
open-in-browser|tec|2.0.0
lorem-ipsum|Tyr|1.2.0
</details>
<!-- generated by issue reporter --> | Bug | low | Critical |
448,508,877 | godot | ResourceSaver duplicates items in all arrays | <!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->
**Godot version:**
3.1
**OS/device including version:**
Windows 10
**Issue description:**
ResourceSaver duplicates items in all arrays upon saving
**Minimal reproduction script:**
```js
extends Node2D
class Save:
extends Resource
export var version : String = "1.0"
export var save_name : String = "Whatever"
export var arr1: Array = []
export var arr2: Array = []
export var arr3: Array = []
func _ready():
var save := Save.new()
save.arr1.push_back({"name": "Plane"})
save.arr2.push_back({"name": "Human"})
save.arr3.push_back({"name": "Cat"})
ResourceSaver.save("res://test.tres", save)
```
test.tres:
```ini
[gd_resource type="Resource" load_steps=2 format=2]
[sub_resource type="GDScript" id=1]
[resource]
script = SubResource( 1 )
version = "1.0"
save_name = "Whatever"
arr1 = [ {
"name": "Plane"
}, {
"name": "Human"
}, {
"name": "Cat"
} ]
arr2 = [ {
"name": "Plane"
}, {
"name": "Human"
}, {
"name": "Cat"
} ]
arr3 = [ {
"name": "Plane"
}, {
"name": "Human"
}, {
"name": "Cat"
} ]
``` | bug,topic:gdscript,confirmed | low | Major |
448,509,564 | youtube-dl | Site Support Request: animenewsnetwork.com | <!--
######################################################################
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:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2019.05.20. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->
- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2019.05.20**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones
## Example URLs
<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->
- Single video: https://www.animenewsnetwork.com/video/159/
## Description
<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->
| site-support-request | low | Critical |
448,523,449 | rust | Warning for when a `pub use x::*` statement excludes something already imported privately | Ran into this today when refactoring visibility of tons of things in a library crate. In part of my refactoring, I added `pub use inner_mod::*;` statements to many of my modules. Confusingly, this didn't always re-export everything.
Consider this situation:
```rust
mod my_lib {
mod inner_mod {
mod inner_level {
pub struct A;
pub struct B;
pub struct C;
}
use self::inner_level::B;
pub use self::inner_level::*;
}
pub use self::inner_mod::*;
}
fn main() {
// works fine
let _a = my_lib::A;
// errors with 'error[E0425]: cannot find value `B` in module `my_lib`'
let _b = my_lib::B;
// ^
}
```
The line `pub use inner_level::*;` does not include `inner_level::B`, because that has already been imported. But since it's imported _privately_, it still can't be accessed.
Reading my own code, it took quite a while before I realized I had this conflict. I've included my nested-module situation above as it was in my code, as that produced the error "does not exist". (rather than "this is private", which is what occurs when only one mod level deep).
If there was a way to warn against "wildcard pub use not re-exporting item already previously imported", I think it could help in the future? Or, this might be a super niche situation not worth helping.
| C-enhancement,A-lints,A-diagnostics,A-resolve,T-lang,T-compiler | low | Critical |
448,523,474 | vscode | [themes] Allow to set a background color for settings / webview editors | [Feature Request]
Set background color for generic windows.
[Suggestions]
window.bgColor, settings.bgColor, extensions.bgColor
[Reason]
I love my background color and all, but it only goes well with code.. Because I'm extremely used to a certain color set, but I'd rather separate code and information. | feature-request,themes | low | Major |
448,534,350 | pytorch | official libtorch static build zip file error | ## ❓ Questions and Help
I download libtorch static zip file from https://download.pytorch.org/libtorch/cpu/libtorch-static-with-deps-latest.zip
but I find that libtorch-static-with-deps-latest.zip version still has .so files,
IT is The same as shared version from https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-latest.zip
I want to release my app without any .so files, and I do not want to build from source, Can anyone help me with The above question. many thanks | module: binaries,module: build,triaged | low | Critical |
448,540,127 | create-react-app | Workbox.core.clientsClaim is not a function | Hello guys!
I activate the serviceWorker.register() in my project.
I'm running the build and then I run `serve -s build`
When I use chrome to connect to localhost:5000 I see this error in the console and my service worker is not registered and in application tab I see that service worker in not installed.
`workbox.core.clientsClaim is not a function at service-worker.js:26`
This is my config project
```
"dependencies": {
"@ionic/react": "^0.0.5",
"axios": "^0.18.0",
"dotenv": "^6.2.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-router": "^5.0.0",
"react-router-dom": "^5.0.0",
"react-scripts": "3.0.1",
"use-react-router": "^1.0.5"
},
```
yarn 1.7.0
npm 6.1.0
I don't know if it is a bug or just my configuration is failing...
I printed in console the workbobox.core object

Thanks for support | issue: needs investigation | low | Critical |
448,544,560 | node | No content length on DELETE and OPTIONS | Looking through https://github.com/nodejitsu/node-http-proxy/commit/8a24a1e18f384d29a125eda1d2311bdd8ec66871 and reading through the node code. I do believe we have an unhandled case.
I believe we are missing something here: https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js#L349
To ensure content-length and transfer-encoding are correct.
Am I on to something or should I drop this? | confirmed-bug,help wanted,http | medium | Critical |
448,551,037 | go | cmd/compile: prefer to cheaply re-materialize after call site instead of spilling | go tip
While working on changing runtime.growslice to not return the length of the new slice (like was done for runtime.makeslice https://github.com/golang/go/commit/020a18c545bf49ffc087ca93cd238195d8dcc411) I ran into the issue of not being able to make the compiler rematerialize the new slice length instead of spilling it in https://github.com/golang/go/blob/d97bd5d07ac4e7b342053b335428ff9c97212f9f/src/cmd/compile/internal/gc/ssa.go#L2479
There generally seems to be a missed opportunity for the compiler to prefer recomputing a value that is cheap to compute from other values that too need to be loaded after a call.
Hand distilled example:
```
//go:noinline
func spilltest(s []int, a int) (int, int) {
b := a + 1
if b > len(s) {
somecall()
}
return a, b
}
```
produces:
```
0x450380 MOVQ FS:0xfffffff8, CX
0x450389 CMPQ 0x10(CX), SP
0x45038d JBE 0x4503d8
0x45038f SUBQ $0x10, SP
0x450393 MOVQ BP, 0x8(SP)
0x450398 LEAQ 0x8(SP), BP
0x45039d MOVQ 0x30(SP), AX
0x4503a2 LEAQ 0x1(AX), CX // first computation of b
0x4503a6 MOVQ 0x20(SP), DX
0x4503ab CMPQ DX, CX
0x4503ae JG 0x4503c4
0x4503b0 MOVQ AX, 0x38(SP)
0x4503b5 MOVQ CX, 0x40(SP)
0x4503ba MOVQ 0x8(SP), BP
0x4503bf ADDQ $0x10, SP
0x4503c3 RET
0x4503c4 MOVQ CX, 0(SP) // Avoid this spill
0x4503c8 CALL main.somecall(SB)
0x4503cd MOVQ 0x30(SP), AX
0x4503d2 MOVQ 0(SP), CX // do LEAQ 0x1(AX), CX here instead to compute b
0x4503d6 JMP 0x4503b0
0x4503d8 CALL runtime.morestack_noctxt(SB)
0x4503dd JMP main.spilltest(SB)
```
Neither
```
func spilltest(s []int, a int) (int, int) {
b := a + 1
if b > len(s) {
somecall()
b = a + 1
}
return a, b
}
```
Or
```
func spilltest(s []int, a int) (int, int) {
b := a + 1
if b > len(s) {
somecall()
}
c := a + 1
return a, c
}
```
avoids the spilling.
@josharian @randall77 @cherrymui | Performance,NeedsInvestigation,compiler/runtime | low | Minor |
448,563,906 | go | strings,bytes: tune inliner for Contains or add ContainsByte | For strings.Index there already exists a specialized version strings.IndexByte besides strings.IndexRune.
There currently is no Byte variant of strings.Contains but strings.ContainsRune exists.
Sampling from a large go code corpus:
* ~1/3 of calls to strings.Contains use a string of length 1 with an ASCII character
* strings.Contains appears ~100 times more frequently than strings.ContainsRune
* strings.Contains appears ~6 times more frequently then strings.Index and strings.IndexByte together.
There is overhead for both the binary code size, loading the string from memory and generally performance loss when using Contains or ContainsRune instead of ContainsByte (that uses IndexByte).
Make the inliner sufficiently aware of Contains and ContainsRune (+possible code layout change) to inline IndexByte calls directly.
### Alternative ###
Add a specialized ContainsByte function to strings and bytes package.
Downside: current code does not immediately get the benefits without change.
### Data ###
```
name time/op
Contains 5.88ns ± 1%
ContainsByte 3.30ns ± 0%
ContainsRune 5.40ns ± 1%
ContainsRuneFastPath 5.33ns ± 1%
```
Benchmark (I have seen 2 clock cycle variances due to branch addresses depending on where benchmark loops are, these here favor Contains on my Workstation)
```
var global bool
var data = "golang:contains"
func ContainsByte(s string, b byte) bool {
return strings.IndexByte(s, b) >= 0
}
func ContainsRuneFastPath(s string, r rune) bool {
if r <= utf8.RuneSelf {
return strings.IndexByte(s, byte(r)) >= 0
}
return strings.IndexRune(s, r) >= 0
}
func BenchmarkContains(b *testing.B) {
var sink bool
for i := 0; i < b.N; i++ {
// ...
// LEAQ 0x4c655(IP), AX // = 7 bytes
// MOVQ AX, 0x10(SP) // = 5 bytes
// MOVQ $0x1, 0x18(SP) // = 9 bytes
sink = strings.Contains(data, ":")
}
global = sink
}
func BenchmarkContainsByte(b *testing.B) {
var sink bool
for i := 0; i < b.N; i++ {
// ...
// MOVB $0x3a, 0x10(SP) // = 5 Bytes
// CALL internal/bytealg.IndexByteString(SB)
sink = ContainsByte(data, ':')
}
global = sink
}
func BenchmarkContainsRune(b *testing.B) {
var sink bool
for i := 0; i < b.N; i++ {
// ...
// MOVL $0x3a, 0x10(SP) // = 8 bytes
sink = strings.ContainsRune(data, ':')
}
global = sink
}
func BenchmarkContainsRuneFastPath(b *testing.B) {
var sink bool
for i := 0; i < b.N; i++ {
sink = ContainsRuneFastPath(data, ':')
}
global = sink
}
``` | Performance,NeedsInvestigation | low | Major |
448,575,680 | pytorch | Track running stats regardless of track_running_stats=False | ## 🐛 Bug
Since v1.1.0, `BatchNorm` tracks running stats even its `track_running_stats` option is `False` on the fly.
## To Reproduce
```python
>>> import torch
>>> bn = torch.nn.BatchNorm2d(3)
>>> bn.track_running_stats = False
>>> bn(torch.rand(1, 3, 2, 2))
>>> bn.running_mean
tensor([0.0711, 0.0396, 0.0542])
```
## Expected behavior
It looks like a design issue. If we decide to make `track_running_stats` as an immutable option, to modify this option should raise `AttributeError`.
Or, if we decide to allow to modify `track_running_stats` after initialization, `BatchNorm.forward()` shouldn't track running stats if it is `False`. Here's a possible fix:
```diff
- if self.momentum is None:
+ if self.momentum is None or not self.track_running_stats:
exponential_average_factor = 0.0
else:
exponential_average_factor = self.momentum
```
## Environment
```
PyTorch version: 1.1.0
Is debug build: No
CUDA used to build PyTorch: 9.0.176
OS: Ubuntu 16.04.5 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
CMake version: version 3.5.1
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 9.0.176
GPU models and configuration:
GPU 0: Tesla P40
GPU 1: Tesla P40
GPU 2: Tesla P40
GPU 3: Tesla P40
GPU 4: Tesla P40
GPU 5: Tesla P40
GPU 6: Tesla P40
GPU 7: Tesla P40
Nvidia driver version: 410.104
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.4.1
Versions of relevant libraries:
[pip] numpy==1.15.4
[pip] torch==1.1.0
[pip] torchvision==0.2.1
[conda] Could not collect
``` | module: nn,triaged | low | Critical |
448,585,298 | vscode | [folding] Fold All in selection | Issue Type: <b>Feature Request</b>
Currently the Fold All works like a Fold All In FIle. So it would be great to make the Fold All applied only to the selection if there is any.
VS Code version: Code 1.30.1 (dea8705087adb1b5e5ae1d9123278e178656186a, 2018-12-18T18:12:07.165Z)
OS version: Windows_NT x64 10.0.17134
<!-- generated by issue reporter --> | feature-request,editor-folding | low | Minor |
448,589,460 | PowerToys | Strong Search engine in "Open with" right click context menu | As the title says, it would be really awesome to have some sort of search engine directly integrated in the "Open With" right click context menu.
Current Scenario:
1) right click on the file you want to open with a custom .exe;
2) choose "Open With" and wait for the relative window to pop up;
3) check the list and scroll down to the end;
4) click on "Find another app in this PC"
5) manually locate inside windows explorer the locaton of the .exe you want to use;
6) do everything again from the start if you want that program to be the default one.
Enanched Scenario:
1) right click on the file ---> open with
2) start typing the name of the .exe you want to use
3) select the .exe in the search's result list
4) flag the nearby checkbox if you want to make it default
| Idea-New PowerToy | low | Major |
448,601,684 | flutter | Make data formatting initialization optional in material_localizations.dart | ## Steps to Reproduce
I'm implementing a custom AZ localization extends LocalizationsDelegate<MaterialLocalizations>. In my application I need date formatters, date formatting is already exists in Intl package for AZ locale.
The problem is that if I init date formatting by initializeDateFormatting() than I see exception "Cannot write to unmodifiable Map", if I don't call initializeDateFormatting(), then I observe error "Invalid locale 'az_AZ'" (my custom locale) calling date formatters.
Some investigation shows that date formatters work perfect if i do following two things:
1. Comment line util.loadDateIntlDataIfNotLoaded();
in material_localizations.dart
2. Call initializeDateFormatting() from application code.
Is there any correct way to do (any of):
1. Make date formatters initialization for supported locales optional (in material_localizations.dart).
2. Convert some unmodifiable map to modifiable (sorry didn't investigated which one throws an exception described above)
3. Add custom locale to list of locales used in util.loadDateIntlDataIfNotLoaded() to initialize date formatters of custom locale same time as existing locales.
Issue is actually related to [https://github.com/flutter/flutter/issues/32090](url) | framework,f: material design,a: internationalization,c: proposal,P2,team-design,triaged-design | low | Critical |
448,602,610 | angular | useAnimation params doesn't support query and stagger params | # 🐞 bug report
### Affected Package
The issue is caused by package @angular/animations
### Is this a regression? I don't think so.
### Description
`query` parameter cannot be used as an animation parameter of `useAnimation()`. Same behavior for stagger.
## 🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-animation-query-params
## 🔥 Exception or Error
<pre><code>
ERROR DOMException: "'{{ selector }}' is not a valid selector"
The provided timing value "{{stagger}}" is invalid.
</code></pre>
## 🌍 Your Environment
**Angular Version: 7.2.*
<pre><code>
Angular CLI: 7.3.3
Node: 10.15.0
OS: win32 x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.13.3
@angular-devkit/core 7.3.3
@angular-devkit/schematics 7.3.3
@schematics/angular 7.3.3
@schematics/update 0.13.3
rxjs 6.3.3
typescript 3.2.4
</code></pre>
| type: bug/fix,area: animations,freq1: low,P4 | low | Critical |
448,611,113 | godot | Shader material visual bug when reading DEPTH_TEXTURE in the fragment function while using cull_disabled | **Godot version:** 3.1.1
**OS/device including version:** Win 10 64 bit
**Issue description:** In the fragment function of a shader, if I read from DEPTH_TEXTURE in any way while I'm using the `cull_disabled` render mode, it makes the mesh render strangely. This happens in both GLES3 and GLES2.

The shader code I'm using in this example is:
```hlsl
shader_type spatial;
render_mode cull_disabled;
void fragment() {
float depth = textureLod(DEPTH_TEXTURE, SCREEN_UV, 0.0).r;
}
```
**Minimal reproduction project:** [Shader Cull Issue.zip](https://github.com/godotengine/godot/files/3221132/Shader.Cull.Issue.zip)
| bug,topic:rendering,confirmed | low | Critical |
448,611,283 | TypeScript | Widen eligibility of Instrinsic Element names in JSX/TSX beyond lowercase names | <!-- 🚨 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
JSX, compilation, Intrinsic Elements
<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
## Suggestion
Allow more flexibility in defining Intrinsic Elements in JSX. The lowercase/uppercase convention works for React but doesn't represent the range of the spec. Any name should be allowed to be registered as an Intrinsic Element.
<!-- A summary of what you'd like to see added or changed -->
## Use Cases
JSX is just an XML like syntax language that gets compiled down to JavaScript. How that compilation works and what it outputs could be different depending on the library. Assuming case or character set to determine Intrinsic Elements outside the spec makes it much more difficult to support TypeScript for other JSX libraries.
<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->
## Examples
Suppose a library wanted wanted to allow control flow to be precompiled using a $ symbol to prevent interference with the range of Value Elements the end user could use:
```jsx
<$ each={ items }>{ item => <div>{ item.title }</div>}</$>
```
This is perfectly valid JSX and could be compiled away before runtime.
Or how about something like NativeScript which uses a PascalCase syntax for it's intrinsic elements? It should be perfectly fine to set aside a few of these without having mess with per file imports or messing with Global scope.
I mean given the trend to compile down, and idea very much at the heart of JSX, it seems incredibly limiting to restrict this to a convention, no matter how popular it is. If the spec allows so should Typescript.
Yet today, you cannot set $ nor Button as Intrinsic JSX elements. I mean you can but they just get ignored.
I am unclear whether it's breaking. But I believe it would not be as it would just allow more elements to be eligible and not take anything away. Although I know there is some implicit behavior here (when there are no Intrinsic Elements declared). I suppose that could stay the same.
<!-- Show how this would be used and what the behavior would be -->
## 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).
| Suggestion,Awaiting More Feedback | low | Critical |
448,636,750 | ant-design | <Upload /> component does not handle its inner input's `onFocus` events | - [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.
### Reproduction link
[](https://codesandbox.io/embed/antd-reproduction-template-yjtz4)
### Steps to reproduce
1. Add an `<Upload />` component to any form or page
2. Try to trigger an `onFocus` callback using any method (either by clicking on the Upload component, or by pressing tab until it focuses, etc)
3. Any attached `onFocus` props will not be fired
### What is expected?
Form inputs need `onFocus` event callbacks; it's expected that any focusable input has it, and this has been standard input behavior for decades now. Tthe underlying file input allows all the regular methods of focusing, thus it is expected that the focus event callback would exist on `<Upload />` like it does with any other form field.
### What is actually happening?
`onFocus` callbacks are not fired for any of keyboard, mouse, or screen-reader focus events.
| Environment | Info |
|---|---|
| antd | 3.19.0 |
| React | 16.8.6 |
| System | macOS 10.14 |
| Browser | Chrome 74 |
---
Beyond it being expected/standard behavior, the absence of `onFocus` here adds unnecessary difficulty and extra code when implementing nice accessibility features, smooth client-side validations, and other misc dev tasks that don't really need to be more tedious than they already can be. XD
<!-- generated by ant-design-issue-helper. DO NOT REMOVE --> | Inactive,⌨️ Accessibility | low | Major |
448,646,382 | pytorch | build caffe2 operators failed, 'sorry, unimplemented: non-trivial designated initializers not supported' | ## 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
i want to build caffe2 server operators to test fbgemm, but i meet thest problems:
## To Reproduce
Steps to reproduce the behavior:
1.turn BUILD_CAFFE2_OPS and USE_FBGEMM on in CMakelists
2.cmake and make install
<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h: In instantiation of ‘caffe2::ConvOp<T, Context>::RunOnDeviceWithOrderNCHW()::<lambda(caffe2::Tensor*)> [with T = float; Context = caffe2::CPUContext]’:
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:173:13: required from ‘struct caffe2::ConvOp<T, Context>::RunOnDeviceWithOrderNCHW() [with T = float; Context = caffe2::CPUContext]::<lambda(class caffe2::Tensor*)>’
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:181:3: required from ‘bool caffe2::ConvOp<T, Context>::RunOnDeviceWithOrderNCHW() [with T = float; Context = caffe2::CPUContext]’
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op.cc:209:1: required from here
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:118:15: error:redeclration of ‘const int& C’
C * X_HxW,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:98:53: note:‘const int& C’ previously declared here
math::Im2Col<T, Context, StorageOrder::NCHW>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:145:45: error:redeclration of ‘const int& G’
math::GemmStridedBatched<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:131:13: note:‘const int& G’ previously declared here
if (G == 1) {
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:149:15: error:redeclration of ‘const int& M’
M / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:132:31: note:‘const int& M’ previously declared here
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:149:15: error:redeclration of ‘const int& G’
M / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:131:13: note:‘const int& G’ previously declared here
if (G == 1) {
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:145:45: error:redeclration of ‘const int& Y_HxW’
math::GemmStridedBatched<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:132:31: note:‘const int& Y_HxW’ previously declared here
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:145:45: error:redeclration of ‘const int& kernel_dim’
math::GemmStridedBatched<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:132:31: note:‘const int& kernel_dim’ previously declared here
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:156:25: error:redeclration of ‘const int& buffer_size’
buffer_size / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:116:55: note:‘const int& buffer_size’ previously declared here
math::Im2ColNd<T, Context, StorageOrder::NCHW>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:156:25: error:redeclration of ‘const int& G’
buffer_size / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:131:13: note:‘const int& G’ previously declared here
if (G == 1) {
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:159:22: error:redeclration of ‘const int& G’
Y_stride / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:131:13: note:‘const int& G’ previously declared here
if (G == 1) {
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:165:31: error:redeclration of ‘const int& M’
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:132:31: note:‘const int& M’ previously declared here
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:165:31: error:redeclration of ‘const int& Y_HxW’
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:132:31: note:‘const int& Y_HxW’ previously declared here
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:179:14: error:redeclration of ‘const int& Y_stride’
Y_data += Y_stride;
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:159:22: note:‘const int& Y_stride’ previously declared here
Y_stride / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h: In instantiation of ‘bool caffe2::ConvOp<T, Context>::RunOnDeviceWithOrderNCHW() [with T = float; Context = caffe2::CPUContext]’:
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op.cc:209:1: required from here
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
const auto func = [&](Tensor* col_buffer) {
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
## Expected behavior
<!-- A clear and concise description of what you expected to happen. -->
## Environment
Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).
You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```
- PyTorch Version (e.g., 1.0): 1.0
- OS (e.g., Linux): Red Hat Linux
- GCC version: 5.1.0
- How you installed PyTorch (`conda`, `pip`, source): source
- Build command you used (if compiling from source):cmake .. && make install -j
- Python version: 2.7
- CUDA/cuDNN version: 9.1.85
- GPU models and configuration:
GPU 0: Tesla K80
GPU 1: Tesla K80
GPU 2: Tesla K80
GPU 3: Tesla K80
- Any other relevant information:
## Additional context
here is my CMakelists, thanks
<!-- Add any other context about the problem here. -->
[CMakeLists.txt](https://github.com/pytorch/pytorch/files/3221672/CMakeLists.txt)
| caffe2 | low | Critical |
448,666,494 | go | archive/tar: Does not handle extended pax values with nulls | ### What version of Go are you using (`go version`)?
<pre>
go version go1.12.5 darwin/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes
### What did you do?
Read a tar file generated by `git archive`:
```shellsession
$ git clone https://github.com/SSW-SCIENTIFIC/NNDD.git
$ cd NNDD
$ git archive --format tar c21b98da2ca7f007230e696b2eda5da6589fe137 > nndd.tar
```
Alternatively you can fetch this archive directly from github: https://github.com/SSW-SCIENTIFIC/NNDD/tarball/c21b98da2ca7f007230e696b2eda5da6589fe137
If you try to read this with golang's `archive/tar` you will get a `tar.ErrHeader` on one of the entries. Here is a reproduction program:
```go
package main
import (
"archive/tar"
"compress/gzip"
"fmt"
"io"
"log"
"net/http"
"os"
)
func main() {
// Read tar from file if specified, otherwise fetch directly from github
var r io.Reader
if len(os.Args) > 1 {
f, err := os.Open(os.Args[1])
if err != nil {
log.Fatal(err)
}
defer f.Close()
r = f
} else {
resp, err := http.Get("https://github.com/SSW-SCIENTIFIC/NNDD/tarball/c21b98da2ca7f007230e696b2eda5da6589fe137")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
gr, err := gzip.NewReader(resp.Body)
if err != nil {
log.Fatal(err)
}
defer gr.Close()
r = gr
}
tr := tar.NewReader(r)
for {
_, err := tr.Next()
if err == io.EOF {
break
}
if err != nil {
log.Fatal(err)
}
}
fmt.Println("Successfully read tar")
}
```
If you try read the same file with bsdtar or gnutar they both read the whole tarball. bsdtar (depending on version) will log a warning to stderr but still extract the rest of the tarball.
The archive contains a symbolic link which instead of a path for value, contains a large value which includes null. The `validatePAXRecord` explicitly disallows null from appearing in the value for PAX values for links. This leads to `tar.Reader.Next()` returning `tar.ErrHeader`.
https://github.com/golang/go/blob/go1.12.5/src/archive/tar/strconv.go#L321-L322
I reported this to the git mailing list: https://public-inbox.org/git/CAMVcy0Q0TL6uEGR2NeudJrOiXdQ87XcducL0EwMidWucjk5XYw@mail.gmail.com/T/#u Read that issue for more details on the "bad" entry in the archive.
The opinion there seems to be that generating values that aren't C-strings for links is valid. Not all tarballs are destined for filesystems. And the latest bsdtar and gnutar do not complain about the value. gnutar will write the symbolic link value upto the first null.
### What did you expect to see?
I think any of the follow behaviours would be better:
- Be able to read the rest of the tar if encountering a recoverable error.
- Allow nulls in all PAX values.
- Truncate up to first null in PAX value. (consistent with gnutar)
### What did you see instead?
`tar.ErrHeader` on a tarball both bsdtar and gnutar can read. | NeedsDecision | low | Critical |
448,670,293 | realworld | NewUser definition email field has no format property set | I've been looking at specs and noticed that `NewUser` definition `email` field has no `format` set:
https://github.com/gothinkster/realworld/blob/1d58c002fc3da07e386489ddfc2df2e85fa45bdf/api/swagger.json#L834:L836 .
Not having an email validation is bad for demonstration purposes because:
1. any realistic MVP would have such primitive validation;
1. having a user to be able to register with any string as an email is a clearly a bug;
1. validation logic is one of the pillars of the web interaction with users, this is one the things that you consider when looking at framework;
1. most of the frameworks provide validation for emails out of the box, so it does not actually cost anything to have it.
So would you be interested in having PR that adds `"format": "email" ` for `NewUser` definition `email` field?
| v2 | low | Critical |
448,727,949 | neovim | API: all buffer-related functions should ensure buffer is loaded | I'm working on a plugin for debugging functionality and trying to optimize some of the code paths. One problem we have is that there doesn't seem to be a way to load a buffer to a window and then run autocommands on it as if the user opened the buffer themselves.
Given a sequence of steps
* user triggers event with window 2 selected
* plugin calls `nvim_win_set_buf` for window 1 with some other buffer
you get a raw buffer loaded into window 1 with no syntax highlighting and no autocommands ran for other plugins that might depend on it. So the work around I've used is
target_window.buffer = new_buffer
previous_window = vim.current.window
vim.current.window = target_window
vim.command("doauto SomeAutocmd")
vim.current.window = previous_window
Clearly this is a clumsy workaround. Something along the lines of
target_window.buffer = new_buffer
vim.api.run_autocommand("BufEnter", target_window.buffer)
would be much nicer. | enhancement,api,complexity:low,has:plan,events | low | Critical |
448,743,033 | rust | Mention shadowed glob-imported items in mismatched types errors when possible | Given:
1. a large source file full of generically-named functions,
2. and one tiny glob import to get even more generically-named functions
one can arrive at a baffling error like this:
```console
error[E0308]: mismatched types
--> src/main.rs:15:14
|
15 | function(CorrectType);
| ^^^^^^^^^^^ expected struct `OtherType`, found struct `CorrectType`
|
= note: expected type `OtherType`
found type `CorrectType`
```
The issue is that the author expected to be calling the glob imported function, when in fact a function with the same name was also in local scope.
Ideally, rustc would point out there is another function with the same name for which the types match, and how to explicitly call this one. (This can be expanded to known functions that are not in scope, but having this for shadowed names will already be very useful.)
Code to reproduce above error ([playpen](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=0743af1a7a1a476fdd1687b7e618c109)):
```rust
pub struct CorrectType;
pub struct OtherType;
mod globme {
pub fn helper(_x: i8) {}
pub fn function(_x: super::CorrectType) {}
}
use self::globme::*;
fn function(_x: OtherType) {}
fn main() {
helper(42);
function(CorrectType);
}
``` | A-diagnostics,P-low,T-compiler | low | Critical |
448,746,662 | TypeScript | Support `diagnostics` inside `compilerOptions` in combination with `--build` | <!-- 🚨 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
* diagnostics, build
<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
related maybe? https://github.com/microsoft/TypeScript/issues/19725
## Suggestion
<!-- A summary of what you'd like to see added or changed -->
It would be nice if you could combine `--diagnostics` and `--build`
## Use Cases
<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->
I can just `cd` into a specific sub-project and run `tsc --diagnostics` there without a problem, however it would be nice to also have `--diagnostics` for a whole monorepo / project-references build.
## Examples
<!-- Show how this would be used and what the behavior would be -->
## Checklist
My suggestion meets these guidelines:
* [*] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [*] This wouldn't change the runtime behavior of existing JavaScript code
* [*] This could be implemented without emitting different JS based on the types of the expressions
* [*] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [*] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
| Suggestion,Awaiting More Feedback | low | Critical |
448,807,496 | TypeScript | Cant infer type of parent based on member of child | <!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!
Please help us by doing the following steps before logging an issue:
* Search: https://github.com/Microsoft/TypeScript/search?type=Issues
* Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
Please fill in the *entire* template below.
-->
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 3.4.5
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
- infer parent based on child
- type inference in if statement
- conditional generic type infer
**Code**
```ts
const enum ChildType {
A,
B,
C
}
interface ChildrenMap {
[ChildType.A]: { value: 10 },
[ChildType.B]: { value: string },
[ChildType.C]: { value: boolean, test?: boolean }
};
// Create a "Child", that has a type and
// other members based on what type it is
type Child<T extends ChildType> = { type: T } & ChildrenMap[T];
interface ParentMap {
[ChildType.A]: { color: 'red' },
[ChildType.B]: { color: 'blue' },
[ChildType.C]: { color: 'green' }
}
// Create a "Parent", that has a "Child", which
// has a type, which decides what members the
// parent should have
type Parent<T extends Child<any>> =
T extends Child<infer R>
? R extends ChildType ? ParentMap[R] & { child: Child<R> }
: never
: never;
// More of the same stuff!
interface GrandParent<T extends Parent<Child<any>>> {
parent: T extends Parent<Child<infer R>>
? R extends ChildType ? Parent<Child<R>>
: never
: never;
}
// It all works as expected at this point
let A: Parent<Child<ChildType.A>>;
let red: typeof A['color'] = 'red';
let justRed: typeof A['color'] = 'blue'; // error!
// Same sorta thing as ^
let B: Parent<Child<ChildType.B>>;
let C: Parent<Child<ChildType.C>>;
function testParent<T extends Parent<any>>(parent: T) {
if (parent.child.type === ChildType.A) {
parent.child.value; // equals 10!
parent.color; // red | green | blue, but should only be red
}
}
function testGrandParent<T extends GrandParent<any>>(grandParent: T) {
if (grandParent.parent.child.type === ChildType.B) {
grandParent.parent.child.value; // string, yay!
grandParent.parent.color; // red | green | blue, but should only be blue
}
}
```
**Expected behavior:**
As the type of "Child" is being set using the same conditional type as the parent, the parent type should also get the appropriate type for "color".
In the case of `testParent`, the statement `parent.type === ChildType.A` correctly infers the value of `value` (in the case of that example 10). This should also happen for the top level member "color" as well (in the case of that example, `color` should be set to `"red"`).
**Actual behavior:**
`parent.child.type` and `parent.child.value`, correctly coerce the appropriate type. However `color` is incorrect `"red" | "blue" | "green"` instead of one of the three.
**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
[link to the playground](https://www.typescriptlang.org/play/#src=const%20enum%20ChildType%20%7B%0D%0A%20%20%20%20A%2C%0D%0A%20%20%20%20B%2C%0D%0A%20%20%20%20C%0D%0A%7D%0D%0A%0D%0Ainterface%20ChildrenMap%20%7B%0D%0A%20%20%20%20%5BChildType.A%5D%3A%20%7B%20value%3A%2010%20%7D%2C%0D%0A%20%20%20%20%5BChildType.B%5D%3A%20%7B%20value%3A%20string%20%7D%2C%0D%0A%20%20%20%20%5BChildType.C%5D%3A%20%7B%20value%3A%20boolean%2C%20test%3F%3A%20boolean%20%7D%0D%0A%7D%3B%0D%0A%0D%0A%2F%2F%20Create%20a%20%22Child%22%2C%20that%20has%20a%20type%20and%0D%0A%2F%2F%20other%20members%20based%20on%20what%20type%20it%20is%0D%0Atype%20Child%3CT%20extends%20ChildType%3E%20%3D%20%7B%20type%3A%20T%20%7D%20%26%20ChildrenMap%5BT%5D%3B%0D%0A%0D%0Ainterface%20ParentMap%20%7B%0D%0A%20%20%20%20%5BChildType.A%5D%3A%20%7B%20color%3A%20'red'%20%7D%2C%0D%0A%20%20%20%20%5BChildType.B%5D%3A%20%7B%20color%3A%20'blue'%20%7D%2C%0D%0A%20%20%20%20%5BChildType.C%5D%3A%20%7B%20color%3A%20'green'%20%7D%0D%0A%7D%0D%0A%0D%0A%2F%2F%20Create%20a%20%22Parent%22%2C%20that%20has%20a%20%22Child%22%2C%20which%0D%0A%2F%2F%20has%20a%20type%2C%20which%20decides%20what%20members%20the%20%0D%0A%2F%2F%20parent%20should%20have%0D%0Atype%20Parent%3CT%20extends%20Child%3Cany%3E%3E%20%3D%0D%0A%20%20%20%20T%20extends%20Child%3Cinfer%20R%3E%0D%0A%20%20%20%20%3F%20R%20extends%20ChildType%20%3F%20ParentMap%5BR%5D%20%26%20%7B%20child%3A%20Child%3CR%3E%20%7D%0D%0A%20%20%20%20%3A%20never%20%0D%0A%20%20%20%20%3A%20never%3B%0D%0A%0D%0A%2F%2F%20More%20of%20the%20same%20stuff!%0D%0Ainterface%20GrandParent%3CT%20extends%20Parent%3CChild%3Cany%3E%3E%3E%20%7B%0D%0A%20%20%20%20parent%3A%20T%20extends%20Parent%3CChild%3Cinfer%20R%3E%3E%0D%0A%20%20%20%20%3F%20R%20extends%20ChildType%20%3F%20Parent%3CChild%3CR%3E%3E%0D%0A%20%20%20%20%3A%20never%0D%0A%20%20%20%20%3A%20never%3B%20%0D%0A%7D%0D%0A%0D%0A%2F%2F%20It%0D%0Alet%20A%3A%20Parent%3CChild%3CChildType.A%3E%3E%3B%0D%0Alet%20red%3A%20typeof%20A%5B'color'%5D%20%3D%20'red'%3B%0D%0Alet%20justRed%3A%20typeof%20A%5B'color'%5D%20%3D%20'blue'%3B%20%2F%2F%20error!%0D%0A%0D%0A%2F%2F%20Same%20as%20%5E%0D%0Alet%20B%3A%20Parent%3CChild%3CChildType.B%3E%3E%3B%0D%0Alet%20C%3A%20Parent%3CChild%3CChildType.C%3E%3E%3B%0D%0A%0D%0Afunction%20testParent%3CT%20extends%20Parent%3Cany%3E%3E(parent%3A%20T)%20%7B%0D%0A%20%20%20%20if%20(parent.child.type%20%3D%3D%3D%20ChildType.A)%20%7B%0D%0A%20%20%20%20%20%20%20%20parent.child.value%3B%20%2F%2F%20equals%2010!%0D%0A%20%20%20%20%20%20%20%20parent.color%3B%20%2F%2F%20red%20%7C%20green%20%7C%20blue%2C%20but%20should%20only%20be%20red%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Afunction%20testGrandParent%3CT%20extends%20GrandParent%3Cany%3E%3E(grandParent%3A%20T)%20%7B%0D%0A%20%20%20%20if%20(grandParent.parent.child.type%20%3D%3D%3D%20ChildType.B)%20%7B%0D%0A%20%20%20%20%20%20%20%20grandParent.parent.child.value%3B%20%2F%2F%20string%2C%20yay!%0D%0A%20%20%20%20%20%20%20%20grandParent.parent.color%3B%20%2F%2F%20red%20%7C%20green%20%7C%20blue%2C%20but%20should%20only%20be%20blue%0D%0A%20%20%20%20%7D%0D%0A%7D)
**Related Issues:** <!-- Did you find other bugs that looked similar? -->
| Suggestion,In Discussion | low | Critical |
448,809,832 | flutter | google sign in ^4.0.1+3 plugin: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null) | Configuration fix that seems to have helped many people:
https://github.com/flutter/flutter/issues/33393#issuecomment-964728679
## Details
After sigining in to google at this line (Android)
` GoogleSignInAccount googleUser = await _googleSignIn.signIn();`
I get this exception
`PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)
`
I have tired all the advice from this issue https://github.com/flutter/flutter/issues/27599 including linking firebase and google account, adding SHA1 and SHA256 to firebase and changing the classpath to `com.android.tools.build:gradle:3.2.1/com.google.gms:google-services:4.2.0.` which threw build errors, after adding sub project script to fix, build errors was gone however sign in still did not function.
I also deleted my Android folder recreated the project and redid all the steps again. The error throw in both release and debug builds
I believe I have migrated to AndriodX however it is hard to say with 100% certainty as the documentation is vague and Andriod studio tools said "no found issues".
The error started after I move from the master channel to the stable channel. I move channels because the release built of my app was crashing on launch and I read that it could help solve the issue
I have been working on this problem for serval weeks so please help.
From time to time I also get this build warning
```
Note: /Users/bradmurray/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.0+1/android/src/main/java/io/flutter/plugins/firebase/core/FirebaseCorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
```
## Flutter DR
<!--
Run `flutter analyze` and attach any output of that command below.
If there are any analysis errors, try resolving them before filing this issue.
-->
```
```
✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale en-AU)
• Flutter version 1.5.4-hotfix.2 at /Users/bradmurray/Developer/flutter
• Framework revision 7a4c33425d (4 weeks ago), 2019-04-29 11:05:24 -0700
• Engine revision 52c7a1e849
• Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/bradmurray/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• ios-deploy 1.9.4
• CocoaPods version 1.5.2
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 35.3.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[!] Connected device
! No devices available
## Build Gradle
```
buildscript {
repositories {
google()
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
```
##Pub spec
```
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
firebase_core:
firebase_database:
cached_network_image:
firebase_storage:
location : ^2.3.0
flutter_calendar_carousel: ^1.3.16
carousel_pro: ^0.0.13
shared_preferences: ^ 0.4.3
url_launcher: ^4.2.0+3
flutter_local_notifications: ^0.5.0
after_layout: ^1.0.7
geolocator: ^3.0.0
google_sign_in: ^4.0.1+3
firebase_auth: ^0.11.1
font_awesome_flutter: ^8.4.0
scoped_model: ^1.0.1
google_maps_flutter:
path: ../google_maps_flutter
permission_handler: ^3.0.1
cupertino_icons: ^0.1.2
```
| c: crash,platform-android,p: google_sign_in,package,P2,c: fatal crash,team-android,triaged-android | low | Critical |
448,846,065 | storybook | How to lazy load(code splitting) stories(and respective component source)? | **Is your feature request related to a problem? Please describe.**
We have many components(100+) and we want to write stories for all of them, eventually replacing component development with storybook.
The bundle size is growing enormously as we are writing stories for new components. This is affecting initial page load time as all the component JS & stories are loaded on page load.
**Describe the solution you'd like**
We would like to lazy load each story file(which imports component). so that, only JS required to render current stories are loaded. and subsequent navigation to other stories loads additional JS.
**Describe alternatives you've considered**
- Tried dynamically importing each component using `react-loadable`, but in this case the `propTypes/defaultProps/smart-knobs` are not read.
- Creating DLL using webpack and injecting it probably(Haven't tried yet, but this would solve the problem partially)
**Are you able to assist bring the feature to reality?**
May be! Not sure.
**Additional context**
none
| feature request,configuration babel / webpack | medium | Critical |
448,859,281 | youtube-dl | foxsportsgo.com | <!--
######################################################################
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:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2019.05.20. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->
- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2019.05.20**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones
## Example URLs
<!--
https://www.foxsports.com/watch/skip-and-shannon-undisputed-975657
https://www.foxsports.com/watch/mlb-whiparound-976182
https://www.foxsports.com/watch/the-herd-with-colin-cowherd-975777
https://www.foxsports.com/watch/the-herd-with-colin-cowherd-975777?cmpid=org=foxsports::ag=::mc=sportsdata::src=sportsdata::cmp=fsgo_foxsports&is_retargeting=true&cmpid=org=foxsports::ag=::mc=sportsdata::src=sportsdata::cmp=fsgo_foxsports&shortlink=872f1417&c=fsgo_foxsports&pid=sportsdata&af_channel=sportsdata&af_sub2=foxsports
-->
- Single video: https://www.foxsports.com/watch/skip-and-shannon-undisputed-975657
- Single video: https://www.foxsports.com/watch/mlb-whiparound-976182
- Playlist: https://www.foxsports.com/watch/the-herd-with-colin-cowherd-975777?cmpid=org=foxsports::ag=::mc=sportsdata::src=sportsdata::cmp=fsgo_foxsports&is_retargeting=true&cmpid=org=foxsports::ag=::mc=sportsdata::src=sportsdata::cmp=fsgo_foxsports&shortlink=872f1417&c=fsgo_foxsports&pid=sportsdata&af_channel=sportsdata&af_sub2=foxsports
## Description
<!--
The login I use is through my cable service provider Verizon.
-->
The login I use is through my cable service provider Verizon.
FoxSportsGo is a site where you can view replays of many Fox Sports shows and it currently has no support through YT-DL. Please, if someone could be so kind to write the support into YT-DL.
| site-support-request | low | Critical |
448,872,708 | flutter | Drawer onPop() not triggering when clicking on Body of Scaffold | ## Use case
We would like to blur the content when drawer is opened and remove blur when drawer is GETTING closed.
## Proposal
Options:
1. Add additional Callbacks to the Drawer widget
```
Drawer(
child: ...
// this should come in handy
onDrawerStateChange: (DrawerState state) {
switch (state) {
case DrawerState.open:
print('its completely open');
case DrawerState.opening:
print('its starting to open');
case DrawerState.closed:
print('its completely closed');
case DrawerState.closing:
print('its closing...');
default:
print('Incorrect drawer state');
}
}
)
```
2. Allow callbacks over Scaffold:
```
Scaffold(
drawer: Drawer(...),
onDrawerOpenStart: ...
onDrawerCloseStart: ...
onDrawerClosed: ...
onDrawerOpened: ...
)
```
## Since there's no implementation, this removal of blur effect is "delayed" after the Drawer has been closed (when calling "menuClosed" in `dispose()` method of Drawer widget), I've had to implement this a bit different. Drawers Parent is now Stack, which first child is GestureDetector with Container 100% width and height.
```dart
@override
void initState() {
provider = widget.provider;
super.initState();
_setMenuState(true);
}
@override
void dispose() {
_setMenuState(false);
super.dispose();
}
void _doClose() {
provider.menuState = MenuState.CLOSING;
pop();
}
void _setMenuState(bool state) async {
// future.delayed.zero ensures everything gets rendered first,
// after all is done, we move to the next frame.
await Future.delayed(Duration.zero);
if (state) {
provider.menuState = MenuState.OPEN;
} else {
provider.menuState = MenuState.CLOSED;
}
}
@override
Widget build(BuildContext context) {
return Stack(
fit: StackFit.loose,
children: [
Container(
color: Colors.transparent,
child: GestureDetector(
onTap: () => _doClose(),
),
width: double.infinity,
height: double.infinity,
),
Drawer(
child: SafeArea(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
GestureDetector(
onTap: () => _doClose(),
child: Padding(
padding: EdgeInsets.only(
left: Margins.edgeMargin,
top: Margins.small,
bottom: Margins.small),
child: CustomPaint(
size: Size.square(25),
painter: _ClosePainter(),
),
),
),
```
That being said, I think that handling the drawer and trying to update the animation/listen to the callbacks isn't implemented properly. For basics, it does its job perfect, doing anything fancier will be mostly something you will have to created completely by your own (aka implementing your own Drawer). | c: new feature,framework,f: material design,P3,team-design,triaged-design | low | Major |
448,888,611 | angular | Uncaught Error while prerendering during ng build --prod | # 🐞 bug report
### Affected Package
\node_modules\zone.js\dist\zone-node.js:814:31
### Description
During the build of my application I get an “Uncaught in promise Error” thrown by zone-node.js:831. My application has just one Promise with a catch block. So, this Uncaught error should not be thrown.
The "rejected" status of the promise comes from a http request which fails.
## 🔬 Minimal Reproduction
https://github.com/kemler89/uncaught-error
Short summary:
The project contains a service (AppConfigService) which loads a Json-Config file as runtime configuration file of the application. The load functionality will be handled in the loadAppConfig method which returns a promise – because the APP_INITIALIZER only supports promises as of now. For the error handling the promise has a catch block. To load the runtime configuration before the application has started the AppConfigService will be executed when the application gets initialized. This will be handled in app-config.module.ts
Step to reproduce:
just run "ng build"
The console will show the following error:
ERROR { Error: Uncaught (in promise): Error
expected behavior would be that no error occurs because the error will be caught in app-config.service.ts
To avoid the error you have to run "ng serve" and change the path to the json file from './assets/data/appConfig.json' to 'http://localhost:4200/assets/data/appConfig.json' in app.module.ts
now "ng build" will run without the ERROR.
## 🔥 Exception or Error
ERROR { Error: Uncaught (in promise): Error
at resolvePromise (P:\Projekte\uncaught-error\node_modules\zone.js\dist\zone-node.js:831:31)
at P:\Projekte\uncaught-error\node_modules\zone.js\dist\zone-node.js:741:17
at SafeSubscriber._error (P:\Projekte\uncaught-error\node_modules\rxjs\internal\Observable.js:99:89)
at SafeSubscriber.__tryOrUnsub (P:\Projekte\uncaught-error\node_modules\rxjs\internal\Subscriber.js:205:16)
at SafeSubscriber.error (P:\Projekte\uncaught-error\node_modules\rxjs\internal\Subscriber.js:156:26)
at Subscriber._error (P:\Projekte\uncaught-error\node_modules\rxjs\internal\Subscriber.js:92:26)
at Subscriber.error (P:\Projekte\uncaught-error\node_modules\rxjs\internal\Subscriber.js:72:18)
at MapSubscriber.Subscriber._error (P:\Projekte\uncaught-error\node_modules\rxjs\internal\Subscriber.js:92:26)
at MapSubscriber.Subscriber.error (P:\Projekte\uncaught-error\node_modules\rxjs\internal\Subscriber.js:72:18)
at FilterSubscriber.Subscriber._error (P:\Projekte\uncaught-error\node_modules\rxjs\internal\Subscriber.js:92:26)
at FilterSubscriber.Subscriber.error (P:\Projekte\uncaught-error\node_modules\rxjs\internal\Subscriber.js:72:18)
at MergeMapSubscriber.OuterSubscriber.notifyError (P:\Projekte\uncaught-error\node_modules\rxjs\internal\OuterSubscriber.js:26:26)
at InnerSubscriber._error (P:\Projekte\uncaught-error\node_modules\rxjs\internal\InnerSubscriber.js:31:21)
at InnerSubscriber.Subscriber.error (P:\Projekte\uncaught-error\node_modules\rxjs\internal\Subscriber.js:72:18)
at ZoneTask.onComplete [as callback] (P:\Projekte\uncaught-error\node_modules\@angular\platform-server\bundles\platform-server.umd.js:379:34)
at ZoneDelegate.invokeTask (P:\Projekte\uncaught-error\node_modules\zone.js\dist\zone-node.js:423:31)
rejection: Error,
## 🌍 Your Environment
**Angular Version:**
7.2.15
| type: bug/fix,freq1: low,area: core,state: needs more investigation,P3 | low | Critical |
448,905,159 | flutter | Add SliverFillRemaining with option to keep space for another follow up widget | Right now, SliverFillRemaining fills all remaining space. It would be nice to have a Sliver widget that fills the space minus some configurable bottom space so that you can add a SliverList below it that is always partially visible and can be scrolled up.
<sub>Sent with <a href="http://githawk.com">GitHawk</a></sub> | c: new feature,framework,f: scrolling,P3,team-framework,triaged-framework | low | Minor |
448,920,428 | go | x/sys/windows: wrong value of S_IFMT mask on Windows/plan9 | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.12.5 windows/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Cyco\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\projects\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Cyco\AppData\Local\Temp\go-build338162002=/tmp/go-build -gno-record-gcc-switches
</pre></details>
It seems that value of syscall.S_IFMT mask is wrong on Windows/Plan9. It is defined as 0x1f000 while it is defined as 0xf000 on other platforms.
I had previously entered an issue on the sftp package page:
https://github.com/pkg/sftp/issues/291
The code is testing the result of an SSH_FXP_STAT request on an AIX server. It tests the filemode bits with syscall.S_IFMT mask. The results should be S_IFDIR, but the mask tests an extra bit that is used as S_IFJOURNAL on AIX, hence failing to get the correst value.
```
input filemode bits are 1 0100 0011 1111 1111
syscall.S_IFMT mask bits are 1 1111 0000 0000 0000
```
The different values tested are:
```
S_IFBLK 0 0110 0000 0000 0000
S_IFCHR 0 0010 0000 0000 0000
S_IFDIR 0 0100 0000 0000 0000
S_IFIFO 0 0001 0000 0000 0000
S_IFLNK 0 1010 0000 0000 0000
S_IFREG 0 1000 0000 0000 0000
S_IFSOCK 0 1100 0000 0000 0000
```
As you can see, none of the values match the input, and the leftmost bit is not used by any value.
The input would match S_IFDIR if the S_IFMT mask didn't test the leftmost bit.
| OS-Windows,NeedsInvestigation,compiler/runtime | low | Critical |
448,925,653 | svelte | simplify safe_not_equal and not_equal? | I was doing some profiling the other day and was mildly surprised to find that a lot of the time spent in Svelte — possibly even most? — was in `safe_not_equal`. It occurs to me that we might see some performance gains by changing the implementations thusly:
```diff
+function is_mutable(type) {
+ return type === 'object' || type === 'function';
+}
+
export function safe_not_equal(a, b) {
- return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
+ return a !== b || a && is_mutable(typeof a);
}
export function not_equal(a, b) {
- return a != a ? b == b : a !== b;
+ return a !== b;
}
```
The downside is that setting `x` to `NaN` would trigger an update if `x` was already `NaN`. But I'm pretty sure that's a small enough edge case that we needn't worry about it | compiler | low | Major |
448,983,283 | bitcoin | Bitcoin Core on mainnet shows testnet3 dir as a wallet to open and allows opening it | If you use both mainnet and testnet3 on the same machine, in default configuration `testnet3` directory is under mainnet Bitcoin datadir. If you have also testnet wallet there (`testnet3/wallet.dat` file), it will show `testnet3` directory in `bitcoin-cli listwalletdir` and "File > Open Wallet" list in GUI and actually allow to open it in mainnet. Don't think this is the expected behaviour. | Wallet | low | Major |
449,045,749 | go | net/http: make Transport return a net.Conn Response.Body on successful CONNECT | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
go version
go version go1.12.5 linux/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/kamran.khan/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/kamran.khan/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build603500370=/tmp/go-build -gno-record-gcc-switches"
</pre></details>
### What did you do?
```
req := &http.Request{
Method: "CONNECT",
URL: &url.URL{
Scheme: "https",
Host: proxyHost,
Opaque: addr,
},
}
req.Host = proxyHost
res, err := http.DefaultClient.Do(req)
if err != nil {
return errors.Annotate(err, "error connecting to https proxy")
}
if res.StatusCode < 200 || res.StatusCode > 299 {
panic(fmt.Sprintf("error connecting to https proxy, status: %d", res.StatusCode))
}
conn, ok := res.Body.(net.Conn)
if ok != true {
return errors.New(fmt.Sprintf("res.Body is not a net.Conn, it has type %s", reflect.TypeOf(res.Body)))
}
_ = tls.Client(conn, tlsConfig)
```
### What did you expect to see?
As per #17227, `res.Body` should be a `net.Conn` after successful `CONNECT`.
### What did you see instead?
Instead it is of the type `*http.bodyEOFSignal`
@bradfitz can you please take a look?
| help wanted,NeedsFix | low | Critical |
449,071,158 | nvm | "nvm use" gets stuck in inifinite loop causing a fork bomb | <!-- Thank you for being interested in nvm! Please help us by filling out the following form if you‘re having trouble. If you have a feature request, or some other question, please feel free to clear out the form. Thanks! -->
- Operating system and version:
Linux bash 4.2 terminal on web host
- `nvm debug` output:
```nvm --version: v0.34.0
$SHELL: /bin/bash
$SHLVL: 1
$HOME: /home/domainnamehere
$NVM_DIR: '$HOME/.nvm'
$PATH: /usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin:/opt/cpanel/composer/bin:$HOME/.local/bin:$HOME/bin
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)'
uname -a: 'Linux 3.10.0-962.3.2.lve1.5.24.9.el7.x86_64 #1 SMP Wed Feb 13 08:24:50 EST 2019 x86_64 x86_64 x86_64 GNU/Linux'
curl: /bin/curl, curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.36 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
wget: /bin/wget, GNU Wget 1.14 built on linux-gnu.
git: /usr/local/cpanel/3rdparty/lib/path-bin/git, git version 2.19.1
grep: alias grep='grep --color=auto'
/bin/grep (grep --color=auto), grep (GNU grep) 2.20
awk: /bin/awk, GNU Awk 4.0.2
sed: /bin/sed, sed (GNU sed) 4.2.2
cut: /bin/cut, cut (GNU coreutils) 8.22
basename: /bin/basename, basename (GNU coreutils) 8.22
rm: /bin/rm, rm (GNU coreutils) 8.22
mkdir: /bin/mkdir, mkdir (GNU coreutils) 8.22
xargs: /bin/xargs, xargs (GNU findutils) 4.5.11
```
(Omitted the last lines as nvm is being started with --no-use)
- `nvm ls` output:
``` v12.3.1```
- How did you install `nvm`? (e.g. install script in readme, Homebrew):
Using the install script `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash`
- What steps did you perform?
I've added --no-use to the end of my .bashrc so that I can at least access the terminal before the issue occurs, but once I have terminal access I tried calling `nvm use default` to load node
- What happened?
the number of resources being used on the server ballooned to the point where I was only getting `bash: fork: retry: no child processes` and `bash: fork: retry: resource temporarily unavailable`
- What did you expect to happen?
nvm use node without creating a fork bomb/depleting all server resources. The issue doesn't occur when `nvm use` isn't called, or if I don't let nvm start at all
- Is there anything in any of your profile files (`.bashrc`, `.bash_profile`, `.zshrc`, etc) that modifies the `PATH`?
.bash_profile contains the following:
```
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
``` | bugs,pull request wanted | medium | Critical |
449,078,909 | vue-element-admin | element改为按需引入后会报错 |
## Bug report(问题描述)
elementui改为按需引入后出现报错,
报错信息Uncaught ReferenceError: _MessageBox is not defined
#### Steps to reproduce(问题复现步骤)
1. npm i -D vue-cli-plugin-element babel-plugin-component
2. babel.config.js添加element配置
3. main.js改为按需引入
#### Screenshot or Gif(截图或动态图)




#### Other relevant information(格外信息)
- Your OS: window 10
- Node.js version: v10.15.3
- vue-element-admin version: v4.2.1
| not vue-element-admin bug | low | Critical |
449,087,352 | TypeScript | Type narrowing not working for unions of tuples with object literals | It's not possible to narrow unions of tuples with object literals
**TypeScript Version:** 3.4.5, 3.5.0-rc
**Search Terms:** tuple narrow object literals
**Code**:
Narrowing tuples with primitive types works as expected:
``` ts
type X = ["a", "c"] | ["b", "b"]
function bar(x: X) {
if (x[0] === "b") {
return x[1] === "c" // correctly narrows to "c", shows "condition always false"
}
}
```
However, when the tuple contains object literals, narrowing doesn't work at all:
``` ts
interface A { data: "a" }
interface B { data: "b" }
interface C { data: "c" }
type Y = [A, C] | [B, B]
function foo(y: Y) {
if (y[0].data === "b") {
return y[1].data === "c" // incorrectly narrows to "c" | "b"
}
}
```
**Expected behavior:**
The object literal within the tuple is correctly narrowed down to type `B`
**Actual behavior:**
The object literal is not narrowed, leaving it at type `C | B`.
**Playground Link:** [Link](https://www.typescriptlang.org/play/#src=type%20X2%20%3D%20%5B%22a%22%2C%20%22c%22%5D%20%7C%20%5B%22b%22%2C%20%22b%22%5D%0D%0A%0D%0Afunction%20bar(x2%3A%20X2)%20%7B%0D%0A%20%20if%20(x2%5B0%5D%20%3D%3D%3D%20%22b%22)%20%7B%0D%0A%20%20%20%20return%20x2%5B1%5D%20%3D%3D%3D%20%22c%22%20%2F%2F%20correctly%20narrows%20to%20%22c%22%0D%0A%20%20%7D%0D%0A%7D%0D%0A%0D%0Ainterface%20A%20%7B%20data%3A%20%22a%22%20%7D%0D%0Ainterface%20B%20%7B%20data%3A%20%22b%22%20%7D%0D%0Ainterface%20C%20%7B%20data%3A%20%22c%22%20%7D%0D%0A%0D%0Atype%20X1%20%3D%20%5BA%2C%20C%5D%20%7C%20%5BB%2C%20B%5D%0D%0A%0D%0Afunction%20foo(x1%3A%20X1)%20%7B%0D%0A%20%20if%20(x1%5B0%5D.data%20%3D%3D%3D%20%22b%22)%20%7B%0D%0A%20%20%20%20return%20x1%5B1%5D.data%20%3D%3D%3D%20%22c%22%20%2F%2F%20incorrectly%20narrows%20to%20%22c%22%20%7C%20%22b%22%0D%0A%20%20%7D%0D%0A%7D%0D%0A)
**Related Issues:**
#26323
#24120
#10530
| Bug,Needs Proposal,Domain: Control Flow | low | Major |
449,104,475 | youtube-dl | Site Support Request: videos.tennis.com | <!--
######################################################################
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:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2019.05.20. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->
- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2019.05.20**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones
## Example URLs
<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->
- Single video: http://videos.tennis.com/m/moGwp0EJ/a-kerber-first-round-loss?list=PYT1u8U8
- Single video: http://videos.tennis.com/m/JCxuKRot/n-djokovic-pre-tournament?list=PYT1u8U8
| site-support-request | low | Critical |
449,125,201 | flutter | Would like to be able to pass configuration from flutter build to gradle | Is it possible to do a custom parameter in yaml and get it out of gradle
| c: new feature,tool,t: gradle,P3,team-tool,triaged-tool | low | Minor |
449,127,788 | pytorch | Error when creating new caffe2::Predictor(_initNet, _predictNet) | ## 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
ML Framework used: Caffe2
IDE for Android: Android Studio
## Issue
We intend to create an Android app that runs super-resolution models on images from the gallery. We ran the example code based on https://github.com/caffe2/AICamera on Android, where we replaced the files used in _initNet and _predictNet (originally squeeze_init_net.pb & squeeze_predict_net.pb) with our own .pb models, but we encountered an error when creating the caffe2::Predictor(initNet, predictNet) instance:
```
extern "C"
JNIEXPORT void JNICALL
Java_com_ufo_orbital_ResultActivity_initCaffe2(JNIEnv *env, jobject /* this */, jobject assetManager) {
AAssetManager *mgr = AAssetManager_fromJava(env, assetManager);
alog("Attempting to load protobuf netdefs...");
loadToNetDef(mgr, &_initNet, "superres_init_net_CPU.pb");
loadToNetDef(mgr, &_predictNet,"superres_predict_net_CPU.pb");
alog("done.");
alog("Instantiating predictor...");
_predictor = new caffe2::Predictor(_initNet, _predictNet);
alog("done.")
}
```
Error inside "Run":
```
E/AIsCamera: Attempting to load protobuf netdefs...
E/AIsCamera: done.
Instantiating predictor...
E/native: [E operator.cc:153] Cannot find operator schema for ATen. Will skip schema checking.
A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 28039 (AsyncTask #1), pid 27852 (com.ufo.deblur)
```
## Environment
You can refer to the
https://github.com/RusdiHaizim/deblur2/blob/master/AICamera/app/src/main/cpp/native-lib.cpp
link for the full description of the cpp native file.
## To reproduce
1. Clone the github repo from https://github.com/RusdiHaizim/deblur2
2. Build the project and Run on an android device
3. Choose the "Upload Image" Icon, Select any picture, then click "Deblur"
4. The App should take you back to the app's main screen, with the error log inside Android Studio (or your own IDE)
## Additional context
We are a team of two that are new to Machine Learning (especially to Caffe2) and Android Development. Any help would be appreciated!
| caffe2 | low | Critical |
449,221,237 | pytorch | How to use Infiniband for cpu-cluster with backend gloo? | Now I'm trying to build pytorch from source for my cpu-cluster with backend gloo.
After installing pytorch, I got this information from install summay:
```
-- USE_DISTRIBUTED : True
-- USE_MPI : ON
-- USE_GLOO : ON
-- USE_GLOO_IBVERBS : 1
```
In my cluster, the network interface "eno1" represents Ethernet, and "ib0" represents Infiniband.
I set the environment variable `GLOO_SOCKET_IFNAME=eno1`, and distributed pytorch works fine. But when I set `GLOO_SOCKET_IFNAME=ib0`, it will cause some error.
What should I do?
Thanks. | oncall: distributed,triaged | low | Critical |
449,232,650 | flutter | Flutter driver NoSuchMethodError: The method 'group' was called on null. |
approvals_progress_page_test.dart
`
import 'dart:async';
import 'package:flutter_driver/flutter_driver.dart';
import 'package:test_api/test_api.dart';
void main() {
group('scrolling performance test',() {
FlutterDriver driver;
setUpAll(() async {
driver = await FlutterDriver.connect();
});
tearDownAll(() async {
if (driver != null)
driver.close();
});
test('measure', () async {
final Timeline timeline = await driver.traceAction(() async {
await driver.tap(find.text('Material'));
final SerializableFinder demoList = find.byValueKey('ApprovalsPage');
for (int i = 0; i < 5; i++) {
await driver.scroll(demoList, 0.0, -300.0, const Duration(milliseconds: 300));
await Future<void>.delayed(const Duration(milliseconds: 500));
}
// Scroll up
for (int i = 0; i < 5; i++) {
await driver.scroll(demoList, 0.0, 300.0, const Duration(milliseconds: 300));
await Future<void>.delayed(const Duration(milliseconds: 500));
}
});
TimelineSummary.summarize(timeline)
..writeSummaryToFile('home_scroll_perf', pretty: true)
..writeTimelineToFile('home_scroll_perf', pretty: true);
});
});
}
`
error:
`
Unhandled exception:
NoSuchMethodError: The method 'group' was called on null.
Receiver: null
Tried calling: group("scrolling performance test", Closure: () => Null, onPlatform: null, retry: null, skip: null, solo: false, tags: null, testOn: null, timeout: null)
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
#1 group (package:test_api/test_api.dart:179:13)
#2 main (file://VSCode_workspace/hello_word/test_driver/approvals_progress_page_test.dart:9:3)
#3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:300:19)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:171:12)
` | a: tests,framework,P2,team-framework,triaged-framework | low | Critical |
449,256,163 | pytorch | [utils.bottleneck] throws initialization error for cuda profiling | ## 🐛 Bug
When I execute example/mnist/main.py on Colab/Local Machine with cuda,
it throws initialization error.
If I add --no-cuda flag, it works fine
```
terminate called after throwing an instance of 'std::runtime_error'
what(): /pytorch/torch/csrc/autograd/profiler_cuda.cpp:22: initialization error
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 511, in _try_get_batch
data = self.data_queue.get(timeout=timeout)
File "/usr/lib/python3.6/queue.py", line 173, in get
self.not_empty.wait(remaining)
File "/usr/lib/python3.6/threading.py", line 299, in wait
gotit = waiter.acquire(True, timeout)
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/signal_handling.py", line 63, in handler
_error_if_any_worker_fails()
RuntimeError: DataLoader worker (pid 6815) is killed by signal: Aborted.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/torch/utils/bottleneck/__main__.py", line 231, in <module>
main()
File "/usr/local/lib/python3.6/dist-packages/torch/utils/bottleneck/__main__.py", line 210, in main
autograd_prof_cpu, autograd_prof_cuda = run_autograd_prof(code, globs)
File "/usr/local/lib/python3.6/dist-packages/torch/utils/bottleneck/__main__.py", line 104, in run_autograd_prof
result.append(run_prof(use_cuda=True))
File "/usr/local/lib/python3.6/dist-packages/torch/utils/bottleneck/__main__.py", line 98, in run_prof
exec(code, globs, None)
File "examples/mnist/main.py", line 116, in <module>
main()
File "examples/mnist/main.py", line 109, in main
train(args, model, device, train_loader, optimizer, epoch)
File "examples/mnist/main.py", line 30, in train
for batch_idx, (data, target) in enumerate(train_loader):
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 576, in __next__
idx, batch = self._get_batch()
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 543, in _get_batch
success, data = self._try_get_batch()
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 519, in _try_get_batch
raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str))
RuntimeError: DataLoader worker (pid(s) 6815) exited unexpectedly
```
## To Reproduce
Steps to reproduce the behavior:
On Google Colab, execute as follows,
```
!git clone http://github.com/pytorch/examples
!python -m torch.utils.bottleneck examples/mnist/main.py --epochs 1 --batch-size=256
```
## Expected behavior
Profiling works, not throws initialization error.
## Environment
```
processor =>2
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 63
model name : Intel(R) Xeon(R) CPU @ 2.30GHz
stepping : 0
microcode : 0x1
cpu MHz : 2300.000
cache size : 46080 KB
PyTorch version: 1.1.0
Is debug build: No
CUDA used to build PyTorch: 10.0.130
OS: Ubuntu 18.04.2 LTS
GCC version: (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0
CMake version: version 3.12.0
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.0.130
GPU models and configuration: GPU 0: Tesla T4
Nvidia driver version: 410.79
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.5.1
Versions of relevant libraries:
[pip3] msgpack-numpy==0.4.3.2
[pip3] numpy==1.16.3
[pip3] torch==1.1.0
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.3.1
[pip3] torchvision==0.2.2.post3
[conda] Could not collect
```
## Additional context
| module: dataloader,triaged | low | Critical |
449,281,268 | rust | Rust 1.35.0 x86_64-unknown-linux-musl has multiple definition of `__errno_location` | This is breakage between 1.34(.2) and 1.35.0.
1.34 worked fine, 1.35 not any more. We are building `x86_64-unknown-linux-musl` using musl 1.1.22 (with clang).
```
/opt/musl/lib/libc.a(__errno_location.lo): In function `___errno_location': src/errno/__errno_location.c:(.text.__errno_location+0x0): multiple definition of `__errno_location'
/tmp/rustcHiVA0H/liblibc-a19d328d73c1ea73.rlib(__errno_location.lo):__errno_location.c:(.text.__errno_location+0x0): first defined here
```
The following Dockerfile can be used to demonstrate the issue. It's quite long because of building both `musl` and `libressl` for Musl compilation.
```dockerfile
FROM rust:1.35.0
# ^-- 1.35.0 build breaks, 1.34.2 here and build is good
ENV TARGET=x86_64-unknown-linux-musl
ARG LIBRESSL=libressl-2.9.1
ARG MUSL=musl-1.1.22
ARG DEBIAN_FRONTEND=noninteractive
RUN apt -y update && \
apt -y install clang && \
rustup target install ${TARGET}
RUN printf '[target.x86_64-unknown-linux-musl]\nlinker = "musl-clang"\n' >/usr/local/cargo/config
WORKDIR /work
RUN curl -fO https://www.musl-libc.org/releases/${MUSL}.tar.gz && \
tar zxf ${MUSL}.tar.gz && \
cd ${MUSL} && \
./configure CC=clang CFLAGS="-fPIC" --prefix=/opt/musl --enable-shared=no && \
make V=1 -j4 && \
make V=1 install
ENV PATH=/opt/musl/bin:$PATH
# We do Musl build hence point to correct tool
ENV CC_x86_64_unknown_linux_musl=musl-clang
# Musl is missing some kernel specific header files. Do symbolic links to fix
# this.
RUN \
ln -s /usr/include/linux /opt/musl/include/ && \
ln -s /usr/include/x86_64-linux-gnu/asm /opt/musl/include/ && \
ln -s /usr/include/asm-generic /opt/musl/include/
RUN curl -fO https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${LIBRESSL}.tar.gz && \
tar zxf ${LIBRESSL}.tar.gz && \
cd ${LIBRESSL} && \
./configure CC=musl-clang LD=musl-clang CFLAGS="-fPIC" --prefix=/opt/libressl --enable-shared=no --sysconfdir=/etc && \
make V=1 -j4 && make -j4 check && \
make install
ENV X86_64_UNKNOWN_LINUX_MUSL_OPENSSL_LIB_DIR=/opt/libressl/lib
ENV X86_64_UNKNOWN_LINUX_MUSL_OPENSSL_INCLUDE_DIR=/opt/libressl/include
# cargo-outdated is innocent crate, it's just to trigger the error in build
RUN cargo install --target=$TARGET cargo-outdated
```
This error seem to happen with some, but not all crates. For example `cargo-outdated` triggers the error while linking but building `bindgen` works fine. | A-linkage,T-compiler,O-musl,C-bug | low | Critical |
449,283,940 | rust | Enable PGO tests on `windows-gnu` | https://github.com/rust-lang/rust/pull/61080 enabled profiler for `windows-gnu` `dist` jobs and it seems to work.
I didn't know if CI has enough budget to enable it for tests as well so it was left for now but it should be enabled in the future.
Related issue: https://github.com/rust-lang/rust/issues/59637
@michaelwoerister you might want to add this issue to https://github.com/rust-lang/rust/issues/59913
@rustbot modify labels: +O-windows-gnu +T-infra | A-testsuite,O-windows-gnu,T-infra | low | Minor |
449,297,418 | pytorch | free(): invalid pointer Aborted (core dumped) | ## 🐛 Bug
I'm trying to run a simple network however, I run the program and it I get right a way the error:
free(): invalid pointer
Aborted (core dumped)
it doen't tells me where exactly is the problem.
## To Reproduce
You have to download to library from the git repository of fwilliams (https://github.com/fwilliams) fml and point_cloud_utils. And run the following code:
main.py :
```python
import argparse
import point_cloud_utils as pcu
import time
import numpy as np
import torch
import torch.nn as nn
from fml.nn import SinkhornLoss
import common
print(torch.__version__)
def main():
argparser = argparse.ArgumentParser()
argparser.add_argument("mesh_filename", type=str, help="Point cloud to reconstruct")
argparser.add_argument("--max-sinkhorn-iters", "-si", type=int, default=32,
help="Maximum number of Sinkhorn iterations")
argparser.add_argument("--sinkhorn-eps", "-se", type=float, default=1e-3,
help="Maximum number of Sinkhorn iterations")
argparser.add_argument("--learning-rate", "-lr", type=float, default=1e-3, help="Step size for gradient descent")
argparser.add_argument("--num-epochs", "-n", type=int, default=250, help="Number of training epochs")
argparser.add_argument("--device", "-d", type=str, default="cuda")
argparser.add_argument("--seed", "-s", type=int, default=-1)
args = argparser.parse_args()
if args.seed > 0:
seed = args.seed
common.seed_everything(seed)
else:
seed = np.random.randint(0, 2**32-1)
common.seed_everything(seed)
print("Using seed %d" % seed)
# x is a tensor of shape [n, 3] containing the positions of the vertices that
x = torch._C.from_numpy(common.loadpointcloud(args.mesh_filename)).to(args.device)
# t is a tensor of shape [n, 3] containing a set of nicely distributed samples in the unit cube
v, f = common.unit_cube()
t = torch._C.sample_mesh_lloyd(pcu.lloyd(v,f,x.shape[0]).astype(np.float32)).to(args.device) # sample randomly a point cloud (cube for now?)
# The model is a simple fully connected network mapping a 3D parameter point to 3D
phi = common.MLP(in_dim=3, out_dim=3).to(args.device)
# Eps is 1/lambda and max_iters is the maximum number of Sinkhorn iterations to do
emd_loss_fun = SinkhornLoss(eps=args.sinkhorn_eps, max_iters=args.max_sinkhorn_iters,
stop_thresh=1e-3, return_transport_matrix=True)
mse_loss_fun = torch.nn.MSELoss()
# Adam optimizer at first
optimizer = torch.optim.Adam(phi.parameters(), lr=args.learning_rate)
fit_start_time = time.time()
for epoch in range(args.num_epochs):
optimizer.zero_grad()
# Do the forward pass of the neural net, evaluating the function at the parametric points
y = phi(t)
# Compute the Sinkhorn divergence between the reconstruction*(using the francis library) and the target
# NOTE: The Sinkhorn function expects a batch of b point sets (i.e. tensors of shape [b, n, 3])
# since we only have 1, we unsqueeze so x and y have dimension [1, n, 3]
with torch.no_grad():
_, P = emd_loss_fun(phi(t).unsqueeze(0), x.unsqueeze(0))
# Project the transport matrix onto the space of permutation matrices and compute the L-2 loss
# between the permuted points
loss = mse_loss_fun(y[P.squeeze().max(0)[1], :], x)
# loss = mse_loss_fun(P.squeeze() @ y, x) # Use the transport matrix directly
# Take an optimizer step
loss.backward()
optimizer.step()
print("Epoch %d, loss = %f" % (epoch, loss.item()))
fit_end_time = time.time()
print("Total time = %f" % (fit_end_time - fit_start_time))
# Plot the ground truth, reconstructed points, and a mesh representing the fitted function, phi
common.visualitation(x,t,phi)
if __name__ == "__main__":
main()
```
common.py :
```python
from __future__ import absolute_import, division, print_function
import pathlib
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import socket
import math
import os
import sys
import numpy as np
import torch
import torch.nn as nn
import point_cloud_utils as pcu
import open3d
print(torch.__version__)
class MLP(nn.Module):
def __init__(self, in_dim: int, out_dim: int):
super().__init__()
self.in_dim = in_dim
self.out_dim = out_dim
self.fc1 = nn.Linear(in_dim, 128)
self.fc2 = nn.Linear(128, 256)
self.fc3 = nn.Linear(256, 512)
self.fc4 = nn.Linear(512, 512)
self.fc5 = nn.Linear(512, out_dim)
self.relu = nn.LeakyReLU()
def forward(self, x):
x = self.relu(self.fc1(x))
x = self.relu(self.fc2(x))
x = self.relu(self.fc3(x))
x = self.relu(self.fc4(x))
x = self.fc5(x)
return x
def loadpointcloud(file_name):
"""
Returns an array [n, 3] n the number of vertices.
:param file_name: The name of the mesh file to load
:return: An [n, 3] array of vertex positions
"""
data = []
#Open and save data
file = open("sphere.txt", "r")
for line in file:
data.append(line.split())
file.close()
# getting rid of empty lines
data = list(filter(None, data))
#getting rid of header
del data[0]
newdata = []
# safe only the vertices
for line in range(0,len(data)):
if len(data[line]) == 3:
newdata.append(data[line])
#mapping from string to float
for line in range(0,len(newdata)):
newdata[line] =list(map(float,newdata[line]))
# Transform it to an array
x=np.array([np.array(sli) for sli in newdata])
return x
#define cube mesh to sample it
def unit_cube():
mesh_box = o3d.geometry.create_mesh_box(width=1.0, height=1.0, depth=1.0)
mesh_box.compute_vertex_normals()
v = np.asarray(mesh_box.vertices)
f = np.asarray(mesh_box.triangles)
return v, f
# draw point cloud and contours
def visualitation(x,t,phi):
slice_points = x
recon_vertices = phi(t)
recon_color = np.array([0.7, 0.1, 0.1])
slices_color = np.array([0.1, 0.7, 0.1])
pcloud_recon = open3d.PointCloud()
pcloud_recon.points = open3d.Vector3dVector(recon_vertices)
pcloud_recon.paint_uniform_color(recon_color)
pcloud_slices = open3d.PointCloud()
pcloud_recon.points = open3d.Vector3dVector(slice_points)
pcloud_recon.paint_uniform_color(slices_color)
open3d.visualization.draw_geometries([pcloud_recon, pcloud_slices])
def seed_everything(seed):
if seed < 0:
seed = np.random.randint(np.iinfo(np.int32).max)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
np.random.seed(seed)
random.seed(seed)
return seed
```
## Expected behavior
I would expect that the network would run however the code doesn't even run and I don't know where I can find which part of the code is at fault. First I tried to see if the size of the tensor where correct and I do believe they are.
It should create a reconstruction from cross-sections of a 3d object, the output should be a point cloud.
## Environment
- PyTorch Version > 1.1.0
- Ubuntu: 18
- How I installed PyTorch: conda
- Python version: 3
- CUDA/cuDNN version: V9.1.85
- GPU models and configuration: Nvidia GTX 1050 Ti
## Additional context
You can find the sphere file here.
[sphere.txt](https://github.com/pytorch/pytorch/files/3228078/sphere.txt)
| needs reproduction,triaged | low | Critical |
449,328,384 | flutter | Animating marker google map | It would be great if Google Map for Flutter provided animating marker feature. I'd like to move marker smoothly on the polyline. Changing marker position according to polyline points is not a good idea because it costs a lot of CPU usage and the map starts lagging and also marker doesn't have smooth move on the polyline.
[Here](https://developers.google.com/maps/documentation/javascript/examples/overlay-symbol-animate) is the web version of animating markers
[Here](https://www.youtube.com/watch?v=WKfZsCKSXVQ&feature=youtu.be) is the android version of animating markers explanation
| c: new feature,a: animation,a: quality,customer: crowd,p: maps,package,c: proposal,team-ecosystem,P3,triaged-ecosystem | medium | Critical |
449,343,966 | flutter | [web] : Do not disconnect device on browser page close | The `flutter_web` workflow in Vs Code (even in general) is bad
These are the points that I didn't like about it after I used it for about a few minutes.
- No auto hot reload on the client side ([currently being implemented](https://github.com/flutter/flutter_web#getting-stateless-hot-reload-with-webdev))
- need to manually refresh (`ctrl+r`)
- A new instance of chrome browser is opened unlike `React` or any other web workflow which webdevs are used to
- create a new tab in the existing chrome window
- And that instance when closed kills the dev server (why 👎 )
- yelling `Lost connection to device.`
- even if another client is running on a different tab
- Uses some random port on each run
- when I type localhost on my search bar I get a lot of junk as the recommendations instead of plain old `localhost:3000`
**Platform**: Windows 10
Please note that web workflow is different from the android workflow.
**Request/Suggestion:** Make it somewhat like `React` workflow. | c: new feature,tool,platform-web,P3,team-web,triaged-web | low | Major |
449,362,322 | rust | Varargs are completely unchecked if passed as generics | I am trying to call the function DftiSetValue from the Intel Math Library. The function has the layout MKL_LONG DftiSetValue(DFTI_DESCRIPTOR_HANDLE, enum DFTI_CONFIG_PARAM, ...), the first is an 8 byte pointer (windows 64 bit), the second is an enum which is 4 bytes long, and the last parameter is a floating point number.
I can call this function from c++ just fine as a float or double, but cannot call this from rust without making it a double. This is with the enum being treated as 32 bit int, and I get an error if I try to call it with a u4 from the ux package. According to the documentation this function should be a float because I am using floating point fft precision.
I have attached some code that shows the fft being called with some sample values and you can see that one time it is called and returns all zeros which is incorrect and the second time it is called it comes back correctly with non-zero values.
[Example.zip](https://github.com/rust-lang/rust/files/3228689/Example.zip) | A-FFI,P-high,T-compiler,I-unsound,S-has-mcve,I-miscompile | low | Critical |
449,378,293 | TypeScript | [k in keyof EnumA] should show error | <!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!
Please help us by doing the following steps before logging an issue:
* Search: https://github.com/Microsoft/TypeScript/search?type=Issues
* Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
Please fill in the *entire* template below.
-->
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 3.4.0-dev.201xxxxx
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
**Code**
```ts
export const enum EnumA
{
a,
b,
}
export type Interface = {
[k in keyof EnumA]: (a: number, b: string) => void
// here should show error or a warn message, because it is enum
}
let a: Interface = {
a(a, b)
{
console.log(a.toFixed(), b.blink());
},
b(a, b)
{
console.log(a.toFixed(), b.blink());
},
}
```
**Expected behavior:**
> error or a warn message, and tell use `[k in keyof typeof EnumA]`
**Actual behavior:**
> no error
**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
**Related Issues:** <!-- Did you find other bugs that looked similar? -->
| Suggestion,In Discussion | low | Critical |
449,379,780 | TypeScript | Transpiling async/await to promises instead of generators for es5 | ## Search Terms
transpile async promise
## Suggestion
When `target` is `ES5`, allow an option to transpile async/await to Promises rather than switches. This would require Promises to be polyfilled, hence would be optional.
## Old issue for this
This was previously discussed on [this issue](https://github.com/Microsoft/TypeScript/issues/11725) but was closed with this comment by @mhegazy:
> this may be true for code with small list of await expressions. but it does not scale for the general case. once you have a loop with an await expression, you can not use promises.
@mhegazy can you explain this? I have used `fast-async` to transpile loops to promises before. Is there some edge-case where it is not possible?
## Use Cases
Current approach creates emitted code that cannot be source-mapped properly by some debuggers.
## Examples
```
export const foo = async (): Promise<number> => await Promise.resolve(1) + 1;
```
Currently emits this:
```
exports.foo = function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, Promise.resolve(1)];
case 1: return [2 /*return*/, (_a.sent()) + 1];
}
}); }); };
```
Instead it should emit something like this (output from [fast-async](https://github.com/MatAtBread/fast-async):
```
exports.foo = function foo() {
return new Promise(function ($return, $error) {
return Promise.resolve(1).then(function ($await_7) {
return $return($await_7 + 1);
}.$asyncbind(this, $error), $error);
});
};
```
# Loops
Here's an example of `fast-async` transpiling a loop:
```
async function Foo() {
for (let x = 0; x < 5; x++) {
console.log("FOO: " + await Promise.resolve(x));
}
}
```
becomes
```
function Foo() {
return new Promise(function ($return, $error) {
var x;
x = 0;
function $Loop_4_step() {
x++;
return $Loop_4;
}
function $Loop_4() {
if (x < 5) {
return Promise.resolve(x).then(function ($await_6) {
console.log("FOO: " + $await_6);
return $Loop_4_step;
}.$asyncbind(this, $error), $error);
} else return [1];
}
return Function.$asyncbind.trampoline(this, $Loop_4_exit, $Loop_4_step, $error, true)($Loop_4);
function $Loop_4_exit() {
return $return();
}
});
}
```
Here's a while loop:
```
async function Foo() {
let x = 0;
while (x < 5) {
x += await Promise.resolve(1);
console.log("FOO: " + x);
}
}
```
transpiles to:
```
function Foo() {
return new Promise(function ($return, $error) {
var x;
x = 0;
function $Loop_4() {
if (x < 5) {
return Promise.resolve(1).then(function ($await_6) {
x += $await_6;
console.log("FOO: " + x);
return $Loop_4;
}.$asyncbind(this, $error), $error);
} else return [1];
}
return Function.$asyncbind.trampoline(this, $Loop_4_exit, $Loop_4, $error, true)($Loop_4);
function $Loop_4_exit() {
return $return();
}
});
}
```
| Suggestion,Awaiting More Feedback | low | Critical |
449,379,892 | TypeScript | JSDoc @name tag does not function | - VSCode Version: 1.33.1
- OS Version: Windows 7 x86_64 (but I do not think that is relevant)
- Does this issue occur when all extensions are disabled?: `Yes`
## Steps to Reproduce:
1. Write in a file with `.js` or `.ts` extension the below sample code:
```jsx
/**
Construct a new component
@class Component
@classdesc A generic component
@param {Object} options - Options to initialize the component with
@param {String} options.name - This component's name, sets {@link Component#lastProperty}
@param {Boolean} options.visible - Whether this component is vislble, sets {@link Component#firstProperty}
*/
function Component(options) {
/**
Whether this component is visible or not
@name Component#firstProperty
@type Boolean
@default false
*/
this.firstProperty = options.visible;
/**
This component's name
@name Component#lastProperty
@type String
@default "Component"
@readonly
*/
Object.defineProperty(this, 'lastProperty', {
value: options.name || 'Component',
writable: false
});
}
const myComponent = new Component({});
```
2. on a new line at the end of the document type `myComponent` with a dot at its end.
3. While the text-cursor is after the dot, press `Ctrl+Space` to open the auto-completion list.
## Current Behavior:
When you chose `.js` as file extension, only `firstProperty` is in the auto-completion list (with its type comment and so on).
But when you have it in a file with `.ts` extension, none of `firstProperty` and `lastProperty` will be detected, and JSDoc seems useless.
## Expected Behavior:
Both `firstProperty` and `lastProperty` should be detected and get placed in the auto-completion list, and that no matter which of `.js` or `.ts` file extensions we are using. | Suggestion,Awaiting More Feedback | low | Major |
449,382,230 | rust | Suggest alternative return type for `Option`s and `Result`s | Given the following code:
```rust
fn main() {
let _ = vec[1].iter().next()?;
Some(())
}
```
Rust reports an error for using `?` and suggests adding `;` after the `Some(())`. A preferrable Option (pun intended) is to suggest changing the return type to `Option<()>` when the body's result type is `Option<_>` and there exists at least one `?` in the body. Similarly, if we have `Result`s, we might want to try to infer a useful return type, e.g.
```rust
fn main() {
let _ = std::fs::File::open("foo.txt")?;
Ok(())
}
```
cc @estebank (diagnostics) | C-enhancement,A-diagnostics,T-compiler,A-suggestion-diagnostics,D-papercut | low | Critical |
449,382,808 | flutter | Revive the "set marker icon" sample for Google Maps | Following a breaking change to the ImageStream API in the framework(https://github.com/flutter/flutter/pull/32936) the Google Maps plugin sample app needs to be updated to the new API.
As we make sure to keep plugins working agains stable we cannot apply the update before the framework change makes it to stable. But if we do not apply the change, the plugins' CI is red as it's running with master.
For now, I'm updating the sample app to the new framework API, but commenting out the "set marker icon" sample until the framework change makes it to master.
Once the framework change makes it to stable we should uncomment that code. | d: examples,p: maps,package,team-ecosystem,P2,triaged-ecosystem | low | Major |
449,406,670 | flutter | Support interactive transitions between routes (i.e., controlled by gesture) | ## Use case
Transition from one route to another via transition. An example of this is the drag-to-pop gesture implemented by CupertinoPageRoute:
https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/cupertino/route.dart#L315
Implementing this involves a ton of boilerplate and is not intuitive. Since interactive transitions are a big part of mobile development (particularly on iOS), it seems that built-in framework support ought to be a priority.
## Proposal
There are many ways to implement this. One option would be to extend transitionBuilder() such that a gesture can intercept and drive the primary transition animation. Alternatively, a mixin can be provided to implement the boilerplate in such a way that the transition built by transitionBuilder() can be easily augmented to support a gesture.
It may also be possible to simply provide better documentation on how to build this with the existing tools. I've included my best attempt at describing the process, below.
## Suggested Documentation (Rough Draft)
* Hook into your route's transition (via buildTransitions) by wrapping the child with a custom gesture detector, as described in following steps.
* Remember to disable the geture detector if (1) the primary animation is not completed or (2) the secondary animation is not dismissed or (4) anything else is happening that should inhibit the navigation gesture
* This list may be incomplete
* Use a Listener and a Stack to capture pointer events, and feed these to a GestureRecognizer (addPointer
* Open question: why a listener and not a GestureDetector?
* Delegate important events from the GestureRecognizer to a custom controller, converting to logical coordinates (gesture recognizers will report physical coordinates)
* The controller must have a reference to the transition's private animation controller (thus, you will also need to have subclassed a ModalRoute and not just used PageRouteBuilder)
* The controller must invoke NavigatorState.didStartUserGesture() so the Navigator can prepare the route below
* On gesture updates, tweak the animation.value in proportion to the gesture (this corresponds to the underlying TransitionRoute's AnimationController). This is safe because we ensured that no animation is currently playing in the first step.
* On gesture complete, determine whether the gesture succeeded or failed (e.g., for a drag, if the drag crossed the midpoint or exceeded a certain upward velocity, succeed; else, fail)
* Animate forward or back. In either case, you should invoke Navigator.push() or Navigator.pop().
* Remember that push() and pop() will trigger the transition animation to play via .forward() or .reverse()
* You can specify a different curve / target using animateTo or animateBack (it's okay to interrupt the animation, as long as you confirm it's playing and not done via isAnimating())
* When the animation completes (note: it can complete instantly, if everything was gesture'd into the correct position, so use isAnimating() to check) you must invoke didStopUserGesture() | framework,a: animation,f: routes,c: proposal,P3,team-framework,triaged-framework | medium | Critical |
449,419,943 | pytorch | Zero-dim Tensors (scalars) should be printed at full precision | ## 🚀 Feature
The string representation of zero-dimensional Tensors should be sufficient to exactly reconstruct their value.
Ideally it should also print using the minimal number of digits. For example, we should avoid printing 1.0/10.0 as `0.100000001`.
## Motivation
We've had a number of bug reports where some value looks like 1.0 but is actually larger than 1. Many people don't know that you need to call `item()` to get an exact value.
NumPy uses the Dragon4 algorithm (Guy & Steele, 1990). Their implementation is here:
https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/dragon4.c
The algorithm is described here:
http://kurtstephens.com/files/p372-steele.pdf (retrospective, 2004)
| module: printing,triaged | low | Critical |
449,420,299 | go | cmd/go: improve error message when a module is successfully fetched but not in the sum db | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
go version devel +0f897f916a Tue May 28 02:52:39 2019 +0000 linux/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes.
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/tbp/.cache/go-build"
GOENV="/home/tbp/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/tbp/go"
GOPROXY="https://proxy.golang.org"
GOROOT="/home/tbp/code/gotip"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/tbp/code/gotip/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/tmp/bar/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build702923268=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version devel +0f897f916a Tue May 28 02:52:39 2019 +0000 linux/amd64
GOROOT/bin/go tool compile -V: compile version devel +0f897f916a Tue May 28 02:52:39 2019 +0000
uname -sr: Linux 4.19.28-2rodete1-amd64
Distributor ID: Debian
Description: Debian GNU/Linux rodete
Release: rodete
Codename: rodete
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Debian GLIBC 2.24-12) stable release version 2.24, by Roland McGrath et al.
</pre></details>
### What did you do?
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
```
$ GOPROXY=https://proxy.golang.org GONOPROXY=github.com/tbpg go get github.com/tbpg/modules-testing
verifying github.com/tbpg/[email protected]/go.mod: github.com/tbpg/[email protected]/go.mod: reading https://sum.golang.org/lookup/github.com/tbpg/[email protected]: 410 Gone
```
### What did you expect to see?
I'm not sure we should make this change (might not want to make it obvious, for some sense of the word, how to disable the sum db).
The solution, in this case, is to add `GONOSUMDB=github.com/tbpg`. Could we mention `GONOSUMDB` in the error message?
### What did you see instead?
`410 Gone`
cc @FiloSottile @bcmills
Related to #32184, which would have prevented this error. | NeedsInvestigation,modules | low | Critical |
449,421,844 | TypeScript | [Feature request] allow emit param name when emitDecoratorMetadata | <!-- 🚨 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 -->
## Suggestion
> allow emit param name when emitDecoratorMetadata
## Use Cases
```ts
class C1
{
@d1
m1(a: string): string
{
return null;
}
}
function d1(target: Object,
propertyKey: string,
descriptor: TypedPropertyDescriptor<any>)
{
return descriptor;
}
```
## Examples
.js
```js
class C1 {
m1(a) {
return null;
}
}
__decorate([
d1,
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:paramnames", ['a']),
__metadata("design:returntype", String)
], C1.prototype, "m1", null);
function d1(target, propertyKey, descriptor) {
return descriptor;
}
```
<!-- Show how this would be used and what the behavior would be -->
## Checklist
My suggestion meets these guidelines:
* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
* [ ] This could be implemented without emitting different JS based on the types of the expressions
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
| Suggestion,Awaiting More Feedback | low | Critical |
449,447,274 | TypeScript | Wrong typescript intelisense suggestions | <!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.34
- OS Version: Linux Mint Tessa
The following code break the intelisense for TS.
```typescript
export function get<T, K1 extends keyof T, K2 extends keyof T[K1]>(
obj: T,
keys: [K1, K2]
): T[K1][K2];
export function get<
T,
K1 extends keyof T,
K2 extends keyof T[K1],
K3 extends keyof T[K1][K2]
>(obj: T, keys: [K1, K2, K3]): T[K1][K2][K3];
export function get(obj: any, keys: any[]): any {
for (const key of keys) obj = obj[key];
return obj;
}
```
These are the TS suggestions

However, they are wrong, because the third value needs to be property of the object on path `'a.b'`, precisely only value `'c'`.
The typings are correct, because intelisense is able to infer the result

Furthemore, it rejects all values except `'c'`, which means the intelisense should be able to provide correct suggestions.

| Bug | low | Minor |
449,460,689 | rust | Suggestion for incorrect `target_feature` use | [When encountering `#[target_feature = "+sse2"]`](https://github.com/estebank/rust/blob/609ffa1a890fd6b8b0364cd7b35bf1d45abf82d0/src/test/ui/target-feature-wrong.stderr), suggest `#[target_feature(enable = "+sse2")]` instead of the current `#[target_feature(enable = "name")]`.
(Follow up to #61140) | C-enhancement,A-diagnostics,P-low,T-compiler,A-suggestion-diagnostics,D-papercut,A-target-feature | low | Minor |
449,461,401 | rust | Suggestion for incorrect `repr` use | [When encountering `#[repr = "C"]`](https://github.com/rust-lang/rust/blob/609ffa1a890fd6b8b0364cd7b35bf1d45abf82d0/src/test/ui/repr.stderr), suggest `#[repr(C)]` instead of the current `#[repr(C, packed, ...)]`. We need to detect specific cases like writing `#[repr("packed")]`, where we should suggest `#[repr(packed)]`, as otherwise provide a list of all the valid `repr`s.
(Follow up to #61140) | A-attributes,A-diagnostics,P-low,T-compiler,A-suggestion-diagnostics,D-papercut,A-repr | low | Minor |
449,463,819 | rust | Support more suggestions in template for bad attribute use | Modify
https://github.com/rust-lang/rust/blob/a6ce9b312354cadb046be40398b7e28b616bad28/src/libsyntax/feature_gate.rs#L873-L877
to allow for [multiple suggestions](https://github.com/rust-lang/rust/pull/61026#discussion_r287482937) of the same type.
The following
https://github.com/rust-lang/rust/blob/a6ce9b312354cadb046be40398b7e28b616bad28/src/test/ui/no_crate_type.stderr#L1-L5
should be
```
error: malformed `crate_type` attribute input
--> $DIR/no_crate_type.rs:2:1
|
LL | #![crate_type]
| ^^^^^^^^^^^^^^ malformed input
help: must be of the form:
|
LL | #![crate_type = "bin"]
|
LL | #![crate_type = "lib"]
|
LL | #![crate_type = "..."]
|
```
<!-- TRIAGEBOT_START -->
<!-- TRIAGEBOT_ASSIGN_START -->
<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"Blindspot22"}$$TRIAGEBOT_ASSIGN_DATA_END -->
<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END --> | C-enhancement,A-diagnostics,P-low,T-compiler,A-suggestion-diagnostics,D-papercut | low | Critical |
449,476,193 | terminal | Feature Request: Clients of terminal need a way to inquire about the capabilities of the terminal | # Summary of the new feature/enhancement
<!--
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->
Maybe this is as simple as an environment variable like VSCode uses for its terminal e.g. `TERM_PROGRAM=WindowsTerminal` / `TERM_PROGRAM_VERSION=0.0.1.0`.
# Proposed technical implementation details (optional)
<!--
A clear and concise description of what you want to happen.
-->
Start by creating the environment variables above so those of us using PowerShell can adapt our user experience (via PowerShell profiles) to Windows Terminal. | Issue-Feature,Product-Conhost,Area-Server,Area-VT,Product-Terminal | high | Critical |
449,511,086 | TypeScript | Automatically Update html and *css modules | <!-- Please search existing issues to avoid creating duplicates. -->
<!-- Describe the feature you'd like. -->
```
declare module '*.html' {
const content: string;
export default content;
}
declare module '*.scss' {
const content: string;
export default content;
}
```
```
import template from '../test/test.component.html';
import scss from '../test/test.component.scss';
```
If you move file to another location Automatically Update won't work for them.
Feature request: Automatically Update should work for them.
| Suggestion,Awaiting More Feedback | medium | Minor |
449,518,598 | youtube-dl | Site Support Request: cavelis.net | <!--
######################################################################
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:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2019.05.20. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->
- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2019.05.20**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones
## Example URLs
<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->
- Single video: https://www.cavelis.net/view/0EB2B6D91ED640C89352E275B26C6DDF
- Tag (e.g. `AzPainter`): https://www.cavelis.net/tag/AzPainter
- Channel: https://www.cavelis.net/live/0xconfig
## Description
<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->
WRITE DESCRIPTION HERE
| site-support-request | low | Critical |
449,557,130 | create-react-app | Add caching to DevOps pipeline | Once caching is publicly available (https://github.com/microsoft/azure-pipelines-yaml/pull/113) in Azure DevOps build pipelines we should see if we can leverage it to speed up our build times.
Related:
#7096 | tag: internal | low | Minor |
449,559,763 | flutter | Scaffold should remove statusBar's GestureDetector if it is not root of page. | Scaffold should remove statusBar's GestureDetector if it's not root of the page.
<img width="421" src="https://user-images.githubusercontent.com/7019862/58522894-cc3c0680-81f4-11e9-8c9c-3034b83c7ff7.png">
For example, my layout is:
````
Column(
children:[
Container(),
Expanded(
Scaffold(
bottomNavigationBar,
body
)
)
]
)
````
The touch event on top of the body is eaten by statusBar's GestureDetector
Now, my solution is
````
MediaQuery.removePadding(
context: context,
removeTop: true,
child:Scaffold(),
)
````
But I think it may be better if there is an option or auto remove the statusBar's GestureDetector | c: new feature,framework,f: material design,c: proposal,P3,team-design,triaged-design | low | Minor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.