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 |
---|---|---|---|---|---|---|
413,867,752 | go | x/tools/go/packages: preserve information about original errors | I was looking at migrating a tool off of the golang.org/x/tools/go/loader package, as it is seemingly deprecated for use with Go modules, switching it onto https://godoc.org/golang.org/x/tools/go/packages. I ran into a disparity between the two packages in the type of errors that are available to the user after loading in the packages of interest.
A [`loader.PackageInfo`](https://godoc.org/golang.org/x/tools/go/loader#PackageInfo) provides a struct field `Errors []error`, which allows one to do type introspection on the actual error returned from within the loading process.
In contrast, the [`packages.Package`](https://godoc.org/golang.org/x/tools/go/packages#Package) has an `Errors []Error` struct field, where all the errors from the underlying loading process have been one-way transformed into a new struct that loses information, or at least makes it harder to get at. That conversion process happens here: https://github.com/golang/tools/blob/83362c3779f5f48611068d488a03ea7bbaddc81e/go/packages/packages.go#L613-L660
The specific use case I have is to introspect certain types of [`types.Error`](https://golang.org/pkg/go/types/#Error) values so that the tool can then go and attempt to fix those errors in an automated fashion. Since the `types.Error` gets stringified, that information is no longer readily available.
### Proposal
My proposal is to augment the `packages.Error` type to include an `Err error` field that a user of the package can introspect further if desired.
```go
// An Error describes a problem with a package's metadata, syntax, or types.
type Error struct {
Pos string // "file:line:col" or "file:line" or "" or "-"
Msg string
Kind ErrorKind
Err error
}
```
### Alternative workarounds
One can write parsing logic for the current `Error.Pos` field based on what is currently done in the source code, but this seems unnecessary given that the underlying information was already present in a more structured form. | NeedsInvestigation,Tools | low | Critical |
413,880,901 | create-react-app | Create react app won't work on Windows if there are spaces in your username | **tl;dr - https://github.com/zkat/npx/issues/100 is an issue for create-react-app since all Windows 10 users with a space in their name won't be able to use create-react-app (unless they rename their user account home directory, a heavy process). It is not a friendly experience to dig around the internet to find the above-mentioned npx bug. Details below.**
### Is this a bug report?
Yes. Bug is with downstream dependency (npx and node) but it directly affects create-react-app.
### Did you try recovering your dependencies?
No, because the bug happens even before I can start anything.
### Which terms did you search for in User Guide?
"windows"
### Environment
Windows 10 Professional
When I try to collect platform information, here is what I get (inside cmdr):
```
C:\Users\Keir Mierle
Ξ» npx create-react-app --info
Error: EPERM: operation not permitted, mkdir 'C:\Users\Keir'
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:228:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:266:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach (<anonymous>)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:173:20)
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at process.emit (events.js:189:13)
at process._fatalException (internal/bootstrap/node.js:494:27)
Install for create-react-app@latest failed with code 7
```
### Steps to Reproduce
I posted these steps to the npx repository upstream bug:
https://github.com/zkat/npx/issues/100#issuecomment-466825507
Steps:
1. Be on Windows 10, with a username that has spaces (like "Jane Doe") instead of without spaces (like "janedoe").
2. Remove any old node installs or caches. In my case, this machine has never had node.
3. Install Node 10.15.1 LTS from the main Node site .
4. They try running `npx create-react-app my-app`; it fails with the mentioned `EPERM` error (below).
5. They try running `npm init react-app my-app`, alternate command mentioned on the Create React App README; same error (below).
4. The user spends 30 minutes tracking down this issue in GitHub.
This is the error:
```
c:\t
Ξ» npx create-react-app my-app
Error: EPERM: operation not permitted, mkdir 'C:\Users\Keir'
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:228:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:266:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach (<anonymous>)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:173:20)
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at process.emit (events.js:189:13)
at process._fatalException (internal/bootstrap/node.js:494:27)
Install for create-react-app@latest failed with code 7
```
All Windows users with a space in their filename will encounter this issue. It looks like there was some movement at https://github.com/zkat/npx/pull/181 , but then the work tailed off and wasn't merged. Perhaps if the proper fix can't get completed anytime soon, a more informative message could get printed when the problem is detected.
### Expected Behavior
Create react app creates an app.
### Actual Behavior
The error message shown above.
### Reproducible Demo
Since this is an OS issue, just get Windows 10, make a user with spaces in the name like "Jane Doe", then try doing the first 3 commands in the create react app guide. | issue: bug,tag: underlying tools,difficulty: starter,contributions: claimed,good first issue | high | Critical |
413,881,075 | rust | Tracking issue for RFC 2627: #[link(kind="raw-dylib")] | This is the tracking issue for [RFC 2627](https://github.com/rust-lang/rfcs/pull/2627), `#[link(kind="raw-dylib")]`.
**Note:** `raw-dylib` and `link_ordinal` are now stabilized in 1.65 on Windows for x86_64, aarch64, and thumbv7a (not 32-bit x86) via #99916.
Opens:
- [x] Implementation for Windows (top priority) (msvc: #84171) (gnu: #90782)
- [x] Emitting idata sections
- [x] New `link_ordinal` attribute (#89025)
- [x] Testing in winapi/windows-rs with nightly Rust before stabilization (https://github.com/microsoft/windows-rs/pull/977 and https://github.com/microsoft/windows-samples-rs/pull/18)
- [x] Supporting all calling conventions
- [x] cdecl
- [x] stdcall
- [x] fastcall
- [x] vectorcall
- [ ] Tests, including all the corner cases mentioned in the reference-level explanation
- [x] Documentation (https://github.com/rust-lang/rust/pull/87315)
- [ ] Implementation for Linux
- [ ] Implementation for macOS
- [ ] Implementation for other platforms
- [ ] Implementation of a pure Rust target for Windows (no libc, no msvc, no mingw). This may require another RFC
<!-- TRIAGEBOT_START -->
<!-- TRIAGEBOT_ASSIGN_START -->
<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"dpaoliello"}$$TRIAGEBOT_ASSIGN_DATA_END -->
<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END --> | A-linkage,O-windows,B-RFC-approved,T-lang,C-tracking-issue,F-raw_dylib,S-tracking-impl-incomplete | high | Critical |
413,911,525 | pytorch | Overflow in fbgemm | Hi,
recently I started to learn fbgemm. I notice both the fbgemm test case and here fully_connected_dnnlowp_op_test, fully_connected_dnnlowp_acc16_op_test have some functions to avoid overflow.
I understand because of the AVX vpmaddubsw instruction, the result of a int8 value times a unsigned int8 value can be saturated. I am not familiar with caffe, so my question is how is the overflow/saturation is handled in the real situation? Are there any particular methods used in the training process so that no overflow happens in the inference or the overflow has little influence on the result precision?
Am I missing something?
Thanks in advance | caffe2 | low | Minor |
413,912,304 | TypeScript | Incorrect docs: type compatibility for functions with overloads | <!-- π¨ 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. -->
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** functions with overloads, type compatibility
In the [docs](https://www.typescriptlang.org/docs/handbook/type-compatibility.html), it says: "When a function has overloads, each overload in the source type must be matched by a compatible signature on the target type." But it should be "When a function has overloads, each overload in the ~~source type~~ **target type** must be matched by a compatible signature on the ~~target type~~ **source type**."
**Code**
The actual behaviour is right:
```ts
type t1 = {
(foo: string): string
(foo: number): number
}
type t2 = {
(foo: string): string
}
declare let v1: t1;
declare let v2: t2;
v2 = v1 // OK
v1 = v2 // Error
```
The type on the right side of `=` is considered "the source type". | Docs | low | Critical |
414,009,325 | vscode | Investigation: do not restart Extension host when first folder changes | Today we restart the extension host whenever the first folder changes because `workspace.rootPath` is always set to that first folder and it never used to change after the extension host started once.
If we would not restart the extension host anymore an extension:
* could use `workspace.rootPath` as before, it would still point to the first folder always (which can be `undefined` if the workspace contains no folders)
* could subscribe to the `onDidChangeWorkspaceFolders` event to get notified about updates
* would see the value of `workspace.rootPath` changing during runtime whenever the first folder changes
//cc @sandy081 @jrieken | workbench-multiroot,under-discussion,api-proposal | high | Critical |
414,023,471 | flutter | StatefulBuilder should either protect against !mounted or offer a way to do so | c: new feature,framework,c: proposal,P2,team-framework,triaged-framework | low | Minor |
|
414,175,781 | vue | transition before-leave js-hook does not manipulate the DOM which will be transitioned | ### Version
2.6.7
### Reproduction link
[https://jsfiddle.net/8zcdpkv0/](https://jsfiddle.net/8zcdpkv0/)
### Steps to reproduce
Please see jsfiddle.
Any changes in the `before-leave` hook won't affect the DOM which is transitioned.
My actual problem is that I try to transition an element which has `aria-live="polite"` or `rule="alert"`, which will be read out by a screenreader.
Apparently the change of classes from the transition are noticed by the screenreader and the message will be read out again.
I tried to fix this for accessibility purposes with the `before-leave` hook, but that doesn't seem to work correctly.
### What is expected?
It would either be great if the transitioned DOM will remove all attributes which will cause the screenreader to read it out again, or to allow the javascript hook `"before-leave"` to actually change the DOM **before** the transition happens.
### What is actually happening?
The old DOM will be transitioned (and the screenreader will read the content again).
<!-- generated by vue-issues. DO NOT REMOVE --> | has workaround | low | Minor |
414,217,271 | rust | The never type can be named despite its feature gate | Reported by @xfix in https://github.com/rust-lang/rust/issues/33417#issuecomment-467053097.
```rust
trait MyTrait {
type Output;
}
impl<T> MyTrait for fn() -> T {
type Output = T;
}
type Void = <fn() -> ! as MyTrait>::Output;
fn main() {
let _a: Void;
}
```
The never type is unstable (https://github.com/rust-lang/rust/issues/35121) but the code above (which doesnβt use any feature gate) compiles in Rust 1.12.0 (which I think is the first with https://github.com/rust-lang/rust/pull/35162), 1.32.0, and 1.34.0-nightly (aadbc459b 2019-02-23). In 1.11.0, it errors with:
```rust
error: the trait bound `fn() -> !: MyTrait` is not satisfied [--explain E0277]
--> a.rs:12:13
|>
12 |> let _a: Void;
|> ^^^^
help: the following implementations were found:
help: <fn() -> T as MyTrait>
error: aborting due to previous error
``` | A-stability,T-compiler,C-bug | low | Critical |
414,234,425 | go | testing: loses log messages made in a goroutine after test has completed | The testing package silently drops `t.Log` messages that are made by a goroutine after the test has completed. For example, the following test passes and logs nothing.
This should be fixed by extending the code added in 1.12 that panics if a goroutine logs after a test has completed to not silently discard the log message. The silent discarding is occurring in the current code because every test runs in a parent context, and the output accumulated by the parent context is discarded.
```Go
package main
import (
"testing"
"time"
)
func TestLateLog(t *testing.T) {
c := make(chan bool)
go func() {
<-c
time.Sleep(time.Millisecond)
t.Log("log after test")
}()
close(c)
}
``` | NeedsFix | low | Minor |
414,256,381 | rust | Panic in proc_macro::TokenStream::from_str | [TokenStream::from_str](https://doc.rust-lang.org/proc_macro/struct.TokenStream.html#impl-FromStr) is supposed to return `Result<proc_macro::TokenStream, proc_macro::LexError>`. Currently it appears to print errors to stderr and then panic, rather than returning errors.
#### Cargo.toml
```toml
[package]
name = "repro"
version = "0.0.0"
edition = "2018"
[lib]
proc-macro = true
```
#### src/lib.rs
```rust
extern crate proc_macro;
use proc_macro::TokenStream;
use std::str::FromStr;
#[proc_macro_derive(ParseTokenStream)]
pub fn derive(_input: TokenStream) -> TokenStream {
let _ = TokenStream::from_str("\\s");
TokenStream::new()
}
```
#### src/main.rs
```rust
#[derive(repro::ParseTokenStream)]
struct S;
fn main() {}
```
Output of `cargo check`:
```console
$ cargo check
error: unknown start of token: \
--> src/main.rs:1:10
|
1 | #[derive(repro::ParseTokenStream)]
| ^^^^^^^^^^^^^^^^^^^^^^^
error: proc-macro derive panicked
--> src/main.rs:1:10
|
1 | #[derive(repro::ParseTokenStream)]
| ^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
```
Mentioning @eddyb, @petrochenkov, @alexcrichton.
Mentioning @canndrew who reported this in https://github.com/alexcrichton/proc-macro2/issues/168. | A-macros,T-compiler,A-proc-macros | low | Critical |
414,260,444 | opencv | ocv_download() "optional" behavior leads to different unclear error messages | It should "fail fast" by default providing clear messages.
Optional mode doesn't properly work anyway (including xfeatures2d issues).
[Example](http://pullrequest.opencv.org/buildbot/builders/precommit_opencl/builds/19333/steps/cmake/logs/stdio):
```
-- The CXX compiler identification is MSVC 19.0.24215.1
-- The C compiler identification is MSVC 19.0.24215.1
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- AVX_512F is not supported by C++ compiler
-- AVX512_SKX is not supported by C++ compiler
-- Dispatch optimization AVX512_SKX is not available, skipped
-- libjpeg-turbo: VERSION = 1.5.3, BUILD = opencv-4.0.1-dev-libjpeg-turbo
-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- A library with BLAS API not found. Please specify library location.
-- LAPACK requires BLAS
-- A library with LAPACK API not found. Please specify library location.
-- Found apache ant: C:/utils/soft/apache-ant-1.9.7/bin/ant.bat (1.9.7)
-- Could NOT find Pylint (missing: PYLINT_EXECUTABLE)
-- Could NOT find Flake8 (missing: FLAKE8_EXECUTABLE)
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- OpenCV Python: during development append to PYTHONPATH: C:/build/precommit_opencl/build/python_loader
You have called ADD_LIBRARY for library ade without any source files. This typically indicates a problem with your CMakeLists.txt file
CMake Error at modules/videoio/cmake/detect_ffmpeg.cmake:16 (include):
include could not find load file:
C:/build/precommit_opencl/build/3rdparty/ffmpeg/ffmpeg_version.cmake
Call Stack (most recent call first):
modules/videoio/cmake/init.cmake:3 (include)
modules/videoio/cmake/init.cmake:22 (add_backend)
cmake/OpenCVModule.cmake:312 (include)
cmake/OpenCVModule.cmake:375 (_add_modules_1)
modules/CMakeLists.txt:7 (ocv_glob_modules)
-- Caffe: NO
-- Protobuf: NO
-- Glog: NO
-- freetype2: NO
-- harfbuzz: NO
-- Module opencv_ovis disabled because OGRE3D was not found
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
-- Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
-- Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
-- Excluding from source files list: modules/imgproc/src/sumpixels.avx512_skx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx512_skx.cpp
Error copying file (if different) from "C:/build/precommit_opencl/build/3rdparty/ffmpeg/opencv_ffmpeg_64.dll" to "C:/build/precommit_opencl/build/bin/Debug/opencv_ffmpeg401_64.dll".
Error copying file (if different) from "C:/build/precommit_opencl/build/3rdparty/ffmpeg/opencv_ffmpeg_64.dll" to "C:/build/precommit_opencl/build/bin/Release/opencv_ffmpeg401_64.dll".
-- Tesseract: NO
CMake Warning at C:/build/precommit_opencl/opencv/cmake/OpenCVModule.cmake:679 (message):
Unexpected include: C:/build/precommit_opencl/build/downloads/xfeatures2d
(module=opencv_xfeatures2d)
Call Stack (most recent call first):
C:/build/precommit_opencl/opencv/cmake/OpenCVModule.cmake:710 (ocv_target_include_modules)
C:/build/precommit_opencl/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:14 (ocv_module_include_directories)
-- OpenCL samples are skipped: OpenCL SDK is required
--
-- General configuration for OpenCV 4.0.1-dev =====================================
-- Version control: 4.0.1-250-g11e367a
--
-- Extra modules:
-- Location (extra): C:/build/precommit_opencl/opencv_contrib/modules
-- Version control (extra): 4.0.1-35-gca7cb77
--
-- Platform:
-- Timestamp: 2019-02-25T17:08:40Z
-- Host: Windows 10.0.17134 AMD64
-- CMake: 3.7.0
-- CMake generator: Visual Studio 14 2015 Win64
-- CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
-- MSVC: 1900
--
-- CPU/HW features:
-- Baseline: SSE SSE2 SSE3
-- requested: SSE3
-- Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
-- requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
-- SSE4_1 (7 files): + SSSE3 SSE4_1
-- SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2
-- FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
-- AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
-- AVX2 (18 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.24215.1)
-- C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP4 /MD /O2 /Ob2 /DNDEBUG
-- C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
-- C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP4 /MD /O2 /Ob2 /DNDEBUG
-- C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
-- Linker flags (Release): /machine:x64 /INCREMENTAL:NO
-- Linker flags (Debug): /machine:x64 /debug /INCREMENTAL
-- ccache: NO
-- Precompiled headers: YES
-- Extra dependencies:
-- 3rdparty dependencies:
--
-- OpenCV modules:
-- To be built: aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc java java_bindings_generator line_descriptor ml objdetect optflow phase_unwrapping photo plot python2 python3 python_bindings_generator quality reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv freetype hdf js matlab ovis sfm viz
-- Applications: tests perf_tests examples apps
-- Documentation: NO
-- Non-free algorithms: YES
--
-- Windows RT support: NO
--
-- GUI:
-- Win32 UI: YES
-- VTK support: NO
--
-- Media I/O:
-- ZLib: build (ver 1.2.11)
-- JPEG: build-libjpeg-turbo (ver 1.5.3-62)
-- WEBP: build (ver encoder: 0x020e)
-- PNG: build (ver 1.6.36)
-- TIFF: build (ver 42 - 4.0.10)
-- JPEG 2000: build (ver 1.900.1)
-- OpenEXR: build (ver 1.7.1)
-- HDR: YES
-- SUNRASTER: YES
-- PXM: YES
-- PFM: YES
--
-- Video I/O:
-- DC1394: NO
-- FFMPEG: YES (prebuilt binaries)
-- avcodec: NO
-- avformat: NO
-- avutil: NO
-- swscale: NO
-- avresample: NO
-- GStreamer: NO
-- DirectShow: YES
-- Media Foundation: YES
-- DXVA: NO
--
-- Parallel framework: Concurrency
--
-- Trace: YES (with Intel ITT)
--
-- Other third-party libraries:
-- Lapack: NO
-- Eigen: NO
-- Custom HAL: NO
-- Protobuf: build (3.5.1)
--
-- OpenCL: YES (no extra features)
-- Include path: C:/build/precommit_opencl/opencv/3rdparty/include/opencl/1.2
-- Link libraries: Dynamic load
--
-- Python 2:
-- Interpreter: C:/utils/soft/python27-x64/python.exe (ver 2.7.12)
-- Libraries: C:/utils/soft/python27-x64/Libs/python27.lib (ver 2.7.12)
-- numpy: C:/utils/soft/python27-x64/lib/site-packages/numpy/core/include (ver 1.12.0)
-- install path: python/cv2/python-2.7
--
-- Python 3:
-- Interpreter: C:/utils/soft/python35-x64/python.exe (ver 3.5.2)
-- Libraries: C:/utils/soft/python35-x64/Libs/python35.lib (ver 3.5.2)
-- numpy: C:/utils/soft/python35-x64/lib/site-packages/numpy/core/include (ver 1.12.0)
-- install path: python/cv2/python-3.5
--
-- Python (for build): C:/utils/soft/python27-x64/python.exe
--
-- Java:
-- ant: C:/utils/soft/apache-ant-1.9.7/bin/ant.bat (ver 1.9.7)
-- JNI: C:/Program Files/Java/jdk1.8.0_112/include C:/Program Files/Java/jdk1.8.0_112/include/win32 C:/Program Files/Java/jdk1.8.0_112/include
-- Java wrappers: YES
-- Java tests: YES
--
-- Install to: C:/build/precommit_opencl/build/install
-- -----------------------------------------------------------------
--
-- Configuring incomplete, errors occurred!
See also "C:/build/precommit_opencl/build/CMakeFiles/CMakeOutput.log".
See also "C:/build/precommit_opencl/build/CMakeFiles/CMakeError.log".
``` | bug,category: build/install | low | Critical |
414,287,822 | TypeScript | tsc gets confused after assigning to module.exports - Property 'filename' does not exist on type | <!-- π¨ STOP π¨ π¦π§π’π£ π¨ πΊπ»πΆπ· π¨
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!
Please help us by doing the following steps before logging an issue:
* Search: https://github.com/Microsoft/TypeScript/search?type=Issues
* Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
Please fill in the *entire* template below.
-->
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 3.4.0-dev.20190223
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
module.filename
require.main === module
**Code**
```js
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
module.exports = function(){
return module.filename;
}
```
**Expected behavior:**
Should not emit any error
**Actual behavior:**
```
D:\test>node_modules\.bin\tsc -v
Version 3.4.0-dev.20190223
D:\test>node_modules\.bin\tsc
test.js:2:17 - error TS2339: Property 'filename' does not exist on type '{ "D:/test/test": () => any; }'.
2 return module.filename;
~~~~~~~~
Found 1 error.
```
**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
tsconfig.json:
```json
{
"compilerOptions": {
"noEmit": true,
"checkJs": true,
"allowJs": true,
"resolveJsonModule": true,
"module": "commonjs",
"lib": ["es2018"],
"target": "es2018",
"baseUrl": ".",
"paths": {
"@/*": [
"../*"
],
"#/*": [
"./*"
]
},
"types": [
"node"
],
},
"exclude": [
"node_modules",
"public"
]
}
```
**Related Issues:** <!-- Did you find other bugs that looked similar? -->
https://github.com/DefinitelyTyped/DefinitelyTyped/issues/33357
| Needs Investigation | low | Critical |
414,316,292 | create-react-app | Add eslint rule: import/no-self-import | Hello and thank you for this great tool.
Today I had a problem after a file rename and I should admit a bad copy paste, I ended up with a file importing itself. It made my browser crashes without any logs and I lost about 10 minutes to find the reason. When I found it, I was surprised to not see any warnings from my IDE or eslint.
So I was wondering if we can add by default the import/no-self-import rule ?
It could help others or myself in the future and there is no breaking change has it impossible to run the app without respecting it.
I could made a PR but it's one line PR and I think it will be easier to do it by yourself if you agreed.
Thank you ! | issue: proposal | low | Critical |
414,326,417 | angular | docs request: writing e2e tests and debugging | <!--π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
Oh hi there! π
To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
-->
# π Docs or angular.io bug report
### Description
The docs currently have a fantastic testing section and is a key resource when directing other staff on how to write unit tests for Angular, however for writing e2e tests there is no documentation. In addition, how to debug e2e tests is not mentioned anywhere.
The cli ng e2e docs mention --elementExplorer, however this does not work in node 8+, so how do we do this?
Clear documentation outlining the process of e2e tests would be appreciated, given that angular supports this and has a cli command for it. As an end user, I don't know how to use this.
Going a step further, looking at the protractor website: https://www.protractortest.org it seems heavily focused on AngularJS, but does mention Angular. If this is the resource that we are meant to use, at the minimum the Angular docs should link to this, but it would be better if this was a first class citizen of the Angular docs that was specific to Angular to avoid confusion.
## π¬ Minimal Reproduction
### What's the affected URL?**
<!-- βοΈedit:--> https://angular.io/cli/e2e
### Expected vs Actual Behavior**
<!-- If applicable please describe the difference between the expected and actual behavior after following the repro steps. -->
<!-- βοΈedit:-->
*Expected*
I'm expecting to find docs on how to write e2e tests and how I can debug my e2e tests.
*Actual*
Using the search terms 'protractor', 'e2e', 'end to end' do not provide any useful information on how to do this. | area: testing,effort3: weeks,P4,docsarea: testing,doc-topic: reference,area: docs | low | Critical |
414,364,315 | kubernetes | kubectl port-forward broken pipe | **What happened**:
We have a pod running in our k8s cluster that I connect to via `kubectl port-forward`. I am able to connect to this pod (using the following command) but then start getting broken pipe error messages after maintaining a connection for what is typically 30-60s.
`kubectl port-forward --namespace monitoring deployment/cost-monitor 9090`
There seems to be a correlation between error rate and the amount of data being transferred. I see the following error message initially:
`E0225 15:20:06.212139 26392 portforward.go:363] error copying from remote stream to local connection: readfrom tcp6 [::1]:9090->[::1]:57794: write tcp6 [::1]:9090->[::1]:57794: write: broken pipe`
These errors are oftentimes followed by timeout messages but necessarily immediately:
`E0225 15:22:30.454203 26392 portforward.go:353] error creating forwarding stream for port 9090 -> 9090: Timeout occured`
**What you expected to happen**:
No error messages or major degradation in transfer rate.
**How to reproduce it (as minimally and precisely as possible)**:
Connect via port-forward and transfer ~5 mb over several minutes.
**What else?**:
We have multiple HTTP requests being made at any given time on this port-forward connection.
**Environment**:
Experiencing on both AWS kops and GKE
// kops
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-04T04:48:03Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:25:46Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
// GKE
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-04T04:48:03Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.11-gke.1", GitCommit:"5c4fddf874319c9825581cc9ab1d0f0cf51e1dc9", GitTreeState:"clean", BuildDate:"2018-11-30T16:18:58Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}
| kind/bug,sig/api-machinery,help wanted,sig/cli,triage/unresolved | high | Critical |
414,368,191 | flutter | Feature Request: Multi-platform flutter installs | I am a user of the `flutter-desktop-embedding` project and thrilled with the possibility of cross-platform app development from a single dev workstation.
I ran into an issue when trying to use the same shared filesystem to develop a macOS and Windows app -- in summary, when running `flutter` for the first time, a `bin/cache` directory is populated with the appropriate Dart SDK for the detected platform. Unfortunately when re-using the same flutter installation directory from a different platform (e.g. macOS -> Windows), the `bin/cache` directory is invalid for that architecture.
https://github.com/google/flutter-desktop-embedding/issues/292
I would like a multi-platform way to use the exact same flutter release directory for multiple platforms which have mounted a shared filesystem. | c: new feature,tool,P3,team-tool,triaged-tool | low | Major |
414,371,425 | TypeScript | Weird type inference for binary plus | For `(x, y) => x + y`, we infer `x: string | number` and `y: string | number`. This doesn't actually work since the two binary operators involved return different types.
```ts
let sn: string | number;
let n: number;
let s: string;
const v1 = sn + sn; // ERROR
const v2 = n + n; // number
const v3 = s + s; // string
const v4 = sn + n; // ERROR
const v5 = n + sn; // ERROR
const v6 = sn + s; // string
const v7 = s + sn; // string
const v8 = n + s; // string
const v9 = s + n; // string
```
The safest thing would probably be to infer `number` unless there's a specific reason to allow `string`. | Bug,Domain: Quick Fixes | low | Critical |
414,392,139 | godot | Smooth diagonal movement requires global_position to be rounded or floored | **Godot version:**
51c1d55cf9089cefbde034893b4784a5d554ddcc
**OS/device including version:**
Windows 10, GTX 950
**Prelude:**
I spent the last couple days isolating this and finally found a solution. I was thinking of not making a bug report because it might be an edge case, but I feel like it's important enough. And other Godot developers might be affected by it.
**Issue description:**
When moving with diagonal movement, `round()` ~~must be used if the player's global_position is an even number, and `floor()` must be used if the player's global_position is an odd number~~. Otherwise, diagonal movement will cause jitter. This also happens using Camera2D, but I chose `custom_transform` to show what happens with and without `.round()`.
**Minimal reproduction project:**
[SmoothDiagonalMovementBug.zip](https://github.com/godotengine/godot/files/2903373/SmoothDiagonalMovementBug.zip)
## **Ways to remove the diagonal movement jitter:**
- Remove`.round()` from `transform2[2]`.
- **New Problem:** When the character is moving, white/black lines will flicker all over the tilemap. The developer can partially fix this by disabling the `filter` property for that specific tileset texture.
- **Next New Problem:** Now, when the above is done, the lines will appear sporadically, not all the time.
---
- Project Settings -> Rendering -> Quality -> Enable "Use Pixel Snap"
- **New Problem:** Diagonal movement is smooth, but sprites being modified by the AnimationPlayer now become distorted/not smooth (for example, [using a animated character like gBot](https://www.youtube.com/watch?v=Mz4wrV0FsDo))
---
- Remove `normalized()` from `char_direction`
- **New Problem:** Diagonal movement now becomes faster than horizontal movement (entire point of `normalized()` is to achieve the same speed.
The solution to get everything working smoothly is around line 34, in player.gd:
```
if is_diagonal && gg.diagonal_fix == true:
# Even
if speed % 2 == 0:
global_position = global_position.round()
else: # Odd
global_position = global_position.floor()
```
I might have forgot another way that makes the diagonal movement smooth which has weird side effects; but I think this is sufficient. Thanks for taking a look! | topic:core,topic:rendering,usability | low | Critical |
414,395,155 | godot | Reflection probes only refresh on editor restart | <!-- 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.0 beta 6
**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Windows 10.0.15063 with NVidia GeForce GTX 1070
**Issue description:**
<!-- What happened, and what was expected. -->
I had added some tiles to a gridmap around a reflection probe, expecting the probe to update while in the editor to reflect the new geometry. The probe's capture only refreshed when I closed and reopened the editor. First image is before restarting, second image is after.


**Steps to reproduce:**
- Add a reflection probe to the scene.
- Change geometry around it (in my case, filling more tiles in a gridmap).
- Observe that the old geometry is still reflected.
- Restart the editor.
- Observe now that the reflection capture reflects the previous edits.
| enhancement,topic:rendering,topic:3d | low | Major |
414,397,622 | kubernetes | glog/klog init issue | My understanding is that glog->klog migration was done to solve the issue that glog adds flags inside a `init()` function. But it seems that this issue is not completely solved.
k8s.io/apiserver imports the `logs` util package which adds flags inside `init()` function.
https://github.com/kubernetes/kubernetes/blob/c9e14c85f5b826493a2376ab4743499ac834b8ee/staging/src/k8s.io/apiserver/pkg/server/config.go#L569
https://github.com/kubernetes/component-base/blob/ebca9cef46a2513b205fffed7d60d53fc50979bb/logs/logs.go#L35
As things stand, I am getting `flag redefined: log_dir` when used alongside glog.
```
/tmp/go-build285405043/b001/exe/main flag redefined: log_dir
panic: /tmp/go-build285405043/b001/exe/main flag redefined: log_dir
goroutine 1 [running]:
flag.(*FlagSet).Var(0xc0000d6180, 0x1edd100, 0x2bf53d0, 0x152d0fb, 0x7, 0x1560b27, 0x2f)
/usr/local/go/src/flag/flag.go:805 +0x529
flag.(*FlagSet).StringVar(0xc0000d6180, 0x2bf53d0, 0x152d0fb, 0x7, 0x0, 0x0, 0x1560b27, 0x2f)
/usr/local/go/src/flag/flag.go:708 +0x8a
github.com/appscode/stash/vendor/k8s.io/klog.InitFlags(0xc0000d6180)
/home/tamal/go/src/github.com/appscode/stash/vendor/k8s.io/klog/klog.go:411 +0x7b
github.com/appscode/stash/vendor/k8s.io/apiserver/pkg/util/logs.init.0()
/home/tamal/go/src/github.com/appscode/stash/vendor/k8s.io/apiserver/pkg/util/logs/logs.go:36 +0x2d
exit status 2
```
One solution will be to move the `init()` function to its own pkg and ensuring that it is only called from main package in other binaries.
| kind/bug,sig/api-machinery,lifecycle/frozen | medium | Major |
414,464,551 | flutter | [google_maps_flutter] App is lagging when initializing Google Maps | I am just building the Google-Maps widget in my Stateful Widget. This will be opened with the Navigator via a Button click. But as soon, as I click, the app is lagging, while initializing the map.
When removing the widget, everything is fine.
I tried to set a `CircularProgressIndicator` and then, setting the map-widget async, but running into the same problem, as soon, as it gets build.
I also downloaded and ran the example app from the google-maps-package with the same lagging.
How should the map be initilized, that it is first loaded and then set without lagging?
# Flutter Doctor
I am developing with Android Studio
```
[β] Flutter (Channel dev, v1.2.2, on Microsoft Windows [Version 10.0.17763.316], locale de-DE)
β’ Flutter version 1.2.2 at S:\Development\Flutter\Flutter-SDK
β’ Framework revision 007a415c2a (5 days ago), 2019-02-21 20:22:47 -0800
β’ Engine revision f1f19bba8f
β’ Dart version 2.2.0 (build 2.2.0-dev.2.1 c92d5ca288)
[β] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
β’ Android SDK at C:\Users\Pierre\AppData\Local\Android\sdk
β’ Android NDK location not configured (optional; useful for native profiling support)
β’ Platform android-28, build-tools 28.0.3
β’ Java binary at: S:\Development\Android Studio\jre\bin\java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
β’ All Android licenses accepted.
[β] Android Studio (version 3.3)
β’ Android Studio at S:\Development\Android Studio
β’ Flutter plugin version 33.3.1
β’ Dart plugin version 182.5215
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[!] IntelliJ IDEA Ultimate Edition (version 2018.3)
β’ IntelliJ at S:\Development\JetBrains\IntelliJ IDEA 2018.3.2
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
β’ For information about installing plugins, see
https://flutter.io/intellij-setup/#installing-the-plugins
[β] Connected device (1 available)
β’ Android SDK built for x86 β’ emulator-5554 β’ android-x86 β’ Android 9 (API 28) (emulator)
! Doctor found issues in 1 category.
```
| c: performance,a: quality,customer: crowd,p: maps,package,team-ecosystem,has reproducible steps,P3,found in release: 2.1,triaged-ecosystem | high | Critical |
414,470,584 | pytorch | RuntimeError: storage_.IsType<T>() ASSERT FAILED | ## π Bug
<!-- A clear and concise description of what the bug is. -->
## To Reproduce
Steps to reproduce the behavior:
1.
1.
1.
<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->
## Expected behavior
<!-- A clear and concise description of what you expected to happen. -->
## Environment
Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).
You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```
- PyTorch Version (e.g., 1.0):
- OS (e.g., Linux): Ubuntu16.04
- How you installed PyTorch (`conda`, `pip`, source):conda
- Build command you used (if compiling from source):
- Python version:2.7
- CUDA/cuDNN version:9.0
- GPU models and configuration:1080ti*2
- Any other relevant information:
## Additional context
<!-- Add any other context about the problem here. -->
```
RuntimeError: storage_.IsType<T>() ASSERT FAILED at /opt/conda/conda-bld/pytorch-nightly_1549065566119/work/c10/core/TensorImpl.h:571, please report a bug to PyTorch. Tensor type mismatch, caller expects elements to be float, while tensor contains int. Error from operator:
input: "gpu_1/mask_fcn_char_logits" input: "gpu_1/masks_char_int32" input: "gpu_1/masks_char_weight" output: "gpu_1/mask_cls_prob" output: "gpu_1/loss_char_mask" name: "" type: "SpatialSoftmaxWithLoss" arg { name: "scale" f: 0.5 } device_option { device_type: 1 device_id: 1 } (data at /opt/conda/conda-bld/pytorch-nightly_1549065566119/work/c10/core/TensorImpl.h:571)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x45 (0x7f5a238c98b5 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libc10.so)
frame #1: float* c10::TensorImpl::data<float>() const + 0x2c5 (0x7f5a54574a25 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2.so)
frame #2: caffe2::SpatialSoftmaxWithLossOp<float, caffe2::CUDAContext>::RunOnDevice() + 0x5da (0x7f5a267e028a in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2_gpu.so)
frame #3: <unknown function> + 0x145bdc5 (0x7f5a251cddc5 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2_gpu.so)
frame #4: caffe2::AsyncNetBase::run(int, int) + 0x144 (0x7f5a54ec72a4 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2.so)
frame #5: <unknown function> + 0x1509842 (0x7f5a54ecd842 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2.so)
frame #6: c10::ThreadPool::main_loop(unsigned long) + 0x273 (0x7f5a53f81d33 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2.so)
frame #7: <unknown function> + 0xb8678 (0x7f5a67bd7678 in /home/super/.conda/envs/MaskTextSpotter/bin/../lib/libstdc++.so.6)
frame #8: <unknown function> + 0x76ba (0x7f5a6e7d16ba in /lib/x86_64-linux-gnu/libpthread.so.0)
frame #9: clone + 0x6d (0x7f5a6ddf741d in /lib/x86_64-linux-gnu/libc.so.6)
```
| awaiting response (this tag is deprecated),caffe2,triaged | low | Critical |
414,625,290 | opencv | TIFF Image Writer Flags | <!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).
Please:
* Read the documentation to test with the latest developer build.
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
* Try to be as detailed as possible in your report.
* Report only one problem per created issue.
This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->
##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->
- OpenCV => 4.0.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Eclipse (Java)
##### Detailed description
<!-- your description -->
There should be more Tiff Tags for process tiff image file like **Compression**, **BitsPerSample** etc in **enum ImwriteFlags{}** (imgcodes.hpp).
| feature,priority: low,category: imgcodecs | low | Critical |
414,639,078 | TypeScript | Infer method name for parameter decorator | **TypeScript Version:** 3.3.3
_Tried with @next _(3.4.0-dev.201xxxxx)_ ?_ NO
**Search Terms:** type:issues infer method name parameter decorator
**Code**
```typescript
declare function Method():
{
(t: any, m: 'method'): void;
}
declare function Parameter():
{
(t: any, m: 'method', i: number): void;
}
class Play
{
@Method() // err
public another_method ( @Parameter() /* NO ERROR */ test: number ): void
{
throw new Error('Not yet implemented');
}
@Method()
public method ( @Parameter() test: number ): void
{
throw new Error('Not yet implemented');
}
}
```
**Expected behavior:** `@Parameter()` should error just as `@Method()` **when applied to `another_method()`** because the `m` parameter is typed `"method"` (which should reduced the set of method). i.e method name should be enforced.
**Actual behavior:** No error
**Playground Link:** [https://typescript-play.js.org](https://typescript-play.js.org/?experimentalDecorators=true&emitDecoratorMetadata=true#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXwFkQMALHYACgEoAuAKAG874X4KMb4pUBPAGngBbTgHJBxMsBG14ANxxZgAbjoBfOnVCRYCFOmx54ABVhRxGEDGr0mrNhy68Bw+GInkRArJ1TJBAI0sZeUUVdTptAGdI42geRmZWAAEiUnJqeAB6TPhLGESWAAdkfwgsMEccUksAfXNJNngkkxgzYksMzIAqeAA5AHl4AFEAJRH+kfgunItIh18Ay3hghWAC+Fs7VlIYHAB3eFQQA6GYXasRXqr4HmJ4LEFCiBBxVAspKhU7dTsU90oqOtiqVykJ-o1mqZzB0qPBZvM-IEYMtOCE1nZNls4SRdgcjiczjgLlcMDc7g8ni8QG8QB8vqx1OEgA)
**Use case :**
I crafted a type that filters method names with the `nth` parameters iff that parameters is of the given type `T`.
[See `KeysToTypedNthParameter` definition here](https://typescript-play.js.org/#code/C4TwDgpgBAkgzgOWACwAoEMBO6C2FgSYDyAZgCrgQA8CUEAHgQHYAmcUTArjgEaEA0UMoIBiCAHxQAvFAAUUMXUYRW7AMIB7JnGCZOAY2AbMAGQCWAa2gB+KJu26DRzBmx4CmOFTGSAXHIVaBmY2BU4mQzMtcysoW1dcfEIvHyh-JggAN0IoAEo8gG0EAF0lEPYyOKhHaH8SdAAbOAgAbgAoUEg7LR09Q2MY6krglVCAbwBfaShJwVQy0fZ0JhAC0pll1eLJGQyAd3kAOmOwLESPOH95-KlJMnbO6BFwyOjLanmR1ShNtenf4qCABK-xWgkqGxWOwCKDMlyEgmOhwA+lc8tJJECHpQoABpCAgOBkDQUSAsJBoM7uQg0BbfLi8AQIqAACWhADVGpwIHBSFQxm0oEKoAUoGZWAwxUwoFYQBoSKyoMV-PAKQlqcRyJQaODBCyCuKWAxtnTQjUqobJeksoR2hNxNiupyGtzeSQqGRoWQCrL5UJiu02kGGvgoMh0HBkNMBcKfvJkQAGfy9cUAc0EyIAjMndGn0bNBcKePGk1AU0x01As+luHxMPmJvxC0L9CWa4zMBnsxxazl8gXYyw2z2O12c5g8-3G20JsHQ+XU4n-PjCcTSRBySh1UlMFQE4IF4JHn7w5GHVAAPQXqAAInQN6gAB9bzwb20Q8Ay7mK9W8QSiSSlCbpSbg7lQmYHt+lbHgqp7IOeV63veT63iwb4fiOdZLn+q6AWSapUmB+6YUyMFhhG8EtJe143voD7PjeaHvqGDJYd2K4AeuwHbh44GCKxpGUCeFEITRdEoYxN5AA)
```typescript
let hash = {
a( _0: string, _1: string ) {},
b( _0: string, _1: number ) {},
c( _0: number, _1: number ) {},
d( _0: number, _1: string ) {},
}
let string_0: KeysToTypedNthParameter<0, string, typeof hash>; // "a" | "b"
let string_1: KeysToTypedNthParameter<1, string, typeof hash>; // "a" | "d"
let number_0: KeysToTypedNthParameter<0, number, typeof hash>; // "c" | "d"
let number_1: KeysToTypedNthParameter<1, number, typeof hash>; // "c" | "d"
```
Later, I used that type to infer method name for my parameter decorator - `@Inject` - in the excerpt below, I marked the ONLY line that should error and why (but both lines actually error)
```typescript
class Test
{
public blatantly!: boolean;
}
class Play
{
public method(
@Inject({ type: Test })
@Inject({ type: Number }) // err (construtor mismatch instance type)
test: Test,
): void
{
throw new Error( 'Not yet implemented' );
}
}
Play;
```
Here is `@Inject` decorator definition [and complete code](https://typescript-play.js.org/?experimentalDecorators=true#code/MYewdgzgLgBAkmAVgU2FAXPJqoBkCWA1sjALwwBuI+AJjAAwwCGEMArmIWCAO5jOsEKNAWIBuAFATgAGxasAKsmgSA3hJiaYABzYAjGfmAwDTKEzBQZATwCEmPSBAzkFyQF8ps+TAAKc6zUNLV0DIxgAW2QoAAsQGgAKYK0tAAEhHATVGChrbWRMJWgYdwBKZJSYdOw0LJy8gpgAOTYIvWQAJxLSmAB6XphOroTQSCgOtigQLoj8CAizYBiYfDGLYBJc-PLKrShlDBgiqAAaCtLMKloK9V3NWI7eGDBkHhgAUQ7HjoSYAHImiBYNZoisItoXFFLMgaH8YKVJClPJ5-ExrJIJKt9h0AGZMDZYYR4IjIIIpAA8FRSAGFBgAPfZgGisangaATNDTUTIM4pAB8FSy7kw2S2jVpZRFVK0lLulX6MAAYnAABoAWXeMEw3FgyG4bAA5sspiswDjOjkYiQorF4s8mFEYABaGAQZAkAB0vQA+t6IWiDY8ODQPVAIABiaW7NX0xnMmC-BSxvXx1ljDlTDrcmAAfmeyAoFswAGlkNYIAoQAoGjQmrFfEwOg7op1yXATlhoOtkNX8uTqXyOwo+fDeXKtHBk0zWGBWu0OmPx0dF5UBXLfuYOgbooUO1E2p1MGqO6saMg6ZhJxdKNQaIitO4PFIxfAIHWYg2mzbOgB5HG95BySaKd41nA8F2XJUmhHchfkVYDzzjFk2XGNhOSzElcxgNN2TQzNP2bbEIHJeCR0wOCEIZFNWEVDg0HwcBszzAjvw6YjSK1fNCy6HpSgAbSaABdEDFCw1CSEwPEZDdSQX1LctASgNUmG0fIaErckk0Q6iYFUdwO3eGDdJgPiYGIaxTTMssQBxI4YEEwo+PM4TtOnD4sJebjOPMsQSic6zbIUQTZIabCUIzLkSU0kTdPcMhYo7XwYosaw+OE8gUrSoyXh4X4PXy7RG0IzoIEwJKelIEcFBC-IYHkisqxrd8WJbDogJisD5yHDsAAkjIANSYGQ2GUP9yVuLRTNPc9LPMmyYB6+zLzfesitYv8AKA7qFr46a6UEkdXPjcSsL2zjPM6Dw+RqkhaLAejGKipKjtYTL0uYMBUsEjsACV4pSod-s+oyNxiOZdxgfKPW9Mr4TIEcfpuuqywgZTVJhDStKoty9IMoz3jpWQ2DPck5sCjt6sUtG1MxvHrokF9BuG0acU0oyFH86x5qCsQgA) -
```typescript
const Inject: InjectLike = void 0 as unknown as InjectLike;
interface InjectLike
{
<
C extends ConstructorLike,
>
({}: { type: C }): {
<
// FIXME : not enough to infer the method name - see ./__playground.ts#
M extends ( T extends ConstructorLike ? never : KeysToTypedNthParameter<I, InstanceType<C>, T> ),
I extends number,
T,
>
( target: T, member: M, index: I ): void;
};
}
``` | Needs Investigation | low | Critical |
414,646,352 | angular | FormControl not updated on textarea when FormControlName change | <!--π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
Oh hi there! π
To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
-->
# π bug report
### Affected Package
@angular/forms
### Is this a regression?
As far as I know, no
### Description
When I have a dynamic formControlName on a textarea, the attached formControl don't change when the formControlName is updated. It works correctly with formControl directly attached to the textarea.
## π¬ Minimal Reproduction
https://stackblitz.com/edit/angular-issue-repro2-htsfgu
## π₯ Exception or Error
no error inside Chrome devtools
## π Your Environment
**Angular Version:**
<pre><code>
Angular CLI: 7.1.4
Node: 10.15.0
OS: win32 x64
Angular: 7.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.7.5
@angular-devkit/build-angular 0.12.1
@angular-devkit/build-optimizer 0.12.1
@angular-devkit/build-webpack 0.12.1
@angular-devkit/core 0.7.5
@angular-devkit/schematics 7.1.4
@ngtools/webpack 7.2.1
@schematics/angular 7.1.4
@schematics/update 0.11.4
rxjs 6.3.3
typescript 3.1.6
webpack 4.23.1
</code></pre>
**Anything else relevant?**
got the same problem with any browser on any platform (chrome and firefox on windows, mac and linux)
| area: forms,P4 | low | Critical |
414,694,604 | go | x/net/http2: Expose isBadCipher | <pre>
$ go 1.11.5
</pre>
When manually specifying server ciphers, it is possible to specify a set of valid TLS 1.2 ciphers that are blacklisted in the HTTP/2 spec. This is a known potential issue; from [the spec section 9.2.2](https://http2.github.io/http2-spec/#rfc.section.9.2.2):
> The black list includes the cipher suite that TLS 1.2 makes mandatory, which means that TLS 1.2 deployments could have non-intersecting sets of permitted cipher suites. To avoid this problem causing TLS handshake failures, deployments of HTTP/2 that use TLS 1.2 MUST support TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 [TLS-ECDHE] with the P-256 elliptic curve [FIPS186].
Although this is in theory enough to prevent handshake failures, highly security conscious/paranoid users may not want to (or be allowed to) use RSA and want further control over exactly which ciphers are in use.
There is an isBadCipher function in the package that in theory could be used to check whether a user's submitted set of ciphers will cause blacklisting issues when using HTTP/2, however since it's not exported client code cannot use it to perform a simple check when evaluating a client's chosen cipher suites.
This is a simple request to expose that function. There is no obvious reason why the behavior of that function should ever change outside of a spec revamp, so it seems fairly safe to do so. | NeedsInvestigation,FeatureRequest | low | Critical |
414,717,427 | go | cmd/go/internal/lockedfile: clean *.lock files | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
go version go1.12
</pre>
It is necessary to clean these *.lock files in `$GOPATH/pkg/mod/cache/download/server.com/xxx/repo`?

And these files's size always 0. Maybe we can remove these files after unlock.
From code comment:
```
// We use a separate lockfile here instead of locking listFile itself because
// we want to use Rename to write the file atomically. The list may be read by
// a GOPROXY HTTP server, and if we crash midway through a rewrite (or if the
// HTTP server ignores our locking and serves the file midway through a
// rewrite) it's better to serve a stale list than a truncated one.
```
cc @bcmills | NeedsInvestigation,modules | low | Critical |
414,786,317 | godot | Selection is slow on some nodes (e.g. Skeleton or AnimationPlayer) in the scene tree dock | **Godot version: 3.1 (commit: ce114e35dda4b3f282abb458f8409db2369b279e)**
**OS/device including version: Windows 10**
**Issue description:**
When selecting nodes in the scene hierarchy some nodes have a big delay between mouse click and actual selection of the node even with a simple scene.
**Steps to reproduce:**
Please check the video [file](https://www.dropbox.com/s/ft1qj1fhw4bqnmy/2019-02-26%2021-28-56.flv?dl=0).
**Minimal reproduction project:**
[MicroDungeons.zip](https://github.com/godotengine/godot/files/2521780/MicroDungeons.zip)
| enhancement,topic:editor,performance | low | Major |
414,808,368 | react | Password input type causes memory leak | <!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
*Bug*
**What is the current behavior?**
An `<input type="password"/>` causes a memory leak.
**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:**
You can recreate the behavior by visiting https://iericallen.github.io/test-react/ and following the steps listed.
Please view our source code at: https://github.com/iericallen/test-react/tree/source
**What is the expected behavior?**
Unmounted components including `<input type="password" />` can be garbage collected after next re-rendering.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
OS: macOS X Mojave 10.14.2 (18C54)
Chrome: 72.0.3626.109
React: 16.8.3
ReactDOM: 16.8.3 | Type: Needs Investigation | medium | Critical |
414,811,382 | flutter | `flutter upgrade` crashes while simultaneously running `flutter run` | I runned `flutter upgrade` at the same time as IntelliJ IDEA was compiling my app to `run` it into an Android emulator. Then IntelliJ IDEA told me there were upgrades to IntelliJ IDEA and the Flutter and Dart plugins, so I decided to select them to upgrade at the same time.
This way the `cmd` instance running `flutter upgrade` crashed after a while, the report it generated is below.
I understand this is a stress test scenario, but still I thought it would be nice to share.
PS: I would like to know why `flutter doctor` sees *IntelliJ IDEA Ultimate Edition (version 2018.2* if I don't have this version anymore.
## Logs
Flutter crash report; please file at https://github.com/flutter/flutter/issues.
## command
flutter --no-color --no-version-check precache
## exception
```
FileSystemException: FileSystemException: Cannot delete file, path = 'C:\Programacao\Flutter\sdk\flutter\bin\cache\downloads\storage.googleapis.com\flutter_infra\flutter\3757390fa4b00d2d261bfdf5182d2e87c9113ff9\sky_engine.zip' (OS Error: The system cannot find the path specified.
, errno = 3)
```
```
#0 _File.throwIfError (dart:io/file_impl.dart:643:7)
#1 _File._deleteSync (dart:io/file_impl.dart:306:5)
#2 FileSystemEntity.deleteSync (dart:io/file_system_entity.dart:466:47)
#3 ForwardingFileSystemEntity.deleteSync (package:file/src/forwarding/forwarding_file_system_entity.dart:72:16)
#4 CachedArtifact._removeDownloadedFiles (package:flutter_tools/src/cache.dart:271:9)
#5 CachedArtifact.update (package:flutter_tools/src/cache.dart:265:5)
<asynchronous suspension>
#6 Cache.updateAll (package:flutter_tools/src/cache.dart:219:26)
<asynchronous suspension>
#7 PrecacheCommand.runCommand (package:flutter_tools/src/commands/precache.dart:33:19)
<asynchronous suspension>
#8 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:545:18)
#9 _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#10 _rootRunUnary (dart:async/zone.dart:1132:38)
#11 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#12 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#13 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#14 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#15 Future._complete (dart:async/future_impl.dart:473:7)
#16 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#17 _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#18 _rootRun (dart:async/zone.dart:1124:13)
#19 _CustomZone.run (dart:async/zone.dart:1021:19)
#20 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#21 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#22 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#23 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#24 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
```
## flutter doctor
```
[β] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17763.316], locale en-US)
β’ Flutter version 1.2.1 at C:\Programacao\Flutter\sdk\flutter
β’ Framework revision 8661d8aecd (12 days ago), 2019-02-14 19:19:53 -0800
β’ Engine revision 3757390fa4
β’ Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
[β] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
β’ Android SDK at C:\Programacao\Android\Sdk
β’ Android NDK location not configured (optional; useful for native profiling support)
β’ Platform android-28, build-tools 28.0.3
β’ Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
β’ All Android licenses accepted.
[β] Android Studio (version 3.3)
β’ Android Studio at C:\Program Files\Android\Android Studio
β’ Flutter plugin version 33.0.1
β’ Dart plugin version 182.5215
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[!] IntelliJ IDEA Ultimate Edition (version 2018.2)
β’ IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2018.1.5
β Flutter plugin not installed; this adds Flutter specific functionality.
β Dart plugin not installed; this adds Dart specific functionality.
β’ For information about installing plugins, see
https://flutter.io/intellij-setup/#installing-the-plugins
[β] IntelliJ IDEA Ultimate Edition (version 2018.3)
β’ IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2018.3
β’ Flutter plugin version 33.0.6
β’ Dart plugin version 183.5901
[β] VS Code (version 1.30.2)
β’ VS Code at C:\Users\Michel Feinstein\AppData\Local\Programs\Microsoft VS Code
β’ Flutter extension version 2.21.1
[β] Connected device (1 available)
β’ Android SDK built for x86 64 β’ emulator-5554 β’ android-x64 β’ Android 5.0.2 (API 21) (emulator)
! Doctor found issues in 1 category.
```
| c: crash,tool,P2,team-tool,triaged-tool | low | Critical |
414,814,655 | go | crypto/x509: RSAES-OAEP support | x509 currently does not support parsing rsaesoap pub keys.
Use case is calling x509 to extract the public EK from TPMs for verification purposes.
There are many old TPM units that use this key type. | NeedsInvestigation,FeatureRequest | low | Major |
414,876,051 | go | x/build/cmd/relui: check for unmerged CLs before release | We just shipped Go 1.12 without merging https://go-review.googlesource.com/c/go/+/163078
Let's make the cmd/release tool query Gerrit for, e.g.
`branch:release-branch.go1.12 project:go is:open`
And error out if any CLs are open on the branch we're trying to make a release for. There could be an override, like `--ignore-cls=163078,162172`, explicitly listing numbers, so people can't ignore it with some standard e.g. `--force` flag that makes its way into some release documentation that's copy/pasted without thinking about what it does.
/cc @dmitshur @andybons @ianlancetaylor @katiehockman @FiloSottile | Builders,NeedsFix | low | Critical |
414,881,304 | flutter | Pointer*Event documentation is oddly worded | The first line of the documentation for each pointer event class sounds like it's describing a callback, rather than an object. E.g.:
```
/// The pointer has made contact with the device.
```
rather than something more like:
```
/// An object containing information about a pointer making contact with the device.
```
Filing as a bug rather than just fixing it because doing this in a way that's consistent across all the events but doesn't add a bunch of identical boilerplate will require some wordsmithing, so is probably less trivial than it seems.
Filing per discussion in PR #22762 | framework,d: api docs,P2,team-framework,triaged-framework | low | Critical |
414,890,611 | pytorch | cmake fails with -DBUILD_PYTHON=OFF -DUSE_NNPACK=OFF | This fails:
cmake -DBUILD_PYTHON=OFF -DUSE_NNPACK=OFF ..
with an error message like this:
```
CMake Error at cmake/Codegen.cmake:163 (message):
Failed to get generated_cpp list
Call Stack (most recent call first):
caffe2/CMakeLists.txt:2 (include)
-- Configuring incomplete, errors occurred!
```
However, both of the options, when turned off independently, succeed:
cmake -DBUILD_PYTHON=OFF ..
and
cmake -DUSE_NNPACK=OFF .. | module: build,oncall: releng,triaged | low | Critical |
414,914,544 | go | regexp: LiteralPrefix behaving incorrectly | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.12 linux/amd64
</pre>
### Does this issue reproduce with the latest release?
Yeah, go1.12 has just been released.
### What did you do?
```go
package main
import (
"fmt"
"regexp"
)
func main() {
l, _ := regexp.MustCompile("^prefix\\d+.$").LiteralPrefix()
fmt.Printf("literalPrefix: %q", l)
}
```
See also on [Play](https://play.golang.com/p/q3dpqjD1RKh) or [even more](https://play.golang.com/p/KcTRk_zg0pf)
### What did you expect to see?
```
literalPrefix: "prefix"
```
### What did you see instead?
```
literalPrefix: ""
```` | Documentation,NeedsFix | low | Major |
414,917,646 | create-react-app | Make it clearer in error overlay when error boundary has caught an error | This issue was discussed in #3627, but it's been marked and stale as locked so I'm opening another issue.
As discussed in #3627, create-react-app will always display an error overlay for errors in development mode, even when the error is caught via an error boundary. This confused me at first, and it's also [confusing users](https://github.com/frontarm/navi/issues/45) of the routing library I maintain. This library throws a `NotFoundError` when it can't match a URL segment, and uses a `<NotFoundBoundary>` component to allow the user to render a 404 page.
```jsx
<div className='App'>
<Sidebar />
<main>
<NotFoundBoundary render={() => <NotFoundPage />}>
{/**
<View /> throws a NotFoundError if they can't find a route any content for
the part of the URL they correspond to. They can be nested, so even if
this view doesn't throw, a child view might -- thus boundaries are π
**/}
<View />
</NotFoundBoundary>
</main>
</div>
```
I feel like the best approach would be to not show error overlays for caught errors (Dan [mentioned](https://twitter.com/dan_abramov/status/1043818104323747841) it's on his todos). But just making it clearer that the error was caught would be a big improvement. | issue: proposal | medium | Critical |
414,948,524 | TypeScript | Comparison targets are reversed (regression) | @RyanCavanaugh @weswigham @ahejlsberg Caused by #27697
**TypeScript Version:** 3.4.0-dev.20190222
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
**Code**
https://github.com/falsandtru/spica/blob/v0.0.237/src/supervisor.legacy.ts#L49
**Expected behavior:**
pass
**Actual behavior:**
```
Argument of type 'this' is not assignable to parameter of type 'Supervisor<string, unknown, unknown, unknown>'.
Type 'Supervisor<N, P, R, S>' is not assignable to type 'Supervisor<string, unknown, unknown, unknown>'.
Type 'string' is not assignable to type 'N'.ts(2345)
```
Assignability checking must be N to string, not reverse.
**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
**Related Issues:** <!-- Did you find other bugs that looked similar? -->
| Needs Investigation | low | Critical |
414,972,771 | pytorch | ONNX->TensorRT parser library duplicated | ## π Bug
When built with TensorRT (i.e. `USE_TENSORRT=1` is set), PyTorch now includes two versions of the parser library: the original one https://github.com/onnx/onnx-tensorrt included as a submodule and linked as `libnvonnxparser.so` and `libnvonnxparser_runtime.so` binaries. And it's second incarnation coming with TensorRT 5. This creates lots of run-time issues. Also, they both bring their own third parties (like `onnx` itself, two different versions).
After discussion with TensorRT team we propose to remove the original one, i.e. this submodule:
```
[submodule "third_party/onnx-tensorrt"]
path = third_party/onnx-tensorrt
url = https://github.com/bddppq/onnx-tensorrt
```
and leave the one coming with TensorRT. Thank you. | triaged | low | Critical |
415,015,530 | flutter | Support text capitalization in TextStyle | Current status:
https://github.com/flutter/flutter/issues/28567#issuecomment-859971394
https://github.com/flutter/flutter/issues/28567#issuecomment-860113239
---
Inspiration taken from [CSS text-transform](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform), which helps keep the separation between style and structure clean.
It would be nice to be able to specify how text should be capitalized when rendered via TextStyle.
Let's say UX convention is that all buttons in the application should have uppercase text.
In https://docs.flutter.io/flutter/material/TextTheme-class.html
Writing what's button (ALL CAPS) but in TextStyle not this param(
Please fix it! God luck and have a nice day))) | c: new feature,framework,a: typography,customer: crowd,customer: solaris,P2,team-framework,triaged-framework | low | Critical |
415,030,507 | create-react-app | Add Jest configuration for snapshotresolver | As I understand, right now CRA only supports a handful of Jest configuration overrides, either by adding them to package.json or adding a jest.config.js to your project.
First question would be, why are you not allowing to just add a jest.config.js and read all of the configuration variables that Jest provides usually, why add just a few of them?
And the more important suggestion, can you add snapshotresolver to this list of allowed customizations? https://jestjs.io/docs/en/configuration#snapshotresolver-string
It has been added with Jest 24 and would really help clean up the codebase a bit, since I don't think it's necessary to have generated code right next to my .tsx, .scss and .test.ts files.. If not, could you at least explain, how the decision was made to not just check for a jest.config.js and then give it to the test runner, so the dev can decide what they want to override or not. | issue: proposal | medium | Critical |
415,117,609 | thefuck | rbenv install | The output of `thefuck --version`:
```
The Fuck 3.28 using Python 3.7.2 and Fish Shell 3.0.1
```
Your system (Debian 7, ArchLinux, Windows, etc.):
```
Arch Linux
```
How to reproduce the bug:
```
> rbenv install 2.6.1
ruby-build: definition not found: 2.6.1
See all available versions with `rbenv install --list'.
If the version you need is missing, try upgrading ruby-build:
cd /home/alex/.rbenv/plugins/ruby-build && git pull && cd -
```
The output of The Fuck with `THEFUCK_DEBUG=true` exported (typically execute `export THEFUCK_DEBUG=true` in your shell before The Fuck):
```
No fucks given
```
(I think, debug is not necessary)
Expected fuck:
```
cd /home/alex/.rbenv/plugins/ruby-build && git pull && cd -
```
(as suggested in the `rbenv` output)
| help wanted | low | Critical |
415,165,392 | opencv | denoise_TVL1 is limited to CV_8U | opencv/modules/photo/src/denoise_tvl1.cpp
line 150:
```
result.create(X.rows,X.cols,CV_8U);
X.convertTo(result, CV_8U, 255);
```
feature request:
denoise_TVL1 should allow different output formats.
| feature,category: photo | low | Minor |
415,190,856 | godot | Importing ESCN files using EditorSceneImporter loses "Import hints" | <!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->
**Godot version:**
3.1-beta7
**OS/device including version:**
Linux Fedora 28
**Issue description:**
Hey yall, thanks for Godot.
I'm trying to make an `EditorImportPlugin` that uses `OS.execute` to call the `godot-blender-exporter`, so I end up with an escn file. I was hoping that just having that in the `.import` hidden folder and returing 'PackedScene' from `get_resource_type` would suffice to get live reloading blends. Alas...
I did manage to use `EditorSceneImporter.import_scene_from_another_importer` to get the scene tree. I can creaate a new `PackedScene` from that and use `ResourceSaver` to save it to the `.import` folder.
This way live reload sort of works, however the scene isn't parsed the same way an `escn` in the visible project folder would be. This means things like `Import Hints` are ignored (and probably some other normalization steps are skipped).
I think there is a special loaders for `escn` files called `EditorSceneImporterESCN`, but I cant seem to use it from gdscript.
**Steps to reproduce:**
This is the main importer plugin code. Note that the Blender executable path is hard coded and you need to have the godot-blender-exporter plugin installed. I also add a time stamp to the intermediate `escn` filename because otherwise meshes aren't reimported properly.
```
tool
extends EditorImportPlugin
func get_importer_name():
return "easy_blender_import"
func get_visible_name():
return "Easy Blender Import"
func get_recognized_extensions():
return ["blend"]
func get_save_extension():
return "scn"
func get_resource_type():
return "PackedScene"
enum Presets { }
func get_preset_count():
return 0
func get_import_options(preset):
return []
func import(source_file, save_path, options, r_platform_variants, r_gen_files):
var path = ProjectSettings.globalize_path(source_file)
var outpath = ProjectSettings.globalize_path(save_path)
var t = hash(OS.get_unix_time())
var script = "import io_scene_godot; io_scene_godot.export('%s_%s.escn')" % [outpath, t]
var array = ["-b", path, "--python-expr", script]
var args = PoolStringArray(array)
print(args)
OS.execute("/opt/blender/blender-2.79-linux-glibc219-x86_64/blender", args, true)
var imp = EditorSceneImporter.new()
var scene = imp.import_scene_from_other_importer("%s_%s.%s" % [save_path, t, "escn"], 1 , 25 )
var newScene = PackedScene.new()
newScene.pack(scene)
ResourceSaver.save("%s.%s" % [save_path, get_save_extension()], newScene )
```
| topic:core,usability,topic:import | low | Minor |
415,197,096 | vscode | [json] add commas automatically | # Test case

# Expected behavior
* After typing `age` <kbd>TAB</kbd>, the comma should be added to the end of the previous line.
* After typing `"` for the next object property, the comma should be added to the end of the previous line.
# Actual behavior
The autocomplete does not produce valid text.
# Discussion
In general, the autocomplete should strive to produce output that is maximally valid in whatever language grammar it is using. | help wanted,feature-request,json | medium | Major |
415,197,924 | vscode | [json] add colon automatically | # Test case

# Expected
After typing `name` <kbd>TAB</kbd>, the editor should correct this to `"name":`.
# Actual
It is corrected to `"name"` (without `:`). | feature-request,json | low | Minor |
415,207,833 | TypeScript | spreading generic type disables excess property checking | <!-- π¨ 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.3333
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** generic spread
**Code**
```ts
function spread<T extends {foo: string}>(p: T): {foo: string} {
return {...p, bar: ''};
}
```
**Expected behavior:**
Excess property error for `bar`.
**Actual behavior:**
No error.
**Playground Link:** http://www.typescriptlang.org/play/#src=function%20spread%3CT%20extends%20%7Bfoo%3A%20string%7D%3E(p%3A%20T)%3A%20%7Bfoo%3A%20string%7D%20%7B%0D%0A%20%20%20%20return%20%7B...p%2C%20bar%3A%20''%7D%3B%0D%0A%7D | Bug | low | Critical |
415,208,671 | TypeScript | Nested classes are not collapsible/expandable in Visual Studio | Nested classes are not collapsible/expandable in Visual Studio.
```
export class ClassA{
private ClassB = class{
...
}
}
```
Code inside classB loses this functionality.
| Suggestion,Help Wanted,Experience Enhancement | low | Minor |
415,215,570 | flutter | Add traces when the pipeline depth changes. | Changing pipeline depth in the engine can result in jank. Mark the same clearly with and instant trace in the timeline. | engine,P2,team-engine,triaged-engine | low | Minor |
415,221,282 | three.js | editor freezes for a moment after *every* change in it. | ##### Description of the problem
I drag'n'drop a 3.2 mb FBX (created in 3ds max 2016), plus some 30 jpg textures with 256-2048 resolution. **Every single time** when I make a change in the scene, the editor freezes for several(tens of) seconds. The heavier the scene, the longer the freeze.
##### Browser
- [ ] All of them
- [x] Chrome
- [x] Firefox
- [ ] Internet Explorer
##### OS
- [ ] All of them
- [x] Windows
- [ ] macOS
- [ ] Linux
- [ ] Android
- [ ] iOS
##### Hardware Requirements (graphics card, VR Device, ...)
| Enhancement,Editor | low | Minor |
415,263,717 | opencv | Feature request: Kronecker tensor product | A feature request to add the [Kronecker tensor product](https://en.wikipedia.org/wiki/Kronecker_product) ([kron](https://www.mathworks.com/help/matlab/ref/kron.html) in Matlab, [numpy.kron](https://docs.scipy.org/doc/numpy/reference/generated/numpy.kron.html) in Numpy). See also the [tensor product](https://en.wikipedia.org/wiki/Tensor_product).
Expected results (Python Numpy):
```
print('np.kron([[1, 2], [3, 4]], [[0, 5], [6, 7]]):\n', np.kron([[1, 2], [3, 4]], [[0, 5], [6, 7]]))
print('np.kron([1,10,100], [5,6,7]):\n', np.kron([1,10,100], [5,6,7]))
```
Output:
```
np.kron([[1, 2], [3, 4]], [[0, 5], [6, 7]]):
[[ 0 5 0 10]
[ 6 7 12 14]
[ 0 15 0 20]
[18 21 24 28]]
np.kron([1,10,100], [5,6,7]):
[ 5 6 7 50 60 70 500 600 700]
```
Some available [OpenCV implementation](https://stackoverflow.com/questions/36549057/opencv-tensor-product/36552682#36552682):
```
Mat kron(const Mat& A, const Mat& B)
{
CV_Assert(A.channels() == 1 && B.channels() == 1);
Mat1d Ad, Bd;
A.convertTo(Ad, CV_64F);
B.convertTo(Bd, CV_64F);
Mat1d Kd(Ad.rows * Bd.rows, Ad.cols * Bd.cols, 0.0);
for (int ra = 0; ra < Ad.rows; ++ra)
{
for (int ca = 0; ca < Ad.cols; ++ca)
{
Kd(Range(ra*Bd.rows, (ra + 1)*Bd.rows), Range(ca*Bd.cols, (ca + 1)*Bd.cols)) = Bd.mul(Ad(ra, ca));
}
}
Mat K;
Kd.convertTo(K, A.type());
return K;
}
```
Another [implementation](https://github.com/carriehz/Orthog-Transforms/blob/master/kron_prod.hpp):
```
void kron_prod( InputArray _src1, InputArray _src2, OutputArray _dst){
Mat A = _src1.getMat();
Mat B = _src2.getMat();
int rsz, csz;
rsz = A.rows*B.rows;
csz = A.cols*B.cols;
Mat out = Mat(rsz, csz, CV_32F);
_dst.create(rsz, csz, CV_32F);
Mat dst = _dst.getMat();
Mat temp = Mat::zeros(B.rows,B.cols, CV_32F);
Mat res1 = Mat::zeros(B.rows,B.cols, CV_32F);
Mat res2 = Mat::zeros(rsz, csz, CV_32F);
Mat res3 = Mat::zeros(rsz, csz, CV_32F);
for( int i = 0; i < A.rows; i++ ){
Mat res1 = Mat::zeros(B.rows,B.cols, CV_32F);
for( int j = 0; j < A.cols; j++ ){
if (j == 0){
res1 = A.at<float>(i,j)*B;
res1.copyTo(out);
}
else{
temp = A.at<float>(i,j)*B;
hconcat(res1, temp, res1);
res1.copyTo(res2);
}
}
if (i == 0){
res2.copyTo(res3);
}
else{
vconcat(res3, res2, res3);
res3.copyTo(out);
}
}
out.copyTo(dst);
}
``` | feature,category: core | low | Minor |
415,315,604 | rust | Strange interaction between matching and lifetimes | I ran into some baffling issues when matching on a mutable reference and assigning to the mutable reference in the match arms. It seems that the inferred lifetime bound escapes the match. Playpen:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4428e0752f518ba02ed12c77560d8afb
I tried three ways of matching on a borrowed value `list.0`. The first two work only without the "if true" block (1b, 1c). Should an if-block affect the inferred lifetime of the borrow of `list.0`?
The last method does not work with (3a) or without (3b) the if-block, but I am still confused: why is `list.0` still borrowed after the match? Is this expected behavior?
I would expect all six variants to be accepted by the borrow checker, and I'm confused about why only two of them are. | T-compiler,A-NLL,NLL-polonius | low | Critical |
415,318,386 | pytorch | Add ASSERT for calling accessor on a GPU tensor | ## π Feature
Right now it just segfaults.
At an error message so that it is easier to debug.
cc @yf225 @glaringlee | module: cpp,module: molly-guard,triaged | low | Critical |
415,319,775 | flutter | await url_launcher launch not working | ```dart
Future onTapPayPal(String url, int credit) async {
var payPalUrl = url.replaceAll("CENT", credit.toString());
if (await canLaunch(payPalUrl)) {
await launch(
payPalUrl,
forceSafariVC: true,
forceWebView: true,
statusBarBrightness: Brightness.dark,
);
print("finish");
}
}
```
## Steps to Reproduce
Call method on top, and after finish viewing the url, the current widget should be reloaded. The code after await launch would not called.
pubspec.yml
```yml
name: TestProject
description: A new Flutter project.
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
http: ^0.12.0
fcharts: ^0.0.9
json_serializable: ^1.1.0
barcode_scan: ^0.0.8
shared_preferences: ^0.4.3
url_launcher: ^5.0.1
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/logo.png
```
```
[β] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.3 18D109, locale de-DE)
β’ Flutter version 1.0.0 at /Users/abuder/flutter
β’ Framework revision 5391447fae (3 months ago), 2018-11-29 19:41:26 -0800
β’ Engine revision 7375a0f414
β’ Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[β] Android toolchain - develop for Android devices (Android SDK 28.0.3)
β’ Android SDK at /Users/abuder/Library/Android/sdk
β’ Android NDK location not configured (optional; useful for native profiling support)
β’ Platform android-28, build-tools 28.0.3
β’ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
β’ All Android licenses accepted.
[β] iOS toolchain - develop for iOS devices (Xcode 10.1)
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ Xcode 10.1, Build version 10B61
β’ ios-deploy 2.0.0
β’ CocoaPods version 1.5.3
[β] Android Studio (version 3.3)
β’ Android Studio at /Applications/Android Studio.app/Contents
β’ Flutter plugin version 33.3.1
β’ Dart plugin version 182.5215
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[β] IntelliJ IDEA Ultimate Edition (version 2018.1.6)
β’ IntelliJ at /Applications/IntelliJ IDEA.app
β’ Flutter plugin version 28.0.2
β’ Dart plugin version 181.5616
[β] VS Code (version 1.31.1)
β’ VS Code at /Applications/Visual Studio Code.app/Contents
β’ Flutter extension version 2.23.1
[β] Connected device (1 available)
β’ iPhone X β’ 7CA15801-09C2-4DE1-85EF-95A3E2A261A5 β’ ios β’ iOS 12.1 (simulator)
β’ No issues found!
```
| p: url_launcher,package,team-ecosystem,P2,triaged-ecosystem | low | Major |
415,325,493 | TypeScript | Meta-issue: Use Full Unification for Generic Inference? | ## 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 -->
unification generic inference
## Suggestion
Today, TypeScript cannot retain or synthesize free type parameters during generic inference. This means code like this doesn't typecheck, when it should:
```ts
function identity<T>(arg: T) { return arg; }
function memoize<F extends (...args: unknown[]) => unknown>(fn: F): F { return fn; }
// memid: unknown => unknown
// desired: memid<T>(T) => T
const memid = memoize(identity);
```
## Use Cases
Many functional programming patterns would greatly benefit from this.
The purpose of this issue is to gather use cases and examine the cost/benefit of using a different inference algorithm.
## Examples
Haven't extensively researched these to validate that they *require* unification, but it's a start:
#9366
#3423
#25092
#26951 (design meeting notes with good examples)
#25826
#10247
| Meta-Issue | high | Critical |
415,326,715 | kubernetes | Reject requests with unsupported options | Today, the apiserver accepts requests with options that are unknown to the server, we just throw those options away and continue with the request as if they hadn't been specified.
I think this decision made some sense, as we don't necessarily want to reject a request asking for pagination made to an old server that doesn't support pagination, but it has also caused issues for us when we wanted to add features like server-side dry-run, and when discussing the possibility of adding a precondition to delete options.
The way we dealt with this for dry-run was to make the api-server reject requests with that field for a few versions, which was safe, but also unnecessarily delayed the feature's release.
**What would you like to be added**:
I think the server should ideally reject all requests with options they don't understand and return some kind of structured/machine-readable error which explains which options are causing the failure. Then clients could use this list to determine whether or not any of these options are critical to the request (like dry-run or a precondition). If any of the unsupported are critical, the client should not retry, and just return the error. If none of the unsupported options are critical, the client should retry the request automatically without those options specified. The client is the only one guaranteed to have the knowledge of whether or not an option is critical, since the apiserver could be from an older version.
This change would be backward compatible as long as no one relies on sending the server options that aren't in any version of k8s (which might not be completely true), and would allow us to safely add both critical and uncritical options in the future without having to worry about the same version skew issue we keep running into.
/kind design
/area apiserver
/sig api-machinery
/priority important-longterm
cc @lavalamp | area/apiserver,sig/api-machinery,kind/feature,priority/important-longterm,lifecycle/frozen | low | Critical |
415,336,920 | flutter | Stack makes infinite height if only have Positioned children | I run into a problem where I had a `Stack` with only `Positioned` children and my app was saying the `Stack` was generating an infinite size. I found the solution https://stackoverflow.com/a/54624340/1227166, which is a little hack, to just place an empty `Container` inside the `Stack`, so it will know how to calculate its own size.
I believe the `Stack` documentation should be clearer about this use case and what to do to prevent it. Also `Stack` should have a way (maybe a flag?) to measure itself in case there are only `Positioned` children so we won't have to resort to these kind of hacks. | framework,d: api docs,P2,team-framework,triaged-framework | low | Major |
415,372,840 | godot | Objects can't use forces while global_transform.basis is being changed |
**Godot version:**
Godot 3.1 Beta 8 official
**OS/device including version:**
Windows 10 64 bit (April update); Ryzen7 2700X CPU; GTX 1060 6GB GPU
**Issue description:**
In Beta 3 and before, you can move an object with forces while changing its _global_transform.basis_ property (using functions like slerp()). Now, you can't do that on the same frame, any object movement with forces will stop immediately, even though we're not changing the object's position.
**Steps to reproduce:**
Run the project and watch the cube stop as soon as it starts spinning. The position shouldn't see an override because it's only changing the orientation.
**Minimal reproduction project:**
[Test Project2.zip](https://github.com/godotengine/godot/files/2912662/Test.Project2.zip)
| bug,topic:core | low | Minor |
415,377,363 | go | cmd/compile: unnecessary hash/eq functions for slice literals | ### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.12rc1 linux/amd64
</pre>
Consider this package:
```go
package bloat
var x []interface{}
```
```shell
$ go build -o bloat.a .
$ ls -l bloat.a
-rw-r--r-- 1 dneil primarygroup 778 Feb 27 15:23 bloat.a
```
Now consider the case where we initialize the var `x`:
```go
package bloat
var x = []interface{}{0, 1, 2}
```
```shell
$ go build -o bloat.a .
$ ls -l bloat.a
-rw-r--r-- 1 dneil primarygroup 4030 Feb 27 15:28 bloat.a
```
The object file for the latter package contains `eq` and `hash` functions for `[3]interface{}`, which appear to account for much of the size increase:
```shell
$ go tool pack x bloat.a
$ go tool objdump -S bloat.a | grep ^TEXT
TEXT type..hash.[3]interface {}(SB) gofile..<autogenerated>
TEXT type..eq.[3]interface {}(SB) gofile..<autogenerated>
```
There is no need for these functions, however; the only use of `[3]interface{}` is to initialize a `[]interface{}`, and there is no way to recover the array type from that slice. | ToolSpeed,NeedsInvestigation,binary-size,compiler/runtime | low | Minor |
415,378,531 | rust | Suggest `split_at_mut` when trying to use multiple non-overlapping mutable slices to the same array | [The following code](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=1947bc965868f90b695a62803f999657) is invalid due to lifetime rules:
```
fn main() {
let mut foo = [1,2,3,4];
let mut a = &mut foo[..2];
let mut b = &mut foo[2..];
a[0] = 5;
b[0] = 6;
println!("{:?} {:?}", a, b);
}
```
```
error[E0499]: cannot borrow `foo` as mutable more than once at a time
--> src/main.rs:4:22
|
3 | let mut a = &mut foo[..2];
| --- first mutable borrow occurs here
4 | let mut b = &mut foo[2..];
| ^^^ second mutable borrow occurs here
5 | a[0] = 5;
| ---- first borrow later used here
```
The solution is to either use `unsafe` or (more appropriately) use [`split_at_mut`](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=b789f2e5abc3895158f80a9602e59b6b):
```
fn main() {
let mut foo = [1,2,3,4];
let (mut a, mut b) = foo.split_at_mut(2);
a[0] = 5;
b[0] = 6;
println!("{:?} {:?}", a, b);
}
```
The compiler should detect the case of multiple mutable borrows to the same array/slice and hint at the existence of `split_at_mut`. Ideally, we would also verify wether there's a range overlap in order to explain to the user why what they want to do is problematic and disallowed in Rust.
The output should ideally be along the lines of the following (the structured suggestion is not _needed_ to fix this issue, the text would be enough of an improvement):
```
error[E0499]: cannot borrow `foo` as mutable more than once at a time
--> src/main.rs:4:22
|
3 | let mut a = &mut foo[..2];
| --- first mutable borrow occurs here
4 | let mut b = &mut foo[2..];
| ^^^ second mutable borrow occurs here
5 | a[0] = 5;
| ---- first borrow later used here
= note: you cannot have multiple mutable borrows to the same piece of memory, as the compiler cannot assure that the different slices you're trying to use are non-overlapping
help: you can instead use `split_at_mut` to get two non-overlapping mutable slices from a single array/slice
|
3 | let (mut a, mut b) = foo.split_at_mut(2);
| ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
``` | C-enhancement,A-diagnostics,P-low,A-borrow-checker,T-compiler,A-suggestion-diagnostics,A-array | low | Critical |
415,380,242 | angular | bug(core): EventEmitter#subscribe() should be properly typed | <!--π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
Oh hi there! π
To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
-->
# π feature request
### Relevant Package
<!-- Can you pin-point one or more @angular/* packages the are relevant for this feature request? -->
<!-- βοΈedit: --> This feature request is for @angular/core
### Description
Currently, subscribing to an `EventEmitter` (via `EventEmitter#subscribe()`) stripes the EventEmitter's type information and [converts it to `any`](https://github.com/angular/angular/blob/7.2.7/packages/core/src/event_emitter.ts#L102). This is undesirable, as already pointed out in #6934.
That issue was closed with a nondescript explanation that ~ "you shouldn't use the EventEmitter's `subscribe()` method". However, `EventEmitter#subscribe()` is not marked as internal API.
The suggestion that someone should create a duplicate property, using an rxjs subject, *solely for the purpose of improved typing*, is unsatisfactory.
This is a request to do whatever needs to be done to allow subscribing to `EventEmitter` directly while preserving type information.
### Describe the solution you'd like
The type information, which is already present on `EventEmitter`, should be retained.
### Describe alternatives you've considered
Currently, the suggested workaround seems to be to create a duplicate property and update both the `@Output()` property and the duplicate `Subject` property whenever the associated data changes.
e.g.
```
class MyComponent {
@Input() name: string;
@Output()
nameChange = new EventEmitter<string>();
nameChange2 = new Subject<string>();
@Input() weather: {prediction: string};
@Output()
weatherChange = new EventEmitter<{prediction: string}>();
weatherChange2 = new Subject<{prediction: string}>();
private updateName(name: string) {
this.name = name;
this.nameChange.emit(name);
this.nameChange2.next(name);
}
private weatherName(value: {prediction: string}) {
this.weather = value;
this.weatherChange.emit(value)
this.weatherChange2.next(value)
}
}
`` | breaking changes,area: core,core: inputs / outputs,cross-cutting: types,P3 | low | Critical |
415,412,839 | go | x/net/dns/dnsserver: new package | x/net/dns/dnsmessage contains a DNS library (proposal #16218). A DNS server based on it would be very useful. In addition to the more traditional uses for a DNS server, having one in x/net would improve the story around using net.Resolver.Dial to do custom DNS. | Proposal,Proposal-Accepted | low | Major |
415,448,266 | every-programmer-should-know | What about History? | Histories make men wise. | Needs some β€οΈ,good first issue | low | Minor |
415,490,325 | go | internal/trace: TestMMUTrace and TestParseCanned failed on darwin/arm64 | Noticed on the darwin/arm64 builder:
```
--- FAIL: TestMMUTrace (0.00s)
gc_test.go:89: failed to parse trace: failed to read header: read 0, err EOF
--- FAIL: TestParseCanned (0.00s)
parser_test.go:51: failed to parse good trace http_1_10_good: failed to read header: read 0, err EOF
parser_test.go:51: failed to parse good trace http_1_11_good: failed to read header: read 0, err EOF
parser_test.go:51: failed to parse good trace http_1_5_good: failed to read header: read 0, err EOF
parser_test.go:51: failed to parse good trace http_1_7_good: failed to read header: read 0, err EOF
parser_test.go:51: failed to parse good trace stress_1_10_good: failed to read header: read 0, err EOF
parser_test.go:51: failed to parse good trace stress_1_11_good: failed to read header: read 0, err EOF
parser_test.go:55: unordered trace is not detected stress_1_5_unordered: failed to read header: read 0, err EOF
parser_test.go:51: failed to parse good trace stress_1_7_good: failed to read header: read 0, err EOF
parser_test.go:51: failed to parse good trace stress_start_stop_1_10_good: failed to read header: read 0, err EOF
parser_test.go:51: failed to parse good trace stress_start_stop_1_11_good: failed to read header: read 0, err EOF
parser_test.go:51: failed to parse good trace stress_start_stop_1_5_good: failed to read header: read 0, err EOF
parser_test.go:51: failed to parse good trace stress_start_stop_1_9_good: failed to read header: read 0, err EOF
FAIL
FAIL internal/trace 95.356s
``` | Testing,NeedsInvestigation | low | Critical |
415,491,141 | flutter | AnimatedBuilder and ValueListenableBuilder should honor TickerMode | and when they rebuild after having unsubscribed for a while, they should compare the current value to the old one and decide whether to use the old value if they're the same or rebuild if it's changed. | framework,a: animation,c: performance,P2,team-framework,triaged-framework | low | Minor |
415,508,189 | godot | Can't reduce height of output window in IDE | **Godot version:**
3.1 beta 8
**Issue description:**
I always wonder why minimal height of Output window is so large?
I tried to make it smaller, but size is locked.
Is it possible to make this locked minimal height smaller (at least twice)?

| enhancement,topic:editor,usability | low | Major |
415,519,185 | create-react-app | production build: change name | ### Is this a bug report?
No. Just a question
### Question
Is het possible to change the production build .js name?
`npm run build `
is now generating a file with a name like :
> runtime~main.fdfcfda2.js
(using react-scripts 2.1.5)
The issue I am having is that when I deploy to an SAP server it is failing because the special character '~` in the file is not allowed.
I think it is more a SAP problem but maybe it is simple to change the generated name (without ejecting ofcourse)
btw: is it important to have this special character in the name?
| tag: underlying tools,tag: internal | low | Critical |
415,601,320 | TypeScript | Autocomple import parent dir wrong when rootDirs is defined | **TypeScript Version:** 3.3.3333
If you configure in the tsconfig.json a rootDirs section like
```json
{
"compilerOptions": {
"baseUrl": "src",
"rootDirs": [
"src",
"src_gen"
]
}
}
```
When you try autocomplete an import from the parent folder (..) in a subfolder the subjections are wrong, on linux (where I tested) it add all the valid completitions as well the content of the system root (/) foolder.
**Example**
File `src/example/example.tsx`
```ts
import { exampleImport } from '../[autocomplete here]'
```
Try to autocomplete after `../` the displayed options are wrong, it add a lot of extra invalid options.
**Note:** It only happens when you are listing the ../ autocomplete options, if you already selected a subfolder inside ../ (e.g. ../shared/) it works properly.
Maybe related to: https://github.com/Microsoft/TypeScript/issues/28550 and https://github.com/Microsoft/TypeScript/issues/30148 | Suggestion,Experience Enhancement | low | Minor |
415,608,716 | TypeScript | Autocomple import ignore rootDirs | **TypeScript Version:** 3.3.3333
If you configure in the tsconfig.json a rootDirs section like
```json
{
"compilerOptions": {
"baseUrl": "src",
"rootDirs": [
"src",
"src_gen"
]
}
}
```
When you try autocomplete an import the subjections ignore what is available in the rootDirs, only show the options available in the same folder of the editing file.
**Example**
File `src/example/example.tsx`
```ts
import { exampleImport } from './[autocomplete here]'
import { exampleImport2 } from '../[autocomplete here]'
```
Try to autocomplete after `./`, `../`, or any subfolder, the displayed options are only the options available in the src folder, but not the options available in the src_gen folder.
**Note:** No matter the folder's order in the rootDirs sections, the result is the same. The value of the baseUrl option is not important for reproduce this behaviour.
Maybe related to: https://github.com/Microsoft/TypeScript/issues/28550 and https://github.com/Microsoft/TypeScript/issues/30147 | Suggestion,Experience Enhancement | low | Minor |
415,635,858 | angular | Upgraded AngularJS component broken transclusion under ng-if | <!--π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
Oh hi there! π
To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
π
-->
# π bug report
### Affected Package
<!-- Can you pin-point one or more @angular/* packages as the source of the bug? -->
<!-- βοΈedit: --> The issue is caused by package @angular/upgrade/static
### Is this a regression?
<!-- Did this behavior use to work in the previous version? -->
<!-- βοΈ--> Not sure
### Description
<!-- βοΈ-->
With situation described below when `ng-if` adds content, transclusion happens correctly only once - next times ng-if adds content, components on the transcluded content are not initialized
```html
<aio-app> <!-- downgraded aio component -->
<ajs-show-hide> <!-- upgraded ajs component -->
<button ng-init="shown = false" ng-click="shown = !shown">Show/Hide</button>
<div ng-if="shown">
<ng-transclude>
<aio-counter> <!-- native aio component, transcluded by aio-app into ajs-show-hide -->
<ajs-counter> <!-- upgraded ajs component -->
<button ng-init="count = 0" ng-click="count = count + 1">Bump!</button>
Count: {{count}}
</ajs-counter>
</aio-counter>
</ng-transclude>
</div>
</ajs-show-hide>
</aio-app>
```
## π¬ Minimal Reproduction
<!--
Please create and share minimal reproduction of the issue starting with this template: https://stackblitz.com/fork/angular-issue-repro2
-->
<!-- βοΈ-->
1. go to https://stackblitz.com/edit/angular-puip4w?file=src%2Findex.html
2. click `Show/Hide` button
3. click `Bump!` button
4. ensure Count is updated
5. click `Show/Hide` button again, so that counter is hidden
6. click `Show/Hide` button again, so that counter is shown again
7. observe counter being in previous state (count shows the number of the last count visible) - this is not expected, it should be set to 0
8. click `Bump!` button
9. counter is not updated - the component is broken
Alternatively:
1. clone https://github.com/zuzusik/angular-upgrade-bug
2. run `npm install`
3. run `ng serve`
4. open http://localhost:4201/
5. go to the step 2 from the list above
<!--
If StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue. Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior.
Issues that don't have enough info and can't be reproduced will be closed.
You can read more about issue submission guidelines here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue
-->
## π₯ Exception or Error
<pre><code>
No errors
</code></pre>
## π Your Environment
**Angular Version:**
<pre><code>
Angular CLI: 7.3.3
Node: 8.12.0
OS: darwin x64
Angular: 7.2.7
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, upgrade
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.13.3
@angular-devkit/build-angular 0.13.3
@angular-devkit/build-optimizer 0.13.3
@angular-devkit/build-webpack 0.13.3
@angular-devkit/core 7.3.3
@angular-devkit/schematics 7.3.3
@angular/cli 7.3.3
@ngtools/webpack 7.3.3
@schematics/angular 7.3.3
@schematics/update 0.13.3
rxjs 6.3.3
typescript 3.2.4
webpack 4.29.0
</code></pre>
**Anything else relevant?**
<!-- βοΈIs this a browser specific issue? If so, please specify the browser and version. -->
<!-- βοΈDo any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. -->
If we get rid of `<aio-counter>` level and transclude `<ajs-counter>` instead - the bug is also reproducible
AngularJS version is `1.7.7`, reproducible as well on older versions
| type: bug/fix,area: upgrade,state: needs more investigation,P4 | low | Critical |
415,648,638 | rust | Specialized `FnOnce` impl compiles failed with a lengthy error message | Playground Rustc version:
```
1.34.0-nightly 2019-02-27 7e001e5c6c7c090b4141
```
Code:
```rust
#![feature(unboxed_closures, fn_traits, specialization)]
use std::ops::{Deref, FnOnce};
struct Foo<T> {
val: T,
}
default impl<'a, T> FnOnce<()> for &'a Foo<T> {
type Output = &'a T;
extern "rust-call" fn call_once(self, _args: ()) -> Self::Output {
&self.val
}
}
impl<'a, T: 'a, U: 'a> FnOnce<()> for &'a Foo<T> where T: Deref<Target = U> {
type Output = &'a U;
extern "rust-call" fn call_once(self, _args: ()) -> Self::Output {
self.val.deref()
}
}
fn main() {}
```
Error message:
```
Compiling playground v0.0.1 (/playground)
error[E0275]: overflow evaluating the requirement `&Foo<_>: std::ops::FnOnce<()>`
|
= help: consider adding a `#![recursion_limit="128"]` attribute to your crate
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
= note: required because of the requirements on the impl of `std::ops::FnOnce<()>` for `&Foo<_>`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0275`.
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
``` | C-enhancement,A-diagnostics,T-compiler,A-specialization,requires-nightly,F-specialization,F-unboxed_closures | low | Critical |
415,692,874 | go | cmd/compile: clean up recent fix for ginsop2 on ppc64x | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
go version devel +72d24a7 Thu Feb 28 15:25:42 2019 +0000 linux/ppc64le
</pre>
### Does this issue reproduce with the latest release?
yes
### What operating system and processor architecture are you using (`go env`)?
$ go env
linux/ppc64le
Follow up for the fix for #30283:
- add one or more testcases for buildmodes that set the shared flag (position independent code)
- clean up the function name ginsnop2 and/or its use
| NeedsFix,compiler/runtime | low | Minor |
415,747,196 | go | cmd/go, x/tools/go/packages: how to instrument cgo code? | go-fuzz instruments source code, writes it out to a temp dir, and then calls go/build to compile it.
go/packages appears to support this: it generates CompiledGoFiles, which have been preprocessed by cgo. However, if you instrument those files and write them back out, "go build" doesn't work.
The first issue, easily fixed, is that they don't have a ".go" suffix.
The second issue is that cmd/go complains when it finds C/C++ files and/or cgo directives in a directory with only precompiled cgo code, because the precompiled cgo code doesn't contain `import "C"`. Sample error message: `//go:cgo_ldflag "/usr/local/Cellar/re2/20190101/lib/libre2.a" only allowed in cgo-generated code`.
If you add a dummy file containing just `import "C"` to work around that issue, then cmd/go runs cgo on that, which generates duplicate definitions within the package. Sample error message: `_Cgo_ptr redeclared in this block`.
As an inferior fallback, I tried to instrument the pre-cgo code instead. However, the AST and type information that go/packages generates is for the CompiledGoFiles, not the GoFiles, so that'd mean typechecking everything by hand, which means losing a bunch of the value provided by go/packages.
For now, I'm just leaving cgo code completely uninstrumented. Unfortunately, this requires adding semi-fragile hacks to find cgo code (whether the file is missing a ".go" suffix) and then reaching through the abstraction layers and copying it verbatim.
I'm not sure how best to fix this. One option would be to have a way to tell cmd/go that all cgo preprocessing has been done. I don't see an obvious fix within go/packages, but it'd be ideal to find one, since that doesn't require waiting six months to be usable.
cc @matloob @ianthehat @bcmills @alandonovan @dvyukov
| NeedsInvestigation | low | Critical |
415,767,630 | TypeScript | Inaccurate error or buggy behavior for JSDoc @typedef tags | ```js
// @ts-check
/**
* @typedef Foo
* @member foo {() => string}
*/
```
```
JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.ts(8021)
```
We need to figure out what this message should actually be or make it work.
P.S. I can never figure out how to declare a typedef on the first try. | Bug,Domain: JSDoc,Domain: JavaScript | low | Critical |
415,768,824 | TypeScript | JSDoc @implements tag/clause not checked | ```js
// @ts-check
/**
* @typedef Foo
* @property foo {() => string}
*/
/**
* @implements {Foo}
*/
class C1 {
foo = () => {
return 10;
}
}
/**
* @implements {Foo}
*/
class C2 {
foo() {
return 10;
}
}
```
**Expected**: At least an error on C1
**Actual**: Neither of these error | Bug,Domain: JSDoc,Domain: JavaScript | medium | Critical |
415,778,117 | rust | It'd be useful to delay E0412 after type checking to improve suggestions | With the following code:
```
async fn foo(i: usize, uri: Uri) -> Result<Duration, Error> {
let client = Client::new();
let now = Instant::now();
match await!(client.get(uri).timeout(Duration::from_secs(20))) {
Ok(_) => {
Ok(Instant::now() - now)
}
Err(err) => Err(err),
}
}
```
the diagnostic rightly complains about not knowing what `Error` is
```
error[E0412]: cannot find type `Error` in this scope
--> src/main.rs:11:54
|
11 | async fn foo(i: usize, uri: Uri) -> Result<Duration, Error> {
| ^^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
|
5 | use core::fmt::Error;
|
5 | use futures::core_reexport::fmt::Error;
|
5 | use futures::io::Error;
|
5 | use futures::rand_reexport::Error;
|
and 10 other candidates
```
but it could use the information gathered later to limit the suggestions. If we change `Error` in the return type to `()`, the output is
```
error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == std::result::Result<std::time::Duration, ()>`
--> src/main.rs:11:37
|
11 | async fn foo(i: usize, uri: Uri) -> Result<Duration, ()> {
| ^^^^^^^^^^^^^^^^^^^^ expected struct `tokio_timer::timeout::Error`, found ()
|
= note: expected type `std::result::Result<_, tokio_timer::timeout::Error<hyper::error::Error>>`
found type `std::result::Result<_, ()>`
= note: the return type of a function must have a statically known size
``` | A-diagnostics,A-resolve,T-compiler,A-async-await,A-suggestion-diagnostics,D-papercut | low | Critical |
415,787,804 | TypeScript | Smart indentation is wrong following more than one line after JSDoc comments | ```ts
/**
* @typedef Id {string}
*/
```
- Press enter TWICE at the end of the comment.
- After the first newline, you get the correct indentation (0 spaces).
- After the second newine, you get garbage indentation (1 space).
| Bug,Help Wanted,Effort: Moderate,Domain: Formatter,Domain: JSDoc | low | Minor |
415,823,649 | TypeScript | Merged object exports of globalThis broken | From bluebird user test
```js
// @Filename: release/util.js
var ret = {
isNode: isNode,
isClass: isClass, // etc
}
ret.isRecentNode = ret.isNode && (function() { ... })();
// @Filename: release/async.js
const util = require('./util')
util.isNode // error
util.isRecentNode // ok
// @Filename: util.js
var globalObject = this;
var ret = {
x: 1,
global: globalObject,
}
ret.extra = 2;
module.exports = ret;
// @Filename: user.js
var util = require('./util')
util.global // ok
util.x // ok
util.extra // ok?
```
**Expected behavior:**
all util.* ok
**Actual behavior:**
error on global and x
Due to toplevel `this` now having a type in the globalThis PR.
Note that this is a dist file from bluebird, where the intent is to provide a consistent global object as well as a consistent module.exports. But we get confused early on by `module.exports` references and incorrectly assume that the file is intended to be a module, and that toplevel `this` refers to the module, not `globalThis`. | Bug,Domain: JavaScript | low | Critical |
415,880,063 | TypeScript | is not under 'rootDir' 'src/'. even with exclude | <!-- π¨ 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.
-->
`exclude` compiler option is not working at all! I'm specifying `exclude` to the folder `gen` (and even `./gen`) and still receiving the error below.
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 3.3.3333
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
**Code**
```ts
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
```
**Expected behavior:**
No errors.
**Actual behavior:**
```
error TS6059: File '.../ts-lang/gen/grammar/MyLangLexer.ts' is not under 'rootDir' 'src/'. 'rootDir' is expected to contain all source files.
```
**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
**Related Issues:** <!-- Did you find other bugs that looked similar? -->
| Suggestion,Help Wanted,Experience Enhancement | low | Critical |
415,969,540 | flutter | [Text feature] Underline Skip Descenders | It would be really great (read, somewhat necessary) to be able to:
- adjust the underline thickness
- toggle skipping descenders
I saw some issues around exposing Skia text metrics but I'm not sure if these were specifically covered off.
Either way, I'd really love to see them. | framework,engine,a: typography,P2,team-engine,triaged-engine | low | Major |
415,984,242 | godot | Document why Basis axis vectors are exposed transposed | <!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->
**Godot version:**
<!-- Specify commit hash if non-official. -->
3.1 beta 9
**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Windows 10
**Issue description:**
<!-- What happened, and what was expected. -->
print spatial.transform.basis is wrong


I tested some case and this happen when spartial angle between 0 and 180 degree. it is ok at angle 180 degree or 0 degree

**Steps to reproduce:**
**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
[test transform.zip](https://github.com/godotengine/godot/files/2918563/test.transform.zip)
| discussion,topic:core,documentation | low | Critical |
416,034,603 | rust | Usage of boolean negation operator sometimes breaks closure type inference | The closure implements a trait, which is accepted in a function. Depending on its body the closure type inference sometimes works and sometimes fails forcing user to annotate argument type ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=852633722647b74e5b5ed18261db0b72)):
```rust
use std::ops::Not;
fn main() {
bar(|x| x); // ok
bar(|x| Not::not(x)); // ok
bar(|x: bool| x.not()); // needs type annotation
bar(|x: bool| !x); // needs type annotation
bar(|x| !&x); // ok
bar(|x: bool| !*&x); // needs type annotation
}
trait Foo<T> {
type Output;
}
impl<F: Fn(T) -> O, T, O> Foo<T> for F {
type Output = O;
}
fn bar(_: impl Foo<bool, Output = bool>) {}
```
I'm not 100% sure that it's a bug, but the inconsistency is alarming. | A-inference | low | Critical |
416,039,391 | pytorch | The documentation to Module._version isn't visible. | ## π Documentation
The docs for [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) does not list `_version` nor to the `_load_from_state_dict`. It should be listed to describe how to make a module backward compatible with its former weights.
Here are the docstrings I think should be included:
https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/module.py#L50-L60
https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/module.py#L649-L681
cc @brianjo @mruberry @albanD @jbschlosser @walterddr | module: docs,module: nn,module: serialization,triaged | low | Major |
416,093,518 | pytorch | Document whether it is possible to train TorchScript modules | ## π Documentation
I am interested in the following workflow, but my impression is that this use case is not supported (yet?):
1. Prototype a model in **Python**
2. Export model to **C++** via TorchScript (`torch.jit.trace`)
3. Train model in **C++**
Based on the documentation, it is unclear whether this workflow is supported or not. The very first sentence of https://pytorch.org/docs/master/jit.html states
> TorchScript is a way to create serializable and **optimizable models** from PyTorch code
However, it is ambiguous if "**optimizable**" refers to training or the jit compilation process here.
It seems that `torch::jit::script::Module` is treated as a special case which does not share commonality / a base class with `torch::nn::Module`. Is there also a way to access the parameters of a `torch::jit::script::Module` in order to use it for training? At first I thought "**optimizable models**" was referring to this but I am unsure now.
This issue is related to the post: https://discuss.pytorch.org/t/can-scriptmodule-be-used-for-training/35932
cc @suo @yf225 | oncall: jit,module: docs,module: cpp,triaged | medium | Critical |
416,126,576 | flutter | How to set Date Picker to display in Buddhist year | I want to develop an application that has the date picker.
But I can't find to config the format of year to Buddhist year.
Please help T_T | framework,f: material design,a: internationalization,d: api docs,P2,team-design,triaged-design | low | Major |
416,130,770 | rust | Possibly confusing error message when deref/deref_mut are used. | Beginners can be confused when `deref` and `deref_mut` are called implicitely:
- https://stackoverflow.com/questions/47060266/error-while-trying-to-borrow-2-fields-from-a-struct-wrapped-in-refcell
- https://stackoverflow.com/questions/54942045/accessing-two-vectors-in-a-struct-locked-by-a-mutex
In this given code:
```rust
struct Foo {
a: Vec<i32>,
b: Vec<i32>,
}
fn add(foo: std::sync::Mutex<Foo>) {
let f = foo.lock().unwrap();
for i in &mut f.a {
for j in &f.b {
*i += *j;
}
}
}
```
The error message is not the clearest:
```
error[E0502]: cannot borrow `f` as immutable because it is also borrowed as mutable
--> src/lib.rs:10:19
|
9 | for i in &mut f.a {
| --------
| | |
| | mutable borrow occurs here
| mutable borrow used here, in later iteration of loop
10 | for j in &f.b {
| ^ immutable borrow occurs here
```
The users could not understand that the borrows are done by `deref` and `deref_mut`, since the calls are implicit. They could think that, for an unknown reason, the borrow checker does not understand that the fields are disjoint.
I think that it would be an improvement if the compiler added that the implicit call to `deref`/`deref_mut` is responsible of the borrowing:
```
error[E0502]: cannot borrow `f` as immutable because it is also borrowed as mutable
--> src/lib.rs:10:19
|
9 | for i in &mut f.a {
| --------
| | |
| | mutable borrow occurs here due to a call to `Deref::deref`
| mutable borrow used here, in later iteration of loop
10 | for j in &f.b {
| ^ immutable borrow occurs here due to a call to `DerefMut::deref_mut`
```
This could be even better if the compiler gave the solution:
```
You can call `DerefMut::deref_mut` before borrowing the fields:
--> src/lib.rs:8:1
7 | let mut f = foo.lock().unwrap();
| let f = DerefMut::deref_mut(&mut f);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``` | C-enhancement,A-diagnostics,T-compiler | low | Critical |
416,133,933 | TypeScript | Allow marking functions in interfaces as callback / non-callable | ## Search Terms
callable function, non-callable function, callback function type, callback type modifier
## Suggestion
A keyword and some language support to identify functions which are not callable (they are only assignable callbacks).
## Use Cases
Currently, it is possible to call functions which aren't intended to be called, for example:
```ts
const btn = document.createElement('button')
btn.onclick = evt => {} // Correct use
btn.onclick(new MouseEvent('')) // Incorrect use, but no error
```
It should be possible to declare that `onclick` is only a callback, and thus you must not call it directly. A keyword such as `callback`, `noncallable` or `nocall` could be used for this purpose, in a spirit similar to the `readonly` modifier. For example:
```ts
interface HTMLButtonElement {
callback onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
}
```
Similar capabilities to that of `readonly` should be implemented around it, such as being able to add and remove the modifier through mapped types:
```ts
type FullyCallable<T> = {
-callback [P in keyof T]: T[P];
}
```
Which would set the stage for later usage in conditional types. For example, this is a way one can currently use to extract writable properties from a type:
```ts
type Not<T extends boolean> = T extends true ? false : true
type Equals<X, Y> =
(<T> () => T extends X ? 1 : 2) extends
(<T> () => T extends Y ? 1 : 2)
? true
: false
type IsReadonly<O extends Record<any, any>, P extends keyof O> =
Not<Equals<{[_ in P]: O[P]}, {-readonly [_ in P]: O[P]}>>
type WritableProperties<O extends Record<any, any>> = {
[P in keyof O]: IsReadonly<O, P> extends true
? never
: P
} extends {[_ in keyof O]: infer U}
? U
: never
type Writable<O extends Record<any, any>> = Pick<O, WritableProperties<O>>
type T = Writable<{
n: number,
readonly b: boolean,
o: {
readonly s: string // Recursion is possible... But even crazier.
}
}> // { n: number; o: { readonly s: string; }; }
```
It would be convenient to be able to do a similar thing with callbacks, identifying them and removing them at will while defining new types.
(A different topic altogether, but I hope declaring types like those above becomes more straightforward in the future, e.g. by having a direct way to identify `readonly` properties, or by being able to use logical operators as part of conditional types. Feel free to pick up on these ideas and start separate issues... Or I can do it myself if you ask me to. **Edit** I finally did: #31581, #31579)
## Example
The task I have at hand at the moment is to define the following button-spawning function (more generally, I would like to do this for any `Element`):
```ts
type ButtonProperties<T> = any
function button(properties: ButtonProperties<HTMLButtonElement>) {
const btn = document.createElement('button')
// Assign all `properties` to `btn`...
return btn
}
```
But I would like to define `ButtonProperties<T>` in such a way that it removed from `HTMLButtonElement` properties meeting certain criteria, namely:
- Are readonly. (Managed.)
- Are index signatures. (Managed.)
- Are callbacks. (Sort-of managed, with the assumption that all callbacks defined in `Element`s take as a first argument something extending `Event`, which is not necessarily fully accurate and it does not scale to user-defined types.)
## Checklist
My suggestion meets these guidelines:
* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
| Suggestion,Awaiting More Feedback | low | Critical |
416,142,375 | go | cmd/compile: elide call to runtime.growslice with provable capacity availability | Using `go1.12`
Consider the following snippet:
```go
/*12*/ func Append(b []byte) []byte {
/*13*/ if cap(b)-len(b) > 3 {
/*14*/ b = append(b, 0, 1, 2)
/*15*/ }
/*16*/ return b
/*17*/ }
```
This compiles to the following snippet:
```diff
"".Append STEXT size=192 args=0x30 locals=0x48
0x0000 00000 (/tmp/sandbox188310960/main.go:12) TEXT "".Append(SB), ABIInternal, $72-48
0x0000 00000 (/tmp/sandbox188310960/main.go:12) MOVQ (TLS), CX
0x0009 00009 (/tmp/sandbox188310960/main.go:12) CMPQ SP, 16(CX)
0x000d 00013 (/tmp/sandbox188310960/main.go:12) JLS 182
0x0013 00019 (/tmp/sandbox188310960/main.go:12) SUBQ $72, SP
0x0017 00023 (/tmp/sandbox188310960/main.go:12) MOVQ BP, 64(SP)
0x001c 00028 (/tmp/sandbox188310960/main.go:12) LEAQ 64(SP), BP
0x0021 00033 (/tmp/sandbox188310960/main.go:13) MOVQ "".b+96(SP), AX
0x0026 00038 (/tmp/sandbox188310960/main.go:13) MOVQ "".b+88(SP), CX
0x002b 00043 (/tmp/sandbox188310960/main.go:13) MOVQ AX, DX
0x002e 00046 (/tmp/sandbox188310960/main.go:13) SUBQ CX, AX
0x0031 00049 (/tmp/sandbox188310960/main.go:13) CMPQ AX, $3
0x0035 00053 (/tmp/sandbox188310960/main.go:13) JLE 172
- 0x0037 00055 (/tmp/sandbox188310960/main.go:14) LEAQ 3(CX), AX
- 0x003b 00059 (/tmp/sandbox188310960/main.go:14) CMPQ AX, DX
- 0x003e 00062 (/tmp/sandbox188310960/main.go:14) JHI 105
0x0040 00064 (/tmp/sandbox188310960/main.go:14) MOVQ "".b+80(SP), BX
0x0045 00069 (/tmp/sandbox188310960/main.go:14) MOVW $256, (BX)(CX*1)
0x004b 00075 (/tmp/sandbox188310960/main.go:14) MOVB $2, 2(BX)(CX*1)
0x0050 00080 (/tmp/sandbox188310960/main.go:16) MOVQ BX, "".~r1+104(SP)
0x0055 00085 (/tmp/sandbox188310960/main.go:16) MOVQ AX, "".~r1+112(SP)
0x005a 00090 (/tmp/sandbox188310960/main.go:16) MOVQ DX, "".~r1+120(SP)
0x005f 00095 (/tmp/sandbox188310960/main.go:16) MOVQ 64(SP), BP
0x0064 00100 (/tmp/sandbox188310960/main.go:16) ADDQ $72, SP
0x0068 00104 (/tmp/sandbox188310960/main.go:16) RET
- 0x0069 00105 (/tmp/sandbox188310960/main.go:14) LEAQ type.uint8(SB), BX
- 0x0070 00112 (/tmp/sandbox188310960/main.go:14) MOVQ BX, (SP)
- 0x0074 00116 (/tmp/sandbox188310960/main.go:14) MOVQ "".b+80(SP), BX
- 0x0079 00121 (/tmp/sandbox188310960/main.go:14) MOVQ BX, 8(SP)
- 0x007e 00126 (/tmp/sandbox188310960/main.go:14) MOVQ CX, 16(SP)
- 0x0083 00131 (/tmp/sandbox188310960/main.go:14) MOVQ DX, 24(SP)
- 0x0088 00136 (/tmp/sandbox188310960/main.go:14) MOVQ AX, 32(SP)
- 0x008d 00141 (/tmp/sandbox188310960/main.go:14) CALL runtime.growslice(SB)
- 0x0092 00146 (/tmp/sandbox188310960/main.go:14) MOVQ 40(SP), BX
- 0x0097 00151 (/tmp/sandbox188310960/main.go:14) MOVQ 48(SP), AX
- 0x009c 00156 (/tmp/sandbox188310960/main.go:14) MOVQ 56(SP), DX
- 0x00a1 00161 (/tmp/sandbox188310960/main.go:14) ADDQ $3, AX
- 0x00a5 00165 (/tmp/sandbox188310960/main.go:14) MOVQ "".b+88(SP), CX
- 0x00aa 00170 (/tmp/sandbox188310960/main.go:14) JMP 69
0x00ac 00172 (/tmp/sandbox188310960/main.go:16) MOVQ CX, AX
0x00af 00175 (/tmp/sandbox188310960/main.go:16) MOVQ "".b+80(SP), BX
0x00b4 00180 (/tmp/sandbox188310960/main.go:16) JMP 80
0x00b6 00182 (/tmp/sandbox188310960/main.go:16) NOP
0x00b6 00182 (/tmp/sandbox188310960/main.go:12) CALL runtime.morestack_noctxt(SB)
0x00bb 00187 (/tmp/sandbox188310960/main.go:12) JMP 0
0x0000 64 48 8b 0c 25 00 00 00 00 48 3b 61 10 0f 86 a3 dH..%....H;a....
0x0010 00 00 00 48 83 ec 48 48 89 6c 24 40 48 8d 6c 24 [email protected]$
0x0020 40 48 8b 44 24 60 48 8b 4c 24 58 48 89 c2 48 29 @H.D$`H.L$XH..H)
0x0030 c8 48 83 f8 03 7e 75 48 8d 41 03 48 39 d0 77 29 .H...~uH.A.H9.w)
0x0040 48 8b 5c 24 50 66 c7 04 0b 00 01 c6 44 0b 02 02 H.\$Pf......D...
0x0050 48 89 5c 24 68 48 89 44 24 70 48 89 54 24 78 48 H.\$hH.D$pH.T$xH
0x0060 8b 6c 24 40 48 83 c4 48 c3 48 8d 1d 00 00 00 00 [email protected]......
0x0070 48 89 1c 24 48 8b 5c 24 50 48 89 5c 24 08 48 89 H..$H.\$PH.\$.H.
0x0080 4c 24 10 48 89 54 24 18 48 89 44 24 20 e8 00 00 L$.H.T$.H.D$ ...
0x0090 00 00 48 8b 5c 24 28 48 8b 44 24 30 48 8b 54 24 ..H.\$(H.D$0H.T$
0x00a0 38 48 83 c0 03 48 8b 4c 24 58 eb 99 48 89 c8 48 8H...H.L$X..H..H
0x00b0 8b 5c 24 50 eb 9a e8 00 00 00 00 e9 40 ff ff ff .\$P........@...
rel 5+4 t=16 TLS+0
rel 108+4 t=15 type.uint8+0
rel 142+4 t=8 runtime.growslice+0
rel 183+4 t=8 runtime.morestack_noctxt+0
```
The regions marked in red seem superfluous. At a high-level, we already know that `cap(b)-len(b) > 3` so the check at 0x0037 is entire redundant. Also since there is guaranteed capacity, the code at 0x0069 and on is entirely unnecessary. | Performance,NeedsInvestigation,binary-size,compiler/runtime | low | Major |
416,162,765 | go | index/suffixarray: FindAllIndex gives wrong results for anchored regexp | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.12 linux/amd64
</pre>
### Does this issue reproduce with the latest release?
It does reproduce with Go versions 1.3 to 1.12 (latest at the time of writing), but it works as expected in Go version 1.2.
### 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="/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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build610735870=/tmp/go-build -gno-record-gcc-switches"
</pre></details>
### What did you do?
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
I called the suffixarray FindAllIndex method with a regexp anchored both to the beginning and end of text (https://play.golang.org/p/TaXeqtHt4Iq):
```
func main() {
idx := suffixarray.New([]byte("banana"))
re := regexp.MustCompile("^a$")
fmt.Println(idx.FindAllIndex(re, -1))
// Output:
// [[1 2] [3 4] [5 6]]
}
```
### What did you expect to see?
I expected an empty result `[]`, the same result as for the equivalent regexp method FindAllIndex (https://play.golang.org/p/PVThOv1EE8S):
```
func main() {
re := regexp.MustCompile("^a$")
fmt.Println(re.FindAllIndex([]byte("banana"), -1))
// Output:
// []
}
```
### What did you see instead?
suffixarray FindAllIndex returned the following index pairs in "banana" for the regexp "^a$":
```
[[1 2] [3 4] [5 6]]
```
The FindAllIndex documentation reads:
> FindAllIndex returns a sorted list of non-overlapping matches of the regular expression r, where a match is a pair of indices specifying the matched slice of x.Bytes(). If n < 0, all matches are returned in successive order. Otherwise, at most n matches are returned and they may not be successive. The result is nil if there are no matches, or if n == 0.
There are no matches for the expression "^a$" in the string "banana". Therefore the result should be empty, nil.
Go 1.2 produced the expected result. This is a regression in Go 1.3 where the behaviour of the regexp method LiteralPrefix changed. See the discussion in #30425. | NeedsInvestigation | low | Critical |
416,178,029 | rust | Compiler Team Steering Meeting | **This issue exists to describe the compiler team steering meeting and to collect links about it.** It is closed for comments since it's not meant to collect discussion; if you'd like to give feedback about the steering meeting, please feel free to [open a topic in Zulip][z].
[z]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler
[cal]: https://github.com/rust-lang/compiler-team#meeting-calendar
## What is it
The steering meeting is our chance to discuss procedural topics, track our progress, and just generally step back from the "daily grind" of triage. It takes place [every three weeks][cal] on [Zulip][z].
## How it works
The meeting begins with a **10 minute** announcement period. We then turn to more in-depth discussion of this week's topic(s).
After the meeting, a summary is posted to the [compiler-team repository](https://github.com/rust-lang/compiler-team/tree/master/minutes/steering-meeting). To aid with this, people use the `:point_up:` βοΈ emoji during the meeting to help highlight key comments that might want to be included in the summary.
The procedural stuff is more completely described here: https://github.com/rust-lang/compiler-team/blob/master/procedures/steering-meeting.md
## Handy links
- Between meetings, we track [potential agenda topics](https://hackmd.io/wsHwsi9zR3iq0ZF2SgEq9Q#) in a HackMd document.
- [Internals thread](https://internals.rust-lang.org/t/compiler-steering-meeting/8588/46) -- we post the agenda to this thread, along with summaries of the meetings.
- [Meeting summaries](https://github.com/rust-lang/compiler-team/tree/master/minutes/steering-meeting) -- after each meeting, we post a summary of what happened. You can view the full meeting by going to appropriate Zulip topic.
- The [compiler team calendar][cal] lists the steering meetings so you can track when they are.
| metabug,T-compiler | low | Minor |
416,184,503 | go | cmd/go: confusing error on mod edit -replace=old=.. | ### What version of Go are you using (`go version`)?
go version devel +44d3bb998c Fri Mar 1 07:45:00 2019 +0000 linux/amd64
### Does this issue reproduce with the latest release?
Yes.
### What did you do?
```
$ mkdir test
$ cd test
$ go mod init test
go: creating new go.mod: module test
$ go mod edit -replace=foo.com/bar=..
go mod: -replace=foo.com/bar=..: invalid new path: malformed module path "..": double dot
$ go mod edit -replace=foo.com/bar=../
$ cat go.mod
module test
go 1.13
replace foo.com/bar => ../
```
### What did you expect to see?
Replacing a module to `..` would either succeed or give a useful error.
### What did you see instead?
An error saying "double dot", which makes no sense to me as a user. It was @myitcv who pointed out that adding a trailing slash would fix the problem.
From `go help go mod`:
> If the @v in new@v is omitted, the new path hould be a local module root directory, not a module path.
So nothing in the error nor the docs seemed to point me at the missing slash.
/cc @bcmills | NeedsInvestigation,modules | low | Critical |
416,211,723 | go | proposal: cmd/go: 'go mod tidy' should remove stale 'replace' directives | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.12 windows/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes.
### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPROXY=
set GORACE=
set GOTMPDIR=
</pre></details>
### What did you do?
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
I created a `go.mod` file with two replaces in separate lines, then run `go mod tidy`. `foo3` replacement is unused.
<pre>
replace foo => bar
replace foo2 => bar2
replace foo3 => bar3
</pre>
### What did you expect to see?
A nicely formatted `go.mod`. Moreover, I think the unused replace should be removed.
<pre>
replace (
foo => bar
foo2 => bar2
)
</pre>
### What did you see instead?
The file is unchanged. Also, `go mod edit -fmt` does not format replaces. | Proposal,NeedsInvestigation,GoCommand | low | Critical |
416,225,478 | go | cmd/go, x/tools/go/packages: confusing go list repeated package with different values error | On go 1.12
Reproducible repo at https://github.com/nhooyr/gomod
I'm importing a main package as a side effect import which is an error. I'm aware this is wrong, but the error message should be clearer. If you try and load the mod with `x/tools/go/packages`, it will fail with
`go list repeated package golang.org/x/tools/cmd/goimports with different values`
Which is a very confusing error.
I debugged this a bit and it looks like `go list` is returning two different entries for `goimports`
If you run
```
$ go list -deps=true all | grep goimports
```
You'll see
```
$ go list -deps=true all | grep goimports
golang.org/x/tools/cmd/goimports
golang.org/x/tools/cmd/goimports
```
Thing is, these two listing are actually different. If you run with the `json` option.
```
{
"Dir": "/Users/nhooyr/Programming/gopath/pkg/mod/golang.org/x/[email protected]/cmd/goimports",
"ImportPath": "golang.org/x/tools/cmd/goimports",
"Name": "main",
"Doc": "Command goimports updates your Go import lines, adding missing ones and removing unreferenced ones.",
"Target": "/Users/nhooyr/Programming/gopath/bin/goimports",
"Module": {
"Path": "golang.org/x/tools",
"Version": "v0.0.0-20190228203856-589c23e65e65",
"Time": "2019-02-28T20:38:56Z",
"Dir": "/Users/nhooyr/Programming/gopath/pkg/mod/golang.org/x/[email protected]",
"GoMod": "/Users/nhooyr/Programming/gopath/pkg/mod/cache/download/golang.org/x/tools/@v/v0.0.0-20190228203856-589c23e65e65.mod"
},
"DepOnly": true,
"Stale": true,
"StaleReason": "stale dependency: golang.org/x/tools/internal/semver",
"GoFiles": [
"doc.go",
"goimports.go",
"goimports_gc.go"
],
"IgnoredGoFiles": [
"goimports_not_gc.go"
],
"Imports": [
"bufio",
"bytes",
"errors",
"flag",
"fmt",
"go/scanner",
"golang.org/x/tools/imports",
"io",
"io/ioutil",
"log",
"os",
"os/exec",
"path/filepath",
"runtime",
"runtime/pprof",
"runtime/trace",
"strings"
],
"Deps": [
"bufio",
"bytes",
"compress/flate",
"compress/gzip",
"container/heap",
"context",
"encoding",
"encoding/base64",
"encoding/binary",
"encoding/json",
"errors",
"flag",
"fmt",
"go/ast",
"go/build",
"go/constant",
"go/doc",
"go/format",
"go/parser",
"go/printer",
"go/scanner",
"go/token",
"go/types",
"golang.org/x/tools/go/ast/astutil",
"golang.org/x/tools/go/gcexportdata",
"golang.org/x/tools/go/internal/cgo",
"golang.org/x/tools/go/internal/gcimporter",
"golang.org/x/tools/go/internal/packagesdriver",
"golang.org/x/tools/go/packages",
"golang.org/x/tools/imports",
"golang.org/x/tools/internal/fastwalk",
"golang.org/x/tools/internal/gopathwalk",
"golang.org/x/tools/internal/module",
"golang.org/x/tools/internal/semver",
"hash",
"hash/crc32",
"internal/bytealg",
"internal/cpu",
"internal/fmtsort",
"internal/goroot",
"internal/poll",
"internal/race",
"internal/syscall/unix",
"internal/testlog",
"io",
"io/ioutil",
"log",
"math",
"math/big",
"math/bits",
"math/rand",
"net/url",
"os",
"os/exec",
"path",
"path/filepath",
"reflect",
"regexp",
"regexp/syntax",
"runtime",
"runtime/internal/atomic",
"runtime/internal/math",
"runtime/internal/sys",
"runtime/pprof",
"runtime/trace",
"sort",
"strconv",
"strings",
"sync",
"sync/atomic",
"syscall",
"text/scanner",
"text/tabwriter",
"text/template",
"text/template/parse",
"time",
"unicode",
"unicode/utf16",
"unicode/utf8",
"unsafe"
],
"Error": {
"ImportStack": [
"example.com/mymod",
"golang.org/x/tools/cmd/goimports"
],
"Pos": "doc.go:4:5",
"Err": "import \"golang.org/x/tools/cmd/goimports\" is a program, not an importable package"
}
}
```
```
{
"Dir": "/Users/nhooyr/Programming/gopath/pkg/mod/golang.org/x/[email protected]/cmd/goimports",
"ImportPath": "golang.org/x/tools/cmd/goimports",
"Name": "main",
"Doc": "Command goimports updates your Go import lines, adding missing ones and removing unreferenced ones.",
"Target": "/Users/nhooyr/Programming/gopath/bin/goimports",
"Module": {
"Path": "golang.org/x/tools",
"Version": "v0.0.0-20190228203856-589c23e65e65",
"Time": "2019-02-28T20:38:56Z",
"Dir": "/Users/nhooyr/Programming/gopath/pkg/mod/golang.org/x/[email protected]",
"GoMod": "/Users/nhooyr/Programming/gopath/pkg/mod/cache/download/golang.org/x/tools/@v/v0.0.0-20190228203856-589c23e65e65.mod"
},
"Match": [
"all"
],
"Stale": true,
"StaleReason": "stale dependency: golang.org/x/tools/internal/semver",
"GoFiles": [
"doc.go",
"goimports.go",
"goimports_gc.go"
],
"IgnoredGoFiles": [
"goimports_not_gc.go"
],
"Imports": [
"bufio",
"bytes",
"errors",
"flag",
"fmt",
"go/scanner",
"golang.org/x/tools/imports",
"io",
"io/ioutil",
"log",
"os",
"os/exec",
"path/filepath",
"runtime",
"runtime/pprof",
"runtime/trace",
"strings"
],
"Deps": [
"bufio",
"bytes",
"compress/flate",
"compress/gzip",
"container/heap",
"context",
"encoding",
"encoding/base64",
"encoding/binary",
"encoding/json",
"errors",
"flag",
"fmt",
"go/ast",
"go/build",
"go/constant",
"go/doc",
"go/format",
"go/parser",
"go/printer",
"go/scanner",
"go/token",
"go/types",
"golang.org/x/tools/go/ast/astutil",
"golang.org/x/tools/go/gcexportdata",
"golang.org/x/tools/go/internal/cgo",
"golang.org/x/tools/go/internal/gcimporter",
"golang.org/x/tools/go/internal/packagesdriver",
"golang.org/x/tools/go/packages",
"golang.org/x/tools/imports",
"golang.org/x/tools/internal/fastwalk",
"golang.org/x/tools/internal/gopathwalk",
"golang.org/x/tools/internal/module",
"golang.org/x/tools/internal/semver",
"hash",
"hash/crc32",
"internal/bytealg",
"internal/cpu",
"internal/fmtsort",
"internal/goroot",
"internal/poll",
"internal/race",
"internal/syscall/unix",
"internal/testlog",
"io",
"io/ioutil",
"log",
"math",
"math/big",
"math/bits",
"math/rand",
"net/url",
"os",
"os/exec",
"path",
"path/filepath",
"reflect",
"regexp",
"regexp/syntax",
"runtime",
"runtime/internal/atomic",
"runtime/internal/math",
"runtime/internal/sys",
"runtime/pprof",
"runtime/trace",
"sort",
"strconv",
"strings",
"sync",
"sync/atomic",
"syscall",
"text/scanner",
"text/tabwriter",
"text/template",
"text/template/parse",
"time",
"unicode",
"unicode/utf16",
"unicode/utf8",
"unsafe"
]
}
```
Not sure what's causing this difference between the two listings.
# Diff
```
14c14,16
< "DepOnly": true,
---
> "Match": [
> "all"
> ],
125,133c127
< ],
< "Error": {
< "ImportStack": [
< "example.com/mymod",
< "golang.org/x/tools/cmd/goimports"
< ],
< "Pos": "doc.go:4:5",
< "Err": "import \"golang.org/x/tools/cmd/goimports\" is a program, not an importable package"
< }
---
> ]
```
Furthermore, this goes away if you use `./...`.
```
$ go list -deps=true ./... | grep goimports
golang.org/x/tools/cmd/goimports
```
I can reproduce this in other cases as well e.g. when using an internal package where it isn't accessible (in this case both all and ./... produce the same output).
To summarize, the `x/tools/go/packages` error should be clearer, `go list` should not produce different listings of the same package and `./...` and `all` should produce the same output. | NeedsInvestigation | low | Critical |
416,250,757 | go | cmd/go: go test -failfast doesn't stop immediately with t.Parallel() | <!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.10.7 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/jenkins/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/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=/tmp/go-build781955494=/tmp/go-build -gno-record-gcc-switches"
</pre></details>
### What did you do?
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
```
func TestParallel1(t *testing.T) {
t.Parallel()
t.FailNow()
}
func TestParallel2(t *testing.T) {
t.Parallel()
}
```
run with ` go test -v -failfast -parallel 1` returns:
```
=== RUN TestParallel1
=== PAUSE TestParallel1
=== RUN TestParallel2
=== PAUSE TestParallel2
=== CONT TestParallel1
=== CONT TestParallel2
--- PASS: TestParallel2 (0.00s)
--- FAIL: TestParallel1 (0.00s)
FAIL
exit status 1
FAIL test 0.075s
```
### What did you expect to see?
`TestParallel2` not continue.
### What did you see instead?
`TestParallel2` continued execution. | Performance,NeedsInvestigation | low | Critical |
416,315,505 | rust | sys::unix::fs::canonicalize can lead to undefined-ish behavior on Android | Its code is:
```pub fn canonicalize(p: &Path) -> io::Result<PathBuf> {
let path = CString::new(p.as_os_str().as_bytes())?;
let buf;
unsafe {
let r = libc::realpath(path.as_ptr(), ptr::null_mut());
if r.is_null() {
return Err(io::Error::last_os_error())
}
buf = CStr::from_ptr(r).to_bytes().to_vec();
libc::free(r as *mut _);
}
Ok(PathBuf::from(OsString::from_vec(buf)))
}
```
The problem comes from the pair of calls `libc::realpath`, `libc::free`. Under normal conditions, `libc::realpath` calls `malloc`, `libc::free` corresponds to `free` and everyone lives happily every after.
Now, funky things are funky. Say you have a binary that makes `malloc` and `free` be jemalloc. From rust, `libc::malloc` and `libc::free` then point to jemalloc. But here's the catch: libc's `malloc` is not necessarily jemalloc's. That is, while on e.g. Linux, when you have such a setup, libc will happily use jemalloc's `malloc`/`free` for its allocations (as long as it's not built with -Bsymbolic or -Bsymbolic-functions), that's not the case on Android: IIRC, libc is linked in such a way that all its "internal" function calls stay internal (that is, it's built with -Bsymbolic). So when `realpath` calls `malloc`, it calls libc's not jemalloc's. And then `canonicalize` calls `libc::free` with the resulting pointer, which is jemalloc's. Kaboom.
Yes, there is `__malloc_hook` and friends, which would solve the problem if they existed on Android. (Well, they do now, but they don't on Android versions < 9 (and apparently 7 for IoT if I'm to believe tags in the bionic repository).
https://bugzilla.mozilla.org/show_bug.cgi?id=1531887 is a real issue that results from this, although it doesn't involve `-Bsymbolic`, but some subtle dynamic linking setup where rust code is in libxul.so, which depends on libmozglue.so, which provides `malloc`/`free` as jemalloc's, for use by libxul, but all native Android code still ends up using libc's `malloc`/`free`.
For this particular case, it's possible to pass an appropriately-sized buffer to realpath instead of `null`, which makes it allocate on its own (https://pubs.opengroup.org/onlinepubs/009696799/functions/realpath.html says PATH_MAX ; the only system I know that doesn't use those limits is Hurd). For the more general case, it almost feels like there should be an overridable `GlobalAlloc` for the non-rust system allocator.
Cc: @SimonSapin | O-android,T-libs-api | low | Critical |
416,321,808 | godot | Exported variables in extended script should follow godot natural inheritance order | <!-- 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. -->
5e837b3f13ab1e3b31bb8d705e87820fa4eff21e
**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Win7
**Issue description:**
<!-- What happened, and what was expected. -->
An script that extends other script class doesnΒ΄t shows in inspector the exported properties in the godot natural inheritance order.
Ej:
Script class named **full_enemy** that extends a class named**basic_enemy** that extends a class **enemy_object** that extends **kinematicBody2D** has this property order in inspector:
- enemy_object
- basic_enemy
- full_enemy
- KinematicBody2D
- PhysicsBody2D
-etc......
If we follow the order that godot naturally follow in inspector (Down in inheritance), the order should be:
- full_enemy
- basic_enemy
- enemy_object
- KinematicBody2D
- PhysicsBody2D
-etc......
(And could be great to see the class difference in inspector in the same way that you can see the differences between Node-Node2D-CanvasItem etc....)
| enhancement,topic:gdscript | low | Minor |
416,324,920 | go | cmd/compile: unnecessary hash/eq functions for global arrays | This is a generalization of the problem described in #30449.
Suppose we have a unexported global variable:
```
var myArray [4]T
```
and none of the operations performed on this array:
* let the array itself escape from the package (implies that the variable is unexported)
* rely on comparability of the array (e.g., use of `==` or as a map key)
For example, operations like indexing (e.g., `myArray[3]`) and slicing (e.g., `myArray[:]`) are permitted.
If the above conditions are met, I believe that hash/eq functions need not be generated for that array since it is provably not used in the package, and cannot be used dynamically since the array itself does not escape from the package.
---
The use case for this is code like:
```go
var globalMessageTypes [2]protoimpl.MesageType // Desire no hash/eq functions for this type
func (T) Type() protoreflect.MessageType {
return &globalMessageTypes[0]
}
func (R) Type() protoreflect.MessageType {
return &globalMessageTypes[1]
}
func init() {
for i := range ... {
globalMessageTypes[i] = ...
}
}
```
We declare `globalMessageTypes` as an array so that the `T.Type` and `R.Type` methods do not need a bounds check when indexing into the global array. However, the generated hash/eq functions add significant binary bloat.
The workaround to this is to use a global slice instead of an array, but that has other issues (see #30529).
| Performance,NeedsInvestigation,compiler/runtime | low | Minor |
416,324,927 | go | cmd/compile: unnecessary bounds check for global slices | Using `go1.12`
Suppose we have a unexported global variable:
```
var mySlice = make([]T, 4)
```
and none of the operations performed on this slice:
* let a reference to the slice itself escape from the package (implies that the variable is unexported)
* mutate the slice header itself (e.g., no assign to the variable)
For example, operations like element assignment (e.g., `mySlice[3] = ...`) and element addressing (e.g., `&mySlice[3]`) are permitted.
If the above conditions are met, I believe that indexes into the slice below the initial size could have the bounds check elided since the index is provably not going to exceed the bounds.
---
The use case for this is code like:
```go
var globalMessageTypes = make([]protoimpl.MesageType, 2)
func (T) Type() protoreflect.MessageType {
return &globalMessageTypes[0] // Desire no bounds check here
}
func (R) Type() protoreflect.MessageType {
return &globalMessageTypes[1] // Desire no bounds check here
}
func init() {
for i := range ... {
globalMessageTypes[i] = ...
}
}
```
We could use an array instead to avoid the bounds check, but that has other issues (see #30528).
| Performance,NeedsInvestigation,compiler/runtime | low | Major |
416,326,929 | TypeScript | JSDoc Class extending Array not supported (?) | Got a Class that Extends Array (FooArray) and am trying to create a Typed FooArray in another place. JSDoc suggests that I would be correct by using `FooArray.<Type>` (As the "normal" suggested method is either `Type[]` or `Array.<Type>`) and this markdown indeed seems to be parsed by jsdoc without issues, however VSC ends up detecting neither `FooArray` nor `Type`
Full example:
```
/**
* @class FooArray
* @extends {Array}
*/
class FooArray extends Array {
constructor() {
super();
//whatever
}
/**
* returns "baz"
* @returns {string}
*/
bar() {
return "baz";
}
};
//This array will be filled with only values of type XYZ
/** @type {Array.<XYZ>} => instance[0] is correctly tagged / detected, instance.bar() is not (Obviously) */
/** @type {FooArray} => instance.bar() is documented but JSDoc has no idea of the values in the Array */
/** @type {FooArray.<XYZ>} => Neither is detected / documented */
let instance = new FooArray();
``` | Bug | low | Minor |
416,350,377 | go | gerrit: improve revert commit message template, if possible | When using Gerrit UI to create a revert of a CL, it populates the commit message with the following template:
```
Revert "{{.OriginalTitle}}"
This reverts commit {{.CommitHash}}.
Reason for revert: <INSERT REASONING HERE>
```
For example:

In most contexts of the Go project, we refer to changes by the CL number or a shortlink of the form `golang.org/cl/nnn`. This has some advantages compared to using the commit hash:
- shorter and less visual noise
- CL page contains code review discussion, in addition to the change; commit requires one extra click to get to discussion
If possible, we should consider changing the template to be:
```
Revert "{{.OriginalTitle}}"
This reverts https://golang.org/cl/{{.OriginalCL}}.
Reason for revert: <INSERT REASONING HERE>
```
Or perhaps the `This reverts CL {{.OriginalCL}}.` form.
Revert CLs are generally created in situations that involve more time pressure and stress compared to normal CLs, so it's less reliable for us to depend on people to remember to do this manually, or to reference documentation like at https://golang.org/wiki/CommitMessage. It's better to adjust the template.
### Implementation
I'm not very familiar with the configurability of our Gerrit instance and whether this is possible. /cc @andybons @bradfitz From looking at its source at https://gerrit.googlesource.com/gerrit/+/v2.16.6/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog.js#50, it may be the case that this is not a configurable Gerrit feature, and so this may be blocked on a feature request for Gerrit.
This issue is to investigate whether this is possible, and whether we agree it's a good idea. /cc @ianlancetaylor | help wanted,NeedsInvestigation,FeatureRequest,DevExp,Community | low | Major |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.