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
253,545,490
opencv
viz::WMesh is not documented (properly)
##### System information (version) - OpenCV => 3.3 - Operating System / Platform => Ubuntu 16.04 (x86-64) with QT 5.5 - Compiler => g++ 5.4.0 ##### Detailed description The `WMesh` class is very poorly documented and there are no examples on how to use it. While it is possible to load a mesh from a file (loaded through a `Mesh` object), the [second contructor](http://docs.opencv.org/3.3.0/d2/d76/classcv_1_1viz_1_1WMesh.html#a5023e5228d28ea876415140312b24415) is not (properly) documented (e.g., both `cloud` and `polygons` have the exact same description, although one of them expects a list of `int`s). I was not able to build a working example for even a very simple mesh due to (seemingly) arbitrary assertion failures and segmentation faults while trying to figure out the parameters. The following code does (at least) not crash, but also shows no mesh: ##### Steps to reproduce ``` #include <vector> #include <opencv2/viz.hpp> using namespace std; using namespace cv; using namespace viz; static void AddMesh(Viz3d &visualization) { WCoordinateSystem coordinate_system; visualization.showWidget("Coordinate system", coordinate_system); const vector<Point3d> cloud {Point3d(-1, -1, 0), Point3d(1, -1, 0), Point3d(1, 1, 0), Point3d(-1, 1, 0), Point3d(-1, -1, 0)}; const vector<int> polygons {5, 0, 0, 0, 0, 0}; //{5, 0} yields a SIGSEV below const Mat colors(1, 5, CV_8UC4, Color::yellow()); WMesh mesh(cloud, polygons, colors); visualization.showWidget("Mesh", mesh); } int main() { Viz3d visualization; AddMesh(visualization); visualization.spinOnce(1, true); while (!visualization.wasStopped()) visualization.spinOnce(1, true); return 0; } ``` From the properties of the `Mesh` class (which is also poorly documented), I figured that `polygons` is supposed to be a list of `int`s consisting of a number (of points) and offsets (indeces). However, setting those to the simplest possible case (see comment in the code above) yields a SIGSEV when constructing the `WMesh`. I would highly appreciate proper documentation for the `WMesh` class and its constructor or at least an example on how to use it when *not* loading a mesh from a file. I am very well aware that this could be considered a questions rather than a bug report. However, given that there was not even a single answer to any one of my viz-related questions on answers.opencv.org within the last three weeks, I'd rather report the current state of documentation as a bug and move on so that future developers have a better idea of how to use the (practically) undocumented classes of this module.
feature,category: documentation,category: viz
low
Critical
253,581,567
vscode
Search bar input field very narrow
- VSCode Version: Code 1.15.1 (41abd21afdf7424c89319ee7cb0445cc6f376959, 2017-08-16T17:15:57.756Z) - OS Version: Darwin x64 16.7.0 - Extensions: the listing length exceeds browsers' URL characters limit --- Steps to Reproduce: 1. Open search in current file 2. See attached file <img width="2313" alt="schermata 2017-08-29 alle 11 04 53" src="https://user-images.githubusercontent.com/142634/29813576-c21471f6-8caa-11e7-9172-0013e052c8f7.png"> <!-- Launch with `code --disable-extensions` to check. --> Reproduces without extensions: Yes/No
editor-find,under-discussion
medium
Major
253,596,756
nvm
NVM Detects Windows NPM Versions when using Bash on Windows
- Operating system and version: Ubuntu 16.04 on Windows 10 Build 16275 (Also tested with OpenSUSE Leap 42.2) - `nvm debug` output: <details> <!-- do not delete the following blank line --> ```sh nvm --version: v0.33.2 $SHELL: /bin/bash $HOME: /home/seth $NVM_DIR: '$HOME/.nvm' $PREFIX: '' $NPM_CONFIG_PREFIX: '' $NVM_NODEJS_ORG_MIRROR: '' $NVM_IOJS_ORG_MIRROR: '' shell version: 'GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)' uname -a: 'Linux 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux' OS version: Ubuntu 16.04.3 LTS curl: /usr/bin/curl, curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3 wget: /usr/bin/wget, GNU Wget 1.17.1 built on linux-gnu. git: /usr/bin/git, git version 2.7.4 nvm current: none which node: which iojs: which npm: /mnt/c/Program Files/nodejs/npm npm config get prefix: /mnt/c/Program Files/nodejs/npm: 3: /mnt/c/Program Files/nodejs/npm: : not found /mnt/c/Program Files/nodejs/npm: 5: /mnt/c/Program Files/nodejs/npm: : not found /mnt/c/Program Files/nodejs/npm: 6: /mnt/c/Program Files/nodejs/npm: Syntax error: word unexpected (expecting "in") npm root -g: /mnt/c/Program Files/nodejs/npm: 3: /mnt/c/Program Files/nodejs/npm: : not found /mnt/c/Program Files/nodejs/npm: 5: /mnt/c/Program Files/nodejs/npm: : not found /mnt/c/Program Files/nodejs/npm: 6: /mnt/c/Program Files/nodejs/npm: Syntax error: word unexpected (expecting "in") ``` </details> - `nvm ls` output: <details> <!-- do not delete the following blank line --> ```sh N/A [1;31mnode[0m [0;90m->[0m [1;31mstable[0m ([0;90m->[0m [1;31mN/A[0m) [0;37m(default)[0m [1;31miojs[0m [0;90m->[0m [1;31mN/A[0m [0;37m(default)[0m ``` </details> - How did you install `nvm`? (e.g. install script in readme, homebrew): install script - What steps did you perform? Install NVM, that's it really - What happened? Windows versions of NPM and I think Node, I think based on the random escape characters, were detected and added to nvm - What did you expect to happen? Nothing to be found, since I don't have Node installed in either my Ubuntu Bash or OpenSUSE Bash yet - Is there anything in any of your profile files (`.bashrc`, `.bash_profile`, `.zshrc`, etc) that modifies the `PATH`? No
OS: windows,needs followup
medium
Critical
253,597,242
angular
Route Transition no longer working if loaded component has animation trigger
## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [x] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request </code></pre> ## Current behavior Navigating between components using animations on route changes causes the newly loaded component to not display and to have a display:none; style if the component also has an animation trigger defined (even if not used). Animations between other components are working as expected however simply adding "animations: [trigger('someAnimation', [])]" will cause it to not display. This was working in 4.3.2 however after updating to 4.3.6 it no longer works. Loading the component directly without changing route shows the component as expected. ## Expected behavior The component should display after route changes even if the router and child component have animations. ## Minimal reproduction of the problem with instructions app.component.ts <pre><code> import { Component } from '@angular/core'; import { trigger, style, transition, animate, query } from '@angular/animations'; @Component({ selector: 'body', templateUrl: './app.component.html', animations: [ trigger('routerAnimations', [ transition('* => *', [ query(':leave', [ animate('500ms ease', style({ opacity: 0, transform: 'translateY(100px)' })) ], { optional: true }), ]) ]) ] }) export class AppComponent { prepareRouteTransition(outlet) { return outlet._activatedRoute ? outlet._activatedRoute.url._value.join('/') : 'void'; } } </code></pre> child.component.ts <pre><code> import { Component } from '@angular/core'; import { trigger, state, style, transition, animate } from '@angular/animations'; @Component({ selector: '.child-component', templateUrl: './child.component.html', animations: [ trigger('childAnimation', []) ], }) export class AdmissionsDetailComponent { } </code></pre> ## What is the motivation / use case for changing the behavior? <!-- Describe the motivation or the concrete use case. --> ## Environment <pre><code> Angular version: 4.3.6 Browser: (seems to be all but tested in:) - [x] Chrome (desktop) version 60 - [x] Firefox version 54 </code></pre>
type: bug/fix,area: animations,freq2: medium,P3
medium
Critical
253,729,077
flutter
Last plugin pod is still embedded in an iOS app even after it is removed from the pubspec
I found a problem with release build for iOS. The app is built, but it crashes on launch. ``` [VERBOSE-3:dart_init.cc(560)] Error while initializing the Dart VM: JIT runtime cannot run a precompiled snapshot ``` iOS debug, Android debug/release work well. This issue is on master and alpha channels. New project (`flutter create ...`) runs without crashes. ## Steps to Reproduce `flutter run --release -v` https://gist.github.com/mogol/1702b19068d949f44bdb54f693351b23 ## Logs Run your application with `flutter run` and attach all the log output. ``` flutter run Launching lib/main.dart on iPhone 7 GS in debug mode... Automatically signing iOS for device deployment using specified development team in Xcode project: PWSQ8TH82A Running Xcode build... 16.4s You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist. Syncing files to device iPhone 7 GS... 2.8s 🔥 To hot reload your app on the fly, press "r". To restart the app entirely, press "R". An Observatory debugger and profiler on iPhone 7 GS is available at: http://127.0.0.1:8102/ For a more detailed help message, press "h". To quit, press "q". ``` Run `flutter analyze` and attach any output of that command also. ``` flutter analyze Analyzing /Users/herman/Projects/fitness/mobileapp... lint • Type annotate public APIs at lib/calendar/calendar.dart:45:20 • type_annotate_public_apis lint • Type annotate public APIs at lib/main.dart:99:20 • type_annotate_public_apis lint • Avoid annotating with dynamic when not required at lib/redux/state.g.dart:46:20 • avoid_annotating_with_dynamic lint • Sort constructor declarations before method declarations at lib/redux/state.g.dart:105:3 • sort_constructors_first lint • Avoid returning this from methods just to enable a fluent interface at lib/redux/state.g.dart:107:23 • avoid_returning_this lint • Avoid using `as` at lib/redux/state.g.dart:122:11 • avoid_as 6 issues found. (Ran in 11.1s) ``` ## Flutter Doctor ``` flutter doctor [✓] Flutter (on Mac OS X 10.12.6 16G29, locale en-RU, channel master) • Flutter at /Users/herman/Projects/github/flutter • Framework revision f1a23e263c (3 hours ago), 2017-08-29 14:58:31 +0200 • Engine revision e5395796cd • Tools Dart version 1.25.0-dev.11.0 [✓] Android toolchain - develop for Android devices (Android SDK 26.0.0) • Android SDK at /Users/herman/Library/Android/sdk • Platform android-26, build-tools 26.0.0 • ANDROID_HOME = /Users/herman/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06) [✓] iOS toolchain - develop for iOS devices (Xcode 8.3.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 8.3.3, Build version 8E3004b • ios-deploy 1.9.1 • CocoaPods version 1.2.1 [✓] Android Studio (version 2.3) • Android Studio at /Applications/Android Studio.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06) [✓] IntelliJ IDEA Ultimate Edition (version 2017.2.2) • Flutter plugin version 16.0 • Dart plugin version 172.3757.55 [✓] Connected devices • None ```
platform-ios,tool,platform-mac,P2,a: plugins,team-ios,triaged-ios
low
Critical
253,791,111
vscode
[folding] Automatic function/method folding
Please consider automatic function folding, based on the current cursor location. I think it can be a great way to help developers maintain a high level mental map of source files and ease navigation between functions/methods. While it builds on existing building blocks already present in many code editors (block folding, tracking language specific scopes, ...) it may also be a novel approach (I'm not aware of any existing implementation) The core idea is to edit source code with all functions folded by default, and expand the "current" function when the cursor enters it, then fold it back when the cursor leaves the function region. Explicit pins can allow developers to keep key functions expanded. [Full description of the proposal](https://docs.google.com/document/d/13L_xmx64E-2Y8lHRX7wzJOXVteVMTApeUhcF4RSKU-w/edit?usp=sharing)
feature-request,editor-folding
medium
Critical
253,835,473
angular
Can we hope to have this common animation scenario solved in version 5 ?
<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION. ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. --> ## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [X] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior <!-- Describe how the issue manifests. --> The animation and the router are and have been under intensive work (thank you for the hard work you guys put in every day) This issue [4.3.3 Animation common scenario problem with child route](https://github.com/angular/angular/issues/18597) Have been going on for a while, As its a common case of RouteReuseStrategy, in Child route and here are some quotes on the issue: @mlc-mlapis > Maybe it would be a good idea to add this case explicitly to angular.io docs because I suppose many similar questions in future. @matsko > Unfortunately there's another animation bug (PR = #17777) that's causing a bug for this to happen. I'll update this plnkr once that goes in,. As we still don't know how to get the animation to work in the common scenario I wonder if you guys could have a solution for the problem in version 5 ? ## Expected behavior <!-- Describe what the desired behavior would be. --> Working animation with RouteReuseStrategy, in Child route in version 5 ## Minimal reproduction of the problem with instructions http://plnkr.co/edit/FndYfmeUzt8frkiK6nHH?p=preview ## What is the motivation / use case for changing the behavior? <!-- Describe the motivation or the concrete use case. --> Working animation with RouteReuseStrategy, in Child route in version 5 would be great **Please tell us about your environment:** <!-- Operating system, IDE, package manager, HTTP server, ... --> os: linux x64 * **Angular version:** 2.0.X <!-- Check whether this is still an issue in the most recent Angular version --> @angular/cli: 1.1.1 @angular/animations: 4.3.3 @angular/common: 4.3.3 @angular/compiler: 4.3.3 @angular/core: 4.3.3 @angular/flex-layout: 2.0.0-rc.1 @angular/forms: 4.3.3 @angular/http: 4.3.3 @angular/material: 2.0.0-beta.6 @angular/platform-browser: 4.3.3 @angular/platform-browser-dynamic: 4.3.3 @angular/router: 4.3.3 @angular/cli: 1.1.1 @angular/compiler-cli: 4.3.3 @angular/language-service: 2.4.10 * **Browser:** [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] <!-- All browsers where this could be reproduced --> Chrome * **Language:** [all | TypeScript X.X | ES6/7 | ES5] TypeScript X.X * **Node (for AoT issues):** `node --version` = node: 7.0.0
type: bug/fix,area: animations,freq2: medium,P4
low
Critical
253,855,648
neovim
CTRL-L of popupmenu-keys is broken for complete() function
<!-- Before reporting: search existing issues and check the FAQ. --> - `nvim --version`: ``` NVIM v0.2.0 Build type: Release Compilation: /usr/lib/ccache/bin/cc -specs=/void-packages/common/environment/configure/gccspecs/hardened-cc1 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe -g -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -O2 -DNDEBUG -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/builddir/neovim-0.2.0/build/config -I/builddir/neovim-0.2.0/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/builddir/neovim-0.2.0/build/src/nvim/auto -I/builddir/neovim-0.2.0/build/include Compiled by void-buildslave@build Optional features included (+) or not (-): +acl +iconv -jemalloc +tui For differences from Vim, see :help vim-differences system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim" ``` - Vim (version: ) behaves differently? Vim has the same behavior. - Operating system/version: void-linux ``` uname -a Linux roxma-void-usb 4.12.9_1 #1 SMP PREEMPT Fri Aug 25 08:49:12 UTC 2017 x86_64 GNU/Linux ``` - Terminal name/version: - `$TERM`: xterm-256color ### minimal vimrc ```vim filetype plugin indent on set encoding=utf-8 fileencodings=ucs-bom,utf-8,gbk,gb18030,latin1 termencoding=utf-8 set completeopt=menu,menuone,noinsert,noselect func Foo() call complete(1, ['ffffoo']) return "" endfunc imap <silent> . <c-r>=Foo()<CR> ``` ### Actual behaviour ![ctrl-l](https://user-images.githubusercontent.com/4538941/29851885-4f1fef58-8d69-11e7-8db0-53ac3bda85ae.gif) ### Expected behaviour omnifunc version: ```vim filetype plugin indent on set encoding=utf-8 fileencodings=ucs-bom,utf-8,gbk,gb18030,latin1 termencoding=utf-8 set completeopt=menu,menuone,noinsert,noselect func Foo(findstart, base) if a:findstart return 0 endif return ["ffffoo"] endfunc set omnifunc=Foo ``` ![omni](https://user-images.githubusercontent.com/4538941/29851963-d56e4ca8-8d69-11e7-97ab-6dba0bf3615c.gif) ### Related issue https://github.com/roxma/nvim-completion-manager/issues/127
bug-vim,needs:vim-patch
low
Critical
253,868,040
pytorch
Add a hash function for tensor data
Hi, I'm looking at the `def __hash__()` method defined in Tensor base class. That function builds off on python's `id()` method, which runs on CPU right? Is there a way to hash a tensor on GPU and use the hashed value as index to store this Tensor?
triaged,function request
low
Major
253,996,319
youtube-dl
Youtube download fails with: unable to download video data: HTTP Error 401: Unauthorized
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.08.27.1** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ``` youtube-dl.exe -v -f best/mp4 I_tNvkNlNoI [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', '-f', 'best/mp4', 'I_tNvkNlNoI'] [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252 [debug] youtube-dl version 2017.08.27.1 [debug] Python version 3.4.4 - Windows-10-10.0.14393 [debug] exe versions: ffmpeg 2.8.4, ffprobe N-78843-g1c7e2cf [debug] Proxy map: {} [youtube] I_tNvkNlNoI: Downloading webpage [youtube] I_tNvkNlNoI: Downloading video info webpage [youtube] I_tNvkNlNoI: Extracting video information WARNING: unable to extract uploader nickname [youtube] I_tNvkNlNoI: Downloading MPD manifest [debug] Invoking downloader on 'https://r3---sn-oapm-guhl.googlevideo.com/videoplayback?ipbits=0&clen=3503353&initcwndbps=1107500&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpcm2cms%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&pcm2cms=yes&mime=video%2Fwebm&mn=sn-oapm-guhl&mm=31&id=o-AEGU2DyQotB8SiZHfvs78KavWiT9ke2CcK05EqiQb60K&ip=REMOVEDMANUALLY&pl=17&mv=m&mt=1504098431&ms=au&ei=A7mmWcXNEJWx1gLKqKGQBw&ratebypass=yes&expire=1504120163&itag=43&signature=5786DEC040D53FDD8C5E2A4DDFBF8FD76052BE7D.B4781090104746316361D6B6F53939A55C07D7F3&key=yt6&gir=yes&requiressl=yes&dur=0.000&source=youtube&lmt=1299963847443446' ERROR: unable to download video data: HTTP Error 401: Unauthorized Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_2hklmx2\build\youtube_dl\YoutubeDL.py", line 1865, in process_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_2hklmx2\build\youtube_dl\YoutubeDL.py", line 1807, in dl File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_2hklmx2\build\youtube_dl\downloader\common.py", line 361, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_2hklmx2\build\youtube_dl\downloader\http.py", line 286, in real_download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_2hklmx2\build\youtube_dl\downloader\http.py", line 74, in establish_connection File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_2hklmx2\build\youtube_dl\YoutubeDL.py", line 2168, in urlopen File "C:\Python\Python34\lib\urllib\request.py", line 470, in open File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response File "C:\Python\Python34\lib\urllib\request.py", line 508, in error File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default urllib.error.HTTPError: HTTP Error 401: Unauthorized ``` --- ### Description of your *issue*, suggested solution and other information The given video https://www.youtube.com/watch?v=I_tNvkNlNoI cannot be downloaded when the option '-f best/mp4' is given. Just downloading the video with ``youtube-dl I_tNvkNlNoI`` is no problem. It appears to has something to do with the format nr 160: ``` youtube-dl -F I_tNvkNlNoI [youtube] I_tNvkNlNoI: Downloading webpage [youtube] I_tNvkNlNoI: Downloading video info webpage [youtube] I_tNvkNlNoI: Extracting video information [youtube] I_tNvkNlNoI: Downloading MPD manifest [info] Available formats for I_tNvkNlNoI: format code extension resolution note 139 m4a audio only DASH audio 48k , m4a_dash container, mp4a.40.5@ 48k (22050Hz), 356.06KiB 249 webm audio only DASH audio 52k , opus @ 50k, 371.85KiB 250 webm audio only DASH audio 63k , opus @ 70k, 441.94KiB 171 webm audio only DASH audio 89k , vorbis@128k, 658.89KiB 140 m4a audio only DASH audio 127k , m4a_dash container, mp4a.40.2@128k (44100Hz), 948.22KiB 251 webm audio only DASH audio 167k , opus @160k, 1.18MiB 278 webm 192x144 144p 99k , webm container, vp9, 15fps, video only, 627.50KiB 160 mp4 192x144 DASH video 113k , avc1.42c00c, 15fps, video only, 834.93KiB 133 mp4 320x240 DASH video 248k , avc1.4d400d, 30fps, video only, 1.78MiB 242 webm 320x240 240p 268k , vp9, 30fps, video only, 1.52MiB 17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k 18 mp4 320x240 medium , avc1.42001E, mp4a.40.2@ 96k 43 webm 640x360 medium , vp8.0, vorbis@128k (best) ``` ``` youtube-dl -f 160 I_tNvkNlNoI [youtube] I_tNvkNlNoI: Downloading webpage [youtube] I_tNvkNlNoI: Downloading video info webpage [youtube] I_tNvkNlNoI: Extracting video information [youtube] I_tNvkNlNoI: Downloading MPD manifest ERROR: unable to download video data: HTTP Error 401: Unauthorized ``` I've tested this on 2 different PC's. One Linux, one windows 10. Both with different IP addresses and location. I suspect it has something to do with the mp4 not being available at youtube. ### Possible solution Some fallback to other formats (as the 133 or 18 format in this case which do work) when an automatically selected format (by using the best/mp4 option) does not work. Furthermore the format nr 133 appears to be the best option, but 160 is selected automatically. Why?
cant-reproduce
low
Critical
254,000,780
go
x/text/secure/bidirule: label starting with EN UTF8 property should be invalid
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? go version go1.9 darwin/amd64 ### Does this issue reproduce with the latest release? yes ### What operating system and processor architecture are you using (`go env`)? GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/mgalkowski/work/go" GORACE="" GOROOT="/usr/local/Cellar/go/1.9/libexec" GOTOOLDIR="/usr/local/Cellar/go/1.9/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/cs/93b4_xbx4l5gn1wx0f69p3d40000gn/T/go-build033566806=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" 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" ### What did you do? If possible, provide a recipe for reproducing the error. A complete runnable program is good. ``` package main import ( "fmt" "golang.org/x/text/secure/bidirule" ) func main() { var invalidLabel = "0aaaa" var invalidLabelEscaped = "\u0030aaaaa" fmt.Println(bidirule.ValidString(invalidLabel)) fmt.Println(bidirule.ValidString(invalidLabelEscaped)) } ``` ### What did you expect to see? ``` false false ``` ### What did you see instead? ``` true true ``` According to RFC 5893: ``` The first character must be a character with Bidi property L, R, or AL. If it has the R or AL property, it is an RTL label; if it has the L property, it is an LTR label. ``` 0 (\u0030) have EN (european number) property, to it is not allowed at the beginning of the label. This package is not conformant with the BIDI RFC.
NeedsInvestigation
low
Critical
254,009,072
go
runtime: Reducing theoretical heap fragmentation
It is possible that after one or more GC cycles a span may contain only a single allocated object. After the program makes a phase change that size object may become unpopular and there is no need to allocate in that span again. This would be detectable after several GCs cycles as a span that has not been allocated in. It would be really nice if we could move that object and use that span for a different size class. That approach is often touted as an advantage of a moving collector. It is important to point out that this is merely a theoretical problem and currently there is no indication of it in the wild in an important application. Someday if it becomes a problem this issue offers a possible solution. The perhaps novel idea is that we morph the span into a span with a larger size class according to the needs of the new phase. The single allocated object remains where it is but the garbage collector treats it as a larger sized object based on the span's new class size. There will be (new_size - old_size) fragmentation for that single object but that seems a small price to pay. The rest of the span would be used to allocate objects of the new popular size. Not only would this work for a single object but for any sparsely populated span where sparsely is determined by some TBD heuristic. What if the original object straddled two of the new size class' objects? This could be easily avoided by selecting some other size class. But assuming we didn't want this restriction. If there is space both before and after the object in the new size class simply put a pointer in those free slots to the other part of the object and adjust the GC pointer map. The result would be that the GC would never free the object until both halves were no longer live.
GarbageCollector
low
Minor
254,009,912
flutter
`flutter devices` doesn't properly list emulator names
## Steps to Reproduce 1. Create and name some AVDs in the Android Virtual Device Manager 1. Run `flutter devices` => list shows the wrong names of the AVDs ![screen shot 2017-08-30 at 16 00 09](https://user-images.githubusercontent.com/13644170/29876173-525c2d16-8d9c-11e7-99db-514a8908ff9f.png) ``` mit-macbookpro2:battery mit$ flutter devices 2 connected devices: Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 7.1.1 (API 25) (emulator) iPhone 5s • 603DCE1D-B3A5-48CD-A309-1C45ED7AC3CF • ios • iOS 10.3 (simulator) ```
platform-android,tool,customer: crowd,P3,team-android,triaged-android
medium
Major
254,038,499
pytorch
ImportError: dlopen: cannot load any more object with static TLS
As reported by @jfsantos A simple `import torch` gives the error: ``` ImportError: dlopen: cannot load any more object with static TLS ``` # Analysis of the issue glibc has a table called the DTV. There is a slot for every dlopen'd library with TLS. Its use is not important for this discussion. The DTV is resizable. However, in older versions of glibc, adding a library with static TLS will not resize the DTV, but do a conservative check that amounts to "have a I loaded more than 14 libraries with TLS". You can observe this empirically by dlopen'ing a bunch of libraries and then querying their DTV number using dlinfo(handle, RTLD_DI_TLS_MODID, &modid). What you will find is that you only get a DTV entry if you contain thread local state. Libraries with zero thread local state do not contribute to the DTV. That's why https://github.com/pytorch/pytorch/pull/24911 failed to fix anything, because reducing the amount of thread-local storage is irrelevant. That's also why changing import order can fix things, because if you change it in a way that loads all your "static TLS" libraries first, then future "dynamic TLS" libraries will resize the DTV like normal It seems this issue was fixed by a [glibc patch](https://sourceware.org/git/?p=glibc.git;a=commit;h=f8aeae347377f3dfa8cbadde057adf1827fb1d44) in 2014, which eliminates this check and lazily updates the DTV. Some addenda: * Thing that is confusing: "static" refers to the [TLS access model](https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter8-20.html), not the static storage specifier in C/C++. So the existence of static thread_local variables is not directly relevant to the issue. As far as I know, no shared library that PyTorch creates uses static TLS (this can be verified by doing readelf -d foo.so | grep STATIC_TLS). However, conda libgomp has static tls. Proof: ``` root@7d1c5be3f092:/remote/subbtest# readelf -a -W /opt/conda/lib/libgomp.so | grep TLS I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown) TLS 0x02ad38 0x000000000002bd38 0x000000000002bd38 0x000000 0x000078 R 0x8 0x000000000000001e (FLAGS) STATIC_TLS We link against this libgomp in our conda builds. Therefore the problem. ``` A more direct way to solve the problem, besides reordering imports, is just to `LD_PRELOAD=/opt/conda/lib/libgomp.so` before your program. A few takeaways from this: 1. As long as PyTorch has a dependency on libgomp.so with static TLS, there is literally nothing we can do if some of our users decide to import a bunch of third-party libraries that have dynamic TLS, without importing libgomp. They'll gobble up all of the DTV space and libgomp will fail. Note that we exacerbate the problem by depending on libraries ourselves which have dynamic TLS, so that the ceiling is lower, but if the user imports enough libraries they will hit this problem, no matter how much or little TLS we use. 2. Reiterating what suo said above, reducing use of TLS in PyTorch has no effect on this problem. There is no reason to reduce the amount of TLS you have in your program. Go wild with thread local. (The only marginal benefit is if you manage to eliminate ALL TLS. Which ain't happening.) 3. Importing something that gets libgomp early enough should be the recommended workaround. We should use this to fix our CI, and we should detect this error and give our users an error message to this effect too. I'm not sure if there is a way to conveniently load libgomp from Python in Conda. One additional takeaway: this issue was fixed by a 2014 [glibc patch](https://sourceware.org/git/?p=glibc.git;a=commit;h=f8aeae347377f3dfa8cbadde057adf1827fb1d44). This patch is in the glibc distributed with Xenial. Trusty is considered unsupported by Ubuntu (the LTS commitment expired in April of this year). We are also removing trusty from our CI (cc @jamesr66a). So if you want this problem to really really (tm) go away, upgrading your linux is another path.
module: crash,module: build,triaged,module: assert failure,has workaround
high
Critical
254,040,558
pytorch
CUDA multinomial is limited to 2^24 categories
As reported by @Moustapha6C. The following fails, because there are too many categories: ```python x = torch.randn(9000 * 5000).cuda().abs() out = torch.multinomial(x, 10, replacement=True) ``` cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @ngimel @fritzo @neerajprad @alicanb @vishwakftw @nikitaved @vincentqb
high priority,module: distributions,module: cuda,triaged,module: 64-bit,function request
low
Major
254,106,964
TypeScript
Merging constants with namespaces
I wrote this in closed #13536 first, but thought it might get lost there, so filing a new issue. Merging `const`s with namespaces really makes sense. For a real-world example, let's take a popular library: [TinyMCE](https://www.tinymce.com/), writing proper type definitions for which requires this feature. Namespaces are really convenient in this case because all the classes from the [API](https://www.tinymce.com/docs/api/) are attached to the `tinymce` namespace object or to its subnamespaces. In the API, there are normal classes like `tinymce.Editor` and so called 'static classes' like `tinymce.EditorManager` which are just a type (interface) plus an object value of this type attached to the namespace: ```ts declare namespace tinymce { // normal class class Editor { show(): void; // ... } // "static class" interface EditorManager { activeEditor: Editor; // ... } const EditorManager: EditorManager; // ... } ``` Nothing unusual so far, but there is a plot twist. The namespace object `tinymce` itself implements the `tinymce.EditorManager` interface. It could be easily and beautifully solved by merging a `const` with the namespace: ```ts declare const tinymce: tinymce.EditorManager; declare namespace tinymce { // ... see the previous snippet } ``` But unfortunately this isn't allowed. The error message is: `Cannot redeclare block-scoped variable 'tinymce'.`
Suggestion,In Discussion
medium
Critical
254,172,508
flutter
Add more information to the animation library's landing page
There are widgets for building animations outside of the animation library, e.g., all the *Transition widgets in the Widget library. Can we link to them from the animation library's landing page: https://docs.flutter.io/flutter/animation/animation-library.html? Ideally, it could be useful to draw a diagram linking key classes related to building animations, including those dealing with simulations. @Hixie @Sfshaza
framework,a: animation,d: api docs,c: proposal,P3,team-framework,triaged-framework
low
Minor
254,180,079
opencv
Documentation improvement plan
i have a request and a suggestion about [Documentation improvement plan](https://github.com/opencv/opencv/wiki/Documentation-improvement-plan) i already made some contributions related to documentation and i want to keep working on it. I want to work according a right plan so if some tasks that users can do are identified clearly i will choose a task and work on it. after completing a task choose another and so on. my suggestion is gathering feedbacks from users in documentation pages for example see [msdn.microsoft.com](https://msdn.microsoft.com/en-us/library/windows/desktop/ms632679(v=vs.85).aspx) there is "Is this page helpful? Yes No"
feature,category: documentation
low
Major
254,218,976
go
go/types: doesn't understands constants defined in cgo code
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? go version go1.9 linux/amd64 ### Does this issue reproduce with the latest release? Yes, fails with `git tip` as well. ### What operating system and processor architecture are you using (`go env`)? ``` GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/travis/gopath" GORACE="" GOROOT="/home/travis/.gimme/versions/go1.9.linux.amd64" GOTOOLDIR="/home/travis/.gimme/versions/go1.9.linux.amd64/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build036482233=/tmp/go-build -gno-record-gcc-switches" 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" ``` ### What did you do? 100% reproducible. Travis link: https://travis-ci.org/purpleidea/mgmt/jobs/270103895#L969 (errors are on the subsequent lines) ### What did you expect to see? No failures or a clear reason about what's wrong. ### What did you see instead? gotype fails where it didn't fail in golang 1.8 it would be great to report this as a false positive or to understand what changed between 1.8 and 1.9 that this is an issue. Thanks! James
NeedsInvestigation
low
Critical
254,329,385
vscode
Option to allow quickSuggestions inside words
quickSuggestions do not show up when typing in the middle of a word. It would be great if that could be configured by the language (or even the user). Languages with completion proposals that do not only insert but also replace the end of the symbol, can then enable this setting.
feature-request,suggest,editor-core
low
Minor
254,339,249
vue
Provide/inject for custom directives
### What problem does this feature solve? If a user uses a custom directive in their app in multiple places they might need to configure the directive in two or more different ways depending on the area of the app in which the directive is being used. If this configuration is used in many instances in one of these areas, providing this configuration on every instance becomes redundant and cumbersome. ### What does the proposed API look like? I think the provide/inject pattern would be a good solution to this. A user could add different configurations in the top level provider components and use the custom directive normally in their descendants. ```js var Provider = { provide: { foo: 'bar' }, // ... } var OtherProvider = { provide: { foo: 'baz' }, // ... } Vue.directive('bar', { inject: ['foo'], bind (el, binding) { // binding.injections.foo or binding.foo } }) ``` ```html <provider><div v-bar="something"></div></provider> <other-provider><div v-bar="somethingElse"></div></other-provider> ``` I'm not confident on what the best place is for the actual injections to live in the directive hook arguments but there are some ideas in the code example above. <!-- generated by vue-issues. DO NOT REMOVE -->
feature request
medium
Critical
254,396,313
opencv
test_video: OCL_Video/PyrLKOpticalFlow.Mat sporadic failures
Nightly Linux builds: - [20170827](http://pullrequest.opencv.org/buildbot/builders/master-lin64/builds/10204) - [20170828](http://pullrequest.opencv.org/buildbot/builders/master-lin64/builds/10205) - [20170829](http://pullrequest.opencv.org/buildbot/builders/master-lin64/builds/10206) [Precommit builds](http://pullrequest.opencv.org/buildbot/builders/precommit_opencl_linux?numbuilds=250) Message: ``` [----------] 8 tests from OCL_Video/PyrLKOpticalFlow [ RUN ] OCL_Video/PyrLKOpticalFlow.Mat/0 [ OK ] OCL_Video/PyrLKOpticalFlow.Mat/0 (1173 ms) [ RUN ] OCL_Video/PyrLKOpticalFlow.Mat/1 [ OK ] OCL_Video/PyrLKOpticalFlow.Mat/1 (39 ms) [ RUN ] OCL_Video/PyrLKOpticalFlow.Mat/2 [ OK ] OCL_Video/PyrLKOpticalFlow.Mat/2 (37 ms) [ RUN ] OCL_Video/PyrLKOpticalFlow.Mat/3 *** longjmp causes uninitialized stack frame ***: /build/precommit_opencl_linux/build/bin/opencv_test_video terminated ```
bug,category: video,category: ocl
low
Critical
254,450,682
opencv
DNN_TARGET_OPENCL produces wrong output on multiple forward passes
##### System information (version) - OpenCV => 3.3.0 - Operating System / Platform => <b>Windows 64 Bit</b> - Compiler => Visual Studio 2015 ##### Detailed description When I have tested Halide backend for dnn module along with opencl dnn target I have got an issue. After the first forward pass through the network (when, as tutorial says, runtime compilation of Halide pipelines takes a place) all calculations results are "freeze". "Freze" in a sense that no matter what data you forward to the network, it produces same output again and again. As same code without net.setPreferableTarget(cv::dnn::DNN_TARGET_OPENCL) works well the problem seems to be in Halide pipeline. ##### Steps to reproduce Tutorial [example](http://docs.opencv.org/trunk/de/d37/tutorial_dnn_halide.html) can be used to reproduce. Just add net.setPreferableTarget(cv::dnn::DNN_TARGET_OPENCL) and the second input image and pass it through the network after first image pass.
bug,category: dnn
low
Minor
254,468,776
TypeScript
Problem with destructuring + default values in the implementation of an inherited signature
**TypeScript Version:** 2.4.2, 2.5.2, 2.6.0-dev.20170831 Suppose I have a library which exports the following code ```ts export interface Vector { x: number y: number } export interface Foo { foo(vector?: Vector): void; } export class Bar implements Foo { foo({ x, y }: Vector = { x: 3, y: 19 }): void { // ... } } ``` The generated `.d.ts` file will look like ```ts export interface Vector { x: number; y: number } export interface Foo { foo(vector?: Vector): void; } export declare class Bar implements Foo { foo({x, y}?: Vector): void; } ``` Now if I try to use this library in downstream code it will complain, ``` 9 foo({x, y}?: Vector): void; ~ example/lib/index.d.ts(9,10): error TS2459: Type 'Vector | undefined' has no property 'x' and no string index signature. 9 foo({x, y}?: Vector): void; ~ example/lib/index.d.ts(9,13): error TS2459: Type 'Vector | undefined' has no property 'y' and no string index signature. ``` What's interesting is that the problem only occurs when overriding a method in a parent type, so if the signature is just ```ts export declare class Bar /* no longer extends Foo */ { foo({x, y}?: Vector): void; } ``` then the consuming code is perfectly happy.
Bug
low
Critical
254,494,848
rust
Re-enable detection of unused library #![feature] directives
Currently the compiler will warn users about unused `#![feature]` directives if they're (a) a library feature and (b) not actually ever used. The compiler doesn't currently warn you about unused `#![feature]` directives tied to language features. In the process of making the stability annotations more incremental-friendly (https://github.com/rust-lang/rust/issues/44137) this check in the compiler has proven to be very difficult to make incremental. Namely what's happening here is: * There's a function, [`check_stability`](https://github.com/rust-lang/rust/blob/97b01abf3d222523d0db4f79c13ed45e7fef27e3/src/librustc/middle/stability.rs#L492), which is used to verify that an API can actually be used. * In this function if the API in question is unstable *and* the feature is activated, then [this feature name is stored off in a side table](https://github.com/rust-lang/rust/blob/97b01abf3d222523d0db4f79c13ed45e7fef27e3/src/librustc/middle/stability.rs#L551). * As we run through the compiler this side table gets bigger and bigger. Right now this table is mostly built up during typeck. (I don't know the precise reason as to why it's in typeck, personally) * Finally near the end of compilation we go through this table and use it to warn about unused `#![feature]` directives. This "put things in a table on the side" behavior isn't very incremental friently and isn't too easy to transition over to the query system. For now this specific warning seems like it probably isn't that important at Rust 1.20.0 (while it was probably very important at Rust 1.0.0). I'm going to comment this out for now so we're not going to get lints/warnings about unused library features. This is a FIXME to track re-enabling this warning!
A-lints,P-medium,T-lang,T-compiler,C-bug
low
Major
254,497,937
flutter
Move the microbenchmarks to release mode rather than profile mode
cc @yjbanov Based on suggestion in https://github.com/dart-lang/sdk/issues/30521
a: tests,team,framework,c: performance,dependency: dart,P3,team-framework,triaged-framework
low
Minor
254,505,008
TypeScript
exported definitions for mix-in lack proper return type for functions returning "this"
<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.4.2 **Code** *Module 1* ``` export function IdentityMixin<T extends Constructor<{}>>(Base : T) { return class extends Base { identity() { return this; } }; } class Foo {} class IdFoo extends IdentityMixin(Foo) {} const id = new IdFoo(); const same = id.identity(); ``` *Module 2* ``` import { IdentityMixin } from 'module1'; class Foo {} class IdFoo extends IdentityMixin(Foo) {} const id = new IdFoo(); const same = id.identity(); ``` **Expected behavior:** In Module 1 both `id` and `same` have type `IdFoo`. In Module 2 both `id` and `same` have type `IdFoo`. **Actual behavior:** In Module 2 both `same` has type `any`.
Bug
low
Critical
254,510,926
rust
Global allocator symbols aren't dllexport on MSVC
But they need to be for the `dylib` crate type! (and only the `dylib` crate type). Not really a critical bug, but I'm tagging this with a FIXME in the code.
A-linkage,T-compiler,O-windows-msvc,C-bug
low
Critical
254,604,533
TypeScript
Cannot implement generic type guarding function
<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.5.2 **Code** ``` interface ITypeChecker { isOfType<T extends TBase, TBase>(obj: TBase): obj is T; } class Checker implements ITypeChecker { isOfType<T extends TBase, TBase>(obj: TBase): obj is T { return true; } } ``` **Expected behavior:** Class _Checker_ should be treated as a valid implementation (used to be in Ts-2.3). **Actual behavior:** Compiler complains: - interface-not-properly-implemented (...) - **Type predicate 'value is TBase' is not assignable to 'value is T'** - **Type 'TBase' is not assignable to type 'T'**
Bug
low
Critical
254,644,782
angular
Dynamically created view force a parent view update
<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION. ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. --> ## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior <!-- Describe how the issue manifests. --> We have the follows markup: ```HTML <container-component> <inner-component></inner-component> ...... <ng-template> <container-component> <inner-component></inner-component> ...... </container-component> </ng-template> </container-component> ``` We dynamically creating an embedded view from the template in `container-component`. Unexpected recursive call occurrence in injected `ContentChildren` property setter when we creating an embedded view from the template. The issue happens when the count of the `inner-component` reach to 30 (can be less in other scenarios). Removing one of them from markup breaks the recursive calls. ## Minimal reproduction of the problem with instructions Plunker: https://plnkr.co/edit/fffU9ql03j7nmmj5lzPg?p=preview ## What is the motivation / use case for changing the behavior? <!-- Describe the motivation or the concrete use case. --> We are creating an embedded view using the template for rendering a widget content. This issue breaking this functionality. ## Environment <pre><code> Angular version: 4.3.6 <!-- Check whether this is still an issue in the most recent Angular version --> Browser: I'm reproduced it in latest Chrome (desktop), Firefox, IE and Edge </code></pre>
type: bug/fix,freq2: medium,area: core,core: change detection,P3
low
Critical
254,645,223
opencv
V4L2: 1280p@30fps not available by default any more
after the merge of #9479, 1280p@30fps is no longer available by default. One is now required to do: ```py cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc(*"MJPG")) ``` to be able to select this mode. Used camera Logitech C615. `v4l2-ctl --list-formats-ext`: ``` ioctl: VIDIOC_ENUM_FMT Index : 0 Type : Video Capture Pixel Format: 'YUYV' Name : YUYV 4:2:2 (...) Size: Discrete 1280x720 Interval: Discrete 0.100s (10.000 fps) Interval: Discrete 0.133s (7.500 fps) Interval: Discrete 0.200s (5.000 fps) (...) Index : 1 Type : Video Capture Pixel Format: 'MJPG' (compressed) Name : Motion-JPEG (...) Size: Discrete 1280x720 Interval: Discrete 0.033s (30.000 fps) Interval: Discrete 0.042s (24.000 fps) Interval: Discrete 0.050s (20.000 fps) Interval: Discrete 0.067s (15.000 fps) Interval: Discrete 0.100s (10.000 fps) Interval: Discrete 0.133s (7.500 fps) Interval: Discrete 0.200s (5.000 fps) ```
category: videoio(camera),future
low
Minor
254,652,925
go
runtime: improve "sweep increased allocation count" diagnostics
The infamous "sweep increased allocation count" panic is not very informative. What it really means is that a free object was found to be live. It should say that, and it should say which object it is and dump its contents. Essentially, it can cheaply give half of the information that gccheckmark can. This half may even be enough to debug the problem from a core dump and a heap graph. The comments around the panic should give additional context (not worth printing), like saying that common causes are bad liveness maps, past-the-end pointers, unsafe conversions from pointers to integers and back to pointers, and just plain wild pointers. The comments should suggest running with GODEBUG=gccheckmark=1 to find the source of bad pointer. /cc @RLH @randall77
NeedsFix,compiler/runtime
low
Critical
254,654,146
go
runtime: add mode for pointer-past-end testing
Over time, we've had several issues involving unsafe code constructing pointers just past the end of objects, particularly in runtime and reflect. Some examples are #21717, #19724, and #9384. These sorts of issues are very hard to write tests for. We should consider adding a testing mode to aid with this. One approach would be for the allocator to skip every other slot and to right-align all allocations (up to alignment limits), so that past-the-end pointers would always fall on a free slot. This mode could be exposed via a GODEBUG, though for testing it should probably be adjustable at run time, perhaps via unexported runtime functions. /cc @RLH @cherrymui @bcmills
NeedsFix,compiler/runtime
low
Critical
254,667,928
kubernetes
Minimize impact of kubelet stats collection
**Is this a BUG REPORT or FEATURE REQUEST?**: /kind feature Today, the kubelet runs cAdvisor to collect node, pod, and container usage stats. The goal discussed in sig-node has been to split usage stat collection responsibilities as follows: * kubelet collects node and pod usage stats * container runtimes collect container usage stats The kubelet recently added support for the CRI to optionally handle container usage stats. In production systems, if stats are sourced from different sources, operators are paying a performance impact by having to source the stats twice (i.e. cAdvisor collects all of it, and container runtimes collect it again). As an operator of a large cluster with dense nodes, this impact is significant. cAdvisor itself often is the dominant user of CPU on these systems, so running an alternative stat collection agent for the same data makes no sense. The following issues must be mitigated if the long term goal is to be met: * kubelet must only collect the stats it cares about * collection interval skew between node/pod level stats and the runtime must be mitigated
area/kubelet,sig/node,kind/feature,priority/important-longterm,lifecycle/frozen,needs-triage
medium
Critical
254,741,314
kubernetes
Rethink quota system
Problems with current quota system: * #51476 - invalid objects still consume quota * #51749 - uninitialized objects still consume quota * no way for user-supplied apis to interact with the quota system * replenishment is slow * doesn't track object size (unless this has been fixed?) I'd like to see a quota system that: * Can track user-defined quotas for aggregated APIs * Can track/prevent uninitialized object count and size * Can track regular object count and size * Doesn't need multiple interactions w/ etcd during the object initialization phase * initializer/webhook based rather than compiled-in
sig/api-machinery,lifecycle/frozen
low
Major
254,746,000
go
cmd/compile: avoid slow versions of LEA instructions on x86
On newer x86 cpus (amd and intel) 3 operand LEA instructions with base, index and offset have a higher latency and less throughput than 2 operand LEA instructions. The compiler when emitting the instructions could rewrite slow leas into e.g. LEA + ADD instructions where possible (flag clobbering ok) similar how MOV $0 R is rewritten to XOR R R. ``` Intel® 64 and IA-32 Architectures Optimization Reference Manual 3.5.1.3 Using LEA For LEA instructions with three source operands and some specific situations, instruction latency has increased to 3 cycles, and must dispatch via port 1: — LEA that has all three source operands: base, index, and offset. — LEA that uses base and index registers where the base is EBP, RBP, or R13. ... ``` relevant llvm optimization ticket: https://reviews.llvm.org/D32277 /cc @TocarIP @randall77 @josharian
Performance,NeedsFix,early-in-cycle
medium
Major
254,779,027
go
spec: clarify rule 3 for selector expressions
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? go version go1.9 linux/amd64 ### Does this issue reproduce with the latest release? yes ### What did you do? ```golang package main type T struct { x int } type P *T type PP *P func main() { var t T var p P = &t var pp PP = &p t.x = 123 // ok (*p).x = 123 // ok p.x = 123 // ok (*pp).x = 123 // ok pp.x = 123 // not ok } ``` ### What did you expect to see? compile okay. Go spec says > As an exception, if the type of x is a named pointer type and (*x).f is a valid selector expression denoting a field (but not a method), x.f is shorthand for (*x).f. so as `(*pp).x` is valid, `pp.x` should be also valid. ### What did you see instead? compile failed
Documentation,NeedsFix
low
Critical
254,793,150
opencv
lack of information of the Visual Studio 2017
##### System information (version) - OpenCV => 3.3 - Operating System / Platform => windows 10(64 bit) - Compiler => none ##### Detailed description Information on visual studio on the page for windows users is stopped at VS2015. Specifically, you can see the lack of information in VS2017 in the command column under http://docs.opencv.org/master/d3/d52/tutorial_windows_install.html#tutorial_windows_install_path . It is helpful to add the information of VS2017 if you can write it. [I use google transrate]
feature,category: documentation
low
Minor
254,793,253
opencv
'OpenCV_Install_Directory.png' in 'Installation in Windows' page is old
##### System information (version) - OpenCV => 3.3 - Operating System / Platform => Windows 10(64 Bit) ##### Detailed description Since I want to use OpenCV 3.3 on Windows 10, I saw http://docs.opencv.org/master/d3/d52/tutorial_windows_install.html#tutorial_windows_install_path . However, since 'OpenCV_Install_Directory.png' is of OpenCV 2.3, I was worried because I did not understand that what I downloaded is different and contents downloaded are correct. If the content of the downloaded file has changed, please update the image. Or add an image of the latest case. That way, I am glad. [I use google transrate]
feature,category: documentation
low
Minor
254,820,802
go
regexp: Scan the input string backward for patterns ending in $
As [suggested](https://github.com/golang/go/issues/21463#issuecomment-326151555) by @rsc: > It seems clear that we should handle patterns ending in $, like `\.(jpe?g|gif)$`, by scanning the string backward, which cuts the processing from O(n) to O(1) for an input of size n. That's easy to add to the existing matchers and doesn't need to be limited to fixed-size patterns. I'm working on a CL to implement it for strings and byte slices.
Performance,help wanted,NeedsFix
low
Minor
254,836,137
puppeteer
PDF creation pixel sizes causes layout to change
Hi, When creating PDFs from a responsive web page, lets say the page has a css rule to show a narrower version below `1024` pixels screen width and we supply `width: "1024px"` to `pdf` function. The rule should not apply on this case however it does and the layout changes in generated pdf. Only when the width parameter is **4/3** of the actual width of viewport, then the pdf has exact same layout of given viewport width. This seems to be something related to an inches / points confusion somewhere (96 pixels per inch, 72 pixels per point. 96/72 = 4/3) So, when I provide `1365px` as pdf width I get the exact representation of the page at `1024px` viewport width. Anything below `1365px`, page acts like the viewport is below `1024px` and applies the appropriate responsive css rules. I'm not sure if this is an upstream bug or something else though. Margins are set to 0 btw. Any ideas?
bug,upstream,chromium,confirmed,P3
medium
Critical
254,852,991
rust
export_name works for msvc x86_64 toolchain, but not i686
I'm trying to build a simple dll and export a function with a pre-mangled name. I have `crate-type` set to `cdylib` and my function decorated like so: #[allow(non_snake_case)] #[export_name="?Hook@@YAXXZ"] // This is how MSVC mangles this name. pub fn Hook() { I'm using MSVC 2017 Community edition v14.10.25017; toggling between these two toolchains using rustup: `nightly-x86_64-pc-windows-msvc unchanged - rustc 1.22.0-nightly (f861b6ee4 2017-09-01)` `nightly-i686-pc-windows-msvc unchanged - rustc 1.22.0-nightly (f861b6ee4 2017-09-01)` The former links fine, the latter gives this error: `mydll.dll.exp: error LNK2001: unresolved external symbol "void __cdecl Hook(void)" (?Hook@@YAXXZ)` `fatal error LNK1120: 1 unresolved externals`
A-linkage,T-compiler,C-bug,O-x86_32
medium
Critical
254,857,169
puppeteer
How can I get the raw size or content-length of the response?
I mean some response is gzipped, I want to get the size, thanks
feature,upstream,chromium
medium
Major
254,880,773
go
cmd/compile: obscure initialization loop error message due to inlining
go version devel +0a4913b2d4 Wed Aug 23 11:09:11 2017 +0200 linux/amd64 https://play.golang.org/p/TW5DVv3zTk Produces obscure: ``` tmp/sandbox278346721/main.go:3:5: initialization loop: prog.go:3:5 A refers to prog.go:3:5 A ``` If compiled with `-l` produces understandable error message: ``` /tmp/test.go:3:5: initialization loop: /tmp/test.go:3:5 A refers to /tmp/test.go:7:10 B refers to /tmp/test.go:11:10 C refers to /tmp/test.go:15:10 D refers to /tmp/test.go:3:5 A ``` In real scenario this is spread across files and intermixed with other code.
NeedsFix,compiler/runtime
low
Critical
254,883,548
rust
Support coercing non-capturing closures to extern function pointers
This is a followup to https://github.com/rust-lang/rust/issues/39817 . Non-capturing closures now coerce to function pointers, but not to `extern fn` pointers, as provided to C functions expecting a callback. Adding support for this would make it much simpler to call a C function and provide an appropriate callback inline. (I'm also curious what it would take to make a *capturing* closure work as an extern function pointer, but that's a separate issue.)
A-closures,T-lang,T-compiler,C-feature-request
low
Major
254,886,643
vscode
Create an option to position the intellisense parameter info top or bottom.
Currently the parameter info tooltip is always placed above the cursor. This is often quite annoying since it completely blocks code in the above lines and you sometimes need to look at your context to know what values to give the parameters. Example: ![image](https://user-images.githubusercontent.com/702922/30005026-e9034dec-9096-11e7-80c0-1a23814ca15c.png)
feature-request,editor-parameter-hints
high
Critical
254,912,142
rust
Re-exported types have confusingly different documentation
Re-exported types seem to have more confusing documentation than the original type. I noticed this while reviewing rayon::Configuration which is re-exported from rayon-core. --- #### original/src/lib.rs ```rust pub trait T {} pub struct S; impl S { pub fn f<F>(_: F, _: Box<T>) -> Self where F: Fn() { unimplemented!() } } ``` This is documented basically like what I wrote, which is what I would expect: ![selection_063](https://user-images.githubusercontent.com/1940490/30007998-d8d16a2a-90ce-11e7-95fe-0d5c68180bb9.png) --- #### src/lib.rs ```rust extern crate original; pub use original::S; ``` This is documented with a couple changes, all of which are technically correct but unexpected. - The `Box<T>` is now `Box<T + 'static>`. - The return type has changed from `Self` to `S`. - ~~The `where` clause gives an explicit `-> ()`.~~ fixed as of 1.50 - The parameter name placeholders are gone (which I prefer, but it is a difference). ![selection_062](https://user-images.githubusercontent.com/1940490/30008001-dd300d6a-90ce-11e7-9edc-55a3e8d53cfd.png) I am using rustc 1.22.0-nightly (f861b6ee4 2017-09-01). @GuillaumeGomez <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"fmease"}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->
T-rustdoc,C-bug,A-cross-crate-reexports
low
Major
254,974,023
awesome-mac
Add open-in-buttons-for-finder-toolbar
Hi can you add this tools to your list? https://github.com/cnstntn-kndrtv/open-in-buttons-for-finder-toolbar
vote
low
Minor
255,031,757
godot
RigidBody2D ignores set_position when switching between MODE_RIGID and MODE_STATIC/KINEMATIC
**Operating system or device, Godot version, GPU Model and driver (if graphics related):** Windows 10, current master branch (6d233c651b21ecaef78fbb20d0365a22919b72b1), nVidia GeForce GTX 1080, driver version V385.41 (but probably not related to GPU) **Issue description:** <!-- What happened, and what was expected. --> When switching a RigidBody2D to `MODE_STATIC` or `MODE_KINEMATIC`, changing its position, and then switching back to `MODE_RIGID` and applying an impulse, movement starts at the position where the previous movement stopped, not at the current position. **Steps to reproduce:** In the example project, move the ball to the green area and click LMB to launch the ball. Move to the red area and click the button again to attach the ball to the mouse. When moving the mouse the ball sticks to the mouse position as expected. Click the mouse button over the red area; the ball will launch in the green area, not from its current position. **Link to minimal example project:** <!-- Optional but very welcome. You can drag and drop a zip archive to upload it. --> [2D-Physics.zip](https://github.com/godotengine/godot/files/1274695/2D-Physics.zip)
bug,confirmed,topic:physics
low
Major
255,044,869
angular
Support for async rendering
<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION. ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. --> ## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [x] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> The new version of React (16.x) will introduce a core feature called async rendering. (https://edgecoders.com/react-16-features-and-fiber-explanation-e779544bb1b7) This allows the framework to render a lot of things at the same time without blocking the main thread. Thanks to this feature the ui feels much more fluid. You can see it in this demo where stacked rendering (synchronous) and fibre (asynchronous) rendering are compared. https://claudiopro.github.io/react-fiber-vs-stack-demo/ I was wondering, is this something that can also be implemented in angular? If so, are there any plans for a similar feature? ## Current behavior <!-- Describe how the issue manifests. --> Component rendering is happening synchronous --> blocks the main thread. ## Expected behavior <!-- Describe what the desired behavior would be. --> Component rendering is happening asynchronous --> doesn't block the main thread.
feature,area: core,feature: under consideration
high
Critical
255,057,458
go
go/ast: CommentMap mishandles loose, trailing file comments
`go version devel +812b34efae Mon Sep 4 00:07:33 2017 +0000 linux/amd64` Construct a comment map for: ```go package p func f() { return } // loose trailing comment ``` The loose trailing comment is associated in the CommentMap with the return statement inside f. It should probably be associated with f instead, and the NewCommentMap docs updated with new rules. Live proof: https://play.golang.org/p/XCktcSxYl8
NeedsInvestigation
low
Major
255,094,610
angular
Injected Styles don't apply to HTML modified through other libraries due to selectors scope
## I'm submitting a... [ ] Regression [X] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request ## Current behavior While injecting styles with a component, if a new element is injected by another library (for example rangy) the new element doesn't get styled even if it's inside the scoped selector. ## Expected behavior have the element get styled ## Minimal reproduction of the problem with instructions Open the following plunker and select a word in black, it should get wrapper in an <a> tag with the class "specialNote" however the style doesn't gets applied, other element sin the component did used the style https://embed.plnkr.co/nDJ8jOgUsBYJX8JartXj/ I ## What is the motivation / use case for changing the behavior? injected styles should work consistently ## Environment Angular version: 4.1.1 Browser: - [X] Chrome (desktop) version 60 For Tooling issues: - Node version: 8 - Platform: Mac Others: If you open the developer console and modify the style from ``` .specialNote[_ngcontent-c0] { color: red; } ``` to ``` .specialNote{ color: red; } ``` the expected behavior happens Additional test with angular 4.3 https://embed.plnkr.co/xiWBruUptjpItfWlmZrJ/
type: bug/fix,freq1: low,area: core,core: CSS encapsulation,P3
low
Critical
255,120,715
rust
Using LTO while building as static library causes conflicts
If you build your Rust project as a static library to link it into a C codebase, you usually want to crank up the optimizations, as also indicated by the librsvg blogpost (towards the end): https://people.gnome.org/~federico/blog/librsvg-build-infrastructure.html This is all fine, until you want to link in another library built with Rust, which is very likely if you want to incrementally introduce Rust into your codebase. At that point the linker will start complaining about collisions caused by symbols defined by the standard library: ``` ./liblib2.a(lib2-91c10be1e28e3b68.0.o): In function `std::heap::__default_lib_allocator::__rdl_alloc': /checkout/src/libstd/heap.rs:31: multiple definition of `__rdl_alloc' ./liblib1.a(lib1-25b44f601e0ef586.0.o):/checkout/src/libstd/heap.rs:31: first defined here ./liblib2.a(lib2-91c10be1e28e3b68.0.o): In function `__rdl_alloc_excess': lib2.cgu-0.rs:(.text.__rdl_alloc_excess+0x0): multiple definition of `__rdl_alloc_excess' ./liblib1.a(lib1-25b44f601e0ef586.0.o):lib1.cgu-0.rs:(.text.__rdl_alloc_excess+0x0): first defined here ./liblib2.a(lib2-91c10be1e28e3b68.0.o): In function `__rdl_alloc_zeroed': lib2.cgu-0.rs:(.text.__rdl_alloc_zeroed+0x0): multiple definition of `__rdl_alloc_zeroed' ./liblib1.a(lib1-25b44f601e0ef586.0.o):lib1.cgu-0.rs:(.text.__rdl_alloc_zeroed+0x0): first defined here ./liblib2.a(lib2-91c10be1e28e3b68.0.o): In function `__rdl_dealloc': lib2.cgu-0.rs:(.text.__rdl_dealloc+0x0): multiple definition of `__rdl_dealloc' ./liblib1.a(lib1-25b44f601e0ef586.0.o):lib1.cgu-0.rs:(.text.__rdl_dealloc+0x0): first defined here ./liblib2.a(lib2-91c10be1e28e3b68.0.o): In function `__rdl_grow_in_place': lib2.cgu-0.rs:(.text.__rdl_grow_in_place+0x0): multiple definition of `__rdl_grow_in_place' ./liblib1.a(lib1-25b44f601e0ef586.0.o):lib1.cgu-0.rs:(.text.__rdl_grow_in_place+0x0): first defined here ./liblib2.a(lib2-91c10be1e28e3b68.0.o): In function `__rdl_oom': lib2.cgu-0.rs:(.text.__rdl_oom+0x0): multiple definition of `__rdl_oom' ./liblib1.a(lib1-25b44f601e0ef586.0.o):lib1.cgu-0.rs:(.text.__rdl_oom+0x0): first defined here ./liblib2.a(lib2-91c10be1e28e3b68.0.o): In function `__rdl_realloc': lib2.cgu-0.rs:(.text.__rdl_realloc+0x0): multiple definition of `__rdl_realloc' ./liblib1.a(lib1-25b44f601e0ef586.0.o):lib1.cgu-0.rs:(.text.__rdl_realloc+0x0): first defined here ./liblib2.a(lib2-91c10be1e28e3b68.0.o): In function `__rdl_realloc_excess': lib2.cgu-0.rs:(.text.__rdl_realloc_excess+0x0): multiple definition of `__rdl_realloc_excess' ./liblib1.a(lib1-25b44f601e0ef586.0.o):lib1.cgu-0.rs:(.text.__rdl_realloc_excess+0x0): first defined here ./liblib2.a(lib2-91c10be1e28e3b68.0.o): In function `__rdl_shrink_in_place': lib2.cgu-0.rs:(.text.__rdl_shrink_in_place+0x0): multiple definition of `__rdl_shrink_in_place' ./liblib1.a(lib1-25b44f601e0ef586.0.o):lib1.cgu-0.rs:(.text.__rdl_shrink_in_place+0x0): first defined here ./liblib2.a(lib2-91c10be1e28e3b68.0.o): In function `__rdl_usable_size': lib2.cgu-0.rs:(.text.__rdl_usable_size+0x0): multiple definition of `__rdl_usable_size' ./liblib1.a(lib1-25b44f601e0ef586.0.o):lib1.cgu-0.rs:(.text.__rdl_usable_size+0x0): first defined here ./liblib2.a(lib2-91c10be1e28e3b68.0.o): In function `rust_eh_personality': lib2.cgu-0.rs:(.text.rust_eh_personality+0x0): multiple definition of `rust_eh_personality' ./liblib1.a(lib1-25b44f601e0ef586.0.o):lib1.cgu-0.rs:(.text.rust_eh_personality+0x0): first defined here ``` This only happens if you set `lto = true`.
A-linkage,T-compiler,C-bug
medium
Major
255,282,601
opencv
Extend CvCaptureCAM_Aravis::open( int index ) to allow for custom ROI
Hi all, I would like to extend CvCaptureCAM_Aravis to allow arv_camera_set_region() to take in a custom set of ROI coordinates. Basically to allow for heightMin and heightMax to be changed, and to allow for two extra paremeters x and y to be passed in (as per arv_camera_set_region(x,y,height,width) in the aravis driver. I can make these changes myself, and issue a pull request, but would like to know is my approach is right: - Make CV_CAP_PROP_FRAME_WIDTH and CV_CAP_PROP_FRAME_HEIGHT writable, and expose them via setProperty() - Add two new properties to enum | cv::VideoCaptureProperties such as CV_CAP_PROP_OFFSET_X and CV_CAP_PROP_OFFSET_Y and make them available via setProperty in the cap_aravis driver - Upon setting any of these, stop capture, issue another call to arv_camera_set_region and update the values (if any of them are not set, default to what is currently there for each), start capture. The reason for this change is that it would significanly speed up image aquisition for applications where all you need is a smaller region rather than the full image. Thank you, Flaviu
feature,category: videoio(camera)
low
Minor
255,288,401
pytorch
BatchNorm{1-2-3}d are redundant
Since https://github.com/pytorch/pytorch/pull/2020, `nn.BatchNorm1d`/`nn.BatchNorm2d`/`nn.BatchNorm3d` are completely redundant, as there are no more size checks that are performed in the input tensor I see two options here: * add the size-checks back for each class; * deprecate BatchNorm{1-2-3}d and use instead BatchNorm. We already have only a single functional interface for BatchNorm, so option 2 might be worth considering. cc. @alykhantejani who removed the size checks
module: nn,triaged
low
Minor
255,300,864
rust
unused_assignments does not care about unused assignments to reference derefs
```rust pub fn foo(b: bool, x: &mut i32) { if b { *x = 6; } *x = 7; } ``` does not emit the `unused_assignments` lint. I understand that this is not possible for `DerefMut` in general, because every call to `deref_mut` (via desugaring `*`) can result in a different reference, but for pure references everything should be good. A case of not linting this causing a bug was found in rustc: https://github.com/rust-lang/rust/blob/2f1ef9ef1181298d46e79d5dde6bafeb6483926f/src/librustc_mir/transform/inline.rs#L614-L620
A-lints,T-compiler,C-bug
low
Critical
255,319,841
godot
animations don't loop after importing .dae from blender in v3
**Operating system or device, Godot version, GPU Model and driver (if graphics related):** Ubuntu 17.04 - Godot v3.0.alpha.custom_build.6d233c6 The animation loops correctly in the editor but now then the scene is played. Check out the attached project. [godot-dbg.zip](https://github.com/godotengine/godot/files/1277958/godot-dbg.zip)
bug,topic:import
medium
Major
255,329,404
pytorch
[feature request] add pairwise ranking loss
module: loss,triaged
low
Minor
255,331,848
bitcoin
Wallet should be able to store multiple transactions with same txid
Pre-segwit, malleated transactions would have a different txid and therefore be accepted and stored by the wallet when seen on the network. Post-segwit, it's possible for a malleated transaction that is seen on the network to be ignored by the wallet, because we index the wallet db by txid, and we are currently only able to store one entry for a given txid (and I have no idea whether this assumption is easy to change). This means that if a malleated transaction were mined on the network, we would only store the original version of the transaction. While this doesn't appear to have any direct impact on our wallet's behavior, this could frustrate wallet users who expect the stored transaction to be the same as the one mined. Within the current paradigm (of storing a single transaction per txid), we could instead store the latest seen version of any transaction, so that if a malleated version of a transaction is mined, that will get stored in our wallet and we'd forget about any previous version. However, that isn't an ideal solution either: suppose the malleated version of the transaction violates local mempool policy, and the block containing the malleated transaction gets reorged out. If the wallet would replace the non-malleated transaction with the malleated one when it was received, we'd have no way to rebroadcast the transaction again after such a reorg. And since I think losing a signed transaction (which we may not be able to reproduce) is a terrible outcome, I think we should for now continue to keep whatever original signed version of a transaction that we see, and not replace. Slightly relevant to this: #11225 adds the ability to replace a transaction that has no witness with one that has a witness, under the reasoning that this is only possible if we have upgraded a wallet that was pre-segwit, and are now receiving the full transaction post-upgrade. Since any transaction that is valid with a witness must be invalid under segwit's rules without the witness, doing this specific replacement should put the wallet in a strictly better position (where it might now be storing a valid transaction, which is possibly the same as the version of the transaction which was/will be mined).
Wallet
low
Minor
255,335,781
rust
Use #[repr(C)] HList's to infer type-erased fmt fn pointers in format_args!'s static data.
Right now `format_args!` uses, e.g. `ArgumentV1::new(&runtime_data, Debug::fmt)` (for `{:?}`), at runtime, using up *two* pointers per argument at runtime instead of just one (`&runtime_data`). With `allow_internal_unsafe` and #44240, we can place the (e.g. `Debug::fmt`) `fn` pointers in (rvalue-promoted) `'static` data, the remaining hurdle is how to infer the type of the runtime data. That is, `Debug::fmt` is really `<_ as Debug>::fmt` and that `_` is right now inferred because of `ArgumentV1::new`'s signature typing them together. If they're separate, we need something new. I propose using the `HList` pattern (`struct HCons<H, T>(H, T); struct HNil;` - so for 3 elements, of types `A`, `B` and `C` you'd have `HCons<A, HCons<B, HCons<C, HNil>>>`), with `#[repr(C)]`, which would give it a deterministic layout which matches that of an array, that is, these two: * `&'static HCons<fn(&A), HCons<fn(&B), HCons<fn(&C), HNil>>>` * `&'static [unsafe fn(*const Opaque); 3]` have the same representation, and the latter can be unsized into a slice. This transformation from `HList` to array (and then slice) can be performed *on top* of a safe, rvalue-promoted `HCons`, which is a necessary requirement for moving the `fn` pointers into `'static` data at all. For inference, we can simply insert some function calls to match up the types, e.g. to infer `B` we could do`fmt::unify_fn_with_data((list.1).0, &b)`, which would make`B` into `typeof b`. It might actually be simpler to have a completely safe "builder" interface, which combines the `HList` of formatters with a `HList` of runtime references, unifying the types, but I'm a bit worried about compile-times due to all the trait dispatch - in any case, the impact should be measured. <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"m-ou-se"}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->
C-enhancement,T-libs-api,I-heavy,A-fmt
low
Critical
255,347,360
rust
Updating dependency caused type inference to fail on unrelated code
Note: This is not a bug. This is a case that I ran into that was difficult to debug, and extremely confusing. In the interest of the ergonomics initiative, I wanted to report it. However, rustc is behaving as expected. Feel free to close this at your leisure. At some point last night, Diesel's builds suddenly started failing for no apparent reason. [This line](https://github.com/diesel-rs/diesel/blob/8b9326511100334b48ee73d300633535f2c9b8f7/diesel_tests/tests/select.rs#L99) was failing to infer that the `_` there is `bool` (the `Vec` annotation is cruft from back when there needed to be a `collect` call as well). It was especially baffling, because the test above it is nearly identical, and [this line](https://github.com/diesel-rs/diesel/blob/8b9326511100334b48ee73d300633535f2c9b8f7/diesel_tests/tests/select.rs#L84) was compiling just fine. Eventually after cleaning up some build output and diffing it, we found that the only thing that had changed was a new version of `serde_json` being released. That led us to [this commit](https://github.com/serde-rs/json/commit/7fbf18e95e1f85a8654534385931818d5135db7b), which made the reason for the failure much more obvious. Nobody really did anything wrong here. Implementing a non-fundamental trait is defined as a minor breaking change in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md). However, the failure was extremely non-local and confusing. We were convinced this was a bug in rustc for a few hours until we finally tracked it down. While there is no bug, I think two things could have improved this situation. First, I think we should consider amending that RFC so that implementing a trait which is not part of your crate for a type which is not part of your crate to be considered a major breaking change, as any code it breaks will be code which does not interact with that crate. Secondly, I wonder if the error message could give some more diagnostic output here. If the message listed the impls of `PartialEq` for `bool`, this would have been immediately clear what had happened.
C-enhancement,A-diagnostics,T-compiler
low
Critical
255,378,356
TypeScript
Allow to extract code containing `return` statement if it's at the end of a function
**TypeScript Version:** nightly (2.6.0-dev.20170904) **Code** ```ts export function f() { if (1) { return 1; } ...do stuff... } export function g() { ...do stuff... if (1) { return 1; } } ``` **Expected behavior:** Able to extract the `if` statement out of `g`. Not able to extract from `f` because that would change the control flow. **Actual behavior:** Not able to extract in either case. (But somehow it works in #18091?)
Suggestion,Domain: Refactorings,Experience Enhancement
low
Minor
255,385,908
youtube-dl
[ku6] can't download video from ku6 anymore...
## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`) - Use the *Preview* tab to see what your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.09.02*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.09.02** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue* --- ### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows: Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2017.09.02 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} ... <end of log> ``` --- ### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**): - Single video: https://www.youtube.com/watch?v=BaW_jenozKc - Single video: https://youtu.be/BaW_jenozKc - Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. --- ### Description of your *issue*, suggested solution and other information Explanation of your *issue* in arbitrary form goes here. Please make sure the [description is worded well enough to be understood](https://github.com/rg3/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide as much context and examples as possible. If work on your *issue* requires account credentials please provide them or explain how one can obtain them. ku6 make big changes recently... ``` eg, http://www.ku6.com/2017/detail.html?vid=cJlL_h5g7wWOKKQ4fGXdvg ```
broken-IE
low
Critical
255,394,211
youtube-dl
can not extact some iqiyi playlist video url
## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`) - Use the *Preview* tab to see what your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.09.02*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [ x] I've **verified** and **I assure** that I'm running youtube-dl **2017.09.02** ### Before submitting an *issue* make sure you have: - [ x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [ x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [ x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue* --- ### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows: Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` youtube-dl -v --flat-playlist http://www.iqiyi.com/a_19rrgu9owx.html [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'-v', u'--flat-playlist', u'http://www.iqiyi.com/a_19rrgu9owx.html'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2017.09.02 [debug] Python version 2.7.5 - Linux-4.9.36-x86_64-linode85-x86_64-with-centos-7.3.1611-Core [debug] exe versions: ffmpeg 2.6.8, ffprobe 2.6.8 [debug] Proxy map: {} [iqiyi] temp_id: download video page ERROR: Can't find any video; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 776, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 434, in extract ie_result = self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/iqiyi.py", line 352, in _real_extract raise ExtractorError('Can\'t find any video') ExtractorError: Can't find any video; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. ``` --- ### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**): - Single video: https://www.youtube.com/watch?v=BaW_jenozKc - Single video: https://youtu.be/BaW_jenozKc - Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. --- ### Description of your *issue*, suggested solution and other information Explanation of your *issue* in arbitrary form goes here. Please make sure the [description is worded well enough to be understood](https://github.com/rg3/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide as much context and examples as possible. If work on your *issue* requires account credentials please provide them or explain how one can obtain them.
bug
low
Critical
255,413,434
TypeScript
Disable formatting a region of code using directives
<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> From: https://github.com/Microsoft/vscode/issues/33772 **TypeScript Version:** 2.4.0 / nightly (2.5.0-dev.201xxxxx) **Feature Request** Add a way to disable formatting of a region of code. An example of this is js beatuify's [preserve directive](https://github.com/beautify-web/js-beautify#directives-to-ignore-or-preserve-sections-javascript-only): ```js // Use preserve when the content is not javascript, but you don't want it reformatted. /* beautify preserve:start */ { browserName: 'internet explorer', platform: 'Windows 7', version: '8' } /* beautify preserve:end */ ```
Suggestion,Domain: Formatter,Awaiting More Feedback,VS Code Tracked
high
Critical
255,422,759
vscode
introduce "pathMapping" as a more powerful replacement for "remoteRoot/localRoot"
Currently the node/chrome debuggers support two models of mapping paths between the backend/runtime and the VS Code workspace: - Node Debug: "remoteRoot/localRoot" - Debugger for Chrome: "pathMapping" Since the "pathMapping" supports multiple mappings and users are asking for it, we should support this across the board. /cc @roblourens
feature-request,debug
low
Critical
255,440,313
rust
Expose min and max values in benchmarks
Currently, `cargo bench` prints output along these lines: ``` test bls12_381::bench_pairing_final_exponentiation ... bench: 1,753,823 ns/iter (+/- 30,711) test bls12_381::bench_pairing_full ... bench: 2,641,309 ns/iter (+/- 35,774) test bls12_381::bench_pairing_g1_preparation ... bench: 13,801 ns/iter (+/- 293) test bls12_381::bench_pairing_g2_preparation ... bench: 233,722 ns/iter (+/- 11,857) test bls12_381::bench_pairing_miller_loop ... bench: 618,548 ns/iter (+/- 26,680) test bls12_381::ec::g1::bench_g1_add_assign ... bench: 1,189 ns/iter (+/- 53) ``` The values are derived [here](https://github.com/rust-lang/rust/blob/7f054990b6bb19e15750a4442a24941cc157acb6/src/libtest/lib.rs#L844-L845), from which we can determine that the key value is a median, which is good! Unfortunately, the other value given is a range, which is not particularly useful: - As-printed, it looks like [an error or standard deviation](https://en.wikipedia.org/wiki/Plus-minus_sign#In_statistics); either mis-interpretation would mean that the uncertainty is overstated by at least a factor of two! - The range itself, in the context of a `+/-`, only makes sense if the underlying benchmark has a normal (Gaussian) distribution. But depending on the benchmark, that may not be the case. Say the output is `100 +/- 20`: there is no way to distinguish between a `(min, max)` of `(81, 101)` versus `(99, 119)`, which should be interpreted very differently by the programmer. I would personally like to gain access to the min and max values for the purpose of CI benchmarks (e.g. [here](https://speed.z.cash/timeline/?exe=1&base=1%2B9&ben=time+solveequihash&env=1&revs=50&equid=off&quarts=on&extr=on)), so I'd like to see those values exposed either by default, or accessible via a flag. Alternatively (or in addition), the range should be replaced with a standard deviation or standard error.
T-dev-tools,C-feature-request,A-libtest
low
Critical
255,465,509
youtube-dl
I would like to ask you can download the video to support the crooked website
Is it possible to support the download of crooked video? http://www.yy.com/x/15012_147125102_54880976_1504611031651 http://www.yy.com/x/15012_147125102_54880976_1504265354742
site-support-request
low
Minor
255,494,790
react-native
View will lost background color when set borderRadius and height is large enough on Android device
### Is this a bug report? Yes ### Have you read the [Contributing Guidelines](https://facebook.github.io/react-native/docs/contributing.html)? No ### Environment @mjmasn's environment: ``` Environment: OS: Linux 4.13 Node: 8.11.0 Yarn: 1.7.0 npm: 5.6.0 Watchman: 4.9.0 Xcode: N/A Android Studio: 3.1 AI-173.4670197 Packages: (wanted => installed) react: ^16.4.1 => 16.4.1 react-native: ^0.55.4 => 0.55.4 ``` @beiming's environment: ``` Environment: OS: macOS Node: 7.7.1 npm: 4.1.2 Packages: (wanted => installed) react-native: ^0.47.2 => 0.47.2 Target Platform: Android Android version: 4.4.4 Screen resolution: 720 x 1280 ``` ### Steps to Reproduce ``` // index.android.js import React, {Component} from 'react'; import {AppRegistry, View, Text, ScrollView} from 'react-native'; class App extends Component { render() { return ( <ScrollView> <View style={{ // if `borderRadius` > 0 and `height` is large enough like 3000 (2000 is ok on my android device), `backgroundColor` will disappear. borderRadius: 1, height: 3000, backgroundColor: 'red', alignItems: 'center', justifyContent: 'center' }}> <Text>Test</Text> </View> </ScrollView> ); } } AppRegistry.registerComponent('App', () => App); ``` Run `react-native run-android` on a device, it does not reproduce on an AVD. ### Expected Behavior It will be show a long view, with red background, and scroll view show `Test` in center. ### Actual Behavior It will be show a long view, but no background color (white, maybe transparent), and scroll view show `Test` in center.
Help Wanted :octocat:,Platform: Android,Priority: Low,Bug
low
Critical
255,599,251
rust
Meta issue for FIXMEs that reference closed issues
@Eh2406 compiled this awesome list. I think it should be a meta issue. So here it is https://gist.github.com/Eh2406/b92f034f8adc193894482e19c79d80f1
C-cleanup,metabug,T-libs-api,T-compiler,E-help-wanted
medium
Major
255,604,584
youtube-dl
SSL Error on windows during download [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1748)
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.09.02*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.09.02** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other ``` C:\...>youtube-dl -i -v -f best --no-check-certificate --write-thumbnail --write-description --write-info-json --download-archive "C:/.../cats/archive.txt" -o "C:/.../cats/%(title)s.%(ext)s" "https://www.youtube.com/watch?v=mdqBbvYX3MU" [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-i', '-v', '-f', 'best', '--no-check-certificate', '--write-thumbnail', '--write-description', '--write-info-json', '--download-archive', 'C:/.../cats/archive.txt', '-o', 'C:/.../cats/%(title)s.%(ext)s', 'https://www.youtube.com/watch?v=mdqBbvYX3MU'] [debug] Encodings: locale cp1250, fs mbcs, out cp852, pref cp1250 [debug] youtube-dl version 2017.09.02 [debug] Python version 3.4.4 - Windows-10-10.0.14393 [debug] exe versions: ffmpeg 3.3.3, ffprobe 3.3.3 [debug] Proxy map: {} [youtube] mdqBbvYX3MU: Downloading webpage [youtube] mdqBbvYX3MU: Downloading video info webpage [youtube] mdqBbvYX3MU: Extracting video information [youtube] mdqBbvYX3MU: Downloading MPD manifest [info] Writing video description to: C:\...\cats\How do Cats Use Their Whiskers Slow-Motion - Cats Uncovered - BBC.description [info] Writing video description metadata as JSON to: C:\...\cats\How do Cats Use Their Whiskers Slow-Motion - Cats Uncovered - BBC.info.json [youtube] mdqBbvYX3MU: Downloading thumbnail ... [youtube] mdqBbvYX3MU: Writing thumbnail to: C:\...\cats\How do Cats Use Their Whiskers Slow-Motion - Cats Uncovered - BBC.jpg [debug] Invoking downloader on 'https://r1---sn-qpbpu8-c0ql.googlevideo.com/videoplayback?lmt=1493417719755362&ei=aPOvWYbPO4-8Vv7cgbAM&ms=au&source=youtube&dur=258.345&mv=m&pl=20&ip=62.165.208.150&requiressl=yes&id=o-AKl7qASm8K0eo_64wWkJMA2reMTE-pWc5MPCRl22oYHU&key=yt6&signature=50EA5A7E2D92F704831176C3873AE8662EC538A7.9414C395E429ECE531C92B02C00F4428924DFA7A&mm=31&mn=sn-qpbpu8-c0ql&mt=1504703234&itag=22&mime=video%2Fmp4&sparams=dur%2Cei%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&expire=1504724937&initcwndbps=2967500&ratebypass=yes&ipbits=0' [download] Destination: C:\...\cats\How do Cats Use Their Whiskers Slow-Motion - Cats Uncovered - BBC.mp4 [download] 0.1% of 51.31MiB at 4.12MiB/s ETA 00:12 ERROR: unable to download video data: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1748) Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmptra0egnk\build\youtube_dl\YoutubeDL.py", line 1865, in process_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmptra0egnk\build\youtube_dl\YoutubeDL.py", line 1807, in dl File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmptra0egnk\build\youtube_dl\downloader\common.py", line 361, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmptra0egnk\build\youtube_dl\downloader\http.py", line 287, in real_download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmptra0egnk\build\youtube_dl\downloader\http.py", line 180, in download File "C:\Python\Python34\lib\http\client.py", line 537, in read File "C:\Python\Python34\lib\http\client.py", line 576, in readinto File "C:\Python\Python34\lib\socket.py", line 378, in readinto File "C:\Python\Python34\lib\ssl.py", line 748, in recv_into File "C:\Python\Python34\lib\ssl.py", line 620, in read ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1748) ``` ### Description of your *issue*, suggested solution and other information I have been having this issue in the last couple of months. Download starts, then it stops with this error with a farily high likelyhood. One can force himself to download videos even with this bumping up over and over since it can pick up at the last byte it has been left at. Sometimes it is much more frequent than other times. Recently I managed to download a 25GB playlist in 3 tries. However now a 23GB playlist needed 21 tries to complete... Worst is when it doesn't even get to 1% of the data before it crashes. I have seen other issues here in the past with similar error message, hence the --no-check-certificate option; I've also tried clearing expired certificates. I've seen this post linked to somewhere here, it may explain the cause of the problem if it is indeed with youtube-dl and not on my part: https://stackoverflow.com/questions/3724900/python-ssl-problem-with-multiprocessing/3724938#3724938. Any suggestions?
cant-reproduce
medium
Critical
255,619,819
angular
HttpParams doesn't accept array
<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION. ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. --> ## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [x] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior <!-- Describe how the issue manifests. --> <pre><code> let payload = new HttpParams(); payload.set('ids', [1,2,3,4]); </pre></code> This is not accepted and compiled by ts because set method accepts just string. ## Expected behavior <!-- Describe what the desired behavior would be. --> To be able to set array, and the serializer to make like this ids[]=1&ids[]=2&ids=[]3&ids[]=4 ## Minimal reproduction of the problem with instructions <!-- For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5). --> ## What is the motivation / use case for changing the behavior? <!-- Describe the motivation or the concrete use case. --> ## Environment <pre><code> Angular version: X.Y.Z <!-- Check whether this is still an issue in the most recent Angular version --> Browser: - [x] Chrome (desktop) version XX - [x] Chrome (Android) version XX - [x] Chrome (iOS) version XX - [x] Firefox version XX - [x] Safari (desktop) version XX - [x] Safari (iOS) version XX - [x] IE version XX - [x] Edge version XX For Tooling issues: - Node version: 6.9.12 <!-- run `node --version` --> - Platform: Mac <!-- Mac, Linux, Windows --> Others: <!-- Anything else relevant? Operating system version, IDE, package manager, HTTP server, ... --> </code></pre>
feature,area: common/http,P4,feature: under consideration
medium
Critical
255,636,289
TypeScript
JSDoc Parser breaks with a complex `@pattern` tag
<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.5.2 **Code** ```ts /** * @pattern ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$ */ public emailPattern: string; ``` **Expected behavior:** expected '^[a-zA-Z0-9_.+-]+' to equal '^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$' **Actual behavior:** This is parsed -^[a-zA-Z0-9_.+-]+ This is expected +^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$ Maybe I am doing something stupid or the parser is broken.
Bug,Help Wanted,Domain: JSDoc
low
Critical
255,678,018
every-programmer-should-know
What are some of the best resources on Software/Code Design?
Needs some ❤️
low
Major
255,678,236
every-programmer-should-know
What are some of the best resources on Engineering Processes?
Needs some ❤️
low
Minor
255,678,787
every-programmer-should-know
What are some of the best resources on Development Methodologies?
Ideally, something referencing current and historical methodologies: - Kanban - Lean - Scrum - RUP - V-Model - XP etc
Needs some ❤️
low
Minor
255,679,068
every-programmer-should-know
What are some of the best resources on Code Construction?
- Refactoring - Debugging - Design
Needs some ❤️
low
Critical
255,718,710
TypeScript
Allow class inheritance in ambient contexts, even with a base private constructor
**TypeScript Version:** nightly (2.5.0-dev.20170902) **Code** ```ts declare namespace Foo { class Bar { private constructor(); Box: string; } class Baz extends Bar { private constructor(); } function generator(): Baz; } let x = Foo.generator(); x.Box = 'abcd'; ``` **Expected behavior:** Compile without error. **Actual behavior:** error TS2675: Cannot extend a class 'Foo.Bar'. Class constructor is marked as private. **Use case** This would allow declaring the types of host-supplied objects, with the following features: 1. can inherit members from each other 2. cannot be inherited from using standard Typescript/Javascript classes 3. cannot be assigned to from an object literal with matching members 4. cannot be constructed, only returned from a factory method ```ts declare namespace com.sun.star.text { class XTextTablesSupplier { private constructor(); private typekey: XTextTablesSupplier; readonly TextTables: any; } class GenericTextDocument extends XTextTablesSupplier { private constructor(); private typekey1: GenericTextDocument; CharacterCount: number; } } declare function createInstance(typename: 'com.sun.star.text.GenericTextDocument'): com.sun.star.text.GenericTextDocument; let x = createInstance('com.sun.star.text.GenericTextDocument'); // OK x = new com.sun.star.text.GenericTextDocument(); // Error let y = x.TextTables; // OK // The following would be an error x = { TextTables: '', CharacterCount: 5 }; ```
Suggestion,Help Wanted,Committed
low
Critical
255,737,963
TypeScript
Array.prototype.sort make compareFn required in lib.d.ts
This is a suggestion to change the signature declaration of Array sort in lib.d.ts from ```ts sort(compareFn?: (a: T, b: T) => number): this; ``` to ```ts sort(this: string[], compareFn?: (a: string, b: string) => number): this; sort(compareFn: (a: T, b: T) => number): this; ``` i.e. make compareFn non-optional for non-string arrays. This would result in errors in cases such as ```ts [2, 10].sort() // returns [10, 2], i.e. sorted lexicographically, which is very unintuitive. ``` While this is strictly speaking a breaking change, it wouldn't be the first time the typings are stricter than the actually definitions.
Suggestion,Domain: lib.d.ts,Experimentation Needed
medium
Critical
255,757,795
youtube-dl
Running inside docker container from non root user
When i try to run youtube-dl inside docker container from non root user i recieve this error: failed to import the site module traceback (most recent call last): file "/usr/lib/python3.6/site.py", line 544, in main() file "/usr/lib/python3.6/site.py", line 530, in main known_paths = addusersitepackages(known_paths) file "/usr/lib/python3.6/site.py", line 282, in addusersitepackages user_site = getusersitepackages() file "/usr/lib/python3.6/site.py", line 258, in getusersitepackages user_base = getuserbase() # this will also set user_base file "/usr/lib/python3.6/site.py", line 248, in getuserbase user_base = get_config_var('userbase') file "/usr/lib/python3.6/sysconfig.py", line 601, in get_config_var return get_config_vars().get(name) file "/usr/lib/python3.6/sysconfig.py", line 558, in get_config_vars _config_vars['userbase'] = _getuserbase() file "/usr/lib/python3.6/sysconfig.py", line 205, in _getuserbase return joinuser("~", ".local") file "/usr/lib/python3.6/sysconfig.py", line 184, in joinuser return os.path.expanduser(os.path.join(*args)) file "/usr/lib/python3.6/posixpath.py", line 247, in expanduser userhome = pwd.getpwuid(os.getuid()).pw_dir keyerror: 'getpwuid(): uid not found: 1000' I believe this problem is described here: http://blog.dscpl.com.au/2015/12/unknown-user-when-running-docker.html
external-bugs
low
Critical
255,764,043
TypeScript
The language service does not resolve symbolic links
The LS does not provide a mechanism for LS hosts to resolve symbolic links, which can result in build errors when using _gulp-tsb_ or other tools to compile a project that uses symbolic links. To support this, we need to add a `realpath` optional method to the `LanguageServiceHost` interface to allow an LS host to specify a `realpath` implementation to resolve symbolic links.
Bug,API
low
Critical
255,838,012
opencv
Zooming in Viz3d not possible after camera rotation
##### System information (version) - OpenCV => 3.3 - Operating System / Platform => Ubuntu 16.04 (x86-64) with QT 5.5 - Compiler => g++ 5.4.0 ##### Detailed description For 3-D reprojections and the like, it is sometimes necessary to rotate or flip the camera around. However, when doing this with Viz3d, one loses the ability to zoom using the mouse's scroll wheel. The following code illustrates the issue: ##### Steps to reproduce ``` #include <cmath> #include <opencv2/viz.hpp> using namespace std; using namespace cv; using namespace viz; int main() { Viz3d visualization; visualization.showWidget("Test object", WCone(1000, 1000, 100)); visualization.spinOnce(1, true); //Required to work around another bug //Uncomment to lose the ability to zoom by scrolling /*auto pose = visualization.getViewerPose(); pose = pose.rotate(Vec3f(M_PI, 0, 0)); visualization.setViewerPose(pose);*/ visualization.spinOnce(1, true); while (!visualization.wasStopped()) visualization.spinOnce(1, true); return 0; } ``` This seems to be an issue that is different from the others that I reported previously - none of those impact the user's control abilities over the camera with the mouse.
bug,category: viz
low
Critical
255,906,095
rust
#[thread_local] from windows DLLs gets duplicated by inlining.
This is most likely responsible for the windows failures from #43931 when the `__getit` function, which may return a reference to a `#[thread_local] static`, was `#[inline]` (cc @alexcrichton): ```rust // a.rs #![crate_type = "dylib"] #![feature(thread_local)] #[thread_local] static FOO: u32 = 25; pub fn addr() -> *const u32 { &FOO } #[inline] pub fn addr_inline() -> *const u32 { &FOO } ``` ```rust // b.rs extern crate a; fn main() { assert_eq!(a::addr(), a::addr_inline()); } ``` Running `b`, on x64 MSVC (thanks, @bcata6!) results in: ``` thread 'main' panicked at 'assertion failed: `(left == right)` left: `0x134cb61ace4`, right: `0x134cb6139c0`', b.rs:4:4 ```
T-compiler,O-windows-msvc,A-thread-locals,C-bug
low
Critical
255,916,677
godot
Translation snapping should have individual settings for the x, y and z axes
Humans are not cubes, we are tall and thin. We made our hallways tall, our doorways tall, the houses we live in, and the closets we hang our clothes in. The editor's translation snap however assumes that the entire world is made of uniformly-sized cubes. (or squares, in case of the 2D editor) I would enjoy the ability to work on a different y-level without having to fiddle with the snap settings every time i want to go back down a level.
enhancement,topic:editor,usability,topic:3d
low
Minor
255,971,540
go
crypto/x509: Provide a mechanism for accessing SRVNames
The `SRVName` field of an X.509 certificate defined by [RFC 4985] allows a certificate to be used to verify that a service is managed by a particular entity without giving the same entity control over the entire domain or subdomain (eg. if DNSName or CommonName were used). I would like to be able to access the SRVNames from a certificate parsed using `x509.ParseCertificate` and the like. I can see two ways of doing this, depending on how accessible this information needs to be. The easiest would be to add a field to the `Certificate` struct alongside the existing SAN fields: ``` type Certificate struct { … // Subject Alternate Name values DNSNames []string SRVNames []string EmailAddresses []string IPAddresses []net.IP … } ``` and parse the SRVNames at the same time we parse DNSNames. This is easy to use, but it may not be desirable to pollute the struct with fields for more otherName values that aren't as widely used (especially when issues like #15196 may already cause it to balloon). Alternatively, the raw SAN field can already be pulled out of the `Extensions []pkix.Extension` field. A more extensible approach might be to create a raw SAN field similar to Extensions that contains the raw map of OIDs and their values. Something like: ``` type Certificate struct { … // Extensions contains raw X.509 extensions. When parsing certificates, // this can be used to extract non-critical extensions that are not // parsed by this package. When marshaling certificates, the Extensions // field is ignored, see ExtraExtensions. Extensions []pkix.Extension // SAN contains raw X.509 extensions that were not parsed into the DNSNames, // EmailAddresses, or IPAddresses fields.. SAN []pkix.Extension … } ``` which would make it possible for users to get ahold of arbitrary fields from the SAN without requiring that they pull the blob out of Extensions and re-parse it again. Note that this would have to be in *addition* to the existing raw SAN field from Extensions (we probably can't remove it since code might already be pulling the SAN field out of Extensions). I have not included an ExtraExtensions (for marshalling) equivalent for this reason (what happens when both exist and you go to create a certificate?). /cc @agl [RFC 4985]: https://tools.ietf.org/html/rfc4985
Proposal,Proposal-Accepted,Proposal-Crypto
low
Major
256,009,194
rust
Consider making `std::time::SystemTime` platform-independent
It was found in https://github.com/rust-lang/rust/pull/44220#issuecomment-327744848 that certain systems in Tier-2 support still uses a 32-bit `time_t`. `SystemTime` on them will suffer from the Year-2038 problem, and also cannot perform arithmetic for a duration >68 years. This introduces a portability hazard, in which on some systems the time arithmetic works normally, and in some more legacy system it suddenly panics. The `SystemTime` struct is a wrapper around [`timespec`](http://en.cppreference.com/w/c/chrono/timespec) on Unix and Redox, and [`FILETIME`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724284.aspx) on Windows. Nevertheless, the public API involving `SystemTime` never exposes this detail: * You cannot construct a `SystemTime` from a `timespec`/`FILETIME`, nor the other way round * The only place where `SystemTime` interacts with the OS are being returned 1. `SystemTime::now`, returning a `SystemTime` 2. `Metadata::{modified, accessed, created}`, returning an `io::Result<SystemTime>` * There are no OS-specific APIs reading a `SystemTime`. This means expanding the precision and range of `SystemTime` is safe. In fact, we could even make the `SystemTime` structure itself platform-agnostic, just like `Duration`: ```rust struct SystemTime { secs: i64, nanos: u32, } ```
C-enhancement,T-libs-api,A-time
medium
Major
256,044,248
TypeScript
Surprising `Not all code paths return a value`
**TypeScript Version:** 2.5.2 **Code** ```ts type AsyncFunction<T> = () => Promise<T>; const f: AsyncFunction<number | void> = async () => { if (Math.random()) { return 1; } }; ``` **Expected behavior:** No tsc errors. **Actual behavior:** ```ts const f: AsyncFunction<number | void> = async () => { // ~~~~~~~~~~~~~ [ts] Not all code paths return a value. if (Math.random()) { return 1; } }; ``` Notably, when using return-type annotation, this error does not occur: ```ts async function a(): Promise<number | void> { if (Math.random()) { return 1; } } const b = async (): Promise<number | void> => { if (Math.random()) { return 1; } }; ``` In our real-world scenario, it would not be sufficient to look for this syntactic pattern. Rather, the fact that the async function is assigned to a union containing void should be the trigger that silences this error.
Suggestion,Help Wanted
low
Critical
256,073,696
go
x/exp/shiny: driver.Main not returning (and also can be made to panic unexpectedly)
Please answer these questions before submitting your issue. Thanks! See below. ### What version of Go are you using (`go version`)? go version go1.9 darwin/amd64 ### Does this issue reproduce with the latest release? Yes. ### What operating system and processor architecture are you using (`go env`)? GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/william" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/60/zldw5qqn401b20vjmzxx1_140000gn/T/go-build661525149=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" 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" ### What did you do? Below are simplified fully runnable programs that illustrate the issue. I'm trying to add cleanup code after the function passed to driver.Main returns. The documentation for driver.Main sates that "It returns when f returns." However, when returning from the passed-in function (closure), the program exits. In lieu of cleanup code, I'm using print statements in the example code below. Although I could achieve what I need using a defer call in the passed-in function (closure), there still seems to be a bug (or at any rate, a documentation bug) worth reporting. For additional information, see this thread on go-nuts between Dave MacFarlane (who encouraged me to file this report) and me: https://groups.google.com/forum/#!topic/golang-nuts/DmEV4K3xIZY If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. Here is the first illustration program (since this is a shiny based program, using the go playground won't work, I don't think): package main import ( "fmt" "golang.org/x/exp/shiny/driver" "golang.org/x/exp/shiny/screen" ) func main() { fmt.Println("Starting.") driver.Main(func(s screen.Screen) { fmt.Println("I'm printed; you can see me.") return }) fmt.Println("I'm not printed; alas, I can't be seen.") } ### What did you expect to see? All three print statements being called. ### What did you see instead? Only the first two were called. After adding code to create a window and running it, it panics. That is, this code (note there's also one more print statement than the code above): package main import ( "fmt" "log" "golang.org/x/exp/shiny/driver" "golang.org/x/exp/shiny/screen" ) func main() { fmt.Println("Starting.") driver.Main(func(s screen.Screen) { fmt.Println("I'm printed; you can see me.") w, err := s.NewWindow(&screen.NewWindowOptions{Title: "I Don't Return"}) if err != nil { log.Fatal(err) } defer w.Release() fmt.Println("You can see me too.") return }) fmt.Println("I'm not printed; alas, I can't be seen.") } produces this: william@hardy% go run main.go Starting. I'm printed; you can see me. You can see me too. panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x40bab37] goroutine 1 [running, locked to thread]: golang.org/x/exp/shiny/driver/gldriver.preparedOpenGL(0x4555610, 0x463cd10, 0x1) /Users/william/src/golang.org/x/exp/shiny/driver/gldriver/cocoa.go:91 +0xb7 golang.org/x/exp/shiny/driver/gldriver._cgoexpwrap_78313b9f6607_preparedOpenGL(0x4555610, 0x463cd10, 0x1) golang.org/x/exp/shiny/driver/gldriver/_obj/_cgo_gotypes.go:345 +0x3f golang.org/x/exp/shiny/driver/gldriver._Cfunc_startDriver() golang.org/x/exp/shiny/driver/gldriver/_obj/_cgo_gotypes.go:305 +0x41 golang.org/x/exp/shiny/driver/gldriver.main(0x4108530, 0x0, 0xc420053f10) /Users/william/src/golang.org/x/exp/shiny/driver/gldriver/cocoa.go:107 +0x51 golang.org/x/exp/shiny/driver/gldriver.Main(0x4108530) /Users/william/src/golang.org/x/exp/shiny/driver/gldriver/gldriver.go:26 +0x2f golang.org/x/exp/shiny/driver.main(0x4108530) /Users/william/src/golang.org/x/exp/shiny/driver/driver_darwin.go:15 +0x2b golang.org/x/exp/shiny/driver.Main(0x4108530) /Users/william/src/golang.org/x/exp/shiny/driver/driver.go:24 +0x2b main.main() /Users/william/src/play/shiny/main.go:15 +0x7b exit status 2 william@hardy% I don't see any documentation to think that this should be expected. It may have something to do with lifecycle events not being called. I also had a very similar panic when calling Send on the window's Event.Deque from another goroutine (one that was started from within the closure passed to driver.Main). I figured that that goroutine was calling Send too soon, i.e., before certain lifecycle events were placed on the EventDeque, but I'm only guessing. The panic doesn't occur if I add code to process the events from the window's EventDeque, but the original issue of driver.Main not returning still persists. That is, this code: package main import ( "fmt" "image" "log" "golang.org/x/exp/shiny/driver" "golang.org/x/exp/shiny/screen" "golang.org/x/mobile/event/key" "golang.org/x/mobile/event/lifecycle" "golang.org/x/mobile/event/paint" "golang.org/x/mobile/event/size" ) func main() { fmt.Println("Starting.") driver.Main(func(s screen.Screen) { fmt.Println("I'm printed; you can see me.") w, err := s.NewWindow(&screen.NewWindowOptions{Title: "I Don't Return"}) if err != nil { log.Fatal(err) } defer w.Release() var b screen.Buffer defer func() { if b != nil { b.Release() } }() fmt.Println("You can see me too.") for { switch e := w.NextEvent().(type) { case lifecycle.Event: if e.To == lifecycle.StageDead { return } case key.Event: if e.Direction == key.DirPress && e.Modifiers == key.ModMeta { switch e.Code { case key.CodeQ: return } } case paint.Event: w.Upload(image.Point{}, b, b.Bounds()) w.Publish() case size.Event: if b != nil { b.Release() } b, err = s.NewBuffer(e.Size()) if err != nil { log.Fatal(err) } case error: log.Print(e) } } }) fmt.Println("I'm not printed; alas, I can't be seen.") } produces this: william@hardy% go run main.go Starting. I'm printed; you can see me. You can see me too. and I just get my prompt back after either choosing the Quit menu option on the top menu bar or hitting Command-Q. That is, the last print statement never gets called. I understand that shiny is experimental and also that development has somewhat paused recently. However, I still think it's worthwhile submitting this report. Please let me know if I can be of any help. Thanks, William
NeedsInvestigation
low
Critical
256,100,268
vscode
Smart Tabs - Feature Request
Some editors support what's called "smart tabs." The spec for vscode might look like the following: >Indentation defined by the nesting of code blocks is made of tabs, while any alignment that follows is made only of spaces. Conceptually, this would ensure that mixed tabs and spaces for indentation would never occur. ![tabs-vs-spaces](https://cloud.githubusercontent.com/assets/1058243/18036844/49a9426c-6d3b-11e6-98ae-2c9c3db623ae.gif) [IntelliJ IDEA | Tabs and Indents | Smart Tabs](https://www.jetbrains.com/help/idea/2017.1/code-style-java.html#tabs_and_indents) _Related discussion: https://github.com/editorconfig/editorconfig/issues/323#issuecomment-327935294_
feature-request,editor-core
medium
Critical
256,156,310
opencv
Conversion from BGR to YUV 4:2:2
##### System information (version) - OpenCV => 3.3 - Operating System / Platform => - - Compiler => - ##### Detailed description There is a conversion from YUV 4:2:2 to BGR, but not in the opposite direction. ##### Steps to reproduce `COLOR_BGR2YUV_I420` has `COLOR_YUV2BGR_I420` for the opposite direction, while there is no `COLOR_BGR2YUV_Y422` for `COLOR_YUV2BGR_Y422`. I would kindly suggest to include a conversion ID `COLOR_BGR2YUV_Y422` for `cvtColor`.
feature,category: imgproc
low
Major
256,234,284
opencv
cv::ocl::attachContext can only be used once & the woes of using the singleton pattern
##### System information (version) - OpenCV => 3.3 - Operating System / Platform => Mac OS X 10.12.6 BuildVersion 16G29 - Compiler => Apple LLVM version 8.1.0 (clang-802.0.42) ##### Detailed description *FYI: Example output used in description is excerpt from the full output linked below.* This issue I stumbled upon whilst trying to write some unit tests, for an image processing pipeline that I'd neatly packaged into a standalone class. This class is responsible for setting up an OpenCL context with OpenGL sharing, e.g.: ```c cl_context_properties contextProps[] = { CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE, (cl_context_properties) CGLGetShareGroup(CGLGetCurrentContext()), 0 }; ``` Subsequently attaching it to OpenCV with `cv::ocl::attachContext` and then handling the actual processing. Setting up and tearing down instances of this class in test, was producing errors left and right, so I decided to do some spelunking in `cv::ocl` to see what was going on. Then I came upon the use of [CV_SINGLETON_LAZY_INIT](https://github.com/opencv/opencv/blob/3.3.0/modules/core/src/precomp.hpp#L310), for a lot of the `getDefault` methods used in `cv::ocl`. As can be seen from the example attached, since `OpenCLAllocator` is in fact instantiated via this singleton pattern, it makes it impossible to actually use `cv::ocl::attachContext`, more than once in the lifetime of a program. First time around it allocates an OpenCL buffer for the `UMatData`: ``` OpenCL allocate 12288 (0x3000) bytes: 0x7fd92af2b550 ``` Using the initially created OpenCL context: ``` Created context (cl_context): 0x7fd92af0cc80 ``` But the second time around, it tries to reuse the buffer since it's saved in the buffer pool: ``` Reuse reserved buffer: 0x7fd92af2b550 ``` The problem is then, that the buffer was orphaned when the initial OpenCL context got destroyed, and is thus no longer valid under the new: ``` Created context (cl_context): 0x7fd92af2cc10 ``` This inevitably leads to OpenCL errors like this: ``` [CL_INVALID_CONTEXT] : OpenCL Error : clEnqueueWriteBuffer failed: cl_mem object belongs to a different context 0x7fd92af0cc80 than the queue's context 0x7fd92af2cc10.make: *** [default] Abort trap: 6 ``` I didn't go further with this example, but I'd image that `cv::ocl::Queue` suffers the same issue, since it as well, is attached as a singleton to the global `CoreTLSData` as well. --- Now then, is the question of how to solve this problem. On one hand using singletons like this makes it a lot easier to write methods of the `getDefault` family. On the other hand, it's a leaky abstraction, that forces consumers of the library to use the same pattern in client code as well. Singletons are inherently the nemesis of unit testing and google can quickly provide troves of reading, on the trials and tribulations of people using them. Highest ranking write-up is probably by Brian Button on [Why Singletons are Evil](https://blogs.msdn.microsoft.com/scottdensmore/2004/05/25/why-singletons-are-evil) I see a couple of ways this could be approached. A. An easy way; making single{ton} use an explicit requirement for consumers setting up custom OpenCL contexts, through beefing up the documentation of the `cv::ocl` module and explicitly `cv::ocl::attachContext`. B. A hard way; rewriting the lifetime management part of the various classes of the module, to all live and die with the OpenCL context they got created under. The various `getDefault` methods would have to somehow tie back to the default context instance, which would have to centrally keep track of things. C. A ? way; figure out a way to share OpenCL memory objects between different contexts, like with `gl_sharing`. (I'll admit to not having looked into this enough to know if it's even possible) --- I wouldn't mind trying to tackle B, but I would definitely need some supervision/guidance if that's the way to go. Thoughts? CC @alalek @ilya-lavrenov @apavlenko @vpisarev ##### Steps to reproduce Minimal example program available in this gist (also attached as .zip): https://gist.github.com/rhardih/8cef29ccefe7af9166a2aa03799ca3ec [8cef29ccefe7af9166a2aa03799ca3ec-a0e1354dd4db24d01ccd2cf144fcb070c9926236.zip](https://github.com/opencv/opencv/files/1287661/8cef29ccefe7af9166a2aa03799ca3ec-a0e1354dd4db24d01ccd2cf144fcb070c9926236.zip)
category: ocl,RFC
low
Critical
256,246,503
go
runtime: avoid functions forbidden on Windows 10 UWP
### What version of Go are you using (`go version`)? go version go1.9 windows/amd64 ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? ``` set GOARCH=amd64 set GOBIN= set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=C:\Users\maxr\go set GORACE= set GOROOT=C:\Go set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64 set GCCGO=gccgo set CC=gcc set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\maxr\AppData\Local\Temp\go-build474350779=/tmp/go-build -gno-record-gcc-switches set CXX=g++ set CGO_ENABLED=1 set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config ``` ### What did you do? 1. Created static library with func defined in Go and exported to be used in C++ Command line: `go build -buildmode=c-archive puregodll.go` 2. Linked `puregodll.a` static library generated on previous step into the shared MinGW dll library. Command line: ``` gcc -dumpspecs | sed -e 's/-lmingwex/-lwinstorecompat -lmingwex -lwinstorecompat -lole32 -lruntimeobject/' >./specfile gcc -specs=./specfile -shared -o goDLL.dll goDLL.c -Wl,--dynamicbase -Wl,--whole-archive puregodll.a -Wl,--no-whole-archive -lWinMM -lntdll -lWS2_32 -lsetupapi ``` It produces `goDLL.dll` as result. 3. Running script to adjust binary PE header of produced `goDLL.dll` to be compatible with Windows 10 UWP platform (it expects `appcontainer` bit set in PE header) 4. Created Windows 10 UWP project with latest Visual Studio 2017 and P/Invoke `goDLL.dll` to call func initially defined in `puregodll.go` 5. Run Windows Store Certification Kit for `Supported APIs Test` on generated Windows Store appx bundle and getting list of forbidden API calls, it seems, used in go-runtime: ``` API AddVectoredExceptionHandler in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API ExitProcess in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API FreeEnvironmentStringsW in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API GetConsoleMode in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API GetEnvironmentStringsW in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API GetProcessAffinityMask in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API GetStdHandle in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API LoadLibraryA in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API RtlAddFunctionTable in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API RtlCaptureContext in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API RtlVirtualUnwind in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API SetConsoleCtrlHandler in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API SetProcessPriorityBoost in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API VirtualAlloc in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API WriteConsoleW in kernel32.dll is not supported for this application type. goDLL.dll calls this API. API timeBeginPeriod in winmm.dll is not supported for this application type. goDLL.dll calls this API. API timeEndPeriod in winmm.dll is not supported for this application type. goDLL.dll calls this API. ``` ### What did you expect to see? I expect to have a way for go runtime to not use API calls which are forbidden on Windows 10 UWP platform
help wanted,OS-Windows,NeedsInvestigation,compiler/runtime
medium
Critical
256,249,057
vscode
Debug console link detection issues
Also consider a way for extensions to contribute link detection rules
debug,debt,debug-console
medium
Critical
256,296,281
puppeteer
Get ssl certificate
I am unable to get ssl certificate. I went through all the documentation and response object I couldn't figure out a way to get SSL certificate. I would like to inspect the details of SSL certificate. Is it even possible with current puppeteer API? No luck on stackoverflow: https://stackoverflow.com/questions/46108756/how-to-access-ssl-certificate-content-using-chrome-puppeteer
feature,chromium,P3
low
Major
256,321,315
kubernetes
Storage upgrade mechanism
Before we remove an API object version, we need to be certain that all stored objects have been upgraded to a version that will be readable in the future. The old plan for that was to run the cluster/upgrade-storage-objects.sh script after each upgrade. Unfortunately, there are a number of problems with this: * The script is old and incomplete, as api authors haven't been consistently adding their API objects to it (no doubt due to a lack of documentation in the right places). * Instructions to run the script in the release notes have been spotty. * We believe not all distributions have been running the script after upgrades. Therefore, we need to design a robust solution for this problem, which works in the face of HA installations, user-provided apiservers, rollbacks, patch version releases, etc. Probably this won't look much like a script that you run after an upgrade, instead it may look more like a system where apiservers come to consensus on the desired storage version, plus a controller that does the job that script was supposed to do after a consensus change. In the mean time, **it is not safe to remove API object versions, so we are instating a moratorium on API object version removal until this system is in place**. (Deprecations are still fine.)
priority/important-soon,sig/network,sig/api-machinery,kind/api-change,kind/feature,lifecycle/frozen
medium
Critical
256,341,383
opencv
Documentation issue
related issues : #9520 ##### Detailed description link to documentation page : http://docs.opencv.org/master/d1/d10/classcv_1_1MatExpr.html#details link to source code: https://github.com/opencv/opencv/blob/2ac57a2b1fc0b49ddd07f3e3633461fcab5fc3f0/modules/core/include/opencv2/core/mat.hpp#L3456-L3459 "The result of comparison is an 8-bit single channel..." explanation is true when the source is gray image. **TO DO :** need more explanation about when the source is color image ##### Steps to reproduce ``` Mat mask = imread("lena.jpg", IMREAD_GRAYSCALE)>127; imshow("gray", mask); mask = imread("lena.jpg")>127; imshow("color", mask); waitKey(); ``` ![gray](https://user-images.githubusercontent.com/12151541/30226640-7292a1ce-94df-11e7-8fea-c83b5b710459.png) ![mask](https://user-images.githubusercontent.com/12151541/30226197-d0768d2a-94dd-11e7-8420-c3b86b1bfe15.jpg)
feature,category: documentation
low
Minor
256,348,357
nvm
CentOS issues with ls-remote and install
<!-- Thank you for being interested in nvm! Please help us by filling out the following form if you‘re having trouble. If you have a feature request, or some other question, please feel free to clear out the form. Thanks! --> - Operating system and version: CentOS 5.10 - `nvm debug` output: <details> ```sh nvm --version: v0.33.4 $SHELL: /bin/bash $HOME: /data/jenkins $NVM_DIR: '$HOME/.nvm' $PREFIX: '' $NPM_CONFIG_PREFIX: '' $NVM_NODEJS_ORG_MIRROR: '' $NVM_IOJS_ORG_MIRROR: '' shell version: 'GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)' uname -a: 'Linux 2.6.18-371.12.1.el5 #1 SMP Wed Sep 3 16:22:34 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux' OS version: CentOS release 5.10 (Final) curl: /usr/bin/curl, curl 7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 wget: /usr/bin/wget, GNU Wget 1.11.4 Red Hat modified sed: invalid option -- E Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]... -n, --quiet, --silent suppress automatic printing of pattern space -e script, --expression=script add the script to the commands to be executed -f script-file, --file=script-file add the contents of script-file to the commands to be executed -i[SUFFIX], --in-place[=SUFFIX] edit files in place (makes backup if extension supplied) -c, --copy use copy instead of rename when shuffling files in -i mode (avoids change of input file ownership) -l N, --line-length=N specify the desired line-wrap length for the `l' command --posix disable all GNU extensions. -r, --regexp-extended use extended regular expressions in the script. -s, --separate consider files as separate rather than as a single continuous long stream. -u, --unbuffered load minimal amounts of data from the input files and flush the output buffers more often --help display this help and exit --version output version information and exit If no -e, --expression, -f, or --file option is given, then the first non-option argument is taken as the sed script to interpret. All remaining arguments are names of input files; if no input files are specified, then the standard input is read. E-mail bug reports to: [email protected] . Be sure to include the word ``sed'' somewhere in the ``Subject:'' field. git: , git version 2.1.3 nvm current: system which node: /usr/bin/node which iojs: which: no iojs in (/local/bin:/local/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin) which npm: /usr/bin/npm npm config get prefix: /opt/node-v6.11.2-linux-x64 npm root -g: /opt/node-v6.11.2-linux-x64/lib/node_modules ``` </details> - `nvm ls` output: <details> <!-- do not delete the following blank line --> ```sh ``` </details> - How did you install `nvm`? (e.g. install script in readme, homebrew): Shell script following the readme <details> ```sh git clone https://github.com/creationix/nvm.git ${NVM_DIR} git -C ${NVM_DIR} checkout --quiet v0.33.4 . ${NVM_DIR}/nvm.sh nvm ls-remote ``` </details> - What steps did you perform? nvm ls-remote and nvm install - What happened? On these CentOS boxes, nvm ls-remote breaks for me as of version 0.33.3 and nvm install breaks for me as of version 0.31.1. The nvm ls-remote command returns "N/A". Checking the connection to https://nodejs.org/dist/ with curl works fine. Using version 0.31.0 works so far. - What did you expect to happen? The commands should work as usual. - Is there anything in any of your profile files (`.bashrc`, `.bash_profile`, `.zshrc`, etc) that modifies the `PATH`? <!-- if this does not apply, please delete this section --> - If you are having installation issues, or getting "N/A", what does `curl -I --compressed -v https://nodejs.org/dist/` print out? <details> ```sh * About to connect() to nodejs.org port 443 * Trying 104.20.22.46... connected * Connected to nodejs.org (104.20.22.46) port 443 * successfully set certificate verify locations: * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * SSLv3, TLS handshake, Client hello (1): SSLv3, TLS handshake, Server hello (2): SSLv3, TLS handshake, CERT (11): SSLv3, TLS handshake, Server finished (14): SSLv3, TLS handshake, Client key exchange (16): SSLv3, TLS change cipher, Client hello (1): SSLv3, TLS handshake, Finished (20): SSLv3, TLS change cipher, Client hello (1): SSLv3, TLS handshake, Finished (20): SSL connection using AES128-SHA * Server certificate: * subject: /OU=Domain Control Validated/OU=PositiveSSL Wildcard/CN=*.nodejs.org * start date: 2017-08-14 00:00:00 GMT * expire date: 2019-11-20 23:59:59 GMT * subjectAltName: nodejs.org matched * issuer: /C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA * SSL certificate verify ok. > HEAD /dist/ HTTP/1.1 > User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 > Host: nodejs.org > Accept: */* > Accept-Encoding: deflate, gzip > < HTTP/1.1 200 OK < Date: Fri, 08 Sep 2017 19:22:03 GMT < Content-Type: text/html < Connection: keep-alive < Set-Cookie: __cfduid=d688cbe20209e376ee613b24e849ed9bc1504898523; expires=Sat, 08-Sep-18 19:22:03 GMT; path=/; domain=.nodejs.org; HttpOnly < CF-Cache-Status: HIT < Vary: Accept-Encoding < Expires: Fri, 08 Sep 2017 23:22:03 GMT < Cache-Control: public, max-age=14400 < Server: cloudflare-nginx < CF-RAY: 39b4463e8e82559a-ORD < Content-Encoding: gzip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connection #0 to host nodejs.org left intact * Closing connection #0 * SSLv3, TLS alert, Client hello (1): HTTP/1.1 200 OK Date: Fri, 08 Sep 2017 19:22:03 GMT Content-Type: text/html Connection: keep-alive Set-Cookie: __cfduid=d688cbe20209e376ee613b24e849ed9bc1504898523; expires=Sat, 08-Sep-18 19:22:03 GMT; path=/; domain=.nodejs.org; HttpOnly CF-Cache-Status: HIT Vary: Accept-Encoding Expires: Fri, 08 Sep 2017 23:22:03 GMT Cache-Control: public, max-age=14400 Server: cloudflare-nginx CF-RAY: 39b4463e8e82559a-ORD Content-Encoding: gzip ``` </details>
needs followup
low
Critical
256,391,882
kubernetes
kubectl logs should allow -f, -l, and -c together
Seriously, I need it to draw some kind of truth table or something about what's allowed. Why do we have so many restrictions? ```console % kc logs -f -nsonobuoy -lsonobuoy-plugin=e2e error: only one of follow (-f) or selector (-l) is allowed See 'kubectl logs -h' for help and examples. % kc logs -nsonobuoy -lsonobuoy-plugin=e2e Error from server (BadRequest): a container name must be specified for pod sonobuoy-e2e-job-533c18a33be34f79, choose one of: [e2e sonobuoy-worker] % kc logs -nsonobuoy -lsonobuoy-plugin=e2e -c e2e error: a container cannot be specified when using a selector (-l) See 'kubectl logs -h' for help and examples. # OK, this one is fixed at head ``` And this works just fine, so it really strike me as strange that kubectl won't do it for me. ```console % kc logs -nsonobuoy -f $(kc get pod -oname -nsonobuoy -lsonobuoy-plugin=e2e) -c e2e ``` /kind feature @kubernetes/sig-cli-feature-requests
area/kubectl,kind/feature,sig/cli,lifecycle/frozen
high
Critical
256,429,406
rust
rustc -C opt-level=3 generates bad assembly code for `Vec` by default
Compiling the following C++ snippet with `clang++ -O3` and `g++ -O3` ([see here](https://godbolt.org/g/kHYXQ8)): ```c++ #include <vector> unsigned foo() { std::vector<unsigned> a; a.push_back(314); return a[0]; } ``` generates this assembly on x86_64: ```asm foo(): # @foo() push rax mov edi, 4 call operator new(unsigned long) mov rdi, rax call operator delete(void*) mov eax, 314 pop rcx ret ``` (note: clang generates perfect assembly even with [multiple push backs](https://godbolt.org/g/4ucchT), the only thing that seems to trip it is [a reallocation](https://godbolt.org/g/fhrLZm)) This snippet compiled with `rustc --C opt-level=3` ([see here](https://godbolt.org/g/5KyzyL)): ```rust pub fn foo() -> u32 { let mut v: Vec<u32> = Vec::new(); v.push(0); v[0] } ``` generates the following assembly: ```asm <alloc::raw_vec::RawVec<T, A>>::double: push rbp mov rbp, rsp push r14 push rbx sub rsp, 64 mov r14, rdi mov rbx, qword ptr [r14 + 8] test rbx, rbx je .LBB0_6 lea rsi, [4*rbx] lea rcx, [8*rbx] mov rdi, qword ptr [r14] lea r9, [rbp - 40] mov edx, 4 mov r8d, 4 call __rust_realloc@PLT test rax, rax je .LBB0_4 add rbx, rbx jmp .LBB0_3 .LBB0_6: lea rdx, [rbp - 40] mov edi, 16 mov esi, 4 call __rust_alloc@PLT test rax, rax je .LBB0_8 mov ebx, 4 .LBB0_3: mov qword ptr [r14], rax mov qword ptr [r14 + 8], rbx add rsp, 64 pop rbx pop r14 pop rbp ret .LBB0_4: mov rax, qword ptr [rbp - 40] movups xmm0, xmmword ptr [rbp - 32] movaps xmmword ptr [rbp - 64], xmm0 mov qword ptr [rbp - 40], rax movaps xmm0, xmmword ptr [rbp - 64] jmp .LBB0_5 .LBB0_8: movups xmm0, xmmword ptr [rbp - 32] movaps xmmword ptr [rbp - 64], xmm0 movaps xmm0, xmmword ptr [rbp - 64] movaps xmmword ptr [rbp - 80], xmm0 movaps xmm0, xmmword ptr [rbp - 80] .LBB0_5: movups xmmword ptr [rbp - 32], xmm0 lea rdi, [rbp - 40] call <alloc::heap::Heap as alloc::allocator::Alloc>::oom core::ptr::drop_in_place: push rbp mov rbp, rsp mov rsi, qword ptr [rdi + 8] test rsi, rsi je .LBB1_1 mov rdi, qword ptr [rdi] shl rsi, 2 mov edx, 4 pop rbp jmp __rust_dealloc@PLT .LBB1_1: pop rbp ret <alloc::heap::Heap as alloc::allocator::Alloc>::oom: push rbp mov rbp, rsp sub rsp, 32 mov rax, qword ptr [rdi + 16] mov qword ptr [rbp - 16], rax movups xmm0, xmmword ptr [rdi] movaps xmmword ptr [rbp - 32], xmm0 lea rdi, [rbp - 32] call __rust_oom@PLT example::foo: push rbp mov rbp, rsp push rbx sub rsp, 24 mov qword ptr [rbp - 32], 4 xorps xmm0, xmm0 movups xmmword ptr [rbp - 24], xmm0 lea rdi, [rbp - 32] call <alloc::raw_vec::RawVec<T, A>>::double mov rdi, qword ptr [rbp - 32] mov rax, qword ptr [rbp - 16] mov dword ptr [rdi + 4*rax], 0 inc rax mov qword ptr [rbp - 16], rax je .LBB3_2 mov ebx, dword ptr [rdi] mov rsi, qword ptr [rbp - 24] test rsi, rsi je .LBB3_6 shl rsi, 2 mov edx, 4 call __rust_dealloc@PLT .LBB3_6: mov eax, ebx add rsp, 24 pop rbx pop rbp ret .LBB3_2: lea rdi, [rip + panic_bounds_check_loc.2] xor esi, esi xor edx, edx call core::panicking::panic_bounds_check@PLT mov rbx, rax lea rdi, [rbp - 32] call core::ptr::drop_in_place mov rdi, rbx call _Unwind_Resume@PLT GCC_except_table3: .byte 255 .byte 155 .asciz "\234" .byte 3 .byte 26 .long .Ltmp29-.Lfunc_begin3 .long .Ltmp32-.Ltmp29 .long .Ltmp33-.Lfunc_begin3 .byte 0 .long .Ltmp32-.Lfunc_begin3 .long .Lfunc_end3-.Ltmp32 .long 0 .byte 0 str.1: .ascii "/checkout/src/liballoc/vec.rs" panic_bounds_check_loc.2: .quad str.1 .quad 29 .long 1555 .long 10 DW.ref.rust_eh_personality: .quad rust_eh_personality ``` I've tried adding `-lto` and `-C panic=abort` to rustc without much luck. I've also tried replacing `[0]` with `unsafe { *v.get_unchecked(0) }` without any luck. The only thing that makes it generate good assembly is using `Vec::with_capacity(N)` ([see here](https://godbolt.org/g/uBwV5b)): ```rust pub fn foo() -> u32 { let mut v: Vec<u32> = Vec::with_capacity(3); v.push(7); v.push(4); v[1] } ``` generates ```asm example::foo: push rbp mov rbp, rsp mov eax, 4 pop rbp ret ```
I-slow,C-enhancement,A-codegen,T-compiler,C-optimization
medium
Critical
256,434,660
angular
ng-host
## Proposal I'd like an `<ng-host>` that would act in a similar way as the `:host` css property. That would apply **directives** and **classes** to the host component. [Related #8785 ](https://github.com/angular/angular/issues/8785) ## Current behavior #### my-component.template.ts ``` <div>1</div> <div>2</div> ``` Currently to apply a class `flex` to the host component one can 1. use `host` in the component decorator (or `@HostBinding)`; 2. use a wrapping element 3. apply the class on the host from the parent template. All of which are suboptimal. #### 1. Host ``` @Component({ //... host: { class : 'flex' } }) ``` (Same applies for `@HostBinding()`). Class declarations belongs in my template. Directives don't work here #### 2. Wrapper ``` <div class="flex"> <div>1</div> <div>2</div> </div> ``` Adds an additional tag. #### 3. Defining in parent ``` <my-component class="flex"> ``` Leaks implementation outside the component itself. ## Expected behavior ``` <ng-host class="flex"> <div>1</div> <div>2</div> <ng-host> ``` result ``` <my-component class="flex"> <div>1</div> <div>2</div> </my-component> ``` ## Compiling wrong usages #### 1. multiple ng-host ``` <ng-host class="flex"><ng-host> <ng-host class="flexEnd"> <div>1</div> <div>2</div> <ng-host> ``` #### 2. Multiple ng-host nested ``` <ng-host class="flex"> <ng-host class="flexEnd"> <div>1</div> <div>2</div> <ng-host> <ng-host> ``` #### 3. ng-host not used as the topmost component ``` <div> 1 <ng-host class="flex flexEnd"><ng-host> </div> <div>2</div> ``` #### solution 1 Strictly speaking it would make sens to have those be invalid. #### solution 2 `ng-host` act as a strict link to the host. Meaning that the above scenarios would result, in all cases, in this ``` <my-component class="flex flexEnd"> <div>1</div> <div>2</div> </my-component> ``` Thus when the compiler finds a `ng-host` element it just links whatever it finds to the host. No matter where it's put. I find this a bit less intuitive but could be easier to implement. #### solution 3 ``` <li> <ng-host></ng-host> </li> ``` compiles to this ``` <li><my-component></my-component></li> ```
feature,area: core,core: host and host bindings,feature: under consideration
medium
Critical