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
227,317,267
vscode
[json] use the schemastore catalog
The JSON server should use http://schemastore.org/api/json/catalog.json for schema associations
feature-request,json
medium
Major
227,345,405
kubernetes
Prevent status subresource from touching objectmeta
`/status` subresources are generally targeted updated for controllers set a logical whitelist of fields. Given the direction around creating new fields instead of abusing annotations, we should prevent the `/status` subresource from touching `ObjectMeta` fields in new resources that we add. To do this, we need to make it easy to add the restriction and add unit tests which can detect when new objectmeta fields have been added. We may be able to tighten our existing `/status` subresources on a case-by-case basis. I'd like to see new `/status` subresources start out this way. @kubernetes/api-reviewers @kubernetes/api-approvers @kubernetes/sig-api-machinery-proposals @pwittrock Once we have a utility method for doing this, could your generator start making use of it?
sig/api-machinery,priority/important-longterm,lifecycle/frozen
medium
Major
227,361,846
go
log/syslog: defaults to LOG_KERN facility
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`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/bknox/go" GORACE="" GOROOT="/home/bknox/.go" GOTOOLDIR="/home/bknox/.go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build317260052=/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? used log/syslog with defaults From the log/syslog documentation: "The Priority is a combination of the syslog facility and severity. For example, LOG_ALERT | LOG_FTP sends an alert severity message from the FTP facility. The default severity is LOG_EMERG; the default facility is LOG_KERN." From RFC3164: "The Facilities and Severities of the messages are numerically coded with decimal values. Some of the operating system daemons and processes have been assigned Facility values. Processes and daemons that have not been explicitly assigned a Facility may use any of the "local use" facilities or they may use the "user-level" Facility." LOG_KERN is a poor default, as nothing should ever be using that facility other than the kernel. LOG_USER would be a more appropriate default facility.
Documentation,NeedsDecision
low
Critical
227,375,553
kubernetes
Use meta.k8s.io/v1 for meta types like *Options and Status
We have moved *Options and Status into a meta apigroup, but do not use `meta.k8s.io/v1` as the groupversion. Instead, we either use the apigroup of the request context or "/v1" as a fall-back (like in the dynamic client, compare VersionedParameterEncoderWithV1Fallback). We should change this.
sig/api-machinery,lifecycle/frozen
low
Major
227,396,210
angular
Style bindings with gradient functions containing color functions as their colors get stripped out by the style sanitizer
**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** A style binding with a linear-gradient with the colors as rgb or rgba functions will get stripped out by the style sanitizer. **Expected behavior** They should not be stripped out. **Minimal reproduction of the problem with instructions** A style binding like this will get stripped out, ``` <div [style.background]="'linear-gradient(90deg, rgba(155, 155, 155, .5) 50%, rgba(155, 100, 155, .5) 50%)'"> </div> ``` Plunker: https://plnkr.co/edit/QouPum88elkomsSrNEld?p=preview If I get a chance, I can submit a PR myself, but if anyone picks up this issue I think just changing the RegEx pattern for [FN_ARGS in style_sanitizer.ts](https://github.com/angular/angular/blob/master/packages/platform-browser/src/security/style_sanitizer.ts#L35) to `const FN_ARGS = '\\([-0-9.%, #a-zA-Z, ' + COLOR_FNS + ']+\\)';` should work. **Please tell us about your environment:** * **Angular version:** 2.0.X Latest angular * **Browser:** Chrome, Edge, Firefox (havent tested others) * **Language:** Typescript
type: bug/fix,freq1: low,area: core,core: styling bindings,core: sanitization,P3
medium
Critical
227,468,819
TypeScript
strictNullChecks not recognizing evaluated key in object
**TypeScript Version:** 2.3.2 **Code** This version errors with strictNullChecks ```ts export interface Opts { params?: { [s: string]: string }; } let token; let options: Opts = { params: {} }; if (token) { options.params["access_token"] = token; } ``` This version does not error with strictNullChecks ```ts export interface Opts { params?: { [s: string]: string }; } let token; let options: Opts = {}; options.params = {}; if (token) { options.params["access_token"] = token; } ``` **Expected behavior:** TS should recognize that `params` has been set in the object like it already does using a differently formatted method of initializing the variable. **Actual behavior:** TS fails to recognize that params has been set.
Bug
low
Critical
227,476,256
flutter
Add a cached-ness dimension to the run timing measurements
All runs of same success-ness, same platform, same build mode, same residence-ness are clumped together. Though we would want a cache-ness dimension to the speed measurement to differentiate fresh first builds vs subsequent builds. Either split the dimensions into phases such as getting plugins, running native toolchain etc or annotate the presence of certain phases in the measurements. @jakobr-google sounds like you were referring to something specific when you said > Re: Gradle build times, we intentionally made the very first build of a project slower, in order to make subsequent builds faster. 2nd build now takes 1-2 seconds w/o changes. The vast majority of the time is spent building the Dart snapshot (on my machine, at least). Is it something I can annotate in the measurements?
c: new feature,team,tool,P3,team-tool,triaged-tool
low
Major
227,519,295
vscode
[html] Javascript intellisense in inline scripts from external references
This request is to provide intellisense capabilities for referenced script tags on inline javascript, for example: ``` <script src="myJs.js"> <script> myJs.IntellisenseGoesHere </script> ``` Ideally typings files are also supported for an even better experience I could not find an open issue on this so per @aeschli 's comment on the last ticket related to this #15377 , I am creating a new feature request here
feature-request,javascript,html
high
Critical
227,525,031
go
runtime/pprof: extend mutex profiling to select case blocking
Inspired by #20302, it'd be helpful if mutex profiling showed cases where select cases are blocked waiting to lock the various cases. Right now we have no easy way to get visibility into that.
NeedsFix,compiler/runtime
low
Minor
227,534,891
go
runtime: GC turning on/off disruptive to scheduler and locality
I generated a trace of the concurrent compiler backend, and see some unfortunate things in it. ```bash $ go tool compile -traceprofile=t.p -c=8 fmt/{doc,format,print,scan}.go $ go tool trace t.p ``` Screenshot: <img width="1559" alt="compile_fmt_trace_zoomed" src="https://cloud.githubusercontent.com/assets/67496/25877886/6c32b3be-34db-11e7-837a-8f9643054360.png"> On the left hand side of this screenshot is the beginning of concurrent backend compilation. It continues off-screen to the right. The disconcerting things I see are: * Large chunks of idle time. For example, 5 ms of idle time in proc 7 with plenty of work available to be scheduled, right when GC turns off, around 73ms. * goroutines being shuffled around between procs when GC flips on/off (the clear visual vertical lines), which is bad for data locality and caches. Should the STW phase note where Gs are and attempt to put them back there when it is done? Or some such? For reference, the concurrency (fan-out, etc.) is all contained in a single function, compileFunctions, in pgen.go: https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/pgen.go#L255 Apologies if this is a duplicate. I can split this into two issues if that would be helpful. cc @aclements @RLH
Performance,ToolSpeed,NeedsInvestigation,compiler/runtime
low
Major
227,565,400
TypeScript
Support JSDoc `@property`
_From @BrunnerLivio on May 8, 2017 9:1_ - VSCode Version: 1.12.1 - OS Version: Ubuntu 16.04.1 LTS (Xenial Xerus) Example code: MyController.js ```JavaScript // @ts-check class MyController { getWorld() { return this.world; // <--- Marked as error } } angular .module('myApp') .component('myComponent', { bindings: { 'world': '<' }, controller: MyController, template: `<div>Hello {{$ctrl.getWorld()}}</div>` }); ``` The `this.world` is marked as error, as supposed to be. But it is actually pretty annoying, because in angular you need to use quite often those component bindings. I know there's the option `// @ts-ignore`, but that really pollutes the code and makes it less readable. An extensions for this would be really useful. I use this workaround at the moment ```JavaScript // @ts-check class MyController { constructor() { this.world = this.world; } getWorld() { return this.world; } } [...] ``` I don't like this at all, but better than writing `// @ts-ignore`. Is there any other option / workaround? _Copied from original issue: Microsoft/vscode#26192_
Suggestion,Committed,Domain: JSDoc,Domain: JavaScript
low
Critical
227,582,484
flutter
Pan gesture recognizer should yield to the scale gesture recognizer
In his [reply to my question](http://stackoverflow.com/questions/43869027/gesturedetector-within-tabbarview-nested-scrolling/43876032#43876032) regarding zooming a picture inside a `TabBarView` @collinjackson suggested that: "[...] Flutter's pan gesture recognizer should probably yield to the scale gesture recognizer if it detects that a second pointer is down and a scale gesture recognizer is active." This makes sense to me, as touching the screen with two fingers probably never is intended to pan/swipe/scroll and always to pinch/zoom.
framework,d: api docs,f: gestures,c: proposal,P2,team-framework,triaged-framework
low
Major
227,598,398
vscode
Git - Support file stat mode changes
<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode --> - VSCode Version: 1.12.1 - OS Version: win7(with cygwin), and linux ubuntu Steps to Reproduce: If I change filestat modes on files aka "chmod ugo-x dsfmocklist.py" vsc indicated diff, but it does not say anywhere that this is the case. Discard changes do nothing either Enclosed is a screenshot the M flag is set, but I cant see any changes, not any description execution bit having changed. ![vsc-diff-on identical-file](https://cloud.githubusercontent.com/assets/11349883/25888050/dec46df8-3564-11e7-97a1-ad8dab310c5b.jpg) plain git diff shows this (in cygwin on same dir) mobj@BPOLMOBJ1:tools> git diff dsfmocklist.py diff --git a/tools/dsfmocklist.py b/tools/dsfmocklist.py old mode 100755 new mode 100644 git --version git version 2.8.3 Bitbucket after commit and push shows this: ![vsc_changes-exec](https://cloud.githubusercontent.com/assets/11349883/25888339/0e0e20a8-3566-11e7-808e-92552007d5b7.jpg)
feature-request,git
low
Minor
227,633,996
angular
ng-if on root elements of projected content fails to render on initialisation
**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** When developing a hybrid app with ngUpgrade, If you have an AngularJS component that contains a downgraded Angular Component in the template and this one implements content projection and wraps the `ng-content` element in an element that contains the `*ngIf` directive. Any root element of the AngularJS content that has the `ng-if` directive attribute will not be rendered until you re-toggle the property or expression bound to the attribute. **Expected behavior** The content is correctly projected and all directives properly evaluated without having to add extra wrapping elements. **Minimal reproduction of the problem with instructions** [Plunker with examples](https://plnkr.co/edit/ogPxZ11S82FsTdFdRwuf?p=preview) _Example 1_ When using an Angular component that contains content projection within an AngularJS component, any root elements of the projected content that contain `ng-if` will fail to render on initialisation but by toggling the `ng-if` value they will then render correctly as per the evaluated value of the `ng-if`. _Example 2_ When using an Angular component that contains content projection within an AngularJS component, any root elements of the projected content that contain `ng-if` will fail to render on initialisation, but by adding an element at the root of the projected content without `ng-if`, they will then render correctly. _Example 3_ When using an Angular component that contains content projection within an AngularJS component, any root elements of the projected content that contain `ng-if` will fail to render on initialisation, but by removing the `*ngIf` on any parent elements of the Angular component will make it then render correctly. **What is the motivation / use case for changing the behavior?** So that AngularJS content that contain `ng-if` on root elements of the content to be projected can be be correctly projected into Angular components that contain `*ngIf` on any parents of the `ng-content`. **Please tell us about your environment:** OS: Windows 10 * **Angular version:** 4.1.0 * **AngularJS version:** 1.6.1 * **Browser:** All * **Language:** TypeScript 2.2.0
type: bug/fix,effort1: hours,freq1: low,area: upgrade,state: confirmed,P4
low
Critical
227,732,019
TypeScript
noImplicitReturnType [Suggestion]
We have `noImplicitReturns` which is great and helps tick up silly mistakes but it woud great to have `noImplicitReturnType` as well. **So what would `noImplicitReturnType` do?** Currently we can write a function like so: ```ts function life () { return 42; } let x = life(); // Number ``` So all is great, TypeScript works out the return type nicely for us. ```ts function life (x: boolean) { if (x) { return 'hi'; } else { return 42; } } let y = life(true); // Number / String ``` This is where things start to go a little crazy. TypeScript records y as of type `number | string` which is of course acurate. But what if i wanted this function to only return strings? We already have support for that with limited modifications ```ts function life (x: boolean): string { if (x) { return 'hi'; } else { return 42; // Type '42' is not assignable to type 'string'. } } let y = life(true); ``` And as a result TypeScript nicly throws an error. So my suggestion is that in much the same way as with `noImplicitAny` and `let` enforcing strict typeing an argument is added in the form of `noImplicitReturnType` which for my first example (only a single return) wouldn't have any effect but for the second would throw an error instead of typing the function as `number | string`
Suggestion,In Discussion
low
Critical
227,795,636
pytorch
[feature request] Caching allocator diagnostics and memory allocation tracing/visualization
Would be cool to peek into the state of the caching allocator on things like: - [x] Total cached memory - [x] Total currently used memory, referenced by Tensors - [x] Forced free of unused segments - [ ] Tracing of memory allocations (along with some measure of fragmentation) and deallocations (both logical and physical). Would be useful for custom anasysis scripts and for understanding a reason of OOM (fragmentation or actual lack of memory) - [ ] Stats about currently existing tensors (if possible, otherwise with a full trace one implement this post-hoc): type, sizes, gpu device. if we had a way to dump timestamp of allocation, would be cool too (would allow to track sort of reliably memory leaks) - [ ] Dump information of all existing tensors / storages with refcounts, so that an easy vis of fragmentation can be done (hopefully with annotation of what required them for backward) - [ ] Built-in minimal tool for visualization of used memory (cached memory / used memory) into an SVG/HTML string - [ ] Arena allocators (memfree in one go, optionally mempreallocation in one go with upper memlimit, configurable block sizes, per-allocator stats on existing tensors referencing memory, optional support for CUDA Unified Memory) With caching allocaotr it's hard to understand sometimes what's happening with memory since after some big allocations / deallocations memory on nvidia-smi always stays high and doesn't reflect actual usage.
feature,module: memory usage,triaged
medium
Critical
227,803,227
neovim
Rendering bug when nvim_eval request received during typing multiline prompt
- `nvim --version`: 33ca9f711e9a80df8edfc3e5c7519fb5fb7fff2b - Vim (version: ) behaves differently? not applicable - Operating system/version: Gentoo linux - Terminal name/version: not applicable, functional tests’ environment ### Steps to reproduce Consider the following tests put inside `test/functional/eval/input_spec.lua`, run with 5x25 screen from #6480: ```lua it('very long command', function() feed([[:oaethusoetanh unsoeaht unsoeaht uoesah utoeansu hoeatnsuh snoaehu ntoeahu saoeth unaoe]]) screen:snapshot_util() helpers.wait() screen:snapshot_util() end) it('two-line command', function() feed([[:oaethusoetanh unsoeaht unsoeaht ]]) screen:snapshot_util() helpers.wait() screen:snapshot_util() end) ``` ### Actual behaviour ```lua -- Results from the first test: -- Normal: screen:expect([[ {EOB:~ }| :oaethusoetanh unsoeaht u| nsoeaht uoesah utoeansu h| oeatnsuh snoaehu ntoeahu | saoeth unaoe^ | ]]) -- After wait: screen:expect([[ :oaethusoetanh unsoeaht u| nsoeaht uoesah utoeansu h| oeatnsuh snoaehu ntoeahu | :oaethusoetanh unsoeaht u| nsoeaht uoes^ah utoeansu | ]]) -- Results from the second test: -- Normal: screen:expect([[ {EOB:~ }| {EOB:~ }| {EOB:~ }| :oaethusoetanh unsoeaht u| nsoeaht ^ | ]]) -- After wait: screen:expect([[ {EOB:~ }| {EOB:~ }| :oaethusoetanh unsoeaht u| :oaethusoetanh unsoeaht u| nsoeaht ^ | ]]) ``` ### Expected behaviour No changes between “Normal” and “After wait” results: all `wait()` is doing is sending one `nvim_eval('1')` request. If I am not mistaking, this should be a valid request from some remote plugin which may come at any time. Found when exploring my workarounds for #6480. --- BTW, here are results for completely not fitting command: ```lua it('not fitting command', function() feed([[:oaethusoetanh unsoeaht unsoeaht uoesah utoeansu hoeatnsuh snoaehu ntoeahu saoeth unaoeouoaenuoetans unsoeah uoeasntu hoeatnsu hnoeashu oeahus eohatnu htnsoeahtu oeatnshu htoeahtsun oeathnsuoehtns htnsuoaetns uhoeatuhtns eoahtnsau hnaoesuhsnt ao]]) screen:snapshot_util() helpers.wait() screen:snapshot_util() end) -- Normal: screen:expect([[ :oaethusoetanh unsoeaht u| nsoeaht uoesah utoeansu h| oeatnsuh snoaehu ntoeahu | saoeth unaoeouoaenuoetans| unsoeah uoeasntu hoeatn^ | ]]) -- After wait: screen:expect([[ :oaethusoetanh unsoeaht u| nsoeaht uoesah utoeansu h| oeatnsuh snoaehu ntoeahu | saoeth unaoeouoaenuoetans| :oaethusoetanh unsoeaht ^ | ]]) ``` I would not say that either “Normal” or “After wait” results are particularly good, but not sure whether it is worth fixing. I never had such long commands, but I did have written multiline commands.
bug,channels-rpc,event-loop,display
low
Critical
227,834,141
go
cmd/compile: inlining isn't performed on generated init functions
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? go version devel +c061f51 Wed May 10 20:19:50 2017 +0000 linux/amd64 ### What operating system and processor architecture are you using (`go env`)? amd64/linux ### What did you do? ``` package main import "fmt" func double(x int) int { return x * 2 } var Y = []int{double(1), double(2), double(3)} func main() { fmt.Println(Y[0]) } ``` ``` $ go build -gcflags="-m" -o test test.go && go tool objdump -s main.init test # command-line-arguments ./test.go:5:6: can inline double ./test.go:12:15: Y[0] escapes to heap ./test.go:12:13: main ... argument does not escape TEXT main.init(SB) <autogenerated> <autogenerated>:1 0x481700 64488b0c25f8ffffff MOVQ FS:0xfffffff8, CX <autogenerated>:1 0x481709 483b6110 CMPQ 0x10(CX), SP <autogenerated>:1 0x48170d 0f8694000000 JBE 0x4817a7 <autogenerated>:1 0x481713 4883ec18 SUBQ $0x18, SP <autogenerated>:1 0x481717 48896c2410 MOVQ BP, 0x10(SP) <autogenerated>:1 0x48171c 488d6c2410 LEAQ 0x10(SP), BP <autogenerated>:1 0x481721 0fb605bcd80a00 MOVZX 0xad8bc(IP), AX <autogenerated>:1 0x481728 3c01 CMPL $0x1, AL <autogenerated>:1 0x48172a 760a JBE 0x481736 <autogenerated>:1 0x48172c 488b6c2410 MOVQ 0x10(SP), BP <autogenerated>:1 0x481731 4883c418 ADDQ $0x18, SP <autogenerated>:1 0x481735 c3 RET <autogenerated>:1 0x481736 7507 JNE 0x48173f <autogenerated>:1 0x481738 e80344faff CALL runtime.throwinit(SB) <autogenerated>:1 0x48173d 0f0b UD2 <autogenerated>:1 0x48173f c6059ed80a0001 MOVB $0x1, 0xad89e(IP) <autogenerated>:1 0x481746 e895fcffff CALL fmt.init(SB) test.go:9 0x48174b 48c7042401000000 MOVQ $0x1, 0(SP) test.go:9 0x481753 e8e8feffff CALL main.double(SB) test.go:9 0x481758 488b442408 MOVQ 0x8(SP), AX test.go:9 0x48175d 488905acda0a00 MOVQ AX, 0xadaac(IP) test.go:9 0x481764 48c7042402000000 MOVQ $0x2, 0(SP) test.go:9 0x48176c e8cffeffff CALL main.double(SB) test.go:9 0x481771 488b442408 MOVQ 0x8(SP), AX test.go:9 0x481776 4889059bda0a00 MOVQ AX, 0xada9b(IP) test.go:9 0x48177d 48c7042403000000 MOVQ $0x3, 0(SP) test.go:9 0x481785 e8b6feffff CALL main.double(SB) test.go:9 0x48178a 488b442408 MOVQ 0x8(SP), AX test.go:9 0x48178f 4889058ada0a00 MOVQ AX, 0xada8a(IP) <autogenerated>:1 0x481796 c60547d80a0002 MOVB $0x2, 0xad847(IP) <autogenerated>:1 0x48179d 488b6c2410 MOVQ 0x10(SP), BP <autogenerated>:1 0x4817a2 4883c418 ADDQ $0x18, SP <autogenerated>:1 0x4817a6 c3 RET <autogenerated>:1 0x4817a7 e8e4d1fcff CALL runtime.morestack_noctxt(SB) <autogenerated>:1 0x4817ac e94fffffff JMP main.init(SB) ``` ### What did you expect to see? No calls to main.double
early-in-cycle,compiler/runtime
low
Major
227,840,957
react
[RFC] onChange -> onInput, and don't polyfill onInput for uncontrolled components
`onChange` is a nicer name for what `onInput` does and the fact that it has propagated up to other high-level components as the default name is much nicer than `onInput` as a high level event name. Generally it has been helpful for the many new-comers to React that don't know the DOM well (which is a lot more than the inverse). However, that doesn't change the fact that it can be confusing for people that are familiar. Unfortunately, changing it now would cause confusion for everyone that already knows React. The reason I'd like to change it now is because I'd like to get away from polyfilling it for __uncontrolled__ components. This use case is filled with all kinds of imperative code which leads to edge cases. E.g. reading/setting `e.target.value` or reading/setting `ref.value`. When you use __controlled__ components you shouldn't need to touch them imperatively and therefore won't hit the edge cases. Ideally we should get away from reading from `e.target.value` and instead just pass the `value` directly to the event handler. ## Proposal: __Controlled Components__ - `onInput`: Polyfilled and works like `onChange` does today. It is allowed to over-fire many events even if nothing changed. May have special Fiber rules regarding synchronous flushing. _Optional: Pass `value` as second arg._ - `onChange`: Works like `onInput` for one version but warns about being deprecated and suggests switching to `onInput`. In next version it works like the browser but still warns and tells you to use `onInput` forever. _Optional: Add a getter/setter on DOM `.value` in development mode and warn if this is used directly._ __Uncontrolled Components__ - `onInput`: Not polyfilled. Works however the browser works. Warns about browser differences if you don't also specify `onClick`, `onKeyDown` and/or `onKeyUp`. The warnings suggests implementing those listeners to cover more edge cases, or switch to a controlled component. - `onChange`: Not polyfilled. Works however the browser works.
Component: DOM,Type: Discussion,Type: Breaking Change,React Core Team
medium
Critical
227,854,071
flutter
Plugins could avoid warnings by installing UIApplicationDelegate methods dynamically
### Issue about warning message on console https://github.com/flutter/engine/pull/8843 Right now iOS apps have the following in their logs: > You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist. A possible improvement would be to avoid implementing that method directly, and instead only add an implementation using `class_addMethod` if we detect that it's needed for registered plugins. If no plugin implements `application:didReceiveRemoteNotification:fetchCompletionHandler:` then `FlutterAppDelegate` wouldn't implement it either, and thus would avoid the warning. The same could be done for other `UIApplicationDelegate` methods as well. /cc @mravn-google @szakarias @jakobr-google @mit-mit @Hixie @goderbauer ------------------------------------------------------------------------------------------------------------------------ Edited by cyanglaz: _The original issue mentioned above has been fixed with https://github.com/flutter/engine/pull/8843. However, there is a related but different issue regarding receiving email warning from Apple when uploading builds. I have summarized the discussions and works related to it in below section for easier understanding the bug and where we are at:_ ### Issue about warning email from Apple When uploading a Flutter App to Apple, one might receive an warning Email like below: ``` Dear Developer,We identified one or more issues with a recent delivery for your app, "Flutter Gallery". Your delivery was successful, but you may wish to correct the following issues in your next delivery:Missing Push Notification Entitlement - Your app appears to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the "aps-environment" entitlement. Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor's Capabilities pane, or manually add the entitlement to your entitlements file. For more information, see https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1.After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.Best regards,The App Store Team ``` Although this warning doesn't block releasing Apps, this warning is annoying and confusing for Flutter Apps that doesn't use push notifications. ### Steps to reproduce 1. You need to have a valid Apple Distribution certs and private keys installed on your computer. 1. Create a new Flutter App. Build it for iOS with `flutter build ios`, or `flutter build ios --local-engine=ios_release` local engine build. 1. With the Apple Distribution account, upload the App to App Store Connect. You can follow the steps here: https://help.apple.com/xcode/mac/current/#/dev442d7f2ca 1. After a successful upload, you will see an email with a message similar to above. ### Workaround To not receiving this email anymore, you can workaround by enabling publish notification in your App. (You don't have to implement any publish notification features, just simply enable the feature and capability will suppress the warning.) ### Cause The root cause of this issue is the appearance of [[application:didRegisterForRemoteNotificationsWithDeviceToken:]](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622958-application?language=objc) in the engine code base is the cause of the email warning in https://github.com/flutter/flutter/issues/9984#issuecomment-405380407. Either directly implement this method, or dynamically implement this method with a similar solution in https://github.com/flutter/engine/pull/8843 (which only mentioning this method with a @selector syntax) triggers this warning email.
platform-ios,engine,a: annoyance,P2,a: plugins,team-ios,triaged-ios
low
Critical
227,865,992
youtube-dl
Cannot download YouTube Red video because TFA rejected
## 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.05.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.05.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 ```): ``` C:\Users\MYUSER>youtube-dl https://www.youtube.com/watch?v=PpG0z-npFIY -v [debug] System config: [] [debug] User config: ['-o', '~/Downloads/youtube-dl/%(uploader)s/%(uploader)s - %(upload_date)s - %(title)s.%(ext)s', '-f', 'bestvideo[height<=2500]+bestaudio', '--write-sub', '-w', '--write-thumbnail', '--download-archive', 'C:\\Users\\MYUSER\\Dropbox\\Misc\\youtube-dl_archive.txt', '-R', '20', '-u', 'PRIVATE', '-p', 'PRIVATE'] [debug] Custom config: [] [debug] Command-line args: ['https://www.youtube.com/watch?v=PpG0z-npFIY', '-v'] [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252 [debug] youtube-dl version 2017.05.09 [debug] Python version 3.4.4 - Windows-10-10.0.15063 [debug] exe versions: none [debug] Proxy map: {} [youtube] Downloading login page [youtube] Looking up account info [youtube] Logging in Type 2-step verification code and press [Return]: [youtube] Submitting TFA code WARNING: Unable to submit TFA code: HTTP Error 500: Internal Server Error WARNING: Unable to extract CheckCookie URL [youtube] PpG0z-npFIY: Downloading webpage [youtube] I6DKmXrC7YE: Downloading webpage [youtube] I6DKmXrC7YE: Downloading video info webpage [youtube] I6DKmXrC7YE: Extracting video information [youtube] {22} signature length 40.43, html5 player vfljmjb-X [youtube] I6DKmXrC7YE: Downloading player https://www.youtube.com/yts/jsbin/player-vfljmjb-X/en_US/base.js [youtube] {43} signature length 40.43, html5 player vfljmjb-X [youtube] {18} signature length 40.43, html5 player vfljmjb-X [youtube] {36} signature length 40.43, html5 player vfljmjb-X [youtube] {17} signature length 40.43, html5 player vfljmjb-X [youtube] {137} signature length 38.43, html5 player vfljmjb-X [youtube] I6DKmXrC7YE: Downloading player https://www.youtube.com/yts/jsbin/player-vfljmjb-X/en_US/base.js [youtube] {248} signature length 40.43, html5 player vfljmjb-X [youtube] {136} signature length 40.43, html5 player vfljmjb-X [youtube] {247} signature length 40.43, html5 player vfljmjb-X [youtube] {135} signature length 40.43, html5 player vfljmjb-X [youtube] {244} signature length 40.43, html5 player vfljmjb-X [youtube] {134} signature length 40.43, html5 player vfljmjb-X [youtube] {243} signature length 40.43, html5 player vfljmjb-X [youtube] {133} signature length 40.43, html5 player vfljmjb-X [youtube] {242} signature length 40.43, html5 player vfljmjb-X [youtube] {160} signature length 40.43, html5 player vfljmjb-X [youtube] {278} signature length 40.43, html5 player vfljmjb-X [youtube] {140} signature length 40.43, html5 player vfljmjb-X [youtube] {171} signature length 40.43, html5 player vfljmjb-X [youtube] {249} signature length 40.43, html5 player vfljmjb-X [youtube] {250} signature length 40.43, html5 player vfljmjb-X [youtube] {251} signature length 40.43, html5 player vfljmjb-X [youtube] I6DKmXrC7YE: Downloading player https://www.youtube.com/yts/jsbin/player-vfljmjb-X/en_US/base.js [youtube] I6DKmXrC7YE: Downloading MPD manifest WARNING: [youtube] I6DKmXrC7YE: Skipping DASH manifest: ExtractorError('Failed to download MPD manifest: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.',) [info] Writing video subtitles to: C:\Users\MYUSER\Downloads\youtube-dl\vlogbrothers\vlogbrothers - 20170427 - Kedi - Free Preview.en.vtt [youtube] I6DKmXrC7YE: Downloading thumbnail ... [youtube] I6DKmXrC7YE: Writing thumbnail to: C:\Users\MYUSER\Downloads\youtube-dl\vlogbrothers\vlogbrothers - 20170427 - Kedi - Free Preview.jpg WARNING: You have requested multiple formats but ffmpeg or avconv are not installed. The formats won't be merged. WARNING: Requested formats are incompatible for merge and will be merged into mkv. [debug] Invoking downloader on 'https://r6---sn-n4v7sn7z.googlevideo.com/videoplayback?clen=45162081&ip=71.93.87.21&usequic=no&ms=au&mt=1494471327&dur=132.757&mv=m&gir=yes&mm=31&ipbits=0&mn=sn-n4v7sn7z&initcwndbps=1181250&expire=1494493025&sparams=clen%2Cdur%2Cei%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cupn%2Cusequic%2Cexpire&ei=AdMTWdaYB4vH-AOtn6zYBA&itag=137&beids=%5B9466592%5D&mime=video%2Fmp4&pl=19&source=youtube&key=yt6&upn=0bosdK8oW2M&id=o-AIxDEQzyDsvaNSqeU9soVSh4DCT9MvgzrWBpNf3posPw&lmt=1493318750715618&requiressl=yes&gcr=us&keepalive=yes&signature=506FE07B9E19E6235481387DEA698FADFB5DD6.D45692D8787A9C2CFDD9D80BF05C61C3E1D8E42F&ratebypass=yes' [download] Destination: C:\Users\MYUSER\Downloads\youtube-dl\vlogbrothers\vlogbrothers - 20170427 - Kedi - Free Preview.f137.mp4 [download] 4.6% of 43.07MiB at 3.75MiB/s ETA 00:10 ERROR: Interrupted by user <end of log> ``` --- ### Description of your *issue*, suggested solution and other information Hi, youtube-dl is now rejecting my attempts to enter my two-factor code, making me unable to download a YouTube Red video. I add my username and password to my config file, and youtube-dl correctly asks for my two-factor, but it rejects it every time with the "HTTP Error 500: Internal Server Error" error. I have tried doing this on a separate computer with a separate internet connection, and I have tried using both my Authy token and a backup code token. I have also tried it manually without using any config file. This worked several months ago, so maybe something changed on the app's end or youtube's end? Thx!
cant-reproduce
low
Critical
227,919,871
rust
Collision of Borrow::borrow() and RefCell::borrow()
The trait `std::borrow::Borrow` and type `std::rc::RefCell` both have a method `borrow()`. This leads to ambiguity, possibly hard-to-understand errors and most importantly breaking unrelated code by adding `use std::borrow::Borrow;`. Consider the following code: ```rust use std::rc::Rc; use std::cell::RefCell; // Uncommenting causes compile error //use std::borrow::Borrow; pub struct S { flag : bool } type SCell = Rc<RefCell<S>>; fn main() { // Type annotations just for clarity let s : SCell = Rc::new(RefCell::new(S {flag: false})); let sb : &S = &s.borrow(); println!("{:?}", sb.flag); } ``` [(Rust playground link)](https://play.rust-lang.org/?gist=261852bc9a7c357851f32b4f858209f3&version=stable&backtrace=0) This code compiles and works as intended. But when you add `use std::borrow::Borrow;`, the compiler complains: ``` rustc 1.17.0 (56124baa9 2017-04-24) error[E0277]: the trait bound `std::rc::Rc<std::cell::RefCell<S>>: std::borrow::Borrow<S>` is not satisfied --> <anon>:13:21 | 13 | let sb: &S = &s.borrow(); | ^^^^^^ the trait `std::borrow::Borrow<S>` is not implemented for `std::rc::Rc<std::cell::RefCell<S>>` | = help: the following implementations were found: <std::rc::Rc<T> as std::borrow::Borrow<T>> ``` The problem is that the method call `s.borrow()` is applied to `Rc` which is an instance of `Borrow` rather than to the contained `RefCell` as intended (and as working in the example above), and the error just complains that this borrow is not possible (which is fine). This is mentioned by @spirali in related #41865, but this issue deals with a different part of the problem. (Namely that if you remove the type annotation from `let sb : &S = ...`, the error message will complain about ambiguity of the `Borrow::borrow()` return type in a confusing way.) I would propose to change the method name for `RefCell::borrow` to something else (a painful change, but leaving such bugs around things implementing the `Deref` trait might be even worse for the language long-term) and avoid this naming collisions whenever possible (is there a guideline for that?). Any other solutions?
C-enhancement,A-diagnostics,T-compiler
medium
Critical
227,926,398
kubernetes
Refactor hollow-node into hollow-kubelet and hollow-proxy & make them config-driven
Currently it's a mess having the same file for both hollow- kubelet and proxy that morphs into one or the other based on a flag. - This should be refactored into separate files for each. - Define the right set of configs/flags for either and not take everything together. - Move almost all logic in hollow-node.go to hollow-kubelet.go and hollow-proxy.go, so we have useful libraries for them. cc @wojtek-t @gmarek
priority/backlog,kind/cleanup,sig/scalability,lifecycle/frozen
low
Minor
227,958,200
go
net: IPv6 lookup fails when IPv4 hosts entry is present
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? ``` go version go1.6 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/luke/work" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GO15VENDOREXPERIMENT="1" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0" CXX="g++" CGO_ENABLED="1" ``` ### What did you do? Add a IPv4 entry to the host file for example.com (do not add an IPv6 entry): ``` $ grep example.com /etc/hosts 1.2.3.4 example.com ``` Run the following code: ``` package main import ( "fmt" "net" ) func main() { fmt.Println(net.ResolveIPAddr("ip6", "example.com")) } ``` ### What did you expect to see? When explicitly requesting an IPv6 address you should be returned an IPv6 if available via DNS even if there is an IPv4 address in the hosts file. ### What did you see instead? No addresses were returned: ``` $ GODEBUG=netdns=go go run dns.go <nil> no suitable address found ``` ``` $ GODEBUG=netdns=cgo go run dns.go <nil> no suitable address found ``` This is because the request is passed from ipsock without specifying the desired address family: https://github.com/golang/go/blob/master/src/net/ipsock.go#L259 Then dnsclient_unix performs a lookup against hosts, it finds an entry (IPv4 in this case) then returns this: https://github.com/golang/go/blob/master/src/net/dnsclient_unix.go#L491-L494 ipsock then filters the returned addresses and only returns the IPs of the requested family: https://github.com/golang/go/blob/master/src/net/ipsock.go#L265-L272
help wanted,NeedsFix
low
Critical
228,103,615
flutter
Test for API stability
We should create a test that checks out the Gallery (or some other representative app that uses lots of our APIs, but this seems like the best we have today) for each past release, then tries to run its tests against the tip of tree.
a: tests,framework,c: API break,P3,team-framework,triaged-framework
low
Minor
228,138,755
bitcoin
Add "effective fee rate" in rpc's mempool entries
For both `getrawmempool true` and `getmempoolentry` it should probably have a field `effectivefeerate`. Where as "effective fee rate" is defined as what miners sort transactions by (when taking into consideration the whole CPFP stuff). I need this field for when trying to create my own CPFP transactions, but it's quite difficult to calculate myself (especially as the mempool entries don't have a "dependants" field, so you need to dump the whole mempool, which currently takes me about ~26 seconds alone). -- This is useful for when trying to do something like CPFP as you want to know the pre-existing fee rate. The term I use in my code that deals with this is "transaction cluster" which might make a decent term. It could expose a "clusterSize" and "clusterFee" so you can calculate the feerate (as well as know the total size of the cluster)
RPC/REST/ZMQ
low
Major
228,214,362
react-native
Click and hold to select text using a text component
### Description I want click-and-hold-to-select-text using a Text component and then i searched it and i found `selectable` property.It good works but it copy the entire text field.I want to selecting a subset of the text field for copying.Actually this question is asked on stackoverflow .Here is question on stackoverflow:http://stackoverflow.com/a/37119619/4596143 ### Reproduction Steps and Sample Code I try this code block: ``` <Text selectable={true} style={styles.messageBody}> {"text description"} </Text> ``` This full of text ("text description") can copy not partially .I want to it like screenshot **Actual behaviour:** ![image](https://cloud.githubusercontent.com/assets/5556159/25989281/277d68a6-3704-11e7-9b78-59b9590da818.png) **Expected behavior:** ![image](https://cloud.githubusercontent.com/assets/5556159/25989290/2d178d46-3704-11e7-9415-9bf76e7d1b2a.png) ### Solution They are said that RN 0.39 adds support to copy the entire text field, but does not yet include support for selecting a subset of the text field for copying on stackoverflow .I wonder `Text` component include support for selecting a subset of the text field for copying on new versions for react native.If the property does not exist on new versions ,will the property for text integrate ? ### Additional Information - React Native version:^0.43 - Platform: IOS - Development Operating System: macOS
Resolution: Locked
high
Critical
228,291,987
rust
`:vis` matcher can't parse EOF
# Observed behavior The code below leads to parse error in `rustc 1.19.0-nightly (e40beb3af 2017-05-11)`. ```rust #![feature(macro_vis_matcher)] macro_rules! foo { ($v:vis) => {} } fn main() { foo!(); //~ ERROR unexpected end of macro invocation foo!(pub(in self)); } ``` # Expected behavior `foo!()` is expanded correctly.
A-macros,T-lang,C-bug
low
Critical
228,351,524
flutter
Refactor FormField into separate abstract and concrete classes
Right now `TextFormField` extends `FormField` and that's the only place in Flutter where a class extends a concrete subclass of `StatefulWidget`. We should take the parts of `FormField` that `TextFormField` uses and refactor them into an abstract subclass of `StatefulWidget` that they both extend. /cc @xster @abarth
a: text input,c: new feature,framework,c: API break,c: proposal,P3,team-text-input,triaged-text-input
low
Major
228,408,118
go
cmd/link: fails once more than one function of a .syso file is called
### What version of Go are you using (`go version`)? `go version go1.8.1 linux/amd64` ### What operating system and processor architecture are you using (`go env`)? ``` GOARCH="arm64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/michael/go" GORACE="" GOROOT="/home/michael/go1.8.1" GOTOOLDIR="/home/michael/go1.8.1/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" GOGCCFLAGS="-fPIC -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build551212718=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="0" 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? ``` $ head -50 multiple.go both_arm64.s both_arm64.S ==> multiple.go <== package main func asm1() func asm2() func main() { asm1() asm2() } ==> both_arm64.s <== TEXT ·asm1(SB),$0-0 JMP asm1ext(SB) TEXT ·asm2(SB),$0-0 JMP asm2ext(SB) ==> both_arm64.S <== .text .global asm1ext asm1ext: ret .global asm2ext asm2ext: ret ``` ``` $ aarch64-linux-gnu-gcc -c -O0 -fPIC -no-pie -o both_arm64.syso both_arm64.S $ GOARCH=arm64 go build ``` The issue is reproducible using `gcc` on an `arm64` machine to build the `.syso` file. ### What did you expect to see? The program should build. Removing either the call to `asm1` or `asm2` in the `.go` file makes it build. Removing either the `JMP asm1ext(SB)` or the `JMP asm2ext(SB)` makes it build. Adding `NOSPLIT` to both `asm1` and `asm2` doesn’t help either. ### What did you see instead? ``` $ GOARCH=arm64 go build # multiple-syso asm2ext: call to external function ```
NeedsInvestigation,compiler/runtime
low
Critical
228,417,337
vscode
Find in Files "files to include" override .gitignore
VSCode 1.12: I have a TypeScript project with a `src` folder and a `.gitignore` file containing this: ``` /src/**/*.js ``` If I search for something, it is OK with 'files to include' is empty: ![image](https://cloud.githubusercontent.com/assets/101152/26018250/f378953e-376d-11e7-9e6d-cc61369f10cd.png) but it is not OK if I scope the search: ![image](https://cloud.githubusercontent.com/assets/101152/26018286/2c8b59f6-376e-11e7-8a14-284fce7f5d61.png) While I'm searching only in some sup-tree of my project, all .gitignore rules should still be taken into account.
feature-request,search,upstream-issue-linked
high
Critical
228,422,889
rust
Incorrect suggestion in error when accessing field on raw pointer
When compiling this code: ```rust struct A { n: i32 } struct B { n: i32 } fn main() { let x = A{n:3}; let a = &x as *const _; unsafe { println!("{}", (a as *const B).n); } } ``` You get the following error message: ``` error: no field `n` on type `*const B` --> <anon>:11:45 | 11 | unsafe { println!("{}", (a as *const B).n); } | ^ | = note: `a as *const B` is a native pointer; perhaps you need to deref with `(*a as *const B).n` ``` The suggested deref `(*a as *const B)` doesn't work, what you need to write is `(*(a as *const B))`.
A-diagnostics,T-compiler,C-bug
low
Critical
228,434,733
go
runtime: select on a shared channel is slow with many Ps
@tombergan and I have been debugging a severe performance regression that Kubernetes observed when switching from Go 1.7 to Go 1.8. The problem ended up being the addition of `net/http.Server.Shutdown` that's currently implemented by closing a channel that all the open connections select on. (Details in https://github.com/kubernetes/kubernetes/issues/45216 and https://github.com/golang/go/issues/20302) But the short summary is: ```go package selbench import "testing" func BenchmarkSelectShared(b *testing.B) { idleShared := make(chan struct{}) b.RunParallel(func(pb *testing.PB) { ch := make(chan int, 1) for pb.Next() { select { case ch <- 1: case <-ch: case <-idleShared: } } }) } func BenchmarkSelectPrivate(b *testing.B) { b.RunParallel(func(pb *testing.PB) { ch := make(chan int, 1) idlePrivate := make(chan struct{}) for pb.Next() { select { case ch <- 1: case <-ch: case <-idlePrivate: } } }) } ``` Note that the idle channels below are never closed and are never selectable, but the other two are, and stay busy. But when the channel is private to the goroutine (uncontended), things are fast. When it's a shared channel, things are slow. ``` $ go test -v -bench=Select -cpu=1,2,4,8,16,32,64 BenchmarkSelectShared 10000000 194 ns/op BenchmarkSelectShared-2 10000000 147 ns/op BenchmarkSelectShared-4 5000000 395 ns/op BenchmarkSelectShared-8 3000000 449 ns/op BenchmarkSelectShared-16 5000000 354 ns/op BenchmarkSelectShared-32 5000000 320 ns/op BenchmarkSelectShared-64 5000000 296 ns/op BenchmarkSelectPrivate 10000000 192 ns/op BenchmarkSelectPrivate-2 20000000 98.0 ns/op BenchmarkSelectPrivate-4 30000000 49.3 ns/op BenchmarkSelectPrivate-8 50000000 25.5 ns/op BenchmarkSelectPrivate-16 100000000 13.8 ns/op BenchmarkSelectPrivate-32 200000000 7.07 ns/op BenchmarkSelectPrivate-64 200000000 6.31 ns/op ``` Are there any optimizations to be done here? We'll work around it in the meantime and generally keep this in mind as an anti-pattern for performance. /cc @aclements @randall77 @ianlancetaylor @rsc @josharian @mdempsky
Performance,compiler/runtime,Scalability
medium
Critical
228,439,498
rust
"consider adding an explicit lifetime bound `R: 'static" suggestion is misleading
Consider an (incorrect) code: ```rs trait Foo {} struct Bar<R>(R); impl<R> Foo for Bar<R> { } fn bb<R>(r: R) -> Box<Foo> { Box::new(Bar(r)) } fn main() { let a = 10; let _b = bb(&a); } ``` Rustc suggests: ``` consider adding an explicit lifetime bound `R: 'static` ``` This suggestion `R: 'static` is not good enough, code still won't compile. The problem is that suggestion is misleading, because proper fix should be ``` fn bb<'r, R : 'r>(r: R) -> Box<Foo + 'r> { ... } ``` People who don't understand lifetimes well (like me), could stuck after adding `'static` bound. So better suggestion could be something like: ``` consider adding an explicit lifetime bound `R: 'static`, or lifetime parameter `<'r, R: 'r> ... -> ... Trait + 'r` ``` or do not mention `'static` at all: ``` consider adding an explicit lifetime bound to `R` ``` And also, I think, E0310 could have an example with non-static lifetime bound.
C-enhancement,A-diagnostics,A-lifetimes,T-compiler,A-suggestion-diagnostics,D-newcomer-roadblock,D-invalid-suggestion,A-trait-objects
low
Major
228,478,772
go
cmd/compile: trim more blocks?
In ssa/trim.go, func emptyBlock, the only op that counts as not generating instructions is OpPhi. But OpVarDef, OpVarKill, OpVarLive, and OpKeepAlive could probably qualify as "not generating instructions" as well. This would allow trimming more blocks. cc @randall77
Performance,compiler/runtime
low
Minor
228,484,882
go
cmd/compile: lay out loop-free, likeliness-free control flow more compactly
```go package p func f() int { x := 0 for i := 0; i < 10; i++ { odd := 0 if i%2 == 0 { odd = 2 // not 1, otherwise this branch gets optimized away! } x += odd // Distract the layout pass with a bunch of loops. for j := 0; j < 10; j++ { for j := 0; j < 10; j++ { for j := 0; j < 10; j++ { x++ } } } } return x } ``` In this code, we have even odds of the `if i%2 == 0` branch being taken. But the code layout is pretty uneven. In this CFG, b3 is that branch, and b6 and b19 are the taken/not-taken blocks; both feed into b7. It seems like a good layout for this would be b3 b6 b19 b7 or b3 b19 b6 b7. But we put b19 at the very end of the function. This is a simplified version of something that also happens in the fannkuch benchmark. See also #20355 and #18977. For details on how to read this image, see #20355. <img width="1680" alt="noncompactlayout" src="https://cloud.githubusercontent.com/assets/67496/26027267/db9ff9be-37bf-11e7-8fcb-f6a4e62a62f7.png"> cc @randall77 @dr2chase @cherrymui Marking 1.9Maybe because we removed the old backend's instruction re-ordering pass during 1.9; this may help prevent regressions from that.
Performance,compiler/runtime
medium
Major
228,497,806
vscode
Marked brackets range on scrollbar
- VSCode Version:1.12.1 - OS Version:Linux Steps to Reproduce: 1. Click on the code, inside the brackets. 2. Marked brackets range on scrollbar. Internal bracket marked with a main color. External brackets in gray (all). Same with more nesting brackets. ![brackets-range-on-scrollbar](https://cloud.githubusercontent.com/assets/16800535/26028968/9dececb0-382a-11e7-814b-fff32eecd0be.png) 3. As soon as one brackets, it's just the main color. ![brackets-range-on-scrollbar2](https://cloud.githubusercontent.com/assets/16800535/26028965/97c3ada6-382a-11e7-81fa-c72370054c10.png) This will be very useful. Particularly for longer code blocks, so that you can easily see where it ends and where it starts.
feature-request,ux
low
Major
228,499,983
opencv
Feature request: when inRange receives a lower value higher than upper value return true when outside the range.
Just as the title says. Would be very useful for example to detect red value in HSV colorspace, because it is in the range 340-360 and 0-20, so you would pass 340 as lower and 20 as upper.
feature,category: core
low
Minor
228,502,906
rust
Lack of HRTB produces nonsense error message, correct syntax isn't even mentioned in The Book
I hit a weird error case today. It turns out, I hit a problem with lifetimes where the only solution was HRTBs (Higher-Ranked Trait Bounds). I've tried to condense the reproduction sample as much as possible, without it being utterly abstract: ```rust use std::io::Result; use std::fmt::*; pub trait CanDecode where Self: Sized { fn read(&mut Decoder) -> Result<Self>; } pub trait CanEncode { fn write(self, &mut Encoder) -> Result<()>; } pub struct Decoder {} pub struct Encoder {} #[derive(Debug)] struct DataType {} impl CanDecode for DataType { fn read(_: &mut Decoder) -> Result<Self> { Ok(DataType {}) } } impl<'a> CanEncode for &'a DataType { fn write(self, _: &mut Encoder) -> Result<()> { Ok(()) } } fn main() { parse::<DataType>().unwrap(); } fn parse<'a, P>() -> Result<()> where P: CanDecode + Debug, /* attempted syntax: */ &'a P: CanEncode, P: 'a, /* correct syntax */ // for <'x> &'x P: CanEncode, { let mut rdr = Decoder {}; let frame = P::read(&mut rdr)?; let mut wtr = Encoder {}; frame.write(&mut wtr)?; Ok(()) } ``` Compiling this code: ``` $ rustc --version rustc 1.19.0-nightly (e17a1227a 2017-05-12) $ rustc hrtb-ergonomics.rs error: `frame` does not live long enough --> hrtb-ergonomics.rs:36:5 | 36 | frame.write(&mut wtr)?; | ^^^^^ does not live long enough 37 | Ok(()) 38 | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the body at 32:0... --> hrtb-ergonomics.rs:32:1 | 32 | / { 33 | | let mut rdr = Decoder {}; 34 | | let frame = P::read(&mut rdr)?; 35 | | let mut wtr = Encoder {}; 36 | | frame.write(&mut wtr)?; 37 | | Ok(()) 38 | | } | |_^ error: aborting due to previous error ``` Replacing the "attempted code" with the "correct syntax" comment makes this compile fine. For me, this points towards several sub-issues: 1) The error message is wrong - it should work just fine according to rustc. It's clearly not ergonomic, at least. 1) HRTBs are not mentioned at all in the book. The `for<'a>` syntax was completely new to me, when I heard about it on IRC. The Nomicon mentions this (with the comment "There aren't many places outside of the Fn traits where we encounter HRTBs, and even for those we have a nice magic sugar for the common cases.") 1) The code is clearly fine (except for the lifetime annotations), but I don't understand *why* the non-HRTB version doesn't compile. The reference is alive inside the parse() fn, which seems fine to me? 1) It seems odd to me that I hit a feature that is so obscure that the Nomicon mentions that there "aren't many places" where it is encountered. I don't feel like my code is doing anything super obscure. Is there some other much easier way to express this, that I am missing? If this issue should be split up into multiple issues, I'd be happy to help - please advice.
C-enhancement,A-diagnostics,A-lifetimes,A-trait-system,A-borrow-checker,T-compiler,D-confusing
low
Critical
228,530,619
electron
Allow ASAR to work with `child_process.spawn()`
> There are Node APIs that can execute binaries like child_process.exec, child_process.spawn and child_process.execFile, but only execFile is supported to execute binaries inside asar archive. > This is because exec and spawn accept command instead of file as input, and commands are executed under shell. > - https://github.com/electron/electron/blob/master/docs/tutorial/application-packaging.md#executing-binaries-inside-asar-archive This is not entirely correct. `.spawn()` executes the binary directly by default, just as `.execFile()` does. `.execFile()` actually uses `.spawn()` underneath. [`.spawn()` only runs the input in a shell if the `shell` option is set.](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) Not supporting `.spawn()` means a lot of apps are not able to use ASAR as they need the more flexible `.spawn()` method. For example, I need the `.spawn()` method so I can stream the output of `ffmpeg` while it's running. `.execFile()` only buffers and reports at the end. Would also make sense to support `.spawnSync()` for completeness. --- See https://github.com/electron/electron/issues/3512 for previous discussion.
enhancement :sparkles:
medium
Critical
228,550,011
TypeScript
Transpile to multiple targets at once
By allowing multiple targets, transpilation speeds would be vastly improved for any project doing this already, as the AST only needs to be generated once.
Suggestion,Awaiting More Feedback
medium
Critical
228,550,336
TypeScript
lib.d.ts: members in CSSStyleDeclarations cannot be null per the spec
**TypeScript Version:** 2.2.1 **Code** ```ts // with --strictNullCheck document.body.style.fontFamily.toString() // this should always work, fontFamily cannot be null document.body.style.fontFamily = null; // this should also work per the spec... document.body.style.fontFamily = ""; // semantically same ``` **Actual behavior:** ``` document.body.style.fontFamily.toString() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^Object is possibly null ``` If you are willing to accept a PR, what should be done here? Making it non-nullable breaks null-assigning lines, is it a good way to go?
Bug,Help Wanted,Domain: lib.d.ts
low
Minor
228,582,334
opencv
CMake-GUI doesn't allow multiple choices of CPU_BASELINE and CPU_DISPATCH
##### System information (version) - OpenCV => 3.2 30170512 - Operating System / Platform => Windows 10 64 bit - CMake => 3.8.1 ##### Detailed description ![cmake](https://cloud.githubusercontent.com/assets/888148/26039068/d9d4e832-3950-11e7-912a-3764208d695d.png) CMake-GUI doesn't allow multiple choices nor manual input of CPU_BASELINE and CPU_DISPATCH. It is set by ```.cmake set_property(CACHE CPU_BASELINE PROPERTY STRINGS "" ${CPU_KNOWN_OPTIMIZATIONS}) set_property(CACHE CPU_DISPATCH PROPERTY STRINGS "" ${CPU_KNOWN_OPTIMIZATIONS}) ``` at line 270-271 of [/cmake/OpenCVCompilerOptimizations.cmake](https://github.com/opencv/opencv/blob/master/cmake/OpenCVCompilerOptimizations.cmake#L270-L271). ##### Steps to reproduce Configure project w/ CMake-GUI. ##### Possible fixes 1. Use a generic string entry field(do not set STRINGS CACHE property of CPU_BASELINE and CPU_DISPATCH) 2. Use variables for each optimization(like deprecated style)
feature,category: build/install
low
Minor
228,643,165
vscode
Can't see Newlines when Render Control Characters is turned on
<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode --> - VSCode Version: 1.12.1 - OS Version: Win 10 15063.296 Steps to Reproduce: 1. turn on render control chars in settings ``` "editor.renderControlCharacters": true ``` 2. open a file with newlines Expect to see some visual representation of newlines like in Notepad++ or Atom's similar features ![image](https://cloud.githubusercontent.com/assets/8959496/26049192/0189cd62-390f-11e7-9114-e8218917fb40.png) But instead see nothing... ![image](https://cloud.githubusercontent.com/assets/8959496/26049182/f7d629b4-390e-11e7-88ba-8cea22755db2.png) **Edit 11/21/2024** - bubbling up my comment from below: > Standard definition of a [control character](https://en.wikipedia.org/wiki/Control_character) is anything that doesn't represent a written symbol. LF line feed, CR carriage return, and HT horizontal tab [are all included in this]. > > If this setting is supposed to do something else, then it shouldn't be labeled as `renderControlCharacters`.
feature-request,editor-core
medium
Critical
228,706,520
flutter
Wish for one canonical place to edit the string that appears as "version" on the Play Store and App Store
Feature request: it would be nice to manage the version of an app through Flutter (have it somewhere in the flutter yaml file and be automatically reflected in both android and iOS builds).
c: new feature,tool,a: release,P3,team-tool,triaged-tool
low
Major
228,733,007
youtube-dl
Site Support Request: http://www.schooltube.com/ (SchoolTube)
## 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.05.14*. 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.05.14** ### 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) - [x] 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 *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**): - Single video: http://www.schooltube.com/video/dc30fcfe08864571af1f/Half-Life%20Snacks - Single video: http://www.schooltube.com/video/dc30fcfe08864571af1f/ - Organization (A type of channel. Does not have a video embedded in it.): http://www.schooltube.com/organization/211565/ - Channel page (Has an embedded video.): http://www.schooltube.com/channel/vvhsvocskills/ Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. --- ### Description of your *issue*, suggested solution and other information Explanation of your *issue* in arbitrary form goes here. Please make sure the [description is worded well enough to be understood](https://github.com/rg3/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide as much context and examples as possible. If work on your *issue* requires account credentials please provide them or explain how one can obtain them. Metadata extractable from single video page: - The title can be extracted from the "og:title" meta tag. Example: `<meta property="og:title" content="Half-Life Snacks"/>` - The description can be extracted from the "description" or "og:description" meta tags. Example: `<meta name="description" content="Award of Excellence at the 2009 Northwest High School Film Festival: Documentary Category "/>` Example 2: `<meta property="og:description" content="Award of Excellence at the 2009 Northwest High School Film Festival: Documentary Category "/>` - The tags can be extracted from the "keywords" meta tag. Example: `<meta name="keywords" content="Northwest High School Film Festival">` - The view count, upload date, upload user, and organization can be extracted from the "video-meta-data" HTML class Example: ```html <div class="video-meta-data"> <div class="view-count">4,826 views</div> <div>Uploaded on Aug 15, 2009</div> <div>by nwhsff (Teacher)</div> <div> <a href="/organization/211565/"> Mount Si High School </a> </div> </div> ``` - The upload date can also be retrieved from the Last-Modifed headers of the video file or thumbnail. (Which the generic extractor is able to locate within the page currently.) - Video ID is located in the URL for individual video pages, after the /video/ part of the url but before the video's title. Example: For the URL "http://www.schooltube.com/video/dc30fcfe08864571af1f/Half-Life Snacks" the ID is "dc30fcfe08864571af1f" - On the channel pages with embedded videos, the video link can be found within the JavaScript "jwplayer("schooltube-video").setup" element. Specifically, it can be found within the "logo" array after "link : " Example: ```javascript jwplayer("schooltube-video").setup({ width: '768', height: '460', primary: 'flash', logo: { file : '/static/newui/img/stlogo-white-watermark.png', link : 'http://www.schooltube.com/video/fecf2209d68c474190ba/Recycling' }, playlist: [{ image: "http://schooltube_encoded.s3.amazonaws.com/thumb/3b/02/70/dc/37/2d/3b0270dc-372d-11e7-a7e5-001c23dcdfb5_01.jpg", sources: [ { file: "http://encoded.cdn.schooltube.com/3b/02/70/dc/37/2d/3b0270dc-372d-11e7-a7e5-001c23dcdfb5.mp4", width: 640, height: 360 } ] }], related: { file: '/related/fecf2209d68c474190ba' }, sharing: { link: "http://bit.ly/2psyNfb", code: '<iframe width="500" height="375" src="http://www.schooltube.com/embed/fecf2209d68c474190ba" frameborder="0" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"></iframe>' } }); ```
site-support-request
low
Critical
228,793,288
flutter
Removing a plugin may make project unbuildable on iOS
I wanted to convert https://github.com/perlatus/flutter_zoomable_image from a plugin to a regular dart package (since it doesn't use any native code). That was more complicated than I thought. I expected to just do the following: 1. delete `android/` folder 1. delete `ios/` folder 1. remove `plugin` section from `pubspec.yaml` After performing these steps the example app worked great on Android. However, on iOS, I was presented with build errors: ``` PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/goderbauer/Library/Developer/Xcode/DerivedData/Runner-glyyagulozskefbxpevofwjpxfte/Build/Intermediates/Runner.build/Release-iphoneos/Runner.build/Script-4BFD143A4E00DC7226158EFA.sh cd /Users/goderbauer/dev/flutter_zoomable_image/example/ios /bin/sh -c /Users/goderbauer/Library/Developer/Xcode/DerivedData/Runner-glyyagulozskefbxpevofwjpxfte/Build/Intermediates/Runner.build/Release-iphoneos/Runner.build/Script-4BFD143A4E00DC7226158EFA.sh diff: /../Podfile.lock: No such file or directory diff: /Manifest.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. Could not build the precompiled application for the device. ``` From the exception it was unclear how to resolve those. After comparing the ios example app with a freshly created flutter app (`flutter create`) I figured out I had to do the following: 1. open up `example/ios/Runner.xcworkspace` in Xcode 1. In the `Build Phases` tab delete all three build pahses that start with `[CP]` 1. In the `Link Binary With Library` section delete `Pod_Runner.framework` After that, the example app would also build and run on iOS. We either need to document this or - if we expect this conversion to happen frequently - make it simpler. /cc @collinjackson @mit-mit
platform-ios,tool,has reproducible steps,P2,found in release: 2.2,a: plugins,team-ios,triaged-ios
low
Critical
228,829,841
TypeScript
Report errors (and quickfixes) for incorrect JSDoc
**TypeScript Version:** nightly (2.4.0-dev.20170515) **Code** ```ts /** * @param abcdeg A parameter */ function f(abcdefg: number) { abcdeg; } ``` **Expected behavior:** Can fix spelling for either `abcdeg`. **Actual behavior:** Does not work in jsdoc.
Suggestion,In Discussion,Domain: JSDoc
low
Critical
228,834,400
rust
Add (a lot of) tests to rustdoc
Since we now have a more complete way to compare two HTML contents, I think we can now _**strongly**_ reinforce rustdoc's tests (which are a bit weak and lacking for now). cc @rust-lang/docs
A-testsuite,T-rustdoc,C-tracking-issue
low
Major
228,951,882
vscode
VS Code keyboard shortcuts suggestion to learn
Keyboard shortcuts are central part of VS Code, there are a lot of them and I think I use only a fraction of them. It would be awesome if VS Code could suggest what shortcut should I learn, based on how I use the app with mouse. For example if I click between editors a lot, then VS Code could somehow tell me to use `ctrl+1` and `ctrl+2`. This way I could gradually learn shortcuts that would increase my productivity the most.
feature-request,keybindings
high
Critical
228,977,048
youtube-dl
site support request "Numero 23" french TV
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.05.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. - [ ] I've **verified** and **I assure** that I'm running youtube-dl **2017.05.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 ] Site support request (request for adding support for a new site) **youtube-dl -v http://www.numero23.fr/programmes/ils-font-la-france/** [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'-v', u'http://www.numero23.fr/programmes/ils-font-la-france/'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2017.05.09 [debug] Python version 2.7.13 - Darwin-16.6.0-x86_64-i386-64bit [debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4 [debug] Proxy map: {} [generic] ils-font-la-france: Requesting header WARNING: Falling back on generic information extractor. [generic] ils-font-la-france: Downloading webpage [generic] ils-font-la-france: Extracting information ERROR: Unsupported URL: http://www.numero23.fr/programmes/ils-font-la-france/ Traceback (most recent call last): File "/opt/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1955, in _real_extract doc = compat_etree_fromstring(webpage.encode('utf-8')) File "/opt/local/bin/youtube-dl/youtube_dl/compat.py", line 2526, in compat_etree_fromstring doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory))) File "/opt/local/bin/youtube-dl/youtube_dl/compat.py", line 2515, in _XML parser.feed(text) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1653, in feed self._raiseerror(v) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror raise err ParseError: not well-formed (invalid token): line 32, column 269 Traceback (most recent call last): File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 760, in extract_info ie_result = ie.extract(url) File "/opt/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 433, in extract ie_result = self._real_extract(url) File "/opt/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 2834, in _real_extract raise UnsupportedError(url) UnsupportedError: Unsupported URL: http://www.numero23.fr/programmes/ils-font-la-france/ --- ### The purpose of this *issue* is a *site support request* . Here is a kind of example URLs support : - Single video: http://www.numero23.fr/programmes/ils-font-la-france/?video_id=x5lxqmo -- ### Description of your *issue*, suggested solution and other information Could you add support for the Numero 23 french TV ? Yours faithfully Patrick
site-support-request,geo-restricted
low
Critical
229,053,060
realworld
Challenge: Search
Search is the lifeblood of any good app worth its salt. Perhaps we can consider putting up an "extra credit" challenge to add the ability to search text in posts, tags, authors.
Status: RFC,v2 changelog
low
Major
229,082,798
flutter
CI should check that flutter/packages uses the template where possible
We could diff against the output of flutter create --plugin (with allowed exceptions for files that are normal to differ like main.dart, Info.plist, etc.) to ensure that they stay in sync with master. This would have caught #10106 as well as a similar issue we saw in April with the hello_services sample.
team,package,team-ecosystem,P2,triaged-ecosystem
low
Major
229,122,843
go
go/build: does not support examples that use cgo
While prototyping a library to work around #13656, I ran in to a pretty major issue with the godoc tool. It doesn't generate any documentation at all for packages whose tests use cgo, which implies that packages designed for use with cgo *cannot* contain idiomatic examples. ``` bcmills:~/src$ go version go version devel +b53acd89db Tue May 16 17:15:11 2017 +0000 linux/amd64 bcmills:~/src$ go tool doc cslice doc: use of cgo in test /usr/local/google/home/bcmills/src/cslice/cslice_test.go not supported ``` cslice/cslice_test.go: ```go package cslice_test /* #include <stddef.h> #include <stdlib.h> #include <string.h> */ import "C" import ( "fmt" "reflect" "testing" "unsafe" "cslice" ) func ExampleSetAt() { var ( original *C.char = C.CString("Hello, world!") sz C.size_t = C.strlen(original) ) defer C.free(unsafe.Pointer(original)) var alias []byte cslice.SetAt(&alias, unsafe.Pointer(original), int(sz)) fmt.Println("original:", C.GoString(original)) fmt.Println("alias:", string(alias)) copy(alias, "Adios") fmt.Println("original:", C.GoString(original)) fmt.Println("alias:", string(alias)) // Output: // original: Hello, world! // alias: Hello, world! // original: Adios, world! // alias: Adios, world! } func ExampleReflectAt() { var ( original *C.char = C.CString("Hello, world!") sz C.size_t = C.strlen(original) ) defer C.free(unsafe.Pointer(original)) alias := cslice.ReflectAt(reflect.TypeOf(byte(0)), unsafe.Pointer(original), int(sz)) fmt.Println("original:", C.GoString(original)) fmt.Println("alias:", string(alias.Bytes())) reflect.Copy(alias, reflect.ValueOf([]byte("Adios"))) fmt.Println("original:", C.GoString(original)) fmt.Println("alias:", string(alias.Bytes())) // Output: // original: Hello, world! // alias: Hello, world! // original: Adios, world! // alias: Adios, world! } ```
help wanted,NeedsInvestigation
low
Minor
229,156,144
rust
Result-based error handling optimizes very poorly for large payloads
The overhead seems to mostly be extra memcopies. ## Method I tested three cases: * `direct() -> Result<Huge, ()>` * `direct_boxed() -> Result<Box<Huge>, ()>` * `indirect(&mut Huge) -> Result<(), ()>` <details> <summary>Click For Code</summary> ```rust #![feature(test, box_syntax)] extern crate test; use std::io::{Write, Error, ErrorKind}; const DATA_SIZE: usize = 200; struct Huge { data: [u8; DATA_SIZE], } struct HugeIter<'a> { cur_val: Huge, buf: &'a [u8], } impl<'a> HugeIter<'a> { fn next_direct(&mut self) -> Option<&Huge> { if let Ok(val) = parse_huge_direct(&mut self.buf) { self.cur_val = val; Some(&self.cur_val) } else { None } } fn next_indirect(&mut self) -> Option<&Huge> { if let Ok(()) = parse_huge_indirect(&mut self.buf, &mut self.cur_val) { Some(&self.cur_val) } else { None } } } struct HugeIterBoxed<'a> { cur_val: Box<Huge>, buf: &'a [u8], } impl<'a> HugeIterBoxed<'a> { fn next_direct_boxed(&mut self) -> Option<&Huge> { if let Ok(val) = parse_huge_direct_boxed(&mut self.buf) { self.cur_val = val; Some(&self.cur_val) } else { None } } } fn parse_huge_indirect(src: &mut &[u8], dest: &mut Huge) -> Result<(), Error> { if src.len() < DATA_SIZE { return Err(Error::new(ErrorKind::UnexpectedEof, "OH NO")) } (&mut dest.data[..]).write_all(&src[..DATA_SIZE])?; *src = &src[DATA_SIZE..]; Ok(()) } fn parse_huge_direct(src: &mut &[u8]) -> Result<Huge, Error> { unsafe { if src.len() < DATA_SIZE { return Err(Error::new(ErrorKind::UnexpectedEof, "OH NO")) } let mut val = Huge { data: ::std::mem::uninitialized() }; (&mut val.data[..]).write_all(&src[..DATA_SIZE])?; *src = &src[DATA_SIZE..]; Ok(val) } } fn parse_huge_direct_boxed(src: &mut &[u8]) -> Result<Box<Huge>, Error> { unsafe { if src.len() < DATA_SIZE { return Err(Error::new(ErrorKind::UnexpectedEof, "OH NO")) } let mut val = box Huge { data: ::std::mem::uninitialized() }; (&mut val.data[..]).write_all(&src[..DATA_SIZE])?; *src = &src[DATA_SIZE..]; Ok(val) } } #[bench] fn bench_direct(b: &mut test::Bencher) { let data = test::black_box(vec![0; 1_000_000]); b.iter(|| { let mut iter = HugeIter { cur_val: Huge { data: [0; 200] }, buf: &data }; let mut total: u8 = 0; while let Some(val) = iter.next_direct() { total += val.data[..].iter().cloned().sum(); } total }); } #[bench] fn bench_indirect(b: &mut test::Bencher) { let data = test::black_box(vec![0; 1_000_000]); b.iter(|| { let mut iter = HugeIter { cur_val: Huge { data: [0; 200] }, buf: &data }; let mut total: u8 = 0; while let Some(val) = iter.next_indirect() { total += val.data[..].iter().cloned().sum(); } total }); } #[bench] fn bench_direct_boxed(b: &mut test::Bencher) { let data = test::black_box(vec![0; 1_000_000]); b.iter(|| { let mut iter = HugeIterBoxed { cur_val: box Huge { data: [0; 200] }, buf: &data }; let mut total: u8 = 0; while let Some(val) = iter.next_direct_boxed() { total += val.data[..].iter().cloned().sum(); } total }); } ``` </details> ## Bench Results: ``` test bench_direct_boxed ... bench: 136,621 ns/iter (+/- 32,300) test bench_direct ... bench: 129,206 ns/iter (+/- 24,201) test bench_indirect ... bench: 83,301 ns/iter (+/- 21,078) ``` ## ASM <details> <summary>ASM for bench_direct_boxed's closure</summary> ```asm __ZN4test13ns_iter_inner17h91bd325045991a14E: Lfunc_begin1: .cfi_startproc .cfi_personality 155, _rust_eh_personality .cfi_lsda 16, Lexception1 pushq %rbp Lcfi8: .cfi_def_cfa_offset 16 Lcfi9: .cfi_offset %rbp, -16 movq %rsp, %rbp Lcfi10: .cfi_def_cfa_register %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $104, %rsp Lcfi11: .cfi_offset %rbx, -56 Lcfi12: .cfi_offset %r12, -48 Lcfi13: .cfi_offset %r13, -40 Lcfi14: .cfi_offset %r14, -32 Lcfi15: .cfi_offset %r15, -24 movq %rsi, %rbx movq %rdi, -56(%rbp) callq __ZN3std4time7Instant3now17hc5a5b38c2510cf8bE movq %rax, -72(%rbp) movq %rbx, -48(%rbp) testq %rbx, %rbx je LBB1_13 xorl %r15d, %r15d .p2align 4, 0x90 LBB1_2: movl $200, %edi movl $1, %esi callq ___rust_allocate movq %rax, %r14 testq %r14, %r14 je LBB1_25 movq %r15, -64(%rbp) xorl %r13d, %r13d xorl %esi, %esi movl $200, %edx movq %r14, %rdi callq _memset movq -56(%rbp), %rax movq (%rax), %rax movq 16(%rax), %r12 cmpq $200, %r12 jae LBB1_14 movq %r14, %rbx jmp LBB1_5 .p2align 4, 0x90 LBB1_14: movq (%rax), %r15 xorl %r13d, %r13d .p2align 4, 0x90 LBB1_15: movl $200, %edi movl $1, %esi callq ___rust_allocate movq %rax, %rbx testq %rbx, %rbx je LBB1_16 movl $200, %edx movq %rbx, %rdi movq %r15, %rsi callq _memcpy movl $200, %esi movl $1, %edx movq %r14, %rdi callq ___rust_deallocate movdqu (%rbx), %xmm0 movdqu 16(%rbx), %xmm1 movdqu 32(%rbx), %xmm2 movdqu 48(%rbx), %xmm3 paddb %xmm0, %xmm2 paddb %xmm1, %xmm3 movdqu 64(%rbx), %xmm0 movdqu 80(%rbx), %xmm1 movdqu 96(%rbx), %xmm4 movdqu 112(%rbx), %xmm5 paddb %xmm0, %xmm4 paddb %xmm2, %xmm4 paddb %xmm1, %xmm5 paddb %xmm3, %xmm5 movdqu 128(%rbx), %xmm0 movdqu 144(%rbx), %xmm1 movdqu 160(%rbx), %xmm2 movdqu 176(%rbx), %xmm3 paddb %xmm0, %xmm2 paddb %xmm4, %xmm2 paddb %xmm1, %xmm3 paddb %xmm5, %xmm3 paddb %xmm2, %xmm3 pshufd $78, %xmm3, %xmm0 paddb %xmm3, %xmm0 pshufd $229, %xmm0, %xmm1 paddb %xmm0, %xmm1 movdqa %xmm1, %xmm0 psrld $16, %xmm0 paddb %xmm1, %xmm0 movdqa %xmm0, %xmm1 psrlw $8, %xmm1 paddb %xmm0, %xmm1 movdqa %xmm1, -144(%rbp) movzbl 192(%rbx), %eax addb -144(%rbp), %al addb 193(%rbx), %al addb 194(%rbx), %al addb 195(%rbx), %al addb 196(%rbx), %al addb 197(%rbx), %al addb 198(%rbx), %al addb 199(%rbx), %al addq $200, %r15 addq $-200, %r12 addb %al, %r13b cmpq $200, %r12 movq %rbx, %r14 jae LBB1_15 LBB1_5: Ltmp6: movl $5, %esi leaq _str.8(%rip), %rdi callq __ZN3std5error205_$LT$impl$u20$core..convert..From$LT$$RF$$u27$b$u20$str$GT$$u20$for$u20$alloc..boxed..Box$LT$std..error..Error$u20$$u2b$$u20$core..marker..Sync$u20$$u2b$$u20$core..marker..Send$u20$$u2b$$u20$$u27$a$GT$$GT$4from17hbabb0ef23dd78831E movq %rdx, %rcx Ltmp7: leaq -88(%rbp), %r12 Ltmp8: movl $17, %esi movq %r12, %rdi movq %rax, %rdx callq __ZN3std2io5error5Error4_new17h399b6fceaf2b2ad7E Ltmp9: cmpb $2, -88(%rbp) movq -64(%rbp), %r15 jb LBB1_12 movq -80(%rbp), %r14 movq 8(%r14), %rdi movq 16(%r14), %rax Ltmp11: callq *(%rax) Ltmp12: movq 16(%r14), %rax movq 8(%rax), %rsi testq %rsi, %rsi je LBB1_11 movq 8(%r14), %rdi movq 16(%rax), %rdx callq ___rust_deallocate LBB1_11: movl $24, %esi movl $8, %edx movq %r14, %rdi callq ___rust_deallocate LBB1_12: incq %r15 movl $200, %esi movl $1, %edx movq %rbx, %rdi callq ___rust_deallocate movb %r13b, -88(%rbp) ## InlineAsm Start ## InlineAsm End cmpq -48(%rbp), %r15 jb LBB1_2 LBB1_13: leaq -104(%rbp), %rdi leaq -72(%rbp), %rsi callq __ZN3std4time7Instant7elapsed17h4a152db7d42dfbccE movq -104(%rbp), %rax movl -96(%rbp), %ecx movq %rax, -120(%rbp) movl %ecx, -112(%rbp) leaq -120(%rbp), %rdi callq __ZN4test11ns_from_dur17h77590a35c757ea7bE addq $104, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq LBB1_16: Ltmp3: callq __ZN5alloc3oom3oom17he0fcc1585169f6ffE Ltmp4: LBB1_25: callq __ZN5alloc3oom3oom17he0fcc1585169f6ffE LBB1_23: Ltmp5: movq %rax, %r15 movq %r14, %rbx jmp LBB1_24 LBB1_18: Ltmp13: movq %rax, %r15 movq 16(%r14), %rax movq 8(%rax), %rsi testq %rsi, %rsi je LBB1_20 movq 8(%r14), %rdi movq 16(%rax), %rdx callq ___rust_deallocate LBB1_20: movl $24, %esi movl $8, %edx movq %r14, %rdi callq ___rust_deallocate jmp LBB1_24 LBB1_22: Ltmp10: movq %rax, %r15 LBB1_24: movl $200, %esi movl $1, %edx movq %rbx, %rdi callq ___rust_deallocate movq %r15, %rdi callq __Unwind_Resume Lfunc_end1: .cfi_endproc .section __TEXT,__gcc_except_tab .p2align 2 GCC_except_table1: Lexception1: .byte 255 .byte 155 .asciz "\320" .byte 3 .byte 78 Lset7 = Lfunc_begin1-Lfunc_begin1 .long Lset7 Lset8 = Ltmp6-Lfunc_begin1 .long Lset8 .long 0 .byte 0 Lset9 = Ltmp6-Lfunc_begin1 .long Lset9 Lset10 = Ltmp9-Ltmp6 .long Lset10 Lset11 = Ltmp10-Lfunc_begin1 .long Lset11 .byte 0 Lset12 = Ltmp11-Lfunc_begin1 .long Lset12 Lset13 = Ltmp12-Ltmp11 .long Lset13 Lset14 = Ltmp13-Lfunc_begin1 .long Lset14 .byte 0 Lset15 = Ltmp12-Lfunc_begin1 .long Lset15 Lset16 = Ltmp3-Ltmp12 .long Lset16 .long 0 .byte 0 Lset17 = Ltmp3-Lfunc_begin1 .long Lset17 Lset18 = Ltmp4-Ltmp3 .long Lset18 Lset19 = Ltmp5-Lfunc_begin1 .long Lset19 .byte 0 Lset20 = Ltmp4-Lfunc_begin1 .long Lset20 Lset21 = Lfunc_end1-Ltmp4 .long Lset21 .long 0 .byte 0 .p2align 2 .section __TEXT,__text,regular,pure_instructions .p2align 4, 0x90 ``` </details> <details> <summary>ASM for bench_direct's closure</summary> ```asm Lfunc_begin0: .cfi_startproc .cfi_personality 155, _rust_eh_personality .cfi_lsda 16, Lexception0 pushq %rbp Lcfi0: .cfi_def_cfa_offset 16 Lcfi1: .cfi_offset %rbp, -16 movq %rsp, %rbp Lcfi2: .cfi_def_cfa_register %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $520, %rsp Lcfi3: .cfi_offset %rbx, -56 Lcfi4: .cfi_offset %r12, -48 Lcfi5: .cfi_offset %r13, -40 Lcfi6: .cfi_offset %r14, -32 Lcfi7: .cfi_offset %r15, -24 movq %rsi, %rbx movq %rdi, -72(%rbp) callq __ZN3std4time7Instant3now17hc5a5b38c2510cf8bE movq %rax, -96(%rbp) movq %rbx, -64(%rbp) testq %rbx, %rbx je LBB0_17 xorl %eax, %eax .p2align 4, 0x90 LBB0_2: incq %rax movq %rax, -80(%rbp) movq -72(%rbp), %rax movq (%rax), %rax movq (%rax), %rcx movq 16(%rax), %r14 pxor %xmm0, %xmm0 movdqa %xmm0, -176(%rbp) movdqa %xmm0, -192(%rbp) movdqa %xmm0, -208(%rbp) movdqa %xmm0, -224(%rbp) movdqa %xmm0, -240(%rbp) movdqa %xmm0, -256(%rbp) movdqa %xmm0, -272(%rbp) movdqa %xmm0, -288(%rbp) movdqa %xmm0, -304(%rbp) movdqa %xmm0, -320(%rbp) movdqa %xmm0, -336(%rbp) movdqa %xmm0, -352(%rbp) movq $0, -160(%rbp) movq %rcx, -152(%rbp) movq %r14, -144(%rbp) xorl %r15d, %r15d cmpq $200, %r14 jb LBB0_7 jmp LBB0_4 .p2align 4, 0x90 LBB0_6: movdqu (%rax), %xmm0 movdqu 16(%rax), %xmm1 movdqu 32(%rax), %xmm2 movdqu 48(%rax), %xmm3 paddb %xmm0, %xmm2 paddb %xmm1, %xmm3 movdqu 64(%rax), %xmm0 movdqu 80(%rax), %xmm1 movdqu 96(%rax), %xmm4 movdqu 112(%rax), %xmm5 paddb %xmm0, %xmm4 paddb %xmm2, %xmm4 paddb %xmm1, %xmm5 paddb %xmm3, %xmm5 movdqu 128(%rax), %xmm0 movdqu 144(%rax), %xmm1 movdqu 160(%rax), %xmm2 movdqu 176(%rax), %xmm3 paddb %xmm0, %xmm2 paddb %xmm4, %xmm2 paddb %xmm1, %xmm3 paddb %xmm5, %xmm3 paddb %xmm2, %xmm3 pshufd $78, %xmm3, %xmm0 paddb %xmm3, %xmm0 pshufd $229, %xmm0, %xmm1 paddb %xmm0, %xmm1 movdqa %xmm1, %xmm0 psrld $16, %xmm0 paddb %xmm1, %xmm0 movdqa %xmm0, %xmm1 psrlw $8, %xmm1 paddb %xmm0, %xmm1 movdqa %xmm1, -368(%rbp) movzbl 192(%rax), %ecx addb -368(%rbp), %cl addb 193(%rax), %cl addb 194(%rax), %cl addb 195(%rax), %cl addb 196(%rax), %cl addb 197(%rax), %cl addb 198(%rax), %cl addb 199(%rax), %cl addb %cl, %r15b movq -144(%rbp), %r14 cmpq $200, %r14 jae LBB0_4 LBB0_7: movl $5, %esi leaq _str.8(%rip), %rdi callq __ZN3std5error205_$LT$impl$u20$core..convert..From$LT$$RF$$u27$b$u20$str$GT$$u20$for$u20$alloc..boxed..Box$LT$std..error..Error$u20$$u2b$$u20$core..marker..Sync$u20$$u2b$$u20$core..marker..Send$u20$$u2b$$u20$$u27$a$GT$$GT$4from17hbabb0ef23dd78831E movq %rdx, %rcx movl $17, %esi leaq -552(%rbp), %rdi movq %rax, %rdx callq __ZN3std2io5error5Error4_new17h399b6fceaf2b2ad7E movzbl -552(%rbp), %eax leaq -551(%rbp), %rcx movq %rcx, %rdx movzbl 6(%rdx), %ecx movb %cl, -42(%rbp) movzwl 4(%rdx), %ecx movw %cx, -44(%rbp) movl (%rdx), %ecx movl %ecx, -48(%rbp) cmpb $2, %al jb LBB0_12 movq -544(%rbp), %r14 movq 8(%r14), %rdi movq 16(%r14), %rax Ltmp0: callq *(%rax) Ltmp1: movq 16(%r14), %rax movq 8(%rax), %rsi testq %rsi, %rsi je LBB0_11 movq 8(%r14), %rdi movq 16(%rax), %rdx callq ___rust_deallocate LBB0_11: movl $24, %esi movl $8, %edx movq %r14, %rdi callq ___rust_deallocate LBB0_12: xorl %eax, %eax testq %rax, %rax jne LBB0_6 jmp LBB0_16 .p2align 4, 0x90 LBB0_4: movq -152(%rbp), %rbx movzbl 6(%rbx), %eax movb %al, -50(%rbp) movzwl 4(%rbx), %eax movw %ax, -52(%rbp) movl (%rbx), %eax movl %eax, -56(%rbp) movzbl 7(%rbx), %r12d movzbl 14(%rbx), %eax movb %al, -42(%rbp) movzwl 12(%rbx), %eax movw %ax, -44(%rbp) movl 8(%rbx), %eax movl %eax, -48(%rbp) movq 15(%rbx), %rax movq %rax, -88(%rbp) leaq 23(%rbx), %rsi movl $177, %edx leaq -552(%rbp), %r13 movq %r13, %rdi callq _memcpy addq $200, %rbx addq $-200, %r14 movq %rbx, -152(%rbp) movq %r14, -144(%rbp) movzbl -50(%rbp), %eax movb %al, -346(%rbp) movzwl -52(%rbp), %eax movw %ax, -348(%rbp) movl -56(%rbp), %eax movl %eax, -352(%rbp) movb %r12b, -345(%rbp) movzbl -42(%rbp), %eax leaq -344(%rbp), %rcx movb %al, 6(%rcx) movzwl -44(%rbp), %eax movw %ax, 4(%rcx) movl -48(%rbp), %eax movl %eax, (%rcx) movq -88(%rbp), %rax movq %rax, -337(%rbp) movl $177, %edx leaq -329(%rbp), %rdi movq %r13, %rsi callq _memcpy leaq -352(%rbp), %rax testq %rax, %rax jne LBB0_6 LBB0_16: movb %r15b, -352(%rbp) leaq -352(%rbp), %rax ## InlineAsm Start ## InlineAsm End movq -80(%rbp), %rax cmpq -64(%rbp), %rax jb LBB0_2 LBB0_17: leaq -112(%rbp), %rdi leaq -96(%rbp), %rsi callq __ZN3std4time7Instant7elapsed17h4a152db7d42dfbccE movq -112(%rbp), %rax movl -104(%rbp), %ecx movq %rax, -128(%rbp) movl %ecx, -120(%rbp) leaq -128(%rbp), %rdi callq __ZN4test11ns_from_dur17h77590a35c757ea7bE addq $520, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq LBB0_13: Ltmp2: movq %rax, %rbx movq 16(%r14), %rax movq 8(%rax), %rsi testq %rsi, %rsi je LBB0_15 movq 8(%r14), %rdi movq 16(%rax), %rdx callq ___rust_deallocate LBB0_15: movl $24, %esi movl $8, %edx movq %r14, %rdi callq ___rust_deallocate movq %rbx, %rdi callq __Unwind_Resume Lfunc_end0: .cfi_endproc .section __TEXT,__gcc_except_tab .p2align 2 GCC_except_table0: Lexception0: .byte 255 .byte 155 .byte 41 .byte 3 .byte 39 Lset0 = Lfunc_begin0-Lfunc_begin0 .long Lset0 Lset1 = Ltmp0-Lfunc_begin0 .long Lset1 .long 0 .byte 0 Lset2 = Ltmp0-Lfunc_begin0 .long Lset2 Lset3 = Ltmp1-Ltmp0 .long Lset3 Lset4 = Ltmp2-Lfunc_begin0 .long Lset4 .byte 0 Lset5 = Ltmp1-Lfunc_begin0 .long Lset5 Lset6 = Lfunc_end0-Ltmp1 .long Lset6 .long 0 .byte 0 .p2align 2 .section __TEXT,__text,regular,pure_instructions .p2align 4, 0x90 ``` </details> <details> <summary>ASM for bench_indirect's closure</summary> ```asm __ZN4test13ns_iter_inner17hba96d7af2bd3d26cE: Lfunc_begin2: .cfi_startproc .cfi_personality 155, _rust_eh_personality .cfi_lsda 16, Lexception2 pushq %rbp Lcfi16: .cfi_def_cfa_offset 16 Lcfi17: .cfi_offset %rbp, -16 movq %rsp, %rbp Lcfi18: .cfi_def_cfa_register %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $312, %rsp Lcfi19: .cfi_offset %rbx, -56 Lcfi20: .cfi_offset %r12, -48 Lcfi21: .cfi_offset %r13, -40 Lcfi22: .cfi_offset %r14, -32 Lcfi23: .cfi_offset %r15, -24 movq %rsi, %rbx movq %rdi, -56(%rbp) callq __ZN3std4time7Instant3now17hc5a5b38c2510cf8bE movq %rax, -64(%rbp) movq %rbx, -48(%rbp) testq %rbx, %rbx je LBB2_9 xorl %r14d, %r14d leaq -336(%rbp), %r12 .p2align 4, 0x90 LBB2_2: movq -56(%rbp), %rax movq (%rax), %rax movq (%rax), %r15 movq 16(%rax), %rbx pxor %xmm0, %xmm0 movdqa %xmm0, -160(%rbp) movdqa %xmm0, -176(%rbp) movdqa %xmm0, -192(%rbp) movdqa %xmm0, -208(%rbp) movdqa %xmm0, -224(%rbp) movdqa %xmm0, -240(%rbp) movdqa %xmm0, -256(%rbp) movdqa %xmm0, -272(%rbp) movdqa %xmm0, -288(%rbp) movdqa %xmm0, -304(%rbp) movdqa %xmm0, -320(%rbp) movdqa %xmm0, -336(%rbp) movq $0, -144(%rbp) movq %r15, -136(%rbp) movq %rbx, -128(%rbp) xorl %r13d, %r13d cmpq $199, %rbx jbe LBB2_3 .p2align 4, 0x90 LBB2_13: movl $200, %edx movq %r12, %rdi movq %r15, %rsi callq _memcpy addq $200, %r15 addq $-200, %rbx movq %r15, -136(%rbp) movq %rbx, -128(%rbp) movdqa -304(%rbp), %xmm0 movdqa -288(%rbp), %xmm1 paddb -336(%rbp), %xmm0 paddb -320(%rbp), %xmm1 paddb -272(%rbp), %xmm0 paddb -256(%rbp), %xmm1 paddb -240(%rbp), %xmm0 paddb -224(%rbp), %xmm1 paddb -208(%rbp), %xmm0 paddb -192(%rbp), %xmm1 paddb -176(%rbp), %xmm0 paddb -160(%rbp), %xmm1 paddb %xmm0, %xmm1 pshufd $78, %xmm1, %xmm0 paddb %xmm1, %xmm0 pshufd $229, %xmm0, %xmm1 paddb %xmm0, %xmm1 movdqa %xmm1, %xmm0 psrld $16, %xmm0 paddb %xmm1, %xmm0 movdqa %xmm0, %xmm1 psrlw $8, %xmm1 paddb %xmm0, %xmm1 movdqa %xmm1, -352(%rbp) movzbl -144(%rbp), %eax addb -352(%rbp), %al addb -143(%rbp), %al addb -142(%rbp), %al addb -141(%rbp), %al addb -140(%rbp), %al addb -139(%rbp), %al addb -138(%rbp), %al addb -137(%rbp), %al addb %al, %r13b cmpq $200, %rbx jae LBB2_13 LBB2_3: movl $5, %esi leaq _str.8(%rip), %rdi callq __ZN3std5error205_$LT$impl$u20$core..convert..From$LT$$RF$$u27$b$u20$str$GT$$u20$for$u20$alloc..boxed..Box$LT$std..error..Error$u20$$u2b$$u20$core..marker..Sync$u20$$u2b$$u20$core..marker..Send$u20$$u2b$$u20$$u27$a$GT$$GT$4from17hbabb0ef23dd78831E movq %rdx, %rcx movl $17, %esi leaq -112(%rbp), %rdi movq %rax, %rdx callq __ZN3std2io5error5Error4_new17h399b6fceaf2b2ad7E cmpb $2, -112(%rbp) jb LBB2_8 movq -104(%rbp), %rbx movq 8(%rbx), %rdi movq 16(%rbx), %rax Ltmp14: callq *(%rax) Ltmp15: movq 16(%rbx), %rax movq 8(%rax), %rsi testq %rsi, %rsi je LBB2_7 movq 8(%rbx), %rdi movq 16(%rax), %rdx callq ___rust_deallocate LBB2_7: movl $24, %esi movl $8, %edx movq %rbx, %rdi callq ___rust_deallocate LBB2_8: incq %r14 movb %r13b, -336(%rbp) ## InlineAsm Start ## InlineAsm End cmpq -48(%rbp), %r14 jb LBB2_2 LBB2_9: leaq -80(%rbp), %rdi leaq -64(%rbp), %rsi callq __ZN3std4time7Instant7elapsed17h4a152db7d42dfbccE movq -80(%rbp), %rax movl -72(%rbp), %ecx movq %rax, -96(%rbp) movl %ecx, -88(%rbp) leaq -96(%rbp), %rdi callq __ZN4test11ns_from_dur17h77590a35c757ea7bE addq $312, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq LBB2_10: Ltmp16: movq %rax, %r14 movq 16(%rbx), %rax movq 8(%rax), %rsi testq %rsi, %rsi je LBB2_12 movq 8(%rbx), %rdi movq 16(%rax), %rdx callq ___rust_deallocate LBB2_12: movl $24, %esi movl $8, %edx movq %rbx, %rdi callq ___rust_deallocate movq %r14, %rdi callq __Unwind_Resume Lfunc_end2: .cfi_endproc .section __TEXT,__gcc_except_tab .p2align 2 GCC_except_table2: Lexception2: .byte 255 .byte 155 .byte 41 .byte 3 .byte 39 Lset22 = Lfunc_begin2-Lfunc_begin2 .long Lset22 Lset23 = Ltmp14-Lfunc_begin2 .long Lset23 .long 0 .byte 0 Lset24 = Ltmp14-Lfunc_begin2 .long Lset24 Lset25 = Ltmp15-Ltmp14 .long Lset25 Lset26 = Ltmp16-Lfunc_begin2 .long Lset26 .byte 0 Lset27 = Ltmp15-Lfunc_begin2 .long Lset27 Lset28 = Lfunc_end2-Ltmp15 .long Lset28 .long 0 .byte 0 .p2align 2 .section __TEXT,__literal16,16byte_literals .p2align 4 LCPI3_0: .long 1127219200 .long 1160773632 .long 0 .long 0 LCPI3_1: .quad 4841369599423283200 .quad 4985484787499139072 .section __TEXT,__literal8,8byte_literals .p2align 3 LCPI3_2: .quad 4617315517961601024 LCPI3_3: .quad 4607182418800017408 .section __TEXT,__text,regular,pure_instructions .p2align 4, 0x90 ``` </details>
I-slow,C-enhancement,T-compiler,A-error-handling,C-optimization
low
Critical
229,223,671
kubernetes
Hook initContainers into lifecycle
**Is this a BUG REPORT or FEATURE REQUEST?** (choose one): FEATURE REQUEST **Kubernetes version** (use `kubectl version`): ``` Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.2", GitCommit:"477efc3cbe6a7effca06bd1452fa356e2201e1ee", GitTreeState:"clean", BuildDate:"2017-04-19T22:51:55Z", GoVersion:"go1.8.1", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.0", GitCommit:"fff5156092b56e6bd60fff75aad4dc9de6b6ef37", GitTreeState:"clean", BuildDate:"2017-05-09T23:22:45Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"} ``` **Environment**: - **Cloud provider or hardware configuration**: `minikube` `xhyve` - **OS** (e.g. from /etc/os-release): `macosx` - **Kernel** (e.g. `uname -a`): `Darwin ML-VSITZ-OSX-SF 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64` - **Install tools**: - **Others**: **Feature**: `initContainers` feature works great for use cases when the initialization happens on the volumes. But oftentimes this initialization have to happen in the service itself, e.g: inject a datasource in grafana before grafana is considered ready: pre-ready. `initContainers` feature doesn't seem o allow the container to be hooked to an specific moment of the lifecycle. `initContainers` feature should allow the container to be hooked to an specific moment of the lifecycle.
kind/feature,sig/apps,lifecycle/frozen
low
Critical
229,236,718
youtube-dl
Can't download OnDemandKorea Plus Content
## 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.05.14*. 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.05.14** ### 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 -v -u [email protected] -F http://www.ondemandkorea.com/inkigayo-e911.html [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'--verbose', u'-u', u'PRIVATE', u'-F', u'http://www.ondemandkorea.com/inkigayo-e911.html'] Type account password and press [Return]: [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2017.05.14 [debug] Python version 2.7.12 - Linux-2.6.32-042stab120.11-x86_64-with-Ubuntu-16.04-xenial [debug] exe versions: ffmpeg git-2017-04-04-dc1a1b8, ffprobe git-2017-04-04-dc1a1b8, rtmpdump 2.4 [debug] Proxy map: {} [debug] Using fake IP 3.203.158.190 (US) as X-Forwarded-For. [OnDemandKorea] inkigayo-e911: Downloading webpage ERROR: Unable to extract jw config; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 760, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 433, in extract ie_result = self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/ondemandkorea.py", line 52, in _real_extract webpage, 'jw config', group='options'), File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 782, in _search_regex raise RegexNotFoundError('Unable to extract %s' % _name) RegexNotFoundError: Unable to extract jw config; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. ... <end of log> ``` --- ### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**): - Single video: https://www.youtube.com/watch?v=BaW_jenozKc - Single video: https://youtu.be/BaW_jenozKc - Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. --- ### Description of your *issue*, suggested solution and other information Explanation of your *issue* in arbitrary form goes here. Please make sure the [description is worded well enough to be understood](https://github.com/rg3/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide as much context and examples as possible. If work on your *issue* requires account credentials please provide them or explain how one can obtain them. I would like to like to download content that's only available to ODK PLUS members, also ODK PLUS member can also download 1080p content, I try to put my username and password and doesn't work. This site uses Wordpress I don't know if that can help on something.
geo-restricted,account-needed
low
Critical
229,253,809
opencv
Persistence: overflow for long values
##### System information (version) - OpenCV => Current head - Operating System / Platform => Windows 64 Bit - Compiler => Visual Studio 2013 ##### Detailed description OpenCV cannot deserialize ``long long`` and truncates to int instead. long long a; fs["element"] >> a; does not compile because > opencv2/core/persistence.hpp(1242): error C2665: 'cv::read' : none of the 16 overloads could convert all the argument types But if you try to work around and instead use a double, an element bigger than ``INT_MAX`` is set to INT_MAX without any warning ##### Steps to reproduce int main(int argc, char* argv[]) { int intE; double longE, doubleE; cv::FileStorage fs; // Try it with YAML fs.open("%YAML 1.0\nintE: 2147483647\nlongE: 414748364711\ndoubleE: 414748364711.", cv::FileStorage::READ | cv::FileStorage::MEMORY); fs["intE"] >> intE; fs["longE"] >> longE; fs["doubleE"] >> doubleE; std::cout << intE << " " << longE << " " << doubleE << std::endl; // Try it with JSON fs.open("{\"intE\": 2147483647,\n\"longE\": 414748364711,\n\"doubleE\": 414748364711.}", cv::FileStorage::READ | cv::FileStorage::MEMORY | cv::FileStorage::Mode::FORMAT_JSON); fs["intE"] >> intE; fs["longE"] >> longE; fs["doubleE"] >> doubleE; std::cout << intE << " " << longE << " " << doubleE << std::endl; return 0; } produces the output > 2147483647 2.14748e+009 4.14748e+011 > 2147483647 2.14748e+009 4.14748e+011 but expected would be > 2147483647 4.14748e+011 4.14748e+011 > 2147483647 4.14748e+011 4.14748e+011 and the option to use ``cv::read`` for a long long
RFC
low
Critical
229,283,561
go
cmd/internal/src: XPos.After doesn't necessarily match Pos.After
XPos.After (and XPos.Before) compares XPoses with different bases according to their base index, which is determined by the order they're added to the PosTable. I think this is worrying because we don't currently have any code in the compiler to ensure PosBase are registered in order. Possible solutions I see: 1. Change XPos.After's signature to take a \*PosTable parameter and return the result of comparing the corresponding Pos values. 2. Change package syntax's parser to register PosBase with the PosTable during parsing. (Will require locking.) 3. Change package syntax's parser to collect all PosBase into a slice which we can register serially once parsing is done. /cc @griesemer
NeedsInvestigation,compiler/runtime
low
Minor
229,368,340
opencv
cv::drawMarker should support sub-pixel precision using shift parameter
Most of OpenCV's drawing functions support sub-pixel precision using the `shift` parameter. It would be nice to add support for that to `cv::drawMarker` too.
feature,category: imgproc
low
Minor
229,446,122
flutter
`flutter doctor` has strange adb message (even though I'm not running anything)
I don't have Android Studio installed, nor any Android devices connected. ``` Framework • revision 10decc7c19 (27 hours ago) • 2017-05-16 21:30:46 -0700 Engine • revision 6fef702cfa Tools • Dart 1.23.0-dev.11.11 Running "flutter packages upgrade" in posse_gallery... 7.7s Running flutter doctor... [✓] Flutter (on Mac OS X 10.12.4 16E195, channel master) • Flutter at /src/flutter • Framework revision 10decc7c19 (27 hours ago), 2017-05-16 21:30:46 -0700 • Engine revision 6fef702cfa • Tools Dart version 1.23.0-dev.11.11 [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.io/setup/#android-setup for detailed instructions). If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location. [✓] iOS toolchain - develop for iOS devices (Xcode 8.3.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 8.3.2, Build version 8E2002 • ios-deploy 1.9.1 • CocoaPods version 1.2.1 [✗] Android Studio (not installed) • Android Studio not found. Download from https://developer.android.com/studio/index.html (or visit https://flutter.io/setup/#android-setup for detailed instructions). adb server version (38) doesn't match this client (39); killing... [✓] Connected devices • Eric's iPhone • 245efaebda74df40169418839fff2a8368bcaae5 • ios • iOS 10.3.1 (14E304) ```
platform-android,tool,t: flutter doctor,P2,team-android,triaged-android
low
Minor
229,469,861
TypeScript
Plugins - support a 'willSave' hook
Background angelozerr/tslint-language-service#32. The tslint language server extension should support an option to auto fix lint rules with a fixer before a file is saved. The plugin API should support a willSave method that a plugin can use to perform an operation like auto fixing before the document is saved. In addition there needs to be request that the TypeScript language client like VS Code can use to inform the TypeScript language server that the user is about to save a file.
Suggestion,Awaiting More Feedback
low
Major
229,472,269
rust
rustdoc: disambiguate between types of the same name
As an extension to #38414 and #39589, any hyperlinked reference to some type should be checked against everything within that crate - within any dependent crate too, if possible. This will help clear the confusion between the perennial problem types in std, `std::result::Result` and `std::io::Result` (and to a lesser extent, `std::io::Write` and `std::fmt::Write`). Some before/after screenshots made with chrome's inspector with what I have in mind: ![Write for String](https://cloud.githubusercontent.com/assets/5217170/26168430/a47f6148-3aff-11e7-8952-2e631c064ffb.png) ![File::create -> Result](https://cloud.githubusercontent.com/assets/5217170/26168525/f73fc274-3aff-11e7-9c69-181fbd2995ca.png)
T-rustdoc,C-enhancement
medium
Major
229,519,721
go
doc: add screencast to docs
This is a tracking bug to add screencasts to the docs. A brief draft of the content we want to cover with the screencasts, these are not sorted by priority at this moment - please contribute to the discussion of prioritization: - Installation - Platform dependent - Environment set-up - Platform dependent - GOPATH / src/pkg/bin etc - go version - go help - Writing "Hello, world!" - Where does it go? - Editors, plugins, etc (link to them) - Importing packages in the std lib / How to access documentation? golang.org/pkg/ - go install/run/build - Writing your first library - Package names and how to import them - Documentation - Using non stdlib packages - Importing non stdlib packages - go get (-u) - Testing - go test - Code coverage - Managing your GOPATH - go list - Folder structure - Multiple GOPATHs - Managing dependencies - Vendoring? - Versioning? Semver - Contributing to GitHub repos - Forks and PRs - Contributing to the Go project - Set up - Gerrit - Contributing guidelines - Debugging - Performance profiling - Benchmarks - Load testing - Pprof - Flame Graphs - Execution tracer Constraints on videos: - Platform dependent steps should be contained into different video variations - Videos should be short (target ~2 minutes, absolute max 5 minutes) - Each video should mirror a specific document, to improve cross linking /cc @campoy @goinggo @jessfraz
Documentation,NeedsInvestigation,DevExp
low
Critical
229,574,038
vscode
See git diff of two files in horizontal layout
I followed the thread of impementing horizontal window splitting, thank you for that. I don't seem to be able to achieve the same effect with the git diff view: ![image](https://cloud.githubusercontent.com/assets/8936090/26190163/535845a6-3ba8-11e7-99b8-c65047c9987d.png) Am I missing something? I know there's a toggle inline diff, but that's not the solution. If it's not implemented I think it should be, for the same reasons.
feature-request,diff-editor
high
Critical
229,618,058
opencv
cudaDeviceSynchronize() affects multi-thread CUDA performance
##### System information (version) - OpenCV => any version (with CUDA support) - Operating System / Platform => any platform (with Nvidia Graphics Card) - Compiler => any cuda compiler ##### Detailed description Here are some codes in functions that support `cv::cuda::Stream`: ```cpp if (stream == 0) CV_CUDEV_SAFE_CALL( cudaDeviceSynchronize() ); ``` If I use CUDA kernel in only one thread on a card, these codes work fine. However, if I have two threads on a card, one (call it thread A) uses default stream (or do not specify a stream explicitly), and another one (thread B) uses a different stream, it causes problem. Thread A will call `cudaDeviceSynchronize()` and it will synchronize the whole device rather than the default stream. So kernels on thread B will be synchronized too, and so thread A will wait for completion of thread B, which may cause serious performance problem. In fact, it's safe to call `cudaStreamSynchronize(stream)` even if `stream == 0`. According to CUDA document, `cudaStreamSynchronize` will safely synchronize the default stream if `stream == 0`. Is it possible to replace all `cudaDeviceSynchronize` in OpenCV ? Thanks. ##### Steps to reproduce Use two threads in program, one uses default stream and one uses another stream. ```cpp // Some function definitions on different threads. void f1(cv::cuda::GpuMat & lhs, cv::cuda::GpuMat & rhs) { cv::cuda::transpose(lhs, rhs); } void f2(cv::cuda::GpuMat & lhs, cv::cuda::GpuMat & rhs, cv::cuda::Stream &_stream) { cv::cuda::transpose(lhs, rhs, stream); } cv::cuda::GpuMat a, b, c, d; /* ... some other codes ... */ std::thread t1(f1, a, b); std::thread t2(f2, c, d); ```
bug,category: gpu/cuda (contrib)
low
Major
229,744,458
opencv
cuda::reprojectImageTo3D does not handle missing values
In the CPU version of `reprojectImageTo3D` there is an option to ignore (or handle) pixels where no disparity was calculated (giving them, for example, an enormous Z-value). This is useful for quick filtering of the output point cloud. There is no such option in the CUDA version, but it should be fairly trivial to implement. I'm happy to have a crack at this, if a new function signature can be agreed. Currently: cuda::reprojectImageTo3D(InputArray disp, OutputArray xyzw, InputArray Q, int dst_cn=4, Stream& stream=Stream::Null()) We could add an overload to keep it similar to the CPU version: cuda::reprojectImageTo3D(InputArray disp, OutputArray xyzw, InputArray Q, int HandleMissing=0, int dst_cn=4, Stream& stream=Stream::Null())
feature,category: gpu/cuda (contrib)
low
Minor
229,757,752
go
cmd/compile: improve loop rotation
This is a follow-on to #20355 for the 1.10 cycle. See CL 43491 for more discussion of these points. * Should we work from innermost loops out? * Do we want to move contained loops? * Do we want to reinstate some form of loop skipping? * Other improvements? See also #18977 and #20356. cc @randall77 @dr2chase @cherrymui
Performance,compiler/runtime
low
Minor
229,759,579
go
x/build: mention notable benchmark changes in Gerrit comment
I think it's going to be too easy to miss significant benchmark changes with the current state of things where the URL to perf.golang.org is always included in the final Gerrit comment. I think the gerrit comment should also mention any notable changes. /cc @quentinmit @josharian
Builders
low
Major
229,837,263
pytorch
Pad PackedSequences to original batch length
The current flow for handling variable length sequences in RNNs is: ```python packed_input = torch.nn.utils.rnn.pack_padded_sequence(input, lengths) packed_output = rnn(packed)[0] output = torch.nn.utils.rnn.pad_packed_sequence(packed_output) ``` The output size of the Variable returned by pad_packed_sequence is determined by the max length in lengths: https://github.com/pytorch/pytorch/blob/master/torch/nn/utils/rnn.py#L106. However, this only works in recovering the original size of the input if the max length sequence has no padding (max length == length dim of batched input). For normal, sensible batching this makes sense and should be true. But if a model is using, say, DataParallel, the batch might be split such that there __is__ extra padding. And the output size from the RNN will be truncated (which might break other things down-stream). To fix this potentially unexpected behavior, I propose two possible simple patches. 1) A `max_batch_size` field is calculated from the original input and added to the PackedSequence namedtuple: https://github.com/pytorch/pytorch/blob/master/torch/nn/utils/rnn.py#L6 and used instead of https://github.com/pytorch/pytorch/blob/master/torch/nn/utils/rnn.py#L106 2) An optional `max_batch_size` parameter is added to pad_packed_sequence which would be used as an override. I prefer 1), but I suppose 2) has the advantage of being fully backwards compatible (even though it is discouraged to be directly creating or meddling with PackedSequence tuples, it is possible). cc @cpuhrsch
hackamonth,triaged,module: nestedtensor
low
Major
229,944,198
go
crypto/tls: customisable max TLS record size
Hi, The default TLS record/chunk size is 16kB - and this is what golang uses (`maxPlaintext` in crypto/tls/common.go I think). It would be useful if the max TLS record size was customisable via `Config`. Use-case is we have memory restricted embedded devices (running mbed TLS) talking TLS to a golang server. The client TLS (receive) buffer needs - in our case - to be less than 16kB to fit in memory - and the server and the client has to agree on this max size. For mbed TLS this is customisable using `MBEDTLS_SSL_MAX_CONTENT_LEN`.
Proposal-Accepted,NeedsFix,Proposal-Crypto
medium
Critical
229,965,628
TypeScript
module: "system" and outFile generates wrong module names
<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.4.0-dev.20170519 **Code** this Typescript code (on the main project) ```ts 'use strict' import { createStore, applyMiddleware, combineReducers } from 'redux' import { routerReducer, LOCATION_CHANGE } from 'react-router-redux' import { handleActions, Action } from 'redux-actions' import { Login, Data, Groups } from 'cim-typings' import { Initials } from 'cim-shared-ui/helpers' import * as RActions from './actions' ``` generates ```js System.register("reducers", ["redux", "react-router-redux", "redux-actions", "../../cim-shared-ui/helpers", "actions"], function (exports_2, context_2) { /* ... */ }) ``` which is wrong. "../../cim-shared-ui" should be "cim-shared-ui", because it's a `npm linked` package. not sure if the problem is the link itself, because I have this, and works correctly, which is also from the main project: ```ts 'use strict' import React from 'react' import { Data } from 'cim-typings' ``` ```js System.register("components/status", ["react", "cim-typings"], function (exports_5, context_5) { /* ... */ }) ``` tsconfig.json as follows: ```json { "exclude": [ "./node_modules", "./jspm_packages", "./dist" ], "include": [ "./generic.d.ts", "src/*.ts", "src/*.tsx", "src/**/*.tsx", "src/**/*.ts" ], "compilerOptions": { "module": "system", "jsx": "react", "target": "es5", "moduleResolution": "node", "allowSyntheticDefaultImports": true, "rootDir": "src", "newLine": "LF", "allowJs": false, "noImplicitAny": true, "baseUrl": "./", "noEmitOnError": true, "sourceMap": true, "alwaysStrict": true, "inlineSourceMap": false, "paths": { "*": [ "node_modules/@types/*", "*" ] }, "lib": [ "dom", "es2015", "es5" ], "outFile": "dist/app.js" } } ``` **Expected behavior:** module: "system" should output dependencies as authored **Actual behavior:** TS is trying to do something funny with the paths, and it's inconsistent with other npm linked packages. The only difference between the two is that `cim-typings` is a `commonjs` module, and `cim-shared-ui` is a `system` module
Bug
low
Critical
230,024,116
youtube-dl
SITE REQUEST: pruffme.com webinars live video downloads
Hello dearest coders. I want to ask you to code this pruffme.com site into YDL so it will get live feed to one .mp4 file, or what video format it has. The log: R:\>youtube-dl.exe -F -v https://pruffme.com/a1eae7cd-662c-4938-9d19-2448fb34db0d [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-F', '-v', 'https://pruffme.com/a1eae7cd-662c-4938-9d19-2448fb34db0d'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2017.05.18.1 [debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1 [debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4, rtmpdump 2.4 [debug] Proxy map: {} [generic] a1eae7cd-662c-4938-9d19-2448fb34db0d: Requesting header WARNING: Falling back on generic information extractor. [generic] a1eae7cd-662c-4938-9d19-2448fb34db0d: Downloading webpage [generic] a1eae7cd-662c-4938-9d19-2448fb34db0d: Extracting information ERROR: Unsupported URL: https://pruffme.com/a1eae7cd-662c-4938-9d19-2448fb34db0d Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\YoutubeDL.py", line 760,in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\extractor\common.py", line 433, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\extractor\generic.py", line 2795, in _real_extract youtube_dl.utils.UnsupportedError: Unsupported URL: https://pruffme.com/a1eae7cd-662c-4938-9d19-2448fb34db0d This video feed will be online for 3 hours only since 19:20 UTC+03 (22 minutes already passed), so - if you can, please take a look at that flash video url ASAP!:) Thanks in advance!!!
site-support-request
low
Critical
230,059,034
electron
Provide ffmpeg.so file that plays all common videos
Hey, I have been struggling with playing more than the few video codecs supported by electron by default. There are dozens of GitHub issues and posts somewhere else of people like me who are trying to get decent video support in electron. If I understand this correctly, the main issue is licensing. It's possible to compile electron with extended video support but that would require the project built with this to be licensed as some form of GPL. For my project ideas and those of others, this is not a problem as we would gladly contribute to the open source scene. However, I have failed many times to compile Electron myself and when you search the internet others have struggled with this too. I would really appreciate if the official maintainers could provide us with an `ffmpeg.so` file that supports all or most of the common video codecs. Oh the great stuff we could build with this. PS: I know that there is [WebChimera](http://www.webchimera.org/), but the maintainer is struggling with support for newer versions as VLC closes their APIs. Also, this is more of a hack and a "native" solution would be much much nicer.
enhancement :sparkles:
low
Critical
230,062,687
create-react-app
Add Travis test with empty NODE_PATH
Since Travis tests run with `NODE_PATH` specified, it doesn't catch issues in code that does something wrong on empty `NODE_PATH`. We should add end-to-end tests for starting, building, and running tests with empty `NODE_PATH`.
contributions: up for grabs!,tag: internal,difficulty: medium
low
Minor
230,122,637
go
x/exp/shiny: allow bounded types for Deque
Calls to window.NextEvent() and the processing of the returned event all happen in the same goroutine. For paint and size events, this can cause Deque to congest with stale events. Given the generic nature of type Deque, one method of addressing this is to allow declaring certain event types to be bounded, in that only N instances of the given type are ever allowed to exist and for simplicity let's say N=1. In a shiny application, I only ever care about the last size and paint events, but I don't think it's appropriate to fuss over those details during any sort of iteration. If I declare a package level event, I might also want to tell Deque to only store N=1 instances. To address this in an example program I wrote, I copy/pasted widget.RunWindow and inserted a small FIFO that exhausts Deque in a goroutine but only ever stores one instance of size and paint: https://github.com/dskinner/x/blob/01a0257ede3a13250b22e5328097aa9d1a6911f5/glw/example/glwidget/main.go#L207 The above isn't done at great effort as the size and paint events only fire when que is empty. A second implementation tracked what would have been que insert index and on NextEvent, checked each bound type if insert index is zero or decremented, finally delivering an event from que if no bounded was sent (but this was just an example program so I removed this). Providing some sort of `func (q *Deque) BoundType(T)` for the simple case of N=1 has a couple ramifications/questions: * This is no longer exactly a "Deque" as we'd begin dividing into buckets. I don't know if there's a bucket (or otherwise) queue type out there that already addresses what I'm raising, but I'd like to research that or get feedback on that before committing to any sort of proposal. * For the specific case I'm suggesting above where only the last event of a given type is ever stored, it is, I suppose, theoretically possible to never receive that event given the right sequence of events if each event takes its rightful place based on its original insert index (and not replace the first instance which would negate this). Regardless, I don't feel it's appropriate to replace the first instance with the last and I'm not sure I really consider this case a practical concern. Any feedback and/or thoughts for intention of Deque welcomed. @nigeltao
NeedsInvestigation
low
Major
230,166,596
youtube-dl
Site Support Request: www.opsgility.com
## 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.05.18.1*. 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.05.18.1** ### 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) - [X] 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.exe -u PRIVATE -p PRIVATE -v https://www.opsgility.com/courses/player/implementing-azure-virtual-machines [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-u', 'PRIVATE', '-p', 'PRIVATE', '-v', 'https://www.opsgility.com/courses/player/implementing-azure-virtual-machines'] [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252 [debug] youtube-dl version 2017.05.18.1 [debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1 [debug] exe versions: ffmpeg 2.2.3, ffprobe N-68399-g10ef8f0 [debug] Proxy map: {} [generic] implementing-azure-virtual-machines: Requesting header WARNING: Falling back on generic information extractor. [generic] implementing-azure-virtual-machines: Downloading webpage [generic] implementing-azure-virtual-machines: Extracting information ERROR: Unsupported URL: https://www.opsgility.com/courses/player/implementing-azure-virtual-machines Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\YoutubeDL.py", line 760, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\extractor\common.py", line 433, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\extractor\generic.py", line 2795, in _real_extract youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.opsgility.com/courses/player/implementing-azure-virtual-machines <end of log> ``` --- Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. --- ### Description of your *issue*, suggested solution and other information Explanation of your *issue* in arbitrary form goes here. Please make sure the [description is worded well enough to be understood](https://github.com/rg3/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide as much context and examples as possible. If work on your *issue* requires account credentials please provide them or explain how one can obtain them.
site-support-request,account-needed
low
Critical
230,190,103
youtube-dl
OSError: [Errno 22] Invalid argument
## 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.05.18.1*. 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.05.18.1** ### 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) --- ``` MY command Line: $@"-v --format m4a --hls-prefer-ffmpeg -o ""C:/DIRECTORY/%(title)s.%(ext)s"" {path}" ``` ``` [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', '--format', 'm4a', '--hls-prefer-ffmpeg', '-o', 'C:/Users/johni/Desktop/MusicDiscord/MusicBotV2/MusicBot/src/MusicBotV2/Music/%(title)s.%(ext)s', 'https://www.youtube.com/watch?v=NVb_3xpa55c'] [debug] Encodings: locale cp1252, fs mbcs, out cp1252, pref cp1252 [debug] youtube-dl version 2017.05.18.1 [debug] Python version 3.4.4 - Windows-10-10.0.14393 [debug] exe versions: ffmpeg 3.2.4 [debug] Proxy map: {} Traceback (most recent call last): File "__main__.py", line 19, in <module> File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\__init__.py", line 465, in main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\__init__.py", line 455, in _real_main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\YoutubeDL.py", line 1896, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\YoutubeDL.py", line 760, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\extractor\common.py", line 433, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\extractor\youtube.py", line 1397, in _real_extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\extractor\common.py", line 634, in _download_webpage File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\extractor\common.py", line 531, in _download_webpage_handle File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\extractor\common.py", line 487, in _request_webpage File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\extractor\common.py", line 699, in report_download_webpage File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\extractor\common.py", line 691, in to_screen File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\YoutubeDL.py", line 472, in to_screen File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\YoutubeDL.py", line 486, in to_stdout File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\YoutubeDL.py", line 475, in _write_string File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwgfs80it\build\youtube_dl\utils.py", line 1405, in write_string OSError: [Errno 22] Invalid argument Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1252'> OSError: [Errno 22] Invalid argument ... <end of log> ``` --- ### Description of your *issue*, suggested solution and other information I just get this error sometimes not all the time and have no idea why. As the path is not invalid. I am running on Windows 10
cant-reproduce
low
Critical
230,200,839
flutter
Shadow under Shrine app bar is darker than YouTube app bar shadow
Brought up by someone on Twitter. Here's a screenshot: ![screenshot_20170520-233414](https://cloud.githubusercontent.com/assets/5479/26281735/2eb4a7da-3db5-11e7-83fb-ec3811a1f559.png)
framework,f: material design,a: fidelity,P2,team-design,triaged-design
low
Major
230,238,277
go
proposal: spec: add read-only slices and maps as function arguments
Background --- I recently stumbled upon a bug and after hours of searching, I managed to find the culprit, which is a function that accidentally modifies the slice argument passed to it. The problem is that as I took several subsets of the original slice and gave them new identities, I forgot that they were still pointing to the original slice. I don't think this is an uncommon issue, and hence the proposal below. Proposal --- I would like to suggest the idea of defining a read-only slice and map in the function arguments. For example, we can define a function as follows: //function definition func MyFunction(const mySlice []byte, const myMap map[string][]byte) []byte //usage mySlice := []byte {0x00, 0x01} //normal slice definition. There is no weird _const_ whatsoever. myMap := make(map[string][]byte) //normal map definition. //you are still using slice and map as you normally would. Slice and map are still modifiable, //but MyFunction cannot alter the original variables. MyFunction(mySlice, myMap) //you can still make changes here myMap["Me"] = 0x01 or in the interface definition: `type MyInterface { MyFunction(const mySlice []byte) []byte }` Why slices and maps? --- With structs, interfaces and built-in types, it is easy to tell whether you want them to be modifiable or not. With slices and maps, it is not so easy to tell. Maps are probably less prone to accidental changes, but slices are tricky, especially when they get passed around many functions. Implementation Options --- Read-only slices and maps are shallow-copied upon being passed to the function. Hence, any accidental change is local to the function. I understand that this will not prevent interior mutability, but exterior mutability is good enough. I think this implementation option is probably less intrusive and there are fewer breaking changes to existing codes (if any) - possibly none. Alternatively, we may have a more elaborate system where the compiler will not compile if a function tries to modify a read-only slice/map. However, this leads to a very complex solution. What if a new sub-slice is taken from an existing read-only slice, should it be immutable too? Now, what if that sub-slice is passed into another function, should the compiler check whether the other function preserves the integrity of the sub-slice? I personally tend to lean with the first option. Syntax --- In order not to add any new keyword, I am thinking of reusing _const_, and it is also more intuitive to those familiar with C-family programming languages. However, I am open to suggestions. --- Let me know what you think. Thanks
LanguageChange,Proposal,LanguageChangeReview
high
Critical
230,340,520
opencv
Why not use the default in FileNode::operator >> ?
<!-- 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) - OpenCV => 3.2 ##### Detailed description The `cv::read(const FileNode& node, value, default )` [here](https://github.com/opencv/opencv/blob/3.2.0/modules/core/include/opencv2/core/persistence.hpp#L713) uses a default value but not the related `FileNode::operator >>` It would be useful to keep same behaviour on the operator side and quite easy to implement. For example the operator defined [here](https://github.com/opencv/opencv/blob/3.2.0/modules/core/include/opencv2/core/persistence.hpp#L1166) might become: ```.cpp template<typename _Tp> static inline void operator >> (const FileNode& n, _Tp& value) { //OLD read( n, value, _Tp()); read( n, value, value); // NEW } ``` I can agree that `_Tp()` object constructor should create the object in its default state but what with simple type like int and others ? Using suggested change should help to use application based defaults both for objects and simple types. Same for the [FileNodeIterator version](https://github.com/opencv/opencv/blob/3.2.0/modules/core/include/opencv2/core/persistence.hpp#L1142) and [std::string version](https://github.com/opencv/opencv/blob/3.2.0/modules/core/include/opencv2/core/cvstd.inl.hpp#L152) In addiciton, about the std::string version it would be also useful to add a cv::read version for it [here](https://github.com/opencv/opencv/blob/3.2.0/modules/core/include/opencv2/core/persistence.hpp#L716) because of unsupported cast of `value` by reference ```.cpp ... // available CV_EXPORTS void read(const FileNode& node, String& value, const String& default_value); // to add CV_EXPORTS void read(const FileNode& node, std::string& value, const std::string& default_value); ``` ##### Steps to reproduce For example ```.cpp class MyClass { Init() { m_myParam(5); // typical class initialization } bool ReadConfig() { Init(); ... // IF node["myParam"] IS NOT DEFINED // this is bad because m_myParam will become 0 node["myParam"] >> m_myParam; // to keep application default value: if(!node["myParam"].empty()) node["myParam"] >> m_myParam; // or cv::read(node["myParam"], m_myParam, m_myParam); ... } } ```
category: core,RFC
low
Critical
230,340,780
nvm
Documenting how to install NVM for all users
I needed a global install of NVM because I have some node based cron jobs and a few legacy applications that are rather picky about which version of node they are able to work on. For a time I worked around this by sourcing the nvm script everywhere but that seems to be a somewhat unmaintainable solution. The requirements I have: - NVM should just work in non-interactive sessions - Every user should be able to select a installed version of node (or use ```$ nvm exec```) - Some users should be able to install newer versions of node This is the solution I came up with: (shout out to @icecoldphp, for the initial version) 0. I've done this on a debian 8 machine, as the root user 1. Create a group called "nvm", ```# groupadd nvm``` 2. Add root to the nvm group ```# usermod -aG nvm root``` 3. Goto the ```/opt``` directory and create a directory called nvm - Make sure the groupd owner is nvm ```# chown :nvm ./nvm``` - Set the permissions so that the group is allowed to write in there and all file will inherit the group ```# chmod g+ws ./nvm``` 4. Follow the [git install](https://github.com/creationix/nvm#git-install) steps using ```/opt/nvm``` as the directory - To make sure the group can also write aliases, cache downloads and install global packages make sure the directories exist and have the correct permissions: ``` # mkdir /opt/nvm/.cache # mkdir /opt/nvm/versions # mkdir /opt/nvm/alias # chmod -R g+ws /opt/nvm/.cache # chmod -R g+ws /opt/nvm/versions # chmod -R g+ws /opt/nvm/alias ``` 5. Using the following snippet create ```/etc/profile.d/nvm.sh```: ```#/etc/profile.d/nvm.sh #!/bin/bash export NVM_DIR="/opt/nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" ``` 6. Ensure that the script is executable ```# chmod +x /etc/profile.d/nvm.sh``` 7. If you want to use nvm in non-interactive sessions as well make sure to source the nvm file in ```/etc/bash.bashrc``` before the line saying ```# If not running interactively, don't do anything``` by adding ```. /etc/profile.d/nvm.sh```. 8. For bash completion (which is inherently interactive ;) add ```[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"``` after the section about bash completion. Every user can select a version of node (as the permissions for public are ```r-x```) and users in the nvm group can install and remove versions of node (permissions for the group are ```rwx```). My questions are: - As a developer I know next to nothing about linux, could this be improved, is it bad style, etc? Any feedback is welcome. - Should this be documented in the NVM README.md?
root / multiuser issues
medium
Major
230,436,756
TypeScript
AllowJs and duplicate identifier
<!-- 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 --> Potential bug, potential feature, depending on how you look at it :) In a javascript file, using allowJs, shouldn't all valid javascript be valid to the typescript compiler? I found several of the other duplicate identifier issues that have been brought up. I don't see this being exactly the same thing though. **TypeScript Version:** 2.2.3 **Code** This is technically valid JS code. I wouldn't ever do it myself, but it happens in large codebases. ```js var amount = amount(); function amount() { return 123; } ``` It results in a duplicate identifier error on the `amount` symbol. I can definitely see this being the type of thing that typescript should prevent, but being that it's a .js file I'm kind of on the fence.
Suggestion,Awaiting More Feedback,Domain: JavaScript
low
Critical
230,453,383
go
time: time.Local is always UTC on Android
initLocal() in zoneinfo_android.go is hard-coded to UTC: https://github.com/golang/go/blob/bc495c5751201854366b422e5a642ac55b42414a/src/time/zoneinfo_android.go#L43-L46 ```golang func initLocal() { // TODO(elias.naur): getprop persist.sys.timezone localLoc = *UTC } ``` x/mobile currently uses a hack to set time.Local for gomobile android apps (https://github.com/golang/mobile/commit/730f563fbc4684e73445e98ea49d9f2b5b09a58c), but that predates the availability of tzdata on android (80b31c05e6ae37c09162406590b9e3b99f0fff9b). cc @eliasnaur @crawshaw #13581 #10857
NeedsInvestigation
low
Major
230,497,286
angular
ReactiveForms: FormArray.at could return undefined
<!-- 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. --> The `FormArray.at` method signature declares the return value to be `AbstractControl`. **Expected behavior** <!-- Describe what the behavior would be without the bug. --> The `FormArray.at` method signature declares the return value to be `AbstractControl | undefined`. Since: `FormArray.at` returns the result of accessing the contained `controls` array. `undefined` is returned when the supplied index is out-of-range, with respect to the target `FormArray`. Note: `Typescript` does not point out an issue, even with `strictNullChecks: true`. **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). --> ```typescript const formBuilder: FormBuilder = new FormBuilder(); const formArray: FormArray = formBuilder.array([]); const outOfRangeItemPositiveAt: AbstractControl = formArray.at(5); const outOfRangeItemNegativeAt: AbstractControl = formArray.at(-1); console.log(`outOfRangeItemPositiveAt is defined = [${!!outOfRangeItemPositiveAt}]`); console.log(`outOfRangeItemNegativeAt is defined = [${!!outOfRangeItemNegativeAt}]`); console.log(`outOfRangeItemPositiveAt = [${outOfRangeItemPositiveAt}]`); console.log(`outOfRangeItemNegativeAt = [${outOfRangeItemNegativeAt}]`); ``` **What is the motivation / use case for changing the behavior?** <!-- Describe the motivation or the concrete use case --> To indicate the possibility of an `undefined` result. **Please tell us about your environment:** <!-- Operating system, IDE, package manager, HTTP server, ... --> * **Angular version:** 4.1.3 <!-- Check whether this is still an issue in the most recent Angular version --> * **Browser:** [ Chrome ] <!-- All browsers where this could be reproduced --> * **Language:** [ TypeScript 2.3.2 | ES5 ] * **Node (for AoT issues):** `node --version` = v6.9.2
type: bug/fix,help wanted,freq1: low,area: forms,state: confirmed,cross-cutting: types,P4
low
Critical
230,497,539
neovim
glob fails to expand wildcard with wildignorecase and a parent directory without read permission
### Problem With `wildignorecase` set (without `fileignorecase`) `glob` fails to expand `*` in a path when one of the parent directories does not have read access. Suppose I want to run `glob` on the expression `temp/test/*`, where `temp` does not have the read flag set, but `test` does. This returns no results with `wildignorecase` set, but `temp/test/test.txt` does, provided the file exists. Without `wildignorecase` all files in the directory are returned. ### Expected behaviour The wildcard should expand, since `test` can be read. ### Steps to reproduce using `nvim -u NORC` Make directories and some file `test.txt`, set permissions, then start neovim (or vim) ``` :echo glob("temp/test/*", 0, 1) :set wildignorecase :echo glob("temp/test/*", 0, 1) :echo glob("temp/test/test.txt", 0, 1) ``` This will return, ``` ['temp/test/test.txt'] [] ['temp/test/test.txt'] ``` ### Vim (version: ) behaves differently? Vim 8.0 behaves the same way.
bug-vim,completion,filesystem
low
Minor
230,541,357
go
plugin: Add support for closing plugins
Adding support for closing plugins would give a simple way to do hot code reloading in long running applications like web servers. This would add another method to `src/plugin/plugin.go` and a new file `src/plugin/dl_close.go` that would handle closing the dlhandle and destroying the go symbol map. It would also add the handle as an un-exported unsafe pointer to the go plugin struct. The main issue is how to signal that a plugin has been closed without breaking API compatibility. Currently the plugin has a channel called `loaded` which is closed when the plugin is loaded. The simplest solution is to add another channel which is closed when the plugin is closed, however this doesn't seem very 'neat' to me.
FeatureRequest,compiler/runtime
high
Critical
230,543,993
kubernetes
CRI: Image IDs and references
CRI in its current state mostly passes an undefined image “string” when invoking image-related operations (e.g., pull, status, remove). I think it's time we revist to define/clarify better. Here are my thoughts: Below is a list of terms used for 1. **Image ID**: A canonical, content-addressable image identifier. This corresponds to the Image ID defined in the OCI image spec. 2. **Pullable reference(s)**: The syntax of a pullable reference is tied to the distribution method of the images. An image ID can map to multiple pullable references. In CRI, there are two such types of references (mainly adopted from the docker API): a. `RepoDigests`: `<registry>/<repository>@<manifest digest>`. E.g., `gcr.io/google-containers/nginx@sha256:01b86864da3937bf94571a816f1191c89d2ebd6c641bc692bcb3445b7d8520ef` b. `RepoTags`: `<registry>/<repository>:<tag>`. e.g., `gcr.io/google-containers/nginx:1.3` 3. **Manifest digest**: Digest of the manifest file. It can be part of the pullable reference (e.g., `RepoDigests`). 4. **Local reference**: What the container runtime uses to refer to the image on the node. This could be the image ID or not. For CRI, we mainly care about (1) and (2). I think we should restrict pullable references to pulling, and uses the image ID for all other operations. - **PullImage**: Pulls an image by a pullable reference and returns its ID. - **RemoveImage**: Removes an image by its ID. - **ImageStatus**: Inspects an image by its ID and returns information of the image, including the ID and a list of pullable references known by the runtime. - **ResolveImage**: A new RPC call to translate a pullable reference into the image ID. - The configuration used to create a container should include the ID of the image. ResolveImage will be added to further break down the internal operations of the ImageService and make each call more focused. For example, to create a container, kubelet will need to perform the following calls. * Call `ResolveImage(pullableRef)` to get the Image ID * Call `ImageStatus(imageID)` to check if the image exists on the node. * Call `PullImage(pullableRef)` to pull down the image. Without `ResolveImage`, `ImageStatus` would need to accept both pullable references and image IDs as an input. Another issue is how we tackle the pullable references. These pullable references are distribution- (and can be runtime-) specific. CRI should not need to understand or distinguish pullable references such as `RepoDigests` and `RepoTags`. Unfortunately, kubernetes API reports [`RepoDigests` as `ImageID` in the `ContainerStatuses`](https://github.com/kubernetes/kubernetes/pull/34473). To continue support this, we can choose one of the options below. 1. Preserve both `RepoDigests` and `RepoTags` in CRI (w/ renaming). 2. Add hacks (regex) in kubelet to *guess* which reference is the `RepoDigests`. 3. Combine both into a `References` field in CRI. Suggest runtimes to sort pullable references based on representativeness. Change dockershim implementation to always return `RepoDigests` as the first one to be consumed by kubelet. I am leaning towards (3) since there is no consensus on image distribution yet, and (3) gives us the most flexibility. Thoughts and suggestions? @kubernetes/sig-node-api-reviews @mrunalp @stevvooe @feiskyer @Random-Liu @dchen1107 WARNING: Some of the proposed changes will not be backward compatible, but I think it's more important to get the API in a better state, than to ensure backward compatibility right now. Others may object though.
area/api,sig/node,kind/feature,lifecycle/frozen
medium
Critical
230,566,164
TypeScript
Quick Fix: Suggest correct capitalization when importing a file with incorrect capitalization
<!-- 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.3 Mac does not enforce file name capitalization. I had an issue where tests was passing on my Mac and I was getting an error like this in Linux: ``` Cannot find module './isKind' from 'index.ts' ``` File was named `iskind` by mistake. It should be easy to detect errors like this by reading all files in target directory and look for similar file names. This can go beyond capitalization and can suggest correct file names with edit distance. **Code** ```ts import {foo} from './myModule' ```
Suggestion,Domain: Quick Fixes,Experience Enhancement
low
Critical
230,566,209
neovim
feedkeys(.., 'x!') causes nvim to exit when stdin is /dev/null
- `nvim --version`: 0.2.0 - Vim (version: ) behaves differently? 8.0.0197 - Operating system/version: Debian GNU/Linux ### Actual behaviour `call feedkeys('a', 'x!')`, in `Test_cursorhold_insert`, causes nvim to exit when stdin is `/dev/null`. <details> <summary>Stack trace when <code>read_error_exit()</code>is called</summary> ``` (gdb) bt #0 os_inchar (buf=buf@entry=0x7ffff5507f3a "", maxlen=maxlen@entry=71, ms=ms@entry=0, tb_change_cnt=tb_change_cnt@entry=9) at ./src/nvim/os/input.c:137 #1 0x00005555556672c4 in inchar (buf=0x7ffff5507f3a "", maxlen=215, wait_time=0, tb_change_cnt=9)at ./src/nvim/getchar.c:2423 #2 0x00005555556690d1 in vgetorpeek (advance=0) at ./src/nvim/getchar.c:2243 #3 0x000055555566a160 in char_avail () at ./src/nvim/getchar.c:1567 #4 0x00005555555d575c in insert_check (state=0x7fffffff9570) at ./src/nvim/edit.c:540 #5 0x0000555555741f8b in state_enter (s=s@entry=0x7fffffff9570) at ./src/nvim/state.c:25 #6 0x00005555555d61c0 in insert_enter (s=0x7fffffff9570) at ./src/nvim/edit.c:458 #7 edit (cmdchar=<optimized out>, startln=<optimized out>, count=1) at ./src/nvim/edit.c:1335 #8 0x00005555556a9010 in invoke_edit (repl=<optimized out>, cmd=<optimized out>, startln=<optimized out>, cap=<optimized out>, cap=<optimized out>) at ./src/nvim/normal.c:7520 #9 0x00005555556b5157 in normal_execute (state=state@entry=0x7fffffff9690, key=<optimized out>) at ./src/nvim/normal.c:1137 #10 0x00005555556b6166 in normal_cmd (oap=oap@entry=0x7fffffff97d0, toplevel=toplevel@entry=true) at ./src/nvim/normal.c:7935 #11 0x0000555555636e06 in exec_normal (was_typed=was_typed@entry=true) at ./src/nvim/ex_docmd.c:8166 #12 0x00005555555bc78a in nvim_feedkeys (keys=..., mode=..., escape_csi=escape_csi@entry=true) at ./src/nvim/api/vim.c:114 #13 0x00005555555ef916 in f_feedkeys (argvars=0x7fffffff9be0, rettv=<optimized out>, fptr=<optimized out>) at ./src/nvim/eval.c:8252 #14 0x00005555555fae6f in call_func (funcname=funcname@entry=0x7ffff550c3c0 "feedkeys", len=len@entry=8, rettv=rettv@entry=0x7fffffff9df0, argcount_in=argcount_in@entry=2, argvars_in=argvars_in@entry=0x7fffffff9be0, argv_func=argv_func@entry=0x0, firstline=1, lastline=1, doesrange=0x7fffffff9ddc, evaluate=true, partial=0x0, selfdict_in=0x0) at ./src/nvim/eval.c:6389 #15 0x00005555555ffbcf in get_func_tv (name=name@entry=0x7ffff550c3c0 "feedkeys", len=8, rettv=rettv@entry=0x7fffffff9df0, arg=arg@entry=0x7fffffff9de0, firstline=firstline@entry=1, lastline=lastline@entry=1, doesrange=0x7fffffff9ddc, evaluate=1, partial=0x0, selfdict=0x0) at ./src/nvim/eval.c:6129 #16 0x0000555555604567 in ex_call (eap=0x7fffffffa030) at ./src/nvim/eval.c:2760 #17 0x0000555555639694 in do_one_cmd (cookie=0x7ffff54d5800, fgetline=0x5555555fc6c0 <get_func_line>, cstack=0x7fffffffa1c0, flags=7, cmdlinep=0x7fffffff9f80) at ./src/nvim/ex_docmd.c:2240 #18 do_cmdline (cmdline=cmdline@entry=0x0, fgetline=fgetline@entry=0x5555555fc6c0 <get_func_line>,cookie=cookie@entry=0x7ffff54d5800, flags=flags@entry=7) at ./src/nvim/ex_docmd.c:606 #19 0x00005555555f9fdc in call_user_func (fp=fp@entry=0x7ffff5444480, argcount=argcount@entry=0, argvars=argvars@entry=0x7fffffffacf0, rettv=rettv@entry=0x7fffffffaf00, firstline=firstline@entry=1,lastline=lastline@entry=1, selfdict=<optimized out>) at ./src/nvim/eval.c:21089 #20 0x00005555555fab67 in call_func (funcname=funcname@entry=0x7ffff5534480 "Test_cursorhold_insert", len=len@entry=22, rettv=rettv@entry=0x7fffffffaf00, argcount_in=argcount_in@entry=0, argvars_in=argvars_in@entry=0x7fffffffacf0, argv_func=argv_func@entry=0x0, firstline=1, lastline=1, doesrange=0x7fffffffaeec, evaluate=true, partial=0x0, selfdict_in=0x0) at ./src/nvim/eval.c:6374 #21 0x00005555555ffbcf in get_func_tv (name=name@entry=0x7ffff5534480 "Test_cursorhold_insert", len=22, rettv=rettv@entry=0x7fffffffaf00, arg=arg@entry=0x7fffffffaef0, firstline=firstline@entry=1, lastline=lastline@entry=1, doesrange=0x7fffffffaeec, evaluate=1, partial=0x0, selfdict=0x0) at ./src/nvim/eval.c:6129 #22 0x0000555555604567 in ex_call (eap=0x7fffffffb140) at ./src/nvim/eval.c:2760 #23 0x0000555555639694 in do_one_cmd (cookie=0x7ffff54d5000, fgetline=0x5555555fc6c0 <get_func_line>, cstack=0x7fffffffb2d0, flags=3, cmdlinep=0x7fffffffb090) at ./src/nvim/ex_docmd.c:2240 #24 do_cmdline (cmdline=<optimized out>, fgetline=0x5555555fc6c0 <get_func_line>, cookie=0x7ffff54d5000, flags=flags@entry=3) at ./src/nvim/ex_docmd.c:606 #25 0x0000555555602f04 in ex_execute (eap=0x7fffffffba90) at ./src/nvim/eval.c:19302 #26 0x0000555555639694 in do_one_cmd (cookie=0x7ffff54d5000, fgetline=0x5555555fc6c0 <get_func_line>, cstack=0x7fffffffbc20, flags=7, cmdlinep=0x7fffffffb9e0) at ./src/nvim/ex_docmd.c:2240 #27 do_cmdline (cmdline=cmdline@entry=0x0, fgetline=fgetline@entry=0x5555555fc6c0 <get_func_line>,cookie=cookie@entry=0x7ffff54d5000, flags=flags@entry=7) at ./src/nvim/ex_docmd.c:606 #28 0x00005555555f9fdc in call_user_func (fp=fp@entry=0x7ffff5501240, argcount=argcount@entry=1, argvars=argvars@entry=0x7fffffffc750, rettv=rettv@entry=0x7fffffffc960, firstline=firstline@entry=1,lastline=lastline@entry=1, selfdict=<optimized out>) at ./src/nvim/eval.c:21089 #29 0x00005555555fab67 in call_func (funcname=funcname@entry=0x7ffff550c200 "RunTheTest", len=len@entry=10, rettv=rettv@entry=0x7fffffffc960, argcount_in=argcount_in@entry=1, argvars_in=argvars_in@entry=0x7fffffffc750, argv_func=argv_func@entry=0x0, firstline=1, lastline=1, doesrange=0x7fffffffc94c, evaluate=true, partial=0x0, selfdict_in=0x0) at ./src/nvim/eval.c:6374 #30 0x00005555555ffbcf in get_func_tv (name=name@entry=0x7ffff550c200 "RunTheTest", len=10, rettv=rettv@entry=0x7fffffffc960, arg=arg@entry=0x7fffffffc950, firstline=firstline@entry=1, lastline=lastline@entry=1, doesrange=0x7fffffffc94c, evaluate=1, partial=0x0, selfdict=0x0) at ./src/nvim/eval.c:6129 #31 0x0000555555604567 in ex_call (eap=0x7fffffffcba0) at ./src/nvim/eval.c:2760 #32 0x0000555555639694 in do_one_cmd (cookie=0x7fffffffcb40, fgetline=0x555555631c60 <get_loop_line>, cstack=0x7fffffffcd30, flags=7, cmdlinep=0x7fffffffcaf0) at ./src/nvim/ex_docmd.c:2240 #33 do_cmdline (cmdline=cmdline@entry=0x7ffff54cf400 "\" This script is sourced while editing the .vim file with the tests.", fgetline=fgetline@entry=0x55555562cc90 <getsourceline>, cookie=cookie@entry=0x7fffffffd310, flags=flags@entry=7) at ./src/nvim/ex_docmd.c:606 #34 0x000055555562d2e6 in do_source (fname=fname@entry=0x7ffff5437ba3 "runtest.vim", check_other=check_other@entry=0, is_vimrc=is_vimrc@entry=0) at ./src/nvim/ex_cmds2.c:2935 #35 0x000055555562dd4c in cmd_source (fname=0x7ffff5437ba3 "runtest.vim", eap=<optimized out>) at ./src/nvim/ex_cmds2.c:2680 #36 0x0000555555639694 in do_one_cmd (cookie=0x0, fgetline=0x0, cstack=0x7fffffffd710, flags=10, cmdlinep=0x7fffffffd4d0) at ./src/nvim/ex_docmd.c:2240 #37 do_cmdline (cmdline=<optimized out>, fgetline=0x0, cookie=0x0, flags=10) at ./src/nvim/ex_docmd.c:606 #38 0x00005555555ac576 in exe_commands (parmp=0x7fffffffdce0) at ./src/nvim/main.c:1633 #39 main (argc=<optimized out>, argv=<optimized out>) at ./src/nvim/main.c:508 ``` </details> ### Expected behaviour nvim gracefully handles getting EOF from stdin (common during testing). ### Steps to reproduce using `nvim -u NORC` ``` make -B -C src/nvim/testdir test_autocmd.res </dev/null ``` I'm always able to reproduce this when building Neovim inside of [sbuild], which is preventing me from uploading 0.2.0 to Debian. When manually trying to reproduce it using the above make command, it works fine on some systems but fails on others. Not quite sure why, on some systems, it fails in sbuild but works manually. Vim has some [code] to handle a similar situation, but in that case it's calling `fill_input_buf(FALSE);` which causes it to return from the function before calling `read_error_exit();`. [sbuild]: https://wiki.debian.org/sbuild [code]: https://github.com/vim/vim/blob/2a0b06def49198aef45ef173f524a638a700f9c9/src/ui.c#L1855-L1878
bug,input
low
Critical
230,652,760
rust
Tracking issue for `step_trait` stabilization
Split off from https://github.com/rust-lang/rust/issues/27741 because the stabilization path for `step_by` has moved to being on iterators (https://github.com/rust-lang/rust/pull/41439), and thus not using the `Step` trait. - [ ] Remove `step`, `steps_between`, and `is_negative` once Range::step_by is deleted - [ ] Replace `replace_zero` and `replace_one` with something more useful (some options: https://github.com/rust-lang/rfcs/pull/1980#issuecomment-301348126) - [ ] Change `steps_between_by_one` so that `Range<u128>` can be `TrustedLen` (rather than it only working well with types that fit in `usize`) - [ ] Make a decision on how `steps_between` should work https://github.com/rust-lang/rust/issues/48117 (and probably more)
T-libs-api,B-unstable,C-tracking-issue,A-iterators,Libs-Tracked
high
Critical
230,758,944
TypeScript
Determine when isDeclaration and isDeclarationName should check for special property assignments
**TypeScript Version:** nightly (2.4.0-dev.20170523) Currently neither function handles special JS assignments such as `exports.x = ...`. We should review each case where we use these functions and see if special assignments need to be handled.
Infrastructure
low
Minor
230,799,628
TypeScript
Type narrowing with foo.constructor
**TypeScript Version:** 2.3.1 **Code** ```ts class FooTask { foo: number; } class BarTask { bar: number; } type taskType = FooTask|BarTask; function createEvent(task: taskType) { if (task instanceof FooTask) { task.foo; // Works. } switch (task.constructor) { case FooTask: task.foo; // Fails. } } ``` It would be nice if the second worked like the first; narrowed the type of `task` appropriately.
Suggestion,Awaiting More Feedback
medium
Critical
230,803,589
opencv
OpenCVDetectCUDA.cmake doesn't detect properly CUDA ARCH types
When compiling opencv it takes ages on core i7 8x thread and I think the reason lies in nonfunctional OpenCVDetectCUDA.cmake file, which instead of detect single architecture pulls in all available: `-gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61` ##### System information (version) - OpenCV => 3.1 - Operating System / Platform => Gentoo AMD64, Nvidia GTX 960M - Compiler => GNU GCC 7.1.0 - OpenCV => :grey_question: Is it error or am I missing some config parameters to be passed into CMAKE process externally? In Gentoo system we go with ebuild system and portage for packages to manage. In ebuild file we support following CUDA related configuration for opencv: ``` # =================================================== # CUDA build components: nvidia-cuda-toolkit takes care of GCC version # =================================================== -DWITH_CUDA=$(usex cuda) -DWITH_CUBLAS=$(usex cuda) -DWITH_CUFFT=$(usex cuda) -DWITH_NVCUVID=OFF # -DWITH_NVCUVID=$(usex cuda) -DCUDA_NPP_LIBRARY_ROOT_DIR=$(usex cuda "${EPREFIX}/opt/cuda" "") ``` Coudl I extend it by passing additionally to CMAKE system following parameters (in my case): CUDA_GENERATION = "Maxwell" I tried to pass additionally -DCUDA_GENERATION="Maxwell" to the Gentoo ebuild and viola it works, now I see when copilation runs only this snippet: ` -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52`
bug,priority: low,category: build/install,category: gpu/cuda (contrib)
low
Critical
230,808,276
vscode
PreLaunchTask: support passing parameters from configuration to preLaunchTask
Currently when invoking preLaunchTask, the only possible is the task name. It would be great if properties in the associated configuration can be passed to preLaunchTask. Scenario: I am writing a pre-launch task to automate remote node.js debugging. The pre-launch task will launch the node.js process remotely and establish a SSH tunnel (port forwarding) back to local computer. And then debugger connects to that forwarded port to start debugging. The node.js debugger port is specified in launch.json file, and there is no good way for the pre-launch task to get the debugger port. The problem can be solved if preLaunchTask can take parameters from the configuration. For example, tasks.json allow '$config.port' as args: { "command": "dotnet", "taskName": "prepareDebug", "suppressTaskName": true, "args": [ "/myhelper.dll", "debug", "start", "$config.port" ], "isBuildCommand": false, "showOutput": "always", "options": { "cwd": "${workspaceRoot}" } } @isidorn @weinand
feature-request,debug,tasks
high
Critical
230,810,764
TypeScript
Private Member Minification Design Proposal
**Problem:** For front end data binding frameworks such as Angular, Knockout, React, etc, making the choice to use typescript results in larger minified output files. **Proposal:** Add a tsconfig option "minifyPrivateMembers" (default false) **Details:** Since front end binding frameworks can have references to members in html, we cannot easily minify these members using existing tooling. For example, using google closure compiler would require using an externs file for all the public properties I want to keep. That would be awful to hand maintain. It'd be really nice if typescript could just minify anything marked private. Typescript wouldn't even have to minify anything else, uglify can do the rest. **Edit:** removed incorrect example. Minification of private members in the greeter example is 18% better than minification in javascript only. I also expect many classes would have **many** more private members than public members, so savings could be much greater than 18%. Actually with many custom knockout bindingHandlers almost every single member can be made private! ``` this["greeting"] var x = "gr" + "eeting"; var y = this[x]; ``` If typescript notices that a class is using string access with variable strings to its own members it **could** choose to not minify private members for that class. Alternatively if this feature just breaks code like that then I think that's okay as long as it's documented. It will already break external use of private members, and that's why the option defaults to false. Created from here: https://github.com/Microsoft/TypeScript/issues/8#issuecomment-303423733
Suggestion,Needs More Info
medium
Critical
230,838,893
opencv
solvePnPRansac behavior wrt to the documentation
In OpenCV 3.2 (and since OpenCV 3.0), `solvePnPRansac` does not behave as we could expect after reading the corresponding [documentation](http://docs.opencv.org/3.2.0/d9/d0c/group__calib3d.html#ga50620f0e26e02caa2e9adc07b5fbf24e). The function prototype is: `bool cv::solvePnPRansac(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess = false, iterationsCount = 100, reprojectionError = 8.0, confidence = 0.99, inliers = noArray(), flags = SOLVEPNP_ITERATIVE)`. The parameter `useExtrinsicGuess` will not be used and the choice of the PnP method can be misleading. The [RANSAC](http://old.vision.ece.ucsb.edu/~zuliani/Research/RANSAC/docs/RANSAC4Dummies.pdf) algorithm implemented currently can be summarized as (when the number of points is `> 4`): - for a certain number of iterations: - select randomly 5 points to construct the "Minimal Sample Sets" (MSSs) and estimate the camera pose using `SOLVEPNP_EPNP` (see [here](https://github.com/opencv/opencv/blob/3.2.0/modules/calib3d/src/solvepnp.cpp#L250)) **[Hypothesize]** - compute the consensus set, an inlier is a 3D point with a reprojection error (using `rvec` and `tvec` estimated with MSSs) below a threshold **[Test]** - "terminates when the probability of finding a better ranked CS drops below a certain threshold" ([here](https://github.com/opencv/opencv/blob/3.2.0/modules/calib3d/src/ptsetreg.cpp#L237) I think) or after reaching the maximum number of iterations - estimate the final `rvec` and `tvec` using the inliers from the best consensus set with `flags` provided by the user (if `SOLVEPNP_P3P` it is `SOLVEPNP_EPNP` that is used instead), `useExtrinsicGuess` is ignored and sets to false ([see](https://github.com/opencv/opencv/blob/3.2.0/modules/calib3d/src/solvepnp.cpp#L287)) The documentation should be updated to reflect this behavior (`useExtrinsicGuess` is ignored and about the choice of the PnP method for the two "stages") and maybe we should add a quick description of the implementation of the RANSAC algorithm. Better, I think the implementation can be improved: - in the MSSs step, 5 points is used but in my opinion 4 points should be used as it is the minimum number of points required to compute the camera pose, even with `SOLVEPNP_EPNP` (see [here](http://cvlabwww.epfl.ch/~lepetit/papers/lepetit_ijcv08.pdf)) - in the MSSs step, only `SOLVEPNP_EPNP` is used (alternative could be `SOLVEPNP_P3P`, `SOLVEPNP_AP3P`, `SOLVEPNP_ITERATIVE`) - how to deal with `useExtrinsicGuess=true` and the provided `rvec`, `tvec`? - it can be used when estimating the pose with the MSSs if `SOLVEPNP_ITERATIVE` is chosen - it can also be used for the final pose estimation with `SOLVEPNP_ITERATIVE` - how to deal with `useExtrinsicGuess=false` and `SOLVEPNP_ITERATIVE`? - for the MSSs step, there is no problem as `SOLVEPNP_ITERATIVE` will call internally another function to provide an estimate of the solution - but for the final pose estimation, currently it will call another function that will compute the pose using all the inliers but I think we could use instead the `rvec` and `tvec` computed from the MSSs and from the best consensus set (should be tested, maybe the iterative method does not converge well if too far, that's why `useExtrinsicGuess` is set to `false`?) - when there is only 4 points, `SOLVEPNP_P3P` is used for the MSSs. I don't know if the full RANSAC method will be done (at least 1 iteration? + the final pose computed with `SOLVEPNP_EPNP`). If this is the case, maybe we could directly call `solvePnP` with `SOLVEPNP_P3P` and return? - how to use two differents methods for the pose computed from the MSSs and for the pose computed from the best consensus set (it is currently the case implicitly with `SOLVEPNP_EPNP` used for the MSSs and `flags` for the final pose)? I will try to implement and see if my suppositions give better results (use 4 points, use `rvec` and `tvec` from the best consensus set). Not sure yet how to compare (generate synthetic data?, use real case data?).
feature,category: documentation,category: calib3d
low
Critical
230,875,938
neovim
Lua: interrupt / cancel Lua code
There is a known issue both with Vim and Neovim: if you write an endless loop inside `:lua` then it can’t be interrupted. The lua itself handles the problem by simply running the following ```C static void lstop (lua_State *L, lua_Debug *ar) { (void)ar; /* unused arg. */ lua_sethook(L, NULL, 0, 0); luaL_error(L, "interrupted!"); } static void laction (int i) { signal(i, SIG_DFL); /* if another SIGINT happens before lstop, terminate process (default action) */ lua_sethook(globalL, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1); } ``` at SIGINT handler: apparently lua authors are feeling lucky because this code is not really reentrant (handler should not be called in the middle of `signal()` call). We can do something similar: ``` /// Hook used to interrupt current lua code /// /// @param[in] lstate Lua state. /// @param[in] ar Debugging information, unused. static void nlua_interrupt_hook(lua_State *const lstate, lua_Debug *const ar) FUNC_ATTR_NONNULL_ALL { lua_sethook(lstate, NULL, 0, 0); luaL_error(lstate, "interrupted!"); } /// Currently running lua interpreter state /// /// NULL if lua is not running or if it was already interrupted. volatile lua_State *volatile running_lstate = NULL; /// Interrupt currently running lua interpreter /// /// To be used from interrupt handler. Code derived from lua signal handlers. void nlua_interrupt(void) { lua_State *const lstate = (lua_State *)running_lstate; running_lstate = NULL; if (lstate != NULL) { lua_sethook(lstate, nlua_interrupt_hook, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1); } } /// Like lua_pcall, but set running_lstate before entering and reset it at exit /// /// Does not have errfunc argument because it is not used. /// /// @param lstate Lua interpreter state. /// @param[in] nargs Number of arguments to the called function. /// @param[in] nresults Number of expected results. /// /// @return true if errored out, false otherwise. bool nlua_pcall(lua_State *const lstate, const int nargs, const int nresults) FUNC_ATTR_NONNULL_ALL { lua_State *const saved_lstate = running_lstate; assert(saved_lstate == running_lstate || saved_lstate == NULL); running_lstate = lstate; const bool ret = (bool)lua_pcall(lstate, nargs, nresults, 0); running_lstate = saved_lstate; return ret; } ``` and call `nlua_interrupt` in `process_interrupts`, but this is not only not reentrant this is also not thread-safe (which lua authors can’t be bothered with because their handler is for single-threaded applications). Since we are apparently not handling actual SIGINT thread safety may *partially* be protected by mutexes I think. The question: would it be fine to work with this like the following: 1. Replace all `lua_pcall` calls with `nlua_pcall`. 2. Add `nlua_interrupt` call. 3. Add a mutex to `nlua_interrupt` and `nlua_pcall`. Note: when I said “partially” I meant that while input thread is calling `nlua_interrupt()` main thread may call `debug.sethook` (this is why pointer semantically has two `volatile` there: volatile pointer to volatile memory) and I can protect only `running_lstate` (volatile pointer, not volatile memory) manipulations. or do somebody have other ideas? Currently I may only suggest additionally mocking `debug.sethook` to use the mutex as well, but `lua_sethook` calls can’t be protected like this. AFAIR both calls should be rare though. Note that `lua_sethook` is as simple as ```C #define resethookcount(L) (L->hookcount = L->basehookcount) LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count) { if (func == NULL || mask == 0) { /* turn off hooks? */ mask = 0; func = NULL; } L->hook = func; L->basehookcount = count; resethookcount(L); L->hookmask = cast_byte(mask); return 1; } ``` , though I have not checked luajit sources yet.
enhancement,needs:design,input,lua
low
Critical
230,905,923
realworld
Validation Messages Spec
Looking at the API spec I noticed that the clients are expecting validation errors in the form of ```json { "errors":{ "body": [ "can't be empty" ] } } ``` However, I didn't see any specs about the validation messages expected. I think this would be helpful knowing what types of validation errors we should be looking out for
issue in core repo,v2
low
Critical
230,933,605
opencv
OpenCL optimization for Snapdragon830 GPU on android
##### System information (version) - OpenCV => 3.2.0 - Operating System / Platform => android/arm64-v8a - Compiler => ninja, cmake parameters: cmake <opencv-dir> -GNinja -DANDROID_ABI:STRING="arm64-v8a" -DANDROID_NDK:PATH=<ndk-bundle-dir> -DWITH_OPENCL:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_TOOLCHAIN_FILE:FILEPATH=<opencv-dir>/platforms/android/android.toolchain.cmake -DOPENCV_EXTRA_MODULES_PATH:PATH=<opencv-contrib-dir>/modules ##### Detailed description OpenCL optimization is not applied to Haar detector on our embedded Snapdragon 830 GPU (but only on Intel or AMD GPUs). We had to modify OpenCV code and rebuild in order to gain Haar detector offloading from CPU to GPU. We suggest a change and ask to examine our suggestion in the OpenCV developer perspective. ##### Steps to reproduce cascadedetect.cpp on line 610 checks the condition (*) if (ocl::Device::getDefault().isAMD() || ocl::Device::getDefault().isIntel()) and, if satisfied, sets localSize to (8,8). As a result, the function detectMultiScaleNoGrouping is computed on the GPU, because use_ocl is true. We have changed the condition (*) to if ( ! ocl::Device::getDefault().isNVidia() ) and, as a result, openCL optimization has been applied to our device as well (GPU load was observed and cpu load went down, the results were identical). We did not gain speedup, runtimes were similar, but did gain reduction of CPU load.
feature,category: core,category: ocl
low
Minor