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
474,837,525
terminal
Implement a helper function either in terminal or the textbuffer that allows easy movement of text from 1 location to another
DeleteCharacter and InsertCharacter both require moving text while retaining their text attributes. The logic used to do that movement should be put into a separate helper function so that other operations can make use of it as well. _Originally posted by @PankajBhojwani in https://github.com/_render_node/MDIzOlB1bGxSZXF1ZXN0UmV2aWV3VGhyZWFkMTg5NzIxMjU3OnYy/pull_request_review_threads/discussion_
Product-Terminal,Issue-Task,Area-CodeHealth
low
Minor
474,843,989
TypeScript
ts2367 Comparing non-comparable types not detected with optional property
**TypeScript Version:** 3.6.0-dev.20190730 (also with 3.5.1) **Search Terms:** compare types, comparable, always false comparison, optional property, properties **Code** ```ts enum X { A= 'A' } function x(res: {action: string}):boolean { return res === X.A // error } function y(res: {action: string | undefined}):boolean { return res === X.A // error } function z(res: {action?: string}):boolean { return res === X.A // no error, but always false } function correct(res: {action: string}):boolean { return res.action === X.A // what the code should have been } ``` **Expected behavior:** The comparison in function `z` should have resulted in `error TS2367: This condition will always return 'false' since the types '{ action?: string; }' and 'X.A' have no overlap.` **Actual behavior:** Functions `x`, `y` give the correct error. Function `z` has no compiler error, but the condition will always evaluate to false since it is comparing an object and a string. **Playground Link:** https://www.typescriptlang.org/play/#code/KYOwrgtgBAGlDeBYAUFNUCCBeKByDuKAviigGZggDGALgJYD2IUAHgBQBOwAzgFwIBDWoxD9uNDnRABzIgEpeAIwYMANsAHMkyLjTAdmXblCynYAOgxQA9NajAOHBh2KlkFavSZQAnpx788EJeolDikjJQAD5QlAAmwGRSwHHySirqmggouvqGPCZmMJY2dg5OLsgkyOSUwt4AXv58gvUgAPxiElKyCspqGlo5wHoGUEaFOMVWtlAgDPaOzgA0UIpgNFACqgDuAj7GZNvcwK417nUhUFTOXLTNgcEiXRG96QNZ2rljRuZP3qYpiVZjsABYCTY0UHAa4MBJhUEMMCqOJQcEANxhimAoDOQA **Related Issues:** n/a
Suggestion,In Discussion
low
Critical
474,883,759
vscode
String Settings UI: Multiple edits loses data on Save
Testing #77427 I can put multiple settings into edit mode. When pressing "Enter" to commit an entry, the data from the other settings is lost. Probably should only allow for editing of one setting at a time. Repro: * search for `validProper` settings to show the three `Valid Properties` settings: ![image](https://user-images.githubusercontent.com/1487073/62175273-e5932900-b2f1-11e9-9d6f-e80f26142eb1.png) * Click "Add Item" on each one, add a value to each: ![image](https://user-images.githubusercontent.com/1487073/62175278-edeb6400-b2f1-11e9-951c-ead03a0f973a.png) * With focus in the 3rd item, press "Enter" to commit the edit. Result is that edit is committed, but the data from the others is lost: ![image](https://user-images.githubusercontent.com/1487073/62175287-fa6fbc80-b2f1-11e9-9bef-43ed436e2426.png) Suggest that you can only edit one setting at a time.
bug,settings-editor,confirmed
low
Minor
474,920,522
flutter
Flutter tool bin path could be duplicate in Setting up the Framework development environment?
This isn't a bug exactly, it's just that I am looking at how to contribute to Flutter and the [`Setting up the Framework development environment`](https://github.com/flutter/flutter/wiki/Setting-up-the-Framework-development-environment) page says: `7. Add this repository's bin directory to your path. That will let you use the flutter command in this directory more easily.` Wouldn't this make a conflict in my machine, as I already have the `flutter` tool installed (the one that comes in the regular installation of Flutter)?
tool,d: api docs,P3,team-tool,triaged-tool
low
Critical
474,953,577
flutter
Simple improvement to "flutter upgrade" for error situations
Flutter upgrade can result in: ``` Unable to upgrade Flutter: no origin repository configured. Run 'git remote add origin https://github.com/flutter/flutter' in /path/to/flutter/install ``` Attempting to add that remote as suggested can result in discovering it was already thee. Here's a fix: `flutter channel stable` And it is pertinent to situations when there was no channel selected - no '*' in the list spat out by `flutter channel` **Thus "Check channels with 'flutter channel' and do 'flutter channel stable' if none selected" could be added the "Unable to upgrade Flutter..." error output from `flutter upgrade`**
tool,a: error message,P2,team-tool,triaged-tool
low
Critical
474,997,751
angular
Reactive Form is disabled but disabled property is false
<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅 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/forms ### Description I have simple reactive form with some input fields. The method `form.disable()` is called to disable the form and all fields. The method works, as all input fields in the UI are now disabled. **Expected** The property `form.disabled` should be `true` as the form is disabled now. **Actual** The property `form.disabled` is `false`. **Cause of the problem** After building the form, I subscribe to control `f1` and update the value of another control whenever `f1` changes. ``` this.myForm.controls.f1 .valueChanges .subscribe(() => this.testMethod()); testMethod() { this.myForm.controls.f3.setValue('test'); } ``` **Workaround** It works when I call `form.disable()` twice. ## 🔬 Minimal Reproduction <!-- Please create and share minimal reproduction of the issue starting with this template: https://stackblitz.com/fork/angular-issue-repro2 --> https://stackblitz.com/edit/angular-issue-repro2-g8725l <!-- If StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue. A good way to make a minimal reproduction is to create a new app via `ng new repro-app` and add the minimum possible code to show the problem. Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior. Issues that don't have enough info and can't be reproduced will be closed. You can read more about issue submission guidelines here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue --> ## 🌍 Your Environment **Angular Version:** <pre><code> <!-- run `ng version` and paste output below --> <!-- ✍️--> Angular CLI: 7.3.5 Node: 10.14.1 OS: win32 x64 Angular: 7.2.9 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router Package Version ------------------------------------------------------------ @angular-devkit/architect 0.13.5 @angular-devkit/build-angular 0.13.5 @angular-devkit/build-optimizer 0.13.5 @angular-devkit/build-webpack 0.13.5 @angular-devkit/core 7.3.5 @angular-devkit/schematics 7.3.5 @angular/cdk 7.3.4 @angular/cli 7.3.5 @angular/material 7.3.4 @angular/material-moment-adapter 7.3.4 @ngtools/webpack 1.10.2 @schematics/angular 7.3.5 @schematics/update 0.13.5 rxjs 6.4.0 typescript 3.2.4 webpack 4.29.6 </code></pre> Stackblitz uses Angular 6.1.9
type: bug/fix,freq2: medium,area: forms,state: confirmed,forms: disabling controls,P3
low
Critical
474,998,164
go
cmd/asm: can't store float32 in odd-numbered registers s1,s3,s5,... on GOARCH=arm
We lack the ability to store `float32` into odd-numbered single-precision floating point `sX` registers on `GOARCH=arm`. The only way to access the floating-point registers is via the `F0, F1, ...` register names, and these correspond to the double-precision `float64` registers `d0, d1, ...`. If you write a 32-bit value to these registers, the assembler will emit an opcode that writes to the single-precision floating point register `sX` that aliases the corresponding `dX` register, where `dX` == `s(2*X)`. The only way to access the odd-numbered `sX` registers is to write `BYTE $0x....` statements and lay out the opcodes directly. But this has the unfortunate consequence of not being able to use virtual registers like `FP`, and thus extra instructions are required to work around this limitation. ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.12.4 darwin/amd64 </pre> ### Does this issue reproduce with the latest release? Yes; including tip as of July 25, 2019. ### 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/jpap/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/jpap/Development/go" GOPROXY="" GORACE="" GOROOT="/Users/jpap/Development/go/src/github.com/jpap/go" GOTMPDIR="" GOTOOLDIR="/Users/jpap/Development/go/src/github.com/jpap/go/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/wc/jkc42h512cv0n1tdp51yjp7w0000gq/T/go-build781111158=/tmp/go-build -gno-record-gcc-switches -fno-common" </pre></details> ### What did you do? [main.go] ``` package main func storeFloat(a, b, c, d, e, f float32) func main() { storeFloat(1, 2, 3, 4, 5, 6) } ``` [storeFloat.s] ``` // +build arm // storeFloat(a, b, c, d, e, f float32) TEXT ·storeFloat(SB), $0-24 MOVF a+0(FP), F0 // ed9d0a01 vldr s0, [sp, #4] MOVF b+4(FP), F1 // ed9d1a02 vldr s2, [sp, #8] MOVF c+8(FP), F2 // ed9d2a03 vldr s4, [sp, #12] MOVF d+12(FP), F3 // ed9d3a04 vldr s6, [sp, #16] MOVF e+16(FP), F4 // ed9d4a05 vldr s8, [sp, #20] MOVF f+20(FP), F5 // ed9d5a06 vldr s10, [sp, #24] RET ``` Build the above project, for example to target the Raspberry Pi having `vfp` support: ``` env GOOS=linux GOARCH=arm GOARM=6 go build -o demo . ``` Disassemble the binary: ``` objdump -d demo ``` Observe the opcodes of the `MOVF` instructions in `storeFloat`: they all reference even-numbered registers `s0, s2, s4, s6, s8, s10`. I have appended the disassembly to the code above as line-comments. I did try to specify single-precision floating point registers using `S0, S1, S2, S3, ...`, however the assembler fails with errors: ``` ./storeFloat.s:5: illegal or missing addressing mode for symbol S0 ./storeFloat.s:6: illegal or missing addressing mode for symbol S1 ./storeFloat.s:7: illegal or missing addressing mode for symbol S2 ./storeFloat.s:8: illegal or missing addressing mode for symbol S3 ./storeFloat.s:9: illegal or missing addressing mode for symbol S4 ./storeFloat.s:10: illegal or missing addressing mode for symbol S5 asm: assembly of ./storeFloat.s failed ``` A quick look at the Go source code shows that only `REG_Rx` and `REG_Fx` register types have been defined in `src/cmd/internal/obj/arm`.
NeedsInvestigation,compiler/runtime
low
Critical
475,084,284
react
Warning for 'exhaustive-deps' keeps asking for the full 'props' object instead of allowing single 'props' properties as dependencies
<!-- 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 (possible) in `eslint-plugin-react-hooks` **What is the current behavior?** When I'm in CodeSanbox using a React Sandbox I can use single properties of the `props` object as dependencies for the `useEffect` hook: Example 1: ``` useEffect(()=>{ console.log('Running useEffect...'); console.log(typeof(props.myProp)); },[ ]); ``` The example 1 gives me the following warning in CodeSandbox environment: >React Hook useEffect has a missing dependency: '**props.myProp'**. Either include it or remove the dependency array. (react-hooks/exhaustive-deps) eslint And if I add `[props.myProp]` to the array, the warning goes away. But the same example 1 in my local environment in VSCode, I get the following warning: >React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect.eslint(react-hooks/exhaustive-deps) **What is the expected behavior?** I would expect that I would get the same behavior that I get on CodeSandbox in my local environment in VSCode. But, if I add `[props.myProp]` to the array, the warning DOES NOT go away. Although the code works as intended. What could be happening? Does CodeSandbox uses a different version of the plugin? Is there any configuration I can make to change this behavior? **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** Versions I'm using: DEV: ``` "eslint": "^5.10.0", "eslint-plugin-react": "^7.11.1", "eslint-plugin-react-hooks": "^1.6.1", ``` REGULAR ``` "react": "^16.8.6", "react-dom": "^16.8.6", ``` VSCODE (probably not causing this issue) Version: 1.32.3 (user setup) Commit: a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4 Date: 2019-03-14T23:43:35.476Z Electron: 3.1.6 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Windows_NT x64 10.0.17763 **.eslintrc.json** ``` { "root" :true, "env": { "browser": true, "commonjs": true, "es6": true, "node": true }, "extends": [ "eslint:recommended", "plugin:react/recommended", "plugin:import/errors" ], "parser":"babel-eslint", "parserOptions": { "ecmaVersion": 2018, "sourceType": "module", "ecmaFeatures": { "jsx":true } }, "plugins":[ "react", "react-hooks" ], "rules": { "react/prop-types": 0, "semi": "error", "no-console": 0, "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn" }, "settings": { "import/resolver" : { "alias" : { "map" : [ ["@components","./src/components"], ["@constants","./src/constants"], ["@helpers","./src/helpers"] ], "extensions": [".js"] } }, "react" : { "version": "detect" } } } ```
Type: Discussion,Component: ESLint Rules
high
Critical
475,138,164
create-react-app
Remove @babel/plugin-proposal-object-rest-spread from default babel configuration
### Is your proposal related to a problem? This has been suggested in other issues (notably #5310) and pull requests (#5331). The pull request was closed with the comment: > Unfortunately, I still don't trust that this works correctly. There's zero harm in including this plugin to be safe, so let's leave it for now. There are a couple of places where this causes "harm": - I am declaring Javascript expressions as parameters to higher order components, and these expressions are serialized and sent to the server. The object rest spread babel plugin injects a function call when using the rest operator in these expressions, causing them to fail to be interpreted and validated on the server. - Perhaps more relevant to more people, transforming this code can cause additional debugging pain. This is not a trivial issue. The addition of the `browsers` option to `package.json` is *awesome*. I've been craving a "leave my code the $#@& alone" setting, and setting development mode to latest chrome is *almost* that, except for the rest operator, and it's a pain! ### Describe the solution you'd like Remove the inclusion of the `@babel/plugin-proposal-object-rest-spread` package by default. https://github.com/facebook/create-react-app/blob/bffc296a2c8967d46bed40d3120d82f2752496dc/packages/babel-preset-react-app/create.js#L161 ### Describe alternatives you've considered The obvious workaround is to use Object.assign, but this is an unnecessary restriction and prevents me from using a productive language feature.
issue: proposal
low
Critical
475,138,572
TypeScript
Inconsistent type shown in QuickInfo in nested generic call
<!-- 🚨 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:** typescript@3.6.0-dev.20190730 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** **Code** ```ts declare function concat<T>(target: T[], source: readonly T[]): T[]; Array<string>() .reduce((acc, s) => concat(acc, [s]) , []); ``` **Expected behavior:** acc type is always string[]. **Actual behavior:** When put cursor on reduce, acc type is string[] but when put on acc, acc type is never[]. **Playground Link:** http://www.typescriptlang.org/play/index.html?strictFunctionTypes=false#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXzDzCgwB4AVAPgAoNYBzEDALnnIG0BdAGngGccyGGBCs4UYHggBPNlwCUrDpwDcAKACCMGFGmk+GGFlT0a8tfHgA6OMGQjq1KGDC8+8+AF5KFywSIkTi687Hyc5pYh4SpAA **Related Issues:** <!-- Did you find other bugs that looked similar? -->
Bug
low
Critical
475,159,395
vue
nested v-slot is not reactive when using abbreviated syntax (v-slot on component itself) combined with an v-if/v-else
### Version 2.6.10 ### Reproduction link [https://codesandbox.io/s/vue-template-j1w3r](https://codesandbox.io/s/vue-template-j1w3r) ### Steps to reproduce In my example change the value by typing in the input field. In the working example both values change. In the not working example only the nested value changes. The only difference is the wrapping `<template>` node ### What is expected? scoped slot params (controllerSlotData) should be reactive in both cases ### What is actually happening? scoped slot params (controllerSlotData) is not reative --- The problem exists only when combining v-slot on component itself in combination with v-if/v-else <!-- generated by vue-issues. DO NOT REMOVE -->
bug,has workaround
low
Minor
475,161,820
terminal
Only regenerate our .metaproj when the .sln changes
From #2168. > This change could use some extra love - generating the metaproj takes a little while, as does parsing it. There might be a way to only generate the metaproj if it's changed, I didn't really investigate this, but presumably it could be done with a powershell script. I'll leave that for another work item in the future. This is that future work item
Help Wanted,Area-Build,Product-Meta,Issue-Task
low
Minor
475,163,222
angular
routerLinkActive broken in ng-template Angular 8
<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅 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 The issue is caused by package @angular/router ### Is this a regression? This was working in version 7.2 ### Description When rendering a link with the routerLinkActive attribute inside an ng-template the routerLinkActive class is not applied to the parent element if the element is outside of the ng-template. ## 🔬 Minimal Reproduction [→ StackBlitz](https://stackblitz.com/edit/angular-routelinkactive-broken-template) ## 🌍 Your Environment **Angular Version:** <pre><code>"@angular/compiler": "8.1.3", "@angular/core": "8.1.3", "@angular/common": "8.1.3", "@angular/router": "8.1.3"</code></pre> [→ Link to package.json](https://stackblitz.com/edit/angular-routelinkactive-broken-template?file=package.json)
type: bug/fix,freq2: medium,area: router,state: confirmed,router: directives,P3
low
Critical
475,165,683
godot
Set frame of texture in particle2d
In 3.1, Godot has moved the animated frames for a texture to CanvasItemMaterial. I can set the amount of frames, but would like to set which frame of the texture is showing. Is there a `set_particle_frame` or something similar that I can use to manually change the particle frame with code? If not this would be a good addition
discussion,topic:rendering,documentation,topic:particles
low
Minor
475,213,737
vue
Component is re-renedered when DOM changes around it
### Version 2.6.10 ### Reproduction link [https://codepen.io/Richm8/pen/VoWZQZ](https://codepen.io/Richm8/pen/VoWZQZ) ### Steps to reproduce In the attached codepen, Open console and then click on the toggle button, you'll see that the created and destroyed hooks are called for the `logger` component even though the component is not having any manipulations performed on it. ### What is expected? The created and destroy hooks on `logger` not to be called ### What is actually happening? The created and destroy hooks on `logger` are being called <!-- generated by vue-issues. DO NOT REMOVE -->
has workaround
low
Major
475,221,723
TypeScript
`deleteCount` param to `splice()` is not optional in es5 types
<!-- 🚨 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.5.1 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** splice deleteCount **Code** Set the target to ES5 then ```ts [1, 2, 3].splice(0); // should error. deleteCount missing [1, 2, 3].splice(0, 3); // ok ``` **Expected behavior:** `[1, 2, 3].splice(0);` not allowed **Actual behavior:** `[1, 2, 3].splice(0);` allowed **Playground Link:** [this](https://www.typescriptlang.org/play/?target=1#code/NoRgNABATJDMC6A6AzgBwDYEsDGBTAFAAwCUA3BAPQUTIAWA9gK7oAmEuATh-R4hC7nS4ALrgDCTAHbCIAW0zJkmSQHMAUKEgwICFBhwFCcMpWr0A1kA) `deleteCount` only become optional in ES6 ES5: https://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.12 ES6: https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.splice
Bug,Domain: lib.d.ts
medium
Critical
475,254,018
flutter
"no" locale should be autoconverted to "nb", or viceversa
Internal: b/292548354 It looks like 'nb' is not an officially deprecated locale name per the flutter engine so perhaps we should be accepting it as a synonym for locale 'no'.
engine,a: internationalization,c: proposal,customer: quill (g3),P2,team-engine,triaged-engine
low
Minor
475,254,951
terminal
Bug Report: ConHost Caption BoundingRects dissapeared
# Environment Caused by Accessibility PR: https://github.com/microsoft/terminal/commit/96496d8154113ae9e0bcbe47b4bbaf33a0d4e961 # Steps to reproduce 1. open ConHost 2. open inspect.exe 3. find caption buttons # Expected behavior bounding rects should appear over caption buttons # Actual behavior bounding rects aren't there. But it seems like you can interact with them perfectly fine otherwise. # Other notes I think the main culprit here is `WindowUiaProvider`. Not entirely sure what caused it though.
Product-Conhost,Help Wanted,Issue-Bug,Area-Accessibility,Priority-2
low
Critical
475,272,564
flutter
Call GC before measuring the diff memory in our memory tests
To reduce false alarms like: * https://github.com/flutter/flutter/issues/36079 * https://github.com/flutter/flutter/issues/35896 * https://github.com/flutter/flutter/issues/37176 * https://github.com/flutter/flutter/issues/37273 We may still measure the before-GC start/end memory to capture the GC performance. But we need to use after-GC start/end memory to calculate the diff memory.
team,engine,c: performance,perf: memory,P3,team-engine,triaged-engine
low
Major
475,301,667
flutter
CupertinoPicker and CupertinoDatePicker don't play the ticker sound
In iOS native, every picker (when sound is enabled) plays a slightly ticking noise along with the haptic feedback (which is already implemented). This should be added to the `CupertinoPicker` and `CupertinoDatePicker` as well. Edit: also, the upper horizontal line in the focused item looks slightly different than the bottom (maybe the color shade or like 0.5 pixels bigger?) while the native are identical. ``` [✓] Flutter (Channel unknown, v1.8.0, on Mac OS X 10.14.5 18F132, locale pt-PT) • Flutter version 1.8.0 at /Users/miguelruivo/DevTools/flutter • Framework revision 2fefa8c731 (4 weeks ago), 2019-07-01 11:33:22 -0700 • Engine revision 45b66b722e • Dart version 2.4.0 ````
platform-ios,framework,f: date/time picker,a: fidelity,f: cupertino,platform-web,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-design,triaged-design
low
Major
475,307,875
flutter
AndroidView should have an option to not clip content
``` [✓] Flutter (Channel master, v1.8.2-pre.242, on Linux, locale en_US.UTF-8) • Flutter version 1.8.2-pre.242 at <install location> • Framework revision 9bb7142ef7 (21 hours ago), 2019-07-30 14:45:00 -0700 • Engine revision c41bbc63d9 • Dart version 2.5.0 (build 2.5.0-dev.1.0 1e43d65d4a) ``` When embedding native views that have secondary elements that "overflow" the bounds, it should be possible to define a non-clipping option. For example, the text selection handles on `EditText`. In the screenshot below you can see that the text selection handles are clipped at the bottom. ![Screenshot_20190731-115641](https://user-images.githubusercontent.com/37941/62240113-107d8b80-b38b-11e9-8395-8ce2d75e891b.jpg)
c: new feature,platform-android,framework,a: platform-views,P3,team-android,triaged-android
low
Minor
475,318,012
rust
f32 formatter produces strange results
Test-case: ```rust fn main() { let f = 2147483648.0f32; println!("{} | {}", f, f as f64) } ``` I expected both to produce the same number, since that number is a perfectly representable `f32` value. This bit me because I was investigating [an issue](https://bugzilla.mozilla.org/show_bug.cgi?id=1570236) where values close to integer limits were treated as negative. Seeing `2147483600` (in range for an i32) rather than the actual value `2147483648` (out of range for an `i32`) made it all really confusing. Anyhow, I'll fix Firefox to do the proper bounds check, but it would've been nice to avoid the extra confusion time :)
T-libs-api,C-bug,A-floating-point,A-fmt
medium
Critical
475,359,615
godot
Multiple calls to _init() for inherited scenes created via "Instance scene file as node" button (fixed in `master`)
**Godot version:** 3.1 **OS/device including version:** macOS Mohave / Windows 10 **Issue description:** When creating child scenes (ie. inheriting scene structure from a parent) by using the "Instance scene file as a node" button and then extending the script, the `_init()` function for the parent scene is called twice. If inheriting that child scene again the parents get initialised again for each level down. **Steps to reproduce:** - Create a Parent scene with an `_init()` method and save both the scene and script files. - Create a new scene and add the root node by clicking "Instance scene file as a node" button. Select the parent scene. Rename your new root node "Child", save the scene. - Remove the script from the Child node and add a new script which `extends` the parent script. Add the `_init()` function (so you can see it being called.) - Finally, create a Main scene which loads the Child scene and `instance()` it. - Run the main scene and Parent will call `init()` twice, Child will call it once. **Minimal reproduction project:** https://github.com/benbishopnz/godot-multiple-init-example
bug,topic:core,confirmed
low
Major
475,363,563
godot
Improvement to tilemap editor with 3x3 autotile bitmask
**Godot version:** 3.1.1 **OS/device including version:** MacOS 10.14.4 **Issue description:** When painting in the Tilemap editor in 3x3 autotile bitmask mode, corners are missing when diagonals are drawn. The 3x3 bitmask has 9 bits per mask. This leads many to believe there are 2^9 = 512 bitmask combinations. However the tilemap editor **only draws tiles where the centre bit is set** (2^8 = 256 combinations). In most situations this is perfect, and means that tileset designers have a lot less tiles to design. However it results in those missing corners at the outer diagonal edges. *Example showing missing corners:* ![Screenshot 2019-07-31 at 21 43 31](https://user-images.githubusercontent.com/496858/62246988-c02f1980-b3dc-11e9-93a9-2df9c1246fa0.png) *Same example showing the tile bitmasks:* ![Screenshot 2019-07-31 at 21 44 17](https://user-images.githubusercontent.com/496858/62247054-ece33100-b3dc-11e9-91dd-a11e286475c1.png) **Suggestion:** Add support to the tilemap editor for the following bitmask combinations and render these onto tile squares that have not been painted but which have 2, 3 or 4 painted tiles connected to them vertically and horizontally. ![Godot tileset edges](https://user-images.githubusercontent.com/496858/62248762-caebad80-b3e0-11e9-8f1b-9bf25b0a92e5.png) This would have the following effect on the example above: *Same example with corner tiles:* ![Screenshot 2019-07-31 at 22 07 35](https://user-images.githubusercontent.com/496858/62248805-e1920480-b3e0-11e9-831b-c3d39951b261.png) *Same example showing tile bitmasks including the new corner tiles:* ![Screenshot 2019-07-31 at 22 12 36](https://user-images.githubusercontent.com/496858/62248834-f79fc500-b3e0-11e9-83d7-068dce8e8165.png) **Contributing:** I'm a C++ coder and I would be happy to contribute. However I am totally unfamiliar with this codebase and, having looked at the relevant class, I wouldn't know where to start. If you would like me to have a go at writing in this functionality, would you be willing to explain which parts of it are relevant and give me hints as to what I'd need to do? Alternatively, if you're able to do it, I'd love to see this in 3.1.2. 😁
enhancement,topic:2d
low
Major
475,366,391
flutter
"Lazy" builder for children of row, columns, expansion tiles, ect
## Use case I have a screen which scrolls, it is a `ListView.builder()` and its children are `ExpansionTile`'s. The list view builds it children as it needs, which is performant. However when the expansion tiles expand, showing a column with many children. These children are NOT built lazily as needed. This creates a huge lag (several seconds with ~40 children) when you open the tile. The vast majority of the children are off the screen, and could theoretically be build lazily as well in order to remain performant. They cannot be in their own listview builder since this would create a scrolling window within a scrolling window of a fixed height, instead of a column that scrolls within its parent and wraps its children's height. ## Proposal Give more widgets the option to be build with a builder with context and an index. This allows for columns, rows ect within a widget within a listview to remain performant.
c: new feature,framework,P3,team-framework,triaged-framework
medium
Major
475,377,675
godot
Collada importer introduces pops/hitches in animation due to interpolation bug
**Godot version:** 3.1.1 **OS/device including version:** Windows 8.1 **Issue description:** There appear to be 2 issues with the importer: 1) Even if the framerate in Blender and the framerate specified on the import are the same, godot attempts to interpolate some frames. 2) When frames are interpolated, bones get incorrect transforms causing pops in the animation, even on bones that originally had no animation. I noticed this on my character when just animating the hands and the feet popped on a certain frame. For the longest time, I thought this was an issue with the Better Collada exporter, but I dug through that for a while before finally ruling it out. Then I noticed a behavior change when changing the import framerate in Godot. The pops in the animation shifted to a different time. In collada.cpp, I discovered something that might be suspect: ``` float c = (p_time - keys[i - 1].time) / (keys[i].time - keys[i - 1].time); if (keys[i].data.size() == 16) { //interpolate a matrix Transform src = _read_transform_from_array(keys[i - 1].data); Transform dst = _read_transform_from_array(keys[i].data); Transform interp = c < 0.001 ? src : src.interpolate_with(dst, c); ``` First thing I attempted to do was snap to the nearest frame: ``` // Quick hack to try snapping to the nearest time if (p_time - keys[i-1].time > keys[i].time - p_time) { c = 1.0; } else { c = 0.0; } ``` Strangely, this did not fix the issue. I figured that would cause interpolate_with to use either 100% of the first matrix or 100% of the second. Finally I just removed the interpolate_with entirely: ``` Transform interp = src; ``` No more animation pops. Not sure if there's a fundamental problem with interpolate_with or if it's being used improperly here, but this could be a pretty core bug. **Steps to reproduce:** - Take a character rigged with rigify in Blender 2.79. Make a long action (120 frames or so) with very little motion (ex: just animate 1 hand moving and leave the feet stationary). - Export using the Better Collada exporter. - Import into Godot. - Look at the animation in the AnimationPlayer and note that on a couple frames, many of the bones (including ones with no animation) pop to a slightly different pose. I'll have to see if I can create a simpler repro case as my character .dae file is gigantic (very bloated format).
bug,confirmed,topic:import
low
Critical
475,409,455
rust
Tracking Issue for Iterator::try_find
Adds `try_find` to `Iterator`. PR: https://github.com/rust-lang/rust/pull/63177 ```rust fn try_find<F, E, R>(&mut self, f: F) -> Result<Option<Self::Item>, E> where F: FnMut(&Self::Item) -> R, R: Try<Ok = bool, Error = E>; ``` Open questions: - [x] Decide on just-`Result`, vs potentially supporting `Option` and other `Try` types https://github.com/rust-lang/rust/issues/85115 - [ ] Final commenting period (FCP) - [ ] Stabilization PR
T-libs-api,B-unstable,C-tracking-issue,A-iterators,requires-nightly,Libs-Tracked,Libs-Small
medium
Critical
475,413,507
flutter
Detecting physical power button press in flutter
Hello, I need to detect a double click of the physical power button in flutter. I tried using this example code below, but when i run it throws this error: ``` I/flutter (13958): keyboardType: TextInputType(name: TextInputType.text, signed: null, decimal: null), dirty, I/flutter (13958): dependencies: [_FocusMarker], state: EditableTextState#78ca3(tickers: tracking 2 tickers)): I/flutter (13958): Tried to make a child into a parent of itself. I/flutter (13958): 'package:flutter/src/widgets/focus_manager.dart': I/flutter (13958): Failed assertion: line 626 pos 12: 'child != this' ``` the code is here: ``` class _RawKeyboardListenerState extends State<KeyboardListener> { TextEditingController _controller = new TextEditingController(); FocusNode _textNode = new FocusNode(); @override initState() { super.initState(); } handleKey(RawKeyEventDataAndroid key) { print('KeyCode: ${key.keyCode}, CodePoint: ${key.codePoint}, ' 'Flags: ${key.flags}, MetaState: ${key.metaState}, ' 'ScanCode: ${key.scanCode}'); } @override Widget build(BuildContext context) { return RawKeyboardListener( focusNode: _textNode, onKey: (key) => handleKey(key.data), child: TextField( controller: _controller, focusNode: _textNode, ), ); } ```
c: new feature,framework,customer: crowd,P3,team-framework,triaged-framework
low
Critical
475,415,101
flutter
Improve the Flutter installation process
According to a recent user study, completing the installation process is associated with higher user retention. Note: While flutter/website#7778 describes *ways to assist the users* during the installation process to help them complete the process, this issue describes *potential tooling changes* we can consider to make the installation process easier. Some potential changes have been proposed: * Offer precompiled shells for Windows, Linux, and macOS using the desktop embedder that allow a zero setup workflow * Offer a new `flutter preview` verb which is able to `run` and `reload` .dart code against a prebuilt runner, thus not requiring any other installation than the SDK * Reduce the extra time in macOS due to platform-specific tools like brew or cocoapods * Experiment different installation instructions (E.g., Does git clone v. unzip Flutter affect installation experience and user retention? Would the homebrew install package be better?) * Change `flutter doctor` so that it produces error output for the host & target platforms that the developer is actually interested in * Changed the order of installation process so that the `flutter doctor` is the last step cc'ing the contributors of the action items doc: @timsneath, @csells, @mit-mit, @christopherfujino, @gaaclarke, @johnpryan, @tvolkert, @jonahwilliams, @eseidel
tool,framework,from: study,a: first hour,c: proposal,P3,team-framework,triaged-framework
low
Critical
475,434,904
flutter
[flutter_runner] flutter_runner tests migrate the fonts resources to engine tree
We still have not migrated the tests. Once we have them in our tree, move the dependent resources to the engine tree too.
customer: fuchsia,engine,P2,team-engine,triaged-engine
low
Minor
475,436,327
ant-design
The treeDefaultExpandedKeys attribute or treeExpandedKeys attribute of the TreeSelect component will not open child node when dynamic data
- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate. ### Reproduction link [https://codepen.io/lsunflower/pen/MNoorR?editors=0010](https://codepen.io/lsunflower/pen/MNoorR?editors=0010) ### Steps to reproduce Click the treeselect,Only expanded the first level treenode. ### What is expected? Expanded all keys (treeExpandedKeys) ### What is actually happening? Only expanded the first level treenode. | Environment | Info | |---|---| | antd | 3.20.7 | | React | 16 | | System | windows10 | | Browser | Google Chrome 75.0.3770.142 64bit | <!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Inactive
low
Major
475,443,989
rust
spurious error "cannot borrow `*x` as mutable more than once at a time"
```rust pub enum Foo<'a> { A(&'a mut u8), B(&'a mut Option<u8>), } pub fn foo(x: &mut Option<u8>) -> Foo { match *x { Some(ref mut y) if *y == 0 => Foo::A(y), ref mut z => Foo::B(z), } } ``` ([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=9aa85d24c70ca1f05a41441093351901)) ``` warning[E0499]: cannot borrow `*x` as mutable more than once at a time --> src/lib.rs:10:9 | 7 | pub fn foo(x: &mut Option<u8>) -> Foo { | - let's call the lifetime of this reference `'1` 8 | match *x { 9 | Some(ref mut y) if *y == 0 => Foo::A(y), | --------- --------- returning this value requires that `x.0` is borrowed for `'1` | | | first mutable borrow occurs here 10 | ref mut z => Foo::B(z), | ^^^^^^^^^ second mutable borrow occurs here | = warning: this error has been downgraded to a warning for backwards compatibility with previous releases = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future ``` I fail to see any potential undefined behaviour in this code. Removing the match arm guard allows this to compile. Also weird that the error mentions `x.0` when `x` is not a tuple.
C-enhancement,T-compiler,A-NLL,NLL-polonius
low
Critical
475,450,577
rust
Suggested improvements to `usage-of-qualified-ty` lint
Firstly, I don't even know why `ty::Ty` is a big problem... but I guess it's a readability choice someone made? Moreover, these lints had me stumped for a while. * "Qualified" should probably read something like "Namespace-qualified" to be explicit. * `Ty<>` should read `Ty`. * The spans aren't great here. (They should probably just point to the `Ty::<'tcx>` bits.) ``` error: usage of qualified `ty::Ty<'tcx>` --> src/librustc_mir/interpret/operand.rs:175:18 | 175 | let ty = ty::Ty::<'tcx>::decode(self)?; | ^^^^^^^^^^^^^^^^^^^^^^ help: try using it unqualified: `Ty<'tcx>` | = note: `-D rustc::usage-of-qualified-ty` implied by `-D rustc::internal` ``` ``` error: usage of qualified `ty::Ty<>` --> src/librustc_mir/interpret/operand.rs:175:18 | 175 | let ty = ty::Ty::decode(self)?; | ^^^^^^^^^^^^^^ help: try using it unqualified: `Ty<>` | = note: `-D rustc::usage-of-qualified-ty` implied by `-D rustc::internal` ``` CC @estebank
A-lints,T-compiler
low
Critical
475,496,136
TypeScript
Module Namespace Exotic Objects are incorrectly typed as if they have an Object prototype
<!-- 🚨 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.5.3 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** - import hasOwnProperty - import star hasOwnProperty - namespace exotic object - import prototype **Code** ```ts import * as Foo from "./Foo" if (foo.hasOwnProperty("bar")) { console.log(foo.bar) } ``` **Expected behavior:** Type error due to `hasOwnProperty` not existing, as the ["module namespace exotic object" should have a `null` prototype](https://tc39.es/ecma262/#table-29). **Actual behavior:** Code runs producing runtime error that `hasOwnProperty` is `undefined`.
Suggestion,In Discussion
low
Critical
475,554,574
TypeScript
TS Language Server: JSX Attribute types autocompletion
<!-- 🚨 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 --> - autocomplete - autocomplete proptypes - autocomplete jsx attribute types - proptypes - jsx intellisense ## Suggestion <!-- A summary of what you'd like to see added or changed --> The TS Language Server should have proper insert text mechanisms to handle react props. There are maybe 4 Scenarios in which we can type PropTypes in React/JSX ## Use Cases <!-- What do you want to use this for? What shortcomings exist with current approaches? --> This would be used to make editing experiences much quicker, especially in react/JSX markup. Webstorm has this feature by default. I would like this feature added to VSCode so I can continue to use a snappier editor, while having just as important intellisense features in it. That and almost 100% of my coworkers also use VSCode, so I want to use the same tools they are. Shortcomings with current Approach: The current way would be to have auto complete suggest prop types as you type them, or with the ctrl + space key shortcut. You would have to do this for every required prop type, which is a significant slow down. If every required prop type is auto inserted I never have to worry about it (and won't have to worry about required props, even during compile time!) ## Examples <!-- Show how this would be used and what the behavior would be --> 1. `const Component = (props: PropDefinition) => <JSX />` 1. `const Component: React.FC<PropDefinition> = (props) => <JSX />` 1. `class MyComponent extends React.Component<PropDefinition>` 1. `MyComponent.propTypes = PropTypesObject` even though the fourth case would only ever occur in Vanilla JS files, I would expect the following behavior to be the same. I would like the expected behavior to do the following - types: `<MyCompo...` - Auto Completes with a suggestion from the completion list - Completion Inserts: `<MyComponent requiredProp1={<cursor placed here>} requiredProp2={}` while omitting optional props. ![ExpectedBehaviorTS](https://user-images.githubusercontent.com/12608723/62279439-f7aebd80-b3fe-11e9-8164-5f3925fda822.gif) ## Checklist My suggestion meets these guidelines: * [ X ] This wouldn't be a breaking change in existing TypeScript/JavaScript code * [ X ] This wouldn't change the runtime behavior of existing JavaScript code * [ X ] This could be implemented without emitting different JS based on the types of the expressions * [ X ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) * [ X ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Suggestion,Domain: JSX/TSX,Domain: Completion Lists,Awaiting More Feedback
low
Critical
475,570,381
create-react-app
Async anonymous function get lost in production
### Describe the bug I have a function which calls an async anonymous function. Everything is fine in development but in production the relevant code is lost. My code: ``` getPOIInformation = (index) => { const activePOIObject = pois[this.state.activePOIIndex]; const properties = activePOIObject.geojson.features[index].properties; console.log(properties); if (!properties.additionalInformation) { properties.additionalInformation = "LOADING"; (async function () { const response = await api.getPoiInformation({ type: properties.osmType, id: properties.id }); properties.additionalInformation = response; this.forceUpdate(); }).bind(this)(); } return properties.additionalInformation; } ``` Code after run build: ``` a.getPOIInformation = function (e) { var t = qe[a.state.activePOIIndex].geojson.features[e].properties; return console.log(t), t.additionalInformation || (t.additionalInformation = "LOADING"), t.additionalInformation } ``` I think there is something in the webpack/babel configuration wrong.
issue: bug
low
Critical
475,596,273
flutter
[google_maps_flutter] Can't Keep Camera In Center When Rotating
GoogleMap behaves differently on iOS and Android when `scrollGesturesEnabled: false`. On iOS it behaves as expected => zooming and rotating does not effect the CameraPosition, and the Marker stays always centered. On Android it does **not** => the CameraPosition changes and the Marker does **not** stay centered. Sample App ```dart import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; void main() => runApp(MapPage()); class MapPage extends StatefulWidget { @override _MapPageState createState() => _MapPageState(); } class _MapPageState extends State<MapPage> { final Map<String, Marker> _markers = {}; Future<void> _onMapCreated(GoogleMapController controller) async { setState(() { _markers.clear(); _markers['position'] = Marker( markerId: MarkerId('position'), position: LatLng(51.752022, -1.257677), ); }); } @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar( title: const Text('Google Maps'), ), body: GoogleMap( mapType: MapType.normal, onMapCreated: _onMapCreated, initialCameraPosition: CameraPosition( target: const LatLng(51.752022, -1.257677), zoom: 14, ), markers: _markers.values.toSet(), myLocationButtonEnabled: false, scrollGesturesEnabled: false, compassEnabled: false, zoomGesturesEnabled: true, tiltGesturesEnabled: false, rotateGesturesEnabled: true, ), ), ); } } ```
framework,f: gestures,p: maps,package,team-ecosystem,has reproducible steps,P2,found in release: 2.0,triaged-ecosystem
low
Major
475,606,794
TypeScript
Project References and noEmitOnError
<!-- 🚨 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 --> project references noEmitOnError build flag fast development feedback babel/preset-typescript babel/plugin-transform-typescript ## Suggestion <!-- A summary of what you'd like to see added or changed --> **Project with error in it should not be marked as up to date.** Build flag should respect noEmitOnError preference as set by user in .tsconfig I understand that current works-as-expected is that the build flag sets this to true. This is a feature request with suggestions on how to change that design. Per [Typescript Handbook - Project References - Caveats](https://www.typescriptlang.org/docs/handbook/project-references.html#caveats) > if one of your out-of-date dependencies had a new error, you’d only see it once _because a subsequent build would skip building the now up-to-date project_ **Suggestion: Project with error in it should not be marked as up to date** - Can this assumption be changed? - Maybe .tsbuildinfo file can be used to store this state? - Incremental compilation works well with single projects and with watch flag: maybe the same mechanism for detecting up-to-date can be used for multiple project builds? ## Use Cases Fast development feedback. In my case, I'm running both tsc -wb and jest --watch side by side. I want my test cases to run even if my types aren't perfect. Right now, I am forced to resolve ALL type errors before I can get any feedback. This makes it difficult to develop iteratively. Moreover, what is not seen in this issue tracker here: A number of people are now running babel and typescript side by side. One of the reasons could very well be just this. There is no need to run babel for pure transpilation if typescript can emit with errors. <!-- What do you want to use this for? What shortcomings exist with current approaches? --> ## Examples <!-- Show how this would be used and what the behavior would be --> dev feedback; live test cases; live browser refresh; other use cases Other people: https://github.com/microsoft/TypeScript/issues/29851 https://github.com/microsoft/TypeScript/issues/25600#issuecomment-450644121 https://github.com/microsoft/TypeScript/issues/25600#issuecomment-473389927 https://github.com/microsoft/TypeScript/issues/25600#issuecomment-482865289 ## Workarounds Meanwhile, we can do this: - run tsc --watch directly in the referenced project directory - // \@ts-ignore OR // \@ts-nocheck flags ## Checklist My suggestion meets these guidelines: * [x ] This wouldn't be a breaking change in existing TypeScript/JavaScript code * [ x] This wouldn't change the runtime behavior of existing JavaScript code * [ x] This could be implemented without emitting different JS based on the types of the expressions * [ x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) * [x ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Suggestion,Awaiting More Feedback
medium
Critical
475,608,608
TypeScript
Index signature alternative
## Search Terms * Index signature alternative * Index signature ## Suggestion An alternative of Index signature would be beneficial when you want to enforce, that all properties of an object must follow given pattern, without the need of `[key: string | number]: T1`. My suggestion is to enable the use of `?` for index signatures to mark them as type guards only. ```ts-lang type posParams = { [name?: string]: UrlSegment; }; ``` ## Use Cases Whenever there is a need for an object with unknown keys, but known value types this would come in handy. A lot of people trying to implement some sort of callback that requires the index signature fails.The enormous number of results if one googles `Index signature is missing in type` confirms this I personally tend to confront this problem regularly when working with frameworks.. ## Examples For this example, I will use Angular, but this is applicable to any typescript code. ```lang-ts type UrlMatchResult = { consumed: UrlSegment[]; posParams?: { [name?: string]: UrlSegment; }; }; ``` When one would be to implement it with only specific `posParams` it would only check for the type of the object keys and values. ```lang-ts export interface IUrlParameters { baseFolder: UrlSegment; currentFolder?: UrlSegment; } export function folderMatcher(segments: UrlSegment[]): UrlMatchResult { const posParams: IUrlParameters = { currentFolder: segments[0], }; return { consumed: segments, posParams, } } ``` ## 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.) * [-] 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
Minor
475,610,134
TypeScript
Unexpected type assertion result
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.6.0-dev.20190801 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** - `type assertion absolute import` - `type assertion import` - `type cast absolute import` - `type cast import` - `type assertion pick` **Code** **Repo**: https://github.com/klemenoslaj/typescript-type-assertion `generated/types.d.ts` --- ```typescript export interface TypeD { da: string; db: string; dc: string; } export interface Test { a: string; b: string; c: string; d?: { __private: 'd' } & TypeD; } ``` `src/index.model.ts` --- ```typescript import { Test } from 'generated/types'; type DType = NonNullable<Test['d']>; export type Model = Pick<DType, keyof Exclude<DType, '__private'>>; ``` `src/index.ts` --- ```typescript import { Model } from './index.model'; export class A { value = <Model>{}; } ``` `dist/index.model.d.ts` --- ```typescript import { Test } from 'generated/types'; declare type DType = NonNullable<Test['d']>; export declare type Model = Pick<DType, keyof Exclude<DType, '__private'>>; export {}; ``` `dist/index.d.ts` --- ```typescript export declare class A { value: Pick<{ __private: "d"; } & import("../generated/types").TypeD, "__private" | "da" | "db" | "dc">; } ``` **Expected behavior:** I would expect that `dist/index.d.ts` type definitions would result in: ```typescript import { Model } from './index.model'; export declare class A { value: Model; } ``` In fact, this is the result of type definitions, if I change `value = <Model>{};` to `value: Model = <Model>{};`. Why doesn't typescript use `Model` directly when type asserting? **Actual behavior:** Results in: ```typescript export declare class A { value: Pick<{ __private: "d"; } & import("../generated/types").TypeD, "__private" | "da" | "db" | "dc">; } ``` **Playground Link:** I couldn't figure out how to compile declarations in playground, sorry :( As an alternative please clone the following repo: https://github.com/klemenoslaj/typescript-type-assertion **Explanation:** This is quite a significant problem in monorepo environment. What happens is that projects are compiled in the `dist/` folder and they contain relative path like above (`import("../generated/types")`), which points from the `src/` and not from `dist/`, effectively producing an error when projects start using one another. Why doesn't typescript: - use the original path from the import (`generated/types`)? - use the type from assertion directly (`Model`)?
Needs Investigation
low
Critical
475,625,314
rust
Flag for stop interpreting code blocks as doctests
Code blocks inside documentation are interpreted as doctests by default. Sometimes the code is not for testing at all (for example, writing pseudo-code for an algorithm), and we can add `ignore` at the beginning of the code block. However, even if `ignore` is added, `cargo test` still interprets the code block as doctest, and prints "... ignored" on each occurrence of `ignore`-tagged code blocks. In fact, those code blocks should not be interpreted as doctest, and `cargo test` should *silently* ignore those code blocks. For example, the following code is a snippet of my current project. ```rust /// Minimize the input size while preserving the coverage. /// /// The algorithm trims by trying to remove chunks, starting from large chunks /// to small chunks. /// /// # Algorithm /// ```ignore /// for round in rounds { /// for chunk_index in buffer { /// let new_buffer = remove_chunk(chunk_index, round_size); /// if run(new_buffer).coverage == known_coverage { /// buffer = new_buffer; /// } /// } /// } /// ``` pub struct Trim { ... } ``` `cargo test` generates the following output: ``` [...] Doc-tests dfuzz running 4 tests test src/algorithm/pass/mod.rs - algorithm::pass::Trim (line 17) ... ignored test src/tracer/function.rs - tracer::function (line 18) ... ignored test src/tracer/function.rs - tracer::function (line 23) ... ignored test src/tracer/function.rs - tracer::function (line 5) ... ignored ``` Is it possible to add a flag in the code block to suppress such "ignored" messages?
T-rustdoc,C-feature-request,A-doctests
medium
Major
475,668,845
flutter
Quickly entering text in a textfield with a slow TextInputFormatter may ignore keypresses
```dart import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; // Identity formatter, with some slowness. class SimpleTextFormatter extends TextInputFormatter { SimpleTextFormatter(); static final instance = SimpleTextFormatter(); @override TextEditingValue formatEditUpdate( TextEditingValue oldValue, TextEditingValue newValue, ) { var result = TextEditingValue(text: newValue.text.replaceAll('2', ''), selection: newValue.selection); // Some slow calculation! int sum = 0; for (int i = 0; i < 1000000000; ++i) sum += i; if (sum % 2 == 1) return null; return result; } } void main() => runApp(TextFieldTest()); class TextFieldTest extends StatefulWidget { @override _TextFieldTestState createState() => _TextFieldTestState(); } class _TextFieldTestState extends State<TextFieldTest> { final _controller = TextEditingController(); final _controller2 = TextEditingController(); @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return MaterialApp( title: 'Text Editing Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: Scaffold( appBar: AppBar( title: Text('Text Editing Demo'), ), body: Column( children: <Widget>[ SizedBox( width: 100, child: TextField( controller: _controller, inputFormatters: [SimpleTextFormatter.instance], ), ), SizedBox( width: 100, child: TextField( controller: _controller2, // inputFormatters: [SimpleTextFormatter.instance], ), ), ], ), ), ); } } ``` In the upper textfield quickly enter a sequence like "2266226622662266". Expected behavior: the 2's get filtered out and all 6's end up in the text field. Observed behavior: Some 6s are omitted as well.
a: text input,framework,engine,P2,team-engine,triaged-engine
low
Major
475,728,990
pytorch
TorchScript GPU Fuser Doesn't Handle In-Place Operations
The performance of a TorchScript that handles the computation in the [Adam Optimizer](https://github.com/pytorch/pytorch/blob/master/torch/optim/adam.py) is worse than using the native PyTorch operations on CUDA. ### Background I am trying to improve the GPU performance of the [Adam Optimizer](https://github.com/pytorch/pytorch/blob/master/torch/optim/adam.py) since it is the bottleneck in one of our workflows. ### Results I have written a standalone script that compares PyTorch native tensor operations, TorchScript, and Numba (three runs each): ``` native : 0.0506 native : 0.0322 native : 0.0322 TScript: 0.1917 TScript: 0.0442 TScript: 0.0442 numba : 0.1638 numba : 0.0145 numba : 0.0143 ``` I suspect the problem is that TorchScript does not fuse all operations into a single CUDA. It generates two CUDA kernels (see the `PYTORCH_FUSION_DEBUG` output below) ### Standalone Script ```python import math import torch import time import random import sys def kernel_native(param, grad, exp_avg, exp_avg_sq, beta1, beta2, step_size, eps): # type: (Tensor, Tensor, Tensor, Tensor, float, float, float, float) -> None exp_avg.mul_(beta1).add_(1 - beta1, grad) exp_avg_sq.mul_(beta2).addcmul_(1 - beta2, grad, grad) denom = exp_avg_sq.sqrt().add_(eps) param.addcdiv_(-step_size, exp_avg, denom) @torch.jit.script def kernel_jit_script(param, grad, exp_avg, exp_avg_sq, beta1, beta2, step_size, eps): # type: (Tensor, Tensor, Tensor, Tensor, float, float, float, float) -> None exp_avg.mul_(beta1) exp_avg.add_((1 - beta1) + grad) exp_avg_sq.mul_(beta2) exp_avg_sq.add_((1 - beta2)*(grad*grad)) denom = exp_avg_sq.sqrt().add_(eps) param += -step_size * (exp_avg / denom) from numba import cuda @cuda.jit def kernel_numba_cuda(param, grad, exp_avg, exp_avg_sq, beta1, beta2, step_size, eps): i = cuda.grid(1) if i > grad.size: return exp_avg[i] = exp_avg[i] * beta1 + (1 - beta1) + grad[i] exp_avg_sq[i] = exp_avg_sq[i] * beta2 + (1 - beta2) *grad[i]*grad[i] denom = math.sqrt(exp_avg_sq[i]) + eps param[i] += -step_size * (exp_avg[i] / denom) def kernel_numba(param, grad, exp_avg, exp_avg_sq, beta1, beta2, step_size, eps): # type: (Tensor, Tensor, Tensor, Tensor, float, float, float, float) -> None import ctypes import numpy as np def get_devicendarray(t): assert t.type() == 'torch.cuda.FloatTensor' numpy_dtype = np.float32 itemsize = 4 ctx = cuda.cudadrv.driver.driver.get_context() mp = cuda.cudadrv.driver.MemoryPointer(ctx, ctypes.c_ulong(t.data_ptr()), t.numel()*itemsize) return cuda.cudadrv.devicearray.DeviceNDArray(t.numel(), itemsize, numpy_dtype(), gpu_data=mp, stream=torch.cuda.current_stream().cuda_stream) numba_param = get_devicendarray(param) numba_grad = get_devicendarray(grad) numba_exp_avg = get_devicendarray(exp_avg) numba_exp_avg_sq = get_devicendarray(exp_avg_sq) threadsperblock = 32 blockspergrid = (param.numel() + (threadsperblock - 1)) // threadsperblock kernel_numba_cuda[blockspergrid, threadsperblock](numba_param, numba_grad, numba_exp_avg, numba_exp_avg_sq, beta1, beta2, step_size, eps) kernels = [("native ", kernel_native), ("TScript", kernel_jit_script), ("numba ", kernel_numba)] shape = (4194304*64,) param, grad, exp_avg, exp_avg_sq = [torch.rand(shape).to("cuda") for x in range(4)] beta1, beta2, step_size, eps = [random.random() for x in range(4)] torch.cuda.synchronize() for name, func in kernels: for i in range(3): t1 = time.time() func(param, grad, exp_avg, exp_avg_sq, beta1, beta2, step_size, eps) torch.cuda.synchronize() t2 = time.time() print("%s: " % name, t2-t1) ``` ### Output of PYTORCH_FUSION_DEBUG ```cu fusion code: typedef unsigned char uint8_t; typedef signed char int8_t; typedef short int int16_t; typedef long long int int64_t; #define NAN __int_as_float(0x7fffffff) #define POS_INFINITY __int_as_float(0x7f800000) #define NEG_INFINITY __int_as_float(0xff800000) typedef unsigned int IndexType; template<typename T, size_t N> struct TensorInfo { T* data; IndexType sizes[N]; IndexType strides[N]; }; template<typename T> struct TensorInfo<T, 0> { T * data; }; extern "C" __global__ void kernel_0(IndexType totalElements, const TensorInfo<float,1> t0, double s1, const TensorInfo<float,1> t2 ) { for (IndexType linearIndex = blockIdx.x * blockDim.x + threadIdx.x; linearIndex < totalElements; linearIndex += gridDim.x * blockDim.x) { // Convert `linearIndex` into an offset of tensor: IndexType t0_offset = 0; IndexType t0_linearIndex = linearIndex; //printf("tensor t0 sizes[0] = %d, strides[0] = %d\n", t0.sizes[0],t0.strides[0]); size_t t0_dimIndex0 = t0_linearIndex ; t0_offset += t0_dimIndex0 ; IndexType t2_offset = 0; IndexType t2_linearIndex = linearIndex; //printf("tensor t2 sizes[0] = %d, strides[0] = %d\n", t2.sizes[0],t2.strides[0]); size_t t2_dimIndex0 = t2_linearIndex ; t2_offset += t2_dimIndex0 ; // calculate the results float n0 = __ldg(&t0.data[t0_offset]); double n1 = s1; float n2 = n0 * n0; float n3 = n2 * ((float) n1); t2.data[t2_offset] = n3; } } fusion code: typedef unsigned char uint8_t; typedef signed char int8_t; typedef short int int16_t; typedef long long int int64_t; #define NAN __int_as_float(0x7fffffff) #define POS_INFINITY __int_as_float(0x7f800000) #define NEG_INFINITY __int_as_float(0xff800000) typedef unsigned int IndexType; template<typename T, size_t N> struct TensorInfo { T* data; IndexType sizes[N]; IndexType strides[N]; }; template<typename T> struct TensorInfo<T, 0> { T * data; }; extern "C" __global__ void kernel_1(IndexType totalElements, const TensorInfo<float,1> t0, const TensorInfo<float,1> t1, double s2, const TensorInfo<float,1> t3 ) { for (IndexType linearIndex = blockIdx.x * blockDim.x + threadIdx.x; linearIndex < totalElements; linearIndex += gridDim.x * blockDim.x) { // Convert `linearIndex` into an offset of tensor: IndexType t0_offset = 0; IndexType t0_linearIndex = linearIndex; //printf("tensor t0 sizes[0] = %d, strides[0] = %d\n", t0.sizes[0],t0.strides[0]); size_t t0_dimIndex0 = t0_linearIndex ; t0_offset += t0_dimIndex0 ; IndexType t1_offset = 0; IndexType t1_linearIndex = linearIndex; //printf("tensor t1 sizes[0] = %d, strides[0] = %d\n", t1.sizes[0],t1.strides[0]); size_t t1_dimIndex0 = t1_linearIndex ; t1_offset += t1_dimIndex0 ; IndexType t3_offset = 0; IndexType t3_linearIndex = linearIndex; //printf("tensor t3 sizes[0] = %d, strides[0] = %d\n", t3.sizes[0],t3.strides[0]); size_t t3_dimIndex0 = t3_linearIndex ; t3_offset += t3_dimIndex0 ; // calculate the results float n0 = __ldg(&t0.data[t0_offset]); float n1 = __ldg(&t1.data[t1_offset]); double n2 = s2; float n3 = n0 / n1; float n4 = n3 * ((float) n2); t3.data[t3_offset] = n4; } } ```
module: performance,oncall: jit,triaged
low
Critical
475,750,565
flutter
[FadeInImage] Add support for images being loaded from memory
## Use case As a developer, I want to load images from memory (`Uint8List`) that also take a placeholder, and have a nice fade-in animation for the transition. This is very useful when images are big, since `Image.memory` will flick when loading a big image, creating a very unpleasant experience. ## Proposal Add a new helper constructor to `FadeInImage`, `fromMemory(...)`, that takes an image in `Uint8List` and resolves it with a `MemoryImage` provider, so the images do not flick when loading. #### Notes If you think these changes are a good idea, I am very happy to open a PR with these code changes.
c: new feature,framework,a: images,c: proposal,P3,team-framework,triaged-framework
low
Major
475,751,568
flutter
Crash running Android in emulation on x86 devices in libndk_translation.so
#16456. #16793 #4095 are all closed and #35920 does not look similar. I just received the following **native crash** report from `Robo test, Nexus 6, Virtual, API Level 23` **and** `Robo test, Nexus7 clone, DVD 16:9 aspect ratio, Virtual, API Level 23` on `Channel master, v1.8.2-pre.229`: ``` *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Build fingerprint: 'generic/gce_x86_phone/gce_x86:6.0.1/MOB31Q.MZG52/3751182:userdebug/test-keys' Revision: '0' ABI: 'x86' pid: 9587, tid: 9749, name: 1.ui >>> app <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x180002 eax 00000002 ebx af61af38 ecx af63f01c edx 9bc402e4 esi 00180000 edi 00018000 xcs 00000073 xds 0000007b xes 0000007b xfs 00000007 xss 0000007b eip af5c492d ebp 9b4182a8 esp 9b418250 flags 00210206 backtrace: #00 pc 001c192d /system/lib/libndk_translation.so (_ZN15ndk_translation19find_symbol_by_nameEPNS_6soinfoERNS_10SymbolNameE+237) #01 pc 001c2463 /system/lib/libndk_translation.so (_ZN15ndk_translation8do_dlsymEPvPKcS0_+419) #02 pc 001c386e /system/lib/libndk_translation.so (_ZN15ndk_translation24ndk_translation_do_dlsymEPvPKcS2_PKvPS0_+46) #03 pc 001346ad /system/lib/libndk_translation.so (_ZN15ndk_translation11GuestLoader6DlVSymEPvPKcS3_S1_+77) #04 pc 0000193b /system/lib/libndk_translation_proxy_libdl.so #05 pc 00000691 [anon:ndk_x_0xb2f00000] #06 pc 0005f2e3 /data/app/app-1/lib/arm/libflutter.so #07 pc fffffffe <unknown> ```
c: crash,e: device-specific,platform-android,engine,customer: crowd,P3,team-android,triaged-android
high
Critical
475,783,463
pytorch
Accelerate PyTorch just-in-time compilation using MKL-DNN
## 🚀 Feature Accelerate PyTorch just-in-time compilation using MKL-DNN ## Motivation PyTorch's just-in-time (JIT) compiler rewrites and runs Pytorch model at production-efficiency. MKL-DNN is built to accelerate deep learning applications in production environment. With the high performance primitives like conv, rnn, and gemm, MKL-DNN accelerates most deep learning models significantly on multiple Intel CPU generations using AVX2, AVX512, AVX512-VNNI and future deep learning acceleration technology. With MKL-DNN enabled in JIT compiler, user can use JIT mode to get best performance with MKL-DNN with minimum change of Pytorch code. In imperative mode, user needs to explicitly insert format conversion for MKL-DNN operations using tensor.to_mkldnn() and to_dense(). In JIT mode, user doesn’t have to do so. User may need to pass an explicit flag or invoke a specific MKL-DNN optimization pass. It automatically converts CPU path op to MKL-DNN op, and propagates mkl-dnn format across neighbor MKL-DNN operations. It includes all performance benefits possibly achieved in imperative mode and additional graph optimization. ## Pitch Use PyTorch just-in-time compilation to get MKL-DNN acceleration with one flag (or function call) ## Additional context The MKL-DNN optimization pass includes mkl-dnn format propagation and fusion as initial step. The mkl-dnn formation propagation converts CPU ops to MKL-DNN ops. Format conversion ops are added in-between CPU and MKL-DNN ops. The implementation of PyTorch MKL-DNN JIT backend will be located in the ‘backend’ directory in JIT sub-directory
oncall: jit,feature,triaged,module: mkldnn
medium
Major
475,792,038
vscode
Support prompt for QuickPick as well as InputBox
I would like the createQuickPick and showQuickPick APIs to support a `prompt` field, the same way InputBox does, so I can show more information to the user that does not disappear when they begin to type.
feature-request,quick-pick
low
Minor
475,832,266
TypeScript
Incorrect inference of arrow function with intersected mapped type argument under strictFunctionTypes
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.6.0-dev.20190801 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** `inference` `intersection type` `strictFunctionTypes` **Code** ```ts type MappedIntersection<T extends {}> = { [P in keyof T]: string } & {}; type MappedRaw<T extends {}> = { [P in keyof T]: string }; // Case 1: Intersection + no arrow = succeed type ToInferNoArrowIntersection<T extends {}> = { fn(params: MappedIntersection<T>): void; }; type NoArrowIntersection<T extends ToInferNoArrowIntersection<any>> = void; declare const case1: NoArrowIntersection<{ fn: (params: MappedIntersection<{a: 1}>) => string, }>; // Case 2: No intersection + arrow = succeed type ToInferArrowNoIntersection<T extends {}> = { fn: (params: MappedRaw<T>) => void; }; type ArrowNoIntersection<T extends ToInferArrowNoIntersection<any>> = void; declare const case2: ArrowNoIntersection<{ fn: (params: MappedRaw<{a: 1}>) => void, }>; // Case 3: Intersection + arrow = fail type ToInferArrowIntersection<T extends {}> = { fn: (params: MappedIntersection<T>) => void; }; type ArrowIntersection<T extends ToInferArrowIntersection<any>> = void; declare const case3: ArrowIntersection<{ // Fails here fn: (params: MappedIntersection<{a: 1}>) => void, }>; ``` **Expected behavior:** Expected case 3 to succeed. **Actual behavior:** Case 3 produces: ``` Type '{ fn: (params: { a: string; }) => void; }' does not satisfy the constraint 'ToInferArrowIntersection<any>'. Types of property 'fn' are incompatible. Type '(params: { a: string; }) => void' is not assignable to type '(params: { [x: string]: string; }) => void'. Types of parameters 'params' and 'params' are incompatible. Property 'a' is missing in type '{ [x: string]: string; }' but required in type '{ a: string; }'. ``` Seems relevant that compilation succeeds without `strictFunctionTypes` **Playground Link:** [Playground](https://www.typescriptlang.org/play/#code/C4TwDgpgBAsghmSATAkgO2BATgZwgY2AEsB7NAHgBUoIAPTNJHKAbwF8A+KAXlagG0AClCJooAawggSAMyiUAugC4oOYFlEBzKGygAyVmwDcAKFCRYCZACU4Adyo16ERs3ZdeLAcNESps+WVVdS0dUxMAegioAGE4PCgARhV0TFwCYjIoAGooNBIoOCwsEjseVQBXfHwICCQzcGhKEnQZbAA5EgBBYtLU7DxCUgpqOgYmQw9WEyhZqBk0AAowIrgAWxwVeEQ6-vShsioOAEoVADcSIiRTYxMGi06ekrs9wcyRp3HmZtaO7t6XhgBhlhuQ4GgQBwphcrqYkAQADZFaD4MhqKD4eIQZJQR4A14gw4sGZzBYqZarDZbKy7IH7d7kFhwFSJTjHHhcNQaNCaAA0Jk44Ui0TiCQATCpOiI6W9hjlCgDyjgqjU6vcmi00G0sE9Sp0CQcPmMXBN3OViXN5mhySssOtNpYdkhbA5KCcOVAYdcBeFzNBdXZ9TLCUbnK55JrtQGg2lZYdwZDoZdvfD8EisCi0cAMViJVBo5rYyHGSTZmSoBS7VTHTZ7IzmUk2R6vfzBXdhbEsVAAMwpYOG+VFZ7lGRwIgI9UR346-H9hmjMOmzjm0tWm2Uh3bZAG+fu7hcL03X2NfOzouGxzG8M-LXYAM70EJqHlQ8mVPpzNodGYvC90-PB8iVXctK3taknUAigmRZJt909ZNWw4UwgA) **Related Issues:** <!-- Did you find other bugs that looked similar? --> https://github.com/microsoft/TypeScript/issues/29123#issuecomment-453884098 https://github.com/microsoft/TypeScript/issues/31081
Needs Investigation
medium
Critical
475,840,695
go
cmd/compile: review "expected expression" error messages
The compiler's parser (cmd/compile/internal/syntax) reports errors of the form: ``` syntax error: unexpected }, expecting expression ``` etc. Review these error messages; perhaps a form that uses `missing expression` is clearer.
NeedsInvestigation,compiler/runtime
low
Critical
475,843,794
rust
Const validation rejects references that might be dangling (but could actually be valid at run-time)
Apparently it's undefined behaviour to use: ``` const gpio: &RegisterBlock = unsafe { (& (*lpc176x5x::GPIO::ptr())) }; ``` but not undefined to use: ``` fn x() { let gpio: &RegisterBlock = unsafe { (& (*lpc176x5x::GPIO::ptr())) }; (...) } ``` with: ``` pub const fn ptr() -> *const gpio::RegisterBlock { 0x2009_c000 as *const _ } ``` Error message is: ``` error[E0080]: it is undefined behavior to use this value --> src/rtos.rs:27:1 | 27 | const gpio: &RegisterBlock = unsafe { (& (*lpc176x5x::GPIO::ptr())) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered dangling reference (created from integer) | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior ``` This is happening on in an embedded envrionment, where there is no MMU, and access to that address is correct. I'm not sure why it would be undefined to use it as a const, but not undefined to use it as a variable value? Perpahs it has something to do with the borrow checker not being able to track mutable and unmutable references to that value, but this is an immutable access, so it *should* be fine?
T-lang,C-feature-request,A-const-eval,needs-rfc,requires-nightly
high
Critical
475,860,125
pytorch
Bogus "Your compiler (clang++) is not compatible" message
I used `cpp_extension` on OS X and I got: ``` !! WARNING !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Your compiler (clang++) is not compatible with the compiler Pytorch was built with for this platform, which is clang++ on darwin. Please use clang++ to to compile your extension. Alternatively, you may compile PyTorch from source using clang++, and then you can also use clang++ to compile your extension. See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help with compiling PyTorch from source. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! WARNING !! ``` This looks pretty bogus to me.
module: build,triaged,module: macos
low
Minor
475,882,452
flutter
ui.Image.toByteData can't use the default rawRgba format if it's later used for Image.memory
To reproduce, run the app in https://gist.github.com/liyuqian/560c3edefe2bce147147a49db0ec4e98 and remove its PNG encoding specification (search for `!!!`). My Flutter version is c8be195e953c0366592aa253baa774ef5b718eb6 when this issue is reproduced locally. This issue may have been there for a while. For example, cl/260167188 was using PNG because of this.
engine,a: images,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-engine,triaged-engine
low
Major
475,917,338
node
HTTP2 compatibility layer tries to write the header multiple times.
I was given this bug report: https://i.imgur.com/YcJtGBJ.png Yes, I was given just an image. The issue is: this very same code runs smooth as butter for 4 years now on sites with great amounts of traffic and writing headers twice was NEVER and issue. The same poster said the person that he contacted insisted the issue was with my software. I'd ask you to look at this issue again, is not the first time my software stumbles with issues on the compatibility module. The moment this user changed from the http2 to the http module, the issue disappeared.
http2
low
Critical
475,925,267
kubernetes
Generated DeleteCollection methods make it impossible to use pagination correctly
DeleteCollection supports the full set of list options -- under the hood, it just calls the same List & ListPredicate machinery in the Store implementation. This means that it's perfectly viable to call DeleteCollection via REST calls directly with the pagination options (limit & continue), and, in fact, it behaves as expected when you do that (passing limit deletes a limitted set of results, returns those results, and gives back a continue token that can be passed to the next call to delete the next page of results). However, our DeleteCollection generated Go methods don't actually return anything but an error, making it impossible to access the continue token, meaning that it's not possible, AFAICT, to use pagination correctly with the generated deletecollection methods. Furthermore, since people look at the generated Go clients as a form of example/documention, we've effectively got misleading examples sitting around. API calls tested against 1.13.7, relevant source code from k8s.io/apiserver & k8s.io/client-go examined @ HEAD-ish (bb707c8fe2e2b0b6ea8320e232f7725efda8de34) /sig api-machinery /kind bug
kind/bug,sig/api-machinery,lifecycle/frozen,lifecycle/stale
low
Critical
475,925,831
go
encoding/json: marshaling RawMessage has poor performance
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.12.6 linux/amd64 </pre> ### Does this issue reproduce with the latest release? Yes. ### What operating system and processor architecture are you using (`go env`)? <details><summary><code>go env</code> Output</summary><br><pre> $ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/jrittner/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/jrittner/go-workspace" GOPROXY="" GORACE="" GOROOT="/home/jrittner/go" GOTMPDIR="" GOTOOLDIR="/home/jrittner/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-build506812392=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### What did you do? Ran a benchmark to compare marshaling a `json.RawMessage`, a `string` and a `[]byte`. ``` package jsontest import ( "encoding/json" "testing" ) const msg = `{"a":"aaaaaaa","b":{"c":["d","e"]}}` var benchmarkResult interface{} func BenchmarkRawMessage(b *testing.B) { x := json.RawMessage(msg) for i := 0; i < b.N; i++ { j, err := json.Marshal(x) if err != nil { b.Fatal(err) } benchmarkResult = j } } func BenchmarkString(b *testing.B) { x := msg for i := 0; i < b.N; i++ { j, err := json.Marshal(x) if err != nil { b.Fatal(err) } benchmarkResult = j } } func BenchmarkBytes(b *testing.B) { x := []byte(msg) for i := 0; i < b.N; i++ { j, err := json.Marshal(x) if err != nil { b.Fatal(err) } benchmarkResult = j } } ``` ### What did you expect to see? I expected marshaling a `json.RawMessage` to have the best performance of the three, since it should be a no-op. ### What did you see instead? It is 2 times slower than marshaling a `string`, and 3 times slower than marshaling a `[]byte`. BenchmarkRawMessage-2 1000000 1513 ns/op 232 B/op 7 allocs/op BenchmarkString-2 2000000 869 ns/op 112 B/op 3 allocs/op BenchmarkBytes-2 3000000 561 ns/op 128 B/op 3 allocs/op
Performance,NeedsDecision
low
Critical
475,929,769
electron
Would like a way to open a separate devtools window instance for each worker
<!-- As an open source project with a dedicated but small maintainer team, it can sometimes take a long time for issues to be addressed so please be patient and we will get back to you as soon as we can. --> ### Preflight Checklist <!-- Please ensure you've completed the following steps by replacing [ ] with [x]--> * [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project. * [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to. * [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success. ### Problem Description In my Electron app, I create a shared worker. When I have the devtools attached to the main renderer, I cannot debug the shared worker, and vice versa. It seems there can be only 1 instance of the devtools window at a time. This makes it hard to debug an operation that starts in the main renderer and continues in the worker. ### Proposed Solution Proposal is to open a new devtools windows for each worker. So there can be a devtools window attached to the main renderer, and separate devtools windows for any workers, all debuggable at the same time. ### Alternatives Considered This kind of debugging can be achieved by launching Electron with the --remote-debugging-port switch, and opening a url to debug workers as a workaround. ### Additional Information <!-- Add any other context about the problem here. -->
enhancement :sparkles:
low
Critical
475,951,516
godot
Persistent connections are not saved when created with tools for non-editable children
**Godot version:** 3a6102a6f **Issue description:** Suppose I have a scene and instanced the scene A with child B. Connecting a signal from B with the flag `CONNECT_PERSIST` will fail (silently) to actually persist unless `editable_children` is true for A. **Steps to reproduce:** Call the connect function from an editor plugin, something like `B.connect("somesignal", other_node, [], CONNECT_PERSIST)`. The connection will work while the scene is loaded, but will stop working on reloading. I understand non-editable children properties should *not* be saved, but this fails silently. The `error` returned by `connect()` is 0 in both cases. *edit: Note this work for connections **to** B.* This is another reason why exposing `editable_children` to scripts would be useful. See #20292, [this comment](https://github.com/godotengine/godot/issues/27828#issuecomment-506451476_) and this [rejected PR](https://github.com/godotengine/godot/pull/20569). [**Minimal reproduction project**](https://github.com/godotengine/godot/files/3459194/Test.zip): Press space to create the connection and switch/reload scenes with/without `editable_children` on.
topic:core,topic:editor,documentation
low
Critical
475,994,378
pytorch
segmentation faults when using multiprocessing_context='spawn' with large number of processes
Pytorch version `1.2.0.dev20190801+cu100` running into problem using `multiprocessing_context='spawn'` in the DataLoader It works for 48 processes over two machines using `spawn` or 384 processes using default method, but segfaults for 384 processes using spawn after warnings like this ([log](https://app.wandb.ai/yaroslavvb/imagenet18/runs/ftvkloea/logs)) ``` user/anaconda3/envs/pytorch_p36/lib/python3.6/multiprocessing/semaphore_tracker.py:143: UserWarning: semaphore_tracker: There appear to be 11 leaked semaphores to clean up at shutdown len(cache)) ``` 384 processes comes from 3 DataLoaders per process (test, validation, train), 8 workers per DataLoader, and separate process per GPU for 16 GPUs cc @SsnL @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera
oncall: distributed,module: multiprocessing,module: dataloader,triaged
low
Minor
475,994,996
pytorch
Using PyTorch on AWS EFA network
Opening this bug to collect PyTorch-side information needed to get PyTorch running on AWS EFA network. AWS-side is on https://github.com/aws/aws-ofi-nccl repo. Related bugs: - PyTorch EFA performance optimization/settings: https://github.com/aws/aws-ofi-nccl/issues/19 - Default DataLoaders cause crash on EFA, must use spawn: https://github.com/aws/aws-ofi-nccl/issues/20 Getting around EFA mpirun restrictions for DataLoader requires switching to `multiprocessing_context='spawn'` in latest PyTorch, [this](https://github.com/pytorch/pytorch/issues/23720) bug currently limits the number of workers you can use to lower than desired
module: dependency bug,oncall: distributed,triaged
low
Critical
476,047,409
opencv
OpenCV failed due to "error C2039: 'min': is not a member of 'std'" under /permissive- + MSVC
Hi All, OpenCV failed due to "error C2039: 'min': is not a member of 'std'" under /permissive- mode when built on MSVC. You use std::min, but don’t have <algorithm> included until later. Could you please help take a look at this? Thanks in advance! **You can repro this issue as the steps below:** 1. git clone https://github.com/opencv/opencv D:\OpenCV\src 2. git clone https://github.com/opencv/opencv_extra D:\OpenCV\src\extra 3. open a VS 2017 x86 prompt and browse to D:\OpenCV 4. mkdir build_x86 && pushd build_x86 5. set _CL_=/permissive- 6. cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 -DWITH_IPP=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_PERF_TESTS=ON -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DWITH_OPENCL=OFF -DBUILD_DOCS=OFF -DWITH_CUDA=OFF ..\src 7. msbuild /p:Configuration=Release;Platform=Win32 .\OpenCV.sln /t:Rebuild /m /p:BuildInParallel=true **Error info:** D:\OpenCV\src\3rdparty\openexr\Imath\ImathQuat.h(633): error C2039: 'min': is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\iomanip(20): note: see declaration of 'std'
category: build/install,category: 3rdparty
low
Critical
476,058,420
flutter
FlutterTextInputPlugin for iOS transfers unsupported NSUIntegers over MethodChannels
The FlutterTextInputPlugin for iOS sends NSUIntegers (unsigned integers) over MethodChannels, example (see composingBase, etc): https://github.com/flutter/engine/blob/ab745140cd30bb9a85a7f59c641fad75d0d707be/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm#L590-L610 As long as the concrete NSUInteger value fits into a dart int (which is always signed) everything works out fine. If the NSUInteger exceeds that range (e.g. when you transfer NSUIntegerMax), it gets funky: The MethodChannel in question (`flutter/textinput`) uses the FlutterJSONMethodCodec and Apple's NSJSONSerialization has no problem representing that large integer as a String in the json. On The Flutter framework side, the JsonDecoder realizes that it cannot represent that large integer as a dart int and instead silently decodes it into a double in the resulting Map<String, dynamic>. This is problematic, because the framework really expects int values in these places: https://github.com/flutter/flutter/blob/b2497822e84f18f543a8dd6eaaa34977c04054d2/packages/flutter/lib/src/services/text_input.dart#L504-L518 https://github.com/flutter/flutter/blob/387f885481cd8441237680de0cfcd0802c0af48c/packages/flutter/lib/src/services/text_editing.dart#L21-L25 Interestingly, when the double from the Map<String, dynamic> is assigned to the int of TextRange the exception that should be thrown there is swallowed. It doesn't appear in any log. (This needs more investigation to figure out where the exception goes). Switching the FlutterJSONMethodCodec to a FlutterStandardMethodCodec also doesn't help as that one doesn't support NSUIntegers at all and just transfers them as signed integers (NSUIntegerMax is therefore transferred as -1). It seems like we just shouldn't be using NSUIntegers for things that go over the method channel. Even if we fix the MethodCodecs to deal with them properly, we can't represent them as dart ints in the framework.
framework,engine,P2,team-engine,triaged-engine
low
Minor
476,085,231
pytorch
Failed to build pytorch ...
```console TORCH_CUDA_ARCH_LIST="5.2" BUILD_BINARY=1 USE_TENSORRT=1 BUILD_CUSTOM_PROTOBUF=0 USE_GLOO_IBVERBS=1 NAMEDTENSOR_ENABLED=1 BUILD_TEST=1 USE_MKLDNN=1 FULL_CAFFE2=1 python setup.py build ``` ```console -- Could NOT find CUB (missing: CUB_INCLUDE_DIR) ``` ... ```console -- Excluding image processing operators due to no opencv -- Excluding video processing operators due to no opencv ``` ... ```console -- Configuring done CMake Error: Error required internal CMake variable not set, cmake may not be built correctly. Missing variable is: CMAKE_CUDA_COMPILE_WHOLE_COMPILATION CMake Error: Error required internal CMake variable not set, cmake may not be built correctly. Missing variable is: CMAKE_CUDA_COMPILE_WHOLE_COMPILATION terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid Traceback (most recent call last): File "setup.py", line 748, in <module> build_deps() File "setup.py", line 321, in build_deps cmake=cmake) File "....../pytorch/tools/build_pytorch_libs.py", line 61, in build_caffe2 rerun_cmake) File "....../pytorch/tools/setup_helpers/cmake.py", line 312, in generate self.run(args, env=my_env) File "....../pytorch/tools/setup_helpers/cmake.py", line 133, in run check_call(command, cwd=self.build_dir, env=env) File "/usr/lib/python3.7/subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '-GNinja', '-DBUILD_BINARY=1', '-DBUILD_CUSTOM_PROTOBUF=0', '-DBUILD_PYTHON=True', '-DBUILD_TEST=True', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_CXX_FLAGS= ', '-DCMAKE_C_FLAGS= ', '-DCMAKE_EXE_LINKER_FLAGS=', '-DCMAKE_INSTALL_PREFIX=....../pytorch/torch', '-DCMAKE_PREFIX_PATH=/usr/lib/python3/dist-packages', '-DCMAKE_SHARED_LINKER_FLAGS=', '-DINSTALL_TEST=True', '-DNUMPY_INCLUDE_DIR=/home/lvision/.local/lib/python3.7/site-packages/numpy/core/include', '-DPYTHON_EXECUTABLE=/usr/bin/python', '-DPYTHON_INCLUDE_DIR=/usr/include/python3.7m', '-DPYTHON_LIBRARY=/usr/lib/libpython3.7m.so.1.0', '-DTORCH_BUILD_VERSION=1.2.0a0+acc5ced', '-DUSE_CUDA=True', '-DUSE_DISTRIBUTED=True', '-DUSE_GLOO_IBVERBS=1', '-DUSE_MKLDNN=1', '-DUSE_NUMPY=True', '-DUSE_SYSTEM_EIGEN_INSTALL=OFF', '-DUSE_TENSORRT=1', '-DUSE_GLOO_IBVERBS=1', '-DUSE_IBVERBS=1', '....../pytorch']' died with <Signals.SIGABRT: 6>. ```
module: build,triaged
low
Critical
476,088,709
ant-design
Adding to the ValidateFieldOptions type to support the async-validator 1.11.3 addition of the suppressWarning option
- [ ] 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? This keeps ant-design in line with async-validator and removes those console warnings, particularly when testing, that pop up when a form is submitted with un-validated fields. ### What does the proposed API look like? This is only a small change adding an optional property to the ValidateFieldOptions Type. components/form/Form.tsx - immediately after line 134: ```javascript /** async-validator: suppressWarning option */ suppressWarning?: boolean; ``` components/form/index.en-US.md - immediately after line 121: ```markdown | options.suppressWarning | Set to `true` to remove async-validator warnings when fields fail validation on submission | boolean | false | 3.9.3 | ``` And my Chinese is rusty (read non-existent) components/form/index.zh-CN.md - immediately after line 124: ```markdown | options.suppressWarning | 调成 `true` 去除 async-validator 字段在提交时验证失败时发出警告 | boolean | false | 3.9.3 | ``` As for the version numbers in each of the markdown files I'd suppose that they would need to be updated in line with what version number was used. <!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Inactive
low
Major
476,097,940
pytorch
nn.Module.forward signature with **kwargs
Hi there! The other day I was working on improving `utils.checkpoint` module and I found out there is no way right now to pass `**kwargs `to checkpointed function. This is probably in order to by compliant with the `nn.Module.forward` method. Now, I could not think about any argument against having `**kwargs` in `forward` method and many people overload this method with `**kwargs` because it is nice and lit :) I was about to change it and create pull request but before I do it I decided to go smart and ask you guys if there is some obvious reason why we should not do it. Otherwise, I am more than happy to start working on it. Thanks :- )
module: checkpoint,module: nn,triaged,enhancement
low
Major
476,122,888
neovim
unibi_from_term called twice (via libtermkey and neovim)
When looking into https://github.com/neovim/neovim/issues/9071 I've found that `unibi_from_term` gets called twice usually: https://github.com/neovim/libtermkey/blob/b7fe3af141c53cce71a244282b69ea860452120a/driver-ti.c#L413 https://github.com/neovim/neovim/blob/b92a5bc3c4bdfddfc21638556ace6ef3fd90155c/src/nvim/tui/tui.c#L230 Given that it pokes at the file system etc it might be nice if this could be done only once, e.g. by re-using the information from libtermkey, or passing the information from Neovim to libtermkey (but currently libtermkey gets it first).
performance,tui,complexity:low
low
Major
476,164,104
angular
A proposal to improve ReactiveFormsModule
# 🚀 feature request ### Relevant Package This Proposal is for @angular/forms ### Description The ReactiveFormsModule is pretty good, but it has a number of problems. 1. The module is not strongly typed - See issues #13721 #27389 #27665 #25824 #20040 #17000 #16999 #16933 relating to controls - See issues #31801 #19340 #19329 relating to ControlValueAccessor 2. It’s relatively complicated to display error messages, given how fundamental this task is. See #25824 #24981 #22319 #21011 #2240 #9121 #18114 3. The methods for adding errors are inflexible. It is difficult to interface with async services to display errors (hence the need for different update strategies like on `blur` / on `submit`). In general, working with errors is more difficult than it should be. - See #31105 #29275 #26683 #23484 #20371 #17090 #13920 #9119 #6895 #19851 #18871 #10530 #6170. 4. Numerous annoyances with unfortunate API decisions. - You can't bind a single form control to multiple inputs without ControlValueAccessor #14451 - Can't store arbitrary metadata on a control #19686 - Calling `reset()` doesn't actually reset the control to its initial value #20214 #19747 #15741 #19251 - Must call `markAsTouched()` / `markAsUntouched()` instead of simply `markTouched(boolean)`, which is more programmatically friendly #23414 #23336 - Creating custom form components is relatively complex #12248 - etc. #11447 #12715 #10468 #10195 #31133 5. In addition to all the issues dealing with errors (`#3` above), the API does not offer low level programmatic control and can be frustratingly not extensible. - See issues #3009 #20230 related to parsing/formatting user input - See issues #31046 #24444 #10887 #30610 relating to touched/dirty/etc flag changes - See issues #30486 #31070 #21823 relating to the lack of ng-submitted change tracking - Ability to remove FormGroup control without emitting event #29662 - Ability to subscribe to FormGroup form control additions / removals #16756 - Ability to mark ControlValueAccessor as untouched #27315 - Provide ControlValueAccessors for libraries other than `@angular/forms` #27672 ### Describe the solution you'd like Fundamentally, the existing `AbstractControl` class does not offer the extensibility / ease of use that such an important object should have. This is a proposal to re-think the design of `AbstractControl` for inclusion in an eventual `ReactiveFormsModule2`. In general, it addresses points 1, 3, 4, and 5, above. - Code for this proposal can be found in [this github repo](https://github.com/thefliik/reactive-forms-2-proposal). - This proposal is demostrated in [this Stackblitz project](https://stackblitz.com/github/thefliik/reactive-forms-2-proposal). - The demo also contains an example compatibility directive, letting the new `AbstractControl` be used with existing angular forms components (such as Angular Material components). - A prototype module of the proposal has been published at `reactive-forms-module2-proposal` *this is just suitable for experimentation!* - The proposed interface is shown below. - **The focus of this proposal is on the API of AbstractControl, not the specific implementation I've created.** ### [I wrote a blog post about this issue](https://medium.com/angular-in-depth/a-proposal-to-improve-angulars-reactiveformsmodule-323594fe2d74) ### Overview: The new `AbstractControl` class has a `source: ControlSource<PartialControlEvent>` property which is the source of truth for all operations on the AbstractControl. The `ControlSource` is just a modified rxjs `Subject`. Internally, output from `source` is piped to the `events` observable, which performs any necessary actions to determine the new `AbstractControl` state before emitting a `ControlEvent` object. This means that subscribing to the `events` observable will get you all changes to the `AbstractControl`. Below are a few somewhat advanced examples of the benefits / flexibility of this new API (there are [additional examples on stackblitz](https://stackblitz.com/github/thefliik/reactive-forms-2-proposal)). Because `AbstractControl` is abstract (and cannot be instantiated), these example use a simple `FormControl` object that looks like so: ```ts class FormControl<Value = any, Data = any> implements AbstractControl< Value, Data > {} ``` #### Example 0: the new API is similar to the old API To begin, the new API should be very familiar to users of the old API. ```ts const validatorFn: ValidatorFn = control => typeof control.value === 'string' ? null : {invalidValue: true}; const control = new FormControl('', { validators: validatorFn, }); control.setValidators(null); control.value; // "" // get current value and also changes control.observe('value').subscribe(value => { // do stuff ... }); // just subscribe to changes control.observeChanges('errors').subscribe(errors => { // do stuff ... }); control.setValue('string'); control.touched; // false control.markTouched(true); // etc... ``` #### Example 1: linking one FormControl to another FormControl Here, by subscribing the source of `controlB` to the events of `controlA`, `controlB` will reflect all changes to `controlA`. ```ts const controlA = new FormControl(); const controlB = new FormControl(); controlA.events.subscribe(controlB.source); ``` Multiple form controls can also be linked to each other, meaning that all changes to one will be applied to the others. Because changes are keyed to source ids, this does not cause an infinite loop (as can be seen in the stackblitz example). ```ts controlA.events.subscribe(controlB.source); controlB.events.subscribe(controlA.source); controlC.events.subscribe(controlA.source); controlA.events.subscribe(controlC.source); ``` #### Example 2: subscribe to a nested property of a FormGroup Here, we subscribe to validity changes of the `firstName` control of a nested form group. Everything is properly typed: ```ts const formGroup = new FormGroup({ userId: new FormControl(1), people: new FormArray([ new FormGroup({ id: new FormControl(1), firstName: new FormControl('John'), }), ]), }); formGroup .observe('controls', 'people', 'controls', 0, 'controls', 'firstName', 'valid') .subscribe(valid => { // ... do stuff; }) ``` Importantly, this subscription will also emit if the validity changes because a control is replaced or removed. For example, if the `FormArray` has the `FormGroup` at index `0` removed, then this subscription will emit `undefined`. If a new `FormGroup` is later added at index `0`, the subscription will emit to reflect the new `firstName` control's `valid` property. This also allows us to subscribe to changes to the `controls `property of a form group, to be made aware of control additions / removals (or any other property of an AbstractControl). #### Example 3: dynamically parse a control's text input Here, a user is providing `string` date values and we want a control with javascript `Date` objects. We create two controls, one for holding the `string` values and the other for holding the `Date` values and we sync all changes between them. However, value changes from one to the other are transformed to be in the appropriate format. As with the other examples, [demoing this on stackblitz](https://stackblitz.com/github/thefliik/reactive-forms-2-proposal?file=src%2Fapp%2Fexamples%2F03-example-three%2Fexample-three.component.ts) might be helpful. ```ts declare const stringDateValidator: ValidatorFn; declare const stringToDate: (value: string) => Date | null; declare const dateToString: (value: Date | null) => string; class ExampleThreeComponent implements OnInit { inputControl = new FormControl('', { validators: stringDateValidator, }); dateControl = new FormControl<Date | null>(null); ngOnInit() { this.inputControl.events .pipe( map(event => { if (event.type === 'StateChange' && event.changes.has('value')) { const changes = new Map(event.changes); changes.set('value', stringToDate(changes.get('value')); return { ...event, changes, }; } return event; }), ) .subscribe(this.dateControl.source); this.dateControl.events .pipe( map(event => { if (event.type === 'StateChange' && event.changes.has('value')) { const changes = new Map(event.changes); changes.set('value', dateToString(changes.get('value')); return { ...event, changes, }; } return event; }), ) .subscribe(this.inputControl.source); } } ``` To make things easier, the `FormControlDirective` / `FormControlNameDirective` / etc directives allow users to inject a `ValueMapper` object. This value mapper has `toControl` and `toAccessor` transform functions which will transform the control and input values, respectively. Optionally, you can also provide a `accessorValidator` function which validates the input values before they are transformed. Usage is like: ```html <input [formControl]="controlA" [formControlValueMapper]="{ toControl: stringToDate, toAccessor: dateToString, accessorValidator: dateValidatorFn }" /> ``` This hypothetical example transforms input string values into javascript `Date` objects (this can also be seen on stackblitz in `example-three`). #### Example 4: validating the value of an AbstractControl via a service Here, a `usernameControl` is receiving text value from a user and we want to validate that with an external service (e.g. "does the username already exist?"). ```ts const usernameControl = new FormControl(); // here we want to always receive value updates, even if they were made with "noEmit" usernameControl.validationEvents .pipe( filter(event => event.label === "End"), tap(() => this.usernameControl.markPending(true, { source: 'userService'})), debounceTime(500), switchMap(event => this.userService.doesNameExist(event.controlValue)), tap(() => this.usernameControl.markPending(false, { source: 'userService'})), ) .subscribe(response => { const errors = response.payload ? { userNameExists: true } : null; this.usernameControl.setErrors(errors, { source: 'userService', }); }); ``` Some things to note in this example: 1. The API allows users to associate a call to `markPending()` with a specific key (in this case "userService"). This way, calling `markPending(false)` elsewhere (e.g. a different service validation call) will not prematurely mark _this_ service call as "no longer pending". The AbstractControl is pending so long as any `key` is true. 2. Internally, errors are stored associated with a source. In this case, the source is `'userService'`. If this service adds an error, but another service later says there are no errors, that service will not accidentally overwrite this service's error. 1. Importantly, the `errors` property combines all errors into one object. #### Example 5: using dependency injection to dynamically add new validator functions to a control In the _existing_ `ReactiveFormsModule`, when you pass a control to a `FormControlDirective` via `[formControl]`, that directive may dynamically add validator functions to the control. It does this by creating a new validator function which combines the control's existing validator function(s) with any additional validator functions the `FormControlDirective` has had injected. It then replaces the control's existing validator function with the new one. This process is complex and can lead to bugs. For example, after this process is complete there isn't any way to determine which validator functions were added by the user vs which ones were added dynamically. Here, validators are internally stored keyed to a source id (similar to errors). If a FormControl is passed to a directive which dynamically injects additional validator functions, those functions will be stored separately from the FormControl's other functions (and are deleted separately). This leads to more consistent, predictable behavior that an unknowledgeable user cannot mess with. ```ts @Directive({ selector: 'myControlDirective', }) class MyControlDirective { static id = 0; @Input('myControlDirective') control: AbstractControl; private id = Symbol(`myControlDirective ${MyControlDirective.id}`); constructor( @Optional() @Self() @Inject(NG_VALIDATORS_2) private validators: ValidatorFn[] | null, ) { MyControlDirective.id++; } ngOnChanges(changes: SimpleChanges) { if (changes.control.previousValue) { // clear injected validators from the old control const oldControl = changes.control.previousValue; oldControl.setValidators(null, { source: this.id, }); } // add injected validators to the new control this.control.setValidators(this.validators, { source: this.id, }); } } ``` ### The interface ```ts interface AbstractControl<Value = any, Data = any> { /** * The ID is used to determine where StateChanges originated, * and to ensure that a given AbstractControl only processes * values one time. */ readonly id: ControlId; data: Data; /** * **Warning!** Do not use this property unless you know what you are doing. * * A control's `source` is the source of truth for the control. Events emitted * by the source are used to update the control's values. By passing events to * this control's source, you can programmatically control every aspect of * of this control. * * Never subscribe to the source directly. If you want to receive events for * this control, subscribe to the `events` observable. */ source: ControlSource<PartialControlEvent>; /** An observable of all events for this AbstractControl */ events: Observable<ControlEvent & { [key: string]: any }>; readonly value: DeepReadonly<Value>; readonly errors: ValidationErrors | null; /** * A map of validation errors keyed to the source which added them. */ readonly errorsStore: ReadonlyMap<ControlId, ValidationErrors>; readonly disabled: boolean; readonly enabled: boolean; readonly valid: boolean; readonly invalid: boolean; readonly pending: boolean; /** * A map of pending states keyed to the source which added them. * So long as there are any `true` boolean values, this control's * `pending` property will be `true`. */ readonly pendingStore: ReadonlyMap<ControlId, true>; readonly status: 'DISABLED' | 'PENDING' | 'VALID' | 'INVALID'; /** * focusChanges allows consumers to be notified when this * form control should be focused or blurred. */ focusChanges: Observable<boolean>; /** * These are special, internal events which signal when this control is * starting or finishing validation. * * These events are not emitted from the `events` observable. */ validationEvents: Observable<ValidationEvent>; readonly readonly: boolean; readonly submitted: boolean; readonly touched: boolean; readonly changed: boolean; readonly dirty: boolean; /** * A map of ValidatorFn keyed to the source which added them. * * In general, users won't need to access this. But it is exposed for * advanced usage. */ readonly validatorStore: ReadonlyMap<ControlId, ValidatorFn>; /** * ***Advanced API*** * * The "atomic" map is used by controls + parent ControlContainers to ensure * that parent/child state changes happen atomically before any events are * emitted. */ readonly atomic: Map<ControlId, (event: ControlEvent) => (() => void) | null>; [AbstractControl.ABSTRACT_CONTROL_INTERFACE](): this; observeChanges<T = any>( props: string[], options?: { ignoreNoEmit?: boolean }, ): Observable<T>; observeChanges<A extends keyof this>( a: A, options?: { ignoreNoEmit?: boolean }, ): Observable<this[A]>; observeChanges<A extends keyof this, B extends keyof this[A]>( a: A, b: B, options?: { ignoreNoEmit?: boolean }, ): Observable<this[A][B] | undefined>; observe<T = any>( props: string[], options?: { ignoreNoEmit?: boolean }, ): Observable<T>; observe<A extends keyof this>( a: A, options?: { ignoreNoEmit?: boolean }, ): Observable<this[A]>; observe<A extends keyof this, B extends keyof this[A]>( a: A, b: B, options?: { ignoreNoEmit?: boolean }, ): Observable<this[A][B] | undefined>; equalValue(value: Value): value is Value; setValue(value: Value, options?: ControlEventOptions): void; patchValue(value: any, options?: ControlEventOptions): void; /** * If provided a `ValidationErrors` object or `null`, replaces the errors * associated with the source ID. * * If provided a `Map` object containing `ValidationErrors` keyed to source IDs, * uses it to replace the `errorsStore` associated with this control. */ setErrors( value: ValidationErrors | null | ReadonlyMap<ControlId, ValidationErrors>, options?: ControlEventOptions, ): void; /** * If provided a `ValidationErrors` object, that object is merged with the * existing errors associated with the source ID. If the error object has * properties containing `null`, errors associated with those keys are deleted * from the `errorsStore`. * * If provided a `Map` object containing `ValidationErrors` keyed to source IDs, * that object is merged with the existing `errorsStore`. */ patchErrors( value: ValidationErrors | ReadonlyMap<ControlId, ValidationErrors>, options?: ControlEventOptions, ): void; markTouched(value: boolean, options?: ControlEventOptions): void; markChanged(value: boolean, options?: ControlEventOptions): void; markReadonly(value: boolean, options?: ControlEventOptions): void; markSubmitted(value: boolean, options?: ControlEventOptions): void; markPending( value: boolean | ReadonlyMap<ControlId, true>, options?: ControlEventOptions, ): void; markDisabled(value: boolean, options?: ControlEventOptions): void; focus(value?: boolean, options?: ControlEventOptions): void; setValidators( value: | ValidatorFn | ValidatorFn[] | null | ReadonlyMap<ControlId, ValidatorFn>, options?: ControlEventOptions, ): void; /** * Returns an observable of this control's state in the form of * StateChange objects which can be used to make another control * identical to this one. This observable will complete upon * replaying the necessary state changes. */ replayState(options?: ControlEventOptions): Observable<ControlEvent>; /** * A convenience method for emitting an arbitrary control event. */ emitEvent< T extends PartialControlEvent = PartialControlEvent & { [key: string]: any } >( event: Partial< Pick<T, 'id' | 'meta' | 'source' | 'processed' | 'noEmit' | 'meta'> > & Omit<T, 'id' | 'meta' | 'source' | 'processed' | 'noEmit' | 'meta'> & { type: string; }, ): void; } interface PartialControlEvent { id?: string; source: ControlId; readonly processed: ControlId[]; type: string; meta?: { [key: string]: any }; noEmit?: boolean; } interface ControlEvent extends PartialControlEvent { id: string; meta: { [key: string]: any }; } ``` ### Wrapping up There's a lot packed in to this API update. For a full overview, you should [check out the repo](https://github.com/thefliik/reactive-forms-2-proposal). Two other details to note: 1. When you pass the `noEmit` option to a function, that squelches emissions from any `observe` and `observeChanges` observables, but it does not effect the `events` observable. This is a good thing. It means that library authors can hook into the pure stream of control events on an AbstractControl and choose to honor or ignore `noEmit` as appropriate (via an observable operator like `filter()`). 2. All methods that will emit offer a `meta` option that accepts an arbitrary metadata object that will be included in the control event object. This greatly increases customizability / extensibility, as you can attach custom information to any action and access that custom information on the ControlEvent objects. ### Things not included in this proposal #### Validation A lot of the issues with the current FormControl API are ultimately issues with the current `ValidatorFn` / `ValidationErrors` API. Examples include: 1. If a control is required, a `[required]` attribute is not automatically added to the appropriate element in the DOM. 1. Similarly, other validators should also include DOM changes (e.g. a maxLength validator should add a `[maxlength]` attribute for accessibility, there are ARIA attributes which should be added for accessibility, etc). 2. If you validate to make sure an input is a `number`, it's appropriate to add a `type="number"` attribute on the underlying `<input>`. 2. Generating and displaying error messages is much harder than it should be, for such a fundamental part a Forms API. Ultimately, I see these as failings of the current `ValidatorFn` / `ValidationErrors` API, and should be addressed in a fix to that API. Any such fix should be included in any `ReactiveFormsModule2`, but they should be discussed in a separate issue. #### ControlValueAccessor This proposal does not touch ControlValueAccessor and this proposal works with the existing ControlValueAccessor API. This decision was again made to focus discussion on AbstractControl. This being said, this API allows for the `ControlValueAccessor` interface to be changed to simply: ```ts interface ControlAccessor<T extends AbstractControl = AbstractControl> { control: T; } ``` _You can see an example of this [in the repo](https://github.com/thefliik/reactive-forms-2-proposal)._ **I mention this possible change to ControlValueAccessor mainly as a way of highlighting how flexible/powerful this new AbstractControl API is.** With this update to ControlValueAccessor, the `control` property of a directive contains an `AbstractControl` representing the form state of the directive (as a reminder, components are directives). Broadly speaking, this ControlAccessor API has several advantages over the current ControlValueAccessor API: 1. Easier to implement - When the form is touched, mark the control as touched. - When the form value is updated, `setValue` on the control. - etc 2. Easier to conceptualize (admittedly subjective) 3. Allows a `ControlValueAccessor` to represent a `FormGroup` / `FormArray` / etc, rather than just a `FormControl`. - A ControlValueAccessor can represent an `address` using a FormGroup. - A ControlValueAccessor can represent `people` using a FormArray. - etc 4. Very flexible - You can pass metadata tied to changes to the ControlValueAccessor via the `meta` option found on the new `AbstractControl`. - You can create custom `ControlEvent` events for a `ControlValueAccessor`. - If appropriate, you can access the current form state of a `ControlValueAccessor` via a standard interface (and you can use the `replayState()` method to apply that state to another AbstractControl) - If appropriate, a `ControlValueAccessor` could make use of a custom object extending `AbstractControl`. In terms of specifics, this `ControlValueAccessor` change is made possible because this new API allows you to make two form controls identical (via `replayState()`) and to link two form controls so they maintain identical states. This means that, in cases where a directive/component is receiving an AbstractControl as some sort of input, you can easily create a readonly reference control which represents the current input control's state. For example, where before in ngOnChanges you might have this (and consumers of `MyComponent` would need to deal with changes to `control`): ```ts export class MyComponent { @Input('providedControl') control: FormControl; } ``` With the new API you can have: ```ts export class MyComponent { @Input() providedControl: FormControl; readonly control = new FormControl(); ngOnChanges() { this.subscriptions.forEach(s => s.unsubscribe()); this.subscriptions = []; this.subscriptions.push( concat( this.providedControl.replayState(), this.providedControl.events, ).subscribe(this.control.source), this.control.events.subscribe(this.providedControl.source); ) } } ``` Notice that this version insulates consumers of your directive/component from changes to the `providedControl`, allowing them to interface with a static (readonly) reference control. While this might seem like a small difference, the ability to have static references to controls ends up being a pretty big deal in terms of user-friendliness. For example, if you inject `NgFormControlDirective` into your component, you don't need to deal with changes to the `formControl` property of the `NgFormControlDirective`. You can simply subscribe to `NgFormControlDirective#control` and know that that control will always have the same state as `NgFormControlDirective#formControl`. There is a [blog post](https://medium.com/angular-in-depth/a-proposal-to-improve-angulars-reactiveformsmodule-323594fe2d74) which goes into greater detail showing how this updated `ControlAccessor` would work. ### Describe alternatives you've considered While fixing the existing `ReactiveFormsModule` is a possibility, it would involve many breaking changes. As `Renderer` -> `Renderer2` has shown, a more user friendly solution is to create a new `ReactiveFormsModule2` module, depricate the old module, and provide a compatibility layer to allow usage of the two side-by-side.
area: forms,needs: discussion
high
Critical
476,204,640
storybook
CLI argument to open storybook to a specific story
**Is your feature request related to a problem? Please describe.** I am frustrated when I have to search for the story I am looking for among the 1000 stories my storybook has. **Describe the solution you'd like** A CLI argument that would allow the storybook command to open to an existing story. **Describe alternatives you've considered** We could instead filter stories that open. We would not have to search **Are you able to assist bring the feature to reality?** I can cook up a pull request but it might take time **Additional context** What would be even better would be integration with IDEs and code editors (VSCode, Atom, WebStrorm)?
feature request,cli
medium
Major
476,205,839
scrcpy
create shortcut for apps
hi is it possible to create shortcut for apps so that when you click on the shortcut directly opens a specific app like this ![Capture](https://user-images.githubusercontent.com/53616429/62376835-3d2bd180-b54a-11e9-90cb-24e1b27c433f.PNG) sorry for my english
feature request
low
Minor
476,214,239
rust
Allow `cfg(target="..")`
Looks like right now it's impossible to match on target triplet directly in `cfg` expressions. [Example](https://play.rust-lang.org/?version=nightly&mode=release&edition=2018&gist=d813a8c4576912ff2175eb4156f59606) (compile to WASM). Is it intentional?
A-cross,T-lang,C-feature-request
low
Minor
476,215,249
godot
C#/Mono Project don't run
**Godot version:** 3.1.1 Mono version **OS/device including version:** Fedora Linux 30 x64 Mono 6.0.0 x64 Msbuild 16.0.0.0 for Mono **Issue description:** I run the project using a C# script and not build. ``` [leonardo@fedora-notebook Godot_v3.1.1-stable_mono_x11_64]$ DRI_PRIME=1 ./Godot_v3.1.1-stable_mono_x11.64 OpenGL ES 3.0 Renderer: Radeon 500 Series (POLARIS12, DRM 3.30.0, 5.1.20-300.fc30.x86_64, LLVM 8.0.0) Mono: Logfile is: /home/leonardo/.local/share/godot/mono/mono_logs/2019_08_02 11.40.00 (25333).txt Editing project: /home/leonardo/testec (::home::leonardo::testec) OpenGL ES 3.0 Renderer: Radeon 500 Series (POLARIS12, DRM 3.30.0, 5.1.20-300.fc30.x86_64, LLVM 8.0.0) Mono: Logfile is: /home/leonardo/.local/share/godot/mono/mono_logs/2019_08_02 11.40.03 (25355).txt [leonardo@fedora-notebook Godot_v3.1.1-stable_mono_x11_64]$ Running: "/usr/bin/msbuild" "/home/leonardo/testec/testec.sln" /v:normal /t:Build "/p:Configuration=Tools" "/l:GodotSharpTools.Build.GodotBuildLogger,/home/leonardo/Programas/Godot_v3.1.1-stable_mono_x11_64/GodotSharp/Tools/GodotSharpTools.dll;/home/leonardo/.local/share/godot/mono/build_logs/2b9fc6edcc09ede0285a36ed243eea5f_Tools" ;1RMSBUILD : error MSB1025: Falha interna durante a execução do MSBuild. System.IO.IOException: Invalid handle to path "/home/leonardo/testec/[Unknown]" at System.IO.FileStream.ReadData (System.Runtime.InteropServices.SafeHandle safeHandle, System.Byte[] buf, System.Int32 offset, System.Int32 count) [0x0002d] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.FileStream.ReadInternal (System.Byte[] dest, System.Int32 offset, System.Int32 count) [0x00026] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.FileStream.Read (System.Byte[] array, System.Int32 offset, System.Int32 count) [0x000a1] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.StreamReader.ReadBuffer () [0x000b3] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.StreamReader.Read () [0x00028] in <5994468181014a05b48ecbf866f95378>:0 at System.TermInfoDriver.GetCursorPosition () [0x00048] in <5994468181014a05b48ecbf866f95378>:0 at System.TermInfoDriver.Init () [0x002dc] in <5994468181014a05b48ecbf866f95378>:0 at System.ConsoleDriver.Init () [0x00000] in <5994468181014a05b48ecbf866f95378>:0 at System.Console.add_CancelKeyPress (System.ConsoleCancelEventHandler value) [0x00007] in <5994468181014a05b48ecbf866f95378>:0 at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x00075] in <bfc1a6800805411fb2f459e7ffe3c4e3>:0 Unhandled Exception: System.IO.IOException: Invalid handle to path "/home/leonardo/testec/[Unknown]" at System.IO.FileStream.ReadData (System.Runtime.InteropServices.SafeHandle safeHandle, System.Byte[] buf, System.Int32 offset, System.Int32 count) [0x0002d] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.FileStream.ReadInternal (System.Byte[] dest, System.Int32 offset, System.Int32 count) [0x00026] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.FileStream.Read (System.Byte[] array, System.Int32 offset, System.Int32 count) [0x000a1] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.StreamReader.ReadBuffer () [0x000b3] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.StreamReader.Read () [0x00028] in <5994468181014a05b48ecbf866f95378>:0 at System.TermInfoDriver.GetCursorPosition () [0x00048] in <5994468181014a05b48ecbf866f95378>:0 at System.TermInfoDriver.Init () [0x002dc] in <5994468181014a05b48ecbf866f95378>:0 at System.ConsoleDriver.Init () [0x00000] in <5994468181014a05b48ecbf866f95378>:0 at System.Console.add_CancelKeyPress (System.ConsoleCancelEventHandler value) [0x00007] in <5994468181014a05b48ecbf866f95378>:0 at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x00418] in <bfc1a6800805411fb2f459e7ffe3c4e3>:0 at Microsoft.Build.CommandLine.MSBuildApp.Main () [0x00028] in <bfc1a6800805411fb2f459e7ffe3c4e3>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.IOException: Invalid handle to path "/home/leonardo/testec/[Unknown]" at System.IO.FileStream.ReadData (System.Runtime.InteropServices.SafeHandle safeHandle, System.Byte[] buf, System.Int32 offset, System.Int32 count) [0x0002d] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.FileStream.ReadInternal (System.Byte[] dest, System.Int32 offset, System.Int32 count) [0x00026] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.FileStream.Read (System.Byte[] array, System.Int32 offset, System.Int32 count) [0x000a1] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.StreamReader.ReadBuffer () [0x000b3] in <5994468181014a05b48ecbf866f95378>:0 at System.IO.StreamReader.Read () [0x00028] in <5994468181014a05b48ecbf866f95378>:0 at System.TermInfoDriver.GetCursorPosition () [0x00048] in <5994468181014a05b48ecbf866f95378>:0 at System.TermInfoDriver.Init () [0x002dc] in <5994468181014a05b48ecbf866f95378>:0 at System.ConsoleDriver.Init () [0x00000] in <5994468181014a05b48ecbf866f95378>:0 at System.Console.add_CancelKeyPress (System.ConsoleCancelEventHandler value) [0x00007] in <5994468181014a05b48ecbf866f95378>:0 at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x00418] in <bfc1a6800805411fb2f459e7ffe3c4e3>:0 at Microsoft.Build.CommandLine.MSBuildApp.Main () [0x00028] in <bfc1a6800805411fb2f459e7ffe3c4e3>:0 ERROR: call_build: A Godot Engine build callback failed. At: editor/editor_node.cpp:4666. WARNING: cleanup: ObjectDB Instances still exist! At: core/object.cpp:2095. ERROR: cleanup: There are still MemoryPool allocs in use at exit! At: core/pool_vector.cpp:70. ``` **Steps to reproduce:** You have to execute Godot by command line, and then run the C# project with the play button. **Minimal reproduction project:** [testec.zip](https://github.com/godotengine/godot/files/3461690/testec.zip)
bug,platform:linuxbsd,topic:dotnet
medium
Critical
476,229,220
scrcpy
Is there a way to capture only a frame or screenshot rather than a video stream?
I am looking for a minimalized version of what the video stream part of scrcpy does. It is apparently not so straightforward to take a screenshot of an android device outside of the android context. I imagine similar frustrations occurred while learning how to attain the video stream. Is there a way to only attain one frame or a screenshot at the time of a request?
screenshot
medium
Critical
476,242,814
rust
How to treat inert attributes on macro invocations?
Examples of inert attributes on macro invocations: ```rust #[inert] bang_macro!(); #[inert] #[attr_macro] struct S; #[inert] #[derive(DeriveMacro)] struct S; // Doc comments are also attributes (attribute literals if you wish). /// Doc. bang_macro!(); /// Doc. #[attr_macro] struct S; /// Doc. #[derive(DeriveMacro)] struct S; ``` How these attributes are treated currently (ad hoc, there's no RFC or anything): - For bang macros the attributes are thrown away (sometimes with a warning). - For attribute macros and derive macros the attributes become a part of the macro input, the attribute tokens are prepended to the tokens of the "primary" input. Effectively, `#[inert] #[macro_attr] struct S;` -> `macro_attr! { #[inert] struct S; }`. Related issues: https://github.com/rust-lang/rust/issues/61733#issuecomment-509626449.
A-frontend,A-macros,T-lang
low
Major
476,246,754
go
cmd/compile: 'internal compiler error: bvbulkalloc too big' when compiling a file containing a large map
``` $ go version go version devel +2d6ee6e89a Thu Aug 1 20:37:08 2019 +0000 linux/amd64 ``` ### Does this issue reproduce with the latest release? Yes. ### What operating system and processor architecture are you using (`go env`)? ``` $ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/jgm/.cache/go-build" GOENV="/home/jgm/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/jgm/.go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/jgm/snippets/goroot" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/jgm/snippets/goroot/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" 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-build261965408=/tmp/go-build -gno-record-gcc-switches" ``` ### What did you do? Attempting to `go build` on a file that creates a large map fails: ``` $ go build # _/home/jgm/src/go/buildfail ./signatures.go:146811:24: internal compiler error: bvbulkalloc too big: nbit=5752 count=3948889 nword=180 size=710800020 goroutine 22 [running]: runtime/debug.Stack(0xfdd400, 0xc00000e018, 0x0) /home/jgm/snippets/goroot/src/runtime/debug/stack.go:24 +0x9d cmd/compile/internal/gc.Fatalf(0xe54748, 0x36, 0xc3c222d7f8, 0x4, 0x4) /home/jgm/snippets/goroot/src/cmd/compile/internal/gc/subr.go:188 +0x291 cmd/compile/internal/gc.bvbulkalloc(0x3c415900001678, 0x89ba0, 0x89ba0, 0xc8e9cd8000, 0xc3c222d8b8) /home/jgm/snippets/goroot/src/cmd/compile/internal/gc/bv.go:34 +0x1c4 cmd/compile/internal/gc.newliveness(0xc00029e160, 0xc00029e420, 0xc0cb6c8000, 0x1678, 0x1c00, 0xc07a7bf560, 0xb3e0, 0xe3e6d1) /home/jgm/snippets/goroot/src/cmd/compile/internal/gc/plive.go:503 +0x199 cmd/compile/internal/gc.liveness(0xc02f747e60, 0xc00029e420, 0xc0a752f0a0, 0x0, 0xe3e6de, 0xd) /home/jgm/snippets/goroot/src/cmd/compile/internal/gc/plive.go:1394 +0x95 cmd/compile/internal/gc.genssa(0xc00029e420, 0xc0a752f0a0) /home/jgm/snippets/goroot/src/cmd/compile/internal/gc/ssa.go:5286 +0x92 cmd/compile/internal/gc.compileSSA(0xc00029e160, 0x3) /home/jgm/snippets/goroot/src/cmd/compile/internal/gc/pgen.go:308 +0x3c2 cmd/compile/internal/gc.compileFunctions.func2(0xc030fb5ec0, 0xc0072d7e10, 0x3) /home/jgm/snippets/goroot/src/cmd/compile/internal/gc/pgen.go:363 +0x49 created by cmd/compile/internal/gc.compileFunctions /home/jgm/snippets/goroot/src/cmd/compile/internal/gc/pgen.go:361 +0x128 ``` This contains approximately 140K additions, carried out as individual calls (rather than initialising the map during declaration). Relevant parts of code are: ``` type function struct { name string params []string } var functions map[uint32]function func InitFunctionMap() { functions = make(map[uint32]function) functions[305651098] = function{name: "decimalMul", params: []string{"uint256", "uint256"}} functions[3393457315] = function{name: "decimalDiv", params: []string{"uint256", "uint256"}} ... ``` A full copy of the file is at https://github.com/wealdtech/compilebug ### What did you expect to see? Would expect the build to complete. ### What did you see instead? Error output as above after approximately 50 minutes of building.
NeedsInvestigation,compiler/runtime
low
Critical
476,248,240
neovim
clipboard=unnamedplus : clipboard does not update during macro replay
<!-- Before reporting: search existing issues and check the FAQ. --> - `nvim --version`: v0.3.8 - `vim -u DEFAULTS` (version: 8.0) behaves differently? Yes. Hitting `<c-r>*` doesn't seem to work at all with `vim -u DEFAULTS` - Operating system/version: Macos 10.14.5 - Terminal name/version: zsh - `$TERM`: xterm-256color ### Steps to reproduce using `nvim -u NORC` - `nvim -u NORC` - Execute `:set clipboard=unnamedplus` - Add the following lines: ``` one two three ``` - Return cursor to the beginning of `one` line - Hit `qqywA <c-r>*<esc>q` to create a macro - Navigate to start of `two` line - Execute `@q` - Line should now be `two two` - Navigate to start of `three` line - Execute `:normal @q` - Line is now `three two` instead of `three three` as expected ### Actual behaviour Macros played via `:normal` do not seem to use the new yank when it is changed during the macro ### Expected behaviour Should behave similar to directly executing via `@q` and use the yank change
bug,performance,clipboard
low
Minor
476,273,816
youtube-dl
Method to allow writing of WARC file format as output.
<!-- ###################################################################### WARNING! IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE ###################################################################### --> ## Checklist <!-- Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl: - First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2019.08.02. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED. - Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates. - Finally, put x into all relevant boxes (like this [x]) --> - [ x] I'm reporting a feature request - [ x] I've verified that I'm running youtube-dl version **2019.08.02** - [ x] I've searched the bugtracker for similar feature requests including closed ones ## Description <!-- Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible. --> The Internet Archive uses youtube-dl rather extensively for youtube archiving. Great piece of software - thank you for your efforts. Being an Archive we have a specific objective which is to record the complete interaction of acquiring and saving the video. Currently we do this in a simplistic way - we get the yt url from youtube-dl and then use that url to download the video and record the complete http interaction into the WARC format (Web ARChive format). Other than providing the url yt-dl is not involved. This works in most cases but is somewhat limiting - for example - each video source requires a unique solution. A more useful scenario would enable us to easily record a WARC (Web ARChive) file regardless of the http source selected. This might be accomplished either by hooks or adding WARC output as a feature (or your preferred solution). WARC output is currently supported by curl if you wish to experiment. It is a widely excepted format and is not a complex specification. More about the Archive https://archive.org/ More info on WARC format: https://en.wikipedia.org/wiki/Web_ARChive
request
low
Critical
476,303,654
terminal
Terminal Key-Map Sets for/from iTerm & other Terminals
# Description of the new feature/enhancement > This feature request was requested by an early-adopter of Terminal at a review meeting. It'd be great if Terminal could implement a set of key-mappings that mimic most/many of iTerm's most common key-mappings. This would help users who're already familiar with iTerm We should also take a look at key mappings for other common Terminals and see if we can introduce "key-mapping sets" or preconfigured "key-maps" allowing the user to select and/or switch between key-maps on the fly, perhaps per-tab since some shells/apps/tools may be better suited to one set of key-maps than others. If other Terminals store their key-mappings in settings/config, we could even permit importing of keymaps & converting them into Terminal key-mappings. # Proposed technical implementation details (optional)
Issue-Feature,Area-Settings,Product-Terminal
low
Minor
476,317,422
go
sort: Float64Slice.Less does not treat -0 as less than +0
Using Go1.12 Consider this snippet: ```go fs := []float64{math.Copysign(0, +1), math.Copysign(0, -1)} sort.Stable(sort.Float64Slice(fs)) fmt.Println(fs) ``` This currently prints: ``` [0 -0] ``` I expected this to print: ``` [-0 0] ``` Either this case be documented or we fix the `Float64Slice.Less` method.
NeedsDecision
low
Major
476,341,440
flutter
Provide a disableSwipe to PageView
It would be nice to have a simple boolean inside `PageView` (or inside the `PageController`?) to disable the swipe. This way only the `PageController` could control which page we are showing. This is useful for onboarding forms, where we want to block the user from going forward if there any validation erros on the data he provided (empty email field etc.), and advance the user programatically when he types something right, or we enable a Next button.
c: new feature,framework,f: material design,f: scrolling,customer: crowd,c: proposal,P3,team-design,triaged-design
medium
Critical
476,355,893
go
cmd/compile: runtime.KeepAlive causes useless extra run-time overhead, even though it is an intrinsic?
<pre> $ go version go version devel +2d6ee6e89a Thu Aug 1 20:37:08 2019 +0000 linux/amd64 </pre> ### Does this issue reproduce with the latest release? Did not check. ### What operating system and processor architecture are you using (`go env`)? <details><summary><code>go env</code> Output</summary><br><pre> $ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/tmp/freedesktopCache/go-build" GOENV="/home/nsajko/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/nsajko" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/nsajko/goNew" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/nsajko/goNew/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/nsajko/goNew/src/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build460144380=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### What did you do? I converted the benchmarks of the math package from the standard library to use runtime.KeepAlive instead of package level exported sink variables [1]. The rationale was to get more accurate and more robust benchmarks. See [0] for background (the more broad motivation for this change to package math was to check if runtime.KeepAlive is a possible substitute for the proposed formallyRead builtin func). For accuracy runtime.KeepAlive should not cause a run-time overhead, which I expected to be the case. For this issue I considered and compared only the effect on BenchmarkSignbit: ``` func BenchmarkSignbit(b *testing.B) { for i := 0; i < b.N; i++ { runtime.KeepAlive(Signbit(signbitPos)) } } ``` ### What did you expect to see? I expected that if the change caused any significant performance differences, they should be speedups. This is because I expected runtime.KeepAlive not to cause a run time overhead. ### What did you see instead? In a lot of the benchmarks for the math package considerable slowdowns happened. In the following data for the changed code (with KeepAlive) one can see a weird sequence of four instructions MOVZX, LEAQ, ADDQ, MOVQ. The MOVQ writes to the stack. In essence, I think these four instruction spill to the stack the address of either the byte 0x00 or 0x01 from the runtime.staticbytes array, which seems like a useless thing to do. Here is the disassembly and performance data for BenchmarkSignbit (outputs of objdump, pprof, and radare2) before and after the change: ![CPUProfileSignbitGitMaster](https://user-images.githubusercontent.com/4944410/62397912-aae5f680-b566-11e9-9a5c-24f918c5c5a9.png) ``` TEXT math_test.BenchmarkSignbit(SB) /home/nsajko/goNew/src/math/all_test.go all_test.go:3556 0x515780 488b442408 MOVQ 0x8(SP), AX all_test.go:3556 0x515785 31c9 XORL CX, CX all_test.go:3556 0x515787 31d2 XORL DX, DX all_test.go:3556 0x515789 eb18 JMP 0x5157a3 all_test.go:3557 0x51578b f20f1005d5d91400 MOVSD_XMM math_test.signbitPos(SB), X0 unsafe.go:23 0x515793 66480f7ec3 MOVQ X0, BX signbit.go:9 0x515798 480fbae33f BTQ $0x3f, BX signbit.go:9 0x51579d 0f92c2 SETB DL all_test.go:3556 0x5157a0 48ffc1 INCQ CX all_test.go:3556 0x5157a3 48398808010000 CMPQ CX, 0x108(AX) all_test.go:3556 0x5157aa 7fdf JG 0x51578b all_test.go:3559 0x5157ac 881551841800 MOVB DL, math_test.GlobalB(SB) all_test.go:3560 0x5157b2 c3 RET Total: 540ms ROUTINE ======================== math_test.BenchmarkSignbit 540ms 740ms (flat, cum) 137.04% of Total . . 515780: MOVQ 0x8(SP), AX ;all_test.go:3556 . . 515785: XORL CX, CX . . 515787: XORL DX, DX . . 515789: JMP 0x5157a3 80ms 280ms 51578b: MOVSD_XMM math_test.signbitPos(SB), X0 ;math_test.BenchmarkSignbit all_test.go:3557 . . 515793: MOVQ X0, BX ;unsafe.go:23 180ms 180ms 515798: BTQ $0x3f, BX ;math.Signbit signbit.go:9 20ms 20ms 51579d: SETB DL 260ms 260ms 5157a0: INCQ CX ;math_test.BenchmarkSignbit all_test.go:3556 . . 5157a3: CMPQ CX, 0x108(AX) ;all_test.go:3556 . . 5157aa: JG 0x51578b . . 5157ac: MOVB DL, math_test.GlobalB(SB) ;all_test.go:3559 ┌────────────────────────────────────────────────────┐ │ [0x515780] │ │ ;-- sym.go.math_test.BenchmarkSignbit: │ │ (fcn) sym.math_test.BenchmarkSignbit 51 │ │ sym.math_test.BenchmarkSignbit (int32_t arg_8h); │ │ ; arg int32_t arg_8h @ rsp+0x8 │ │ ; [0x8:8]=-1 │ │ ; 8 │ │ mov rax, qword [arg_8h] │ │ xor ecx, ecx │ │ xor edx, edx │ │ jmp 0x5157a3 │ └────────────────────────────────────────────────────┘ v │ ┌─┘ ┌──────────────────────────┐ │ │ │ │ ┌────────────────────────────────────────────────────────────┐ │ │ 0x5157a3 [oc] │ │ │ ; CODE XREF from sym.math_test.BenchmarkSignbit (0x515789) │ │ │ ; [0x108:8]=-1 │ │ │ ; 264 │ │ │ cmp qword [rax + 0x108], rcx │ │ │ jg 0x51578b │ │ └────────────────────────────────────────────────────────────┘ │ t f │ │ │ │ ┌───────────────────┘ │ │ │ └───────────────────────────────────────────┐ │ │ │ │┌────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────┐ ││ 0x51578b [ob] │ │ 0x5157ac [od] │ ││ ; CODE XREF from sym.math_test.BenchmarkSignbit (0x5157aa) │ │ ; [0x69dc03:1]=0 │ ││ ; MOV xmm0 = [0x663168] = 0x4004000000000000 │ │ mov byte [obj.math_test.GlobalB], dl │ ││ ; [0x663168:8]=0x4004000000000000 │ │ ret │ ││ movsd xmm0, qword obj.math_test.signbitPos │ └─────────────────────────────────────────┘ ││ movq rbx, xmm0 │ ││ bt rbx, 0x3f │ ││ setb dl │ ││ inc rcx │ │└────────────────────────────────────────────────────────────┘ │ v │ │ └────┘ ``` ![CPUProfileSignbitKeepAlive](https://user-images.githubusercontent.com/4944410/62398000-f6000980-b566-11e9-8f68-2f5cb0735217.png) ``` TEXT math_test.BenchmarkSignbit(SB) /home/nsajko/goNew/src/math/all_test.go all_test.go:3442 0x515740 4883ec10 SUBQ $0x10, SP all_test.go:3442 0x515744 48896c2408 MOVQ BP, 0x8(SP) all_test.go:3442 0x515749 488d6c2408 LEAQ 0x8(SP), BP all_test.go:3443 0x51574e 488b442418 MOVQ 0x18(SP), AX all_test.go:3443 0x515753 31c9 XORL CX, CX all_test.go:3443 0x515755 eb29 JMP 0x515780 all_test.go:3444 0x515757 f20f100509ca1400 MOVSD_XMM math_test.signbitPos(SB), X0 unsafe.go:23 0x51575f 66480f7ec2 MOVQ X0, DX signbit.go:9 0x515764 480fbae23f BTQ $0x3f, DX signbit.go:9 0x515769 0f92c2 SETB DL all_test.go:3444 0x51576c 0fb6d2 MOVZX DL, DX all_test.go:3444 0x51576f 488d1d0a471500 LEAQ runtime.staticbytes(SB), BX all_test.go:3444 0x515776 4801da ADDQ BX, DX all_test.go:3444 0x515779 48891424 MOVQ DX, 0(SP) all_test.go:3443 0x51577d 48ffc1 INCQ CX all_test.go:3443 0x515780 48398808010000 CMPQ CX, 0x108(AX) all_test.go:3443 0x515787 7fce JG 0x515757 all_test.go:3443 0x515789 488b6c2408 MOVQ 0x8(SP), BP all_test.go:3443 0x51578e 4883c410 ADDQ $0x10, SP all_test.go:3443 0x515792 c3 RET Total: 820ms ROUTINE ======================== math_test.BenchmarkSignbit 820ms 970ms (flat, cum) 118.29% of Total . . 515740: SUBQ $0x10, SP ;all_test.go:3442 . . 515744: MOVQ BP, 0x8(SP) . . 515749: LEAQ 0x8(SP), BP . . 51574e: MOVQ 0x18(SP), AX ;all_test.go:3443 . . 515753: XORL CX, CX . . 515755: JMP 0x515780 120ms 270ms 515757: MOVSD_XMM math_test.signbitPos(SB), X0 ;math_test.BenchmarkSignbit all_test.go:3444 . . 51575f: MOVQ X0, DX ;unsafe.go:23 150ms 150ms 515764: BTQ $0x3f, DX ;math.Signbit signbit.go:9 . . 515769: SETB DL ;signbit.go:9 120ms 120ms 51576c: MOVZX DL, DX ;math_test.BenchmarkSignbit all_test.go:3444 10ms 10ms 51576f: LEAQ runtime.staticbytes(SB), BX 130ms 130ms 515776: ADDQ BX, DX 50ms 50ms 515779: MOVQ DX, 0(SP) 240ms 240ms 51577d: INCQ CX ;math_test.BenchmarkSignbit all_test.go:3443 . . 515780: CMPQ CX, 0x108(AX) ;all_test.go:3443 . . 515787: JG 0x515757 . . 515789: MOVQ 0x8(SP), BP . . 51578e: ADDQ $0x10, SP ┌─────────────────────────────────────────────────────┐ │ [0x515740] │ │ (fcn) sym.math_test.BenchmarkSignbit 83 │ │ sym.math_test.BenchmarkSignbit (int32_t arg_18h); │ │ ; var int32_t var_8h @ rsp+0x8 │ │ ; arg int32_t arg_18h @ rsp+0x18 │ │ sub rsp, 0x10 │ │ mov qword [var_8h], rbp │ │ ; 8 │ │ lea rbp, [var_8h] │ │ ; [0x18:8]=-1 │ │ ; 24 │ │ mov rax, qword [arg_18h] │ │ xor ecx, ecx │ │ jmp 0x515780 │ └─────────────────────────────────────────────────────┘ v │ ┌─┘ ┌───────────────┐ │ │ │ │ ┌────────────────────────────────────────────────────────────┐ │ │ 0x515780 [oc] │ │ │ ; CODE XREF from sym.math_test.BenchmarkSignbit (0x515755) │ │ │ ; [0x108:8]=-1 │ │ │ ; 264 │ │ │ cmp qword [rax + 0x108], rcx │ │ │ jg 0x515757 │ │ └────────────────────────────────────────────────────────────┘ │ t f │ │ │ │ ┌────────┘ │ │ │ └────────────────────────────────────────┐ │ │ │ │┌───────────────────────────────────────────────┐ ┌────────────────────────────┐ ││ 0x515757 [ob] │ │ 0x515789 [od] │ ││ ; MOV xmm0 = [0x662168] = 0x4004000000000000 │ │ ; [0x8:8]=-1 │ ││ ; [0x662168:8]=0x4004000000000000 │ │ ; 8 │ ││ movsd xmm0, qword obj.math_test.signbitPos │ │ mov rbp, qword [var_8h] │ ││ movq rdx, xmm0 │ │ add rsp, 0x10 │ ││ bt rdx, 0x3f │ │ ret │ ││ setb dl │ └────────────────────────────┘ ││ movzx edx, dl │ ││ ; 0x669e80 │ ││ lea rbx, obj.runtime.staticbytes │ ││ add rdx, rbx │ ││ mov qword [rsp], rdx │ ││ inc rcx │ │└───────────────────────────────────────────────┘ │ v │ │ └────┘ ``` This issue is maybe a little related: [2] An unrelated possible issue visible in the disassembly is the MOVSD_XMM followed by the MOVQ. Could those two instructions not be replaced by a single MOVQ? [0] https://github.com/golang/go/issues/33325 [1] https://go-review.googlesource.com/c/go/+/188437 [2] https://github.com/golang/go/issues/32115
NeedsDecision,compiler/runtime
low
Critical
476,363,253
pytorch
Wrong device in graph - Tensorboard SummaryWriter
## 🐛 Bug The TensorBoard graph always displays "CPU:0" as device placement. No GPU is shown. ## To Reproduce Steps to reproduce the behavior: 1. Use the `torch.utils.tensorboard.SummaryWriter` 1. Move the `model` and input data `images` to the GPU (`cuda:0`) 1. Save the graph with `writer.add_graph(model, input_to_model=images)` 1. Open TensorBoard and look at the device placement <!-- If you have a code sample, error messages, stack traces, please provide it here as well --> My implementation is simply the code of the tutorial (plus the tensorboard related code): https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#sphx-glr-beginner-blitz-cifar10-tutorial-py ## Expected behavior TensorBoard shows the correct device. ## Environment PyTorch version: 1.1.0 Is debug build: No CUDA used to build PyTorch: 10.0 OS: Microsoft Windows 10 Pro GCC version: Could not collect CMake version: Could not collect Python version: 3.7 Is CUDA available: Yes CUDA runtime version: 10.0.130 GPU models and configuration: GPU 0: GeForce GTX 1080 Nvidia driver version: 431.60 cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\cudnn64_7.dll Versions of relevant libraries: [pip3] numpy==1.17.0 [pip3] torch==1.1.0 [pip3] torchvision==0.3.0 [pip3] tensorflow==1.14.0 [conda] Could not collect ## Additional context This does not work on my local PC nor on a GPU cluster. I know that this feature is marked as `Experimental` but I don't know if this is a bug or if it is simply not implemented as of yet.
triaged,module: tensorboard
low
Critical
476,369,937
three.js
Texture SubImage Interface
The current subimage interface is a little clunky: renderer.copyTextureToTexture ( position : Vector2, srcTexture : Texture, dstTexture : Texture, level : Number ) : null This means that in order to move textures around between atlases you have to pass a reference to a renderer around. I worked with one of the original developers of OpenSceneGraph and I really liked the solution he used. The suggestion is to move the subimage interface to the texture. Each texture would have an array of SubImageData that can be appended every frame by the user when data becomes available. Subimages get applied during rendering, then the SubImageData array gets flushed. I worked up the idea in a dev build, but I'm a bit remiss to check it in because my implementation was far from perfect, and its such a small inclusion, a feature request seemed like a better way to discuss the idea. here is the code I put together: **in renderers/WebGlTextures.js:** function subImage2D( textureProperties, texture, slot ) { state.activeTexture( 33984 + slot ); state.bindTexture( 3553, textureProperties.__webglTexture ); _gl.pixelStorei( 37440, texture.flipY ); _gl.pixelStorei( 37441, texture.premultiplyAlpha ); _gl.pixelStorei( 3317, texture.unpackAlignment ); if ( texture.subImageData.length > 0 ) { _gl.bindTexture( 3553, textureProperties.__webglTexture ); for ( var i = 0; i < texture.subImageData.length; i ++ ) { var data = texture.subImageData[ i ]; var glFormat = utils.convert( data.format ); var glType = utils.convert( data.type ); _gl.texSubImage2D( 3553, data.level, data.offset[ 0 ], data.offset[ 1 ], glFormat, glType, data.pixels ); } } texture.subImageData = []; texture.needsUpdate = false; } I added another elseif in the setTexture2D: function setTexture2D( texture, slot ) { var textureProperties = properties.get( texture ); if ( texture.isVideoTexture ) updateVideoTexture( texture ); if ( texture.version > 0 && textureProperties.__version !== texture.version ) { var image = texture.image; if ( image === undefined ) { console.warn( 'THREE.WebGLRenderer: Texture marked for update but image is undefined' ); } else if ( image.complete === false ) { console.warn( 'THREE.WebGLRenderer: Texture marked for update but image is incomplete' ); } _else if(texture.subImageData.length > 0){ subImage2D(textureProperties, texture, slot); return; } else if(!texture.ignoreImage){ uploadTexture( textureProperties, texture, slot ); return; }_ } state.activeTexture( 33984 + slot ); state.bindTexture( 3553, textureProperties.__webglTexture ); } **in the texture class:** /* in the "constructor" */ this.subImageData = []; this.ignoreImage = false; /*added method*/ subImage : function(level, offsetX, offsetY, pixels, format, type){ format = format !== undefined ? format : this.format; type = type !== undefined ? type : this.type; if(type !== this.type){ console.warn('THREE.Texture.subimage: type should equal texture type, bailing'); return; } if(format !== this.format){ console.warn('THREE.Texture.subimage: format should equal texture format, bailing'); return; } /* once you subdata, you have to ignore the image that is attached to this texture seems a little clunky, but I can't think of another way to do it, unless there was a specific subImageTexture that didn't bind an image */ this.ignoreImage = true; this.subImageData.push({ level: level, offset: [offsetX,offsetY], format: format, type: type, pixels: pixels }); }, Right now I'm using this with an empty DataTexture, and append images as they come in from the server. An image gets pushed into the atlas and I'm using it like this: desTexture.subImage(0, offsetIntoDestX, offsetIntoDestY, sourceTexture);
Suggestion
low
Major
476,374,591
flutter
Change Flutter TODOs to not require a username, but to require an issue link.
The old syntax was: ``` // TODO(username): explanation, https://link/to/issue ``` But the link wasn't required. The new syntax is: ``` // TODO: explanation, https://link/to/issue ``` Where the username is optional, and the link is required.
team,framework,engine,P2,team-engine,triaged-engine
low
Critical
476,400,469
vue
Create an ".async" modifier for event handlers
### What problem does this feature solve? In an event handler, one can easily mix property modifications and method calls (which is great), as in: <span @click=" accumulator += fetchNextItem() ">do it</span> However, if the called method is async, one need to actually wrap this code in an additional method like: <span @click=" fetchAndAccumulateNextItem() ">do it </span> .... methods: { async fetchAndAccumulateNextItem() { this.accumulator += await this.fetchNextItem() }, async fetchNextItem() { .... } /* unmodified */ } This can be slightly inconvenient if there are many asynchronous methods of which we use the return value. I think this might become more and more common as people start understanding and using async/await more and more. Initial context: I have a very specific use case of a vuejs<->python bridge that makes (among other things) all the python-written method callable from vuejs, but as the call goes through websockets, all methods end up async. https://github.com/twitwi/vuejs-python ### What does the proposed API look like? I'd suggest a ".async" modifier that would allow for "await" in the event handler snippet. For the example above, it would be written as: <span @click.async=" accumulator += await fetchNextItem() ">do it</span> (this is probably useful for all types of events, not only click) <!-- generated by vue-issues. DO NOT REMOVE -->
feature request,discussion
low
Major
476,438,551
rust
Rust code copyright situation is unclear
Edit 2020/11/27 - I've updated the title of this post to reflect that Rust's copyright is generally a mess. There are links throughout this thread to further details. Original text: The COPYRIGHT file is out of date. This file extends back to the beginning of time and has rarely been updated. It mostly exists to explain that while Rust is MIT/Apache, it also includes LLVM, which has its own license. Today, the Rust distribution contains lots and lots of source code, under a wide variety of licenses. The COPYRIGHT file is quite insufficient to describe Rust's license soup. Rightfully, Rust needs to reproduce the license of all its constituent components. In the meantime though, it would not be inappropriate to just delete this file, or to replace it with simpler temporary language along the lines of "Rust is mostly Apache / MIT, but some parts have a different license. Sorry, but at this time I can't tell you exactly which, figure it out yourself. TODO FIXME YOLO" One notable aspect of this file is declaring that "portions of the FFI code for interacting with the native ABI is derived from the Clay programming language, which carries the following license." This language was added by myself from an abundance of caution with the very first x86_64 (probably) FFI commits. It is likely that the FFI source code has changed so much that it no longer carries any resemblance to the clay source code and this language can be dropped, but is probably worth investigating first. If not, then the license, which is just a 2-clause BSD with specific attribution, can be added directly to the x86_64 ffi source. Since Rust's licensing is so complex I might suggest a new solution that, instead of reproducing entire licenses, describes which source code is licensed under which license, by name, e.g. ``` - [mdbook] - [MPL2] - [openssl] - [BSD+advertising clause] - src/foo/bar/x86_64.rs - [BSD 2-clause] ... ``` A good start for creating this list is the `EXCEPTIONS` list in src/tools/tidy/deps, though it is not complete for code that is not a rust crate (LLVM isn't included). The situation is complex enough that it probably shouldn't be done manually, but tooling added to deal with it, probably building off the src/tidy tooling. It's important to be clear in any licensing documentation that the _runtime_ (std/test) is purely Apache-2.0/MIT/$OTHER_PERMISSIVE_LICENSE (i.e. _your_ code isn't "infected" by non-permissive licenses), but the tooling contains copyleft code. (Though note that per the EXCEPTIONS list, the fortanix target _does_ include MPL runtime code ...).
P-high,T-core,A-licensing
medium
Major
476,445,779
TypeScript
Cannot assign property to same type with generic key
**TypeScript Version:** 3.6.0-dev.20190803 **Search Terms:** assigning keyof generic key **Code** ```ts type A = { a: number } type B = { b: number } interface Foo { a: A b: B } declare let target: Foo declare let source: Foo declare let key: keyof Foo target[key] = source[key] ``` **Expected behavior:** I expect it to allow the assignment. Since `typeof target` and `typeof source` are the same, I expect `typeof target[key]` to always be the same as `typeof source[key]`. **Actual behavior:** > error TS2322: Type 'A | B' is not assignable to type 'A & B'. **Playground Link:** https://www.typescriptlang.org/play/#code/C4TwDgpgBAglC8UDeUCGAuKA7ArgWwCMIAnKAXwChRIoAhBZKAzXQk8iigSy2BIDNUAY2gAxAPbjkFKLLSYYMuczoVKFACYQhAG1TFoOiMCjB9Ac2OYJ4zdr0GoRkwGdxOYiOuS7u-YeMoAGsIEEwQkHF+KBtOM2JLYABtCIBdBjcPERTQ1IogA **Related Issues:** #31665 (but it was closed and the comments seem to indicate that this should work 🤔) ping @RyanCavanaugh
Suggestion,Experience Enhancement
medium
Critical
476,450,259
TypeScript
Suggestion: Use typeof of declaration to define its type
## Search Terms - infer variable declaration - typeof declaration - using typeof on current expression - apply modifier to declaration - generic declarations <!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily --> ## Suggestion <!-- A summary of what you'd like to see added or changed --> I would like to use current declaration type for modifying type of variable, I'm creating, e.g.: ```typescript const foo: Readonly<typeof var> = { bar: 'baz', } ``` Maybe, there is a better syntax, that I couldn't think of. ## Use Cases <!-- What do you want to use this for? What shortcomings exist with current approaches? --> Typescript infer rather narrow type from variable declaration by default, which is a good thing. Sometimes we want to widen it, so it can fit into our interfaces. Mostly, it can be done by simply declaring a variable of certain type. But sometimes, it's useful to create some object along the way and somehow extend it's inferred type(some libraries can export very complicated generic types, so explicitly writing them could be a pain) My specific use case was caused by reselect library, when I tried to reuse some selectors. ```typescript // typeof selectors is (selector1ReturnType | selector2ReturnType | selector3ReturnType)[] const selectors = [ state => someSelector1(state), state => someSelector2(state), state => someSelector3(state), ] ``` But this array of selectors couldn't be used in `createSelector` function, cause it is expecting a tuple of selectors, to correctly infer type of arguments of selector function. I tried to use `as const` on my declaration, but it leaded to another error, cause createSelector expects a mutable tuple(it's only a type thing, not that it really mutates the selectors, but I'm afraid, this is a really common case in all library typings, not to mark it's arguments as readonly). I also found [a solution](https://gist.github.com/jcalz/381562d282ebaa9b41217d1b31e2c211) for creating tuples with function, but I don't like the fact, that static typings require some(even tiny) runtime overhead, also the solution is not generic. For now, I ended up with something like this, using `Writable` type from [this](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html) docs: ```typescript const selectorsConst = [ state => someSelector1(state), state => someSelector2(state), state => someSelector3(state), ] as const const selectors: Writable<typeof selectorsConst> = selectorsConst as any ``` But this solution is not pretty also. I wanted it to look like this: ```typescript const selectorsConst: Writable<typeof var> = [ state => someSelector1(state), state => someSelector2(state), state => someSelector3(state), ] as const ``` Or even something like this(but this is out of scope of this issue): ```typescript const selectorsConst: Tuple<typeof var> = [ state => someSelector1(state), state => someSelector2(state), state => someSelector3(state), ] ``` ## Examples <!-- Show how this would be used and what the behavior would be --> Making a Readonly, Partial, Writable, etc. object: ```typescript const foo: Partial<typeof var> = { bar: { baz: 'value', }, } foo.bar.baz = 'new value' // Error: Object is possibly 'undefined' ``` Unifying object values types: ```typescript interface MyClass { bar?: string; baz?: string; } const foo: { [key in keyof typeof var]: MyClass; } = { firstEntry: { bar: 'bar' }, secondEntry: { baz: 'baz' }, } ``` ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code * [x] This wouldn't change the runtime behavior of existing JavaScript code * [x] This could be implemented without emitting different JS based on the types of the expressions * [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) * [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Suggestion,Awaiting More Feedback
low
Critical
476,451,994
flutter
Material text interactive selection uses buttonTheme
The Material interactive selection shouldn't use the `buttonTheme` or, at least, the theme should provide a flag to either use it in the interactive selection or not. As it is, it's impossible to either use a custom `buttonTheme` (such setting `minWidth`, `height` and so on) without directly affecting the interactive selection that should stick with the native look & feel. Plus, a good alternative might be having a `interactiveSelectionTheme` that would allow customize only it. ``` Flutter (Channel unknown, v1.8.0, on Mac OS X 10.14.6 18G87, locale pt-PT) • Flutter version 1.8.0 at /Users/miguelruivo/DevTools/flutter • Framework revision 2fefa8c731 (5 weeks ago), 2019-07-01 11:33:22 -0700 • Engine revision 45b66b722e • Dart version 2.4.0 ```
framework,f: material design,c: proposal,P3,team-design,triaged-design
low
Major
476,454,525
pytorch
[feature request] Core API for invertible/inplace and flow-like ops + memory-saving (hookless?) reversible sequential container for RevNets to allow for much larger batch-sizes in academic setting
Inplace BatchNorm seems to be developed by Mapillary here: https://github.com/mapillary/inplace_abn This would be a very nice addition to core PyTorch (for memory savings). cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @fritzo @neerajprad @alicanb @nikitaved @albanD @mruberry @walterddr @anjali411 @vincentqb @vishwakftw @SsnL
high priority,module: distributions,feature,module: nn,triaged,needs design
high
Critical
476,472,394
PowerToys
Bring Windows SysInternals to PowerToys
With PowerToys getting a major upgrade soon, thanks to this GitHub page and Microsoft, it would be great to bring the old Windows SysInternals site content and apps onboard this new project. SysInternals are, though old, still very beneficial for power users and IT professionals alike. https://docs.microsoft.com/en-us/sysinternals/
Idea-New PowerToy,Status-In progress
medium
Critical
476,475,134
terminal
Feature Request: Scrollable map view for each tab [minimap]
<!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement When running verbose processes, there are many instances where the user has to forcibly log the output to a file for reading the complete output. The feature requests a scrollable map view for each tab. The idea is taken from Sublime Text editor where the user can access a overview of their entire document and quickly scroll to the desired location. GIF Image below demonstrates this feature: <img src="https://media.giphy.com/media/f7jGy5rgR3DLbtbPuE/giphy.gif" alt="Map View"> # Proposed technical implementation details (optional) The map view may be toggled through the configuration. This could be global tab config or config for specific tab that could be toggled via right click context menu.
Issue-Feature,Area-TerminalControl,Area-Extensibility,Product-Terminal
low
Critical
476,484,505
neovim
winblend with opaque terminal
#### Terminal is transparent except for floating windows. I'm not sure if this is a bug. In the snippet below, I create floating window, my terminal app is opaque, so I can see desktop background, that's not the case for floating window though. - NVIM v0.4.0-1534-g24fb7eefa | Build type: Debug - Operating system/version: 5.1.2-arch1-1-ARCH | sway (wayland wm) - Terminal name/version: termite v15 ### Steps to reproduce using `nvim -u NORC` ``` let l = []| let w = winwidth(0)| let h = winheight(0)| let s = "" while w > 0| let w -= 1| let s .= "."| endwhile while h > 0| let h -= 1| let l += [s]| endwhile call append("$", l) set showtabline=2 set termguicolors hi TabLine gui=NONE cterm=NONE hi TabLineFill gui=NONE cterm=NONE hi TabLineSel gui=NONE cterm=NONE hi Normal guibg=NONE let buf = nvim_create_buf(v:false, v:true) let win = nvim_open_win(buf, v:true, { \'row':0, \'col':0, \'width':20, \'height':10, \'relative':'editor', \'focusable':v:true}) call nvim_win_set_option(win, "winblend", 100) call nvim_buf_set_lines(buf, 0, 1, v:false, [" TEXT", ""]) ``` ### Actual behaviour Desktop background not visible only through floating window. ### Expected behaviour To be visible. (for winblend value of 100)
bug,ui,highlight,floatwin
low
Critical
476,488,408
flutter
AnimatedContainer throws Exception when animating height with easeOutBack curve.
## Steps to Reproduce 1. Create AnimatedContainer with height `25` and curve set to `Curves.easeOutBack` 2. change State to Animate it to `0` 3. the Exception/Error is thrown. While transitioning height with the `easeOutBack` curve, flutter throws an Exception because height becomes negative at some point during the animation. The expected behavior would have been to "clamp" the height so it never goes below 0. or maybe behave like negative margins in CSS. idk 🤷‍♂ ## Source ```dart return AnimatedContainer( duration: Duration(milliseconds: 300), curve: Curves.easeOutQuint, height: containerHeight, // ex: it toggles between 25 and 0. alignment: Alignment.center, child: Text('some text', style: TextStyle( fontSize: 12, color: Colors.grey, ), ), ) ``` ## Logs ``` flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ flutter: The following assertion was thrown building flutter: AnimatedContainer-[<'read-receit-text-bottom-6'>](duration: 400ms, centerLeft, flutter: BoxConstraints(0.0<=w<=Infinity, h=1.0), margin: EdgeInsets(45.0, 0.0, 25.0, 0.0), dirty, state: flutter: _AnimatedContainerState#4493e(ticker active, AlignmentGeometryTween(centerLeft → centerLeft), flutter: BoxConstraintsTween(BoxConstraints(0.0<=w<=Infinity, h=25.0) → BoxConstraints(0.0<=w<=Infinity, flutter: h=1.0)), margin: EdgeInsetsGeometryTween(EdgeInsets(45.0, 0.0, 25.0, 0.0) → EdgeInsets(45.0, 0.0, flutter: 25.0, 0.0)))): flutter: BoxConstraints has a negative minimum height. flutter: The offending constraints were: flutter: BoxConstraints(0.0<=w<=Infinity, h=-0.3; NOT NORMALIZED) flutter: flutter: When the exception was thrown, this was the stack: flutter: #0 BoxConstraints.debugAssertIsValid.<anonymous closure>.throwError package:flutter/…/rendering/box.dart:507 flutter: #1 BoxConstraints.debugAssertIsValid.<anonymous closure> package:flutter/…/rendering/box.dart:537 flutter: #2 BoxConstraints.debugAssertIsValid package:flutter/…/rendering/box.dart:554 flutter: #3 new Container package:flutter/…/widgets/container.dart:270 flutter: #4 _AnimatedContainerState.build package:flutter/…/widgets/implicit_animations.dart:668 flutter: #5 StatefulElement.build package:flutter/…/widgets/framework.dart:4012 flutter: #6 ComponentElement.performRebuild package:flutter/…/widgets/framework.dart:3924 flutter: #7 Element.rebuild package:flutter/…/widgets/framework.dart:3721 flutter: #8 BuildOwner.buildScope package:flutter/…/widgets/framework.dart:2340 flutter: #9 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame package:flutter/…/widgets/binding.dart:700 flutter: #10 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback package:flutter/…/rendering/binding.dart:285 flutter: #11 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback package:flutter/…/scheduler/binding.dart:1016 flutter: #12 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame package:flutter/…/scheduler/binding.dart:958 flutter: #13 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame package:flutter/…/scheduler/binding.dart:874 flutter: #17 _invoke (dart:ui/hooks.dart:236:10) flutter: #18 _drawFrame (dart:ui/hooks.dart:194:3) flutter: (elided 3 frames from package dart:async) flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════ flutter: Another exception was thrown: BoxConstraints has a negative minimum height. ``` <!-- Run `flutter analyze` and attach any output of that command below. If there are any analysis errors, try resolving them before filing this issue. --> ## flutter analyze ``` // nothing except few linting logs. ``` ## flutter doctor -v ``` [✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Mac OS X 10.14.5 18F132, locale en-CA) • Flutter version 1.7.8+hotfix.4 at /Users/iliasbhallil/flutter • Framework revision 20e59316b8 (2 weeks ago), 2019-07-18 20:04:33 -0700 • Engine revision fee001c93f • Dart version 2.4.0 [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • Android SDK at /Users/iliasbhallil/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.3 • ANDROID_HOME = /Users/iliasbhallil/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-1343-b01) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 10.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.3, Build version 10G8 • CocoaPods version 1.6.0.beta.2 [✓] iOS tools - develop for iOS devices • ios-deploy 1.9.4 [✓] Android Studio (version 3.4) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 37.1.1 • Dart plugin version 183.6270 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01) [✓] VS Code (version 1.36.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.3.0 [✓] Connected device (1 available) • iPhone Xʀ • 80A92D26-45F4-400A-95DF-89CA1CDA58A7 • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator) ```
framework,a: animation,d: api docs,a: error message,P2,team-framework,triaged-framework
low
Critical
476,491,565
flutter
GPU performance degrades when rendering vectors each frame
This issue was brought to my attention via a Flare bug report here: https://github.com/2d-inc/Flare-Flutter/issues/133 I've created an isolated test (without Flare) that seems to reproduce the problem. Here's a video: https://drive.google.com/file/d/1R3y7UQqwL8hDQpMDgQ7gm5FXjoh5nJAf/view?usp=sharing It's a custom widget that draws some paths each frame. Code is here: https://github.com/luigi-rosso/flutter_performance_133_vector You can try pushing it harder by increasing the complexity number here: https://github.com/luigi-rosso/flutter_performance_133_vector/blob/d573f9714136629131eabd3fc8f67cb6fe8eee98/lib/example_renderer.dart#L145 Or the resolution here: https://github.com/luigi-rosso/flutter_performance_133_vector/blob/d573f9714136629131eabd3fc8f67cb6fe8eee98/lib/main.dart#L37-L38 Even in release mode it can take up to 16.6 ms/frame on my iPhone X: <img src="https://user-images.githubusercontent.com/454182/62417025-73288e80-b5fa-11e9-85d0-cb2b20316158.png" width=300> It's worth noting that it randomly drops down to <5 ms/frame as time elapses. Then it'll randomly pop back to full GPU usage. You can see this a bit in the video I posted. ---- Doctor report: ``` [✓] Flutter (Channel dev, v1.8.3, on Mac OS X 10.14.4 18E226, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [✓] Xcode - develop for iOS and macOS (Xcode 10.2.1) [✓] Android Studio (version 3.4) [✓] Connected device (1 available) ```
platform-android,platform-ios,engine,c: performance,customer: crowd,customer: web10,customer: thrive,P2,team-engine,triaged-engine
low
Critical
476,499,537
opencv
matchTemplate with SQDIFF_NORMED clips at 1.0
<!-- 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 => Windows 64 Bit - Compiler => Visual Studio 2015 --> - OpenCV => latest master build Aug. 1 2019 (f9cefc84a35e12cbe468696a3f6c2e2c16323f14) -> 4.1.1-dev - Operating System / Platform => Linux - Compiler => gcc ##### Detailed description With method `SQDIFF_NORMED` `matchTemplate()` returns 1.0 in all places where the actual result according to the formula in the [documentation](https://docs.opencv.org/master/df/dfb/group__imgproc__object.html#ga3a7850640f1fe1f58fe91a2d7583695d) it should be >1.0. Notice that in contrast to the other `_NORMED`-methods the normalization of `SQDIFF_NORMED` is mathematically not guaranteed to be <=1. ##### 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 --> For one value: ```python import cv2 import numpy as np i = np.array([[5, 1], [2, 8]], dtype=np.float32) t = np.array([[1, 5], [7, 1]], dtype=np.float32) m = np.ones(t.shape, dtype=t.dtype) r = cv2.matchTemplate(i, t, cv2.TM_SQDIFF_NORMED) print(r) # Calculate SQDIFF_NORMED by hand sqdiff = np.sum((i - t)**2) norm = np.sqrt(np.sum(t**2) * np.sum(i**2)) print(sqdiff/norm) ``` With a larger array: you can see that there are multiple values with value exactly 1.0, so this already seems off, if you calculate the correct value at those points you see that they should be greater. ```python import cv2 import numpy as np def genimg(size): return np.round(2*np.random.uniform(size=size).astype(np.float32)) i = genimg(42).reshape((6, 7)) t = i[:2,:2].copy() m = np.ones(t.shape, dtype=t.dtype) r = cv2.matchTemplate(i, t, cv2.TM_SQDIFF_NORMED) print(r) ```
bug,category: imgproc
low
Critical
476,518,034
rust
rustc unable to interact with trait bound required by other required trait
This bug happens on `nightly-2019-08-01-x86_64-unknown-linux-gnu` and also a nightly I had from a month ago. `rustc 1.38.0-nightly (8a58268b5 2019-07-31)` I minimized my issue to the following ([playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c06d680065267e09adc752a8318f0366)): ```rust use generic_array::{GenericArray, ArrayLength}; pub struct HNSW<M: ArrayLength<u32>> { zero: Vec<ZeroNode<M>>, } struct ZeroNode<N: ArrayLength<u32>> { neighbors: GenericArray<u32, N>, } impl<M: ArrayLength<u32>> HNSW<M> { pub fn insert(&mut self) { self.zero.push(ZeroNode { neighbors: [!0; M::USIZE].into(), }); } } ``` `ArrayLength` has a required bound `Unsigned` from typenum which has an associated const `USIZE`. Therefore, the ArrayLength trait bound should work. The compiler adds this comment: ```rust Compiling playground v0.0.1 (/playground) error[E0599]: no associated item named `USIZE` found for type `M` in the current scope --> src/lib.rs:14:32 | 14 | neighbors: [!0; M::USIZE].into(), | ^^^^^ associated item not found in `M` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `USIZE`, perhaps you need to implement it: candidate #1: `typenum::marker_traits::Unsigned` ``` If I do what it says, it gives the exact same issue ([playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=02d82925e94dd2140fdae6e6ff4f8543)). I then attempted to be clever and force the compiler to do the right thing ([playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6df9200d2d1699a46b26688f78b597cd)): `<M as typenum::marker_traits::Unsigned>::USIZE`: ```rust error[E0277]: the trait bound `M: typenum::marker_traits::Unsigned` is not satisfied --> src/lib.rs:15:29 | 15 | neighbors: [!0; <M as typenum::marker_traits::Unsigned>::USIZE].into(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `typenum::marker_traits::Unsigned` is not implemented for `M` | = help: consider adding a `where M: typenum::marker_traits::Unsigned` bound = note: required by `typenum::marker_traits::Unsigned::USIZE` ``` It seems that, even when the trait is specifically required to be implemented, it still isn't implemented. This behavior is highly erroneous. In the meantime, if anyone knows temporary workarounds for this issue, I would appreciate that. I am using this in [this](https://github.com/rust-photogrammetry/hnsw) crate.
T-compiler,A-lazy-normalization
low
Critical
476,528,197
opencv
where to get the value range of property of VideoCapture::set(id, value)?
<!-- 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 => Windows 64 Bit - Compiler => Visual Studio 2015 --> - OpenCV => :grey_question: - Operating System / Platform => :grey_question: - Compiler => :grey_question: ##### Detailed description <!-- your description --> ##### 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 --> for example, CAP_PROP_EXPOSURE, how about the low and up bound value?
feature,priority: low,category: videoio
low
Critical
476,530,719
flutter
PageController.nextPage should have a default duration and curve
PageController.nextPage and PageController.previousPage should have a default duration and curve for animating the programmatic change of page. This makes the experience more standard and faster to program.
framework,f: scrolling,c: proposal,P3,has partial patch,team-framework,triaged-framework
low
Minor
476,532,935
flutter
PageView should have option to respond to Back Button on Android
PageView should have an option to go back to the previous page if the Back Button was pressed on Android.
c: new feature,framework,f: scrolling,P3,team-framework,triaged-framework
low
Major
476,538,082
PowerToys
Improved file tagging system
Tags are quite awkwardly implemented in Windows and don't seem to support many file types by default. It would be pretty neat to improve on this with a more accessible UI and things like color-coding. Being able to quickly access tags and view tagged files from the navigation pane would be nice too. Maybe something like this is beyond the scope of PowerToys, but I'm just throwing the idea out there.
Idea-New PowerToy,Product-File Explorer
high
Critical
476,538,274
rust
The type-checker assumes that Trait<'a>::AssociatedType may be outlived by 'a, even with "where AssociatedType: 'a"
trait Trait<'a> { type Ty; fn method(ty_ref: &'a Self::Ty) where Self::Ty: 'a { } } fn caller<'a, T: Trait<'a>>(arg: &'a T::Ty) where T::Ty: 'a { T::method(arg) } Compilation fails on the playground (for stable 1.36.0 and nightly 1.38.0) with this error: Compiling playground v0.0.1 (/playground) error[E0309]: the associated type `<T as Trait<'_>>::Ty` may not live long enough --> src/lib.rs:7:9 | 7 | T::method(arg) | ^^^^^^^^^ | = help: consider adding an explicit lifetime bound `<T as Trait<'_>>::Ty: 'a`... note: ...so that the type `<T as Trait<'_>>::Ty` will meet its required lifetime bounds --> src/lib.rs:7:9 | 7 | T::method(arg) | ^^^^^^^^^ error: aborting due to previous error Compilation succeeds if I make any of the following changes: - Add a lifetime constraint to `Ty` at its definition site, `type Ty: 'a;` - Move the lifetime parameter from the trait to the method, `fn method<'a>(...)` Compilation fails with the same error message if I change `method` into a free function: trait Trait<'a> { type Ty; } fn method<'a, T: Trait<'a>>(_arg: &'a T::Ty) where T::Ty: 'a { } fn caller<'a, T: Trait<'a>>(arg: &'a T::Ty) where T::Ty: 'a { method::<T>(arg) } Even if this is intended behaviour, the error message could be improved.
C-enhancement,A-diagnostics,A-lifetimes,A-associated-items,T-lang,T-compiler
low
Critical