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
218,065,971
vscode
showInputBox should have the ability to have an array of quickpick options as well
If you do showInputBox, you can receive input from a user. If you do showQuickPick you can have the user choose from a list. There is no way to receive input from a user AND show a list of choices. If you try this with showQuickPick, and the user enters something that is not in the array, undefined is returned. I think that showInputBox should have an overload that displays options just like in showQuickPick and returns the value instead of undefined if it is not an entry from the array.
feature-request,api,quick-pick
medium
Critical
218,123,569
go
x/mobile: fix x/mobile/gl just like c opengl or go-gl
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? 1.7 ### What operating system and processor architecture are you using (`go env`)? mac os ### What did you do? migrate a program from pc to mobile go get -u github.com/go-gl/glfw/v3.2/glfw --> golang.org/x/mobile/app go get -u github.com/go-gl/gl/v2.1/gl --> golang.org/x/mobile/gl go get -u github.com/timshannon/go-openal/openal --> golang.org/x/mobile/exp/audio/al I wish to do the above change ### What did you expect to see? [golang.org/x/mobile/gl] act just like [github.com/go-gl/gl/v2.1/gl ] ### What did you see instead? There is lot of differences , -------------------------------------------------------------------------------------------------- //not implemented gl.TexImage1D gl.Begin(gl.TRIANGLE_STRIP) gl.End() gl.PushMatrix() gl.PopMatrix() gl.MatrixMode(gl.PROJECTION) gl.TexCoord2f(1, 1) gl.Vertex2f(x2, y2) gl.Color4f(r, g, b, a) gl.LoadIdentity() gl.Ortho(0, float64(sys.scrrect[2]), 0, float64(sys.scrrect[3]), -1, 1) gl.Translated(0, float64(sys.scrrect[3]), 0) -------------------------------------------------------------------------------------------------- //interface/behaviour change gl.GenTextures(1, &paltex) -->CreateTexture gl.DeleteTextures(1, &paltex) --> DeleteTexture -------------------------------------------------------------------------------------------------- //unclear gl.Str(src) -->GetString(pname Enum) string ??? gl.DeleteObjectARB(fragObj) --> DeleteShader ???? gl.GetInfoLogARB -->GetProgramInfoLog| GetShaderInfoLog ????
mobile
low
Minor
218,125,893
go
proposal: spec: relax structural matching for conversions
Currently, as of Go 1.8, one can convert between two identical types, A and B, defined as follows: ``` type A struct { Foo int } type B struct { Foo int } ``` It is however not possible to convert between `[]A` and `[]B`, even though the memory layout of both slices is identical, and one has to resort to following hackery to get both compile time checking and O(1) conversion time: ``` package main import ( "fmt" "unsafe" ) type A struct { Foo int } type B struct { Foo int } // Compile time check that A and B are the same var _ = A(B{}) func main() { a := A{Foo: 5} fmt.Println(B(a)) as := []A{{Foo: 5}} fmt.Println(*(*[]B)(unsafe.Pointer(&as))) } ``` This is often useful when different parts of an application are responsible for different parts of the handling of the lifetime of an object. For example, a database layer could return []A, which would be a type with `db:"foo"` decorators to help with database deserialization using the sqlx package, while the http handler wants to use []B, because it contains the field tags necessary for json serialization. Currently, a copy or unsafe is required, I propose allowing slices with identical memory layouts to be converted between another, and to restrict this to only 1 level deep to reduce possible complexity in the compiler. This is a similar reasoning why the spec was changed to allow structs with different field tags to be converted between eachother, and I believe it would help avoid usage of unsafe and copies in many applications which seperate out concerns between different layers.
LanguageChange,Proposal,LanguageChangeReview
medium
Major
218,171,701
rust
support deeply nested coercions
It would be nice if this code were to compile: ```rust struct Foo { v: Vec<i32> } fn bar(f: &Foo, g: &[i32]) { let x = match true { true => { match f { &Foo { ref v } => &v, } } false => { g } }; println!("{:?}", x); } fn main() { } ``` At present, it does not. The reason is that we apply a `&x[..]` coercion to the inner match expression, but the result of the arm is not coerced, and hence has type `&&Vec<i32>`. This then fails the borrow-check because the borrow of `v` outlives the arm. If you change the arm to `&Foo { ref v } => v` or `&Foo { ref v } => &v[..]`, it will compile fine. The following very similar example using an `if` does work, or at least **did**, but somewhat accidentally. Pull request https://github.com/rust-lang/rust/pull/40224 winds up breaking it as part of a refactoring; hopefully nobody will notice. =) ```rust struct Foo { v: Vec<i32> } fn bar(f: &Foo, g: &[i32]) { let x = if true { match f { &Foo { ref v } => &v, } } else { g }; println!("{:?}", x); } fn main() { } ```
A-type-system,C-enhancement,T-compiler,T-types
low
Major
218,181,198
TypeScript
Broken inference between index typed object and Record
**TypeScript Version:** 2.2.2 **Code** ```ts interface Errors { [field: string]: { key: string message: string } } const errors: Errors = {} function genericObjectFunction<K extends string, V>(obj: Record<K, V>): [K, V][] { return [] } /* Argument of type 'Errors' is not assignable to parameter of type 'Record<string, never>'. Index signatures are incompatible. Type '{ key: string; message: string; }' is not assignable to type 'never'. */ genericObjectFunction(errors) ``` The types seem generally compatible though, as expected this is legal: ```ts const errorRecord: Record<string, { key: string, message: string }> = errors ``` **Expected behavior:** `genericObjectFunction(errors)` should compile.
Suggestion,In Discussion
low
Critical
218,228,389
go
proposal: spec: add decimal float types (IEEE 754-2008)
I know there was a proposal about decimal as an std package. But according to https://en.wikipedia.org/wiki/Decimal_floating_point, there have already been multiple compliant hardware implementations, and supported by several commonly used programming languages. I think having decimal as first-class citizen like the other part of the IEEE-754 standard makes sense. The upside is we don't have to spend the effort on API design upfront to make it useful like math.big. We can just limit the scope of the operations only within the Go's existing arithmetic operators. Designing a good numerical/arithmetic API beyond the conventional operators is harder and can be deferred later with no harm.
LanguageChange,Proposal,LanguageChangeReview
high
Critical
218,256,550
go
runtime/pprof: provide memory mapping info on macOS
Noticed during google/pprof#120 https://github.com/golang/go/blob/master/src/runtime/pprof/proto.go#L370 depends on /proc/self/maps which results in missing memory mapping info in profile data from non-linux system (e.g. OSX). Provide it to help offline symbolization for non-Go symbols.
help wanted,NeedsFix,compiler/runtime
low
Minor
218,339,470
youtube-dl
[cloudy] unable to download video data: HTTP Error 403
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.03.26** - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue* --- ### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows: Add `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` $ youtube-dl -v http://www.cloudy.ec/v/1b2368a59f8ff [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', 'http://www.cloudy.ec/v/1b2368a59f8ff'] [debug] Encodings: locale cp1256, fs mbcs, out cp720, pref cp1256 [debug] youtube-dl version 2017.03.26 [debug] Python version 3.4.4 - Windows-10-10.0.14393 [debug] exe versions: none [debug] Proxy map: {} [Cloudy] 1b2368a59f8ff: Downloading webpage [Cloudy] 1b2368a59f8ff: Downloading webpage [debug] Invoking downloader on 'http://185.176.193.243/dl/bbb45536315c6d2115e8a27bc8a5107b/58dd7ce8/oo7152ba147c1bef7ac25bb871aaa5c6fa.mp4' ERROR: unable to download video data: HTTP Error 403: Forbidden Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpje2_cfdl\build\youtube_dl\YoutubeDL.py", line 1791, in process_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpje2_cfdl\build\youtube_dl\YoutubeDL.py", line 1733, in dl File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpje2_cfdl\build\youtube_dl\downloader\common.py", line 356, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpje2_cfdl\build\youtube_dl\downloader\http.py", line 61, in real_download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpje2_cfdl\build\youtube_dl\YoutubeDL.py", line 2094, in urlopen File "C:\Python\Python34\lib\urllib\request.py", line 470, in open File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response File "C:\Python\Python34\lib\urllib\request.py", line 508, in error File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default urllib.error.HTTPError: HTTP Error 403: Forbidden <end of log> ``` --- - Single video: http://www.cloudy.ec/v/1b2368a59f8ff ---
cant-reproduce
low
Critical
218,354,596
vscode
Several fonts at the same time for different elements of the code
Please create a way to give themes and/or users the possibility of using several fonts at the same time. Please check this article that describes how this is possible to achieve on the Atom editor. https://medium.com/@peterpme/operator-mono-fira-code-the-best-of-both-worlds-191be512fd5e In this example, this allows the user the define one font for certain elements in the code, while using another fonts as the main one for the rest of the code. > If Operator Mono and Fira Code spent a lot of time together and had a baby, you’d get [something that looks like this](https://cdn-images-1.medium.com/max/800/1*hE_nLB776KUDXPERE_3cXw.png).
feature-request,editor-core
medium
Critical
218,358,410
go
database/sql: think about a std error / informational messages
Many databases support returning multiple errors, with each error containing a line number, text, and numeric code. I want to explore what it would take to define a standard error interface that could be used to unpack this information. A concrete use case is to 1000 line SQL block that errored, then show just the context of the portions where it errored. A concrete use case for getting the error code is when a user raises a user error, it is often useful to distinguish this from a SQL syntax error. You may wish to abort a query early within the SQL text and only in that condition expose the user to the underlying message, but in the case of generic SQL errors, hide or retry them. In a similar way, Postgresql, MS SQL, and Oracle all support the concept of streaming messages while the query is running. This is less of an issue, but still might be useful. Fewer concrete uses for messages in SQL.
Thinking
low
Critical
218,363,074
react
Define specific browser support guidelines
As it stands the only real solid guideline we have for browser support is that we support IE9+. But there are so many other outdated browser versions that are unreasonable to support or worry about. It would be useful if we had more specific guidelines on what browsers we should target. Does Safari on iOS 3 matter? FireFox 4? You get the idea. If we had a well-documented range of browser version that we *know* should work it would make it a lot easier to run through our DOM fixtures in BrowserStack and know we're safe. Maybe the internal core team can work internally with analytics to see what browsers Facebook needs to support and work forward from there? cc @gaearon @nhunzaker
Component: DOM,Type: Discussion
low
Major
218,419,971
youtube-dl
New Adobe Pass Provider Support (Mediacom)
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.03.26*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.03.26** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [ ] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [x] Feature request (request for a new functionality) - [ ] Question - [ ] Other ### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**): Login Redirects: 1st redirect: https://sp.auth.adobe.com/adobe-services/authenticate/saml?noflash=true&mso_id=Mediacom&requestor_id=fx&no_iframe=false&domain_name=adobe.com&redirect_url=http%3A%2F%2Fwww.fxnetworks.com%2F 2nd redirect: https://auth.mediacomtoday.com/saml/module.php/authbypass/firstbookend.php?AuthState=_0f6f11ff67f45eead925678964ed10880723b23579%3Ahttps%3A%2F%2Fauth.mediacomtoday.com%2Fsaml%2Fsaml2%2Fidp%2FSSOService.php%3Fspentityid%3Dhttps%253A%252F%252Fsaml.sp.auth.adobe.com%26cookieTime%3D1490944083%26RequesterID%3D%255B%2522fx%2522%255D%26NameIDFormat%3Durn%253Aoasis%253Anames%253Atc%253ASAML%253A2.0%253Anameid-format%253Atransient&id=80891ed560&coeff=1 3rd redirect: https://auth.mediacomtoday.com/saml/module.php/authbypass/firstbookend.php?AuthState=_0f6f11ff67f45eead925678964ed10880723b23579%3Ahttps%3A%2F%2Fauth.mediacomtoday.com%2Fsaml%2Fsaml2%2Fidp%2FSSOService.php%3Fspentityid%3Dhttps%253A%252F%252Fsaml.sp.auth.adobe.com%26cookieTime%3D1490944083%26RequesterID%3D%255B%2522fx%2522%255D%26NameIDFormat%3Durn%253Aoasis%253Anames%253Atc%253ASAML%253A2.0%253Anameid-format%253Atransient&id=80891ed560&coeff=1&history=3 4th redirect: https://auth.mediacomtoday.com/saml/module.php/authbypass/lastbookend.php?AuthState=_0f6f11ff67f45eead925678964ed10880723b23579%3Ahttps%3A%2F%2Fauth.mediacomtoday.com%2Fsaml%2Fsaml2%2Fidp%2FSSOService.php%3Fspentityid%3Dhttps%253A%252F%252Fsaml.sp.auth.adobe.com%26cookieTime%3D1490944083%26RequesterID%3D%255B%2522fx%2522%255D%26NameIDFormat%3Durn%253Aoasis%253Anames%253Atc%253ASAML%253A2.0%253Anameid-format%253Atransient&id=80891ed560&coeff=1 5th redirect (Post data): https://auth.mediacomtoday.com/saml/module.php/authbypass/lastbookend.php?AuthState=_0f6f11ff67f45eead925678964ed10880723b23579%3Ahttps%3A%2F%2Fauth.mediacomtoday.com%2Fsaml%2Fsaml2%2Fidp%2FSSOService.php%3Fspentityid%3Dhttps%253A%252F%252Fsaml.sp.auth.adobe.com%26cookieTime%3D1490944083%26RequesterID%3D%255B%2522fx%2522%255D%26NameIDFormat%3Durn%253Aoasis%253Anames%253Atc%253ASAML%253A2.0%253Anameid-format%253Atransient&id=80891ed560&coeff=1&history=4 During this process, 5 cookies are provided, one of which states: "mvpd-provider Mediacom" Login Page (URL: https://sso.mediacomcable.com/idp/SSO.saml2): ![image](https://cloud.githubusercontent.com/assets/10225723/24540651/cbc920d8-15b9-11e7-98e1-8e98dea5ad2c.png) --- ### Description of your *issue*, suggested solution and other information Adobe pass support for Mediacom would be lovely. These links were obtained through a successful login on fxnetworks.com.
tv-provider-account-needed
low
Critical
218,510,040
angular
AbstractControl.valueChanges event fires without respect on current disabled/enabled state
**I'm submitting a ...** (check one with "x") ``` [x] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question ``` **Current behavior** Every time when you call `.disable()` or `.enable()` method the `.valueChanges` observalbe triggers new value even the current state of input is already disable or enabled. **Expected behavior** It shouldn't trigger if there's no actual changes in value **Minimal reproduction of the problem with instructions** Here's the Plunk that illustrates the problem https://plnkr.co/edit/kvVKi2?p=preview Check the console and you'll see incredible amount of `changes` messages ended with Stack size error. **What is the motivation / use case for changing the behavior?** The Plunk illustrates trivial example of course. I came across during the making of bigger form where I need to listen form changes and disable some of controls based on it. Yes, you can listen individual controls, but this case doesn't work everywhere. I believe that Angular need to be smart in that situations and doesn't trigger changes event unless something really changed. **Please tell us about your environment:** MacOS, npm * **Angular version:** checked both in 2.4.8 and 4.0.1 * **Browser:** all * **Language:** all
freq1: low,area: forms,type: confusing,forms: Controls API,P4
low
Critical
218,553,580
kubernetes
kubelet counts active page cache against memory.available (maybe it shouldn't?)
<!-- Thanks for filing an issue! Before hitting the button, please answer these questions.--> **Is this a request for help?** (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.): No **What keywords did you search in Kubernetes issues before filing this one?** (If you have found any duplicates, you should instead reply there.): active_file inactive_file working_set WorkingSet cAdvisor memory.available --- **Is this a BUG REPORT or FEATURE REQUEST?** (choose one): We'll say BUG REPORT (though this is arguable) <!-- If this is a BUG REPORT, please: - Fill in as much of the template below as you can. If you leave out information, we can't help you as well. If this is a FEATURE REQUEST, please: - Describe *in detail* the feature/behavior/change you'd like to see. In both cases, be ready for followup questions, and please respond in a timely manner. If we can't reproduce a bug or think a feature already exists, we might close your issue. If we're wrong, PLEASE feel free to reopen it and explain why. --> **Kubernetes version** (use `kubectl version`): 1.5.3 **Environment**: - **Cloud provider or hardware configuration**: - **OS** (e.g. from /etc/os-release): NAME="Ubuntu" VERSION="14.04.5 LTS, Trusty Tahr" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 14.04.5 LTS" VERSION_ID="14.04" - **Kernel** (e.g. `uname -a`): Linux HOSTNAME_REDACTED 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux - **Install tools**: - **Others**: **What happened**: A pod was evicted due to memory pressure on the node, when it appeared to me that there shouldn't have been sufficient memory pressure to cause an eviction. Further digging seems to have revealed that active page cache is being counted against memory.available. **What you expected to happen**: memory.available would not have active page cache counted against it, since it is reclaimable by the kernel. This also seems to greatly complicate a general case for configuring memory eviction policies, since in a general sense it's effectively impossible to understand how much page cache will be active at any given time on any given node, or how long it will stay active (in relation to eviction grace periods). **How to reproduce it** (as minimally and precisely as possible): Cause a node to chew up enough active page cache that the existing calculation for memory.available trips a memory eviction threshold, even though the threshold would not be tripped if the page cache - active and inactive - were freed for anon memory. **Anything else we need to know**: I discussed this with @derekwaynecarr in #sig-node and am opening this issue at his request ([conversation starts here](https://kubernetes.slack.com/archives/C0BP8PW9G/p1490970061856526)). Before poking around on Slack or opening this issue, I did my best to read through the 1.5.3 release code, Kubernetes documentation, and cgroup kernel documentation to make sure I understood what was going on here. The short of it is that I believe [this calculation](https://kubernetes.io/docs/concepts/cluster-administration/out-of-resource/#eviction-signals): memory.available := node.status.capacity[memory] - node.stats.memory.workingSet Is using cAdvisor's value for working set, which if I traced the code correctly, amounts to: $cgroupfs/memory.usage_in_bytes - total_inactive_file Where, according to my interpretation of the kernel documentation, usage_in_bytes includes all page cache: $kernel/Documentation/cgroups/memory.txt ```2.1. Design The core of the design is a counter called the res_counter. The res_counter tracks the current memory usage and limit of the group of processes associated with the controller. ... 2.2.1 Accounting details All mapped anon pages (RSS) and cache pages (Page Cache) are accounted. ``` Ultimately my issue is concerning how I can set generally applicable memory eviction thresholds if active page cache is counting against those, and there's no way to to know (1) generally how much page cache will be active across a cluster's nodes, to use as part of general threshold calculations (2) how long active page cache will stay active, to use as part of eviction grace period calculations. I understand that there are many layers here and that this is not a particularly simple problem to solve generally correctly, or even understand top to bottom. So I apologize up front if any of my conclusions are incorrect or I'm missing anything major, and I appreciate any feedback you all can provide. As requested by @derekwaynecarr: cc @sjenning @derekwaynecarr
sig/node,kind/feature,lifecycle/frozen
high
Critical
218,572,012
vscode
Allow project specific keybindings
same as the settings.json, I should be able to specify a local keybindings.json that overrides user keybindings and global keybindings. A prompt alerting the user to the override and asking which to use might be appropriate.
feature-request,keybindings
high
Critical
218,609,153
go
cmd/internal/obj/arm: should not put instruction encoding into Reloc.Add
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? ### What operating system and processor architecture are you using (`go env`)? Whatever the trybots for linux-arm are using ### What did you do? Built a sample file with -N -l then attempted to load it with cmd/internal/goobj: https://go-review.googlesource.com/#/c/39230/ ### What did you expect to see? honest object files. ### What did you see instead? https://storage.googleapis.com/go-build-log/e81c4c0b/linux-arm_e2ed47ce.log
NeedsFix
low
Major
218,610,636
flutter
Unify doctor checks and code that locates binary artifacts (executables, sdks)
A lot of the tool presence/version checks we perform in `flutter doctor` would be useful to perform before steps that involve invocation of those tools. Examples from the iOS side include checking Xcode and CocoaPods presence/version and presence of the Python six module before iOS build/run. One option would be to factor out a tool class that has the ability to check presence/version of the tool and how to run it, then use this in the build step and in doctor.
tool,t: flutter doctor,a: first hour,P3,team-tool,triaged-tool
low
Minor
218,638,547
go
proposal: spec: add typed enum support
I'd like to propose that enum be added to Go as a special kind of `type`. The examples below are borrowed from the protobuf example. ### Enums in Go today ``` type SearchRequest int var ( SearchRequestUNIVERSAL SearchRequest = 0 // UNIVERSAL SearchRequestWEB SearchRequest = 1 // WEB SearchRequestIMAGES SearchRequest = 2 // IMAGES SearchRequestLOCAL SearchRequest = 3 // LOCAL SearchRequestNEWS SearchRequest = 4 // NEWS SearchRequestPRODUCTS SearchRequest = 5 // PRODUCTS SearchRequestVIDEO SearchRequest = 6 // VIDEO ) type SearchRequest string var ( SearchRequestUNIVERSAL SearchRequest = "UNIVERSAL" SearchRequestWEB SearchRequest = "WEB" SearchRequestIMAGES SearchRequest = "IMAGES" SearchRequestLOCAL SearchRequest = "LOCAL" SearchRequestNEWS SearchRequest = "NEWS" SearchRequestPRODUCTS SearchRequest = "PRODUCTS" SearchRequestVIDEO SearchRequest = "VIDEO" ) // IsValid has to be called everywhere input happens, or you risk bad data - no guarantees func (sr SearchRequest) IsValid() bool { switch sr { case SearchRequestUNIVERSAL, SearchRequestWEB...: return true } return false } ``` ### How it might look with language support ``` enum SearchRequest int { 0 // UNIVERSAL 1 // WEB 2 // IMAGES 3 // LOCAL 4 // NEWS 5 // PRODUCTS 6 // VIDEO } enum SearchRequest string { "UNIVERSAL" "WEB" "IMAGES" "LOCAL" "NEWS" "PRODUCTS" "VIDEO" } ``` The pattern is common enough that I think it warrants special casing, and I believe that it makes code more readable. At the implementation layer, I would imagine that the majority of cases can be checked at compile time, some of which already happen today, while others are near impossible or require significant tradeoffs. - **Safety for exported types**: nothing prevents someone from doing `SearchRequest(99)` or `SearchRequest("MOBILEAPP")`. Current workarounds include making an unexported type with options, but that often makes the resulting code harder to use / document. - **Runtime safety**: Just like protobuf is going to check for validity while unmarshaling, this provides language wide validation, anytime that an enum is instantiated. - **Tooling / Documentation**: many packages today put valid options into field comments, but not everyone does it and there is no guarantee that the comments aren't outdated. ### Things to Consider - **Nil**: by implementing `enum` on top of the type system, I don't believe this should require special casing. If someone wants `nil` to be valid, then the enum should be defined as a pointer. - **Default value / runtime assignments**: This is one of the tougher decisions to make. What if the Go default value isn't defined as a valid enum? Static analysis can mitigate some of this at compile time, but there would need to be a way to handle outside input. I don't have any strong opinions on the syntax. I do believe this could be done well and would make a positive impact on the ecosystem.
LanguageChange,Proposal,LanguageChangeReview
high
Critical
218,701,015
go
cmd/compile: avoid copying if copied value isn't modified
Go 1.8 emits unnesessary value copyings in the following code (didn't test go tip yet, but it is likely it has the same behaviour): ```go func sum(p *[1000][1000]int) int { s := 0 a := *p // copy a million of ints for i := range a { // possible copy b := a[i] // copy a thousand of ints for j := range b { // possible copy s += b[j] } } return s } ``` All these copyings could be substituted by pointers, which would result in direct memory access pointed by `p`. This looks like safe optimization, since both `a` and `b` values are read-only in this code. This optimization also could save stack space used for storing `a` and `b` values. Someone could argue this optimization can't be applied since the memory pointed by `p` could be modified by concurrently running goroutines, which will result in data races. But this code is already vulnerable to the same data races when compiled without the optimization, since value copying isn't atomic.
Performance,compiler/runtime
low
Major
218,702,499
go
cmd/compile: share statictmp
Hello, i have 2 file, one ==> a go file with 10000 time repeat : `fmt.Print("...........\n")` two ==> a c(gcc) file with 10000 time repeat : `printf("...........\n");` size of output c is about 200kb. size of output go is 50mb.(also long time need for build...)
Performance,compiler/runtime
low
Major
218,708,174
opencv
Locality Preserving Projection (LPP)
Their appears not to be a built in LPP functions like PCA or LDA! Locality Preserving Projection (LPP) are described here: https://newtraell.cs.uchicago.edu/files/tr_authentic/TR-2002-09.pdf My motivation behind this is to facilitate the writing of a Laplacianfaces implementation as described here: http://scholarpedia.org/article/Laplacianfaces in the contrib face module! https://github.com/opencv/opencv_contrib/tree/master/modules/face
feature,category: core
low
Minor
218,727,077
vscode
Line height and font size are too large by default
<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode --> - VSCode Version: 1.10.2 - OS Version: win10 x64 My monitor native resolution is 1920x1200 <br> When opening any file in VSCode, it shows only **56 lines** at any time. I feel that the current line height and font size are too much by default. _For reference:_ ``` Sublime Text 3: 71 lines Notepad++ 6.9: 65 lines gVim 7.4: 66 lines UltraEdit 23: 67 lines ``` _In contrast, Atom 1.15 displays even less: 49 lines_ <br> By default VSCode has in its settings: ``` "editor.fontSize": 14, // Controls the font size in pixels. "editor.lineHeight": 0 // Controls the line height. Use 0 to compute the lineHeight from the fontSize. ``` If I set them to **13** and **15** respectively then the visible lines area becomes on par with the other editors: 71 lines. <br> Also, _(while using the default `Dark+` theme and the default setting ` "editor.fontFamily": "Consolas, 'Courier New', monospace"`)_ with my suggested settings, 13pt Consolas *I think* it is appears a bit boldish. _Changing the value`"editor.fontWeight": "normal"` to anything below 400 doesn't make a difference. (related issue: #381)_ That's why I believe that, in conjunction with the above two suggested changes, it would be even better to switch to a slightly different font that would support setting `fontWeight` below 400 e.g. something like "Consolas Light" -I know that this font currently doesn't exit- ) <br> **So, my suggestion is to change the default values of these settings to 13 and 15 respectively, plus lower the `fontWeight` value somehow** ----- Here is VSCode with its default settings: [screenshot 682](https://cloud.githubusercontent.com/assets/723651/24582811/7b7b0e24-1740-11e7-92d0-b488b89e6de9.png) And here is comparison of VSCode with my suggested settings vs Sublime Text 3: [screenshot 678](https://cloud.githubusercontent.com/assets/723651/24582818/a8b5cb2c-1740-11e7-95de-ee34554b7b72.png) [screenshot 678b](https://cloud.githubusercontent.com/assets/723651/24582821/bfba6350-1740-11e7-8451-9aaec3773127.png)
feature-request,editor-core,config
low
Major
218,757,675
neovim
'guicursor' does not reflect guifg/gui highlights
- `nvim --version`: NVIM v0.2.0-1147-g58422f17d - Vim (version: ) behaves differently? N/A - Operating system/version: Archlinux - Terminal name/version: gnome-terminal - `$TERM`: gnome-256color ### Actual behaviour The cursor does not seem to pick up `guifg` and `gui` settings. Also the original cursor settings do not seem to get restored after exiting Neovim. I've set up a minimal `init.vim` that sets the cursor color to green and foreground to black as well as `gui=reverse` all except the background color get ignored. The text remains white which is unfortunate of the cursor itself is. When exiting Neovim the cursor color in the terminal suddenly has turned green as well. ``` nvim -u NORC set guicursor=a:block-blinkon100-Cursor/Cursor hi Cursor guifg=black guibg=green gui=reverse ```
bug,ui,complexity:low,options
low
Major
218,767,211
youtube-dl
[Feature Request] Change playback speed of downloaded files
## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like that [x]) - Use *Preview* tab to see how your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.04.02*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.04.02** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [ ] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [x] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### Dear developers of youtube-dl, In the first place, thank you for making this excellent tool. It has enabled me to listen to quality audio during my commutes. I'd just like to ask if it is possible to include an option to save the video/audio in a faster speed, thus mimicking youtube's function of increasing the playback speed of their videos. I thought of helping with this, but I'm quite a beginner. I've been learning to code for only 3 months (with python 3), so I don't know if I could be of any help. If you think there is anything I can do, just let me know.
request
low
Critical
218,948,131
flutter
Add a Theme.merge that implements the logic of the main ThemeData constructor
"changing the accent color on an input on one screen is complicated" was feedback offered about our theming system. Ian says on solution here would be to add a copyWith constructor onto theme? Did I capture that correctly @Hixie?
c: new feature,framework,f: material design,customer: posse (eap),c: proposal,P2,team-design,triaged-design
low
Major
218,954,022
go
all: test that all examples run on golang.org, i.e. the playground
Right now, examples are only run via `go test` by the trybots. That checks whether or not they run as tests, but it doesn't check if they run in the playground. For instance, see #19823. That example depends on its own test file, `example_test.go`. That will be available if one runs `go test`, but not if one presses "Run" in https://golang.org/pkg/go/parser/#example_ParseFile which will run it in the playground. There should be a mechanism to ensure that all of the examples run on the golang.org docs too. In other words, that they pass when executed in the playground.
Testing,help wanted,NeedsFix
low
Major
218,963,108
pytorch
Batched sparse QR factorizations and solves with cusolver
These should significantly speed up [qpth](https://github.com/locuslab/qpth) in some cases when sparse matrices can be used. Here is a [cusolver reference](http://docs.nvidia.com/cuda/cusolver/#cusolver-lt-t-gt-csrqrbatched) on these functions. This issue depends on the other core sparse functions being added (I think at least PR #1147, please add other dependencies here so I'll know when I can start) so I won't immediately start trying to add these. Also please post a reference if a good cusolver wrapper usage example gets added that we can use as a reference for wrapping these QR functions. Following the naming conventions of the batched LU factorizations and solves of `btrifact` and `btrisolve`, I propose `bqrfact` and `bqrsolve` for the names and for now we can just implement them for sparse tensors. \cc @nikitaved @pearu @cpuhrsch @jianyuh @mruberry @walterddr @IvanYashchuk @xwang233 @Lezcano @vincentqb @vishwakftw @SsnL @zkolter
module: sparse,feature,triaged,module: linear algebra,Stale
low
Major
219,009,172
angular
Platform Server - Attach cookies to HTTP requests
<!-- IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING --> **I'm submitting a ...** (check one with "x") ``` [x] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question ``` **Current behavior** <!-- Describe how the bug manifests. --> Currently I see no option to attach cookies to a http request when the application runs on server platform. Using Universal + angular v2.x.x allowed setting 'Cookie' header property manually, in the current version I'm getting the following warning: `Refused to set unsafe header "Cookie"` ([node-xhr2](https://github.com/pwnall/node-xhr2) library logs this warning, as it disallows setting cookie header). **Expected behavior** It should be possible to pass cookies to a http request. [It was already asked in the roadmap](https://github.com/angular/angular/issues/13822#issuecomment-289734558) but no answer or suggestion was provided. **Minimal reproduction of the problem with instructions** <!-- If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5). --> **What is the motivation / use case for changing the behavior?** <!-- Describe the motivation or the concrete use case --> Without attaching cookies to a http request, the response on the server is different than the response on the client. It also makes the usage of transfer state dangerous, since the browser will not fire the http request and will use the response received from the server. **Please tell us about your environment:** <!-- Operating system, IDE, package manager, HTTP server, ... --> * **Angular version:** 4.0.0 <!-- Check whether this is still an issue in the most recent Angular version --> * **Browser:** [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] <!-- All browsers where this could be reproduced --> * **Language:**: TypeScript 2.2.2
type: bug/fix,freq2: medium,area: server,area: common/http,P3
high
Critical
219,016,922
opencv
Crash when calling imencod with exr from multiple threads
<!-- If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses. If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute). This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library. --> ##### System information (version) <!-- Example - OpenCV => 3.1 - Operating System / Platform => Windows 64 Bit - Compiler => Visual Studio 2015 --> - OpenCV => 3.1 - Operating System / Platform => Windows 64 Bit - Compiler => Visual Studio 2013 (x86) ##### Detailed description When calling imencode with ".exr" as the format from multiple threads there is a null reference access violation. An example exception callstack: ntdll.dll!_RtlEnterCriticalSection@4() Unknown opencv_world310d.dll!IlmThread::Mutex::lock() Line 62 C++ opencv_world310d.dll!IlmThread::Lock::Lock(const IlmThread::Mutex & m, bool autoLock) Line 122 C++ opencv_world310d.dll!IlmThread::ThreadPool::numThreads() Line 343 C++ opencv_world310d.dll!Imf::globalThreadCount() Line 51 C++ opencv_world310d.dll!cv::ExrEncoder::write(const cv::Mat & img, const std::vector<int,std::allocator<int> > & __formal) Line 616 C++ opencv_world310d.dll!cv::imencode(const cv::String & ext, const cv::_InputArray & _image, std::vector<unsigned char,std::allocator<unsigned char> > & buf, const std::vector<int,std::allocator<int> > & params) Line 621 C++ test_opencv_vc12.exe!main::__l7::<lambda>() Line 20 C++ [External Code] I believe the issue is non atomic initialization of the local static variable in opencv-3.1.0\3rdparty\openexr\IlmThread\IlmThreadPool.cpp, line 443: ```.cpp ThreadPool& ThreadPool::globalThreadPool () { // // The global thread pool // static ThreadPool gThreadPool (0); return gThreadPool; } ``` For VC12 (and other compilers) the magic static C++11 feature is not yet implemented, so the initialization of global thread pool is not done atomically. Suggest implementing a thread safe singleton there... ##### Steps to reproduce <!-- to add code example fence it with triple backticks and optional file extension ```.cpp // C++ code example ``` or attach as .txt or .zip file --> ```.cpp #include <thread> #include <array> #include "opencv/cv.hpp" int main() { const int nThreads = 10; std::array<std::thread, nThreads> threads; for (int i = 0; i < nThreads; ++i) { threads[i] = std::thread([]() { for (int j = 0; j < 1000; ++j) { cv::Mat m(100, 200, CV_32FC1); cv::randn(m, cv::Scalar(23.4), cv::Scalar(4.2)); std::vector<unsigned char> res; cv::imencode(".exr", m, res); } }); } for (auto& t : threads) { t.join(); } } ```
bug,priority: low,category: imgcodecs
low
Critical
219,042,896
go
x/mobile: reverse and swift
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? 1.8 ### What operating system and processor architecture are you using (`go env`)? x-MacBook-Pro:gosync apple$ go env GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/apple/workspace/go" GORACE="" GOROOT="/usr/local/opt/go/libexec" GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/go-build775985182=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1" PKG_CONFIG="pkg-config" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" ### What did you do? More a question. Gomobile reverse works well for Android, but i was wondering how to do it for swift. ### What did you expect to see? ### What did you see instead?
mobile
low
Critical
219,047,345
rust
LUB of a bivariant parameter is not fully general
In https://github.com/rust-lang/rust/pull/40570, I removed bivariance somewhat aggressively. One area where we are not *quite* doing the right thing, it appears, is when computing the LUB/GLB of a bivariant type parameter. The code currently just picks one side, which seems clearly wrong, but I was [not able to craft a test case exploiting that](https://github.com/rust-lang/rust/pull/40570#issuecomment-288768167). Therefore, opening an issue to revisit later if we can get a concrete test case. [This comment explains my preferred fix](https://github.com/rust-lang/rust/pull/40570#issuecomment-287307919): > I think you are correct about the eventual result but I wouldn't expect it to be derived immediately from the LUB computation. Since the last parameter is considered "bivariant" (i.e., derived from constraints on the others), I'd expect that the last parameter simply gets a fresh variable, and that trait selection will constrain it (ultimately) to be 'c. In other words, the result from LUB itself would be Foo<fn() -> &'?0 u32, '?1> where 'a: '?0 and 'b: '?0, but enforcing the WF requirements would ultimately constraint '?1 = '?0. > > However, it occurs to me that I'm not entirely sure where these WF requirements would get enforced. Much of the code assumes that the resulting types from LUB operations etc are well-formed, and hence I'm not sure when we would add such an obligation. (One possibility is to have the LUB/GLB operation itself produce an obligation, at least if bivariance is involved, given that this is now a possibility.) <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":null}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->
I-needs-decision,T-compiler,C-bug
low
Minor
219,055,529
TypeScript
Control application of insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets for Array Literal vs Array Access Expression
_From @atian25 on March 28, 2017 0:25_ - VSCode Version: Code 1.10.2 **[Unsupported]** (8076a19fdcab7e1fc1707952d652f0bb6c6db331, 2017-03-08T13:56:35.908Z) - OS Version: Darwin x64 16.3.0 - Extensions: |Extension|Author|Version| |---|---|---| |output-colorizer|IBM|0.0.11| |vscode-file-peek|abierbaum|1.0.1| |Bookmarks|alefragnani|0.12.0| |project-manager|alefragnani|0.13.5| |copy-syntax|atian25|0.5.1| |vscode-custom-css|be5invis|2.3.1| |npm-intellisense|christian-kohler|1.3.0| |vscode-mocha-latte|cspotcode|0.2.0| |vscode-eslint|dbaeumer|1.2.8| |vscode-npm-source|dkundel|1.0.0| |code-runner|formulahendry|0.6.15| |task-master|ianhoney|0.1.39| |path-autocomplete|ionutvmi|1.4.1| |plantuml|jebbs|1.3.0| |md-navigate|jrieken|0.0.1| |vue|liuji-jim|0.1.5| |debugger-for-chrome|msjsdiag|2.7.1| |node-modules-resolve|naumovs|1.0.2| |peep|nwallace|0.0.5| |vscode-json-transform|octref|0.1.2| |unittest-navigate|roblourens|0.0.2| |preview-vscode|searKing|1.1.4| |es6-mocha-snippets|spoonscen|0.0.2| |code-navigation|vikas|0.2.0| |JavaScriptSnippets|xabikos|1.4.0|; --- Steps to Reproduce: `javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets` ```js // want this const arr = [ 'a', 'b' ]; // don't want this arr[ 1 ]; ``` _Copied from original issue: Microsoft/vscode#23321_
Suggestion,Help Wanted,Domain: Formatter,VS Code Tracked
low
Critical
219,075,376
kubernetes
API-Linter: Add a verifier script using gengo to enforce API policies
Right now we have several generator scripts (openapi-gen, deepcopy-gen, etc.) that look at the code and generate types/functions. This infrastructure can be used to look at all API types and enforce some policies such as optional fields to be pointer, etc. Please add the policies you want this verifier to enforce in this issue. I will start by a simple verifier for optional fields. - [ ] Optional fields should be a pointer - [ ] struct tag and comment tag should match for `patchStrategy` and `patchMergeKey`. - [ ] `patchStrategy` tag should be used only if the field is a slice. (There are wrong usages in the API now) - [ ] `patchMergeKey` tag should be used only with `patchStrategy` is `merge`.
sig/api-machinery,lifecycle/frozen
low
Major
219,082,718
angular
FormGroup reset() doesn't reset custom form control
<!-- IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING --> **I'm submitting a ...** (check one with "x") ``` [x ] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question ``` **Current behavior** <!-- Describe how the bug manifests. --> Custom form control does not reset when form is reset using the `FormGroup` `reset()` method. The value will clear, but control properties `dirty`, `pristine`, `untouched` and `touched` are not updated. **Expected behavior** <!-- Describe what the behavior would be without the bug. --> I would expected the control properties to reset. **Minimal reproduction of the problem with instructions** <!-- If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5). --> http://plnkr.co/edit/xeIy7DEg5GwTqe7JgOv9 **What is the motivation / use case for changing the behavior?** <!-- Describe the motivation or the concrete use case --> The motivation is to use custom form controls. **Please tell us about your environment:** <!-- Operating system, IDE, package manager, HTTP server, ... --> ``` @angular/cli: 1.0.0 node: 6.10.1 os: darwin x64 @angular/common: 4.0.0 @angular/compiler: 4.0.0 @angular/core: 4.0.0 @angular/forms: 4.0.0 @angular/http: 4.0.0 @angular/platform-browser: 4.0.0 @angular/platform-browser-dynamic: 4.0.0 @angular/router: 4.0.0 @angular/cli: 1.0.0 @angular/compiler-cli: 4.0.0 ``` * **Angular version:** 2.0.X <!-- Check whether this is still an issue in the most recent Angular version --> 4 * **Browser:** [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] <!-- All browsers where this could be reproduced --> All * **Language:** [all | TypeScript X.X | ES6/7 | ES5] Typescript * **Node (for AoT issues):** `node --version` = node: 6.10.1
type: bug/fix,freq1: low,area: forms,state: confirmed,forms: ControlValueAccessor,P4
medium
Critical
219,128,045
go
cmd/cgo: C code with function taking pointer typedef leads to C compiler warning
Building this file gets a warning from the C compiler: package main // typedef struct { int i; } *PS; // void F(PS p) {} import "C" func main() { C.F(nil) } The warning I see is: # command-line-arguments cgo-gcc-prolog: In function ‘_cgo_0164fa09626e_Cfunc_F’: cgo-gcc-prolog:37:2: warning: passing argument 1 of ‘F’ from incompatible pointer type [enabled by default] /home/iant/foo8.go:4:7: note: expected ‘PS’ but argument is of type ‘struct <anonymous> *’ // void F(PS p) {} ^ The code generated by cgo looks like: CGO_NO_SANITIZE_THREAD void _cgo_0164fa09626e_Cfunc_F(void *v) { struct { struct {int i; }* p0; } __attribute__((__packed__, __gcc_struct__)) *a = v; _cgo_tsan_acquire(); F(a->p0); _cgo_tsan_release(); } The C function expects `PS*` but we are passing `struct{int i;}*`. That is, we aren't using the typedef. Changing the Go code to use `C.PS(unsafe.Pointer(nil))` also fails in the same way.
help wanted,NeedsFix,compiler/runtime
low
Minor
219,177,385
TypeScript
Unable to specify return type of class extends T implements IFooable
<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.2.1 / nightly (2.2.0-dev.201xxxxx) **Code** ```ts // A *self-contained* demonstration of the problem follows... export type Constructor<T> = new (...args: any[]) => T; export interface IFooable { FooProp: string; } export function FooableMixin<T extends Constructor<{}>>(Base: T) { return class extends Base implements IFooable { FooProp: string; constructor(...args: any[]) { super(...args); } } } export class BaseBar { BarProp: string = "baz"; } export class FooableBar extends FooableMixin ( BaseBar ) {} let foobar = new FooableBar(); foobar.FooProp = foobar.BarProp; /* This is ok since FooableBar extends an Anonymous class inheriting from BaseBar and implementing IFooable */ ``` If I turn on "declaration: true" in tsconfig.json this constuct breaks since the Anonymous class counts as private and not exported type (error TS4060) which is kind of natural since it is Anonymous. What we need is a way to describe Classes as return types. **Expected behavior:** A d.ts file with a type declaration for the Mixin function Fooable that defines a Anonymous Class return type in the style of: ``` declare function Fooable(T extends Constructor<{}>): (class extends T implements IFooable); ``` **Actual behavior:** TS4060 error when compiling with the "declaration" flag. If casting the Anonymous Class return value to <any> or T, the interface is lost.
Suggestion,In Discussion
low
Critical
219,210,696
angular
Leave animation not running in a nested animation of a child component
**I'm submitting a ...** (check one with "x") ``` [x] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question ``` **Current behavior** I have 2 components (1 parent, 1 child) which should be running 2 different animations at the same time when something triggers in the parent component. The child component is adding an element to the DOM in this case and the enter animation for this element is running fine. When the animation is running backwards because the condition is not met anymore the leave animation in the child component is not running at all. When I remove the animation on the parent component the animations of the child component are running fine. The animations of the parent component are always running fine. This happens only in angular4. Its working as expected in 2.4.10 without any changes. **Minimal reproduction of the problem with instructions** Here is the plunkr to demonstrate the problem: https://plnkr.co/edit/a250XgG9FFomAeAYWOSo?p=preview The yellow block should be moving to the left when leaving, but its not. When you remove "[@move]="direction"" on the div in the parent component you will see that the leave animation is defined correctly because now its running. The enter animation is always fine. * **Angular version:** 4.0.1 (its working in 2.4.10) * **Browser:** [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] all
type: bug/fix,area: animations,freq3: high,P3
medium
Critical
219,230,600
rust
Get rid of the "rust-call" hack
*Based on https://github.com/rust-lang/rfcs/pull/1921#issuecomment-282164515* Currently, we fake variadics by defining functions with the `rust-call` ABI. These functions receive a tuple as parameter (of arbitrary arity and types), but in their ABI the tuple is expanded. It would be great to get rid of this hack and in the process pave the way for the eventual feature of variadic generics.
C-cleanup,A-closures,T-compiler
low
Major
219,284,568
go
cmd/cgo: type error when using pointers to C functions
If I try to pass a C function pointer back to C from Go, I get a type error. It appears that cgo is mapping the function pointer type to `*[0]byte` (since there isn't a direct way to express C function-pointer types in the Go type system), but it isn't inserting the correct type conversions when referring to function-pointer values: cgocallback/main.go: ```go package main /* #include <stdio.h> static void invoke(void (*f)()) { f(); } void print_hello() { printf("Hello, !"); } */ import "C" func main() { C.invoke(C.print_hello) } ``` ``` bcmills:~$ go build cgocallback # cgocallback src/cgocallback/main.go:17: cannot use _Cgo_ptr(_Cfpvar_fp_print_hello) (type unsafe.Pointer) as type *[0]byte in argument to _Cfunc_invoke ``` The workaround is to define a typedef for the function pointer type an explicitly convert to the typedef, but it would be nice if that workaround were not necessary. ```go package main /* … typedef void (*closure)(); */ import "C" func main() { C.invoke(C.closure(C.print_hello)) } ``` ``` bcmills:~$ go version go version devel +2bbfa6f746 Thu Mar 9 15:36:43 2017 -0500 linux/amd64 ```
compiler/runtime
low
Critical
219,286,224
go
cmd/cgo: link error when using pointers to static C functions
If I try to pass a pointer to a static C function, I get a link error. cgocallback/main.go: ```go package main /* #include <stdio.h> static void invoke(void (*f)()) { f(); } static void print_hello() { printf("Hello, !"); } typedef void (*closure)(); // https://golang.org/issue/19835 */ import "C" func main() { C.invoke(C.closure(C.print_hello)) } ``` ``` bcmills:~$ go build cgocallback # cgocallback /tmp/go-build059026917/cgocallback/_obj/_cgo_main.o:(.data.rel+0x0): undefined reference to `print_hello' collect2: error: ld returned 1 exit status ``` The workaround is to use external linkage for functions used as function pointers, but in some cases that means I have to use more verbose names to avoid collisions. (Possibly related to #19835.) ``` bcmills:~$ go version go version devel +2bbfa6f746 Thu Mar 9 15:36:43 2017 -0500 linux/amd64 bcmills:~$ $(go env CC) --version gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 ```
help wanted,NeedsFix,compiler/runtime
low
Critical
219,290,431
go
cmd/cgo: emit forward-declarations for cgo-exported Go functions
I'm trying to pass a Go function as a C function pointer. I expect to be able to do that by exporting the Go function to C, then passing the C name of the Go function: ```go package main /* static void invoke(void (*f)()) { f(); } typedef void (*closure)(); // https://golang.org/issue/19835 */ import "C" import "fmt" //export go_print_hello func go_print_hello() { fmt.Println("Hello, !") } func main() { C.invoke(C.closure(C.go_print_hello)) } ``` Unfortunately, that results in a cgo error: ``` bcmills:~$ go build cgocallback # cgocallback could not determine kind of name for C.go_print_hello ``` As a workaround, I can add an explicit forward-declaration of the Go function to the C preamble: ``` /* … void go_print_hello(); */ import "C" ``` Given that cgo (presumably) already knows the C declarations for the functions it is exporting, I would prefer that it emit those forward-declarations itself. Since all C types should be defined by the end of the user-defined preamble, it seems like cgo could emit the forward declarations immediately following the preamble. (If user code needs to refer to the Go functions within the preamble itself, requiring an explicit forward-declaration seems reasonable.) ``` bcmills:~$ go version go version devel +2bbfa6f746 Thu Mar 9 15:36:43 2017 -0500 linux/amd64 ```
help wanted,NeedsFix
low
Critical
219,390,939
rust
Rustdoc impl blocks refer to private names
The [`flate2`](https://docs.rs/flate2/0.2.17/flate2/) crate is structured roughly like this: ```rust mod gz { pub struct EncoderReader; impl EncoderReader { pub fn new() -> EncoderReader { unimplemented!() } } } pub use gz::EncoderReader as GzEncoder; ``` The rustdoc of `GzEncoder` is correctly titled but the impl blocks on the page refer to the private name of the type. I would expect the impl blocks and methods to use the public name, just like the top of the page does. --- ![selection_030](https://cloud.githubusercontent.com/assets/1940490/24679795/42ed355a-1943-11e7-838a-36cc4b9f3935.png)
T-rustdoc,C-bug,A-local-reexports
low
Major
219,403,248
flutter
Improve flutter build latency on iOS
`flutter build ios` takes 30+s on my monster mac pro. Would be nice to get it faster. Some candidates: 100+ms to read the CFBundleIdentifier from the project 1000+ms to print the build settings to do some variable substitution. Maybe we can cache this. 400+ms to check cocoapods version. Maybe we can ask for forgiveness instead of permission 1900+ms to check cocoapods dependencies. Don't know if there's any caching we can use 22000+ms to run `/usr/bin/env xcrun xcodebuild clean build -configuration Release ONLY_ACTIVE_ARCH=YES -workspace Runner.xcworkspace -scheme Runner BUILD_DIR=build/ios -sdk iphoneos -arch arm64`. Do we really need to clean first?
platform-ios,tool,c: performance,platform-mac,t: xcode,P2,team-ios,triaged-ios
low
Minor
219,411,439
nvm
nvm doesn't understand error HTTP codes, like 522
- Operating system and version: OS X latest, Ubuntu 16.04 - `nvm debug` output: <details> <!-- do not delete the following blank line --> ```sh nvm --version: v0.33.1 $SHELL: /bin/zsh $HOME: /home/docwhat $NVM_DIR: '$HOME/.nvm' $PREFIX: '' $NPM_CONFIG_PREFIX: '' $NVM_NODEJS_ORG_MIRROR: 'https://nodejs.org/dist' $NVM_IOJS_ORG_MIRROR: 'https://iojs.org/dist' nvm current: none which node: node not found which iojs: iojs not found which npm: npm not found npm config get prefix: _zsh_nvm_nvm:109: command not found: npm npm root -g: _zsh_nvm_nvm:109: command not found: npm ``` </details> - `nvm ls` output: <details> <!-- do not delete the following blank line --> ```sh nvm ls N/A node -> stable (-> N/A) (default) iojs -> N/A (default) lts/* -> lts/boron (-> N/A) lts/argon -> v4.8.2 (-> N/A) lts/boron -> v6.10.2 (-> N/A) ``` </details> - How did you install `nvm`? (e.g. install script in readme, homebrew): `zgen load lukechilds/zsh-nvm` - What steps did you perform? ``` sh $ nvm install node ``` - What happened? ``` sh $ nvm install node Downloading and installing node v7.8.0... Downloading https://nodejs.org/dist/v7.8.0/node-v7.8.0-linux-x64.tar.xz... ######################################################################## 100.0% Computing checksum with sha256sum Checksums do not match: 'a787603d24847638636033047c6ab4789291c7175a8355b3d1de1bc82fd2b0a3' found, '1fca4e71d6f00f7f727994fccc604716160f06aa1ad6d8689d84cd3ca5227312' expected. xz: (stdin): File format not recognized tar: Child returned status 1 tar: Error is not recoverable: exiting now Binary download failed, trying source. Detected that you have 4 CPU core(s) Running with 3 threads to speed up the build Downloading https://nodejs.org/dist/v7.8.0/node-v7.8.0.tar.xz... ######################################################################## 100.0% Computing checksum with sha256sum Checksums do not match: '6776c3b22a119b521adf2ba3bc0e0e9e29012b7e3d95561c4a03f83724ae1a7a' found, '6821aaee58bbc8bc8d08fec6989a42278b725a21382500dc20fd9d9f71398f02' expected. xz: (stdin): File format not recognized tar: Child returned status 1 tar: Error is not recoverable: exiting now nvm: install v7.8.0 failed! ``` - What did you expect to happen? I expected it to notice that the HTTP code from nodejs.org was 522 and not even bother with the checksum check and return a better error message. I understand that nodejs.org is having issues right now which is why I'm getting 522. I just thought that `nvm` should handle it all better. The output of several curl attempts: <details> <!-- do not delete the following blank line --> ``` sh $ curl -v -I https://nodejs.org/dist/v7.8.0/node-v7.8.0-linux-x64.tar.xz * Trying 2400:cb00:2048:1::6814:162e... * Connected to nodejs.org (2400:cb00:2048:1::6814:162e) port 443 (#0) * found 173 certificates in /etc/ssl/certs/ca-certificates.crt * found 699 certificates in /etc/ssl/certs * ALPN, offering http/1.1 * SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256 * server certificate verification OK * server certificate status verification SKIPPED * common name: *.nodejs.org (matched) * server certificate expiration date OK * server certificate activation date OK * certificate public key: RSA * certificate version: #3 * subject: OU=Domain Control Validated,OU=PositiveSSL Wildcard,CN=*.nodejs.org * start date: Sun, 08 Nov 2015 00:00:00 GMT * expire date: Tue, 22 Aug 2017 23:59:59 GMT * issuer: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA * compression: NULL * ALPN, server accepted to use http/1.1 > HEAD /dist/v7.8.0/node-v7.8.0-linux-x64.tar.xz HTTP/1.1 > Host: nodejs.org > User-Agent: curl/7.47.0 > Accept: */* > < HTTP/1.1 522 Origin Connection Time-out HTTP/1.1 522 Origin Connection Time-out < Date: Tue, 04 Apr 2017 22:48:53 GMT Date: Tue, 04 Apr 2017 22:48:53 GMT < Content-Type: text/html; charset=UTF-8 Content-Type: text/html; charset=UTF-8 < Connection: keep-alive Connection: keep-alive < Set-Cookie: __cfduid=dde4efe982214e8a0cb8594cb70a9b4d01491346028; expires=Wed, 04-Apr-18 22:47:08 GMT; path=/; domain=.nodejs.org; HttpOnly Set-Cookie: __cfduid=dde4efe982214e8a0cb8594cb70a9b4d01491346028; expires=Wed, 04-Apr-18 22:47:08 GMT; path=/; domain=.nodejs.org; HttpOnly < Expires: Thu, 01 Jan 1970 00:00:01 GMT Expires: Thu, 01 Jan 1970 00:00:01 GMT < Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 < Pragma: no-cache Pragma: no-cache < X-Frame-Options: SAMEORIGIN X-Frame-Options: SAMEORIGIN < Server: cloudflare-nginx Server: cloudflare-nginx < CF-RAY: 34a7cec6dd9521d4-EWR CF-RAY: 34a7cec6dd9521d4-EWR < * Connection #0 to host nodejs.org left intact $ curl -v -4 -I https://nodejs.org/dist/v7.8.0/node-v7.8.0-linux-x64.tar.xz * Trying 104.20.23.46... * Connected to nodejs.org (104.20.23.46) port 443 (#0) * found 173 certificates in /etc/ssl/certs/ca-certificates.crt * found 699 certificates in /etc/ssl/certs * ALPN, offering http/1.1 * SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256 * server certificate verification OK * server certificate status verification SKIPPED * common name: *.nodejs.org (matched) * server certificate expiration date OK * server certificate activation date OK * certificate public key: RSA * certificate version: #3 * subject: OU=Domain Control Validated,OU=PositiveSSL Wildcard,CN=*.nodejs.org * start date: Sun, 08 Nov 2015 00:00:00 GMT * expire date: Tue, 22 Aug 2017 23:59:59 GMT * issuer: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA * compression: NULL * ALPN, server accepted to use http/1.1 > HEAD /dist/v7.8.0/node-v7.8.0-linux-x64.tar.xz HTTP/1.1 > Host: nodejs.org > User-Agent: curl/7.47.0 > Accept: */* > < HTTP/1.1 522 Origin Connection Time-out HTTP/1.1 522 Origin Connection Time-out < Date: Tue, 04 Apr 2017 22:49:34 GMT Date: Tue, 04 Apr 2017 22:49:34 GMT < Content-Type: text/html; charset=UTF-8 Content-Type: text/html; charset=UTF-8 < Connection: keep-alive Connection: keep-alive < Set-Cookie: __cfduid=d0579527c0bd28fb87196985d5b65badb1491346144; expires=Wed, 04-Apr-18 22:49:04 GMT; path=/; domain=.nodejs.org; HttpOnly Set-Cookie: __cfduid=d0579527c0bd28fb87196985d5b65badb1491346144; expires=Wed, 04-Apr-18 22:49:04 GMT; path=/; domain=.nodejs.org; HttpOnly < Expires: Thu, 01 Jan 1970 00:00:01 GMT Expires: Thu, 01 Jan 1970 00:00:01 GMT < Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 < Pragma: no-cache Pragma: no-cache < X-Frame-Options: SAMEORIGIN X-Frame-Options: SAMEORIGIN < Server: cloudflare-nginx Server: cloudflare-nginx < CF-RAY: 34a7d19c0858473a-EWR CF-RAY: 34a7d19c0858473a-EWR < * Connection #0 to host nodejs.org left intact ``` </details> - Is there anything in any of your profile files (`.bashrc`, `.bash_profile`, `.zshrc`, etc) that modifies the `PATH`? Tons, see https://github.com/docwhat/dotfiles for my whole setup. <!-- if this does not apply, please delete this section --> - If you are having installation issues, or getting "N/A", what does `curl -I --compressed -v https://nodejs.org/dist/` print out? <details> <!-- do not delete the following blank line --> ```sh $ curl -I --compressed -v https://nodejs.org/dist/ * Trying 2400:cb00:2048:1::6814:172e... * Connected to nodejs.org (2400:cb00:2048:1::6814:172e) port 443 (#0) * found 173 certificates in /etc/ssl/certs/ca-certificates.crt * found 699 certificates in /etc/ssl/certs * ALPN, offering http/1.1 * SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256 * server certificate verification OK * server certificate status verification SKIPPED * common name: *.nodejs.org (matched) * server certificate expiration date OK * server certificate activation date OK * certificate public key: RSA * certificate version: #3 * subject: OU=Domain Control Validated,OU=PositiveSSL Wildcard,CN=*.nodejs.org * start date: Sun, 08 Nov 2015 00:00:00 GMT * expire date: Tue, 22 Aug 2017 23:59:59 GMT * issuer: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA * compression: NULL * ALPN, server accepted to use http/1.1 > HEAD /dist/ HTTP/1.1 > Host: nodejs.org > User-Agent: curl/7.47.0 > Accept: */* > Accept-Encoding: deflate, gzip > < HTTP/1.1 200 OK HTTP/1.1 200 OK < Date: Tue, 04 Apr 2017 23:00:13 GMT Date: Tue, 04 Apr 2017 23:00:13 GMT < Content-Type: text/html Content-Type: text/html < Connection: keep-alive Connection: keep-alive < Set-Cookie: __cfduid=db500eaf269a21c73b4ca4ec3f153ac021491346798; expires=Wed, 04-Apr-18 22:59:58 GMT; path=/; domain=.nodejs.org; HttpOnly Set-Cookie: __cfduid=db500eaf269a21c73b4ca4ec3f153ac021491346798; expires=Wed, 04-Apr-18 22:59:58 GMT; path=/; domain=.nodejs.org; HttpOnly < CF-Cache-Status: STALE CF-Cache-Status: STALE < Vary: Accept-Encoding Vary: Accept-Encoding < Expires: Wed, 05 Apr 2017 03:00:13 GMT Expires: Wed, 05 Apr 2017 03:00:13 GMT < Cache-Control: public, max-age=14400 Cache-Control: public, max-age=14400 < Server: cloudflare-nginx Server: cloudflare-nginx < CF-RAY: 34a7e1944fe01834-EWR CF-RAY: 34a7e1944fe01834-EWR < Content-Encoding: gzip Content-Encoding: gzip < * Connection #0 to host nodejs.org left intact ``` </details>
installing node
low
Critical
219,420,170
flutter
Optimize the animation phase's performance
#9138 caused a 0.4ms average frame draw latency increase on flutter_gallery_ios__transition_perf's average_frame_build_time_millis and 1500ms regression on microbenchmarks_ios's stock_build_iteration. Suspect due to there being 2 SlideTransitions instead of 1.
framework,a: animation,c: performance,P3,team-framework,triaged-framework
low
Major
219,448,643
electron
API to access localStorage in the main process
I expect some apis to get, set and remove localStorage data, just like those apis of cookies. Here are apis of cookies: ``` ses.cookies.get(filter, callback) ses.cookies.set(details, callback) ses.cookies.remove(url, name, callback) ``` Expected apis of localStorage ``` ses.localStorage.get(filter, callback) ses.localStorage.set(details, callback) ses.localStorage.remove(url, name, callback) ```
enhancement :sparkles:
high
Critical
219,474,368
rust
Confusing type error due to strange inferred type for a closure argument
This [example](https://play.rust-lang.org/?gist=e1edb587259e492444d69d63f2052537&version=nightly&backtrace=0): ```rust pub struct Request<'a, 'b: 'a> { a: &'a (), b: &'b (), } pub trait Handler: Send + Sync + 'static { fn handle(&self, &mut Request) -> Result<(),()>; } impl<F> Handler for F where F: Send + Sync + 'static + Fn(&mut Request) -> Result<(),()> { fn handle(&self, _: &mut Request) -> Result<(),()> { unimplemented!() } } fn make_handler(h: &'static Handler) -> Box<Handler> { Box::new(move |req| h.handle(req)) } ``` errors with ``` error[E0271]: type mismatch resolving `for<'r, 'r, 'r> <[closure@<anon>:14:14: 14:38 h:_] as std::ops::FnOnce<(&'r mut Request<'r, 'r>,)>>::Output == std::result::Result<(), ()>` --> <anon>:14:5 | 14 | Box::new(move |req| h.handle(req)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter , found concrete lifetime | = note: concrete lifetime that was found is lifetime '_#9r = note: required because of the requirements on the impl of `Handler` for `[closure@<anon>:14:14: 14:38 h:_]` = note: required for the cast to the object type `Handler` ``` Annotating the closure parameter `|req: &mut Response|` allow the example to compile. Interesting, annotating with `|req: &&mut Response|` produces a similarly-structured error, so I believe we're inferring `&&mut` here (maybe related to autoderef?).
A-type-system,C-enhancement,A-diagnostics,P-medium,A-closures,T-compiler,A-inference,D-confusing,D-newcomer-roadblock,T-types
medium
Critical
219,492,991
three.js
Object3D clone userData exception
When calling `Object3D.clone()` I get an exception `a.geometries is undefined` at `Object3D.toJSON` method line 11028. In my Object3D instance I try to clone, I also store a reference to the `Scene` object in the `userData` property. As far as I can see, the exception appears since `Object3D.clone()` tries to copy the `userData` object. When calling `Scene.toJSON` method it is tried to copy all descendants of the scene. In my case it crashes when it is tried to copy a `GridHelper `child object of the scene. This error also appears when calling `Object3D.clone(false)` to prevent a recursive behavior. In this case, I would expect that this kind of recursive `userData` JSON copy is switched off. Maybe it would be useful to document that also `userData` is cloned recursively and that the stored `userData` objects must provide a custom `toJSON` method to influence this behavior. What do you think? ##### Three.js version - [x] r84 ##### Browser - [x] Chrome - [x] Firefox ##### OS - [x] Windows
Suggestion
low
Critical
219,508,922
vscode
Symbol outline multi-line highlight is visually inconsistent when interleaved with code lens
If the symbol outline is highlighting an entry that spans multiple lines and there is a code lens within that range, the code lens line is not highlighted. See attached image. It seems like the code lens line should also be highlighted in the same color. - VSCode Version: 1.10.2, happens on 1.11 insiders as well. - OS Version: Win10 ![image](https://cloud.githubusercontent.com/assets/356714/24696929/29556e48-19a0-11e7-9522-1894e91ab250.png)
feature-request,ux,editor-core
low
Minor
219,520,671
youtube-dl
[bilibili]Can't support a video containing many pages.
--- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.04.03*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.04.03** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue* --- for example,the URL http://www.bilibili.com/video/av9291699 there are 4 videos in it.but if I use the command `youtube-dl -F http://www.bilibili.com/video/av9595179` I can only see the information about the first video: ``` [BiliBili] 9595179: Downloading webpage [BiliBili] 9595179: Downloading video info page [info] Available formats for 9595179: format code extension resolution note 0 mp4 unknown 1 mp4 unknown 369.28MiB (best) ``` Only if I execute `youtube-dl -F http://www.bilibili.com/video/av9595179/index_1.html` to `youtube-dl -F http://www.bilibili.com/video/av9595179/index_4.html` can I download all the 4 videos correctly.Can you fix it?or tell me the way to parse how many videoes in an ID.
request
low
Critical
219,721,368
vscode
[Feature] Option to disable cmd+click trigger for goToDefinition
Starting ~2 weeks ago, I have been plagued by this feature. Somehow I manage to trigger this feature about 60% of the time when I am trying to copy+paste. It is the same issue as reported here, but in the editor so am creating this ticket as suggested by @bpasero . https://github.com/Microsoft/vscode/issues/7827#issuecomment-238237206 - VSCode Version: Version 1.10.2 (1.10.2) - OS Version: OS X 10.11.6 (15G31) Steps to Reproduce: 1. Cmd+click a followable definition. 2. Unexpectedly arrive somewhere deep in node_modules. Don't get me wrong, I love this feature but whatever changes were made recently seem to be incompatible with my muscle memory when copying text. So, I would like to change the keybinding, or at the very least turn it off altogether.
feature-request,editor-core
high
Critical
219,793,404
vscode
Keyboard mappings with `setxkbmap` on Linux not working
- VSCode Version: 1.11.0 - OS Version: Ubuntu 16.04 I have my Caps Lock key bound to Escape using `setxkbmap` on Linux. This worked fine till 1.10, but broke with 1.11. At first I thought it was an issue with the VSCodeVim extension, but the issue persists with all the other Vim extensions on the marketplace as well. Pressing the escape button still works as expected. The binding is still respected everywhere else in the operating system, it's only Visual Studio Code that ignores it for some reason. Steps to Reproduce: 1. Run `setxkbmap -option caps:escape` (binds caps to escape for the duration of the session) 2. Hitting caps lock when in insert mode (with a Vim extension like VSCodeVim installed) no longer puts you normal mode. 3. Hitting escape still works as expected and puts you in normal mode.
bug,help wanted,keybindings,linux
high
Critical
219,879,026
vscode
Neo keyboard layout: Some Keys stopped working
- VSCode Version: Code 1.11.0 (9122ec4b1068bd391e41974f46a4b54c1b9c90f9, 2017-04-05T21:13:24.700Z) - OS Version: Linux x64 4.4.0-72-generic --- Steps to Reproduce: 1. Install and activate [Neo](https://en.wikipedia.org/wiki/Keyboard_layout#Neo) keyboard layout 2. Open any source file in VS code 3. Put cursor somewhere in the file 4. Press `M4` key and hold. Press `s` key (see image) 5. Instead of the cursor moving left, nothing happens In the previous version of VSCode (1.10.2 8076a19fdcab7e1fc1707952d652f0bb6c6db331) this worked just fine . ![tastatur_e4b png](https://cloud.githubusercontent.com/assets/378106/24753062/df9a58fe-1ad0-11e7-9713-af281be3b7af.png)
bug,help wanted,linux,keyboard-layout
medium
Critical
219,880,161
TypeScript
Suggestion: one-sided or fine-grained type guards
## The Problem User-defined type guards assume that *all* values that pass a test are assignable to a given type, and that *no* values that fail the test are assignable to that type. This works well for functions that strictly check the type of a value. ```ts function isNumber(value: any): value is number { /* ... */ } let x: number | string = getNumberOrString(); if (isNumber(x)) { // x: number } else { // x: string } ``` But some functions, like `Number.isInteger()` in ES2015+, are more restrictive in that only *some* values of a given type pass the test. So the following does't work. ```ts function isInteger(value: any): value is number { /* ... */ } let x: number | string = getNumberOrString(); if (isInteger(x)) { // x: number (Good: we know x is a number) } else { // x: string (Bad: x might still be a number) } ``` The current solution – the one followed by the [built-in declaration libraries][1] – is to forgo the type guard altogether and restrict the type accepted as an argument, even though the function will accept any value (it will just return `false` if the input is not a number). ```ts interface NumberConstructor { isInteger(n: number): boolean; } ``` ## A Solution: an "as" type guard There is a need for a type guard that constrains the type when the test passes but not when the test fails. Call it a *weak type guard*, or a *one-sided type guard* since it only narrows one side of the conditional. I would suggest overloading the `as` keyword and using it like `is`. ```ts function isInteger(value: any): value as number { /* ... */ } let x: number | string = getNumberOrString(); if (isInteger(x)) { // x: number } else { // x: number | string } ``` This is only a small issue with some not-too-cumbersome workarounds, but given that a number of functions in ES2015+ are of this kind, I think a solution along these lines is warranted. ## A more powerful solution: an "else" type guard In light of what [@aluanhaddad][2] has suggested, I feel the above solution is a bit limited in that it only deals with the true side of the conditional. In rare cases a programmer might want to narrow only the false side: ```ts let x: number | string = getNumberOrString(); if (isNotInteger(x)) { // x: number | string } else { // x: number } ``` To account for this scenario, a *fine-grained type guard* could be introduced: a type guard that deals with both sides independently. I would suggest introducing an `else` guard. The following would be equivalent: ```ts function isCool(value: any): boolean { /* ... */ } function isCool(value: any): true else false { /* ... */ } ``` And the following would narrow either side of the conditional independently: ```ts let x: number | string = getNumberOrString(); // Narrows only the true side of the conditional function isInteger(value: any): value is number else false { /* ... */ } if (isInteger(x)) { // x: number } else { // x: number | string } // Narrows only the false side of the conditional function isNotInteger(value: any): true else value is number { /* ... */ } if (isNotInteger(x)) { // x: number | string } else { // x: number } ``` For clarity, parentheses could optionally be used around one or both sides: ```ts function isInteger(value: any): (value is number) else (false) { /* ... */ } ``` At this point I'm not too certain about the syntax. But since it would allow a number of built-in functions in ES2015+ to be more accurately described, I would like to see something along these lines. [1]: https://github.com/Microsoft/TypeScript/blob/dce7fca83d6bbf0bf72fd0a4237ad152599bd2f7/lib/lib.es2015.core.d.ts#L234 [2]: https://github.com/Microsoft/TypeScript/issues/15048#issuecomment-292771713
Suggestion,Awaiting More Feedback
high
Critical
219,981,192
rust
`rustc` fails to see a bound that is present, but also requires that the bound not be present
In certain cases, `rustc` will emit an error message on what appears to be valid code, claiming that - a bound that is present is not present, and must be present - but the bound is present and must not be present Here is a MWE (or [playground](https://is.gd/mHDB4C)): ``` trait Foo<T> { type Quux; } trait Bar<B> { type Baz; fn arthur() where B: Foo<Self::Baz>, B::Quux: Send; } impl<B> Bar<B> for () { type Baz = (); fn arthur() where B: Foo<()>, B::Quux: Send { } } ``` This produces the pair of errors: ``` rustc 1.16.0 (30cf806ef 2017-03-10) error[E0277]: the trait bound `B: Foo<()>` is not satisfied --> <anon>:8:5 | 8 | fn arthur() where B: Foo<()>, B::Quux: Send { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo<()>` is not implemented for `B` | = help: consider adding a `where B: Foo<()>` bound error[E0276]: impl has stricter requirements than trait --> <anon>:8:5 | 4 | fn arthur() where B: Foo<Self::Baz>, B::Quux: Send; | --------------------------------------------------- definition of `arthur` from trait ... 8 | fn arthur() where B: Foo<()>, B::Quux: Send { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `B: Foo<()>` error: aborting due to 2 previous errors ```
A-trait-system,A-associated-items,T-compiler,C-bug,A-lazy-normalization,fixed-by-next-solver
low
Critical
219,981,802
awesome-mac
Replace icon with descriptions
The icons on the page may seem nice, but filtering or searching based on them is impossible unless you go directly to the markdown. ![Open-Source Software][OSS Icon] means **open source**, click to enter **open source** repo; ![Freeware][Freeware Icon] means **free** to use, or **free** personal license; ![hot][hot Icon] means **hot** app; ![tuijian][tuijian Icon] means **recommended** app; ![must-have][bibei Icon] means **must have** app; ![App Store][app-store Icon] means **App store** hyperlink; ![1 star][red Icon] means highly recommended must have app, the number of stars represents how strong I recommend; I propose we either change these, or add the actual text of what they mean into the line. This would allow to search based on a keyword as if it where a label.
vote
low
Major
220,039,759
go
cmd/compile: possible infinite recursion in Type.cmp
If two of the types in fixedbugs/bug398.go make it into the backend and get passed to Type.cmp, they can cause infinite recursion. See https://go-review.googlesource.com/c/39710/ patch set 3 for a roundabout example. It is non-obvious how to fix this, because if we detect infinite recursion, how should the types compare?
NeedsInvestigation,compiler/runtime
low
Critical
220,053,279
godot
WindowDialog Drag Panel not visible
The drag panel is not visible with pos(0,0) is this intended? Why is the origin not at the top left of the panel? ![image](https://cloud.githubusercontent.com/assets/4741886/24778077/f342cf28-1b28-11e7-97c6-b7a2d68f8c05.png) 1. Add WindowDialog. 2. Run Game. 3. Try to drag the WindowDialog. Edit: Looks like I used show() instead of popup() so I think it's all right. Edit2: What is show() for in controls? Is there any use case? Master branch Ubuntu
discussion,topic:gui
low
Minor
220,063,855
youtube-dl
[GameStar] ERROR: 92640: Failed to parse JSON (caused by JSONDecodeError('Invalid control character at...')
## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like that [x]) - Use *Preview* tab to see how your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.04.03*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.04.03** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- Downloading of some Gamestar videos fail with the following error message: ``` $ youtube-dl -v http://www.gamestar.de/videos/rain-world-gameplay-trailer-stellt-das-sandbox-spiel-vor,92640.html [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', 'http://www.gamestar.de/videos/rain-world-gameplay-trailer-stellt-das-sandbox-spiel-vor,92640.html'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2017.04.03 [debug] Python version 3.6.0 - Linux-4.10.6-1-ARCH-x86_64-with-arch [debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4, rtmpdump 2.4 [debug] Proxy map: {} [GameStar] 92640: Downloading webpage ERROR: 92640: Failed to parse JSON (caused by JSONDecodeError('Invalid control character at: line 6 column 140 (char 280)',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 672, in _parse_json return json.loads(json_string) File "/usr/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Invalid control character at: line 6 column 140 (char 280) Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 672, in _parse_json return json.loads(json_string) File "/usr/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Invalid control character at: line 6 column 140 (char 280) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 761, in extract_info ie_result = ie.extract(url) File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 429, in extract ie_result = self._real_extract(url) File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/gamestar.py", line 38, in _real_extract webpage, 'JSON-LD', group='json_ld'), video_id) File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 676, in _parse_json raise ExtractorError(errmsg, cause=ve) youtube_dl.utils.ExtractorError: 92640: Failed to parse JSON (caused by JSONDecodeError('Invalid control character at: line 6 column 140 (char 280)',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. ``` - This also happens with some other (not all) GameStar videos e.g. http://www.gamestar.de/videos/news-neuer-tomb-raider-kinofilm-destiny-2-offiziell-angekuendigt,92626.html, but with different control characters: `ERROR: 92626: Failed to parse JSON (caused by JSONDecodeError('Invalid control character at: line 6 column 32 (char 180)',));` ### Identified problem - New line characters in json string. #### Reference - http://stackoverflow.com/questions/9295439/python-json-loads-fails-with-valueerror-invalid-control-character-at-line-1-c - http://stackoverflow.com/questions/22394235/invalid-control-character-with-python-json-loads ### Possible fixes - _Ignore_ new line characters: Change `json.loads(json_string)` to `json.loads(json_string, strict=False)` in `extractors/common.py`. - This might conceal other errors? -> Create a new key word argument called `strict=True` in `def _parse_json()`. - _Remove_ new line characters in json string (in `extractors/gamestar.py`): ```python json_ld = self._parse_json(self._search_regex( r'(?s)<script[^>]+type=(["\'])application/ld\+json\1[^>]*>(?P<json_ld>[^<]+VideoObject[^<]+)</script>', webpage, 'JSON-LD', group='json_ld'), video_id, transform_source=lambda s: s.replace('\n', '')) ``` - or ```python json_ld = self._parse_json(self._search_regex( r'(?s)<script[^>]+type=(["\'])application/ld\+json\1[^>]*>(?P<json_ld>[^<]+VideoObject[^<]+)</script>', webpage, 'JSON-LD', group='json_ld').replace('\n', ''), video_id) ```
bug
low
Critical
220,089,384
go
encoding/asn1: cannot unmarshal SET if its fields have different ordering
Please answer these questions before submitting your issue. Thanks! #### 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. ```go package main import ( "encoding/asn1" "fmt" ) type A struct { Name string Int int } type B struct { Int int Name string } func main() { bs, err := asn1.Marshal(A{Name: "foo", Int: 5}) if err != nil { panic(err) } bs[0] = asn1.TagSet | 0x20 var b B rest, err := asn1.UnmarshalWithParams(bs, &b, "set") if err != nil { panic(err) } if len(rest) != 0 { panic("invalid length") } fmt.Println(b) } ``` #### What did you expect to see? {5 foo} #### What did you see instead? panic: asn1: structure error: tags don't match (2 vs {class:0 tag:19 length:3 isCompound:false}) {optional:false explicit:false application:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} int @2 goroutine 1 [running]: main.main() /Users/hiro/set.go:42 +0x24a exit status 2 #### Does this issue reproduce with the latest release (go1.8)? yes #### System details ``` go version devel +5cadc91b3c Tue Apr 4 02:40:11 2017 +0000 darwin/amd64 GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/hiro/.go" GORACE="" GOROOT="/Users/hiro/go" GOTOOLDIR="/Users/hiro/go/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wq/dwn8hs0x7njbzty9f68y61700000gn/T/go-build019140017=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOROOT/bin/go version: go version devel +5cadc91b3c Tue Apr 4 02:40:11 2017 +0000 darwin/amd64 GOROOT/bin/go tool compile -V: compile version devel +5cadc91b3c Tue Apr 4 02:40:11 2017 +0000 X:framepointer uname -v: Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 ProductName: Mac OS X ProductVersion: 10.12.4 BuildVersion: 16E195 lldb --version: lldb-370.0.37 Swift-3.1 gdb --version: GNU gdb (GDB) 7.12.1 ```
NeedsInvestigation
low
Critical
220,092,144
rust
NVPTX: "LLVM ERROR: Cannot select" when translating `num::from_str_radix`
### STR ``` $ rustc libcore/lib.rs LLVM ERROR: Cannot select: 0x7f1356ad1170: i64,ch,glue = NVPTXISD::LoadParam<LDST0[<unknown>](align=8)> 0x7f13567aa6c0:1, Constant:i32<1>, Constant:i32<1454182880>, 0x7f13567aa6c0:2 0x7f13567aac00: i32 = Constant<1> 0x7f1356ad18e0: i32 = Constant<1454182880> 0x7f13567aa6c0: i64,ch,glue = NVPTXISD::LoadParam<LDST16[<unknown>](align=8)> 0x7f1356420650, Constant:i32<1>, Constant:i32<0>, 0x7f1356420650:1 0x7f13567aac00: i32 = Constant<1> 0x7f134764fba0: i32 = Constant<0> 0x7f1356420650: ch,glue = NVPTXISD::CallArgEnd 0x7f13546d9620, Constant:i32<1>, 0x7f13546d9620:1 0x7f13567aac00: i32 = Constant<1> 0x7f13546d9620: ch,glue = NVPTXISD::LastCallArg 0x7f13567aa5e0, Constant:i32<1>, Constant:i32<0>, 0x7f13567aa5e0:1 0x7f13567aac00: i32 = Constant<1> 0x7f134764fba0: i32 = Constant<0> 0x7f13567aa5e0: ch,glue = NVPTXISD::CallArgBegin 0x7f1356ad1aa0, 0x7f1356ad1aa0:1 0x7f1356ad1aa0: ch,glue = NVPTXISD::CallVoid 0x7f1356ad1a30, 0x7f13546d9460, 0x7f1356ad1a30:1 0x7f13546d9460: i64 = NVPTXISD::Wrapper TargetGlobalAddress:i64<i128 (i32)* @"_ZN54_$LT$u128$u20$as$u20$core..num..FromStrRadixHelper$GT$8from_u3217h2e1aa7ebab2ba02cE"> 0 0x7f13549f5900: i64 = TargetGlobalAddress<i128 (i32)* @"_ZN54_$LT$u128$u20$as$u20$core..num..FromStrRadixHelper$GT$8from_u3217h2e1aa7ebab2ba02cE"> 0 0x7f1356ad1a30: ch,glue = NVPTXISD::PrintCallUni 0x7f134764ff20, Constant:i32<1>, 0x7f134764ff20:1 0x7f13567aac00: i32 = Constant<1> 0x7f134764ff20: ch,glue = NVPTXISD::DeclareRet 0x7f1356273c20, Constant:i32<1>, Constant:i32<128>, Constant:i32<0>, 0x7f1356273c20:1 0x7f13567aac00: i32 = Constant<1> 0x7f1356ad11e0: i32 = Constant<128> 0x7f134764fba0: i32 = Constant<0> 0x7f1356273c20: ch,glue = NVPTXISD::StoreParam<LDST4[<unknown>]> 0x7f13568bf2e0, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, 0x7f13568bf2e0:1 0x7f134764fba0: i32 = Constant<0> 0x7f134764fba0: i32 = Constant<0> 0x7f134764fba0: i32 = Constant<0> 0x7f13568bf2e0: ch,glue = NVPTXISD::DeclareScalarParam 0x7f13568beda0, Constant:i32<0>,Constant:i32<32>, Constant:i32<0>, 0x7f13568beda0:1 In function: _ZN4core3num14from_str_radix17h4c0c1d66bbd93620E ``` NOTE: Requires turning off LLVM assertions to avoid #38824 ### Meta ``` $ rustc --version rustc 1.18.0-dev (50c186419 2017-04-06) ```
A-LLVM,T-compiler,O-NVPTX,C-bug
low
Critical
220,099,330
go
crypto/tls: Dial returns io.EOF
If the server closes the connection before handshake completes, net/tls returns a non-descriptive error "EOF". https://play.golang.org/p/zI-MazOG7v Also locally go version go1.8 darwin/amd64 This may be same as https://github.com/golang/go/issues/13523#issuecomment-167636935 @rsc @bradfitz . ### What did you expect to see? A more descriptive error similar to other errors from net/tls. * dial tcp 127.0.0.1:8081: getsockopt: connection refused * x509: cannot validate certificate for 216.58.209.132 because it doesn't contain any IP SANs ### What did you see instead? _, err := tls.Dial("tcp", "127.0.0.1:8080", nil) if err != nil { fmt.Println(err) fmt.Printf("%#v == io.EOF: %v", err, err == io.EOF) } Output: EOF &errors.errorString{s:"EOF"} == io.EOF: true Of course there is nothing that can be done, the closing of underlying connection is fatal, but is it possible to improve the error?
NeedsDecision
low
Critical
220,323,300
neovim
Remove code which uses locale dependent is*()/to*() libc functions
Currently there are a number of places where libc functions like islower()/etc (those from `ctype.h`) are used. The problem is that all our strings are UTF-8 ones and nobody bothered to set locale to UTF-8, so functions are only more or less safe to use for ASCII only (not safe at all if encoding happens to be not-ASCII-compatible, though I doubt Neovim will work correctly in this case in other places). And when using that for ASCII there are three main possibilities: 1. Function will return what we may already return with `ASCII_…`/`ascii_…` macros/functions. In this case it is better to just use those macros. 2. Function will return something unexpected: e.g. that `a` is not `islower()`. Most likely the result will be user seeing what he thinks is a bug. 3. Function (specifically `tolower()`/`toupper()`) will return a character outside of the ASCII (theoretically possible for 8-bit encodings). But using that character as a byte will result in invalid unicode and using this character as a unicode codepoint will result in wrong codepoint in all cases, except for latin1 locales. ## Proposal - drop each and every call to libc functions from ctype.h, replacing that with our `ascii_…`. - ✅ Rewrite all calls to wchar.h functions: - in three files including wchar.h I see only one actually using that: - charset.c claims it is using towupper()/towlower(), it is not (or hidden in a macros); - spell_defs.h are not using towupper()/towlower() (enc_utf8 is always true, so relevant branch is never entered); - mbyte.c does use that, though guarded by an `#ifdef` and &casemap setting. I hope I have not missed some reason to use single-byte functions from ctype.h. Specifically interesting whether point 2 (return something unexpected) may be needed (and what may be “unexpected” there).
refactor,localization,encoding,complexity:low
low
Critical
220,359,406
rust
Error message when VS 2015 build tools exist but not the SDK needs to be better
Today on Widows we tell users to install the MSVC 2015 build tools and the Windows SDK. If they install the build tools but not the Windows SDK they just get a mysterious linker error. It would be preferable to detect this situation and print a purpose-specific error.
C-enhancement,A-diagnostics,T-compiler,O-windows-msvc,E-help-wanted
low
Critical
220,360,449
go
database/sql: resurrect go-sql-test with modern container things
https://github.com/bradfitz/go-sql-test was an effort to automate testing of database/sql against all of the out-of-tree database drivers. Nowadays there are many more drivers: https://golang.org/wiki/SQLDrivers But https://github.com/bradfitz/go-sql-test is old & neglected & broken. It predates Dockers (by about a year). It should use containers and be runnable by anybody without a bunch of setup work. Anybody have time to help? /cc @kardianos
Testing,help wanted
low
Critical
220,377,652
youtube-dl
Please Add MultiThread For Download Youtube Fragments
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.04.03*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.04.03** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [ ] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [x] Feature request (request for a new functionality) - [x] Question - [ ] Other I Wonder is Fragments Downloader Use single thread ? My speed can up to 4 mb/s for download single youtube mp4 file . But if it is fragments , the speed will just 100 ~ 900kb/s . I think it's because there is only one thread for download all fragments and it will make connection | create the file | download | finish the connection for every single fragments . It will useful if there is 10 thread and each thread download 1 fragments . (something like that) You guys did a great job , thanks .
request
low
Critical
220,378,425
go
encoding/asn1: marshaling GeneralizedTime and UTCTime don't follow DER restriction
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? ### What operating system and processor architecture are you using (`go env`)? ### What did you do? If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. I've just noticed that: https://github.com/golang/go/blob/2acd3fa8f134dafd34a1789177950474b256a74a/src/encoding/asn1/marshal.go#L371-L388 doesn't follow DER restriction. X.690 says: > 11.7.1 The encoding shall terminate with a "Z", as described in the Rec. ITU-T X.680 | ISO/IEC 8824-1 clause on GeneralizedTime. > > 11.8.1 The encoding shall terminate with "Z", as described in the ITU-T X.680 | ISO/IEC 8824-1 clause on UTCTime. ### What did you expect to see? it follows DER restriction. ### What did you see instead? not.
NeedsInvestigation
low
Critical
220,388,177
rust
`!` in Fn types
I've encountered the following issue ([playpen link](https://is.gd/E8Ae7Y)): ```rust use std::process::exit; fn main() { let stuff = get_stuff().unwrap_or_else(exit); // ERROR let stuff = get_stuff().unwrap_or_else(|e| exit(e)); // WORKS let stuff = get_stuff().unwrap_or_else(|e| { exit(e); }); // ALSO WORKS } type Stuff = u32; type ExitCode = i32; fn get_stuff() -> Result<Stuff, ExitCode> { Ok(42) } ``` Conceptually, all three variants should do the exact same thing, but the first one yields the following error: ``` error[E0271]: type mismatch resolving `<fn(i32) -> ! {std::process::exit} as std::ops::FnOnce<(i32,)>>::Output == u32` --> <anon>:5:29 | 5 | let stuff = get_stuff().unwrap_or_else(exit); | ^^^^^^^^^^^^^^ expected !, found u32 | = note: expected type `!` found type `u32` ``` which seems to be about the lack of `!` to `u32` conversion. But the second variant is where exactly such a conversion appears to be occurring. Furthermore, the third variant indicates even more exceptional behavior regarding `!`, as it seemingly enables `()` to be treated as the `Stuff` type. Is this an intended behavior, a type inference bug, unclear error messaging, or something else entirely?
A-type-system,T-compiler,C-feature-request,T-types
low
Critical
220,388,958
opencv
cv::randn generates unexpected result for multivariate Gaussian distribution
<!-- If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses. If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute). This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library. --> ##### System information (version) <!-- Example - OpenCV => latest - Operating System / Platform => Windows 64 Bit - Compiler => Visual Studio 2015 --> - OpenCV => master branch - Operating System / Platform => Mac OS - Compiler => clang ##### Detailed description `cv::randn` generates unexpected result for multivariate Gaussian distribution. ##### Steps to reproduce ```.cpp #include <opencv2/core.hpp> #include <iostream> int main() { // cv::setRNGSeed(cv::getTickCount()); // set the seed // 2-d gaussian distribution (independent) // mean: [0, 1] // standard deviation: // [1, 0 // 0, 0.5] // int n = 500; cv::Mat m, mean, stddev; cv::Mat mu(2,1,CV_32FC1); mu = cv::Scalar(0, 1); cv::Mat sigma(2,2,CV_32FC1); cv::Mat_<float> &my_sigma = (cv::Mat_<float>&)sigma; my_sigma << 1,0,0,0.5; m.create(n,n,CV_32FC2); cv::randn(m, mu, sigma); cv::meanStdDev(m, mean, stddev); std::cout << "mean: \n" << mean << std::endl; std::cout << "stddev: \n" << stddev << std::endl; return 0; } ``` The output is ``` mean: [0.001034765188015391; -6.340903658276147e-05] stddev: [1.002229475202363; 0.499279123027616] ``` It shows that the standard deviation is [1, 0.5], which is expected. But the mean is unexpected, which is [0, 0], instead of [0,1] .
RFC
low
Critical
220,394,531
youtube-dl
Subtitles present in browser not downloaded (viafree.no)
$ youtube-dl -v --write-sub --sub-lang en,no https://www.viafree.no/programmer/underholdning/paradise-hotel/sesong-9/episode-1 [debug] youtube-dl version 2017.04.03 [debug] Python version 2.7.10 - Darwin-16.5.0-x86_64-i386-64bit [debug] exe versions: ffmpeg 3.2.2, ffprobe 3.2.2, rtmpdump 2.4 [ffmpeg] There aren't any subtitles to convert
geo-restricted
low
Critical
220,403,579
neovim
guicursor doesn't take affect after set all&
Starting nvim with `build/bin/nvim -u NONE` in an `xterm`. Then run ``` set guicursor? set all& set guicursor? ``` You can see the value has changed, but the affect doesn't change. Running ``` set guicursor& ``` changes the affect, but it doesn't change the value observed with `set guicursor?`
bug,complexity:low,core,options
low
Minor
220,408,353
three.js
Time warping bug in AnimationAction.crossFadeTo() and AnimationAction.crossFadeFrom()
After crossfading with time warping the timeScale value of the start action is not reset. To reproduce the problem try [this example](https://rawgit.com/jostschmithals/three.js/crossfadeBugTest/examples/crossfadeTest.html) which is using [this animation code]( https://github.com/jostschmithals/three.js/blob/crossfadeBugTest/examples/crossfadeTest.html#L81-L106). If you make a crossfade from “run” to “idle” first, wait until it is finished, and then play “run” again, running will always happen in slow motion (this would even be the case if you would make a `runAction.reset().play`). The display shows that the "run" action's timeScale is 0.18 instead of 1.0. The time warping of “run” should work like the green line in the following screenshot (which is symmetric to the blue “idle” line). But since the reset of the “run” action's timeScale is missing, it ends with the red line: ![graph timescale](https://cloud.githubusercontent.com/assets/5700294/24830296/5ce82fb2-1c83-11e7-8cbf-d53078326c5d.jpg) So you have to reset the effective timeScale to the former value manually in each place of an application where (dependent on user inputs) a crossfading with time warping might have happened before. I can't imagine that this is the intended behaviour(?) ___ BTW: I noticed one other issue with crossfading, which is at least inconvenient: Before you can make a crossfade you always have to manually set the effective weight of the end action to 1. Wouldn’t this better be the default in the crossfade methods, which use this internally?
Needs Investigation
low
Critical
220,442,083
kubernetes
Removing flags at the end of their deprecation period is rarely easy
Removing deprecated flags is annoying because a number of components typically aren't kept up to date when the flags are initially deprecated - and it typically falls to the person doing the removal to fix these components. Off the top of my head: - Provisioning scripts are rarely kept up to date until it's time to actually remove the flag. For an example, see #40050. I'd like to maybe have something like flags verification identify which flags are deprecated and warn us when `--{flag-name}` shows up in the repo. - Today, core-repo tests of non-core components (thinking of kops) can fail and block PRs that remove deprecated flags in the core repo (see #44230 for a recent example). This is a useful signal, but it does seem a bit backwards - shouldn't non-core components have their own testing to ensure they comply with the flags in core `master`, and be on the hook for staying up to date? @justinsb thoughts? I understand having e.g. the kops test in core helps prevent us from inadvertently breaking kops, but the flags thing is really a rough edge. Now that we've canonized a [deprecation policy](https://kubernetes.io/docs/home/deprecation-policy/) that includes flags, has the need for running this kind of testing in the PR builder diminished? I imagine the majority of things we could do to break kops would be poorly-managed API changes, which the deprecation policy prevents (in-theory).
area/test,area/api,priority/important-longterm,sig/architecture,lifecycle/frozen
low
Major
220,473,335
TypeScript
Add refactoring action to export selected JSX code as stateless component
Please add refactoring action that will improve productivity while working with JSX/TSX. Suppose that I have the following code: ```ts class Page extends React.Component { render() { return ( <div> <h1>{this.props.header}</h1> </div> ); } } ``` I would like to select line with `<h1>` and chose from context menu "Extract to stateless component". And that would create the following stateless component: ```ts const NewComponent = ({ header }) => (<h1>{header}</h1>); ``` The selected text would be replaced with that: ```ts <NewComponent header={this.props.header} /> ```
Suggestion,Domain: Refactorings,Experience Enhancement
low
Major
220,494,334
youtube-dl
OmniTV.ca Videos Get Stuck
## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like that [x]) - Use *Preview* tab to see how your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.04.09*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x ] I've **verified** and **I assure** that I'm running youtube-dl **2017.04.09** ### Before submitting an *issue* make sure you have: - [x ] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [ x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [x ] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue* --- ### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows: Add `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` youtube-dl "http://www.omnitv.ca/on/cmn/videos/4655563809001/" -v [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['http://www.omnitv.ca/on/cmn/videos/4655563809001/', '-v'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2017.04.09 [debug] Python version 3.5.2 - Linux-4.4.0-71-generic-x86_64-with-Ubuntu-16.04-xenial [debug] exe versions: avconv 2.8.11-0ubuntu0.16.04.1, avprobe 2.8.11-0ubuntu0.16.04.1, ffmpeg 2.8.11-0ubuntu0.16.04.1, ffprobe 2.8.11-0ubuntu0.16.04.1, rtmpdump 2.4 [debug] Proxy map: {} [generic] 4655563809001: Requesting header WARNING: Falling back on generic information extractor. [generic] 4655563809001: Downloading webpage [generic] 4655563809001: Extracting information [generic] Brightcove video detected. [download] Downloading playlist: Block 1: Episode Eight | OMNI Ontario Mandarin [generic] playlist Block 1: Episode Eight | OMNI Ontario Mandarin: Collected 1 video ids (downloading 1 of them) [download] Downloading video 1 of 1 [brightcove:legacy] 4655563809001: Downloading webpage [brightcove:legacy] 4655563809001: Extracting information Traceback (most recent call last): File "/usr/local/bin/youtube-dl", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python3.5/dist-packages/youtube_dl/__init__.py", line 464, in main _real_main(argv) File "/usr/local/lib/python3.5/dist-packages/youtube_dl/__init__.py", line 454, in _real_main retcode = ydl.download(all_urls) File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 1890, in download url, force_generic_extractor=self.params.get('force_generic_extractor', False)) File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 772, in extract_info return self.process_ie_result(ie_result, download, extra_info) File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 956, in process_ie_result extra_info=extra) File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 833, in process_ie_result extra_info=extra_info) File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 761, in extract_info ie_result = ie.extract(url) File "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/common.py", line 429, in extract ie_result = self._real_extract(url) File "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/brightcove.py", line 287, in _real_extract videoPlayer[0], query, referer=referer) File "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/brightcove.py", line 315, in _get_video_info video_info = info['programmedContent']['videoPlayer']['mediaDTO'] TypeError: 'NoneType' object is not subscriptable --- ### Description of your *issue*, suggested solution and other information OmniTV.ca works under generic video hosts but gives off this weird bug: "TypeError: 'NoneType' object is not subscriptable" when I try to download videos from it.
geo-restricted
low
Critical
220,526,218
vscode
SCM - Support workspace diff navigation
- Please improve the source control view by making it searchable, folder-wise grouping, bulk select. - Allowing to write git commands right there would be great. - Keyboard shortcuts to navigate through changed files
feature-request,scm
high
Critical
220,534,580
rust
rustc: Disable color codes in non-tty terminal environments
When `rustc` is invoked from non-tty shell contexts, such as being piped to less `rustc ... | less`, or when `rustc` is run from an Emacs or Vim terminal, then terminal codes like `$<2>` should not be emitted on compiler messages.
A-frontend,C-enhancement,T-compiler
low
Minor
220,544,296
vscode
Support args for `editor.action.trimTrailingWhitespace` command
- VSCode Version: 1.11.1 - OS Version: Windows 10 Pro ## Feature Request Support 2 additional args for the `editor.action.trimTrailingWhitespace` command: ```js commands.executeCommand( 'editor.action.trimTrailingWhitespace', uri, // (optional, but useful when the doc in question is not within an active editor) reason // (manual, auto-save, etc.), useful for NOT trimming auto whitespace ); ```
feature-request,api
low
Minor
220,570,187
opencv
Compilation error:Segmentation fault (core dumped) CMake Error at cuda_compile_generated_pyrlk.cu.o.cmake:266 (message): with current master branch
``` System information (version) - OpenCV => 3.2 [opencv cmake-result.txt](https://github.com/opencv/opencv/files/909411/opencv.cmake-result.txt) - Operating System / Platform => ubuntu 16.04 64 Bit - Compiler => gcc version 5.4.0 20160609 configure command: cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=$(python -c "import sys; print(sys.prefix)") -D PYTHON_EXECUTABLE=$(which python) -D OPENCV_EXTRA_MODULES_PATH=/path/to/to/opencv_contrib/modules -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_JPPEG=ON -D WITH_PNG=ON -D WITH_CUDA=ON -D WITH_IPP=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D WITH_NVCUVID=ON -D WITH_V4L=ON -D WITH_FFMPEG=ON -D WITH_GSTREAMER=OFF -D WITH_OPENMP=ON -D WITH_TBB=ON .. ``` I reported this bug: `https://github.com/opencv/opencv/issues/8509` some guy recommended me to give latest master branch a try,and got this compilation error: ``` [ 95%] Built target opencv_test_cudaobjdetect [ 96%] Built target opencv_interactive-calibration [ 96%] Linking CXX executable ../../bin/opencv_test_optflow [ 96%] Linking CXX executable ../../bin/opencv_perf_optflow [ 96%] Built target opencv_perf_cudaobjdetect [ 96%] Linking CXX executable ../../bin/opencv_test_stitching [ 96%] Built target opencv_perf_tracking [ 96%] Linking CXX executable ../../bin/opencv_perf_stitching [ 96%] Built target opencv_test_tracking [ 96%] Built target opencv_perf_optflow [ 96%] Built target opencv_test_optflow [ 97%] Built target opencv_test_stitching [ 97%] Built target opencv_perf_stitching Segmentation fault (core dumped) CMake Error at cuda_compile_generated_pyrlk.cu.o.cmake:266 (message): Error generating file /path/to/opencv/release/modules/cudaoptflow/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_pyrlk.cu.o modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/build.make:318: the rule for target„modules/cudaoptflow/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_pyrlk.cu.o“ failed make[2]: *** [modules/cudaoptflow/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_pyrlk.cu.o] error 1 CMakeFiles/Makefile2:14889: the rule for target,modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/all“ failed make[1]: *** [modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/all] error 2 Makefile:149: the rule for target,all“ failed make: *** [all] error 2 ```
bug,priority: low,category: gpu/cuda (contrib)
low
Critical
220,576,256
kubernetes
clientset interface functions deprecated
Since we mark functions of clientset interface such as Core(), Autoscaling().... as deprecated, should we change all the calling of Core() to specific version like CoreV1() ... ? https://github.com/kubernetes/kubernetes/blob/master/pkg/client/clientset_generated/clientset/clientset.go
kind/cleanup,sig/api-machinery,lifecycle/frozen
low
Major
220,657,401
go
x/tools/refactor/rename: bad positions in "ambiguous specifier" error message
In directory `$GOROOT/src`: ``` $ gorename -from \"cmd/internal/obj/arm64\"::c -to ___ -d gorename: ambiguous specifier c matches var at asm7.go:6, var at asm7.go:6, var at asm7.go:2, var at asm7.go:5, var at asm7.go:43, var at asm7.go:2 ``` The positions here are bogus; there is no object c at any of these places. These appear to be line offsets relative to functions containing local variables called c. There's also an implicit feature request here. I'm running this command to find all the local variables named c. Then I will inspect them, pick a good new name for them, and gorename them one at a time. The `-to=___` is just because a `-to` is required, and `-d` is to avoid actually changing the files; I don't really want any of that, I just want to know where the c's are. Maybe there's a better way? Perhaps a gorename flag that just tells you the declaration site of all impacted objects? cc @alandonovan
Tools,Refactoring
low
Critical
220,680,336
go
x/crypto/ssh/terminal: ReadPassword doesn't work on redirected stdin giving inappropriate ioctl for device
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? go version go1.8 linux/amd64 ### What operating system and processor architecture are you using (`go env`)? GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/ncw/go" GORACE="" GOROOT="/opt/go/go1.8" GOTOOLDIR="/opt/go/go1.8/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build011975399=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" PKG_CONFIG="pkg-config" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" ### What did you do? Use ReadPassword with redirected stdin - it gives error "inappropriate ioctl for device" Save this code as [readpass.go](https://play.golang.org/p/y3n7UEmCgC) ``` $ go build readpass.go $ ./readpass 2017/04/10 16:18:22 Read "hello" $ echo "hello" | ./readpass 2017/04/10 16:18:34 inappropriate ioctl for device $ ``` ### What did you expect to see? 2017/04/10 16:18:22 Read "hello" I would expect ReadPass to figure out that it is not reading from a terminal before issuing ioctls that are terminal specific. ### What did you see instead? 2017/04/10 16:18:34 inappropriate ioctl for device Originally reported in: https://github.com/ncw/rclone/issues/1308
NeedsInvestigation
medium
Critical
220,702,216
angular
Feature: provide a way to dispose DetachedRouteHandle
<!-- IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING --> **I'm submitting a ...** (check one with "x") ``` [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question ``` **Current behavior** Typically, when providing custom implementation of `RouteReuseStrategy`, we store `DetachedRouteHandle` in map and dispose of it later when `retrieve()` function is called. But if user never visits the route again, `DetachedRouteHandle` will never be disposed. It can create memory leaks. Also, stored component will never unsubscribe from observables, which could lead to application gradually slowing down. The impact is significant in larger apps. **Expected behavior** An injectable service with function to properly dispose `DetachedRouteHandle` object should be added. Other option would be exposing `componentRef` as public property of `DetachedRouteHandle`. **Minimal reproduction of the problem with instructions** N/A **What is the motivation / use case for changing the behavior?** `RouteReuseStrategy` cause memory leaks. * **Angular version:** 2.4.X <!-- Check whether this is still an issue in the most recent Angular version -->
feature,area: router,feature: under consideration,feature: votes required
medium
Critical
220,736,184
rust
lldb print error and crash
I tried to debug wth lldb this code: ``` use std::collections::HashMap; #[derive(Debug)] enum En<'a> { None, Bar(&'a Bar<'a>), } #[derive(Debug)] struct Bar<'a> { next: En<'a>, } fn main() { let mut all_objects = HashMap::new(); let bar: Bar = Bar { next: En::None, }; all_objects.insert(1, bar); let b1 = all_objects.get(&1).unwrap(); println!("b1={:?}", b1); //line 22 println!("end"); } ``` When try to set breakpoint to line 22 and print b1: ``` $ lldb target/debug/test (lldb) target create "target/debug/test" Current executable set to 'target/debug/test' (x86_64). (lldb) b 22 Breakpoint 1: 2 locations. (lldb) r Process 11600 launched: '/home/chabapok/RustProjects/2/test1/target/debug/test' (x86_64) Process 11600 stopped * thread #1, name = 'test', stop reason = breakpoint 1.1 frame #0: 0x000055555556501f test`test::main at main.rs:22 19 }; 20 all_objects.insert(1, bar); 21 let b1 = all_objects.get(&1).unwrap(); -> 22 println!("b1={:?}", b1); //line 22 23 println!("end"); 24 } (lldb) p b1 error: test DWARF DIE at 0x0000007c (class En) has a member variable 0x00000082 (RUST$ENCODED$ENUM$0$None) whose type is a forward declaration, not a complete definition. Please file a bug against the compiler and include the preprocessed output for /home/chabapok/RustProjects/2/test1/./src/main.rs Stack dump: 0. HandleCommand(command = "p b1") 1. <eof> parser at end of file 2. Parse:41:1: Generating code for declaration '$__lldb_expr' Segmentation fault (core dumped) ``` ubuntu 14.04, x64, rustc 1.18.0-nightly llvm,clang,lldb builded from master branch
A-debuginfo,T-compiler,C-bug
low
Critical
220,744,657
flutter
Would like an example of how to do lazy network fetch and caching with a ListView
This came up twice today. Once from @collinjackson (in the context of firebase storage) and once from @kleak over gitter in the context of writing a chat app with history scrolling. Seems an example showing how to do lazy fetching from a web service and wires that into an infinitely scrolling ListView with some caching. I suspect many folks would crib from such an example if we had one. (@dvdwasibi may have already written one?)
framework,f: scrolling,d: api docs,d: examples,customer: crowd,P3,team-framework,triaged-framework
low
Major
220,790,182
flutter
Make "Slow Mode" ribbon interactive, showing a message that explains what it is
Tap slow mode banner: tapping it should make a dialog appear with information about debug mode.
c: new feature,framework,from: study,P3,team-framework,triaged-framework
low
Critical
220,850,550
opencv
GPUMat is not available in Java bindings of OpenCV
<!-- If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses. If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute). This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library. --> ##### System information (version) <!-- Example - OpenCV => 3.1 - Operating System / Platform => Windows 64 Bit - Compiler => Visual Studio 2015 --> - OpenCV =>3.2.0 - Operating System / Platform =>Windows 64 Bit - Compiler =>Visual Studio 2015 ##### Detailed description <!-- your description --> There is no GpuMat class found in Java wrapper of OpenCV, ans also there is some functions which is missing in Java wrapper, .... ##### Steps to reproduce <!-- to add code example fence it with triple backticks and optional file extension ```.cpp // C++ code example ``` or attach as .txt or .zip file -->
feature,priority: low,category: gpu/cuda (contrib)
low
Critical
220,912,820
react
A number input will always have left pad 0 though parseFloat value in onChange
**Do you want to request a *feature* or report a *bug*?** bug **What is the current behavior?** I have a number input with defalut value 0 and in onChange function I'll parse value to float to avoid invalid input, but I'll always get left pad 0 on input UI. But in previouse version, my code works. **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/84v837e9/).** <input type="number" value={this.state.value} onChange={e=>this.setState({value: parseFloat(e.target.value)? parseFloat(e.target.value) : 0})} **What is the expected behavior?** Should not have left pad 0. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** react 15.5.3, all browser / all OS. It works in 15.4.2
Type: Bug,Component: DOM
medium
Critical
220,923,741
neovim
vpeekc_any() appears superfluous in nvim
`vpeekc_any()` calls `vpeekc()`, then if it gets `NUL` from it and if `typebuf.tb_len > 0` it returns `ESC` instead. The comments above this function say it's becase > * Trick: when no typeahead found, but there is something in the typeahead > * buffer, it must be an ESC that is recognized as the start of a key code. `vgetorpeek(false)` (called by `vpeekc()`) returns `NUL` if `vgetc_busy > 0 && ex_normal_busy == 0` or if there is nothing in the typebuffer and the user doesn't press a key before a timeout. `old_char` (which is the only other place `vpeekc()` looks for a character) is only set by `vungetc()`. `vungetc()` is only ever called with a character gotten from either `plain_vgetc()` or `safe_vgetc()`. Both `plain_vgetc()` `safe_vgetc()` never return `NUL`. Hence the only way replacing `vpeekc_any()` with `vpeekc()` could change behaviour, is if it's called for it's side-effect of transforming a recursive call to `vgetc()` into an `ESC`. `vpeekc_any()` is called in `ins_compl_check_keys()`, `f_getchar()`, and `command_line_changed()`, I **have not** checked whether any of these fit that case.
refactor
low
Minor
220,960,127
vscode
[folding] Folding HTML tags should hide the closing tag.
<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode --> - VSCode Version: 1.11.1 - OS Version: Windows instead of showing: < div ... > < /div> just show < div ...> when folded
feature-request,editor-folding
medium
Critical
220,984,327
go
runtime: crash in hybrid barrier initializing C memory
Received report via email of code crashing in write barrier finding a bad pointer (pointing to a free span). Code looks like: keys := (*[1 << 20]*C.char)(unsafe.Pointer(C.malloc(C.size_t(uintptr(n)) * C.size_t(unsafe.Sizeof((*C.char)(nil))))))[:0:n] values := (*[1 << 20]*C.char)(unsafe.Pointer(C.malloc(C.size_t(uintptr(n)) * C.size_t(unsafe.Sizeof((*C.char)(nil))))))[:0:n] for key, vals := range req.Header { for _, value := range vals { keys = append(keys, C.CString(key)) values = append(values, C.CString(value)) } } The problem appears to be that C.malloc returns uninitialized memory. Then the initialization of that memory during append overwrites uninitialized pointer slots, and the new hybrid write barrier tries to follow the uninitialized pointers as if they were real pointers. Prior to the hybrid barrier, the old data being overwritten for off-heap memory was never considered. Now it is. This will invalidate code like the above. It took a long time to notice, so apparently this is rare. One workaround is to make C.malloc return zeroed memory, which would have a performance cost people might not like (especially since it doesn't seem to matter to most people?). Another workaround is to tell people to use C.calloc for allocating C data structures with pointers, or maybe rewriting just the C.malloc calls that mention pointer sizes. Really the best fix would be for the GC not to follow these pointers. @aclements says there are some cases where do want the write barrier to follow pointers in non-managed-memory, specifically non-global off-heap runtime structures, but maybe we can distinguish these from other kinds of memory (like C memory) somehow. If there is a simple fix _and_ we receiver any reports of external problems along these lines, we can consider including the fix in Go 1.8.2.
NeedsInvestigation,compiler/runtime
medium
Critical
221,012,049
rust
Inconsistency in trait item resolution between `Box<Trait>` and `impl Trait`
Consider this example: ```rust #![feature(conservative_impl_trait)] // use m::Tr; mod m { pub trait Tr { fn method(&self) {} } impl Tr for u8 {} pub fn dynamic_tr() -> Box<Tr> { Box::new(0) } pub fn static_tr() -> impl Tr { 0u8 } } fn main() { m::dynamic_tr().method(); // OK m::static_tr().method(); // ERROR: no method named `method` found for type `impl m::Tr` in the current scope } ``` Here we are trying to call methods of traits that are not in scope. Typically such methods are not resolved, but there's an exception - trait objects. Trait objects are magic - when you call a method of `Trait` on a value of type `Trait` then `Trait` is automatically considered in scope (or maybe this method is treated as inherent, I haven't looked how exactly the implementation works). This is the reason why `m::dynamic_tr().method()` works. Even if this is a special case, it's a reasonable special case - if you have a value of type `Trait` in hands, you typically want to call some trait methods on it and it would be a nuisance to require `Trait` imported in scope for this. I don't know what RFC or PR introduced these exact rules, but the fact is that they are used in practice. All the logic above is applicable to `impl Trait`, but this special case doesn't apply to it and `m::static_tr().method()` reports an "unresolved method" error.
A-type-system,A-resolve,A-trait-system,T-compiler,C-bug,T-types
low
Critical
221,075,896
angular
Create system for managing global event listeners
**I'm submitting a ...** (check one with "x") ``` [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question ``` **Current behavior** Currently if one binds lots of event listeners on `document` or `window`, i.e. components/directives used via ngFor, application can crawl to a slow **Expected behavior** Binding event listeners should be simple without having to architect around performance concerns **Minimal reproduction of the problem with instructions** Warning: If running the preview, run when not afraid of browser crashing (even on the desktop) http://plnkr.co/edit/oMMi6tFR3YZMKtMqvSys?p=info **What is the motivation / use case for changing the behavior?** I believe a good opportunity lies here to have Angular optimize handling the event delegation through binding single event listeners on `document` and `window` for global events and iterating through event listeners in order to allow for simpler application design around management of global events. **Please tell us about your environment:** macOS Sierra 10.12.3 * **Angular version:** 4.0.1 * **Browser:** all * **Language:** all * **Node (for AoT issues):** `node --version` = N/A
area: core,core: event listeners,core: host and host bindings,core: change detection,needs: discussion
medium
Critical
221,104,366
flutter
Have Scaffold know how to provide a SliverAppBar to a child ListView
The usage for the current implementation of SliverAppBar is unclear. There are two different ways of populating a material appbar: ```dart new Scaffold( // 1 appBar: new AppBar(), body: new CustomScrollView( slivers: [ // 2 new SliverAppBar( title: new Text('ScrollViewContents'), floating: true, ), new SliverList( delegate: myItems0.sliverChildListDelegate(), ), ], ), ); ``` In client code, having two different ways of doing this makes code - much more difficult to maintain (bugs may happen in one page but not another b) - much harder to change between appbar models (switching requires migrating between the scrolling models instead of dropping in a different implementation) In leafy, this dual interface issue and the associated code complexity is a blocker to us adding scrollable appbar behavior.
c: new feature,framework,f: material design,f: scrolling,P3,team-design,triaged-design
medium
Critical
221,119,509
go
x/build: get Alpine builders passing
Thanks to @jessfraz's setting up an Alpine Linux builder (#17891), we now get to deal with more bugs, like this one: https://build.golang.org/log/09a1850a53ff39d403984ecc8c29114ecd0a4109 ``` --- FAIL: TestCgoPprofPIE (8.39s) crash_cgo_test.go:285: signal: segmentation fault (core dumped) FAIL FAIL runtime 16.270s ``` @ianlancetaylor?
help wanted,Builders,NeedsFix
medium
Critical
221,125,204
TypeScript
Go to Definition for Non JS/TS File Imports
<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> From https://github.com/Microsoft/vscode/issues/24276 **Issue** Users of tools such as webpack often load non js/ts assets, such as css or images, using `require` or `import`: ```js require('./main.css'); import './image.png' ... ``` Operations such as `go to definition` currently do not work on these paths **Proposal** `go to definition` on these resource paths should try to open the corresponding resource in the editor.
Suggestion,Awaiting More Feedback,VS Code Tracked,Domain: JavaScript,Domain: Symbol Navigation
high
Critical
221,137,495
flutter
Multi-step input composing range incorrectly styled on iOS
## Steps to Reproduce 1. Open *Flutter Gallery* and select the *Text field* demo. 1. Tap the *Name* field. 1. Switch to Japanese/Chinese input and begin entering text. The composing (a.k.a. mark) region is underlined, rather than appearing lightly selected. See the following screenshots: ## Current Flutter composing style ![img_1413](https://cloud.githubusercontent.com/assets/351029/24939269/fcfc5392-1ef0-11e7-9862-48be9d95e015.PNG) ## Default iOS composing style (from Google Inbox) ![img_1414](https://cloud.githubusercontent.com/assets/351029/24939276/0bdb17f4-1ef1-11e7-8a29-97103bd4fda6.PNG) ## Default iOS selection style (from Google Inbox) ![img_1415](https://cloud.githubusercontent.com/assets/351029/24939281/10af74e6-1ef1-11e7-8a9e-fa8e9bae3969.PNG) ## Flutter Doctor Running with a local engine with iOS text input patches. Base install is: ``` [✓] Flutter (on Mac OS X 10.12.4 16E195, channel master) • Flutter at /Users/cbracken/src/flutter/flutter • Framework revision c12c019bcc (6 hours ago), 2017-04-11 13:48:04 -0700 • Engine revision 5d9a642257 • Tools Dart version 1.23.0-dev.11.6 ```
a: text input,platform-ios,framework,a: internationalization,a: fidelity,has reproducible steps,P2,found in release: 3.3,found in release: 3.5,team-text-input,triaged-text-input
low
Major
221,283,594
vscode
vscode use webassembly
Vscode will use webassembly to improve the implementation of the application speed, webassembly standard is not already officially released! It seems that nodejs 8 will be the first to introduce webassembly; Hope to answer the next question, thank you, if you have caused trouble, very sorry
under-discussion
medium
Major
221,332,166
rust
GDB hardcodes startswith(producer, "clang ") to cope with LLVM debug line info in prologues.
Only observed on x86_32, see https://github.com/rust-lang/rust/pull/40367#issuecomment-293623287 and [relevant code in GDB source](https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/i386-tdep.c;hb=8f10c9323357ad190c0383f2fc9d394316447905#l1856). LLVM appears to generate the .loc` for the first LLVM IR instruction in a function *just before* the last instruction of the prologue, resulting in GDB refusing to break on that location (by file and line number). Not sure if this is solvable in GDB - perhaps by using the location information from the prologue after the prologue? Or maybe the intention is to actually never do that? It's really not clear from the GDB source. Before #40367, we used to have a branch from the LLVM IR entry block to the MIR start block, which triggered the problem, but not in an user-visible way. Subsequent instructions were and still are unaffected. As a workaround, I changed `producer` from `rustc version _` to `clang LLVM (rustc version _)`. cc @michaelwoerister @Manishearth
A-debuginfo,T-compiler,C-bug
medium
Critical
221,404,914
pytorch
Dice Loss PR
Hi, I have implemented a Dice loss function which is used in segmentation tasks, and sometimes even preferred over cross_entropy. More info in this paper: http://campar.in.tum.de/pub/milletari2016Vnet/milletari2016Vnet.pdf Here's the link of it: https://github.com/rogertrullo/pytorch/blob/rogertrullo-dice_loss/torch/nn/functional.py#L708 How could I submit a PR? thanks!
module: loss,triaged,enhancement,Stale
high
Critical