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
399,775,072
opencv
Potential bug (rounding error?) in cv::mean() in OpenCV 4.0.0
## System information (version) - OpenCV => 4.0.0 (maybe 3.4.x for x > 0) - Operating System / Platform => Windows 10, 64 Bit - Compiler => Visual Studio 2017 ## Detailed description We encountered a problem(?) with the ``cv::mean()`` function while switching from **OpenCV 3.4.0** to **OpenCV 4.0.0** lately. Given the following image and mask ![img](https://user-images.githubusercontent.com/2692578/51246633-24334880-198b-11e9-920e-6f354a14f7ec.png) ![mask](https://user-images.githubusercontent.com/2692578/51246643-25fd0c00-198b-11e9-88d1-67305b2e0b2c.png) and the following code ```c++ cv::Mat img = cv::imread("img.png", cv::IMREAD_GRAYSCALE); cv::Mat mask = cv::imread("mask.png", cv::IMREAD_GRAYSCALE); cv::Scalar mean = cv::mean(img, mask); ``` we get the following values for `mean[0]`: * `255.00000000000000` for **OpenCV 3.4.0** and * `255.00000000000003` for **OpenCV 4.0.0**. Unfortunately, a lot of checks like `mean[0] <= 255` will now fail as you can imagine... ## Steps to reproduce Download the above images and run the above code. ## Wild guess We had a brief look at the source code differences between the aforementioned OpenCV versions with respect to the ``cv::mean()`` function. The only changes we could found were: **OpenCV 3.4.0** - modules/core/src/stat.cpp ```c++ 1500 uchar* ptrs[2]; 1514 buf = _buf; ``` **OpenCV 4.0.0** - modules/core/src/mean.cpp ```c++ 130 uchar* ptrs[2] = {}; 144 buf = _buf.data(); ``` Unfortunately, we don't have resources to further investigate this issue on our own, but hopefully, we could provide a clue into the right direction.
category: core
low
Critical
399,815,022
TypeScript
Undocumented node_modules/@types fallback strategy for classic module resolution
I'm using TypeScript 2.7.2 with MSBuild 15.9.21.664 A fallback was added to classic module resolution to resolve modules using node_modules/@types in this PR https://github.com/Microsoft/TypeScript/pull/11147 Going purely from the Module Resolution section of the handbook, I would have expected this behaviour only when using node module resolution. This is undocumented behavior is an issue because the fallback will override any ambient module declarations in the resolution process. To give some context, I have a ASP.NET MVC project that uses MSBuild to compile TypeScript. This project takes advantage of some TypeScript files in a separate NPM project located up a few directions on in the File system by using the following csproj syntax: ```` <TypeScriptCompile Include="..\..\external-typescript-project\src\Cat.ts"> <Link>Scripts\app\Cat.ts</Link> </TypeScriptCompile> ```` When MSBuild shells out to tsc it does so like `tsc "..\..\external-project\src\Cat.ts"`. So far so good, except if both projects share the same TypeScript definition dependency i.e. if both the MVC project and external NPM project have a TypeScript definition for jQuery, the "..\..\external-typescript-project\node_modules@types\jquery.index.d.ts" is used in preference to the MVC project's ambient jQuery module declaration. If I manually delete the "..\..\external-typescript-files\node_modules@types\jquery.index.d.ts" file the MVC project gets the correct ambient module declaration. In an ideal world I'd disable MSBuild triggering the compilation using `<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>` and manage TypeScript definition dependencies using NPM with module resolution "node", but the entire project relies on ambient module declaration files in a custom ".\typescript-definitions" folder which gets passed to the TypeScript compiler i.e. `tsc "..\..\external-project\src\Cat.ts" "typescript-definitions\jquery\index.d.ts"`, so it would be a tricky migration. My understanding is path mapping would solve the issue, but unfortunately this isn't supported by MSBuild. I would like the ability to opt-out of falling back to node_modules/@typings when using classic module resolution, or at the very minimum this behaviour could be documented.
Suggestion,Awaiting More Feedback,Add a Flag
low
Minor
399,826,366
rust
Misleading code change suggestion in E0106
I'm writing this in relation to the following StackOverflow question: https://stackoverflow.com/q/54217705/1091116 Consider the following code: ```rust extern crate clap; use clap::{App}; use std::io; fn parse_argv() -> &'static clap::ArgMatches { return App::new("example") .get_matches() } fn main() -> io::Result<()> { let matches = parse_argv(); Ok(()) } ``` This is the error: <!-- language: none --> error[E0106]: missing lifetime specifier --> src/main.rs:6:29 | 6 | fn parse_argv() -> &'static clap::ArgMatches { | ^^^^^^^^^^^^^^^^ help: consider giving it a 'static lifetime: `clap::ArgMatches + 'static` | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from Now, the part that is troublesome is: help: consider giving it a 'static lifetime: `clap::ArgMatches + 'static` I believe that compiler should give a clearer error message here, a suggestion on how to proceed or no code change suggestion at all. Doing as the compiler suggests doesn't solve them problem and results in the error message not going away.
T-compiler,C-bug,A-suggestion-diagnostics
low
Critical
399,879,587
vue
Vue-Mobx integration broken with PR #7828
### Version 2.5.18 ### Reproduction link [https://codesandbox.io/s/k90k8kwn2r](https://codesandbox.io/s/k90k8kwn2r) ### Steps to reproduce * Use the `mobxjs/mobx-vue` package (or a custom integration with Mobx) * Everything worked fine on Vue 2.5.17 and is broken on 2.5.18 and above * See that TypeErrors are thrown ### What is expected? Vue would not attempt to to set the `__proto__` property of a Proxy. ### What is actually happening? Reactivity with Mobx is broken: [Vue warn]: Error in event handler for "input": "TypeError: 'set' on proxy: trap returned falsish for property '__proto__'" --- We attempted to upgrade Vue from 2.5.17 to latest version for our applications - thought it would be smooth because upgrade target was still 2.5.x, but ever version after 2.5.18 is broken with Mobx integration. We have a custom integration with Mobx-state-tree, but some of the code is very similar to `mobxjs/mobx-vue` integration code. We are not using that library, and I'm not a Vue internals expert, but I _think_ I tracked the problem down to this PR: https://github.com/vuejs/vue/pull/7828. Since then I have searched around and found this issue reported to that package also: https://github.com/mobxjs/mobx-vue/issues/15#issuecomment-453570397. @Nemikolh wrote the codesandbox example I referenced above and it appears to be the same conclusion. <!-- generated by vue-issues. DO NOT REMOVE -->
need repro
low
Critical
399,886,802
go
cmd/go: `go mod download -json` is incomplete
### 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. ### 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/steb/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/steb/projects/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" 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=/run/user/1000/tmp/go-build023848120=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### What did you do? 1. Ran `go mod download -json`. 2. Bundled up all files listed in the JSON output (adding `/list` files as needed). 3. Tried to replay this bundle, using an HTTP server as a GOPROXY. ### What did you expect to see? `go build`, `go mod download` should work without fetching anything. ### What did you see instead? `go build` and `go mod download` is getting 404 errors due to files missing from the bundle. It looks like `go build` is trying to fetch: 1. Packages mentioned in `go.sum` files that aren't actually needed for the build (as far as I can tell, at least). 2. Older (minor) versions of packages mentioned in some dependencies' go.mod files. I'd expect `go mod download -json` to return a list of *every* downloaded package. --- Context: I'm trying to integrate `go mod` with IPFS. * Dead-simple (but easy to read) bash implementation: https://gist.github.com/Stebalien/7bfd1ea07f81c1fbbe9eadac4faeccd3 * Slightly better (but more complicated) go implementation: https://github.com/Stebalien/ipgo/blob/master/main.go Testing against: https://github.com/anacrolix/torrent/tree/ipgo
NeedsFix,early-in-cycle,modules
low
Critical
399,903,537
electron
Add new protocol interceptor that allows delegating to URLRequestHttpJob
**Is your feature request related to a problem? Please describe.** As a user of electron, I want to be able to intercept http requests and optionally send a response back. If I don't choose to send a response I want it to be handled by chrome's network stack. **Describe the solution you'd like** I'd like to add a new protocol like interceptFooProtocol that: * Calls into a handler at various points in the request job (at the start of the request, after headers are constructed, when headers are received, etc) * Allows optionally providing a http response for the job * If an http response is not provided, delegates to `URLRequestHttpJob` in chrome **Describe alternatives you've considered** * Use `interceptStreamProtocol` and use the node network stack * The problem with this is that `URLRequestHttpJob` does a lot under the hood, and rewriting it in js is possible, but a lot of work. Among other things it adds headers, manages cookies, and checks ssl certs for pinning. * The other problem is that as bugs arise with interceptStreamProtocol it still needs to go through electron to be fixed, vs calling into `URLRequestHttpJob` and knowing that it will be handled the same as chrome. * Use [WebRequest](https://electronjs.org/docs/api/web-request) to intercept * This only allows inspecting the request or cancelling it, you can't provide an http response as far as I can see. **Additional context** * This would be helpful in bringing [offline support to nativefier](https://github.com/jiahaog/nativefier/issues/680). * I've also been discussing this with Ryan Patterson who's working on [chronicler](https://github.com/CGamesPlay/chronicler) (cc @CGamesPlay)
enhancement :sparkles:
low
Critical
399,937,160
scrcpy
The LG K8 does not operate the mouse wheel
I play the **Bowling King** game through **scrcpy** (phenomenal app) and I have a problem. My keys are all keys except the dial when I need to play the ball. Then I need to **roll back** the wheel and the ball should drop to go, but it will not. I found this instruction but I do not know if this is for this problem. At this address. How can I fix this? Thank you. https://github.com/Genymobile/scrcpy/pull/27
input events
low
Major
400,017,429
flutter
SliverPersistentHeaderDelegate.build overlapsContent does not work reliably
I'm trying to add a border underneath of a sliver in a `CustomScrollView` once that sliver is pinned to the top of the scroll container, so I created a `SliverPersistentHeader`, but `overlapsContent` in my `SliverPersistentHeaderDelegate.build` method is always `false`. After doing some digging, I think this issue can be reliably reproduced on any `SliverPersistentHeader` that is the FIRST `SliverPersistentHeader` in a `CustomScrollView`. For example, let's work with the collapsible scrolling list demonstrated at the end of this article: https://medium.com/flutter-io/slivers-demystified-6ff68ab0296f#bde5. Let's modify the `_SliverAppBarDelegate.build` method as such: ```dart Widget build( BuildContext context, double shrinkOffset, bool overlapsContent, ) { return SizedBox.expand( child: Container( color: overlapsContent ? Colors.red : Colors.lightBlue, child: child, ), ); } ``` And let's update `makeHeader` as such: ```dart SliverPersistentHeader makeHeader(String headerText) { return SliverPersistentHeader( pinned: true, delegate: _SliverAppBarDelegate( minHeight: 60, maxHeight: 200, child: Center(child: Text(headerText)), ), ); } ``` These changes should make it so when a header becomes pinned, its background turns from blue to red. If you actually test this out, this change works for all of the headers EXCEPT for the first one. ``` ❯ flutter doctor -v [✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14.2 18C54, locale en-US) • Flutter version 1.0.0 at /Users/maxlapides/flutter • Framework revision 5391447fae (7 weeks ago), 2018-11-29 19:41:26 -0800 • Engine revision 7375a0f414 • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297) [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3) • Android SDK at /Users/maxlapides/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-27, build-tools 27.0.3 • ANDROID_HOME = /Users/maxlapides/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) • All Android licenses accepted. [✓] iOS toolchain - develop for iOS devices (Xcode 10.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.1, Build version 10B61 • ios-deploy 1.9.4 • CocoaPods version 1.6.0.beta.1 [✓] Android Studio (version 3.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 31.3.1 • Dart plugin version 181.5656 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) [✓] VS Code (version 1.30.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 2.21.1 [✓] Connected device (2 available) • Max's iPhone • 65760f04a8cdf8dc55bf798b8cf0ab5cf488674c • ios • iOS 12.1.2 • iPhone XS • 9CFC4B23-BE03-4DC9-B1CD-5E1226F5A183 • ios • iOS 12.1 (simulator) • No issues found! ```
framework,f: scrolling,has reproducible steps,P2,found in release: 1.21,found in release: 2.10,customer: flex,team-framework,triaged-framework
low
Major
400,026,764
pytorch
build failure with NNAPI enabled (Caffe2 path but under pytorch umbrella)
I am able to build pytorch on CPU only/Ubuntu18.04/gcc6 regularly with USE_NNAPI=OFF. However, if I enabled USE_NNAPI=ON by modifying the related CMakeLists.txt all the way down to /caffe2/mobile/contrib/nnapi. I got the failure when building the excusable ` ../bin/nnapi_benchmark `. All the related build command is: `cd /pytorch/build/caffe2 sudo /usr/bin/c++ -fvisibility-inlines-hidden -D_FORCE_INLINES -D_MWAITXINTRIN_H_INCLUDED -D__STRICT_ANSI__ -fopenmp -DUSE_FBGEMM -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wno-unused-but-set-variable -Wno-maybe-uninitialized -DHAVE_AVX_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -Wl,-rpath,$ORIGIN -rdynamic -pthread CMakeFiles/nnapi_benchmark.dir/mobile/contrib/nnapi/nnapi_benchmark.cc.o -o ../bin/nnapi_benchmark -Wl,-rpath,/home/tim/pytorch/build/lib: ../lib/libgtest_main.a -Wl,--no-as-needed, /home/tim/pytorch/build/lib/libcaffe2.so -Wl,--as-needed ../lib/libprotobuf.a ../lib/libc10.so /usr/lib/x86_64-linux-gnu/libgflags.so.2.2.1 -lpthread /usr/lib/x86_64-linux-gnu/libglog.so ../lib/libgtest.a -pthread /home/libneruralnetworks.so` The failure report is: ``` CMakeFiles/nnapi_benchmark.dir/mobile/contrib/nnapi/nnapi_benchmark.cc.o: In function `caffe2::(anonymous namespace)::benchmark_conv_nnapi(caffe2::Workspace*, int, int, int, int, int, int, int, int, int) [clone .constprop.529]': nnapi_benchmark.cc:(.text+0xae3): undefined reference to `caffe2::NNApi::run(std::vector<caffe2::Tensor*, std::allocator<caffe2::Tensor*> > const&, std::vector<caffe2::Tensor*, std::allocator<caffe2::Tensor*> >*)' nnapi_benchmark.cc:(.text+0xaf9): undefined reference to `caffe2::NNApi::run(std::vector<caffe2::Tensor*, std::allocator<caffe2::Tensor*> > const&, std::vector<caffe2::Tensor*, std::allocator<caffe2::Tensor*> >*)' nnapi_benchmark.cc:(.text+0xb07): undefined reference to `caffe2::NNApi::run(std::vector<caffe2::Tensor*, std::allocator<caffe2::Tensor*> > const&, std::vector<caffe2::Tensor*, std::allocator<caffe2::Tensor*> >*)' nnapi_benchmark.cc:(.text+0xb2a): undefined reference to `caffe2::NNApi::run(std::vector<caffe2::Tensor*, std::allocator<caffe2::Tensor*> > const&, std::vector<caffe2::Tensor*, std::allocator<caffe2::Tensor*> >*)' nnapi_benchmark.cc:(.text+0xb82): undefined reference to `caffe2::NNApi::~NNApi()' nnapi_benchmark.cc:(.text+0xf24): undefined reference to `caffe2::NNApi::~NNApi()' CMakeFiles/nnapi_benchmark.dir/mobile/contrib/nnapi/nnapi_benchmark.cc.o: In function `caffe2::NNApi::NNApi(caffe2::NetDef const&, caffe2::NetDef const&, caffe2::Workspace*, PreferenceCode)': nnapi_benchmark.cc:(.text._ZN6caffe25NNApiC2ERKNS_6NetDefES3_PNS_9WorkspaceE14PreferenceCode[_ZN6caffe25NNApiC5ERKNS_6NetDefES3_PNS_9WorkspaceE14PreferenceCode]+0x296): undefined reference to `caffe2::NNApi::loadNNApiLibrary()' ``` However, the `/home/tim/pytorch/build/lib/libcaffe2.so` should have NNApi implementation. Since I can see the NNApi symbols in the *so: ``` nm --defined-only /home/tim/pytorch/build/lib/libcaffe2.so | grep NNApi 0000000001487a80 t _ZN6caffe25NNApi10addPoolingERKNS_11OperatorDefE13OperationCodeb 000000000148a430 t _ZN6caffe25NNApi10addSoftmaxERKNS_11OperatorDefE 00000000014862f0 t _ZN6caffe25NNApi15addFloatOperandEf 00000000014864b0 t _ZN6caffe25NNApi15getConvPoolArgsERKNS_14ArgumentHelperERNS0_12ConvPoolArgsE 0000000001486130 t _ZN6caffe25NNApi16addScalarOperandEi 0000000001487420 t _ZN6caffe25NNApi16addTensorOperandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11OperandCodeRSt6vectorIjSaIjEEfi 0000000001486120 t _ZN6caffe25NNApi16loadNNApiLibraryEv 000000000148c0f0 t _ZN6caffe25NNApi3runERKSt6vectorIPNS_6TensorESaIS3_EEPS5_ 000000000148aab0 t _ZN6caffe25NNApi4initERKSt6vectorIPNS_6TensorESaIS3_EEPS5_ 0000000001488560 t _ZN6caffe25NNApi7addConvERKNS_11OperatorDefEb 000000000148a070 t _ZN6caffe25NNApi7addReluERKNS_11OperatorDefE 0000000001487620 t _ZN6caffe25NNApiD1Ev 0000000001487620 t _ZN6caffe25NNApiD2Ev ``` cc @malfet @seemethere @walterddr
module: build,caffe2,triaged
low
Critical
400,044,834
godot
Polygon2D texture not displaying correctly.
<!-- 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. --> 9c1768836f25e780a7ef51a1d18a0a15e0b55e42 **OS/device including version:** <!-- Specify GPU model and drivers if graphics-related. --> Win10 64bit **Issue description:** <!-- What happened, and what was expected. --> When using a atlas/region texture resource for the polygon texture, it works fine in the polygon editor, but shows the whole source texture in the canvas editor and in game. From this: ![godot_master_2019-01-17_01-21-26](https://user-images.githubusercontent.com/13004169/51285278-ff74ba80-19f6-11e9-9f66-cd9ec18c61d5.png) To this: ![godot_master_2019-01-17_01-21-40](https://user-images.githubusercontent.com/13004169/51285281-026fab00-19f7-11e9-93a2-bdf7ebb5d319.png) **Steps to reproduce:** 1. Create an atlas texture resource. 2. Assign it to a Polygon2D's texture. 3. Create the points of the polygon. **Minimal reproduction project:** <!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. --> [3.1 Polygon Texture Issue.zip](https://github.com/godotengine/godot/files/2766502/3.1.Polygon.Texture.Issue.zip)
bug,topic:rendering,confirmed,topic:2d
medium
Critical
400,046,570
vscode
Disable Multiple Cursors
I don't use the 'multiple cursors' feature, and there doesn't appear to be any way to turn it off. You can change the key binding between ctrl and alt, but there's no way to prevent multiple cursors from being created altogether. If you use these modifiers for other things, it's easy to accidentally create multiple cursors in random places and end up with text in areas you don't expect. Being able to set this key binding to 'none' would probably be sufficient.
feature-request,editor-multicursor
high
Critical
400,094,176
TypeScript
Auto fixable quick fixes
VS Code is investigating the concept of autofixable quick fixes. You can find the current proposal [here](https://github.com/Microsoft/vscode/issues/62110#issuecomment-454182230) ## Motivating use case You open the following TS file: ```ts interface IFoo { bar(): void; } class Foo implements IFoo { } new foo() ``` This file has two errors: incorrect interface implementation on `class Foo` and a spelling error in `new foo()` You hit `F8` to start navigating through errors. While navigating, you can hit a single keyboard shortcut to auto implement the interface or to correct `foo` -> `Foo` ## Current VS Code proposal To implement auto fixes, VS Code [currently proposes](https://github.com/Microsoft/vscode/issues/62110#issuecomment-454182230) that some quick fixes be marked with a `canAutoApply` flag. This flag would indicate that: - The quick fix will fix the underlying problem (and not suppress it or hide it) - The quick fix can be fairly safely automatically applied without user input - The provider of the quick fix is relatively confident that the quick fix could be correct (100% confidence is not required since the auto fix is being triggered by a user action). More importantly, the quick fix should be easy to undo if it is incorrect When the user hits `auto fix` in VS Code, if only a single `canAutoApply` quick fix is returned for a diagnostic, VS Code would automatically apply it. If multiple `canAutoApply` fixes are returned, we would show a list of these for the user to select from. The existing, more complete list of quick fixes and code actions could still be accessed using the lightbulb menu ## Proposal for TS The UX experience of being able to auto fix errors with a single keyboard shortcut is very nice and I think we can make reasonable fix assumptions about a fair number of real world errors. The work that would be required on the TS side to support the proposed auto fix feature in VS Code: - Add an optional `canAutoApply` property on the TS `CodeFix` objects - Add some logic to decide when a fix can be marked as `canAutoApply`. `//@ts-ignore` fixes for example should never be marked as `canAutoApply` but spelling errors, add missing `this`, and perhaps even `add missing import` could be. The initial implementation would only need to support `canAutoApply` for a small set of diagnostics, which could be expanded in future releases. /cc @DanielRosenwasser, @minestarks, @amcasey
Suggestion,API,Domain: TSServer,Domain: Quick Fixes,Experience Enhancement
low
Critical
400,096,870
TypeScript
"fix everything in this file" code action
VS Code is investigating an api for better support for fixing all fixable errors in a file with a single action. This action could also be triggered on save. You can find the current proposal [here](https://github.com/Microsoft/vscode/issues/62110#issuecomment-454182230) ## Motivating use case You change a file's extension from `ts` to `js` and start seeing lots of errors about converting your old jsdocs to real types. Thankfully you've enabled `"editor.codeActionsOnSave": { "source.autoFix": true }` in VS Code and TypeScript has implemented this feature. So you just save the file and all your jsdocs are converted to types (along with fixing other trivial errors) ## Current VS Code proposal The current VS Code [proposal](https://github.com/Microsoft/vscode/issues/62110#issuecomment-454182230) for this requires that extensions return a single source code action marked as `autoFix`. This action would contain all auto-fix edits for the file. We'd handle applying these edits on save. ## Proposal for TS To implement this properly for TS, we likely need a new TS server api that would take a file and return a set of edits that fix all of the trivial errors within that file. Making this a single API call per file allows TS to properly handle overlapping fixes within the file. Candidates for what could be fixed automatically: - Errors with one, well known quick fix, such as `convert jsdocs to types` - Trivial coding errors where the intent of the programmer was clear. I see this feature as being especially helpful for JS -> TS. The initial implementation would only need to support fixes for a small set of diagnostics, which could be expanded in future releases. /cc @DanielRosenwasser, @minestarks, @amcasey
Suggestion,In Discussion,API,Domain: TSServer,Domain: Quick Fixes
low
Critical
400,105,862
TypeScript
Private Members with Default Value on Class Extension Compiles with Member declarations before Super call if function is called before super
<!-- 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:** * "Private member compile" * "Private Properties before super" * "compile class extension" * "constructor order at compile time" * "functions before super call" **Code** ```ts function example ( number: number ) { return number; } class ExtString extends String { private x: number; private y: number = 10; z: number; constructor(...args){ example(args[0]); super(...args); this.z = 19; } } ``` **Expected behavior:** I would expect that when the above code compiles, that the private members get initialized with values after the super call like below: ``` function example(number) { return number; } class ExtString extends String { constructor(...args) { example(args[0]); super(...args); this.y = 10; this.z = 19; } } ``` **Actual behavior:** the private members which have values gets assigned to before the super call. This behaviour only happens when I call a function before a super call, even if said function does not alter `this` in the code (like below). ``` function example(number) { return number; } class ExtString extends String { constructor(...args) { this.y = 10; example(args[0]); super(...args); this.z = 19; } } ``` This results in a compile time error. **Related Issues:** <!-- Did you find other bugs that looked similar? --> I found a similar bug that is referenced here [#8277](https://github.com/Microsoft/TypeScript/issues/8277)
Bug
low
Critical
400,127,366
ant-design
Select组件tag模式下,可以用鼠标或者方向键 选中已输入的tag,并且复制
- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate. ### What problem does this feature solve? 很多情况想复制Select tag模式下的tag。但是目前无法选中。 最根本的诉求是可以复制选中的tag或者全选tag,就像input标签中的文字一样,然后在复制。 可以指定 分隔符="," 来合并成成一段文本放到剪切板 ### What does the proposed API look like? 添加props // textSelectable用于判定是否可以选中 textSelectable:boolean = false, // textJoinToken用于表示选中的字已何种形式连接并复制在剪切板 textJoinToken:string = "," <!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Inactive
low
Minor
400,205,671
scrcpy
Remote Control API
We're currently using scrcpy to perform a series of QA tests. We use it to stream the screen content in one direction and user inputs in the other direction. While this works well, the tasks are quite repetive and so we started writing some automations for this. Something like: If (screen shows x) then click(x, y). To do so we have written an external software that copies the screen content from scrcpy and eventually send events like mouse clicks to it. While this works more or less sufficient for our needs, it still lacks some features. For example, we must keep the scrcpy window shown (i.e. not minimized) and the user must keep the mouse still while the automation is in progress. Also, we haven't found a way to input multi touch gestures. It would be very handy if the scrcpy comes as library (or with a library) or exports that would allow a programmatic extraction of data and supplying input data to it. Any thoughts about it? It shouldn't be that complicated and I'm willing to help, but at the moment I have no idea how much work this will be in the end or whether this is already possible in some way.
feature request
low
Major
400,215,968
go
cmd/go: clarify the impact of the -tags flag on test/build caching
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version devel +4b3f04c </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="~/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="~" GOPROXY="" GORACE="" GOROOT="~/go" GOTMPDIR="" GOTOOLDIR="~/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-build224479533=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### What did you do? Read the documentation for build/test caching from `go help test`. Then ``` $ go test -tags noasm gonum.org/v1/gonum/mat ok gonum.org/v1/gonum/mat 44.695s $ go test -tags noasm gonum.org/v1/gonum/mat ok gonum.org/v1/gonum/mat (cached) ``` From this it's clear that `-tags` is not counted in test flags (and this is reasonably given the wording). <!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. --> ### What did you expect to see? No caching. ### What did you see instead? Happily, caching. While the wording is consistent with the apparent intended meaning, it could be made clearer that build flags do not impact on caching for tests (if this is true - I could find no mention of caching in `go help build` or `go help install` or mention of which flags prevent caching (other than `-a` in `go help cache`)).
Documentation,help wanted,NeedsFix
low
Critical
400,278,049
go
cmd/compile: eliminate memory allocation for non-int n in slice extension idiom
The slice extension idiom from #21266 doesn't work in go tip for non-int `n` in `append(a, make([]T, n)...)`: ```go func BenchmarkExtendInt(b *testing.B) { var buf []byte b.ReportAllocs() n := int(12345) for i := 0; i < b.N; i++ { buf = append(buf[:0], make([]byte, n)...) } } func BenchmarkExtendUint64(b *testing.B) { var buf []byte b.ReportAllocs() n := uint64(12345) for i := 0; i < b.N; i++ { buf = append(buf[:0], make([]byte, n)...) } } ``` Benchmark results: ``` BenchmarkExtendInt-4 10000000 145 ns/op 0 B/op 0 allocs/op BenchmarkExtendUint64-4 1000000 1576 ns/op 13568 B/op 1 allocs/op ``` As you can see, if `n` has a type other than `int`, go doesn't remove the allocation.
Performance,NeedsFix,compiler/runtime
low
Major
400,306,293
TypeScript
symbolToName does handle exports of namespaces
**TypeScript Version:** 3.2.2 **Search Terms:** symbolToName, exports, declaration, `.d.ts` TypeScript cannot emit the name for a symbol that's declared in an inner namespace but re-exported in the outer namespace. That is, emitting the type name of a symbol does not take an alias created by an `export {x as y}` statement into account. This comes up when trying to use the `chrome.debugger` declaration file. Because `debugger` is a reserved keyword, the `.d.ts` is defined using a fake, unexported inner namespace called `_debugger`, and re-exports it using `export {_debugger as debugger};`. TypeScript then cannot produce `.d.ts` files when trying to generate the name for a symbol. **Code** ```ts // decl.d.ts declare module chrome { namespace _debugger { export class Foo {} } export function getFoo(): debugger.Foo; export {_debugger as debugger}; } // user.ts export const x = chrome.getFoo(); ``` Run `tsc --declaration`. **Expected behavior:** ``` // user.d.ts export declare const x: chrome.debugger.Foo; ``` **Actual behavior:** ``` test.ts:1:14 - error TS4025: Exported variable 'x' has or is using private name '_debugger.Foo'. 1 export const x = chrome.getFoo(); ~ ``` **Playground Link:** n/a **Related Issues:** <!-- Did you find other bugs that looked similar? -->
Bug,Domain: Declaration Emit
low
Critical
400,383,802
flutter
Feature Request: publish flutter package as a native framework to cocoapods
Support a native command to publish a package to cocoapods so native apps can also use it hassle-free. Fastlane could be a huge help to publish it easily and upgrade versions etc. A native app should be able to consume my package with just adding a simple pod into his Podfile. `pod "MyPod"`
c: new feature,platform-ios,tool,a: existing-apps,t: xcode,P3,team-ios,triaged-ios
low
Major
400,406,031
node
Create node/doc/guides/writing-docs.md
Currently we don't seem to have a guide for writing docs – or at least not one that I can find. In the [`node/doc/guides`](https://github.com/nodejs/node/tree/master/doc/guides) directory, there seems to be examples for [writing and running benchmarks](https://github.com/nodejs/node/blob/master/doc/guides/writing-and-running-benchmarks.md) and [writing tests](https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md), but not one for writing docs. I'd be happy to help take this on if someone could provide a list of bullets that would need to be addressed as steps to write docs within the file.
help wanted,doc,discuss
low
Minor
400,422,740
kubernetes
Handle recovery from resize failure
Currently when resize fails of a volume it keeps retrying indefinitely. This leads to two problems: 1. Unnecessary API usage for an action that is not going to succeed (for example when you are out of quota on cloud provider or out of bricks on glusterfs). 2. Sometimes user may want to retry volume expansion with lower value. For example - my current PVC is of 12GB and I tried to expand it to 40GB. But that failed. Now I want to retry volume expansion with 20GB except I can’t. /sig storage cc @bswartz @saad-ali
kind/bug,sig/storage,lifecycle/frozen
low
Critical
400,440,020
TypeScript
Add "find assignment references"
<!-- 🚨 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 find usage reference as LVALUE langauge services assignment read write ## Suggestion Add a language feature that will find a variable/property "x" when assigned a value in the code (or otherwise is used as an LVALUE). ## Use Cases Allows a user to find where a variable/property is **_set_** as opposed to **_defined_** or _**read**_. ## Examples When searching in VSCode, and my cursor is on "name" in `x = myPerson.name` a "**find LVAUE references**" call _**would**_ return... `myPerson.name = "Jim";` or `this.name = "Ann";` or `myOtherPerson.name = "Arlo";` but _**not**_ `class person { name: string; }` or `print(myPerson.name);` or `x = myPerson.name`
Suggestion,Domain: TSServer,Domain: Symbol Navigation,Rescheduled
low
Critical
400,482,588
go
cmd/compile: misleading panic on deferred func
### What version of Go are you using (`go version`)? <pre> $ go version go version devel +75f4aa86ba Thu Sep 27 22:02:08 2018 +0000 linux/amd64 </pre> ### What did you do? https://play.golang.org/p/3aP7yqgWXdf ### What did you expect to see? The panic stack trace should point to where a nil pointer was dereferenced. ### What did you see instead? The panic stack trace pointed at an innocent line. This is pretty similar to #14646 and #16011. The panic points at a line that is clearly quite capable of yielding that panic, so it led me on a wild goose chase. It took using gdb (gasp!) to figure out that the defer was involved. Consider this an argument for revisiting the "working as intended" judgment on #16011; it was a bug in my code, but the stack trace was very confusing. If there was a way to indicate that the deferred function was being executed I would have spotted the issue earlier. The regular stack trace does not indicate that. gdb, however, shows `runtime.jmpdefer` as the immediate stack frame, which is how I figured it out.
NeedsInvestigation,compiler/runtime
medium
Critical
400,490,675
terminal
Exiting from Full Screen mode incorrectly restores window size
Version 10.0.17763.253 Start cmd.exe Enter command `mode 80, 25` Go to window menu - Properties - Layout Check that Window Size is 80 x 25 indeed Close Properties Press Alt+Enter twice to enter and exit full screen Go to window menu - Properties - Layout Check Window Size again. This time it's not 80 x 25, but 78 x 24. This happens because exiting full screen restores the original **outer** window size (with the title, borders etc., say, 802 x 532px), however: - Entering full screen increases the buffer size (which is fine) - Exiting full screen doesn't change the buffer size (which is also fine) - The console window now has to display scrollbars (also fine), but since it's outer size is the same it has to display them at the expense of console viewport area. This causes an issue in an app that automatically syncs buffer size with window size - after every switch to full screen and back window size gets smaller, the app reduces the buffer size accordingly, eventually going down to nothing. Also, even if an app doesn't do anything like that, reducing the viewport size can make some (potentially important) information invisible. Please consider preserving the console viewport size and increasing the outer window size to make room for scrollbars.
Product-Conhost,Help Wanted,Area-Interaction,Issue-Bug,Priority-3,good first issue
low
Major
400,497,012
go
cmd/go: trim go.sum without adding module requirements
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? go version go1.11.4 linux/amd64 ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? ``` GOARCH="amd64" GOBIN="" GOCACHE="/home/user/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/user/go" GOPROXY="" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/d/14-Workspace/go/github.com/F21/somerepo/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build348706889=/tmp/go-build -gno-record-gcc-switches" ``` ### What did you do? 1. Create go.mod: `go mod init github.com/F21/somerepo`. 2. Populate `go.mod` and `go.sum` by running `go test ./...`. 3. One of the dependencies `github.com/uber/jaeger-client-go` conflicts with another dependency, so I bumped it to master: `go get github.com/uber/jaeger-client-go@master`. 4. There are now 2 entries for `github.com/uber/jaeger-client-go` in my go.sum: ``` github.com/uber/jaeger-client-go v2.15.0+incompatible h1:NP3qsSqNxh8VYr956ur1N/1C1PjvOJnJykCzcD5QHbk= github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.15.1-0.20190116124224-6733ee486c78+incompatible h1:b2A4zBpOpzqZoSlqlJ3OOe0yjd577TnQIHG1/KN7U8E= github.com/uber/jaeger-client-go v2.15.1-0.20190116124224-6733ee486c78+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= ``` The `github.com/uber/jaeger-client-go v2.15.0+incompatible` entries are unnecessary as the project is now pinned to `github.com/uber/jaeger-client-go v2.15.1-0.20190116124224-6733ee486c78+incompatible (current master)`. In https://github.com/golang/go/issues/26381, the ability to trim `go.sum` was added to `go mod tidy`. However, `go mod tidy` is something I avoid as it pulls in all test dependencies for all my dependencies and their dependencies for all platforms. Unfortunately, `go mod tidy` has burnt me quite a few times and causes a lot more problems than it solves. See: - https://groups.google.com/forum/#!topic/golang-nuts/5otdvVra0xg - https://github.com/golang/go/issues/27920 ### What did you expect to see? I'd like to be able to trim unneeded entries from go.sum without having to run `go mod tidy` as its current behavior causes a lot more problems than it solves. ### What did you see instead? N/A.
NeedsDecision,FeatureRequest,modules
low
Critical
400,498,010
TypeScript
[feature request] not sure how to word this: "infer generic arg type/constraint in wrapping type"
<!-- 🚨 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 Sometimes we want to wrap an existing type, where the existing type has generic type args that have constraints using `extends`. ## Use Cases For example, this is material-ui's `WithStyles` type: _____________ and I can wrap it like this to make one of it's properties optional: ```ts // omit a set of keys from a type type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>> // like Partial, but choose which keys are optional instead of making all of them optional type Optionalize<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>> // my wrapper type: export type WithStyles_OptionalClasses< Style extends string | StyleRules | StyleRulesCallback = string, IncludeTheme extends boolean | undefined = false > = Optionalize<WithStyles<Style, IncludeTheme>, 'classes'> ``` ## Examples But it'd be nice if we could just pass along the args, not having to re-define them. Maybe it would look like the following, and achieve the same thing: ```ts export type WithStyles_OptionalClasses<Style, IncludeTheme> = Optionalize<WithStyles<Style, IncludeTheme>, 'classes'> ``` and it would take advantage of the fact that `WithStyles` already has the constraint, so if we pass something into `WithStyles_OptionalClasses` that doesn't meet the constraint defined by `WithStyles`, then it could throw an error just like when using `WithStyles` by itself. ## Checklist My suggestion meets these guidelines: * [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code **not sure** * [x] This wouldn't change the runtime behavior of existing JavaScript code * [x] This could be implemented without emitting different JS based on the types of the expressions * [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) * [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals). **not sure**
Suggestion,In Discussion
low
Critical
400,498,080
rust
--emit=dep-info or some flag should include rlibs & externally linked files that will be used
Currently, `--emit=dep-info` only shows source files that are included in the current crate. There should be another mode (or the behavior should be extended) to include all files that will be used by the equivalent non-`dep-info` invocation of `rustc`. This includes `rlibs` of all crates used by the build, both explicitly in `--extern` and brought in through lib search paths, as well as external object files etc. that may be linked in. This is necessary in order to add Rust support to remote compilers and compiler caches, which depend on the exact hashes of all files used in the build. Note that AFAICT sccache currently works around this by relying on some behaviors of `cargo` and depending on all the libraries contained in link paths. (@luser / @alexcrichton please correct me if I'm wrong here). I'd like to instead ensure that we can ship the exact set of files needed for compilation, both of libraries, and for the final link step. i'm sure what I've written above is probably partially incorrect and misrepresentative somehow, but hopefully others will correct my errors and we can work towards a solution together :) cc @juliehockett @petrhosek
T-compiler,C-feature-request
low
Critical
400,500,745
go
x/build: plan9-386 builder fails
@0intro, what's doing on here? /cc @bcmills @dmitshur ``` bradfitz@gdev:~/src/golang.org/x/build$ debugnewvm -host=host-plan9-386-gce -rev=6e9f664b9a68f2de84be9697c6ac851c7c7e1c26 -run-build=plan9-386 2019/01/17 22:00:47 Creating debug-temp-1547762447 (with VM image "plan9-386-v7") 2019/01/17 22:00:52 instance requested 2019/01/17 22:01:16 instance created 2019/01/17 22:01:16 got instance info 2019/01/17 22:01:16 About to hit http://10.240.0.4 to see if buildlet is up yet... 2019/01/17 22:01:16 SERIAL: SeaBIOS (version 1.8.2-20181112_143635-google) Total RAM Size = 0x00000000e6600000 = 3686 MiB CPUs found: 4 Max CPUs supported: 4 found virtio-scsi at 0:3 virtio-scsi vendor='Google' product='PersistentDisk' rev='1' type=0 removable=0 virtio-scsi blksize=512 sectors=20971520 = 10240 MiB drive 0x000f29f0: PCHS=0/0/0 translation=lba LCHS=1024/255/63 s=20971520 Booting from Hard Disk 0... pcirouting: BIOS workaround: PCI.0.1.3 at pin 1 link 96 irq 10 -> 9 no vga; serial console only disk loader cpu0: 2503MHz GenuineIntel P6 (cpuid: AX 0x306E4 DX 0x1F8BFBFF) ELCR: 0C00 497M memory: 497M kernel data, 0M user, 18M swap found partition #S/sd01/data 0 20,971,520 disks: sd01 trying sd01....found 9pccpuf .1177998...............................................................................................................................................+2411120.......................................................................................................................................................................................................................................................................................................+488404=4077522 entry: 0xf0100020 Plan 9 E820: 00000000 0009fc00 memory E820: 0009fc00 000a0000 reserved E820: 000f0000 00100000 reserved E820: 00100000 bfffd000 memory E820: bfffd000 c0000000 reserved E820: fffbc000 100000000 reserved E820: 100000000 126600000 memory cpu0: 2502MHz GenuineIntel P6 (cpuid: AX 0x306E4 DX 0x1F8BFBFF) ELCR: 0C00 #l0: virtio: 1Gbps port 0xC040 irq 11: 42010af00004 3072M memory: 184M kernel data, 2887M user, 3512M swap /boot/usbd: /dev/usb: no hubs /boot/usbd: /dev/usb: no hubs boot: can't open /srv/usb: '/srv/usb' file does not exist time... fossil(#S/sd01/fossil)...version...aux/randfs: '/bin/aux/randfs' does not exist downloading git .... .... 2019/01/17 22:01:51 About to hit http://10.240.0.4 to see if buildlet is up yet... 2019/01/17 22:01:52 SERIAL: starting buildlet script 2019/01/17 22:01:52 About to hit http://10.240.0.4 to see if buildlet is up yet... 2019/01/17 22:01:52 client buildlet probe error: Get http://10.240.0.4: dial tcp 10.240.0.4:80: connect: connection refused 2019/01/17 22:01:53 SERIAL: 2019/01/17 17:01:51 buildlet starting. 2019/01/17 17:01:51 Will listen on :80 2019/01/17 17:01:51 Adjusted MTU. 2019/01/17 17:01:51 Listening on :80 ... 2019/01/17 22:01:53 About to hit http://10.240.0.4 to see if buildlet is up yet... 2019/01/17 22:01:53 buildlet probe: 200 OK 2019/01/17 22:01:53 WorkDir: /tmp/workdir, <nil> 2019/01/17 22:01:53 Pushing 'go1.4' Go bootstrap dir ... 2019/01/17 22:01:54 SERIAL: 2019/01/17 17:01:52 writetgz: untarring https://storage.googleapis.com/go-builder-data/gobootstrap-plan9-386.tar.gz (got heade 2019/01/17 22:02:02 Pushing 'go' dir... 2019/01/17 22:02:02 SERIAL: 2019/01/17 17:02:01 extracted tarball into /tmp/workdir/go1.4: 3521 files, 479 dirs (8.680247435s) 2019/01/17 22:02:04 SERIAL: 2019/01/17 17:02:02 writetgz: untarring https://go.googlesource.com/go/+archive/6e9f664b9a68f2de84be9697c6ac851c7c7e1c26.tar.g 2019/01/17 22:02:17 Running src/all.rc ... :: Running /tmp/workdir/go/src/all.rc with args ["/tmp/workdir/go/src/all.rc"] and env ["terminal=generic /sys/src/9/pc/pccpuf" "cputype=386" "service=cpu" "bootfile=sd01!9fat!9pccpuf" "nobootprompt=local!#S/sd01/fossil" "bootargs=local!#S/sd01/fossil" "bootdisk=#S/sd01/fossil" "console=0 b115200" "dmamode=ask" "installurl=http://148.251.6.120/plan9/download" "partition=new" "mouseport=ps2intellimouse" "monitor=vesa" "vgasize=1280x1024x32" "user=glenda" "sd01part=plan9 63 20964825/9fat 63 204863/nvram 204863 204864/fossil 204864 19916249/swap 19916249 20964825" "rootdir=/root" "objtype=386" "timezone=EST -18000 EDT -14400\n 9943200 25664400 41392800 57718800 73447200 89168400\n 104896800 120618000 126669600 152067600 162352800 183517200\n 199245600 215571600 230695200 247021200 262749600 278470800\n 294199200 309920400 325648800 341370000 357098400 372819600\n 388548000 404874000 419997600 436323600 452052000 467773200\n 483501600 499222800 514951200 530672400 544586400 562122000\n 576036000 594176400 607485600 625626000 638935200 657075600\n 670989600 688525200 702439200 719974800 733888800 752029200\n 765338400 783478800 796788000 814928400 828842400 846378000\n 860292000 877827600 891741600 909277200 923191200 941331600\n 954640800 972781200 986090400 1004230800 1018144800 1035680400\n1049594400 1067130000 1081044000 1099184400 1112493600 1130634000\n1143943200 1162083600 1173578400 1194141600 1205028000 1225591200\n1236477600 1257040800 1268532000 1289095200 1299981600 1320544800\n1331431200 1351994400 1362880800 1383444000 1394330400 1414893600\n1425780000 1446343200 1457834400 1478397600 1489284000 1509847200\n1520733600 1541296800 1552183200 1572746400 1583632800 1604196000\n1615687200 1636250400 1647136800 1667700000 1678586400 1699149600\n1710036000 1730599200 1741485600 1762048800 1772935200 1793498400\n1804989600 1825552800 1836439200 1857002400 1867888800 1888452000\n1899338400 1919901600 1930788000 1951351200 1962842400 1983405600\n1994292000 2014855200 2025741600 2046304800 2057191200 2077754400\n2088640800 2109204000 2120090400 2140653600\n" "home=/usr/glenda" "path=.\x00/bin" "*=" "rcname=rc" "pid=111" "ifs= \t\n" "prompt=helix# \x00\t" "status=" "fn#sigexit=" "cflag=" "0=/rc/lib/rcmain" "boottime=Thu Jan 17 17:01:07 EST 2019\n" "sysname=helix" "NPROC=1" "site=DOM.EXAMPLE.COM" "fileserver=kfs" "facedom=FACEDOM" "apid=102" "GOROOT_BOOTSTRAP=/tmp/workdir/go1.4" "WORKDIR=/tmp/workdir" "GO_BUILDER_NAME=plan9-386" "GO_TEST_TIMEOUT_SCALE=2"] in dir /tmp/workdir/go/src Building Go cmd/dist using /tmp/workdir/go1.4 2019/01/17 22:02:18 SERIAL: 2019/01/17 17:02:16 extracted tarball into /tmp/workdir/go: 8560 files, 1062 dirs (13.428815549s) 2019/01/17 17:02:16 writetgz: untarring Request.Body into /tmp/workdir/go 2019/01/17 17:02:16 extracted tarball into /tmp/workdir/go: 1 files, 1 dirs (3.462171ms) 2019/01/17 17:02:16 [0x108188f0] Running /tmp/workdir/go/src/all.rc with args ["/tmp/workdir/go/src/all.rc"] and env ["termina Building Go toolchain1 using /tmp/workdir/go1.4. Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1. Building Go toolchain2 using go_bootstrap and Go toolchain1. Building Go toolchain3 using go_bootstrap and Go toolchain2. Building packages and commands for plan9/386. ##### Testing packages. ok archive/tar 0.130s ok archive/zip 2.249s ok bufio 0.158s ok bytes 2.061s ok compress/bzip2 0.109s ok compress/flate 1.457s ok compress/gzip 7.835s ok compress/lzw 0.145s ok compress/zlib 0.768s ok container/heap 0.047s ok container/list 0.041s ok container/ring 0.049s ok context 1.147s ok crypto 0.041s ok crypto/aes 0.065s ok crypto/cipher 27.555s ok crypto/des 0.059s ok crypto/dsa 0.044s ok crypto/ecdsa 0.235s ok crypto/elliptic 0.070s ok crypto/hmac 0.038s ok crypto/internal/subtle 0.039s ok crypto/md5 0.049s ok crypto/rand 0.299s ok crypto/rc4 0.090s ok crypto/rsa 0.198s ok crypto/sha1 0.099s ok crypto/sha256 0.050s ok crypto/sha512 0.051s ok crypto/subtle 0.045s ok crypto/tls 14.012s ok crypto/x509 6.525s ok database/sql 0.770s ok database/sql/driver 0.039s ok debug/dwarf 0.091s ok debug/elf 0.111s ok debug/gosym 0.040s ok debug/macho 0.045s ok debug/pe 0.055s ok debug/plan9obj 0.040s ok encoding/ascii85 0.043s ok encoding/asn1 0.052s ok encoding/base32 0.071s ok encoding/base64 0.047s ok encoding/binary 0.045s ok encoding/csv 0.047s ok encoding/gob 0.077s ok encoding/hex 0.043s ok encoding/json 0.571s ok encoding/pem 0.057s ok encoding/xml 0.108s ok errors 0.038s ok expvar 0.053s ok flag 0.042s ok fmt 0.114s ok go/ast 0.064s ok go/build 2.111s ok go/constant 0.047s ok go/doc 0.117s ok go/format 0.054s ok go/importer 0.861s ok go/internal/gccgoimporter 0.079s ok go/internal/gcimporter 6.813s ok go/internal/srcimporter 4.114s ok go/parser 0.065s ok go/printer 0.326s ok go/scanner 0.045s ok go/token 0.062s ok go/types 5.103s ok hash 0.043s ok hash/adler32 0.050s ok hash/crc32 0.051s ok hash/crc64 0.041s ok hash/fnv 0.042s ok html 0.043s 2019/01/17 22:20:49 SERIAL: 5902 template.test: checked 2245 page table entries 5902 template.test: checked 2247 page table entries 5902 template.test: checked 2247 page table entries 5902 template.test: checked 2247 page table entries 5902 template.test: checked 2251 page table entries 5902 template.test: checked 2251 page table entries 5902 template.test: checked 2251 page table entries 5902 template.test: checked 2251 page table entries 5902 template.test: checked 2253 page table entries 5902 template.test: checked 2253 page table entries 5902 template.test: checked 2256 page table entries 5902 template.test: checked 2256 page table entries 5902 template.test: checked 2256 page table entries 5902 template.test: checked 2256 page table entries 5902 template.test: checked 2256 page table entries 5902 template.test: checked 2256 page table entries 5902 template.test: checked 2257 page table entries 5902 template.test: checked 2257 page table entries 5902 template.test: c ok html/template 0.240s 2019/01/17 22:20:49 SERIAL: hecked 2257 page table entries 5902 template.test: checked 2257 page table entries 5902 template.test: checked 2258 page table entries 5902 template.test: checked 2258 page table entries 5902 template.test: checked 2258 page table entries 5902 template.test: checked 2258 page table entries 5902 template.test: checked 2260 page table entries 5902 template.test: checked 2260 page table entries 5902 template.test: checked 2266 page table entries 5902 template.test: checked 2266 page table entries 5902 template.test: checked 2310 page table entries 5902 template.test: checked 2312 page table entries ok image 0.118s ok image/color 0.057s ok image/draw 0.095s ok image/gif 0.948s ok image/jpeg 0.251s ok image/png 0.099s ok index/suffixarray 0.042s ok internal/cpu 0.041s ok internal/fmtsort 0.041s ok internal/poll 0.074s ok internal/singleflight 0.050s ok internal/trace 2.602s ok internal/x/crypto/chacha20poly1305 8.636s ok internal/x/crypto/cryptobyte 0.060s 2019/01/17 22:22:09 SERIAL: 6431 cryptobyte.test: checked 1392 page table entries ok internal/x/crypto/curve25519 0.177s ok internal/x/crypto/hkdf 0.845s ok internal/x/crypto/internal/chacha20 0.144s ok internal/x/crypto/poly1305 0.054s ok internal/x/net/dns/dnsmessage 0.185s ok internal/x/net/http/httpguts 0.042s ok internal/x/net/http/httpproxy 0.109s 2019/01/17 22:22:26 SERIAL: 6562 httpproxy.test: checked 1360 page table entries 6562 httpproxy.test: checked 1361 page table entries 6562 httpproxy.test: checked 1361 page table entries 6562 httpproxy.test: checked 1361 page table entries 6562 httpproxy.test: checked 1361 page table entries 6562 httpproxy.test: checked 1361 page table entries 6562 httpproxy.test: checked 1363 page table entries 6562 httpproxy.test: checked 1363 page table entries ok internal/x/net/http2/hpack 0.076s ok internal/x/net/idna 0.044s ok internal/x/net/nettest 9.947s ok internal/x/text/transform 0.045s ok internal/x/text/unicode/norm 0.043s ok internal/xcoff 0.168s ok io 0.206s ok io/ioutil 10.703s ok log 0.053s ok math 0.060s ok math/big 2.184s ok math/bits 0.048s ok math/cmplx 0.042s ok math/rand 0.668s ok mime 0.047s ok mime/multipart 2.525s ok mime/quotedprintable 0.420s ok net 28.558s 2019/01/17 22:25:56 SERIAL: 8008 http.test: checked 3947 page table entries 8008 http.test: checked 3947 page table entries 8008 http.test: checked 3947 page table entries 8008 http.test: checked 3948 page table entries 8008 http.test: checked 3948 page table entries 8008 http.test: checked 3948 page table entries 8008 http.test: checked 3948 page table entries 8008 http.test: checked 3948 page table entries ok net/http 143.781s ok net/http/cgi 0.263s ok net/http/cookiejar 0.240s ok net/http/fcgi 0.070s ok net/http/httptest 2.314s ok net/http/httptrace 0.056s ok net/http/httputil 4.702s ok net/http/internal 0.043s ok net/http/pprof 2.089s ok net/mail 0.053s ok net/rpc 1.706s ok net/rpc/jsonrpc 0.069s ok net/smtp 1.060s ok net/textproto 0.043s ok net/url 0.056s ok os 2.706s ok os/exec 2.556s ok os/signal 0.199s ok os/user 0.047s ok path 0.044s ok path/filepath 0.343s ok plugin 0.040s ok reflect 0.266s 2019/01/17 22:30:28 SERIAL: 8794 reflect.test: checked 2508 page table entries 8794 reflect.test: checked 2509 page table entries 8794 reflect.test: checked 2860 page table entries ok regexp 0.123s ok regexp/syntax 0.391s 2019/01/17 22:31:25 SERIAL: 9108 testprog.exe: checked 1257 page table entries 9110 testprog.exe: checked 1262 page table entries 9110 testprog.exe: checked 1264 page table entries 9108 testprog.exe: checked 1264 page table entries 2019/01/17 22:31:27 SERIAL: 9076 runtime.test: checked 3427 page table entries 2019/01/17 22:31:32 SERIAL: 9073 runtime.test: checked 6386 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 9073 runtime.test: checked 6387 page table entries 2019/01/17 22:31:35 SERIAL: 9073 runtime.test: checked 6405 page table entries 9076 runtime.test: checked 6410 page table entries 9076 runtime.test: checked 6412 page table entries ok runtime 55.642s ok runtime/debug 0.055s ok runtime/internal/atomic 0.125s 2019/01/17 22:32:18 SERIAL: 9322 atomic.test: checked 1372 page table entries 9322 atomic.test: checked 1373 page table entries 9322 atomic.test: checked 1373 page table entries 9322 atomic.test: checked 1373 page table entries 9322 atomic.test: checked 1373 page table entries 9322 atomic.test: checked 1373 page table entries ok runtime/internal/math 0.039s ok runtime/internal/sys 0.046s ok runtime/pprof 2.239s ok runtime/pprof/internal/profile 0.045s ok runtime/trace 43.480s ok sort 0.106s ok strconv 0.460s 2019/01/17 22:34:25 serial output error: googleapi: Error 400: The resource 'projects/symbolic-datum-552/zones/us-central1-f/instances/debug-temp-1547762447' is not ready, resourceNotReady 2019/01/17 22:34:35 Buildlet http://10.240.0.4 failed three heartbeats; final error: timeout waiting for headers 2019/01/17 22:34:35 error trying to run src/all.rc: Buildlet http://10.240.0.4 failed heartbeat after 10.000362883s; marking dead; err=timeout waiting for headers bradfitz@gdev:~/src/golang.org/x/build$ ```
help wanted,OS-Plan9,Builders,NeedsInvestigation
medium
Critical
400,513,372
TypeScript
Generic type inference failure in a union.
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.3.0-dev.20190117 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** generic type inference, union types **Code** ```ts function f1<A1, B1>(cb: (a: A1, b: B1) => void) { f2(cb); // I expect no errors } function f2<A2, B2>(cb: ((x: number, a: A2, b: B2) => void)| ((a: A2, b: B2) => void)) {} // If I swap the two types it compiles ``` **Expected behavior:** No errors. **Actual behavior:** ``` TS2345: Argument of type '(a: A1, b: B1) => void' is not assignable to parameter of type '((x: number, a: B1, b: B1) => void) | ((a: B1, b: B1) => void)'. Type '(a: A1, b: B1) => void' is not assignable to type '(x: number, a: B1, b: B1) => void'. Types of parameters 'a' and 'x' are incompatible. Type 'number' is not assignable to type 'A1'. ``` **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> http://www.typescriptlang.org/play/#src=function%20f1%3CA1%2C%20B1%3E(cb%3A%20(a%3A%20A1%2C%20b%3A%20B1)%20%3D%3E%20void)%20%7B%0D%0A%20%20f2(cb)%3B%0D%0A%7D%0D%0A%0D%0Afunction%20f2%3CA2%2C%20B2%3E(cb%3A%20((x%3A%20number%2C%20a%3A%20A2%2C%20b%3A%20B2)%20%3D%3E%20void)%7C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20((a%3A%20A2%2C%20b%3A%20B2)%20%3D%3E%20void))%20%7B%7D **Related Issues:** <!-- Did you find other bugs that looked similar? --> I looked around and didn't anything obviously related.
Bug,Domain: Type Inference
low
Critical
400,557,821
vscode
[css] support IE10 repeat syntax
<!-- 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.23.1 - OS Version: Windows 8 Steps to Reproduce: 1. View the following code in IE; https://s.codepen.io/fizzbuzz791/debug/EGBxdq/XBkGRZQpnRNA 2. Confirm that it's valid syntax and displays a grid with 3 columns 3. Open a CSS file in VS Code, copy the CSS from codepen and view the following error; ![image](https://user-images.githubusercontent.com/2747764/51363652-f594a980-1b13-11e9-9fec-90ca52d26e3b.png) <!-- Launch with `code --disable-extensions` to check. --> Does this issue occur when all extensions are disabled?: Yes
feature-request,css-less-scss
low
Critical
400,570,587
pytorch
[Caffe2] resize5d stride/dim issue
## 🐛 Bug THTensor resize4d and resize5d functions cause a corrupted tensor. The mentioned function defined here: https://github.com/pytorch/pytorch/blob/ded4ff87af6e4cd0d22ef091f8ba7d49a4a49d1c/aten/src/TH/generic/THTensor.h#L75-L76 The return tensor will cause a crash when I call to nDimension or stride functions. The dim and stride functions are defined here: https://github.com/pytorch/pytorch/blob/ded4ff87af6e4cd0d22ef091f8ba7d49a4a49d1c/aten/src/TH/generic/THTensor.h#L27 https://github.com/pytorch/pytorch/blob/ded4ff87af6e4cd0d22ef091f8ba7d49a4a49d1c/aten/src/TH/generic/THTensor.h#L31 All other resize work fine. ## To Reproduce Steps to reproduce the behavior: 1. THFloatStorage_newWithSize(10) 1. THFloatTensor_newWithStorage1d(PREV_STORAGE, 0, 10, 1) 1. THFloatTensor_resize5d(PREV_TENSOR, 1, 2, 1, 2, 1) 1. THFloatTensor_nDimension(PREV_TENSOR) crash... <!-- If you have a code sample, error messages, stack traces, please provide it here as well --> ## Expected behavior Return dimension of tensor. <!-- A clear and concise description of what you expected to happen. --> ## Environment Please copy and paste the output from our [environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py) (or fill out the checklist below manually). You can get the script and run it with: ``` wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py # For security purposes, please check the contents of collect_env.py before running it. python collect_env.py ``` - PyTorch Version (e.g., 1.0): 1.0 - OS (e.g., Linux): Windows 10.0.17134.523 - How you installed PyTorch (`conda`, `pip`, source): pip - Build command you used (if compiling from source): - Python version: 3.6.7 - CUDA/cuDNN version: N/A - GPU models and configuration: N/A - Any other relevant information: One observed behavior for resize4d, if source tensor is created as 4d, it crashed. When source tensor has different dimension, e.g. 3d, it fine. However, resize5d always return corrupted tensor. ## Additional context I link to caffe2 lib by copy following files into project path: c10.dll caffe2.dll caffe2.lib libiomp5md.dll <!-- Add any other context about the problem here. --> I tried to create Torch Tensor inside Rust by using Rust FFI binding to C language. This is done to reduce cost of constructing tensor object inside Python as my experiment data source, if loaded entirely in Python consume too much memory, i.e. 8 bytes per an element. In C/Rust, I can use single byte per an element. Loading data then GC it make my training time slow down from few hours/epoch to 5 days per epoch. So far, all other resize* work fine except these two. Side question: does this resize function copy data ? It seem like all resized tensor always contiguous.
caffe2
low
Critical
400,617,112
terminal
iTerm color schemes once more are failing to parse colors
Not sure if I am supposed to request to get this re-opened or if I should create another bug. But this is the same as in #2 * Your Windows build number: (Type `ver` at a Windows Command Prompt) Microsoft Windows [Version 10.0.17763.253] * What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots) Running: PS C:\Tools\ColorTool> .\ColorTool.exe C:\Tools\ColorTool/schemes/molokai.itermcolors Error loading ini file "C:\Tools\ColorTool/schemes/molokai.itermcolors" for key "DARK_BLACK" the value "" is invalid The actual file contents can be found in this gist: https://gist.github.com/SneWs/4bbb50dce9a132a4dcbd07e3e2c85c44 * What's wrong / what should be happening instead: The colors should be successfully parsed and set without any error messages being rendered.
Work-Item,Product-Colortool,Help Wanted,Issue-Bug,Area-Settings
low
Critical
400,646,155
pytorch
CategoricalCrossEntropy Loss runs with wrong tag
## 🐛 Bug Putting extreme low negative values as the tag does not raise error ## To Reproduce output = torch.randn(5, 2, requires_grad=True) target = torch.empty(5, dtype=torch.long).random_(2) target[0] = -9223372036854775808 criterion = nn.CrossEntropyLoss() loss = criterion(output, target) print(loss) ## Expected behavior raise Error ## Environment Last stable version cc @albanD @mruberry @jbschlosser
module: nn,module: loss,triaged
low
Critical
400,649,218
flutter
How to add custom overflow string in `Text` or `TextSpan`?
![image](https://user-images.githubusercontent.com/15325536/51380355-85eee080-1b4c-11e9-955b-af38f06ef530.png) I want to replace overflow string '\u2026' to something else, like '...read more'. <!-- 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. -->
c: new feature,framework,P2,team-framework,triaged-framework
low
Critical
400,661,036
flutter
Custom Shape on drawer selected item
![_20181125_173554](https://user-images.githubusercontent.com/30870272/51380386-aa8c8d80-1b37-11e9-8788-d75b162576ac.JPG) Like this image, there is no option to add custom shape to selected drawer item in Navigation Drawer.
c: new feature,framework,f: material design,P2,team-design,triaged-design
low
Minor
400,718,275
every-programmer-should-know
My programming guidelines
Hi, Thank you for your project. I am doing a similar project since some months. It is not that big like yours, but maybe you want to have a look. I am curious and looking for feedback: https://github.com/guettli/programming-guidelines/
Needs some ❤️
low
Minor
400,774,159
go
net/http: provide better error message when proxy is misconfigured
### What version of Go are you using (`go version`)? <pre> $ go version go1.11 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="/root/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/root/go" GOPROXY="" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build200009662=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### What did you do? Doing a `go get` fails behind a corporate proxy if environment variables are set as below; ```HTTP_PROXY=http://proxyIp:proxyPort``` it succeeds if set as ```HTTP_PROXY=proxyIp:proxyPort``` this is true for HTTP or HTTPS variables This is also true for any go project using net/http I'm seeing this issue with Docker versions greater than 17.09, Jenkins-x, goBuffalo Older versions of go (specifically 1.8.3 - the only version I tested) do not behave this way Docker version 17.09 and lower do not behave this way. ### What did you expect to see? I expect it to pull through the proxy server with the below environment variables set; ```HTTP_PROXY=http://proxyIp:proxyPort``` ```HTTPS_PROXY=https://proxyIp:proxyPort``` ### What did you see instead? Process fails to get through the proxy.
help wanted,NeedsFix
low
Critical
400,775,450
TypeScript
Generic not inferred inside mapped type parameter
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.2.2 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** generic inference {} createStructuredSelector mapped types **Code** ```ts type Selector<S, R> = (state: S) => R; declare function createStructuredSelector<S, T>( selectors: { [K in keyof T]: Selector<S, T[K]> }, ): Selector<S, T>; type State = { foo: number }; declare const mySelector: Selector<State, boolean>; // Workaround: use explicit generics // const result = createStructuredSelector<State, { mySelector: boolean }>({ // `State` generic incorrectly inferred as `{}`. const result = createStructuredSelector({ // Unexpected type error under `strictFunctionTypes` due to bad inference (above) mySelector, }); result; ```
Bug,Domain: Type Inference
low
Critical
400,818,754
flutter
[Feature request] [google_maps_flutter] : Support for on map click listener
c: new feature,p: maps,package,c: proposal,team-ecosystem,P2,triaged-ecosystem
low
Minor
400,826,748
TypeScript
tsc does not use amd-module name when emitting dynamic imports
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.3.0-dev.20190118 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** amd-module, optional, dynamic, directive **Code** Scripts/foo.ts ```ts ///<amd-module name="customNameFoo" /> export function hello() { console.log('hello world'); } ``` Scripts/bar.ts ```ts ///<amd-module name="customNameBar" /> async function myFunction(): Promise<void> { //Dynamically import foo var fooModule = await import('./foo'); fooModule.hello(); } ``` tsconfig.json ```json { "compileOnSave": true, "compilerOptions": { "target": "es5", "outDir": "GeneratedScripts", "module": "amd", "lib": [ "es2015.promise", "dom", "es5", "scripthost" ] }, "include": [ "Scripts/**/*" ], "exclude": [ "GeneratedScripts" ] } ``` would expect that the call to require would use the amd-module name for foo ("customNameFoo") and not "./foo". (If we non-dynamically imported foo, then the generated 'define' would refer to foo by it's amd-module name) GeneratedScripts/bar.js ```js //... return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, new Promise(function (resolve_1, reject_1) { require(['./foo'], resolve_1, reject_1); })]; case 1: fooModule = _a.sent(); fooModule.hello(); return [2 /*return*/]; } }); ``` **Expected behavior:** The generated amd code for a dynamic import should use the name of the module specified in the amd-module directive **Actual behavior:** The generated code for the dynamic import uses relative path to the module **Related Issues:** <!-- Did you find other bugs that looked similar? --> https://github.com/Microsoft/TypeScript/pull/1158 https://github.com/Microsoft/TypeScript/issues/28760
Suggestion,Awaiting More Feedback,Domain: JS Emit
low
Critical
400,841,916
flutter
Video playback within a ListView
A common pattern in apps is having video playing within infinite lists, playing/pausing/stopping as the user scrolls specific views on/off screen. Examples would be the muted autoplay videos on Facebook or Instagram's main feeds. Best case scenario I think a pattern like this would be a good candidate for one the cookbooks on https://flutter.io/docs/cookbook Additionally, I would love to get some insight/suggestions from the community about implementing this kind of feature. Building similar things on native iOS/Android I would just 1) listen for scroll events 2) check which cells are visible 3) do some math to decide which item should play 4) and push a video player onto that item and play it. As far as I know - Flutter doesn't have anyway of telling me which Widgets in a ListView are the ones currently visible. The only solution I could come up with was 1. putting a key on every item in the List View 2. using the [https://pub.dartlang.org/packages/rect_getter](RectGetter) package and getting the rect of the ListView 3. get the rect of each item and check if it's within the rect of the ListView If there's a better way to do this, I'd love to know. I know ListView must be keeping track of what it has rendered somewhere, I just don't know how to access it. Thanks in advance
c: new feature,d: examples,customer: crowd,p: video_player,package,team-ecosystem,P2,fyi-codelabs,triaged-ecosystem
low
Critical
400,842,170
go
proposal: cmd/go: 'go mod tidy' should remove stale 'exclude' directives
`exclude` directives in the `go.mod` file prevent commands such as `go get -u` from selecting particular versions of modules. However, if the active version of a dependency is _already_ semantically higher than the excluded version, `go get -u` would never select that version implicitly in the first place (depending on the resolution of #26474). The only time it could be introduced is by an explicit downgrade of some package, and explicit downgrades — though possible — are likely to be rare in practice. That makes those `exclude` directives noisy and somewhat misleading: they appear to have an effect on version selection, but may actually be very stale and completely irrelevant. I propose that `go mod tidy` should remove `exclude` directives if the selected version of the module in question is already higher than the excluded version. (CC @rsc @jayconrod)
Proposal,NeedsInvestigation,GoCommand,modules
low
Minor
400,864,008
go
x/tools/go/packages: tests are flaky on Windows
https://build.golang.org/log/60aa789811bdedb1697255f1dee30adb917d3f0c https://build.golang.org/log/ede332848726e7af41109fe3ebc7e813e58f7ab8 https://storage.googleapis.com/go-build-log/dc889025/windows-amd64-2016_fed5c8f5.log example: ``` --- FAIL: TestLoadTypes (0.50s) --- FAIL: TestLoadTypes/Modules (0.34s) packages_test.go:523: wrong import graph: got <<>>, want <<* golang.org/fake/a golang.org/fake/b golang.org/fake/c golang.org/fake/a -> golang.org/fake/b golang.org/fake/a -> golang.org/fake/c >> packages_test.go:541: missing package: golang.org/fake/a packages_test.go:541: missing package: golang.org/fake/b packages_test.go:541: missing package: golang.org/fake/c FAIL FAIL golang.org/x/tools/go/packages 34.826s ```
Testing,NeedsFix,Tools
low
Minor
400,865,668
go
go/ast: optionally save comments
go/ast doesn't save comments in the tree when a file is parsed, (they are kept in the field `*ast.File.Comments`). This causes problems for functions like `astutil.PathEnclosingInterval` and forces comments to be special cased in the LSP completions package (context: https://github.com/golang/go/issues/29780).
NeedsInvestigation,FeatureRequest
low
Minor
400,880,796
godot
Screen space reflection with roughness does not blur across object edges (fixed in `master`)
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** 3.1 beta1 <!-- Specify commit hash if non-official. --> **OS/device including version:** Windows, Linux <!-- Specify GPU model and drivers if graphics-related. --> **Issue description:** <!-- What happened, and what was expected. --> ![image](https://user-images.githubusercontent.com/490327/51411424-b7929680-1ba2-11e9-9d00-6ea5f707f272.png) As shown in the image, the ground has a roughness of 0 (left) and 0.3 (right) with SSR enabled. Details *inside* objects get blurred when roughness is large (as shown in green circles) as expected, but object edges does not get blurred (as shown in red circles). Blurred object edges are expected. **Steps to reproduce:** Enable SSR in default_env, add a ground mesh, add a spatial material with metalness set to 1 and roughness set to non-zero. Add any mesh to be reflected.
enhancement,topic:rendering,confirmed,topic:3d
low
Major
400,904,755
vscode
VS Code holds onto parent console when launched via command line
Repro: 1. Open cmd.exe 2. Run `code` 3. Switch back to cmd.exe 4. `exit` Repro's in stable and insiderrs and does not repro in Atom which is also on Electron 2. Advice from Windows console team: > I believe VSCode is reconnecting to its parent hosting console for debugging purposes. Starting with @joaomoreno who might know who to send this to, not sure who the real owner is though.
bug,upstream,freeze-slow-crash-leak,windows,electron,workbench-cli,upstream-issue-linked
high
Critical
400,918,870
TypeScript
Cannot import properties from module.exports as types in JSDoc
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.3.0-dev.20190118 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** jsdoc import module.exports has no exported member **Code** **a.js** ```js class A {} module.exports = {A} ``` **b.js** ```js // @ts-check class B { // In the JSDoc below, VSCode intellisense does not recognize parameter a as type A. // Instead it shows the error: // Namespace '".../a".export=' has no exported member 'A' /** * @param {import('./a').A} a */ constructor (a) { this.a = a } } ``` **Expected behavior** Parameter `a` of the `constructor` should be recognized as type `A`, which is accessible via the `A` property of `module.exports` from `a.js`. **Actual behavior** Intellisense reports the error: Namespace '".../a".export=' has no exported member 'A'. **Notes** `@param {import('./a')} a` does not give an error, but it resolves to type `{A: typeof A}` instead of `A`. If `a.js` is modified with `module.exports = A`, then `import('./a')` resolves to `A`, however this restricts `a.js` to only exporting one type.
Bug,Domain: JavaScript
low
Critical
400,923,357
go
x/tools/go/packages: deduplicate identical packages
go list is returning multiple identical packages in some cases. The go list "driver" in go/packages should deduplicate those packages before returning its results.
NeedsFix,FeatureRequest
low
Minor
400,931,853
flutter
Remove path struct members in `blink::Settings` with callbacks that return mappings.
This will remove any opinions the engine has w.r.t how the various snapshots are packaged within the application.
engine,P2,team-engine,triaged-engine
low
Minor
400,948,109
rust
Deref coercions don't work on blocks when the target is sized
As seen on [StackOverflow](https://stackoverflow.com/q/53908386/617159). Consider the following code: ```rust use std::ops::Deref; fn main() { fn save(who: &str) { println!("I'll save you, {}!", who); } struct Madoka; impl Deref for Madoka { type Target = str; fn deref(&self) -> &Self::Target { "Madoka" } } save(&{ Madoka }); fn reset(how: &u32) { println!("Reset {} times", how); } struct Homura; impl Deref for Homura { type Target = u32; fn deref(&self) -> &Self::Target { &42 } } // Uncomment this to get a type error // reset(&{ Homura }); } ``` The following expressions do compile: * `reset(&Homura)` * `reset(&&{ Homura })` * `reset({ &Homura })` But this doesn't: * `reset(&{ Homura })` ``` error[E0308]: mismatched types --> src/main.rs:17:14 | 17 | reset(&{ Homura }); | ^^^^^^ expected u32, found struct `main::Homura` | = note: expected type `u32` found type `main::Homura` ``` Is there are particular reason for this discrepancy? I found two similar issues #26978 and #32122 but they don't seem to cover this particular case.
T-lang,C-bug,A-coercions
low
Critical
400,953,020
godot
Vertex color breaks if number of colors mismatches number of polygon vertices
As of 3.1 beta 2. Likely related to #20601. Having a different number causes the vertex color to not work at all. This can be tested in 2 ways: either changing the vertex colors array size or by adding/deleting vertices (in either case, vertex colors will pop off or on depending on if the number matches). Behavior in beta 1 and before is that undefined vertex colors were inherited from the color property. Now it seems this is likely an intentional change, at least because adding internal vertices causes the vertex colors array size to automatically update (the new color defaulting to white rather than the color property)... but aside from breakage, it also makes working with polygons+vertex colors even more clunky (and it's bad enough coloring vertices by number rather than having an editor). In many cases, this isn't just a matter of changing the array size to match the number of vertices either, as the inheritance of the color property (as I mentioned before) is now gone. So not only would you need to paste it in for every unspecified vertex, you'd also better hope that you don't plan on changing it (or the number of vertices in the polygon!) for any reason (that would be mitigated if there were some sort of a palette system, particularly if you could specify colors in groups. Like vertices 22-46 are this color and vertices 1, 2, 5, 7 are this color etc.). That and I think it's fairly obvious the old method was a more helpful/intuitive behavior.
bug,discussion,topic:editor,confirmed
low
Minor
400,955,789
TypeScript
'Can't find name' for enum type in generated .d.ts
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.2.2 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** enum .d.ts Can't find name **Code** in A.ts. ```ts export const enum EControl { NONE = 0, CONTROL3D, RESIZE3D, } const setControlActive = actionCreator<EControl>('setControlActive'); export default { setControlActive, }; ``` in B.ts. ```ts import controlAXR from './A'; export default { ....controlAXR, } ``` **Expected behavior:** in generated B.d.ts, the EControl should have a import path. ```ts ... { setControlActive: import("A").ASRAction<import("A").EControl>; }; ... ``` **Actual behavior:** in generated B.d.ts. The EControl has no import path, the compiler will rise an error "Can't find name EControl". ```ts ... { // Will get a ts error "Can't find name EControl" setControlActive: import("A").ASRAction<EControl>; }; ... ``` **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> **Related Issues:** <!-- Did you find other bugs that looked similar? -->
Bug,Domain: Declaration Emit
low
Critical
400,978,780
flutter
Apple CarPlay / Android Auto support?
Status update: https://github.com/flutter/flutter/issues/26801#issuecomment-1013565542 ---- As I understand, at least with Apple CarPlay, the apps are run strictly on the phone, so it isn't a case of Apple Watch nor tvOS which require bitcode. I'm not sure about Android Auto as I don't own any Android device. Is there any way to run Flutter app in car? Is it on a roadmap?
c: new feature,engine,customer: crowd,P3,team-engine,triaged-engine
high
Critical
400,983,693
godot
iOS requires optional capability description strings
In iOS there are a number of capabilities an application can have that require entries in the plist file that are presented to the user. For instance, if Godot attempts to access the camera it will check for an entry called NSCameraUsageDescription. If it does not exist access will fail. If it does exist the string held within is presented to the user. Apple doesn't seem to have a ready list of these, they are strewed around the help pages that describe all plist entries. This is a list I found on stackoverflow that seems like a good starting point: ``` NSCameraUsageDescription NSBluetoothPeripheralUsageDescription NSCalendarsUsageDescription NSContactsUsageDescription NSHealthShareUsageDescription NSHealthUpdateUsageDescription NSHomeKitUsageDescription NSLocationAlwaysUsageDescription NSLocationUsageDescription NSLocationWhenInUseUsageDescription NSAppleMusicUsageDescription NSMicrophoneUsageDescription NSMotionUsageDescription kTCCServiceMediaLibrary NSPhotoLibraryUsageDescription NSRemindersUsageDescription NSSiriUsageDescription NSSpeechRecognitionUsageDescription NSVideoSubscriberAccountUsageDescription ```
enhancement,platform:ios,topic:editor
low
Major
400,990,686
nvm
sourcing nvm.sh exits with code 3 when .nvmrc is present and version is not installed
When I source `nvm.sh` like `. "$HOME/.nvm/nvm.sh"` for manual install and like `. $(brew --prefix nvm)/nvm.sh`, the exit code is `3`. Even though nvm works after that, in bash scripts with `set -e`, the script stops there, since the command exits with a non-zero value. Is there a reason this fails? Is there a reason it exits with `3`, if it's not an actual failure? What can we do about that? Some extra info: - output of `. nvm.sh` with `set -x` for "tracing": https://pastebin.com/raw/1Tk9UUsp - Operating system and version: macOS 10.14.2 (mojave) - `nvm debug` output: <details> <summary>Details</summary> ```sh nvm --version: v0.34.0 $TERM_PROGRAM: iTerm.app $SHELL: /bin/zsh $SHLVL: 1 $HOME: /Users/pvinis $NVM_DIR: '$HOME/.nvm' $PATH: $HOME/.gem/ruby/2.5.1/bin:$HOME/.rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/bin:$HOME/.rubies/ruby-2.5.1/bin:$NVM_DIR/versions/node/v11.0.0/bin:$HOME/.config/yarn/global/node_modules/.bin:$HOME/.yarn/bin:$HOME/Library/Python/3.7/bin:$HOME/.fastlane/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/opt/X11/bin:$HOME/.rvm/bin $PREFIX: '' $NPM_CONFIG_PREFIX: '' $NVM_NODEJS_ORG_MIRROR: '' $NVM_IOJS_ORG_MIRROR: '' shell version: 'zsh 5.3 (x86_64-apple-darwin18.0)' uname -a: 'Darwin 18.2.0 Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64 x86_64' OS version: Mac 10.14.2 18C54 curl: /usr/bin/curl, curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.4 zlib/1.2.11 nghttp2/1.24.1 wget: not found git: /usr/local/bin/git, git version 2.19.1 grep: /usr/bin/grep, grep (BSD grep) 2.5.1-FreeBSD awk: /usr/bin/awk, awk version 20070501 sed: illegal option -- - usage: sed script [-Ealn] [-i extension] [file ...] sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...] sed: /usr/bin/sed, cut: illegal option -- - usage: cut -b list [-n] [file ...] cut -c list [file ...] cut -f list [-s] [-d delim] [file ...] cut: /usr/bin/cut, basename: illegal option -- - usage: basename string [suffix] basename [-a] [-s suffix] string [...] basename: /usr/bin/basename, rm: illegal option -- - usage: rm [-f | -i] [-dPRrvW] file ... unlink file rm: /bin/rm, mkdir: illegal option -- - usage: mkdir [-pv] [-m mode] directory ... mkdir: /bin/mkdir, xargs: illegal option -- - usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr] [-L number] [-n number [-x]] [-P maxprocs] [-s size] [utility [argument ...]] xargs: /usr/bin/xargs, nvm current: v11.0.0 which node: $NVM_DIR/versions/node/v11.0.0/bin/node which iojs: iojs not found which npm: $NVM_DIR/versions/node/v11.0.0/bin/npm npm config get prefix: $NVM_DIR/versions/node/v11.0.0 npm root -g: $NVM_DIR/versions/node/v11.0.0/lib/node_modules ``` </details> - `nvm ls` output: <details> <summary>Details</summary> ```sh v8.12.0 v10.12.0 -> v11.0.0 system default -> v11 (-> v11.0.0) node -> stable (-> v11.0.0) (default) stable -> 11.0 (-> v11.0.0) (default) iojs -> N/A (default) unstable -> N/A (default) lts/* -> lts/dubnium (-> N/A) lts/argon -> v4.9.1 (-> N/A) lts/boron -> v6.14.4 (-> N/A) lts/carbon -> v8.12.0 lts/dubnium -> v10.13.0 (-> N/A) ``` </details> - How did you install `nvm`? (e.g. install script in readme, Homebrew): Tried both. I mostly do from brew though, since it's easier. - What steps did you perform? source the file - What happened? worked, but exits with non-zero value - What did you expect to happen? to exit with a 0 value since everything seemingly went well - Is there anything in any of your profile files (`.bashrc`, `.bash_profile`, `.zshrc`, etc) that modifies the `PATH`? I ran this without any $PATH alterations. In general I don't have anything in there that touch nvm. Only to include `brew` stuff.
needs followup
high
Critical
401,008,126
pytorch
Sparse matrix multiplication is too slow
I'm comparing it to SciPy and it is clearly too slow. It can be 100 times slower on CPU, which makes it quite unusable. My GPU improves the times but it is still very slow. I show you my benchmarks and the code I used. CPU: i5 4690k @ 4.4GHz GPU: GTX 1060 ``` SIZE: 5000 DENSITY: 0.01 DEVICE: cpu torch: 0.0306358 seconds np: 0.000252247 seconds torch/np: 121.452 ---------------------------------------- SIZE: 5000 DENSITY: 0.01 DEVICE: cuda torch: 0.0127137 seconds np: 0.000259161 seconds torch/np: 49.057 ---------------------------------------- SIZE: 10000 DENSITY: 0.01 DEVICE: cpu torch: 0.155527 seconds np: 0.00106144 seconds torch/np: 146.524 ---------------------------------------- SIZE: 10000 DENSITY: 0.01 DEVICE: cuda torch: 0.0476248 seconds np: 0.000991583 seconds torch/np: 48.0291 ---------------------------------------- SIZE: 50000 DENSITY: 0.01 DEVICE: cpu torch: 5.94856 seconds np: 0.0456181 seconds torch/np: 130.399 ---------------------------------------- SIZE: 50000 DENSITY: 0.01 DEVICE: cuda torch: 1.06403 seconds np: 0.0419693 seconds torch/np: 25.3527 SIZE: 50000 DENSITY: 0.0001 DEVICE: cpu torch: 0.0423768 seconds np: 0.000562191 seconds torch/np: 75.3779 ---------------------------------------- SIZE: 50000 DENSITY: 0.0001 DEVICE: cuda torch: 0.0175352 seconds np: 0.000589371 seconds torch/np: 29.7524 ---------------------------------------- ``` ```python import torch import numpy as np from scipy import sparse import time size = 50000 density = 0.0001 device = 'cuda' print('SIZE:', size, 'DENSITY:', density, 'DEVICE:', device) A = sparse.rand(size, size, format='coo', density=density).astype(np.float32) b = torch.rand(size, 1, device=device) values = A.data indices = np.vstack((A.row, A.col)) i = torch.LongTensor(indices) v = torch.FloatTensor(values) shape = A.shape A_torch = torch.sparse.FloatTensor(i, v, torch.Size(shape)).to(device) s = time.time() A_torch.mm(b) t_torch = time.time() - s print('torch: {:g} seconds'.format(t_torch)) b = b.cpu().numpy() s = time.time() A.dot(b) t_np = time.time() - s print('np: {:g} seconds'.format(t_np)) print('torch/np: {:g}'.format(t_torch / t_np)) print('-'*40) ``` cc @nikitaved @pearu @cpuhrsch @IvanYashchuk
module: sparse,triaged
medium
Major
401,020,208
kubernetes
Provide a cluster wide security audit
<!-- Please only use this template for submitting enhancement requests --> **What would you like to be added**: It would be nice to have a cluster wide security audit to improve security of deployed cluster in the world. This feature request is highly inspired by introduced [npm audit](https://docs.npmjs.com/cli/audit) command for npm and [this](https://www.cncf.io/blog/2019/01/14/9-kubernetes-security-best-practices-everyone-must-follow/) blog post, which mention [CVE-2018-1002105](https://nvd.nist.gov/vuln/detail/CVE-2018-1002105). **Why is this needed**: It's needed to help to deploy secure clusters with ongoing security audit. I'm aware of amazing [kube-bench](https://github.com/aquasecurity/kube-bench), but I'm very biased about security and I think that such functionality should be provided out of the box with tight integration with the core. Furthermore, I think it would be nice to have an API, which can be implemented by different functionality provider like Storage, Ingress etc. to provide checks. Ideally, that security metrics can be picked up by CI to manage white list and mailing on new threats. What do you think?
kind/feature,lifecycle/frozen,wg/security-audit
medium
Major
401,031,657
godot
Setting Resource as key to Dictionary turns key unreadable in narrower inspector
**Godot version:** 3.1 Beta **OS/device including version:** OSX Mojave **Issue description:** Setting resource as key to Dictionary makes it unreadable in a narrower inspector. Example before adding to the dictionary: <img width="338" alt="captura de ecra 2019-01-19 as 20 22 39" src="https://user-images.githubusercontent.com/10358443/51431975-6fb65280-1c28-11e9-9e16-8102644afccb.png"> Example after adding to the dictionary: <img width="328" alt="captura de ecra 2019-01-19 as 20 22 50" src="https://user-images.githubusercontent.com/10358443/51431980-86f54000-1c28-11e9-8e2b-a62d1426fe46.png"> Right now as you can see the key is added as: **Resource([full file path])** and it could be added as: **[object icon][file name]** like it happens with other displays (i.e: arrays)
enhancement,topic:editor,usability
low
Minor
401,057,352
pytorch
how to implement crf predict for segmentation task in Caffe2?
caffe2
low
Minor
401,064,156
rust
Assertion fails in doc example for std::thread::sleep() in 1.32.0 stable
The description of [std::thread::sleep()](https://doc.rust-lang.org/stable/std/thread/fn.sleep.html) says: > Puts the current thread to sleep for at least the specified amount of time. The thread may sleep longer than the duration specified due to scheduling specifics or platform-dependent functionality. It will never sleep less. and it gives the example code: ```rust use std::{thread, time}; let ten_millis = time::Duration::from_millis(10); let now = time::Instant::now(); thread::sleep(ten_millis); assert!(now.elapsed() >= ten_millis); ``` But this assertion often fails when I run this code. If the description is correct and it shouldn't fail, it happens on Windows 7 32 bit, **`stable-i686-pc-windows-gnu`**`- rustc 1.32.0 (9fda7c223 2019-01-16)` ## **EDIT:** Though, the expected behaviour can be achieved with this wrapper function: ```rust use std::time::{Duration, Instant}; use std::thread::sleep; fn sleep_noless(wanted_sleep: Duration) { let now = Instant::now(); let mut slept_total = now.elapsed(); while slept_total < wanted_sleep { sleep(wanted_sleep - slept_total); slept_total = now.elapsed(); } } ```
O-windows,T-libs-api,C-bug,A-time
low
Major
401,068,025
rust
Can't assign results of generic functions to `const` variables
```rust fn foo<T:Default>() { const bar : T = T::default(); } ``` gives the following error (twice for some reason): ``` $ cargo +nightly build Compiling arrys_sizeoof v0.1.0 (C:\work\trash\repros\arrys_sizeoof) error[E0401]: can't use type parameters from outer function --> src\lib.rs:2:17 | 1 | fn foo<T:Default>() { | --- - type variable from outer function | | | try adding a local type parameter in this method instead 2 | const bar : T = T::default(); | ^ use of type variable from outer function error[E0401]: can't use type parameters from outer function --> src\lib.rs:2:21 | 1 | fn foo<T:Default>() { | --- - type variable from outer function | | | try adding a local type parameter in this method instead 2 | const bar : T = T::default(); | ^^^^^^^^^^ use of type variable from outer function error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0401`. error: Could not compile `arrys_sizeoof`. To learn more, run the command again with --verbose. ``` Changing let to `const` to `let` makes it compile just fine. Another, slightly different example: ```rust fn get_size<T:Sized>() { const size : usize = std::mem::size_of::<T>(); } ``` Here, the type of the variable is non-generic now, and it's only a function that is. Results in the same error, but only once now: ``` $ cargo +nightly build Compiling arrys_sizeoof v0.1.0 (C:\work\trash\repros\arrys_sizeoof) error[E0401]: can't use type parameters from outer function --> src\lib.rs:2:46 | 1 | fn get_size<T:Sized>() { | -------- - type variable from outer function | | | try adding a local type parameter in this method instead 2 | const size : usize = std::mem::size_of::<T>(); | ^ use of type variable from outer function error: aborting due to previous error For more information about this error, try `rustc --explain E0401`. error: Could not compile `arrys_sizeoof`. To learn more, run the command again with --verbose. ``` P.s.: if this is the desired behavior, it is confusing, since 1) changing `const` to `let` should not result in *type* error, 2) `rustc --explain E0401` doesn't mention anything close - all the examples are about definition of new functions/types inside the function body (and it's unclear how to adapt that knowledge to this particular use case). P.p.s.: the behavior is exactly the same on current stable (1.32.0)
A-type-system,A-diagnostics,A-trait-system,T-lang,C-bug,needs-rfc,T-types
low
Critical
401,069,243
go
doc: second return value of syscall.Syscall needs to be documented
I'm using Go 1.11.2 on 32 bit Windows. [Current documentation](https://golang.org/pkg/syscall/?GOOS=windows#Syscall) of `Syscall*` doesn't give any sense about second return value `r2`. And in most cases, this value seems not needed at all. But Go codebase internally uses it: https://github.com/golang/go/blob/5538a9a34fc4e395967c0233aab5bdde0cebbf9b/src/runtime/syscall_windows_test.go#L103-L118 And if I understood correctly, the second value is needed only when dealing with APIs that use 64 bit values(e.g. [VerSetConditionMask](https://docs.microsoft.com/en-us/windows/desktop/api/winnt/nf-winnt-versetconditionmask)). Since `uintptr` is 32 bit integer and can't hold those APIs' result, the second return value `r2` is used. But there isn't any documentation about return values from `syscall.Syscall*` that tells which one holds highest 32 bits, etc. Also the arguments for those APIs seems to be merged(see code above) when dealing with 64 bit values. Without knowing that, I met a horrible panic that doesn't tell any meaningful reason. So it'd be good if these behaviors are well documented.
Suggested,Documentation,NeedsFix
low
Major
401,080,582
vscode
Input variables only work with one configuration in a compound launch config
- VSCode Version: VSCode 1.30.2 - OS Version: Windows 10 Pro **Steps to reproduce** 1. Create a launch.json that has two configs, each referencing an input variable 2. Create a compound using both of those two configs 3. Launch the compound task. **Expected**: User is prompted to select input variable, input variable is passed to all configs in the compound and all tasks in the compound are run. **Actual**: User is prompted to select input variable, only the last config in the compound is run. Example launch.json: ``` { "type": "node", "request": "launch", "name": "Launch Program", "program": "${workspaceFolder}/hey.js", "env": { "Test": "${input:componentType}" } }, { "type": "node", "request": "launch", "name": "Launch Program2", "program": "${workspaceFolder}/hey2.js", "env": { "Test": "${input:componentType}" } } ,], "compounds": [ { "name": "Compound", "configurations": ["Launch Program", "Launch Program2"] } ], "inputs": [ { "id": "componentType", "description": "What type of component do you want to create?", "default": "component", "type": "pickString", "options": ["component", "directive"] } ] } ``` hey.js/hey2.js: ``` debugger; console.log('foo'); ```
bug,debug
low
Critical
401,094,936
go
cmd/go: invalidate cached binaries when statically-linked external libraries change
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? go 1.11.4 ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? amd64 ### What did you do? We have a number of C libraries that need to be linked externally. We did it by manually passing `CGO_LDFLAGS` in the build process. Whenever we change the library, go cache does not detect the changes and thus the binary is not always relinked. Turning GOCACHE off and deleting the binary will solve the problem. As go 1.12 will require the cache to be turned on, the workaround will no long work. What would be the best way to go forward?
NeedsInvestigation,FeatureRequest
low
Minor
401,096,701
godot
Time going backwards
<!-- 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 beta2 **Issue description:** <!-- What happened, and what was expected. --> See the screenshot attached. <img width="557" alt="screen shot 2019-01-20 at 15 12 20" src="https://user-images.githubusercontent.com/961822/51439643-e5bcc700-1cc5-11e9-9b91-75b004e4a29b.png">
bug,topic:core
low
Major
401,122,106
rust
Compiler should be able to compile EnumVariant(foo) == function_returning_enum() without PartialEq
Given this pseudocode ``` let result: bool = Ok(something) == some_function_returning_result(); ``` It should be transformed to this pseudocode ``` let result: bool = match some_function_returning_result() { Ok(something) => true, _ => false, }; ``` Currently I get this error. ``` error[E0277]: can't compare `errors::Error` with `errors::Error` --> src/rustup/toolchain.rs:349:35 | 349 | Ok(something) == some_function_returning_result() | ^^ no implementation for `errors::Error == errors::Error` | = help: the trait `std::cmp::PartialEq` is not implemented for `errors::Error` = note: required because of the requirements on the impl of `std::cmp::PartialEq` for `std::result::Result<std::string::String, errors::Error>` ``` It would be nice syntax sugar to have not only for `Result`, but for any generic enum.
T-lang,C-feature-request,needs-rfc
low
Critical
401,122,811
angular
Child custom element's OnInit hook is called before parent's one
# 🐞 bug report ### Affected Package The issue is caused by package @angular/elements ### Is this a regression? Dunno ### Description Wrong OnInit hooks call order when custom elements (parent + child) are added with some delay after (regular) angular component inited. ## 🔬 Minimal Reproduction https://stackblitz.com/edit/angular-elements-init-order?file=app%2Fapp.component.html 1. on toggle ``` > child OnInit > parent OnInit ``` 2. same wrong order on replacing `*ngIf="visible"` with `*ngIf="true"` 3. same wrong order on uncommenting `window.setTimeout` with `innerHTML` usage in AppComponent's OnInit hook 4. correct order on removing `<ng-container *ngIf="visible">` ``` > parent OnInit > child OnInit ``` ## 🌍 Your Environment **Angular Version:** 7.1.4 **Anything else relevant?** No such issue with native custom elements and `setTimeout` + `innerHTML` usage https://stackblitz.com/edit/custom-elements-init-order?file=index.ts ``` > parent connected > child connected ``` Real word use-case: adding unknown markup with custom elements from api response.
area: core,area: elements,state: confirmed,core: lifecycle hooks,P3
low
Critical
401,144,315
go
spec: arithmetic on complex numbers is underspecified
I can't find much about the precise behavior of floating point and complex arithmetic (`+`, `-`, `*`, `/`). For floating point this is relatively easy. For complex numbers, not so much, due to special numbers (Infinity, -Infinity, NaN) and rounding: https://medium.com/@smcallis_71148/complex-arithmetic-is-complicated-873ec0c69fc5. Would it be possible to better specify the exact behavior of complex numbers, or point to the relevant spec? It appears that IEEE-754 doesn't say anything about complex numbers. Of course, one can take a look at the [source code of the compiler](https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/ssa.go#L2020), but I would expect such details to be included in the specification. Background: I am working on a compiler for the Go language called [TinyGo](https://github.com/aykevl/tinygo). I would like to implement complex arithmetic but I'm not sure how it is supposed to be implemented.
ExpertNeeded,NeedsInvestigation
low
Minor
401,150,854
rust
impl Fn with explicit lifetimes does not implement FnOnce
```rust pub fn wrap_impl_trait<'c, 'i, I: 'i, O: 'i>( f: impl Fn(&'i I) -> &'i O + 'c, ) -> impl Fn(&'i I) -> &'i O + 'c { f } pub struct Outer(Inner); struct Inner; impl Outer { fn field(&self) -> &Inner { &self.0 } } impl Inner { fn hello_world<'r, R, N>(this: N) where N: Fn(&R) -> &Self, { println!("Hello, World!"); } } pub fn foo(m: &Outer) { let n = wrap_impl_trait(Outer::field); Inner::hello_world(n); } ``` ``` error: implementation of `std::ops::FnOnce` is not general enough --> src/lib.rs:26:5 | 26 | Inner::hello_world(n); | ^^^^^^^^^^^^^^^^^^ | = note: Due to a where-clause on `Inner::hello_world`, = note: `impl std::ops::Fn<(&Outer,)>` must implement `std::ops::FnOnce<(&Outer,)>` = note: but `impl std::ops::Fn<(&'0 Outer,)>` only implements `std::ops::FnOnce<(&Outer,)>` for the lifetime `'0` ``` [Playground](https://play.rust-lang.org/?version=beta&mode=debug&edition=2018&gist=7b721d819612b7673104e9153f4b8fa7) Replacing wrap_impl_trait with the following works (Removing explicit `'i`) ```rust pub fn wrap_impl_trait<'c, I, O>( f: impl Fn(& I) -> &O, ) -> impl Fn(& I) -> & O + 'c { f } ``` Sometimes, explicitly annotating with `'i` is required, for example when chaining two closures.
A-type-system,T-compiler,T-types
low
Critical
401,176,092
rust
VaList: Allow VaList::arg to fetch bool values
## Summary `VaList::arg::<bool>()` should work. ## Description According to [<stdbool.h>] `false` is `0` and `true` is `1`. As long as our encoding of `bool` is the same, we should allow `VaList::arg::<bool>()`. Since we take care of types smaller than an `int` in the codegen, this *should* work. Related to: #44930 CC @alexcrichton @joshtriplett [<stdbool.h>]: http://pubs.opengroup.org/onlinepubs/009604499/basedefs/stdbool.h.html
C-enhancement,A-FFI,T-libs,F-c_variadic
low
Minor
401,244,666
vscode
Windows uninstaller should have option to also remove user data dir and extensions dir
I tried to uninstall / Reinstall `Code Insider` because of a recurring Error/Crash at "startup/reloaded" (Update / Reboot / proper exit), disabling extensions and remove all custom settings did not fixed it Before re-installing i wanted to be sure i has no crap left that code have hurted `Code Insiders` .... surprise surprise .... - VSCode Version: Latest of `Code` and `Code Insider` - OS Version: `Windows 10` Steps to Reproduce: 1. Install it 2. Add extensions 3. Change settings 4. Use it 5. Update it 6. Uninstall it 7. Be curious on what's left ![image](https://user-images.githubusercontent.com/2266487/51462007-dd18cf00-1d5f-11e9-80ac-51fd683e7752.png) On top of that, i uninstalled extensions long time ago and they were still on disk, here is what `code-insiders --list-extensions` output : ``` Angular.ng-template bierner.markdown-preview-github-styles eamodio.gitlens EditorConfig.EditorConfig eg2.tslint formulahendry.dotnet-test-explorer GitHub.vscode-pull-request-github humao.rest-client icsharpcode.ilspy-vscode Ionide.Ionide-fsharp mitchdenny.ecdc ms-azuretools.vscode-azurefunctions ms-vscode.azure-account ms-vscode.cpptools ms-vscode.csharp ms-vscode.PowerShell ms-vsts.team msjsdiag.debugger-for-chrome PeterJausovec.vscode-docker ryanluker.vscode-coverage-gutters Tyriar.sort-lines VisualStudioExptTeam.vscodeintellicode ```
help wanted,feature-request,install-update,windows
low
Critical
401,421,597
react-native
Elevation does not animate when it is inside a view which animates its opacity (Android P)
## Environment ``` React Native Environment Info: System: OS: macOS 10.14.1 CPU: x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz Memory: 40.65 MB / 16.00 GB Shell: 5.6.2 - /usr/local/bin/zsh Binaries: Node: 10.11.0 - ~/.nvm/versions/node/v10.11.0/bin/node Yarn: 1.13.0 - ~/.nvm/versions/node/v10.11.0/bin/yarn npm: 6.5.0 - ~/.nvm/versions/node/v10.11.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3 Android SDK: Build Tools: 23.0.1, 26.0.2, 26.0.3, 27.0.2, 27.0.3, 28.0.1, 28.0.2, 28.0.3 API Levels: 22, 23, 24, 25, 26, 27, 28 IDEs: Android Studio: 3.3 AI-182.5107.16.33.5199772 Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild npmPackages: react: 16.6.3 => 16.6.3 react-native: 0.59.0 => 0.59.0 npmGlobalPackages: react-native-cli: 2.0.1 ``` ## Description What described in the title works in any Android but not on Android P. See the differences: ### Android P: ![androidp](https://user-images.githubusercontent.com/774577/51485870-6d2a3900-1d9f-11e9-908e-cf89d5b37adf.gif) ### Below Android P: ![notandroidp](https://user-images.githubusercontent.com/774577/51485873-70252980-1d9f-11e9-8469-271b43f87c8f.gif) ## Reproducible Demo https://snack.expo.io/@satya164/elevation-issue---android-p This can affect libraries like `react-navigation` when a new screen comes in animating its opacity. See https://github.com/react-navigation/react-navigation/issues/5535. Can be found here also https://github.com/ferrannp/react-native-elevation-animation-android-pie with react-native 0.59.X.
Help Wanted :octocat:,Ran Commands,Issue: Author Provided Repro,Platform: Android,Bug
high
Critical
401,500,265
go
cmd/vet: false positive printf detection for URL-encoded `/` (`%2F`) in string literal
<!-- 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 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/msl21dp/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/msl21dp/go" GOPROXY="" GORACE="" GOROOT="/Users/msl21dp/.gvm/gos/go1.11" GOTMPDIR="" GOTOOLDIR="/Users/msl21dp/.gvm/gos/go1.11/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/msl21dp/gomod/homedepot.com/vulcancore/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/4y/g8py5x0x0rx2qxlpxls23gnw0000gn/T/go-build585874623=/tmp/go-build -gno-record-gcc-switches -fno-common" </pre></details> ### What did you do? Using the logging library github.com/spf13/jwalterweatherman, I have this line in our logs: ``` logging.INFO.Println("Logs can be viewed at https://console.cloud.google.com/logs/viewer?project=redacted&logName=projects%2Fredacted%2Flogs%redacted") ``` This is supposed to print a URL to console that the user can click to go to the logs. Since the URL includes a slash-separated string as a parameter, those slashes have to be URL-encoded, which for a forward slach is `%2F`. <!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. --> ### What did you expect to see? No vet error ### What did you see instead? vet fires an error: ``` Logger.Println call has possible formatting directive %2F ``` Normally this wouldn't be an issue, but as of Go 1.10, `go test` now runs `go vet` natively with a hardcoded list of checks, and the only option is to either convert this to a Printf and doubling the percent signs to escape them, or disable `go vet` during `go test`, neither of which is a fantastic solution. ### Recommendations / possible resolutions: - Figure out how to filter out situations like this. In this situation, the possible formatting directive is A) uppercase, and B) in a Print call with no arguments to take the place of that directive (which would mean I would have had to have improperly use a formatting directive in a non-`f` call _and_ neglected to include the value to replace it with in the formatted string). - Allow specific tests to be disabled in the `go test` automatic run of `go vet`, possibly via a flag like `-vetflags="-printf=false"`. This would also allow any of the other vet-specific flags to be passed down to it.
NeedsDecision,Analysis
low
Critical
401,523,248
TypeScript
Intellisense should inherit documentation for Interfaces.
When implementing an interface the intellisense feature is capable of detecting the description of the interface however it does not carry over any tags such as @param and @returns. Below is a picture of an example: ![image](https://user-images.githubusercontent.com/11773232/51408711-abb8bd00-1b2d-11e9-94d9-0b58d6697b47.png) You can see that the description is properly shown however the param and returns tag is not. What is expected: ![image](https://user-images.githubusercontent.com/11773232/51408822-f6d2d000-1b2d-11e9-8bb9-522c6080aa57.png)
Suggestion,Experience Enhancement
low
Major
401,525,036
TypeScript
[TypeScript] [JSDoc] Placing documentation for function below a decorator of the function (as opposed to above it) fails to associate with the function
Issue Type: <b>Bug</b> ``` class Foo { @test /** I do not work */ public test1() {} /** I do work */ @test public test2() {} } ``` VS Code version: Code 1.30.2 (61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8, 2019-01-07T22:54:13.295Z) OS version: Windows_NT x64 10.0.17763 <details> <summary>System Info</summary> |Item|Value| |---|---| |CPUs|Intel(R) Xeon(R) CPU E3-1505M v6 @ 3.00GHz (8 x 3000)| |GPU Status|2d_canvas: enabled<br>checker_imaging: disabled_off<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>native_gpu_memory_buffers: disabled_software<br>rasterization: enabled<br>video_decode: enabled<br>video_encode: enabled<br>webgl: enabled<br>webgl2: enabled| |Memory (System)|31.86GB (17.32GB free)| |Process Argv|| |Screen Reader|no| |VM|0%| </details><details><summary>Extensions (3)</summary> Extension|Author (truncated)|Version ---|---|--- references-view|ms-|0.0.21 vscode-icons|rob|8.0.0 vscode-java-dependency|vsc|0.3.0 </details> <!-- generated by issue reporter -->
Bug,Domain: Signature Help
low
Critical
401,529,927
TypeScript
tsc fails when node_modules is symlinked to a target folder not named node_modules
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** [email protected] <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** symlink node_modules symbolic link **Code** Consider a project with the following file. ```ts import { Command, flags } from "@oclif/command"; ... ``` In addition the `node_modules` folder is symlinked to an external folder named `../<path>/node_modules_cli/`. **Expected behavior:** The compile to work correctly. **Actual behavior:** ``` $ yarn tsc yarn run v1.12.3 $ /nu/skainswo/nuvemfs/nuvemfs-cli/node_modules/.bin/tsc ../../../.links/skainswo/node_modules_cli/@oclif/command/lib/command.d.ts:1:25 - error TS2307: Cannot find module '@oclif/config'. 1 import * as Config from '@oclif/config'; ~~~~~~~~~~~~~~~ ../../../.links/skainswo/node_modules_cli/@oclif/command/lib/command.d.ts:2:25 - error TS2307: Cannot find module '@oclif/parser'. 2 import * as Parser from '@oclif/parser'; ~~~~~~~~~~~~~~~ ../../../.links/skainswo/node_modules_cli/@oclif/command/lib/flags.d.ts:1:25 - error TS2307: Cannot find module '@oclif/config'. 1 import { IConfig } from '@oclif/config'; ~~~~~~~~~~~~~~~ ../../../.links/skainswo/node_modules_cli/@oclif/command/lib/flags.d.ts:2:25 - error TS2307: Cannot find module '@oclif/parser'. 2 import * as Parser from '@oclif/parser'; ~~~~~~~~~~~~~~~ ../../../.links/skainswo/node_modules_cli/@oclif/command/lib/flags.d.ts:47:34 - error TS2307: Cannot find module '@oclif/parser/lib/flags'. 47 export { boolean, integer } from '@oclif/parser/lib/flags'; ~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../.links/skainswo/node_modules_cli/@oclif/command/lib/main.d.ts:1:25 - error TS2307: Cannot find module '@oclif/config'. 1 import * as Config from '@oclif/config'; ~~~~~~~~~~~~~~~ ../../../.links/skainswo/node_modules_cli/@types/request/index.d.ts:19:27 - error TS2307: Cannot find module 'caseless'. 19 import caseless = require('caseless'); ~~~~~~~~~~ ../../../.links/skainswo/node_modules_cli/@types/request/index.d.ts:24:27 - error TS2307: Cannot find module 'form-data'. 24 import FormData = require('form-data'); ~~~~~~~~~~~ ../../../.links/skainswo/node_modules_cli/@types/request/index.d.ts:26:24 - error TS2307: Cannot find module 'tough-cookie'. 26 import tough = require('tough-cookie'); ~~~~~~~~~~~~~~ Found 9 errors. error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` Which makes no sense since the `node_modules` directory does in fact contain all of the necessary modules. Moving the destination folder from `../<path>/node_modules_cli/` to `../<path>/node_modules/` fixes everything, and the compile goes through just fine: ``` $ yarn tsc yarn run v1.12.3 $ /nu/skainswo/nuvemfs/nuvemfs-cli/node_modules/.bin/tsc ✨ Done in 5.54s. ``` I've tested and confirmed this behavior with both relative and absolute symbolic links. **Playground Link:** n/a **Related Issues:** <!-- Did you find other bugs that looked similar? -->
Bug
low
Critical
401,546,777
go
runtime: expose morestack (or equivalent) to make calling into JIT'ed code easier (and less hacky)
### 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? N/A ### 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/jsonp/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/jsonp/go" GOPROXY="" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build594946674=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### Context Existing JITs (where the program generates machine code and then executes it on-the-fly) use a bunch of hacks to get it working from Go (without using cgo - the overhead from cgo kinda defeats the purpose of partially JIT'ing code). One of these hacks is ensuring there is enough stack space for the generated code. It would be nice for the runtime package to expose a method to ensure the stack has at least x bytes remaining for the duration of the current calling frame. (The existing hacks for managing stack size are rather nasty, and they range from trying to allocate unnecessary slices to grow the stack, to searching ELF symbols to locate runtime.morestack). There are other issues with calling into JITed code, including setting up the stack maps, ABI etc but those hacks are less subtle (and easier to test IMHO). ### Feature request Create a `runtime.EnsureMinStack(bytes uint64)` method or similar, that would ensure the current frame has at least x bytes spare stack space (growing it if necessary).
NeedsInvestigation,compiler/runtime
low
Critical
401,558,837
TypeScript
Expose JsDoc default value for optional parameters in AST
Copied from my [SO](https://stackoverflow.com/questions/54272321/does-the-typescript-compiler-expose-the-default-value-of-jsdoc-param/54273202#54273202) question: I expected to be able to extract the default value of a JsDoc param but I'm actually unable to find the default value on the JsDoc node. For example, give this: ```js /** * @param [bar=42] Bar comment. */ ``` I'd like to extract `42` from the node. Yet I find no default value field on the ts node: ![image](https://user-images.githubusercontent.com/4120386/51505771-b755ef00-1d8c-11e9-8c63-d4eba25246f1.png) It exposes `isBracketed` but I cannot find the `42`. Typescript does claim to support default JsDoc arguments: https://github.com/Microsoft/TypeScript/wiki/JSDoc-support-in-JavaScript#param-and-returns Yet I cannot seem to find the exposed in the AST... And that's because, it's not currently in the AST! The parser currently skips over the expression without storing the return value anywhere. ```ts // May have an optional default, e.g. '[foo = 42]' if (parseOptionalToken(SyntaxKind.EqualsToken)) { parseExpression(); } ``` [Source](https://github.com/Microsoft/TypeScript/blob/3a2f6a3ed1a598a241e7c750873105f22e7a2463/src/compiler/parser.ts#L6711) ## Use Cases I'm automating harvesting JsDoc comments for inclusion in my NPM `README.md` files. I'm coding in pure JS but using the TypeScript parser to dig out the JsDoc. (I would use TS except I cannot express that a key must be a symbol! So you guys owe me! jk) ## Examples I'd like to expose via the TS AST that `isFunction` is default false: ``` /** * @description Creates a descriptor that is an alias of another accessor or function. * * @param name The name of the accessor or function being aliased. * @param [isFunction=false] True, if the alias target is a function. * * @returns A descriptor which will access or invoke a member of the specified name. */ ``` Then my glorious `@kingjs\expand-readme` [npm package](https://www.npmjs.com/package/@kingjs/property-descriptor.create-alias) can harvest that from the AST [here](https://github.com/kingces95/kingjs/blob/7b3fd2b94cb2e77d612555916bb362d6750a535a/expand-readme/first-jsdoc.js#L127). And then my equally glorious documentation can include the default value: ```` ## API ```ts alias(name[, isFunction=false]) ``` ### Parameters - `name`: The name of the accessor or function being aliased. - `isFunction`: True, if the alias target is a function. ### Returns A descriptor which will access or invoke a member of the specified name. ```` I'd guess this would be fairly trivial to expose on the AST. Just have to decide on a name. Maybe `defaultValue`? Or `rawDefaultValue` just so I can return the string without concern for its type? Or maybe just a node that I can pull the raw text out of? Maybe you guys could make it an "up for grabs". ## 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,Domain: JSDoc
low
Major
401,598,964
deno
QUIC & HTTP/3 support
It would be nice if the Deno standard library had QUIC protocol support out-of-the-box, implemented in Rust underneath. QUIC will likely be the UDP-based alternative to TCP used as the foundation for the Internet Engineering Task Force (IETF)'s upcoming [HTTP3 spec](https://tools.ietf.org/html/draft-ietf-quic-http-17). Essentially QUIC is a more efficient implementation of the combined capabilities of TCP and TLS, and a less mature version of QUIC has been used by Google for years in requests from Chrome to its own webservers. Node.js has [an open issue](https://github.com/nodejs/node/issues/23064) for adding in QUIC support, but based on the discussion there I'm assuming that the priority is low for them. They may not understand the significance of adding support.
public API,suggestion,ext/fetch,ext/http
high
Critical
401,620,610
flutter
The Xcode build process in mac.dart needs tests
See https://github.com/flutter/flutter/pull/26826 We need to test that method. It may have been assumed that it was tested in devicelab tests that run `flutter build ios` and `flutter run` (for iOS), but those tests were somehow succeeding even though local runs of it failed.
a: tests,platform-ios,tool,platform-mac,P3,team-ios,triaged-ios
low
Critical
401,699,752
kubernetes
Do not remount volume again after it is detached
This issue replaces https://github.com/kubernetes/kubernetes/issues/64474. **What happened**: Volume may be remounted after it is detached. **What you expected to happen**: Volume will not be remounted after it is detached. **How to reproduce it (as minimally and precisely as possible)**: See https://github.com/kubernetes/kubernetes/pull/64610.
kind/bug,sig/storage,lifecycle/frozen
low
Major
401,734,067
go
cmd/go: 'go list' should not resolve or record modules that are not relevant to the requested output fields
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version devel +4b3f04c63b Thu Jan 10 18:15:48 2019 +0000 linux/amd64 </pre> ### Does this issue reproduce with the latest release? yes ### What operating system and processor architecture are you using (`go env`)? <details><summary><code>go env</code> Output</summary><br><pre> $ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/rog/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/rog/src/go" GOPROXY="http://localhost:3000" GORACE="" GOROOT="/home/rog/go" GOTMPDIR="" GOTOOLDIR="/home/rog/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/tmp/m/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build480679307=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### What did you do? Here is a script that illustrates the issue (reproduce by saving contents to a file and running the testscript command on it (`go get github.com/rogpeppe/go-internal/cmd/testscript`) # Create the module and tidy it. go mod init m go mod tidy cmp go.mod go.mod-after-tidy # Run a `go list` command to list the parent of the used package. go list github.com/btcsuite/btcutil cmp go.mod go.mod-after-list # Running `go mod tidy` removes the new dependencies. go mod tidy cmp go.mod go.mod-after-tidy -- main.go -- package main import _ "github.com/btcsuite/btcutil/base58" func main() { } -- go.mod-after-tidy -- module m go 1.12 require github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a -- go.mod-after-list -- module m go 1.12 require ( github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d // indirect github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 // indirect ) I would not expect `go list` to add dependencies that aren't actually used by the code to `go.mod`.
NeedsDecision,GoCommand,modules
low
Critical
401,817,927
youtube-dl
Export CRID in
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2019.01.17** - [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones - N/A Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser ### What is the purpose of your *issue*? - [x] Feature request (request for a new functionality) --- The ARDBetaMediathek, encoded in its URI paths, encodes information about the CRID of the provided media item. For example, [Die Sendung mit der Maus](https://www.ardmediathek.de/ard/player/Y3JpZDovL3dkci5kZS9CZWl0cmFnLTI1MDYwOThjLTJjNjEtNDJiZS05Mjc4LWUwNWEyNjFhMmM2NA/die-sendung-vom-13-01-2019) contains `Y3JpZDovL3dkci5kZS9CZWl0cmFnLTI1MDYwOThjLTJjNjEtNDJiZS05Mjc4LWUwNWEyNjFhMmM2NA` in its path, which is base64-without-padding for `crid://wdr.de/Beitrag-2506098c-2c61-42be-9278-e05a261a2c64`. The format of a CRID and its purpose are explained in [RFC4078](https://tools.ietf.org/html/rfc4078), and that those identifiers can be used to correlate downloaded episodes with other sources of information, eg. the [checkeins metadata on the same episode](https://www.checkeins.de/die-sendung-mit-der-maus-vom-20-01-2019-100~playerXml.xml?t=19-01-20-03-08). Please consider exporting the CRID in a dedicated field in exported JSON files for backends on which that information is available (so far, I'm only aware of this on ARDBetaMediathek).
request
low
Critical
401,823,391
react
`useCallback()` & `useMemo()` automatically with a Babel Plug-in
**Do you want to request a *feature* or report a *bug*?** Feature request. **What is the current behavior?** We need to `useCallback()` and `useMemo()` which seems redundant and can cost us in performance if not used right, which is likely to happen. **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:** ```js export default ({ data, sortComparator, filterPredicate, history }) => { const transformedData = data.filter(filterPredicate).sort(sortComparator) return ( <div> <button className="back-btn" onClick={() => history.pop()} /> <ul className="data-list"> {transformedData.map(({ id, value }) => ( <li className="data-item" key={id} onClick={() => history.push(`data/${id}`)}>{value}</li> ))} </ul> </div> ) } ``` **What is the expected behavior?** Just like the [docs](https://reactjs.org/docs/hooks-reference.html#usecallback) suggest: ``` In the future, a sufficiently advanced compiler could create this array automatically. ``` Accordingly, I have implemented a Babel-plug-in that does exactly that; see [babel-plugin-react-persist](https://github.com/DAB0mB/babel-plugin-react-persist). Given the code snippet above, the plug-in should generate the following output: ```js let _anonymousFnComponent, _anonymousFnComponent2 export default ({ data, sortComparator, filterPredicate, history }) => { const transformedData = React.useMemo(() => data.filter(filterPredicate).sort(sortComparator) , [data, data.filter, filterPredicate, sortComparator]) return React.createElement(_anonymousFnComponent2 = _anonymousFnComponent2 || (() => { const _onClick2 = React.useCallback(() => history.pop(), [history, history.pop]) return ( <div> <button className="back-btn" onClick={_onClick2} /> <ul className="data-list"> {transformedData.map(({ id, value }) => React.createElement(_anonymousFnComponent = _anonymousFnComponent || (() => { const _onClick = React.useCallback(() => history.push(`data/${id}`) , [history, history.push, id]) return ( <li className="data-item" key={id} onClick={_onClick}> {value} </li> ) }), { key: id }) )} </ul> </div> ) }), null) } ``` The plug-in will: - `useCallback()` automatically when a function is created. - `useMemo()` automatically when a value is assigned. - Will memoize inline callbacks. I don't see however how can `useEffect()` be inferred automatically and if it's a good idea. The plug-in is not a feature request directly for React, but since it's stated in the docs I thought maybe it can be useful somehow. Maybe it can potentially be included as part of `create-react-app`? Would like to hear your thoughts about it. An alternative solution is suggested at #14406, but I don't see why do this at runtime when everything can be done ahead of time and save processing power. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** React 16.8-alpha (hooks)
Type: Discussion
medium
Critical
401,849,901
TypeScript
Easier destructuring with type annotations on binding patterns
<!-- 🚨 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 --> type inference destructuring syntax conflict ## Suggestion <!-- A summary of what you'd like to see added or changed --> It's currently not possible to destructure a value in Typescript and provide types for each of the values due to the syntax clash with destructuring and renaming at the same time. You can see exactly this issue in the Typescript FAQs at: https://github.com/Microsoft/TypeScript/wiki/FAQ#why-cant-i-use-x-in-the-destructuring-function-f-x-number------ This is frustrating when programming in React where it's very common to see this pattern: ```typescript const MyComponent = ({ a, b }) => { // ... } ``` But in Typescript a and b are untyped (inferred to have type `any`) and type annotation must be added (either to aid in type safety or to avoid compiler errors, depending on the state of the user's strict flags). To add the correct type annotation it feels natural to write: ```typescript const MyComponent = ({ a : string, b : number }) => { // ... } ``` but that's not what the user thinks due to the aforementioned syntax clash. The only valid syntax in Typescript is actually this: ```typescript const MyComponent = ({ a, b } : { a : string, b : number }) => { // ... } ``` Which is very strange to write and difficult to read when the object has more than two parameters or the parameters have longer names. Also the value names have been duplicated -- once in the destructuring and once in the type annotation. I suggest we allow some other symbol (my current thinking is a double colon) to make the syntax unambiguous in this specific scenario: ```typescript const MyComponent = ({ a :: string, b :: number }) => { // ... } ``` Although this is really the only place it would be used, for the sake of consistency, I think is should be allowed everywhere: ```typescript const a :: string = ""; const b :: number = 1; ``` ## Use Cases <!-- What do you want to use this for? What shortcomings exist with current approaches? --> It would allow for type-safe destructuring of values where the type cannot be inferred by the compiler (such as function parameters). ## Examples <!-- Show how this would be used and what the behavior would be --> A good example of the sort of React components I'm talking about (and one of the first Google results for React Functional Components) can be found at https://hackernoon.com/react-stateless-functional-components-nine-wins-you-might-have-overlooked-997b0d933dbc. We can use my proposed syntax in the functional component definition: ```typescript import React from 'react' const HelloWorld = ({name :: string}) => { const sayHi = (event) => { alert(`Hi ${name}`) } return ( <div> <a href="#" onclick={sayHi}>Say Hi</a> </div> ) } ``` ## 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
high
Critical
401,897,380
flutter
[Bug?] in didPopNext and didPop call order
Hi, The following code is the logic from `RouteObserver` which calls any `RouteAware` widgets when a route is popped. ```dart @override void didPop(Route<dynamic> route, Route<dynamic> previousRoute) { if (route is R && previousRoute is R) { final List<RouteAware> previousSubscribers = _listeners[previousRoute]?.toList(); if (previousSubscribers != null) { for (RouteAware routeAware in previousSubscribers) { routeAware.didPopNext(); } } final List<RouteAware> subscribers = _listeners[route]?.toList(); if (subscribers != null) { for (RouteAware routeAware in subscribers) { routeAware.didPop(); } } } } ``` In my app I have a feature flag that I turn on/off based on the page that I'm showing, and rely on the `RouteAware` callbacks. I wrap all the pages where I want to enable the feature flag in a `RouteAware` widget, which turns the global flag to `TRUE` if `didPush(starting the page)`/`didPopNext(coming back from the next page)`, or `FALSE` if `didPop(closing the page)`/`didPushNext(going to the next page)`. The problem comes when I have two sequential pages that turn ON the feature flag and the second one navigates back to the first one, because the logic calls `previousRouteSubscribers` first, so, `didPopNext` on page A is called first, and `didPop` on page B is called second, which turns my flag `TRUE` and then `FALSE`, which is not what I want. My first instinct would be that you first want to call the callbacks registered by page B because we are disposing of it, and want to clean it first, and then the callbacks for page A, because we are going to it. Is this the intended order, or should there be a mechanism to chose what order in which you want the callback fired, or should I not rely on this api for what I'm trying to achieve? Minimal reproducible example: ```dart import 'package:flutter/material.dart'; void main() => runApp(MyApp()); final routeObserver = RouteObserver<PageRoute>(); ValueNotifier<bool> isFeatureFlagEnabled = ValueNotifier(false); class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( navigatorObservers: [routeObserver], title: 'Flutter Demo', theme: ThemeData( // is not restarted. primarySwatch: Colors.blue, ), home: Page1(), ); } } // Feature Flag ENABLED class Page3 extends StatelessWidget { @override Widget build(BuildContext context) { return FeatureFlagWidget( child: Scaffold( appBar: AppBar( leading: BackButton(), title: Text('Page 3'), centerTitle: true, ), body: SafeArea( child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ AnimatedBuilder( animation: isFeatureFlagEnabled, builder: (BuildContext context, Widget child) { return Text('Feature flag is enabled is ' '${isFeatureFlagEnabled.value.toString().toUpperCase()}'); }, ), ], ), )), ), ); } } // Feature Flag NOT ENABLED class Page1 extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( leading: BackButton(), title: Text('Page 1'), centerTitle: true, ), body: SafeArea( child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ AnimatedBuilder( animation: isFeatureFlagEnabled, builder: (BuildContext context, Widget child) { return Text('Feature flag is enabled is ' '${isFeatureFlagEnabled.value.toString().toUpperCase()}'); }, ), RaisedButton( onPressed: () { _pushMaterialPageRoute(context, Page2()); }, child: Text('Go to Page 2'), ), ], ), )), ); } } // Feature Flag ENABLED class Page2 extends StatelessWidget { @override Widget build(BuildContext context) { print("hello"); return FeatureFlagWidget( child: Scaffold( appBar: AppBar( leading: BackButton(), title: Text('Page 2'), centerTitle: true, ), body: SafeArea( child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ AnimatedBuilder( animation: isFeatureFlagEnabled, builder: (BuildContext context, Widget child) { return Text('Feature flag is enabled is ' '${isFeatureFlagEnabled.value.toString().toUpperCase()}'); }, ), RaisedButton( onPressed: () { _pushMaterialPageRoute(context, Page3()); }, child: Text('Go to Page 3'), ), ], ), )), ), ); } } class FeatureFlagWidget extends StatefulWidget { FeatureFlagWidget({this.child}); final Widget child; @override _FeatureFlagWidgetState createState() => _FeatureFlagWidgetState(); } class _FeatureFlagWidgetState extends State<FeatureFlagWidget> with RouteAware { @override void didChangeDependencies() { super.didChangeDependencies(); routeObserver.subscribe(this, ModalRoute.of(context)); } @override void dispose() { routeObserver.unsubscribe(this); super.dispose(); } @override void initState() { // TODO: implement initState super.initState(); } @override void didPush() { print("didPush"); // To avoid updating while widget is building Future.microtask(() { isFeatureFlagEnabled.value = true; }); } @override void didPopNext() { print("didPopNext"); isFeatureFlagEnabled.value = true; } @override void didPop() { print("didPop"); isFeatureFlagEnabled.value = false; } @override void didPushNext() { print("didPushNext"); isFeatureFlagEnabled.value = false; } @override Widget build(BuildContext context) => widget.child; } void _pushMaterialPageRoute(BuildContext context, Widget child) => Navigator.of(context).push( MaterialPageRoute<void>(builder: (BuildContext context) => child)); ``` When you run the example, see the when you go forward Page 1 -> Page 2 -> Page 3, feature flag is enabled on Page 2 and Page 3, but when you come back from Page 3 to Page 2, the flag is false. That is because `didPopNext(of Page 2)` got called before `didPop(of Page 3)`. Thanks!
framework,f: routes,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-framework,triaged-framework
low
Critical
401,903,590
go
cmd/compile: unnecessary bounds check
### What did you do? I compiled the following program to see its assembly code: https://godbolt.org/z/OcRvPE ### What did you expect to see? I expected the access to the slice to not be bounds checked ### What did you see instead? A bounds check was generated by the Go compiler
Performance,help wanted,NeedsInvestigation
medium
Critical
401,968,802
vue
Function-type props broken in TypeScript
### Version 2.5.22 ### Reproduction link [https://jsfiddle.net/keegan_openbay/gehkx7pf/10/](https://jsfiddle.net/keegan_openbay/gehkx7pf/10/) [https://jsfiddle.net/keegan_openbay/018rs3ae/11/](https://jsfiddle.net/keegan_openbay/018rs3ae/11/) (More explanation in the fiddle, but keep in mind that JSFiddle doesn't show TS errors) ### Steps to reproduce 1. Declare a prop of type `Function`, and with a default function that returns some value; e.g., ```ts // ... props: { fooFn: { type: Function, default: () => true, }, }, // ... ``` 2. Try to use that function elsewhere in your component options; e.g., ```ts // ... methods: { useFooFn(): void { const bar = this.fooFn(); // ... }, }, // ... ``` ### What is expected? ```ts type FooFn = typeof this.fooFn; // Function this.fooFn(); // no errors ``` ### What is actually happening? ```ts type FooFn = typeof this.fooFn; // boolean | Function this.fooFn(); // Cannot invoke an expression whose type lacks a call signature. // Type 'boolean | Function' has no compatible call signatures. ``` --- Vue version: 2.5.22 TypeScript version: 3.0.3 tsconfig.json: ```json { "compilerOptions": { "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": ["es7", "dom"], "module": "es2015", "moduleResolution": "node", "sourceMap": true, "target": "es5", "allowSyntheticDefaultImports": true, "esModuleInterop": true, "baseUrl": "./app/javascript", "noImplicitThis": true }, "include": [ "app/javascript/**/*.ts", "app/javascript/**/*.tsx", "app/javascript/**/*.vue" ], "exclude": [ "**/*.spec.ts", "node_modules" ], "compileOnSave": false } ``` <!-- generated by vue-issues. DO NOT REMOVE -->
typescript
medium
Critical
401,976,206
go
cmd/cgo: _GoString_ is a reserved identifier
(Removing the template since this is not really a code bug or so.) https://golang.org/cmd/cgo/#hdr-Go_references_to_C explains that there's a type `_GoString_`. However, that name is reserved (see https://en.cppreference.com/w/c/language/identifier#Reserved_identifiers), and using it is technically undefined behavior. I'd suggest renaming the type to just `GoString` in future versions, with the old name as undocumented and deprecated alias.
help wanted,NeedsFix,compiler/runtime
low
Critical
401,978,635
go
cmd/cgo: map sized integer types to C equivalents
(Removing the template since this is an enhancement proposal) The type mappings at https://golang.org/cmd/cgo/#hdr-Go_references_to_C don't state which Go types the sized C integer types `int8_t` etc. are mapped to. In C, these types have the same requirements as the corresponding Go types: they are not allowed to have padding bits and have to use two's complement representation, see https://en.cppreference.com/w/c/types/integer. Therefore, these types are guaranteed to have the same domain and representation as the corresponding Go types. So I propose to always represent these types with each other and formally document that fact. It would reduce the need for casts and would make it more obvious that there's no chance of data loss.
help wanted,NeedsFix,compiler/runtime
low
Critical
401,982,954
TypeScript
type predicate-ness lost when using Function.prototype.bind
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.2.4 or @next as of 2019-01-22 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** **Code** ```ts const isArray: typeof Array.isArray = Array.isArray.bind(Array); ``` **Expected behavior:** Compiles. **Actual behavior:** Error message: ```ts error TS2322: Type '(arg: any) => boolean' is not assignable to type '(arg: any) => arg is any[]'. Signature '(arg: any): boolean' must be a type predicate. ``` What seems to be happening is that the type predicate-ness of Array.isArray is lost when .bind is used. I tested with a few type predicate functions, and always get the same error. **Playground Link:** Not reproducible on playground, because it depends on a higher TS version. [In the playground](https://www.typescriptlang.org/play/index.html#src=%0D%0Aconst%20isArray%20%3D%20Array.isArray.bind(Array)%3B%0D%0A%0D%0A%0D%0A%0D%0A), the type of the RHS is `any`, so there is no compilation error. **Related Issues:** - Typings for `Function.prototype.bind` were discussed in https://github.com/Microsoft/TypeScript/issues/212 but I couldn't find any mention of type predicates. - [Discussion on StackOverflow](https://stackoverflow.com/questions/54316578/type-predicate-ness-lost-when-using-function-prototype-bind?noredirect=1#comment95453581_54316578)
Suggestion,Help Wanted,Domain: lib.d.ts,Experience Enhancement
low
Critical
402,048,859
TypeScript
tsserver signals TS7017 incorrectly when using a symbol-indexed property
When declaring a symbol-indexed property on an existing interface, attempting to use it gives error TS7017 in VSCode. `tsc`, however, compiles it without complaint, implying a bug in `tsserver`. **TypeScript Version:** 3.3.0-dev.20190119 **Search Terms:** TS7017 tsserver symbol property **Code** ```ts const additionalProp = Symbol(); interface Document { [additionalProp]?: number; } document[additionalProp] = 42; // TS7017 in tsserver/vscode (but not tsc) console.log(document[additionalProp]); // same ``` **`tsconfig.json`:** ```json { "compilerOptions": { "strict": true, "charset": "UTF-8", "target": "es6", "module": "es6", "lib": ["es6", "dom"] } } ``` **Expected behavior:** The above code does not have any error highlights. **Actual behavior:** There is an error highlight. The hover says: “Element implicitly has an 'any' type because 'Document' has no index signature. ts (7017)” [**Playground Link**](https://www.typescriptlang.org/play/#src=const%20additionalProp%20%3D%20Symbol()%3B%0D%0A%0D%0Ainterface%20Document%20%7B%0D%0A%09%5BadditionalProp%5D%3F%3A%20number%3B%0D%0A%7D%0D%0A%0D%0Adocument%5BadditionalProp%5D%20%3D%2042%3B%20%2F%2F%20TS7017%20in%20tsserver%20(but%20not%20tsc)%3A%20type%20'Document'%20has%20no%20index%20signature%0D%0Aconsole.log(document%5BadditionalProp%5D)%3B%0D%0A) — The Playground also shows the incorrect error highlight. **Related Issues:** None, as far as I can tell.
Bug,Domain: TSServer
low
Critical
402,063,413
rust
error[E0275]: "overflow evaluating the requirement" triggered by importing a path of length 2
This *might* be a duplicate of #39959. I'm posting a new issue here as the mechanism that the error is triggered significantly differs from that in the aforementioned issue. ## Sample code ```toml [package] name = "example" version = "0.1.0" authors = ["Author"] edition = "2018" [dependencies] tokio = "=0.1.14" ``` ```rust use std::fs::File; use std::io::{Read, Write}; use std::path::Path; // Comment this out... and everything will work fine use thisdoesntexistyolo::haha; struct Something<T: Read + Write> { thing: T, } impl<'a, T: 'a + Read + Write> Something<T> where &'a T: Read, { fn new(thing: T) -> Something<T> { Something { thing } } } fn main() { let file = File::open(Path::new("doesntmatter.txt")).unwrap(); let mut st: Something<File> = Something::new(file); } ``` ([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=69a4b74228bcd717f8491debc3c23318)) ``` error[E0432]: unresolved import `thisdoesntexistyolo` --> src/main.rs:6:5 | 6 | use thisdoesntexistyolo::haha; | ^^^^^^^^^^^^^^^^^^^ use of undeclared type or module `thisdoesntexistyolo` warning: unused import: `thisdoesntexistyolo::haha` --> src/main.rs:6:5 | 6 | use thisdoesntexistyolo::haha; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] on by default error[E0275]: overflow evaluating the requirement `_: std::marker::Sized` --> src/main.rs:23:35 | 23 | let mut st: Something<File> = Something::new(file); | ^^^^^^^^^^^^^^ | = help: consider adding a `#![recursion_limit="128"]` attribute to your crate = note: required because of the requirements on the impl of `std::io::Read` for `&tokio_reactor::poll_evented::PollEvented<_>` = note: required because of the requirements on the impl of `std::io::Read` for `&tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<_>>` = note: required because of the requirements on the impl of `std::io::Read` for `&tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<_>>>` = note: required because of the requirements on the impl of `std::io::Read` for `&tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<_>>>>` [...] = note: required because of the requirements on the impl of `std::io::Read` for `&tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<tokio_reactor::poll_evented::PollEvented<_>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` ``` ## Details - This issue will still occur if the imported package is real. - When `use thisdoesntexistyolo::haha;` is replaced with anything more than 2 levels deep like `use thisdoesntexistyolo::a::b;`, the code will compile without the error.
A-type-system,T-compiler,C-bug,T-types
medium
Critical
402,082,797
godot
AnimationPlayer "Loop" property working sporadically
**Godot version:** 3.1 beta 2 **OS/device including version:** Windows 10 **Issue description:** AnimationPlayer not respecting the "loop" setting. Plays animation only once. I've tried setting the loop property via code as well to no avail. **Steps to reproduce:** Setup an animation that is supposed to loop. Seems to work sporadically. Sometimes it will loop correctly, but most times it will not. **Minimal reproduction project:** I noticed it while going through this tutorial, so here's the project I've got so far. [Zeldalike-Tutorial.zip](https://github.com/godotengine/godot/files/2785846/Zeldalike-Tutorial.zip)
bug,topic:core,confirmed
medium
Critical
402,126,037
flutter
PluginRegistry.ActivityResultListener: not triggered
## Steps to Reproduce 1. Create a Flutter package in java 2. In plugin class add a Activity result listener 3. In onMethodCall call startActivityForResult 4. In Activity called, at a certain point, call setResult and finish Issue is the `onActivityResult' plugin is not triggered when Activity child call finish. here's the code of parent `MyBarcodeScannerPlugin` ... ```java public class MyBarcodeScannerPlugin implements MethodCallHandler, PluginRegistry.ActivityResultListener { private final Activity activity; private Result result; public static void registerWith(Registrar registrar) { final MethodChannel channel = new MethodChannel(registrar.messenger(), "my_barcode_scanner"); final MyBarcodeScannerPlugin plugin = new MyBarcodeScannerPlugin(registrar.activity()); channel.setMethodCallHandler(plugin); registrar.addActivityResultListener(plugin); } private MyBarcodeScannerPlugin(Activity activity) { this.activity = activity; } @Override public void onMethodCall(MethodCall call, Result result) { if (call.method.equals("scan")) { this.result = result; showBarcodeView(activity); } else { result.notImplemented(); } } private void showBarcodeView(Activity activity) { Intent intent = new Intent(activity, MyBarcodeScannerActivity.class); activity.startActivityForResult(intent, 100); } @Override public boolean onActivityResult(int requestCode, int resultCode, Intent data) { // IT DOES NOT FIRE ! if (requestCode == 100) { if (resultCode == Activity.RESULT_OK) { this.result.success(""); } else { String errorCode = data.getStringExtra("ERROR_CODE"); this.result.error(errorCode, null, null); } return true; } return false; } } ``` And here's the child activity that finish when user deny permission... ```java public class MyBarcodeScannerActivity extends AppCompatActivity { ... ... private void finishWithError(String errorCode) { Intent intent = new Intent(); intent.putExtra("ERROR_CODE", errorCode); setResult(Activity.RESULT_CANCELED, intent); finish(); } ... public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) { switch (requestCode) { case REQUEST_CAMERA: if (grantResults.length > 0) { boolean cameraAccepted = grantResults[0] == PackageManager.PERMISSION_GRANTED; if (cameraAccepted){ }else { finishWithError("PERMISSION_NOT_GRANTED"); } } break; } } } ``` <!-- Finally, paste the output of running `flutter doctor -v` here. --> ``` flutter doctor -v [√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Versione 10.0.16299.904], locale it-IT) • Flutter version 1.0.0 at C:\dati\Flutter\flutter • Framework revision 5391447fae (8 weeks ago), 2018-11-29 19:41:26 -0800 • Engine revision 7375a0f414 • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297) [√] Android toolchain - develop for Android devices (Android SDK 28.0.3) • Android SDK at C:/Users/... • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.3 • ANDROID_HOME = C:/Users/... • Java binary at: C:\dati\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02) [√] Android Studio (version 3.1) • Android Studio at C:\dati\Android\Android Studio • Flutter plugin version 29.0.1 • Dart plugin version 173.4700 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02) [√] IntelliJ IDEA Community Edition (version 2018.1) • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.1.4 • Flutter plugin version 25.0.2 • Dart plugin version 181.4892.1 [√] VS Code, 64-bit edition (version 1.23.1) • VS Code at C:\Program Files\Microsoft VS Code • Flutter extension version 2.13.2 [√] Connected device (1 available) • Redmi Note 5 • 8614d893 • android-arm64 • Android 8.1.0 (API 27) ```
engine,P2,a: plugins,team-engine,triaged-engine
low
Critical
402,130,079
go
x/text/language: matcher doesn't match en-SG exactly to en
#### What version of Go are you using (go version)? `go version go1.11 darwin/amd64` #### What operating system and processor architecture are you using (go env)? amd64, macOS Sierra 10.12.6 #### What did you do? ```go package main import ( "fmt" "golang.org/x/text/language" ) func main() { preferredTags := []language.Tag{language.English, language.Malay} matcher := language.NewMatcher(preferredTags) locale := "en-SG;q=1.0, zh-Hant-HK;q=0.9, ms-SG;q=0.8, ja-SG;q=0.7, zh-Hans-SG;q=0.6, en-GB;q=0.5" tags, _, _ := language.ParseAcceptLanguage(locale) match, _, confidence := matcher.Match(tags...) fmt.Printf("Matched %v with confidence %v", match, confidence) } ``` #### What did you expect to see? ``` Matched en with confidence Exact ``` #### What did you see instead? ``` Matched ms-u-rg-sgzzzz with confidence High ``` If you replace `en-SG` with `en-US` in the `locale` string, then it does indeed exactly match to `en` (`en-u-rg-uszzzz`)
NeedsInvestigation
low
Minor
402,139,090
pytorch
I hope Caffe2's python interface add DataLoader Module Similar to pytorch's DataSet and DataLoader
I abstract the trainable cnn model to three parts:DataInput、 convolution blocks、 output/loss。 Train are mostly use python interface for fast implementation, now caffe2 already have many Various operators like conv、bn、losses, and some data read operators; I find that no matter it is detection, classification, tracking tasks, ---convolution blocks and output/loss are relatively fixed(mostly use Common Structure like resnet50), but The input part of the network is various, especially in the multi-task problems.That is to say, if we want to implement an idea, the most part we should change is the trian input part(which is only used in train mode, inference's input is just an image),Deploy in with cpp interface does not require input part, so the trian input part is Unworthy to implement it in cpp by end users. So I hope Caffe2's python interface could add DataLoader Module Similar to pytorch's DataSet and DataLoader, so that we could speed up very mush to Realize our ideas with caffe2 support。 Thank you!
caffe2
low
Minor
402,193,734
flutter
[image_picker] New feature to store picked image/video in a custom path.
this is image path "/storage/emulated/0/Android/data/com.example.xxxxx/files/Pictures/cd7fa05d-2f01-47ec-b733-d535c2ed50972289172933902660221.jpg". ``` var image = await ImagePicker.pickImage(source: ImageSource.camera); print(image); // storage/emulated/0/Android/data/com.example.xxxxx/files/Pictures/cd7fa05d-2f01-47ec-b733-d535c2ed50972289172933902660221.jpg` ``` I want to save the photo in sdCard. but i don't how to resolve it.
c: new feature,p: image_picker,package,c: proposal,team-ecosystem,P2,triaged-ecosystem
low
Major
402,205,657
vscode
Clear all problems in the 'Problems' pane with a button
Please add a button in the `Problems` pane that allows the developer to clear all items in there. **Following discussions from #15524, #29169, #66343 and #50448.** Currently we see problems from different sources (linters, tasks, etc) and they sometimes stay there after the problem or the source file is gone, e.g. problems in an unsaved buffer, in files that were renamed, or files removed when we switch Git branches. More often than not I have a bunch of problems and the only way to clear that pane is to restart the entire editor.
feature-request,error-list,languages-diagnostics
high
Critical