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
365,184,103
rust
No warning given when mutability unnecessary in match arm pattern with mutable reference
The compiler doesn't notice and/or warn that a mutable reference in a match arm pattern doesn't need to be mutable. I tried this code: ```rust fn main() { let mut option = Some(Box::new(0)); match option { Some(ref mut v) => println!("{}", v), None => (), }; } ``` I expected to see this happen: The compiler would give a warning, saying that `mut` is unnecessary in the first match arm. Instead, this happened: The compiler gives no warnings. ## Meta `rustc --version --verbose`: ``` rustc 1.27.0 (3eda71b00 2018-06-19) binary: rustc commit-hash: 3eda71b00ad48d7bf4eef4c443e7f611fd061418 commit-date: 2018-06-19 host: x86_64-apple-darwin release: 1.27.0 LLVM version: 6.0 ```
A-lints
low
Minor
365,191,885
TypeScript
Inconsistent error messages with circular base type argument
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> I noticed [here](https://stackoverflow.com/a/52573647) that a type argument to a base class can reference property types in the same class, so I wondered what would happen if I tried to reference an inherited property type that itself depends on the type argument. To its credit, the compiler didn't crash, but the errors I got didn't make much sense. <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** master (e1a4c2779f93c8389d1589e543920a61771e97ec) <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** circular self referential base extends type argument property same class lookup type **Code** ```ts class Super<T> { foo!: T; } class Sub extends Super<Sub["bar"]> { bar!: Sub["foo"]; // Actual: Error: "Property 'foo' does not exist on type 'Sub'." baz!: Sub["foo"]; // Actual: No error } ``` **Expected behavior:** An error that indicates that circular type annotations are involved. **Actual behavior:** As marked. **Playground Link:** [link](https://www.typescriptlang.org/play/#src=class%20Super%3CT%3E%20%7B%0A%20%20foo!%3A%20T%3B%0A%7D%0Aclass%20Sub%20extends%20Super%3CSub%5B%22bar%22%5D%3E%20%7B%0A%20%20bar!%3A%20Sub%5B%22foo%22%5D%3B%20%20%2F%2F%20Actual%3A%20Error%3A%20%22Property%20'foo'%20does%20not%20exist%20on%20type%20'Sub'.%22%0A%20%20baz!%3A%20Sub%5B%22foo%22%5D%3B%20%20%2F%2F%20Actual%3A%20No%20error%0A%7D%0A) **Related Issues:** None found, but this is hard to search for.
Suggestion,In Discussion
low
Critical
365,204,062
opencv
Support for INTER_LINEAR_EXACT for cv::remap
So, I learned the hard way that INTER_LINEAR does not just do bilinear interpolation in cv::remap, but fixpoints the maps first and then does bilinear interpolation. In the documentation of interpolation modes, there is INTER_LINEAR_EXACT, claiming to be a bitexact variant. Unfortunately (4.0.0-alpha), this is not supported for cv::remap (it is for resize, but I need it for remap). I have not found a way around this, I had to write my own variant of remap not doing the fixpointing (which is way less effective, but gives the right result). I suggest INTER_LINEAR_EXACT should be implemented for cv::remap.
feature,category: imgproc
low
Minor
365,226,995
opencv
No way to get the properties of a video when using cuda::videoreader.
- OpenCV => 3.4.3 ##### Detailed description The videocapture class provides with several methods to get the properties of a video. https://docs.opencv.org/2.4/modules/highgui/doc/reading_and_writing_images_and_video.html#videocapture-get They seem to be missing in the videoreader class. This should be supported IMO. ##### Steps to reproduce
wontfix,category: gpu/cuda (contrib)
low
Minor
365,237,052
flutter
How to know a specific widget in listview scrolling out of screen?
Is there a callback or event can handle this?
c: new feature,framework,f: scrolling,P3,team-framework,triaged-framework
low
Minor
365,290,499
create-react-app
Add notes about runtime chunk being inlined and implications
https://github.com/facebook/create-react-app/issues/5144#event-1875612638 Has implications for CSP.
tag: documentation,difficulty: starter,contributions: claimed
low
Minor
365,292,078
create-react-app
Documentation follow-up
Copied from #5141: - [ ] Update React's "Add React to Website" JSX section - [ ] Prepare blog post - [ ] Touch up migration guide from 1.x - [ ] Make a decent migration guide from 2.x betas - [ ] Monorepo migration (https://github.com/facebook/create-react-app/issues/5100) - [ ] Check and document Apollo (https://github.com/facebook/create-react-app/issues/5126) and Relay support - [ ] MDX https://github.com/facebook/create-react-app/issues/5149
tag: documentation
low
Minor
365,298,055
puppeteer
[Feature Request] Provide way to access stack trace on ConsoleMessage
In devtools we can get the stack trace of warning/error messages like so: ![screenshot from 2018-10-01 16-33-57](https://user-images.githubusercontent.com/8518303/46268619-e8b96d80-c597-11e8-9418-45d525aadc24.png) It would be useful if `ConsoleMessage` exposed a way of getting those stack traces.
feature,chromium
low
Critical
365,341,918
vue
Binding the bind directive and change events to the <input/> tag doesn‘t work
### Version 2.5.17 ### Reproduction link [https://jsfiddle.net/MoriGirl/50wL7mdz/755097/](https://jsfiddle.net/MoriGirl/50wL7mdz/755097/) ### Steps to reproduce Enter two numbers less than 10(etc, 7 , 8) in succession twice, observe page display and console output. ### What is expected? I originally expected the page and console to display 10 after each input. ### What is actually happening? When I input numbers less than 10 for two consecutive times, such as ( 7, 8 ), it was observed that after the first input, the page and console display 10 at the same time, but after the second input, the page displays 8 and the console displays 10. --- ## reluctant solution 1. Get the native input element and modify its value * use ref ``` <input :value='num' @change='handleChange' ref='inputnumber' /> ... handleChange(event){ this.num=this.check(event.target.value); this.$refs.inputnumber.value=this.num; } ``` * use event ``` handleChange(event){ this.num=this.check(event.target.value); event.target.value=this.num; } ``` but if I replace the input element with a custom component, this may not work. 2. use both v-model and watch ``` <input v-model.lazy='num' /> //.lazy: Data synchronization using the change event ... watch:{ num:function(v){ this.num=this.check(v); } }, ``` I want to know why such outputs appear and if there is a better solution. Thank you! <!-- generated by vue-issues. DO NOT REMOVE -->
has workaround
low
Minor
365,348,089
vue
Functional component not rendering named slot (following #8871)
### Version 2.5.17 ### Reproduction link [https://codesandbox.io/s/p9mx85qpz0](https://codesandbox.io/s/p9mx85qpz0) ### Steps to reproduce nothing in particular. ### What is expected? It should display `Hello World` ### What is actually happening? It displays `Hello` --- Following https://github.com/vuejs/vue/issues/8871 I made App.vue non-functional: If you make Child.vue non-functional it works: https://codesandbox.io/s/pw5lzx2w90 If you use default (not named) slots it works: https://codesandbox.io/s/04jrp3y4ln <!-- generated by vue-issues. DO NOT REMOVE -->
has workaround
low
Major
365,439,619
create-react-app
npx create-react-app throws error when using in monorepo
<!-- PLEASE READ THE FIRST SECTION :-) --> ### Is this a bug report? Maybe. I know monorepos are not fully supported, however i would expect this to work. <!-- If you answered "Yes": Please note that your issue will be fixed much faster if you spend about half an hour preparing it, including the exact reproduction steps and a demo. If you're in a hurry or don't feel confident, it's fine to report bugs with less details, but this makes it less likely they'll get fixed soon. In either case, please fill as many fields below as you can. If you answered "No": If this is a question or a discussion, you may delete this template and write in a free form. Note that we don't provide help for webpack questions after ejecting. You can find webpack docs at https://webpack.js.org/. --> ### Did you try recovering your dependencies? <!-- Your module tree might be corrupted, and that might be causing the issues. Let's try to recover it. First, delete these files and folders in your project: * node_modules * package-lock.json * yarn.lock Then you need to decide which package manager you prefer to use. We support both npm (https://npmjs.com) and yarn (http://yarnpkg.com/). However, **they can't be used together in one project** so you need to pick one. If you decided to use npm, run this in your project directory: npm install -g npm@latest npm install This should fix your project. If you decided to use yarn, update it first (https://yarnpkg.com/en/docs/install). Then run in your project directory: yarn This should fix your project. Importantly, **if you decided to use yarn, you should never run `npm install` in the project**. For example, yarn users should run `yarn add <library>` instead of `npm install <library>`. Otherwise your project will break again. Have you done all these steps and still see the issue? Please paste the output of `npm --version` and/or `yarn --version` to confirm. --> Yes ### Environment <!-- To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required. This enables the maintainers quickly reproduce the issue and give feedback. Run the following command in your React app's folder in terminal. Note: The result is copied to your clipboard directly. `npx create-react-app --info` Paste the output of the command in the section below. --> Node v8.11.3 yarn 1.10.1 npx 6.4.1 ### Steps to Reproduce <!-- How would you describe your issue to someone who doesn’t know you or your project? Try to write a sequence of steps that anybody can repeat to see the issue. --> (Write your steps here:) 1. Create a lerna / yarn workspaces repo 2. naviagte to packages folder 3. run `create-react-app@next --scripts-version=@next cra-app` ### Expected Behavior <!-- How did you expect the tool to behave? It’s fine if you’re not sure your understanding is correct. Just write down what you thought would happen. --> It should create a new create react app. ### Actual Behavior <!-- Did something go wrong? Is something broken, or not behaving as you expected? Please attach screenshots if possible! They are extremely helpful for diagnosing issues. --> When running `create-react-app@next --scripts-version=@next cra-app`, I am getting the following error: ```Unexpected error. Please report it as a bug: { Error: Cannot find module '/Users/felixkuehl/cra-monorepo/packages/cra-app/node_modules/react-scripts/package.json' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at checkNodeVersion (/Users/felixkuehl/.npm/_npx/66044/lib/node_modules/create-react-app/createReactApp.js:543:23) at getPackageName.then.then.then.packageName (/Users/felixkuehl/.npm/_npx/66044/lib/node_modules/create-react-app/createReactApp.js:344:7) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) code: 'MODULE_NOT_FOUND' } ``` This could maybe due to yarn workspaces package hoisting. Workaround is to just run `create-react-app@next --scripts-version=@next cra-app` outside the monorepo, then delete the node_modules folder and copy the new app into the monorepo. Anyways, keep up the great work! ;)
tag: new feature,issue: needs investigation
low
Critical
365,452,056
godot
When removing a TileMap node (or its parent), remove_child method sometimes causes a crash.
**Edit:** This comment is outdated / misleading. The core issue is TileMaps and physics processing - see below. **Issue:** I have a situation where I need to switch a node between being "active" and "inactive" - so that when inactive (or disabled) its script and processes etc. stop running. However, using `remove_child()` will (almost always) cause the whole game/engine to crash (at least on Win10) - tried using `call_deferred`, `set_process_internal(false)` and waiting some idle_frames too. Using `queue_free()`, there will not be a crash but the node cannot be added back to the tree (because it's not in memory anymore). **Workaround hacks:** 1. My workaround now is to hold the original node in memory, and when I want to insert it, I duplicate the node and insert that duplicate - upon "disabling" the node, I call queue_free() on the duplicate. As is clear, this is not optimal in any sense (especially if a very complex node with a lot of kids), and it also brings other problems (eg. with AnimationPlayers inside the duplicated node - at least autoplay won't trigger, didn't check what the problem exactly is yet). 2. I know one other kind of workaround is to save the original node as a PackedScene and then just load and instance it again, but it is not the same as remove_child + add_child (which holds all the node's properties in memory). More importantly, this method also adds other complications - such as instead of saving some scene (eg. some place in a world) should make a "export mini scenes" functionality (eg. a dock tool), and handle all its special cases (tried it initially), as well as keeping book of all the miniscenes after renaming the main scene etc. **Suggestion:** I think either of the below two suggestions would fix this "problem": 1. A `queue_remove_child()` or similar method - would function like `queue_free()` but only removes from the tree, not from memory. 2. A `disable_node()` method, which would stop the scripts and processes etc. from running - or at least so, that remove_child could be called without crash after this. ... Or maybe a `call_queued()` method..? (I know "disabling node" has been discussed - but didn't found a solution in the discussions that would work in my case.)
bug,topic:core,confirmed,crash
medium
Critical
365,513,883
create-react-app
Slow compilation time with large project SASS (migrated from 1.x to 2.x)
I've recently migrated to v2 since I needed the node_module compilation. I like the auto-magic sass support, but the app takes a minute or two to compile now. Any suggestions? Platform: OSX, Node 8, running build/dev via yarn
issue: needs investigation
low
Major
365,546,951
create-react-app
Re-enable `react/no-deprecated` rule after its been adjusted
Right now `react/no-deprecated` warns multiple times over on deprecated lifecycle methods. This behavior isn't very optimal -- we should file an issue with ESLint and ask them to remove it once a formal warning is added to React.
tag: underlying tools
low
Minor
365,568,479
rust
Tracking issue for the `quote!` macro in `proc_macro`
I'm splitting this off https://github.com/rust-lang/rust/issues/38356 to track the `quote!` macro specifically contained in `proc_macro`. This macro has different syntax than the [`quote` crate](https://crates.io/crates/quote) on crates.io but I believe similar functionality. At this time it's not clear (to me at least) what the status of this macro is in terms of how much we actually want to stabilize it or what would block its stabilization. Others are welcome to fill this in though! ## Steps / History - [x] RFC: https://rust-lang.github.io/rfcs/1566-proc-macros.html - [x] Implementation: https://github.com/rust-lang/rust/pull/40939 - [ ] Stabilization: ## Unresolved questions - Should this use `$` to match other macros or `#` to drop in with `quote::quote`? https://github.com/rust-lang/rust/issues/54722#issuecomment-2302411103 - Which spans should be used? https://github.com/rust-lang/rust/issues/54722#issuecomment-2291168064 From https://github.com/rust-lang/rust/issues/54722#issuecomment-2290103770: - Do we want our own version of `quote::ToTokens` rather than relying on `From`? - Should we add repetition before stabilization?
A-macros,T-lang,T-libs-api,B-unstable,C-tracking-issue,Libs-Tracked,S-tracking-needs-summary
medium
Critical
365,570,145
rust
Tracking issue for `Span::def_site()`
This is a tracking issue for the `Span::def_site()` API. The feature for this is `proc_maro_def_site`. The `def_site` span primarily relates to hygiene today in that it's *not* copy-paste hygiene. This is likely blocked on larger hygiene reform and more thorny Macros 2.0 issues. I'm not personally clear on what the blockers are at this time, but I wanted to make sure we had a dedicated tracking issue! cc https://github.com/rust-lang/rust/issues/45934
E-needs-test,A-macros,T-lang,T-libs-api,B-unstable,A-macros-2.0,C-tracking-issue,A-proc-macros,Libs-Tracked,S-tracking-needs-summary
low
Major
365,572,648
rust
Tracking issue for `proc_macro::Span` inspection APIs
This issue is intended to track a number of unstable APIs which are used to inspect the contents of a `Span` for information like the file name, byte position, manufacturing new spans, combining them, etc. This issue tracks the `proc_macro_span` unstable feature. ### Public API Already stabilized: ```rust impl Span { pub fn source_text(&self) -> Option<String>; } impl Group { pub fn span_open(&self) -> Span; pub fn span_close(&self) -> Span; } ``` To be stabilized, probably in their current form: ```rust impl Span { pub fn line(&self) -> usize; pub fn column(&self) -> usize; pub fn start(&self) -> Span; pub fn end(&self) -> Span; } ``` To be stabilized after some (re)design or discussion: ```rust impl Span { pub fn source_file(&self) -> SourceFile; pub fn byte_range(&self) -> Range<usize>; } #[derive(Clone, Debug, PartialEq, Eq)] pub struct SourceFile { .. } impl !Send for SourceFile {} impl !Sync for SourceFile {} impl SourceFile { pub fn path(&self) -> PathBuf; pub fn is_real(&self) -> bool; } ``` Things that require more discussion: ```rust impl Span { pub fn eq(&self, other: &Span) -> bool; pub fn join(&self, other: Span) -> Option<Span>; pub fn parent(&self) -> Option<Span>; pub fn source(&self) -> Span; } impl Literal { pub fn subspan<R: RangeBounds<usize>>(&self, range: R) -> Option<Span>; } ```
A-macros,T-lang,T-libs-api,B-unstable,C-tracking-issue,A-proc-macros,Libs-Tracked,S-tracking-design-concerns
high
Critical
365,573,698
rust
Tracking issue for custom inner attributes
Added in https://github.com/rust-lang/rust/pull/54093 inner attributes are not allowed to be procedural macros right now, and this issue is tracking that feature of procedural macros! Assistance in filling in this issue would be greatly appreciated! UPDATE: https://github.com/rust-lang/rust/issues/54726#issuecomment-431931166 below contains the detailed description.
A-attributes,A-macros,T-lang,B-unstable,C-tracking-issue,A-proc-macros,S-tracking-design-concerns
medium
Critical
365,574,844
rust
Tracking issue for procedural macros and "hygiene 2.0"
This is intended to be a tracking issue for enabling procedural macros to have "more hygiene" than the copy/paste hygiene they have today. This is a very vague tracking issue and there's a *very long* and storied history to this. The intention here though is to create a fresh tracking issue to collect the current state of play, in hopes that we can close some of the much older and very long issues which contain lots of outdated information.
A-macros,T-lang,B-unstable,C-tracking-issue,A-proc-macros,S-tracking-needs-summary,A-hygiene
high
Critical
365,622,791
rust
Wrong type inference for closure with impl Trait inside another type
Hi. It compiles with a type annotation as in [this code](https://play.rust-lang.org/?gist=ed9c10406b2faffd185977c4bfaf0783&version=stable&mode=debug&edition=2015). ```rust fn work() -> impl FnMut(&u32, Option<u32>) -> bool { |current, msg| false } fn main() {} ``` This [code](https://play.rust-lang.org/?gist=b1ea9b04ab99a42820ddd9d6ab0fc8c8&version=stable&mode=debug&edition=2015) doesn't compile. ```rust fn doesnt_work() -> Result<impl FnMut(&u32, Option<u32>) -> bool, ()> { Ok(|current, msg| false) } fn main() {} ``` error: ``` error[E0631]: type mismatch in closure arguments --> src/main.rs:1:28 | 1 | fn doesnt_work() -> Result<impl FnMut(&u32, Option<u32>) -> bool, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected signature of `for<'r> fn(&'r u32, std::option::Option<u32>) -> _` 2 | Ok(|current, msg| false) | -------------------- found signature of `fn(_, _) -> _` | = note: the return type of a function must have a statically known size error[E0271]: type mismatch resolving `for<'r> <[closure@src/main.rs:2:8: 2:28] as std::ops::FnOnce<(&'r u32, std::option::Option<u32>)>>::Output == bool` --> src/main.rs:1:28 | 1 | fn doesnt_work() -> Result<impl FnMut(&u32, Option<u32>) -> bool, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter, found concrete lifetime | = note: the return type of a function must have a statically known size error: aborting due to 2 previous errors ``` Thanks to fix this issue.
A-inference,A-impl-trait
low
Critical
365,663,902
TypeScript
Distinguishing suggestions from global scope from local suggestions
From https://github.com/Microsoft/vscode/issues/59437 <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --**TypeScript Version:** 3.2.0-dev.20180928 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** - TSServer - completions - suggestions **Code** For the example ts file: ```ts class FooClass { toString(): void { | } } ``` Trigger suggestions at the `|` inside the `toString` method **Problem** We get back two completions from `completionInfo`: ```json { "name": "toString", "kind": "function", "kindModifiers": "declare", "sortText": "0" }, { "name": "toString", "kind": "method", "kindModifiers": "", "sortText": "0", "insertText": "this.toString" }, ``` However when we then make the `completionEntryDetails` request, we can only pass the identifier name: `"toString"`. This makes it unclear which completion entry we are actually requesting completion details for. **Proposal** `completionEntryDetails` already has a `source` field that is used to identify when a suggestion is an auto import. I believe that this field could also be used for global symbols, such as when a symbol name comes from a global `lib.d.ts` file. In this case, the first `toString` suggestion comes from a global in `dom.d.ts`
Suggestion,VS Code Tracked,Experience Enhancement
low
Minor
365,671,237
go
cmd/go: document that directory patterns only match dirs in current module
This involves both documentation and the implementation (which I don't know it's intended or something to fix). Feel free to split this issue if necessary. All experiments here are done outside GOPATH. I have a two module `testmod2` and `testmod2/cmd` in one single repo. The latest `testmod2/cmd` (v0.0.2) depends on `testmod2/v2`. There are tests in testmod2/lib and testmod2/cmd packages. <pre> $ git clone https://github.com/hyangah/testmod2.git /tmp/testmod2 $ cd /tmp/testmod2 </pre> <pre> $ go test ./... ok github.com/hyangah/testmod2/v2/lib 0.021s $ go test ./cmd/... go: finding github.com/hyangah/testmod2/v2/cmd latest can't load package: package github.com/hyangah/testmod2/v2/cmd: unknown import path "github.com/hyangah/testmod2/v2/cmd": cannot find module providing package github.com/hyangah/testmod2/v2/cmd </pre> * `go test ./...` doesn't cross the module boundary, so tests in testmod2/cmd didn' run. `go test ./cmd/...` doesn't work either because of the same reason. If we ever allow submodules in a single repo, this needs to be documented in https://tip.golang.org/cmd/go/#hdr-Package_lists_and_patterns. * AFAIK, there is no automatic way to invoke all tests in the repo when submodules are involved. That's intended because module is like a separate workspace (as discussed in #27056). * As specified in the [ [Package lists and patterns](https://tip.golang.org/cmd/go/#hdr-Package_lists_and_patterns)] section, `all` can be used to test all modules the current module depends on. That implies testing in the standard libraries as well. <pre> $ cd cmd $ go test all $ go test all ok bufio 0.141s ok bytes 1.862s ok compress/bzip2 0.147s --- FAIL: TestBlockHuff (0.00s) huffman_bit_writer_test.go:58: Testing "testdata/huffman-null-max.in" huffman_bit_writer_test.go:78: Output ok huffman_bit_writer_test.go:93: Reset ok huffman_bit_writer_test.go:365: EOF ok huffman_bit_writer_test.go:58: Testing "testdata/huffman-pi.in" huffman_bit_writer_test.go:78: Output ok huffman_bit_writer_test.go:93: Reset ok huffman_bit_writer_test.go:365: EOF ok huffman_bit_writer_test.go:58: Testing "testdata/huffman-rand-1k.in" huffman_bit_writer_test.go:78: Output ok huffman_bit_writer_test.go:93: Reset ok huffman_bit_writer_test.go:365: EOF ok huffman_bit_writer_test.go:58: Testing "testdata/huffman-rand-limit.in" huffman_bit_writer_test.go:78: Output ok huffman_bit_writer_test.go:93: Reset ok huffman_bit_writer_test.go:365: EOF ok huffman_bit_writer_test.go:58: Testing "testdata/huffman-rand-max.in" huffman_bit_writer_test.go:78: Output ok huffman_bit_writer_test.go:93: Reset ok huffman_bit_writer_test.go:365: EOF ok huffman_bit_writer_test.go:58: Testing "testdata/huffman-shifts.in" huffman_bit_writer_test.go:72: "testdata/huffman-shifts.in" != "testdata/huffman-shifts.golden" (see "testdata/huffman-shifts.in.got") huffman_bit_writer_test.go:74: open testdata/huffman-shifts.in.got: permission denied huffman_bit_writer_test.go:58: Testing "testdata/huffman-text-shift.in" huffman_bit_writer_test.go:72: "testdata/huffman-text-shift.in" != "testdata/huffman-text-shift.golden" (see "testdata/huffman-text-shift.in.got") huffman_bit_writer_test.go:74: open testdata/huffman-text-shift.in.got: permission denied huffman_bit_writer_test.go:58: Testing "testdata/huffman-text.in" huffman_bit_writer_test.go:72: "testdata/huffman-text.in" != "testdata/huffman-text.golden" (see "testdata/huffman-text.in.got") huffman_bit_writer_test.go:74: open testdata/huffman-text.in.got: permission denied huffman_bit_writer_test.go:58: Testing "testdata/huffman-zero.in" huffman_bit_writer_test.go:78: Output ok huffman_bit_writer_test.go:93: Reset ok huffman_bit_writer_test.go:365: EOF ok FAIL FAIL compress/flate 9.319s ok compress/gzip 0.057s ok compress/lzw 0.128s ... </pre> This unfortunate case I encountered is the failures from the tests in the standard libraries. The above error was because I have no permission to write to the GOROOT. I think that's not a rare setup so running standard library tests doesn't seem to be a right choice.
Documentation,NeedsInvestigation,modules
low
Critical
365,719,471
create-react-app
Support scoped CSS in the same file
This is kinda vague but I'd like to have a built-in option to write CSS that: * Exists in the same file as my components * Is scoped * Has auto generated class names, like CSS Modules * Extracted via the same pipeline as CSS Modules * Could potentially use Sass (since we already support it) * Fully static Basically I want "CSS Modules" but without the "Modules" part. Just put it in the same file if that's the only place I use it anyway. https://github.com/4Catalyzer/astroturf looks related. cc @jquense @markdalgleish
issue: proposal
high
Critical
365,725,199
pytorch
.cuda() changes a module's behavior when there are registered buffers with requires_grad=True
## 🐛 Bug When a module that has a registered buffer with `requires_grad=True` is moved to the GPU, the buffer no longer accumulates gradients. ## To Reproduce Run the code below with and without the specified line commented out: ``` import torch from torch.autograd import Function, Variable m = torch.nn.Module() m.register_buffer('b', Variable(torch.ones(3), requires_grad=True)) # need the gradient m = m.cuda() # works when this line is commented out m.b.sum().backward() assert m.b.grad is not None ``` ## Expected behavior I think people generally expect a module to behave the same way after it's been moved to the GPU with `.cuda()` ## Environment Torch 0.4.1 cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @mruberry @jbschlosser
module: autograd,module: nn,triaged
low
Critical
365,742,468
create-react-app
Static keys for vendor bundle in asset-manifest.json
Currently the asset-manifest.json in my build folder looks like this: ``` { "main.css": "/static/css/main.f4f38731.chunk.css", "main.js": "/static/js/main.56255761.chunk.js", "main.js.map": "/static/js/main.56255761.chunk.js.map", "static/css/1.36ceda45.chunk.css": "/static/css/1.36ceda45.chunk.css", "static/js/1.ade53803.chunk.js": "/static/js/1.ade53803.chunk.js", "static/js/1.ade53803.chunk.js.map": "/static/js/1.ade53803.chunk.js.map", "runtime~main.js": "/static/js/runtime~main.229c360f.js", "runtime~main.js.map": "/static/js/runtime~main.229c360f.js.map", "static/media/icons.svg": "/static/media/icons.6e39cadf.svg", "static/media/logo.svg": "/static/media/logo.61c6330d.svg", "static/media/help_logo.svg": "/static/media/help_logo.1ef27f5c.svg", "static/media/help_logo_mark.svg": "/static/media/help_logo_mark.8265813a.svg", "static/media/youtube_icon.svg": "/static/media/youtube_icon.d435ea9a.svg", "static/media/guarantee_emblem.svg": "/static/media/guarantee_emblem.d49af9a1.svg", "static/css/main.f4f38731.chunk.css.map": "/static/css/main.f4f38731.chunk.css.map", "static/css/1.36ceda45.chunk.css.map": "/static/css/1.36ceda45.chunk.css.map", "index.html": "/index.html", "precache-manifest.be82c4ddabdcb9e12cd3d143baad1412.js": "/precache-manifest.be82c4ddabdcb9e12cd3d143baad1412.js", "service-worker.js": "/service-worker.js" } ``` I want to be able to use this asset-manifest.json to reference and and include my own script tags. However, the vendor bundle has dynamic keys: ``` "static/css/1.36ceda45.chunk.css": "/static/css/1.36ceda45.chunk.css", "static/js/1.ade53803.chunk.js": "/static/js/1.ade53803.chunk.js", "static/js/1.ade53803.chunk.js.map": "/static/js/1.ade53803.chunk.js.map", ``` Is it possible to make these references something like `static/css/1.chunk.css` instead? Using [email protected]
issue: proposal
low
Major
365,766,436
go
cmd/gofmt: incorrect indentation of comments for LabeledStmt
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? `go1.11` ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? `darwin/amd64` ### What did you do? If a LabeledStmt has an inline comment before and after the `Colon`, then an inline comment on the previous line will be indented incorrectly: https://play.golang.org/p/mSDEYsc_34O This code should not change with gofmt: ```go package main func main() { /* comment */ L /* long comment */ : /* comment */ print("foo") goto L } ``` ... however it changes to: ```go package main func main() { /* comment */ L /* long comment */ : /* comment */ print("foo") goto L } ```
NeedsFix
low
Major
365,785,311
rust
Bootstrap cargo crashes on i486 machine
I have a user who sees the stage0 cargo crash: ``` running: /var/tmp/portage/dev-lang/rust-1.25.0/work/rust-stage0/bin/cargo build --manifest-path /var/tmp/portage/dev-lang/rust-1.25.0/work/rustc-1.25.0-src/src/bootstrap/Cargo.toml --verbose --verbose --locked --frozen Traceback (most recent call last): File "./x.py", line 20, in <module> bootstrap.main() File "/var/tmp/portage/dev-lang/rust-1.25.0/work/rustc-1.25.0-src/src/bootstrap/bootstrap.py", line 763, in main bootstrap() File "/var/tmp/portage/dev-lang/rust-1.25.0/work/rustc-1.25.0-src/src/bootstrap/bootstrap.py", line 743, in bootstrap build.build_bootstrap() File "/var/tmp/portage/dev-lang/rust-1.25.0/work/rustc-1.25.0-src/src/bootstrap/bootstrap.py", line 621, in build_bootstrap run(args, env=env, verbose=self.verbose) File "/var/tmp/portage/dev-lang/rust-1.25.0/work/rustc-1.25.0-src/src/bootstrap/bootstrap.py", line 148, in run raise RuntimeError(err) RuntimeError: failed to run: /var/tmp/portage/dev-lang/rust-1.25.0/work/rust-stage0/bin/cargo build --manifest-path /var/tmp/portage/dev-lang/rust-1.25.0/work/rustc-1.25.0-src/src/bootstrap/Cargo.toml --verbose --verbose --locked --frozen ``` (BTW, it would be nice if that error was improved to have a few more details about how the command failed to run.) The user hypothesizes that this might be due to cargo being with SSE2, which his machine (which has an Athlon MP 2800+) does not support. (From a [downstream bug report](https://bugs.gentoo.org/665660).) @Mark-Simulacrum do you happen to know about this stuff?
T-bootstrap,A-docs,A-target-specs,O-x86_32
low
Critical
365,802,925
pytorch
[Caffe2] Relink error after installing Caffe2 from conda
Hi, I just installed cuda-9.0, cudnn and nccl for cuda 9-0 and thereafter I followed the instructions [Caffe2](https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=prebuilt) to install caffe2 using conda. When I start `python` and enter `import caffe2.python` it does not say anything, but when executing `from caffe2.python import core` I get `WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode. python: ` `Relink /home/myname/anaconda2/lib/python2.7/site-packages/caffe2/python/../../../../././. /liblzma.so.5' with /lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol clock_gettime'` `python: Relink /home/myname/anaconda2/lib/python2.7/site-packages/caffe2/python/../../../.././libopencv_core.so.3.3' with /lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol clock_gettime'` `Segmentation fault (core dumped)` I have previously tried to build from source, but removed that installation. (As far as I know). I installed `caffe2` by `conda install -c caffe2 caffe2-cuda-9.0-cudnn7` and I run Kubuntu 18.04. I use a `condaenv` when I install caffe2. / Erik
caffe2
low
Critical
365,908,311
vscode
file icons for QuickPickItem
It would be great if the QuickPickItem also can specify an icon as well as a file icon from the file icon themes.
feature-request,quick-pick
medium
Major
365,920,576
go
x/net/websocket: Read() doesn't read the whole frame
The documentation for `websocket.(*Conn).Read()` states: > `func (ws *Conn) Read(msg []byte) (n int, err error)` > > Read implements the io.Reader interface: it reads data of a frame from the WebSocket connection. > if msg is not large enough for the frame data, it fills the msg and next Read will read the rest of the > frame data. it reads Text frame or Binary frame. I interpret this as meaning that if msg *is* large enough, then the whole frame will be read (_exceptio probat regulam in casibus non exceptis_, the exception proves the rule). However, in case of large frames (larger than bufio defaultBufSize) the read will always be short. Either the documentation or the implementation is wrong. `websocket.Message.Receive()` does read the whole frame. ### What version of Go are you using (`go version`)? go1.11 ### Does this issue reproduce with the latest release? Yes. ### What operating system and processor architecture are you using (`go env`)? Reproduced on: * GOOS=windows GOARCH=amd64 * GOOS=linux GOARCH=amd64 ### What did you do? I connected an `x/net/websocket` client and server, and had the server write a 5000 byte long frame using `websocket.(*Conn).Write()` and the client read it using `websocket.(*Conn).Read()`. Client: https://play.golang.org/p/BYtr4kSJUfu Server: https://play.golang.org/p/LHWv9YfqsjB ### What did you expect to see? I expected `websocket.(*Conn).Read()` to read the whole 5000 byte long frame. ### What did you see instead? `websocket.(*Conn).Read()` read only 4092 bytes of the 5000 byte long frame.
NeedsInvestigation
low
Critical
365,928,008
rust
Insufficiently clear explanation of E0310
The following program ([Playground](https://play.rust-lang.org/?gist=38c9aaff864faffb6c50e4fcdbb5f148&version=stable&mode=debug&edition=2015)): ```rust pub struct Foo<T>(T, &'static str); pub trait Bar { fn baz(self) -> Box<dyn Baz>; } pub struct Bazzzz<T>(T, &'static str); pub trait Baz {} impl<T> Baz for Bazzzz<T> {} impl<T> Bar for Foo<T> { fn baz(self) -> Box<dyn Baz> { Box::new(Bazzzz(self.0, self.1)) } } fn main() {} ``` errors with ``` error[E0310]: the parameter type `T` may not live long enough --> src/main.rs:14:9 | 12 | impl<T> Bar for Foo<T> { | - help: consider adding an explicit lifetime bound `T: 'static`... 13 | fn baz(self) -> Box<dyn Baz> { 14 | Box::new(Bazzzz(self.0, self.1)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the type `Bazzzz<T>` will meet its required lifetime bounds --> src/main.rs:14:9 | 14 | Box::new(Bazzzz(self.0, self.1)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0310`. error: Could not compile `playground`. ``` From reading the explanation of `E0310`, which only mentions the situation in which `T` is used behind a static reference, e.g., `foo: &'static T`, I really had no idea what was going on. It seems that other people have had similar issues with this (e.g. https://stackoverflow.com/questions/40053550/the-compiler-suggests-i-add-a-static-lifetime-because-the-parameter-type-may-no ). The explanation of E0310 should be improved to make it more clear why `T: 'static` is necessary, and what alternatives are there. What confused me most is that `T` was not used in any reference type of the example above, but it was only used behind a reference in the example of the error message explanation.
C-enhancement,A-diagnostics,A-lifetimes,T-compiler,D-confusing
low
Critical
365,933,994
create-react-app
Allow patch level differences in preflight check
<!-- PLEASE READ THE FIRST SECTION :-) --> ### Is this a bug report? Yes, I am getting an eslint preflight check error hen I don't think I should be. ### Did you try recovering your dependencies? Yes, I've tried deleting the package-lock and rebuilt some stuff, but this issue seems pretty clearcut ### Which terms did you search for in User Guide? I searched for `eslint` there and in the issues but this is for the new release and I dont' think thats updated yet ### Environment <!-- To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required. This enables the maintainers quickly reproduce the issue and give feedback. Run the following command in your React app's folder in terminal. Note: The result is copied to your clipboard directly. `npx create-react-app --info` Paste the output of the command in the section below. --> (paste the output of the command here) ### Steps to Reproduce To reproduce create-react-app craeslint cd craeslint npm install [email protected] I get the following. I don't think this is correct - a difference in patch version shouldn't cause the preflight check to fail, should it? (Also react-scripts should probably update their eslint version) ``` > [email protected] test /Users/gmauer/code/craeslint > react-scripts test There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally. The react-scripts package provided by Create React App requires a dependency: "eslint": "5.6.0" Don't try to install it manually: your package manager does it automatically. However, a different version of eslint was detected higher up in the tree: /Users/gmauer/code/craeslint/node_modules/eslint (version: 5.6.1) ``` ### Expected Behavior tests run fine - there is only a difference in patch level of eslint ### Actual Behavior I get the following ``` > [email protected] test /Users/gmauer/code/craeslint > react-scripts test There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally. The react-scripts package provided by Create React App requires a dependency: "eslint": "5.6.0" Don't try to install it manually: your package manager does it automatically. However, a different version of eslint was detected higher up in the tree: /Users/gmauer/code/craeslint/node_modules/eslint (version: 5.6.1) ```
issue: proposal
high
Critical
365,976,875
godot
_Init() is not being called for C# scripts.
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** dacc3f3 and 3.1 alpha **OS/device including version:** Window 7 x64 **Issue description:** `_Init()` is not being called on my c# scripts **Steps to reproduce:** Create a node with this script: ```csharp using Godot; using System; public class InitTest : Node { public override void _Init() { GD.Print("Hello World!"); } } ``` But when it runs no message is printed. **Minimal reproduction project:** [init-test.zip](https://github.com/godotengine/godot/files/2438716/init-test.zip)
topic:gdscript,documentation,topic:dotnet
medium
Major
366,041,033
rust
windows: when creating process with redirected stdio, make parent's std handles not inheritable
Currently, if this happens: ``` use std::process::Command; ... Command::new("child.exe") .stdin(Stdio::null()) .stdout(Stdio::null()) .stderr(Stdio::null()) .spawn() ``` the `child.exe` accidentally inherits stdin, stdout and stderr handles of the parent process. This can be bad, because the objects these handles point to (say pipes), may be watched by some third process. Since at the point of creating a child process we know that it does not need our std handles (because it's explicitly being created with `Stdio::null()`), we can temporarily disable handle inheritance on these handles.
O-windows,A-process
low
Major
366,051,296
flutter
MonthPicker should be a first-class widget
Many customer apps need an inline Calendar widget. Flutter already has a Calendar widget in the form of MonthPicker, but the documentation points people to use the [showDatePicker](https://docs.flutter.io/flutter/material/showDatePicker.html) dialog instead of using `MonthPicker` directly. ``` /// The month picker widget is rarely used directly. Instead, consider using /// [showDatePicker], which creates a date picker dialog. class MonthPicker extends StatefulWidget { /// Creates a month picker. /// /// Rarely used directly. Instead, typically used as part of the dialog shown /// by [showDatePicker]. ``` While @Hixie rightly points out that `MonthPicker` is an implementation detail of the dialog box, it has much broader utility and is sufficient for many calendar uses. The alternative is one of the many [calendar packages](https://pub.dartlang.org/flutter/packages?q=calendar) on pub, but they are of mixed quality and largely reimplementing what is already in the framework. It's conceivable that many of these exist either because the author was unaware of `MonthPicker` or because they were scared off by the warning message above. As @willlarche notes, "I don't think there's anything wrong with making it usable without a dialog." It's not a bad practice or in contravention of Material Design to use this control directly, so this issue proposed we remove or clarify the warning. Also note that the linked documentation for showDatePicker is no longer live -- it should probably point to https://flutter.io/widgets/material/#Input%20and%20selections or https://docs.flutter.io/flutter/material/showDatePicker.html. @Sfshaza this would also be a potential candidate for the Widget catalog. One last comment: the name of the widget is probably misleading, since it returns a day (`DateTime selectedDate`) rather than a month. Meanwhile, `DayPicker` exists, but is truly an implementation detail of `showDatePicker` because it only allows picking from within a single specified month, whereas `MonthPicker` allows selection of an arbitrary day within a given range.
c: new feature,framework,f: material design,f: date/time picker,d: api docs,P2,team-design,triaged-design
low
Major
366,067,185
flutter
default Text widget's letter spacing is a bit off
<img width="460" alt="screen shot 2018-10-02 at 8 26 51 pm" src="https://user-images.githubusercontent.com/43219386/46374971-ad936900-c681-11e8-9bd5-243a7df87c8b.png"> The flutter's line seems to be a bit more spaced out, what do you think? ## Steps to Reproduce Create two views, one in flutter with ```dart class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'my_app', home: Scaffold( backgroundColor: Colors.white, body: Center( child: Text( 'hello from flutter yay', style: TextStyle( fontSize: 18.0, fontWeight: FontWeight.w400, color: Colors.black, ), ), ), floatingActionButton: FloatingActionButton( onPressed: () {}, child: Icon(Icons.add), ), ), ); } } ``` and one in swift / objc with ```swift override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white let helloLabel = UILabel() helloLabel.text = "hello from ios" helloLabel.translatesAutoresizingMaskIntoConstraints = false view.addSubview(helloLabel) helloLabel.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true helloLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true } ```
framework,a: fidelity,f: cupertino,a: typography,has reproducible steps,P2,found in release: 3.7,team-design,triaged-design
low
Major
366,075,065
TypeScript
CLI-only error calling generic function
**TypeScript Version:** 3.2.0-dev.20181002 **Code** ```ts function getFirst<K extends string, T>(obj: Record<K, ReadonlyArray<T>>, key: K): T { return obj[key][0]; } interface I { readonly n: ReadonlyArray<number>; readonly s: ReadonlyArray<string>; } function f(i: I): number { return getFirst(i, "n"); } ``` **Expected behavior:** No error. **Actual behavior:** No error in the editor. Error on the command line: ``` src/a.ts:11:20 - error TS2345: Argument of type 'I' is not assignable to parameter of type 'Record<"n", ReadonlyArray<string>>'. Types of property 'n' are incompatible. Type 'ReadonlyArray<number>' is not assignable to type 'ReadonlyArray<string>'. Type 'number' is not assignable to type 'string'. 11 return getFirst(i, "n"); ``` **Related Issues:** #19686
Bug,Domain: Mapped Types
low
Critical
366,083,116
go
proposal: spec: immutable type qualifier
This issue describes a language feature proposal to **Immutable Types**. It targets the current [Go 1.x (> 1.11) language specification](https://golang.org/ref/spec) and doesn't violate [the Go 1 compatibility promise](https://golang.org/doc/go1compat). It also describes [an even better approach to immutability](https://github.com/romshark/Go-1-2-Proposal---Immutability#3-immutability-by-default-go--2x) for a hypothetical, backward-incompatible [Go 2 language specification](https://blog.golang.org/toward-go2). The linked [Design Document](https://github.com/romshark/Go-1-2-Proposal---Immutability) describes the entire proposal in full detail, including the [current problems](https://github.com/romshark/Go-1-2-Proposal---Immutability#11-current-problems), the [benefits](https://github.com/romshark/Go-1-2-Proposal---Immutability#12-benefits), the [proposed changes](https://github.com/romshark/Go-1-2-Proposal---Immutability#2-proposed-language-changes), code examples and the [FAQ](https://github.com/romshark/Go-1-2-Proposal---Immutability#4-faq). ## Updates - October 7th: This proposal is approaching its [second revision](https://github.com/romshark/Go-1-2-Proposal---Immutability/milestone/2) addressing major flaws such as [`const`-poisoning](https://github.com/golang/go/issues/27975#issuecomment-426458235), verbosity, `const`-keyword overloading and others. ## Introduction Immutability is a technique used to prevent mutable shared state, which is a very common source of bugs, especially in concurrent environments, and can be achieved through the concept of **immutable types**. Bugs caused by mutable shared state are not only hard to find and fix, but they're also hard to even identify. Such kind of problems can be avoided by systematically limiting the mutability of certain objects in the code. But a Go 1.x developer's current approach to immutability is manual copying, which lowers runtime performance, code readability, and safety. Copying-based immutability makes code verbose, [imprecise and ambiguous](https://github.com/romshark/Go-1-2-Proposal---Immutability#111-ambiguous-code-and-dangerous-bugs) because the intentions of the code author are never clear. Documentation can be rather [misleading](https://github.com/romshark/Go-1-2-Proposal---Immutability#112-vague-and-bloated-documentation) and doesn't solve the problems either. ## Immutable Types in Go 1.x **Immutable types can help achieve this goal more elegantly** improving the safety, readability, and expressiveness of the code. They're based on 5 fundamental rules: - **I.** Each and every type has an immutable counterpart. - **II.** Assignments to objects of an immutable type are illegal. - **III.** Calls to mutating methods (methods with a mutable receiver type) on objects of an immutable type are illegal. - **IV.** Mutable types can be cast to their immutable counterparts, but not the other way around. - **V.** Immutable interface methods must be implemented by a method with an immutable receiver type. These rules can be enforced by making the compiler scan all objects of immutable types for illegal modification attempts, such as assignments and calls to mutating methods and fail the compilation. The compiler would also need to check, whether types correctly implement immutable interface methods. To prevent breaking Go 1.x compatibility this document describes a **backward-compatible** approach to adding support for immutable types by overloading the `const` keyword ([see here for more details](https://github.com/romshark/Go-1-2-Proposal---Immutability#44-why-overload-the-const-keyword-instead-of-introducing-a-new-keyword-like-immutable-etc)) to act as an *immutable type qualifier*. Immutable types can be used for: - [immutable fields](https://github.com/romshark/Go-1-2-Proposal---Immutability#21-immutable-fields) - [immutable methods](https://github.com/romshark/Go-1-2-Proposal---Immutability#22-immutable-methods) - [immutable arguments](https://github.com/romshark/Go-1-2-Proposal---Immutability#23-immutable-arguments) - [immutable return values](https://github.com/romshark/Go-1-2-Proposal---Immutability#24-immutable-return-values) - [immutable variables](https://github.com/romshark/Go-1-2-Proposal---Immutability#25-immutable-variables) - [immutable interfaces](https://github.com/romshark/Go-1-2-Proposal---Immutability#26-immutable-interface-methods) - [immutable reference types and containers](https://github.com/romshark/Go-1-2-Proposal---Immutability#29-immutable-reference-types) - [immutable package-scope variables](https://github.com/romshark/Go-1-2-Proposal---Immutability#210-immutable-package-scope-variables) ## Immutable Types in Go 2.x Ideally, a safe programming language should enforce [immutability by default](https://github.com/romshark/Go-1-2-Proposal---Immutability#3-immutability-by-default-go--2x) where all types are immutable unless they're explicitly qualified as mutable because forgetting to make an object immutable is easier, than accidentally making it mutable. But this concept would require significant, backward-incompatible language changes breaking existing Go 1.x code. Thus such an approach to immutability would only be possible in a new backward-incompatible Go 2.x language specification. ## Related Proposals This proposal is somewhat related to: - #20443 - #22876 - #22048 Detailed comparisons to other proposals are described in the [design document, section 5.](https://github.com/romshark/Go-1-2-Proposal---Immutability#5-other-proposals). --- Please feel free to file [issues](https://github.com/romshark/Go-1-2-Proposal---Immutability/issues) and [pull requests](https://github.com/romshark/Go-1-2-Proposal---Immutability/pulls), become a [stargazer](https://github.com/romshark/Go-1-2-Proposal---Immutability/stargazers), contact me directly at [email protected] and join the conversation on [Slack Gophers](https://gophers.slack.com) (@romshark), the [international](https://t.me/joinchat/BkBvqUQTWYNc170pxYOQJQ) and the [russian](https://t.me/gogolang) Telegram groups, as well as the original [golangbridge](https://forum.golangbridge.org/t/go-1-2-immutability-proposal/10613), [reddit](https://www.reddit.com/r/golang/comments/9kv2cc/proposal_go_12_immutable_types/) and [hackernews](https://news.ycombinator.com/item?id=18126176) posts! Thank you!
LanguageChange,Proposal,LanguageChangeReview
high
Critical
366,093,033
rust
`Sync` should imply `RefUnwindSafe` - lots of missing impls
`Sync` is a strictly stronger requirement on a type than `RefUnwindSafe`, because any type which can be accessed concurrently by multiple threads, can also be accessed after one of those threads panics. However, if you compare the list of implementations for `Sync`: https://doc.rust-lang.org/std/marker/trait.Sync.html#implementors And those for `RefUnwindSafe`: https://doc.rust-lang.org/std/panic/trait.RefUnwindSafe.html#implementors There are clearly a lot missing. Here's my best guess at some missing implementations: ```rust impl RefUnwindSafe for Waker {} impl RefUnwindSafe for std::sync::Once {} impl RefUnwindSafe for std::sync::Condvar {} impl<'a, T: ?Sized + Sync> RefUnwindSafe for MutexGuard<'a, T> {} impl<'a, T: ?Sized + Sync> RefUnwindSafe for RwLockReadGuard<'a, T> {} impl<'a, T: ?Sized + Sync> RefUnwindSafe for RwLockWriteGuard<'a, T> {} impl<T> RefUnwindSafe for JoinHandle<T> {} ``` It's likely I've missed some where `Sync` is automatically implemented because of an explicit `Sync` implementation on a private type which has impacted automatic trait implementation. (Condvar was one of these)
T-libs-api,C-feature-request
medium
Major
366,121,835
rust
Poor Trailing Semicolon Error in -> impl Trait Function
The diagnostics that check whether the concrete return type of an `-> impl Trait` function meets the `: Trait` bound should special-case the error when the concrete type is `()` to suggest removing the semicolon. Without this, the errors for a misplaced semicolon are misleading: Without `impl Trait`: ```rust trait Bar {} impl Bar for u8 {} fn foo() -> u8 { 5; } ``` ``` error[E0308]: mismatched types --> src/main.rs:3:16 | 3 | fn foo() -> u8 { | ________________^ 4 | | 5; | | - help: consider removing this semicolon 5 | | } | |_^ expected u8, found () | = note: expected type `u8` found type `()` error: aborting due to previous error For more information about this error, try `rustc --explain E0308`. error: Could not compile `playground`. ``` With `impl Trait`: ```rust trait Bar {} impl Bar for u8 {} fn foo() -> impl Bar { 5; } ``` ``` error[E0277]: the trait bound `(): Bar` is not satisfied --> src/main.rs:3:13 | 3 | fn foo() -> impl Bar { | ^^^^^^^^ the trait `Bar` is not implemented for `()` | = note: the return type of a function must have a statically known size error: aborting due to previous error For more information about this error, try `rustc --explain E0277`. error: Could not compile `playground`. ```
E-hard,C-enhancement,A-diagnostics,P-medium,A-closures,T-compiler,A-suggestion-diagnostics
low
Critical
366,128,873
TypeScript
`let foo = new Foo(); export = foo;` has fewer type errors than `export = new Foo();`
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.1.1 and 2.8.4 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** export = new instance **Code** store.ts: ```ts class SetupStore { private _screenAfterScaleMitigation: string; constructor() { this._screenAfterScaleMitigation = 'FOO'; } screenAfterScaleMitigation() { return this._screenAfterScaleMitigation; } } const setupStore = new SetupStore(); export = setupStore; ``` a.ts: ``` import * as SetupStore from './store'; console.log(SetupStore.screenAfterScaleMitigation()); ``` tsconfig.json ```json { "compilerOptions": { "allowJs": false, "moduleResolution": "node", "target": "es5", "importHelpers": false, "experimentalDecorators": true, "jsx": "react", "lib": ["dom", "es2015.promise", "es5"], "noImplicitAny": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "noUnusedLocals": true, "noEmitOnError": true, "outDir": "./compiled", "preserveConstEnums": true, "rootDir": "./", "strictNullChecks": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "noImplicitThis": true } } ``` **Expected behavior:** an error like ``` a.ts:1:29 - error TS2497: Module '"/home/dgoldstein/tmp4/store"' resolves to a non-module entity and cannot be imported using this construct. 1 import * as SetupStore from './store'; ``` **Actual behavior:** This code typechecks, yet fails at runtime: ``` $ node compiled/a.js /home/dgoldstein/tmp4/compiled/a.js:11 console.log(SetupStore.screenAfterScaleMitigation()); ^ TypeError: SetupStore.screenAfterScaleMitigation is not a function at Object.<anonymous> (/home/dgoldstein/tmp4/compiled/a.js:11:24) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) at Function.Module.runMain (module.js:676:10) at startup (bootstrap_node.js:187:16) at bootstrap_node.js:608:3 ``` if the last two lines of `store.ts` are replaced with ``` export = new SetupStore(); ``` then the expected error shows up. **Playground Link:** requires multiple modules and --esModuleInterop so this isn't reproable in the playground **Related Issues:** couldn't find any
Bug
low
Critical
366,131,039
flutter
Kernel files and snapshots contain absolute paths from developer's machine
Tracking issue for dart-lang/sdk#34654 It appears that kernel files are capturing paths from the machine they were generated on. For example, I found this path in the kernel file and AOT compilation output of the android_alarm_manager example application: file:///usr/local/google/home/bkonyi/plugins/packages/android_alarm_manager/example/lib/main.dart At the very least, fully qualified paths like this could add a number of KB to a shipped Flutter application and could be considered a privacy concern due to personally identifying information potentially being part of the path. cc/ @Hixie @matthew-carroll
engine,dependency: dart,P2,team-engine,triaged-engine
low
Minor
366,131,381
TypeScript
Write type parameters instead of @template tags in JSDoc
Rather than ```js /** * @typedef Arrayify * @type {{ [K in keyof T]: T[K][] }} * @template T */ /** * @typedef Bar * @type {{ x: string, y: number }} */ /** * @type {Arrayify<Bar>} */ var x; ``` I hate writing out the `@template` tag. Can we just write it out like this? ```js /** * @typedef Arrayify<T> * @type {{ [K in keyof T]: T[K][] }} */ /** * @typedef Bar * @type {{ x: string, y: number }} */ /** * @type {Arrayify<Bar>} */ var x; ```
Suggestion,In Discussion,Domain: JSDoc,Experience Enhancement
low
Major
366,164,924
rust
Using `include_str` in an attribute
Not sure if this should be an RFC or a bug/issue, but I'm trying to add an attribute to a struct where the value of the attribute is a `&'static str`. It would be nice to have the contents of the string in a separate file so I can have syntax highlighting when editing that file, and then have that be pulled in to the rust module and built. The following should reproduce the issue: `Cargo.toml`: ``` [package] name = "handmade-rs" version = "0.1.0" edition = "2018" [dependencies] winit = "0.17" vulkano = "0.10.0" vulkano-win = "0.10.0" vulkano-shader-derive = "0.10.0" ``` And then in a module, try to compile the following. The `src` attribute takes a string as its value, that contains the source code of the shader to compile. ``` #[derive(VulkanoShader)] #[ty="compute"] #[src=include_str!("./compute_shader.glsl")] pub struct Dummy; ``` When I compile, I get the following output: ``` $ cargo b Compiling handmade-rs v0.1.0 (C:\Users\Alexandros\workspace\handmade-rs) error: expected `]`, found `!` --> src\shaders\compute.rs:4:18 | 4 | #[src=include_str!("./compute_shader.glsl")] | ^ expected `]` error: aborting due to previous error error: Could not compile `handmade-rs`. To learn more, run the command again with --verbose. ```
T-lang,C-feature-request
low
Critical
366,171,969
rust
Mapping `Ref` to a value containing a reference
Consider the following specific use case explaining a more general issue: We have a struct, `RefStrings`, that keeps a `RefCell` containing some form of collection, `Vec<String>`. Part of `RefStrings`'s API surface is a function that aims to expose an iterator over the underlying collection. The only possibility I see for exposing the iterator (conceptually) is via a `Ref` and using `RefCell`'s `map` function: ```rust struct RefStrings(RefCell<Vec<String>>); impl RefStrings { fn iter<'t, 's: 't>(&'s self) -> Ref<'t, Iter<String>> { Ref::map(self.0.borrow(), |x| x.iter()) } } ``` ([playground](https://play.rust-lang.org/?gist=1e9b2b97db032b40e93e8bcbd7e2c70b&version=stable&mode=debug&edition=2015)) Unfortunately, that does not work. The reason being that `Ref` is defined to hold a reference to a member of the borrowed object, but an iterator is effectively an actual object in itself that just happens to have such a reference. I have not found a way to get this working using the existing functionality. Am I just missing something? A possible solution that I worked with now is the introduction of a new associated function `Ref::map_val` that returns an object that effectively contains another object (i.e., something that is `Sized`) that may hold a reference to the borrowed data (e.g., a concrete iterator type). That solves the problem reasonably nicely, in my opinion. ```rust struct RefStrings(RefCell<Vec<String>>); impl RefStrings { fn iter<'t, 's: 't>(&'s self) -> RefVal<'t, Iter<String>> { Ref::map_val(self.0.borrow(), |x| x.iter()) } } // ... // RefVal is defined as: pub struct RefVal<'b, T> { value: T, borrow: BorrowRef<'b>, } ``` (see the [`cell` crate](https://crates.io/crates/cell) for the full functionality; note that the API provided is still limited, i.e., I mostly implemented what I needed right away) Unfortunately I have not found a way to provide said functionality as anything else than a replacement of `RefCell` itself, with all the code duplication that accompanies. So, I am filing this issue to discuss 1) whether I am just missing something and there is a trivial way to accomplish what I hopefully explained well enough 2) ~if that is not the case, whether this functionality is desired to be~ ~included in the Rust standard library (I believe this is a general~ ~problem with a general solution; despite probably not being a very~ ~common one)~ 3) ~if such a desire exists, the steps to be taken to include this~ ~functionality (RFC process?)~ EDIT: [Proposed solution](https://crates.io/crates/cell) turned out to be unsafe with no known workaround. So really this issue is only to discuss other solutions.
T-libs-api,C-feature-request
low
Critical
366,277,154
pytorch
`GLIBC_2.23' not found on Ubuntu14.04.
## Issue description caffe2-cuda8.0-cudnn7 can't work on Ubuntu14.04. ## Code example cd ~ && python -c 'from caffe2.python import core' WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode. CRITICAL:root:Cannot load caffe2.python. Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.23' not found (required by /home/likewise-open/SENSETIME/wangyongwang/anaconda2/lib/python2.7/site-packages/caffe2/python/../../../../libcaffe2.so) ## System Info - PyTorch or Caffe2: Caffe2 - How you installed PyTorch (conda, pip, source): conda - Build command you used (if compiling from source): conda install -c caffe2 caffe2-cuda8.0-cudnn7 - OS: Ubuntu14.04 - PyTorch version: - Python version: 2.7.15 - CUDA/cuDNN version: - GPU models and configuration: - GCC version (if compiling from source): 4.8 - CMake version: - Versions of any other relevant libraries:
caffe2
low
Critical
366,296,800
TypeScript
Assign a known symbol to a constant should retain type information
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section. --> ## Search Terms <!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily --> ## Suggestion <!-- A summary of what you'd like to see added or changed --> Assigning a known symbol constant to another constant should retain type information. ```typescript const foo = Symbol() // known symbol const bar = foo // expecting 'typeof foo' but received 'symbol' interface UseFoo { [foo]: 'value' } // This should work const useBar: UseFoo = { [bar]: 'value' } ``` ## Use Cases <!-- What do you want to use this for? What shortcomings exist with current approaches? --> Creating aliases of symbol constants without losing type information. ## Examples <!-- Show how this would be used and what the behavior would be --> ### `Symbol.iterator` alias ```typescript const { iterator } = Symbol const iterable: Iterable<number> = { * [iterator] () { yield * [0, 1, 2, 3] } } ``` ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code * [x] This wouldn't change the runtime behavior of existing JavaScript code * [x] This could be implemented without emitting different JS based on the types of the expressions * [x] This isn't a runtime feature (e.g. new expression-level syntax)
Suggestion,Awaiting More Feedback
low
Critical
366,354,238
opencv
Inverse DataType traits are needed
It seems that OpenCV matrices (e.g. `cv::Mat`) does not actually know its underlying native type - it either needs a template type (e.g. the function `Mat::at<T>`), or - it needs to do switch-case over the depth value in order to know it, Further: - it compares depth values hopping that such comparison corresponds to `sizeof()` of native types - it makes stupid assumptions (e.g. all depth values above `CV_32S` are fractional types) - it just cannot automatically tell which type is signed and which is not, and needs hard-coded expressions in various situations (e.g. inside the random generator which need to check the matrix-type limits) - ...etc but all of this seems unnecessary with the existence of the trait-types. Trait types currently work as a lookup from the native-type to the depth and channel values, but the inverse should be possible as well. I believe trait-types should be able to automatically build some kind of compile-time depth-to-native-type inverse lookup, which can be inferred from the current traits implementation without any additional requirements. What do you think?
category: core,RFC
low
Minor
366,418,332
flutter
Integrate with Smart Text Selection APIs
Android has an open source [libtextclassifier API](https://android.googlesource.com/platform/external/libtextclassifier/+/master) which is used for smart text selection: ![image2](https://user-images.githubusercontent.com/6687929/46423828-59719e80-c6ec-11e8-8c1d-733635afcaad.gif) The text selection API is C++ and can potentially be used with iOS but there are a couple of problems: - The library is part of AOSP so I am not sure if it can be included in Flutter as a first class dependency. - They generate Intents on Android to open up relevant actions (such as Map). So the current recommended way of integration on Android is via the [Java API](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/view/textclassifier/TextClassifier.java).
a: text input,c: new feature,framework,f: material design,P3,team-design,triaged-design
low
Minor
366,426,623
flutter
Feature request: Allow datepicker to select multiple days and return them as List<DateTime>
The Current datepicker only supports selecting one day. When showDatePicker(params) is called it returns a DateTime for the selected date, which is great, but it will be even better if there is an option that allows for multiple date selection and returning them as a list of <DateTime>. This is not an actual issue but a feature that would make flutter shine more.
c: new feature,framework,f: material design,f: date/time picker,P3,team-design,triaged-design
medium
Major
366,434,210
create-react-app
Dynamic import doesn't work with SVG imported as ReactComponents
<!-- PLEASE READ THE FIRST SECTION :-) --> ### Is this a bug report? Yes ### Did you try recovering your dependencies? Yes ### Which terms did you search for in User Guide? SVG, ReactComponent, dynamic import ### Environment ``` System: OS: macOS 10.14 CPU: x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz Binaries: Node: 10.11.0 - /usr/local/bin/node Yarn: 1.7.0 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm Browsers: Chrome: 69.0.3497.100 Firefox: 61.0.2 Safari: 12.0 npmPackages: react: ^16.5.2 => 16.5.2 react-dom: ^16.5.2 => 16.5.2 react-scripts: 2.0.3 => 2.0.3 npmGlobalPackages: create-react-app: 2.0.2 ``` ### Steps to Reproduce 1. Try to import SVG as ReactComponet using import(). Example code below ### Expected Behavior SVG loads ### Actual Behavior Got following error in browser ``` Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. ``` This happens because importing module doesn't contain ReactComponent property. Here's console.log output from demo ``` Module {default: "/static/media/logo.5d5d9eef.svg", __esModule: true, Symbol(Symbol.toStringTag): "Module"} ``` ### Reproducible Demo ```jsx import React, { Component } from 'react'; import './App.css'; class App extends Component { constructor (props) { super(props) this.logoComponent = 'div' } componentDidMount () { import('./logo.svg').then((m) => { console.log(m) this.logoComponent = m.ReactComponent this.forceUpdate() }) } render() { const Logo = this.logoComponent return ( <div> <Logo /> </div> ) } } export default App; ``` ### Workaround 1. Create file with following content ```javascript import { ReactComponent as Logo } from './logo.svg' export default Logo ``` 2. Use dynamic import as usual for this file
issue: bug,issue: needs investigation
medium
Critical
366,435,415
TypeScript
Type Guards and CallBack Parameters are any, if worked, could successfully defined a callback type and respective guard
**TypeScript Version:** [email protected] Two bugs in one, if both of these issues work, I would be able to properly defined a callback type function call signature overloads and a type guard to go with it. <!-- Search terms you tried before logging this (so others can find this issue more easily) --> CallBack, Type Guards with extends fails, CallBack with overloads signatures types become any type, instead of union of their respective params. ## Issues 1. Callback types params with methods overloading are always any type, should be respective union of each parameters types. 2. Type Guards for more complex type guards doesn't work. ## Summary If all of this were to work, I would be able to correct write a typescript type for a callback with its associated type guard. ### 1. CallbackTypes are not correctly computed, which expected to be a union of the respective overloads params. ```.ts // function call signatures. interface CallBack<T> { () : void (error : Error) : void (error : undefined, result : T) : void (error : null, result : T) : void } function takeCallBack(callback: CallBack<number>) { callback(); callback(null, {A:77}); callback(new Error('')); } //Fails to determine which function signature was used to call, because it could have been any of the //formats. The final format is an any type. It would be nice to be able to write a type guard //[ts] 'result' is declared but its value is never read. //[ts] Argument of type '(error: any, result: any) => void' is not assignable to parameter of type 'CallBack<number>' takeCallBack((error, result) => { }); ``` Expected, however, this is not enough information us to write a proper type guards and we have also lost information about the results, which is the most important. we need to be able to distinguish between T and T | undefined. ```.ts takeCallBack((error : Error | undefined | null, result : T | undefined) => { }); ``` ## CallBack type formulation The only was to be able to do this, without having complicate solution, by means on inspection the body of the the function in which the callback is call to determine or infer the variants. Would be to break the callback definition into three. ### Callback A: ```.ts interface CallBackError<T> { () : void // sucessfully, results undefined (error : Error) : void // Error } function takeCallBackNoResults(callback: CallBackError<number>) { callback(); callback(new Error('')); } //[ts] 'results' is declared but its value is never read. //[ts] Argument of type '(error: any, results: any) => void' is not assignable to parameter of type 'CallBackError<number>'. takeCallBackNoResults((error,results) => { }); takeCallBackNoResults((error : Error,results : undefined) => { }); ``` I can now write a guard statement for this, to ensure a clean output of results, however, in this case I shouldn't need it. ### CallBack B: Here I can use the null permutation of error, to determine ```.ts interface CallBackResult<T> { (error : null, res : T) : void (error : Error) : void } function takeCallBackResults(callback: CallBackResult<number>) { callback(null, 6); callback(new Error('')); } //[ts] 'results' is declared but its value is never read. //[ts] Argument of type '(error: any, results: any) => void' is not assignable to parameter of type 'CallBackResult<number>'. takeCallBackResults((error,results) => { }); takeCallBackResults((error : Error | null,results : number | undefined) => { }); ``` I can't write a guard for this, but would be nice if I didn't need it in the first place, but there is now getting around that. ### Callback C: ```.ts interface CallBackOpResult<T> { () : void (error : null, res : T) : void (error : Error) : void } function takeCallBackOpResults(callback: CallBackOpResults<number>) { callback(); callback(null, 5); callback(new Error('')); } //[ts] 'results' is declared but its value is never read. //[ts] Argument of type '(error: any, results: any) => void' is not assignable to parameter of type 'CallBackError<number>'. takeCallBackOpResults((error,results) => { }); takeCallBackNoResults((error : Error | null | undefined,results : number | undefined) => { }); ``` I can't write a guard for this, but would be nice if I didn't need it in the first place, but there is now getting around that. Because we have to now do an unnecessary check for undefined, when results mayn't have support undefined in the first place. ### CallBack - Conclusion on how to write the final form What we are not able to distinguish here is that, is whether results would be a plain T or meant to tbe T | undefined. This is a problem, the only way we able to to really know that is if error and results parameters could be treated as one and a set. I can write a type gaud, have knowledge of this already, to check for the 3 cases, but I will always have to check for undefined What I could do is use the fact that error being of type null, means that results shouldn't have the undefined, I could strip it, but I wouldn't be able know difference of which results still If I decided to not allow undefined error, for default case of no results I could be able to write a gaud check that would work, based on the input of error being null or not. ```.ts interface CallBackOpResult<T> { () // error = undefined, results = undefined (error : null, res : T) : void (error : Error) : void } function takeCallBackOPResults(callback: CallBackOpResults<number>) { callback(); callback(null, 5); callback(new Error('')); } //[ts] 'results' is declared but its value is never read. //[ts] Argument of type '(error: any, results: any) => void' is not assignable to parameter of type 'CallBackOpResults<number>'. takeCallBackOpResults((error,results) => { }); ``` ### Simple Use of Type Guard: ```.ts takeCallBackNoResults((error : Error | null, results : number) => { if(!CallBackHasResults(error, results)) console.log(error);// handle error else { results } }); ``` ### Type Guards Failed: ```.ts function CallBackHasResults1<Err extends undefined | null | Error, Result>(error : Err, results : Result) : results is undefined | Result function CallBackHasResults1<Err extends null | Error, Result>(error : Err, results : Result) : results is Result { return error !== null && error !== undefined; //return results; } // Fails to work correctly: const callBack = (error : Error | null | undefined, results : number |undefined) => { if(!CallBackHasResults1(error, results)) console.log(error);// handle error else { results // expect type = number | undefined } } // Fails to work correctly. const callBack2 = (error : Error | null, results : number | undefined) => { if(!CallBackHasResults1(error, results)) console.log(error);// handle error else { results // expect type = number } } ``` The alternative would be to introduce a compound type for callbacks, were by both error and Results are used to dictate the output format, which I have achieved here by doing this manual. ### Another alternative, using the this parameter, which may work if the overloads function parameters unioned correctly. ```.ts interface CallBackOpResult2<T> { () // error = undefined, results = undefined (error : null, res : T) : void (error : Error) : void } interface TT<T> { callback : CallBackOpResult2<T> } function takeCallBackResults3(callback: TT<number>['callback']) { //this = {a : 'a'} callback(); callback(null, 5); callback(new Error('')); } //[ts] 'results' is declared but its value is never read. //[ts] Argument of type '(error: any, results: any) => void' is not assignable to parameter of type 'CallBackError<number>'. takeCallBackResults3((error,results) => { }); takeCallBackNoResults3(function (error, results) { if(!CallBackHasResults3(error, results)) console.log(error);// handle error else { results } }); function CallBackHasResults3<T extends {callback:any},Err extends undefined | null | Error, Result>(this : T, error : Err, results : Result) : results is undefined | Result //function CallBackHasResults3<Err extends null | Error, Result>(this : {a:'a'}, error : Err, results : Result) : results is Result { return error !== null && error !== undefined; //return results; } ```
Discussion
low
Critical
366,447,153
youtube-dl
[adobepass] DIRECTV NOW login no longer working
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.09.26*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.09.26** ### 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 - [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue* --- ### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows: Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` # youtube-dl --ap-mso ATTOTT --ap-username *** --ap-password *** http://www.usanetwork.com/mrrobot/videos/shutdown-r [debug] System config: [] [debug] User config: ['--write-sub', '--sub-format', 'srt/vtt', '--sub-lang', 'de,en,deu,eng,de-DE,en-US,en-GB,de-de,en-us,en-gb', '-R', 'infinite', '--fragment-retries', 'infinite', '--socket-timeout', '10'] [debug] Custom config: [] [debug] Command-line args: ['-v'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2018.09.26 [debug] Python version 3.7.0 (CPython) - Linux-4.18.10-arch1-1-ARCH-x86_64-with-arch [debug] exe versions: ffmpeg n4.0.2, ffprobe n4.0.2, rtmpdump 2.4 [debug] Proxy map: {} [USANetwork] shutdown-r: Downloading webpage [USANetwork] 3630251: Retrieving Authorization Token ERROR: 0070-We updated our app. Just sign out and sign back into DIRECTV NOW this one time, and you'll be all set! ``` --- ### Description of your *issue*, suggested solution and other information Authorizing through DIRECTV NOW to Adobe Pass-powered websites no longer works. Apparently the authorization schema has been changed. The error message also appeared in the browser, but disappeared after a relogin.
tv-provider-account-needed
low
Critical
366,459,957
flutter
Properly implement ideographic baseline
Currently, ideographic baseline is implemented as: (paragraph.cc) ``` ideographic_baseline_ = (metrics.fUnderlinePosition - metrics.fAscent) * style.height; ``` This appears to be incorrect and was only meant to be a stand-in that was *mostly* correct for most cases. We should try to sort this out as it particularly impacts China.
engine,a: china,a: typography,P2,team-engine,triaged-engine
low
Major
366,473,151
vscode
Stabilize TextSearchProvider API
Master issue to track stabilizing the TextSearchProvider extension API... Forked from #47058 Depends on - #59919 - #59458
feature-request,search,on-testplan,api-proposal,search-api
high
Critical
366,474,258
vscode
Stabilize findTextInFiles API
Depends on - #59919 - #59458
feature-request,search,on-testplan,api-proposal
low
Major
366,485,456
create-react-app
Setting "proxy" in package.json Fails for WebSockets
### Expected Behavior Setting "proxy" in package.json should proxy WebSockets to specified server. (As documented [here](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#proxying-api-requests-in-development): "The proxy option supports HTTP, HTTPS and WebSocket connections.") ### Actual Behavior Proxy does not work for WebSocket connections. ### Reproducible Demo No time for this atm. ¯\\_(ツ)_/¯
issue: proposal
high
Critical
366,517,549
go
net: TestLookupDotsWithRemoteSource is flaky
``` #!watchflakes post <- pkg == "net" && test == "TestLookupDotsWithRemoteSource" && (`DNS server failure`||`no such host`||`server misbehaving`||`timeout period expired`) ``` We are getting flaky test failures in net. This has been somewhat rare in the past few months, but it has failed the last 5 builds, so probably worth looking into now. ``` --- FAIL: TestLookupDotsWithRemoteSource (15.57s) lookup_test.go:694: LookupSRV(xmpp-server, tcp, google.com): lookup _xmpp-server._tcp.google.com on 8.8.8.8:53: read udp 10.50.0.170:50511->8.8.8.8:53: i/o timeout (mode=go) FAIL FAIL net 30.123s ``` Looks very related to #16865 closed 2 years ago.
Testing,NeedsFix
medium
Critical
366,532,164
go
runtime: error message: P has cached GC work at end of mark termination
I just saw this in a trybot run on OpenBSD amd64: https://storage.googleapis.com/go-build-log/e4418337/openbsd-amd64-62_9bec130b.log greplogs shows: [2018-10-03T02:09:38-06ff477/freebsd-386-10_4](https://build.golang.org/log/443686bd274b79ac55ab231dea2af38dec07c918) [2018-10-03T17:40:17-048de7b/freebsd-386-11_2](https://build.golang.org/log/02501624f069d0ccb2696991e9381f38fc95372e) [2018-10-03T19:54:23-9dac0a8/linux-amd64-nocgo](https://build.golang.org/log/e2cc676b4b0438a4c836b04d570e7573c11df416) CC @aclements @RLH
GarbageCollector,NeedsFix,early-in-cycle
high
Critical
366,538,884
pytorch
[caffe2] Inference using multiple GPU
I would like to load the same model on different GPUs to process the images from different cameras in parallel. However, when I use the following code to force the GPU locations for the model, the model only lives on the GPU defined by the last run of the code. In this case, what is the right way to load the same model on different GPUs running in different process? Thank you ``` # set the device options to CUDA device_opts1 = caffe2_pb2.DeviceOption() device_opts1.device_type = caffe2_pb2.CUDA device_opts1.cuda_gpu_id = 0 # init net init_def1 = caffe2_pb2.NetDef() with open(INIT_NET, 'rb') as f: init_def1.ParseFromString(f.read()) init_def1.device_option.CopyFrom(device_opts1) workspace.RunNetOnce(init_def1) # create net net_def1 = caffe2_pb2.NetDef() with open(PREDICT_NET, 'rb') as f: net_def1.ParseFromString(f.read()) net_def1.device_option.CopyFrom(device_opts1) workspace.CreateNet(net_def1, overwrite=True) ```
caffe2
low
Minor
366,547,176
flutter
Logging flutter doctor results
It would be useful to log the results of each `flutter doctor` run to better understand where the user is blocked in the Flutter installation process. I imagine we can start by collecting some high-level statistics such as the frequency of errors in each system (Home Brew, Android SDK, XCode, Cocoa Pods, Flutter SDK, IntelliJ/Android Studio, etc). Cc: @gspencergoog
team,tool,t: flutter doctor,P2,team-tool,triaged-tool
low
Critical
366,573,981
pytorch
nn.functional.linear() for sparse tensor
Add `nn.functional.linear()` with autograd for sparse tensor when input is sparse, while weights and bias are dense. - autograd for `torch.sparse.addmm(D, S, D) -> D` - add `torch.sparse.matmul(S, D) -> D` with autograd, also need to support broadcasting..
module: sparse,module: nn,triaged
low
Major
366,669,340
vue
Non-breaking space acts different than other characters - outputs "&nbsp;" in template when passed via props
### Version 2.5.17 ### Reproduction link https://codepen.io/avertes/pen/LYYpNRe [https://jsfiddle.net/50wL7mdz/756973/](https://jsfiddle.net/50wL7mdz/756973/) ### Steps to reproduce 1. Create a new component that accepts a string prop. 1. Display the prop within the component's template. 1. Use the component in a Vue application and pass a string containing a non-breaking space character for the prop. ### What is expected? The output should contain a non breaking space ### What is actually happening? The output shows `&nbsp;` --- In the example provided I've made 3 cases - First case is that `&#160;` get turned into `&nbsp;` - Second case is that in a long list of UTF-8 characters only `NON-BREAKING SPACE` is escaped. - And third when getting the same list of characters, but retrieving it from a regular `HTMLElement` with `document.querySelector('#test').title` the character aren't escape. **Note**: When copying the non-breaking space character it might turn into a regular space in the clipboard. Therefor use https://en.wikipedia.org/wiki/Non-breaking_space#Keyboard_entry_methods to make sure how to insert the character. <!-- generated by vue-issues. DO NOT REMOVE -->
bug
low
Major
366,764,103
create-react-app
Add an ID to the run time script
https://github.com/facebook/create-react-app/issues/5144#issuecomment-426980892
tag: enhancement
medium
Major
366,769,852
pytorch
[Caffe2] Segmentation fault (core dumped) while import caffe2.python.core
## 🐛 Bug When I want to import caffe2.pytho.core, I get a Segmentation fault. I followed the install guide for ubuntu 16 with prebuilt binaries and also installed nccl, I've been browsing past issues but can't find a solution. please help me ## To Reproduce Steps to reproduce the behavior: 1. Install NCCL 2.3.5 2. conda install -c caffe2 caffe2-cuda9.0-cudnn7 3. import caffe2.python.core ERROR : ``` WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode. Segmentation fault (core dumped) ``` ## Environment ``` uname -a Linux realAI 4.4.0-131-generic #157-Ubuntu SMP Thu Jul 12 15:51:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux ``` Followed : [](https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=prebuilt) Cmake : I installed with anaconda I can't find the cmake output ``` which python /home/mputtnam/anaconda3/bin/python which pip /home/mputtnam/anaconda3/bin/pip echo $PYTHONPATH <blank> ``` ``` nvidia-smi Thu Oct 4 08:35:22 2018 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 396.54 Driver Version: 396.54 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Quadro K4000 Off | 00000000:02:00.0 On | N/A | | 30% 38C P8 11W / 87W | 419MiB / 3010MiB | 3% Default | +-------------------------------+----------------------+----------------------+ | 1 Quadro K4000 Off | 00000000:81:00.0 Off | N/A | | 30% 33C P8 10W / 87W | 1MiB / 3018MiB | 0% Default | +-------------------------------+----------------------+----------------------+ | 2 Quadro K4000 Off | 00000000:82:00.0 Off | N/A | | 30% 32C P8 10W / 87W | 1MiB / 3018MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1974 G /usr/lib/xorg/Xorg 210MiB | | 0 2955 G compiz 180MiB | | 0 4925 G /usr/bin/nvidia-settings 24MiB | +-----------------------------------------------------------------------------+ ``` ``` nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2015 NVIDIA Corporation Built on Tue_Aug_11_14:27:32_CDT_2015 Cuda compilation tools, release 7.5, V7.5.17 ls -lah /usr/local/cuda lrwxrwxrwx 1 root root 8 Oct 3 08:35 /usr/local/cuda -> cuda-9.0 ```
caffe2
low
Critical
366,773,459
TypeScript
Typescript ESType definition improvements
Hi, The following types can be improved on to be more correct in the lib.es5.d.ts file. These type improve typically deal with the cases on of the arrays items keys has subset of the other keys, in this case the results is the common subset, with mismatching fields made optional. This requires functionality in typelevel-ts, however, that is only based on keys. new methods should do and K in keyof T, T[K] extends S[K] ? K : never ```.ts // Improved more correctly helper method. type ObjectOmit<T extends Record<string,any>, O extends Record<string,any>, KeyOfO keyof O> = Pick<T, { [K in keyof T] : K extends KeyOfO ? T[K] extends O[K] | undefined ? never : K // may need a two way extends comparison here. : K }[keyof T] export function ObjectAssign<T extends Record<string,any>, U extends Record<string,any>>(target: T, source: U): ObjectOverwrite<T, U> { return Object.assign(target, source); } export function ArrayConcat<A>(arrayA: A [] , arrayB : A []) : A[] export function ArrayConcat<B, A extends B>(arrayA: A [], arrayB : B []) : B & Partial<ObjectOmit<A, keyof B>>[] export function ArrayConcat<A, B extends A>(arrayA: A [], arrayB : B []) : A & Partial<ObjectOmit<B, keyof A>>[] { return arrayA.concat(arrayB) as any } export function FilterDefined<T>(items : Array<T> | undefined) : NonNullable<T> [] { if (items) return items.filter(f => f != undefined) as NonNullable<T> []; else return []; } ```
Suggestion,Help Wanted,Domain: lib.d.ts
low
Minor
366,811,290
rust
Pinning non-Deref pointers
Currently, you cannot even construct a `Pin` unless the pointer it wraps implements `Deref`. This means you cannot have a `Pin<*const T>`, `Pin<*mut T>` or `Pin<NonNull<T>>`. We should consider extending the API of Pin to support these constructs. Unfortunately, I don't know if there's much this actually helps, because we have no unsafe equivalent of `Deref` as a trait abstraction. As a result, I think the only APIs that could apply to these pointers generically is: * `unsafe fn new_unchecked(p: P) -> Pin<P>` * `unsafe fn into_inner(self: Pin<P>) -> P` This limits the utility of `Pin` on these pointers, since it basically guarantees nothing with this API. If we had an `UnsafeAsRef` trait, we could support unsafe equivalents of `as_ref` and `as_mut`, allowing you to at least maintain the pinning invariant in your unsafe code. In other words, some sort of `UnsafeAsRef` and `UnsafeAsMut` traits would be necessary for this to actually be helpful. I'm not sure if those traits are worth adding.
C-enhancement,T-libs-api,A-pin
low
Major
366,838,552
rust
Collection APIs for deallocating backing store without running destructors
Unfortunately, I have some code which needs to deallocate the backing store of our collection types without running the destructors on the elements in that collection. Currently, I am transmuting those types from `HashMap<K, V>` to `HashMap<ManuallyDrop<K>, ManuallyDrop<V>>` and then dropping that. Right now, this appears to work as intended. Incidentally, I think both rustc and std should make the necessary guarantees that this will always be safe, but I also think we should consider providing an API which deallocates these types without calling the destructors of their elements.
T-libs-api,C-feature-request
low
Minor
366,848,353
node
N-API: An api for embedding Node in applications
**Is your feature request related to a problem? Please describe.** Right now there isn't a documented/stable way to use Node as a shared library inside of an application. Were one to be made using N-API, this would open up using Chakra in addition to V8 in an application. **Describe the solution you'd like** I would like for there to be stable APIs in `node_api.h` for creating/managing a Node environment. A function that does this could hypothetically look like: ```cpp NAPI_EXTERN napi_status napi_create_env(int* argc, const char** argv, napi_env* env); // Start the node event loop NAPI_EXTERN napi_status napi_run_env(napi_env env); // Cleanup (e.g. FreeIsolateData, FreeEnvironment and whatever else needs to be ran on teardown) NAPI_EXTERN napi_status napi_free_env(napi_env env); ``` The embedder could get this environment's libuv loop using `napi_get_uv_event_loop`. But I would also like to have open the possibility of providing my own libuv loop that I have control over to help integrate with other event loops (e.g. Qt's event loop). This could look like: ```cpp NAPI_EXTERN napi_status napi_create_env_from_loop(int* argc, const char** argv, napi_env* env, struct uv_loop_s* loop); ``` Keeping the event loop going (using `uv_run` on the env's loop) would then be the embedder's responsibility. Also, right now methods like `node::CreateEnvironment` seem to always jump into a REPL, unless you provide a string to evaluate or a file to run. Tweaks to help make this nicer to use for embedding will have to be made. These APIs are just hypothetical, and will probably change when an actual attempt to implement them is made. I am up to trying to implement this, but I would like to see what kind of discussion happens first and what other ideas people have before I start. **Implementation Progress** - [ ] Create a clean non-NAPI way to use Node embedded - [ ] Create NAPI functions for creating and managing environments - [x] Create a NAPI function for evaluating a string (exists in NAPI v1: `napi_run_script`) - [ ] Create a NAPI function for running a script from file - [ ] Investigate if this can play nicely with `worker_threads`. **Describe alternatives you've considered** I've tried using the unstable APIs, and they aren't fun to keep up with 😅 For discussions on how the shared library can be distributed, see this issue: https://github.com/nodejs/node/issues/24028
c++,feature request,node-api,embedding,never-stale
high
Critical
366,908,693
go
x/build/cmd/gomote: gomote push confused by non-ASCII filenames
gomote push gets confused by non-ASCII filenames at least on Darwin: ``` $ gomote push user-bradfitz-darwin-amd64-10_12-0 2018/10/04 18:09:06 Deleting remote files: ["go/test/fixedbugs/issue27836.dir/Äfoo.go" "go/test/fixedbugs/issue27836.dir/Ämain.go"] 2018/10/04 18:09:06 Remote doesn't have "test/fixedbugs/issue27836.dir/Ämain.go" 2018/10/04 18:09:06 Remote doesn't have "test/fixedbugs/issue27836.dir/Äfoo.go" ``` These were added in https://golang.org/cl/138075 gomote just uses the underlying buildlet mechanisms, which are shared by the build system, so we should understand this more in case it's causing other problems or will cause problems down the road. /cc @thanm @cherrymui @andybons @dmitshur
Builders
low
Critical
366,921,403
TypeScript
strictPropertyInitialization should consider `return`
**TypeScript Version:** 3.2.0-dev.20181004 **Code** ```ts class C { x: number; constructor(b: boolean) { if (b) { this.x = 3; } else { return new C(true); } } } ``` **Expected behavior:** No error. **Actual behavior:** ``` src/a.ts:2:5 - error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor. 2 x: number; ```
Suggestion,Experience Enhancement
low
Critical
366,924,041
go
time: notice system timezone changes
### What version of Go are you using (`go version`)? go version go1.11.1 linux/amd64 ### Does this issue reproduce with the latest release? Yes. ### What operating system and processor architecture are you using (`go env`)? linux/amd64 ### What did you do? ``` package main import ( "fmt" "time" ) func main() { for { time.Sleep(1 * time.Second) fmt.Println(time.Now()) } } ``` in one terminal: ``` $ go run time.go ``` in another (note, this changes your computer's timezone): ``` $ timedatectl set-timezone America/Denver $ date Thu Oct 4 12:48:50 MDT 2018 $ timedatectl set-timezone America/Los_Angeles $ date Thu Oct 4 11:48:56 PDT 2018 $ ``` ### What did you expect to see? Go process seeing that the current time changes between MDT and PDT, time displayed changing by an hour. As far as I can tell, there's not even a way to tell package time to re-initialize its idea of local time, even if my app somehow (in a platform-specific way) realized that it was necessary. This hurts long-running end-user apps when users travel. Think of e.g. a desktop clock. ### What did you see instead? ``` 2018-10-04 12:48:48.12727581 -0600 MDT m=+1.000767878 2018-10-04 12:48:49.127890815 -0600 MDT m=+2.001383092 2018-10-04 12:48:50.128187914 -0600 MDT m=+3.001680261 2018-10-04 12:48:51.128403029 -0600 MDT m=+4.001895306 2018-10-04 12:48:52.128632471 -0600 MDT m=+5.002124678 2018-10-04 12:48:53.128842855 -0600 MDT m=+6.002335551 2018-10-04 12:48:54.129075736 -0600 MDT m=+7.002568154 2018-10-04 12:48:55.129282227 -0600 MDT m=+8.002787356 2018-10-04 12:48:56.129528956 -0600 MDT m=+9.003021303 2018-10-04 12:48:57.129734907 -0600 MDT m=+10.003227044 2018-10-04 12:48:58.129960422 -0600 MDT m=+11.003452839 2018-10-04 12:48:59.130145298 -0600 MDT m=+12.003637576 ```
NeedsInvestigation
low
Major
366,933,464
godot
Error saving GDScript when no scene opened in editor.
**Godot version:** Godot Engine v3.0.6.stable.official.8314054 **OS/device including version:** macOS 10.13.3 **Issue description:** Error saving GDScript in the editor when no scene is loaded in the tabs. Closing and discarding changes made after the error keeps changes made (perhaps cached in memory?) - although changes don't appear in file on-disk. Opening file again shows changes that were made (even though they were discarded) and force saving (Command-S) still doesn't save changes to disk. I see at least 2 issues here: 1. A script file should be able to be edited without a scene loaded. 2. Contents of the file should be read from disk on re-opening (or better cache handling?) I am certain I have lost GDScript changes perviously due to believing changes I had made to a script file had be saved when, in fact, they hadn't. On reopening Godot I would find my changes lost. **Steps to reproduce:** 1. Close all scenes and files (but leave project still open). 2. Open a GDScript file (in my case used as an AutoLoad singleton instance, inherited from Node) 3. Edit the script file. 4. Save the file. 5. Error appears stating "Alert! This operation can't be done without a tree root.". 6. Click on "I see..." button in the alert dialog box. 7. Right click on the file in the listed files and select 'Close'. 8. Choose to discard the changes. 9. Open a scene. 10. Open the previously opened GDScript. 11. Observe the changes made still exist - yet the changes have *not* been saved to disk. 12. Opening the file in an external editor will show the changes don't exist. 13. Forcing a save (Command-S) appears to save the file but changes are still not in the file. 14. On closing and reopening Godot, changes will be lost. **Minimal reproduction project:**
bug,topic:editor,confirmed,usability
low
Critical
366,963,803
neovim
`set nofoldenable foldmethod=syntax` still delays file opening
When opening large files with a `set foldmethod=syntax` autocommand, neovim delays on startup while it calculates the folds to be collapsed (profiling does not reveal any script causing the delay), which is unfortunate but understandable. I normally don't like folding, i.e. I want my code to default being unfolded, but I do want the option of folding a function every once in a while. `zc` without a `foldmethod` set obviously causes an error, but I'm almost always dealing with structured code and have a relevant (or semi-relevant) vim language plugin enabled that sets up the folds correctly with `set foldmethod=syntax`. I was hoping that an autocommand in my init.vim that called `set nofoldenable foldmethod=syntax` would set the fold method without blocking to calculate and then fold all contents of the file, but `set foldmethod` appears to explicitly set `foldenable` and then proceeds to fold all contents. What I don't want to do is call `set foldmethod=syntax nofoldenable` which basically blocks to calculate the folds only to leave them unfolded (at least it doesn't flash the content as it folds-then-unfolds). The only thing I can think of right now is to map the first `zc` in a buffer to `set foldmethod=syntax nofoldenable <CR> zc` and take the hit on first use rather than slowing each and every file load.
performance,bug-vim,folds
low
Critical
366,967,560
go
runtime/cgo: -extldflags=-stack_size=NNN does not set stack size used by runtime/cgo
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? go version go1.11 darwin/amd64 macOS Sierra (10.12.6) ### Does this issue reproduce with the latest release? yes ### What operating system and processor architecture are you using (`go env`)? ``` GOARCH="amd64" GOBIN="" GOCACHE="/Users/p8a/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/p8a/data/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/5l/3qmpjt5s6_z0vhkj27l7v0p40000gr/T/go-build878210713=/tmp/go-build -gno-record-gcc-switches -fno-common" ``` ### What did you do? Integrating via cgo a 3rd-party library which requires 2mb stack space does not work because stack size is set to default PTHREAD_STACK_MIN (which is less). The runtime behavior manifests as a deadlocked "panic" call with the following stack: ``` 2359 Thread_1644947 + 2359 _sigtramp (in libsystem_platform.dylib) + 26 [0x7fff9656cb3a] + 2359 runtime.sigtramp (in test) + 51 [0x4065fe3] + 2359 runtime.sigtrampgo (in test) + 544 [0x4049000] + 2359 runtime.sighandler (in test) + 1788 [0x404866c] + 2359 runtime.(*sigctxt).preparePanic (in test) + 172 [0x40475fc] ``` ### What did you expect to see? Panic being triggered and a way to set cgo stack size. ### What did you see instead?
help wanted,OS-Darwin,NeedsInvestigation
low
Critical
366,974,347
godot
Window dimensions are limited by wrong monitor
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** 3.1-alpha 8068d02 **OS/device including version:** Linux Mint 19 Cinnamon x64 (Muffin window manager) **Issue description:** I have two displays: one that is 2560x1440, and one that is 1280x1024. They have this layout: ![image](https://user-images.githubusercontent.com/27100585/46502792-57364e00-c86c-11e8-882f-f5ddcfad1ce2.png) Note that the larger monitor is set as the "primary" monitor. The problem is that any Godot window, upon being spawned, will have its size capped to the dimensions of the smaller, secondary monitor. This includes the Godot editor itself, if forced to open windowed. For example, I created a project with a window size of 2000x1200: ![image](https://user-images.githubusercontent.com/27100585/46502491-a039d280-c86b-11e8-83d2-9149398d0919.png) The window should fit on the 2560x1440 monitor. Just to be sure, the editor settings for window placement are configured for Monitor 1 (the primary monitor, being the larger one): ![image](https://user-images.githubusercontent.com/27100585/46502654-06bef080-c86c-11e8-998e-79b11ce4fe51.png) The project itself just displays the window size: ![image](https://user-images.githubusercontent.com/27100585/46503123-44704900-c86d-11e8-8031-45de010bc10d.png) When running the project, the window size will always be capped to 1280x1024, the size of the second monitor: ![image](https://user-images.githubusercontent.com/27100585/46503171-6cf84300-c86d-11e8-86d1-b9375a7838cd.png) cc @Calinou, maybe you're able to help diagnose the problem. **Minimal reproduction project:** This is the project I used: [multiple monitor window size bug.zip](https://github.com/godotengine/godot/files/2448151/multiple.monitor.window.size.bug.zip) It doesn't do much, and you might have to modify the window size to match your monitors, so this might not be too useful...
bug,topic:porting
low
Critical
366,987,843
go
net/http: can't set Transfer-Encoding explicitly on outgoing Request
`httputil.DumpRequestOut` does not currently print anything w.r.t. `Transfer-Encoding` (TE) even though the information is printed via `DumpRequest`. In addition, there is special logic for handling TE that seems like maybe it hasn't been extracted out so the logic is hard-coded into `DumpRequest` which means that it could drift from what is actually done when sending the request. I've not spent too much time looking at possible solutions but the Transfer-Encoding definitely seems to be a special case and its not particularly intuitive whats going on to your request if you set the header field manually or if you set the request.TransferEncoding. The docs say that `DumpRequest` is for server side debugging whereas `DumpRequestOut` is for clientside, but I'm not familiar with why they couldn't/shouldn't be more similar (or the same). Not sure if this logic should be put into `DumpRequestOut`, if not, why? And I'd like to get a bit of feedback if this is a known issue that maintainers would like to have cleaned up. ### What version of Go are you using (`go version`)? Go playground, any go version as far as I'm aware. ### Does this issue reproduce with the latest release? Yes. ### What operating system and processor architecture are you using (`go env`)? Just using the playground as an example. ### What did you do? https://play.golang.org/p/vW7oNw0Jjz6 ### What did you expect to see? The same information for Transfer-Encoding available on both `Dump...` outputs. ### What did you see instead? Transfer-Encoding is printed during `DumpRequest` but not `DumpRequestOut`
NeedsDecision
low
Critical
366,999,771
TypeScript
Problem returning union of promises in `then` callback
**TypeScript Version:** 3.2.0-dev.20181004 **Code** ```ts function f(b: boolean, pn: Promise<number>, ps: Promise<string>) { return Promise.resolve().then(() => b ? pn : ps); } ``` **Expected behavior:** No error. **Actual behavior:** Pyramid of doom error message: ``` src/a.ts:2:35 - error TS2345: Argument of type '() => Promise<string> | Promise<number>' is not assignable to parameter of type '(value: void) => string | PromiseLike<string>'. Type 'Promise<string> | Promise<number>' is not assignable to type 'string | PromiseLike<string>'. Type 'Promise<number>' is not assignable to type 'string | PromiseLike<string>'. Type 'Promise<number>' is not assignable to type 'PromiseLike<string>'. Types of property 'then' are incompatible. Type '<TResult1 = number, TResult2 = never>(onfulfilled?: ((value: number) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<...>' is not assignable to type '<TResult1 = string, TResult2 = never>(onfulfilled?: ((value: string) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => PromiseLike<...>'. Types of parameters 'onfulfilled' and 'onfulfilled' are incompatible. Types of parameters 'value' and 'value' are incompatible. Type 'number' is not assignable to type 'string'. 2 return Promise.resolve().then(() => b ? pn : ps); ``` **Related Issues:** #20531
Suggestion,Needs Proposal
low
Critical
367,004,808
TypeScript
Excess property errors reported on overloads report errors on the wrong overload
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.2.0-dev.201xxxxx <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** **Code** ```ts declare function badError(x: { x: number }): string; declare function badError(x: { y: number }): number; badError({ x: 12, foob: "ok" }); ``` **Expected behavior:** ``` Argument of type '{ x: number; foob: string; }' is not assignable to parameter of type '{ x: number; }'. Object literal may only specify known properties, and 'foob' does not exist in type '{ x: number; }'. ``` **Actual behavior:** ``` Argument of type '{ x: number; foob: string; }' is not assignable to parameter of type '{ y: number; }'. Object literal may only specify known properties, and 'x' does not exist in type '{ y: number; }'. ``` I noticed this while refactoring JSX to use the same excess property checking the rest of our call resolution does. Our JSX checking doesn't exhibit the same problem right now because it does strange things for "arity" checking that involve matching up properties, and so tosses the overload with no matching properties from the list of possible ones.
Bug,Domain: Error Messages
low
Critical
367,007,461
flutter
Need a way to read Android /res assets from Flutter
Internal: b/117228933 Flutter app cannot access assets under res/** for Android (or an arbitrary bundle on iOS), unless the asset is copied to the Flutter managed bundle. This is not ideal; we should provide a way to reuse platform assets. It is worth noting that we support the other way around: https://flutter.io/assets-and-images/#sharing-assets-with-the-underlying-platform Ideally, we should leverage the platform's mechanism for picking the right asset too. For instance, instead of grabbing `res/drawable-hhdpi/some_asset.png`, we should access the asset via `R.drawable.some_asset` so that the right scaled version is picked.
platform-android,engine,a: existing-apps,customer: crowd,P2,team-android,triaged-android
low
Major
367,097,036
flutter
Hero Animation Improvements
Would be good and useful if the Hero animation also move some Object with him. Like, if I'm moving an Text widget, they should move the String inside that Text widget, so that on the other side Hero just show the same data, without re-populate with a new data.
c: new feature,framework,a: animation,P3,team-framework,triaged-framework
low
Minor
367,127,179
create-react-app
Disabling code splitting in CRA2
How can I disable the code splitting in CRA 2?
issue: proposal,issue: question
high
Critical
367,136,932
rust
Bad error messages with wrong generator yield type
This is reduced code: ``` #![feature(generator_trait, generators)] use std::ops::{Generator, GeneratorState}; fn generator_to_iterator<G>(g: G) -> impl Iterator<Item = G::Yield> where G: Generator<Return = ()> { struct It<G>(G); impl<G: Generator<Return = ()>> Iterator for It<G> { type Item = G::Yield; fn next(&mut self) -> Option<Self::Item> { unsafe { match self.0.resume() { GeneratorState::Yielded(y) => Some(y), GeneratorState::Complete(()) => None, } } } } It(g) } fn foo() -> impl Iterator<Item=u32> { generator_to_iterator(|| { yield 1_i32; yield 2_u32; }) } fn main() { for _ in foo() {} } ``` It gives two error messages, both bad: ``` error[E0308]: mismatched types --> ...\test.rs:27:15 | 28 | yield 2_u32; | ^^^^^ expected i32, found u32 error[E0271]: type mismatch resolving `<impl std::iter::Iterator as std::iter::Iterator>::Item == u32` --> ...\test.rs:24:13 | 25 | fn foo() -> impl Iterator<Item=u32> { | ^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found u32 | = note: the return type of a function must have a statically known size error: aborting due to 2 previous errors Some errors occurred: E0271, E0308. ``` I'd like instead a single error message like: ``` error[E0308]: mismatched types --> ...\test.rs:26:15 | 28 | yield 1_i32; | ^^^^^ expected u32, found i32 ```
A-type-system,C-enhancement,A-diagnostics,T-compiler,A-coroutines,T-types
low
Critical
367,138,800
rust
Truncated backtraces on OS X
The original report is here: https://bugzilla.mozilla.org/show_bug.cgi?id=1496503 Apparently backtraces (sometimes?) get truncated on OS X as seen here: ``` ++DOMWINDOW == 3 (0x116c70800) [pid = 89605] [serial = 3] [outer = 0x10bd5a200] thread '' panicked at 'assertion failed: texture.state() == TextureState::Uninitialized', gfx/webrender/src/device/gl.rs:1177:9 stack backtrace: 0: 0x10edc78bf - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::hdfdb4ba75a1dcb88 1: 0x10eda034a - std::sys_common::backtrace::print::h5823bdde4d2f8639 2: 0x10edd00c3 - std::panicking::default_hook::{{closure}}::h06fc925781e26cfe 3: 0x10edcfe4c - std::panicking::default_hook::hdfdcc6f72e7aec0a 4: 0x10edd07b7 - std::panicking::rust_panic_with_hook::h28749c6c929f49fc Redirecting call to abort() to mozalloc_abort Hit MOZ_CRASH() at /files/mozilla/mc/q/memory/mozalloc/mozalloc_abort.cpp:35 Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Receive IPC close with reason=AbnormalShutdown (t=1.3491) Hit MOZ_CRASH(Aborting on channel error.) at /files/mozilla/mc/q/ipc/glue/MessageChannel.cpp:2662 Hit MOZ_CRASH(MachExceptionHandler: Failed to forward to the previous handler!) at /files/mozilla/mc/q/js/src/ds/MemoryProtectionExceptionHandler.cpp:671 ``` Is this a known issue? cc @bholley
A-runtime,O-macos,T-libs-api,T-compiler,C-bug,T-release
low
Critical
367,150,996
go
cmd/go: does not verify existence of replace directory
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? ``` go version go1.11.1 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="" GOCACHE="/home/myname/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/myname/go" GOPROXY="" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/myname/Downloads/test/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build816763754=/tmp/go-build -gno-record-gcc-switches" ``` ### What did you do? create this `go.mod` file; ```sh module aha require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7 // indirect github.com/gin-gonic/gin v1.3.0 // indirect github.com/golang/protobuf v1.2.0 // indirect github.com/json-iterator/go v1.1.5 // indirect github.com/mattn/go-isatty v0.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/cors v1.5.0 github.com/stretchr/testify v1.2.2 // indirect github.com/ugorji/go/codec v0.0.0-20180927125128-99ea80c8b19a // indirect golang.org/x/net v0.0.0-20181005035420-146acd28ed58 // indirect golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect golang.org/x/sys v0.0.0-20181004145325-8469e314837c // indirect gopkg.in/go-playground/assert.v1 v1.2.1 // indirect gopkg.in/go-playground/validator.v8 v8.18.2 // indirect gopkg.in/yaml.v2 v2.2.1 // indirect ) replace github.com/rs/cors/wrapper/gin => ../nonexistentDirectory/AntherDirectoryThatDoesNotExist ``` and this `main.go` file; ```go package main import ( "fmt" "github.com/rs/cors/wrapper/gin" ) func main() { fmt.Println(gin.Options{}) } ``` then run; ```bash go mod tidy && \ go mod verify && \ go run main.go ``` ### What did you expect to see? a failure with a nice error message pointing out that the path `../nonexistentDirectory/AntherDirectoryThatDoesNotExist` does not exist. ### What did you see instead? ```bash all modules verified {[] <nil> [] [] [] 0 false false false} ```
NeedsDecision,modules
low
Critical
367,184,430
rust
Regression: "temporary value does not live long enough" in a `static` item in Servo
Reduced test case: ```rust #![feature(const_fn)] const fn require_static<T>(_: &'static T) {} const fn foo() -> u32 { 0 } pub static A: () = require_static(&foo()); ``` rustc 1.31.0-nightly (5597ee8a6 2018-10-03): OK rustc 1.31.0-nightly (8c4ad4e9e 2018-10-04): ```rust error[E0597]: borrowed value does not live long enough --> a.rs:4:36 | 4 | pub static A: () = require_static(&foo()); | ^^^^^- temporary value only lives until here | | | temporary value does not live long enough | = note: borrowed value must be valid for the static lifetime... error: aborting due to previous error ``` Commit range: https://github.com/rust-lang/rust/compare/5597ee8a6...8c4ad4e9e. https://github.com/rust-lang/rust/pull/53851 seems relevant. @oli-obk, should we use `#[rustc_promotable]` in unstable code, despite the `rustc_` prefix in its name?
C-enhancement,A-diagnostics,A-borrow-checker,T-compiler
medium
Critical
367,206,104
node
N-API: Need SharedArrayBuffer api
needed feature : napi_create_external_sharedarraybuffer napi_get_sharedarraybuffer_info napi_is_sharedarraybuffer Since V8 api supports external sharedarraybuffer creation, it would be nice if n-api implements this.
feature request,node-api
medium
Major
367,215,966
go
x/exp/shiny: hebrew keyboard not supported
#### What did you do? I have created a program that logs the `key.Event` from the window, then I tried to type Hebrew rune in my keyboard and the program loged ``` key = key.Event{(CodeUnknown), key.Modifiers(), Press} key = key.Event{(CodeUnknown), key.Modifiers(), Release} ``` the program ```golang package main import ( "fmt" "log" "golang.org/x/exp/shiny/driver" "golang.org/x/exp/shiny/screen" "golang.org/x/mobile/event/key" "golang.org/x/mobile/event/lifecycle" ) func main() { driver.Main(func(s screen.Screen) { w, err := s.NewWindow(&screen.NewWindowOptions{ Title: "~", }) if err != nil { log.Fatal(err) } defer w.Release() for { e := w.NextEvent() switch e := e.(type) { case key.Event: fmt.Println("key =", e) case lifecycle.Event: if e.To == lifecycle.StageDead { return } } } }) } ``` #### What did you expect to see? I have expected the `key.Event` to contain the Unicode of the character I pressed. And the log should be like ``` key = key.Event{'א' (CodeUnknown), key.Modifiers(), Press} key = key.Event{'א' (CodeUnknown), key.Modifiers(), Release} ``` #### What did you see instead? the Unicode was -1. #### Does this issue reproduce with the latest release (go1.11.1)? yes #### System details ``` go version go1.10.1 linux/amd64 GOARCH="amd64" GOBIN="" GOCACHE="/home/user/.cache/go-build" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/user/Desktop/go" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="/usr/bin/gccgo" CC="gcc" 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" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build633916952=/tmp/go-build -gno-record-gcc-switches" GOROOT/bin/go version: go version go1.10.1 linux/amd64 GOROOT/bin/go tool compile -V: compile version go1.10.1 uname -sr: Linux 4.18.0-8-generic Distributor ID: Ubuntu Description: Ubuntu Cosmic Cuttlefish (development branch) Release: 18.10 Codename: cosmic /lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.28-0ubuntu1) stable release version 2.28. gdb --version: GNU gdb (Ubuntu 8.2-0ubuntu1) 8.2 ```
NeedsInvestigation
low
Critical
367,221,187
flutter
PlatformView API should be simplified
This is the minimum amount of code currently required to setup the plumbing for platform views on Android: ```java Registrar registry = flutterView.getPluginRegistry().registrarFor("FlutterWithPlatformViewActivity"); registry .platformViewRegistry() .registerViewFactory( "myImageView", new PlatformViewFactory(StandardMessageCodec.INSTANCE) { @Override public PlatformView create(Context context, int viewId, Object args) { return new PlatformView() { @Override public View getView() { ImageView view = new ImageView(context); view.setImageResource(R.drawable.ic_launcher); return view; } @Override public void dispose() {} }; } }); ``` - There should not be a need to register a plugin to use the platform view. I should be able to access the platform view registry directly from FlutterView (or FlutterEngine). - We should cover the common use cases in a simpler way. E.g. provide an option `SimplePlatformViewFactory` that just has a single method to return the Android view. Ideally this can be boiled down to: ```java getPlatformViewRegistry().registerViewFactory( "myImageView", new SimplePlatformViewFactory() { @Override public View createView(Context context, int viewId, Object args) { ImageView view = new ImageView(context); view.setImageResource(R.drawable.ic_launcher); return view; } } }); ```
platform-android,engine,a: existing-apps,a: platform-views,P2,team-android,triaged-android
low
Minor
367,249,170
angular
ngValue ignored in ng-content and ng-template
<!-- 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 --> [ ] Performance issue [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 [ ] Other... Please describe: </code></pre> This issue was previously reported at https://github.com/angular/angular/issues/22374, which was closed as a support request even though I don't believe it was intended to be one. ## Current behavior `ngValue` is ignored if (1) the `<option>`s are provided via `<ng-content>` to a component (even if the component simply wraps a vanilla `<select>`) or (2) if the `<option>`s are in an `<ng-template>`. ## Expected behavior `ngValue` should work the same in these cases as it does when using a plain `<select>` with directly nested `<option>`s. ## Minimal reproduction of the problem with instructions Please see https://codesandbox.io/s/2z2n2v0pjp . Here is a screenshot of the reproduction: <img width="741" alt="image" src="https://user-images.githubusercontent.com/1591879/46542699-4ab9f180-c87c-11e8-93c5-85e06eb2dc61.png"> ## What is the motivation / use case for changing the behavior? Many applications require a custom-styled `<select>` component that allow the caller of the component to provide their own `<option>`s. ## Environment <pre><code> Angular version: 6 Browser: - [x] All </code></pre>
feature,freq2: medium,area: forms,feature: under consideration
low
Critical
367,256,184
create-react-app
[ModuleScopePlugin] problem with nested package.json in linked dependencies
### Is this a bug report? Yes ### Did you try recovering your dependencies? ### Which terms did you search for in User Guide? ### Environment ^ irrelevant sections ### Steps to Reproduce Repro case here - https://github.com/Andarist/module-scope-plugin-repro . The repository has a postinstall script which automatically links local package (which is in repro repository here, but in my real world use case it is not). I've tried to reproduce the issue with exact same package (same structure) installed with a package manager, but it's working properly then. So it seems that it has to do something with the package being linked. The structure (nested package.json reaching for `../dist/*` - relative to its location) is unusual, but is correct. It's allowed by webpack (as it's allowed by node.js - https://nodejs.org/api/modules.html#modules_all_together) and should work here. Also - the normal main/module from the root of the package are working "correctly", but I believe it's kinda by accident because it comes to a situation when the "regular" entry is requested with such values (coming from scope, webpack request and similar) ```js { "descriptionFileRoot": "/linked_packages/package_name", "contextIssuer": "/application/src/index.js", "innerRequest": "./dist/package_entry.esm.js", "requestFullPath": "/application/src/dist/package_entry.esm.js" } ``` `requestFullPath` is completely wrong here, such file doesn't exist and is not requested, but when relative paths - from app source to the requested path are compared the check reports back everything is OK as path of this non-existent file lies witin app source boundary. Let's compare it to same values for the "request" causing trouble: ```js { "descriptionFileRoot": "/linked_packages/package_name", "contextIssuer": "/application/src/index.js", "innerRequest": "../dist/alternative_package_entry.esm.js", "requestFullPath": "/application/dist/alternative_package_entry.esm.js" } ``` `requestFullPath` is again completely wrong and it doesn't exist on the filesystem, but this time it falls out of the source directory and thus fails the check and causes this bug. ### Expected Behavior The requested file should be properly recognized as located outside of the source directory (it's in node_modules!) ### Actual Behavior Can't import it as it's being reported as being outside of the source directory. ### Reproducible Demo given in "Steps to reproduce" section
issue: needs investigation
low
Critical
367,265,598
create-react-app
Service Worker weird caching
<!-- PLEASE READ THE FIRST SECTION :-) --> ### Is this a bug report? Yes <!-- If you answered "Yes": Please note that your issue will be fixed much faster if you spend about half an hour preparing it, including the exact reproduction steps and a demo. If you're in a hurry or don't feel confident, it's fine to report bugs with less details, but this makes it less likely they'll get fixed soon. In either case, please fill as many fields below as you can. If you answered "No": If this is a question or a discussion, you may delete this template and write in a free form. Note that we don't provide help for webpack questions after ejecting. You can find webpack docs at https://webpack.js.org/. --> ### Did you try recovering your dependencies? <!-- Your module tree might be corrupted, and that might be causing the issues. Let's try to recover it. First, delete these files and folders in your project: * node_modules * package-lock.json * yarn.lock Then you need to decide which package manager you prefer to use. We support both npm (https://npmjs.com) and yarn (http://yarnpkg.com/). However, **they can't be used together in one project** so you need to pick one. If you decided to use npm, run this in your project directory: npm install -g npm@latest npm install This should fix your project. If you decided to use yarn, update it first (https://yarnpkg.com/en/docs/install). Then run in your project directory: yarn This should fix your project. Importantly, **if you decided to use yarn, you should never run `npm install` in the project**. For example, yarn users should run `yarn add <library>` instead of `npm install <library>`. Otherwise your project will break again. Have you done all these steps and still see the issue? Please paste the output of `npm --version` and/or `yarn --version` to confirm. --> Yes ### Which terms did you search for in User Guide? <!-- There are a few common documented problems, such as watcher not detecting changes, or build failing. They are described in the Troubleshooting section of the User Guide: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#troubleshooting Please scan these few sections for common problems. Additionally, you can search the User Guide itself for something you're having issues with: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md If you didn't find the solution, please share which words you searched for. This helps us improve documentation for future readers who might encounter the same problem. --> https://github.com/facebook/create-react-app/issues/2398 ### Environment <!-- To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required. This enables the maintainers quickly reproduce the issue and give feedback. Run the following command in your React app's folder in terminal. Note: The result is copied to your clipboard directly. `npx create-react-app --info` Paste the output of the command in the section below. --> Environment Info: System: OS: macOS High Sierra 10.13.6 CPU: x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz Binaries: Node: 9.10.0 - /usr/local/bin/node Yarn: 1.10.1 - /usr/local/bin/yarn npm: 5.6.0 - /usr/local/bin/npm Browsers: Chrome: 69.0.3497.100 Firefox: 62.0.3 Safari: 12.0 npmPackages: react: ^16.5.2 => 16.5.2 react-dom: ^16.5.2 => 16.5.2 react-scripts: 2.0.4 => 2.0.4 npmGlobalPackages: create-react-app: 2.0.3 ### Steps to Reproduce <!-- How would you describe your issue to someone who doesn’t know you or your project? Try to write a sequence of steps that anybody can repeat to see the issue. --> (Write your steps here:) 1. Clone https://github.com/gabrielmicko/react-create-app-pwa. It is almost a clean app of react-create-app. 2. Install dependencies. `yarn install`. Create a build. `yarn run build`. 3. Run `serve -s build` (if you don't have serve `yarn global add serve`), or `node server.js`. 4. Open localhost:5000. You should see service worker precaching files. 5. Do some change in the `App.js` and run `yarn run build` again. 6. Refresh the page and check your console. You should see the new files. It will log an "Update happened" message. 7. Refresh the page to see the updates. 8. Can't see the changes I made. ### Expected Behavior <!-- How did you expect the tool to behave? It’s fine if you’re not sure your understanding is correct. Just write down what you thought would happen. --> After refreshing the page at point 7. I should see my changes. ### Actual Behavior I see the old version of my app. (Write what happened. Please add screenshots!) ### Reproducible Demo <!-- If you can, please share a project that reproduces the issue. This is the single most effective way to get an issue fixed soon. There are two ways to do it: * Create a new app and try to reproduce the issue in it. This is useful if you roughly know where the problem is, or can’t share the real code. * Or, copy your app and remove things until you’re left with the minimal reproducible demo. This is useful for finding the root cause. You may then optionally create a new project. This is a good guide to creating bug demos: https://stackoverflow.com/help/mcve Once you’re done, push the project to GitHub and paste the link to it below: --> https://www.youtube.com/watch?v=Hl5HbZ0TWoY <!-- What happens if you skip this step? We will try to help you, but in many cases it is impossible because crucial information is missing. In that case we'll tag an issue as having a low priority, and eventually close it if there is no clear direction. We still appreciate the report though, as eventually somebody else might create a reproducible example for it. Thanks for helping us help you! -->
tag: documentation,issue: question > PWA
high
Critical
367,279,271
rust
rustc --print file-names wrongly prints .rlib for --emit=metadata
For sccache to cache rustc builds it uses `rustc --print file-names` to figure out which files get emitted so it cache them for later. For `--emit metadata` builds it appears that `rustc` prints that it would emit a `.rlib` file which seems to be false, only `.rmeta` files get emitted. Trying to find out where this happens but so far no luck (it might actually be correct behavior and the fix should be in sccache). See https://github.com/mozilla/sccache/issues/301#issuecomment-427412157
A-driver,T-compiler,C-bug
low
Minor
367,290,881
rust
Using types like i1, u24, or other nonstandard integer sizes.
LLVM itself supports arbitrary bitlength integers, however Rust does not. This would be useful for some less common, but still fairly normal cases, like 24-bit integers for emulating CPUs like the MC68000 (Some models use 24-bit address busses instead of 32-bit), or for memory constrained systems where you need all the space you can get, and as such packed bitfields are the best for storing data.
T-lang,needs-rfc
low
Major
367,306,934
angular
preserveWhitespaces: false alters expressions in templates
Setting `preserveWhitespaces: false` has an unexpected side effect that whitespace in interpolated bindings is also affected. Ordinarily there is no harm in stripping whitespace inside expressions, but _string literals_ within those expressions are also affected. This means that `preserveWhitespaces` alters the semantics of a template beyond whether extra whitespace is rendered. Example: ```html {{' '.length}} ``` With `preserveWhitespaces: true` this outputs `4` as expected. With `preserveWhitespaces: false`, this outputs `1` as whitespace removal happens before the parsing of interpolations within the text nodes. See example here: https://stackblitz.com/edit/ng-preserve-whitespace-weird
type: bug/fix,freq1: low,area: compiler,state: confirmed,core: basic template syntax,core: binding & interpolation,design complexity: major,P3,compiler: parser
low
Major
367,326,278
TypeScript
Allow to add a call signature to the Mapped Type OR to remove all `Function.prototype` methods
## Search Terms add a call signature to the Mapped Type; remove all `Function.prototype` methods ## Suggestion Being able to create a callable type, but without Function.prototype methods. ## Use Cases Imagine one creates some API that exposes a function that is (because function is an object) also have some custom properties. This function is not supposed to be `call`-ed, `apply`-ed, `bind`-ed, etc, in fact all the `Function.prototype` methods are removed from it (e.g. with setPrototypeOf..null). However IDE will still suggest the `Function.prototype` methods. *Desired behavior:* ```ts let callableObject = () => 'foo' Object.setPrototypeOf(callableObject, null) callableObject.bar = 'baz' callableObject() // 'foo' callableObject // {bar: 'baz'} callableObject.call // <---------- error ``` *Current behavior:* ```ts let callableObject = () => 'foo' Object.setPrototypeOf(callableObject, null) callableObject.bar = 'baz' callableObject() // 'foo' callableObject // {bar: 'baz'} callableObject.call // <---------- OK ``` *What I tried:* ```ts type ExcludeFunctionPrototypeMethods<T extends () => any> = { [K in Exclude<keyof T, keyof Function>]: T[K] } // the type above "lacks a call signature" and I have no Idea how to add it there. ``` ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code * [x] This wouldn't change the runtime behavior of existing JavaScript code * [x] This could be implemented without emitting different JS based on the types of the expressions * [x] This isn't a runtime feature (e.g. new expression-level syntax)
Suggestion,Awaiting More Feedback
medium
Critical
367,346,952
node
https.request timeout options doesn't work
Node version 8.11.3. 64-bit Windows 8.1 As I understood from docs, `timeout `property in `https.request` options sets socket connection timeout. I set it to minimum - 1 millisecond and it should definitely trigger 'timeout' event. ``` const options = { host: 'yobit.net', path: '/api/3/depth/ltc_btc', timeout: 1 } const req = https.request(options, res => { }); req.on('timeout', () => { console.error('request timeout'); }) req.end(); ``` I expect 'reqest timeout' console message but it doen't appear. However, when I create my custom https Agent with overriden `createConnection `method that sets initial socket timeout to 1 millisecond there: ``` MyAgent.prototype.createConnection = function() { const socket = https.Agent.prototype.createConnection.apply(this, arguments); socket.setTimeout(1); return socket; } ``` and run the first code with agent parameter set to my custom agent, now it fires 'timeout' event.
help wanted,https
low
Critical
367,376,722
pytorch
AttributeError: Method VideoInput is not a registered operator
## 🐛 Bug I want to use models from [R2Plus1D](https://github.com/facebookresearch/R2Plus1D) for extracting action recognition features. However, when running their `extract_features.py` it will immediately throw the following error message: `AttributeError: Method VideoInput is not a registered operator. Did you mean: []` ## To Reproduce Steps to reproduce the behavior: 1. Install pytorch and caffe2 via `conda install pytorch-nightly torchvision -c pytorch`. 1. Download e.g. the C3D-16 pretrained model from [here](https://github.com/facebookresearch/R2Plus1D/blob/master/tutorials/models.md). 1. Follow the [R2Plus1D feature extraction tutorial](https://github.com/facebookresearch/R2Plus1D/blob/master/tutorials/feature_extraction.md). 1. The error will occur with the command related to `extract_features.py`. My command: ``` python extract_features.py --test_data=data/lmdb_data --model_name=c3d --model_depth=34 --clip_length_rgb=32 --gpus=1 --batch_size=4 --load_model_path=/c3d/c3d_l16.pkl --output_path=testvideo_features.pkl --features=conv1a,conv2a,fc6 --sanity_check=1 --get_video_id=1 --use_local_file=1 ``` Stack trace: ``` Traceback (most recent call last): File "lib/extract_features.py", line 333, in <module> main() File "lib/extract_features.py", line 328, in main ExtractFeatures(args) File "lib/extract_features.py", line 131, in ExtractFeatures devices=gpus, File "/anaconda2/lib/python2.7/site-packages/caffe2/python/data_parallel_model.py", line 34, in Parallelize_GPU Parallelize(*args, **kwargs) File "/anaconda2/lib/python2.7/site-packages/caffe2/python/data_parallel_model.py", line 219, in Parallelize input_builder_fun(model_helper_obj) File "lib/extract_features.py", line 106, in input_fn use_local_file=args.use_local_file, File "/models/c3d/R2Plus1D/lib/utils/model_helper.py", line 120, in AddVideoInput data, label, video_id = model.net.VideoInput( File "/anaconda2/lib/python2.7/site-packages/caffe2/python/core.py", line 2171, in __getattr__ ",".join(workspace.C.nearby_opnames(op_type)) + ']' AttributeError: Method VideoInput is not a registered operator. Did you mean: [] ``` ## Expected behavior Getting action recognition features from `extract_features.py` . ## Environment ``` PyTorch version: 1.0.0.dev20181004 Is debug build: No CUDA used to build PyTorch: 9.0.176 OS: Ubuntu 16.04.5 LTS GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 CMake version: version 3.12.2 Python version: 2.7 Is CUDA available: Yes CUDA runtime version: 9.1.85 GPU models and configuration: GPU 0: GeForce GTX 1080 Ti GPU 1: GeForce GTX 1080 Ti Nvidia driver version: 390.30 cuDNN version: Probably one of the following: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.1.1 Versions of relevant libraries: [pip] numpy (1.14.3) [pip] numpydoc (0.8.0) [pip] torch (1.0.0.dev20181004) [pip] torchvision (0.2.1) [conda] pytorch 0.4.1 py27__9.0.176_7.1.2_2 pytorch [conda] pytorch-nightly 1.0.0.dev20181004 py2.7_cuda9.0.176_cudnn7.1.2_0 pytorch [conda] torchvision 0.2.1 py27_1 pytorch ```
caffe2
low
Critical
367,380,459
go
cmd/compile: optimize field access after type assertion
### What version of Go are you using (`go version`)? go version go1.11.1 windows/amd64 ### Does this issue reproduce with the latest release? yes ### What did you do? ```go package performance type Large struct { padding1 [1024]string interesting string padding2 [1024]string } func ExtractInteresting(x interface{}) string { return x.(Large).interesting } ``` ### What did you expect to see? The generated code of `ExtractInteresting` only copies the interesting string, not the padding around it. ### What did you see instead? The generated code first initializes a variable of type `Large` on the stack (`repz stosq`). Then it copies the whole struct to the stack (`repz movsq`). Then it extracts the interesting field. A real-life example of this pattern can be found in the [pkglint](https://github.com/rillig/pkglint/blob/10000ff/mkline.go#L20) project, where an interface is used to emulate a union type. That interface is accessed in many of the accessor methods, such as [Varname](https://github.com/rillig/pkglint/blob/10000ff/mkline.go#L202). In that code I used a struct instead of a pointer to struct, since I wanted to avoid the extra dereference. I had expected that avoiding the pointer would result in faster code.
Performance,compiler/runtime
low
Major
367,388,529
TypeScript
Infer type arguments from 'super()' calls
```ts interface Component { whatever: number; } type ComponentConstructor = new <T = {}>(extra: T) => Component & T; declare const Component: ComponentConstructor; class ReallyOldComponent extends Component { constructor() { super({ name: "Methuselah", age: 969 }); } blah() { this.whatever; this.age; } } ``` Ideally this would produce no errors; in fact, ideally I wouldn't need to specify any type parameter defaults on `ComponentConstructor`'s signature. However, instead, `T` is inferred as `{}` and in `blah` it is an error to access `this.age`.
Suggestion,In Discussion
low
Critical