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
256,435,263
TypeScript
JSX: Add a way to specify children as not a part of props
Right now there's no way to specify what children representation is, except specifying `ElementChildrenAttribute` inside JSX namespace. It's heavily coupled with React representation for children which implies that children is a part of props. This makes impossible to enable type checking for children with implementations which store children separately, for instance https://github.com/dfilatov/vidom/wiki/Component-properties. Probably it could be `ElementChildrenProperty` (like `ElementAttributesProperty`).
Suggestion,In Discussion,Domain: JSX/TSX
low
Major
256,445,676
react
Form restoration & React hydration
**Do you want to request a *feature* or report a *bug*?** Bug **Reproduction** 1. Open https://codesandbox.io/p/sandbox/form-restoration-react-hydration-cz1xgj?file=%2Fapp%2Fpage.js%3A2%2C1, see the source 2. Open https://cz1xgj-3000.csb.app/ 3. Fill in the input, for example, you can type "foo" 4. Press submit 5. Undo the navigation 6. See how the "input value" is outdated, it doesn’t match what's inside the textbox. https://github.com/facebook/react/assets/3165635/d29dd884-8896-4b59-8a55-16eb5145dfc7 **What is the current behavior?** Let's say you start filling a form input type text or a select element with `foo`. Then you click on a link and press the back button. The browser back-forward cache (or maybe the form restauration logic) will kick in and change the initial value of the form elements. You will get the `foo` value back in the input. However, React doesn't account for it when the component is controlled. For end-users, it means that they will try to submit a form because they see values in the inputs, but it won't work. They need to go back to each field and make a "fake" change so that React registers it. This issue could also be worked around by not controlling the inputs, but I'm not sure how popular form libraries handle this. **What is the expected behavior?** I expect React to trigger an `onChange` event to replicate the actual form value. At the fundamental level, there is a coordination issue between the browser and React. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** - React `@latest` (v18.2.0). - Chrome `@latest` (v112.0) **Details** We have been using the following hack on Material UI: ```js componentDidMount() { // Fix SSR issue with the go back feature of the browsers. // Let's say you start filling the input with "foo", you change the page then after comes back. // The browser will reset the input value to "foo", but we also need to tell React about it. this.handleChange({ target: this.input, }); } ``` But it comes with issues: https://github.com/mui/material-ui/pull/8110. So instead, we tried simulating a change event [as suggested in Stack Overflow](https://stackoverflow.com/questions/23892547/what-is-the-best-way-to-trigger-onchange-event-in-react-js) but it doesn't work anymore ```js var event = new Event('input', { bubbles: true }); element.dispatchEvent(event); ``` So for now, we are going to disable the cache with `<form autoComplete="off">`.
Type: Bug,Type: Feature Request,Component: DOM
low
Critical
256,453,901
go
plugin: plugin.Open() segfault with statically linked binaries
**What version of Go are you using (`go version`)?** go version go1.9 linux/amd64 **Does this issue reproduce with the latest release?** Yes **What operating system and processor architecture are you using (`go env`)?** GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/opt/gopath" GORACE="" GOROOT="/opt/go" GOTOOLDIR="/opt/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build683959130=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" **What did you do?** Compiled the simple plugin example described in the plugin [docs](https://golang.org/pkg/plugin/) with the -static flag go run -ldflags '-extldflags "-static"' main.go **What did you expect to see?** The same output as building without the -static flag: go run main.go Hello, number 7 **What did you see instead?** Segfault in cgo runtime: go run -ldflags '-extldflags "-static"' main.go \# command-line-arguments /tmp/go-link-658275617/000000.o: In function `pluginOpen': /tmp/workdir/go/src/plugin/plugin_dlopen.go:19: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking fatal error: unexpected signal during runtime execution [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x0] runtime stack: runtime.throw(0x52c324, 0x2a) /opt/go/src/runtime/panic.go:605 +0x95 runtime.sigpanic() /opt/go/src/runtime/signal_unix.go:351 +0x2b8 goroutine 1 [syscall, locked to thread]: runtime.cgocall(0x459260, 0xc420053c18, 0xc42000e010) /opt/go/src/runtime/cgocall.go:132 +0xe4 fp=0xc420053be8 sp=0xc420053ba8 pc=0x401f84 plugin._Cfunc_pluginOpen(0x25cdfe0, 0xc42000e010, 0x0) plugin/_obj/_cgo_gotypes.go:98 +0x4e fp=0xc420053c18 sp=0xc420053be8 pc=0x45758e plugin.open.func3(0x25cdfe0, 0xc42000e010, 0xc42001c0a0) /tmp/workdir/go/src/plugin/plugin_dlopen.go:102 +0xae fp=0xc420053c58 sp=0xc420053c18 pc=0x4589ae plugin.open(0x52ce1a, 0x4c, 0x0, 0x0, 0x0) /tmp/workdir/go/src/plugin/plugin_dlopen.go:102 +0x1d1 fp=0xc420053e88 sp=0xc420053c58 pc=0x457c31 plugin.Open(0x52ce1a, 0x4c, 0xc42007a000, 0xe, 0xc420012000) /opt/go/src/plugin/plugin.go:31 +0x35 fp=0xc420053ec0 sp=0xc420053e88 pc=0x4570c5 main.loadPlugins()
NeedsInvestigation
low
Critical
256,468,034
go
encoding/xml: very low performance in xml parser
### What version of Go are you using (`go version`)? 1.9 ### Does this issue reproduce with the latest release? True ### What operating system and processor architecture are you using (`go env`)? Windows ### What did you do? I trying to parse large files with SAX with go, and get decadent performance. I rewrite code in C#, and get maximum performance. ```go file, err := os.Open(filename) handle(err) defer file.Close() buffer := bufio.NewReaderSize(file, 1024*1024*256) // 33554432 decoder := xml.NewDecoder(buffer) for { t, _ := decoder.Token() if t == nil { break } switch se := t.(type) { case xml.StartElement: if se.Name.Local == "House" { house := House{} err := decoder.DecodeElement(&house, &se) handle(err) } } } ``` ```c# using (XmlReader reader = XmlReader.Create(filename) { while (reader.Read()) { switch (reader.NodeType) { case XmlNodeType.Element: if (reader.Name == "House") { //Code } break; } } } ``` ### What did you expect to see? Mature and fast xml parser in golang. ### What did you see instead? The bottleneck in SAX xml parsing with go is CPU, instead of low HDD io performance.
Performance,NeedsInvestigation
medium
Major
256,486,894
electron
WebRequest can't using multi time with a type event.
```javascript const {session} = require('electron') // Modify the user agent for all requests to the following urls. const filter_mainFrame = { urls: ['*://example.com/*'] } const filter_stylesheet = { urls: ['*://otherpage.com/*'] } session.defaultSession.webRequest.onBeforeSendHeaders(filter_mainFrame, (details, callback) => { if(details.resourceType=="mainFrame") callback({cancel: true}) }) session.defaultSession.webRequest.onBeforeSendHeaders(filter_stylesheet, (details, callback) => { if(details.resourceType=="stylesheet") callback({cancel: true}) }) ``` i think it only work with `filter_stylesheet `. I want it to work both filters, but not possible.
enhancement :sparkles:
low
Major
256,488,166
vscode
Enable fuzzy matching for picker
Have a quick pick control with these values `["hello", "hello_there"]` Type `ht` or `hello_` -> `hello_there` will show up Type `he_` -> no results
feature-request,api,quick-pick
medium
Critical
256,493,671
vscode
Feature request - undo after moving cursor should optionally just put the cursor back, without undoing
There's a feature I'm missing that I've used in other IDE's, when finishing typing, moving somewhere else (for example to select+copy some variable name), then pressing CMD+Z should bring the cursor back to the last edit location without actually undoing the typing there. I know there's some "last cursor position" keyboard shortcut, but I believe this should be a first-class functionality of the undo, like it is in other editors (I remember this from webstorm, but I'm pretty sure the muscle memory for doing this comes from way before webstorm). What do you think? Thanks - VSCode Version: 1.16 - OS Version: OSX 10.11
feature-request,editor-core,undo-redo
medium
Major
256,508,518
go
runtime: big performance penalty with runtime.LockOSThread
This issue reopens #18023. There it was observed that if a server goroutine is locked to OS thread, such locking imposes big performance penalty compared to the same server code but without handler being locked to OS thread. Relevant [golang-nuts thread](https://groups.google.com/forum/#!topic/golang-nuts/WqVEThZnQkM) discusses this and notes that for case when runtime.LockOSThread was used the number of context switches is 10x (ten times, not 1000x times) more compared to the case without OS thread locking. https://github.com/golang/go/issues/18023#issuecomment-328194383 notices the context switch can happen because e.g. `futex_wake()` in kernel can move woken process to a different CPU. More, it was found that essentially at every CGo call lockOSThread is used internally by Go runtime: https://github.com/golang/go/blob/ab401077/src/runtime/cgocall.go#L107 so even if user code does not use LockOSThread, but uses CGo calls on server side, there are preconditions to presume similar kind of slowdown. With above in mind https://github.com/golang/go/issues/18023#issuecomment-328194383 shows a dirty patch that spins a bit in `notesleep()` before going to kernel to `futex_wait()`. This way it is shown that 1) large fraction of performance penalty related to LockOSThread can go away, and 2) the case of CGo calls on server can also receive visible speedup: ``` name old time/op new time/op delta Unlocked-4 485ns ± 0% 483ns ± 1% ~ (p=0.188 n=9+10) Locked-4 5.22µs ± 1% 1.32µs ± 5% -74.64% (p=0.000 n=9+10) CGo-4 581ns ± 1% 556ns ± 0% -4.27% (p=0.000 n=10+10) CGo10-4 2.20µs ± 6% 1.23µs ± 0% -44.32% (p=0.000 n=10+9) ``` The patch is for sure not completely right (and probably far away from being right) as always spinning unconditionally should sometimes bring harm instead of good. But it shows that with proper scheduler tuning it is possible to avoid context switches and perform better. I attach my original post here for completeness. Thanks, Kirill /cc @rsc, @ianlancetaylor, @dvyukov, @aclements, @bcmills ---- https://github.com/golang/go/issues/18023#issuecomment-328194383: Let me chime in a bit. On Linux the context switch can happen, if my reading of [futex_wake()](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/futex.c?id=cef5d0f9#n1502) is correct (which is probably not), because e.g. [wake_up_q()](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/sched/core.c?id=cef5d0f9#n450) via calling `wake_up_process()` -> [try_to_wake_up()](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/sched/core.c?id=cef5d0f9#n1947) -> [select_task_rq()](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/sched/core.c?id=cef5d0f9#n1531) can select another cpu ``` cpu = cpumask_any(&p->cpus_allowed); ``` for woken process. The Go runtime calls `futex_wake()` in [notewakeup()](https://github.com/golang/go/blob/ab401077/src/runtime/lock_futex.go#L130) to wake up an M that was previously stopped via [stopm](https://github.com/golang/go/blob/ab401077/src/runtime/proc.go#L1666)() -> [notesleep()](https://github.com/golang/go/blob/ab401077/src/runtime/lock_futex.go#L139) (the latter calls `futexwait()`). When LockOSThread is used an M is dedicated to G so when that G blocks, e.g. on chan send, that M, if I undestand correctly, has high chances to stop. And if it stops it goes to `futexwait` and then context switch happens when someone wakes it up because e.g. something was sent to the G via channel. With this thinking the following patch: ```diff diff --git a/src/runtime/lock_futex.go b/src/runtime/lock_futex.go index 9d55bd129c..418fe1b845 100644 --- a/src/runtime/lock_futex.go +++ b/src/runtime/lock_futex.go @@ -146,7 +157,13 @@ func notesleep(n *note) { // Sleep for an arbitrary-but-moderate interval to poll libc interceptors. ns = 10e6 } - for atomic.Load(key32(&n.key)) == 0 { + for spin := 0; atomic.Load(key32(&n.key)) == 0; spin++ { + // spin a bit hoping we'll get wakup soon + if spin < 10000 { + continue + } + + // no luck -> go to sleep heavily to kernel gp.m.blocked = true futexsleep(key32(&n.key), 0, ns) if *cgo_yield != nil { ``` makes BenchmarkLocked much faster on my computer: ``` name old time/op new time/op delta Unlocked-4 485ns ± 0% 483ns ± 1% ~ (p=0.188 n=9+10) Locked-4 5.22µs ± 1% 1.32µs ± 5% -74.64% (p=0.000 n=9+10) ``` ---- I also looked around and found: essentially at every CGo call lockOSThread is used: https://github.com/golang/go/blob/ab401077/src/runtime/cgocall.go#L107 With this in mind I modified the benchmark a bit so that no LockOSThread is explicitly used, but server performs 1 and 10 simple C calls for every request: ``` CGo-4 581ns ± 1% 556ns ± 0% -4.27% (p=0.000 n=10+10) CGo10-4 2.20µs ± 6% 1.23µs ± 0% -44.32% (p=0.000 n=10+9) ``` which shows the change brings quite visible speedup. This way I'm not saying my patch is right, but at least it shows that much can be improved. So I suggest to reopen the issue. Thanks beforehand, Kirill /cc @dvyukov, @aclements, @bcmills ---- full benchmark source: (`tmp_test.go`) ```go package tmp import ( "runtime" "testing" ) type in struct { c chan *out arg int } type out struct { ret int } func client(c chan *in, arg int) int { rc := make(chan *out) c <- &in{ c: rc, arg: arg, } ret := <-rc return ret.ret } func _server(c chan *in, argadjust func(int) int) { for r := range c { r.c <- &out{ret: argadjust(r.arg)} } } func server(c chan *in) { _server(c, func(arg int) int { return 3 + arg }) } func lockedServer(c chan *in) { runtime.LockOSThread() server(c) runtime.UnlockOSThread() } // server with 1 C call per request func cserver(c chan *in) { _server(c, cargadjust) } // server with 10 C calls per request func cserver10(c chan *in) { _server(c, func(arg int) int { for i := 0; i < 10; i++ { arg = cargadjust(arg) } return arg }) } func benchmark(b *testing.B, srv func(chan *in)) { inc := make(chan *in) go srv(inc) for i := 0; i < b.N; i++ { client(inc, i) } close(inc) } func BenchmarkUnlocked(b *testing.B) { benchmark(b, server) } func BenchmarkLocked(b *testing.B) { benchmark(b, lockedServer) } func BenchmarkCGo(b *testing.B) { benchmark(b, cserver) } func BenchmarkCGo10(b *testing.B) { benchmark(b, cserver10) } ``` (`tmp.go`) ```go package tmp // int argadjust(int arg) { return 3 + arg; } import "C" // XXX here because cannot use C in tests directly func cargadjust(arg int) int { return int(C.argadjust(C.int(arg))) } ```
NeedsInvestigation,compiler/runtime
high
Major
256,534,905
neovim
Multiple cursors (again)
See also #211, #3845, #299 Multiple cursors. Even though other ways of doing things may be more powerful, there are still users who'd prefer to use them. There are some definite problems with "virtual cursors" like in [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors). >Is not that easy. It also requires multiple buffers, like when you copy using (i.e.) six carets and then pastes accordingly in the six current positions. >This also means every caret can have it's own selection and context, so the solution of "virtual carets" is unfeasible because when (for example) a plugin relies on a caret-position-change-event it will break thanks to the wrongly assumption that the event did indeed happen. ~ @Ivanca There's already been plenty of discussion on this, so let's try to keep away from "why" (because people want it, and it's useful for some things) and focus on the "how". That is, how to expand vims underlying metaphors to support multiple cursors cleanly and powerfully.
enhancement,multicursor
high
Critical
256,536,954
rust
Poor error message with type alias and external crate
The following code: https://play.rust-lang.org/?gist=3a06bcc680135c042135ca45984379f7&version=stable ```rust extern crate num; use num::One; use num::rational::BigRational; fn main() { BigRational::pow(&BigRational::one(), 23); } ``` Gives the following error: ``` error[E0599]: no function or associated item named `pow` found for type `num::rational::Ratio<num::BigInt>` in the current scope --> src/main.rs:7:5 | 7 | BigRational::pow(BigRational::one(), 23); | ^^^^^^^^^^^^^^^^ | = note: the method `pow` exists but the following trait bounds were not satisfied: `num::BigInt : num::PrimInt` ``` This is poor for several reasons: * The error message talks about `num::rational::Ratio<num::BigInt>` when the code uses `BigRational` - to a new user it isn't clear that this is a type alias * It says the function does not exist, but then also says it exists and isn't applicable. In addition to being more confusing than useful (debatably), there's nothing the end user can do about it: - They can't change the type parameter to satisfy the bound (since it's a type alias in an external crate) - They can't modify the implementation to use a different bound (again, because it's in the external crate)
C-enhancement,A-diagnostics,T-compiler
low
Critical
256,543,270
vscode
Selection, highlighting and search colors conflict with each other
- VSCode Version: Code 1.16.0 (787b31c0474e6165390b5a5989c9619e3e16f953, 2017-09-06T16:27:49.891Z) - OS Version: Windows_NT x64 6.1.7601 - Extensions: Extension|Author (truncated)|Version ---|---|--- intellij-idea-keybindings|k--|0.2.13 selectline-statusbar|tom|0.0.2 <!-- Launch with `code --disable-extensions` to check. --> Reproduces without extensions: Yes --- Background colors for the editor selection, word highlighting and search matches all conflict with each other in an unexpected way, which seems to be caused by multiple bugs in color priorities and mixing rules. ### Text selection color is not restored after searching The following rules set all three highlighting colors to `#FF0000` and text selection to `#00FF00` on a black background. "workbench.colorCustomizations": { "editor.background": "#000000", "editor.foreground": "#FFFFFF", "editor.lineHighlightBackground": "#000000", "editor.selectionHighlightBackground": "#FF0000", "editor.findMatchBackground": "#FF0000", "editor.findMatchHighlightBackground": "#FF0000", "editor.findRangeHighlightBackground": "#000000", "editor.selectionBackground": "#00FF00", "editor.inactiveSelectionBackground": "#00FF00" } Normal selection works as expected: ![2017-09-11_00-37-43](https://user-images.githubusercontent.com/7759622/30253230-6a5fb4aa-9689-11e7-9587-d2fa735e04d0.gif) **Case 1**: put the cursor at the start of the second line and press Ctrl+D ("Add Selection To Next Find Match") three times, none of the three selections become partially or completely green. Since there's no search bar opened, I expect the text selection color to apply here. Pressing Shift+Left to shrink selection re-applies the selection color: ![2017-09-10_20-48-29](https://user-images.githubusercontent.com/7759622/30251514-5631aa30-9669-11e7-8102-1d6e204be5e5.gif) Changing both `editor.findMatch*` settings to different colors and repeating the steps above doesn't change anything, selected regions are still red. This is even more confusing if you use the search bar, because multiple cursors for Ctrl+D don't get drawn or animated in that mode (**case 2**). **Case 3**: put the cursor at the start of the file, press Ctrl+F, type "aaa", press Esc (here I expect green color to be applied to the selection, but it doesn't), press Shift+Left. Only then the selection color appears. ![2017-09-10_20-22-40](https://user-images.githubusercontent.com/7759622/30251300-c0cafa9e-9665-11e7-904f-08a5c39d1103.gif) This looks a bit different if `editor.findMatchBackground` is set to `#0000FF`, but the green color is still not applied after hitting Esc: ![2017-09-10_21-12-57](https://user-images.githubusercontent.com/7759622/30251654-c1c89134-966c-11e7-8fca-f7f83f566549.gif) **Case 4**: while "aaa" is still the last searched term, put the cursor at the start of the file, press F3 ("Find Next") and then Esc. This is the only way I could force the green selection color to appear right after using the search: ![2017-09-10_20-34-21](https://user-images.githubusercontent.com/7759622/30251443-eec11fa8-9667-11e7-83c7-222bca9740c5.gif) **Case 5**: there's something weird going on with the first match. If you repeat the steps from the case above but press F3 several times, after hitting Esc the color of the first match disappears completely: ![2017-09-10_20-42-42](https://user-images.githubusercontent.com/7759622/30251498-e0786bf8-9668-11e7-95aa-58011f9d4894.gif) --- Expected behavior for all cases above: `editor.selectionBackground` color should be applied to all selected regions when the selection is made without opening the search bar or after it was closed. ### Inconsistent blending of `findMatch*` colors The following rules set text selection to `#303030` (to affect other colors as little as possible), regions with the same content as selection to `#FF0000`, and current/other search matches to `#0000FF`/`#00FF00`. "workbench.colorCustomizations": { "editor.background": "#000000", "editor.foreground": "#FFFFFF", "editor.lineHighlightBackground": "#000000", "editor.selectionHighlightBackground": "#FF0000", "editor.findMatchBackground": "#0000FF", "editor.findMatchHighlightBackground": "#00FF00", "editor.findRangeHighlightBackground": "#000000", "editor.selectionBackground": "#303030", "editor.inactiveSelectionBackground": "#303030" } In this setup, depending on how and where the search bar is opened, the highlighting of matches changes in an unpredictable and seemingly random way. **Case 6**: remove the last searched term from the search bar, put the cursor at the start of the file, press Ctrl+F, type "aaa", press Enter or F3 several times. Both `editor.findMatch*` are blended with alpha 50% with the red `editor.selectionHighlightBackground` . ![2017-09-10_22-49-54](https://user-images.githubusercontent.com/7759622/30253129-7e2c12aa-9687-11e7-887a-ce320d84756a.gif) **Case 7**: while "aaa" is the last searched term, put the cursor at the start of the file, press Ctrl+F, then F3 or Enter several times. Unblended green `editor.findMatchHighlightBackground` appears until you select search matches, then it changes to blended colors from the previous case. ![2017-09-11_00-10-25](https://user-images.githubusercontent.com/7759622/30253025-83d9a520-9685-11e7-9e08-01a563346a71.gif) **Case 8**: while "aaa" is the last searched term, put the cursor at the start of the file and press F3 several times (same as in case 5). All colors are unblended, but `editor.findMatch*` apply only to the first match. ![2017-09-11_00-20-51](https://user-images.githubusercontent.com/7759622/30253093-fd4c348a-9686-11e7-9580-ce571d190c68.gif) **Case 9**: put the cursor at the start of the second line and press F3 several times. None of `editor.findMatch*` apply at all. ![2017-09-11_00-29-05](https://user-images.githubusercontent.com/7759622/30253159-244ce290-9688-11e7-99f2-223c125777c9.gif) --- In all four cases the expected behavior would be to apply `editor.findMatch*` correctly no matter how the search was triggered. Also, blending is undocumented and very unexpected: `editor.selection*` and `editor.findMatch*` pairs seem to be designed to mirror each other, with each active only in their respective editor mode. But only `editor.selectionHighlightBackground` is blended with one or both colors from the other pair, and there's no way to influence or override this. Since there are two pairs, blending seems completely unnecessary to me.
feature-request,editor-theming
high
Critical
256,543,945
godot
Area2D does not report input events if it is not in a collision layer
**Operating system or device, Godot version, GPU Model and driver (if graphics related):** Windows 7 - 64bits Godot 2.2 **Issue description:** Area2D does not report input events if it is not in a collision layer. I think the collision layers have nothing to do with the detection of input events so it should always detect them (when it is pickable, obviously). **Link to minimal example project:** [Area2D Input Bug.zip](https://github.com/godotengine/godot/files/1290967/Area2D.Input.Bug.zip) (Run with _Visible Collision Shapes_)
bug,topic:physics,topic:input
low
Critical
256,545,138
kubernetes
Smarter openapi generator
Our openapi generator works like the following at the moment. ``` openapi-gen \ --input-dirs "target,dep1,dep2" \ --output-package "somewhere" ``` the generated openapi `.go` file will contain all types from target, dep1 and dep2. It will include some types not referenced in target. This will increase the weight of a user apiserver if the openapi spec contains a lot of unnecessary stuff. A smarter openapi generator should be ``` openapi-gen \ --target-dirs "target" \ --dep-dirs "dep1,dep2" \ --output-package "somewhere" ``` The generated spec should be contains all the types from `target` and the types in `dep1,dep2` that have been referenced in `target`. In this way, the generated openapi `.go` file. will only contain necessary types. /kind feature /sig api-machinery After discussing with @mbohlool, we see 2 approaches that both do 2 passes of the types definition. @mbohlool suggests the first approach. - Build a dependency tree in the first pass and generate the openapi spec in the second pass. - Build the openapi spec for all in the first pass and delete the unnecessary spec in the second pass.
sig/api-machinery,kind/feature,lifecycle/frozen
low
Major
256,628,031
youtube-dl
[Site request] Akiba Pass
## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`) - Use the *Preview* tab to see what your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.09.11*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.09.11** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [ ] 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: https://www.akibapass.de/de/v2/catalogue/episode/2953/demon-king-daimao-dtomu-episode-01 - Series: https://www.akibapass.de/de/v2/catalogue/show/180/demon-king-daimao-dtomu Note that **series page may contain multiple playlists (example url above contains OmU and german episodes)**. 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. ## Additional information * This website seems to be available in german only. It's a legal anime streaming service, provided by well-known anime publishers themselves to simplify anime streaming in Germany. * The service is paid, but you can easily create an account with 4 weeks of free trial period to check this service out before you need to pay something. I guess this will be enough to add site support into youtube-dl. If it isn't, just contact me for account information. * I tried to add this extractor on my own, and extracting video titles and stuff shouldn't be any problem, but since I don't have any experience with hls (they seem to use either hls or m3u8) and such stuff, and they use a kinda obfuscated player, i got stuck. If there are some channels to contact more experienced youtube-dl developers who can help me with those details, maybe I can provide the Akiba Pass integration myself.
geo-restricted,account-needed
low
Critical
256,753,808
rust
🔬 Tracking issue for RFC 2089: Extended Implied bounds
This is a tracking issue for the RFC "Implied bounds" (rust-lang/rfcs#2089). **Steps:** - [ ] Implement the RFC (cc @rust-lang/compiler -- can anyone write up mentoring instructions?) - [ ] Adjust documentation ([see instructions on forge][doc-guide]) - [ ] Stabilization PR ([see instructions on forge][stabilization-guide]) [stabilization-guide]: https://forge.rust-lang.org/stabilization-guide.html [doc-guide]: https://forge.rust-lang.org/stabilization-guide.html#updating-documentation **Unresolved questions:** * Should we try to limit the range of implied bounds to be crate-local (or module-local, etc)? * @nikomatsakis pointed [here][niko] that implied bounds can interact badly with current inference rules. [niko]: https://internals.rust-lang.org/t/lang-team-minutes-implied-bounds/4905
B-RFC-approved,T-lang,T-compiler,C-tracking-issue,S-tracking-impl-incomplete,T-types
high
Critical
256,814,029
pytorch
Feature Request: Support grad of grad in fused RNNs
Right now they're legacy functions and don't support double backprop cc @ezyang @SsnL @albanD @zou3519 @gqchen @mruberry
module: double backwards,feature,module: autograd,module: nn,triaged
low
Minor
256,815,593
angular
HttpClient should allow different responseTypes for success response and error response
## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ x ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior Currently, HttpClient expects the same responseType for both, success responses as well as error responses. This brings up issues when a WEB API returns e. g. JSON but just an (non JSON based) error string in the case of an error. ## Expected behavior <!-- Describe what the desired behavior would be. --> In see two solutions: Provide an own errorResponseType field or assign the received message as a string when JSON parsing does not work (as a fallback) ## Minimal reproduction of the problem with instructions The following test case is using such an Web API. It returns json for the success case and plain text in the case of an error. Both tests lead to an 400 error due to validation issues. In the first case where we are requesting plain text, the text based error message is shown; in the second case where we are requesting json (which would be the case if the call succeeded) we are just getting null. ``` import { TestBed } from '@angular/core/testing'; import { HttpClient, HttpClientModule, HttpErrorResponse, HttpHeaders } from '@angular/common/http'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; fdescribe('Different responseTypes for success and error case', () => { let http: HttpTestingController; let httpClient: HttpClient; beforeEach(() => { TestBed.configureTestingModule({ imports: [ HttpClientModule ] }); httpClient = TestBed.get(HttpClient); }); it('should send an HttpErrorResponse where the error property is the received body', (complete: Function) => { let actualBody; httpClient.post('http://www.angular.at/api/flight', {}, { responseType: 'text' }).subscribe(null, (resp: HttpErrorResponse) => { actualBody = resp.error; expect(actualBody).not.toBeNull(); complete(); }); }); it('should send an HttpErrorResponse where the error property is the body of the flushed response', (complete: Function) => { let actualBody; httpClient.post('http://www.angular.at/api/flight', {}, { responseType: 'json' }).subscribe(null, (resp: HttpErrorResponse) => { actualBody = resp.error; expect(actualBody).not.toBeNull(); complete(); }); }); }); ``` ## What is the motivation / use case for changing the behavior? <!-- Describe the motivation or the concrete use case. --> Using existing Web APIs more seamlessly ## Environment <pre><code> Angular version: 4.3 <!-- Check whether this is still an issue in the most recent Angular version --> For Tooling issues: - Platform: Windows
feature,freq2: medium,area: common/http,feature: under consideration
high
Critical
256,863,246
rust
region errors: suggest new signature
In some cases, we can suggest a new signature where the user introduces a new named lifetime. This is a bit tricky to figure out how to format the suggestion. It would get mildly easier with https://github.com/rust-lang/rfcs/pull/2115. ``` struct Ref<'a> { x: &'a u32 } fn foo<T>(mut x: Vec<Ref<T>>, data: u32, y: Ref<T>) { x.push(y); } ``` The old code used to produce a modified form of the HIR to format the suggestion. I'd prefer not to do that. I was thinking we could probably do something simpler where we just emit the "new parts" of the signature, maybe like this? ``` hint: consider changing the signature as shown: | fn foo<'a, ...>(mut x: Vec<Ref<'a, T>>, ..., y: Ref<'a, T>) ``` Idea would be to do something like this: - Find name for a fresh lifetime that is not in scope (e.g., `'``a`) - Emit `fn` - Emit name of function (`foo`) - If the function has generic parameters already: - Emit `<`, fresh lifetime, `…`, `>` - Else: - Emit `<`, fresh lifetime, `>` - Emit `(` - Emit `…` if needed - Emit parameter name 1 and type (with fresh lifetime substituted) - Emit `…` if needed - Emit parameter name 2 and type (with fresh lifetime substituted) - Emit `…` if needed - Emit `)` Not sure if this is a good plan. Might be best to wait until the https://github.com/rust-lang/rfcs/pull/2115 is settled, since that would permit us to make a suggestion where we just add a fresh named lifetime, and we don't have to add `<'a>` or anything.
C-enhancement,A-diagnostics,T-compiler,WG-diagnostics,A-suggestion-diagnostics,D-papercut
low
Critical
256,939,189
pytorch
Have ppc64le docker images?
I don't find pytorch docker image for ppc64le version. Besides, I tried to build a docker image based on official dockerfile (base image is from a cudnn-ppc64le image) but failed with conda (for ppc64le) doesn't support `mkl` and `magma-cuda80` for ppc64le as below: ```shell Step 6/12 : RUN conda install --name pytorch-py35 -c soumith magma-cuda80 mkl ---> Running in 1b2e81bb2911 Fetching package metadata ........... PackageNotFoundError: Package missing in current linux-ppc64le channels: - magma-cuda80 The command '/bin/sh -c conda install --name pytorch-py35 -c soumith magma-cuda80 mkl' returned a non-zero code: 1 ``` Thus, I wanna ask have ppc64le image or a installation tutorial for ppc64le.
triaged,module: POWER
low
Critical
256,965,632
angular
"Cannot find control with unspecified name attribute" plz add the name of the control
<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION. ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. --> ## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [x] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior concerning error "Cannot find control with unspecified name attribute" can someone add the actual name angular is looking for ? that would be awesome especialy when you have like 20 inputs in a form and try to find which one is actually missing in the template thanks
feature,freq2: medium,area: forms,feature: under consideration
medium
Critical
257,007,209
TypeScript
Add base class in lib.scripthost.d.ts for Automation objects
**TypeScript Version:** 2.5.0 / nightly (2.6.0-dev.20170902) **Code** ```ts // in lib.scripthost.d.ts class AutomationObject<T> { private constructor(); private typekey: AutomationObject<T>; } // in activex-excel.d.ts declare namespace Excel { class Application extends AutomationObject<Application> { Workbooks: any; } } interface ActiveXObject { new(progid: 'Excel.Application'): Excel.Application; } // usage let x: Excel.Application = new ActiveXObject('Excel.Application'); ``` This currently wouldn't compile, because of the `private constructor` in the base class; but pending resolution of #18283, it would be possible. This would prevent assigning structurally matching objects to the inheriting types: ```typescript // Compiler error x = { Workbooks: []; }; ``` and also prevent using `new` to create a new instance of the inheriting type: ```typescript // Compiler error x = new Excel.Application(); ``` --- I've [opened an issue](https://github.com/Microsoft/TypeScript/issues/17526) to define similar behavior for `VarDate` and `SafeArray<T>` in `lib.scripthost.d.ts`. If `AutomationObject<T>` is defined, then it could be used in `lib.scripthost.d.ts` as a base class for these types as well: ```typescript declare class VarDate extends AutomationObject<VarDate> { } declare class SafeArray<T> extends AutomationObject<SafeArray<T>> { } ```
Suggestion,In Discussion,Domain: lib.d.ts
low
Critical
257,065,895
TypeScript
proposal:symbol enum
I want symbol enum. syntax example: ```ts symbol enum Example{ X,Y,Z } ``` ↓ ```js var Example; (function (Example) { Example[Example["X"] = new Symbol("X")] = "X"; Example[Example["Y"] = new Symbol("Y")] = "Y"; Example[Example["Z"] = new Symbol("Z")] = "Z"; })(Example || (Example = {})); ```
Suggestion,Awaiting More Feedback
medium
Major
257,074,433
kubernetes
Re-run initContainers in a Deployment when containers exit on error
**Is this a BUG REPORT or FEATURE REQUEST?**: /kind feature **What happened**: Container in a Deployment exits on error, container is restarted without first re-running the initContainer. **What you expected to happen**: Container in a Deployment exits on error, initContainer is re-run before restarting the container. **How to reproduce it (as minimally and precisely as possible)**: Sample spec: ``` kind: "Deployment" apiVersion: "extensions/v1beta1" metadata: name: "test" labels: name: "test" spec: replicas: 1 selector: matchLabels: name: "test" template: metadata: name: "test" labels: name: "test" spec: initContainers: - name: sleep image: debian:stretch imagePullPolicy: IfNotPresent command: - sleep - 1s containers: - name: test image: debian:stretch imagePullPolicy: IfNotPresent command: - /bin/sh - exit 1 ``` **Anything else we need to know?**: **Environment**: - Kubernetes version (use `kubectl version`): ``` Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.0.0-master+$Format:%h$", GitCommit:"db809c0eb7d33fac8f54d8735211f2f3a8fc4214", GitTreeState:"clean", BuildDate:"2017-09-11T19:46:47Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"", Minor:"", GitVersion:"v0.0.0-master+$Format:%h$", GitCommit:"db809c0eb7d33fac8f54d8735211f2f3a8fc4214", GitTreeState:"clean", BuildDate:"2017-09-11T19:46:47Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"} ``` - OS (e.g. from /etc/os-release): ```Debian GNU/Linux 9 (stretch)``` - Kernel (e.g. `uname -a`): ```Linux aleinung 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux``` Implementation Context: I have an initContainer that waits for a service running in `Kubernetes` to detect its existence via pod annotations, and send it an HTTP request, upon which it writes this value to disk. The main container then reads this value upon startup and "unwraps" it via another service, upon which it stores the unwrapped value in memory. The value that is written to disk by the initContainer is a one-time read value, in that once it is used the value is then expired. The problem is that if the main container ever restarts due to fatal error, it loses that unwrapped value and upon startup tries to unwrap the expired value again, leading to an infinite crashing loop until I manually delete the pod, upon which a new pod is created, the initContainer runs, and all is again well. I desire a feature that restarts the entire pod upon container error so that this workflow can function properly.
sig/node,kind/feature,needs-triage
high
Critical
257,189,385
angular
Headers.{Constructor,append,set} with Date value should use correct format
<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION. ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. --> ## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior `Date` objects added to `Headers` get turned into strings with a non-standard format. ## Expected behavior `Date` objects added to `Headers` get turned into strings with the standard (i.e., HTTP-date) format as specified in [RFC 7231 Section 7.1.1.1](https://tools.ietf.org/html/rfc7231#section-7.1.1.1). I expect this behavior, and use "should" in the issue title, because of my first point in the "What is the motivation / use case for changing the behavior?" section. ## Minimal reproduction of the problem with instructions <!-- For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5). --> http://plnkr.co/edit/mzixw2aYhMwUlJvWcZeQ ## What is the motivation / use case for changing the behavior? * I believe the following sentence (from RFC 7231 Section 7.1.1.1) applies to Angular. > When a sender generates a > header field that contains one or more timestamps defined as > HTTP-date, the sender MUST generate those timestamps in the > IMF-fixdate format. Specifically I believe Angular is (or, at least, can be used as) a "sender" in the sense of that sentence. (I know that strict adherence to a spec is not a strong argument.) * I think this is a bug, instead of a feature request, because of the use of "MUST" in that sentence. * Angular could make writing a hypertext (dare I say "REST") API client easier by not requiring an author of each such client to implement this (required of the standard) functionality. ### Rationale (i.e., why should this be an Angular change) First: I do not know if Angular is the right place to raise this issue. The other places I think this issue could be addressed are Fetch and TC39 (ECMAScript). I think Angular is doing as much as can be inferred from [Fetch](https://fetch.spec.whatwg.org/). As [the `Headers` "class" is defined in Fetch](https://fetch.spec.whatwg.org/#headers-class), this _could_ be (though since Fetch only cares about `ByteString` I feel it is currently unlikely to be) a change that could fit Fetch. Even if this did apply to Fetch, it would still need to be _implemented_ here. Also, based on the current `Date\.prototype\.to.*String` functions defined in ECMA-262, I do not think that this could be addressed by TC39 (though I haven't asked). Specifically because the relevant sections (20.3.4.{35, 36, 37, 38, 39, 40, 41.1, 42, 43}) of ECMA-262 specify the format of the String return value of every such function to be "implementation-dependent", adding a new one (perhaps named `Date.prototype.toHTTPDateString`) without that "it's up to you" flavor seems out of place. Again, even if such a function is added to `Date.prototype`, Angular would need to change to use it. So, no matter what, I think some work needs to be done to here. ## Environment I think all this is irrelevant. <pre><code> Angular version: "latest", per the Plunk <!-- Check whether this is still an issue in the most recent Angular version --> Browser: - [x] Chrome (desktop) version XX - [x] Chrome (Android) version XX - [ ] Chrome (iOS) version XX - [x] Firefox version 55.0.3 - [x] Firefox (Android) version 55.0.2 - [ ] Safari (desktop) version XX - [x] Safari (iOS) version XX - [x] IE version 11 - [x] Edge version 40.15063.0.0 (EdgeHTML 15.15063) For Tooling issues: - Node version: 6.9.5 <!-- run `node --version` --> - Platform: checked with the indicated browsers on Windows, Android, and iOS Others: <!-- Anything else relevant? Operating system version, IDE, package manager, HTTP server, ... --> </code></pre>
freq2: medium,area: common/http,type: use-case,P4
low
Critical
257,334,503
TypeScript
Dangerous "name" (and potentially others) global
<!-- 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.6.0-dev.20170913 **Code** ```ts if (name === "asdf") { console.log("asdf") } ``` `https://www.typescriptlang.org/play/#src=if (name %3D%3D%3D "asdf") {%0D%0A console.log('hello')%0D%0A}` **Expected behavior:** Error out **Actual behavior:** More than once, I had a "local" variable called `name`, outside a block scope, and it didn't warn me that it's not defined (or used before declaration). even though, in my code, `event.name` is a string, the global `name` variable is of type `never`. it's defined in `lib.dom.d.ts`, along with other "juicy" global names that will provide some confusion, like `length`, `external`, `event`, `closed` ![image](https://user-images.githubusercontent.com/461084/30372857-ad591f3a-9855-11e7-915b-7dee3baaec8f.png) ![image](https://user-images.githubusercontent.com/461084/30372908-d7acb40e-9855-11e7-99c8-b31c78e45d5f.png) one 'fix' (that would be a breaking change) would to make `lib.dom-globals.d.ts` (the propertiers that are usually accessible through `window` variable) and make it an opt-in in `tsconfig.json compilerOptions.lib` array
Suggestion,Help Wanted,Committed,Domain: lib.d.ts,Good First Issue
high
Critical
257,356,344
angular
Matrix array param is not retrievable by ParamMap#getAll function.
<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION. ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. --> ## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior <!-- Describe how the issue manifests. --> If an URL is built with matrix parameters which contain array value, it is not retrievable as an elements of array by the ParamMap.getAll function. It provides an array with only one single value in which the original values are concatenated instead of multiple elements. For example: - Given a navigation like this: this.router.navigate(['example', { foo: ['bar', 'baz'] } ]); - The URL will be something like this: /example;foo=bar,baz - Then I want to get back the foo values through the ActivatedRoute: this.activatedRoute.snapshot.paramMap.getAll('foo') - I get this: ['bar,baz'] instead of ['bar', 'baz'] ## Expected behavior <!-- Describe what the desired behavior would be. --> - getAll function should provide an elements of array (['foo', 'bar']) instead of an array with single element (['foo,bar']). ## Minimal reproduction of the problem with instructions <!-- For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5). --> ## What is the motivation / use case for changing the behavior? <!-- Describe the motivation or the concrete use case. --> ## Environment <pre><code> Angular version: 4.3.1 <!-- Check whether this is still an issue in the most recent Angular version --> Browser: - [x] Chrome (desktop) version XX - [ ] Chrome (Android) version XX - [ ] Chrome (iOS) version XX - [ ] Firefox version XX - [ ] Safari (desktop) version XX - [ ] Safari (iOS) version XX - [ ] IE version XX - [ ] Edge version XX For Tooling issues: - Node version: XX <!-- run `node --version` --> - Platform: Windows <!-- Mac, Linux, Windows --> Others: <!-- Anything else relevant? Operating system version, IDE, package manager, HTTP server, ... --> </code></pre>
type: bug/fix,freq3: high,area: router,state: confirmed,router: URL parsing/generation,P3
medium
Critical
257,370,705
go
cmd/internal/obj/x86: improve asm error messages
Some assembler error messages are misleading and miss context info. 99% of errors programmer get is `invalid instruction` which does not help that much. Go (or plan9) asm has its peculiar points that make initial experience, coupled with such error messages, very unpleasant. There are multiple aspects of error messages that can be improved, but for the very start, some obviously horrible things can be changed. I present some cases where error message could be more precise/informative. If applicable, `clang` asm error message for the same case is provided. This is a proposal to start a discussion regarding this topic. Maybe someone will point important pitfalls, or provide more cases that worth a fix. Scope of this one restricted to **x86** assembler backend. ```asm TEXT main·asmErrors(SB),$0 // 1 // Case: immediate operand overflow. // Note: base16->base10 constant conversion in error message // is annoying too, but it is separate issue. // // Have: "invalid instruction: ADDQ $-2415919103, AX" // Want: "ADDQ(imm32,r): constant -2415919103 overflows imm32" ADDQ $-0x8FFFFFFF, AX // 2 // Case: invalid operand types combination. // // Have: "invalid instruction: MOVL (R8), (R9)" // Want: "MOVL with (mem,mem) operands combination does not exist" // // Clang: // > invalid operand for instruction // > movl (%R8), (%R9) // > ^~~~~ MOVL (R8), (R9) // 3 // Case: negative immediate for unsigned operand. // // Have: "invalid instruction: PSHUFL: $-10, X0, X1" // Want: "PSHUFL(uint8,xmm,xmm): invalid negative immediate value -10" PSHUFL $-10, X0, X1 // 4 // Case: using "SP" register as "index" in SIB addressing. // Note: same goes for XMM and other non-suitable for index registers. // // Have: "invalid instruction: MOVL (AX)(SP*2), AX" // Want: "SP register can't be used as index in SIB addressing" MOVL (AX)(SP*2), AX // 5 // Case: SIB without explicit "scale". // See: #13282. // // Have[1]: "invalid instruction: MOVL foo<>(SB)(AX), AX" // Have[2]: "asmidx: bad address 0/2064/2064" // Want: "SIB addressing without explicit scale is forbidden" MOVL foo<>(SB)(AX), AX // [1] MOVL (AX)(AX), AX // [2] RET ```
NeedsInvestigation
low
Critical
257,374,364
youtube-dl
Support for thegreatcoursesplus
## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`) - Use the *Preview* tab to see what your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.09.11*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x ] I've **verified** and **I assure** that I'm running youtube-dl **2017.09.11** ### Before submitting an *issue* make sure you have: - [x ] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x ] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [ ] 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 the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2017.09.11 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} ... <end of log> ``` --- ### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**): - Single video: https://www.youtube.com/watch?v=BaW_jenozKc - Single video: https://youtu.be/BaW_jenozKc - Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. --- hello can you please add this website for download http://www.thegreatcoursesplus.com/ they required login detail
site-support-request,account-needed
low
Critical
257,431,540
rust
128-bit integer division with remainder is not combined to a single operation
Rustc fails to combine `div()` and `mod()` operations with ` u128` to a single division with remainder on x64. The following code compiles down to separate calls to [`__udivti3()`](https://github.com/rust-lang-nursery/compiler-builtins/blob/23f14d3f05f2717497ac18d86d49be1e3f03ae68/src/int/udiv.rs#L245-L249) and [`__umodti3()`](https://github.com/rust-lang-nursery/compiler-builtins/blob/23f14d3f05f2717497ac18d86d49be1e3f03ae68/src/int/udiv.rs#L251-L257) when we would prefer a single call to [`__udivmodti4()`](https://github.com/rust-lang-nursery/compiler-builtins/blob/23f14d3f05f2717497ac18d86d49be1e3f03ae68/src/int/udiv.rs#L264-L271). ```rust #![feature(i128_type, i128, test)] extern crate test; #[inline(never)] fn divmod_u128(a: u128, b: u128) -> (u128, u128) { (a / b, a % b) } fn main() { println!("{:?}", divmod_u128(std::u128::MAX, test::black_box(1000))); } ``` Related to #39078. Relevant in the [Display implementation for i128 and u128](https://github.com/rust-lang/rust/blob/4312ed765a5f3354f3214fb3b214bff64ae8ccbf/src/libcore/fmt/num.rs#L220-L221).
A-LLVM,I-slow,C-enhancement,T-compiler
low
Major
257,461,715
go
runtime/secret: add new package
Final API is here: https://github.com/golang/go/issues/21865#issuecomment-925145234 --- Forward secrecy is usually only a thing if it's possible to ensure keys aren't actually in memory anymore. Other security properties, too, often require the secure erasure of keys from memory. The typical way of doing this is through a function such as `explicit_bzero`, `memzero_explicit`, or the various other functions that C library writers provide that ensure an optimization-free routine for zeroing buffers. For the most part, the same is possible in Go application code. However, it is not easily possible to do so with crypto API interfaces that internally manage a key buffer, such as the AEAD interface. In the Go implementation of WireGuard, @rot256 has been forced to resort to unholy hacks such as: ```go type safeAEAD struct { mutex sync.RWMutex aead cipher.AEAD } func (con *safeAEAD) clear() { con.mutex.Lock() if con.aead != nil { val := reflect.ValueOf(con.aead) elm := val.Elem() typ := elm.Type() elm.Set(reflect.Zero(typ)) con.aead = nil } con.mutex.Unlock() } func (con *safeAEAD) setKey(key *[chacha20poly1305.KeySize]byte) { con.aead, _ = chacha20poly1305.New(key[:]) } ``` Having to resort to this kind of reflection is a bit unsettling and something we'd much rather not do. So, this issue is to request and track the addition of a consistent "Clear()" interface for parts of the Go crypto API that store keys in internal buffers. ------------------ Furthermore, even if real clearing is deemed to be an abject failure due to Go's GC, and one must instead mmap/mlock or use a library such as [memguard](https://github.com/awnumar/memguard), the AEAD interface still is inadequate, because it appears that SetKey winds up allocating its own buffer internally. So again, big problem. cc: @agl
Proposal,Proposal-Accepted,NeedsInvestigation
high
Critical
257,463,929
pytorch
DataLoader gets stuck after model initialization
Everytime I set num_workers > 0 the following code will freeze and never print anything. If I set num_workers=0 it will work though ``` dataloader = DataLoader(transformed_dataset, batch_size=2, shuffle=True, num_workers=2) model.cuda() for i, batch in enumerate(dataloader): print(i) ``` If I put model.cuda() behind the loop, everything will run fine like ``` dataloader = DataLoader(transformed_dataset, batch_size=2, shuffle=True, num_workers=2) for i, batch in enumerate(dataloader): print(i) model.cuda() ``` Does anyone have a solution for that problem? cc @SsnL
module: dataloader,triaged
low
Minor
257,466,595
go
cmd/compile: errors involving aliased types should use the alias name
In https://golang.org/cl/63277, @ianlancetaylor notes: > Right now if I compile > > ```go > package p > > type myByte = byte > var _ myByte = "uc" > ``` > > I get > > `foo.go:4:16: cannot use "uc" (type string) as type byte in assignment` > > Arguably that is wrong. For example, gccgo prints > > `foo.go:4:5: error: incompatible type in initialization (cannot use type string as type myByte)` > > If we first fix the compiler to use the alias name in the error message as I think it should, then perhaps we can apply this change while retaining good error messages. Concretely: if the compiler reports a type error involving an alias, it should use the aliased name of the type rather than the underlying/canonical name. That would allow us to use type aliases for a larger subset of C types (#13467) without producing overly-cryptic error messages for mismatched types.
NeedsFix,compiler/runtime
low
Critical
257,525,883
go
cmd/compile: constant folding math/bits functions
### What version of Go are you using (`go version`)? Current git master 577967799c22e5a443ec49f494039f80e08202fe ### What did you expect to see? There is a very easy optimization possibility of constant folding various functions from math/bits. Would there be interest in implementing these? Personally, I could work on this, but I'm pretty new to the compiler internals and don't have a CLA yet. ``` $ git diff 577967799c22e5a443ec49f494039f80e08202fe diff --git a/src/cmd/compile/internal/ssa/gen/generic.rules b/src/cmd/compile/internal/ssa/gen/generic.rules index 92b5b04962..7a81712ccc 100644 --- a/src/cmd/compile/internal/ssa/gen/generic.rules +++ b/src/cmd/compile/internal/ssa/gen/generic.rules @@ -142,6 +142,14 @@ (Div32F (Const32F [c]) (Const32F [d])) -> (Const32F [f2i(float64(i2f32(c) / i2f32(d)))]) (Div64F (Const64F [c]) (Const64F [d])) -> (Const64F [f2i(i2f(c) / i2f(d))]) +// TODO: add more functions from math.bits here +(BitLen32 (Const32 [c])) && config.PtrSize == 4 -> (Const32 [int64(bits.Len32(uint32(c)))]) +(BitLen32 (Const32 [c])) && config.PtrSize == 8 -> (Const64 [int64(bits.Len32(uint32(c)))]) +(BitLen64 (Const64 [c])) && config.PtrSize == 4 -> (Const32 [int64(bits.Len64(uint64(c)))]) +(BitLen64 (Const64 [c])) && config.PtrSize == 8 -> (Const64 [int64(bits.Len64(uint64(c)))]) +// TODO: is there a "ConstInt" to avoid "PtrSize" checks and simplify the rules above ? +// TODO: do we have to reimplement math.bits in the compiler because of bootstrap issues ? + // Convert x * 1 to x. (Mul8 (Const8 [1]) x) -> x (Mul16 (Const16 [1]) x) -> x diff --git a/src/cmd/compile/internal/ssa/gen/rulegen.go b/src/cmd/compile/internal/ssa/gen/rulegen.go index c23a54d9b5..e7dc2b39af 100644 --- a/src/cmd/compile/internal/ssa/gen/rulegen.go +++ b/src/cmd/compile/internal/ssa/gen/rulegen.go @@ -155,10 +155,12 @@ func genRules(arch arch) { fmt.Fprintln(w) fmt.Fprintln(w, "package ssa") fmt.Fprintln(w, "import \"math\"") + fmt.Fprintln(w, "import \"math/bits\"") fmt.Fprintln(w, "import \"cmd/internal/obj\"") fmt.Fprintln(w, "import \"cmd/internal/objabi\"") fmt.Fprintln(w, "import \"cmd/compile/internal/types\"") fmt.Fprintln(w, "var _ = math.MinInt8 // in case not otherwise used") + fmt.Fprintln(w, "var _ = bits.UintSize // in case not otherwise used") fmt.Fprintln(w, "var _ = obj.ANOP // in case not otherwise used") fmt.Fprintln(w, "var _ = objabi.GOROOT // in case not otherwise used") fmt.Fprintln(w, "var _ = types.TypeMem // in case not otherwise used") ```
Suggested,Performance,help wanted
medium
Major
257,528,462
flutter
Cupertino library sometimes depends on specific widget types
We should always be agnostic about the child widget type, otherwise it violates our composition model. There's basically two principles we can apply here: * Wrapping a widget X in a widget Y that does nothing but return the widget X should always work exactly the same as using X directly. For example, wrapping a Text in a Tooltip should always work. * Replacing a widget X with an entirely independent widget Y that happens to be implemented exactly the same way should always work exactly the same as using X directly. Ideally, anywhere you accept a Widget you should accept a Placeholder or a widget equivalent to Placeholder, and act the same as if you'd gotten anything else. Places I've noticed where we violate this: - [x] CupertinoNavigationBar.middle + CupertinoNavigationBar.largeTitle, we assert that `middle is Text`. - [ ] CupertinoScaffold.tabbed requires a CupertinoTabBar. - [x] CupertinoScaffold.navigationBar is handled differently if it is a CupertinoNavigationBar cc @xster @cbracken
framework,f: cupertino,c: proposal,P2,team-design,triaged-design
low
Major
257,551,625
react
A faster diff algorithm
This is an invitation to discussion... So, react is pretty freaking awesome and I used it quite a bit. One thing unfortunately where react is not as strong is in performance, which gave roots to Inferno and Preact. Although, this is generally a non-issue on desktop, while mobile might be a bottleneck. I know many members of the team have been working on improving bundle size (I believe through rollup support in a talk I heard), asynchronous scheduling, etc. I am also aware that @trueadm (the creator of inferno) joined the React team and is working on improving it. The point I want to bring up is this library [petit-dom](https://github.com/yelouafi/petit-dom). It uses, is a diff algorithm (links that explain it provided in the README) and it seems to score incredibly on [vdom performance tests](https://github.com/krausest/js-framework-benchmark). In fact, it is only beat by 2 technologies, vanillajs and surplusjs [per the benchmark snapshot](https://rawgit.com/krausest/js-framework-benchmark/master/webdriver-ts-results/table.html). petit-dom beats inferno, preact, mithril, vue, angular, etc. Of course, it is not a proper js framework, however the point I am trying to make is that it is far faster and a major difference between the other frameworks seems to be its diff algorithm. I realize this would mean a rewrite of a good portion of react-dom, which is why it is simply a discussion :D. If this is unfeasible, or simply going after the wrong target/bottleneck, let me know as it is after all a discussion.
Type: Discussion,Component: Reconciler
medium
Major
257,558,759
rust
Alloc: Clarify supported Layouts
# TLDR The `Alloc` trait doesn't currently document what `Layout`s are guaranteed to be supported, which leaves consumers unsure whether their allocations will fail with `AllocErr::Unsupported`. This issue proposes addressing this by introducing a distinction between "general" and "specialized" allocators, and documenting a set of required `Layout`s that the former must be able to handle. # Problem Statement One of the errors that the `Alloc` trait's allocation methods can return is `AllocErr::Unsupported`, which indicates that the allocator doesn't support the requested `Layout`. Currently, the `Alloc` trait places no restrictions - either using the type system or in documentation - on what `Layout`s must be supported. Thus, consumers of a generic `Alloc` (as opposed to a particular type that implements `Alloc`) must assume that any given allocation request might be unsupported. This creates a problem: in order for a consumer of an `Alloc` to be able to guarantee to their users that they will not crash at runtime (after all, having gotten `AllocErr::Unsupported`, there's really no other recourse other than to abort or bubble up the error), they need to document the set of `Layout`s that they might request from an allocator provided by the user. This, in turn, requires that all implementations of `Alloc` document precisely which `Layout`s they can handle so that users can ensure that they're upholding the requirements of the consumers. Even if all of this documentation was written and maintained, it'd impose a very large burden on the users. Imagine every time you wanted to use `Vec<T, A: Alloc>` for a particular, custom `A`, you had to carefully read the `Vec` documentation and the documentation for the desired allocator to ensure they were compatible. Worse still, the current mechanism for configuring the global allocator involves providing an instance of `Alloc`. In this case, there's no way for code to communicate to the person configuring the global allocator what their requirements are, since that code might be buried behind an arbitrary number of dependencies (e.g., I use crate `foo` which depends on crate `bar` which depends on crate `baz` which is incompatible with the global allocator I've configured). This came up in practice for me while working on my [slab-alloc](https://crates.io/crates/slab-alloc) crate (which is basically just an object cache). I allow users to provide a custom `Alloc` to back a `SlabAlloc` instance, but I currently have no way other than in documentation to ensure that the provided `Alloc`s will be compatible with the allocations I perform. If, for example, a user were to provide an allocator incapable of providing page-aligned allocations, or if somebody upstream of my crate configured a global allocator with this limitation, my code would crash at runtime. # Proposal In order to address this issue, I propose introducing (in the `Alloc` trait's documentation) the notion of a "general allocator," which is an implementation of the `Alloc` trait which guarantees the ability to handle a certain class of standard allocation requests. All implementations of `Alloc` are assumed to be general allocators unless documented to the contrary. All consumers of an `Alloc` type parameter are assumed to be compatible with a general allocator (that is, they do not perform any allocations which are outside of the set of guaranteed-to-be-supported allocations) unless documented to the contrary. An allocation is guaranteed to be supported so long as it meets the following criteria: - The size is non-zero - The alignment is a non-zero power of two (this is already enforced by `Layout`) - The size is a multiple of the alignment (this is already enforced by `Layout`) - The alignment is not larger than the system's page size - The size is not larger than 2^31 bytes on 32-bit platforms or 2^47 on 64-bit platforms This system does not hamstring special-case uses. `Alloc` implementations which do not provide all of these guarantees merely need to document this. `Alloc` consumers which require more than what a general allocator guarantees merely need to document this, placing the onus on their users to provide an appropriate `Alloc`. ## Open questions - A 2^31 byte limit on 32-bit platforms might be limiting, so it might be worth making it 2^32 - 1 bytes (and 2^48 - 1 on 64-bit) instead. My concern is how this will play with signed integers, but that might be the sort of thing that it's reasonable to expect an allocator implementor to just be careful about.
A-allocators,T-libs-api,C-feature-request
low
Critical
257,587,287
go
cmd/cgo: C functions that return void incorrectly return Go values
`cgo` fails to reject the following program — despite numerous errors involving values of type `C.void`, which ought to be completely uninstantiable. (The word “void” itself means “empty”, so it's nonsensical for the type “void” to contain a value!) I'm not sure to what extent this is fixable, given that the fix for #3729 added a test verifying that Go callers can bind `_, err` to the result of a call to a void-returning function. ```go package p /* static void return_void() { return; } */ import "C" func F() { x := C.return_void() // ERROR HERE var y C.void = x // ERROR HERE var z *C.void = &y // ERROR HERE var b [0]byte = *z // ERROR HERE _ = b } ```
NeedsInvestigation,compiler/runtime
low
Critical
257,610,661
pytorch
support grid_sample with batch=1 but supprting batch affine parameters
I'm trying to use the grid_affine with grid_sample to do the ROIAlign operation. In my cases, one feature tensor is accompanied with many boxes, and one box means one affine parameter. Therefore, I use `feature.expand(number_of_box, C, H, W)` to expand the feature to the same batch as the affine parameter. In this way, it cost much GPU memory. ``` feature = feature.expand(number_of_box,C, H, W) grid_size = torch.Size([number_of_box, 1, 7,7]) grid = F.affine_grid(theta, grid_size) sub_feature = F.grid_sample(feature, grid) ``` If I use a loop to do these operations, the memory usage is less than the above one. ``` all_roi = [] for j in range(number_of_box): _grid = grid.narrow(0, j, 1) _roi_feature = F.grid_sample(feature, _grid) all_roi.append( _roi_feature ) ``` What causes this problem? Is it possible to support affine_sample with batch size = 1, but shared for the batched affine_parameters? cc @fmassa @vfdev-5 @pmeier
triaged,module: vision,module: interpolation
medium
Major
257,616,752
create-react-app
Deploy both ES5 and ES2015+ code in production
### Is this a bug report? No Everything described in [this article](https://philipwalton.com/articles/deploying-es2015-code-in-production-today/). But for lazy ones I'll add some highlights here. ```html <!-- Browsers with ES module support load this file. --> <script type="module" src="main.js"></script> <!-- Older browsers load this file (and module-supporting --> <!-- browsers know *not* to load this file). --> <script nomodule src="main-legacy.js"></script> ``` > Warning! The only gotcha here is Safari 10 doesn’t support the nomodule attribute, but you can solve this by [inlining a JavaScript snippet](https://gist.github.com/samthor/64b114e4a4f539915a95b91ffd340acc) in your HTML prior to using any <script nomodule> tags. (Note: this has been fixed in Safari Tech Preview, and should be released in Safari 11). And here is the [working example](https://github.com/philipwalton/webpack-esnext-boilerplate).
issue: proposal
medium
Critical
257,632,947
vscode
Word selection when holding Ctrl and dragging with mouse
in VS2015 you can select whole words by holding down CTRL and do selection, it's faster and easier !! you can also CTRL + CLICK to select a whole word. MAKE IT SO ... please :) --- *Edit by @hediet:* Video: https://www.youtube.com/watch?v=bfyO8haWKfg
feature-request,editor-wordnav
medium
Critical
257,664,360
go
os/exec: CommandContext does not forward the context's error on timeout
Go version: Latest release - 1.9 Using `CommandContext` in combination with `Context.WithTimeout` shows very few information about the reason of the error when the execution times out. Using a small variation of the [CommandContext example ](https://golang.org/pkg/os/exec/#example_CommandContext) proves this: ``` package main import ( "context" "fmt" "os/exec" "time" ) func main() { ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) defer cancel() if err := exec.CommandContext(ctx, "sleep", "5").Run(); err != nil { fmt.Println("cmd: ", err) fmt.Println("ctx: ", ctx.Err()) } } ``` Output: ``` cmd: signal: killed ctx: context deadline exceeded ``` Also, if the context is already done then the `cmd.Run` gets called, the error matches the context's error: ``` package main import ( "context" "fmt" "os/exec" "time" ) func main() { ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) defer cancel() time.Sleep(150 * time.Millisecond) if err := exec.CommandContext(ctx, "sleep", "5").Run(); err != nil { fmt.Println("cmd: ", err.Error()) fmt.Println("ctx: ", ctx.Err().Error()) } } ``` Output: ``` cmd: context deadline exceeded ctx: context deadline exceeded ```
NeedsInvestigation
medium
Critical
257,728,337
vscode
XHR Failed on trying to install plugins via Visual Studio code
<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode. --> <!-- Use Help > Report Issues to prefill these. --> - VSCode Version: 1.16.0 - OS Version: Windows 10 Steps to Reproduce: 1. When trying to install a plugin, i get an error **XHR Failed**. 2. Also when i try to download the extensions manually and try to install it via the options "install from VSIX", it fails silently. 3. I am behind a proxy network.
bug,proxy
high
Critical
257,758,110
go
cmd/go: ignore *.syso files in -msan mode
Packages with syso files currently fail in -msan mode because the syso file calls out to a routine like memcmp which then falsely reports uninitialized memory. It's not possible to prepare a syso file that works regardless of memory-sanitizer setting, at least not if the code makes any memory writes, which most code does. Instead you'd have to prepare both a standard syso and an msan-enabled syso, and the go command conventions provide no way to tell those apart. I suggest we simply ignore syso files in -msan mode. That will result in missing link symbols, but then package authors can revise their packages to avoid the syso in -msan mode. That gives package authors at least one way to write a package that has a syso and still works with -msan. Today there are zero ways. A more complex change would be to introduce a new class of objects like \*.syso.msan or \*_msan.syso, but let's not do that until there's a compelling reason. In the case where this came up, the "ignore syso files" is good enough.
NeedsFix,GoCommand
low
Major
257,762,058
TypeScript
Add Length Parameter to typed arrays
The goal is pretty straight forward, since typed arrays have a fixed length it would be a more accurate and helpful type it you could specify length. Then you could get complaints if you try to assign or access a higher index or use a array of the incorrect length. **Code** ```ts type Vector2d = Int32Array<2>; type Vector3d = Int32Array<3>; type Matrix = Int32Array<16>; const add = (vecA:Vector2d) => (vecB:Vector2d, target:Vector2d = new Int32Array(2) ):Vector2d => { target[0] = vecA[0] + vecB[0]; target[1] = vecA[1] + vecB[1]; return target; }; const add3d = (vecA:Vector3d) => (vecB:Vector3d, target:Vector3d = new Int32Array(3) ):Vector3d => { target[0] = vecA[0] + vecB[0]; target[1] = vecA[1] + vecB[1]; target[2] = vecA[2] + vecB[2]; return target; }; const position = new Int32Array(2); const position3d = new Int32Array(3); const velocity = new Int32Array([1,1]); const velocity3d = new Int32Array([1,2,3]); add(position)(velocity, position); const newPosition = add(position)(velocity); add3d(position3d)(velocity3d, position3d); add(position3d)(velocity3d, position3d); // Fails due to incorrect array length ```
Suggestion,Domain: lib.d.ts,Awaiting More Feedback
medium
Major
257,832,827
pytorch
Proposal: simplify overloaded Tensor function signatures
Currently we have a few functions on Tensor with multiple overloads. This makes parsing, documentation, and error messages more complicated. These overloads get ambiguous with zero-dim tensors (scalars) because they can bind to either the "float" or "Tensor" overloads. We should combine the Tensor/scalar overloads and move optional arguments to the end of the function (as keyword-only args). The old signatures will be deprecated (issue a warning) and removed from the documentation and error messages. Functions which accept a `Tensor` arguments will also accept Python numbers in their place. The numbers will automatically get promoted to zero-dim tensors. `torch.max` currently has three overloads: ``` torch.max(input) -> Tensor torch.max(input, dim, keepdim=False) -> Tensor, LongTensor torch.max(input, other) ``` We should combine the first two overloads and make the third overload (element-wise max) a separate function (`fmax`). Eventual `max` over an array should only return the max elements (not the indices) unless `return_indices=True`. For backwards compatibility, if `return_indices` is unspecified, ```python def max(input, dim=None, keepdim=False, return_indices=None): if isinstance(dim, torch.Tensor): # raise deprecation warning return fmax(input, other) if return_indices is None: if dim is not None: # raise deprecation warning about return_indices return_indices = dim is not None # dispatch to ATen implementation ... def fmax(input, other): # element-wise maximum preferring non-NaN ``` We should also do the same for `torch.min`. We have already updated `add`, `addmm`, `addbmm`, `addcmul`, `sub`.
triaged
low
Critical
257,834,258
TypeScript
@ts-check complains about the object given to Object.defineProperty not having Object properties
_From @kenchris on September 14, 2017 13:28_ ie. ```[js] Property 'removeAttribute' does not exist on type 'PropertyDescriptor'.``` Though this code works fine ``` constructor() { super(); for (const prop in this.constructor.properties) { const symbol = Symbol.for(prop); const { type: typeFn, value, reflectToAttribute } = this.constructor.properties[prop]; Object.defineProperty(this, prop, { get() { return this[symbol] || value; }, set(v) { let value = typeFn(v) this[symbol] = value; if (reflectToAttribute) { if (typeFn.name === 'Boolean') { if (!value) { this.removeAttribute(prop); } else { this.setAttribute(prop, prop); } ... ``` _Copied from original issue: Microsoft/vscode#34377_
Bug,Help Wanted,Domain: lib.d.ts,VS Code Tracked
low
Major
257,847,716
TypeScript
Add WebVR API to lib.d.ts
Docs at https://developer.mozilla.org/en-US/docs/Web/API/WebVR_API
Suggestion,Help Wanted,Revisit,Domain: lib.d.ts
low
Minor
257,866,486
react
What should portals do when container has a child managed by React?
**Do you want to request a *feature* or report a *bug*?** Bug **What is the current behavior?** `ReactDOM.unstable_createPortal(<Component/>, target)` appends the rendered component in the target instead of replacing the contents of the target **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/ebsrpraL/).** https://codesandbox.io/s/pjx8x9z2o7 **What is the expected behavior?** It should replace the contents of the target with the new rendered component **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** [email protected] [email protected] Note: I might have completely misunderstood how portals work. @gaearon [encouraged me](https://twitter.com/dan_abramov/status/908443416173924352) to open this issue 😄
Component: DOM,Type: Discussion
medium
Critical
257,893,720
youtube-dl
VRV list index out of range when parsing en-US MPD information
## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`) - Use the *Preview* tab to see what your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.09.11*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.09.11** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue* --- ### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows: Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` PS C:\Users\jacob_2\Videos> .\youtube-dl.exe -U youtube-dl is up-to-date (2017.09.11) PS C:\Users\jacob_2\Videos> .\youtube-dl.exe --verbose https://vrv.co/watch/GYX084D3R/HarmonQuest:The-Quest-Begins [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['--verbose', 'https://vrv.co/watch/GYX084D3R/HarmonQuest:The-Quest-Begins'] [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252 [debug] youtube-dl version 2017.09.11 [debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1 [debug] exe versions: none [debug] Proxy map: {} [vrv] GYX084D3R: Downloading webpage [vrv] GYX084D3R: Downloading en-US MPD information Traceback (most recent call last): File "__main__.py", line 19, in <module> File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\__init__.py", line 465, in main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\__init__.py", line 455, in _real_main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\YoutubeDL.py", line 1966, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\YoutubeDL.py", line 776, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\extractor\common.py", line 434, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\extractor\vrv.py", line 132, in _real_extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\extractor\common.py", line 1753, in _extract_mpd_formats File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\extractor\common.py", line 1975, in _parse_mpd_formats IndexError: list index out of range ``` ``` PS C:\Users\jacob_2\Videos> .\youtube-dl.exe --verbose https://vrv.co/watch/GR2P9WQ7R/HarmonQuest:The-Stone-Saw-Mines [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['--verbose', 'https://vrv.co/watch/GR2P9WQ7R/HarmonQuest:The-Stone-Saw-Mines'] [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252 [debug] youtube-dl version 2017.09.11 [debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1 [debug] exe versions: ffmpeg 3.3.3, ffprobe 3.3.3 [debug] Proxy map: {} [vrv] GR2P9WQ7R: Downloading webpage [vrv] GR2P9WQ7R: Downloading en-US MPD information Traceback (most recent call last): File "__main__.py", line 19, in <module> File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\__init__.py", line 465, in main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\__init__.py", line 455, in _real_main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\YoutubeDL.py", line 1966, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\YoutubeDL.py", line 776, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\extractor\common.py", line 434, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\extractor\vrv.py", line 132, in _real_extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\extractor\common.py", line 1753, in _extract_mpd_formats File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp24lzs8ny\build\youtube_dl\extractor\common.py", line 1975, in _parse_mpd_formats IndexError: list index out of range ``` I've only been able to reproduce this issue with episodes 1 & 2 of Harmon Quest Season 1, but I've been able to do so consistently. https://vrv.co/watch/GYX084D3R/HarmonQuest:The-Quest-Begins https://vrv.co/watch/GR2P9WQ7R/HarmonQuest:The-Stone-Saw-Mines So it's probably a corrupted MPD or something and perhaps not something youtube-dl can work around.
geo-restricted,account-needed
low
Critical
257,917,053
TypeScript
VS Code Intellisense seems to wrongly infer revealing module pattern
_From @lodybo on September 12, 2017 9:44_ <!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode. --> <!-- Use Help > Report Issues to prefill these. --> - VSCode Version: 1.16.0 - OS Version: Windows 10 Steps to Reproduce: 1. Copy the code below into a file called `greeter.js` 2. Run `node greeter.js` in a terminal ```javascript var Greeter = (function(country) { // Private this.country = country; function getCountry() { return country; } // Public var performGreeting = function (name) { var country = getCountry(); return 'Hello ' + name + ', from ' + country; } return { greet: performGreeting } }); var greeter = new Greeter("The Netherlands"); console.log(greeter.greet("Lody")); console.log(greeter.country); ``` Using the revelealing module pattern in VS Code seems to trip up Intellisense into suggesting the wrong members. The code above was tested in multiple browsers and consoles and run with Node v6.3.0 which behaved as expected. They ran the `greet()` function and returned `undefined` for `greeter.country`: ```bash λ node greeter.js Hello Lody, from The Netherlands undefined ``` But VS Code's Intellisense reports that `greeter` only contains `country`: ![image](https://user-images.githubusercontent.com/1598330/30318944-d12c85de-97ae-11e7-9e18-b82689b34769.png) It also reports the expected interface of `greeter` for the class itself (`Greeter`): ![image](https://user-images.githubusercontent.com/1598330/30318992-eed8773c-97ae-11e7-8678-9e279455fa38.png) What is expected is VS Code correctly inferring `greeter.greet` to be a function of `Greeter`, with a parameter `name`. This was reproduced in a clean folder of VS Code, with no extensions (launched with `code --disable-extensions`), and no `jsconfig.json`. _Copied from original issue: Microsoft/vscode#34214_
Suggestion,In Discussion,VS Code Tracked,Domain: JavaScript
low
Minor
257,934,721
TypeScript
New Feature Requesting for `const` Parameter
I have a small **new feature** to request. Let say we have this piece of code: ```ts function setButton(button: Button | undefined) { if (button) { button.onclick = () => { // tsc complains button might be undefined(well done!), // because it might be set to undefined later on, // as you can see below `button = undefined;`. button.setAttribute('disabled', 'true'); //error } } // some other code goes here... // and eventually, button is set to undefined. button = undefined; } ``` Fortunately, there is a way to fix this: ```ts function setButton(button: Button | undefined) { const constButton = button; if (constButton) { constButton.onclick = () => { // now tsc is satisfied. constButton.setAttribute('disabled', 'true'); } } // impossible to assign to a const variable. // constButton = undefined; } ``` But can we twist the code a little bit, which is what I asking for? Something like this: ```ts function setButton(const button: Button | undefined) { if (button) { button.onclick = () => { button.setAttribute('disabled', 'true'); } } } ``` So you can see there really are some cases a `const` parameter might come to handy. Thank you. P.S. Just for demonstrating the point, here's a full demo: ```ts class Button { onclick?: () => void; performClick() { if (this.onclick) this.onclick(); } setAttribute(key: string, value: string) { //set attribute to this button } } function setButton(button: Button | undefined) { if (button) { button.onclick = () => { button.setAttribute('disabled', 'true'); } } button = undefined; } const button = new Button(); setButton(button); button.performClick(); ```
Suggestion,Awaiting More Feedback
high
Critical
257,938,927
rust
[idea] Allow .rmeta to be translated in .rlib files
We could then teach cargo to make .rmeta files and concurrently convert them to .rlib files. If you only need .rmeta files for dependencies cargo could convert the .rmeta files when some cores are idle. This would be more efficient, as a crate can be compiled before llvm is run for its dependencies.
I-compiletime,T-compiler,C-feature-request
low
Major
257,964,337
TypeScript
Explain why private and protected members in a class affect their compatibility
**TypeScript Version:** up to 2.5.2 at least In [the doc](https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Type%20Compatibility.md#private-and-protected-members-in-classes) a short paragraph explains that private and protected members in a class affect their compatibility. I have been searching for a while in the design goals, on SO etc... but could not find a decent explanation of the rationale. Could we: * either document the rationale (in the paragraph above? * or consider evolving the language? Note: I found [one rationale](https://github.com/Microsoft/TypeScript/issues/7755#issuecomment-204161372) close to what I am looking for, but you could imagine that the language "reserves" the private names but does not compel to use them. **Code** This behavior is especially an issue in unit testing where you want to **mock** a class, disregarding its internals... ```ts class MyClass { pubfield = 0; private privfield1 = 0; constructor(private privfield2: number) {} private method(): void {} } class MyClassMock implements MyClass { pubfield: number; // *** compile errors on missing properties *** } ``` **Expected behavior:** I would like to only care about the public contract that a class-under-test can possibly use from my mock. **Actual behavior:** I cannot limit my mock to the public fields. The ugly workaround I found is the following: ```ts class MyClass { pubfield = 0; private privfield1? = 0; private privfield2? = 0; // do not use the shortcut notation because the constructor param is not optional! constructor(privfield2: number) { this.privfield2 = privfield2; } private method?(): void {} } class MyClassMock implements MyClass { pubfield: number; } ``` What I do not like is that I have to modify the semantics of my class to be able to mock it and that I am scared that a future overzealous refactoring may use the shortcut notation for fields declaration in the constructor... making the constructor param optional (!)
Docs
medium
Critical
257,968,924
rust
Rustc failed to resolve trait bounds for trait implementation
While trying to do some magic with traits I've stumbled over the following issue: Rustc is telling me that some trait bound is missing and suggest to add this bound. Now is the issue that exactly this bounds is already in the where clause. More or less minimal self contained [example](https://play.rust-lang.org/?gist=6e08519836ad5752e79d15fb89183a26&version=nightly) Workaround: Replace every occurrence of `Collection` in the `Factory` trait with `Vec<TypeA>`, but this removes the freedom the add additional impl's of `Factory` using other collection types.
C-enhancement,T-compiler
low
Critical
257,984,495
vscode
Extract the integrated terminal
"Feature" request. The integrated terminal grows in functionality, to the point that it could soon become very useful standalone, as its *own app*. I'm only a casual VScode user (using vim most of the time), but I would definitely be interested in a well-behaved, consistent, reactively-configurable, multi-platform terminal not tied to the editor. Obviously if such a situation were to unfold, the shared component (not entirely dissimilar to VTE) should be jointly developed and shared with VScode. Both could be able to leverage a common configuration so that whether a terminal leveraging such a theoretical common component is spawned within VScode or standalone, they behave the same. --- Edit from @Tyriar: There is some confusion about the scope of this issue, here is the clarification as the thread is long: - This issue is tracking making the terminal "stand alone", ie. being able to launch `code --term` for example (see https://github.com/microsoft/vscode/issues/34442#issuecomment-901959244 for details) - #10121 tracks being able to pull the terminal _view_/_panel_ out of the window - #10546 tracks adding tabs to the terminal, combined with #10121 this would ideally allow terminal _tabs_ to be pulled into a separate window
feature-request,workbench-cli,terminal-editors
high
Critical
258,084,645
rust
Cast error doesn't suggest boxed traits but maybe it should.
I have a function call that's something like: ```rust test(&[&"nani?" as &_, &"=_=".to_owned() as &_]); ``` The first `&_` is interpreted as a no-op cast, and the second is interpreted as a `&String -> &&str`. I did this to try and get a list of boxed traits, but the error message is pretty misleading unless you notice what the compiler's actually inferring, and almost makes it sound like `as` can't be used in this situation at all: ``` error[E0605]: non-primitive cast: `&std::string::String` as `&&str` ... = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait ``` I don't know how, but it would be nice if it could automagically recommend boxed traits in similar situations. [Playground](https://play.rust-lang.org/?gist=03ad4c524bc9474ee351d8a88ff2f495&version=stable)
A-diagnostics,T-compiler,A-coercions,D-terse,S-has-mcve
low
Critical
258,123,125
rust
Improve borrowck error message for nested flat_map
Take the following code: ```rust struct Foo { x: String } impl Foo { fn one(&mut self) -> Vec<String> { vec![] } fn two(&mut self) { let z: Vec<Vec<String>> = Default::default(); let _: Vec<_> = z.into_iter() .flat_map(|xs| xs.into_iter().flat_map(|_| self.one())) .collect(); } } ``` This code fails to compile with ```console error[E0598]: lifetime of `self` is too short to guarantee its contents can be safely reborrowed --> src/main.rs:8:52 | 8 | .flat_map(|xs| xs.into_iter().flat_map(|_| self.one())) | ^^^ | note: `self` would have to be valid for the method call at 7:25... --> src/main.rs:7:25 | 7 | let _: Vec<_> = z.into_iter() | _________________________^ 8 | | .flat_map(|xs| xs.into_iter().flat_map(|_| self.one())) 9 | | .collect(); | |______________________^ note: ...but `self` is only valid for the lifetime as defined on the body at 8:23 --> src/main.rs:8:23 | 8 | .flat_map(|xs| xs.into_iter().flat_map(|_| self.one())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` Though that is not particularly helpful in terms of identifying the underlying issue, namely that the inner flat map returns a closure whose lifetime is associated with `self`, preventing `self` from being used again when the outer closure is called again. I think. I'll let @nikomatsakis explain (reformatted from IRC): > basically you wind up with two ways to access `self`. easiest fix is certainly to call `collect()`. you are returning *the closure* as part of the iterator you return and *that closure* that you return has captured `self`, but the *outer closure* (which exists at the same time as the inner closure) also has captured self (so it can pass it to the inner closure). we have no way to know that the iterator will fully drain and discard the inner closure before re-invoking the outer closure > interesting test case; I wonder how on earth we could give an error that explains it better :P > do you suppose you could open an issue with that example and a brief summary (as an A-diagnostics puzzler)
C-enhancement,A-diagnostics,T-compiler
low
Critical
258,184,848
opencv
Access violations when using getUMat
<!-- If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses. If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute). This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library. --> ##### System information (version) <!-- Example - OpenCV => 3.1 - Operating System / Platform => Windows 64 Bit - Compiler => Visual Studio 2015 --> - OpenCV => 3.2 - Operating System / Platform => Windows 64 Bit - Compiler => Visual Studio 2015 ##### Detailed description I have a code that uses `cv::Mat` frames from video streams and runs a bunch of different algorithms including filtering the images using `cv::blur` or face detection using `detectMultiScale`. If I let the code run on a few cameras for days, it works totally fine, no crash or whatsoever. However, if I feed the UMat to these functions by simply substituting the `image` with `image.getUMat(cv::ACCESS_READ)` and let the code run for a while, I will get an Access Violation Exception at some point. Unfortunately, this is not reproducible, but the error is always at `cv::fastFree(void* ptr)`. Here is the crash call stack: - opencv_core320d.dll! cv::fastFree(void * ptr) Line 81 - opencv_core320d.dll! cv::StdMatAllocator::deallocate(cv::UMatData * u) Line 218 - opencv_core320d.dll! cv::MatAllocator::unmap(cv::UMatData * u) Line 63 - opencv_core320d.dll! cv::Mat::deallocate() Line 461 - cv::Mat::release() Line 705 Please note that neither the `ptr` fed into the `cv::fastFree` or `uimage.u` or `(uimage.u)->data` are NULL. All of them seem to point to legitimate memory locations. ##### Steps to reproduce Unfortunately, this is not reproducible and I couldn't find any pattern when this happens. You have to let in run for a few hours and it will crash if you have used `getUMat` somewhere!
incomplete
low
Critical
258,185,016
opencv
OCL_Arithm/Mul.Mat_Scale tests failing
##### System information (version) ``` CTEST_FULL_OUTPUT OpenCV version: 3.3.0-dev OpenCV VCS version: 3.3.0-rc-555-g9b178d7 Build type: release Parallel framework: tbb CPU features: mmx sse sse2 sse3 Intel(R) IPP optimization: enabled Intel(R) IPP version: ippIP AVX2 (l9) 2017.0.3 (-) Jul 29 2017 OpenCL Platforms: NVIDIA CUDA dGPU: GeForce GTX 1050 (OpenCL 1.2 CUDA) Current OpenCL device: Type = dGPU Name = GeForce GTX 1050 Version = OpenCL 1.2 CUDA Driver version = 384.69 Compute units = 5 Max work group size = 1024 Local memory size = 48 kB Max memory allocation size = 1010 MB 288 kB Double support = Yes Host unified memory = No Device extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer Has AMD Blas = No Has AMD Fft = No ``` ##### Detailed description ``` [ FAILED ] 17 tests, listed below: [ FAILED ] hal_intrin.float32x4 [ FAILED ] hal_intrin.float64x2 [ FAILED ] Core_InputOutput.filestorage_keypoints_vec_vec_io [ FAILED ] Core_InputOutput.FileStorage_DMatch_vector [ FAILED ] Core_InputOutput.FileStorage_DMatch_vector_vector [ FAILED ] Core_InputOutput.FileStorage_KeyPoint_vector [ FAILED ] Core_InputOutput.FileStorage_KeyPoint_vector_vector [ FAILED ] Core_globbing.accuracy [ FAILED ] Core_Pow.special [ FAILED ] OCL_Arithm/Mul.Mat_Scale/40, where GetParam() = (CV_32F, Channels(1), false) [ FAILED ] OCL_Arithm/Mul.Mat_Scale/41, where GetParam() = (CV_32F, Channels(1), true) [ FAILED ] OCL_Arithm/Mul.Mat_Scale/42, where GetParam() = (CV_32F, Channels(2), false) [ FAILED ] OCL_Arithm/Mul.Mat_Scale/43, where GetParam() = (CV_32F, Channels(2), true) [ FAILED ] OCL_Arithm/Mul.Mat_Scale/44, where GetParam() = (CV_32F, Channels(3), false) [ FAILED ] OCL_Arithm/Mul.Mat_Scale/45, where GetParam() = (CV_32F, Channels(3), true) [ FAILED ] OCL_Arithm/Mul.Mat_Scale/46, where GetParam() = (CV_32F, Channels(4), false) [ FAILED ] OCL_Arithm/Mul.Mat_Scale/47, where GetParam() = (CV_32F, Channels(4), true) ``` # Other Info As of today the build with cuda-9-RC with Nvidia-384 fails to load with python. import cv2 leads to segfaults. #9568 refers to this. I am unable to debug the segfault with python-gdb on linux as it just throws out a generic error: `ImportError: /home/whizzzkid/.opencv/lib/python2.7/dist-packages/cv2.so: undefined symbol: Py_InitModule4_64` As of now, rebuilding without opencl, I am not sure if cuda will still work, let's see.
category: ocl
low
Critical
258,196,289
vscode
Implement privacy mode
There should be a configurable privacy flag preventing Visual Studio Code from making any outbound connections similar to macOS firewall stealth mode. This would be useful to prevent someone with access to github operations data or an administrator of github accounts from tracking you. Visual Studio Code immediately on launch makes various outbound tcp connections over https to Microsoft Corporation Some Visual Studio Code out-of-the-box behavior has been seen to contact github every 3 minutes - VSCode Version: 1.16.0 - OS Version: Linux
feature-request
low
Major
258,221,642
opencv
Multi-page TIFF reading with imreadmulti in python returning empty list?
<!-- If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses. If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute). This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library. --> ##### System information (version) <!-- Example - OpenCV => 3.3.0 - Operating System / Platform => Ubuntu 17.04 - Compiler => gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406 --> - OpenCV => 3.3.0 - Operating System / Platform => Ubuntu 17.04 - Compiler => gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406 - Language => Python 3 ##### Detailed description Using imreadmulti in python seems to read the image, but returns an empty image list. Usage might be incorrect, I didn't find any working example for calling imreadmulti from Python <!-- your description --> ##### Steps to reproduce Run the attached python example [imreadmulti_bug.zip](https://github.com/opencv/opencv/files/1308221/imreadmulti_bug.zip) <!-- to add code example fence it with triple backticks and optional file extension ```.cpp // C++ code example ``` or attach as .txt or .zip file --> Output is ``` True 0 [] ``` That should mean image was read correctly (True), but length is 0. Tiff file has 2 pages
category: python bindings,category: imgcodecs
low
Critical
258,233,293
angular
(AOT): ngc in watch mode starts compilation on every save from IDE
<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION. ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. --> ## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior <!-- Describe how the issue manifests. --> ngc in watch mode starts compilation on every save from IDE (Intellij Idea, autosave each 15 sec, autosave on window deactivation, manual save ctrl+s), but it does not mean that files were changed, content is the same, but ngc reports that file change was detected. It is not a problem in general, but even incremental recompilation takes quite much time. ## Expected behavior ngc should try to minimize useless recompilations. webpack does it as well as tsc. ## Environment <pre><code> Angular version: 5.0.0-beta-7 <!-- Check whether this is still an issue in the most recent Angular version --> For Tooling issues: - Node version: 8.4.0 - Platform: Windows
type: bug/fix,effort1: hours,freq2: medium,workaround2: non-obvious,area: compiler,state: confirmed,P4
low
Critical
258,239,203
every-programmer-should-know
What are some good resources on Problem Solving?
Needs some ❤️
low
Major
258,277,012
go
cmd/trace: go tool trace mishandles goroutine that extends beyond the current span.
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? % go version go version devel +f351dbfa4d Thu Sep 14 04:49:58 2017 +0000 darwin/amd64 ### Does this issue reproduce with the latest release? yes ### What operating system and processor architecture are you using (`go env`)? % uname -a Darwin zapf.fritz.box 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64 ### What did you do? Download the attached px.out trace go tool trace px.out Open the first span (0s-256.629789ms) [px.out.zip](https://github.com/golang/go/files/1308813/px.out.zip) ### What did you expect to see? The trace to terminate at 256ms with the G1 runtime.main goroutine constrained to the 256ms boundry. ### What did you see instead? G1 runtime.main extends the length of the runtime of the program, 1.7s. Zooming into the trace G1 runtime.main does not appear to be valid, there are no breaks in the sequence and it doesn't seem to represent the real trace. ![screen shot 2017-09-17 at 13 33 04](https://user-images.githubusercontent.com/7171/30517784-f7efff32-9bac-11e7-96f1-3f5d0bc12ca1.png)
help wanted,NeedsFix,compiler/runtime
low
Minor
258,312,049
TypeScript
Can not specify toString/valueOf methods in object literal
<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.5.2 **Code** ```ts interface X { name: string } const x1: X = { get name() { return 'x1' }, toString() { return this.name }, // ^^^^^^^^ // Type '{ readonly name: string; toString(): string; }' is not assignable to type 'X'. // Object literal may only specify known properties, and 'toString' does not exist in type 'X'. } const x2: X = {name: 'x2'} x2.toString = function () { return this.name } // But add `toString` later is allowed. ``` **Expected behavior:** Should allow object literal specify `toString`, `valueOf` and all properties exists on `Object.prototype`, or at least improve the error report to give a workaround (`const x: X & Object`). **Actual behavior:** See comments in code.
Bug
low
Critical
258,316,210
rust
Overflow evaluating the requirement error could be better for trivially recursive impls
[This overflow error could be better](https://play.rust-lang.org/?gist=5265161348870505c1b87db864f47e10&version=stable): ```rust pub trait A {} impl<T: A> A for T {} pub trait B: A {} struct C {} impl B for C {} fn main() {} ``` errors with: ```shell error[E0275]: overflow evaluating the requirement `C: A` --> src/main.rs:8:6 | 8 | impl B for C {} | ^ | = note: required by `B` error: aborting due to previous error ``` which doesn't really point at the problem. The problem is that the `impl<T: A> A for T {}` is recursive.
C-enhancement,A-diagnostics,A-trait-system,T-compiler
low
Critical
258,336,913
neovim
hooks ("provider" interface) for find-file logic (:make %f, gf, ...)
This is just a usability enhancement suggestion, but perhaps consider not jumping to a non-existent file incorrectly parsed by `&errorformat` from the output of `:make`. This is particularly handy if `makeprg` is set to some value with output not compatible with the default `errorformat` (and without a custom `errorformat` defined) that causes `%f` to evaluate to an incorrect value. Apart from improving the default `erroformat` where possible, I think internally disregarding the `%f` result if it points to a non-existent path is a fairly conservative "hack" that could greatly improve the user experience without adding too much magic or breaking compatibility. Keeping in mind that is several order of magnitudes easier to specify a custom `makeprg` than it is to generate a proper custom `errorformat` for said `makeprg`, neovim users are bound to run into the case where their `makeprg` results in an incorrectly determined `%f` from whatever the current `errorformat` value is. For instance, with `makeprg` set to `ninja` and attempting to build an invalid ninja build script, the default output of the tool is this (fairly standard, nothing surprising) error: ``` mqudsi@ZBook /m/c/U/M/g/wp-prism> ninja ninja: error: build.ninja:20: expected '=', got lexing error sed "s/\$$prism_version = null;/\$$prism_version = \"$$(./prismversi... ^ near here ``` Unfortunately, the default `errorformat` parses this as an error in a file called `ninja: error: build.ninja` on line `20`, and pressing enter in response to the `Press ENTER or type command to continue` prompt causes the buffer to be replaced with an empty one (the result of loading the non-existent file specified).
enhancement,provider
low
Critical
258,341,882
rust
Tracking issue for RFC 1977: public & private dependencies
### Summary RFC (original, superseded): [#1977](https://github.com/rust-lang/rfcs/pull/1977) RFC: [#3516](https://github.com/rust-lang/rfcs/pull/3516) Cargo tracking issue: https://github.com/rust-lang/cargo/issues/6129 Issues: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AF-public_private_dependencies Cargo issues: https://github.com/rust-lang/cargo/issues?q=is%3Aopen+is%3Aissue+label%3AZ-public-dependency Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#public-dependency This feature enables the ability to track which dependencies are publicly exposed through a library's interface. It has two sides to the implementation: rustc (lint and `--extern` flag), and cargo (`Cargo.toml` syntax, and passing `--extern` flags). This feature was originally specified in rust-lang/rfcs#1977, but was later down-scoped in rust-lang/rfcs#3516. ### About tracking issues Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label. Discussion comments will get marked as off-topic or deleted. Repeated discussions on the tracking issue may lead to the tracking issue getting locked. ### Unresolved Questions ### Steps - [ ] Implementation - [x] rust-lang/rust#57586 - [x] rust-lang/rust#59335 - [x] #67074 - [ ] #71043 - [ ] #119428 - [x] https://github.com/rust-lang/rust/pull/122665 - [x] https://github.com/rust-lang/rust/pull/122757 - [x] rust-lang/cargo#6653 - [x] rust-lang/cargo#6772 - [x] rust-lang/cargo#6962 - [x] rust-lang/cargo#12817 - [x] rust-lang/cargo#13039 - [x] rust-lang/cargo#13036 - [x] rust-lang/cargo#13037 - [ ] rust-lang/cargo#13038 - [x] rust-lang/cargo#13308 - [x] rust-lang/cargo#14502 - [ ] ~~Command to update Cargo.lock to minimal versions (rust-lang/cargo#4100)~~ - [ ] ~~Make `cargo publish` use the minimal versions allowed by Cargo.toml~~ - [ ] Ensure quality of error messages is sufficient - [ ] rust-lang/cargo#13095 - [ ] Make `exported-private-dependencies` `allow`-by-default pre-2024 and `deny`-by-default in 2024+ / in the 2024-compatibility lint group - [ ] Perform a crater run and evaluate whether the pre-202x edition lint should be `allow` or `warn` ([context from zulip](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/RFC.20.233516.20-.20RFC.3A.20Superseding.20public.2Fprivate.20dependencies/near/419166799)) - [ ] Implement migration lints. - [ ] Add documentation to the [edition guide][]. - [ ] Ensure ready for Rust 2024 stabilization. [dev guide]: https://github.com/rust-lang/rustc-dev-guide [doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs [edition guide]: https://github.com/rust-lang/edition-guide [nightly style procedure]: https://github.com/rust-lang/style-team/blob/master/nightly-style-procedure.md [reference]: https://github.com/rust-lang/reference [reference-instructions]: https://github.com/rust-lang/reference/blob/master/CONTRIBUTING.md [style guide]: https://github.com/rust-lang/rust/tree/master/src/doc/style-guide Non-blocking further improvements - rust-lang/cargo#13096 ### Changes from RFC - RFC did not specify workspace inheritance behavior. With rust-lang/cargo#13125, we disallow it. cc @rust-lang/cargo @epage
B-RFC-approved,E-help-wanted,T-cargo,C-tracking-issue,A-maybe-future-edition,S-tracking-impl-incomplete,S-tracking-design-concerns,S-tracking-needs-migration-lint,S-tracking-needs-documentation,F-public_private_dependencies
high
Critical
258,351,284
rust
Cannot 'use' constant associated types.
``` struct Foo{} impl Foo { const BAR: usize = 0; fn useConst(&mut self) { use Foo::BAR; println!("{:?}", BAR); // cannot use just BAR, must use Foo::BAR } } ``` Basically you should be able to 'use' an associated constant so you don't have to fully qualified names. In the above case once extra word is no big deal. But imagine you need to have 20 constants and you use them 100 times.
A-associated-items,T-lang,C-feature-request
low
Minor
258,517,890
go
x/tools/refactor/rename: does not rename example functions
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? go 1.9 ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? ### What did you do? https://play.golang.org/p/ibc3hWTjqN Rename a function ### What did you expect to see? https://play.golang.org/p/U0pdaBJT8j gorename to rename the function, and to rename the example function, ExampleF. gorename correctly renames the comment above documenting the function but does not rename the example function. After the rename, the example function is no longer visible in godoc ### What did you see instead? https://play.golang.org/p/aSKw0KKxLH
Tools,Refactoring
low
Minor
258,547,936
neovim
netrw: "modifiable" errors after clicking away from insert mode
Under `NVIM v0.2.1-867-gd2cbc31`, the following causes errors about the buffer not being modifiable to show up: ``` nvim -u NORC :vsp :set mouse=a #click in right pane :Explore #click in left pane i #click in right pane #click in left pane ``` Expected: back in left pane in insert mode Actual: error about modifiable being off, in insert mode, in right pane
netrw
low
Critical
258,592,408
go
go/build: ImportDir/Import no longer return os not found error for missing dir on local files
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? 1.9 ### Does this issue reproduce with the latest release? Yes. Was not present before latest release. ### What operating system and processor architecture are you using (`go env`)? GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/mfarina/Code/go" GORACE="" GOROOT="/usr/local/Cellar/go/1.9/libexec" GOTOOLDIR="/usr/local/Cellar/go/1.9/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/ml/55r2m1jd38x068q85txj8cvc0000gn/T/go-build428826794=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" ### What did you do? I have code that uses `ImportDir` (from the `go/build` package) to look at the packages used by another package. If there is an error from `ImportDir` the automation acts on the error to try and fix the problem. ### What did you expect to see? I expected a missing directory to cause the returned error to be able to be detected by `os.IsNotExist`. This is how previous version of Go worked. ### What did you see instead? The returned error was in the form of ```go fmt.Errorf("cannot find package %q in:\n\t%s", path, p.Dir) ``` In 1.8.3 (and before), the `Import` function would fall through to [`ctxt.readDir`](https://github.com/golang/go/blob/go1.8.3/src/go/build/build.go#L691) that used `io.ReadDir`... https://github.com/golang/go/blob/352996a381701cfa0c16e8de29cbde8f3922182f/src/go/build/build.go#L171-L177 In 1.9 The code is a little different for local files. Instead the code stops at... https://github.com/golang/go/blob/c8aec4095e089ff6ac50d18e97c3f46561f14f48/src/go/build/build.go#L687-L695 You can no longer rely on `os.IsNotExist` to detect missing package directories. _This change was not documented in the release notes, either._
help wanted,NeedsFix
low
Critical
258,604,996
electron
Embed External Native Windows
There is no clean method of taking a native window and embedding it into the application. I think, at least for desktop applications, this should be mainstreamed as virtually any other UI toolkit can accomplish this without many issues.
enhancement :sparkles:
high
Critical
258,609,615
flutter
Add oldest supported iOS simulator tests
Devicelab iOS tests should also be run on iOS 8 and 9. Since physical devices have a nasty habit of being irreversibly updated to newer OS releases, and we need more simulator coverage anyway, simulators seem like the most reasonable approach.
a: tests,team,platform-ios,P3,team-ios,triaged-ios
low
Major
258,635,515
rust
Tracking Issue for RFC 1826: Change the default URL of doc.rust-lang.org
This is a tracking issue for the RFC 1826 (rust-lang/rfcs#1826). **Steps:** - [ ] Implement the RFC - [ ] Switch doc.rust-lang.org over, which is sort of "stabilization" in this case. **Unresolved questions:** No official ones, but there will undoubtedly be tweaks during implementation. NB: a prototype is at https://rust-docs.herokuapp.com, source here: https://github.com/steveklabnik/rust-docs This can serve as a starting point for discussing said details, but does not literally have to be the basis of implementation.
T-rustdoc,P-medium,B-RFC-approved,A-docs,T-infra,C-tracking-issue
medium
Major
258,657,814
flutter
Scale text on Cupertino widgets to match iOS text sizes
For Cupertino widgets, we need to figure out how to scale our text sizes so that when someone asks for a "headline" or other named sizes on iOS, they get the size that they expect. On Android, there is a single FONT_SCALE (a double) that scales the font based on a system preference, but on iOS, the font size preference doesn't scale linearly with the different font usages. For instance, an Extra Extra Extra Large headline on iOS is 18% larger, whereas a footnote is only 15% larger, and an "Extra Large" headline is 5% larger, while an "Extra Large" caption3 doesn't change size at all. ![iOS Font Size Table](https://i.stack.imgur.com/RiXd5.png)[](url) (table from this [stackoverflow post](https://stackoverflow.com/questions/20510094/how-to-use-a-custom-font-with-dynamic-text-sizes-in-ios7/20510095#20510095)) In order to make sure that Cupertino assets get the sizes that match what iOS does, we'll probably need to change the tables in [`typography.dart`](https://github.com/flutter/flutter/blob/1b9c6a68351bc2925118494df185acdde6cb7936/packages/flutter/lib/src/material/typography.dart#L66) so that instead of fixed values for the font sizes, we do something more clever on each platform based on the preferred type size and the usage for the font.
platform-ios,framework,a: accessibility,a: fidelity,f: cupertino,P3,team-ios,triaged-ios
low
Minor
258,663,076
neovim
Switch buffers before emitting modified buffer message
In a simple usability improvement, error messages like ``` E37: No write since last change E:162: No write since last change for buffer "[No Name]" (or whatever) ``` should be emitted _after_ the buffers between "current buffer" and "modified buffer in question" have been closed. i.e. when that error message is shown, the buffer being referenced should be the buffer loaded into view. Currently, the behavior is ``` nvim -u NORC :set hidden ifoo bar :enew :q ``` will result in the error messages above showing, while the contents of the newly-created buffer are visible. Pressing `ENTER` causes the newly-created (unmodified) buffer to be closed and the modified buffer triggering the error to show.
ux
low
Critical
258,663,475
neovim
Unmodified buffers with set hidden causes multiple error messages on quit
Just another usability enhancement, trivial importance: - `nvim --version`: NVIM v0.2.1-867-gd2cbc31 - Vim (version: ) behaves differently? no - Operating system/version: n/a - Terminal name/version: n/a - `$TERM`: xterm-256color (n/a) ### Steps to reproduce using `nvim -u NORC` ``` nvim -u NORC :set hidden ifoo<ESC> :q ``` ### Actual behaviour Two error messages are emitted: ``` E37: No write since last change E162: No write since last change for buffer "[No Name]" ``` ### Expected behaviour The two errors are redundant. E162 provides more information and should be shown. There's no reason for E37 to also be shown.
ux,bug-vim
low
Critical
258,689,168
rust
Tracking issue: RFC 2103 - attributes for tools
Support scoped attributes for white-listed tools, e.g., `#[rustfmt::skip]` [RFC](https://github.com/rust-lang/rfcs/blob/master/text/2103-tool-attributes.md) [discussion thread](https://github.com/rust-lang/rfcs/pull/2103) - [x] implement for attributes ([mentoring instructions here](https://github.com/rust-lang/rust/issues/44690#issuecomment-331979427)) - [ ] implement for lints (https://github.com/rust-lang/rust/pull/52018; see https://github.com/rust-lang/rust/issues/44690#issuecomment-405749334) - [ ] Adjust documentation ([see instructions on forge][doc-guide]) - [ ] Stabilization PR ([see instructions on forge][stabilization-guide]) Current status: stabilised for attributes, some work still to do on lints. [stabilization-guide]: https://forge.rust-lang.org/stabilization-guide.html [doc-guide]: https://forge.rust-lang.org/stabilization-guide.html#updating-documentation
A-attributes,T-compiler,E-help-wanted,C-tracking-issue,disposition-merge,finished-final-comment-period,S-tracking-needs-summary
high
Critical
258,732,834
vscode
Unify indentation and formatting APIs
Maybe this is wishful thinking but I am experiencing many subtle issues with the relatively new [`editor.autoIndent` feature](https://code.visualstudio.com/updates/v1_14#_auto-indent-on-type-move-lines-and-paste). It's a very useful one and I want to keep it but it misbehaves quite frequently, see e.g. issues #29390, #32333 and [many others](https://github.com/Microsoft/vscode/issues?utf8=%E2%9C%93&q=is%3Aopen%20label%3Aeditor-indentation%20label%3Abug). Quite a good example is this (from #32835): Indentation via Format Document: ```tsx const MyReactComponent = (props) => { return ( <div> <Helmet titleTemplate='%s'> <title>Hello</title> </Helmet> </div> ); }; ``` Formatting via Reindent Lines: ```tsx const MyReactComponent = (props) => { return ( <div> <Helmet titleTemplate='%s'> <title>Hello</title> </Helmet> </div> ); }; ``` It often seems to me that [formatting API](https://code.visualstudio.com/blogs/2016/11/15/formatters-best-practices) produces better results than [indentation rules](https://code.visualstudio.com/updates/v1_14#_auto-indent-on-type-move-lines-and-paste) but even if that wasn't always the case it just seems logical to have a single API to power both features. It seems like this to me: 1. **Indenting** functionality cares about the **leading whitespaces**. 2. **Formatting** cares about the above **_plus_ anything after the first non-whitespace character**. So it's a subset / superset problem and I don't think it should be implemented twice, in a completely different manner. What do you think? Would there be a chance to unify the two APIs and eliminate some bugs along the way? --- For reference, some key issues related to this: - Auto Indent / Code Formatting / Beautify #4039 - improve indentation rules #17868 - Options for automatic indentation #19303
editor-autoindent,under-discussion
low
Critical
258,747,473
go
runtime: use atomic.Store instead of simple assignment
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? master ### Does this issue reproduce with the latest release? yes ### What operating system and processor architecture are you using (`go env`)? any May be it would be better to use `atomic.Load` here? https://github.com/golang/go/blob/master/src/runtime/mprof.go#L443 Anyway it lookg strange - we use atomic operation to store value and non atomic value to read it.
NeedsInvestigation,early-in-cycle,compiler/runtime
low
Major
258,785,550
vscode
Support symbolic link folders in areas like debug, extensions
<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode. --> <!-- Use Help > Report Issues to prefill these. --> - VSCode Version: 1.16.1 - OS Version: macOS sierra 10.12 Steps to Reproduce: 1. Open a empty workspace 2. Create a file and create a symlink to this file in workspace. 3. On opening the file, the linked file will be open in the editor. The path (on hovering over the opened file name) will be shown for the symlink and opening the file in Finder by right clicking will also open the symlink's parent folder. The issue with this is it also causes inconsistency with Git markers in enhanced scrollbar and all extensions which operate on open file (like gitlens for `git blame`). There should be a editor property to configure this path to be set as original file's path or the symlink's path. <!-- Launch with `code --disable-extensions` to check. --> Reproduces without extensions: Yes
feature-request
high
Critical
258,786,798
rust
Weird error with inference when a function doesn’t compile
```rust fn foo(_: &[String]) -> Vec<std::std::string::String> { Vec::new() } fn main() { let x = foo(&Vec::new()); foo(&x); } ``` Here, the `foo` function is obviously wrong – `std::std::string::String`. However, it looks like *rustc* tried to typecheck the rest of the program and now thinks that `x` should have the type `[String]` – because of its use in `foo`. I guess the error message would be more explicit with `x.as_slice()` and that it has something to do with the auto deref coercion? It results in two messages: the first one, correct, about the `std::std` thing. The second, about `[String`], which is really misleading.
C-enhancement
low
Critical
258,832,918
rust
Missed code elimination with std::mem::replace/std::mem::swap
**Edit:** As pointed out by @oyvindln, the problem appears to be a regression introduced in 1.20. **Demonstration:** https://godbolt.org/g/5uuzVL **Version:** rustc 1.22.0-nightly (277476c4f 2017-09-16) , -C opt-level=3 -C target-cpu=native **Code:** ```rust use std::rc::Rc; use std::cell::RefCell; pub struct Buffer { buf: Vec<u8>, pool: Rc<RefCell<Vec<Vec<u8>>>>, } impl Drop for Buffer { fn drop(&mut self) { self.pool.borrow_mut() .push(std::mem::replace(&mut self.buf, vec![])); } } ``` **Expected result:** An optimal code would move `self.buf` directly into `self.pool` and then reset `self.buf` in-place. An acceptable code would move`self.buf` into a temporary on the stack, move the temporary into `self.pool` and reset `self.buf` in-place. **Observed result:** 1. Space for two `std::Vec<u8>`(each 24 bytes) is allocated on the stack, `-48(%rbp)` (A) and `-96(%rbp)` (B). 2. `self.buf` is copied to A. 3. `self.buf` is reset in-place. 4. A is copied to B. 5. B is copied to A. 6. A is inserted into `self.pool`. Steps 4 and 5 is a completely unnecessary copying of 48 bytes and could be safely removed. Replacing `std::mem::replace` with an equivalent `std::mem::swap` call produces a slightly different code with the same basic problem. **Compiler output:** ``` asm <example::Buffer as core::ops::drop::Drop>::drop: pushq %rbp movq %rsp, %rbp pushq %rbx subq $88, %rsp movq %rdi, %rax movq 24(%rax), %rbx cmpq $0, 16(%rbx) jne .LBB6_6 leaq 16(%rbx), %rcx movq $-1, 16(%rbx) leaq 24(%rbx), %rdi movq %rdi, -64(%rbp) movq %rcx, -56(%rbp) ;2 movq 16(%rax), %rcx movq %rcx, -32(%rbp) vmovups (%rax), %xmm0 vmovaps %xmm0, -48(%rbp) ;3 movq $1, (%rax) vxorps %xmm0, %xmm0, %xmm0 vmovups %xmm0, 8(%rax) ;4 movq -32(%rbp), %rax movq %rax, -80(%rbp) vmovaps -48(%rbp), %xmm0 vmovaps %xmm0, -96(%rbp) ;5 movq -80(%rbp), %rax movq %rax, -32(%rbp) vmovaps -96(%rbp), %xmm0 vmovaps %xmm0, -48(%rbp) ;6 movq 40(%rbx), %rax cmpq 32(%rbx), %rax jne .LBB6_4 callq <alloc::raw_vec::RawVec<T, A>>::double movq 40(%rbx), %rax .LBB6_4: movq 24(%rbx), %rcx leaq (%rax,%rax,2), %rax movq -32(%rbp), %rdx movq %rdx, 16(%rcx,%rax,8) vmovaps -48(%rbp), %xmm0 vmovups %xmm0, (%rcx,%rax,8) incq 40(%rbx) movq $0, 16(%rbx) addq $88, %rsp popq %rbx popq %rbp retq .LBB6_6: callq core::result::unwrap_failed movq %rax, %rbx leaq -48(%rbp), %rdi callq core::ptr::drop_in_place leaq -64(%rbp), %rdi callq core::ptr::drop_in_place movq %rbx, %rdi callq _Unwind_Resume@PLT ```
I-slow,C-bug,I-heavy
low
Critical
258,912,435
TypeScript
Completions for callback parameter names
**TypeScript Version:** nightly (2.6.0-dev.20170919) **Code** ```ts function f(cb: (supercalifragilisticexpialidocious: boolean) => void): void { cb(true); } f((/**/ ``` **Expected behavior:** Provides parameter name completions. **Actual behavior:** No help.
Suggestion,In Discussion,Domain: Completion Lists
low
Minor
258,912,910
go
cmd/compile: cleaner solution for exporting linkname info
CL 33911 (e3efdffacdd27786e) added symbol linknames to the export data format, but in a suboptimal way: every symbol written into the export data now includes linkname information, even if they're not actually relevant (e.g., for local variables/labels in inline bodies). This appears to have been done this way because it's less intrusive and didn't require a version bump for release, but we should do it correctly. /cc @griesemer
early-in-cycle,compiler/runtime
low
Minor
259,003,974
go
cmd/compile: don't depend on statictmp_ variables being read only
In cmd/compile/internal/gc/racewalk.go: ``` // statictmp's are read-only if strings.HasPrefix(n.Sym.Name, "statictmp_") { return true } ``` This isn't really true. If you do: ``` type T struct { x int } var y = &T{} ``` Then the `&T` allocates a variable that starts with `statictmp_`, but it is writeable. I think it would be hard to have a race on these variables, as they are only accessed directly during init functions. But maybe we should update the comment. @dvyukov
NeedsFix,compiler/runtime
low
Major
259,010,628
kubernetes
Is sharing GPU to multiple containers feasible?
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/). --> **Is this a BUG REPORT or FEATURE REQUEST?**: feature request /kind feature **What happened**: As far, we do not support sharing GPU to multiple containers, one GPU can only be assigned to one container at a time. But we do have some requirements on achieving this, is it feasible that we manage GPU just like CPU or memory? **What you expected to happen**: sharing GPU to multiple containers just like CPU and memory.
sig/scheduling,sig/node,kind/feature,help wanted,area/hw-accelerators,lifecycle/frozen,triage/needs-information,wg/machine-learning
high
Critical
259,107,047
angular
`@angular/common/http` request throws an error that cannot be unit tested properly
## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [x ] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior When `responseType` is `json` and the body of the response is a string (e.g.: url `http://domain.com/url-of-the-created-resource`), there is an error because [JSON.parse](https://github.com/angular/angular/blob/4.4.3/packages/common/http/src/xhr.ts#L187) fails. Previously using `res.json()` with `@angular/http` this did not throw an error but returned the `string` as is. We had unit tests for this but `TestRequest` behaves differently and it does not throw an error so it is impossible to test this behavior using `@angular/common/http/testing`. ## Expected behavior A: `TestRequest` should behave the same way and throw an error in this case B: Do not throw an error and have the same behavior as `@angular/http` had ## Minimal reproduction of the problem with instructions ```ts this.http.request(method, url, { observe: "response", responseType: "json" }); ``` If body of the response is a string like "https://github.com" it throws an error with real XHR. However it does not throw using `TestRequest.flush` ## What is the motivation / use case for changing the behavior? To improve reliability of unit tests or fix a potential issue. ## Environment Angular version: 4.X.X Browser: <pre><code> - [X ] Chrome (desktop) version Latest - [ ] Chrome (Android) version XX - [ ] Chrome (iOS) version XX - [ ] Firefox version XX - [ ] Safari (desktop) version XX - [ ] Safari (iOS) version XX - [ ] IE version XX - [ ] Edge version XX Others: <!-- Anything else relevant? Operating system version, IDE, package manager, HTTP server, ... --> </code></pre>
area: testing,freq2: medium,area: common/http,type: use-case,P3
low
Critical
259,150,052
neovim
Incompatible with Vim when catching errors from Python commands
Given `t.vim`: ```vim try python3 meh catch echom v:exception endtry ``` `vim -u t.vim`: ``` Vim(python3):Traceback (most recent call last): ``` `neovim -u t.vim`: ``` Vim(return):Traceback (most recent call last): ``` There are plugins catching `python3` here explicitly, e.g. vim-maktaba: https://github.com/google/vim-maktaba/blob/2ae8b4478ea9bc2c6c8106acb55ddfb935754fb9/autoload/maktaba/python.vim#L57
vimscript,compatibility,provider
low
Critical
259,156,395
godot
Mouse wheel scrolling is 3x faster when hovering scrollbar
Godot 2.1.4 Windows 10 64 bits I just noticed that in the script editor, if you use the mouse wheel over the text, it scrolls normally, but if you hover the vertical scrollbar it scrolls 3 times faster. Not sure if that's intented. It also happens in the scene tree, probably in more places.
bug,topic:editor,confirmed,usability
low
Major
259,237,605
angular
The (needed) "index.html" disappears from Location URL upon page refresh or direct navigation
## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [X] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior I don't have a ready-made reproduction (sorry, too new at this), but I'm working with a team of folks on a version control repository (Git/Subversion) viewer type of application (rather like the GitHub code browser) where the repository path to be viewed is carried in the Angular app's route URL. For example, the _repository path_ of a Subversion-versioned project's website index file might be `/trunk/www/index.html`, and the _Angular app's route_ for displaying the contents of that file might be `{{base_href}}/{{project_name}}/view/trunk/www/index.html`. Note firstly that this all works as expected for most versioned items. But for paths that actually end in the literal string `index.html`, Angular eats that bit of the location URL and the app shows the parent directory instead. Now, from the parent directory display of my app (which shows as a directory listing with each subdirectory and file linked, as expected), I can navigate into an `index.html` repository file's display successfully. But if I refresh the page, I see the Location URL change to have the `index.html` removed and my app again shows the parent directory listing. I _suspect_ this may have something to do with this [logic in Location's constructor](https://github.com/angular/angular/search?q=_stripIndexHtml), but lack the skillz to prove it: ```this._baseHref = Location.stripTrailingSlash(_stripIndexHtml(browserBaseHref));``` ## Expected behavior I expect that the `index.html` part of a Location URL would be left in place and available to the router and components that need it. ## Environment <pre><code> Angular version: 4.3.5 Browser: - [X] Chromium (desktop) version 60.0.3112.113 </code></pre>
type: bug/fix,freq1: low,area: router,state: confirmed,router: URL parsing/generation,P3
low
Critical
259,248,357
flutter
Clarify fps in PerformanceOverlay
Hitting 60fps in the PerformanceOverlay doesn't necessarily mean that your app will be 60fps. In fact, the PerformanceOverlay can show 60fps when a trace shows that the app is nowhere close to that. The PerformanceOverly should make it clear what the 60fps mean that it shows. This came up while looking at https://github.com/flutter/flutter/issues/12138.
engine,c: performance,perf: speed,P2,team-engine,triaged-engine
low
Major
259,249,209
rust
Consistent naming for Arm "thumb" targets?
[This commit](https://github.com/rust-lang/rust/commit/07494ecf78b3d21e8d67fd3a1a33466e63cae05d) changed the armv7-linux-androideabi target from generating Arm code to Thumb code. This may be deemed a valid change but I feel like it deserves at least a short discussion for a number of reasons. * This is a breaking change for anyone that was relying on that target generating Arm code. e.g., anyone using inline assembly with Arm state only instructions or someone bit fiddling code pointers and maybe some other ways. However, I think it's unlikely someone was doing this. * There is a convention for the rust target names that generate Thumb code to start with `thumb` instead of `arm`. This is the same convention clang uses for `--target` and LLVM. Either way, the same change should probably be applied to all the `armv7*` targets for consistency.
O-Arm,T-compiler,C-bug,WG-embedded
low
Major
259,267,059
opencv
3rdparty/carotene: remove inline asm code
Currently "carotene" supports two code branches: - legacy inline asm code (GCC 4.6 and older, doesn't support AARCH64). Currently it is not tested on OpenCV CI. - optimization via intrinsic functions Suggestion is to remove inline asm code. Related: #9440(#9450) #9669
category: build/install
low
Minor
259,291,430
vscode
Display line number as hybrid styles
I believe there is currently no option to display both absolute and relative line numbers. Available options for vscode are: 'on', 'off', and 'relative'. The relative shows the relative line numbers for all lines except the current line. The current line is displayed as absolute number. ![vscode](https://user-images.githubusercontent.com/31377202/30665564-05f0bbd2-9e17-11e7-9b37-770ef39fd0a7.png) It would be nice, however, if we could have both absolute lines and relative lines displayed simultaneously. Here are two examples: ![vs](https://user-images.githubusercontent.com/31377202/30665590-19191e2a-9e17-11e7-9689-d03460126959.png) ![extension](https://user-images.githubusercontent.com/31377202/30665581-12cc620c-9e17-11e7-89d8-965a1682c14d.png) The above images are from an extension of Visual Studio and the deprecated extension [Relative Line Numbers](https://marketplace.visualstudio.com/items?itemName=extr0py.vscode-relative-line-numbers). The extension is deprecated since VS Code 1.6 where the line number setting was officially supported. In addition, some of additional features that would be great to have are: 1. to customise the colours of line numbers, preferably to different colours as shown in the 2nd image 1. to customise the positions of the two line numbers so we can choose to place absolute lines at left or right Since this feature was already supported by an old extension, I imagine it would not be so hard to implement. Would it be possible to support Hybrid Line Number feature in VS Code?
feature-request,editor-core
high
Critical
259,309,068
go
proposal: spec: permit directional variants of named channel types
Consider this program: ``` package main import ( "fmt" ) type Foo chan string func main() { c := make(Foo, 1) c <- "gotcha" fmt.Println(<-c) } ``` All is well. Now try to declare a direction for a Foo: ``` package main type Foo chan string func main() { var x <-Foo } // or func x(c <-Foo) { } ``` This doesn't parse, but it's reasonable to expect it would and maybe, perhaps with parenthesization, easy to define without ambiguity. (A directional Foo with element type Foo could be tricky.) Reported on twitter.
LanguageChange,Proposal,LanguageChangeReview
low
Major
259,329,090
neovim
:sav shouldn't continue on write failure
<!-- Before reporting: search existing issues and check the FAQ. --> - `nvim --version`: NVIM v0.2.1-867-gd2cbc31 - Vim (version: ) behaves differently? no - Operating system/version: WSL - Terminal name/version: conhost - `$TERM`: xterm-256color ### Steps to reproduce using `nvim -u NORC` ``` nvim -u NORC :save /hello :!echo % ``` ### Actual behaviour `:sav` throws expected error about permission denied (`E212: Can't open file for writing: permission denied`), but then proceeds to set the file path for the buffer in question to `/hello` and `:!echo %` prints `/hello` (which doesn't exist). ### Expected behaviour `:sav` should throw the same error about permission denied then abort, so that `:!echo %` thereafter should return an error `E499: Empty file name for '%' or '#', only works with ":p:h"`
ux
low
Critical
259,361,751
vue
Improve diff intuition for components nested under plain elements
### Version 2.3.3 ### Reproduction link [https://jsfiddle.net/vitorDeng/50wL7mdz/63147/](https://jsfiddle.net/vitorDeng/50wL7mdz/63147/) ### Steps to reproduce 打开浏览器控制台,点击Run ### What is expected? 其他v-if的元素不应该影响互不相干的组件 ### What is actually happening? 同级下,若前后使用了与包裹组件的元素一样的,并使用了v-if指令,则v-if指令会影响该组件不断创建和销毁 <!-- generated by vue-issues. DO NOT REMOVE -->
improvement
low
Major
259,365,789
godot
Hidden, non-shadowmapped, or editor-only lights are still included in the profiler for extra render passes
**Operating system or device, Godot version, GPU Model and driver (if graphics related):** Ubuntu 16.04, Godot commit 0899b50, GeForce GTX 760 (Nvidia binary driver 375.66) **Issue description:** Shadowmapping results in multiple passes for rendering. While these are not visible, even when a point light is hidden, marked as editor only, or has just its shadow mapping disabled, it is still included in the profiling for things like vertex count and material changes. Unsure if the passes are ACTUALLY happening behind the scenes, but they are being included in profiling regardless **Steps to reproduce:** Simply add a single primitive to a scene with a camera, add a bunch of hidden directional lights, and observe the results in the engine profiler.
bug,topic:rendering
low
Minor