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
397,706,010
pytorch
Broadcasting and Additional Dimensions for pairwise_distance
## πŸš€ Feature `F.pairwise_distance` supports `[N,D]x[N,D]=[N]`. Please add the support for `[*,D]x[*,D]=[*]` with broadcasting. ## Motivation I am trying to implement a triplet loss. From the network I have a embedding `[N, D]` and mean vectors `[M, D]`. I need `N*M` distances between them. However `pdist` and `pairwise_distance` do not cover this. If `pairwise_distance` supports multiple dimension, it is possible to unsqueeze them to `[N, 1, D]x[1,M,D]` and get the distances in `[N,M]`. cc @albanD @mruberry
module: nn,triaged,function request,module: distance functions
low
Major
397,759,506
TypeScript
ES5 + downlevelIteration on spread operator disables strictNullChecks
**TypeScript Version:** 3.3.0-dev.20190110 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** **Code** ```ts declare const maybeArr: number[]|undefined; // declare is load bearing, otherwise compiler seems to infer tighter type const nums: number[] = []; nums.push(...maybeArr); // expected: undefined is not an array type, has no [Symbol.iterator] // Actual practical instance where this came up: const someMap = new Map<string, number[]>(); nums.push(...someMap.get('x')); // expected: undefined is not an array type, has no [Symbol.iterator] ``` **Expected behavior:** This should give a compile error with strictNullChecks, regardless of any other TypeScript compiler flags. **Actual behavior:** ```sh $ tsc --strictNullChecks --lib es2015 --target es5 --downlevelIteration test.ts [ no error ] $ tsc --strictNullChecks --lib es2015 --target es6 test.ts test.ts:3:14 - error TS2488: Type 'undefined' must have a '[Symbol.iterator]()' method that returns an iterator. 3 nums.push(...maybeArr); ~~~~~~~~ test.ts:6:14 - error TS2488: Type 'undefined' must have a '[Symbol.iterator]()' method that returns an iterator. 6 nums.push(...someMap.get('x')); ~~~~~~~~~~~~~~~~ ``` **Playground Link:** Link below does not show the problem in ES5/downlevelIteration mode. http://www.typescriptlang.org/play/#src=declare%20const%20maybeArr%3A%20number%5B%5D%7Cundefined%3B%20%20%2F%2F%20declare%20is%20load%20bearing%2C%20otherwise%20compiler%20seems%20to%20infer%20tighter%20type%0Aconst%20nums%3A%20number%5B%5D%20%3D%20%5B%5D%3B%0Anums.push(...maybeArr)%3B%20%20%2F%2F%20expected%3A%20undefined%20is%20not%20an%20array%20type%2C%20has%20no%20%5BSymbol.iterator%5D%0A%0A%2F%2F%20Actual%20practical%20instance%20where%20this%20came%20up%3A%0Aconst%20someMap%20%3D%20new%20Map%3Cstring%2C%20number%5B%5D%3E()%3B%0Anums.push(...someMap.get('x'))%3B%20%20%2F%2F%20expected%3A%20undefined%20is%20not%20an%20array%20type%2C%20has%20no%20%5BSymbol.iterator%5D **Related Issues:** #17195 seems similar but was closed.
Bug
low
Critical
397,776,088
angular
After a reorder animation states doesn't get detected correctly
# 🐞 bug report ### Affected Package The issue is caused by package @angular/animations (I think) ### Is this a regression? Yes, the previous version in which this bug was not present was: 6 (at least) ### Description When a bunch of elements are rendered with ngFor and an animation trigger, the trigger doesn't update correctly when the array has changed. Only some elements gets into the new animation states. Currently this is causing quite some problems for us, where some lists cannot be shown. ## πŸ”¬ Minimal Reproduction https://stackblitz.com/edit/angular-animation-issue Click the "toggle" button to expand the items (notice how all the items gets shown) Click the "reorder" button (Notice how all items still are shown) Click the "toggle" button again. (Notice items are gone) Click the "reorder" button (Nothing visibly changes) Click the "toggle" button (Only some items become visible. If you change the animations to toggle between "display: none" and "display: ''", then the state changes happens as intended. ## 🌍 Your Environment All environment details available on Stackblitz **Anything else relevant?** Seems to happen in all browsers
type: bug/fix,area: animations,freq1: low,P4
low
Critical
397,782,118
flutter
App ignores proxy settings
We need a way to access the system configured proxy. In networks where a proxy is required to enter the internet, this is critical. Currently, I'm not able to use any flutter app in such networks where a proxy is configured in the system settings.
c: new feature,framework,engine,dependency: dart,P2,team-engine,triaged-engine
low
Critical
397,782,224
flutter
Offset of PopupMenuButton takes selected item into account
I noticed my `PopUpMenu` jumping around whenever I selected any value in it. After deeper inspection I noticed the `PopUpMenu`'s offset is linked to the `initialValue`. But this doesn't make any sense and is also not documented. I've build a small example app to show it. The `CheckedPopUpMenu` acts normally to its given offset. But the other `PopUpMenu`'s offset is only correct when the first item is selected. If any other item is selected it jumps to the top off the screen (because the offset of the selected item is offscreen probably). The checkbox in the middle adds the workaround I currently use, which is adding more offset relative to the selected item. Example app code to be copy-pasted into e.g. Dartpad: ```dart import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'PupUpMenu bug', theme: ThemeData( primarySwatch: Colors.blue, ), home: const MyHomePage(title: 'PupUpMenu bug'), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({required this.title, super.key}); final String title; @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { final _itemCount = 4; final _checkedItems = [false, false, false, false]; int? _selectedIndex; bool _applyWorkaround = false; @override Widget build(BuildContext context) { final _checkedItemWidgets = List.generate(_itemCount, (index) { return CheckedPopupMenuItem( child: Text("Check $index"), checked: _checkedItems[index], value: index, ); }); final _itemWidgets = List.generate(_itemCount, (index) { return PopupMenuItem( child: Text("Check $index"), value: index, ); }); return Scaffold( appBar: AppBar( title: Text(widget.title), actions: [ PopupMenuButton( icon: Icon(Icons.check), offset: Offset(0, 100), onSelected: (index) { setState(() { _checkedItems[index] = !_checkedItems[index]; }); }, itemBuilder: (_) => _checkedItemWidgets, ), PopupMenuButton( initialValue: _selectedIndex, // Setting this makes the offset focus on this item icon: Icon(Icons.close), offset: Offset( 0, 100 + (_applyWorkaround ? 44 * (_selectedIndex ?? 0) : 0) .toDouble()), onSelected: (index) { setState(() { _selectedIndex = index; }); }, itemBuilder: (_) => _itemWidgets, ) ], ), body: Center( child: Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.center, children: [ Checkbox( value: _applyWorkaround, onChanged: (checked) { if (checked != null) { setState(() { _applyWorkaround = checked; }); } }), SizedBox(width: 8.0), Text("Apply workaround"), ], ), ), ); } } ``` Flutter doctor output: ``` Running flutter doctor... Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel master, v1.1.9-pre.25, on Microsoft Windows [Version 10.0.17134.472], locale nl-NL) [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [√] Android Studio (version 3.2) [√] Android Studio (version 3.3) [√] Connected device (1 available) β€’ No issues found! ```
framework,f: material design,a: quality,has reproducible steps,P2,has partial patch,found in release: 3.7,found in release: 3.9,team-design,triaged-design
low
Critical
397,829,364
TypeScript
Object.assign({}) seems to always return a type any
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.3.0-dev.20190110 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** Object.assign **Code** ```ts function foo(): {foo: string} { return Object.assign({}); } ``` Interestingly the code: ```ts function bar(): {bar: string} { return Object.assign({}, {bar: 1}); } ``` does report the expected error **Expected behavior:** TypeScript should report an error because the type returned by `return Object.assign({});` does not mach `{foo: string}` but instead the type any is assumed. **Actual behavior:** No error is shown **Playground Link:** https://www.typescriptlang.org/play/index.html#src=function%20foo()%3A%20%7Bfoo%3A%20string%7D%20%7B%0D%0A%20%20%20%20return%20Object.assign(%7B%7D)%3B%0D%0A%7D%0D%0A **Related Issues:** no
Bug,Domain: lib.d.ts
low
Critical
397,994,160
TypeScript
Exponential compilation slowdown with property accessors and conditional types
Apologies, I have had to break from the template in order to describe this issue since it is not easily reproduced in a simple demo. <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.0.3, 3.2.2, 3.3.0-dev.20190110 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** compilation performance, generic property accessor, conditional types **Code** So far in investigating this issue I have identified this code block as the culprit, due to [this commit]( https://github.com/alexfoxgill/biselect/commit/e28e0070074dc52cfff6ba586c44fa6649885d03) ```typescript export type PropOverloads<D extends Dimensionality, S extends Structure, A, B, Params extends {}> = { <K1 extends keyof B>(key: K1) : Composable.ComposeResult<A, B[K1], Params, D, Dimensionality.Single, S, Structure.Select> <K1 extends keyof B, K2 extends keyof B[K1]>(k1: K1, k2: K2) : Composable.ComposeResult<A, B[K1][K2], Params, D, Dimensionality.Single, S, Structure.Select> <K1 extends keyof B, K2 extends keyof B[K1], K3 extends keyof B[K1][K2]>(k1: K1, k2: K2, k3: K3) : Composable.ComposeResult<A, B[K1][K2][K3], Params, D, Dimensionality.Single, S, Structure.Select> <K1 extends keyof B, K2 extends keyof B[K1], K3 extends keyof B[K1][K2], K4 extends keyof B[K1][K2][K3]>(k1: K1, k2: K2, k3: K3, k4: K4) : Composable.ComposeResult<A, B[K1][K2][K3][K4], Params, D, Dimensionality.Single, S, Structure.Select> } ``` "Supporting" code: ```typescript export enum Dimensionality { Single = "single", Maybe = "maybe" } export namespace Dimensionality { export type Highest<T extends Dimensionality, U extends Dimensionality> = Dimensionality extends T ? never : Dimensionality extends U ? never : Dimensionality.Maybe extends (T | U) ? Dimensionality.Maybe : Dimensionality.Single extends (T | U) ? Dimensionality.Single : never } export enum Structure { Get = "get", Select = "select", Convert = "convert" } export namespace Structure { export type Narrowest<T extends Structure, U extends Structure> = Structure extends T ? never : Structure extends U ? never : Structure.Get extends (T | U) ? Structure.Get : Structure.Select extends (T | U) ? Structure.Select : Structure.Convert extends (T | U) ? Structure.Convert : never } export type Composable<A, B, Params extends {}> = | Get<A, B, Params> | MaybeGet<A, B, Params> | Selector<A, B, Params> | MaybeSelector<A, B, Params> | Converter<A, B, Params> | MaybeConverter<A, B, Params> export type ShapeResult<D1 extends Dimensionality, D2 extends Dimensionality, S1 extends Structure, S2 extends Structure> = Shape<Dimensionality.Highest<D1, D2>, Structure.Narrowest<S1, S2>> export type ComposeResult<A, B, P extends {}, D1 extends Dimensionality, D2 extends Dimensionality, S1 extends Structure, S2 extends Structure> = Extract<Composable<A, B, P>, ShapeResult<D1, D2, S1, S2>> ``` **Expected behavior:** A compilation time of ~3 seconds, akin to the previous commit **Actual behavior:** A compilation time of ~80 seconds **Related Issues:** <!-- Did you find other bugs that looked similar? --> none that I could find --- # Output of `tsc --diagnostics` Before this change, in the previous commit: ``` Symbols: 121139 Types: 67276 Memory used: 131777K Check time: 2.36s Total time: 3.19s ``` After this change: ``` Symbols: 1313985 Types: 788655 Memory used: 911104K Check time: 78.97s Total time: 79.67s ``` Without the 4-argument overload: ``` Symbols: 1085472 Types: 650274 Memory used: 763202K Check time: 45.22s Total time: 45.97s ``` With only the 1- and 2-argument overloads: ``` Symbols: 868055 Types: 522824 Memory used: 619599K Check time: 27.51s Total time: 28.21s ``` With only the 1-argument overload: ``` Symbols: 651404 Types: 399632 Memory used: 499634K Check time: 16.01s Total time: 16.68s ``` I am not really sure how to narrow this down to a particular problem or debug the compilation time; I only notice that the number of types and symbols increases hugely with just a single method interface
Bug,Domain: Performance,Domain: Conditional Types
low
Critical
398,026,141
rust
Infinite loop in try_push_visible_item_path
This happens when an item has an infinite number of visible names: ``` // pathlooptest/src/lib.rs pub struct AStruct; pub mod prelude { pub use crate as pathlooptest; pub use crate::AStruct; } ``` ``` // main.rs use pathlooptest::prelude::*; pub fn main() { let x: AStruct = 42; // causes error, all public names of AStruct are generated? } ```
E-needs-test,T-compiler,I-hang
low
Critical
398,053,666
TypeScript
Using compiled *.d.ts file produces a type error, but using the same type from the source file doesn't
Backstory: A type error bug was reported for a library of mine. I tried reproducing by writing code inside the library source and I couldn't reproduce it. I `npm install`-ed my library and I could indeed see the error that was reported (I used the same code snippet in both places). Turns out the type error only happens with the compiled type definitions file. **TypeScript Version:** 3.2.2 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** class property, definition file **Code** __[SSCCE Repo link](https://github.com/gigobyte/typescript-issue-SSCCE)__ To reproduce: Clone the repo. Open `src/BUG_HERE.ts`. There will be a type error: ![image](https://user-images.githubusercontent.com/8791446/51001879-2a17cc80-153a-11e9-887e-2fe0c4678599.png) ``` Type 'Maybe<never>' is not assignable to type 'Maybe<number>'. Types of property ''fantasy-land/alt'' are incompatible. Type '(other: Maybe<never>) => Maybe<never>' is not assignable to type '(other: Maybe<number>) => Maybe<number>'. Types of parameters 'other' and 'other' are incompatible. Type 'Maybe<number>' is not assignable to type 'Maybe<never>'. Types of property 'value' are incompatible. Type 'number | undefined' is not assignable to type 'undefined'. Type 'number' is not assignable to type 'undefined'. ``` **Expected behavior:** Either both functions must have a type error or both should compile, I'm not sure which is the correct behavior, the issue is in that only the imports from the definition file produce an error. **Actual behavior:** Module imported from source has no errors, same module compiled and imported does have an error even though it's used the same way. **Observations from my research:** * It may be related to class properties * Turning off --strictFunctionTypes fixes the error
Bug
low
Critical
398,059,814
flutter
Building flutter tool can time out on fresh macos install
Running Flutter for the first time can trigger git which can trigger macOS to show a prompt to go get Xcode command line tools the first time it's run. That takes forever and we dump a scary error when the Flutter tool build times out.
tool,platform-mac,a: first hour,P2,team-tool,triaged-tool
low
Critical
398,092,929
terminal
GenerateConsoleCtrlEvent creates "zombie" process handle in conhost.exe
* Windows build number: 10.0.17763.195 * What you're doing and what's happening: I have an application that starts and stops many sub processes. We use 'GenerateConsoleCtrlEvent' to stop sub processes. Every time we use this function, the conhost.exe process associated with our main / parent process acquires a "zombie" process handle to the stopped sub process. Here is sample code illustrating the issue which opens notepad, sends a Ctrl-C signal, and then terminates it: ``` #include <Windows.h> int main(int argc, char *argv[]) { STARTUPINFO startInfo; PROCESS_INFORMATION processInfo; ZeroMemory(&startInfo, sizeof(startInfo)); startInfo.cb = sizeof(startInfo); ZeroMemory(&processInfo, sizeof(processInfo)); WCHAR *f = L"c:\\windows\\notepad.exe"; BOOL bres = CreateProcess(f, nullptr, nullptr, nullptr, FALSE, CREATE_NEW_PROCESS_GROUP, nullptr, nullptr, &startInfo, &processInfo); DWORD dw = GenerateConsoleCtrlEvent(CTRL_C_EVENT, processInfo.dwProcessId); TerminateProcess(processInfo.hProcess, 0); DWORD status = WaitForSingleObject(processInfo.hProcess, INFINITE); CloseHandle(processInfo.hProcess); CloseHandle(processInfo.hThread); // Observe zombie process handle in Process Explorer, owned by conhost.exe process associated with this process Sleep(1000 * 60 * 2); return 0; } ``` If we open Process Explorer and view the handles owned by the conhost.exe process associated with the sample program ("Sandbox.exe" in my case): ![image](https://user-images.githubusercontent.com/8868121/51007609-fcf8f900-14fc-11e9-9da9-3145e7cf4fcb.png) We see that there is a "zombie" process handle to the terminated notepad process: ![image](https://user-images.githubusercontent.com/8868121/51007576-dcc93a00-14fc-11e9-8564-805b2bbdf3e5.png) If you step through the sample code, you can see that the process handle is opened on the call to 'GenerateConsoleCtrlEvent'. * What's wrong / what should be happening instead: 'GenerateConsoleCtrlEvent' should not leave an open process handle to the target process after invocation.
Product-Conhost,Area-Server,Issue-Bug
low
Minor
398,095,450
flutter
Complete failure of google_sign_in disconnect()
The "disconnect()" function in the google_sign_in package seems to be completely inoperative. Looking through the source it seems to do the right thing: signOut() calls the Java libary's signOut(), and disconnect() call's the Java library's revokeAccess(). But it does not in fact revoke anything--the name still appears in the list, and clicking it signs in again, no password or other authentication needed. I don't know if this is an error in the plugin, or in the underlying Java API. This is a serious security issue. The user must be allowed to revoke his access to an app.
platform-android,p: google_sign_in,package,P2,team-android,triaged-android
low
Critical
398,102,915
rust
diagnostics: suggets assert_eq!() instead of assert!() where appropriate
````rust fn main() { let x = 3; assert!(x, 3); } ```` This currently gives an error like so: ```` error[E0308]: mismatched types --> src/main.rs:3:5 | 3 | assert!(x, 3); | ^^^^^^^^^^^^^^ expected bool, found integer | = note: expected type `bool` found type `{integer}` error: aborting due to previous error ```` If arguments 1 and 2 are the same type, it would be great if we could instead suggest using `assert_eq!` instead (preferably with rustfix applicable hint)! Alternatively we could suggest transforming `x, 3` to `x == 3` but I guess `assert_eq!()` is more idiomatic.
C-enhancement,A-diagnostics,A-macros,T-compiler,A-suggestion-diagnostics
low
Critical
398,125,976
TypeScript
Async LanguageServiceHost
## Search Terms `language`, `service`, `host`, `async`, `api` ## Suggestion It'd super awesome if Language Service would accept a LanguageServiceHost with async API ## Use Cases Using `LanguageService` in environments where `readFileSync` is not available like browsers (using `browserfs` package or fs provided by `WebSockets`) I'm working on an app like CodeSandbox but a bit more sophisticated. ## Examples ```typescript class Host implements ts.LanguageServiceHost { async getScriptSnapshot(filename: string): Promise<ts.IScriptSnapshot> { } async readFile(filename: string): Promise<string> {} } ``` ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code * [x] This wouldn't change the runtime behavior of existing JavaScript code * [x] This could be implemented without emitting different JS based on the types of the expressions * [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) * [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Suggestion,In Discussion,API
medium
Major
398,192,329
go
proposal: net: add MarshalText/UnmarshalText to HardwareAddr
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go1.10 linux/amd64 </pre> ### Does this issue reproduce with the latest release? Yes. ### What did you do? I'm trying to unmarshal json content into `net.IP` and `net.HardwareAddr`. Both types are actually of type `[]byte` Since `net.IP` implements `json.Marshaler`, it works as expected. However, net.HardwareAddr does not and fails with the error "illegal base64 data at input byte 2" (that's the position of the separator). Here's an example: https://play.golang.org/p/HOBBAyvpfrK I found the google group discussion about adding the Marshaller to the `net.IP` type: https://groups.google.com/forum/#!topic/golang-nuts/io8aHJarm6U ### What did you expect to see? I expect `net.HardwareAddr` to be consistent with `net.IP` and implement `json.Marshaler`. Strings in the form of `"ab:cd:ef:ab:cd:ef"` inside json should be parsable to MAC addresses.
Proposal
medium
Critical
398,278,345
TypeScript
Argument types of functions with multiple declarations should be smarter.
<!-- 🚨 STOP 🚨 𝗦𝗧𝗒𝗣 🚨 𝑺𝑻𝑢𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section. --> ## Search Terms <!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily --> ## Suggestion Argument types of functions with multiple declarations should be smarter. <!-- A summary of what you'd like to see added or changed --> ## Use Cases As showed in example,b should be a number when we are sure that a is "b".But it still think b as a number|string. <!-- What do you want to use this for? What shortcomings exist with current approaches? --> ## Examples http://www.typescriptlang.org/play/index.html#src=class%20test%7B%0D%0A%20%20%20%20public%20test(a%3A%20%22a%22)%3B%0D%0A%20%20%20%20public%20test(a%3A%20%22b%22%2C%20b%3A%20number)%3B%0D%0A%20%20%20%20public%20test(a%3A%20%22c%22%2C%20b%3A%20string)%3B%0D%0A%20%20%20%20public%20test(a%3A%20%22a%22%20%7C%20%22b%22%20%7C%20%22c%22%2C%20b%3F%3A%20number%20%7C%20string)%20%7B%0D%0A%20%20%20%20%20%20%20%20if%20(a%20%3D%3D%20%22a%22)%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20a%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20b%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20else%20if%20(a%20%3D%3D%20%22b%22)%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20a%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20b%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20else%20if%20(a%20%3D%3D%20%22c%22)%20%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20a%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20b%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20a%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20b%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20public%20testf()%20%7B%0D%0A%20%20%20%20%20%20%20%20this.test(%22a%22)%3B%0D%0A%20%20%20%20%20%20%20%20this.test(%22b%22%2C%201)%3B%0D%0A%20%20%20%20%20%20%20%20this.test(%22c%22%2C%20%221%22)%3B%0D%0A%20%20%20%20%7D%0D%0A%7D <!-- Show how this would be used and what the behavior would be --> ## Checklist My suggestion meets these guidelines: * [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code * [ ] This wouldn't change the runtime behavior of existing JavaScript code * [ ] This could be implemented without emitting different JS based on the types of the expressions * [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) * [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Suggestion,Awaiting More Feedback,Domain: Control Flow
low
Critical
398,297,107
godot
Sphere shape should have 1 handle more
**Godot version:** 3.1beta1 **Issue description:** Sphere shapes are not resizable from the side: if you look at a sphere shape from the side the handle is "in the middle" of the sphere, making it completely useless. **Proposal** Add a second handle for when looking the sphere from the side. 2 handles are sufficient
enhancement,topic:editor
low
Minor
398,349,331
rust
Iterating with step_by(1) is much slower than without
Greetings! I'd like to report that I get some significant (negative) performance impact when calling `step_by(1)` on an iterator. I created a repository with a detailed description of the issue and benchmarks to reproduce it: https://github.com/mvlabat/step_by_one These are the functions I tested: ```rust pub fn iter_default_step(mut arr: Vec<i32>) -> Vec<i32> { for e in arr.iter_mut() { *e = e.wrapping_add(3); } arr } pub fn iter_step(mut arr: Vec<i32>, iter_step: usize) -> Vec<i32> { for e in arr.iter_mut().step_by(iter_step) { *e = e.wrapping_add(3); } arr } ``` Calling `iter_step(vec![1; LARGE_ENOUGH], 1)` computes 1.75x slower than `iter_default_step(vec![1; LARGE_ENOUGH])` with `const LARGE_ENOUGH: usize = 10_000_000;`. I'm running Macbook Pro 2015 with Intel i5-5257U CPU (2.70GHz). My rustc version: `1.33.0-nightly (c2d381d39 2019-01-10)`. These are the exact benchmark results I got: ``` running 4 tests test tests::bench_iter_default_step ... bench: 8,702,963 ns/iter (+/- 1,648,782) test tests::bench_iter_step_1 ... bench: 15,267,083 ns/iter (+/- 1,236,220) test tests::bench_iter_step_16 ... bench: 9,053,772 ns/iter (+/- 380,422) test tests::bench_iter_step_64 ... bench: 8,711,169 ns/iter (+/- 327,562) ``` In the [repository README](https://github.com/mvlabat/step_by_one) there are also links to the generated asm code of these two functions.
I-slow,E-needs-test
low
Major
398,358,755
TypeScript
Suggest renaming file from .ts to .tsx if needed?
## Search Terms ts tsx react jsx rename file errors ## Suggestion When adding JSX elements (React) to a `.ts` file rather than a `.tsx` file, error messages aren't clear that it should be a `.tsx` file. If it's clear the user is intending to write JSX code, such as having multiple JSX-like components and/or components that extend `React.Component`, can a code fix be given (on the file? on individual `<>`-related parsing errors?) to rename to `.tsx`? ## Use Cases There's been some buzz on Twitter lately about how easy it is to forget to rename to `.tsx`. Some users are apparently even used to writing JSX in `.js`, so the need to use `.tsx` is a bit confusing for them. ## Examples Given this `file.ts`: ```ts import * as React from "react"; export class ComponentClass extends React.Component { public render() { return <span />; // index.ts(5,22): error TS1005: '>' expected. // index.ts(5,23): error TS1161: Unterminated regular expression literal. } } export const ComponentArrow = () => <span />; // index.ts(11,43): error TS1005: '>' expected. // index.ts(11,44): error TS1161: Unterminated regular expression literal. ``` Would it be possible to special-case just from these errors to suggest to rename the file? Alternately, if we just have the `ComponentArrow` errors, would it still be possible to suggest to rename the file? ## 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: Error Messages,Experience Enhancement
low
Critical
398,367,842
TypeScript
Compiler generates jsxFactory call with incorrect namespace
**TypeScript Version:** 3.2.2, 3.3.0-dev.20190111 **Search Terms:** jsx, jsxFactory **Code** Full solution: [test.zip](https://github.com/Microsoft/TypeScript/files/2750418/test.zip) ```ts namespace Templates { export function compile(_: string, __: { [key: string]: any }, ...___: Array<any>) { return {}; } } // this template generated properly as call to Templates.compile namespace SomeNS.Templates.OtherNS { export const Boolean = (props: { id: string; name: string; }) => { return ( <input type="checkbox" id={props.id} name={props.name} /> ); } } // this template generated as call to non-existing SomeNS.Templates.compile namespace SomeNS.templates { export const text = (value: string) => <span>{value}</span>; } ``` ```json { "compileOnSave": false, "files": [ "root.ts" ], "compilerOptions": { "noEmitOnError": true, "noUnusedLocals": true, "noUnusedParameters": true, "removeComments": true, "target": "es5", "strict": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "forceConsistentCasingInFileNames": true, "noErrorTruncation": true, "allowJs": true, "lib": [ "dom", "es5" ], "stripInternal": true, "declaration": false, "jsx": "react", "jsxFactory": "Templates.compile" } } ``` **Expected behavior:** Proper call to jsxFactory method generated **Actual behavior:** Generated code contains call of non-existing method (`SomeNS.Templates.compile` instead of `Templates.compile`): ```js "use strict"; var Templates; (function (Templates) { function compile(_, __) { var ___ = []; for (var _i = 2; _i < arguments.length; _i++) { ___[_i - 2] = arguments[_i]; } return {}; } Templates.compile = compile; })(Templates || (Templates = {})); var SomeNS; (function (SomeNS) { var templates; (function (templates) { // unknown SomeNS.Templates.compile method called templates.text = function (value) { return SomeNS.Templates.compile("span", null, value); }; })(templates = SomeNS.templates || (SomeNS.templates = {})); })(SomeNS || (SomeNS = {})); var SomeNS; (function (SomeNS) { var TestClass = (function () { function TestClass() { } TestClass.prototype.test = function () { return SomeNS.Templates.OtherNS.Boolean({ id: 'id', name: 'name' }); }; return TestClass; }()); SomeNS.TestClass = TestClass; })(SomeNS || (SomeNS = {})); var SomeNS; (function (SomeNS) { var Templates; (function (Templates) { var OtherNS; (function (OtherNS) { OtherNS.Boolean = function (props) { // proper Templates.compile method called return (Templates.compile("input", { type: "checkbox", id: props.id, name: props.name })); }; })(OtherNS = Templates.OtherNS || (Templates.OtherNS = {})); })(Templates = SomeNS.Templates || (SomeNS.Templates = {})); })(SomeNS || (SomeNS = {})); ```
Suggestion,Needs Proposal,Domain: Error Messages
low
Critical
398,382,238
pytorch
ProcessGroupGlooTest.test_scatter_stress_cuda is flaky
Example errors: 1. build: https://circleci.com/gh/pytorch/pytorch/550843?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link ``` ====================================================================== Jan 11 15:06:07 FAIL: test_scatter_stress_cuda (__main__.ProcessGroupGlooTest) Jan 11 15:06:07 ---------------------------------------------------------------------- Jan 11 15:06:07 Traceback (most recent call last): Jan 11 15:06:07 File "test_c10d.py", line 451, in wrapper Jan 11 15:06:07 self._join_processes(fn) Jan 11 15:06:07 File "test_c10d.py", line 496, in _join_processes Jan 11 15:06:07 self._check_return_codes(elapsed_time) Jan 11 15:06:07 File "test_c10d.py", line 507, in _check_return_codes Jan 11 15:06:07 self.assertEqual(p.exitcode, first_process.exitcode) Jan 11 15:06:07 File "/var/lib/jenkins/workspace/test/common_utils.py", line 443, in assertEqual Jan 11 15:06:07 super(TestCase, self).assertLessEqual(abs(x - y), prec, message) Jan 11 15:06:07 AssertionError: 12 not less than or equal to 1e-05 : ``` 2. build: https://circleci.com/gh/pytorch/pytorch/550696?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link ``` ====================================================================== Jan 11 13:48:43 ERROR: test_scatter_stress_cuda (__main__.ProcessGroupGlooTest) Jan 11 13:48:43 ---------------------------------------------------------------------- Jan 11 13:48:43 Traceback (most recent call last): Jan 11 13:48:43 File "test_c10d.py", line 451, in wrapper Jan 11 13:48:43 self._join_processes(fn) Jan 11 13:48:43 File "test_c10d.py", line 496, in _join_processes Jan 11 13:48:43 self._check_return_codes(elapsed_time) Jan 11 13:48:43 File "test_c10d.py", line 506, in _check_return_codes Jan 11 13:48:43 raise RuntimeError('Process {} terminated or timed out after {} seconds'.format(i, elapsed_time)) Jan 11 13:48:43 RuntimeError: Process 0 terminated or timed out after 30.030478715896606 seconds ``` cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @teng-li
oncall: distributed,triaged,module: flaky-tests,module: c10d
low
Critical
398,384,110
go
gccgo: confusing closure names
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? ``` gccgo2 (GCC) 9.0.0 20190108 (experimental) ``` ### What operating system and processor architecture are you using (`go env`)? Linux/AMD64 ### What did you do? ``` package main type T struct { closure1, closure2 func() } func (t *T) M1() { t.closure1 = func() { t.closure2() } } func (t *T) M2() { t.closure2 = func() { panic("XXX") } } func main() { var t T t.M1() t.M2() t.closure1() } ``` Built with gccgo, this program prints ``` panic: XXX goroutine 1 [running]: panic /tmp/src/gccgo/libgo/go/runtime/panic.go:588 main.func1 /tmp/c.go:8 main.func1 /tmp/c.go:7 main.main /tmp/c.go:14 ``` The closures on line 7 and 8 are different functions, yet have the same name, which is confusing. It is ok that closures have somewhat artificial names, but it is super confusing if different closures have the name. It appears to me (without checking the source code) that if the closures are defined in global scope or inside a function (NOT method), they are properly named as `package_name.funcN` or `package_name.function_name.funcN` with proper `N`. However, if they are defined in methods, they are all named `package_name.funcN` with `N` starting from 1 in each method. In this case, the two closures are defined in two different methods, and both named `main.func1`. cc @ianlancetaylor @thanm
NeedsInvestigation
low
Minor
398,394,430
TypeScript
Allow use of infer in extends clause of generic type parameter
## Search Terms generic type parameter infer keyword conditional ## Suggestion Allow the use `infer` keyword in the extends clause of generic type parameters. This would simply be a nice quality of life improvement to avoid unnecessary conditional types or extra free type parameters. ```ts type ArrayType<A extends Array<infer T>> = T; ``` ## Use Cases Currently if you have a generic type whose parameter is constrained by a generic type, you need to write a conditional to extract the nested generic type: ```ts type ArrayType<A extends Array<any>> = A extends Array<infer T> ? T : never; ``` This seems unfortunate that we need to write a conditional since only the true branch will ever be satisfied. (Additionally, avoiding unnecessary usages of `any` would be nice.) We could avoid some duplication by dropping the constraint: ```ts type ArrayType<A> = A extends Array<infer T> ? T : never; ``` But passing a non array into this type would move the error to wherever `ArrayType` was used (or perhaps even be silenced) instead of on the type parameter itself where the error actually occurred. We could also do this with an extra type parameter, but this puts the onus on the user of the type to pass a correct value (and they can always just pass `unknown` or `any`): ```ts type ArrayType<A extends Array<T>, T> = T; type T2 = ArrayType<number[], number>; type T3 = ArrayType<number[], unknown>; type T1 = ArrayType<number[], any>; ``` ## Examples ```ts type MyType<A, B> = { ... } type OldLift<T extends MyType<any, any>, B> = T extends MyType<infer A, any> ? MyType<A, B> : never; type NewLift<T extends MyType<infer A, any>, B> = MyType<A, B>; ``` ## 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
398,414,516
flutter
FAB shadows are not aligned with Material spec
## Steps to Reproduce 1. Render a FAB. 2. Look at shadow. 3. Compare with FAB shadow with attached image <img width="143" alt="screen shot 2019-01-11 at 11 02 54 am" src="https://user-images.githubusercontent.com/42326/51054103-84437c80-1590-11e9-8c6f-45506163aa18.png"> `material/shadows.dart` appears to define them appropriately, but in the case of the drawing the FAB there's a call out to a native function called `Canvas_drawShadow`, which takes a "Material elevation" argument. The call happens in the `RenderPhysicalShape` class in `flutter/lib/src/rendering/proxy_box.dart`. cc @willlarche
framework,f: material design,has reproducible steps,P2,found in release: 3.3,found in release: 3.6,team-design,triaged-design
low
Major
398,416,722
TypeScript
JavaScript/TypeScript region folding with //region does not work
<!-- Please search existing issues to avoid creating duplicates. --> <!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ --> <!-- Use Help > Report Issue to prefill these. --> - VSCode Version: 1.30.2 - OS Version: Linux x64 4.20.0-arch1-1-ARCH Steps to Reproduce: 1. Use `//region` and `//endregion` in JavaScript and/or TypeScript files to create folding regions. <!-- Launch with `code --disable-extensions` to check. --> Does this issue occur when all extensions are disabled?: Yes [The release notes for 1.17](https://code.visualstudio.com/updates/v1_17#_folding-regions) mention that support was added for folding regions. For JavaScript/TypeScript, both `//#region` `//#endregion` and `//region` `//endregion` were added. However only `//#region` `//#endregion` seem to work. `//region` `//endregion` do not work. This is annoying because some projects I work on use this syntax throughout all the code. ![vscode_folding_regions](https://user-images.githubusercontent.com/9055274/50963526-43366400-14cd-11e9-896b-c7bb45186763.png) Code snippet ```javascript //region region //endregion // region region with space // endregion //#region #region //#endregion // #region #region with space // #endregion ```
Suggestion,Awaiting More Feedback,Domain: Outlining
medium
Major
398,420,464
go
cmd/compile: implement global new(T) without calling newobject
```go package p var x = new(int) ``` This generates init code to call `newobject` (including a write barrier, which I thought wasn't supposed to happen any more?). Instead, we should make a BSS int symbol, and then make `x` contain a relocation to that symbol. cc @randall77 @mvdan
Performance,NeedsFix,compiler/runtime
low
Major
398,422,427
go
x/build: add binary size sparklines to build.golang.org
Binary size keeps creeping up. Some visibility might help. Here's an idea: At the end of every builder run, we have readily available a bunch of compiled binaries on a bunch of different platforms. We could pick a few binaries on a couple of platforms and add some spark charts (or regular charts) to the top of build.golang.org of binary sizes. I'd like to do the same with compile time, etc, but that information is less readily available. Related: #19327 cc @dmitshur @bradfitz
Builders,NeedsInvestigation,FeatureRequest
low
Minor
398,424,504
go
cmd/compile: use memmove to initialize non-global static data
This is a duplicate of https://github.com/golang/go/issues/29573#issuecomment-451596366 and https://github.com/golang/go/issues/29574#issuecomment-451626918, but split out so that it doesn't get lost in the other discussions. When initializing static data in a function (non-global) context, we generate code to construct the desired object. In some (most?) cases, it'd be preferable to have a static data symbol containing the desired object and then copy it into place using memmove/typedmemmove. See those issues/comments for more details. cc @dsnet @randall77
Performance,NeedsFix,compiler/runtime
low
Minor
398,424,775
rust
rustdoc support for per-parameter documentation
It appears to me that this pattern of documenting function parameter has become an informal standard: ```rust /// Supplies a new frame to WebRender. /// /// Non-blocking, it notifies a worker process which processes the display list. /// /// Note: Scrolling doesn't require an own Frame. /// /// Arguments: /// /// * `document_id`: Target Document ID. /// * `epoch`: The unique Frame ID, monotonically increasing. /// * `background`: The background color of this pipeline. /// * `viewport_size`: The size of the viewport for this frame. /// * `pipeline_id`: The ID of the pipeline that is supplying this display list. /// * `content_size`: The total screen space size of this display list's display items. /// * `display_list`: The root Display list used in this frame. /// * `preserve_frame_state`: If a previous frame exists which matches this pipeline /// id, this setting determines if frame state (such as scrolling /// position) should be preserved for this new display list. pub fn set_display_list( &mut self, epoch: Epoch, background: Option<ColorF>, viewport_size: LayoutSize, (pipeline_id, content_size, display_list): (PipelineId, LayoutSize, BuiltDisplayList), preserve_frame_state: bool, ) {...} ``` It's quite sub-optimal currently for a number of reasons: - have to repeat argument names - separate block of argument docs versus arguments themselves - just a lot of noise So not only it's not exactly most convenient, it's also easy to get the docs de-synchronized from the code (notice the `document_id` above ^). It would be much better if we could do this instead: ```rust /// Supplies a new frame to WebRender. /// /// Non-blocking, it notifies a worker process which processes the display list. /// /// Note: Scrolling doesn't require an own Frame. pub fn set_display_list( &mut self, /// Unique Frame ID, monotonically increasing. epoch: Epoch, /// Background color of this pipeline. background: Option<ColorF>, /// Size of the viewport for this frame. viewport_size: LayoutSize, /// The ID of the pipeline that is supplying this display list, /// the total screen space size of this display list's display items, /// and the root Display list used in this frame. (pipeline_id, content_size, display_list): (PipelineId, LayoutSize, BuiltDisplayList), /// If a previous frame exists which matches this pipeline id, /// this setting determines if frame state (such as scrolling position) /// should be preserved for this new display list. preserve_frame_state: bool, ) {...} ``` Does that sound remotely possible? With an assumption that the latter case would produce near-identical documentation to the former.
T-rustdoc,A-attributes,C-feature-request
high
Critical
398,431,397
go
Brand book: hex color codes don't match RGB values
I was writing a Playground linkΒΉ for a quick reference to the Go brand colors, and discovered that some of the hex values for some of the colors in the [Brand Book](https://golang.org/s/brandbook) don't match the RGB values listed beneath them. Specificially: * β€œGopher Blue” is listed as `#00ADD8`, but its RGB value corresponds to `#01ADD8`. * β€œLight Blue” is listed as `#5DC9E2`, but its RGB value corresponds to `#5EC9E3`. * β€œFuchsia” is listed as `#CE3262`, but its RGB value corresponds to `#CE3062`. I'm not sure which of the values in those cases is correct, but they should be made consistent either way. ΒΉhttps://play.golang.org/p/DbqyvrenYA0
Documentation,NeedsInvestigation
low
Major
398,445,577
rust
first/second mutable borrow occurs here wrong diagnostic in nll
After https://github.com/rust-lang/rust/pull/56113 we figured with @nikomatsakis that the output of `src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.rs` in NLL is not ideal ([play](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=e214c2f5b4adadbcdfde970a69b7557f)): ```rust fn main() { let mut x = 1; let mut addr = vec![]; loop { match 1 { 1 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] //[mir]~^ ERROR [E0499] 2 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] //[mir]~^ ERROR [E0499] _ => { addr.push(&mut x); } //[ast]~ ERROR [E0499] //[mir]~^ ERROR [E0499] } } } ``` This outputs: ``` error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-mut-borrow-linear-errors.rs:13:30 | LL | 1 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ---- ^^^^^^ second mutable borrow occurs here | | | first borrow later used here ... LL | _ => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ------ first mutable borrow occurs here error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-mut-borrow-linear-errors.rs:15:30 | LL | 1 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ---- first borrow later used here LL | //[mir]~^ ERROR [E0499] LL | 2 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ^^^^^^ second mutable borrow occurs here LL | //[mir]~^ ERROR [E0499] LL | _ => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ------ first mutable borrow occurs here error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-mut-borrow-linear-errors.rs:17:30 | LL | _ => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ^^^^^^ mutable borrow starts here in previous iteration of loop error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0499`. ``` in NLL mode. In particular the mention of first and second is weird. Why the `_ =>` arm is the first one?. Is that clear to the user?. There are several errors in the test also. Is it better to mix the fact that you're mutably borrowing something in `_ =>` and the mutably borrowing in `1 =>`? or is it better and easier to just state that both borrows are inside of the loop?.
C-enhancement,A-diagnostics,A-borrow-checker,T-compiler,D-papercut
low
Critical
398,446,233
rust
const fn type is missing `const` in error message
```rust const fn foo() {} fn main() { let _: () = foo; } // error[E0308]: mismatched types // = note: expected type `()` // found type `fn() {foo}` ``` I'd expect the found type to be `const fn() {foo}`.
C-enhancement,A-diagnostics,P-low,T-compiler,A-const-eval
low
Critical
398,447,047
go
proposal: runtime: add way for applications to respond to GC backpressure
This is marked as a proposal, but I'd like it to start out as a discussion. Although I believe the need is clear, the correct design is not at all obvious. Many applications have caches that they could easily drop in response to GC backpressure. However, there is currently no good way to do this. One obvious example is sync.Pool. If we also had [per-P storage](https://github.com/golang/go/issues/18802), we could rebuild sync.Pool outside the standard library using GC backpressure. Better, folks could [customize the sync.Pool emptying strategy](https://github.com/golang/go/issues/22950) in response to their own needs. Another example is [interning strings](https://github.com/golang/go/issues/5160). As to design, there are a few aspects. What does the API look like? When and how does the runtime trigger it? And what system dynamics might result. One API ideas: ```go package runtime // The API below needs better names. And the docs are a mix of user-facing and internal details. // GCBackpressureC returns a channel that the runtime will close to indicate GC backpressure. // One the channel has been closed, another call to GCBackpressureC will return a new channel. // There is only a single, shared channel across all calls to GCBackpressureC. // This makes the runtime side cheap: a single, lazily allocated channel, and a single close call per round of backpressure. // The downside is that it could cause a stampede of memory releases. // Another downside is that there could be logical races in which clients miss backpressure notifications by not obtaining a new channel quickly enough. func GCBackpressureC() <-chan struct{} // GCBackpressureC returns a channel that the runtime will send values on to indicate GC backpressure. // The values have no meaning here, but maybe there's something useful we could send? // The runtime side here is more expensive. It has O(n) channels to keep track of, and does O(n) work to send signals to everyone. // On the other hand, by not sending signals to everyone simultaneously it can help avoid stampedes. func GCBackpressureC() <-chan struct{} ``` As to when the runtime should indicate backpressure, there are several options. It could do it once per GC cycle, as a matter of course. (This matches existing sync.Pool behavior.) It could do it in response to heap growth. Or maybe something else or some combination. It's unclear what effect this might have on system dynamics. To avoid messy situations like #22950, someone should probably do some hysteresis and/or incremental work. It is unclear whether that should reside in the runtime or in user code. cc @aclements @rsc @dvyukov @dsnet @cespare
Proposal,Proposal-Hold
medium
Critical
398,466,587
go
cmd/go: set .cache/go-build files as read-only
My understanding is that files in .cache/go-build are immutable and strongly named. If so, it might be worth setting them as read-only to help prevent cache corruption. For example, [as I mentioned on #24661](https://github.com/golang/go/issues/24661#issuecomment-453364210), transitioning mdempsky/unconvert from go/loader to go/packages caused the go/token.File.Name() for cgo-processed files to start pointing into the go-build cache, whereas previously go/loader arranged for them to point to the original unprocessed files. The result was that the `-apply` flag silently started overwriting (and presumably corrupting) go-build cache entries. Since I sloppily wrote unconvert to overwrite files in place, if the cache entries weren't writable, I believe it would have stopped this corruption. (Admittedly though I don't think this would help if I had properly implemented the write-to-temp-file-then-atomically-rename approach.) For what it's worth, Git sets files in its .git/objects as read-only. /cc @rsc
NeedsDecision,GoCommand
low
Minor
398,475,351
godot
Node2D's position property is zero inside _ready function when created in the editor with drag-and-drop
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** Godot 3.1 beta 1 **OS/device including version:** macOS 10.14.2 Intel Core i7 Intel HD Graphics 4000 **Issue description:** [I described this in Godot Q&A.](https://godotengine.org/qa/38983/node2ds-position-when-initialized-the-editor-with-drag-drop?state=comment-39007&show=39007#c39007) I have a node that extends Node2D. I wish to access its position when it's initialized in the editor: tool extends Node2D func _ready() -> void: if Engine.editor_hint: print("Position of ", name, " is ", position) However, when I drag the node's scene file from the FileSystem window to the main scene editor, the position is printed as (0, 0). Specifically the position is printed twice; first when I start dragging the node's scene file, second when I drop the node onto the scene editor; both times as zero. ![custom_node_position](https://user-images.githubusercontent.com/33398493/51062276-ca1e3600-15cc-11e9-9dbd-d16ca0c0031a.png) If I save the main scene after adding the node then reopen it, the node's correct position is printed (and the position is only printed once). It's when the node is first created with drag-and-drop that the position is printed as zero. I am able to get around this by using `call_deferred` in my node's `_ready` function to call a method that accesses the position. tool extends Node2D func _ready() -> void: if Engine.editor_hint: call_deferred("_print_position") func _print_position(): print("Position of ", name, " is ", position) This time when creating the node in a main scene with drag-and-drop, zero is printed when first dragging while the correct position is printed when the node is dropped. ![custom_node_position2](https://user-images.githubusercontent.com/33398493/51062544-a1e30700-15cd-11e9-90da-f985fba1cdcc.png) **Minimal reproduction project:** <!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. --> [PositionTest.zip](https://github.com/godotengine/godot/files/2751330/PositionTest.zip) **main.tscn** is the main scene. **CustomNode.tscn** is the node that is drag-and-dropped onto the main scene.
topic:core,topic:editor,usability
low
Critical
398,485,051
rust
missing_docs false positive on re-export in module with #![allow(missing_docs)]
This one might be a bit complex to solve. This affects both 2015 and 2018 editions on stable/nightly. When a `pub` item from a private module in a crate with `#![deny(missing_docs)]` is reexported in a pub module marked `#![allow(missing_docs)]`, the lint still fires. [2015 (Playground)](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=6b36194a9ba7bde365f4367f1c5a100e) (2018 just needs the `crate::` prefix on the `use` path) ```rust //! docs for crate #![deny(missing_docs)] #[allow(missing_docs)] pub mod undoc { #[allow(missing_docs)] // no effect pub use nonpub::Foo; } mod nonpub { pub struct Foo; impl Foo { pub fn bar() {} } } ``` Both report the same error. The lint marks the original definition point of the item; if it has associated items, those are hit too: ``` error: missing documentation for a struct --> src/lib.rs:11:5 | 11 | pub struct Foo; | ^^^^^^^^^^^^^^^ | note: lint level defined here --> src/lib.rs:2:9 | 2 | #![deny(missing_docs)] | ^^^^^^^^^^^^ error: missing documentation for a method --> src/lib.rs:14:9 | 14 | pub fn bar() {} | ^^^^^^^^^^^^ error: aborting due to 2 previous errors ``` Interestingly, marking the item's *source* module with `#[allow(missing_docs)]` silences the error: [Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=5004f6179265975b7546297d0a3846a2) ```rust //! docs for crate #![deny(missing_docs)] #[allow(missing_docs)] pub mod undoc { pub use nonpub::Foo; } #[allow(missing_docs)] mod nonpub { pub struct Foo; impl Foo { pub fn bar() {} } } ```
T-rustdoc,A-lints,C-bug
low
Critical
398,504,010
flutter
Cursor scroll in text fields too insensitive in Flutter
On Android and on iOS, in both collapsed and expanded selection modes, the single line horizontal scroll is more 'pre-emptive' than our current implementation. Whereas we try to select the text position based on the drag gesture and bring it into view if it were not, the native texts start scrolling before the drag position is outside the text field. This is more aggressive on iOS.
a: text input,c: new feature,platform-android,platform-ios,framework,f: material design,f: cupertino,a: quality,f: gestures,c: proposal,P3,team-design,triaged-design
low
Minor
398,512,139
node
responses corresponding to requests queued by http agent are attached to incorrect domain
<!-- Thank you for reporting a possible bug in Node.js. Please fill in as much of the template below as you can. Version: output of `node -v` Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows) Subsystem: if known, please specify the affected core module name If possible, please provide code that demonstrates the problem, keeping it as simple and free of external dependencies as you can. --> * **Version**: Current tip of master (cf9bcdeabe), but possibly most versions. * **Platform**: All platforms. * **Subsystem**: domain, http. <!-- Please provide more details below this comment. --> Running the following code: ``` 'use strict'; const common = require('../common'); const domain = require('domain'); const http = require('http'); const server = http.createServer((req, res) => { res.end(); }); function performHttpRequestWithDomain(domainId, agent, cb) { const d = domain.create(); d._id = domainId; d.run(() => { const req = http.get({ host: '127.0.0.1', port: server.address().port, agent }, res => { if (req.domain._id !== domainId) { console.log('req.domain._id !== domainId'); console.log('req.domain._id:', req.domain._id); console.log('domainId:', domainId); process.exit(1); } if (req.domain._id !== res.domain._id) { console.log('req.domain._id !== res.domain._id'); console.log('req.domain._id:', req.domain._id); console.log('res.domain._id:', res.domain._id); process.exit(1); } res.on('data', () => {}); res.on('end', cb); }); req.end(); }); d.on('error', (domainErr) => { console.log('got domain error:', domainErr); process.exit(1); }); } server.listen(0, '127.0.0.1', () => { const agent = new http.Agent({maxSockets: 1}); let nbReqComplete = 0; function maybeCloseServer() { if (nbReqComplete === 2) { server.close(); } } performHttpRequestWithDomain(1, agent, common.mustCall(() => { ++nbReqComplete; maybeCloseServer(); })); performHttpRequestWithDomain(2, agent, common.mustCall(() => { ++nbReqComplete; maybeCloseServer(); })); }); ``` exits with a status code of 1 when I'd expect it to exit with a status code of 0: ``` $ ./node test/parallel/test-agent-queued-request-domain.js req.domain._id !== res.domain._id req.domain._id: 2 res.domain._id: 1 $ echo $? 1 $ ``` In this repro, we basically force the http agent to queue the second request. When the first request finishes, [the second request is assigned a socket from the agent's `'free'` event handler](https://github.com/nodejs/node/blob/91ef9c4c3f7d8acc21ad934dd520071b8bdfcab8/lib/_http_agent.js#L70). However, it seems that event handler's execution is [scheduled from within the lifecycle of the first request](https://github.com/nodejs/node/blob/91ef9c4c3f7d8acc21ad934dd520071b8bdfcab8/lib/_http_client.js#L601), and thus its active domain is the one of the first request. As a result, when the parser for the response is instantiated and [its corresponding async resource is initialized](https://github.com/nodejs/node/blob/91ef9c4c3f7d8acc21ad934dd520071b8bdfcab8/lib/domain.js#L53-L59), it is attached to the first request's domain, and not to the active domain when the http request was originally created. I'll see if I can put together a PR that fixes this.
help wanted,http,domain
low
Critical
398,531,517
TypeScript
for() not compiled correctly in 3.2.2
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.2.2 not fixed with next == 3.3.0-dev.20190112 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** for( statement **Code** ```ts // tsc --target es5 --lib es2017 interface item { myKey: string; parent: string; } const xx: item[] = [ { myKey: 'A', parent: '' }, { myKey: 'B', parent: 'A' } ]; const x = xx[1]; let y0key = 'none'; for (let y = x; y; y = xx.find(p => p.myKey === y.parent)) { console.log(JSON.stringify(y, null, 2)); // if() added to prevent infinite loop if (y.myKey === y0key) { console.log('key not changed'); break; } y0key = y.myKey; } console.log('outside loop'); ``` **Expected behavior:** The for() loop should visit xx[1] (key='B'), then its parent xx[0] (key='A') and quit, because y becomes undefined. Works correctly in [email protected]. Transpiled using ```cmd tsc --target es5 --lib es2017 ``` The generated code was: ```js var xx = [ { myKey: 'A', parent: '' }, { myKey: 'B', parent: 'A' } ]; var x = xx[1]; var y0key = 'none'; var _loop_1 = function (y) { console.log(JSON.stringify(y, null, 2)); if (y.myKey === y0key) { console.log('key not changed'); return "break"; } y0key = y.myKey; }; for (var y = x; y; y = xx.find(function (p) { return p.myKey === y.parent; })) { var state_1 = _loop_1(y); if (state_1 === "break") break; } console.log('outside loop'); ``` **Actual behavior:** The loop never quits without the if() statement. With 3.2.2 (or 3.3.0-dev.20190112), the output is: ```js var xx = [ { myKey: 'A', parent: '' }, { myKey: 'B', parent: 'A' } ]; var x = xx[1]; var y0key = 'none'; var _loop_1 = function (y) { if (inc_1) y = xx.find(function (p) { return p.myKey === y.parent; }); else inc_1 = true; console.log(JSON.stringify(y, null, 2)); if (y.myKey === y0key) { console.log('key not changed'); return "break"; } y0key = y.myKey; }; var inc_1 = false; for (var y = x; y;) { var state_1 = _loop_1(y); if (state_1 === "break") break; } console.log('outside loop'); ``` You can see that the loop condition y is not checked after running the final expression (y=find()). As a result, the for loop now never quits without the if(). **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> The link below uses alert() instead of console.log() and make the output move visible. In TS3.1 the for loop shows B, A, and then quits. Then part of If() statement is never executed. In TS3.2, mykey==='A' is visited twice, and caught by the if clause to break the infinite loop. [playground link](http://www.typescriptlang.org/play/#src=%2F%2F%20tsc%20--target%20es5%20--lib%20es2017%0D%0A%0D%0Ainterface%20item%20%7B%0D%0A%20%20myKey%3A%20string%3B%0D%0A%20%20parent%3A%20string%3B%0D%0A%7D%0D%0Aconst%20xx%3A%20item%5B%5D%20%3D%20%5B%0D%0A%20%20%7B%0D%0A%20%20%20%20myKey%3A%20'A'%2C%0D%0A%20%20%20%20parent%3A%20''%0D%0A%20%20%7D%2C%20%7B%0D%0A%20%20%20%20myKey%3A%20'B'%2C%0D%0A%20%20%20%20parent%3A%20'A'%0D%0A%20%20%7D%0D%0A%5D%3B%0D%0Aconst%20x%20%3D%20xx%5B1%5D%3B%0D%0Alet%20y0key%20%3D%20'none'%3B%0D%0Afor%20(let%20y%20%3D%20x%3B%20y%3B%20y%20%3D%20xx.find(p%20%3D%3E%20p.myKey%20%3D%3D%3D%20y.parent))%20%7B%0D%0A%20%20alert(JSON.stringify(y%2C%20null%2C%202))%3B%0D%0A%20%20%2F%2F%20if()%20added%20to%20prevent%20infinite%20loop%0D%0A%20%20if%20(y.myKey%20%3D%3D%3D%20y0key)%20%7B%0D%0A%20%20%20%20alert('key%20not%20changed')%3B%0D%0A%20%20%20%20break%3B%0D%0A%20%20%7D%0D%0A%20%20y0key%20%3D%20y.myKey%3B%0D%0A%7D%0D%0Aalert('outside%20loop')%3B ) **Related Issues:** <!-- Did you find other bugs that looked similar? --> no
Bug,Domain: JS Emit
low
Critical
398,552,401
rust
Float `signum` returns +/-1 for zeros, mismatching integers (and convention)
The sign/signum function is almost always defined to have signum(x) = 0 if x = 0, e.g. - mathematical convention: https://en.wikipedia.org/wiki/Sign_function, - Java (`java.lang.Math.signum`): https://docs.oracle.com/javase/10/docs/api/java/lang/Math.html#signum(double), - numpy (`numpy.sign`): https://docs.scipy.org/doc/numpy/reference/generated/numpy.sign.html, - Rust integers: `0i32.signum() == 0`. Currently, `f32::signum` and `f64::signum` do not satisfy this: https://github.com/rust-lang/rust/blob/79d8a0fcefa5134db2a94739b1d18daa01fc6e9f/src/libstd/f32.rs#L1219-L1220 https://github.com/rust-lang/rust/blob/79d8a0fcefa5134db2a94739b1d18daa01fc6e9f/src/libstd/f64.rs#L1167-L1168 The sign of the signed zeroes can still be reflected when returning zero: `(-0.0).signum()` could return `-0.0` like the Java APIs.
T-libs-api,A-floating-point
medium
Major
398,560,416
flutter
Copy large file from Assets Folder to Application Documents Folder
## Steps to Reproduce Hi, I try to use a large db-file. And therefore, my code copies this file from the Assets folder to the Application-Documents-Folder as can be seen in the code-example below. For small files, my code works perfectly fine and I can work with my DB perfectly fine. However, if I try it with a large db-File (>665MB), things start to break as for my Android-part of my Flutter app. (in fact, iOS works perfectly fine, no matter how large the db-File really is....). Only for Android, a large db-File breaks things. The following Dart code does not work for a large File (>665MB) - (however it works for small files): ```dart Future<Database> initializeDatabase() async { Directory directory = await getApplicationDocumentsDirectory(); var dbPath = join(directory.path, "ch_departures.db"); // copy db file from Assets folder to Documents folder (only if not already there...) if (FileSystemEntity.typeSync(dbPath) == FileSystemEntityType.notFound) { ByteData data = await rootBundle.load("assets/ch_departures.db"); writeToFile(data, dbPath); } // Open/create the database at a given path var departuresDatabase = await openDatabase(dbPath); return departuresDatabase; } // HERE IS WHERE THE CODE CRASHES (WHEN TRYING TO WRITE THE LOADED BYTES) void writeToFile(ByteData data, String path) { final buffer = data.buffer; return new File(path).writeAsBytesSync( buffer.asUint8List(data.offsetInBytes, data.lengthInBytes)); } ``` I tried to play around with the `gradle.properties` File of the Android part of my Flutter App. Inside gradle.properties, I tried: `org.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=2048m` But unfortunately, no success. Do you have any idea on how to make all this work with a large (>665MB) File ????
c: new feature,framework,a: assets,P2,team-framework,triaged-framework
low
Critical
398,568,643
flutter
BorderRadiusDirectional not supported in BorderRadiusTween
framework,a: animation,f: material design,customer: money (g3),has reproducible steps,P2,found in release: 3.5,team-design,triaged-design
low
Major
398,578,738
scrcpy
Incorrect color representation of Samsung J7 2017
Happens both over WiFi and USB. Running commands from [#177](https://github.com/Genymobile/scrcpy/issues/177#issuecomment-397973971): ```bash adb shell screenrecord /sdcard/test.mp4 adb pull /sdcard/test.mp4 ``` results in correct video. Broken commands: ```bash scrcpy -b10K -m360 scrcpy -b2M -m600 scrcpy adb shell screenrecord --output-format=h264 - | ffplay - ``` The video is ultra-smooth, but it looks as if everything below some level of luminosity is interpreted as gray: Here is screenshot of Samsung Settings: ![screenshot_20190112-191611](https://user-images.githubusercontent.com/8074163/51076874-b8a55e80-169e-11e9-8e71-aa7a7de3e6c1.png) Here is screenshot of scrcpy: ![screenshot from 2019-01-12 18-57-21](https://user-images.githubusercontent.com/8074163/51076882-d246a600-169e-11e9-82b1-00cb3283c3cf.png) Android 7.0 (stock, but installed custom kernel) Samsung Experience 8.1 Kernel 3.18.14-Refined_Kernel-v2.8-Stable-J730F-G (custom kernel) Model SM-J730F
display
low
Critical
398,579,168
go
x/image/bmp: support 1-bit format
Hi, I implemented support for 1-bit bmp files in the reader: https://github.com/cbrake/golang.org-x-image/commit/25481fe1980277e4b3206c11a3fc15e2ec31eddc Is there interest merging this (or an improved version)?
NeedsDecision,FeatureRequest
medium
Major
398,589,854
rust
FFI -L linker paths ignored on Linux but work on Mac
I manage the [Rutie](https://github.com/danielpclark/rutie) project which wraps libruby allowing Ruby & Rust to be used together. It has taken a long time to discover what the weird behavior was here so let me explain what's going on. First the environment I test against is a system that has Ruby installed within the main operating system. But that is not the Ruby I'm providing to cargo/rustc as a linker path to use as I'm using RVM (Ruby Version Manager) to dynamically change the shell environment of which Ruby I'm using and they are stored in a sub directory in my users home directory. The compiled code doesn't change which Ruby it uses when the shell does, the code only uses whichever Ruby is current during the build process. On Linux (Ubuntu & TravisCI/Linux) for the longest time I would find the linker wouldn't work unless I copied the actual `libruby.so` (eg: `libruby.so.2.6`) file into either `target/debug/deps` or `target/release/deps`. Then everything passes the continuous integration server tests. Without copying or symlinking the libruby file to my local deps directory I would have to switch away from `cargo:rustc-link-lib=ruby` to `cargo:rustc-link-lib=ruby-2.5` and then only one of the three Ruby versions would pass the tests and that's because Rust found the system installed Ruby but ignored all provided paths via `cargo:rustc-link-search=native=/some/path` or `cargo:rustc-link-search=/some/path` or `cargo:rustc-link-search=dependency=/some/path` with either ruby lib name `ruby` or `ruby-2.5`. Now putting having the right name of the lib which works aside, which is different for Mac, the Mac OS would accept the paths provided as shown above and correctly use the correct Ruby, of which RVM had installed, over the systems installed Ruby. So since I've discovered that Rust/cargo wasn't acknowledging paths provided by the linker in which the Ruby library resides I have made it so my `build.rs` script always symlinks the correct lib into the current target profile dependency directory. So here's the working setup for: ### Linux Symlink: `libruby.so.2.6 -> $HOME/.rvm/rubies/ruby-2.6.0/lib/libruby.so.2.6*` in `target/$PROFILE/deps` ``` cargo:rustc-link-search=/home/travis/.rvm/rubies/ruby-2.6.0/lib cargo:rustc-link-lib=ruby cargo:rustc-link-lib=dylib=ruby cargo:rustc-link-lib=m ``` ### Mac No symlink or copy ``` cargo:rustc-link-search=/Users/travis/.rvm/rubies/ruby-2.6.0/lib cargo:rustc-link-lib=ruby.2.6 cargo:rustc-link-lib=dylib=ruby.2.6 ``` --- And yes I know `ruby` is listed twice and that it's not necessary. The main point of this issue is a known working build for **Mac OS** does not behave the same way in **Linux** as the libraries in the provided linked paths are not honored. If you would like to replicate the failure simply comment out the symlink code in the `build.rs` file here: https://github.com/danielpclark/rutie/blob/v0.5.3/build.rs#L174-L182 This has all been tested with the latest Rust `rustc 1.31.1 (b6c32da9b 2018-12-18)` and I've been struggling with this same issue over the past couple of years both on my computer and in the CI environment. As I said I only recently understood where the issue comes from.
A-linkage,O-linux
low
Critical
398,592,334
pytorch
More data type support for gather_map
## πŸš€ Feature <!-- A clear and concise description of the feature proposal --> So far we only support Tensor and Dict in gather_map(). Can we also support Number and List like what we do in collate() ## Motivation <!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too --> It is possilbe to have a dictionary or list of Number and Tensor when gather the output of model. ## Pitch <!-- A clear and concise description of what you want to happen. --> ```ruby def gather_map(outputs): out = outputs[0] if isinstance(out, Number): return torch.tensor(outputs) if isinstance(out, torch.Tensor): return Gather.apply(target_device, dim, *outputs) if out is None: return None if isinstance(out, list): return type(out)(((k, gather_map([d[k] for d in outputs])) for k in out)) if isinstance(out, dict): if not all((len(out) == len(d) for d in outputs)): raise ValueError('All dicts must have the same number of keys') return type(out)(((k, gather_map([d[k] for d in outputs])) for k in out)) return type(out)(map(gather_map, zip(*outputs))) ```
module: nn,triaged,enhancement
low
Critical
398,601,040
go
path/filepath: TestBug3486 fails if GOROOT/test is removed
### What version of Go are you using (`go version`)? <pre> $ go version go version go1.11.4 linux/amd64 </pre> ### Does this issue reproduce with the latest release? Yes, 1.11.4 is the latest (not counting betas?). ### 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/ionasal/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/ionasal/go" GOPROXY="" GORACE="" GOROOT="/usr/lib/go" GOTMPDIR="" GOTOOLDIR="/usr/lib/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-build457575040=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### What did you do? ``` mkdir -p /tmp/tmp3 cd /tmp/tmp3 go mod init example.com/test cat >main.go <<EOF package foo import ( _ "path/filepath" ) EOF go test all ``` ### What did you expect to see? All tests pass ### What did you see instead? Test failures: ``` --- FAIL: TestBug3486 (0.00s) path_test.go:1268: lstat /usr/lib/go/test: no such file or directory FAIL FAIL path/filepath 0.013s ``` (I found a bug for the same test, but the failure mode is different: https://github.com/golang/go/issues/5863)
Testing,NeedsDecision
low
Critical
398,605,825
flutter
[google_maps_flutter] Support for Ground Overlay
<!-- Thank you for using Flutter! Please check out our documentation first: * https://flutter.io/ * https://docs.flutter.io/ If you can't find the answer there, please consider asking a question on the Stack Overflow Web site: * https://stackoverflow.com/questions/tagged/flutter?sort=frequent Please don't file a GitHub issue for support requests. GitHub issues are for tracking defects in the product. If you file a bug asking for help, we will consider this a request for a documentation update. --> Hi, I'm developing an app where the main functionality is a Map with a Custom Ground Overlay. I've achieve that with the Ionic Framework but I want to make a Flutter version and I notice that the Ground Overlay Class or functionality is not present in the library at the moment. This is what I need: Android: https://developers.google.com/maps/documentation/android-sdk/groundoverlay iOS: https://developers.google.com/maps/documentation/ios-sdk/overlays This is a main functionality for my app, so I need this to launch a production Flutter version of my app. Please, take a look at it. Thanks!
c: new feature,customer: crowd,p: maps,package,c: proposal,team-ecosystem,P2,has partial patch,triaged-ecosystem
low
Critical
398,609,917
rust
Meta tracking issue for `const fn`
This issue tracks the progress of `const fn` as well as const evaluation more broadly. ### This issue is not for discussion about specific extensions to `const fn` or const evaluation and only exists to provide links to other places that track the progress of specific issues. If you wish to discuss some subject related to const evaluation or `const fn`, please find an existing appropriate issue below or create an new issue and comment here with a link to the newly created issue. If it's impossible to detect what issue the programmer should be pointed to, they can simply be pointed to this issue. -------------------- The `const` related issues currently on deck are as follows: * [x] Control flow: #49146 (1.46) * [x] Loops: #52000 (1.46) * [x] Integer arithmetic: #53718 * [ ] Integration with patterns: #57240 * [ ] Floating point arithmetic: #57241 * [x] Panics: #51999 (`#![feature(const_err)]`) * [ ] Comparing raw pointers: #53020 * [x] Dereferencing raw pointers: #51911 * [x] Raw pointer to `usize` casts: #51910(`#![feature(const_raw_ptr_to_usize_cast)]`) * [x] Union field accesses: #51909 * [ ] `&mut T` references and borrows: #57349 (`#![feature(const_mut_refs)]`) * [ ] FromStr: #59133 * [x] `transmute`: #53605 * [ ] Function pointers (`const fn(...)` / `fn(...)`): #63997 * [ ] `const unsafe? extern fn`: #64926 * [x] unsizing casts: #64992 * [ ] platform intrinsics: #66061 * [ ] async blocks in `const fn`s: #85368 * [ ] `mem::discriminant`: #69821(`#![feature(const_discriminant)]`) * [x] ptr offset methods #71499 * [x] Warnings on long running evaluations: #49980 * [x] Constant propagation not causing errors: #28238 * [ ] `const_maybe_uninit_assume_init` #86722 ----------------- Open RFCs: * [Calling methods on generic parameters of const fns](https://github.com/rust-lang/rfcs/pull/2632) * [ ] `?const` trait bound opt-out: #67794(`#![feature(const_trait_bound_opt_out)]`) * [ ] impl const Trait for Ty: #67792(`#![feature(const_trait_impl)]`) Planned RFCs: * [Heap allocation in `const fn`](https://github.com/rust-lang/const-eval/issues/20) (this includes everything related to `Box`) ---------------------------- Completed: - const constructors: #61456 - locals, assignments, and destructuring: #48821 - `unsafe` operations: #55607
A-attributes,A-diagnostics,metabug,A-stability,T-lang,T-compiler,A-const-eval
high
Critical
398,636,613
go
cmd/compile: optimize CAS loops
Note: I'm not 100% sure the transformation I'm proposing is correct, or profitable. If it's not feel free to close. Consider the typical Go CAS loop: ``` for { oldA := atomic.LoadUint64(&A) newA := f(oldA) if atomic.CompareAndSwapUint64(&A, oldA, newA) { return } } ``` On x64, this gets compiled to: (https://godbolt.org/z/7905Kp) ``` main_pc29: movq "".A(SB), AX // (compute newA, store it in CX...) leaq "".A(SB), DX lock cmpxchgq CX, (DX) seteq AL testb AL, AL jeq main_pc29 // (return...) ``` There are 3 things that jump out: - `cmpxchgq`, if `A != oldA`, already reloads the updated value of `A` in `AX`, so the first instruction of the loop (reloading `A`) can be skipped from the second iteration onwards - the `seteq` and `testb` after `cmqxchgq` are not required (they, and the `jeq` can be replaced with a `jnz main_pc29`) - the address of `A` is reloaded at every iteration: it should be hoisted outside of the loop (note that in the link above `f()` is marked noinline, so it makes sense to reload the address of `A` once `f` returns; but even if you remove the noinline the address is still reloaded even though the register is not reused for other purposes) (#15808?) Rewritten, the loop could become: ``` movq "".A(SB), AX // atomic.LoadUint64(&A) leaq "".A(SB), DX // DX = &A main_pc29: // (compute newA, store it in CX...) lock cmpxchgq CX, (DX) jnz main_pc29 // (return...) ``` Since modifying `atomic.CompareAndSwap*` to return the reloaded value instead of a `bool` is likely not an option, it would be great if the compiler learned to do this kind of transformation (when safe).
Performance,NeedsInvestigation,compiler/runtime
low
Minor
398,649,618
rust
Tracking issue for future-incompatibility lint `ill_formed_attribute_input`
#### What is this lint about Previously inputs for many built-in attributes weren't validated and nonsensical attributes like `#[no_std(arbitraty, string = "foo")]` were accepted. https://github.com/rust-lang/rust/pull/57321 introduced a check for top-level shape (`#[attr]` vs `#[attr(...)]` vs `#[attr = ...]`) for built-in attributes that produces an error by default, but produces a warning for incorrect attribute forms available on stable that were actually encountered in practice (during crater run). Currently the list is ```rust #[doc] #[ignore(...)] #[inline = "..."] #[link] #[link = "..."] ``` , but it can be extended if more regressions are reported. #### How to fix this warning/error Use one of the correct attribute forms suggested by the compiler. #### Current status - [x] https://github.com/rust-lang/rust/pull/57321 introduces the `ill_formed_attribute_input` lint as warn-by-default - [x] https://github.com/rust-lang/rust/pull/65785 makes the `ill_formed_attribute_input` lint deny-by-default - [ ] PR ? makes the `ill_formed_attribute_input` lint a hard error
A-attributes,A-lints,T-lang,T-compiler,C-future-incompatibility,C-tracking-issue
low
Critical
398,652,037
vue
[SSR] Add option to output the server entry through webpack
### What problem does this feature solve? The guide for Server-Side rendering creates 2 webpack builds, one for the client and one for the server. Then you create a file that imports the outputs from those 2 builds and returns the responses to whatever framework you use (e.g. express). Let's call this file the server handler. The issue with this approach is that you would need a third webpack build to process the server handler through webpack as well. You might want to do that for a few different reasons: 1. To have the same flow for all your files 2. Because you use typescript/babel/minification or other transformations 3. To use the same style of imports (i.e. ES modules) ### What does the proposed API look like? I can think of a few possible solutions: #### 1. Define the name of the server handler to emit There could be a configuration option for `VueSSRServerPlugin` that defines one additional entry to emit in the Webpack configuration. This would mean that there could be at most 2 entries, one is used for creating the JSON bundle, the other one to emit the server handler ```javascript // webpack.config.js const VueSSRServerPlugin = require('vue-server-renderer/server-plugin') module.exports = { // Point entry to your app's server entry file entry: { main: '/path/to/server-entry.js', handler: '/path/to/server-handler.js' }, resolve: { alias: { 'client-manifest': '/path/to/dist/client/vue-ssr-client-manifest.json' } }, plugins: [ new VueSSRServerPlugin({ serverHandler: 'handler' }) ] } ``` The handler would look something like this: ```javascript // server-handler.js import clientManifest from 'client-manifest'; // This alias could be created by the VueSSRServerPlugin itself import serverBundle from 'server-bundle'; import { createBundleRenderer } from 'vue-server-renderer'; const template = `[...]`; const renderer = createBundleRenderer(serverBundle, { template, clientManifest, runInNewContext: false }); export function handler(event, context) { // use the renderer in here } ``` The upside of this approach is that it should be relatively easy to accomplish this. Another upside is that this would be backwards compatible. The downside is that there would be quite a bit of configuration necessary to make it look nice β€” to avoid importing build outputs directly in code, which would add a dependency on our webpack configuration in the code. #### 2. Provide an alias that resolves to the renderer instead of emitting a JSON bundle Another possible approach would be to change completely the way the VueSSRServerPlugin works to reduce the additional webpack configuration necessary. Here's how the webpack configuration would look like: ```javascript // webpack.config.js const VueSSRServerPlugin = require('vue-server-renderer/server-plugin') module.exports = { // Point entry to your app's server entry file entry: '/path/to/server-handler.js', plugins: [ new VueSSRServerPlugin({ clientManifest: '/path/to/dist/client/vue-ssr-client-manifest.json', serverEntry: '/path/to/server-entry.js', template: '/path/to/template.html' }) ] } ``` And here is how the server handler would look like: ```javascript // alias defined by the plugin, returns the renderer import renderer from 'vue-ssr-server-renderer' export function handler(event, context) { // use renderer here } ``` The clear upside is the reduction of the boilerplate. The first big downside is that this would not be backwards compatible. It could be implemented as a new, different plugin. The second downside is that there might be other use cases I haven't considered. `createBundleRenderer` takes other arguments as well, and you might not want to instantiate it at the top level. A smaller downside is that some pieces are connected in webpack rather than in the code, making it unclear where the template is referenced from. #### 3. Use a loader to transform the server entry This would be similar to the first proposal, but it would change the way `createBundleRenderer` works. Starting from the server handler this time, here is how the usage would look like: ```javascript import App from '/path/to/server-entry.js' import clientManifest from 'client-manifest'; // This function has the client manifest already pulled in by the plugin import { createAppRenderer } from 'vue-server-renderer'; const template = `[...]`; const renderer = createAppRenderer(app, { clientManifest, template, runInNewContext: false }); export function handler(event, context) { // use renderer here } ``` And the webpack configuration would be something like this: ```javascript // webpack.config.js module.exports = { // Point entry to your app's server entry file entry: '/path/to/server-handler.js', module: { rules: [ { test: /entry-server\.js$/, loader: 'vue-ssr-loader' } ] }, resolve: { alias: { 'client-manifest': '/path/to/dist/client/vue-ssr-client-manifest.json' } } } ``` This approach would have the upside of not requiring magic to happen on the webpack entries, making it possible to have multiple entrypoints. The second upside would be to just configure a loader where appropriate, instead of adding a plugin. The first downside is that we still have to include the client manifest from the build. The second downside is that is could not be feasible with a webpack loader. #### So which one? I believe this problem needs a deeper reflection on the implications for all possible use cases, so someone with a better understanding of the usages of this plugin should trace the path to follow. Other ideas could be possible that would in the future also lead to simpler usages that hide the complexity from the users. <!-- generated by vue-issues. DO NOT REMOVE -->
feature request
low
Minor
398,668,571
opencv
dnn: assertion failure with multiple images
- OpenCV => 4.0.1-dev - Operating System / Platform => Windows 64 Bit - Compiler => mingw64 7.2.0 ##### Detailed description using the[ face_detector_uint8.pb](https://github.com/opencv/opencv_3rdparty/raw/8033c2bc31b3256f0d461c919ecc01c2428ca03b/opencv_face_detector_uint8.pb) model with multiple images (using dnn::blobFromImages), i get : ``` OpenCV(4.0.1-dev) Error: Assertion failed (start <= (int)shape.size() && end <= (int)shape.size() && start <= end) in total, file C:/p/opencv/modules/dnn/include/opencv 2/dnn/shape_utils.hpp, line 161 ``` debugging it, i found, that in the 2nd ScaleLayer, the `endAxis` exceeds the size of the `inpShape`: ``` Thread 1 hit Breakpoint 9, cv::dnn::ScaleLayerImpl::forward (this=0xa5c1090, inputs_arr=..., outputs_arr=..., internals_arr=...) at C:\p\opencv\modules\dnn\src\layers\scale_layer.cpp:94 94 CV_Assert(total(inpShape, axis, endAxis) == numWeights); (gdb) p inpShape $16 = std::vector of length 4, capacity 4 = {3, 32, 24, 32} (gdb) p axis $17 = 0 (gdb) p endAxis $18 = 5 // this is 2 with one image, and 5 with 3 of them ! ``` thus the assert fails here: https://github.com/opencv/opencv/blob/7e2ebecd52232d02e2d53f3e073c076be73e3470/modules/dnn/include/opencv2/dnn/shape_utils.hpp#L160-L161 ##### Steps to reproduce ``` dnn::Net net = dnn::readNetFromTensorflow("opencv_face_detector_uint8.pb","opencv_face_detector.pbtxt"); Mat f1=imread("../img/h1.png"); Mat f2=imread("../img/h2.png"); Mat f3=imread("../img/h3.png"); vector<Mat> vf {f1, f2, f3}; Mat blob = dnn::blobFromImages(vf, 1, Size(128,96), Scalar(104, 177, 123, 0), false, false); net.setInput(blob); Mat res = net.forward("detection_out"); ```
bug,affected: 3.4,category: dnn
low
Critical
398,681,094
create-react-app
Consider adding a lint rule to check for using `this.state` after calling `setState()`
One of the most frequent errors we see asked about in Reactiflux is when a user writes code like this: ```js this.setState({data : 123}); console.log(this.state.data); // Why isn't it "123" right now? ``` The issue is that new users haven't yet internalized that `setState()` is usually async, and so `this.state` is still the previous value when the log statement executes synchronously. Would it be worth adding a lint rule that specifically checks for accesses of `this.state` after a call to `this.setState()`, and warns about it? The lint rule might need to be scoped some to avoid false positives, such as only looking for uses of `console.log()` instead of any state access in general, or only looking for attempts to use specific fields that were referenced in `setState` or the entire state object. The [`eslint-plugin-react/no-access-state-in-setstate` rule](https://github.com/yannickcr/eslint-plugin-react/blob/84652b6527161f651a671754fb5f619296c3654e/lib/rules/no-access-state-in-setstate.js) might be a starting point for trying to write such a rule.
issue: proposal
low
Critical
398,683,771
go
x/mobile/gl: ctx.BufferData and ctx.BufferSubData with unsafe.Pointer
### What version of Go are you using (`go version`)? <pre> $ go version go version go1.11.4 windows/amd64 </pre> ### Does this issue reproduce with the latest release? Yes. ### What did you do? When working with OpenGL, meshes consist out of vertices and indices that need to be pushed into GPU buffers. The vertex array is usually of type `[]float32`, the index array is usually of type `[]uint16` or `[]uint32`. The Context-object in `golang.org/x/mobile/gl` (`gl.go` and `gldebug.go`) offers the following methods for pushing such buffer data: ``` func (ctx *context) BufferData(target Enum, src []byte, usage Enum) func (ctx *context) BufferSubData(target Enum, offset int, data []byte) ``` The problem here is that both functions require byte slices. In order to use them, the vertex/index arrays need to be converted first. If done in a safe way (without relying on go implementation details), the data effectively needs to be copied every time before it can be rendered. When rendering large amounts of data this is a significant (and unnecessary) performance impact. The implementation of Buffer(Sub)Data converts the incoming byte slice into an `unsafe.Pointer` - which is the format needed by the underlying OpenGL device. So this whole conversion is only needed to satisfy the function arguments. Using only `[]byte` within the application is rarely an option because vertex/index data needs to be manipulated to create dynamic scenes. This would only move the conversion to a different location. ### What did you expect to see? I suggest adding more generic functions for setting buffer data: ``` func (ctx *context) BufferData(target Enum, src unsafe.Pointer, size int, usage Enum) func (ctx *context) BufferSubData(target Enum, offset int, data unsafe.Pointer, size int) ``` This would allow users to write any type of slice into buffers without expensive conversion or unsafe/fragile casting. Alternatively (if the unsafe package should not face to the user) I suggest adding the following functions: ``` func (ctx *context) BufferData(target Enum, src []float32, usage Enum) func (ctx *context) BufferData(target Enum, src []uint16, usage Enum) func (ctx *context) BufferSubData(target Enum, offset int, data []float32) func (ctx *context) BufferSubData(target Enum, offset int, data []uint16) ```
Proposal,Proposal-Accepted,mobile
low
Critical
398,688,755
flutter
Feature: allow BottomNavigation to float above keyboard
As per this PR #14406 the `BottomNavigation` has been explicitly set to not float above the keyboard when it is open as per the Material Design spec, however there could be instances where this could actually be desirable. For instance, if you wanted to use the `BottomAppBar` as a chat text input field, this currently wouldn't be possible as the `BottomAppBar` cannot float above the keyboard. You may think "why would you want to do that in the first place", but the simple answer is that the `bottomNavigation` option in the `Scaffold` is actually nothing more than a footer component that all ready has the correct behaviour with `SnackBar`s, `BottomSheet`s and `FloatingActionButton`s. Having an option to allow this behaviour would make it much more simple for the developer to implement this kind of use case, which actually doesn't require much change to the `Scaffold` code.
c: new feature,framework,f: material design,P2,team-design,triaged-design
low
Major
398,689,975
TypeScript
Replace --preserveWatchOutput with --clearWatchOutput
<!-- 🚨 STOP 🚨 𝗦𝗧𝗒𝗣 🚨 𝑺𝑻𝑢𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section. --> ## Search Terms <!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily --> ## Suggestion A compiler should never default to erase information and should never assume that it is the only program outputting to a terminal. Instead of developers having to search for which program is clearing the console and fixing it, it should be an explicit setting. `tsc --preserveWatchOutput` should be removed and replaced with an explicit clear instruction, such as `tsc --clearWatchOutput` ## Use Cases <!-- 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 --> ## 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
398,698,333
go
net: TestLookupGmailTXT failing on Plan 9
Since CL [157638](https://golang.org/cl/157638), TestLookupGmailTXT is failing on Plan 9. ``` --- FAIL: TestLookupGmailTXT (0.01s) lookup_test.go:248: got [globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8=]; want a record containing spf, google.com lookup_test.go:248: got [globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8=]; want a record containing spf, google.com FAIL FAIL net 28.014s ``` See https://build.golang.org/log/10777f5ddff9d26836ac135c8c451166efa529ca
OS-Plan9,NeedsInvestigation
low
Major
398,702,390
TypeScript
It is not allowed to push a number to the array foo in {foo: []}
**TypeScript Version:** Playground **Search Terms:** never[] **Code** ```ts const foo = { foo: [] }; foo.foo.push(1); const bar = []; bar.push(1); ``` **Expected behavior:** TypeScript should infer foo to be of type `{ foo: any[] }` and therefore `foo.foo.push(1);` should be allowed like `bar.push(1);` is allowed **Actual behavior:** Line 2: Argument of type '1' is not assignable to parameter of type 'never'. **Playground Link:** https://www.typescriptlang.org/play/index.html#src=const%20foo%20%3D%20%7B%20foo%3A%20%5B%5D%20%7D%3B%0D%0Afoo.foo.push(1)%3B%0D%0A%0D%0Aconst%20bar%20%3D%20%5B%5D%3B%0D%0Abar.push(1)%3B%0D%0A **Related Issues:** <!-- Did you find other bugs that looked similar? -->
Bug,Domain: Control Flow
low
Critical
398,703,310
flutter
Reassemble method called too late when `hot reload`ing
Consider a widget that rebuilds very often (typically because of an animation). Then consider editing the sources of that widgets through hot-reload. It seems that when doing so, there's a chance for `build` method to be called _before_ `reassemble` was, but with the updated content. This is a big issue for the following open source library: https://github.com/rrousselGit/flutter_hooks As it needs to override the `reassemble` behavior to handle potential changes within `build` method. But if `build` method is called before `reassemble`, then the library won't be ready for it and the app will enter into an invalid state.
c: new feature,tool,framework,t: hot reload,P3,team-framework,triaged-framework
medium
Critical
398,722,496
TypeScript
generic function parameter infers boolean as true
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.3.0-dev.201xxxxx <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** true boolean generic function extends default **Code** ```ts const fn = <T extends boolean>(flag: T | false = false) => flag fn({} as boolean) // The only workaround? fn<boolean>({} as boolean) ``` **Expected behavior:** Expected `fn<boolean>(flag?: boolean)` to be inferred **Actual behavior:** Instead got `fn<true>(flag?: boolean)` as the inferred type. The issue stems from `T | false`, which is required for `= false` to work. **Playground Link:** [Click here](http://www.typescriptlang.org/play/#src=const%20fn%20%3D%20%3CT%20extends%20boolean%3E(flag%3A%20T%20%7C%20false%20%3D%20false)%20%3D%3E%20flag%0D%0Afn(%7B%7D%20as%20boolean)%20%2F%2F%20call%20inferred%20as%20fn%3Ctrue%3E()%20when%20it%20should%20be%20fn%3Cboolean%3E()%0D%0A) **Related Issues:** Possibly https://github.com/Microsoft/TypeScript/issues/28154
Suggestion,Needs Proposal,Domain: Type Inference
low
Major
398,742,116
godot
Texture mapping emission with GIProbe produces incorrect reflection
**Godot version:** v3.0.6.stable.official.8314054 **OS/device including version:** macOS Mojave 10.14.1 **Issue description:** When using a texture map in the emissive channel, reflections generated within a GIProbe display incorrectly. **Steps to reproduce:** 1. Download and Import the following test project 2. Select the GIProbe 3. Click "Bake GI Probe" 4. Pan the camera to see the incorrect reflection **Minimal reproduction project:** [map_emission_test.tar.gz](https://github.com/godotengine/godot/files/1240608/map_emission_test.tar.gz) I noticed this in my own project and, interestingly, was able to reproduce it with the same test project enclosed in #10534 ![image](https://user-images.githubusercontent.com/1456302/51096055-0ee9ce80-177f-11e9-842a-d7de51e7fdbd.png) ![image](https://user-images.githubusercontent.com/1456302/51096050-0396a300-177f-11e9-8e94-176e42754c7f.png) **Texture Map Used** ![image](https://user-images.githubusercontent.com/1456302/51096067-2c1e9d00-177f-11e9-8797-41d1033148cd.png)
bug,topic:rendering
low
Minor
398,784,658
vscode
Shrink empty lines
Visual Studio has a nice extension called "**Shrink Empty Lines**" which enables the user to have empty lines and/or lines without alphanumeric characters shrunk in the editor to a specific extent. This way users can have more vertical space for their actual code. https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.SyntacticLineCompression ![image](https://user-images.githubusercontent.com/5047891/67569604-98c3c080-f72f-11e9-9712-4554ffc54ddd.png) It would be very nice to have this feature on VS Code, maybe with an extra setting to specify shrinking percentage (or just an enumeration). I would have made an extension but this is clearly something not achievable through the current Extension API.
feature-request,editor-rendering
medium
Critical
398,786,284
neovim
Can't undojoin an append or setline in <C-R> mappings
- `nvim --version`: NVIM v0.3.2-996-g55c518588 - Vim 8.0 behaves the same way - Operating system/version: 4.15.0-38-lowlatency #41-Ubuntu SMP PREEMPT Wed Oct 10 12:26:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux ### Steps to reproduce using `nvim -u NORC` function CrMapping() undojoin | call append(line('.'), '') return '' endfunction imap <A-o> :<C-R>=CrMapping()<CR> ### Behaviour **append** and **setline** calls in \<C-R>=mappings() register individual intermediate changes regardless of undojoin. `undojoin | x,x delete`, however, does join the changes.
bug-vim,editor
low
Minor
398,796,644
rust
librustc_codegen_ssa: exported entry function symbol is hardcoded as "main"
Seems suspicious as observed by @Zoxc [here](https://github.com/rust-lang/rust/pull/57573/files/57886cf92a063f2ba1f51a44d4ecc85e2ba0256f#r247388333). Could we have in theory something like (or anything else): ```rust #[no_mangle] #[main] fn awesome_main() { ... } ``` which would make this logic wrong?
A-codegen,C-bug,requires-nightly
low
Major
398,823,844
go
testing: Benchmark calls during benchmarks deadlock
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.11.2 linux/amd64 </pre> ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? <details><summary><code>go env</code> Output</summary><br><pre> $ go env GOARCH="amd64" GOBIN="" GOCACHE="REDACTED" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="REDACTED" GOPROXY="" GORACE="" GOROOT="/usr/lib/google-golang" GOTMPDIR="" GOTOOLDIR="/usr/lib/google-golang/pkg/tool/linux_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=/tmp/go-build117573359=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### What did you do? Called testing.Benchmark in a Benchmark. The reason for this is that I wanted to check during benchmarks which one of two possible implementations would be faster on the current machine and for a set of given inputs. Here is a minimal repro that should be run as a benchmark to crash (must be in *_test.go and should be run with `go test -bench=. ` ) ```go package foo func Foo(n int) { // Dummy function to benchmark for i := 0; i < n; i++ { time.Sleep(time.Nanosecond) } } func BenchmarkFoo(b *testing.B) { res1 := testing.Benchmark(func(b *testing.B) { for i := 0; i < b.N; i++ { Foo(1) } }) res2 := testing.Benchmark(func(b *testing.B) { for i := 0; i < b.N; i++ { Foo(2) } }) b.Logf("Difference between executions is ~%dns", res2.NsPerOp()-res1.NsPerOp()) } ``` ### What did you expect to see? "Difference between executions is ~1ns ### What did you see instead? ``` goroutine 1 [chan receive]: testing.(*B).run1(0xc000096000, 0xc000096000) /usr/lib/google-golang/src/testing/benchmark.go:216 +0x9e testing.(*B).Run(0xc000096340, 0x5358f5, 0xc, 0x53d380, 0x4abe00) /usr/lib/google-golang/src/testing/benchmark.go:514 +0x26c testing.runBenchmarks.func1(0xc000096340) /usr/lib/google-golang/src/testing/benchmark.go:416 +0x78 testing.(*B).runN(0xc000096340, 0x1) /usr/lib/google-golang/src/testing/benchmark.go:141 +0xb2 testing.runBenchmarks(0x0, 0x0, 0xc00007e060, 0x616150, 0x1, 0x1, 0x80) /usr/lib/google-golang/src/testing/benchmark.go:422 +0x323 testing.(*M).Run(0xc0000b4000, 0x0) /usr/lib/google-golang/src/testing/testing.go:1042 +0x37c main.main() _testmain.go:42 +0x13d goroutine 7 [chan receive]: testing.(*B).run1(0xc0000964e0, 0xc0000964e0) /usr/lib/google-golang/src/testing/benchmark.go:216 +0x9e testing.Benchmark(0x53d370, 0x0, 0x0, 0x0, 0x0, 0x0) /usr/lib/google-golang/src/testing/benchmark.go:658 +0xd6 _/MYHOME/tmp/benchbug.BenchmarkFoo(0xc000096000) /MYHOME/tmp/benchbug/foo_test.go:16 +0x3f testing.(*B).runN(0xc000096000, 0x1) /usr/lib/google-golang/src/testing/benchmark.go:141 +0xb2 testing.(*B).run1.func1(0xc000096000) /usr/lib/google-golang/src/testing/benchmark.go:214 +0x5a created by testing.(*B).run1 /usr/lib/google-golang/src/testing/benchmark.go:207 +0x7d goroutine 22 [semacquire]: sync.runtime_SemacquireMutex(0x639c04, 0x0) /usr/lib/google-golang/src/runtime/sema.go:71 +0x3d sync.(*Mutex).Lock(0x639c00) /usr/lib/google-golang/src/sync/mutex.go:134 +0xff testing.(*B).runN(0xc0000964e0, 0x1) /usr/lib/google-golang/src/testing/benchmark.go:131 +0x31 testing.(*B).run1.func1(0xc0000964e0) /usr/lib/google-golang/src/testing/benchmark.go:214 +0x5a created by testing.(*B).run1 /usr/lib/google-golang/src/testing/benchmark.go:207 +0x7d exit status 2 FAIL _/MYHOME/tmp/benchbug 0.022s ``` ### Probable cause During the first iteration of `benchFunc` `run1` is executed. `run1` invokes `runN` which will run `run1`. The issue is that `runN` tries to acquire a global lock while holding it, causing the deadlock. Source for `runN`: ``` // runN runs a single benchmark for the specified number of iterations. func (b *B) runN(n int) { benchmarkLock.Lock() // ← acquiring global mutex defer benchmarkLock.Unlock() // Try to get a comparable environment for each run // by clearing garbage from previous runs. runtime.GC() b.raceErrors = -race.Errors() b.N = n b.parallelism = 1 b.ResetTimer() b.StartTimer() b.benchFunc(b) // ← This will run run1, which will call runN, which will deadlock ``` Source for `run1`: ```go // run1 runs the first iteration of benchFunc. It returns whether more // iterations of this benchmarks should be run. func (b *B) run1() bool { if ctx := b.context; ctx != nil { // Extend maxLen, if needed. if n := len(b.name) + ctx.extLen + 1; n > ctx.maxLen { ctx.maxLen = n + 8 // Add additional slack to avoid too many jumps in size. } } go func() { // Signal that we're done whether we return normally // or by FailNow's runtime.Goexit. defer func() { b.signal <- true }() b.runN(1) // ← Running runN }() <-b.signal ```
NeedsFix
low
Critical
398,871,054
kubernetes
β€œ--system-reserved” kubelet option cannot work as expected
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!--> **What happened**: start kubelet with below config: ``` [root@app ~]# cat /etc/systemd/system/kubelet.service.d/10-kubeadm.conf [Service] Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf" Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true" Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin" Environment="KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10 --cluster-domain=cluster.local" Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt" Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=8686" Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=cgroupfs" Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true --cert-dir=/var/lib/kubelet/pki" ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CGROUP_ARGS $KUBELET_CERTIFICATE_ARGS $KUBELET_EXTRA_ARGS --docker-root=/SkyDiscovery/docker --enforce-node-allocatable=pods,kube-reserved,system-reserved --kube-reserved-cgroup=/kube.slice --kubelet-cgroups=/kube.slice --runtime-cgroups=/kube.slice --system-reserved-cgroup=/system.slice --kube-reserved=cpu=2,memory=1Gi --system-reserved=cpu=2,memory=1Gi --eviction-hard=memory.available<5% [root@app ~]# ``` check the related cgroup file, get the following output: ``` [root@app ~]# cat /sys/fs/cgroup/cpu/system.slice/cpu.shares 2048 [root@app ~]# cat /sys/fs/cgroup/cpu/system.slice/cpu.cfs_period_us 100000 [root@app ~]# cat /sys/fs/cgroup/cpu/system.slice/cpu.cfs_quota_us -1 [root@app ~]# cat /sys/fs/cgroup/memory/system.slice/memory.limit_in_bytes 1073741824 [root@app ~]# ``` **What you expected to happen**: `/sys/fs/cgroup/memory/system.slice/memory.limit_in_bytes` is not limited. due to `memory.limit_in_bytes` is limited, may cause system services are killed by OOM, expect this config only affect the available memory resource for node(check with `kubectl describe node $node_name`) `cpu.cfs_quota_us=-1` means not set limit for CPU usage, but `memory.limit_in_bytes=1073741824` means set limit for memory usage, why the function of reserved cpu and reserved memory is differnent? **How to reproduce it (as minimally and precisely as possible)**: start kubelet service with config: ``` [root@app ~]# systemctl cat kubelet # /etc/systemd/system/kubelet.service [Unit] Description=kubelet: The Kubernetes Node Agent Documentation=http://kubernetes.io/docs/ After=cephfs-mount.service Requires=cephfs-mount.service [Service] ExecStartPre=/usr/bin/mkdir -p /sys/fs/cgroup/hugetlb/system.slice ExecStartPre=/usr/bin/mkdir -p /sys/fs/cgroup/cpuset/system.slice ExecStart=/usr/bin/kubelet Restart=always StartLimitInterval=0 RestartSec=10 [Install] WantedBy=multi-user.target # /etc/systemd/system/kubelet.service.d/10-kubeadm.conf [Service] Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf" Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true" Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin" Environment="KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10 --cluster-domain=cluster.local" Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt" Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=8686" Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=cgroupfs" Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true --cert-dir=/var/lib/kubelet/pki" ExecStart= ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CGROUP_ARGS $KUBELET_CERTIFICATE_ARGS $KUBELET_EXTRA_ARGS --docker-root=/SkyDiscovery/docker --enforce-node-allocatable=pods,kube-reserved,system-reserved --kube-reserved-cgroup=/kube.slice --kubelet-cgroups=/kube.slice --runtime-cgroups=/kube.slice --system-reserved-cgroup=/system.slice --kube-reserved=cpu=2,memory=1Gi --system-reserved=cpu=2,memory=1Gi --eviction-hard=memory.available<5% ``` **Anything else we need to know?**: i have read this doc: https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ and get these info: ``` Be extra careful while enforcing system-reserved reservation since it can lead to critical system services being CPU starved or OOM killed on the node.The recommendation is to enforce system-reserved only if a user has profiled their nodes exhaustively to come up with precise estimates and is confident in their ability to recover if any process in that group is oom_killed. ``` so it is reasonable to limit the file `/sys/fs/cgroup/memory/system.slice/memory.limit_in_bytes` ? if not use `--system-reserved`, the ` /sys/fs/cgroup/cpu/system.slice/cpu.shares ` will be `1024` by default, which will result in system services being CPU starved **Environment**: - Kubernetes version (use `kubectl version`): v1.10.12 - Cloud provider or hardware configuration: dell server PowerEdge R740 - OS (e.g. from /etc/os-release): CentOS7.4 - Kernel (e.g. `uname -a`): 3.10.0-693.el7.centos.x86.64 - Install tools: - Others:
kind/bug,area/kubelet,sig/node,priority/important-longterm,triage/accepted
high
Critical
398,916,548
flutter
Listview with shrinkwrap on the cross axis - impossible?
I have a column and I want to add an horizontal listview inside of it, but I can't seem to find a way to make the height of that listview fit. Shrinkwrap seems to apply only to the listview main axis (width/horizontal, in this case). I tried googling, asking on gitter, and even found some unanswered question on stackoverflow. Is it really impossible? is it a feature one could implement and send a PR? is anyone working on it? or perhaps I'm just going about this the wrong way completely? what am I missing?
c: new feature,framework,P2,team-framework,triaged-framework
low
Critical
398,950,149
pytorch
[docs] Missing argument description (value) in scatter_ function documentation
Documentation for ### scatter_ method lists the following arguments: **scatter_(dim, index, src)** It also, incorrectly, states that **src** can be a tensor or a float. But it looks like, that in release 1.0.0, **src** cannot be a single float number. When you want to write the single float value to the tensor, you need to use undocumented **value** parameter, not **src** parameter. E.g. my_tensor.scatter_(dim=1, index=index_tensor, value=0.0) cc @brianjo @mruberry
todo,module: docs,triaged,module: scatter & gather ops
low
Minor
398,996,952
rust
Consider whether repeated macro matchers need separator disambiguation for futureproofing
The following macro is valid, and can be used: ```rust macro_rules! ex { ($($i:expr),* , $($j:ty),*) => { }; } fn main() { ex!(a, dyn Copy); } ``` However, if it's invoked in an ambiguous way, such as with `ex!(a, b)`, then it gives an error (no lookahead is performed to `)` to determine an unambiguous parse; examples can be constructed that avoid this unambiguity anyway). Thus, while the original example compiles now, were `dyn Copy` to become a legal expression at some point in the future, it would become ambiguous. The issue here is that the separator `,` is re-used. In line with other futureproofing efforts like rust-lang/rfcs#550 and #56575, this should possibly be forbidden. The follow-set rule is insufficient to detect these cases as it only exists to allow us to promise in advance where a match is guaranteed to end; it's not sufficient to disambiguate between two potential parses starting from the same point. My first attempt at rules to forbid this are for the situation where we have `... $(tt ...) SEP? OP uu ...`, with `uu ...` possibly empty. In these, `FIRST*` is a variant on `FIRST` from RFC 550: it represents all terminal tokens that could appear in a valid match. Thus, `FIRST*($t:ty)` would be any `can_begin_type` token, plus any token we worry might be legally allowed to begin a type someday, and so on. 1. If `SEP` is present, we must have we must have `SEP \not\in FIRST*(uu ...)`, insisting that the seperator token in repetition will never be ambiguous. 2. When `OP` is not `+`, we must have`FIRST*(tt ...)` and `FIRST*(uu ...)` be disjoint, insisting that the question of whether we're repeating at all will not be ambiguous. For unseparated Kleene repeats, the second rule above, combined with the follow-set rule, are sufficient to disambiguate. I have no idea how frequently these potential ambiguities arise in practice. It might be a lot, it might be a little. I expect that the first rule, for separators, might be safe to add because most macros that would risk running into them cannot be invoked except with an empty repetition due to existing ambiguity (the first macro can be invoked as `ex!(,a)`, for instance, with an empty repetition for `$i` eliminating the ambiguity) and therefore could likely mostly be removed. The second rule, however, might be more commonly violated. cc @estebank @alexreg
A-macros
low
Critical
399,000,326
go
cmd/go: 'go get' with semantic-version prefix doesn't fall back to matching tag or branch
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.11.4 darwin/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="/Users/d.lopez/go/bin" GOCACHE="/Users/d.lopez/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/d.lopez/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11.4/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11.4/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/d.lopez/go/src/gitlab.mycompany.com/my-user/my-project/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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/6n/q8wt03m13_x3w6v5__mzkwgc0000gn/T/go-build342969942=/tmp/go-build -gno-record-gcc-switches -fno-common" </pre></details> ### What did you do? ``` go get github.com/sideshow/[email protected] ``` ### What did you expect to see? The package `apns2` added sucessfully to the `go.mod` file and downloaded to `pkg/mod` using pseudo-version or whatever although it doesn't have a valid semver tag (patch number missing). ### What did you see instead? This cryptic error (it took me several minutes to realize that a patch version was missing) ``` go get github.com/sideshow/[email protected]: no matching versions for query "v0.14" ``` ### Workaround The only workaround I found is to pin to the latest commit SHA inside the `v0.14` tag on the required repository. CC\ @bcmills
NeedsFix,modules
low
Critical
399,011,159
go
encoding/json: Map key marshals with MarshalText but unmarshals with UnmarshalJSON
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.11.4 darwin/amd64 </pre> ### Does this issue reproduce with the latest release? Yes ### What did you do? playgound: https://play.golang.org/p/4g3sHaRjh7z 1. Declare a struct type that implements all of `MarshalJSON`, `UnmarshalJSON`, `MarshalText`, `UnmarshalText`, where the JSON form is an object, not string. 2. Use that type as a map key in a map. 3. `json.Marshal` the map. Notice the MarshalText behavior is used to convert the map keys to strings in the resulting JSON object. 4. `json.Unmarshal` the JSON bytes from (3) into a new map. ### What did you expect to see? `json.Unmarshal` should use the map key's `UnmarshalText` method, because it is forced to be a JSON string. ### What did you see instead? `json.Unmarshal` used the type's `UnmarshalJSON` method on the map key data. ### Debugging TextMarshaler map keys were introduced in ffbd31e9f79ad8b6aaeceac1397678e237581064. The core issue is that `literalStore` always prefers `UnmarshalJSON` ([decode.go#L855](https://github.com/golang/go/blob/4b36e12/src/encoding/json/decode.go#L855)) before attempting `UnmarshalText` because `indirect` only returns one of the interfaces and prefers JSON to Text. This is correct in most cases, but for map keys we're calling literalStore explicitly because the value implements UnmarshalText ([decode.go#L776](https://github.com/golang/go/blob/4b36e12/src/encoding/json/decode.go#L776-L778)).
NeedsInvestigation
low
Critical
399,050,286
TypeScript
Include parameter information in quickInfo on function arguments
From https://github.com/Microsoft/vscode/issues/57341 <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.3.0-dev.201xxxxx <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** **Code** - Quick info - quickinfo - hover **Repo** For the js: ```js /** * @param {number} x Bla */ function foo(x) { } foo(123) ``` Hover over `123` **Current behavior** No quick info returned **Feature Request** Show the parameter name (`x`) and potentially other information about it when hovering over function arguments like `123`
Suggestion,Domain: JSDoc,Domain: Quick Info,Experience Enhancement
low
Major
399,053,438
TypeScript
Type checking doesn't work with extra function arguments
Extra argument types are inferred correctly but aren't checked. Looks like #17559 is implemented incompletely. And this code also breaks colorization by vscode like the following code. ```ts function f(): <T extends string>(a: T) => void { return (a, b = a) => { isFinite(a); isFinite(b); } } ``` cc @DanielRosenwasser @RyanCavanaugh <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** master <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** **Code** ```ts const f: () => void = (a = '') => isFinite(a); // should be error ``` **Expected behavior:** **Actual behavior:** **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> **Related Issues:** <!-- Did you find other bugs that looked similar? -->
Bug
low
Critical
399,073,409
go
cmd/go: outer module can provide packages that appear to be in an inner module
Consider two modules, one of which is nested in the other: ``` modcache/pkg/mod/foo.com β”œβ”€β”€ outer β”‚Β Β  └── [email protected] β”‚Β Β  β”œβ”€β”€ go.mod β”‚Β Β  └── p2 β”‚Β Β  └── y.go └── [email protected] β”œβ”€β”€ go.mod └── inner └── p └── x.go ``` Module `foo.com/outer/inner` contains `p2`, which would be imported as `foo.com/outer/inner/p2`. Module `foo.com/outer` contains `inner/p`, which would be imported as `foo.com/outer/inner/p`. I think most people would find this surprising. I certainly did. I had thought that the presence of a nested module "punched a hole" in the containing module, but I guess that's only true if the `go.mod` file is actually present in the source tree of the containing module? So if the two modules are developed on separate branches, as would have happened here, the hole-punching behavior doesn't happen? Is this a bug, or expected behavior? @bcmills, @jayconrod
Documentation,NeedsInvestigation,GoCommand,modules
low
Critical
399,074,396
kubernetes
Validate/test usage of service account credentials in cloud controller manager
**What would you like to be added** We have no coverage for whether bootstrap roles sufficiently cover RBAC with service account credentials for controllers in the cloud-controller-manager. As of today, they should use the same roles as kube-controller-manager. We should have tests/validation in place to ensure that this is covered in CI. A good place to start (though not easy) would be to just cover existing E2E tests on clusters with the cloud-controller-manager running (GCE and AWS ideally because we already run E2E tests there). That should validate most of the access the cloud-controller-manager needs (node registration, deletion, service update, etc). **Why is this needed**: Prevent bugs in the CCM, like what happened in https://github.com/kubernetes/kubernetes/pull/72764 /cc @cheftako @liggitt @mcrute @d-nishi
area/test,area/cloudprovider,kind/feature,lifecycle/frozen,sig/cloud-provider
low
Critical
399,103,570
vue
Transition's @appear hook invoked even when appear not specified / falsy
### Version 2.5.22 ### Reproduction link [https://codepen.io/anon/pen/jXdLGV](https://codepen.io/anon/pen/jXdLGV) ### Steps to reproduce Open the repro and note that the rendered page says "initial appear". ### What is expected? The `@appear` hook should not be invoked and the page should just say "initial". ### What is actually happening? The `@appear` hook is invoked even though the `transition` doesn't have an `appear` attribute, and hence shouldn't be triggering on appear. The same thing happens if you add `:appear ="false"` to the `transition`. --- Ran into this when building some custom transition components where `appear` should be user-controlled, but was being invoked all the time instead. <!-- generated by vue-issues. DO NOT REMOVE -->
bug,transition
low
Minor
399,114,845
scrcpy
GUI for Mac would be cool
Why not release a interface for this program?
feature request
low
Minor
399,146,741
node
error handler of same domain can be called several times when it throws
<!-- Thank you for reporting a possible bug in Node.js. Please fill in as much of the template below as you can. Version: output of `node -v` Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows) Subsystem: if known, please specify the affected core module name If possible, please provide code that demonstrates the problem, keeping it as simple and free of external dependencies as you can. --> * **Version**: Current tip of master (66f45e7e5b), but probably applies to all versions. * **Platform**: All platforms. * **Subsystem**: domain. <!-- Please provide more details below this comment. --> The following code: ``` 'use strict'; const common = require('../common'); const domain = require('domain'); const http = require('http'); const server = http.createServer((req, res) => { res.end(); }); let numDomainErrorListenerCalls = 0; function performHttpRequestWithDomain(cb) { const d = domain.create(); d.run(() => { const req = http.get({ host: '127.0.0.1', port: server.address().port }, (res) => { res.on('data', () => {}); res.on('end', () => { throw new Error('bang'); }); }); req.end(); }); d.on('error', (domainErr) => { console.log(++numDomainErrorListenerCalls); throw new Error('boom'); }); } server.listen(0, '127.0.0.1', () => { performHttpRequestWithDomain(common.mustCall(() => { server.close(); })); }); ``` gives the following output: ``` $ ./node test/parallel/test-http-req-domain-stack.js 1 2 /Users/jgilli/dev/node/test/parallel/test-http-req-domain-stack.js:30 throw new Error('boom'); ^ Error: boom at Domain.d.on (/Users/jgilli/dev/node/test/parallel/test-http-req-domain-stack.js:30:11) at Domain.emit (events.js:188:13) at Domain.EventEmitter.emit (domain.js:430:20) at Domain._errorHandler (domain.js:216:23) at Domain._errorHandler (domain.js:244:33) at Object.setUncaughtExceptionCaptureCallback (domain.js:132:29) at process._fatalException (internal/process/execution.js:102:29) ``` The uncaught exception is expected. What is not expected as far as I understand is for the same domain's error handler to run more than once. I believe the original intention of the domain's implementation is to [pop the domains stack when a domain's error handler throw](https://github.com/nodejs/node/blob/66f45e7e5b7ef661678eb48bb630bb99acc7618b/lib/domain.js#L233-L240), so that the domain that handles that new error is the "parent" domain. However, in the example above the same domain is pushed on the stack more than once. For instance, when an event is emitted from a nextTick callback, the same domain will be entered from [the nextTick callbacks scheduler](https://github.com/nodejs/node/blob/66f45e7e5b7ef661678eb48bb630bb99acc7618b/lib/internal/process/next_tick.js#L59) and then once again from the [event emitter](https://github.com/nodejs/node/blob/66f45e7e5b7ef661678eb48bb630bb99acc7618b/lib/domain.js#L449). Pushing the same domain on the stack more than once makes sense so that the components that push a domain can pop it from the stack. However, I think we could probably replace [the call to pop the stack once](https://github.com/nodejs/node/blob/66f45e7e5b7ef661678eb48bb630bb99acc7618b/lib/domain.js#L239) in the domain error handling code to remove all consecutive instances of that domain instead. @nodejs/domains Thoughts?
help wanted,domain
low
Critical
399,157,942
terminal
ENABLE_WRAP_AT_EOL_OUTPUT is not working with VT100
The cursor doesn't moves to the beginning of the next row when it reaches the end of the current row. It works as intended when VT100 is disabled. Windows build number: ```Microsoft Windows [Version 10.0.17134.523]``` Code: ```c++ #include <iostream> #include <string> #include <Windows.h> using std::string; using std::cout; using std::endl; int main() { HANDLE stdOut = GetStdHandle(STD_OUTPUT_HANDLE); DWORD consoleMode = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING; SetConsoleMode(stdOut, consoleMode); CONSOLE_SCREEN_BUFFER_INFO screenBufferInfo; GetConsoleScreenBufferInfo(stdOut, &screenBufferInfo); SHORT length = screenBufferInfo.dwSize.X; string str(length - 1, '.'); cout << str; int before = 0; int after = 0; GetConsoleScreenBufferInfo(stdOut, &screenBufferInfo); before = screenBufferInfo.dwCursorPosition.X; cout << 'x'; GetConsoleScreenBufferInfo(stdOut, &screenBufferInfo); after = screenBufferInfo.dwCursorPosition.X; cout << endl << "before: " << before << endl << "after: " << after << endl; } ``` Output: ``` before: 119 after: 119 ```
Product-Conhost,Area-Output,Issue-Bug
low
Major
399,221,900
go
os/signal: TestCtrlBreak fails with "exit status 0xc000013a" error
Our windows-arm builder occasionally fails https://build.golang.org/log/e345b763b3b62e4efd13bdfd95361fbc6655c3dd with ``` --- FAIL: TestCtrlBreak (14.29s) signal_windows_test.go:102: Program exited with error: exit status -1073741510 FAIL FAIL os/signal 25.339s ``` I do not have windows-arm computer to investigate, so @jordanrh1 please investigate. Strangely there is no output from the child process - only failed exit code. Also the exit code is -1073741510 = 0xFFFFFFFFC000013A. Maybe C000013A have some meaning - my Google foo failed me. Thank you Alex
Testing,OS-Windows,NeedsInvestigation,compiler/runtime
low
Critical
399,297,292
godot
Shader does not seem to work using the [Visual Shader Editor]
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** <!-- Specify commit hash if non-official. --> 3.1-beta.1 **OS/device including version:** <!-- Specify GPU model and drivers if graphics-related. --> - Windows 10 - GTX 1060 _(417.22)_ **Issue description:** I'm a beginner so it's probably my implementation that is wrong! The Texture turns white when I expect it to not change: <!-- What happened, and what was expected. --> ![image](https://user-images.githubusercontent.com/7990765/51176881-62166b00-18be-11e9-98e2-ec8f6ca75940.png) **Minimal reproduction project:** <!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. --> [test-shaders.zip](https://github.com/godotengine/godot/files/2759369/test-shaders.zip)
bug,topic:rendering,usability
low
Critical
399,305,161
vue
Modifier to propagate/forward events to parent
### What problem does this feature solve? Currently, and as far as I know, if we want to propagate an event fired by a child component to the parent (the child's grandparent) we need to $emit the event again, and we need to pass all the arguments one more time. This can become a problem, for example, if the event has a variable number of arguments because we need to specify them manually or pass the whole array as a new argument. The current way would be something like ``` @blur="$emit('blur')" @create="$emit('create', arguments[0])" @input="$emit('input', arguments[0], arguments[1])" ``` ### What does the proposed API look like? ``` @blur.propagate @create.propagate @input.propagate ``` And if we want to both handle the event and propagate it to the parent, we would use ``` @input.propagate="someFunction" ``` ---- EDIT: Maybe since .propagate may be confused with the function .stopPropagation(), a better term could be simply .emit <!-- generated by vue-issues. DO NOT REMOVE -->
feature request
high
Critical
399,307,619
go
cmd/vet: stdmethods check gets confused if run on a package named "xml"
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.11.4 darwin/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="/Users/jc/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/jc/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11.4/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11.4/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/pf/_mdvc42j193c4tf6kgfm80gcss_jqd/T/go-build565539251=/tmp/go-build -gno-record-gcc-switches -fno-common" </pre></details> ### What did you do? For example, if I have the following package: ``` package xml import ( "encoding/xml" "io" ) type XMLMap map[string]string type XMLMapEntry struct { XMLName xml.Name Value string `xml:",chardata"` } // UnmarshalXML func (m *XMLMap) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error { v := XMLMap{} for { var e XMLMapEntry err := dec.Decode(&e) if err == io.EOF { break } if err != nil { return err } v[e.XMLName.Local] = e.Value } *m = v return nil } ``` ### What did you expect to see? ``` go vet ./... < no output> ``` ### What did you see instead? ``` $ go vet ./... ./xml.go:16: method UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error ``` even if I try to alias `encoding/xml` import I still get same error. If instead I have the same code, but rename package: ``` package something ... <same code as before> ``` ``` go vet ./... < no output> ``` go vet doesn't seem to handle correctly if code is in package also named xml.
NeedsFix,Analysis
low
Critical
399,331,529
go
cmd/go: reject 'go generate' on packages in unreplaced module dependencies?
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.12beta2 linux/amd64 </pre> ### Does this issue reproduce with the latest release? Testing with the beta pre the 1.12 release. ### What operating system and processor architecture are you using (`go env`)? <details><summary><code>go env</code> Output</summary><br><pre> $ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/myitcv/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/myitcv/gostuff" GOPROXY="" GORACE="" GOROOT="/home/myitcv/gos" GOTMPDIR="" GOTOOLDIR="/home/myitcv/gos/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-build968143131=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### What did you do? Ran [`testscript`](https://github.com/rogpeppe/go-internal/blob/master/cmd/testscript/README.md) on the following: ``` go generate fruit.com/fruit -- go.mod -- module mod require fruit.com v1.0.0 -- main.go -- package main func main() { } -- .gomodproxy/fruit.com_v1.0.0/.mod -- module fruit.com -- .gomodproxy/fruit.com_v1.0.0/.info -- {"Version":"v1.0.0","Time":"2018-10-22T18:45:39Z"} -- .gomodproxy/fruit.com_v1.0.0/go.mod -- module fruit.com -- .gomodproxy/fruit.com_v1.0.0/fruit/fruit.go -- package fruit //go:generate bash -c "echo 'package fruit' > something.go" ``` ### What did you expect to see? A failed run. ### What did you see instead? ``` > go generate fruit.com/fruit [stderr] go: finding fruit.com v1.0.0 go: downloading fruit.com v1.0.0 go: extracting fruit.com v1.0.0 go: not generating in packages in dependency modules PASS ``` It feels like this should be an error instead of a noisy success. Reason being, I've specified the pattern of a non-main module package(s) on the command line; based on the current implementation, that will never succeed (even if there is a `replace` directive). cc @bcmills.
help wanted,NeedsFix,GoCommand,modules
low
Critical
399,392,055
rust
Stack overflow on cloning static boxed value with a generic impl
Here's a sample program that uses a static HashMap of structs containing boxed values: ```rust #[macro_use] extern crate lazy_static; use std::collections::HashMap; use std::sync::Mutex; use std::fmt::Display; trait Value: Send + Display { fn box_clone(&self) -> Box<dyn Value>; } impl Value for isize { fn box_clone(&self) -> Box<dyn Value> { Box::new((*self).clone()) } } impl Value for String { fn box_clone(&self) -> Box<dyn Value> { Box::new((*self).clone()) } } #[derive(Clone)] struct S { value: Box<dyn Value> } impl Clone for Box<dyn Value> { fn clone(&self) -> Box<dyn Value> { self.box_clone() } } lazy_static! { static ref Registry: Mutex<HashMap<String, S>> = { Mutex::new(HashMap::new()) }; } impl Registry { fn get(&self, key: &str) -> Option<S> { self.lock().unwrap().get(&String::from(key)).map(|s| s.clone()) } fn set(&self, key: &str, value: S) -> Option<S> { self.lock().unwrap().insert(String::from(key), value) } } fn main() { Registry.set("foo", S { value: Box::new(String::from("hello world")) }); Registry.set("bar", S { value: Box::new(123) }); println!("{}", Registry.get("foo").unwrap().value); println!("{}", Registry.get("bar").unwrap().value); } ``` It works as expected but when I replace redundant impl blocks with a generic one like this: ```rust impl<T: 'static + Send + Clone + Display> Value for T { fn box_clone(&self) -> Box<dyn Value> { Box::new((*self).clone()) } } ``` it fails with stack overflow in runtime: ``` thread 'main' has overflowed its stack fatal runtime error: stack overflow [1] 48231 abort cargo run ``` I'm new to Rust and not sure whether it's a bug. Maybe I just do something wrong. However I found the error strange because I don't explicitly do recursion or something else that potentially can lead to stack overflow here. Also it's weird that the compiler didn't find any problem because generics are compile-time concern. By the way when I replace static variable with a local one it works fine even with the generic impl. rustc 1.31.1 (b6c32da9b 2018-12-18), macOS 10.14.2
C-enhancement,A-lints,T-compiler
low
Critical
399,409,998
material-ui
[material-ui][docs] Create ADA compliance documentation
It would go a long way to help pitch Material UI as a solution if I could link to documentation covering the library's support for ADA compliance. I know Material UI does have at least some support for ADA/WCAG compliance, for instance through the use of "aria-" and "role" html attributes throughout the codebase to assist screen readers and the support for keyboard navigation such as in the Select component. Meanwhile, Material Design itself seems to lend itself nicely to following the WCAG guideline, for instance with regards to readability, navigation and high contrast text. However, without being a core contributor myself, I cannot speak to the library's compliance overall. I searched the material-ui.com website as well as past/present GitHub tickets and could not find a page in the documentation whose sole purpose was to outline what it does and does not do to be ADA compliant. Therefore, I am opening this ticket as a feature request to please create said documentation.
docs,accessibility
medium
Critical
399,494,815
TypeScript
Parameter hints do not get dismissed when the cursor moves
Presently, it appears that the parameter hint window does not get dismissed if it is brought up when invoking a function within the argument list of another function and you move out of the inner function's argument list. The popup changes to reflect its new position, but this is not a generally useful thing and in something like a giant argument list like a call to `webpackMerge` this is incredibly irritating. Couple this with the fact that the Vim extension does not dismiss the param hints when you press escape and it's pretty rough. It would be really nice if the parameter hints were dismissed when leaving the current argument list. I can see an argument for it remaining open while navigating around the current argument list, but if the cursor leaves that list and goes to an outer list, it should be dismissed. Thanks! <!-- Please search existing issues to avoid creating duplicates. --> <!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ --> <!-- Use Help > Report Issue to prefill these. --> - VSCode Version: 1.27.0 - insiders and 1.26.0 - OS Version: macOS 10.13.6 Steps to Reproduce: 1. Open a new file 2. Change to javascript mode 3. Enter the text: ```js const path = require('path') Array.isArray([ baz, ]) ``` 4. Place cursor on line after `baz` 5. Type `Array.apply(`. The parameter hint overlay should appear. 6. Press the up arrow. Expected: Parameter hint window is dismissed Actual: Parameter hint window remains covering code <!-- Launch with `code --disable-extensions` to check. --> Does this issue occur when all extensions are disabled?: Yes ![parameterhints](https://user-images.githubusercontent.com/8588/44206648-5d7f3800-a10f-11e8-82c6-6d499a3bff93.gif)
Suggestion,Awaiting More Feedback,Domain: Signature Help
low
Major
399,509,798
flutter
RenderViewportBase.getOffsetToReveal doesn't work on RenderSlivers when rect is provided
This came up while working on https://github.com/flutter/flutter/pull/26598: If the target parameter of [RenderViewportBase.getOffsetToReveal](https://master-docs.flutter.io/flutter/rendering/RenderViewportBase/getOffsetToReveal.html) is a RenderSliver, then the returned RevealedOffset may include an invalid `rect`. Similarly, if target is a RenderSliver and a rect is provided to getOffsetToReveal, then the returned RevealedOffset may be completely invalid.
framework,f: scrolling,P2,team-framework,triaged-framework
low
Minor
399,530,196
TypeScript
Allow Type Checking to be Extended (into Tagged Templates, for example)
## Search Terms Tagged Templates, template literals, JSX, htm, lit, lit-html, hyperhtml, nanohtml, choo ## Suggestion Many developers are exploring Tagged Templates as an alternative to JSX/TSX, as the result offers some important advantages. In particular, Tagged Templates parse faster than compiled JSX in all modern JS engines [1], and expose potential optimizations for consuming rendering libraries to be able to bypass comparison logic for identified static portions of a UI representation. Regardless of the merit of these advantages, one of the key drawbacks cited by developers when adopting Tagged Templates in place of TSX is the lack of typing within static templates and associated expression parts. This affects all libraries using Tagged Templates. > [1]: analysis and benchmark data forthcoming, email me for access if necessary. Using [htm](https://github.com/developit/htm) as an example: ```js interface Props { sticky: boolean; } function Header({ sticky }: Props) { return html`<header class=${'header' + (sticky ? ' sticky' : '')} />`; } render(html`<${Header} sticky=${'yes'} />`); // Incorrect type, but no error ^^^^^ ``` ([view example in playground](http://www.typescriptlang.org/play/#src=interface%20VNode%3CP%20%3D%20any%3E%20%7B%0D%0A%20%20%20%20tag%3A%20string%20%7C%20Component%3CP%3E%3B%0D%0A%20%20%20%20props%3A%20P%3B%0D%0A%20%20%20%20children%3A%20any%5B%5D%0D%0A%7D%0D%0A%0D%0Ainterface%20Component%3CP%20%3D%20%7B%7D%3E%20%7B%0D%0A%20%20%20%20(props%3A%20P)%3A%20VNode%3Cany%3E%20%7C%20null%3B%0D%0A%7D%0D%0A%0D%0Afunction%20render(html%3A%20string)%20%7B%0D%0A%20%20%20%20return%20html%3B%0D%0A%7D%0D%0A%0D%0Afunction%20h%3CP%3E(tag%3A%20string%20%7C%20Component%3CP%3E%2C%20props%3A%20%7B%7D%20%26%20P%20%7C%20null%2C%20...children%3A%20any)%3A%20VNode%20%7B%0D%0A%20%20%20%20return%20%7B%20tag%2C%20props%2C%20children%20%7D%3B%0D%0A%7D%0D%0A%0D%0A%2F%2F%20(%3C%3Esnip%3A%20parser%20for%20tagged%20template%20DSL)%0D%0Aconst%20html%20%3D%20(statics%3A%20TemplateStringsArray%2C%20...expr%3A%20any)%20%3D%3E%20statics.reduce((s%2C%20p%2C%20i)%20%3D%3E%20s%20%2B%20p%20%2B%20(i%20%3C%20expr.length%20%3F%20expr%5Bi%20%2B%201%5D%20%3A%20'')%2C%20'')%3B%0D%0A%0D%0Ainterface%20Props%20%7B%0D%0A%20%20%20%20sticky%3A%20boolean%3B%0D%0A%7D%0D%0Afunction%20Header(%7B%20sticky%20%7D%3A%20Props)%20%7B%0D%0A%20%20return%20html%60%3Cheader%20class%3D%24%7B'header'%20%2B%20(sticky%20%3F%20'%20sticky'%20%3A%20'')%7D%20%2F%3E%60%3B%0D%0A%7D%0D%0Arender(html%60%3C%24%7BHeader%7D%20sticky%3D%24%7B'yes'%7D%20%2F%3E%60)%3B%0D%0A)) Since the template's static parts are an unknown format, this is logical. However, consider the compiled output of the above: ```js interface Props { sticky: boolean; } function Header({ sticky }: Props) { return h('header', {class: 'header' + (sticky ? ' sticky' : '')}); } render(h(Header, { sticky: 'yes' })); // ^^^^^^ // Type 'string' is not assignable to type 'boolean'. ``` ([view example in playground](http://www.typescriptlang.org/play/#src=interface%20VNode<P%20%3D%20any>%20%7B%0D%0A%20%20%20%20tag%3A%20string%20%7C%20Component<P>%3B%0D%0A%20%20%20%20props%3A%20P%3B%0D%0A%20%20%20%20children%3A%20any%5B%5D%0D%0A%7D%0D%0A%0D%0Ainterface%20Component<P%20%3D%20%7B%7D>%20%7B%0D%0A%20%20%20%20(props%3A%20P)%3A%20VNode<any>%20%7C%20null%3B%0D%0A%7D%0D%0A%0D%0Afunction%20render(%7B%20tag%2C%20props%2C%20children%20%7D%3A%20VNode)%20%7B%0D%0A%20%20%20%20return%20%60<%24%7Btag%7D%24%7BObject.keys(props).reduce((s%2Ci)%3D>s%2Bi%2B'%3D"'%2Bprops%5Bi%5D%2B'"'%2C'')%7D>%24%7Bchildren.join('')%7D<%2F%24%7Btag%7D>%60%3B%0D%0A%7D%0D%0A%0D%0Afunction%20h<P>(tag%3A%20string%20%7C%20Component<P>%2C%20props%3A%20%7B%7D%20%26%20P%20%7C%20null%2C%20...children%3A%20any)%3A%20VNode%20%7B%0D%0A%20%20%20%20return%20%7B%20tag%2C%20props%2C%20children%20%7D%3B%0D%0A%7D%0D%0A%0D%0Ainterface%20Props%20%7B%0D%0A%20%20%20%20sticky%3A%20boolean%3B%0D%0A%7D%0D%0Afunction%20Header(%7B%20sticky%20%7D%3A%20Props)%20%7B%0D%0A%20%20return%20h('header'%2C%20%7Bclass%3A%20'header'%20%2B%20(sticky%20%3F%20'%20sticky'%20%3A%20'')%7D)%3B%0D%0A%7D%0D%0A%2F%2F%20Clearly%20a%20TypeError%0D%0Arender(h(Header%2C%20%7B%20sticky%3A%20'yes'%20%7D))%3B%0D%0A)) I would like to suggest that we need a solution for type-checking Tagged Templates. The shortest-path solution would be to special-case checking for Tagged Templates with a tag function that has a local identifier with the name `html`, though clearly that's not optimal as implementation of `html` can vary. ## Use Cases The use-case for this is to allow developers to express view hierarchies in standard JavaScript syntax rather than JSX/TSX, while preserving the typing support currently offered by TSX being integrated into TypeScript's parser. If a design were to be proposed to extend type checking to arbitrary opaque Tagged Templates (perhaps through plugins), this would allow a whole host of untyped code to be checked by the TypeScript Compiler. I'm fairly certain the various CSS-in-JS solutions would be also interested in this level of static analysis in order to errors currently handled at runtime into compilation. ## Examples ```js interface Props { sticky: boolean; } function Header({ sticky }: Props) { return html`<header class=${'header' + (sticky ? ' sticky' : '')} />`; } render(html`<${Header} sticky=${'yes'} />`); // ^^^^^^^^ // Type 'string' is not assignable to type 'boolean'. ``` ## 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). (specifically goals 1, 2 & 6) /cc @IgorMinar @JustinFagnani @RobWormald @Surma
Suggestion,Awaiting More Feedback
medium
Critical
399,551,536
rust
Tracking issue for future-incompatbility lint `ambiguous_associated_items`
#### What is this lint about With variants being resolved as inherent associated items (https://github.com/rust-lang/rfcs/pull/2338) code like this become ambiguous: ```rust enum E { V } trait Tr { type V; fn f() -> Self::V; } impl Tr for E { type V = u8; fn f() -> Self::V { 0 } // `Self::V` in type namespace may refer to both variant and associated type } ``` This is not a problem *right now*, because variants cannot be used in type positions, but it may become a problem in the future if https://github.com/rust-lang/rfcs/pull/2593 is accepted. So this lints warns against cases like this and recommends to rewrite them as `<Self as Tr>::V`. #### How to fix this warning/error Explicitly disambiguate in favor of associated types from traits: `<Type as Trait>::Ambiguous`. #### Current status - [x] https://github.com/rust-lang/rust/pull/57501 introduces the `ambiguous_associated_items` lint as warn-by-default - [x] https://github.com/rust-lang/rust/pull/59928 makes the `ambiguous_associated_items` lint deny-by-default - [ ] PR ? makes the `ambiguous_associated_items` lint a hard error
A-lints,A-associated-items,T-lang,T-compiler,C-future-incompatibility,C-tracking-issue
low
Critical
399,577,570
kubernetes
Allow Mutating|ValidatingWebhookConfiguration to use secret for CABundle
**What would you like to be added**: Allow Mutating|ValidatingWebhookConfiguration to reference content of a secret as CABundle. The following shows the idea. We can use better names than below. ``` type WebhookClientConfig struct { URL *string `json:"url,omitempty" protobuf:"bytes,3,opt,name=url"` Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"` CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,2,opt,name=caBundle"` // Optional field that reference a secret. CAFromSecret *CASecret } type CASecret struct { // the namespace of the secret Namespace string // the name of the secret Name string // the key in the secret. e.g. ca.key KeyName string } ``` This can also be applied to CRD conversion webhook **Why is this needed**: It will be very useful if the CA is rotated. Before: An admin or a controller (with permission to update WebhookConfiguration) need to update CABundle field if the CA has changed. After: The Webhook configuration will automatically pickup the new CA. EDIT: From the security PoV, another advantage is that no need to update the CA means we don't need to grant permissions to some controller for Updating the CABundle field in Mutating|ValidatingWebhookConfig. Current k8s authn doesn't support field-wise fine-grain access control. IOW, a compromised controller can modify the service field of MutatingWebhookConfig to point a random service that may inject an arbitrary container to each pod.
priority/awaiting-more-evidence,sig/api-machinery,kind/feature,area/admission-control,lifecycle/frozen
high
Critical
399,579,000
TypeScript
Suggestion: Sort autocomplete importable items by locality to current file
I have the "locality bonus" setting turned on. When VS Code suggests symbols in other TypeScript files (that aren't imported yet), I'd like them to be ordered so that symbols in files nearer to the current one are first. This would be helpful because my project has many interfaces with the same name (`State`) that only apply in particular areas. Most of the time I just want to import the interface defined in the same directory as the current file.
Suggestion,In Discussion
low
Minor
399,581,805
rust
Add command-line option to `rustc` for setting default `recursion-limit`
This'd be handy for using when many crates being compiled together need a higher recursion limit.
T-compiler,C-feature-request,A-CLI
low
Minor
399,585,160
go
net/http/httptest: httptest on Windows is IPv4-specific
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? go version go1.11.1 windows/amd64 ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? windows/amd64 ### What did you do? Run a test leveraging net/http/httptest on a host with IPv6 but without IPv4. To reproduce: 1. As administrator, run <pre>netsh interface ipv4 uninstall</pre> 1. Reboot 1. Execute an httptest as in https://play.golang.org/p/xlMUEEhgj5s ### What did you expect to see? Test would pass, since the client and server code were both valid, and pass when IPv4 is available. ### What did you see instead? 2019/01/15 17:26:59 Get http://[::1]:49679: dial tcp [::1]:49679: failed to find ConnectEx: An address incompatible with the requested protocol was used.
help wanted,OS-Windows,NeedsInvestigation
low
Critical
399,603,947
godot
Mono No errors reported for async functions, game continues
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** <!-- Specify commit hash if non-official. --> c6b587636b1e3cf27e566e6e5b10859316cbefb6 **OS/device including version:** <!-- Specify GPU model and drivers if graphics-related. --> Ubuntu 18.10, Mono 5.16 **Issue description:** <!-- What happened, and what was expected. --> When an async function fails to execute due to an error, it will not report the error to the console, and will not stop execution of the game. **Steps to reproduce:** Do something erroneous in an async function; observe that your mistake is not reported. ``` using Godot; using System.Threading.Tasks; public class TestScript : Node { public override void _Ready() { AsyncFunc(); } private async Task AsyncFunc() { GD.Print("Running..."); var myArray = new int[3]; myArray[4] = 0; //Whoopsie-doodle! GD.Print("Done."); } } ``` **Minimal reproduction project:** <!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. --> [NoAsyncError.zip](https://github.com/godotengine/godot/files/2762149/NoAsyncError.zip)
discussion,usability,topic:dotnet
low
Critical
399,669,740
TypeScript
Introduce 'extends type' and 'extends modifier' or phantom types to simplify the language and speed it up.
Basically when using [k in keyof] and mutating structures in ways that can be found at these repositories it becomes apparent that to simplify the learning cure it would be better if the type modifiers such as optional/required/undefined/readonly|null can be accessed and interrogated separately from the type and modifiers mashed together.. So one can focus on writing a routine that would iterate the type to be integorate for the architectural structure/shape if to call it that, which allow one to write super fast simple methods to recursively no the difference between Record<string,any>, Array<any>, never, unknown. instead of having to do the following: T extends Record<string,any> | undefined | readonly | null ? then recuse, else step over. ## The following type integogation operators. 1. extends ? mix of the type and modifiers 2. extends type ? just the base type without any modifiers (can only be single type else undefined) so string | number = undefined, string = string, number = number, array = array, record = record, class = class, constructor = constructor, one needs to be able to differential record, which is interface from Date so require have a phantom type if the interface was generate from a class or something the features a constructor. Otherwise one will iterate into custom types like Date, which is a problem. 3. extends modifiers ? Which just allows evaluation of modifiers. hopefully not a list in the backend implementation of the compiler code, hopefully just true and false flags for speed ## Phantom types Maybe just implement the concept of phantom symbols, that don't actually exists, were by optional/required, nullable, readonly, type can be access like : T[PT.Required] extends true ? .. T[PT.Nullable] extends true ? ... T[PT.Readonly] extends true ? ... T[PT.Type] extends true ? ... T[PT.Cusom] extends true ? ... // For passing other information that doesn't exist to validate typings. allow one to create the own phantom types, which information we will pass onto for downstream validation in some complex situations like Mongoose Update Statement validation which has 3 parts. [Work around Mongoose Update Statment](https://github.com/wesleyolis/mongooseRelationalTypes/blob/master/src/mongooseUpdateStatment.ts) [Work around Mongoose Types](https://github.com/wesleyolis/mongooseRelationalTypes/blob/master/src/mongoose.ts ) https://github.com/Microsoft/TypeScript/issues/28699 ## 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
Minor
399,677,645
rust
Confusing error message: the trait bound `String: From<impl Into<String>>` is not satisfied
[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=cdcd8450f4c81cab2c3c297bcf51e7ef) ```rust struct Foo(String); trait Bar { fn buz(&self, s: impl AsRef<str>) -> Foo; } impl Bar for () { fn buz(&self, s: impl Into<String>) -> Foo { Foo(s.into()) } } ``` The true error is that the trait signature is different than the `impl` block (and maybe the `impl` keyword shall not be in the trait as yet?). The message however, is really confusing: ```text error[E0277]: the trait bound `std::string::String: std::convert::From<impl Into<String>>` is not satisfied --> src/lib.rs:6:5 | 6 | fn buz(&self, s: impl Into<String>) -> Foo | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<impl Into<String>>` is not implemented for `std::string::String` | = help: consider adding a `where std::string::String: std::convert::From<impl Into<String>>` bound = note: required because of the requirements on the impl of `std::convert::Into<std::string::String>` for `impl Into<String>` = note: the requirement `impl Into<String>: std::convert::Into<std::string::String>` appears on the impl method but not on the corresponding trait method error: aborting due to previous error ```
C-enhancement,A-diagnostics,T-compiler,D-confusing
low
Critical
399,687,348
godot
InputEventMouse.global_position doesn't return global position
Godot version: v3.1.beta1.official OS: Ubuntu 18.10 This can easily be seen by having a camera around & moving it and on a node place: ```gdscript func _unhandled_input(event: InputEvent) -> void: if event is InputEventMouse: print(get_global_mouse_position(), event.position, event.global_position) ``` Output eg.: ``` (2398.499023, 814.499573)(1918.499878, 742.499939)(1918.499878, 742.499939) ``` `event.global_position == even.position` is `true`.
bug,confirmed,topic:input
low
Major
399,774,003
vue
Allow nested transition to trigger upon removal
### Version 2.5.22 ### Reproduction link [https://jsfiddle.net/wx91uLft/](https://jsfiddle.net/wx91uLft/) other: https://jsfiddle.net/ae82rfnv/ ### Steps to reproduce - Show/hide elements with the "Toggle" button. - Show/hide elements with the "Toggle Ticked" button. Shows a workaround. ### What is expected? All transitions should be triggered on leave, even for nested child elements. ### What is actually happening? Transition classes don't get applied to nested child elements, when conditions for leaving transitions occur on the same tick. Workaround: Delaying the parent transitions by one tick fixes the problem. --- This has been reported, but got closed due to the sample code did not use `appear` on the `<transition>` elements. (See issues [#7643](https://github.com/vuejs/vue/issues/7643) and [#9243](https://github.com/vuejs/vue/issues/9243)) My example is more detailed and also provides a workaround. <!-- generated by vue-issues. DO NOT REMOVE -->
feature request,transition
low
Major