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
137,714,699
rust
Surprising lifetime inference with closures
The following code fails to compile due to a lifetime error: the intent is for the closure to mutably borrow the variable only until it returns, but somehow the lifetime of the borrow gets inferred to last as long as the variable itself. ``` rust fn main() { let func = |a| { a; }; //let func = |a: &mut u32| { a; }; //let func = |a| { }; let mut what: u32 = 2; loop { func(&mut what); } } ``` ``` a.rs:7:19: 7:23 error: `what` does not live long enough a.rs:7 func(&mut what); ^~~~ a.rs:2:27: 9:2 note: reference must be valid for the block suffix following statement 0 at 2:26... a.rs:2 let func = |a| { a; }; a.rs:3 //let func = |a| { }; a.rs:4 //let func = |a: &mut u32| { a; }; a.rs:5 let mut what: u32 = 2; a.rs:6 loop { a.rs:7 func(&mut what); ... a.rs:5:27: 9:2 note: ...but borrowed value is only valid for the block suffix following statement 1 at 5:26 a.rs:5 let mut what: u32 = 2; a.rs:6 loop { a.rs:7 func(&mut what); a.rs:8 } a.rs:9 } ``` Either of the commented alternatives makes compilation succeed. The first, making the lifetime signature (semi-)explicit, makes sense; it's odd that simply removing a useless reference to the variable also works, though. Anyway, while I don't know how the lifetime inference algorithm works, and in particular I don't know whether improving the situation could impact backwards compatibility, it's surprising to me that it can't figure out a reasonable lifetime in this case.
A-lifetimes,A-closures,T-compiler,C-bug,D-confusing
low
Critical
137,740,847
go
runtime: let idle OS threads exit
1. What version of Go are you using (`go version`)? 1.5.3, 1.6 2. What operating system and processor architecture are you using (`go env`)? x86_64 - OSX and Linux 3. What did you do? Any golang program will create a new OS thread when it needs to if things are blocked. But these threads aren't ever destroyed. For example, a program using 7 goroutines might have 40+ OS threads hanging around. The numbers will surely get much higher as traffic fluctuates against a golang server process throughout the day. 4. What did you expect to see? Once an OS thread has been idle long enough, I would have expected it to be destroyed. Being recreated if needed. Expanding and contracting like the relationship between the heap and GC. 5. What did you see instead? The many OS threads that were created hang around even with an idle program and very few goroutines. --- After doing some reading into other (closed) issues on this repo dating back to 2012 - including the one where `SetMaxThreads` was introduced - I'm curious, why keep the OS threads around instead of cleaning them up?
NeedsDecision
medium
Critical
137,769,711
rust
fn pointer coercion fails for method on type with lifetime
The following code does not infer the type of the method correctly: ``` rust /* <anon>:12:31: 12:45 error: mismatched types: expected `fn(MyStruct<'_>)`, found `fn(MyStruct<'_>) {MyStruct<'a>::func}` (expected concrete lifetime, found bound lifetime parameter ) [E0308] <anon>:12 let fails: fn(MyStruct) = MyStruct::func; // ERROR: mismatched types ^~~~~~~~~~~~~~ <anon>:12:31: 12:45 help: see the detailed explanation for E0308 */ struct MyStruct<'a> { y: &'a u32, } impl<'a> MyStruct<'a> { pub fn func(self) {} } fn wrapper<'a>(x: MyStruct<'a>) { x.func() } fn main() { let fails: fn(MyStruct) = MyStruct::func; // ERROR: mismatched types let works: fn(MyStruct) = wrapper; } ``` As one can see in the error message (**found `fn(MyStruct<'_>) {MyStruct<'a>::func}`**), it seems that the compiler is getting confused when inferring the type of the expression. If the lifetime from MyStruct is removed, the code compiles fine. **PS:** Thanks to `huon` for simplifying the example demonstrating the issue
A-lifetimes,C-bug
low
Critical
137,805,067
java-design-patterns
Collector State Pattern
**Description:** The Collector State design pattern is a behavioral design pattern used in real-time software to manage scenarios where a sequence of messages needs to be collected before initiating further actions. Key elements include: - **Collected Message Handler:** Receives and processes messages, starts and stops timers, and decides when the collection is complete. - **Timeout Handler:** Manages timeout events, determining the status of the collection (success or failure). This pattern is particularly useful in situations like digit collection for call routing, where messages are collected and processed based on specific conditions and timeouts. **References:** - [Collector State Pattern](https://www.eventhelix.com/design-patterns/collector-state/) - [Java Design Patterns Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki) **Acceptance Criteria:** 1. Implement the basic structure of the Collector State design pattern, including the Collected Message Handler and Timeout Handler. 2. Provide a working example demonstrating the usage of the Collector State pattern with unit tests to ensure functionality. 3. Ensure the implementation adheres to the project's contribution guidelines as outlined in the [java-design-patterns wiki](https://github.com/iluwatar/java-design-patterns/wiki).
epic: pattern,type: feature
low
Critical
137,827,118
thefuck
psutil: platform cygwin is not supported (thefuck won't install on Cygwin)
Hi, I'm on Cygwin trying to install `thefuck`, but I get the following output when running `pip install thefuck`: ``` [project (master)] pip install thefuck You are using pip version 6.1.1, however version 8.0.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting thefuck Using cached thefuck-3.3-py2.py3-none-any.whl Collecting psutil (from thefuck) Using cached psutil-4.0.0.tar.gz Complete output from command python setup.py egg_info: platform cygwin is not supported ``` Do you have any idea how I could fix this? I'm willing to work on this myself but I'm not sure where I should start. Any help would be greatly appreciated. EDIT: I also tried installing it using `pip3` but it gave the same error. Any have experience on getting `thefuck` running on the latest 64-bits Cygwin?
windows
low
Critical
137,912,726
TypeScript
Decorators not allowed classes expressions
Not sure if this is by design or not, but the following gives a compile error of "Decorators are not valid here" with TypeScript 1.8: ``` ts let testClass = new class { testMethod(@myDecorator date: Date): any { return date; } }(); ```
Suggestion,Domain: Decorators,Waiting for TC39
high
Critical
137,938,290
kubernetes
Facilitate ConfigMap rollouts / management
To do a rolling update of a ConfigMap, the user needs to create a new ConfigMap, update a Deployment to refer to it, and delete the old ConfigMap once no pods are using it. This is similar to the orchestration Deployment does for ReplicaSets. One solution could be to add a ConfigMap template to Deployment and do the management there. Another could be to support garbage collection of unused ConfigMaps, which is the hard part. That would be useful for Secrets and maybe other objects, also. cc @kubernetes/sig-apps-feature-requests
priority/backlog,area/app-lifecycle,sig/apps,sig/service-catalog,area/configmap-api,area/declarative-configuration,lifecycle/frozen
high
Critical
137,956,439
neovim
TUI: cursor shape not correctly initialized and restored
- Neovim version: v0.1.3-293-g576c5f7 - Operating system: Ubuntu Xenial beta - Terminal emulator: vte/gnome-terminal (git master) I have configured my gnome-terminal (in its Profile Preferences dialog) to use an I-Beam cursor. It also inherits from my global Gnome settings that the cursor is blinking. I have NVIM_TUI_ENABLE_CURSOR_SHAPE=1, so that supposedly the cursor is a rectangle in command mode, and I-Beam in insert mode. This is true for the main lifetime of neovim, but is neither initialized correctly on startup, nor reverted correctly on exit. When I start up neovim, the cursor remains what it was before. That is, nvim (incorrectly) assumes it was a solid block, and does not issue the escape sequence that changes it to a block. The fix should be straightforward: initialize the cursor shape when neovim starts up. Upon exit I'm left with a solid block, and that's not what I want to have there, I'd like to get back to my generally preferred cursor shape. The fix here is trickier. There's no way to query or save/restore the cursor shape. In xterm it's probably impossible, since according to http://invisible-island.net/xterm/ctlseqs/ctlseqs.html (-> "Set cursor style (DECSCUSR, VT520)") you can only choose from 6 different modes, numbered from 0 to 6, whereas 0 and 1 are the same. VTE (gnome-terminal et al) intentionally differs here from xterm. Numbers 1-6 work just as in xterm: select a particular mode. However, number 0 means to revert to the terminal emulator's default, as specified in its profile preferences. Of course there's still no guarantee that someone didn't modify the cursor shape by some escape sequence prior to starting up neovim. However, setting mode 0 upon exit would be a nice step towards restoring the previous value in gnome-terminal, whereas it wouldn't hurt xterm. (Note: the parameter 0 can be omitted, "\e[ q" and "\e[0 q" are the same.)
enhancement,tui,has:plan
low
Major
137,991,110
go
x/build: add automated notifications for missing builders to its owner and/or golang-dev
Should the dashbaord send an email to the builder's owner and/or golang-dev when a builder stops sending results for more than some time? The linux/arm64 builder is currently missing, from Feb 24, so is netbsd/386 builder. At the very least, the builder dashboard should show which builders are missing on the web page.
help wanted,Builders,NeedsInvestigation,FeatureRequest
low
Minor
138,202,818
go
x/tools/go/gcimporter15: simplify handling of float constants
The `(*exporter).float(constant.Value)` method of `golang.org/x/tools/go/gcimporter15` is excessively complex and does not handle extreme cases correctly because the abstract `constant.Value` API provides no easy way to access the big.Rat or big.Float that a `Value` contains. The API should make it possible to obtain a big.Float from a constant.Value without thinking about arithmetic. As a side effect, the incorrect cases would go away.
Tools
low
Minor
138,213,835
kubernetes
RFE: Improve ability to associate a resource to its namespace lifetime
An OpenShift user requested the following > > Is there any way to tie resources (pod, pvc, secrets, bc, etc) to it's belonging namespace without looking for namespace's lifetime? > > Today I can do it by watching and recording the create and delete events for a namespace, then associate any resources to that namespace, but it doesn't seams to be the best approach. Namespaces can be destroyed and recreated by a different user with same name. > > I'm looking for something like automatically adding an annotation containing namespace's uid to all resources created inside it (some sort of primary key), as soon as the resource is created. The use cases was to facilitate their ability to build a billing back-end around container and pvc usage. The request was to add something akin to a `metadata.namespaceUid` in a well defined part of every namespaced object so they could differentiate objects across the life of a namespace. @bgrant0607 @smarterclayton - thoughts? to me, it seems like a reasonable request.
sig/api-machinery,lifecycle/frozen
low
Major
138,236,142
go
x/mobile/cmd/gomobile: init doesn't allow for android NDK platform selection
## The Problem I'm working on a prototype android google cardboard app that will need to use OpenGL ES 3.0/3.1 and most of the application is written in Go. I had a prototype up and running using OpenGL ES 2.0 but when I made the switch to ES 3.0 I found that I needed to write my own wrappers. I used the following block at the beginning of the wrapper to include the gl3.h header file: ``` /* #cgo LDFLAGS: -lGLESv3 -lEGL #include <stdlib.h> #include <GLES3/gl3.h> #include <GLES3/gl3ext.h> #include <GLES3/gl3platform.h> */ import "C" ``` What happened was that I would get error messages when compiling in Android Studio with the gomobile bind portion of the process stating that it couldn't find the `<GLES3/glh3.h>` file. When I investigated, it turns out that `gomobile init` for android arm always uses platform-15 from the NDK -- this platform version doesn't include the GLES3 headers because it doesn't support OpenGL ES 3.0 (requires platform 18+, per http://developer.android.com/guide/topics/graphics/opengl.html) ## The Hack 1) I changed `mobile/cmd/gomobile/env.go` ndkConfig to point to platform-19. 2) I changed `mobile/cmd/gomobile/init.go` useStrippedNDK to `false` so that it would download the full NDK as the stripped version doesn't have the platform minimum I needed. With these changes a fresh `gomobile init` caused me to have the right platform headers in `$GOPATH/pkg/gomobile/android-ndk-r10e/arm/sysroot/usr/include` as well as the right libs in the parallel lib directory. From there I was able to compile the OpenGL ES 3.0 wrapper I was making and run the compiled app on my phone using specific gles3 shaders and functions. ## What I Wanted To See After I found the problem to be that `gomobile init` always uses the same platform, I think the best solution for me would be to have a flag for `gomobile init` to specify the platform level to support and another flag to control whether or not the full NDK is downloaded so that you don't have to modify the source code. ## System Details go version go1.6 windows/amd64 set GOARCH=amd64 set GOBIN= set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=C:/gocode set GORACE= set GOROOT=C:\Go set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64 set GO15VENDOREXPERIMENT=1 set CC=gcc set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 set CXX=g++ set CGO_ENABLED=1
NeedsFix,mobile
low
Critical
138,256,350
go
cmd/compile: type checking fails in cycle involving recursive struct and unsafe.Sizeof
package p ``` import "unsafe" type hdr struct { next *msg } type msg struct { hdr pad [1024-hdrsize]uint8 } const hdrsize = unsafe.Sizeof(hdr{}) ``` This should type check but does not: ``` $ go tool compile /tmp/x.go /tmp/x.go:14: invalid type for composite literal: hdr /tmp/x.go:14: invalid expression unsafe.Sizeof(hdr literal) ``` Looks like the compiler gets confused by the not-quite-cycle in the definition. http://play.golang.org/p/Hbmv1j_UrR /cc @RLH
NeedsFix,compiler/runtime
low
Major
138,265,955
vscode
Ctrl-K must cut up to the end of the line into the clipboard
Currently Ctrl-K deletes from cursor to the end of line. Ctrl-K must cut into the clipboard.
feature-request,macos,editor-commands
medium
Critical
138,282,922
go
cmd/link: traverse the symbol table less
@ianlancetaylor commented in CL 20165: > The single slowest operation a linker can do is traverse the symbol table and look at every symbol. The single biggest improvement in link time in the gold linker was changing the number of symbol table traversals from about 25 to about 3. Yet cmd/link traverses the entire symbol table all the time. It's not good. @crawshaw replied: > Agreed. There are a couple of other not good features: > - LSym has a Type word, but it's not filled out until some nebulous intermediate pass, so lots of code (like this) ends up string matching on the symbol name prefix. > - dodata does some odd build-a-linked-list, then sort-the-linked-list-into-segments game. > > I think these problems and the many traversals could be fixed by the object file reader assigning Type and building useful link-wide slices when a symbol is read in. But it is pretty major surgery I'm not ready to perform. I've moved this to an issue, since folks look for work and ideas in issues. cc @mwhudson who likes object files. :)
ToolSpeed
low
Major
138,302,324
go
go/ast: CommentMap should try to update comment positions
When updating nodes in a comment map, comments after that node may have position information that leads to wrong placement. Try to update position information if possible.
NeedsFix
low
Minor
138,304,930
flutter
Toolbar should automatically make an overflow menu
Right now you have to manually determine what to put on the toolbar vs what to put in a popup menu on the toolbar. We could make the toolbar just take a list of menu items with icons and automatically turn some into buttons and the rest into a menu button.
c: new feature,framework,f: material design,P3,team-design,triaged-design
low
Minor
138,341,159
vscode
Hover message/tooltip on ruler when defining decorators
Is there a way to define message/tooltip to be displayed in the `overviewRuler` that is defined when you create a decorator (`createTextEditorDecorationType`)? I found a way to display a `hoverMessage` when you add the decorator itself (`TextEditor.setDecorations`), but the message is displayed at the left side (between the gutter and the text), not in the ruler. This could be an easy way to get information from other places of the document, without scrolling the file. Just move the mouse over the ruler and get the information. Maybe even becoming a _magnifying glass_ :smile: Thanks in advance
feature-request,api,editor-scrollbar
low
Major
138,385,828
go
runtime: add softfloat for mips64?
It seems most mips64 hardware don't have FPU, yet one of our tests test/bench/go1 is very heavy on floating point, so even on a 2GHz mips64 core, that test needs >10mins alone, whereas the whole all.bash completes in ~30mins. The problem is that we're using kernel to trap and emulate every single FP instruction, which has extremely large overhead. I'm wondering if we should introduce softfloat for MIPS64 like what we did for GOARM=5. Implementation problems aside, the biggest question is how to enable or disable softfloat on the toolchain level? Should we introduce a GOMIPS environment variable? Or should we just always use insert calls to _sfloat before any consecutive FP instructions, and make _sfloat does nothing if the system has a FPU? I don't like the way GOARM works and I think it confuses more than it helped. (Esp. modern ARM chips usually contain FPU whereas very few MIPS64 chips contain FPU.) /cc @cherrymui
compiler/runtime
low
Minor
138,448,377
go
compress/gzip: Reader unable to parse headers with long comments
Using `go1.6` RFC 1952 for gzip does not specify a length for the comment and name fields. > If FCOMMENT is set, a zero-terminated file comment is > present. This comment is not interpreted; it is only > intended for human consumption. The comment must consist of > ISO 8859-1 (LATIN-1) characters. Line breaks should be > denoted by a single line feed character (10 decimal). The current implementation is inconsistent: - `gzip.Writer` permits the writing of any length comment/name string in `gzip.Header`. - `gzip.Reader` fails to read any comment/name string in `gzip.Header` longer than 511 bytes. Playground example: https://play.golang.org/p/Zvjf8Q7jXe Change 512 to 511 in the example, and it works again. This causes issues reading gzip files produced by [GZinga](https://github.com/eBay/GZinga), which produces syntactically valid gzip files, but abuses the comment field to store meta data. Update: I have no intention of fixing this unless there is someone who needs this functionality. Whatever fix we do will need to be careful that we don't introduce a potential vector for DOS attacks since gzip is a common `Transfer-Encoding` in HTTP. We don't want an infinitely long comment to cause a server to allocate an infinite amount of memory.
NeedsDecision
low
Major
138,573,918
TypeScript
Expose API for getting JSDoc nodes in TypeScript files
Closure adds various semantic JSDoc annotations that aren't currently modeled by TypeScript, such as @export (unrelated to TS export) and @nosideeffects. https://developers.google.com/closure/compiler/docs/js-for-compiler#overview As part of our tool chain to run TypeScript through Closure we'd like to be able to munge these via the TypeScript API. It appears TypeScript gathers JSDoc comments when parsing JavaScript -- is there a good reason to not gather these in TypeScript as well? Specifically, I believe my suggestion amounts to removing the "if" statement in the below code (though I'm not certain this is the right place) in `parser.ts`: ``` js function addJSDocComment<T extends Node>(node: T): T { if (contextFlags & NodeFlags.JavaScriptFile) { ...all of the code is in here... } } ```
Suggestion,In Discussion,API
medium
Major
138,620,951
nvm
Don't auto-default when system is present?
Perhaps the new "auto-default on nvm install when no default is set" should avoid this assumption when `nvm_has_system_node`. (per discussion with @jfhbrook). In the meantime, `nvm alias default system` prevents it.
installing node,feature requests,pull request wanted
low
Minor
138,628,197
TypeScript
Inconsistent import behavior would cause `.d.ts` to break.
# TL;DR; The current inconsistent import behavior in different module mode (`system` or `commonjs`) would cause `.d.ts` to break (1.8 included). # Potential Solution - Add a "module {system,commonjs}" directive and so that the `.d.ts` file will be processed correctly - Unify the import/export syntax and behavior - `.d.ts` uses a module agnostic import/export syntax # Context The context of this problem is about module mapping (such as what `jspm` and `typings` supports). Basically saying any module can be referenced by a different name to avoid module name collision. e.g. in a project that use two versions of `jquery`, one would be imported normally (`import $ from 'jquery'`), one would be imported with a different name (`import $old from '[email protected]'`). In `1.8`, with the support of `allowSyntheticDefaultImports` enables the behavior become similar (but if the user set it to `false` could still diverge). However the behavior of `import * as A from 'abc';` and `import dr = require('domready');` are still different. # Problem The current (1.8) `module` support is working fine when creating package in TypeScript and distributing it as `.js`. However it does not work if the package is distributed in `.ts` or with `.d.ts`. The reason is that when distributing in the compiled form, the `module` mode used by the package author is captured in the `.js` file. When distributing `.ts` and `.d.ts` it relies on the consumer to use the same `module` mode as the package author intended. This means if the package authors (including all typings authors) create the package using one `module` mode, and the consuming application/package use a different `module` mode, the system will fail. It is worse if the consuming application/package uses multiple packages with disagreeing `module` mode. Here are the original discussion: https://github.com/typings/typings/issues/149 This is closely related to: https://github.com/Microsoft/TypeScript/issues/7125 Please let me know if there are any confusion or missing information / context.
Suggestion,Needs Proposal
medium
Major
138,690,081
go
x/mobile: graphics quality with OpenGL ES
Please answer these questions before submitting your issue. Thanks! 1. What version of Go are you using (`go version`)? go version go1.6 linux/386 gomobile version +0ee7f82 Thu Mar 3 05:14:23 2016 +0000 (android); androidSDK=/home/startek/android-sdk/platforms/android-23 2. What operating system and processor architecture are you using (`go env`)? GOARCH="386" GOBIN="" GOEXE="" GOHOSTARCH="386" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/startek/go/dev" GORACE="" GOROOT="/home/startek/go" GOTOOLDIR="/home/startek/go/pkg/tool/linux_386" GO15VENDOREXPERIMENT="1" CC="gcc" GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0" CXX="g++" CGO_ENABLED="1" 3. What did you do? (Use play.golang.org to provide a runnable example, if possible.) Draw arc with OpenGL ES. 4. What did you expect to see? Smooth arc. 5. What did you see instead? Unsmooth arc. Please, change configuration of context creation. From this in android.c (also in x11.c and others): ``` c const EGLint RGB_888[] = { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_DEPTH_SIZE, 16, EGL_CONFIG_CAVEAT, EGL_NONE, EGL_NONE }; ``` to: ``` const EGLint RGB_888[] = { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_DEPTH_SIZE, 16, EGL10.EGL_SAMPLE_BUFFERS, 1, EGL10.EGL_SAMPLES, 4, // This is for 4x MSAA. EGL_CONFIG_CAVEAT, EGL_NONE, EGL_NONE }; ``` I know, some devices may not support this configuration - but many devices on Android uses modern hardware, and now supports OpenGL ES 3.0.
mobile
low
Minor
138,695,423
vscode
Add setting to automatically hide the side bar
Would it be possible to add a option to automatically hide the files explorer after a configurable duration ?
feature-request,ux,layout
high
Critical
138,728,831
kubernetes
RC and RS controllers should cap number of outstanding actions, not wait for all to complete
Once the controllers track creation and deletion of individual objects, they should just cap the number of outstanding actions rather than await all outstanding actions to complete. That would allow new actions to be initiated as previous ones complete, rather than create stair-stepping behavior due to fixed batch sizes. Deletion tracking is being added by #22579, but robust creation tracking would require pod name generation by the controller. cc @bprashanth
priority/backlog,sig/scalability,area/controller-manager,sig/apps,lifecycle/frozen
low
Major
138,764,058
youtube-dl
Site support: amebafresh.tv
Used by, at least, Capcom for Japanese announcement streams. They use the same URL structure for both live videos and VODs (instant VODs). Example: https://amebafresh.tv/capcomchannel/6806
site-support-request
low
Minor
138,848,803
go
cmd/compile: performance of embedded interfaces
Please answer these questions before submitting your issue. Thanks! 1. What version of Go are you using (`go version`)? `go version devel +6bd63ca 2016-03-06 16:12:33 +0000 linux/amd64` 2. What operating system and processor architecture are you using (`go env`)? ``` ➜ go env GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/oneofone/code/go" GORACE="" GOROOT="/usr/src/go" GOTOOLDIR="/usr/src/go/pkg/tool/linux_amd64" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build035989829=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" ``` 1. What did you do? (Use play.golang.org to provide a runnable example, if possible.) http://play.golang.org/p/paUFpqwntQ 2. What did you expect to see? embedded interfaces being as fast as assigning them to a field. `struct { sort.Interface } vs struct { a sort.Interface }` 1. What did you see instead? ``` BenchmarkEmbeded-8 100 22515496 ns/op 802944 B/op 6 allocs/op BenchmarkEmbededPtr-8 50 22651711 ns/op 802896 B/op 6 allocs/op BenchmarkField-8 100 16229781 ns/op 802875 B/op 4 allocs/op ```
compiler/runtime
low
Critical
138,880,173
flutter
We should document font-family mapping conventions
- [ ] Document the conventions in `dart:ui`. What names are considered special, what do they mean. - [ ] Document the conventions in our porting guide. What names should be supported, where should it be implemented. - [ ] Document the conventions in the framework `TextStyle` class dartdocs.
framework,engine,d: api docs,a: typography,P3,team-engine,triaged-engine
low
Minor
139,074,857
go
doc: runtime/pprof: block profiler documentation needs some love
Reading https://golang.org/pkg/runtime/pprof/ does not make clear how to use the blocking profiler in an application. The blog post at http://blog.golang.org/profiling-go-programs (2011) finishes with: > The goroutine blocking profile will be explained in a future post. Stay tuned. But I cannot find any follow up. In a post [to the mailing list](https://groups.google.com/d/topic/golang-nuts/QqZedWrqgOc/discussion) someone said that Brad mentioned it [briefly in a talk](https://github.com/bradfitz/talk-yapc-asia-2015/blob/master/talk.md), but he only mentions `go test -blockprofile`, and I'm not running tests. I have used several search engines to look for materials but they all point at runtime/pprof and other not-useful-to-me blog posts. Getting creative, I just thought I would dive in and try to use it: ``` go f, err := os.Create("block.pprof") if err != nil { log.Fatal(err) } p := pprof.Lookup("block") defer func() { err := p.WriteTo(f, 0) if err != nil { log.Fatalf("Error writing block profile: %v", err) } }() ``` Which results in a file with contents which don't look useful: ``` --- contention: cycles/second=2494323129 ``` Finally, I [searched github for "pprof lookup block"](https://github.com/search?l=go&q=pprof+lookup+block&type=Code&utf8=%E2%9C%93). This appears to show some examples of its use and reveals the function [`runtime.SetBlockProfile`](https://golang.org/pkg/runtime/#SetBlockProfileRate). However, this function is also quite confusingly documented. > `func SetBlockProfileRate(rate int)` > > SetBlockProfileRate controls the fraction of goroutine blocking events that are reported in the blocking profile. The profiler aims to sample an average of one blocking event per rate nanoseconds spent blocked. > > To include every blocking event in the profile, pass rate = 1. To turn off profiling entirely, pass rate <= 0. Is `rate` really a fraction, between 0 and 1? If so, since it is an `int`, it would seem my options are to either pass it 0 or 1, but the suggestion that it is a fraction seems contradictory. Is it necessary to call this function to start the profiler? To conclude, the documentation at `runtime/pprof` really needs to make it clear how to use the block profiler. Some facts which are still not clear to me, even after reading code found elsewhere: - What kind of questions can be answered with a block profile? - Will it help me identify contention on a channel write? - Will it tell me where in my program is contending? - How do I use the block profiler in my application? - Is there something one must do to start the block profiler? - How often can one write a block profile? Once at the end of a running program? - Why is there not a `StartBlockProfiler` function? - How does one interpret the results of a block profile? P.S. I did eventually find [Debugging performance issues in Go programs](https://software.intel.com/en-us/blogs/2014/05/10/debugging-performance-issues-in-go-programs), which answers some of these questions. But unfortunately it was not easy to find for some reason.
Documentation,help wanted,NeedsFix
medium
Critical
139,074,916
rust
Include images in rustdoc output
As written by Luthaf over here https://users.rust-lang.org/t/include-images-in-rustdoc-output/3487 "Hi rustaceans! Images in documentation can be really useful to provide some insight on algorithms or modules organisation. It is already possible to insert a link to an image in documentation comment ``` /// ![Alt version](url://for/this/image.png) ``` But using this method, we only get to include images already available in some place of Internet. Is it a way to make rustdoc copy some files to the target/doc folder, so that it is easy to include specific images in the documentation? The same could go for other static files, like specific CSS or JS. Is it possible yet? If not, do you think it is worth it?" I this this would be awesome to include as sometimes using images is much easier when explain something than showing text.
T-rustdoc,C-feature-request
high
Critical
139,089,611
go
x/mobile/misc/androidstudio: establish gradle plugin release process
https://plugins.gradle.org/plugin/org.golang.mobile.bind is a gradle plugin to integrate gomobile bind execution in android project build. The source code is located in misc/androidstudio directory. Testing before release is manually done, which doesn't scale and isn't reliable. The release process should include - testing/canarying - version management Unfortunately this doesn't involve Go programming.
help wanted,mobile
low
Minor
139,126,534
kubernetes
API and sufficient OpenAPI info to translate metadata, object names/references, and selectors to relative API URIs
Forked from #22511 Even with the discovery API, clients need complicated code to translate between kind, apiVersion, namespace, name, etc. and URL paths. We should provide a server-side endpoint to perform this translation. People shouldn't have to reverse-engineer our complicated client libraries in order to figure out how to write a client properly. Related to #12143 cc @deads2k @lavalamp @smarterclayton
priority/important-soon,area/api,area/client-libraries,sig/api-machinery,area/ecosystem,priority/important-longterm,lifecycle/frozen
medium
Major
139,307,921
go
os/user: add illumos getgroups support
Solaris is broken after the os/user groups change: http://build.golang.org/log/26a14fbc0126ab1ed65eaeffe18362689b13a54f ``` ... net os/user # os/user Undefined first referenced symbol in file getgrouplist $WORK/os/user/_obj/lookup_unix.cgo2.o ld: fatal: symbol referencing errors. No output written to $WORK/os/user/_obj/_cgo_.o collect2: error: ld returned 1 exit status crypto/x509 net/textproto log/syslog ... ``` Let me know if you need help testing on Solaris. It's not yet a trybot, due to lack of time.
NeedsFix,OS-illumos
medium
Critical
139,359,988
react
onResponderGrant called before onResponderTerminate
When a responder captures the active responder, it seems that `onResponderTerminate` is not called until after `onResponderGrant`. This seems like the wrong thing to do. Are there reasons for this behavior?
Type: Bug,Component: DOM
medium
Major
139,377,028
nvm
README file should explain what the software is
README files conventionally begin with a brief description of what the software is. There is no such description in the README file for nvm, which is unfriendly for beginners.
pull request wanted
low
Major
139,391,403
vscode
Revisit VS Code folder structure for app data, settings, extensions
Config is stored in `~/.config/Code[ - <quality>]/User`. To match platform conventions (lowercase and hyphens for everything) as well as to keep consistency with the cli `code[-<quality>]` I propose we change the settings directory one of: - `~/.config/code[-<quality>]/user` - `~/.vscode[-<quality>]` (see https://github.com/Microsoft/vscode/issues/3883) - `~/.code[-<quality>]` (to prevent using 'vs' showing up in the OSS build as it is now) If we moved this it would probably require some discovery/migration on first launch of a newer version. --- The below is a living document. ## Proposed folder structure Notes: - I don't think we should be encouraging the use of admin rights within vscode, instead a permissions elevation dialog would probably be better than allowing a specific place for root user data #5561 - I want to clean up the whole `code` vs `vscode` thing in this change; only official builds should carry the visual studio branding, that should carry over to the config directories consistently as well. - The CLI args `--user-data-dir` and `--extensions-dir` will need to be adjusted for this, something like `--config-dir` and `--cache-dir` would probably be better. ### Windows **Old** ``` Settings: %APPDATA%\Code[ - Variant]\User\settings.json Keybindings: %APPDATA%\Code[ - Variant]\User\keybindings.json Snippets: %APPDATA%\Code[ - Variant]\User\snippets\ Workspace storage: %APPDATA%\Code[ - Variant]\User\workspaceStorage\ Chromium user data: %APPDATA%\Code[ - Variant]\ Extensions: %USERPROFILE%\.vscode[-variant]\extensions\ ``` **New** ``` Settings: %APPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\settings.json Keybindings: %APPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\keybindings.json Snippets: %APPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\snippets\ Workspace storage: %LOCALAPPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\workspaceStorage\ Chromium user data: %LOCALAPPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\userdata\ Extensions: %LOCALAPPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\extensions\ ``` Notes: - Note that `%APPDATA%` is roaming and `%LOCALAPPDATA%` is local, meaning extensions ***will not*** be carried across multiple machines until a solution is devised for #15442. An extension manifest, eg. `%APPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\extensions.json` which automatically installs extensions is my thinking of solving this problem. ### Linux **Old** ``` Settings: $HOME/.config/Code[ - Variant]/User/settings.json Keybindings: $HOME/.config/Code[ - Variant]/User/keybindings.json Snippets: $HOME/.config/Code[ - Variant]/User/snippets/ Workspace storage: $HOME/.config/Code[ - Variant]/User/workspaceStorage/ Chromium user data: $HOME/.config/Code[ - Variant]/ Extensions: $HOME/.vscode[-variant]/extensions/ (not moving) ``` **New** ``` Settings: $XDG_CONFIG_HOME/[vs]code[-variant]/settings.json Keybindings: $XDG_CONFIG_HOME/[vs]code[-variant]/keybindings.json Snippets: $XDG_CONFIG_HOME/[vs]code[-variant]/snippets/ Workspace storage: $XDG_CACHE_HOME/[vs]code[-variant]/workspaceStorage/ Chromium user data: $XDG_CACHE_HOME/[vs]code[-variant]/userdata/ Extensions: $XDG_CACHE_HOME/[vs]code[-variant]/extensions/ ``` Notes: - Thanks to @ollie27 and others for calling out the [XDG Base Directory Specification](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html), see that document for fallbacks to the environment variables. - `$XDG_CACHE_HOME` would be best for extensions provided there is an extensions manifest in `$XDG_CONFIG_HOME` #15442. - Maybe extensions should live in `$XDG_DATA_HOME`? ### Mac **Old** ``` Settings: $HOME/Library/Application Support/Code[ - Variant]/User/settings.json Keybindings: $HOME/Library/Application Support/Code[ - Variant]/User/keybindings.json Snippets: $HOME/Library/Application Support/Code[ - Variant]/User/snippets/ Workspace storage: $HOME/Library/Application Support/Code[ - Variant]/User/workspaceStorage/ Chromium user data: $HOME/Library/Application Support/Code[ - Variant]/ Extensions: $HOME/.vscode[-variant]/extensions/ (not moving) ``` **New** ``` Settings: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/settings.json Keybindings: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/keybindings.json Snippets: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/snippets/ Workspace storage: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/workspaceStorage/ Chromium user data: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/userdata/ Extensions: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/extensions/ ``` Notes: - Is there a similar standard for dividing cache and config files on Mac? http://stackoverflow.com/a/5084892/1156119
feature-request,debt,workbench-os-integration
high
Critical
139,421,885
go
cmd/compile: redundant loop generated for comparing/hashing arrays of size 1.
Please answer these questions before submitting your issue. Thanks! 1. What version of Go are you using (`go version`)? go version devel +f81cfc6 Tue Mar 8 23:54:09 2016 +0100 linux/amd64 (local compile) 2. What operating system and processor architecture are you using (`go env`)? GOARCH="amd64" GOHOSTARCH="amd64" 3. What did you do? go tool objdump vet| less 4. What did you expect to see? No loop. There are many instances of this in the standard library. 5. What did you see instead? There is clearly a 1 trip loop in the following assembly code; ``` TEXT type..hash.[1]go/types.operand(SB) /.../go/src/go/types/api.go api.go:1 0x524af0 64488b0c25f8ffffff FS MOVQ FS:0xfffffff8, CX api.go:1 0x524af9 483b6110 CMPQ 0x10(CX), SP api.go:1 0x524afd 7658 JBE 0x524b57 api.go:1 0x524aff 4883ec20 SUBQ $0x20, SP api.go:1 0x524b03 31c0 XORL AX, AX api.go:1 0x524b05 488b4c2430 MOVQ 0x30(SP), CX api.go:1 0x524b0a 4889442418 MOVQ AX, 0x18(SP) api.go:1 0x524b0f 4883f801 CMPQ $0x1, AX api.go:1 0x524b13 7d38 JGE 0x524b4d api.go:1 0x524b15 488b542428 MOVQ 0x28(SP), DX // LOOP START api.go:1 0x524b1a 8402 TESTL AL, 0(DX) api.go:1 0x524b1c 4889c3 MOVQ AX, BX api.go:1 0x524b1f 48c1e306 SHLQ $0x6, BX api.go:1 0x524b23 4801d3 ADDQ DX, BX api.go:1 0x524b26 48891c24 MOVQ BX, 0(SP) api.go:1 0x524b2a 48894c2408 MOVQ CX, 0x8(SP) api.go:1 0x524b2f e8ccf1ffff CALL type..hash.go/types.operand(SB) api.go:1 0x524b34 488b4c2410 MOVQ 0x10(SP), CX api.go:1 0x524b39 488b542418 MOVQ 0x18(SP), DX api.go:1 0x524b3e 488d4201 LEAQ 0x1(DX), AX api.go:1 0x524b42 4889442418 MOVQ AX, 0x18(SP) api.go:1 0x524b47 4883f801 CMPQ $0x1, AX api.go:1 0x524b4b 7cc8 JL 0x524b15 // LOOP END api.go:1 0x524b4d 48894c2438 MOVQ CX, 0x38(SP) api.go:1 0x524b52 4883c420 ADDQ $0x20, SP api.go:1 0x524b56 c3 RET api.go:1 0x524b57 e8b4d5f4ff CALL runtime.morestack_noctxt(SB) api.go:1 0x524b5c eb92 JMP type..hash.[1]go/types.operand(SB) api.go:1 0x524b5e cc INT $0x3 api.go:1 0x524b5f cc INT $0x3 ```
Performance,binary-size,compiler/runtime
low
Minor
139,506,815
go
x/tools/cmd/eg: matches should be limited to value expressions
``` $ cat a.go package a func before(x *int) int { return *x } func after(x *int) int { return 42 } $ cat b.go package b func x(p **int) {} $ eg -t a.go b.go === b.go (1 matches) package b func x(p 42) {} ``` The problem appears to be that in the type expression `**int`, the subexpression `*int` has type `*int`, so eg is deciding that it's a candidate match for the original expression. However, `*int` is a type expression, so it doesn't make sense to replace it with a value expression like `42`. I think eg needs to make use of `go/types.TypeAndValue`'s `IsValue` method. /cc @alandonovan
Tools
low
Minor
139,601,613
vscode
Render errors & warnings in gutter
_From @koulmomo on February 24, 2016 23:37_ It would be good if the extension would mark the line at which errors occur along with **JUST** where it exactly occurs (this could just be a mark in the gutter at the line the error occurs). This would make it easier to quickly scan through files. Current: ![screen shot 2016-02-24 at 3 33 41 pm](https://cloud.githubusercontent.com/assets/983861/13304835/0b1d6436-db0c-11e5-9e9b-f259b464f353.png) Suggested (taken from sublime): <img width="842" alt="screen shot 2016-02-24 at 3 33 32 pm" src="https://cloud.githubusercontent.com/assets/983861/13304848/20c26958-db0c-11e5-94cc-c4a141720410.png"> _Copied from original issue: Microsoft/vscode-eslint#33_
feature-request,editor-rendering
high
Critical
139,665,859
go
runtime: throttle heap growth
GC goal is calculated as: ``` goal = reachable * (1 + GOGC/100) ``` This works good in steady state and it is not a problem when heap is shrinking. But it is a problem when reachable heap size has episodic short-term spikes. Consider that typical reachable heap size is 1GB, so heap grows to 2GB (provided GOGC=100). Now consider that there is a short spike of reachable heap size to 1.5GB. If GC is triggered after the spike, everything is fine. However if we are unlucky and GC observes 1.5GB of reachable heap, it will set goal to 3GB. And at this point we will necessary consume these 3GB and increase RSS by 1.5x unnecessary. The proposal is to throttle GC goal if we see that the new goal will increase max heap size. We can either use, say, GOGC/2 in such cases; or maybe set heap goal to current max heap size. In the above example, if we set goal to 2GB we can avoid growing heap at all. This way we pay a fixed amount of CPU during heap growth, but can get lower RSS in return. Note that heap growth can't continue infinitely, so the amount of additional CPU is limited. FWIW client-side GC-based systems (most notably javascript), go to great effort to throttle heap growth in such scenarios. AFAIK, v8 uses something like GOGC=10% during growth just to not over-allocate.
compiler/runtime
low
Major
139,676,826
opencv
dc1394_video_get_supported_framerates bug returns.
- OpenCV version: 3.1.0 - Host OS: Mac OS X 10.11.3 Xcode 7.2.1 - libdc1394 2.2.3. February 2016 ### In which part of the OpenCV library you got the issue? Opening a Point Grey Grasshopper3 USB/IIDC camera. ### Expected behaviour // This should open the camera and return true bool isOpen = camera.isOpened(); ### Actual behavior Throws error from libdc1394: "libdc1394 error: Invalid video format: in dc1394_video_get_supported_framerates (control.c, line 595): Modes corresponding for format6 and format7 do not have frame rates! camImage.data = nil: camera.readfailed! 40" ### Additional description Camera is alive and "talking" as I can read/modify camera capture properties. This camera is supposed to be IIDC compliant. The camera works fine with the Point Grey gui app on Windows 7. ### Code example to reproduce the issue / Steps to reproduce the issue Please try to give a full example which will compile as is. ``` #include "opencv2/videoio/videoio.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/core/utility.hpp" #include <ctype.h> #include <stdio.h> #include <iostream> #include <fstream> #include <time.h> #include <chrono> #include <unistd.h> #include <dirent.h> // for POSIX directory methods. #if !defined WIN32 && defined HAVE_DC1394 #include <stdint.h> #include <dc1394/dc1394.h> #include <dc1394/dc1394.h> #include <libraw1394/raw1394.h> #include <libdc1394/dc1394_control.h> #endif using namespace std; using namespace cv; int main() { VideoCapture camera(CV_CAP_DC1394); /* this line modifies camera properties and reads them back successfully: setupCamera(&camera, true); */ // can we open the camera? bool isOpen = camera.isOpened(); if (!isOpen) { fprintf(stderr, "VideoCapture can't open camera\n"); } return 0; } ``` The error message is printed to stdout and main crashes before this code: if (!isOpen) { fprintf(stderr, "VideoCapture can't open camera\n"); } # NOTE: This bug was reported 6 years ago and was supposedly fixed. It was signed off by Andrey Kamaev in 2013 in OpenCV DevZone: Camera capturing fails with libdc1394_v2 because of Format_7 ([Bug #82](http://code.opencv.org/issues/82))
bug,category: videoio(camera),affected: 3.4
low
Critical
139,689,149
vscode
Support Elastic Tabstops
ref: http://nickgravgaard.com/elastic-tabstops/
feature-request,editor-core
high
Critical
139,704,921
youtube-dl
`youtube-dl -F` often hangs for a long time on vimeo videos
Usually it's pretty quick (1-2 seconds), but often it can take 1-2 minutes just to get the formats on a vimeo video. It seems to be the step downloading webpage or JSON. Any idea what might be causing the delay, and the inconsistency?
cant-reproduce
low
Major
139,754,754
flutter
Test application exit on the bots
Once we have https://github.com/flutter/flutter/issues/2409 checking that applications launch and don't crash when you touch them, we should also test that application exit doesn't crash, so that we don't regress https://github.com/flutter/flutter/issues/2549.
a: tests,c: new feature,team,tool,t: flutter driver,P3,team-tool,triaged-tool
low
Critical
139,816,509
go
cmd/vet: validate that time.Format strings are sane
vet will let the user know if `fmt.Printf` strings are incorrect and if the types passed to them are incorrect. It'd be very handy if the also rather specific format for `time.Format` strings were similarly checked for validity.
Suggested,Analysis
low
Minor
139,837,272
TypeScript
Rename symbol on a HTML tag inside of JSX globally renames all tags
_From @xirzec on March 9, 2016 22:24_ 1. Open a project that uses TypeScript + JSX (with react.d.ts loaded) 2. Put the cursor over a common HTML tag like `<div>` 3. Hit F2 to rename symbol 4. Rename the div to something else (like span) Expected: Just the matching open/close is renamed to `<span>` Actual: Every div in **every** JSX file is now a span and even react.d.ts has had its div attribute in the HTML tag names renamed to span VS Code version: 0.10.10 _Copied from original issue: Microsoft/vscode#3937_
Suggestion,Domain: JSX/TSX,VS Code Tracked,Experience Enhancement
low
Major
139,880,053
go
encoding/json: parser ignores the case of member names
1. What version of Go are you using? `5.3` 2. What operating system and processor architecture are you using? `amd64,windows` 3. What did you do? Read this: https://mailarchive.ietf.org/arch/msg/json/Ju-bwuRv-bq9IuOGzwqlV3aU9XE 4. What did you expect to see? ... 5. What did you see instead? ...
Security,NeedsDecision
high
Critical
139,947,690
vscode
Add suggested completions for key chords
With more complex key chords, it would be incredibly helpful to have "suggested" completions, based on the first element of the chord. For example, consider the following complicated workflow: 1. You type `CMD + K` 2. Visual Studio Code waits for the next key of the chord (but doesn't tell you what valid options could be typed) 3. User forgets or doesn't know the shortcut he wants, so he hits `ESCAPE` 4. User hits `F1` to search for the desired command and keyboard shortcut 5. User hits `ESCAPE` 6. User executes keyboard shortcut Instead, what should happen is that VS Code should show the users all of the key chords (or perhaps most commonly used commands _by that specific user_, based on telemetry data), that could possibly be pressed. This would have the following benefits: - Significantly improve the user experience - Ease the learning of new keyboard shortcuts - Tailor the Visual Studio Code environment to each user (optional) Cheers, Trevor Sullivan Microsoft MVP: PowerShell https://trevorsullivan.net https://twitter.com/pcgeek86
feature-request,keybindings
medium
Critical
140,000,672
TypeScript
Feature Request: Line Breaks in Assignments in Compiled Javascript
One of typescript's key advantages over Babel (at least as far as I'm concerned), is the readability of its compiled javascript. It is so readable, in fact, that I often use typescript for non-typescript projects, and just submit the compiled javascript. One issue that often arises, however, is that the compiled javascript will not match style rules in these javascript projects. One style rule is to have each assignment on its own line. Typescript generally does this, except when destructuring. It would be extremely valuable to be able to specify a compiler option for assignmentsOnNewLine which would add line breaks after each assignment. For example, the following typescript code: ``` typescript const aVeryLargeObject = { firstValue: 1, secondValue: 2, thirdValue: 3, fourthValue: 4 }; const {firstValue, secondValue, thirdValue, fourthValue} = aVeryLargeObject; ``` Produces the following javascript: ``` javascript var aVeryLargeObject = { firstValue: 1, secondValue: 2, thirdValue: 3, fourthValue: 4 }; var firstValue = aVeryLargeObject.firstValue, secondValue = aVeryLargeObject.secondValue, thirdValue = aVeryLargeObject.thirdValue, fourthValue = aVeryLargeObject.fourthValue; ``` If this feature was implemented it should produce the following javascript: ``` javascript var aVeryLargeObject = { firstValue: 1, secondValue: 2, thirdValue: 3, fourthValue: 4 }; var firstValue = aVeryLargeObject.firstValue, secondValue = aVeryLargeObject.secondValue, thirdValue = aVeryLargeObject.thirdValue, fourthValue = aVeryLargeObject.fourthValue; ```
Suggestion,Help Wanted
low
Minor
140,053,287
go
cmd/compile: let SSA store to PPARAMOUT variables earlier than return
Currently SSA cannot store early to named output variables. It was disabled to fix #14591. This issue is to track figuring out how to re-enable this feature at some point.
Performance,NeedsFix,early-in-cycle
low
Minor
140,323,679
neovim
TCP authentication token
- Neovim version: Any - Operating system: Any - Terminal emulator: Any ### Actual behaviour NeoVIM allows itself to be controlled over an insecure interface (unauthenticated TCP socket). This is a potential arbitrary code execution exploit. ### Expected behaviour NeoVIM does not itself to be controlled over an insecure interface. This can be done in a couple ways: - do not allow TCP sockets, only AF_UNIX sockets (but this does not work on Windows) - cryptographic authentication of all messages I prefer the second approach _if it is implemented correctly_. My preferred solution: - create a temporary file, read/write only to current user, no access to others - obtain cryptographically secure random bytes from OS using libsodium - write key to temporary file - use this key to authenticate all communication using Blake2b or SHA2-HMAC. - ensure that the first message sent by the client is authenticated, but contains no secrets (to prevent another process from impersonating the server). - rudely close the connection if an unauthenticated message is detected. Note that none of this is necessary if a Unix domain socket in a secure directory is used. I am also assuming that NeoVIM has no business listening on anything but the loopback interface. If remote control is desired, then a simple program that can be used as an SSH shell should be used. ### Steps to reproduce - Launch NeoVIM and tell it to bind to a socket, then have a different user control it via the socket. - Get pwnd.
bug,security,gsoc
low
Major
140,405,244
neovim
shada: can't clear register after recording in it
- Neovim version: 0.1.2 - Operating system: Arch Linux - Terminal emulator: Gnome-Terminal ### Actual behaviour Recorded sequence persists in a register after reopening neovim despite clearing it, even though it does get cleared for the current session. ### Expected behaviour Register should stay empty after being cleared. ### Steps to reproduce 1. Type "qaaaaa<Esc>q" 2. Press "@a", watch "aaa" get inserted. 3. Press "qaq", then "@a" again. 4. Nothing happens, as is expected. 5. Close and open again neovim. 6. Press "@a", "aaa" gets inserted despite the register being cleared in the previous session. ":let @a=''" instead of "qaq" produces exactly the same bug. VIM version 7.4.1529 behaves correctly.
enhancement,needs:design,core,editor-state
medium
Critical
140,493,863
go
encoding/json: marshaller does not provide Base64Url support
1. Go version: _5.3_ 2. Operating system: _Windows 8.1 64-bit_ 3. What did you do? https://play.golang.org/p/k1Wgec8cVB 4. What did you expect to see? I had hoped that there would be a field option allowing you to override the default encoding because Base64Url is nowadays the preferred format in standards including IETF's JOSE 5. What did you see instead? No such option :-)
NeedsInvestigation
low
Major
140,501,280
youtube-dl
Add support for www.courrierinternational.com
``` [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'http://www.courrierinternational.com/article/amours-interdites-chine-cici-et-max-un-amour-secret?utm_campaign=Echobox&utm_medium=Social&utm_source=Facebook#link_time=1457868179', u'-v'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.03.06 [debug] Python version 2.7.9 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.3 [debug] exe versions: avconv 11.6-6, avprobe 11.6-6, rtmpdump 2.4 [debug] Proxy map: {} [generic] amours-interdites-chine-cici-et-max-un-amour-secret?utm_campaign=Echobox&utm_medium=Social&utm_source=Facebook#link_time=1457868179: Requesting header WARNING: Falling back on generic information extractor. [generic] amours-interdites-chine-cici-et-max-un-amour-secret?utm_campaign=Echobox&utm_medium=Social&utm_source=Facebook#link_time=1457868179: Downloading webpage [generic] amours-interdites-chine-cici-et-max-un-amour-secret?utm_campaign=Echobox&utm_medium=Social&utm_source=Facebook#link_time=1457868179: Extracting information ERROR: Unsupported URL: http://www.courrierinternational.com/article/amours-interdites-chine-cici-et-max-un-amour-secret?utm_campaign=Echobox&utm_medium=Social&utm_source=Facebook#link_time=1457868179 Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 1309, in _real_extract doc = compat_etree_fromstring(webpage.encode('utf-8')) File "/usr/local/lib/python2.7/dist-packages/youtube_dl/compat.py", line 248, in compat_etree_fromstring doc = _XML(text, parser=etree.XMLParser(target=etree.TreeBuilder(element_factory=_element_factory))) File "/usr/local/lib/python2.7/dist-packages/youtube_dl/compat.py", line 237, in _XML parser.feed(text) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror raise err ParseError: not well-formed (invalid token): line 68, column 69 Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 668, in extract_info ie_result = ie.extract(url) File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 319, in extract return self._real_extract(url) File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 1956, in _real_extract raise UnsupportedError(url) UnsupportedError: Unsupported URL: http://www.courrierinternational.com/article/amours-interdites-chine-cici-et-max-un-amour-secret?utm_campaign=Echobox&utm_medium=Social&utm_source=Facebook#link_time=1457868179 ```
site-support-request
low
Critical
140,535,509
go
cmd/compile: unnecessary bounds checks are not removed
Please answer these questions before submitting your issue. Thanks! 1. What version of Go are you using (`go version`)? go version devel +8ec8017 Sun Mar 13 22:12:01 2016 +0000 linux/amd64 2. What operating system and processor architecture are you using (`go env`)? GOARCH="amd64" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" 3. What did you do? 4. What did you expect to see? 5. What did you see instead? I composed a list of [bounds checks](https://docs.google.com/document/d/1vdAEAjYdzjnPA9WDOQ1e4e05cYVMpqSxJYZT33Cqw2g/edit#) that the compiler at tip can and cannot eliminate. For some I provided an alternative implementation.
Performance,compiler/runtime
low
Major
140,660,527
opencv
Inconsistency of method inputs' names within the same module
### System information: - OpenCV version: 3.0 & 3.1 ### In which part of the OpenCV library you got the issue? [photo > denoising](http://docs.opencv.org/master/d1/d79/group__photo__denoise.html) ### Description Photo denoising functions belonging to the `cv::cuda` namespace have different names for the same inputs used in functions belonging to the `cv` namespace (slightly different names + snake_case vs camelCase, respectively). **`block_size`** <=> **`templateWindowSize`** **`search_window`** <=> **`searchWindowSize`** **`h_luminance`** <=> **`h`** **`photo_render`** <=> **`hColor`** Also, documentation needlessly varies between functions. These inconsistencies might lead to confusion. ### Additional details (example) The optional inputs to the [`cv::cuda::nonLocalMeans`](http://docs.opencv.org/master/d1/d79/group__photo__denoise.html#gafa990f16548581987e7e509b435c3648) function include the following: ``` int search_window = 21 int block_size = 7 ``` With the descriptions: > **`search_window`** Size of search window. > **`block_size`** Size of block used for computing weights. Whereas in the [`void cv::fastNlMeansDenoising`](http://docs.opencv.org/master/d1/d79/group__photo__denoise.html#ga0db3ea0715152e56081265014b139bec) function within the same module, these parameters are referred-to as: ``` int searchWindowSize = 21 int templateWindowSize = 7 ``` With the descriptions: > **`searchWindowSize`** Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater `searchWindowsSize` - greater denoising time. Recommended value 21 pixels > **`templateWindowSize`** Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels I suggest standardizing the input names and the descriptions of said parameters.
feature,category: documentation,category: gpu/cuda (contrib)
low
Major
140,795,296
go
x/text: add grapheme cluster iteration
Hi, I'm in the middle of implementing support for iterating over [grapheme clusters](http://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries) in a project that I am working on and it seems like something that would be a good fit for the `golang.org/x/text`. I wanted to reach out and see how much interest there would be around this and whether I should work on making something that would fit into this project. I was thinking the interface could be somewhat like this (naming just a stand-in for now, not a big fan of the name decode) : ``` go package grapheme // Decode reads the first grapheme cluster out of s and return it. To get the length of the // grapheme simply take the len() of the return value. func Decode(s string) string ``` I didn't want to go through the whole proposal process until I get an idea of whether there might be interest for this. I hope this is the right forum for this, if not, I'd appreciate being pointed to the right place. Thanks
NeedsInvestigation
medium
Major
140,798,215
go
cmd/gofmt: gofmt -r stack overflow when trying to rewrite functions
Please answer these questions before submitting your issue. Thanks! 1. What version of Go are you using (`go version`)? ``` go version go1.6 linux/amd64 ``` 1. What operating system and processor architecture are you using (`go env`)? Arch Linux ``` GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/xfix/go" GORACE="" GOROOT="/usr/lib/go" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64" GO15VENDOREXPERIMENT="1" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0" CXX="g++" CGO_ENABLED="1" ``` 1. What did you do? If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. Tried to rewrite functions with gofmt. ``` sh echo 'package main; var X = func() {}' | gofmt -r 'func() -> func(A B)' ``` 1. What did you expect to see? Function converted into `var X = func(A B) {}`. 1. What did you see instead? ``` runtime: goroutine stack exceeds 1000000000-byte limit fatal error: stack overflow runtime stack: runtime.throw(0x5c1c90, 0xe) /usr/lib/go/src/runtime/panic.go:530 +0x90 runtime.newstack() /usr/lib/go/src/runtime/stack.go:940 +0xb11 runtime.morestack() /usr/lib/go/src/runtime/asm_amd64.s:359 +0x7f goroutine 1 [stack growth]: runtime.mallocgc(0x8, 0x578ec0, 0x1, 0x0) /usr/lib/go/src/runtime/malloc.go:499 fp=0xc840100320 sp=0xc840100318 runtime.newobject(0x578ec0, 0x0) /usr/lib/go/src/runtime/malloc.go:781 +0x42 fp=0xc840100348 sp=0xc840100320 reflect.unsafe_New(0x578ec0, 0x0) /usr/lib/go/src/runtime/malloc.go:786 +0x21 fp=0xc840100360 sp=0xc840100348 reflect.packEface(0x578ec0, 0xc82000e4a0, 0x182, 0x0, 0x0) /usr/lib/go/src/reflect/value.go:112 +0xf9 fp=0xc8401003d0 sp=0xc840100360 reflect.valueInterface(0x578ec0, 0xc82000e4a0, 0x182, 0x1, 0x0, 0x0) /usr/lib/go/src/reflect/value.go:938 +0x1ec fp=0xc840100428 sp=0xc8401003d0 reflect.Value.Interface(0x578ec0, 0xc82000e4a0, 0x182, 0x0, 0x0) /usr/lib/go/src/reflect/value.go:908 +0x48 fp=0xc840100460 sp=0xc840100428 main.subst(0xc8600ff8b0, 0x578ec0, 0xc82000e4a0, 0x182, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:265 +0x3a6 fp=0xc840100698 sp=0xc840100460 main.subst(0xc8600ff8b0, 0x588b20, 0xc82000e4a0, 0x199, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:283 +0xe29 fp=0xc8401008d0 sp=0xc840100698 main.subst(0xc8600ff8b0, 0x5994a0, 0xc820028038, 0x196, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:290 +0x843 fp=0xc840100b08 sp=0xc8401008d0 main.subst(0xc8600ff8b0, 0x539360, 0xc820012508, 0x197, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:276 +0xb97 fp=0xc840100d40 sp=0xc840100b08 main.subst(0xc8600ff8b0, 0x596480, 0xc820012500, 0x199, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:283 +0xe29 fp=0xc840100f78 sp=0xc840100d40 main.subst(0xc8600ff8b0, 0x581a60, 0xc820012500, 0x16, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:290 +0x843 fp=0xc8401011b0 sp=0xc840100f78 main.subst(0xc8600ff8b0, 0x542060, 0xc8200161a8, 0x194, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:297 +0x62c fp=0xc8401013e8 sp=0xc8401011b0 main.subst(0xc8600ff8b0, 0x596b60, 0xc820016190, 0x199, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:283 +0xe29 fp=0xc840101620 sp=0xc8401013e8 main.subst(0xc8600ff8b0, 0x579c80, 0xc82000e4b8, 0x196, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:290 +0x843 fp=0xc840101858 sp=0xc840101620 main.subst(0xc8600ff8b0, 0x588b20, 0xc82000e4a0, 0x199, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:283 +0xe29 fp=0xc840101a90 sp=0xc840101858 main.subst(0xc8600ff8b0, 0x5994a0, 0xc820028038, 0x196, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:290 +0x843 fp=0xc840101cc8 sp=0xc840101a90 main.subst(0xc8600ff8b0, 0x539360, 0xc820012508, 0x197, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:276 +0xb97 fp=0xc840101f00 sp=0xc840101cc8 main.subst(0xc8600ff8b0, 0x596480, 0xc820012500, 0x199, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:283 +0xe29 fp=0xc840102138 sp=0xc840101f00 main.subst(0xc8600ff8b0, 0x581a60, 0xc820012500, 0x16, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:290 +0x843 fp=0xc840102370 sp=0xc840102138 main.subst(0xc8600ff8b0, 0x542060, 0xc8200161a8, 0x194, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:297 +0x62c fp=0xc8401025a8 sp=0xc840102370 main.subst(0xc8600ff8b0, 0x596b60, 0xc820016190, 0x199, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:283 +0xe29 fp=0xc8401027e0 sp=0xc8401025a8 main.subst(0xc8600ff8b0, 0x579c80, 0xc82000e4b8, 0x196, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:290 +0x843 fp=0xc840102a18 sp=0xc8401027e0 main.subst(0xc8600ff8b0, 0x588b20, 0xc82000e4a0, 0x199, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:283 +0xe29 fp=0xc840102c50 sp=0xc840102a18 main.subst(0xc8600ff8b0, 0x5994a0, 0xc820028038, 0x196, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:290 +0x843 fp=0xc840102e88 sp=0xc840102c50 main.subst(0xc8600ff8b0, 0x539360, 0xc820012508, 0x197, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:276 +0xb97 fp=0xc8401030c0 sp=0xc840102e88 main.subst(0xc8600ff8b0, 0x596480, 0xc820012500, 0x199, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:283 +0xe29 fp=0xc8401032f8 sp=0xc8401030c0 main.subst(0xc8600ff8b0, 0x581a60, 0xc820012500, 0x16, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:290 +0x843 fp=0xc840103530 sp=0xc8401032f8 main.subst(0xc8600ff8b0, 0x542060, 0xc8200161a8, 0x194, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:297 +0x62c fp=0xc840103768 sp=0xc840103530 main.subst(0xc8600ff8b0, 0x596b60, 0xc820016190, 0x199, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:283 +0xe29 fp=0xc8401039a0 sp=0xc840103768 main.subst(0xc8600ff8b0, 0x579c80, 0xc82000e4b8, 0x196, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:290 +0x843 fp=0xc840103bd8 sp=0xc8401039a0 main.subst(0xc8600ff8b0, 0x588b20, 0xc82000e4a0, 0x199, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:283 +0xe29 fp=0xc840103e10 sp=0xc840103bd8 main.subst(0xc8600ff8b0, 0x5994a0, 0xc820028038, 0x196, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:290 +0x843 fp=0xc840104048 sp=0xc840103e10 main.subst(0xc8600ff8b0, 0x539360, 0xc820012508, 0x197, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:276 +0xb97 fp=0xc840104280 sp=0xc840104048 main.subst(0xc8600ff8b0, 0x596480, 0xc820012500, 0x199, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:283 +0xe29 fp=0xc8401044b8 sp=0xc840104280 main.subst(0xc8600ff8b0, 0x581a60, 0xc820012500, 0x16, 0x578ec0, 0xc8200105a0, 0x82, 0x0, 0x0, 0x0) /usr/lib/go/src/cmd/gofmt/rewrite.go:290 +0x843 fp=0xc8401046f0 sp=0xc8401044b8 ```
NeedsInvestigation
low
Critical
140,813,236
three.js
bubbling / propagation of events throughout the display list
Hi there! What do you guys think about having bubble/propagation of events throughout the display list? It could work exactly the way it works for DOM events: https://dom.spec.whatwg.org/#dom-event-bubbles I'm developing a GUI in which a deep node triggers a mouse event, and I'd like to have the listener on a parent node to deal with that, as follows the representation: ``` Scene > Object3D ~> listens to "click" event > Object3D > Object3D > Object3D ~> triggers the "click" event ``` The implementation could be something similar to this: ``` javascript THREE.Object3D.prototype.dispatchEvent = function (event) { THREE.EventDispatcher.prototype.dispatchEvent.apply(this, arguments); if (event.bubbles && this.parent) { this.parent.dispatchEvent(event) } } ``` Note that `bubbling` is `false` by default when instantiating DOM events. In case we implement this feature in three.js this wouldn't be an overhead. Looking forward to know your thoughts about this. Cheers!
Suggestion
low
Minor
140,833,252
flutter
Pargraph paint() should throw StateError if layout is dirty
team,engine,P3,team-engine,triaged-engine
low
Critical
141,140,682
rust
Trait implementation docs list methods that can't be called
https://doc.rust-lang.org/std/collections/hash_map/struct.Iter.html lists "cloned" as a method for hash_map::Iter, but it doesn't actually exist because the bound on Item cannot be fulfilled. It does not make sense to list that method there, and actually confused me a lot because I thought I should be able to call it.
T-rustdoc,E-hard,C-bug
low
Minor
141,320,117
youtube-dl
Support for http://www.andtv.com/
URL Tested: http://www.andtv.com/shows/bhabi-ji-ghar-par-hai/video/bhabi-ji-ghar-par-hain-episode-272-march-15-2016-full-episode.html [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'--verbose', u'http://www.andtv.com/shows/bhabi-ji-ghar-par-hai/video/bhabi-ji-ghar-par-hain-episode-272-march-15-2016-full-episode.html'] [debug] Encodings: locale cp1252, fs mbcs, out None, pref cp1252 [debug] youtube-dl version 2016.03.14 [debug] Python version 2.7.10 - Windows-8-6.2.9200 [debug] exe versions: ffmpeg N-73189-g7728d23, ffprobe N-73189-g7728d23 [debug] Proxy map: {} WARNING: Falling back on generic information extractor. ERROR: unable to download video data: HTTP Error 403: Forbidden Traceback (most recent call last): File "youtube_dl\YoutubeDL.pyo", line 1627, in process_info File "youtube_dl\YoutubeDL.pyo", line 1569, in dl File "youtube_dl\downloader\common.pyo", line 344, in download File "youtube_dl\downloader\http.pyo", line 58, in real_download File "youtube_dl\YoutubeDL.pyo", line 1929, in urlopen File "urllib2.pyo", line 437, in open File "urllib2.pyo", line 550, in http_response File "urllib2.pyo", line 475, in error File "urllib2.pyo", line 409, in _call_chain File "urllib2.pyo", line 558, in http_error_default HTTPError: HTTP Error 403: Forbidden
site-support-request
low
Critical
141,340,172
angular
[feature] Enable/disable event listening on @HostListeners
There are cases where `@HostListener` is the ideal API to use, however, for events like `touchmove`, `mousemove` or `scroll` we cannot use them for performance reasons. Far too many and often unnecessary change detections are happening. Additionally, there are many times we don't even need to listen in on `touchmove` events at all, unless a certain criteria happens. One example is when an input has focus, we want to know when the user begins to scroll it's parent, however, we don't need every input to listen to every scroll event. The other is for our pull-to-refresh and infinite scroll features, where users may or may not have them enabled. When they're not enabled at all, there's no need to still be listening in on every touchmove/scroll events. The current work around is for us to manually add and remove touchmove or scroll listeners depending on our criteria. While this works, we need to be very careful about not adding memory leaks, but more importantly we're not using `@HostListener` at all which keeps code nice and clean. Could a feature be added to enable/disable host listeners from listening to the actual native events? This isn't about not firing off events under a certain criteria, but completely removing native event listeners when they're not needed. Discussed this with both @IgorMinar and @mhevery, and said this would also be related to work needed for https://github.com/angular/angular/issues/1773
feature,area: core,core: event listeners,core: host and host bindings,core: change detection,feature: under consideration
medium
Major
141,347,991
rust
doc inclusion (reexport) changes order of impl blocks
`std::vec::Vec` shows the inherent method `impl` blocks in a different order than `collection::vec::Vec`. The latter follows the order in the source. Part of #24305
T-rustdoc,C-enhancement
low
Minor
141,395,327
go
cmd/link: dead code elimination for side-effect free functions
Currently if we compile a Go program like: ``` package main type dead int func newDead() *dead { return new(dead) } var x = newDead() func main() {} ``` the linker can't dead code eliminate `x` or `dead`. This is because the "x = newDead()" initialization is compiled to an implicit init function, which causes the linker to pull in `x` and `newDead`. (See https://golang.org/cl/20765 for a real world example.) In general, just because `x` is otherwise unused, the linker can't get rid of the `newDead()` call because it might have side-effects. However, it should be possible for the compiler to help identify functions that are side-effect free, which could in turn let the linker be more aggressive about dead code elimination. We would probably also need to tweak how cmd/compile generates package initializer functions for the linker to be able to eliminate individual initializers.
NeedsInvestigation,binary-size,compiler/runtime
medium
Major
141,576,362
react
Form input name='nodeName' breaks onSubmit event handling
It happened that I stumbled on following edge case. If you add `name='nodeName'` attribute to form's _input_, at some point of React event handling (`ChangeEventPlugin.js: shouldUseChangeEvent()`) it will call: `elem.nodeName && elem.nodeName.toLowerCase()`, but coincidentally `nodeName` property refers to _input_ and invocation fails. Here's a [jsFiddle example](https://jsfiddle.net/tLd7xvwc/)
Type: Bug,Component: DOM
low
Major
141,645,139
youtube-dl
site support request for www.pornjam.com
site-support-request,nsfw
low
Major
141,696,360
opencv
Print stack trace with exception
CNTK features a nice set of tools for printing [stack traces on thrown exceptions.](https://github.com/Microsoft/CNTK/blob/7c811de9e33d0184fdf340cd79f4f17faacf41cc/Source/Common/Include/ExceptionWithCallStack.h) It would be rather simple to add something like this to opencv via the cv::redirectError. We could also have a function like cv::errorPrintsCallstack(bool) which could be used to switch between the default behavior and the more verbose behavior. This could improve remote debugging such as when running through ssh on a remote machine. Is this something that the community would be interested in porting into OpenCV, or leave as something for the user to implement if desired?
feature,RFC
low
Critical
141,714,251
opencv
opencv_perf_objdetect test "OCL_HOGFixture_HOG.HOG": unsupported call to function reduce_smem in normalize_hists_kernel
When running "bin/opencv_perf_objdetect" it gives the following warning/error you find below. Deinlining the function "reduce_smem" like with the following patch fixes that, but i don't know if there is a more proper fix: diff --git a/modules/objdetect/src/opencl/objdetect_hog.cl b/modules/objdetect/src/opencl/objdetect_hog.cl index 4fae320..b43fe70 100644 --- a/modules/objdetect/src/opencl/objdetect_hog.cl +++ b/modules/objdetect/src/opencl/objdetect_hog.cl @@ -207,7 +207,7 @@ __kernel void normalize_hists_36_kernel(__global float\* block_hists, //------------------------------------------------------------- // Normalization of histograms via L2Hys_norm // -inline float reduce_smem(volatile __local float\* smem, int size) +float reduce_smem(volatile __local float\* smem, int size) { unsigned int tid = get_local_id(0); float sum = smem[tid]; Time compensation is 0 CTEST_FULL_OUTPUT OpenCV version: 3.1.0-dev OpenCV VCS version: 3.1.0-315-gecf65a0-dirty Build type: release Parallel framework: pthreads CPU features: mmx sse sse2 sse3 OpenCL Platforms: Clover iGPU: AMD TAHITI (DRM 2.43.0, LLVM 3.7.1) (OpenCL 1.1 MESA 11.1.2) Current OpenCL device: Type = iGPU Name = AMD TAHITI (DRM 2.43.0, LLVM 3.7.1) Version = OpenCL 1.1 MESA 11.1.2 Compute units = 28 Max work group size = 256 Local memory size = 32 kB Max memory allocation size = 256 MB Double support = Yes Host unified memory = Yes Has AMD Blas = No Has AMD Fft = No Preferred vector width char = 16 Preferred vector width short = 8 Preferred vector width int = 4 Preferred vector width long = 2 Preferred vector width float = 4 Preferred vector width double = 2 [==========] Running 28 tests from 2 test cases. [----------] Global test environment set-up. [----------] 1 test from OCL_HOGFixture_HOG [ RUN ] OCL_HOGFixture_HOG.HOG OpenCL program build log: -D AMD_DEVICE unsupported call to function reduce_smem in normalize_hists_kernel . OpenCL program build log: -D AMD_DEVICE unsupported call to function reduce_smem in normalize_hists_kernel . OpenCL program build log: -D AMD_DEVICE unsupported call to function reduce_smem in normalize_hists_kernel . OpenCL program build log: -D AMD_DEVICE unsupported call to function reduce_smem in normalize_hists_kernel . OpenCL program build log: -D AMD_DEVICE unsupported call to function reduce_smem in normalize_hists_kernel . OpenCL program build log: -D AMD_DEVICE unsupported call to function reduce_smem in normalize_hists_kernel . OpenCL program build log: -D AMD_DEVICE unsupported call to function reduce_smem in normalize_hists_kernel . OpenCL program build log: -D AMD_DEVICE unsupported call to function reduce_smem in normalize_hists_kernel . OpenCL program build log: -D AMD_DEVICE unsupported call to function reduce_smem in normalize_hists_kernel . OpenCL program build log: -D AMD_DEVICE unsupported call to function reduce_smem in normalize_hists_kernel [ PERFSTAT ](samples = 13, mean = 15608.84, median = 15618.32, stddev = 72.35 %280.5%%29) [ OK ] OCL_HOGFixture_HOG.HOG (204664 ms) [----------] 1 test from OCL_HOGFixture_HOG (204664 ms total)
bug,category: ocl
low
Critical
141,715,630
opencv
opencv_perf_objdetect "OCL_Cascade_*" tests fail since commit ad70ab40
When running opencv_perf_objdetect all haarcascade tests fail with the exception below. This was introduced in commit ad70ab40, if i checkout 1 commit before that the tests run fine. ``` Time compensation is 0 CTEST_FULL_OUTPUT OpenCV version: 3.1.0-dev OpenCV VCS version: 3.1.0-315-gecf65a0-dirty Build type: release Parallel framework: pthreads CPU features: mmx sse sse2 sse3 OpenCL Platforms: Clover iGPU: AMD TAHITI (DRM 2.43.0, LLVM 3.7.1) (OpenCL 1.1 MESA 11.1.2) Current OpenCL device: Type = iGPU Name = AMD TAHITI (DRM 2.43.0, LLVM 3.7.1) Version = OpenCL 1.1 MESA 11.1.2 Compute units = 28 Max work group size = 256 Local memory size = 32 kB Max memory allocation size = 256 MB Double support = Yes Host unified memory = Yes Has AMD Blas = No Has AMD Fft = No Preferred vector width char = 16 Preferred vector width short = 8 Preferred vector width int = 4 Preferred vector width long = 2 Preferred vector width float = 4 Preferred vector width double = 2 [==========] Running 28 tests from 2 test cases. [----------] Global test environment set-up. [ RUN ] OCL_Cascade_Image_MinSize_CascadeClassifier.CascadeClassifier/3 OpenCV Error: Assertion failed (u->origdata == data) in deallocate, file /usr/src/opencv/modules/core/src/ocl.cpp, line 4584 /usr/src/opencv/modules/ts/src/ts_perf.cpp:1721: Failure Failed Expected: PerfTestBody() doesn't throw an exception. Actual: it throws cv::Exception: /usr/src/opencv/modules/core/src/ocl.cpp:4584: error: (-215) u->origdata == data in function deallocate params = ("cv/cascadeandhog/cascades/haarcascade_frontalface_alt.xml", "cv/cascadeandhog/images/bttf301.png", 30) termination reason: unhandled exception bytesIn = 240950 bytesOut = 0 samples = 10 of 100 outliers = 0 frequency = 1000000000 min = 16528436 = 16.53ms median = 16943004 = 16.94ms gmean = 16932285 = 16.93ms gstddev = 0.02050919 = 2.08ms for 97% dispersion interval mean = 16935514 = 16.94ms stddev = 351309 = 0.35ms [ FAILED ] OCL_Cascade_Image_MinSize_CascadeClassifier.CascadeClassifier/3, where GetParam() = ("cv/cascadeandhog/cascades/haarcascade_frontalface_alt.xml", "cv/cascadeandhog/images/bttf301.png", 30) (236 ms) ```
wontfix,category: ocl,category: 3rdparty
low
Critical
141,770,104
go
x/sys/unix: file type information from dirents inaccessible
golang.org/x/sys/unix.ReadDirent reads a Dirent that includes the filename and the file type. golang.org/x/sys/unix.ParseDirent parses out the filename. Linux and OSX include the file type in the Dirent. Go should make this information accessible. This info would let programs skip stat'ing files of the wrong type. It would not be feasible to change ParseDirent to do so because it would require a type signature change. If we can agree on a plan, I can (try to) make the code change. Here's my proposal, but I've never made a change to Go so it may be off-base. The package unix could offer a func like "ParseDirentFully" that returned a struct or interface that offered all dirent members available. ParseDirent could call ParseDirentFully to return just the name. (The naming could be better, e.g. ParseDirent and ParseNameFromDirent, but that would break existing code) The code in syscall_*.go already casts to the dirent type from the underlying FS, so it could access another member. (I am using go 1.5.1 on darwin/amd64. I have inspected code on tip and believe this issue still applies)
compiler/runtime
low
Minor
141,838,441
neovim
Unhelpful 'Channel was closed by client'
- Neovim version: v0.1.3-355-g6b22a74 - Operating system: ArchLinux x86_64 - Terminal emulator: gnome-terminal ### Actual behaviour After quitting insert mode for first time in the session I get this error: ``` Error detected while processing function provider#python#Call: line 18: Channel was closed by the client ``` Subsequent times exiting insert mode throw a different error: ``` Error detected while processing function provider#python#Call: line 18: Invalid channel "1" ``` ### Expected behaviour Exiting insert mode should work just fine, or at least throw a more helpful error if there is an issue. Line 18 where? Not anywhere in my `.vim` directory. ### Steps to reproduce I haven't been able to reproduce this with a minimal configuration yet.
provider,ux,channels-rpc
medium
Critical
141,858,856
go
cmd/compile: improve escape analysis understanding of tree structures
``` go package x type N struct { left *N t string } func f(n *N) { n.t = n.left.t } ``` ``` bash $ go tool compile -m -m e.go e.go:8: leaking param content: n e.go:8: from n.left (dot of pointer) at e.go:9 e.go:8: from n.left.t (dot of pointer) at e.go:9 e.go:8: from n.t (star-dot-equals) at e.go:9 ``` I believe that n should not escape here. This arises in the compiler. It is one of the reasons that typecheck1's np argument escapes. (The new escape analysis explainer is very exciting.) 15% of the allocations in the compiler are `*gc.Node`, almost all of them due to moving `*gc.Node` parameters to the heap for calls to typecheck1. (After `*gc.Node` come `gc.Nodes` at 9%, `gc.Node` at 8.5%, `[]*gc.Node` at 5.5%, and `string` at 5%.) This strikes me as hard to fix in the general case, but figured it was worth checking. @dr2chase
compiler/runtime
low
Minor
141,948,681
go
runtime: x_cgo_init determines stacklo incorrectly for some Solaris versions
This is basically a continuation of issue #12210. As @rsc guessed, Solaris grows the stack as faults happen. This behavior is described in section 5.3.5, on page 136 of Mauro, J., & McDougall, R. (2001). Solaris internals: Core kernel components: > The process stack is mapped into the address space with an initial allocation and then grows downward. The stack, like the heap, grows on demand, but no library grows the stack; instead, a different mechanism triggers this growth. > > Initially, a single page is allocated for the stack, and as the process executes and calls functions, it pushes the program counter, arguments, and local variables onto the stack. When the stack grows larger than one page, the process causes a page fault, and the kernel notices that this is a stack segment page fault and grows the stack segment. Prior to Solaris 11 (e.g. OpenSolaris and derivatives), when the stack size was set to unlimited, libc_init() (which is responsible for the initialization of the main stack) would set ss_size = 0 and ss_sp = ul_stktop initially and would then update that as stack faults were encountered. A simple (naive) test program on a pre-Solaris 11 system: ``` #include <ucontext.h> #include <stdio.h> #include <sys/resource.h> #include <inttypes.h> int main(int argc, char **argv) { ucontext_t uc; struct rlimit lim; stack_t ss; getcontext(&uc); printf("ss_sp = %p\n", uc.uc_stack.ss_sp); printf("ss_size = %" PRId64 "\n", uc.uc_stack.ss_size); getrlimit(RLIMIT_STACK, &lim); printf("RLIMIT_STACK = %" PRId64 "\n", lim.rlim_cur); } ``` ...produces these results: ``` $ gcc -m64 -o s main.c ; ./s ss_sp = fffffd7fffdfb000 ss_size = 8192 RLIMIT_STACK = -3 ``` There's nothing wrong with the results since posix doesn't require specific behaviors in regards to these values and in fact, getcontext(), et al. are considered obsolete (they were removed from the 2013 version of the posix standard: http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap03.html). Now, on Solaris 11 and later, the same test program when executed produces different results: ``` ss_sp = ffff800000000000 ss_size = 1098437885952 RLIMIT_STACK = -3 ``` As such, for Solaris 11+, the current code in gcc_solaris_amd64.c in `x_cgo_init()` should generally work fine for determining stacklo in the _unlimited_ stack size case. However, for older releases the correct answer is to actually call getrlimit(RLIMIT_STACK, ...) and calculate the low address using rlim_cur (unless it returns -3, RLIM_INFINITY), in which case it can safely assume 2GB.
compiler/runtime
low
Minor
142,111,397
go
encoding/asn1: When slicing bytes specify capacity or allocate new slice
`parseField` should use triple slice assignments (`[x:y:z]`) to specify the capacity of slices when dealing with `RawContent` and `RawValue` fields. Defining the capacity of these slices will prevent other fields in a struct that reference the same underlying byte slice from inadvertently being mutated by operations that attempt to expand the slice (i.e. `append`). 1. What version of Go are you using (`go version`)? `go1.6` 2. What operating system and processor architecture are you using (`go env`)? `Ubuntu 15.10 amd64` 3. What did you do? Basic example: https://play.golang.org/p/ibPZYcKNs5 ``` package main import "fmt" import "encoding/asn1" type outer struct { Raw asn1.RawContent Version int `asn1:"optional,default:1,tag:0"` Inner inner Other asn1.RawValue } type inner struct { Raw asn1.RawContent Version int `asn1:"optional,default:2,tag:2"` } func main() { a := outer{Version: 1, Inner: inner{Version:2}, Other: asn1.RawValue{1, 1, false, []byte{10}, []byte{1, 1, 10}}} out, _ := asn1.Marshal(a) var b outer asn1.Unmarshal(out, &b) fmt.Println(b.Raw) // Since b.Inner.Raw and b.Raw share the shame underlying slice when // append extends b.Inner.Raw (since it has no capacity) it is extending // into the part of the underlying slice which is referenced by b.Raw and in // doing so overwrites a section of that slice _ = append((&b).Inner.Raw, []byte{255, 255, 255}...) fmt.Println(b.Raw) } ``` 1. What did you expect to see? In above example `b.Raw` shouldn't be affected by using `append` 2. What did you see instead? The last three bytes of `b.Raw` are overwritten.
Documentation,NeedsInvestigation
low
Minor
142,140,843
neovim
double-width character issue in Nerdtree and Netrw
- Neovim version: 0.1.1 and 0.1.3-361-g5730ad9 - Operating system: OS X el capitan - Terminal emulator: iTerm2.app and Terminal.app - Shell : zsh and bash ### Actual behaviour When I use Korean(double-width characters) in filename, (I think) NEOVIM cannot compute correct length of the filename. So NEOVIM draw horizontal bar incorrectly in Nerdtree. ![2016-03-20 5 33 56](https://cloud.githubusercontent.com/assets/4075389/13903516/ff21f34e-eec1-11e5-8a77-0b24c03cd736.png) However, VIM works in this case. ![2016-03-20 5 31 27](https://cloud.githubusercontent.com/assets/4075389/13903510/d093a810-eec1-11e5-84fd-c5aa0e7c493c.png) (first image is the NEOVIM case and second image is the VIM case) ### Steps to reproduce 1. make directory and files with double-width characters. I used μ•ˆλ…•, ν…ŒμŠ€νŠΈ(means hello, test resp.) 2. In the directory, open NEOVIM and Nerdtree.
bug,localization,ui,needs:design,encoding,has:plan
medium
Major
142,147,829
opencv
Discussion needed - Mat operator ==
Hi folks, I'd like to open a discussion regarding a fundamental issue using Matrices in all OpenCV versions all OS. The Mat class instance is a shared pointer by himself. It overwrite the == operator to check two matrices are equal comparing the content of 2 matrices and return a matrix. This cause a lot of problems. You can not put the matrices into a std::list<Mat> slist or QList<Mat> qlist and perform standard list functions like ... Mat a; slist.indexOf(a) Elementwise comparing is neccessary, but OpenCV should not overwrite the == operator and use a method instead like Mat c = a.compare(b) I suggest to replace the == operator and in modules/core/include/opencv2/core/mat.hpp CV_EXPORTS MatExpr operator == (const Mat& a, const Mat& b); +CV_EXPORTS bool operator == (const Mat& a, const Mat& b); and in modules/core/src/matop.cpp -MatExpr operator == (const Mat& a, const Mat& b) +bool operator == (const Mat& a, const Mat& b) { - MatExpr e; - MatOp_Cmp::makeExpr(e, CV_CMP_EQ, a, b); - return e; - return a.data == b.data; } I know, the backward compatibility will be broken and some programs has to be adjusted. But the compiler will find the issue quickly and one has to replace it by the function only. Actually, I use a fork of OpenCV to be suiteable for my work. But I think this will benefit for all developers. Any comments? Best Madrich
wontfix,RFC
low
Critical
142,151,884
TypeScript
refinement types
This is a further development of the idea of [tag types](https://github.com/Microsoft/TypeScript/issues/4895). There are situations where being able to encode a certain predicate about a given value using its type is tremendously helpful. Let's imagine that we have a number. In order to proceed with it we need to assert that it is greater than 0. This assertion doesn't come for free, because it takes some processor time to get evaluated. Since numbers are immutable this assertion only needs to be evaluated once and will hold true from then on without having to be reevaluated. But due to having no way to attach this knowledge to the number value we: - either need to play safe and reevaluate it every time immediately before using - or take our chances trying to trace it through the code from the place where it was asserted keeping the result of the assertion in mind and hoping not to break things during the next refactoring Being able to attach additional knowledge to the type of a value in form of predicate that is guaranteed to hold true as long as the value doesn't change is what is called **refinement types**. @ahejlsberg, what are the chances of seeing the refinement types in TypeScript one day? References: - Refinement types: https://en.wikipedia.org/wiki/Refinement_(computing) - Pre/post conditions, Hoare logic: https://en.wikipedia.org/wiki/Hoare_logic - Design by contract: https://en.wikipedia.org/wiki/Design_by_contract
Suggestion,Needs Proposal
medium
Critical
142,255,496
go
cmd/api: remove contexts slice by parsing `go tool dist list -json` output
It's discovered in https://golang.org/cl/20935 that cmd/api contains a copy of supported platforms along with their cgo support status. We should remove those hardcoded values and use `go tool dist list -json` instead.
help wanted,NeedsFix
low
Major
142,290,689
vscode
Macro recording
It would be nice to be able to record a sequence of inputs and then reproduce it as in Notepad++ or Vim.
feature-request,keybindings
high
Critical
142,328,659
youtube-dl
[Youtube] HTTP Error 404: Not Found (caused by HTTPError()) on Python 2
``` bash $ youtube-dl "https://www.youtube.com/watch?v=UdO7_GrRttM" --verbose [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'https://www.youtube.com/watch?v=UdO7_GrRttM', u'--verbose'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.03.18 [debug] Python version 2.7.6 - Linux-3.16.0-60-generic-x86_64-with-Ubuntu-14.04-trusty [debug] exe versions: avconv 9.18-6, avprobe 9.18-6, rtmpdump 2.4 [debug] Proxy map: {} [youtube] UdO7_GrRttM: Downloading webpage ERROR: Unable to download webpage: HTTP Error 404: Not Found (caused by HTTPError()); 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. File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 365, in _request_webpage return self._downloader.urlopen(url_or_request) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1929, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/usr/lib/python2.7/urllib2.py", line 410, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 523, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 448, in error return self._call_chain(*args) File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) ``` Anything else I should attach?
cant-reproduce,external-bugs
medium
Critical
142,410,631
nvm
Fix startup files (.profile, .bashrc, .bash_profile, etc.)
Looking through the issues, it looks like there are a lot of people (myself included) that need the startup to be included in `~/.bash_profile` instead of `~/.bashrc`. I know that there's a plethora of startup profile dotfiles, operating systems, and shells to consider when installing a CLI tool like nvm. The number of [related issues already filed](https://github.com/creationix/nvm/labels/installing%3A%20profile%20detection) is strong evidence of the complexity. After some research, I think the `rvm` project has a good idea. This project updates startup files to run an rvm startup script on login just like `nvm`. [Here's how they do it](https://github.com/rvm/rvm/blob/master/scripts/functions/installer#L1163-L1165): 1. [Compile a list of files where startup commands _may_ exist](https://github.com/rvm/rvm/blob/master/scripts/functions/installer#L1023-L1026). 2. [Pick _preferred_ locations for startup commands](https://github.com/rvm/rvm/blob/master/scripts/functions/installer#L1030-L1032). 3. [Build list of files _already containing_ startup command using list from step 1](https://github.com/rvm/rvm/blob/master/scripts/functions/installer#L1034-L1051) - ignore the `found_rc` (see note below). 4. [Remove startup commands from all files from step 3](https://github.com/rvm/rvm/blob/master/scripts/functions/installer#L1113-L1124). 5. [Add startup commands to all files from step 2](https://github.com/rvm/rvm/blob/master/scripts/functions/installer#L1125-L1148). Note: The `rvm` installer also does steps 2-5 for files related to `$PATH`, but it doesn't look like that's necessary for `nvm`, so I've omitted those steps. The result of this process is you may end up with extra dotfiles you never use (like `.mkshrc`), but everything should still work properly. We could print a list of new files at the end of installation so the user can delete ones that aren't relevant if they care.
installing nvm: profile detection,pull request wanted
low
Minor
142,558,549
youtube-dl
Twitter mobile links Unsupported error
Twitter mobile links are not downloading. **Youtube-dl version:** `2016.03.18 ` **Mobile Link Format** [https://mobile.twitter.com/HananPak/media/grid?idx=0&tid=701050373990174724](https://mobile.twitter.com/HananPak/media/grid?idx=0&tid=701050373990174724) **Output** ``` My prompt>./youtube-dl --verbose https://mobile.twitter.com/HananPak/media/grid?idx=0&tid=701050373990174724 [1] 19973 My prompt>[debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'--verbose', u'https://mobile.twitter.com/HananPak/media/grid?idx=0'] [debug] Encodings: locale ISO-8859-1, fs ISO-8859-1, out ISO-8859-1, pref ISO-8859-1 [debug] youtube-dl version 2016.03.18 [debug] Python version 2.7.9 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.1 [debug] exe versions: avconv 11.4-6, avprobe 11.4-6, rtmpdump 2.4 [debug] Proxy map: {} [generic] grid?idx=0: Requesting header WARNING: Falling back on generic information extractor. [generic] grid?idx=0: Downloading webpage [generic] grid?idx=0: Extracting information ERROR: Unsupported URL: https://mobile.twitter.com/HananPak/media/grid?idx=0 Traceback (most recent call last): File "./youtube-dl/youtube_dl/extractor/generic.py", line 1314, in _real_extract doc = compat_etree_fromstring(webpage.encode('utf-8')) File "./youtube-dl/youtube_dl/compat.py", line 253, in compat_etree_fromstring doc = _XML(text, parser=etree.XMLParser(target=etree.TreeBuilder(element_factory=_element_factory))) File "./youtube-dl/youtube_dl/compat.py", line 242, in _XML parser.feed(text) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror raise err ParseError: unbound prefix: line 1, column 2479 Traceback (most recent call last): File "./youtube-dl/youtube_dl/YoutubeDL.py", line 668, in extract_info ie_result = ie.extract(url) File "./youtube-dl/youtube_dl/extractor/common.py", line 320, in extract return self._real_extract(url) File "./youtube-dl/youtube_dl/extractor/generic.py", line 1961, in _real_extract raise UnsupportedError(url) UnsupportedError: Unsupported URL: https://mobile.twitter.com/HananPak/media/grid?idx=0 ```
request
low
Critical
142,762,012
kubernetes
Increase maximum pods per node
As discussed on the sig-node call on March 22: max-pods on kube-1.1 was 40, kube-1.2 is 110 pods per node. We have use-cases expressed by customers for increased node vertical scalability. This is (generally) for environments using fewer larger capacity nodes and perhaps running lighter-weight pods. For kube-1.3 we would like to discuss targeting a 100 node cluster running 500 pods per node. This will require coordination with @kubernetes/sig-scalability as it would increase the total pods-per-cluster. /cc @kubernetes/sig-node @kubernetes/sig-scalability @dchen1107 @timothysc @derekwaynecarr @ncdc @smarterclayton @pmorie Thoughts?
sig/scalability,sig/node,kind/feature,lifecycle/frozen,triage/accepted
high
Critical
142,766,682
go
cmd/cgo: godefs doesn't work nicely with multiple input files
It would be nice if the output of the command `cgo -godefs` with multiple input files resulted in a legal source file. Currently it duplicates the package declaration (and the generated comments) rendering the output useless without post-processing (since all the output goes straight to stdout): ``` $ cat a.go package ex /* typedef int a; */ import "C" type Atype C.a ``` ``` $ cat b.go package ex /* typedef int b; */ import "C" type Btype C.b ``` ``` $ go tool cgo -godefs a.go b.go // Created by cgo -godefs - DO NOT EDIT // cgo -godefs a.go b.go package ex type Atype int32 // Created by cgo -godefs - DO NOT EDIT // cgo -godefs a.go b.go package ex type Btype int32 ``` It would be nice if the output were instead: ``` $ go tool cgo -godefs a.go b.go // Created by cgo -godefs - DO NOT EDIT // cgo -godefs a.go b.go package ex type Atype int32 type Btype int32 ``` This would be useful in situations where `cgo -godefs` requires extra/different information on different platforms. It is generally fairly easy to workaround though and the lack of this feature in previous versions of go might limit its usefulness.
compiler/runtime
low
Minor
142,809,072
go
runtime, cmd/compile: consider write barrier short-circuit when *dst == src
I did a quick and dirty instrumentation of `writebarrierptr` and found that when executing `cmd/compile` to build std, about 25% of calls on average had `*dst == src`. In that case, there's no need to do the actual assignment or gray any objects (I think). I don't know how (a)typical that 25% number is. We should investigate whether checking for this and short-circuiting is a net performance gain, in general. There are multiple places in the stack this could occur: (1) writebarrierptr (and friends) Add ``` go if *dst == src { return } ``` to the beginning of the method. (2) Wrapper routines Add checks like: ``` go if dst[1] != src[1] { writebarrierptr(&dst[1], src[1]) } ``` to the runtime routines that call `writebarrierptr`, like the wbfat.go routines, and `writebarrierstring` and friends. This is different than (1) insofar as it skips the `writebarrierptr` function call instead of having it return immediately. (3) Generated code We currently generate wb-calling code like: ``` go if writeBarrier.enabled { writebarrierptr(dst, src) } else { *dst = src } ``` We could instead generate code like: ``` go if *dst != src { if writeBarrier.enabled { writebarrierptr(dst, src) } else { *dst = src } } ``` cc @aclements @randall77 I don't plan to work on this soon, as I need to undistract myself.
Performance,compiler/runtime
medium
Major
142,814,158
You-Dont-Know-JS
"this & obj prototypes " - ch 4 : Suggestion. comments in code snippets to improve clarity
Even though we have a sentence > Consider this loose pseudo-code (invented syntax) for inherited classes: ahead of the code snippets showing pseudo-code. As I read along, I was thinking this probably is JS. may be ES6. And I read along, until i hit the mixins part. I felt that may be adding a comment in the top of pseudo code block ex. `//This is not JS. This is pseudo code.` might help a reader
for second edition
medium
Minor
142,907,985
rust
GDB hangs when debugging exe compiled with 1.9nightly under Windows
When I debugging this [](https://play.rust-lang.org/?gist=f8afbd583d102fc2f55f&version=nightly), the gdb hanged. Later I found whenever the GDB stepping out a function, it hangs. ![qq 20160323171401](https://cloud.githubusercontent.com/assets/2211542/13980936/23e04710-f11c-11e5-9da9-e1d0867492f4.png) The mininum code to reproduce the issue is listed below ` fn b()->i32{ return 0; } fn a(){ b(); } fn main() { a(); } ` ![qq 20160323171942](https://cloud.githubusercontent.com/assets/2211542/13980978/540554c6-f11c-11e5-9fa0-2d7e9146c463.png)
O-windows-gnu,C-bug
low
Critical
143,089,134
react
Consider Special Casing Certain DOM Attributes to Accept Elements
The use case is for example, translation components rendering string content. The HTML spec has some unfortunate attributes that behave kind of like content. It seems like they should be able to accept React elements. If I were to design a similar React component I would allow it to accept React elements. Since we normalize usage we could in theory have it built-in to React that certain attributes like `placeholder`, `aria-label`, etc. could accept React components that render into strings. That would probably have to go in after we figure out a way to render strings at the root of a React composite component.
Type: Feature Request,Component: DOM,React Core Team
medium
Minor
143,214,622
rust
Tracking issue for integer methods for Wrapping
`u32` and other primitive integer types implement a number of bit-manipulation methods like `rotate_left`, but `Wrapping<_>` does not. At the moment this can be worked around with code like `Wrapping(x.0.rotate_left(n))` instead of `x.rotate_left(n)`. It would be nice to implement: - [x] `count_ones` - [x] `count_zeroes` - [x] `leading_zeroes` - [x] `trailing_zeroes` - [x] `rotate_left` - [x] `rotate_right` - [x] `swap_bytes` - [x] `from_be` (?) - [x] `from_le` (?) - [x] `to_be` - [x] `to_le` - [x] `pow` (?) Edit: Others added after https://github.com/rust-lang/rust/issues/32463#issuecomment-376663775 - [x] `is_power_of_two` (?) - [x] `next_power_of_two` (?) - [x] `min_value` (?) - [x] `max_value` (?) - [x] `from_str_radix` (?) - [x] `reverse_bits` - [x] `abs` ~~https://github.com/rust-lang/rust/pull/49393~~ https://github.com/rust-lang/rust/pull/50465 - [x] `signum` ~~https://github.com/rust-lang/rust/pull/49393~~ https://github.com/rust-lang/rust/pull/50465 - [x] `is_positive` ~~https://github.com/rust-lang/rust/pull/49393~~ https://github.com/rust-lang/rust/pull/50465 - [x] `is_negative` ~~https://github.com/rust-lang/rust/pull/49393~~ https://github.com/rust-lang/rust/pull/50465 and maybe other methods, for: - `Wrapping<u8>` - `Wrapping<u16>` - `Wrapping<u32>` - `Wrapping<u64>` - `Wrapping<usize>` - `Wrapping<i8>` - `Wrapping<i16>` - `Wrapping<i32>` - `Wrapping<i64>` - `Wrapping<isize>` Edit: From https://github.com/rust-lang/rust/pull/50465 - [ ] Decide on correct behavior for `wrapping_next_power_of_two`
T-libs-api,B-unstable,C-tracking-issue,Libs-Tracked,Libs-Small
medium
Critical
143,389,365
opencv
write/read of (at least) feature detector/descriptor extractor don't seem to work properly in the latest version 3.x
### Information of the system - OpenCV version: 3.1 (latest commit e792ee89dec696e22a0bef15f84fe13368326497) - Host OS: Linux (Ubuntu 14.04) - Compiler: GCC 4.8.2 ### Part of the OpenCV library in which the issue appears. - feature detector/descriptor extractor Possibly other classes from `cv::Algorithm` are affected? ### Expected behavior 1. When the `write` function is called from a feature detector/descriptor extractor class, passing a `FileStorage`, a yaml/xml file should be created containing the value of the parameters. 2. When the `read` function is called from a feature detector/descriptor extractor class, it should change the values of the parameters of the algorithm. ### Actual behaviour 1. An empty file is written, with just the header of the yaml file (in case a yaml file is created). 2. The parameters do not change. ### Additional information Note that I tried on OpenCV 2.4 (the latest version of the repository 762965897ac7ee08f14a52a398185b02ae522c5c) and it works. ### Code example to reproduce 1. ``` #include "opencv2/opencv.hpp" #include "opencv2/features2d.hpp" #include "opencv2/xfeatures2d.hpp" #include "opencv2/xfeatures2d/nonfree.hpp" int main() { cv::Ptr<cv::ORB> feature_detector = cv::ORB::create(); cv::FileStorage fs("params.yml", cv::FileStorage::WRITE); feature_detector->write(fs); } ``` ### Code example to reproduce 2. ``` #include "opencv2/opencv.hpp" #include "opencv2/features2d.hpp" #include "opencv2/xfeatures2d.hpp" #include "opencv2/xfeatures2d/nonfree.hpp" int main() { cv::Ptr<cv::ORB> feature_detector = cv::ORB::create(); cv::FileStorage fs("params.yml", cv::FileStorage::READ); feature_detector->write(fs.root()); } ```
feature,category: features2d
low
Minor
143,396,507
youtube-dl
ESPNFC ERROR: Did not get any data blocks
URLs http://www.espnfc.com/club/barcelona/83/video/2836060 or http://www.espnfc.us/club/barcelona/83/video/2836060 C:>youtube-dl.py -v "http://www.espnfc.com/club/barcelona/83/video/2836060" [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.espnfc.com/club/barcelona/83/vid eo/2836060'] [debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252 [debug] youtube-dl version 2016.03.18 [debug] Python version 2.7.11 - Windows-7-6.1.7601-SP1 [debug] exe versions: ffmpeg N-71346-gdf4fca2 [debug] Proxy map: {} [generic] 2836060: Requesting header WARNING: Falling back on generic information extractor. [generic] 2836060: Downloading webpage [generic] 2836060: Extracting information [debug] Invoking downloader on u"https://sw88.go.com/b/ss/wdgespvideo/5.4/REDIR/ 064492719492920231458866294651?D=..&url=https://once.unicornmedia.com/now/od/aut o/07355f66-a73e-46c2-885b-e769dac7c817/20879ce0-ad85-4acf-b0b4-f4a91a6c1517/2505 919f-c797-4074-9d20-a6fbbce95ca5/content.once?UMADPARAMreferer=http://espnfc.com /video/espnfc/video?id=2836060&pe=media&mediaName=SOCCER::NO_AD::+Cruyff+laid+fo undations+for+Barcelona's+success_2836060&mediaLength=00:03:01&mediaPlayer=embed 09&mediaSession=0-0&c3=videoid=SOCCER::NO_AD::+Cruyff+laid+foundations+for+Barce lona's+success_2836060&v2=videoid=SOCCER::NO_AD::+Cruyff+laid+foundations+for+Ba rcelona's+success_2836060&events=event1&v52=inlinePlayer&c52=inlinePlayer&v53=in linePlayer:twitter&c53=inlinePlayer:twitter" ERROR: Did not get any data blocks File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Python27\lib\runpy.py", line 72, in _run_code exec code in run_globals File "C:\youtube-dl.py__main__.py", line 19, in <module> youtube_dl.main() File "C:\youtube-dl.py\youtube_dl__init__.py", line 412, in main _real_main(argv) File "C:\youtube-dl.py\youtube_dl__init__.py", line 402, in _real_main retcode = ydl.download(all_urls) File "C:\youtube-dl.py\youtube_dl\YoutubeDL.py", line 1719, in download url, force_generic_extractor=self.params.get('force_generic_extractor', Fals e)) File "C:\youtube-dl.py\youtube_dl\YoutubeDL.py", line 679, in extract_info return self.process_ie_result(ie_result, download, extra_info) File "C:\youtube-dl.py\youtube_dl\YoutubeDL.py", line 724, in process_ie_resul t return self.process_video_result(ie_result, download=download) File "C:\youtube-dl.py\youtube_dl\YoutubeDL.py", line 1365, in process_video_r esult self.process_info(new_info) File "C:\youtube-dl.py\youtube_dl\YoutubeDL.py", line 1627, in process_info success = dl(filename, info_dict) File "C:\youtube-dl.py\youtube_dl\YoutubeDL.py", line 1569, in dl return fd.download(name, info) File "C:\youtube-dl.py\youtube_dl\downloader\common.py", line 344, in download ``` return self.real_download(filename, info_dict) ``` File "C:\youtube-dl.py\youtube_dl\downloader\http.py", line 230, in real_downl oad self.report_error('Did not get any data blocks') File "C:\youtube-dl.py\youtube_dl\downloader\common.py", line 157, in report_e rror self.ydl.report_error(_args, *_kargs) File "C:\youtube-dl.py\youtube_dl\YoutubeDL.py", line 543, in report_error self.trouble(error_message, tb) File "C:\youtube-dl.py\youtube_dl\YoutubeDL.py", line 505, in trouble tb_data = traceback.format_list(traceback.extract_stack())
site-support-request
low
Critical
143,424,339
youtube-dl
Naver tvcast : authentication issue
youtube-dl -v http://tvcast.naver.com/v/656759 [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://tvcast.naver.com/v/656759'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.03.18 [debug] Python version 2.7.10 - Darwin-15.4.0-x86_64-i386-64bit [debug] exe versions: none [debug] Proxy map: {} [Naver] 656759: Downloading webpage ERROR: 19μ„Έ 미만 μ²­μ†Œλ…„μ€ κ°μƒν•˜μ‹€ 수 μ—†λŠ” λ™μ˜μƒμœΌλ‘œ 둜그인 ν›„ 이용이 κ°€λŠ₯ν•©λ‹ˆλ‹€. Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 668, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 320, in extract return self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/naver.py", line 52, in _real_extract raise ExtractorError(error, expected=True) ExtractorError: 19\uc138 \ubbf8\ub9cc \uccad\uc18c\ub144\uc740 \uac10\uc0c1\ud558\uc2e4 \uc218 \uc5c6\ub294 \ub3d9\uc601\uc0c1\uc73c\ub85c \ub85c\uadf8\uc778 \ud6c4 \uc774\uc6a9\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4. 19μ„Έ 미만 μ²­μ†Œλ…„μ€ κ°μƒν•˜μ‹€ 수 μ—†λŠ” λ™μ˜μƒμœΌλ‘œ 둜그인 ν›„ 이용이 κ°€λŠ₯ν•©λ‹ˆλ‹€. => Youth under the age of 19 will not be available after you log in to watch video.
request
low
Critical
143,545,444
rust
Specialization: allow some projection when typechecking an impl
The following example currently fails to compile: ``` rust pub trait Foo { type TypeA; type TypeB: Bar<Self::TypeA>; } pub trait Bar<T> { } pub struct ImplsBar; impl<T> Bar<T> for ImplsBar { } impl<T> Foo for T { type TypeA = u8; default type TypeB = ImplsBar; } ``` with message: ``` <anon>:15:9: 15:12 error: the trait `Bar<u8>` is not implemented for the type `<T as Foo>::TypeB` [E0277] <anon>:15 impl<T> Foo for T { ``` The problem seems to be that the type checker is using a projection of `TypeB` to actually check the impl's definition of `TypeB` against its bounds. But because it's marked `default`, the item cannot be projected. In general, we should loosen up the rules on projections when checking an impl -- but doing so soundly is tricky. It clearly doesn't work to just allow _all_ projections to go through (a la "trans mode"), because in general items could be replaced in more specialized impls. But it _does_ seem reasonable to allow projecting _the current item being impled_ (for any trait ref covered by the impl), because any specialization of that item will be rechecked under its own constraints.
A-trait-system,T-compiler,A-specialization,C-bug,requires-nightly,F-associated_type_defaults
low
Critical
143,546,770
nvm
nvm_cheksum not found
I cannot install anything with nvm via Binary. The checksum is always not found and it goes to installing from source. ``` shell $ nvm install iojs Downloading https://iojs.org/dist/v3.3.1/iojs-v3.3.1-darwin-x64.tar.gz... ######################################################################## 100.0% nvm_checksum:2: = not found Binary download failed, trying source. Binary download failed, trying source. Installing iojs from source is not currently supported ``` ``` shell nvm install node Downloading https://nodejs.org/dist/v5.9.1/node-v5.9.1-darwin-x64.tar.gz... ######################################################################## 100.0% nvm_checksum:2: = not found Binary download failed, trying source. Binary download failed, trying source. ######################################################################## 100.0% Checksums empty Now using node v5.9.1 (npm v3.7.3) Creating default alias: default -> node (-> v5.9.1) ``` I am on OSX 10.11.4. Used brew install nvm. Running commands in ZSH. Any idea what is causing this?
shell: zsh,OS: Mac OS,needs followup,installing node: checksums
low
Critical
143,635,529
TypeScript
Proposal: Friend Declarations for classes
_NOTE: This proposal is an alternative to the proposal in #5228._ ## Overview Often there is a need to share information on types within a program or package that should not be accessed from outside of the program or package. While the `public` accessibility modifier allows types to share information, is insufficient for this case as consumers of the package have access to the information. While the `private` accessibility modifier prevents consumers of the package from accessing information from the type, it is insufficient for this case as types within the package also cannot access the information. To satisfy this case, we propose the addition of a _FriendDeclaration_ to classes: ``` ts class A { friend createA; private constructor() { } } function createA() { return new A(); } ``` A _FriendDeclaration_ is a new declaration supported in the body of a _ClassDeclaration_ or _ClassExpression_ that indicates that the class, function, or namespace to which the supplied name resolves can treat the `private` and `protected` members of the class as if they were public. The name referenced in the _FriendDeclaration_ is resolved relative to the _ClassDeclaration_. The name must be in scope. ## Grammar &emsp;&emsp;_ClassElement:_ _( Modified )_ &emsp;&emsp;&emsp;_FriendDeclaration_ &emsp;&emsp;_FriendDeclaration:_ &emsp;&emsp;&emsp;`friend`&emsp;_FriendDeclarationNames_&emsp;`;` &emsp;&emsp;_FriendDeclarationNames:_ &emsp;&emsp;&emsp;_EntityName_ &emsp;&emsp;&emsp;_FriendDeclarationNames_&emsp;`,`&emsp;_EntityName_ ## Examples **Instantiate a class with a private constructor:** ``` ts class A { friend createA; private constructor() { } } function createA() { return new A(); } ``` **Extend a class with a private constructor:** ``` ts class A { friend B; private constructor() { } } class B extends A { } ``` **Access private members of an imported class:** ``` ts // a.ts import { update } from "./b"; export class A { friend update; private x: number; } // b.ts import { A } from "./a"; export function update(a: A) { a.x = 1; } ```
Suggestion,Awaiting More Feedback
medium
Critical
143,642,410
go
cmd/vet: vet cannot report certain unused results with -unusedresult
See https://github.com/lgarron/pizza for the reproduction code that goes with this report. # Unexpected behaviour of `go vet -unusedresult` ## Issue Summary There are 4 functions in `pizza.go` and 4 functions in `string.go` that `go vet` cannot report as an unused result as of [21cc49bd](https://github.com/golang/tools/blob/21cc49bd030cf5c6ebaca2fa0e3323628efed6d8/cmd/vet/unused.go) (March 25, 2016). As an example, the functions in `pizza.go` all share the same implementation: ``` return Pizza{ toppings: append(pizza.toppings, topping), } ``` ... although they have four different signatures: ``` func (pizza Pizza) addToppingMethod(topping string) Pizza func (pizza Pizza) PublicAddToppingMethod(topping string) Pizza func addToppingBareFunction(pizza Pizza, topping string) Pizza func PublicAddToppingBareFunction(pizza Pizza, topping string) Pizza ``` It is not possible to check for unused results of these functions using `go vet` with the `-unusedresult` flag. Based on [the commit that introduced `-unusedresult`](https://github.com/golang/tools/commit/4a08fb6fc335489d063834778b71d1af382f4c27), it seems this was originally designed to catch "pure" functions. However, [the documentation](https://golang.org/cmd/vet/#hdr-Unused_result_of_certain_function_calls) does not make this clear at all. Also: - It's not obvious which function types `-unusedresult` can check for, which functions to pass to `-unusedfuncs` or `-unusedstringmethods`, and how to format and qualify them. - It's not possible to get `go vet` to output the default values for `-unusedfuncs` and `-unusedstringmethods` and the documentation is vague ("By default, this includes functions like fmt.Errorf and fmt.Sprintf and methods like String and Error."). In addition, there is no way to use the default values _in addition to_ custom values in a single invocation, which makes it easy to miss out on vetting the default values _by accident_. The only way to do this seems to be to run `go vet` multiple times` with different arguments. ## Reproduction Steps ``` # Get the code go get github.com/lgarron/pizza cd "$GOPATH/src/github.com/lgarron/pizza" # Get `go vet` go get golang.org/x/tools/cmd/vet # Sanity check that the code compiles and runs. go test -v # Run `go vet` with default settings. go tool vet -unusedresult *_test.go # Run `go vet` using qualified *and* unqualified versions for each function. go tool vet -unusedresult -unusedfuncs="makeStringMethod,PublicMakeStringMethod,makeStringBareFunction,PublicMakeStringBareFunction,addToppingMethod,PublicAddToppingMethod,addToppingBareFunction,PublicAddToppingBareFunction,pizza.Pizza.makeStringMethod,pizza.Pizza.PublicMakeStringMethod,pizza.makeStringBareFunction,pizza.PublicMakeStringBareFunction,pizza.Pizza.addToppingMethod,pizza.Pizza.PublicAddToppingMethod,pizza.addToppingBareFunction,pizza.PublicAddToppingBareFunction,errors.New,fmt.Errorf,fmt.Sprintf,fmt.Sprint,sort.Reverse" -unusedstringmethods="makeStringMethod,PublicMakeStringMethod,makeStringBareFunction,PublicMakeStringBareFunction,addToppingMethod,PublicAddToppingMethod,addToppingBareFunction,PublicAddToppingBareFunction,pizza.Pizza.makeStringMethod,pizza.Pizza.PublicMakeStringMethod,pizza.makeStringBareFunction,pizza.PublicMakeStringBareFunction,pizza.Pizza.addToppingMethod,pizza.Pizza.PublicAddToppingMethod,pizza.addToppingBareFunction,pizza.PublicAddToppingBareFunction,Error,String" *_test.go ``` ### Debugging using manual traces: The relevant file int he `go vet` source is called `unused.go`. We will use [a modified version of `unused.go`](https://github.com/lgarron/pizza/blob/master/modified-vet-src/unused.go) to show us what is happening. ``` # Check out a known-bad version of the source for `go vet`. cd "$GOPATH/src/golang.org/x/tools" git checkout 21cc49bd030cf5c6ebaca2fa0e3323628efed6d8 cd "$GOPATH/src/github.com/lgarron/pizza" # Overwrite the relevant `go vet` code with an annotated version. cp modified-vet-src/unused.go "$GOPATH/src/golang.org/x/tools/cmd/vet/unused.go" # Build a new version of `vet` in the current project directory. go build -a golang.org/x/tools/cmd/vet # View output. ./vet -unusedresult *_test.go ``` Here is the output I get: ``` unusedFuncsFlag: errors.New,fmt.Errorf,fmt.Sprintf,fmt.Sprint,sort.Reverse unusedStringMethodsFlag: Error,String [start] [checking for conversion] [checking for (not method + unqualified)] [checking pkg.selectors] [pkg.selectors not okay] [checking pkg.uses] [checking for unusedFuncs] REPORT: qualified name `fmt.Sprintf` is in unusedFuncs [start] [checking for conversion] [checking for (not method + unqualified)] [checking pkg.selectors] [pkg.selectors not okay] [checking pkg.uses] [pkg.uses was not okay] [start] [checking for conversion] [checking for (not method + unqualified)] [checking pkg.selectors] [pkg.selectors not okay] [checking pkg.uses] [pkg.uses was not okay] [start] [checking for conversion] [checking for (not method + unqualified)] NO REPORT: not method + unqualified [start] [checking for conversion] [checking for (not method + unqualified)] NO REPORT: not method + unqualified [start] [checking for conversion] [checking for (not method + unqualified)] [checking pkg.selectors] [pkg.selectors not okay] [checking pkg.uses] [checking for unusedFuncs] REPORT: qualified name `fmt.Sprintf` is in unusedFuncs [start] [checking for conversion] [checking for (not method + unqualified)] [checking pkg.selectors] [pkg.selectors not okay] [checking pkg.uses] [checking for unusedFuncs] REPORT: qualified name `fmt.Sprintf` is in unusedFuncs [start] [checking for conversion] [checking for (not method + unqualified)] [checking pkg.selectors] [pkg.selectors not okay] [checking pkg.uses] [pkg.uses was not okay] [start] [checking for conversion] [checking for (not method + unqualified)] [checking pkg.selectors] [pkg.selectors not okay] [checking pkg.uses] [pkg.uses was not okay] [start] [checking for conversion] [checking for (not method + unqualified)] NO REPORT: not method + unqualified [start] [checking for conversion] [checking for (not method + unqualified)] NO REPORT: not method + unqualified [start] [checking for conversion] [checking for (not method + unqualified)] [checking pkg.selectors] [pkg.selectors not okay] [checking pkg.uses] [checking for unusedFuncs] REPORT: qualified name `fmt.Sprintf` is in unusedFuncs [start] [checking for conversion] [checking for (not method + unqualified)] [checking pkg.selectors] [pkg.selectors not okay] [checking pkg.uses] [checking for unusedFuncs] NO REPORT BUT REPORTABLE: qualified name `fmt.Printf` is not in unusedFuncs ``` ## Suggestions - 1a) Remove some of the restrictions and assumptions in the source to allow reporting these functions as unused, or 1b) explicitly document the limited behaviour. - 2) Document which functions can be passed in, with clear examples of how to format them. I tried 1a), but I don't know the code well enough to contribute a fix yet.
Analysis
low
Critical
143,731,127
rust
Support death tests in libtest
I would like to be able to mark a test as a death test of some kind, like, running this code should trigger an `abort` (instead of just an unwind), an `exit` with a particular exit code, or an `assert` (in case `assert` doesn't unwind if, e.g. `panic=abort`). This requires two fundamental ingredients, libtests needs to support: - spawning test in different processes (that is, process spawning/setup and teardown) - marking tests as death tests (and maybe indicate the type). A way to mark a test as a _death test_ is important, since in the case in which `panic != abort` one still wants all the non death tests to happen within the same process for speed, but libtest stills need to spawn different processes for the _death tests_ only (so it needs a way to tell these apart). For crates in which `panic == abort`, it would be nice if one could turn all tests into _death tests_ at the crate level. This issue is tangentially related to: https://github.com/rust-lang/rfcs/pull/1513 Google Test is probably the most famous unit-testing framework that supports these although in C++ other frameworks do as well. It usually takes 3k LOC C++ code to implement a "portable" process spawning/set up/tear down mechanism for spawning death tests, so it is quite a bit of machinery that might better belong outside of rustc.
T-libs-api,A-libtest,C-feature-accepted,T-testing-devex
low
Major
143,735,963
nvm
`nvm_tree_contains_path` doesn't work on case-insensitive filesystems
Specifically, this can happen on a Mac, when the username isn't all lowercase (see https://github.com/creationix/nvm/issues/855#issuecomment-201570439).
bugs,OS: Mac OS,pull request wanted
low
Minor