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
387,965,588
angular
feat(service-worker): minify SW script (+ sourcemaps)
Currently, the [SW script][1] generated by `@angular/service-worker` is unminified. This was intentional so that it was easier to debug and the stack traces (that people having issues might provide) would be easier to interpret. This is not a major concern, since the SW scripts are aggressively cached by the browser and downloaded/parsed/executed out-of-band with page rendering. Nonetheless, now that the SW is more stable, it may make sense to minify it for production (with sourcemaps for debugging). (Related/Duplicate issue: angular/angular-cli#11538) [1]: https://github.com/angular/angular/blob/8973dd5a7e6ede6d29a98684255088afac294a81/packages/service-worker/BUILD.bazel#L29-L36
feature,area: service-worker
low
Critical
388,008,278
TypeScript
Using VS Code Go to Declaration support
VS Code 1.30 adds support `go to declaration`. This supplements the existing `go to` commands we already have for TypeScript: * `go to definition` * `go to type definition` * `go to implementation` Although this was added mainly to support languages like C++, I wonder if typescript tooling could also use `go to declaration`. Some ideas: * https://github.com/Microsoft/TypeScript/issues/14588 * Going to the `d.ts` file (even if declaration map file exists)
Suggestion,In Discussion,Domain: Symbol Navigation
low
Minor
388,063,179
pytorch
Test OpenCV4 in CI
It's not tested, evidence https://github.com/pytorch/pytorch/pull/14356 cc @ezyang @seemethere @malfet @walterddr @pytorch/pytorch-dev-infra
module: ci,triaged
low
Minor
388,071,929
vscode
Endless 100% CPU when search/replace many TS files at once
- VSCode Version: insiders - OS Version: macOS 10.14 Steps to Reproduce: 1. open the `vscode` workspace 2. search for "`copyright`" in `*.ts` 3. replace with "`copyright2`" 4. run and wait => the TS extensions seems to go up to a 100% and stays there without ever recovering. Full command line: `bpasero 78619 100.1 11.0 6870176 1840020 ?? R 7:14AM 2:13.12 /Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper.app/Contents/MacOS/Code - Insiders Helper /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/w_/xgfzkgq14jv_ykk2lm0k_h5c0000gn/T/vscode-typescript/tscancellation-43d76d57848697e4dfca.tmp* --locale en --noGetErrOnBackgroundUpdate`
bug,upstream,typescript,javascript,freeze-slow-crash-leak,verification-found,workspace-edit
low
Major
388,098,374
pytorch
Negative indexing for nn.Embedding inputs
## ๐Ÿš€ Feature <!-- A clear and concise description of the feature proposal --> Negative indexing for nn.Embedding inputs ## Motivation <!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too --> I found both - `nn.Embedding` - `nn.utils.rnn.pad_sequence` allow negative indexing for padding. How about we allow negative indexing for `nn.Embedding` inputs as well? ## Example ```python from torch import nn from torch.nn.utils.rnn import pad_sequence import torch input = [torch.LongTensor([1,2,3]), torch.LongTensor([1,4]), torch.LongTensor([2])] padded_input = pad_sequence(input, batch_first=True, padding_value=-1) # tensor([[ 1, 2, 3], # [ 1, 4, -1], # [ 2, -1, -1]]) embedding = nn.Embedding(5, 10, padding_idx=-1) embedded = embedding(padded_input) # RuntimeError: index out of range at /Users/soumith/code/builder/wheel/pytorch-src/aten/src/TH/generic/THTensorMath.cpp:352 ``` cc @albanD @mruberry
module: nn,triaged,needs design,function request
low
Critical
388,108,462
go
cmd/go: improve error message from '-mod=readonly'
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.11.2 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 N/A </pre></details> ### What did you do? Run `go build -mod=readonly` when an update of `go.mod` is needed. ### What did you expect to see? A more descriptive error message. Since `-mod=readonly` is typically supposed to be used in CI, it will save a lot of manual work if the error message did actually tell why an update to `go.mod` is needed. E.g.: `go: github.com/sirupsen/[email protected] requires github.com/stretchr/[email protected], but go.mod require @v1.2.1 and updates is disabled by -mod=readonly` ### What did you see instead? `go: updates to go.mod needed, disabled by -mod=readonly`
NeedsInvestigation,GoCommand,modules
low
Critical
388,128,335
flutter
Requesting Feature: Add DoubleTapDetails params in GestureDoubleTapCallback like GestureTapDownCallback
for now, if a Gesture was detected as a DoubleTap, the previous TapDown event will not trigger onTapDown. I think it is reasonable. BUT here is the problem: I want to add a icon and play animations on the double-tap point of the screen but GestureDoubleTapCallback doesn't provide any tap information and I also can not retrieve the TapDown point since onTapDown is not fired.
c: new feature,framework,f: gestures,P2,team-framework,triaged-framework
low
Minor
388,211,396
godot
Online Docs button and other docs links should redirect to translated pages.
**Godot version:** 3.1 alpha 2 **OS/device including version:** Windows 10 **Issue description:** When I have open Godot Engine with other than English language, I expect that all docs links will point to translated docs site(of course if its available even in some part). There is a lot of hardcoded links with English language e.g. https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html and also this links https://docs.godotengine.org/ open English version of docs. There is also a few links which point to 3.0 docs version instead 3.1(latest) e.g: - https://docs.godotengine.org/ - https://docs.godotengine.org/en/stable/tutorials/i18n/locales.html
enhancement,topic:editor,usability
low
Minor
388,214,523
vscode
Highlight file containing definition
There is already `Go to Definition` in vscode, so that's usually not the file you're looking for. Maybe it should also work with [Expanding folder options](https://github.com/Microsoft/vscode-references-view/issues/28) - When file has 1 reference and that reference is the definition - file shouldn't auto expand.
help wanted,feature-request,references-viewlet
low
Minor
388,214,640
vscode
F4 conflict between text search and references list
Testing https://github.com/Microsoft/vscode/issues/64227. Here is my scenario: 1) search for references 2) <kbd>F4</kbd> to jump to a particular reference 3) selected some text in the editor and <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>F</kbd> 4) <kbd>F4</kbd> => we jump to the next reference but I'd expect it to jump to the next search result as the search result view has focus ![screen shot 2018-12-04 at 10 16 23 am](https://user-images.githubusercontent.com/4674940/49463612-bc93b600-f7ad-11e8-91d1-de64f15702fc.png)
search,under-discussion,references-viewlet
medium
Major
388,264,035
react
calculating context changes in componentDidUpdate
<!-- Note: if the issue is about documentation or the website, please file it at: https://github.com/reactjs/reactjs.org/issues/new --> **Do you want to request a *feature* or report a *bug*?** Bug **What is the current behavior?** There is no way to see if `componentDidMount` was caused by a context change **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:** ```typescript import React from 'react'; interface ExampleContext { param: string; } const ExampleContext = React.createContext<ExampleContext>({ param: 'foo', }); interface ExampleState { data: any; } class Example extends React.Component<{}, ExampleState> { static contextType = ExampleContext; context!: ExampleContext; constructor(props) { super(props); this.state = { data: [], }; } fetchData(param: string): void { // whatever } componentDidMount() { this.fetchData(this.context.param); } componentDidUpdate() { // ??? } } ``` **What is the expected behavior?** A 4th parameter for `previousContext` **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** 16.6
Type: Feature Request
medium
Critical
388,304,856
flutter
Provide a way to give Widgets negative spacing attributes.
Sometimes, it is desirable to give related Widgets negative spacing so that they appear closer together than they would being lined up in a Column. For example, if you build a Column of Text widgets with all-cap strings like "HELLO", there will be blank vertical space between each Text widget due to the ascender and descender of the font. With the ability to provide some kind of negative spacing or margin, you could correct for this. Note that this is different from the other issue regarding the need for Ascender/Descender widgets. Non-Text widgets would benefit from negative spacing as well.
c: new feature,framework,P3,team-framework,triaged-framework
medium
Major
388,373,462
rust
inferrable lifetime not being removed by `cargo fix --edition --edition-idioms`
https://github.com/amethyst/amethyst/blob/863b795ddf76a27107334f15113b5da8323b5207/src/state.rs#L30 This requirement can be inferred in Rust 2018 however the fix tool is not automatically removing it.
C-enhancement,A-lints,A-diagnostics,T-compiler,A-suggestion-diagnostics,A-edition-2018
low
Minor
388,414,733
vscode
Interactive Diagnostics
## Problem JS and TS diagnostic messages can get quite large, especially when dealing with frameworks like Vue or react. The TS team has worked to significantly improve and shorten diagnostic messages, including replacing complex type information with `...`, however there are still cases where you need to see the full type information. Right now, we have to staticly choose to expand the additional information or not. They would like the user to be able to interactively expand types within a diagnostic In addition, the overall diagnostic experience could be improved. Two areas identified talking with the TS team: * Syntax coloring of inline code in diagnostics * Go to definition in diagnostics ## Refs #11847 ## Desired User Experience Consider a diagnostic message `T<...>`. We would like the `...` to be something like a link. Clicking it would expand the diagnostic message to `T<Array<...>>`, which itself contains another expandable link ## Requirements The main focus is on being able dynamically to expand sections of a diagnostic. We need new VS Code API support for this and then will need languages to adopt this API. However, I think the other two features should be considered while designing the new diagnostics API as they are likely something we would like to support and will influence overall api design For expansion, we want to be able to: - Mark arbitrary spans within a diagnostics as expandable - Lazily compute these expansions, i.e. don't resolve the expansions ahead of time - Allow expansions to contain other expansions - Show a progress indicator of some kind while an expansion is being resolved Many of these features also make sense for quick info hovers
feature-request,api,under-discussion,languages-diagnostics
high
Critical
388,421,410
rust
Tracking issue for future-incompatibility lint `incorrect_macro_fragment_repetition`
> [!IMPORTANT] > This lint has not been implemented yet! See #55373. ### Status - [x] Preliminary implementation started (#55373) - [ ] Preliminary implementation available - [ ] Stabilization proposed - [ ] Stabilized ### Known bugs None. ### Unresolved questions to be answered before stabilization - When should we move from allow by default to warn by default to deny by default.
A-lints,A-parser,A-macros,T-lang,T-compiler,C-future-incompatibility,C-tracking-issue,S-tracking-unimplemented
low
Critical
388,437,262
TypeScript
Pick<T, Exclude<keyof T, K>> & Pick<T, Extract<keyof T, K>> should be assignable to T
**TypeScript Version:** 3.2.1 **Search Terms:** 3.2.1 extends intersection generic **Code** ```ts type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; type Func<T> = (arg: T) => null type Context = 'Context'; export function withRouteContextPropConsumer< T extends { routeContext: Context } >( funcToWrap: Func<T>, ): Func<Omit<T, "routeContext">> { return (args: Omit<T, "routeContext">) => { const routeContext: Context = 'Context'; return funcToWrap({ ...args, routeContext }); }; } ``` **Expected behavior:** Code compiles without errors **Actual behavior:** ``` Argument of type '{ routeContext: "Context"; }' is not assignable to parameter of type 'T'. ``` **Playground Link:** http://www.typescriptlang.org/play/#src=type%20Omit%3CT%2C%20K%20extends%20keyof%20T%3E%20%3D%20Pick%3CT%2C%20Exclude%3Ckeyof%20T%2C%20K%3E%3E%3B%0A%0Atype%20Func%3CT%3E%20%3D%20(arg%3A%20T)%20%3D%3E%20null%0A%0Atype%20Context%20%3D%20'Context'%3B%0A%0Aexport%20function%20withRouteContextPropConsumer%3C%0A%20%20%20%20T%20extends%20%7B%20routeContext%3A%20Context%20%7D%0A%3E(%0A%20%20%20%20funcToWrap%3A%20Func%3CT%3E%2C%0A)%3A%20Func%3COmit%3CT%2C%20%22routeContext%22%3E%3E%20%7B%0A%20%20%20%20return%20(args%3A%20Omit%3CT%2C%20%22routeContext%22%3E)%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20const%20routeContext%3A%20Context%20%3D%20'Context'%3B%0A%20%20%20%20%20%20%20%20return%20funcToWrap(%7B%20...args%2C%20routeContext%20%7D)%3B%0A%20%20%20%20%7D%3B%0A%7D **Related Issues:** Nothing obvious After upgrading from 3.0.3 to 3.2.1, it seems that tsc has (at least partially) lost the ability to reason about constrained generics. In the example above (one of our React context helper functions, modified to remove the React dependency), the function is parameterised over a constrained generic: ```ts T extends { routeContext: Context } ``` But a few lines later, the compiler complains that the generic `T` may not have a `routeContext` attribute. T *must* have a `routeContext` attribute however, because of the constraint. Perhaps the `Omit` helper is confusing things?
Suggestion,Experience Enhancement,Domain: Conditional Types
medium
Critical
388,458,339
angular
Router state is Mutable via ActivatedRouteSnapshot
# ๐Ÿž bug report ### Affected Package @angular/router (probably) ### Is this a regression? No. It appears to have existed for a while. See #17609 ### Description If you mutate existing properties on the queryParams object of an ActivatedRouteSnapshot without making a deep copy, it appears to mutate the router's internal state. Telling the router to navigate using the mutated queryParams object does not trigger a navigation event in this case. ## ๐Ÿ”ฌ Minimal Reproduction https://stackblitz.com/edit/github-powged?file=src%2Fapp%2Freproduction%2Freproduction.component.ts
area: router,P3
low
Critical
388,459,561
pytorch
[discussion] Recommend a different file extension for models (.PTH is a special extension for Python)
*.pth files are used by Python to list additional package search paths: https://docs.python.org/3/library/site.html The pth files will be loaded as text files by Python interpreter. At some point when I had some PyTorch model pth file placed along with the sources, it caused a hang of Python at startup (it was trying to parse the big binary file as a list of paths). Maybe just *.pt?
triaged
medium
Major
388,462,701
pytorch
[C++/Pytorch] Get input shapes
Is there a way to get the input shapes from ```torch::jit::script::Module```? For example, if we want to resize the input image to the correct shape to perform classification using the traced module, we need this information.
oncall: jit
low
Major
388,464,767
flutter
Allow native code to use asset variants in flutter_assets folder
<!-- Thank you for using Flutter! If you are looking for support, please check out our documentation or consider asking a question on Stack Overflow: * https://flutter.io/ * https://docs.flutter.io/ * https://stackoverflow.com/questions/tagged/flutter?sort=frequent If you have found a bug or if our documentation doesn't have an answer to what you're looking for, then fill our the template below. Please read our guide to filing a bug first: https://flutter.io/bug-reports/ --> ## Steps to Reproduce <!-- Please tell us exactly how to reproduce the problem you are running into. Please attach a small application (ideally just one main.dart file) that reproduces the problem. You could use https://gist.github.com/ for this. If the problem is with your application's rendering, then please attach a screenshot and explain what the problem is. --> When I use `registrar.lookupKeyForAsset(path)`/`[registrar lookupKeyForAsset:path]` to fetch assets defined in dart side, native side just use the path to fetch the assets rather than fetch assets depend on resolution. Or am I missing something? <!-- Finally, paste the output of running `flutter doctor -v` here. --> `flutter doctor -v` ``` [โœ“] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14.1 18B75, locale en-CN) โ€ข Flutter version 1.0.0 at /Users/yohom/Library/Flutter/flutter โ€ข Framework revision 5391447fae (7 days ago), 2018-11-29 19:41:26 -0800 โ€ข Engine revision 7375a0f414 โ€ข Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297) [โœ“] Android toolchain - develop for Android devices (Android SDK 28.0.3) โ€ข Android SDK at /Users/yohom/Library/Android/sdk โ€ข Android NDK at /Users/yohom/Library/Android/sdk/ndk-bundle โ€ข Platform android-28, build-tools 28.0.3 โ€ข ANDROID_HOME = /Users/yohom/Library/Android/sdk โ€ข 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-1136-b06) โ€ข All Android licenses accepted. [โœ“] iOS toolchain - develop for iOS devices (Xcode 10.1) โ€ข Xcode at /Applications/Xcode.app/Contents/Developer โ€ข Xcode 10.1, Build version 10B61 โ€ข ios-deploy 1.9.4 โ€ข CocoaPods version 1.5.3 [โœ“] Android Studio (version 3.2) โ€ข Android Studio at /Applications/Android Studio.app/Contents โ€ข Flutter plugin version 31.1.1 โ€ข Dart plugin version 181.5656 โ€ข Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) [!] IntelliJ IDEA Ultimate Edition (version 2018.3) โ€ข IntelliJ at /Applications/IntelliJ IDEA.app โœ— Flutter plugin not installed; this adds Flutter specific functionality. โ€ข Dart plugin version 183.4733 โ€ข For information about installing plugins, see https://flutter.io/intellij-setup/#installing-the-plugins [โœ“] VS Code (version 1.29.1) โ€ข VS Code at /Applications/Visual Studio Code.app/Contents โ€ข Flutter extension version 2.20.0 ```
c: new feature,engine,a: assets,P2,team-engine,triaged-engine
low
Critical
388,478,820
godot
Degraded quality of rendered content in Viewport in another Viewport
**Godot version:** 3.0 and 3.1 alpha2 **OS/device including version:** Arch Linux, GPU: NVIDIA GTX 770 (415.18.04) Android, Xiaomi Redmi Note 4 **Issue description:** I wrote small script that adapts game UI to match screen DPI: `get_tree().set_screen_stretch(1, 4, new_size)` And everything looks crispy clear. But, when I add new Viewport to the Scene, the content rendered in this Viewport looks very bad. ![2d_stretch_mode](https://user-images.githubusercontent.com/34661843/49623133-aa439300-f9cc-11e8-8ab3-89a2ce3af636.png) I've tried multiple things : - enabling/disabling Use Pixel Snap - setting size of the Viewport to match root's size - setting size_override of the Viewport to match root's size_override - setting size and size_override of the Viewport to match root's size and size_override - removing `set_screen_stretch`, setting the Viewport size and size_override to the same values as root would have if `set_screen_stretch` was called, and changing stretch mode and stretch aspect in Project Settings to multiple different values - using TextureRect or ViewportContainer to render the Viewport - enabling/disabling Snap Controls To Pixels In every case something was wrong: blurry or pixelated font, wrong sizes of all UI elements... So I commented all my code to be sure that this isn't related to some bug in my code. And then, at first everything was looking good. But as it turns out, content rendered in the Viewport looks a little bit different (blurred?) than outside of the Viewport. The difference is very subtle and hard to notice. Look at the TEST and circle. Open image in new tab for bigger version - easier to notice the issue. ![Open me in a new tab](https://user-images.githubusercontent.com/34661843/49623129-9f88fe00-f9cc-11e8-8c75-7a03c2726915.gif) Is there some magical combination of settings to fix my issue? I was "debugging" my issue for over a week, and I haven't found any possible combination to fix it. **Steps to reproduce:** 1. Add ViewportContainer to the Scene 2. Add Viewport to the ViewportContainer 3. Add Label with some text to the Viewport 4. Duplicate the Label and add it as a sibling of ViewportContainer (and move somewhere else, so it won't overlap content from Viewport) 5. Notice the very, very subtle differences between Labels. **Minimal reproduction project:** <!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. --> Running this project will result in the same looking image as in first picture. If you want to see the result of second image, comment `get_tree().set_screen_stretch(1, 4, window)` in dpi.gd file. [Project for Godot 3.1 alpha2](https://github.com/godotengine/godot/files/2655616/dpi.zip) PS. This project uses wrong DPI values in script on purpose, so the problem will be more noticeable on PC. PS2. I'm not sure if this will be helpful, but I need to resize the window at startup, to fix the "blocky" text outside of the Viewport. I'm not sure if this is related the issue.
enhancement,discussion,topic:rendering,confirmed,topic:2d
medium
Critical
388,483,616
go
cmd/go: packages that use cgo not cached when cross-compiling android .so file
Here is my build command (fast in go1.9.2), I used goroutines and waitgroup to make it build two android cpu arch in two processes to make it faster: ``` go build -buildmode=c-shared -i -pkgdir /xxx/pkg/android_386_shared -tags "android linux" -ldflags "-s -w" -gcflags=-trimpath=/xxx/ -o=bin/jniLibs/x86/libxxx.so xxx/xxx go build -buildmode=c-shared -i -pkgdir /xxx/pkg/android_arm_shared -tags "android linux" -ldflags "-s -w" -gcflags=-trimpath=/xxx/ -o=bin/jniLibs/arm/libxxx.so xxx/xxx ``` My computer os is mac os 10.13.6 My program use cgo and it have a lot of c source code (sqlite3,"github.com/mutecomm/go-sqlcipher") During all step I will not delete/modify the result .so files. before first time run in go1.11.2, i will use `rm -rf /Users/xxx/Library/Caches/go-build && rm -rf ./pkg && rm -rf ./bin` to clean all build cache. before first time run in go1.9.2, i will use `rm -rf ./pkg && rm -rf ./bin` to clean all build cache. after first time run and before second time run, I will not change any code. after second time run and before third time run, I will change one comment in the main package. build time with go1.11.2 ======== * first 1m15.48132439s * second 44.123888335s * third 46.841824535s build time with go1.9.2 ======== * first 1m15.187967573s * second 5.208278504s * third 3.91962979s What I have already tried ======== Looks like I have already did what i can do to make the build faster in the command line without read the actually build source code to find some hidden faster flag. * I have tried `go install -buildmode=c-shared xxx`, it will not faster. * I have tried do not pass -pkgdir parameters, it will not faster. * I have tried do not pass -i parameters, it will not faster. * I have tried add -ldflags "-s -w", it save me about 20s in golang1.11.2, so I add in my program. My build script to cross build .a file (-buildmode=c-archive) to ios(darwin arm64) have the same problem. My build script to cross build elf file to (linux,amd64) become faster in go1.11.2 than go1.9.2. I guess the build cache part of cross build android/ios or (-buildmode=c-archive) or (-buildmode=c-shared) have been delete. Currently, I have to stop upgrade to newer golang version forever if I want develop my android/ios app faster. So My problem is What command line should I use, if I want faster corss build to android with go1.11.2?
ToolSpeed,NeedsInvestigation
low
Minor
388,527,545
TypeScript
Dynamic TagName causing error after version upgrade
typescript version: 3.2.2 IDE: VS Code Description: I updated from v3.1.6 to v3.2.2. This is my code: ``` import * as React from 'react'; export interface Props { tag?: string, }; const MyComponent: React.FunctionComponent<Props> = ({ tag: Tag = 'div', children }) => { return ( <Tag> // this is causing the error {children} </Tag> ); }; ``` Expected: No error Actual: Error produced: `[ts] Type '{ children: ReactNode; }' has no properties in common with type 'IntrinsicAttributes'. [2559]` This seems like a regression as it worked in v3.1.6
Bug,Domain: JSX/TSX
medium
Critical
388,536,852
TypeScript
is out-of-bounds in tuple of length๏ผŒbut the introduction in the document can be out of bounds
<!-- ๐Ÿšจ STOP ๐Ÿšจ ๐—ฆ๐—ง๐—ข๐—ฃ ๐Ÿšจ ๐‘บ๐‘ป๐‘ถ๐‘ท ๐Ÿšจ I think this should be the document not updated๏ผŒPlease update the official documentation๏ผŒBecause it makes people confused --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.2.0 **Code** This is the official demo ```ts // Declare a tuple type let x: [string, number]; // Actually๏ผŒthis code will throw error x[3] = 'world'; // OK, 'string' can be assigned to 'string | number' ``` **Expected behavior:** I want to know if this is a bug or this is document error **Actual behavior:** Tuple out of bounds will trow error, but document say `When accessing an element outside the set of known indices, a union type is used instead` **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> https://www.tslang.cn/play/index.html#src=let%20x%3A%20%5Bstring%2C%20number%5D%3B%0D%0A%2F%2F%20When%20accessing%20an%20element%20outside%20the%20set%20of%20known%20indices%2C%20a%20union%20type%20is%20used%20instead%3A%0D%0A%2F%2F%20Actually%EF%BC%8Cthis%20code%20will%20throw%20error%0D%0Ax%5B3%5D%20%3D%20%22world%22%3B%20%2F%2F%20OK%2C%20'string'%20can%20be%20assigned%20to%20'string%20%7C%20number' ![image](https://user-images.githubusercontent.com/16078260/49633633-135ef100-fa35-11e8-8013-067ba8f932d9.png) **Related Issues:** <!-- Did you find other bugs that looked similar? --> NO
Docs
low
Critical
388,537,940
TypeScript
"2 definitions" returned when defaultProps exists in JS component.
VSCode Version: 1.29.1 tsc Version: Version 3.3.0-dev.20181206 OS Version: macOS 10.14.1 > Test.js ![image](https://user-images.githubusercontent.com/20541303/49632344-5074b480-fa30-11e8-9bbf-bbf130e744a4.png) > TestOuter.js ![image](https://user-images.githubusercontent.com/20541303/49633212-794a7900-fa33-11e8-8d92-e3743ea83dcb.png) In the above code, when i click `TestCom`, "2 definitions" pop up in Test Component like the below image, it's too annoying to close it everytime i go to definition. > Test.js ![image](https://user-images.githubusercontent.com/20541303/49633121-25d82b00-fa33-11e8-9326-b73c98ea3248.png) but when i use brackets wrapping Test component, or don't use `Test.xxx = ooo`,there is no "2 definitions" pop up. > Test.js ![image](https://user-images.githubusercontent.com/20541303/49633378-1ad1ca80-fa34-11e8-8687-3d95a014e967.png) ![image](https://user-images.githubusercontent.com/20541303/49633440-4b196900-fa34-11e8-9eee-20718096fdec.png) i have used latest version of typescript, is there any sufficient ways to solve this?
Bug,Domain: Symbol Navigation
low
Minor
388,563,321
godot
Thin lines are not rendered correctly if rendering at a scale factor lower than the default
**Godot version:** <!-- Specify commit hash if non-official. --> Godot 3.1 master 21dea10, Godot 2.1.5 **OS/device including version:** <!-- Specify GPU model and drivers if graphics-related. --> Xubuntu 16.04.5 LTS, Nvidia GTX 750 Ti, proprietary driver ver. 390.87 **Issue description:** <!-- What happened, and what was expected. --> When used 2d/viewport mode thin lines not rendered correctly. It's affected LineEdit caret. ![thin_lines](https://user-images.githubusercontent.com/1049442/49637616-14d9ea80-fa30-11e8-96de-2ac7a390a760.gif) **Steps to reproduce:** 1) Open attached project. 2) Run scene. 3) Some lines invisible. **Minimal reproduction project:** <!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. --> For Godot 3.1: [thin_lines.zip](https://github.com/godotengine/godot/files/2656533/thin_lines.zip)
bug,discussion,topic:rendering,confirmed,topic:gui,topic:2d
low
Critical
388,573,474
flutter
Horizontal ListWheelScrollView feature request
<!-- Thank you for using Flutter! If you are looking for support, please check out our documentation or consider asking a question on Stack Overflow: * https://flutter.io/ * https://docs.flutter.io/ * https://stackoverflow.com/questions/tagged/flutter?sort=frequent If you have found a bug or if our documentation doesn't have an answer to what you're looking for, then fill our the template below. Please read our guide to filing a bug first: https://flutter.io/bug-reports/ --> It's more a feature request than an issue, to get possibility of rotating `ListWheelScrollView`. Or if it is already possible update the docs. `ListView` have property `Axis scrollDirection` which is controlling `ListView` orientation (vertical or horizontal). I would be happy to have same property on `ListWheelScrollView` ## Steps to Reproduce <!-- Please tell us exactly how to reproduce the problem you are running into. Please attach a small application (ideally just one main.dart file) that reproduces the problem. You could use https://gist.github.com/ for this. If the problem is with your application's rendering, then please attach a screenshot and explain what the problem is. --> 1. Build `ListWheelScrollView`. 2. Realize that `Axis scrollDirection` is missing 3. Try to rotate it with `Transform.rotate` 4. Get strange behaviour of Vertical finger movement and horizontal List movement ## Logs <!-- Finally, paste the output of running `flutter doctor -v` here. --> ``` [โˆš] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17758.1], locale ru-RU) โ€ข Flutter version 1.0.0 at C:\Users\denis\sdk\flutter โ€ข Framework revision 5391447fae (7 days ago), 2018-11-29 19:41:26 -0800 โ€ข Engine revision 7375a0f414 โ€ข Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297) [โˆš] Android toolchain - develop for Android devices (Android SDK 28.0.3) โ€ข Android SDK at C:\Users\denis\AppData\Local\Android\Sdk โ€ข Android NDK location not configured (optional; useful for native profiling support) โ€ข Platform android-28, build-tools 28.0.3 โ€ข ANDROID_HOME = C:\Users\denis\AppData\Local\Android\Sdk โ€ข Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java โ€ข Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02) โ€ข All Android licenses accepted. [โˆš] Android Studio (version 3.1) โ€ข Android Studio at C:\Program Files\Android\Android Studio X Flutter plugin not installed; this adds Flutter specific functionality. X Dart plugin not installed; this adds Dart specific functionality. โ€ข Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02) [โˆš] VS Code (version 1.29.1) โ€ข VS Code at C:\Users\denis\AppData\Local\Programs\Microsoft VS Code โ€ข Flutter extension version 2.21.1 [โˆš] Connected device (1 available) โ€ข Mi A2 Lite โ€ข 4b334b3d0205 โ€ข android-arm64 โ€ข Android 8.1.0 (API 27) ```
c: new feature,framework,f: scrolling,f: gestures,P3,team-framework,triaged-framework
high
Critical
388,574,384
go
x/text: avoid double execution of lookup in lookupAndFormat()
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.11.2 linux/amd64 </pre> ### Does this issue reproduce with the latest release? - This is the latest release. - code is identical in the master branch ### 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/fgm/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/fgm/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-build766242374=/tmp/go-build -gno-record-gcc-switches" </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. --> - Prepare a simple app with exported strings using `//go:generate gotext -srclang=en update -out=catalog/catalog.go -lang=fr` - Invoke p.Printf("Hello, world") and debug what happens, until stepping into `message.lookupAndFormat()` until this fragment: ```go if p.catContext.Execute(id) == catalog.ErrNotFound { if p.catContext.Execute(msg) == catalog.ErrNotFound { p.Render(msg) return } ``` ### What did you expect to see? - since in most cases `id == msg`, skip the second execution of `p.catContext(msg)` if the first execution returned `catalog.ErrNotFound` ### What did you see instead? - if `p.catContext.Execute(id)` returned `catalog.ErrNotFound`, code performs the same work a second time as `p.catContext.Execute(msg)` - which could be avoided by checking whether `id == msg`, maybe like: ```go if p.catContext.Execute(id) == catalog.ErrNotFound { if id == msg || p.catContext.Execute(msg) == catalog.ErrNotFound { p.Render(msg) return } } ```
Performance,NeedsInvestigation
low
Critical
388,621,554
vscode
Using OS user name / git user name inside code snippets
I'd like to add the following code snippet and share it with the whole team: ```json { "Comment todo": { "prefix": "//", "body": [ "// TODO (${MY_NAME}) [${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}]: $1" ] } } ``` This should produce `// TODO (Alexander Kachkaev) [2018-12-07]: ...` on my computer and `// TODO (John Smith) [2018-12-07]: ...` on John Smith's. Looking at [VSCode snippet docs](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variables) and [VSCode variable reference](https://code.visualstudio.com/docs/editor/variables-reference) does not suggest that there is any variable like `MY_NAME`. Could it be added? The value can either be taken from the OS user name or from the git user name. Similarly, there could be a variable for the current user's email address (possibly taken from the git config). WDYT?
help wanted,feature-request,snippets
medium
Major
388,684,319
TypeScript
Partial type for reduce initialValue
## Search Terms reduce initialvalue partial type assertion ## Suggestion Add a signature to the type for `Array.reduce<U>` to allow the initialValue to be a `Partial<U>` ## Use Cases Many cases where the reduce function is used to build an object that will eventually conform to `U`, but starts with an empty accumulator. ## Examples Simple example where the initialValue does not satisfy `U` but the final result will: ```ts ['one'].reduce<{ one: string }>((acc, i) => ({ [i]: i, ...acc }), {}) ``` This yields > Argument of type '{}' is not assignable to parameter of type '{ one: string; }'. > Property 'one' is missing in type '{}' but required in type '{ one: string; }'. Calling the function without an initialValue causes problems because the initialValue needs to be an object for this to work. The below type signature would fix this issue: ```ts interface Array<T> { reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: Partial<U>): U; } ``` ## Checklist My suggestion meets these guidelines: * [?] 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
388,736,310
rust
Coercing &mut to *const should not create a shared reference
It has long been a rule in Rust that you must not mutate through a shared reference, or a raw pointer obtained from a shared reference. Unfortunately, that rule currently forbids the following code: ```rust fn direct_mut_to_const_raw() { let x = &mut 0; let y: *const i32 = x; unsafe { *(y as *mut i32) = 1; } assert_eq!(*x, 1); } ``` The reason for this is that coercing `&mut T` to `*const T` implicitly first creates a shared reference and then coerces that to `*const T`, meaning `y` in the example above is technically a raw pointer obtained from a shared reference. We should fix our coercion logic to no longer create this intermediate shared reference. See https://github.com/rust-lang/rust/pull/56161 for how we uncovered this problem. Cc @eddyb @nikomatsakis
T-lang,A-raw-pointers,I-lang-radar
high
Critical
388,742,882
rust
Error using associated constant in return type of generic function
Consider the following code: ```rust trait ArrayGenerator { const LEN: usize; } fn generate<T>(obj: T) -> [u8; T::LEN] where T: ArrayGenerator { [0; T::LEN] } struct Foo { } impl ArrayGenerator for Foo { const LEN: usize = 8; } fn main() { println!("{:?}", generate(Foo{})); } ``` The compiler will error with: ``` error[E0599]: no associated item named `LEN` found for type `T` in the current scope --> src/main.rs:5:32 | 5 | fn generate<T>(obj: T) -> [u8; T::LEN] where T: ArrayGenerator { | ^^^^^^ associated item not found in `T` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `LEN`, perhaps you need to implement it: candidate #1: `ArrayGenerator` ``` Now there is a clear constraint on T, meaning that LEN should be valid. I'm guessing the return type is being evaluated before the constraint, whereas it should check after, at which point it would know this this ought to be valid. Tested in 1.31 stable and 1.32 nightly (Dec 7 2018)
A-associated-items,T-lang,T-compiler
low
Critical
388,762,105
go
net: cross compiled Go has lengthy timeouts when resolving names if a DNS server is invalid
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? go version go1.11 darwin/amd64 ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? ``` GOARCH="amd64" GOBIN="" GOCACHE="/Users/gfrau/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/gfrau/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" 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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/jh/z59wc4wx5cz823x6l5f81qn463wn7j/T/go-build408544351=/tmp/go-build -gno-record-gcc-switches -fno-common" ``` ### What did you do? We cross compiled an application on a mac, with GOOS=linux as the target. When run on target systems where there are two DNS resolvers listed in /etc/resolv.conf, but one of them is unreachable, the application takes quite a while to resolve dns (15s?). Changing the DNS resolution mechanism with GO_DEBUG doesn't appear to work, the error occurs with either the go or cgo DNS resolvers selected. As soon as we comment out the DNS server that is unreachable, the app works fine. It does not matter which one of the DNS servers is unreachable (first one listed, or second). The app is slow, and strace shows it connecting to both of them no matter what. ### What did you expect to see? I was expecting Go to use the primary DNS server first, with a 2 second timeout before using the next in the resolver list, returning the response of the first successful server. ### What did you see instead? Timeouts, and slow applications when the app was built on darwin/amd64 for a target of linux/amd64. This problem goes away if we do a go build directly on linux/amd64 and do not cross-compile (both using CGO_ENABLED=0 and CGO_ENABLED=1). However, if the primary resolver listed is unreachable for this test case, the timeouts take over 10s for DNS resolution, rather than the expected 2s. If the secondary server is unreachable, it is never hit, as the primary resolved the name already, and no timeouts are noticed
NeedsInvestigation
low
Critical
388,770,451
godot
Dictionary keys are stored by reference
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** 3.0.6 stable **OS/device including version:** Ubuntu Bionic 64bit **Issue description:** var xx = {} var k1 = [[1,2], [3,4]] var k2 = [[1,2], [3,4]] var v1 = [1,2,3] xx[k1] = v1 print(xx.has(k2)) k1[0][0] = 999 print(xx.has(k2)) print(xx.has(k1)) print(xx.keys()) The result: True False False [[[999, 2], [3, 4]]] There are two issues here: 1. Changing `k1` changes the key in the dictionary which implies that the key stored in the dictionary is actually a reference to `k1`. This might be the design and not a bug, but if it is the design, I am not sure how does it work with the hash of the key which is used to quickly find the value in the internal data structure. Additionally this is counter intuitive and not [documented](https://docs.godotengine.org/en/3.0/classes/class_dictionary.html). 2. After changing `k1` there is no more way to retrieve the value. Both `k1` and `k2` considered not in the dictionary. This is most probably a bug.
bug,discussion,topic:core,confirmed
medium
Critical
388,771,357
TypeScript
Method decorators in class expressions are silently ignored.
<!-- ๐Ÿšจ 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.2 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** - decorators - class expressions **Code** ```ts const decorator = () => null; // This calls __decorate with decorator. class Statement { @decorator() method() { } } // This doesn't! It also doesn't produce a compiler error of any kind. (class Expression { @decorator() method() { } }) ``` **Expected behavior:** __decorate should be called, or a compiler error should be produced. **Actual behavior:** The decorator is silently ignored, omitting it from the decoration compiled output. **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> https://www.typescriptlang.org/play/index.html#src=const%20decorator%20%3D%20()%20%3D%3E%20null%3B%0D%0A%0D%0Aclass%20Statement%20%7B%0D%0A%20%20%40decorator()%0D%0A%20%20method()%20%7B%0D%0A%0D%0A%20%20%7D%0D%0A%7D%0D%0A%0D%0A(class%20Expression%20%7B%0D%0A%20%20%40decorator()%0D%0A%20%20method()%20%7B%0D%0A%0D%0A%20%20%7D%0D%0A%7D) **Related Issues:** <!-- Did you find other bugs that looked similar? --> - Using decorators on arguments in class expressions produces a compiler error: https://github.com/Microsoft/TypeScript/issues/7342 - This one is about decorators on class expressions, not methods within a class expression: https://github.com/Microsoft/TypeScript/issues/15975 - but produces some kind of error at least.
Bug
low
Critical
388,796,520
opencv
lazy Mat::create() when data size match
The Mat::create() function will allocate new data if the new size() and type() do not match the previous ones. Wouldn't it be a legible optimization to also keep the currently allocated data when the raw memory size matches `(this->rows*this->elemSize1()*this->step1() == CV_ELEM_SIZE(newType)*newWidth*newHeight) `? Only rows, cols and flags would need to be updated. Is there a reason why it's not the case ?
category: core,RFC
low
Minor
388,798,135
go
cmd/compile: compiler hangs without optimizations
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.11.2 windows/amd64 </pre> ### Does this issue reproduce with the latest release? Yes, reproduced using go 1.11, 1.11.2 and 1.10 ### 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\csnitker\AppData\Local\go-build set GOEXE=.exe set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=C:\Users\csnitker\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=C:\Users\csnitker\go\src\go.registrar.int.godaddy.com\RegistrarServices\whois\go.mod 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 -fmessage-length=0 -fdebug-prefix-map=C:\Users\csnitker\AppData\Local\Temp\go-build373743682=/tmp/go-build -gno-record-gcc-switches </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. --> Run `go build -gcflags=all="-N -l" -x main.go` or `dlv debug main.go` on the following: ```golang package main import "github.com/zonedb/zonedb" func main() { zone := zonedb.PublicZone("godaddy.com") if zone != nil { println(zone) } } ``` ### What did you expect to see? A successful build. ### What did you see instead? The compiler hangs and consumes large amounts of memory. ![image](https://user-images.githubusercontent.com/4894187/49670017-cffe8580-fa28-11e8-8308-a88e7d4dad1a.png) The command from the process above shows: ``` C:\go1.11\pkg\tool\windows_amd64\compile.exe -o C:\Users\csnitker\AppData\Local\Temp\go-build516058638\b002\_pkg_.a -trimpath C:\Users\csnitker\AppData\Local\Temp\go-build516058638\b002 -N -l -p github.com/zonedb/zonedb -complete -buildid mw6Bk1kcUZg16C0mq6E3/mw6Bk1kcUZg16C0mq6E3 -goversion go1.11 -D "" -importcfg C:\Users\csnitker\AppData\Local\Temp\go-build516058638\b002\importcfg -pack -c=4 C:\Users\csnitker\go\pkg\mod\github.com\zonedb\[email protected]\zone.go C:\Users\csnitker\go\pkg\mod\github.com\zonedb\[email protected]\zones.go ``` It's also interesting that `go build -gcflags="-N -l" main.go` completes successfully and works using `dlv exec main.exe` but does not with the commands above. I'm not entirely sure if this is a go problem or an issue with the library (or delve) but figured I would start here since an optimized build completes without issue.
ToolSpeed,NeedsInvestigation,compiler/runtime
low
Critical
388,803,741
pytorch
Missing dilation from several pooling modules (AvgPool)
## ๐Ÿš€ Feature <!-- A clear and concise description of the feature proposal --> The dilation parameter is a common between all kernelized operations like convolution and pooling. Currently _MaxPoolNd, _ConvNd, _ConvTransposeNd, etc... do support this parameter, but it is noticeably missing from _AvgPoolNd, _LPPoolNd, _MaxUnpoolNd, etc... ## Motivation For completeness of the API the dilation parameter should be implemented for these modules. AFAIK there are 4 parameters (5 for transpose operations) that should be general to all kernelized operations: * kernel_size * stride * padding * dilation And in the case of transpose kernelized operations (e.g. convT, MaxUnpool), there is also: * output_padding ## Pitch I think there should be an effort to (1) add these parameters to all pooling and convolution operations (2) standardize the module attributes to be uniform across all modules (e.g. kernel_size for Conv2d is a Tuple[int, int], but kernel_size for MaxPool2d is just a scalar int that is assumed to be uniform on all dimensions.) ## Alternatives The alternative is simply not to do this because dilation is most commonly used with the modules where it is already implemented, but torch is such a nice API that I think its worth doing for completeness sake. It is a lower priority though. cc @heitorschueroff
hackamonth,triaged,module: pooling,function request
low
Major
388,805,897
go
go/parser: fails when a valid function declaration follows an broken one
Repro case: ```go package main type e struct { error } func (*e) random() {} func main() { var diags []error for _, err := range diags { handled := handle(err) handled. } } func handle(err error) *e { return &e{err} } ``` The selector with no "`Sel`" field breaks parsing in the `main` function, causing the code below it to fail parsing. The `handle` function never gets registered as a function declaration. Moving the `handle` function above the `main` function causes this code to type-check as expected. This poses a problem for editor-integrated tools that need to work on broken code.
NeedsInvestigation
low
Critical
388,814,263
TypeScript
CFA with deep expressions doesn't work correctly
<!-- ๐Ÿšจ 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.1 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** **Code** ```ts declare var foo: { bar?: { baz?: { x: 1 } } }; (foo.bar === undefined ? undefined : foo.bar.baz) === undefined ? undefined : foo.bar.baz.x; ``` **Expected behavior:** No error **Actual behavior:** `foo.bar.baz.x`: Object is possibly 'undefined' (`foo.bar.baz`) **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> **Related Issues:** <!-- Did you find other bugs that looked similar? -->
Bug,Domain: Control Flow
low
Critical
388,822,880
flutter
[WebVIew] Add page loading failure callbacks.
*Splitting this from https://github.com/flutter/flutter/issues/24981*
c: new feature,p: webview,package,team-ecosystem,P2,triaged-ecosystem
low
Critical
388,823,210
go
go/parser: fails to parse an invalid switch statement
Repro case: ```go package main import "go/ast" func main() { var node ast.Node var lit *ast.CompositeLit switch n := node.(type) { case *ast.CompositeLit: lit = n lit. case *ast.KeyValueExpr: } } ``` In this case, `lit. case *ast.KeyValueExpr:` gets parsed into an *ast.BadStmt. This is a problem for tools that need to work on broken code.
NeedsInvestigation,gopls/parsing
low
Critical
388,832,337
flutter
FloatingActionButton should attach to AppBar
It should be possible to set the position of a `FloatingActionButton` relative to the `AppBar` not just the `BottomAppBar`. See https://material.io/design/components/buttons-floating-action-button.html#placement
c: new feature,framework,f: material design,a: quality,c: proposal,P2,team-design,triaged-design
low
Minor
388,834,026
TypeScript
Change Diagnostic.code to 'string | number'
I'm writing a LanguageService plugin for TypeScript that returns custom diagnostics. A `Diagnostic` needs to have a `code` property of type number. I don't have a number. Instead I can provide a string that represents the name of the rule producing the diagnostic. In addition a random number I would choose looks quite ugly in the tooltip VSCode displays for the Diagnostic. I know TypeScript only ever creates Diagnostics with numeric `code`, but it's too limiting for plugins. I looked it up and the LanguageServer protocol specifies it as `code?: number | string`. My current workaround is to use a type assertion. Until now nothing bad has happened.
Suggestion,Breaking Change,API,Experience Enhancement
low
Minor
388,860,771
kubernetes
`failed to garbage collect required amount of images. Wanted to free 473842483 bytes, but freed 0 bytes`
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!--> **What happened**: I've been seeing a number of evictions recently that appear to be due to disk pressure: ```yaml $$$ kubectl get pod kumo-go-api-d46f56779-jl6s2 --namespace=kumo-main -o yaml apiVersion: v1 kind: Pod metadata: creationTimestamp: 2018-12-06T10:05:25Z generateName: kumo-go-api-d46f56779- labels: io.kompose.service: kumo-go-api pod-template-hash: "802912335" name: kumo-go-api-d46f56779-jl6s2 namespace: kumo-main ownerReferences: - apiVersion: extensions/v1beta1 blockOwnerDeletion: true controller: true kind: ReplicaSet name: kumo-go-api-d46f56779 uid: c0a9355e-f780-11e8-b336-42010aa80057 resourceVersion: "11617978" selfLink: /api/v1/namespaces/kumo-main/pods/kumo-go-api-d46f56779-jl6s2 uid: 7337e854-f93e-11e8-b336-42010aa80057 spec: containers: - env: - redacted... image: gcr.io/<redacted>/kumo-go-api@sha256:c6a94fc1ffeb09ea6d967f9ab14b9a26304fa4d71c5798acbfba5e98125b81da imagePullPolicy: Always name: kumo-go-api ports: - containerPort: 5000 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: default-token-t6jkx readOnly: true dnsPolicy: ClusterFirst nodeName: gke-kumo-customers-n1-standard-1-pree-0cd7990c-jg9s restartPolicy: Always schedulerName: default-scheduler securityContext: {} serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 tolerations: - effect: NoExecute key: node.kubernetes.io/not-ready operator: Exists tolerationSeconds: 300 - effect: NoExecute key: node.kubernetes.io/unreachable operator: Exists tolerationSeconds: 300 volumes: - name: default-token-t6jkx secret: defaultMode: 420 secretName: default-token-t6jkx status: message: 'The node was low on resource: nodefs.' phase: Failed reason: Evicted startTime: 2018-12-06T10:05:25Z ``` Taking a look at `kubectl get events`, I see these warnings: ``` $$$ kubectl get events LAST SEEN FIRST SEEN COUNT NAME KIND SUBOBJECT TYPE REASON SOURCE MESSAGE 2m 13h 152 gke-kumo-customers-n1-standard-1-pree-0cd7990c-jg9s.156e07f40b90ed91 Node Warning ImageGCFailed kubelet, gke-kumo-customers-n1-standard-1-pree-0cd7990c-jg9s (combined from similar events): failed to garbage collect required amount of images. Wanted to free 473948979 bytes, but freed 0 bytes 37m 37m 1 gke-kumo-customers-n1-standard-1-pree-0cd7990c-jg9s.156e3127ebc715c3 Node Warning ImageGCFailed kubelet, gke-kumo-customers-n1-standard-1-pree-0cd7990c-jg9s failed to garbage collect required amount of images. Wanted to free 473674547 bytes, but freed 0 bytes ``` Digging a bit deeper: ```yaml $$$ kubectl get event gke-kumo-customers-n1-standard-1-pree-0cd7990c-jg9s.156e07f40b90ed91 -o yaml apiVersion: v1 count: 153 eventTime: null firstTimestamp: 2018-12-07T11:01:06Z involvedObject: kind: Node name: gke-kumo-customers-n1-standard-1-pree-0cd7990c-jg9s uid: gke-kumo-customers-n1-standard-1-pree-0cd7990c-jg9s kind: Event lastTimestamp: 2018-12-08T00:16:09Z message: '(combined from similar events): failed to garbage collect required amount of images. Wanted to free 474006323 bytes, but freed 0 bytes' metadata: creationTimestamp: 2018-12-07T11:01:07Z name: gke-kumo-customers-n1-standard-1-pree-0cd7990c-jg9s.156e07f40b90ed91 namespace: default resourceVersion: "381976" selfLink: /api/v1/namespaces/default/events/gke-kumo-customers-n1-standard-1-pree-0cd7990c-jg9s.156e07f40b90ed91 uid: 65916e4b-fa0f-11e8-ae9a-42010aa80058 reason: ImageGCFailed reportingComponent: "" reportingInstance: "" source: component: kubelet host: gke-kumo-customers-n1-standard-1-pree-0cd7990c-jg9s type: Warning ``` There's actually remarkably little here. This message doesn't say anything regarding why ImageGC was initiated or why it was unable recover more space. **What you expected to happen**: Image GC to work correctly, or at least fail to schedule pods onto nodes that do not have sufficient disk space. **How to reproduce it (as minimally and precisely as possible)**: Run and stop as many pods as possible on a node in order to encourage disk pressure. Then observe these errors. **Anything else we need to know?**: n/a **Environment**: - Kubernetes version (use `kubectl version`): ``` Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.7", GitCommit:"0c38c362511b20a098d7cd855f1314dad92c2780", GitTreeState:"clean", BuildDate:"2018-08-20T10:09:03Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.7-gke.11", GitCommit:"fa90543563c9cfafca69128ce8cd9ecd5941940f", GitTreeState:"clean", BuildDate:"2018-11-08T20:22:21Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"} ``` - Cloud provider or hardware configuration: GKE - OS (e.g. from /etc/os-release): I'm running macOS 10.14, nodes are running Container-Optimized OS (cos). - Kernel (e.g. `uname -a`): `Darwin D-10-19-169-80.dhcp4.washington.edu 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64` - Install tools: n/a - Others: n/a <!-- DO NOT EDIT BELOW THIS LINE --> /kind bug
kind/bug,sig/node,help wanted,good first issue,triage/accepted
high
Critical
388,861,857
godot
Getting "Loaded resource as image file" warning, but the code is legit because it runs in editor
Godot 3.1 alpha2 In my terrain plugin, I deal with images often and also save and load them with `Image.load()` and `Image.save_png()` using the project resource paths. The reason I'm doing this is because I want them to be editable in the editor, and textures are `ImageTextures`, while they will be `StreamTextures` in the exported game (in which case I use `load` normally, unless the game itself also wants to edit them). On a side note, it forces me to swap between `StreamTexture` and `ImageTexture` quite often, honestly I don't really get the difference between them as an API. But the point is, it makes the editor throw these warnings often: ``` WARNING: load: Loaded resource as image file, this will not work on export: 'res://tests/terrain7/terrain7.hterrain_data/color.png'. Instead, import the image file as an Image resource and load it normally as a resource. At: core/image.cpp:1742 ``` I don't know how I am supposed to avoid it. My plugin has to load images, forcing them to have an import option to load them as images is not fit to the task here.
discussion,topic:editor,topic:import
medium
Critical
388,866,664
storybook
Storysource unable to parse Flow type annotations
**Describe the bug** Storysource is unable to parse Flow type annotations. When the type annotations are removed or by wrapping it around a flow comment the error will go away. **Code snippets** Error message from Console ``` ./src/form/form.stories.js Module build failed: SyntaxError: Unexpected token (43:5) ``` Flow example resulting in error ``` type ContactRawFormProps = { handleSubmit: Function, }; const ContactRawForm = (props: ContactRawFormProps) ``` **System:** - OS: Windows10 - Browser: Chrome - Framework: React - Addons: ``` "@storybook/addon-backgrounds": "3.4.8", "@storybook/addon-knobs": "3.4.8", "@storybook/addon-notes": "3.4.8", "@storybook/addon-storysource": "3.4.8", ``` - Version: ` "babel-core": "6.26.3",` **Additional context** webpack.config.js ``` { test: /\.stories\.js?$/, exclude: [ path.resolve(__dirname, '../src/old-components'), path.resolve(__dirname, '../src/deprecated'), ], use: [ { loader: require.resolve('@storybook/addon-storysource/loader'), options: { prettierConfig: { parser: 'babylon', }, uglyCommentsRegex: [/^::/], }, }, ], enforce: 'pre', }, ```
feature request,good first issue,addon: storysource
low
Critical
388,882,051
pytorch
Am I able to run caffe2 and gloo example: resnet50_trainer.py using pytorch v1.0rc1?
Hello, I was able to run resnet50_trainer.py at the beginning of this year. I noticed that caffe2 merged into pytorch in this October. I am successful in installing pytorch v1.0rc1 and succeed in running pytorch/example/imagenet/main.py in both single node and distributed situation. However, I still wanted to run caffe2 and gloo using resnet50_trainer.py. I am frustrated here. I found that when I was building pytorch, caffe2 had also been built. Whereas, the file: build, has changed a lot. I haven't seen an example of successfully running resnet50_trainer.py since October. May I know if someone is able to run this example with pytorch v1.0rc1 and how you run it please? BTW, I am also wondering how to run pytorch/example/imagenet/main.py using gloo backend. I used --dist-backend 'gloo' in my command, but I feel confused about this option. I used to need to setup redis when I ran with gloo backend. Do I need to setup redis server now and how can I do that to run pytorch/example/imagenet/main.py with gloo in distributed multi nodes situation. Another thing is that: since I wanted to make sure that I was using gloo running pytorch/example/imagenet/main.py, I added printf into pytorch/torch/lib/include/gloo/*allreduce* files. However, after I recomplied pytorch, I didn't see any of those printf. Does it mean that pytorch/example/imagenet/main.py is not able to run with gloo, although I added --dist-backend 'gloo' and main.py ran successfully. Thanks a lot.
caffe2
low
Minor
388,884,277
react
eslint-plugin-react-hooks should report errors inside unnamed functions
I want to report a bug for the hooks plugin. **What is the current behavior?** There was no error report after running eslint, but the component failed when running in the browser. From the chrome dev console it reported "Uncaught Error: Rendered fewer hooks than expected. This may be caused by an accidental early return statement." **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Here is a link to the github repo: https://github.com/paboulos/react-hooks-eslint **What is the expected behavior?** Followed The Hooks API guide which says React hooks provides a linter plugin to enforce these rules automatically.Therefore it should have reported a usage violation when the eslint hooks plugin is specified. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** Using window 10 OS and Chrome browser. 1. First ran npx create-react-app Hooks 2. Installed react 16.7.0-alpha.2 and react-dom 16.7.0-alpha.2 3. Installed eslint dev dependencies: "babel-eslint": "9.0.0", "babel-loader": "8.0.4", "eslint": "5.9.0", "eslint-config-airbnb": "17.1.0", "eslint-loader": "2.1.1", "eslint-plugin-import": "2.14.0", "eslint-plugin-jsx-a11y": "6.1.2", "eslint-plugin-react": "7.11.1", "eslint-plugin-react-hooks": "0.0.0" 4. Created the .eslintrc.json following the instructions from the Hooks API Doc Then ran package script lint as follows: "npm run lint" no errors reported. Then ran package script start as follows: "npm start" The React component CountHooks calls useState incorrectly and reports error in the browser dev console.
Type: Feature Request,Component: Hooks
medium
Critical
388,890,891
vscode
Way to Re-enter Context of the Placeholder Tab Progression While Using Snippets
When going through tab progression of a long snippet with many different placeholder values to enter, it can be possible to accidentally click a mouse or hit a wrong key that exits from the snippet context altogether. In ST3, if you hit ctr+z, you are taken back within the context of the snippet's tab progression to the place where it was when the last edit was made, and you can then finish the snippet. I think it would be nice if this were the same in VS Code. I don't know how common it is, but I have some very long and complex snippets, and I'm worried about sometimes needing to restart one half way through if I switch from ST3 to VS Code.
feature-request,snippets
low
Minor
388,902,677
vscode
Support multiple lineComments in a language config to allow "Remove Line Comment" to work more reliably
In some languages, there may be multiple single-line comment markers, like `//` and `///`. However the language configs can only provide a single lineComment setting which is used by the `Remove Line Comment` command. This makes it hard to uncomment. For example, take this C# code: ```cs /// <summary> /// The GetZero method. /// </summary> /// <example> /// This sample shows how to call the <see cref="GetZero"/> method. /// <code> /// class TestClass /// { /// static int Main() /// { /// return GetZero(); /// } /// } /// </code> /// </example> public static int GetZero() { return 0; } ``` If you copy/pasted the code from the `<example>` section and tried to remove the comment using `Remove Line Comment` you end up with this: ```cs / class TestClass / { / static int Main() / { / return GetZero(); / } / } ``` We have a similar issue in Dart - we use both `//` and `///`. There are things like [DocFX](https://dotnet.github.io/docfx/spec/triple_slash_comments_spec.html) that encourage triple-slashes too. Although `Add Line Comment` would only be able to use the first, it'd be nice if in the language declaration we could provide multiple `lineComments` so that removing could handle this case better (it can use the longest comment first when trying to remove the markers): ```js { "comments": { "lineComment": [ "//", "///" ], "blockComment": [ "/*", "*/" ] }, } ``` Or: ```js { "comments": { "lineComment": "//", "additionalLineComments": [ "///" ], "blockComment": [ "/*", "*/" ] }, } ```
feature-request,editor-comments
medium
Major
388,909,234
rust
absolute-paths-not-starting-with-crate gives bad suggestion for string-based attribute path
Running ``` cargo fix --features "test" --all --edition ``` (Note that https://github.com/lalrpop/lalrpop/issues/426 forces some manual fixup to make generated files writeable) on https://github.com/gluon-lang/gluon gives a lot of errors (` cargo fix --features "test" -p gluon_base --edition` to only fix the first crate does not help either). Errors seems to be mainly on the form ``` warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition --> base\src\ast.rs:12:5 | 12 | use metadata::{Comment, Metadata}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::metadata::{Comment, Metadata}` | = note: `-W absolute-paths-not-starting-with-crate` implied by `-W rust-2018-compatibility` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130> ``` Output at https://gist.github.com/Marwes/6fbbd86ba442e8a6158c009d5d560dd0 ``` rustc --version --verbose rustc 1.32.0-nightly (14997d56a 2018-12-05) binary: rustc commit-hash: 14997d56a550f4aa99fe737593cd2758227afc56 commit-date: 2018-12-05 host: x86_64-pc-windows-msvc release: 1.32.0-nightly LLVM version: 8.0 ```
A-lints,A-edition-2018
low
Critical
388,913,282
opencv
RGB frames for video files with Alpha channel support
<!-- If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses. If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute). Please: * Read the documentation to test with the latest developer build. * Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue. * Try to be as detailed as possible in your report. * Report only one problem per created issue. This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library. --> ##### System information (version) <!-- Example - OpenCV => 3.1 - Operating System / Platform => Ubuntu - Compiler => gcc --> - OpenCV => 3.4 - Operating System / Platform => Ubuntu - Compiler => gcc ##### Detailed description When reading a `.mov` file with alpha channel support, the `cv::VideoCapture` returns a BGR frame instead of BGRA frame. The issue was highlighted in [this SO post](https://stackoverflow.com/q/53552698/3051961). Sample file is also attached. [sample_mov_file_with_alpha.zip](https://github.com/opencv/opencv/files/2659641/out.zip) ##### Steps to reproduce <!-- to add code example fence it with triple backticks and optional file extension ```.cpp // C++ code example ``` or attach as .txt or .zip file --> ```cpp int main() { cv::VideoCapture cap("/path/to/file.mov"); cv::Mat m; while(true) { cap.read(m); if (m.empty()) { break; } std::cout << m.channels() << std::endl; } } ```
feature,category: videoio
low
Critical
388,919,236
rust
error[E0275]: overflow evaluating the requirement only with incremental build involved
Steps to reproduce: 1. clone https://github.com/upsuper/telegram-rustevalbot (and checkout 2502973017d39a867dc2cde089b535127bc86e3b which is what I'm currently seeing) 2. run `cargo build` 3. then run `cargo build` again It builds correctly in step 2, but fails in step 3 and shows the following error: <details> ``` error[E0275]: overflow evaluating the requirement `http::response::Parts: std::marker::Send` | = help: consider adding a `#![recursion_limit="128"]` attribute to your crate = note: required because it appears within the type `http::response::Response<()>` = note: required because it appears within the type `h2::proto::peer::PollMessage` = note: required because it appears within the type `h2::proto::streams::recv::Event` = note: required because it appears within the type `h2::proto::streams::buffer::Slot<h2::proto::streams::recv::Event>` = note: required because it appears within the type `slab::Entry<h2::proto::streams::buffer::Slot<h2::proto::streams::recv::Event>>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<slab::Entry<h2::proto::streams::buffer::Slot<h2::proto::streams::recv::Event>>>` = note: required because it appears within the type `alloc::raw_vec::RawVec<slab::Entry<h2::proto::streams::buffer::Slot<h2::proto::streams::recv::Event>>>` = note: required because it appears within the type `std::vec::Vec<slab::Entry<h2::proto::streams::buffer::Slot<h2::proto::streams::recv::Event>>>` = note: required because it appears within the type `slab::Slab<h2::proto::streams::buffer::Slot<h2::proto::streams::recv::Event>>` = note: required because it appears within the type `h2::proto::streams::buffer::Buffer<h2::proto::streams::recv::Event>` = note: required because it appears within the type `h2::proto::streams::recv::Recv` = note: required because it appears within the type `h2::proto::streams::streams::Actions` = note: required because it appears within the type `h2::proto::streams::streams::Inner` = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Mutex<h2::proto::streams::streams::Inner>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<std::sync::Mutex<h2::proto::streams::streams::Inner>>` = note: required because it appears within the type `h2::proto::streams::streams::OpaqueStreamRef` = note: required because it appears within the type `h2::share::ReleaseCapacity` = note: required because it appears within the type `h2::share::RecvStream` = note: required because it appears within the type `hyper::body::body::Kind` = note: required because it appears within the type `hyper::body::body::Body` = note: required because it appears within the type `http::request::Request<hyper::body::body::Body>` = note: required because it appears within the type `(http::request::Request<hyper::body::body::Body>, hyper::client::dispatch::Callback<http::request::Request<hyper::body::body::Body>, http::response::Response<hyper::body::body::Body>>)` = note: required because it appears within the type `std::option::Option<(http::request::Request<hyper::body::body::Body>, hyper::client::dispatch::Callback<http::request::Request<hyper::body::body::Body>, http::response::Response<hyper::body::body::Body>>)>` = note: required because it appears within the type `hyper::client::dispatch::Envelope<http::request::Request<hyper::body::body::Body>, http::response::Response<hyper::body::body::Body>>` = note: required because of the requirements on the impl of `std::marker::Send` for `futures::sync::mpsc::Inner<hyper::client::dispatch::Envelope<http::request::Request<hyper::body::body::Body>, http::response::Response<hyper::body::body::Body>>>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<futures::sync::mpsc::Inner<hyper::client::dispatch::Envelope<http::request::Request<hyper::body::body::Body>, http::response::Response<hyper::body::body::Body>>>>` = note: required because it appears within the type `futures::sync::mpsc::Sender<hyper::client::dispatch::Envelope<http::request::Request<hyper::body::body::Body>, http::response::Response<hyper::body::body::Body>>>` = note: required because it appears within the type `futures::sync::mpsc::UnboundedSender<hyper::client::dispatch::Envelope<http::request::Request<hyper::body::body::Body>, http::response::Response<hyper::body::body::Body>>>` = note: required because it appears within the type `hyper::client::dispatch::Sender<http::request::Request<hyper::body::body::Body>, http::response::Response<hyper::body::body::Body>>` = note: required because it appears within the type `hyper::client::conn::SendRequest<hyper::body::body::Body>` = note: required because it appears within the type `hyper::client::PoolTx<hyper::body::body::Body>` = note: required because it appears within the type `hyper::client::PoolClient<hyper::body::body::Body>` = note: required because it appears within the type `hyper::client::pool::Idle<hyper::client::PoolClient<hyper::body::body::Body>>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<hyper::client::pool::Idle<hyper::client::PoolClient<hyper::body::body::Body>>>` = note: required because it appears within the type `alloc::raw_vec::RawVec<hyper::client::pool::Idle<hyper::client::PoolClient<hyper::body::body::Body>>>` = note: required because it appears within the type `std::vec::Vec<hyper::client::pool::Idle<hyper::client::PoolClient<hyper::body::body::Body>>>` = note: required because it appears within the type `(std::sync::Arc<std::string::String>, std::vec::Vec<hyper::client::pool::Idle<hyper::client::PoolClient<hyper::body::body::Body>>>)` = note: required because it appears within the type `std::marker::PhantomData<(std::sync::Arc<std::string::String>, std::vec::Vec<hyper::client::pool::Idle<hyper::client::PoolClient<hyper::body::body::Body>>>)>` = note: required because it appears within the type `std::collections::hash::table::RawTable<std::sync::Arc<std::string::String>, std::vec::Vec<hyper::client::pool::Idle<hyper::client::PoolClient<hyper::body::body::Body>>>>` = note: required because it appears within the type `std::collections::HashMap<std::sync::Arc<std::string::String>, std::vec::Vec<hyper::client::pool::Idle<hyper::client::PoolClient<hyper::body::body::Body>>>>` = note: required because it appears within the type `hyper::client::pool::PoolInner<hyper::client::PoolClient<hyper::body::body::Body>>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Mutex<hyper::client::pool::PoolInner<hyper::client::PoolClient<hyper::body::body::Body>>>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<std::sync::Mutex<hyper::client::pool::PoolInner<hyper::client::PoolClient<hyper::body::body::Body>>>>` = note: required because it appears within the type `std::option::Option<std::sync::Arc<std::sync::Mutex<hyper::client::pool::PoolInner<hyper::client::PoolClient<hyper::body::body::Body>>>>>` = note: required because it appears within the type `hyper::client::pool::Pool<hyper::client::PoolClient<hyper::body::body::Body>>` = note: required because it appears within the type `hyper::client::Client<reqwest::connect::Connector>` = note: required because it appears within the type `reqwest::async_impl::client::ClientRef` = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<reqwest::async_impl::client::ClientRef>` = note: required because it appears within the type `reqwest::async_impl::client::PendingRequest` = note: required because it appears within the type `reqwest::async_impl::client::PendingInner` = note: required because it appears within the type `reqwest::async_impl::client::Pending` = note: required because it appears within the type `futures::future::chain::Chain<reqwest::async_impl::client::Pending, futures::future::result_::FutureResult<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>` = note: required because it appears within the type `futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>` = note: required because it appears within the type `futures::future::chain::Chain<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Summary>, [closure@src/cratesio/mod.rs:77:23: 77:45]>` = note: required because it appears within the type `futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Summary>, [closure@src/cratesio/mod.rs:77:23: 77:45]>` = note: required because it appears within the type `futures::future::map::Map<futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Summary>, [closure@src/cratesio/mod.rs:77:23: 77:45]>, [closure@src/cratesio/mod.rs:78:18: 83:14 get_crates:[closure@src/cratesio/mod.rs:40:75: 42:18]]>` = note: required because it appears within the type `futures::future::either::Either<futures::future::map::Map<futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Summary>, [closure@src/cratesio/mod.rs:77:23: 77:45]>, [closure@src/cratesio/mod.rs:78:18: 83:14 get_crates:[closure@src/cratesio/mod.rs:40:75: 42:18]]>, futures::future::map::Map<futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Crates>, [closure@src/cratesio/mod.rs:77:23: 77:45]>, [closure@src/cratesio/mod.rs:78:18: 83:14 get_crates:[closure@src/cratesio/mod.rs:50:50: 50:76]]>>` = note: required because it appears within the type `futures::future::map_err::MapErr<futures::future::either::Either<futures::future::map::Map<futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Summary>, [closure@src/cratesio/mod.rs:77:23: 77:45]>, [closure@src/cratesio/mod.rs:78:18: 83:14 get_crates:[closure@src/cratesio/mod.rs:40:75: 42:18]]>, futures::future::map::Map<futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Crates>, [closure@src/cratesio/mod.rs:77:23: 77:45]>, [closure@src/cratesio/mod.rs:78:18: 83:14 get_crates:[closure@src/cratesio/mod.rs:50:50: 50:76]]>>, [closure@src/cratesio/mod.rs:54:22: 54:65]>` = note: required because it appears within the type `futures::future::chain::Chain<futures::future::map_err::MapErr<futures::future::either::Either<futures::future::map::Map<futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Summary>, [closure@src/cratesio/mod.rs:77:23: 77:45]>, [closure@src/cratesio/mod.rs:78:18: 83:14 get_crates:[closure@src/cratesio/mod.rs:40:75: 42:18]]>, futures::future::map::Map<futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Crates>, [closure@src/cratesio/mod.rs:77:23: 77:45]>, [closure@src/cratesio/mod.rs:78:18: 83:14 get_crates:[closure@src/cratesio/mod.rs:50:50: 50:76]]>>, [closure@src/cratesio/mod.rs:54:22: 54:65]>, futures::future::map_err::MapErr<futures::future::map::Map<futures::future::either::Either<futures::future::and_then::AndThen<futures::future::map_err::MapErr<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, reqwest::async_impl::response::Json<telegram_types::bot::methods::TelegramResult<bool>>, [closure@src/bot.rs:143:23: 143:45]>, fn(reqwest::error::Error) -> bot::Error {<bot::Error as std::convert::From<reqwest::error::Error>>::from}>, std::result::Result<bool, bot::Error>, [closure@src/bot.rs:145:23: 145:90]>, futures::future::result_::FutureResult<bool, bot::Error>>, [closure@src/cratesio/mod.rs:59:26: 59:32]>, [closure@src/cratesio/mod.rs:60:30: 60:74]>, [closure@src/cratesio/mod.rs:55:23: 61:14 bot:bot::Bot, query:telegram_types::bot::inline_mode::InlineQuery]>` = note: required because it appears within the type `futures::future::and_then::AndThen<futures::future::map_err::MapErr<futures::future::either::Either<futures::future::map::Map<futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Summary>, [closure@src/cratesio/mod.rs:77:23: 77:45]>, [closure@src/cratesio/mod.rs:78:18: 83:14 get_crates:[closure@src/cratesio/mod.rs:40:75: 42:18]]>, futures::future::map::Map<futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Crates>, [closure@src/cratesio/mod.rs:77:23: 77:45]>, [closure@src/cratesio/mod.rs:78:18: 83:14 get_crates:[closure@src/cratesio/mod.rs:50:50: 50:76]]>>, [closure@src/cratesio/mod.rs:54:22: 54:65]>, futures::future::map_err::MapErr<futures::future::map::Map<futures::future::either::Either<futures::future::and_then::AndThen<futures::future::map_err::MapErr<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, reqwest::async_impl::response::Json<telegram_types::bot::methods::TelegramResult<bool>>, [closure@src/bot.rs:143:23: 143:45]>, fn(reqwest::error::Error) -> bot::Error {<bot::Error as std::convert::From<reqwest::error::Error>>::from}>, std::result::Result<bool, bot::Error>, [closure@src/bot.rs:145:23: 145:90]>, futures::future::result_::FutureResult<bool, bot::Error>>, [closure@src/cratesio/mod.rs:59:26: 59:32]>, [closure@src/cratesio/mod.rs:60:30: 60:74]>, [closure@src/cratesio/mod.rs:55:23: 61:14 bot:bot::Bot, query:telegram_types::bot::inline_mode::InlineQuery]>` = note: required because it appears within the type `futures::future::either::Either<futures::future::result_::FutureResult<(), ()>, futures::future::and_then::AndThen<futures::future::map_err::MapErr<futures::future::either::Either<futures::future::map::Map<futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Summary>, [closure@src/cratesio/mod.rs:77:23: 77:45]>, [closure@src/cratesio/mod.rs:78:18: 83:14 get_crates:[closure@src/cratesio/mod.rs:40:75: 42:18]]>, futures::future::map::Map<futures::future::and_then::AndThen<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, std::result::Result<reqwest::async_impl::response::Response, reqwest::error::Error>, [closure@src/cratesio/mod.rs:76:23: 76:53]>, reqwest::async_impl::response::Json<cratesio::Crates>, [closure@src/cratesio/mod.rs:77:23: 77:45]>, [closure@src/cratesio/mod.rs:78:18: 83:14 get_crates:[closure@src/cratesio/mod.rs:50:50: 50:76]]>>, [closure@src/cratesio/mod.rs:54:22: 54:65]>, futures::future::map_err::MapErr<futures::future::map::Map<futures::future::either::Either<futures::future::and_then::AndThen<futures::future::map_err::MapErr<futures::future::and_then::AndThen<reqwest::async_impl::client::Pending, reqwest::async_impl::response::Json<telegram_types::bot::methods::TelegramResult<bool>>, [closure@src/bot.rs:143:23: 143:45]>, fn(reqwest::error::Error) -> bot::Error {<bot::Error as std::convert::From<reqwest::error::Error>>::from}>, std::result::Result<bool, bot::Error>, [closure@src/bot.rs:145:23: 145:90]>, futures::future::result_::FutureResult<bool, bot::Error>>, [closure@src/cratesio/mod.rs:59:26: 59:32]>, [closure@src/cratesio/mod.rs:60:30: 60:74]>, [closure@src/cratesio/mod.rs:55:23: 61:14 bot:bot::Bot, query:telegram_types::bot::inline_mode::InlineQuery]>>` = note: required because of the requirements on the impl of `bot_runner::UpdateHandler` for `bot_runner::BotRun<cratesio::CratesioBot, for<'r> fn(&'r cratesio::CratesioBot, telegram_types::bot::types::Update) -> impl futures::future::Future {cratesio::CratesioBot::handle_update}>` = note: required because of the requirements on the impl of `futures::future::Future` for `bot_runner::BotRun<cratesio::CratesioBot, for<'r> fn(&'r cratesio::CratesioBot, telegram_types::bot::types::Update) -> impl futures::future::Future {cratesio::CratesioBot::handle_update}>` = note: required because of the requirements on the impl of `futures::future::IntoFuture` for `bot_runner::BotRun<cratesio::CratesioBot, for<'r> fn(&'r cratesio::CratesioBot, telegram_types::bot::types::Update) -> impl futures::future::Future {cratesio::CratesioBot::handle_update}>` ``` </details> (Note: this projects always rebuild because its build script uses [git-version](https://crates.io/crates/git-version) which tricks cargo to rebuild even when nothing changes.) Further note: if I remove the `incremental` directory in target, then it builds again. But after that, it fails again. I have verified that it reproduces in both my macOS and a Linux VPS.
T-compiler,A-incr-comp,C-bug
low
Critical
388,944,104
pytorch
caffe2/predictor missing from libtorch
## ๐Ÿ› Bug I want to use the `caffe2::Predictor` API, but when I download `libtorch` from the website, even on the current stable (1.0) zip file, `libtorch/include/caffe2/predictor` folder is entirely missing. ## To Reproduce Steps to reproduce the behavior: 1. Download `libtorch` from https://pytorch.org (Linux, CUDA 9.0) 2. Observe that `libtorch/include/caffe2` is missing `predictor` folder ## Environment PyTorch version: 1.0.0 (pip installed) 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.13.1 Python version: 3.6 Is CUDA available: Yes CUDA runtime version: 9.0.176 GPU models and configuration: GPU 0: Tesla P100-PCIE-16GB Nvidia driver version: 384.145 cuDNN version: Probably one of the following: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.4.1 /usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a Versions of relevant libraries: [pip] Could not collect [conda] Could not collect
caffe2
low
Critical
388,950,448
godot
Overdraw viewport mode is not affected by vertex shader displacement
Godot 3.0.6 Out of curiosity, I wanted to check what the overdraw viewport mode would look like with my terrain plugin. ![image](https://user-images.githubusercontent.com/1311555/49689716-0e756c80-fb1d-11e8-93a8-1c6631c68233.png) But with overdraw mode: ![image](https://user-images.githubusercontent.com/1311555/49689718-1b925b80-fb1d-11e8-8104-20d5bb8fe59b.png) Wireframe and unshaded modes work. I think it is caused by the fact my terrain rendering is using vertex displacement in the vertex shader, overdraw mode ignores it... Edit: in 3.2 I'm using it to debug Transvoxel geometry and it's unusable as well.
bug,topic:rendering,confirmed
low
Critical
388,952,610
pytorch
caffe2::Predictor: Cannot find operator schema for GivenTensorFill. Will skip schema checking.
## ๐Ÿ› Bug Calling `new caffe2::Predictor(init_net, pred_net)` where each `net` is of type `caffe2::NetDef` (devicetype set to `caffe2::CUDA`) raises an error that says `Cannot find operator schema for GivenTensorFill. Will skip schema checking.` -- EDIT -- I found a couple of other similar issues ([this](https://github.com/facebookresearch/Detectron/issues/171), [this](https://github.com/caffe2/caffe2/issues/347) and [this](https://github.com/caffe2/caffe2/issues/701)) In the last one, @peterneher says that `caffe2::Predictor` uses `TensorCPU` internally, so I checked and even on the latest libtorch (stable 1.0) this is true. For now, I'll use raw nets as suggested, but supporting CUDA tensors would be great :) ## To Reproduce Steps to reproduce the behavior: This works on my macbook, but not on my linux system. The platform where the error is occurring will be stated below in the environment section. Briefly, it's Ubuntu 16.04 + CUDA 9.0 + cudnn 7.3.0. Maybe it has to do with the `libtorch` distribution for mac and for linux? ## Environment PyTorch version: 1.0.0a0+db5d313 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.13.1 Python version: 3.6 Is CUDA available: Yes CUDA runtime version: 9.0.176 GPU models and configuration: GPU 0: Tesla P100-PCIE-16GB Nvidia driver version: 384.145 cuDNN version: Probably one of the following: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.3.0 /usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a Versions of relevant libraries: [pip] Could not collect [conda] Could not collect
caffe2
low
Critical
388,956,758
rust
Custom section generation under `wasm32-unknown-unknown` is inconsistent and unintuitive
Assume we have a crate named `dependency` with the following content: ```rust pub fn trigger() { submodule::call(); } pub mod submodule { pub fn call() { #[link_section = "some-custom-section"] static SNIPPET: [u8; 3] = [b'X', b'Y', b'Z']; extern "C" { fn require_XYZ(); } unsafe { require_XYZ(); } } } ``` And we have another crate which uses the `dependency`: ```rust extern crate dependency; #[no_mangle] pub fn main() { dependency::trigger(); } ``` If I compile this crate like this: ``` $ cargo build --target=wasm32-unknown-unknown --release ``` and dump it with `wasm-objdump` then the `"some-custom-section"` custom section will be missing. However, if I change the `dependency` crate to look like this (I've moved the `call` function from the `submodule` to the crate root and even made it private): ```rust pub fn trigger() { call(); } fn call() { #[link_section = "some-custom-section"] static SNIPPET: [u8; 3] = [b'X', b'Y', b'Z']; extern "C" { fn require_XYZ(); } unsafe { require_XYZ(); } } ``` and build the main crate again then the custom section *is* generated. Calling `dependency::submodule::call` directly instead of `dependency::trigger` also results in the custom section being generated. Based on my experiments the custom section generation currently works like this: | In which crate is the custom section defined? | Where is the function containing the section? | How is the function containing the custom section called? | Is it generated? | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------------------- | ---------------- | | External crate | Submodule | Not called | No | | External crate | Submodule | Indirectly | No | | External crate | Submodule | Directly | Yes | | External crate | In root | Not called | No | | External crate | In root | Indirectly | Yes | | External crate | In root | Directly | Yes | | Main crate | Any | Any | Yes | I have an example crate here which reproduces the issue: ``` $ git clone https://github.com/koute/rust-custom-section-issue $ cd rust-custom-section-issue # This will not generate a custom section: $ cargo build --target=wasm32-unknown-unknown --release --features broken $ wasm-objdump -s target/wasm32-unknown-unknown/release/rust_custom_section_issue.wasm # This will: $ cargo build --target=wasm32-unknown-unknown --release --features working $ wasm-objdump -s target/wasm32-unknown-unknown/release/rust_custom_section_issue.wasm ``` I'm using the most recent nightly: `rustc 1.32.0-nightly (4a45578bc 2018-12-07)` Could we make this somewhat consistent? Some background: as a first step towards `wasm-bindgen` compatibility I'm converting [`stdweb`](https://github.com/koute/stdweb)'s `js!` macro to use custom sections, however to make it not break existing downstream users I need to have either a) every custom section in the whole crate graph be generated, or b) always generated if the custom section is defined inside of a potentially reachable (at runtime) function. Otherwise I end up generating an import for a snippet for which the corresponding custom section entry doesn't exist. cc @alexcrichton
A-linkage,O-wasm
low
Critical
388,968,511
pytorch
[Feature request] create sparse coo matrix w/o index check
## ๐Ÿš€ Feature <!-- A clear and concise description of the feature proposal --> Currently, creating a sparse coo matrix requires checking all the provided indices are within bound. However, this is costly and sometimes not needed (e.g. when the sparse matrix is from a graph adj). Request to provide a way to create sparse coo matrix w/o index check. ## Motivation <!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too --> The recent v1.0 update breaks an API in the [DGL](https://github.com/dmlc/dgl) project. We are a library for deep learning on graphs. We built it atop of framework like Pytorch. Sparse matrix is critical in implementing efficient message passing algorithm. We found that creating a sparse matrix in pytorch is slow due to the unnecessary index check (our graph construction guarantees that all indices will be within bound). As a result, we use an internal API `_sparse_coo_tensor_unsafe` in the v0.4 time, which is removed in v1.0. It will be great if pytorch could have such support. ## Pitch <!-- A clear and concise description of what you want to happen. --> Add a flag in `sparse_coo_matrix` interface called `validate_index`. It default to be `True`, but when set `False`, the index check will be skipped. ## Alternatives <!-- A clear and concise description of any alternative solutions or features you've considered, if any. --> No alternatives. The internal API has been removed. cc @aocsa @nikitaved @pearu @mruberry @VitalyFedyunin @ngimel
module: performance,module: sparse,triaged,enhancement
medium
Major
388,975,390
terminal
WSL: Pasting text from a clipboard manager doesn't insert text at the console's cursor
Microsoft Windows [Version 10.0.17763.134] --- I'm using Ubuntu WSL and the default `ubuntu.exe` terminal. It's been configured so that `CTRL+Shift+C/V` allow for copy / pasting, which by itself is working. However, I use Ditto which is an open source clipboard manager which allows you to write to and access multiple clipboard items. It can be found at https://ditto-cp.sourceforge.io/. #### Expected outcome - Store multiple items in the Ditto clipboard by using the clipboard naturally. - Trigger the Ditto menu to pick an item using Ditto's registered key binding of `CTRL + ALT + V`. - Select the desired clipboard item from Ditto's menu. - See the clipboard item output at my cursor inside of the Ubuntu terminal so I can press enter to execute the command (or do whatever I want with the text that was inserted). #### Actual outcome - Store multiple items in the Ditto clipboard by using the clipboard naturally. - Trigger the Ditto menu to pick an item using Ditto's registered key binding of `CTRL + ALT + V`. - Select the desired clipboard item from Ditto's menu. - See nothing in the Ubuntu terminal because the item gets absorbed by `ubuntu.exe`, and occasionally see `^V` instead of the desired text depending on how I select the item (mouse click or pressing Enter). I've tried other terminals like ConEmu and Hyper, and in those cases Ditto works. Ditto also works just fine with every other application (browser, IRC client, code editor, etc.). It's only failing with `ubuntu.exe` and related terminals.
Issue-Question,Product-Conhost,Area-Interaction
medium
Major
388,977,370
ant-design
Make it possible to directly turn a Slider into a flexbox
- [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. ### What problem does this feature solve? Currently - in order to use flexbox to style the elements inside a `Sider`, you have to do this: <Sider style={{ background: "white" }}> <div style={{ display: "flex", flexDirection: "column", justifyContent: "space-evenly", height: "100%" }}> <SourcePicker/> <TimeSelector setTimeRange={this.setTimeRange} /> </div> </Sider> This is bad because it requires adding an unecessary `div` just to use flexbox. The reason this happens currently is because a `Sider` is composed of 2 nested divs, so adding `display: flex` to the style prop of the `Sider` only affects the outer div, thus making flexbox unusable. This is a problem because it forces developers to add unnecessary divs to their site. This A] Might make the webpage more inaccessible since excessive use of divs, etc. harms screen readers and is non-semantic HTML B] bad for performance / webpage size. Also causes inelegant/bloated code. ### What does the proposed API look like? Add a `bodyStyle` or `childrenStyle` prop, or something similar, that allows developers to style the inner div of the sider, thus letting them use flexbox without creating an extra div. Or, just remove the inner `div` inside the sider. <!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Inactive,IssueHuntFest
low
Major
389,003,883
vscode
Slow syntax highlighting
- VSCode Version: Insider 1.30 - OS Version: Windows 10 1607 LTSB x64 Steps to Reproduce: 1. Load large C++ file (60k LOC) 2. Observe the slowness. Takes like 10s to highlight the code. Does this issue occur when all extensions are disabled?: Yes
feature-request,tokenization
medium
Major
389,022,799
go
net/http: support "gzip" as a Transfer Encoding
### What version of Go are you using (`go version`)? go version go1.10.3 windows/amd64 ### Does this issue reproduce with the latest release? Yes. ### What operating system and processor architecture are you using (`go env`)? set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\xxxx\AppData\Local\go-build set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=C:\Users\xxxx\go 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 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\xxxx\AppData\Local\Temp\go-build557436246=/tmp/go-build -gno-record-gcc-switches ### What did you do? I am requesting a URL with code below: ```go package main import ( "fmt" "net/http" "time" ) func main() { urlReq2 := "https://www.azulseguros.com.br/azul-cms/wp-content/themes/azul2016/integracao-azul-leve.php?timestamp=NGJYHX7MXNS" req, err := http.NewRequest("GET", urlReq2, nil) netClient := &http.Client{ Timeout: time.Second * 10, } _, err = netClient.Do(req) if err != nil { fmt.Println(err) } } ``` I got this error: net/http: HTTP/1.x transport connection broken: unsupported transfer encoding "gzip" ### What did you expect to see? I expect to be foward to other page and get HTML. In other languages like nodejs and c#, the same request is OK. Running cURL also bring me the result. ### What did you see instead? Error on netClient.Do(): net/http: HTTP/1.x transport connection broken: unsupported transfer encoding "gzip"
help wanted,FeatureRequest
medium
Critical
389,024,601
pytorch
get/set device in c++
## Issue description itโ€™s been tricky to chase down the various ways to get/set current cuda device as the c++ interface has evolved. recently, _current_device()_ has been dropped from Context, _at::detail::DynamicCUDAInterface::set_device(d.index())_ no longer exists, etc. currently, the best way i know is: `at::Device d(at::kCUDA);` `auto *g = c10::impl::getDeviceGuardImpl(d.type());` then: `g->getDevice()` `g->setDevice(d)` this is workable, but it would be useful to have _torch::cuda::get_device() torch::cuda::set_device()_ defined along with the other functions in _api/include/torch/cuda.h_ thanks
module: cpp,triaged,small
low
Major
389,034,138
pytorch
PyTorch 1.0 source build fails (error in caffe2/utils/fatal_signal_asan_no_sig_test.cc)
I was trying to build PyTorch 1.0 from source and ended up getting this error: ``` Scanning dependencies of target simple_queue_test [ 86%] Linking CXX executable ../bin/fatal_signal_asan_no_sig_test [ 86%] Building CXX object caffe2/CMakeFiles/simple_queue_test.dir/utils/simple_queue_test.cc.o CMakeFiles/fatal_signal_asan_no_sig_test.dir/utils/fatal_signal_asan_no_sig_test.cc.o: In function `(anonymous namespace)::forkAndPipe(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::function<void ()>) [clone .constprop.98]': fatal_signal_asan_no_sig_test.cc:(.text+0x72d): undefined reference to `read(int, char*, unsigned long)' collect2: error: ld returned 1 exit status caffe2/CMakeFiles/fatal_signal_asan_no_sig_test.dir/build.make:114: recipe for target 'bin/fatal_signal_asan_no_sig_test' failed make[2]: *** [bin/fatal_signal_asan_no_sig_test] Error 1 CMakeFiles/Makefile2:6724: recipe for target 'caffe2/CMakeFiles/fatal_signal_asan_no_sig_test.dir/all' failed make[1]: *** [caffe2/CMakeFiles/fatal_signal_asan_no_sig_test.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 86%] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state_gpu.dir/python/pybind_state_registry.cc.o [ 86%] Linking CXX executable ../bin/NeuralNetTest [ 86%] Linking CXX executable ../bin/workspace_test [ 86%] Linking CXX executable ../bin/simple_queue_test [ 86%] Built target NeuralNetTest [ 86%] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state_gpu.dir/python/pybind_state_ideep.cc.o [ 86%] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state_gpu.dir/python/pybind_state_gpu.cc.o [ 86%] Built target workspace_test [ 86%] Built target simple_queue_test [ 86%] Linking CXX executable ../bin/math_test [ 86%] Linking CXX executable ../bin/operator_test [ 86%] Built target math_test [ 86%] Built target operator_test [ 86%] Linking CXX shared module python/caffe2_pybind11_state_gpu.cpython-36m-x86_64-linux-gnu.so [ 86%] Built target caffe2_pybind11_state_gpu Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Failed to run 'bash ../tools/build_pytorch_libs.sh --use-cuda --use-nnpack --use-mkldnn --use-qnnpack caffe2' ``` **System Information**: 1. Ubuntu 18.04 2. CUDA 10.0 3. GCC 7.3.0 4. Cloned PyTorch at fa12e1e4d43ca2839159cfb723ecf3ef3ad754db _I saw the same issue #14398 but didn't understand the fix suggested by the person who posted it. Why do I have to comment out a certain block of code ?_
caffe2
low
Critical
389,049,444
rust
rustc_llvm fails to build if source directory contains whitespace
Hi all, I have followed the instructions to build Rust on Windows with the MSVC toolchain (note: this issue is not windows specific) and hit a build error in rustc_llvm; here's the output: ``` error: failed to run custom build command for `rustc_llvm v0.0.0 (C:\Users\Krzysztof Lesiak\Desktop\devel\rust\src\librustc_llvm)` process didn't exit successfully: `C:\Users\Krzysztof Lesiak\Desktop\devel\rust\build\x86_64-pc-windows-msvc\stage0-codegen\release\build\rustc_llvm-9e0bf274131fe14d\build-script-build` (exit code: 101) --- stdout cargo:rerun-if-changed=C:\Users\Krzysztof Lesiak\Desktop\devel\rust\build\x86_64-pc-windows-msvc\llvm\bin\llvm-config.exe cargo:rerun-if-env-changed=LLVM_CONFIG cargo:rustc-cfg=llvm_component="aarch64" cargo:rustc-cfg=llvm_component="arm" cargo:rustc-cfg=llvm_component="asmparser" cargo:rustc-cfg=llvm_component="bitreader" cargo:rustc-cfg=llvm_component="bitwriter" cargo:rustc-cfg=llvm_component="hexagon" cargo:rustc-cfg=llvm_component="instrumentation" cargo:rustc-cfg=llvm_component="interpreter" cargo:rustc-cfg=llvm_component="ipo" cargo:rustc-cfg=llvm_component="linker" cargo:rustc-cfg=llvm_component="lto" cargo:rustc-cfg=llvm_component="mcjit" cargo:rustc-cfg=llvm_component="mips" cargo:rustc-cfg=llvm_component="msp430" cargo:rustc-cfg=llvm_component="nvptx" cargo:rustc-cfg=llvm_component="powerpc" cargo:rustc-cfg=llvm_component="sparc" cargo:rustc-cfg=llvm_component="systemz" cargo:rustc-cfg=llvm_component="x86" cargo:rerun-if-changed-env=LLVM_RUSTLLVM cargo:rerun-if-changed=../rustllvm\RustWrapper.cpp cargo:rerun-if-changed=../rustllvm\rustllvm.h cargo:rerun-if-changed=../rustllvm\README cargo:rerun-if-changed=../rustllvm\PassWrapper.cpp cargo:rerun-if-changed=../rustllvm\llvm-rebuild-trigger cargo:rerun-if-changed=../rustllvm\Linker.cpp cargo:rerun-if-changed=../rustllvm\ArchiveWrapper.cpp cargo:rerun-if-changed=../rustllvm\.editorconfig TARGET = Some("x86_64-pc-windows-msvc") OPT_LEVEL = Some("2") HOST = Some("x86_64-pc-windows-msvc") CXX_x86_64-pc-windows-msvc = None CXX_x86_64_pc_windows_msvc = None HOST_CXX = None CXX = None CXXFLAGS_x86_64-pc-windows-msvc = None CXXFLAGS_x86_64_pc_windows_msvc = None HOST_CXXFLAGS = None CXXFLAGS = None DEBUG = Some("false") running: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX64\\x64\\cl.exe" "/nologo" "/MT" "/O2" "-IC:\\Users\\Krzysztof" "Lesiak\\Desktop\\devel\\rust\\build\\x86_64-pc-windows-msvc\\llvm\\include" "/nologo" "/MT" "/Zc:inline" "/Zc:strictStrings" "/Oi" "/Zc:rvalueCast" "/W4" "-wd4141" "-wd4146" "-wd4180" "-wd4244" "-wd4258" "-wd4267" "-wd4291" "-wd4345" "-wd4351" "-wd4355" "-wd4456" "-wd4457" "-wd4458" "-wd4459" "-wd4503" "-wd4624" "-wd4722" "-wd4800" "-wd4100" "-wd4127" "-wd4512" "-wd4505" "-wd4610" "-wd4510" "-wd4702" "-wd4245" "-wd4706" "-wd4310" "-wd4701" "-wd4703" "-wd4389" "-wd4611" "-wd4805" "-wd4204" "-wd4577" "-wd4091" "-wd4592" "-wd4319" "-wd4324" "-w14062" "-we4238" "/nologo" "/MT" "/EHs-c-" "/GR-" "-D_CRT_SECURE_NO_DEPRECATE" "-D_CRT_SECURE_NO_WARNINGS" "-D_CRT_NONSTDC_NO_DEPRECATE" "-D_CRT_NONSTDC_NO_WARNINGS" "-D_SCL_SECURE_NO_DEPRECATE" "-D_SCL_SECURE_NO_WARNINGS" "-DUNICODE" "-D_UNICODE" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "/DLLVM_COMPONENT_AARCH64" "/DLLVM_COMPONENT_ARM" "/DLLVM_COMPONENT_ASMPARSER" "/DLLVM_COMPONENT_BITREADER" "/DLLVM_COMPONENT_BITWRITER" "/DLLVM_COMPONENT_HEXAGON" "/DLLVM_COMPONENT_INSTRUMENTATION" "/DLLVM_COMPONENT_INTERPRETER" "/DLLVM_COMPONENT_IPO" "/DLLVM_COMPONENT_LINKER" "/DLLVM_COMPONENT_LTO" "/DLLVM_COMPONENT_MCJIT" "/DLLVM_COMPONENT_MIPS" "/DLLVM_COMPONENT_MSP430" "/DLLVM_COMPONENT_NVPTX" "/DLLVM_COMPONENT_POWERPC" "/DLLVM_COMPONENT_SPARC" "/DLLVM_COMPONENT_SYSTEMZ" "/DLLVM_COMPONENT_X86" "/DLLVM_RUSTLLVM" "/FoC:\\Users\\Krzysztof Lesiak\\Desktop\\devel\\rust\\build\\x86_64-pc-windows-msvc\\stage0-codegen\\x86_64-pc-windows-msvc\\release\\build\\rustc_llvm-16916bb4d00807d7\\out\\../rustllvm\\PassWrapper.o" "/c" "../rustllvm/PassWrapper.cpp" cargo:warning=cl : Command line warning D9024 : unrecognized source file type 'Lesiak\Desktop\devel\rust\build\x86_64-pc-windows-msvc\llvm\include', object file assumed cargo:warning=cl : Command line warning D9027 : source file 'Lesiak\Desktop\devel\rust\build\x86_64-pc-windows-msvc\llvm\include' ignored PassWrapper.cpp c:\users\krzysztof lesiak\desktop\devel\rust\src\rustllvm\rustllvm.h(11): fatal error C1083: Cannot open include file: 'llvm-c/BitReader.h': No such file or directory exit code: 2 ``` When inspecting the first `/I` argument to `cl.exe` the build script seems to have problems with the space in my user name and breaks up the path so the compiler can't find `BitReader.h` as a result. Edit: The offending code is in `librustc_llvm/build.rs` line 139: ``` for flag in cxxflags.split_whitespace() { // Ignore flags like `-m64` when we're doing a cross build if is_crossed && flag.starts_with("-m") { continue; } // -Wdate-time is not supported by the netbsd cross compiler if is_crossed && target.contains("netbsd") && flag.contains("date-time") { continue; } cfg.flag(flag); } ``` I'm not quite sure how to fix it myself; something like the Args iterator from std::env would do the job, but I've got no idea how to obtain it here. Edit2: I just noticed something weird, the `/Fo` argument also contains my username and it seems to have been correctly escaped there.
A-LLVM,T-compiler,T-bootstrap,C-bug,A-contributor-roadblock
low
Critical
389,053,600
javascript-algorithms
QuickSort : Instead of taking pivot as 1st element, we should take the pivot as last element, due to time complexity
Instead of this `const pivotElement = array.shift();` // O(n) we should use `const pivotElement = array.pop();` // O(1) When taking the pivot as last element 2 test cases are failing. 1. QuickSort โ€บ should do stable sorting 2. QuickSort โ€บ should visit NOT SORTED array element specified number of times
enhancement
medium
Minor
389,053,658
vscode
Allow to configure cursor keys for input fields
Version 1.29.1 Linux 64 bit Consistency issue. Steps to Reproduce: 1. Configure anything (e.g. Ctrl+B) for cursorLeft (Global) 2. Find all other conflicting key bindsings and remove them. 3. Observe that key works in an editor. 3. Open Search Bar (for example) or Find Widget (for another example) or search boxes. 4. Observe cursorLeft does not work in text boxes. Only a finite subset of (generic named e.g cursor*, delete*) shortcuts are required if this is to be fixed. I do realise that sometimes these things can be tricky, especially if using stock widgets for these. Does this issue occur when all extensions are disabled?: Yes
feature-request,keybindings
medium
Critical
389,064,342
go
cmd/compile: optimize variables in function calls as equivalent to constant-derived variables
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.11.2 darwin/amd64 </pre> ### Does this issue reproduce with the latest release? ### 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="/Users/evgeny/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/evgeny/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11.2/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11.2/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" 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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/6g/mn04rbw57jjb89x_cb95kxp00000gn/T/go-build220591261=/tmp/go-build -gno-record-gcc-switches -fno-common" </pre></details> ### What did you do? `go tool compile -S opt.go` `opt.go` ``` package main import "math" const ( a = 0.1 b = 0.2 c = 0.3 ) var logA = math.Log(a) var logC = math.Log(c) func foo(x float64) float64 { return math.Exp(math.Log(a) * math.Log(b * x) / math.Log(c)) } func bar(x float64) float64 { return math.Exp(logA * math.Log(b * x) / logC) } func main() {} ``` <!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. --> ### What did you expect to see? At first I expect one call of math.Log and one call of math.Exp in both functions (due to optimizations of calling functions on constant which can be done in compile time). Also I expect no difference in asm code in `foo` and `bar` functions ### What did you see instead? In `foo` function there are three calls of `math.Log` function which creates overhead in computing of constant value every time when `foo` called. ``` "".foo STEXT size=185 args=0x10 locals=0x20 0x0000 00000 (opt.go:14) TEXT "".foo(SB), $32-16 0x0000 00000 (opt.go:14) MOVQ (TLS), CX 0x0009 00009 (opt.go:14) CMPQ SP, 16(CX) 0x000d 00013 (opt.go:14) JLS 175 0x0013 00019 (opt.go:14) SUBQ $32, SP 0x0017 00023 (opt.go:14) MOVQ BP, 24(SP) 0x001c 00028 (opt.go:14) LEAQ 24(SP), BP 0x0021 00033 (opt.go:14) FUNCDATA $0, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0021 00033 (opt.go:14) FUNCDATA $1, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0021 00033 (opt.go:14) FUNCDATA $3, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0021 00033 (opt.go:15) PCDATA $2, $0 0x0021 00033 (opt.go:15) PCDATA $0, $0 0x0021 00033 (opt.go:15) MOVSD $f64.3fb999999999999a(SB), X0 0x0029 00041 (opt.go:15) MOVSD X0, (SP) 0x002e 00046 (opt.go:15) CALL math.Log(SB) 0x0033 00051 (opt.go:15) MOVSD 8(SP), X0 0x0039 00057 (opt.go:15) MOVSD X0, ""..autotmp_6+16(SP) 0x003f 00063 (opt.go:15) MOVSD $f64.3fc999999999999a(SB), X1 0x0047 00071 (opt.go:15) MOVSD "".x+40(SP), X2 0x004d 00077 (opt.go:15) MULSD X2, X1 0x0051 00081 (opt.go:15) MOVSD X1, (SP) 0x0056 00086 (opt.go:15) CALL math.Log(SB) 0x005b 00091 (opt.go:15) MOVSD ""..autotmp_6+16(SP), X0 0x0061 00097 (opt.go:15) MULSD 8(SP), X0 0x0067 00103 (opt.go:15) MOVSD X0, ""..autotmp_6+16(SP) 0x006d 00109 (opt.go:15) MOVSD $f64.3fd3333333333333(SB), X1 0x0075 00117 (opt.go:15) MOVSD X1, (SP) 0x007a 00122 (opt.go:15) CALL math.Log(SB) 0x007f 00127 (opt.go:15) MOVSD 8(SP), X0 0x0085 00133 (opt.go:15) MOVSD ""..autotmp_6+16(SP), X1 0x008b 00139 (opt.go:15) DIVSD X0, X1 0x008f 00143 (opt.go:15) MOVSD X1, (SP) 0x0094 00148 (opt.go:15) CALL math.Exp(SB) 0x0099 00153 (opt.go:15) MOVSD 8(SP), X0 0x009f 00159 (opt.go:15) MOVSD X0, "".~r1+48(SP) 0x00a5 00165 (opt.go:15) MOVQ 24(SP), BP 0x00aa 00170 (opt.go:15) ADDQ $32, SP 0x00ae 00174 (opt.go:15) RET 0x00af 00175 (opt.go:15) NOP 0x00af 00175 (opt.go:14) PCDATA $0, $-1 0x00af 00175 (opt.go:14) PCDATA $2, $-1 0x00af 00175 (opt.go:14) CALL runtime.morestack_noctxt(SB) 0x00b4 00180 (opt.go:14) JMP 0 0x0000 65 48 8b 0c 25 00 00 00 00 48 3b 61 10 0f 86 9c eH..%....H;a.... 0x0010 00 00 00 48 83 ec 20 48 89 6c 24 18 48 8d 6c 24 ...H.. H.l$.H.l$ 0x0020 18 f2 0f 10 05 00 00 00 00 f2 0f 11 04 24 e8 00 .............$.. 0x0030 00 00 00 f2 0f 10 44 24 08 f2 0f 11 44 24 10 f2 ......D$....D$.. 0x0040 0f 10 0d 00 00 00 00 f2 0f 10 54 24 28 f2 0f 59 ..........T$(..Y 0x0050 ca f2 0f 11 0c 24 e8 00 00 00 00 f2 0f 10 44 24 .....$........D$ 0x0060 10 f2 0f 59 44 24 08 f2 0f 11 44 24 10 f2 0f 10 ...YD$....D$.... 0x0070 0d 00 00 00 00 f2 0f 11 0c 24 e8 00 00 00 00 f2 .........$...... 0x0080 0f 10 44 24 08 f2 0f 10 4c 24 10 f2 0f 5e c8 f2 ..D$....L$...^.. 0x0090 0f 11 0c 24 e8 00 00 00 00 f2 0f 10 44 24 08 f2 ...$........D$.. 0x00a0 0f 11 44 24 30 48 8b 6c 24 18 48 83 c4 20 c3 e8 ..D$0H.l$.H.. .. 0x00b0 00 00 00 00 e9 47 ff ff ff .....G... rel 5+4 t=16 TLS+0 rel 37+4 t=15 $f64.3fb999999999999a+0 rel 47+4 t=8 math.Log+0 rel 67+4 t=15 $f64.3fc999999999999a+0 rel 87+4 t=8 math.Log+0 rel 113+4 t=15 $f64.3fd3333333333333+0 rel 123+4 t=8 math.Log+0 rel 149+4 t=8 math.Exp+0 rel 176+4 t=8 runtime.morestack_noctxt+0 "".bar STEXT size=122 args=0x10 locals=0x18 0x0000 00000 (opt.go:18) TEXT "".bar(SB), $24-16 0x0000 00000 (opt.go:18) MOVQ (TLS), CX 0x0009 00009 (opt.go:18) CMPQ SP, 16(CX) 0x000d 00013 (opt.go:18) JLS 115 0x000f 00015 (opt.go:18) SUBQ $24, SP 0x0013 00019 (opt.go:18) MOVQ BP, 16(SP) 0x0018 00024 (opt.go:18) LEAQ 16(SP), BP 0x001d 00029 (opt.go:18) FUNCDATA $0, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x001d 00029 (opt.go:18) FUNCDATA $1, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x001d 00029 (opt.go:18) FUNCDATA $3, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x001d 00029 (opt.go:19) PCDATA $2, $0 0x001d 00029 (opt.go:19) PCDATA $0, $0 0x001d 00029 (opt.go:19) MOVSD $f64.3fc999999999999a(SB), X0 0x0025 00037 (opt.go:19) MOVSD "".x+32(SP), X1 0x002b 00043 (opt.go:19) MULSD X1, X0 0x002f 00047 (opt.go:19) MOVSD X0, (SP) 0x0034 00052 (opt.go:19) CALL math.Log(SB) 0x0039 00057 (opt.go:19) MOVSD "".logA(SB), X0 0x0041 00065 (opt.go:19) MULSD 8(SP), X0 0x0047 00071 (opt.go:19) MOVSD "".logC(SB), X1 0x004f 00079 (opt.go:19) DIVSD X1, X0 0x0053 00083 (opt.go:19) MOVSD X0, (SP) 0x0058 00088 (opt.go:19) CALL math.Exp(SB) 0x005d 00093 (opt.go:19) MOVSD 8(SP), X0 0x0063 00099 (opt.go:19) MOVSD X0, "".~r1+40(SP) 0x0069 00105 (opt.go:19) MOVQ 16(SP), BP 0x006e 00110 (opt.go:19) ADDQ $24, SP 0x0072 00114 (opt.go:19) RET 0x0073 00115 (opt.go:19) NOP 0x0073 00115 (opt.go:18) PCDATA $0, $-1 0x0073 00115 (opt.go:18) PCDATA $2, $-1 0x0073 00115 (opt.go:18) CALL runtime.morestack_noctxt(SB) 0x0078 00120 (opt.go:18) JMP 0 0x0000 65 48 8b 0c 25 00 00 00 00 48 3b 61 10 76 64 48 eH..%....H;a.vdH 0x0010 83 ec 18 48 89 6c 24 10 48 8d 6c 24 10 f2 0f 10 ...H.l$.H.l$.... 0x0020 05 00 00 00 00 f2 0f 10 4c 24 20 f2 0f 59 c1 f2 ........L$ ..Y.. 0x0030 0f 11 04 24 e8 00 00 00 00 f2 0f 10 05 00 00 00 ...$............ 0x0040 00 f2 0f 59 44 24 08 f2 0f 10 0d 00 00 00 00 f2 ...YD$.......... 0x0050 0f 5e c1 f2 0f 11 04 24 e8 00 00 00 00 f2 0f 10 .^.....$........ 0x0060 44 24 08 f2 0f 11 44 24 28 48 8b 6c 24 10 48 83 D$....D$(H.l$.H. 0x0070 c4 18 c3 e8 00 00 00 00 eb 86 .......... rel 5+4 t=16 TLS+0 rel 33+4 t=15 $f64.3fc999999999999a+0 rel 53+4 t=8 math.Log+0 rel 61+4 t=15 "".logA+0 rel 75+4 t=15 "".logC+0 rel 89+4 t=8 math.Exp+0 rel 116+4 t=8 runtime.morestack_noctxt+0 "".main STEXT nosplit size=1 args=0x0 locals=0x0 0x0000 00000 (opt.go:22) TEXT "".main(SB), NOSPLIT, $0-0 0x0000 00000 (opt.go:22) FUNCDATA $0, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0000 00000 (opt.go:22) FUNCDATA $1, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0000 00000 (opt.go:22) FUNCDATA $3, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0000 00000 (opt.go:22) RET 0x0000 c3 . "".init STEXT size=166 args=0x0 locals=0x18 0x0000 00000 (<autogenerated>:1) TEXT "".init(SB), $24-0 0x0000 00000 (<autogenerated>:1) MOVQ (TLS), CX 0x0009 00009 (<autogenerated>:1) CMPQ SP, 16(CX) 0x000d 00013 (<autogenerated>:1) JLS 156 0x0013 00019 (<autogenerated>:1) SUBQ $24, SP 0x0017 00023 (<autogenerated>:1) MOVQ BP, 16(SP) 0x001c 00028 (<autogenerated>:1) LEAQ 16(SP), BP 0x0021 00033 (<autogenerated>:1) FUNCDATA $0, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0021 00033 (<autogenerated>:1) FUNCDATA $1, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0021 00033 (<autogenerated>:1) FUNCDATA $3, gclocalsยท33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0021 00033 (<autogenerated>:1) PCDATA $2, $0 0x0021 00033 (<autogenerated>:1) PCDATA $0, $0 0x0021 00033 (<autogenerated>:1) MOVBLZX "".initdoneยท(SB), AX 0x0028 00040 (<autogenerated>:1) CMPB AL, $1 0x002a 00042 (<autogenerated>:1) JLS 54 0x002c 00044 (<autogenerated>:1) PCDATA $2, $-2 0x002c 00044 (<autogenerated>:1) PCDATA $0, $-2 0x002c 00044 (<autogenerated>:1) MOVQ 16(SP), BP 0x0031 00049 (<autogenerated>:1) ADDQ $24, SP 0x0035 00053 (<autogenerated>:1) RET 0x0036 00054 (<autogenerated>:1) JNE 63 0x0038 00056 (<autogenerated>:1) PCDATA $2, $0 0x0038 00056 (<autogenerated>:1) PCDATA $0, $0 0x0038 00056 (<autogenerated>:1) CALL runtime.throwinit(SB) 0x003d 00061 (<autogenerated>:1) UNDEF 0x003f 00063 (<autogenerated>:1) MOVB $1, "".initdoneยท(SB) 0x0046 00070 (<autogenerated>:1) CALL math.init(SB) 0x004b 00075 (opt.go:11) MOVSD $f64.3fb999999999999a(SB), X0 0x0053 00083 (opt.go:11) MOVSD X0, (SP) 0x0058 00088 (opt.go:11) CALL math.Log(SB) 0x005d 00093 (opt.go:11) MOVSD 8(SP), X0 0x0063 00099 (opt.go:11) MOVSD X0, "".logA(SB) 0x006b 00107 (opt.go:12) MOVSD $f64.3fd3333333333333(SB), X0 0x0073 00115 (opt.go:12) MOVSD X0, (SP) 0x0078 00120 (opt.go:12) CALL math.Log(SB) 0x007d 00125 (opt.go:12) MOVSD 8(SP), X0 0x0083 00131 (opt.go:12) MOVSD X0, "".logC(SB) 0x008b 00139 (<autogenerated>:1) MOVB $2, "".initdoneยท(SB) 0x0092 00146 (<autogenerated>:1) MOVQ 16(SP), BP 0x0097 00151 (<autogenerated>:1) ADDQ $24, SP 0x009b 00155 (<autogenerated>:1) RET 0x009c 00156 (<autogenerated>:1) NOP 0x009c 00156 (<autogenerated>:1) PCDATA $0, $-1 0x009c 00156 (<autogenerated>:1) PCDATA $2, $-1 0x009c 00156 (<autogenerated>:1) CALL runtime.morestack_noctxt(SB) 0x00a1 00161 (<autogenerated>:1) JMP 0 0x0000 65 48 8b 0c 25 00 00 00 00 48 3b 61 10 0f 86 89 eH..%....H;a.... 0x0010 00 00 00 48 83 ec 18 48 89 6c 24 10 48 8d 6c 24 ...H...H.l$.H.l$ 0x0020 10 0f b6 05 00 00 00 00 3c 01 76 0a 48 8b 6c 24 ........<.v.H.l$ 0x0030 10 48 83 c4 18 c3 75 07 e8 00 00 00 00 0f 0b c6 .H....u......... 0x0040 05 00 00 00 00 01 e8 00 00 00 00 f2 0f 10 05 00 ................ 0x0050 00 00 00 f2 0f 11 04 24 e8 00 00 00 00 f2 0f 10 .......$........ 0x0060 44 24 08 f2 0f 11 05 00 00 00 00 f2 0f 10 05 00 D$.............. 0x0070 00 00 00 f2 0f 11 04 24 e8 00 00 00 00 f2 0f 10 .......$........ 0x0080 44 24 08 f2 0f 11 05 00 00 00 00 c6 05 00 00 00 D$.............. 0x0090 00 02 48 8b 6c 24 10 48 83 c4 18 c3 e8 00 00 00 ..H.l$.H........ 0x00a0 00 e9 5a ff ff ff ..Z... rel 5+4 t=16 TLS+0 rel 36+4 t=15 "".initdoneยท+0 rel 57+4 t=8 runtime.throwinit+0 rel 65+4 t=15 "".initdoneยท+-1 rel 71+4 t=8 math.init+0 rel 79+4 t=15 $f64.3fb999999999999a+0 rel 89+4 t=8 math.Log+0 rel 103+4 t=15 "".logA+0 rel 111+4 t=15 $f64.3fd3333333333333+0 rel 121+4 t=8 math.Log+0 rel 135+4 t=15 "".logC+0 rel 141+4 t=15 "".initdoneยท+-1 rel 157+4 t=8 runtime.morestack_noctxt+0 go.loc."".foo SDWARFLOC size=0 go.info."".foo SDWARFINFO size=54 0x0000 02 22 22 2e 66 6f 6f 00 00 00 00 00 00 00 00 00 ."".foo......... 0x0010 00 00 00 00 00 00 00 00 01 9c 00 00 00 00 01 0e ................ 0x0020 78 00 00 0e 00 00 00 00 00 0e 7e 72 31 00 01 0e x.........~r1... 0x0030 00 00 00 00 00 00 ...... rel 8+8 t=1 "".foo+0 rel 16+8 t=1 "".foo+185 rel 26+4 t=29 gofile../Users/evgeny/exp/opt.go+0 rel 36+4 t=28 go.info.float64+0 rel 48+4 t=28 go.info.float64+0 go.range."".foo SDWARFRANGE size=0 go.isstmt."".foo SDWARFMISC size=0 0x0000 04 13 04 0e 03 08 01 86 01 02 0a 00 ............ go.loc."".bar SDWARFLOC size=0 go.info."".bar SDWARFINFO size=54 0x0000 02 22 22 2e 62 61 72 00 00 00 00 00 00 00 00 00 ."".bar......... 0x0010 00 00 00 00 00 00 00 00 01 9c 00 00 00 00 01 0e ................ 0x0020 78 00 00 12 00 00 00 00 00 0e 7e 72 31 00 01 12 x.........~r1... 0x0030 00 00 00 00 00 00 ...... rel 8+8 t=1 "".bar+0 rel 16+8 t=1 "".bar+122 rel 26+4 t=29 gofile../Users/evgeny/exp/opt.go+0 rel 36+4 t=28 go.info.float64+0 rel 48+4 t=28 go.info.float64+0 go.range."".bar SDWARFRANGE size=0 go.isstmt."".bar SDWARFMISC size=0 0x0000 04 0f 04 0e 03 08 01 4e 02 07 00 .......N... go.loc."".main SDWARFLOC size=0 go.info."".main SDWARFINFO size=33 0x0000 02 22 22 2e 6d 61 69 6e 00 00 00 00 00 00 00 00 ."".main........ 0x0010 00 00 00 00 00 00 00 00 00 01 9c 00 00 00 00 01 ................ 0x0020 00 . rel 9+8 t=1 "".main+0 rel 17+8 t=1 "".main+1 rel 27+4 t=29 gofile../Users/evgeny/exp/opt.go+0 go.range."".main SDWARFRANGE size=0 go.isstmt."".main SDWARFMISC size=0 0x0000 04 01 00 ... go.loc."".init SDWARFLOC size=0 go.info."".init SDWARFINFO size=33 0x0000 02 22 22 2e 69 6e 69 74 00 00 00 00 00 00 00 00 ."".init........ 0x0010 00 00 00 00 00 00 00 00 00 01 9c 00 00 00 00 01 ................ 0x0020 00 . rel 9+8 t=1 "".init+0 rel 17+8 t=1 "".init+166 rel 27+4 t=29 gofile..<autogenerated>+0 go.range."".init SDWARFRANGE size=0 go.isstmt."".init SDWARFMISC size=0 0x0000 04 13 04 0e 03 07 01 04 02 0a 01 07 02 02 01 0c ................ 0x0010 02 08 01 18 02 08 01 18 02 07 01 0a 02 0a 00 ............... "".logA SNOPTRBSS size=8 "".logC SNOPTRBSS size=8 "".initdoneยท SNOPTRBSS size=1 type..importpath.math. SRODATA dupok size=7 0x0000 00 00 04 6d 61 74 68 ...math gclocalsยท33cdeccccebe80329f1fdbee7f5874cb SRODATA dupok size=8 0x0000 01 00 00 00 00 00 00 00 ........ ```
Performance,NeedsInvestigation,compiler/runtime
low
Critical
389,074,516
pytorch
[Caffe2] "Same" padding
Hello, I tried to use "same" padding through the legacy_pad parameter of conv and maxpool, however, it does not work. `conv1 = brew.conv(model, 'data', 'conv1', dim_in=1, dim_out=20, kernel=5, stride=1, legacy_pad=2)` I always get a BAD ARGUMENT ERROR or something similar. How can I achieve the "same" padding?? What are the value options for the parameter "pad" in conv and maxpool?
caffe2
low
Critical
389,095,755
flutter
`flutter drive --tags` or `flutter drive -t` does not focus on tag-specific test
## Steps to Reproduce <!-- Please tell us exactly how to reproduce the problem you are running into. --> 1. write integration test as instructed from https://flutter.io/docs/cookbook/testing/integration 2. mark one test case with tag "ios" as instructed from https://pub.dartlang.org/packages/test#platform-specific-configuration ```dart test('starts at 0', () async { // Use the `driver.getText` method to verify the counter starts at 0. expect(await driver.getText(counterTextFinder), "0"); }, tags: "ios"); ``` 3. run `flutter drive test_driver/app.dart --tags ios` (with iOS emulator, but this does not matter) ## Expected & Observed - expected: only `starts at 0` case runs, no other cases - observed: all cases run ## `flutter doctor -v` ``` Inspectorios-MacBook-Pro-10:backend truongsinh$ flutter doctor -v /usr/local/Cellar/flutter/0.9.2/bin/cache/dart-sdk/bin/dart /usr/local/Cellar/flutter/0.9.2/bin/cache/flutter_tools.snapshot doctor -v [โœ“] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14 18A391, locale en-VN) โ€ข Flutter version 1.0.0 at /usr/local/Cellar/flutter/0.9.2 โ€ข Framework revision 5391447fae (10 days ago), 2018-11-29 19:41:26 -0800 โ€ข Engine revision 7375a0f414 โ€ข Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297) [โœ“] Android toolchain - develop for Android devices (Android SDK 27.0.3) โ€ข Android SDK at /Users/truongsinh/Library/Android/sdk โ€ข Android NDK location not configured (optional; useful for native profiling support) โ€ข Platform android-27, build-tools 27.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-1024-b01) โ€ข All Android licenses accepted. [โœ“] iOS toolchain - develop for iOS devices (Xcode 10.1) โ€ข Xcode at /Applications/Xcode.app/Contents/Developer โ€ข Xcode 10.1, Build version 10B61 โ€ข ios-deploy 1.9.4 โ€ข CocoaPods version 1.5.3 [โœ“] Android Studio (version 3.1) โ€ข Android Studio at /Applications/Android Studio.app/Contents โ€ข Flutter plugin version 29.0.1 โ€ข Dart plugin version 173.4700 โ€ข Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01) [โœ“] VS Code (version 1.29.1) โ€ข VS Code at /Applications/Visual Studio Code.app/Contents โ€ข Flutter extension version 2.21.1 [โœ“] Connected device (1 available) โ€ข iPhone 5s โ€ข 1D34B2DC-9EAB-482B-ADED-E3C8B9322F50 โ€ข ios โ€ข iOS 10.1 (simulator) โ€ข No issues found! Inspectorios-MacBook-Pro-10:backend truongsinh$ ```
a: tests,tool,t: flutter driver,P2,team-tool,triaged-tool
low
Major
389,113,038
opencv
dnn vulkan for android
- OpenCV => 4.0 - Operating System / Platform => Ubuntu/Android - Compiler => Android Studio ##### Detailed description I try to run dnn network by vulkan in Android. After I compiled opencv 4 android (ver 4.0) with vulkan enabled, I made a simple test app to run a simple dnn network(containing few conv layers). First of all, I got a error (loadVulkanLibrary failed) from vkcom/src/context.cpp(line 116) It might be caused by no android definition in vk_loader.cpp I added below codes in vk_loader.cpp after linux defintion. ```.cpp #if defined(__ANDROID__) #include <dlfcn.h> #include <stdio.h> typedef void* VulkanHandle; #define DEFAULT_VK_LIBRARY_PATH "libvulkan.so" #define LOAD_VK_LIBRARY(path) dlopen(path, RTLD_LAZY | RTLD_GLOBAL) #define FREE_VK_LIBRARY(handle) dlclose(handle) #define GET_VK_ENTRY_POINT(handle) \ (PFN_vkGetInstanceProcAddr)dlsym(handle, "vkGetInstanceProcAddr"); #endif // __ANDROID__ ``` Then vulkan is finally running on android, but it's too slow. I tested it on LG G7(Snapdragon 845) Backend/Target : speed Opencv/CPU : 74ms VKCOM/VULKAN : 350ms abi : armeabi-v7a Can anyone please optimize or analyze vulkan code for android to run faster than cpu?
optimization,feature,platform: android,category: dnn
low
Critical
389,127,168
flutter
CupertinoNavigationBar should support custom box decoration
Hi. I am trying to make a `CupertinoSliverNavigationBar` with a gradient background, but currently `CupertinoNavigationBar` or `CupertinoSliverNavigationBar` only support `backgroundColor` property, and don't allow to specify an **image or a gradient as a background**. I am not sure if it's intended, but I can' figure out any other way rather than injecting an absolutely positioned underlay with a gradient, and it seems totally wrong. What I expect is an additional property on `CupertinoSliverNavigationBar`, which would allow either specifying a custom background layer or the gradient itself. This seems to be doable in native code, so I think that flutter can support this too. Anyway, I would like to get any feedback on this just to know if I'm missing something. Thanks!
c: new feature,framework,f: cupertino,P2,team-design,triaged-design
low
Major
389,128,935
angular
Angular inconsistently animates children
# ๐Ÿž bug report ### Affected Package @angular/animation or @angular/platform-browser ### Is this a regression? Not recently. ### Description Please retitle this if there is something clearer; I don't know what to call this as animating child elements seems extremely fragile and situation-specific. This is one example of it breaking, simply because the parent has an animation trigger. `<app2>` runs all child animations (both fade and slide), but `<app1>` only runs one (fade). The only difference between the two components is that `<app1>` has a (unrelated, unused) animation trigger. ## ๐Ÿ”ฌ Minimal Reproduction https://stackblitz.com/edit/angular-child-animation ```typescript import { Component, HostBinding, NgModule, VERSION } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { trigger, transition, query, animateChild, style, animate, group } from '@angular/animations'; ; @Component({ selector: 'app', styles: [` p { color: white; } * { display: block; margin-bottom: 20px; } `], template: ` <p>Angular {{ version }}</p> <app1></app1> <app2></app2> `, }) export class AppComponent { @HostBinding('class.block') readonly block = true; show1 = true; show2 = true; readonly version = VERSION.full; } @Component({ animations: [trigger('unused', [])], // causes slide-x to not happen selector: 'app1', styles: [` * { display: block; margin-bottom: 20px; } `], template: ` <button (click)="show = !show"> {{ show ? 'Hide' : 'Show' }} </button> <app-parent *ngIf="show"></app-parent> `, }) export class App1Component { show = true; } @Component({ selector: 'app2', styles: [` * { display: block; margin-bottom: 20px; } `], template: ` <button (click)="show = !show"> {{ show ? 'Hide' : 'Show' }} </button> <app-parent *ngIf="show"></app-parent> `, }) export class App2Component { show = true; } @Component({ animations: [ trigger('fade', [ transition(':enter', [ style({ opacity: 0 }), group([ animate(1000, style({ opacity: 1 })), query('@*', animateChild(), { optional: true }), ]), ]), transition(':leave', [ style({ opacity: 1 }), group([ animate(1000, style({ opacity: 0 })), query('@*', animateChild(), { optional: true }), ]), ]), ]), ], selector: 'app-parent', styles: [` :host { background: blue; } `], template: ` Parent (fade) <app-child></app-child> `, }) export class ParentComponent { @HostBinding('class.block') readonly block = true; @HostBinding('@fade') readonly animate = true; } @Component({ animations: [ trigger('slide-x', [ transition(':enter', [ style({ transform: 'translateX(-200px)' }), group([ animate(1000), query('@*', animateChild(), { optional: true }), ]), ]), transition(':leave', group([ animate(1000, style({ transform: 'translateX(200px)' })), query('@*', animateChild(), { optional: true }), ]), ), ]), ], selector: 'app-child', styles: [` :host { background: yellow; } `], template: ` Child (slide-x) `, }) export class ChildComponent { @HostBinding('class.block') readonly block = true; @HostBinding('@slide-x') readonly animate = true; } @NgModule({ declarations: [ AppComponent, App1Component, App2Component, ChildComponent, ParentComponent, ], imports: [ BrowserModule, BrowserAnimationsModule, ], bootstrap: [AppComponent], }) export class AppModule { } ``` ## ๐Ÿ”ฅ Exception or Error N/A ## ๐ŸŒ Your Environment **Angular Version:** 7.1.2 **Anything else relevant?** N/A
type: bug/fix,area: animations,freq1: low,P4
low
Critical
389,197,170
TypeScript
instanceof AbstractClass.constructor should narrow to typeof AbstracClass
> Please try to reproduce the issue with `typescript@next`. It may have already been fixed. **TypeScript Version:** 3.3.0-dev.20181208 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** static instanceof constructor **Code** ```ts type Meta = {foo: string}; abstract class Abstract { static meta: Meta; public abstract toString(): string; } const getMeta = (fromModule: any): Meta | undefined => { return fromModule instanceof Abstract.constructor ? fromModule.meta : undefined; }; ``` **Expected behavior:** Narrow the type of `fromModule` to `typeof Abstract`, so that static fields can be accessed. (In Typescript versions <= 3.1.6 the above code didn't raise an error, my guess is that the type was not narrowed at all) **Actual behavior:** The narrowed type of `fromModule` is `{}`: ``` Error:(10, 18) TS2339: Property 'meta' does not exist on type '{}'. ``` **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> https://www.typescriptlang.org/play/index.html#src=%0D%0Atype%20Meta%20%3D%20%7Bfoo%3A%20string%7D%3B%0D%0Aabstract%20class%20Abstract%20%7B%0D%0A%20%20static%20meta%3A%20Meta%3B%0D%0A%20%20public%20abstract%20toString()%3A%20string%3B%0D%0A%7D%0D%0A%0D%0Aconst%20getMeta%20%3D%20(fromModule%3A%20any)%3A%20Meta%20%7C%20undefined%20%3D%3E%20%7B%0D%0A%20%20return%20fromModule%20instanceof%20Abstract.constructor%0D%0A%20%20%20%20%3F%20fromModule.meta%20%3A%20undefined%3B%0D%0A%7D%3B%0D%0A **Related Issues:** <!-- Did you find other bugs that looked similar? --> I found the following potentially related issues but they didn't seem to be an exact match or to old (because this problem only exists since 3.2.1): - #27276 - #23274 - #16035 **Workaround** Creating a type guard is of course doable for a single abstract class. ``` const extendsAbstract = (FromModule: unknown): FromModule is typeof Abstract => FromModule && FromModule instanceof Abstract.constructor; ``` (Or maybe it could even be written in a generic way?)
Suggestion,In Discussion
low
Critical
389,204,172
flutter
Network traffic hook issues
well,I would like to find a method which could transfer and redirect another app's stream or create a tunnel which could be used in system proxy. However, I didn't find some similar wheels in dart nor in flutter. So, I wonder if flutter is just for UI or even powerful , basic and sensitive operations for app?
c: new feature,framework,engine,P2,team-engine,triaged-engine
low
Major
389,210,915
godot
Editor reloads and parses unrelated files on save
**Godot version:** 11d7738 **OS/device including version:** 4.19.4-arch1-1-ARCH **Issue description:** I noticed that, when saving a scene, Godot is parsing GDScript files that are completely unrelated to the scene. I could notice that because that script contains an error and it showed up in the terminal. The script was not one of the open scripts in the script editor, does not declare any class name and is completely unrelated to the scene i was saving. The questions is: why is Godot parsing files at save time? My concern is that, if the project grows very big, the save time will grow until it becomes noticeable. For me it was around 1 second, with a project that has around 6k files.
enhancement,topic:editor
low
Critical
389,264,608
vscode
[folding] Preview folded content on hover
Found no existing issues It would be cool to preview folded content without actual unfolding it, using peek For example, how it's done in WebStorm: <details><summary>small gif</summary><img src="https://user-images.githubusercontent.com/599439/49730695-38986d00-fc8a-11e8-88b7-c07fffb9b45b.gif" /></details> video: https://streamable.com/i8z3u I think it should be in core. Or a plugin which distributes with vscode. What do you think? refs for code: css: https://github.com/Microsoft/vscode/blob/cb66c137e0279693a8fcea3ed481d1d2db7512c7/src/vs/editor/contrib/folding/folding.css ts: https://github.com/Microsoft/vscode/blob/4e4e6f9b44dd9e6a53d1f08565c52b8ea9f61a5e/src/vs/editor/contrib/folding/foldingDecorations.ts
feature-request,editor-folding
low
Major
389,277,022
flutter
Google Maps Official Plugin Flutter API and Callbacks: zoom level change, center map change, etc
<!-- Thank you for using Flutter! Please check out our documentation first: * https://flutter.io/ * https://docs.flutter.io/ If you can't find the answer there, please consider asking a question on the Stack Overflow Web site: * https://stackoverflow.com/questions/tagged/flutter?sort=frequent Please don't file a GitHub issue for support requests. GitHub issues are for tracking defects in the product. If you file a bug asking for help, we will consider this a request for a documentation update. --> How can i get: 1. Current zoom level change (new value) when users tilt with two fingers zoom? 2. Center map change when users tilt/scroll to move map? (lat,lng) thank you
c: new feature,p: maps,package,team-ecosystem,P2,triaged-ecosystem
low
Critical
389,290,705
pytorch
[Caffe2] CNN Training on CPU is faster than GPU
## ๐Ÿ› Bug Hi all, **while training a CNN called DPNet I noticed that training was faster on CPU(i7) than GPU(NVIDIA GTX 1050). As far as I understand, GPU should be faster than CPU for training CNNs.** **Any ideas/reasons for this behavior?** Training configuration: Dataset: 40,000 samples Batch size: 64 learning rate: 0.01 learning rate decay: 10% for every 8000 iterations. **I get the following messages when I train on GPU. Are they supposed to appear? Is there any CUDNN version which has implementatios for those operators?:** ``` WARNING: Logging before InitGoogleLogging() is written to STDERR I1209 20:24:53.741214 16045 operator.cc:167] Engine CUDNN is not available for operator Conv. I1209 20:24:53.741343 16045 operator.cc:167] Engine CUDNN is not available for operator Relu. I1209 20:24:53.741375 16045 operator.cc:167] Engine CUDNN is not available for operator MaxPool. I1209 20:24:53.741422 16045 operator.cc:167] Engine CUDNN is not available for operator Conv. I1209 20:24:53.741497 16045 operator.cc:167] Engine CUDNN is not available for operator Relu. I1209 20:24:53.741523 16045 operator.cc:167] Engine CUDNN is not available for operator MaxPool. I1209 20:24:53.741605 16045 operator.cc:167] Engine CUDNN is not available for operator Conv. I1209 20:24:53.741652 16045 operator.cc:167] Engine CUDNN is not available for operator Relu. I1209 20:24:53.741660 16045 operator.cc:167] Engine CUDNN is not available for operator Conv. I1209 20:24:53.741727 16045 operator.cc:167] Engine CUDNN is not available for operator Relu. I1209 20:24:53.741755 16045 operator.cc:167] Engine CUDNN is not available for operator Conv. I1209 20:24:53.741835 16045 operator.cc:167] Engine CUDNN is not available for operator Relu. I1209 20:24:53.741845 16045 operator.cc:167] Engine CUDNN is not available for operator MaxPool. I1209 20:24:53.741935 16045 operator.cc:167] Engine CUDNN is not available for operator Relu. I1209 20:24:53.741966 16045 operator.cc:167] Engine CUDNN is not available for operator Dropout. I1209 20:24:53.742022 16045 operator.cc:167] Engine CUDNN is not available for operator Relu. I1209 20:24:53.742033 16045 operator.cc:167] Engine CUDNN is not available for operator Dropout. I1209 20:24:53.742090 16045 operator.cc:167] Engine CUDNN is not available for operator Relu. I1209 20:24:53.742100 16045 operator.cc:167] Engine CUDNN is not available for operator Dropout. I1209 20:24:53.742224 16045 operator.cc:167] Engine CUDNN is not available for operator DropoutGrad. I1209 20:24:53.742260 16045 operator.cc:167] Engine CUDNN is not available for operator ReluGradient. I1209 20:24:53.742282 16045 operator.cc:167] Engine CUDNN is not available for operator DropoutGrad. I1209 20:24:53.742296 16045 operator.cc:167] Engine CUDNN is not available for operator ReluGradient. I1209 20:24:53.742318 16045 operator.cc:167] Engine CUDNN is not available for operator DropoutGrad. I1209 20:24:53.742332 16045 operator.cc:167] Engine CUDNN is not available for operator ReluGradient. I1209 20:24:53.742353 16045 operator.cc:167] Engine CUDNN is not available for operator MaxPoolGradient. I1209 20:24:53.742390 16045 operator.cc:167] Engine CUDNN is not available for operator ReluGradient. I1209 20:24:53.742403 16045 operator.cc:167] Engine CUDNN is not available for operator ConvGradient. I1209 20:24:53.742449 16045 operator.cc:167] Engine CUDNN is not available for operator ReluGradient. I1209 20:24:53.742461 16045 operator.cc:167] Engine CUDNN is not available for operator ConvGradient. I1209 20:24:53.742498 16045 operator.cc:167] Engine CUDNN is not available for operator ReluGradient. I1209 20:24:53.742508 16045 operator.cc:167] Engine CUDNN is not available for operator ConvGradient. I1209 20:24:53.742579 16045 operator.cc:167] Engine CUDNN is not available for operator MaxPoolGradient. I1209 20:24:53.742638 16045 operator.cc:167] Engine CUDNN is not available for operator ReluGradient. I1209 20:24:53.742650 16045 operator.cc:167] Engine CUDNN is not available for operator ConvGradient. I1209 20:24:53.742686 16045 operator.cc:167] Engine CUDNN is not available for operator MaxPoolGradient. I1209 20:24:53.742720 16045 operator.cc:167] Engine CUDNN is not available for operator ReluGradient. I1209 20:24:53.742732 16045 operator.cc:167] Engine CUDNN is not available for operator ConvGradient. ``` ## To Reproduce Steps to reproduce the behavior: DPNet Training configuration: Dataset: 40,000 samples Batch size: 64 learning rate: 0.01 learning rate decay: 10% for every 8000 iterations. Below the relevant part of the script used for training: ``` def get_total_num_iter(self, num_epoch, batch_size, dataset_size): #Force floating point calculation batch_size_float = float(batch_size) dataset_size_float = float(dataset_size) iterations_float = math.ceil(num_epoch*(dataset_size_float/batch_size_float)) iterations_int = int(iterations_float) return iterations_int def add_input(self, model, batch_size, db, db_type, device_opts): with core.DeviceScope(device_opts): # load the data data_uint8, label = brew.db_input( model, blobs_out=["data_uint8", "label"], batch_size=batch_size, db=db, db_type=db_type, ) # cast the data to float data = model.Cast(data_uint8, "data", to=core.DataType.FLOAT) # scale data from [0,255] down to [0,1] data = model.Scale(data, data, scale=float(1./256)) # don't need the gradient for the backward pass data = model.StopGradient(data, data) dataset_size = int (lmdb.open(db).stat()['entries']) return data, label, dataset_size def create_model(self, model, data, label, device_opts, is_test): with core.DeviceScope(device_opts): data = data conv1_ = brew.conv(model, data, 'conv1_', dim_in=3, dim_out=96, kernel=11, stride=4, pad=1) relu1_ = brew.relu(model, conv1_, conv1_) pool1_ = brew.max_pool(model, relu1_, 'pool1_', kernel=3, stride=2, pad=1) conv2_ = brew.conv(model, pool1_, 'conv2_', dim_in=96, dim_out=256, kernel=5, stride=4, pad=1) relu2_ = brew.relu(model, conv2_, conv2_) pool2_ = brew.max_pool(model, relu2_, 'pool2_', kernel=3, stride=2, pad=1) conv3_ = brew.conv(model, pool2_, 'conv3_', dim_in=256, dim_out=384, kernel=3, stride=1, pad=1) relu3_ = brew.relu(model, conv3_, conv3_) conv4_ = brew.conv(model, relu3_, 'conv4_', dim_in=384, dim_out=384, kernel=3, stride=1, pad=1) relu4_ = brew.relu(model, conv4_, conv4_) conv5_ = brew.conv(model, relu4_, 'conv5_', dim_in=384, dim_out=256, kernel=3, stride=1, pad=1) relu5_ = brew.relu(model, conv5_, conv5_) pool5_ = brew.max_pool(model, relu5_, 'pool5_', kernel=3, stride=2, pad=1) fc5_ = brew.fc(model, pool5_, 'fc5_', dim_in=256 * 2 * 2, dim_out=4096) relu6_ = brew.relu(model, fc5_, fc5_) dropout6_ = brew.dropout(model, relu6_, 'dropout6_', ratio=0.5, is_test=False) fc6_ = brew.fc(model, dropout6_, 'fc6_', dim_in=4096, dim_out=4096) relu7_ = brew.relu(model, fc6_, fc6_) dropout7_ = brew.dropout(model, relu7_, 'dropout7_', ratio=0.5, is_test=False) fc7_ = brew.fc(model, dropout7_, 'fc7_', dim_in=4096, dim_out=256) relu8_ = brew.relu(model, fc7_, fc7_) dropout8_ = brew.dropout(model, relu8_, 'dropout8_', ratio=0.5, is_test=False) fc8_ = brew.fc(model, dropout8_, 'fc8_', dim_in=256, dim_out=14) #Sigmoid + L2 Loss predictions = model.net.Sigmoid(fc8_, 'predictions') dist = model.net.SquaredL2Distance([label, predictions], 'dist') loss = dist.AveragedLoss([], ['loss']) return predictions, loss def add_training_operators(self, model, output, label, loss, device_opts, opt_type, base_learning_rate, policy, stepsize, epsilon, beta1, beta2, gamma, momentum) : with core.DeviceScope(device_opts): model.AddGradientOperators([loss]) opt = optimizer.build_sgd(model, base_learning_rate=base_learning_rate, policy=policy, stepsize=stepsize, gamma=gamma, momentum=momentum) print("sgd optimizer selected") def add_accuracy(self, model, output, label, device_opts, eval_metric): with core.DeviceScope(device_opts): if eval_metric == 'accuracy': accuracy = brew.accuracy(model, [output, label], "accuracy") elif eval_metric == 'top_k_accuracy': accuracy = brew.accuracy(model, [output, label], "accuracy", top_k=3) return accuracy def train(self, num_epoch=23, batch_size=64, context='gpu', eval_metric='accuracy', opt_type='sgd', base_learning_rate=0.001, weight_decay=0.001, policy='step', stepsize=1, epsilon=1E-8, beta1=0.9, beta2=0.999, gamma=0.999, momentum=0.9) : if context == 'cpu': device_opts = core.DeviceOption(caffe2_pb2.CPU, 0) elif context == 'gpu': device_opts = core.DeviceOption(caffe2_pb2.CUDA, 0) workspace.ResetWorkspace(self._model_dir_) arg_scope = {"order": "NHWC"} # == Training model == train_model= model_helper.ModelHelper(name="train_net", arg_scope=arg_scope) data, label, train_dataset_size = self.add_input(train_model, batch_size=batch_size, db=os.path.join(self._data_dir_, 'torcs-train-nchw-lmdb'), db_type='lmdb', device_opts=device_opts) predictions, loss = self.create_model(train_model, data, label, device_opts=device_opts, is_test=False) self.add_training_operators(train_model, predictions, label, loss, device_opts, opt_type, base_learning_rate, policy, stepsize, epsilon, beta1, beta2, gamma, momentum) with core.DeviceScope(device_opts): brew.add_weight_decay(train_model, weight_decay) # Initialize and create the training network workspace.RunNetOnce(train_model.param_init_net) workspace.CreateNet(train_model.net, overwrite=True) # Main Training Loop iterations = self.get_total_num_iter(num_epoch, batch_size, train_dataset_size) print("** Starting Training for " + str(num_epoch) + " epochs = " + str(iterations) + " iterations **") start_date = datetime.datetime.now() for i in range(iterations): workspace.RunNet(train_model.net) if i % 50 == 0: print 'Iter ' + str(i) + ': ' + 'Loss ' + str(workspace.FetchBlob("loss")) print str(i) + "/" + str(iterations) current_time = datetime.datetime.now() elapsed_time = current_time - start_date print("\t Current time spent: " + str(elapsed_time)) print str(iterations) + "/" + str(iterations) + " Training done" current_time = datetime.datetime.now() elapsed_time = current_time - start_date print("\t Total time spent: " + str(elapsed_time)) deploy_model = model_helper.ModelHelper(name="deploy_net", arg_scope=arg_scope, init_params=False) self.create_model(deploy_model, "data", label, device_opts, is_test=True) self.save_net(self.INIT_NET, self.PREDICT_NET, deploy_model) ``` ## Expected behavior CNN Training on GPU is faster than CPU. ## Environment N/A - PyTorch Version (e.g., 1.0): **Caffer2 tag v0.4.0** - OS (e.g., Linux): **Ubuntu 16.04** - How you installed PyTorch (conda, pip, source): **Build from source (tag v0.4.0)** - Build command you used (if compiling from source): - Python version: **Python 2.7** - CUDA/cuDNN version: **8.0/7.0.5** - GPU models and configuration: **GTX 1050** - Any other relevant information: ## Additional context <!-- Add any other context about the problem here. -->
caffe2
low
Critical
389,291,675
rust
Uninhabited types in recursive types with "infinite" size
This enum is in theory finitely sized, though it's being detected as infinitely sized. ```rust #![feature(never_type)] enum Enum<T> { A, B(Enum<!>, T) } ``` ([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=f547579d4ba703c02943c2eda6bd598a)) ``` error[E0072]: recursive type `Enum` has infinite size --> src/lib.rs:2:1 | 2 | enum Enum<T> { | ^^^^^^^^^^^^ recursive type has infinite size 3 | A, 4 | B(Enum<!>, T) | ------- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Enum` representable ```
A-type-system,T-compiler,T-types
low
Critical
389,308,955
TypeScript
HOC returned component props can not differ from HOC generic props
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.3.0-dev.20181208 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** - HOC - react - higher order component **Code** ```tsx import * as React from 'react'; export interface HOCProps { foo: number; } /** Remove props, that have been prefilled by the HOC */ type WithoutPrefilled<T extends HOCProps> = Pick<T, Exclude<keyof T, 'foo'>>; function withFoo<P extends HOCProps>(WrappedComponent: React.ComponentType<P>) { return class SomeHOC extends React.Component<WithoutPrefilled<P>> { public render(): JSX.Element { return <WrappedComponent {...this.props} foo={0} />; } }; } ``` **Expected behavior:** No error, like with every version below 3.2.0. **Actual behavior:** Throws an error highlighting the WrappedComponent in the render method. ``` [ts] Type 'Readonly<{ children?: ReactNode; }> & Readonly<Pick<P, Exclude<keyof P, "foo">>> & { foo: number; }' is not assignable to type 'IntrinsicAttributes & P & { children?: ReactNode; }'. Type 'Readonly<{ children?: ReactNode; }> & Readonly<Pick<P, Exclude<keyof P, "foo">>> & { foo: number; }' is not assignable to type 'P'. [2322] ``` **Additional Information** This is pretty much the same sample example used in https://github.com/Microsoft/TypeScript/issues/28720, but with the difference, that the props of the returned component differ from the generic. Basically the HOC prefills the `foo` property for the `WrappedComponent`. Since the spreaded props are overriden by `foo`, I donโ€™t want `foo` to be a valid property for the HOC. This does not seem to be possible anymore. **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> **Related Issues:** <!-- Did you find other bugs that looked similar? --> https://github.com/Microsoft/TypeScript/issues/28720
Bug,Domain: JSX/TSX
high
Critical
389,316,071
TypeScript
Allow tsserver to log to stderr instead of logfile
<!-- ๐Ÿšจ 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 --> tsserver log stderr ## Suggestion It would be great if tsserver could log everything to STDERR instead of/in addition to the logfile. ## Use Cases <!-- What do you want to use this for? What shortcomings exist with current approaches? --> When running tsserver remotely (not on the same computer, but on a server/in a container) it is currently difficult to forward logs to the client. Currently I am running tail on the logfile, but that takes up a file watcher or CPU for polling and has a delay. ## Examples N/A ## 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,In Discussion
low
Critical
389,332,397
rust
How to read `argc` and `argv` without allocating and modify them
I need to read `argc` and `argv`, ideally without allocating any memory, and I want to modify them on initialization such that subsequent accesses to them only see the modified version (in particular, libraries querying these via `std::env::args()` and similar APIs). Why? Some runtimes require argument handling to work "just like in C". For example, `mpirun ...options... my_program foo bar` allows the user to pass explicit `options` about how the run-time should behave, and `mpirun` itself does insert extra options depending on the environment / hardware / config files / etc. The `my_program` binary is required to call `MPI_Init(&argc, &argv)` at the beginning of `main` to initialize the MPI runtime, and `MPI_Init` will interpret and strip all implicit and explicit options that `mpirun` might pass about the mpi run-time configuration, such that, after `MPI_Init` succeeds, `foo` and `bar` are the first and second CLI argument for `my_program` (instead of some higher value due to the `mpirun` options). So the TL;DR is that MPI init needs raw mutable access to `argc` and `argv`. Ideally, if I use a third party library later that access these via `std::env::args()`, it will only see the already post-processed arguments.
T-libs-api,C-feature-request,A-process
low
Minor
389,389,752
pytorch
as_tensor does not use the device of the default tensor type
## ๐Ÿ› Bug According to the [doc](https://pytorch.org/docs/stable/torch.html?highlight=torch%20as_tensor#torch.as_tensor) for `torch.as_tensor`, the input should be copied to a cuda device if the default tensor type is a cuda tensor. > Default: if None, uses the current device for the default tensor type (see torch.set_default_tensor_type()). device will be the CPU for CPU tensor types and the current CUDA device for CUDA tensor types. It does copy to cuda device if the input is a numpy array, but not if the input is a cpu tensor. ## To Reproduce Steps to reproduce the behavior: ``` In [1]: import torch In [2]: import numpy as np In [3]: torch.set_default_tensor_type(torch.cuda.FloatTensor) In [4]: torch.as_tensor(np.random.randn(4)).device Out[4]: device(type='cuda', index=0) In [5]: torch.as_tensor(torch.randn(4, device='cpu')).device Out[5]: device(type='cpu') ``` ## Expected behavior The device should be the 'cuda' device in both cases. ## Environment PyTorch version: 1.0.0 Is debug build: No CUDA used to build PyTorch: 9.0.176 OS: Ubuntu 18.04.1 LTS GCC version: (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 CMake version: version 3.10.2 Python version: 3.7 Is CUDA available: Yes CUDA runtime version: Could not collect GPU models and configuration: GPU 0: GeForce GTX 1070 GPU 1: GeForce GTX 1080 Nvidia driver version: 390.77 cuDNN version: Could not collect Versions of relevant libraries: [pip] Could not collect [conda] blas 1.0 mkl [conda] mkl 2018.0.3 1 [conda] mkl_fft 1.0.6 py37h7dd41cf_0 [conda] mkl_random 1.0.1 py37h4414c95_1 [conda] pytorch 1.0.0 py3.7_cuda9.0.176_cudnn7.4.1_1 pytorch [conda] torchvision 0.2.1 py_2 pytorch cc @ngimel @jlin27 @mruberry
module: docs,module: cuda,triaged
low
Critical
389,432,609
pytorch
[Caffe2] How to link Caffe2 in cmake file for C++ compilation?
I tried-->find_package(Caffe2 REQUIRED) Here is the error By not providing "FindCaffe2.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Caffe2", but CMake did not find one. Could not find a package configuration file provided by "Caffe2" with any of the following names: Caffe2Config.cmake caffe2-config.cmake Add the installation prefix of "Caffe2" to CMAKE_PREFIX_PATH or set "Caffe2_DIR" to a directory containing one of the above files. If "Caffe2" provides a separate development package or SDK, be sure it has been installed.
caffe2
low
Critical
389,462,524
pytorch
[Caffe2] Caffe2Config.cmake
After installation This is from Caffe2Config.cmake Caffe2Config file is located in build folder and utils.cmake is located in cmake folder. I was not able to find public folder. include("${CMAKE_CURRENT_LIST_DIR}/public/utils.cmake")
caffe2
low
Minor
389,494,085
TypeScript
Smarter error messages for JSX accidentally put outside a JSX expression
## Search Terms TS2657 TS2695 TS2304 JSX map label:"Domain: JSX/TSX" ## Suggestion TS should emit clearer error messages for invalid JSX caused by the case where a developer expected code to be in a JSX expression context but instead it's evaluated in a non-JSX context (regular code). A signpost for these kinds of issues is that the compiler errors go away if the offending code is wrapped in a Fragment. ## Use Cases TS emits a helpful error message (`[ts] JSX expressions must have one parent element. [2657]`) when a simple JSX expression has two sibling elements without a single parent element or fragment. But this only works if your code successfully emits multiple JSX elements. If you're combining JSX and text e.g. `<Foo>{bar}` then the helpful error message is not shown. These kinds of errors are easy to solve in simple JSX but can be really challenging to spot when the offending code is in the middle of complex TS code, because it's not obvious that the problem is JSX-related instead of "something in my TS code is broken". The root cause is a misunderstanding between the developer (who's assuming code to be in a JSX expression context) and the compiler (which knows that the code is NOT in a JSX expression context. From the developer's point of view, the fix for these problems is simple: wrap the offending TS code in a Fragment or another element. This gave me an idea for how TS could perhaps show smarter error messages. Could the TS compiler recognize cases where the following two conditions are true? 1) the developer may have expected code to be evaluated as a JSX expression, e.g. the code is inside a JSX element, or the code has a JSX element as a sibling. 2) the compiler errors go away if the code is treated as a JSX expression instead of as regular TS code If so, then the TS compiler could show an error message (e.g. "JSX expressions must be wrapped in a fragment or JSX element") at the start or end of the offending code. Even if there are false positives-- e.g. legitimate code bugs inside a {code} block inside some JSX-- it's probably better to give devs multiple possible reasons for a compiler error than to omit a likely reason. For example, here's two patterns I've run across recently: * **Pattern A:** An inline function is defined inside a JSX element (or fragment) AND and there's a compiler error in that code AND the errors go away if the function's body were wrapped in a fragment. Examples: ```tsx Test #1: GOOD <> {data.map((str: string, i: number) => ( {str} // no error ))} </> Test #2: GOOD <>{data.map((str: string, i: number) => ( <>{i}: {str}</> // no error ))} </> Test #3: BAD <> {data.map((str: string, i: number) => ( {i}: {str} // errors: [ts] ')' expected. [1005]; [ts] Cannot find name 'str'. [2304] ))} </> ``` * **Pattern B:** A JSX element (wrapped in `<` and `>`) is immediately preceded and/or immediately followed by non-JSX code that generates a compiler error AND the code would not throw a compiler error if it were wrapped in a Fragment. ```tsx Test #4: GOOD <> {data.map((str: string, i: number) => ( {i}+": "+{str}+"\n" // no error ))} </> Test #5: GOOD <> {data.map((str: string, i: number) => ( <br/><>{i}+": "+{str}+"\n"</> // error on <br/>: [ts] Left side of comma operator is unused and has no side effects. [2695] )) // Good error here: [ts] JSX expressions must have one parent element. [2657] } </> Test #6: BAD <> {data.map((str: string, i: number) => ( <br/>{i}+": "+{str}+"\n" // errors: [ts] Cannot find name 'i'. [2304]; [ts] Cannot find name 'str'. [2304] )) // error (on second parenthesis): [ts] '}' expected. [1005] } </> ``` ## Examples Here's the full example from above. ```TSX const repro = () => { const simpleJSX = ( <div>hi</div> // confusing error here: [ts] Left side of comma operator is unused and has no side effects. [2695] <div>bye</div> ); // Good error here: [ts] JSX expressions must have one parent element. [2657] const data = ['a', 'b', 'c']; return ( <> Test #1: GOOD <> {data.map((str: string, i: number) => ( {str} // no error ))} </> Test #2: GOOD <>{data.map((str: string, i: number) => ( <>{i}: {str}</> // no error ))} </> Test #3: BAD <> {data.map((str: string, i: number) => ( {i}: {str} // errors: [ts] ')' expected. [1005]; [ts] Cannot find name 'str'. [2304] ))} </> Test #4: GOOD <> {data.map((str: string, i: number) => ( {i}+": "+{str}+"\n" // no error ))} </> Test #5: GOOD <> {data.map((str: string, i: number) => ( <br/><>{i}+": "+{str}+"\n"</> // error on <br/>: [ts] Left side of comma operator is unused and has no side effects. [2695] )) // Good error here: [ts] JSX expressions must have one parent element. [2657] } </> Test #6: BAD <> {data.map((str: string, i: number) => ( <br/>{i}+": "+{str}+"\n" // errors: [ts] Cannot find name 'i'. [2304]; [ts] Cannot find name 'str'. [2304] )) // error (on second parenthesis): [ts] '}' expected. [1005] } </> </> )}; ``` ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code **(because it only applies to code that already has a compiler error)** * [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,In Discussion,Domain: Error Messages
low
Critical
389,507,340
create-react-app
Option to exit dev server on build errors?
We currently run our integration test suite (via [Cypress](https://www.cypress.io/)) against the dev server (`react-scripts start`). [start-server-and-test](https://github.com/bahmutov/start-server-and-test) is very handy for starting the server, waiting for it to listen on a port, and then shut down the server after tests are run. However, if there's an error that prevents the app from building (ex: a missing dependency), it has to get all the way through the integration test suite, running every test and failing them due to the build error thrown by Webpack. These builds would fail much faster if the dev server actually immediately quit with exit code 1 if there was a build error. Would it be reasonable to have this behavior if `CI=true`? I'll happily write the PR, just want to check on my approach before I sink any time into it.
issue: proposal
low
Critical
389,549,724
electron
Support more control of `Menu.popUp` placement
This is a duplicate of #15096, but I'm opening a new issue since the original was incorrectly closed and then ignored. --- > **Is your feature request related to a problem? Please describe.** > I'd like to be able to display a popup menu either above or below a button depending on the location on screen. Example: [wulkano/kap#579](https://github.com/wulkano/kap/pull/579) > > There are problems with this approach that I can't figure out how to solve without some changes to electron. > > **Describe the solution you'd like** > This could be handled better at the application level if either: > > * Menu popup direction was configurable > > * could enforce opening upwards or downwards on our own based on positioning > * Menu size was available > > * could manually position the popup to show above the element if we knew the height of the menu > > **Describe alternatives you've considered** > Perhaps another option would be for `Menu.popUp` to return the direction (`up` or `down`) that the menu is displaying. > > **Additional context** > Example UI: > ![image](https://user-images.githubusercontent.com/2533/46838959-78b59f00-cd70-11e8-86f6-4231879a3352.png)
enhancement :sparkles:
low
Minor
389,565,951
opencv
UMat (GPU) functions in multithreading environment
I detected strange behavior of many JavaCPP OpenCV functions, working with UMat, in our multithreading system. When I use functions with UMat arguments (i.e. GPU) from different threads, our system sometimes fails: the results are incorrect! In my last example, I used very simple call "opencv_core.max(m, m, result)" (I expect that result will be identical to m), where all matrices are UMat, and m is generated by conversion of some Mat to UMat. Sometimes - not always, but often enough - the result of max call differs from the correct result, in particular, sometimes it is just zero matrix. It seems that one thread doesn't "see" the data, prepared in other CPU core, though in my last test all conversion Mat ->UMat - max... -> UMat result -> Mat are performed inside a single thread (but then they are passed to another one). I found this problem in JavaCPP environment, but they say that it is not a problem of JavaCPP, it is a problem of OpenCV: https://github.com/bytedeco/javacpp-presets/issues/658 Java is multi-thread-oriented platform, it creates threads frequently - for user interface, for GC, for servlets and other server API, etc. It is very inconvenient to guarantee that all functions are executed in the single thread. So, can you clarify - do I understand right, that multi-threading is _absolutely forbidden_ while using UMat functions? And I _must_ use all functions with UMat arguments _only_ from some unique single thread for all my application (OS process)? If yes, is some progress in this area planned?
incomplete
low
Minor
389,578,073
TypeScript
JSX.ElementChildrenAttribute values are never considered excess properties in JSX
<!-- ๐Ÿšจ 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.2.1 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** JSX children excess **Code** ```ts import React from 'react' function Test(_: { foo: boolean }) { return null } const x = <Test foo>foo</Test> ``` **Expected behavior:** The `foo` string (JSXText) should be considered an excess property **Actual behavior:** `children` (`JSX.ElementChildrenAttribute`'s key) are always allowed as excess properties when there is at least some overlap. If `Test`'s props were `{}` there is an excess property warning, but not when they are written as they are in this example. **Related Issues:** I found this while working on https://github.com/DefinitelyTyped/DefinitelyTyped/pull/30775, where fixing bugs related to `ReactNode`'s types forced me to remove the implicit `children` prop added by the component types (they break render prop `children`). It wasn't always possible to find through the test suite where components that needed to declare they accept `children` were missing that declaration, because almost always they'd pass strict test even when `children` was an excess, undeclared property.
Bug,Domain: JSX/TSX
low
Critical
389,591,644
pytorch
[JIT] jit.trace fails with custom GRUs and CUDA when the sequence is longer
## ๐Ÿ› Bug <!-- A clear and concise description of what the bug is. --> When `jit.trace` is applied to a custom GRU with CUDA enabled, the call fails when seq_len is longer than 200. With CUDA, the call succeeds with smaller seq_len such as 100 or 120. With CPU, the call succeeds even with seq_len >= 200. ## To Reproduce Steps to reproduce the behavior: 1. Set `cuda_id = 0 (or any device)` and `seq_len = 200` in the following code ### Error message ``` torch.jit.TracingCheckError: Tracing failed sanity checks! Encountered an exception while running the trace with test inputs. Exception: default_program(28): Error: Formal parameter space overflowed (4096 bytes max) in function kernel_399 ``` ### Code ```python import torch from torch import nn class GRU(nn.Module): ''' GRU Reference https://discuss.pytorch.org/t/implementation-of-multiplicative-lstm/2328/9 https://github.com/pytorch/pytorch/blob/master/torch/nn/_functions/rnn.py#L46 ''' def __init__(self, input_size, hidden_size, seq_len, batch_first=True): super(GRU, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.batch_first = batch_first self.seq_len = seq_len self.input_weights = nn.Linear(input_size, 3 * hidden_size) self.hidden_weights = nn.Linear(hidden_size, 3 * hidden_size) def step(self, input, hidden): hx = hidden w_ih = self.input_weights(input) w_hh = self.hidden_weights(hx) i_r, i_c, i_u = w_ih.chunk(3, 1) h_r, h_c, h_u = w_hh.chunk(3, 1) updategate = torch.sigmoid(i_u+h_u) resetgate = torch.sigmoid(i_r+h_r) new_state = torch.tanh(i_c + resetgate * h_c) hy = (1.-updategate)*hx + updategate*new_state return hy def forward(self, input, hidden): if self.batch_first: input = input.transpose(0, 1) # Main loop output = [] for i in range(self.seq_len): hidden = self.step(input[i], hidden) output.append(hidden) output = torch.cat(output, 0).view(input.size(0), *output[0].size()) if self.batch_first: output = output.transpose(0, 1) return output, hidden if __name__ == '__main__': input_size = 48 hidden_size = 48 batch_size = 20 cuda_id = 0 # cuda_id = None seq_len = 200 # seq_len = 100 gru = GRU(input_size, hidden_size, seq_len, batch_first=True) input = torch.rand(batch_size, seq_len, input_size) hidden = torch.rand(batch_size, hidden_size) if cuda_id is not None: torch.cuda.set_device(cuda_id) gru = gru.cuda() input = input.cuda() hidden = hidden.cuda() traced_gru = torch.jit.trace(gru, (input, hidden)) ``` <!-- If you have a code sample, error messages, stack traces, please provide it here as well --> ## Expected behavior `jit.trace` call succeeds. <!-- A clear and concise description of what you expected to happen. --> ## Environment PyTorch version: 1.0.0 Is debug build: No CUDA used to build PyTorch: 9.0.176 OS: Ubuntu 16.04.3 LTS GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609 CMake version: version 3.5.1 Python version: 3.7 Is CUDA available: Yes CUDA runtime version: 9.0.176 GPU models and configuration: GPU 0: GeForce GTX 1080 Ti GPU 1: GeForce GTX 1080 Ti Nvidia driver version: 384.81 cuDNN version: Probably one of the following: /usr/local/cuda-9.0/lib64/libcudnn.so /usr/local/cuda-9.0/lib64/libcudnn.so.7 /usr/local/cuda-9.0/lib64/libcudnn.so.7.0.5 /usr/local/cuda-9.0/lib64/libcudnn_static.a Versions of relevant libraries: [pip] Could not collect [conda] blas 1.0 mkl [conda] mkl 2018.0.3 1 [conda] mkl_fft 1.0.6 py37h7dd41cf_0 [conda] mkl_random 1.0.1 py37h4414c95_1 [conda] pytorch 1.0.0 py3.7_cuda9.0.176_cudnn7.4.1_1 pytorch [conda] torchvision 0.2.1 py37_1 pytorch
oncall: jit
low
Critical
389,600,335
TypeScript
Proposal: stronger JSX types through conditional types
<!-- ๐Ÿšจ 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. --> ## Suggestion The current way the `JSX` namespace works and is implemented in the compiler is... full of legacy stuff. This could probably be fixed by https://github.com/Microsoft/TypeScript/issues/14729, but even when that is made, we still need some way of dealing with the types of intrinsic attributes. I'm not quite sure how to articulate my proposal, take this as a weak draft/WIP, but to sketch my idea, compare the following snippet with the way the `JSX` namespace [is currently defined in `@types/react`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/8fbdf7311ae14dec1fef7d7969121328deced217/types/react/index.d.ts#L2655-L2855). I wrote some tests kind of inline, and I named it "ESX" for now because I wrote it inside an existing project to verify the types worked. ```ts // tests const Test = (_: { test: boolean }) => false const p: ESX.ComponentProps<typeof Test> = { test: true } const pFail: ESX.ComponentProps<typeof Test> = { test: true, children: null // $ExpectError } class Test2 extends React.Component<{ test: boolean }> { render() { return false } } const p2: ESX.ComponentProps<typeof Test2> = { test: true } declare const Suspense: ESX.ExoticComponents.ModeComponent<typeof ESX.ExoticComponents.Suspense> const p3: ESX.ComponentProps<typeof Suspense> = { fallback: null } declare const Fragment: ESX.FragmentComponentType const p4: ESX.ComponentProps<typeof Fragment> = {} const aProps: ESX.ComponentProps<'a'> = { href: 'test', onClick({ currentTarget }) { currentTarget.href } } declare const MemoTest: ESX.ExoticComponents.MemoComponent<typeof Test> const memoProps: ESX.ComponentProps<typeof MemoTest> = { test: true } function forwarder(props: ESX.ComponentProps<typeof Test>, ref: React.Ref<HTMLAnchorElement>) { const children: ESX.Element<typeof MemoTest> = { type: MemoTest, key: null, props: { test: true }, ref: null } const element: ESX.Element<'a'> = { type: 'a', key: null, props: { children }, ref } const fragment: ESX.Element<typeof Fragment> = { type: Fragment, key: null, props: { children: [element, 'foo'] }, ref: null } return fragment } declare const ForwardTest: ESX.ExoticComponents.ForwardComponent<typeof forwarder> const forwardProps: ESX.ComponentProps<typeof ForwardTest> = { test: true } const forwardElement: ESX.Element<typeof ForwardTest> = { type: ForwardTest, key: 'foo', props: { test: true }, ref(ref) { if (ref !== null) { ref.href } } } // actual declarations declare global { namespace ESX { type EmptyElementResult = boolean | null type SingleElementResult<T extends Component = any> = string | number | Element<T> type FragmentResult<T extends Component = any> = EmptyElementResult | SingleElementResult<T> | FragmentResultArray<T> interface FragmentResultArray<T extends Component = any> extends ReadonlyArray<FragmentResult<T> | undefined> {} type Component = | ((props: any) => FragmentResult) | (new (props: any) => { render(): FragmentResult }) | keyof typeof IntrinsicComponents | ExoticComponent type ExoticComponent = | ExoticComponents.ForwardComponent<any> | ExoticComponents.MemoComponent<any> | ExoticComponents.ModeComponent<any> const ChildrenPropName: 'children' type FragmentComponentType = ExoticComponents.ModeComponent<typeof ExoticComponents.Fragment> interface IntrinsicAttributes<T extends Component> { key?: string ref?: (ComponentRefType<T> extends never ? never : React.Ref<ComponentRefType<T>>) | null } type ApparentComponentProps<T extends Component> = IntrinsicAttributes<T> & ComponentProps<T> type ComponentProps<T extends Component> = T extends keyof typeof IntrinsicComponents ? IntrinsicComponentProps<T> : T extends (props: infer P) => FragmentResult ? P : T extends new (props: infer P) => { render(): FragmentResult } ? P : T extends ExoticComponents.ExoticComponentBase<ExoticComponentTypes> ? ExoticComponents.ExoticComponentProps<T> : never type IntrinsicComponentProps< T extends keyof typeof IntrinsicComponents > = typeof IntrinsicComponents[T] extends HostComponent<infer P, any> ? P : never type ComponentRefType<T extends Component> = T extends keyof typeof IntrinsicComponents ? IntrinsicComponentRef<T> : T extends ExoticComponents.ForwardComponent<infer C> ? C extends (props: any, ref: React.Ref<infer R>) => FragmentResult ? R : never : T extends (new (props: any) => infer R) ? R : never type IntrinsicComponentRef< T extends keyof typeof IntrinsicComponents > = typeof IntrinsicComponents[T] extends HostComponent<any, infer R> ? R : never interface Element<T extends Component> { type: T props: ComponentProps<T> key: string | null ref: React.Ref<ComponentRefType<T>> | null } type ExoticComponentTypes = typeof ExoticComponents[keyof typeof ExoticComponents] // these are non-callable, non-constructible components // the names inside them are to be used by the React types instead, // and are only here to be able to declare their props/refs to // the typechecker. namespace ExoticComponents { interface ExoticComponentBase<S extends ExoticComponentTypes> { $$typeof: S } const Memo: unique symbol const ForwardRef: unique symbol const Fragment: unique symbol const Suspense: unique symbol const ConcurrentMode: unique symbol const StrictMode: unique symbol interface ModeComponentProps { [ChildrenPropName]?: FragmentResult } interface SuspenseComponentProps extends ModeComponentProps { fallback: FragmentResult maxDuration?: number } // A bunch of this complication is that `type`s are // never allowed to be recursive, directly or indirectly type MemoComponentProps<T extends Component> = T extends HostComponent<infer P, any> ? P : T extends (props: infer P) => FragmentResult ? P : T extends new (props: infer P) => { render(): FragmentResult } ? P : T extends ForwardComponent<infer C> ? ForwardComponentProps<C> : never type ForwardComponentProps<T extends ForwardComponentRender> = T extends ( props: infer P, ref: React.Ref<any> ) => FragmentResult ? P : never type ExoticComponentProps< T extends ExoticComponentBase<ExoticComponentTypes> > = T extends ExoticComponentBase<infer S> ? S extends typeof Fragment | typeof ConcurrentMode | typeof StrictMode ? ModeComponentProps : S extends typeof Suspense ? SuspenseComponentProps : S extends typeof Memo ? T extends MemoComponent<infer C> ? MemoComponentProps<C> : never : T extends ForwardComponent<infer C> ? ForwardComponentProps<C> : never : never interface ModeComponent< S extends typeof Fragment | typeof Suspense | typeof ConcurrentMode | typeof StrictMode > extends ExoticComponentBase<S> {} interface MemoComponent<T extends Component> extends ExoticComponentBase<typeof Memo> { type: T } type ForwardComponentRender = (props: any, ref: React.Ref<any>) => FragmentResult interface ForwardComponent<T extends ForwardComponentRender> extends ExoticComponentBase<typeof ForwardRef> { render: T } } } namespace IntrinsicComponents { const a: HostComponent<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> const div: HostComponent<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> } const HostComponentBrand: unique symbol interface HostComponent<P, I> { [HostComponentBrand]: new (props: P) => I } } ``` ## Use Cases Make the type definitions for JSX much stronger than they currently are. Using JSX syntax would, through the use of this new intrinsic type declaration style, be able to produce strongly typed elements, avoid the pitfalls of implicit `children`, and support actual exotic elements that are not callable or constructible. This is, of course, not complete at all. I did say it is a draft but it is a starting point for further ideas. This doesn't address `defaultProps` at all for example. ## Examples The examples are in the snippet above, but, when writing JSX: ```xml <ComponentName key='x'>child text node<><div>fragment</div></></ComponentName> ``` The JSX evaluator would attempt to create `"ESX".Element` with `ComponentName`, `"ESX".FragmentComponentType` and `'div'` as their generic argument, respectively. The attributes that can be given to the component would come from the `ApparentComponentProps<T>`. The attributes the component can read inside itself would be `ComponentProps<T>`. This no longer has any risk of having `key` or `ref` appear to be available as props inside a component, although I haven't yet found out a way to _forbid_ that you just declare `key` or `ref` yourself in your props; it'd be caught but only when you attempt to use the component, not on declaration time. This is likely related to the unsolved problem I mention at the end. Children would count as a `["ESX".ChildrenPropName]` attribute. A TODO is to figure out how to represent the difference React and Preact have when dealing with single children. Right now, a single child (like inside `<>` and inside `<div>`) create a single `"ESX".Element`, while multiple children would create a `FragmentResultArray` (probably needs a better name). Exotic components use "unique symbol" nominal types to be able to declare themselves. Intrinsic elements (`'div'`, `'a'`, etc) also use a namespace and `const` declarations instead of an `interface` as I was looking into using nominal typing for them as well. Host components use a "unique symbol" nominal type to make themselves not constructible while still being able to declare a component that behaves differently from class components, and are still not themselves exotic components. An unsolved problem is how to declare that you expect an element or a component to have or at least accept certain props. This probably requires higher kinded types, or just an extra spark of the imagination to figure out how to do it. Using conditional types to `never` out an argument type if it doesn't accept the props you want is just terrible DX (`<T extends Component>`, `ComponentProps<T> extends { propIWant: string } ? T : never`). I also ran into limitations with `type`s not being allowed to be self-referential. You probably want to avoid turning the type checker into a turing machine, but with (for example) `React.memo(React.lazy(async () => ({ default: React.memo(React.memo(React.memo(React.forwardRef(() => 'Hello there!')))) })))` being a [perfectly valid component at runtime](https://codesandbox.io/s/131q57nrqj), not being able to recurse causes issues for correctly deriving props. Reminds me I forgot to define the exotic lazy component type. ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code - Not really if you just use the React public API, but this is, however, breaking as hell for anything typed directly using the JSX types or `@types/react` non-concrete types. This would mostly affect `@types/react` itself, though, but several of `@types/react`'s types would have to change to be compatible with this. * [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,In Discussion
low
Critical
389,601,691
neovim
Lua: show VimL (eval) backtrace
* nvim --version: NVIM v0.3.2-707-g082e14557, LuaJIT 2.0.5 Test.vim ```viml function! g:RunTest() throw "foo" endfunction ``` Case 1 - Open Test.vim - `:source %` - `:call g:RunTest()` - Observe error information ``` Error detected while processing function RunTest: line 1: E605: Exception not caught: foo ``` Case 2 - Open Test.vim - `:source %` - `lua vim.api.nvim_eval('g:RunTest()')` - Observe error information is missing any information on stack trace: ``` E5105: Error while calling lua chunk: [string "<VimL compiled string>"]:1: foo ``` This can make it hard to debug issues that occur when executing vimscript from lua
enhancement,api,lua
low
Critical
389,632,086
vue-element-admin
ๅฐ่ฃ…็š„tinymce็ป„ไปถ่ฆๅ†™vue-test-utils็š„ๆ—ถๅ€™ๆŠฅโ€œCannot read property 'init' of undefinedโ€่ฏฅๅฆ‚ไฝ•ไฟฎๆ”นๅ‘ข
ๆ–ฐๅ…ฅๆ‰‹vue-test-utils๏ผŒๆƒณๆต‹่ฏ•ๅฐ่ฃ…ๅœจcomponent/tinymce/index็š„vueไปฃ็ ๏ผš ไฝ†ๆ˜ฏๅด็›ดๆŽฅๆŠฅ้”™่ฏดwindow.tinymceๆ˜ฏundefined ๆœ‰็‚น็–‘ๆƒ‘ๆœ‰ๅคง็ฅž่ƒฝ่งฃ็ญ”ๅ—๏ผŸ ``` import Tinymce from '@/components/Tinymce/index' import { mount, createLocalVue, shallowMount } from '@vue/test-utils' import Element from 'element-ui' const localVue = createLocalVue() localVue.use(Element) describe('Tinymce', () => { const wrapper = shallowMount(Tinymce, { localVue, attachToDocument: true }) it('emit functions run correct by order', () => { expect(wrapper.emittedByOrder().map(e => e.name)).toEqual(['input', 'backImgAndId']) }) }) ```
4.0
low
Minor
389,645,911
angular
HTTP request triggers change detection twice
# ๐Ÿž bug report ### Affected Package ``` @angular/[email protected] [email protected] ``` ### Description An HTTP request via `HttpClient#get` triggers change detection twice once the response is available. ## ๐Ÿ”ฌ Minimal Reproduction There is a minimal example at https://stackblitz.com/edit/angular-issue-repro2-upg7ax In this example `AppComponent#ngDoCheck` is called 4 times. - The first 2 calls seem to be normal during bootstrapping of any application (although not documented). - The 3rd and 4th call are the consequence of the HTTP request that got triggered. There is one change detection triggered by `readystatechange` event and another one triggered by `load` (also see the call trees in the screenshot below). In this case only one change detection should be triggered. From a change detection perspective one of them is redundant and reduces the app's performance. ## ๐ŸŒ Your Environment **Angular Version:** <pre><code> Angular CLI: 6.2.8 Node: 8.11.3 OS: darwin x64 Angular: 6.1.10 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router Package Version ----------------------------------------------------------- @angular-devkit/architect 0.8.8 @angular-devkit/build-angular 0.8.8 @angular-devkit/build-optimizer 0.8.8 @angular-devkit/build-webpack 0.8.8 @angular-devkit/core 0.8.8 @angular-devkit/schematics 0.8.8 @angular/cli 6.2.8 @ngtools/webpack 6.2.8 @schematics/angular 0.8.8 @schematics/update 0.8.8 rxjs 6.2.2 typescript 2.9.2 webpack 4.16.4 </code></pre>
type: bug/fix,freq2: medium,area: zones,area: common/http,state: confirmed,P4
low
Critical
389,663,926
angular
InputDecorator should have more specifiy return type than "any"
<!--๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”… Oh hi there! ๐Ÿ˜„ To expedite issue processing please search open and closed issues before submitting a new one. Existing issues often contain information about workarounds, resolution, or progress updates. ๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…--> # ๐Ÿž bug report ### Affected Package <!-- Can you pin-point one or more @angular/* packages as the source of the bug? --> <!-- โœ๏ธedit: --> The issue is caused by package @angular/core ### Is this a regression? <!-- Did this behavior use to work in the previous version? --> <!-- โœ๏ธ--> No ### Description `InputDecorator`, when called as a function, has the return type `any`. Using `@Input()` therefore causes a violation of TSLint's no-unsafe-any rule. ## ๐Ÿ”ฌ Minimal Reproduction Use `@Input()` and run TSLint with rule "no-unsafe-any" set to true `MyComponent.ts` <pre><code> export class MyComponent { @Input() public someInput: string; } </code></pre> `Tslint.json` <pre><code>no-unsafe-any: true</code></pre> <!-- If StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue. Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior. --> ## ๐ŸŒ Your Environment **Angular Version:** <pre><code>TSLint: 5.11.0 Typescript: 3.1.3 </code></pre>
type: bug/fix,freq2: medium,area: core,state: confirmed,core: inputs / outputs,core: host and host bindings,cross-cutting: types,P4
low
Critical
389,668,914
rust
Documentation should list the supported target platforms so the list can be exported on the site and be accesible to people evaluating Rust as a possible language choice
C-enhancement,T-infra
low
Major
389,722,278
opencv
CL_INVALID_WORK_GROUP_SIZE issue
I have short test program trying to use OpenCL version of functions ... ``` cv::ocl::setUseOpenCL(true); // enable || disable OpenCL in the processing of UMat UMat img,gray; imread("lena30.jpg", 1).copyTo(img); cvtColor(TIimg, TIgray, COLOR_BGR2GRAY); GaussianBlur(TIgray, TIgray, Size(5, 5), 1.25); Canny(TIgray, TIgray, 0, 30); ``` Unfortunately at runtime test program complains on workgroupsize... ``` [ INFO:0] Successfully initialized OpenCL cache directory: /home/root/.cache/opencv/3.4.1/opencl_cache/ [ INFO:0] Preparing OpenCL cache configuration for context: OpenCL error CL_INVALID_WORK_GROUP_SIZE (-54) during call: clEnqueueNDRangeKernel('stage1_with_sobel', dims=2, globalsize=512x512x1, localsize=32x32x1) sync=false ``` How can I set workgroups size and other opencl params before function execution?
priority: low,category: ocl,platform: other
low
Critical