text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(unboxed_closures)]
use std::ops::Fn;
fn say(x: u32, y: u32) {
println!("{} {}", x, y);
}
fn main() {
Fn::call(&say, (1, 2));
}"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>unboxed_closures<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">use</span> std<span class="pl-kos">::</span>ops<span class="pl-kos">::</span><span class="pl-v">Fn</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">say</span><span class="pl-kos">(</span><span class="pl-s1">x</span><span class="pl-kos">:</span> <span class="pl-smi">u32</span><span class="pl-kos">,</span> <span class="pl-s1">y</span><span class="pl-kos">:</span> <span class="pl-smi">u32</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{} {}"</span>, x, y<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">Fn</span><span class="pl-kos">::</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-c1">&</span>say<span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)
binary: rustc
commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7
commit-date: 2015-01-08 17:03:40 -0800
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)
binary: rustc
commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7
commit-date: 2015-01-08 17:03:40 -0800
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=1 rustc main.rs
main.rs:7:5: 7:13 warning: use of unstable item: uncertain about variadic generics, input versus associated types, #[warn(unstable)] on by default
main.rs:7 Fn::call(&say, (1, 2));
^~~~~~~~
error: internal compiler error: static call to invalid vtable: VtableFnPointer(fn(u32, u32) {say})
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:182
stack backtrace:
1: 0x7f28a8488850 - sys::backtrace::write::h5b05e7b061a35107Czt
2: 0x7f28a84aaa60 - failure::on_fail::h1e9b7e3de59488d1aPz
3: 0x7f28a84185e0 - rt::unwind::begin_unwind_inner::h23dcfb4c37870bd62tz
4: 0x7f28a3230460 - rt::unwind::begin_unwind::h8180555736548804672
5: 0x7f28a3230d10 - diagnostic::Handler::bug::hfea99a1512d774b6tWF
6: 0x7f28a67880d0 - session::Session::bug::hda4aef05452f83daiRq
7: 0x7f28a748d1f0 - trans::meth::trans_static_method_callee::h7b45cabbb9a118b8sbz
8: 0x7f28a748a0d0 - trans::callee::trans::h36851c362b65c790yag
9: 0x7f28a74942f0 - trans::callee::trans_call_inner::h8685402877239769531
10: 0x7f28a7499d10 - trans::expr::trans_rvalue_dps_unadjusted::hadddfbae4195cb641Si
11: 0x7f28a74505f0 - trans::expr::trans_into::ha60adcbe08fa3bdbKyh
12: 0x7f28a744f9b0 - trans::controlflow::trans_stmt_semi::hce06ed398066bc74K2d
13: 0x7f28a7450c40 - trans::controlflow::trans_block::hdd6a1a94b7524b90B3d
14: 0x7f28a751cc70 - trans::base::trans_closure::h1947fd5123bfe895EYt
15: 0x7f28a743bb10 - trans::base::trans_fn::h5d061f11fc4ac1e7j9t
16: 0x7f28a74370a0 - trans::base::trans_item::h34ec82732f0498f3Ewu
17: 0x7f28a7524490 - trans::base::trans_crate::he5ffa45aaa619f67lsv
18: 0x7f28a89e63c0 - driver::phase_4_translate_to_llvm::h98aea3c7bb04643bPFa
19: 0x7f28a89c0350 - driver::compile_input::h04aea004c559b910xba
20: 0x7f28a8a8ffe0 - monitor::unboxed_closure.22497
21: 0x7f28a8a8fe40 - thunk::F.Invoke<A, R>::invoke::h11849311349984608396
22: 0x7f28a8a8ebc0 - rt::unwind::try::try_fn::h13617610205470131813
23: 0x7f28a85106c0 - rust_try_inner
24: 0x7f28a85106b0 - rust_try
25: 0x7f28a8a8eeb0 - thunk::F.Invoke<A, R>::invoke::h14452289732390470265
26: 0x7f28a8498910 - sys::thread::thread_start::h93b0d38960a9fcacqrw
27: 0x7f28a2a4e250 - start_thread
28: 0x7f28a80ce219 - clone
29: 0x0 - <unknown>"><pre class="notranslate"><code class="notranslate">$ RUST_BACKTRACE=1 rustc main.rs
main.rs:7:5: 7:13 warning: use of unstable item: uncertain about variadic generics, input versus associated types, #[warn(unstable)] on by default
main.rs:7 Fn::call(&say, (1, 2));
^~~~~~~~
error: internal compiler error: static call to invalid vtable: VtableFnPointer(fn(u32, u32) {say})
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:182
stack backtrace:
1: 0x7f28a8488850 - sys::backtrace::write::h5b05e7b061a35107Czt
2: 0x7f28a84aaa60 - failure::on_fail::h1e9b7e3de59488d1aPz
3: 0x7f28a84185e0 - rt::unwind::begin_unwind_inner::h23dcfb4c37870bd62tz
4: 0x7f28a3230460 - rt::unwind::begin_unwind::h8180555736548804672
5: 0x7f28a3230d10 - diagnostic::Handler::bug::hfea99a1512d774b6tWF
6: 0x7f28a67880d0 - session::Session::bug::hda4aef05452f83daiRq
7: 0x7f28a748d1f0 - trans::meth::trans_static_method_callee::h7b45cabbb9a118b8sbz
8: 0x7f28a748a0d0 - trans::callee::trans::h36851c362b65c790yag
9: 0x7f28a74942f0 - trans::callee::trans_call_inner::h8685402877239769531
10: 0x7f28a7499d10 - trans::expr::trans_rvalue_dps_unadjusted::hadddfbae4195cb641Si
11: 0x7f28a74505f0 - trans::expr::trans_into::ha60adcbe08fa3bdbKyh
12: 0x7f28a744f9b0 - trans::controlflow::trans_stmt_semi::hce06ed398066bc74K2d
13: 0x7f28a7450c40 - trans::controlflow::trans_block::hdd6a1a94b7524b90B3d
14: 0x7f28a751cc70 - trans::base::trans_closure::h1947fd5123bfe895EYt
15: 0x7f28a743bb10 - trans::base::trans_fn::h5d061f11fc4ac1e7j9t
16: 0x7f28a74370a0 - trans::base::trans_item::h34ec82732f0498f3Ewu
17: 0x7f28a7524490 - trans::base::trans_crate::he5ffa45aaa619f67lsv
18: 0x7f28a89e63c0 - driver::phase_4_translate_to_llvm::h98aea3c7bb04643bPFa
19: 0x7f28a89c0350 - driver::compile_input::h04aea004c559b910xba
20: 0x7f28a8a8ffe0 - monitor::unboxed_closure.22497
21: 0x7f28a8a8fe40 - thunk::F.Invoke<A, R>::invoke::h11849311349984608396
22: 0x7f28a8a8ebc0 - rt::unwind::try::try_fn::h13617610205470131813
23: 0x7f28a85106c0 - rust_try_inner
24: 0x7f28a85106b0 - rust_try
25: 0x7f28a8a8eeb0 - thunk::F.Invoke<A, R>::invoke::h14452289732390470265
26: 0x7f28a8498910 - sys::thread::thread_start::h93b0d38960a9fcacqrw
27: 0x7f28a2a4e250 - start_thread
28: 0x7f28a80ce219 - clone
29: 0x0 - <unknown>
</code></pre></div> | <p dir="auto">Discovered this ICE in the rollup that I'm preparing:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
let a: &fmt::Show = &1i;
format!("{:?}", a);
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> a<span class="pl-kos">:</span> <span class="pl-c1">&</span>fmt<span class="pl-kos">::</span><span class="pl-smi">Show</span> = <span class="pl-c1">&</span><span class="pl-c1">1</span>i<span class="pl-kos">;</span>
<span class="pl-en">format</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{:?}"</span>, a<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: static call to invalid vtable: VtableObject(VtableObject(object_ty=core::fmt::Show + 'static))
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/alex/code/rust2/src/libsyntax/diagnostic.rs:182"><pre class="notranslate"><code class="notranslate">error: internal compiler error: static call to invalid vtable: VtableObject(VtableObject(object_ty=core::fmt::Show + 'static))
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/alex/code/rust2/src/libsyntax/diagnostic.rs:182
</code></pre></div> | 1 |
<p dir="auto">Presently the facetgrid accept:</p>
<p dir="auto">row, col, hue : strings<br>
Variables that define subsets of the data, which will be drawn on separate facets in the grid.</p>
<p dir="auto">Suppose I want to use a variable that it is not a column of my dataset, but that it can be computed starting from that. What I need to do now is to add a new column to my dataset and then use the name of this new column as argument.</p>
<p dir="auto">Suppose I want to set the hue depending on the column 'column1' which is of type string, but I want to ignore the case. What about something like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="hue = lambda x: x['column1'].capitalize()"><pre class="notranslate"><code class="notranslate">hue = lambda x: x['column1'].capitalize()
</code></pre></div>
<p dir="auto">In addition it would be nice to add the possibility to use ranges. Suppose I want to set hue depending on column 'column2' which is of type float. Here I want to define categories depending on some binning as in pandas.Cut. As before I would like to avoid to add a column to my dataframe just to do a plot.</p> | <p dir="auto">When the category you are mapping out to use as the hue in facetgrid contains three items then they do not colour as they should, instead taking on a grayscale when plotted using pyplot scatter. See attached code and image.</p>
<p dir="auto">This issue was fixed for lmplot from Seaborn 0.6 to 0.7, but is still present in the facetgrid.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/17030467/12780601/ba9a3d00-ca66-11e5-9ad1-8e85b9addf11.png"><img src="https://cloud.githubusercontent.com/assets/17030467/12780601/ba9a3d00-ca66-11e5-9ad1-8e85b9addf11.png" alt="seaborn" style="max-width: 100%;"></a><br>
Points from category 'three' circled in red.</p>
<p dir="auto">python 2.7<br>
pandas version: 0.17.1<br>
numpy version: 1.10.1<br>
matplotlib version: 1.5.1<br>
seaborn version: 0.7.0</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.DataFrame(np.random.randint(0,100,size=(15, 4)), columns=list('ABCD'))
lst = ['one', 'two', 'two', 'three', 'three', 'three', 'four', 'four', 'four',
'four', 'five', 'five', 'five', 'five', 'five']
df["color"] = lst
print df
graph = sns.FacetGrid(data=df, hue='color')
graph.map(plt.scatter, 'A', 'B', s=300,
alpha=1, edgecolors='black', linewidths=1)
plt.legend(loc='center left', bbox_to_anchor=(1.01, 0.5))
plt.show()"><pre class="notranslate"><code class="notranslate">import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.DataFrame(np.random.randint(0,100,size=(15, 4)), columns=list('ABCD'))
lst = ['one', 'two', 'two', 'three', 'three', 'three', 'four', 'four', 'four',
'four', 'five', 'five', 'five', 'five', 'five']
df["color"] = lst
print df
graph = sns.FacetGrid(data=df, hue='color')
graph.map(plt.scatter, 'A', 'B', s=300,
alpha=1, edgecolors='black', linewidths=1)
plt.legend(loc='center left', bbox_to_anchor=(1.01, 0.5))
plt.show()
</code></pre></div> | 0 |
<p dir="auto">Need to be able to CRUD namespace resources.</p>
<p dir="auto">Do during or after the query-parameter -> namespace-in-path transition.</p>
<p dir="auto">A namespace object just contains the name of the namespace, and no other data that I can think of at this time.</p>
<p dir="auto">An object cannot be created in a namespace unless the namespace object already exists.</p>
<p dir="auto">Reasons:</p>
<ul dir="auto">
<li>prevent accidental creation of new namespaces as a side effect of object creation with mistyped namespace name.</li>
<li>limit which users can create new namespaces, as there may be some policy around who can get which names.</li>
<li>to ease validation/warning about authorization policy, admission control policy, etc, which references namespaces.</li>
<li>to ease listing/watching namespaces in peripheral system components.</li>
</ul> | <p dir="auto">We only use the StatusReason consts defined in pkg/api/types.go.<br>
Some of the constants are duplicated in api/types and api/v1beta{1,2,3}/types.go while some are not.</p>
<p dir="auto">Since StatusReason* constants defined in api/v1beta{1,2,3}/types.go are not used anywhere, can we just delete them?</p> | 0 |
<p dir="auto">draw a line between two coordinates inside map , how to show multiple markers with fit zoom levell in map</p> | <h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">Create a TabBarView with 3 RefreshIndicators children.<br>
Run the app and after changing tabs a few times (5 to 10 times) you get a " <code class="notranslate">Multiple widgets used the same GlobalKey</code>." error.</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@override
Widget build(BuildContext context) {
final GlobalKey<RefreshIndicatorState> _RIKey1 = new GlobalKey<RefreshIndicatorState>();
final GlobalKey<RefreshIndicatorState> _RIKey2 = new GlobalKey<RefreshIndicatorState>();
final GlobalKey<RefreshIndicatorState> _RIKey3 = new GlobalKey<RefreshIndicatorState>();
debugPrint(_RIKey1.toString());
debugPrint(_RIKey2.toString());
debugPrint(_RIKey3.toString());
return new Scaffold(
body: new DefaultTabController(
length: 3,
child: new Scaffold(
appBar: new AppBar(
bottom: new TabBar(
tabs: [
new Tab(icon: new Icon(Icons.view_list)),
new Tab(icon: new Icon(Icons.hotel)),
new Tab(icon: new Icon(Icons.assessment)),
],
),
title: new Text('Data'),
),
body: new TabBarView(
children: [
new RefreshIndicator(
key: _RIKey1,
onRefresh: _actualizoData,
child: new ListView.builder(
padding: new EdgeInsets.only(top: 5.0),
itemCount: linea_reservas.length * 2,
itemBuilder: (BuildContext context, int position) {
if (position.isOdd) return new Divider();
final index = position ~/ 2;
return _buildRow(index);
}),
),
new RefreshIndicator(
key: _RIKey2,
onRefresh: _actualizoData,
child: new ListView.builder(
padding: new EdgeInsets.only(top: 8.0),
itemCount: linea_inouthouse.length * 2,
itemBuilder: (BuildContext context, int position) {
if (position.isOdd) return new Divider();
final index = position ~/ 2;
return _buildRowInOutHouse(index);
}),
),
new RefreshIndicator(
key: _RIKey3,
onRefresh: _actualizoData,
child: new ListView.builder(
padding: new EdgeInsets.only(top: 5.0),
itemCount: linea_ocupacion.length * 2,
itemBuilder: (BuildContext context, int position) {
if (position.isOdd) return new Divider();
final index = position ~/ 2;
return _buildRowOcupacion(index);
}),
),
],
),
),
),
);
}"><pre class="notranslate"><span class="pl-k">@override</span>
<span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
<span class="pl-k">final</span> <span class="pl-c1">GlobalKey</span><<span class="pl-c1">RefreshIndicatorState</span>> <span class="pl-c1">_RIKey1</span> <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">GlobalKey</span><<span class="pl-c1">RefreshIndicatorState</span>>();
<span class="pl-k">final</span> <span class="pl-c1">GlobalKey</span><<span class="pl-c1">RefreshIndicatorState</span>> <span class="pl-c1">_RIKey2</span> <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">GlobalKey</span><<span class="pl-c1">RefreshIndicatorState</span>>();
<span class="pl-k">final</span> <span class="pl-c1">GlobalKey</span><<span class="pl-c1">RefreshIndicatorState</span>> <span class="pl-c1">_RIKey3</span> <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">GlobalKey</span><<span class="pl-c1">RefreshIndicatorState</span>>();
<span class="pl-en">debugPrint</span>(<span class="pl-c1">_RIKey1</span>.<span class="pl-en">toString</span>());
<span class="pl-en">debugPrint</span>(<span class="pl-c1">_RIKey2</span>.<span class="pl-en">toString</span>());
<span class="pl-en">debugPrint</span>(<span class="pl-c1">_RIKey3</span>.<span class="pl-en">toString</span>());
<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>(
body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">DefaultTabController</span>(
length<span class="pl-k">:</span> <span class="pl-c1">3</span>,
child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>(
appBar<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">AppBar</span>(
bottom<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TabBar</span>(
tabs<span class="pl-k">:</span> [
<span class="pl-k">new</span> <span class="pl-c1">Tab</span>(icon<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Icon</span>(<span class="pl-c1">Icons</span>.view_list)),
<span class="pl-k">new</span> <span class="pl-c1">Tab</span>(icon<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Icon</span>(<span class="pl-c1">Icons</span>.hotel)),
<span class="pl-k">new</span> <span class="pl-c1">Tab</span>(icon<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Icon</span>(<span class="pl-c1">Icons</span>.assessment)),
],
),
title<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Data'</span>),
),
body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TabBarView</span>(
children<span class="pl-k">:</span> [
<span class="pl-k">new</span> <span class="pl-c1">RefreshIndicator</span>(
key<span class="pl-k">:</span> <span class="pl-c1">_RIKey1</span>,
onRefresh<span class="pl-k">:</span> _actualizoData,
child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">ListView</span>.<span class="pl-en">builder</span>(
padding<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">only</span>(top<span class="pl-k">:</span> <span class="pl-c1">5.0</span>),
itemCount<span class="pl-k">:</span> linea_reservas.length <span class="pl-k">*</span> <span class="pl-c1">2</span>,
itemBuilder<span class="pl-k">:</span> (<span class="pl-c1">BuildContext</span> context, <span class="pl-c1">int</span> position) {
<span class="pl-k">if</span> (position.isOdd) <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Divider</span>();
<span class="pl-k">final</span> index <span class="pl-k">=</span> position <span class="pl-k">~</span><span class="pl-k">/</span> <span class="pl-c1">2</span>;
<span class="pl-k">return</span> <span class="pl-en">_buildRow</span>(index);
}),
),
<span class="pl-k">new</span> <span class="pl-c1">RefreshIndicator</span>(
key<span class="pl-k">:</span> <span class="pl-c1">_RIKey2</span>,
onRefresh<span class="pl-k">:</span> _actualizoData,
child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">ListView</span>.<span class="pl-en">builder</span>(
padding<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">only</span>(top<span class="pl-k">:</span> <span class="pl-c1">8.0</span>),
itemCount<span class="pl-k">:</span> linea_inouthouse.length <span class="pl-k">*</span> <span class="pl-c1">2</span>,
itemBuilder<span class="pl-k">:</span> (<span class="pl-c1">BuildContext</span> context, <span class="pl-c1">int</span> position) {
<span class="pl-k">if</span> (position.isOdd) <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Divider</span>();
<span class="pl-k">final</span> index <span class="pl-k">=</span> position <span class="pl-k">~</span><span class="pl-k">/</span> <span class="pl-c1">2</span>;
<span class="pl-k">return</span> <span class="pl-en">_buildRowInOutHouse</span>(index);
}),
),
<span class="pl-k">new</span> <span class="pl-c1">RefreshIndicator</span>(
key<span class="pl-k">:</span> <span class="pl-c1">_RIKey3</span>,
onRefresh<span class="pl-k">:</span> _actualizoData,
child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">ListView</span>.<span class="pl-en">builder</span>(
padding<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">only</span>(top<span class="pl-k">:</span> <span class="pl-c1">5.0</span>),
itemCount<span class="pl-k">:</span> linea_ocupacion.length <span class="pl-k">*</span> <span class="pl-c1">2</span>,
itemBuilder<span class="pl-k">:</span> (<span class="pl-c1">BuildContext</span> context, <span class="pl-c1">int</span> position) {
<span class="pl-k">if</span> (position.isOdd) <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Divider</span>();
<span class="pl-k">final</span> index <span class="pl-k">=</span> position <span class="pl-k">~</span><span class="pl-k">/</span> <span class="pl-c1">2</span>;
<span class="pl-k">return</span> <span class="pl-en">_buildRowOcupacion</span>(index);
}),
),
],
),
),
),
);
}</pre></div>
<p dir="auto">Please tell us what you were doing and what went wrong. If you are running flutter tools from the command line, please try adding the <code class="notranslate">-v</code> or <code class="notranslate">--verbose</code> option to gather more information.</p>
<p dir="auto">If the problem is with your application's rendering, please attach a screenshot and any relevant source code.<br>
If you are getting an exception in the logs, and your code is implicated in the first few frames, then please include the source code for the functions involved.</p>
<h2 dir="auto">Logs</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#d6dbe]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#91b52]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#e4401]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#de378]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#2accf]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#a5168]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#0c05e]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#75aa5]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#a8dd6]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#11fdf]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#6fda6]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#f486c]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#09ebf]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#5ea61]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#914b7]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#e2168]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#a636b]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#9b57f]
I/flutter ( 3245): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 3245): The following assertion was thrown building NotificationListener<KeepAliveNotification>:
I/flutter ( 3245): Multiple widgets used the same GlobalKey.
I/flutter ( 3245): The key [LabeledGlobalKey<RefreshIndicatorState>#9b57f] was used by multiple widgets. The parents of
I/flutter ( 3245): those widgets were:
I/flutter ( 3245): - RepaintBoundary-[<[LabeledGlobalKey<RefreshIndicatorState>#9b57f]>](renderObject:
I/flutter ( 3245): RenderRepaintBoundary#38cd2 DETACHED)
I/flutter ( 3245): - RepaintBoundary-[<[LabeledGlobalKey<RefreshIndicatorState>#9b57f]>](renderObject:
I/flutter ( 3245): RenderRepaintBoundary#44883 NEEDS-LAYOUT NEEDS-PAINT)
I/flutter ( 3245): A GlobalKey can only be specified on one widget at a time in the widget tree.
I/flutter ( 3245): When the exception was thrown, this was the stack:
I/flutter ( 3245): #0 GlobalKey._debugReserveFor.<anonymous closure> (package:flutter/src/widgets/framework.dart:164:11)
I/flutter ( 3245): #1 GlobalKey._debugReserveFor (package:flutter/src/widgets/framework.dart:182:6)
I/flutter ( 3245): #2 Element.updateChild.<anonymous closure> (package:flutter/src/widgets/framework.dart:2664:13)
I/flutter ( 3245): #3 Element.updateChild (package:flutter/src/widgets/framework.dart:2667:6)
I/flutter ( 3245): #4 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4637:14)
I/flutter ( 3245): #5 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter ( 3245): #6 Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter ( 3245): #7 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3636:16)
I/flutter ( 3245): #8 Element.rebuild (package:flutter/src/widgets/framework.dart:3478:5)
I/flutter ( 3245): #9 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3605:5)
I/flutter ( 3245): #10 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3600:5)
I/flutter ( 3245): #11 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter ( 3245): #12 Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter ( 3245): #13 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3636:16)
I/flutter ( 3245): #14 Element.rebuild (package:flutter/src/widgets/framework.dart:3478:5)
I/flutter ( 3245): #15 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3605:5)
I/flutter ( 3245): #16 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3600:5)
I/flutter ( 3245): #17 ParentDataElement.mount (package:flutter/src/widgets/framework.dart:3938:11)
I/flutter ( 3245): #18 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter ( 3245): #19 Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter ( 3245): #20 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3636:16)
I/flutter ( 3245): #21 Element.rebuild (package:flutter/src/widgets/framework.dart:3478:5)
I/flutter ( 3245): #22 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3605:5)
I/flutter ( 3245): #23 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3752:11)
I/flutter ( 3245): #24 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3600:5)
I/flutter ( 3245): #25 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter ( 3245): #26 Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter ( 3245): #27 SliverMultiBoxAdaptorElement.createChild.<anonymous closure> (package:flutter/src/widgets/sliver.dart:729:20)
I/flutter ( 3245): #28 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2205:19)
I/flutter ( 3245): #29 SliverMultiBoxAdaptorElement.createChild (package:flutter/src/widgets/sliver.dart:722:11)
I/flutter ( 3245): #30 RenderSliverMultiBoxAdaptor._createOrObtainChild.<anonymous closure> (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:254:23)
I/flutter ( 3245): #31 RenderObject.invokeLayoutCallback.<anonymous closure> (package:flutter/src/rendering/object.dart:1666:58)
I/flutter ( 3245): #32 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:740:15)
I/flutter ( 3245): #33 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1666:13)
I/flutter ( 3245): #34 RenderSliverMultiBoxAdaptor._createOrObtainChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:243:5)
I/flutter ( 3245): #35 RenderSliverMultiBoxAdaptor.addInitialChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:351:5)
I/flutter ( 3245): #36 RenderSliverFixedExtentBoxAdaptor.performLayout (package:flutter/src/rendering/sliver_fixed_extent_list.dart:169:12)
I/flutter ( 3245): #37 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
I/flutter ( 3245): #38 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:285:13)
I/flutter ( 3245): #39 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1008:12)
I/flutter ( 3245): #40 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:932:20)
I/flutter ( 3245): #41 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1445:7)
I/flutter ( 3245): #42 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:709:18)
I/flutter ( 3245): #43 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:270:19)
I/flutter ( 3245): #44 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:622:13)
I/flutter ( 3245): #45 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
I/flutter ( 3245): #46 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter ( 3245): #47 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter ( 3245): #48 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
I/flutter ( 3245): #49 _invoke (dart:ui/hooks.dart:120:13)
I/flutter ( 3245): #50 _drawFrame (dart:ui/hooks.dart:109:3)
I/flutter ( 3245): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2209 pos 20: '_debugCurrentBuildTarget == context': is not true.
I/flutter ( 3245): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#44883 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2209 pos 20: '_debugCurrentBuildTarget == context': is not true.
I/flutter ( 3245): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#b2936 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 579 pos 16: 'indexOf(child) == index': is not true.
I/flutter ( 3245): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#44883 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 579 pos 16: 'indexOf(child) == index': is not true.
I/flutter ( 3245): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#44883 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: The _ScaffoldLayout custom multichild layout delegate forgot to lay out the following children:
## flutter analyze
Analyzing C:\...
error - The constructor returns type 'dynamic' that isn't of expected type 'Widget' at test\widget_test.dart:14:29 - strong_mode_invalid_cast_new_expr
error - Undefined class 'MyApp' at test\widget_test.dart:14:33 - undefined_class
warning - This function declares a return type of 'Future<String>', but doesn't end with a return statement at lib\tabs.dart:34:3 - missing_return
warning - This function declares a return type of 'Future<String>', but doesn't end with a return statement at lib\tabs.dart:72:3 - missing_return
warning - This function declares a return type of 'Future<String>', but doesn't end with a return statement at lib\tabs.dart:112:3 - missing_return
warning - This function declares a return type of 'Future<Null>', but doesn't end with a return statement at lib\tabs.dart:161:3 - missing_return
lint - Name types using UpperCamelCase at lib\Linea_inouthouse.dart:2:7 - camel_case_types
lint - Name types using UpperCamelCase at lib\Linea_ocupacion.dart:1:7 - camel_case_types
lint - Name types using UpperCamelCase at lib\Linea_ultimasreservas.dart:1:7 - camel_case_types
lint - Name non-constant identifiers using lowerCamelCase at lib\login_page.dart:44:18 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:25:7 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:26:7 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:27:7 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:51:13 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:52:13 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:91:13 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:92:13 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:198:9 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:242:44 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:243:44 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:244:44 - non_constant_identifier_names
hint - Unused import: 'package:smarthotelier/reserva.dart' at lib\login_page.dart:7:8 - unused_import
hint - Unused import: 'package:smarthotelier/config.dart' at lib\main.dart:3:8 - unused_import
hint - This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib\tabs.dart:157:8 - must_call_super
24 issues found.
(Ran in 15.7s)"><pre class="notranslate"><code class="notranslate">I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#d6dbe]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#91b52]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#e4401]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#de378]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#2accf]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#a5168]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#0c05e]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#75aa5]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#a8dd6]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#11fdf]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#6fda6]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#f486c]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#09ebf]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#5ea61]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#914b7]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#e2168]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#a636b]
I/flutter ( 3245): [LabeledGlobalKey<RefreshIndicatorState>#9b57f]
I/flutter ( 3245): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 3245): The following assertion was thrown building NotificationListener<KeepAliveNotification>:
I/flutter ( 3245): Multiple widgets used the same GlobalKey.
I/flutter ( 3245): The key [LabeledGlobalKey<RefreshIndicatorState>#9b57f] was used by multiple widgets. The parents of
I/flutter ( 3245): those widgets were:
I/flutter ( 3245): - RepaintBoundary-[<[LabeledGlobalKey<RefreshIndicatorState>#9b57f]>](renderObject:
I/flutter ( 3245): RenderRepaintBoundary#38cd2 DETACHED)
I/flutter ( 3245): - RepaintBoundary-[<[LabeledGlobalKey<RefreshIndicatorState>#9b57f]>](renderObject:
I/flutter ( 3245): RenderRepaintBoundary#44883 NEEDS-LAYOUT NEEDS-PAINT)
I/flutter ( 3245): A GlobalKey can only be specified on one widget at a time in the widget tree.
I/flutter ( 3245): When the exception was thrown, this was the stack:
I/flutter ( 3245): #0 GlobalKey._debugReserveFor.<anonymous closure> (package:flutter/src/widgets/framework.dart:164:11)
I/flutter ( 3245): #1 GlobalKey._debugReserveFor (package:flutter/src/widgets/framework.dart:182:6)
I/flutter ( 3245): #2 Element.updateChild.<anonymous closure> (package:flutter/src/widgets/framework.dart:2664:13)
I/flutter ( 3245): #3 Element.updateChild (package:flutter/src/widgets/framework.dart:2667:6)
I/flutter ( 3245): #4 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4637:14)
I/flutter ( 3245): #5 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter ( 3245): #6 Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter ( 3245): #7 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3636:16)
I/flutter ( 3245): #8 Element.rebuild (package:flutter/src/widgets/framework.dart:3478:5)
I/flutter ( 3245): #9 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3605:5)
I/flutter ( 3245): #10 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3600:5)
I/flutter ( 3245): #11 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter ( 3245): #12 Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter ( 3245): #13 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3636:16)
I/flutter ( 3245): #14 Element.rebuild (package:flutter/src/widgets/framework.dart:3478:5)
I/flutter ( 3245): #15 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3605:5)
I/flutter ( 3245): #16 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3600:5)
I/flutter ( 3245): #17 ParentDataElement.mount (package:flutter/src/widgets/framework.dart:3938:11)
I/flutter ( 3245): #18 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter ( 3245): #19 Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter ( 3245): #20 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3636:16)
I/flutter ( 3245): #21 Element.rebuild (package:flutter/src/widgets/framework.dart:3478:5)
I/flutter ( 3245): #22 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3605:5)
I/flutter ( 3245): #23 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3752:11)
I/flutter ( 3245): #24 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3600:5)
I/flutter ( 3245): #25 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter ( 3245): #26 Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter ( 3245): #27 SliverMultiBoxAdaptorElement.createChild.<anonymous closure> (package:flutter/src/widgets/sliver.dart:729:20)
I/flutter ( 3245): #28 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2205:19)
I/flutter ( 3245): #29 SliverMultiBoxAdaptorElement.createChild (package:flutter/src/widgets/sliver.dart:722:11)
I/flutter ( 3245): #30 RenderSliverMultiBoxAdaptor._createOrObtainChild.<anonymous closure> (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:254:23)
I/flutter ( 3245): #31 RenderObject.invokeLayoutCallback.<anonymous closure> (package:flutter/src/rendering/object.dart:1666:58)
I/flutter ( 3245): #32 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:740:15)
I/flutter ( 3245): #33 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1666:13)
I/flutter ( 3245): #34 RenderSliverMultiBoxAdaptor._createOrObtainChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:243:5)
I/flutter ( 3245): #35 RenderSliverMultiBoxAdaptor.addInitialChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:351:5)
I/flutter ( 3245): #36 RenderSliverFixedExtentBoxAdaptor.performLayout (package:flutter/src/rendering/sliver_fixed_extent_list.dart:169:12)
I/flutter ( 3245): #37 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
I/flutter ( 3245): #38 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:285:13)
I/flutter ( 3245): #39 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1008:12)
I/flutter ( 3245): #40 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:932:20)
I/flutter ( 3245): #41 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1445:7)
I/flutter ( 3245): #42 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:709:18)
I/flutter ( 3245): #43 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:270:19)
I/flutter ( 3245): #44 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:622:13)
I/flutter ( 3245): #45 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
I/flutter ( 3245): #46 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter ( 3245): #47 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter ( 3245): #48 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
I/flutter ( 3245): #49 _invoke (dart:ui/hooks.dart:120:13)
I/flutter ( 3245): #50 _drawFrame (dart:ui/hooks.dart:109:3)
I/flutter ( 3245): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2209 pos 20: '_debugCurrentBuildTarget == context': is not true.
I/flutter ( 3245): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#44883 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2209 pos 20: '_debugCurrentBuildTarget == context': is not true.
I/flutter ( 3245): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#b2936 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 579 pos 16: 'indexOf(child) == index': is not true.
I/flutter ( 3245): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#44883 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 579 pos 16: 'indexOf(child) == index': is not true.
I/flutter ( 3245): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#44883 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 215 pos 16: 'indexOf(child) > index': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3480 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
I/flutter ( 3245): Another exception was thrown: The _ScaffoldLayout custom multichild layout delegate forgot to lay out the following children:
## flutter analyze
Analyzing C:\...
error - The constructor returns type 'dynamic' that isn't of expected type 'Widget' at test\widget_test.dart:14:29 - strong_mode_invalid_cast_new_expr
error - Undefined class 'MyApp' at test\widget_test.dart:14:33 - undefined_class
warning - This function declares a return type of 'Future<String>', but doesn't end with a return statement at lib\tabs.dart:34:3 - missing_return
warning - This function declares a return type of 'Future<String>', but doesn't end with a return statement at lib\tabs.dart:72:3 - missing_return
warning - This function declares a return type of 'Future<String>', but doesn't end with a return statement at lib\tabs.dart:112:3 - missing_return
warning - This function declares a return type of 'Future<Null>', but doesn't end with a return statement at lib\tabs.dart:161:3 - missing_return
lint - Name types using UpperCamelCase at lib\Linea_inouthouse.dart:2:7 - camel_case_types
lint - Name types using UpperCamelCase at lib\Linea_ocupacion.dart:1:7 - camel_case_types
lint - Name types using UpperCamelCase at lib\Linea_ultimasreservas.dart:1:7 - camel_case_types
lint - Name non-constant identifiers using lowerCamelCase at lib\login_page.dart:44:18 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:25:7 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:26:7 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:27:7 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:51:13 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:52:13 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:91:13 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:92:13 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:198:9 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:242:44 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:243:44 - non_constant_identifier_names
lint - Name non-constant identifiers using lowerCamelCase at lib\tabs.dart:244:44 - non_constant_identifier_names
hint - Unused import: 'package:smarthotelier/reserva.dart' at lib\login_page.dart:7:8 - unused_import
hint - Unused import: 'package:smarthotelier/config.dart' at lib\main.dart:3:8 - unused_import
hint - This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib\tabs.dart:157:8 - must_call_super
24 issues found.
(Ran in 15.7s)
</code></pre></div>
<h2 dir="auto">Flutter Doctor</h2>
<p dir="auto">[√] Flutter (Channel beta, v0.2.8, on Microsoft Windows [Versión 10.0.16299.371], locale es-MX)<br>
• Flutter version 0.2.8 at C:\Users\Alejandro\Flutter<br>
• Framework revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/flutter/flutter/commit/b397406561f5e7a9c94e28f58d9e49fca0dd58b7/hovercard" href="https://github.com/flutter/flutter/commit/b397406561f5e7a9c94e28f58d9e49fca0dd58b7"><tt>b397406</tt></a> (2 weeks ago), 2018-04-02 13:53:20 -0700<br>
• Engine revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/flutter/flutter/commit/c903c217a1a8206cdebdab1703b52ec6180edf37/hovercard" href="https://github.com/flutter/flutter/commit/c903c217a1a8206cdebdab1703b52ec6180edf37"><tt>c903c21</tt></a><br>
• Dart version 2.0.0-dev.43.0.flutter-52afcba357</p>
<p dir="auto">[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)<br>
• Android SDK at C:\Android\android-sdk<br>
• Android NDK location not configured (optional; useful for native profiling support)<br>
• Platform android-27, build-tools 27.0.3<br>
• ANDROID_HOME = C:\Android\android-sdk<br>
• Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java<br>
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)<br>
• All Android licenses accepted.</p>
<p dir="auto">[√] Android Studio (version 2.3)<br>
• Android Studio at C:\Program Files\Android\Android Studio<br>
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)</p>
<p dir="auto">[√] Android Studio (version 3.1)<br>
• Android Studio at C:\Program Files\Android\Android Studio1<br>
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)</p>
<p dir="auto">[√] VS Code, 64-bit edition (version 1.21.1)<br>
• VS Code at C:\Program Files\Microsoft VS Code<br>
• Dart Code extension version 2.11.1</p>
<p dir="auto">[√] Connected devices (1 available)<br>
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 6.0 (API 23) (emulator)</p>
<p dir="auto">• No issues found!</p>
<blockquote>
<p dir="auto">For more information about diagnosing and reporting Flutter bugs, please see <a href="https://flutter.io/bug-reports/" rel="nofollow">https://flutter.io/bug-reports/</a>.</p>
</blockquote> | 0 |
<h3 dir="auto">Version</h3>
<p dir="auto">2.6.10</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codepen.io/anon/pen/pXjBQq" rel="nofollow">https://codepen.io/anon/pen/pXjBQq</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li>
<p dir="auto">Trigger the mousemove event in the result iframe of Codepen. The text "false" is changed to "true"</p>
</li>
<li>
<p dir="auto">Compare the two <code class="notranslate"><progress></code> elements. One is indeterminate and the other is not</p>
</li>
</ol>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">Both <code class="notranslate"><progress></code> elements should be in an indeterminate state, i.e. not having a value attribute set.</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">There are two <code class="notranslate"><progress></code> elements here.</p>
<ol dir="auto">
<li>
<p dir="auto">The first has <code class="notranslate">:value="progress"</code> and progress === undefined (verified by the text "true")</p>
</li>
<li>
<p dir="auto">The second has <code class="notranslate">:value="undefined"</code></p>
</li>
</ol>
<p dir="auto">Even if both these effectively are identical (set <code class="notranslate">value</code> to undefined), they are rendered differently. The first is not indeterminate and the second is.</p>
<hr>
<p dir="auto">Note that this does not happen if the progress variable is set initially to undefined. It must be changed e.g. via the event callback.</p>
<p dir="auto">This worked as expected in 2.4.2 but not in 2.4.3 and later.</p> | <h3 dir="auto">Version</h3>
<p dir="auto">2.5.17</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codesandbox.io/s/986x7y34v4?expanddevtools=1" rel="nofollow">https://codesandbox.io/s/986x7y34v4?expanddevtools=1</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">First of all, this is the first Issue I've created on this project. So I'll take this opportunity to thank all of the contributors and maintainers for the awesome and astonishing work they do for Vue. THANKS!</p>
<p dir="auto">Having a functional component and trying to use it inside a v-for produces a <code class="notranslate">Duplicate keys detected</code> error, even if using :key="". It's fixable by just converting the component to a non-functional one.</p>
<p dir="auto">According to my understanding of functional components and the way :key="" works, even functional components (without a state) should be :key-able, as that isn't related to the state of the component itself.</p>
<p dir="auto">According to Chris Fritz (<a href="https://twitter.com/ivansieder/status/1030374407515058177" rel="nofollow">https://twitter.com/ivansieder/status/1030374407515058177</a>) the issue is also present in earlier versions.</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">The v-for renders the component without any error.</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">The v-for renders the component with a <code class="notranslate">Duplicate keys detected</code> error.</p> | 0 |
<p dir="auto">Sorry if this is a repeat/duplicate/similar, there are tons of issues when using <code class="notranslate">limit</code> as the search term.</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">limit</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook 2.4.0.0
config file =
configured module search path = [u'/Users/lynchg/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Users/lynchg/.virtualenvs/a2x/lib/python2.7/site-packages/ansible
executable location = /Users/lynchg/.virtualenvs/a2x/bin/ansible-playbook
python version = 2.7.13 (default, Dec 18 2016, 07:03:34) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]"><pre class="notranslate"><code class="notranslate">ansible-playbook 2.4.0.0
config file =
configured module search path = [u'/Users/lynchg/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Users/lynchg/.virtualenvs/a2x/lib/python2.7/site-packages/ansible
executable location = /Users/lynchg/.virtualenvs/a2x/bin/ansible-playbook
python version = 2.7.13 (default, Dec 18 2016, 07:03:34) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">NA</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">NA</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">While it is possible to do <code class="notranslate">delegate_facts</code> with <code class="notranslate">with_items</code> to handle <code class="notranslate">--limit</code> being used, this has a very high performance impact, because it is single forked. So ideal option would be to add a play key, and exposed variable that can be used - so then limit would work similar to batch/serial.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">NA</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">It should be possible to do e.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook webservers.yml -l 'foo.example.com'"><pre class="notranslate"><code class="notranslate">ansible-playbook webservers.yml -l 'foo.example.com'
</code></pre></div>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- hosts: dbservers
limit: []
gather_facts: True
- hosts: webservers
limit: "{{ ansible_play_limit|default([]) }}"
tasks:
..."><pre class="notranslate">- <span class="pl-ent">hosts</span>: <span class="pl-s">dbservers</span>
<span class="pl-ent">limit</span>: <span class="pl-s">[]</span>
<span class="pl-ent">gather_facts</span>: <span class="pl-c1">True</span>
- <span class="pl-ent">hosts</span>: <span class="pl-s">webservers</span>
<span class="pl-ent">limit</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ ansible_play_limit|default([]) }}<span class="pl-pds">"</span></span>
<span class="pl-ent">tasks</span>:
<span class="pl-s">...</span></pre></div>
<p dir="auto">This would also align with the recent changes to expose <code class="notranslate">ansible_play_hosts</code> and <code class="notranslate">ansible_play_batch</code></p>
<p dir="auto">The logic I see working would be something similar to the pattern <code class="notranslate">webservers:&limit</code>, i.e. only hosts that are in the play group <em>and</em> are in the limit.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">It's currently necessary to completely ignore the <code class="notranslate">--limit</code> functionality and use a workaround of targets, e.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook webservers.yml -e 'target=foo.example.com'"><pre class="notranslate"><code class="notranslate">ansible-playbook webservers.yml -e 'target=foo.example.com'
</code></pre></div>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- hosts: dbservers
gather_facts: True
- hosts: "{{ target|default('webservers') }}"
tasks:
..."><pre class="notranslate">- <span class="pl-ent">hosts</span>: <span class="pl-s">dbservers</span>
<span class="pl-ent">gather_facts</span>: <span class="pl-c1">True</span>
- <span class="pl-ent">hosts</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ target|default('webservers') }}<span class="pl-pds">"</span></span>
<span class="pl-ent">tasks</span>:
<span class="pl-s">...</span></pre></div>
<p dir="auto">While this is nearly as easy, it can be confusing to people new to ansible, but ultimately it also makes <code class="notranslate">--limit</code> basically useless.</p> | <h5 dir="auto">Issue Type:</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">Ansible Version:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.0.1.0
config file = /home/etienne/repo/ansible.cfg
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.0.1.0
config file = /home/etienne/repo/ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">Ansible Configuration:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat /home/etienne/repo/ansible.cfg
[defaults]
hostfile = /home/etienne/repo/config/inventory
display_skipped_hosts = False
nocows=1
vault_password_file = ./config/toto
[ssh_connection]
ssh_args = -F ./config/ssh_config -o ControlMaster=auto -o ControlPersist=60s"><pre class="notranslate"><code class="notranslate">$ cat /home/etienne/repo/ansible.cfg
[defaults]
hostfile = /home/etienne/repo/config/inventory
display_skipped_hosts = False
nocows=1
vault_password_file = ./config/toto
[ssh_connection]
ssh_args = -F ./config/ssh_config -o ControlMaster=auto -o ControlPersist=60s
</code></pre></div>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Running from an up-to-date Archlinux</p>
<p dir="auto">Managing a grape of LXC containers running Debian Wheezy inside Debian Wheezy hosts.</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Until ansible 2.0, I used to maintain a "global" handlers file, which contains very generic handlers like apache restart, monit restart etc. used in several of my roles. This file is not stored in any role, but "included" in my various playbooks. It used to work.</p>
<p dir="auto">Since ansible 2.0, handlers are silently ignored. I think it is somehow related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="121571960" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/13507" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/13507/hovercard" href="https://github.com/ansible/ansible/issues/13507">#13507</a></p>
<h5 dir="auto">Steps To Reproduce:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cd repo
$ cat roles/backjob/tasks/main.yml
---
- template: src=delayed_jobs_monit.j2
dest=/etc/monit/monitrc.d/delayed_jobs_toto
notify:
- Restart monit
tags:
- backjob
- monit
$ cat vendor_specific.yml
---
- hosts: sd-83787-dintec
roles:
- backjob
handlers:
- include: config/handlers.yml
$ cat config/handlers.yml
---
- name: Restart monit
service: name=monit state=restarted
$ ansible-playbook vendor_specific.yml"><pre class="notranslate"><code class="notranslate">$ cd repo
$ cat roles/backjob/tasks/main.yml
---
- template: src=delayed_jobs_monit.j2
dest=/etc/monit/monitrc.d/delayed_jobs_toto
notify:
- Restart monit
tags:
- backjob
- monit
$ cat vendor_specific.yml
---
- hosts: sd-83787-dintec
roles:
- backjob
handlers:
- include: config/handlers.yml
$ cat config/handlers.yml
---
- name: Restart monit
service: name=monit state=restarted
$ ansible-playbook vendor_specific.yml
</code></pre></div>
<p dir="auto">There is nothing special in the <code class="notranslate">host_vars/sd-83787-dintec.yml</code> file.</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">When the template module execution push a new version of the file, the handler <code class="notranslate">Restart monit</code> must be executed.</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">The playbook is successfully ran, but handler is silently ignored: nothing related to handler is output, even with -vvvv</p>
<p dir="auto">However, if I directly add the handler in the playbook:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat vendor_specific.yml
---
- hosts: sd-83787-dintec
roles:
- backjob
handlers:
- name: Restart monit
service: name=monit state=restarted
#- include: config/handlers.yml"><pre class="notranslate"><code class="notranslate">$ cat vendor_specific.yml
---
- hosts: sd-83787-dintec
roles:
- backjob
handlers:
- name: Restart monit
service: name=monit state=restarted
#- include: config/handlers.yml
</code></pre></div>
<p dir="auto">handler is ran as expected.</p> | 0 |
<p dir="auto">We can now run tests under helgrind. For bonus fun we should be able to run under thread sanitizer (a google-backed valgrind plugin) which does similar-but-different things.</p> | <p dir="auto">Currently, the following fails to compile:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct Foo<T>;
impl<'a, T> Foo<&'a T> {
fn foo(&self) {}
}
impl<'a, T> Foo<&'a mut T> {
fn foo(&self) {}
}"><pre class="notranslate"><span class="pl-k">struct</span> <span class="pl-smi">Foo</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-k">impl</span><span class="pl-kos"><</span><span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-smi">Foo</span><span class="pl-kos"><</span><span class="pl-c1">&</span><span class="pl-c1">'</span><span class="pl-ent">a</span> <span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">self</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">impl</span><span class="pl-kos"><</span><span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-smi">Foo</span><span class="pl-kos"><</span><span class="pl-c1">&</span><span class="pl-c1">'</span><span class="pl-ent">a</span> <span class="pl-k">mut</span> <span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">self</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">The error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<anon>:7:5: 7:21 error: duplicate definition of value `foo`
<anon>:7 fn foo(&self) {}
^~~~~~~~~~~~~~~~
<anon>:4:5: 4:21 note: first definition of value `foo` here
<anon>:4 fn foo(&self) {}
^~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate"><anon>:7:5: 7:21 error: duplicate definition of value `foo`
<anon>:7 fn foo(&self) {}
^~~~~~~~~~~~~~~~
<anon>:4:5: 4:21 note: first definition of value `foo` here
<anon>:4 fn foo(&self) {}
^~~~~~~~~~~~~~~~
</code></pre></div>
<p dir="auto">If you construct an analogous situation using two separate impls of a trait providing <code class="notranslate">foo</code>, it works just fine, because there is no overlap. Inherent impl blocks could be similarly flexible.</p> | 0 |
<p dir="auto">Not sure if the problems go together, but I cant copy from atom and paste somewhere else (ex: firefox). Also atom crashed sometime when pasting from other place to atom and this is the screen that appears<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/976310/7026246/9d4036b2-dd16-11e4-8363-1d9b8dae1f6d.png"><img src="https://cloud.githubusercontent.com/assets/976310/7026246/9d4036b2-dd16-11e4-8363-1d9b8dae1f6d.png" alt="screenshot from 2015-04-06 16 19 38" style="max-width: 100%;"></a></p>
<p dir="auto">I'm on ubuntu 14.04, Atom 0.189.0</p> | <ul dir="auto">
<li>No drop-down for Cut,Copy &Paste Only Reveal in Tree View shown<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6115991/4435398/a543f46c-4742-11e4-87de-1153004b0f98.png"><img src="https://cloud.githubusercontent.com/assets/6115991/4435398/a543f46c-4742-11e4-87de-1153004b0f98.png" alt="capture1" style="max-width: 100%;"></a></li>
<li>Pasting any text using Ctrl+v causes pasting text twice<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6115991/4435410/46554ef0-4743-11e4-941b-fc2a447cf23e.PNG"><img src="https://cloud.githubusercontent.com/assets/6115991/4435410/46554ef0-4743-11e4-941b-fc2a447cf23e.PNG" alt="capture2" style="max-width: 100%;"></a></li>
<li>Backspace deletes 2 characters<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6115991/4435415/9d7b7b28-4743-11e4-9694-5ff09b9e37ea.PNG"><img src="https://cloud.githubusercontent.com/assets/6115991/4435415/9d7b7b28-4743-11e4-9694-5ff09b9e37ea.PNG" alt="capture3" style="max-width: 100%;"></a></li>
<li>Right key moves 2 cursor further<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6115991/4435438/6b6aa1a8-4744-11e4-8ab7-b339c7a216d5.PNG"><img src="https://cloud.githubusercontent.com/assets/6115991/4435438/6b6aa1a8-4744-11e4-8ab7-b339c7a216d5.PNG" alt="capture4" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6115991/4435439/6b74d2f4-4744-11e4-9345-841981075e00.PNG"><img src="https://cloud.githubusercontent.com/assets/6115991/4435439/6b74d2f4-4744-11e4-9345-841981075e00.PNG" alt="capture5" style="max-width: 100%;"></a></li>
<li>Down key moves 2 lines down</li>
</ul>
<p dir="auto"><strong>Information</strong><br>
Atom Version: 0.132.0<br>
OS: Windows 8.1</p> | 0 |
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22Category%3A+Documentation%22+">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues in this issue<br>
(If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h1 dir="auto">Description</h1>
<p dir="auto">The existing documentation does not show the option to send some tasks ids</p>
<h1 dir="auto">Suggestions</h1>
<p dir="auto">Update the document</p> | <h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22Category%3A+Documentation%22+">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues in this issue<br>
(If there are none, check this box anyway).</li>
</ul>
<h1 dir="auto">Description</h1>
<p dir="auto">I was trying to add "task_annotations" to my celery configuration, I read the docs:<br>
<a href="https://docs.celeryproject.org/en/latest/userguide/configuration.html#task-annotations" rel="nofollow">https://docs.celeryproject.org/en/latest/userguide/configuration.html#task-annotations</a><br>
And in the list above, saw CELERY_TASK_ANNOTATIONS. I used that and realized after a while that it didn't work.</p>
<p dir="auto">After a while of debugging CELERY_ANNOTATIONS worked.</p>
<h1 dir="auto">Suggestions</h1>
<p dir="auto">While debugging, I saw that in:<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/celery/celery/blob/240ef1f64c8340bfffc31359f842ea4a6c8c493a/celery/app/defaults.py#L250">celery/celery/app/defaults.py</a>
</p>
<p class="mb-0 color-fg-muted">
Line 250
in
<a data-pjax="true" class="commit-tease-sha" href="/celery/celery/commit/240ef1f64c8340bfffc31359f842ea4a6c8c493a">240ef1f</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L250" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="250"></td>
<td id="LC250" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">__old__</span><span class="pl-c1">=</span><span class="pl-v">OLD_NS</span>, </td>
</tr>
</tbody></table>
</div>
</div>
<br>
The value for <code class="notranslate">__old__</code> is <code class="notranslate">celery_{}</code> and not <code class="notranslate">celery_task_{}</code><p></p>
<p dir="auto">I'm assuming this issue is there for a bunch of the other configs like <code class="notranslate">acks_late</code> and <code class="notranslate">always_eager</code> and others too probably.<br>
The docs seem to say use CELERY_TASK, but looks like the namespace in the code is CELERY_</p>
<p dir="auto">In the task configs, I seem to only use CELERY_TASK_SERIALIZER, and here I can see that the value for <code class="notranslate">old</code> is explicitly set and so it works:<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/celery/celery/blob/240ef1f64c8340bfffc31359f842ea4a6c8c493a/celery/app/defaults.py#L289">celery/celery/app/defaults.py</a>
</p>
<p class="mb-0 color-fg-muted">
Line 289
in
<a data-pjax="true" class="commit-tease-sha" href="/celery/celery/commit/240ef1f64c8340bfffc31359f842ea4a6c8c493a">240ef1f</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L289" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="289"></td>
<td id="LC289" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">serializer</span><span class="pl-c1">=</span><span class="pl-v">Option</span>(<span class="pl-s">'json'</span>, <span class="pl-s1">old</span><span class="pl-c1">=</span>{<span class="pl-s">'celery_task_serializer'</span>}), </td>
</tr>
</tbody></table>
</div>
</div>
<p></p> | 0 |
<p dir="auto">hello!<br>
see screen<br>
on windows i haven't any problems, but on unix atom, and ts loader emits errors. I think that its compiler mistake.<br>
windows allow use not caseSensetive strings<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2854910/10166070/13f04c78-66cb-11e5-8400-d24ff7c8a97e.png"><img src="https://cloud.githubusercontent.com/assets/2854910/10166070/13f04c78-66cb-11e5-8400-d24ff7c8a97e.png" alt="screenshot_5" style="max-width: 100%;"></a></p> | <p dir="auto"><strong>TypeScript Version:</strong><br>
1.8.7<br>
1.8.0<br>
1.7.5</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"exclude": ["node_modules"]
}"><pre class="notranslate">{
<span class="pl-ent">"exclude"</span>: [<span class="pl-s"><span class="pl-pds">"</span>node_modules<span class="pl-pds">"</span></span>]
}</pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
Shouldn't build any <code class="notranslate">.ts</code> files in <code class="notranslate">node_modules</code>.</p>
<p dir="auto"><strong>Actual behavior:</strong><br>
Builds files in <code class="notranslate">node_modules</code>. If <code class="notranslate">target: es6</code> I get lots of <code class="notranslate">SyntaxError</code>s in node.</p> | 0 |
<p dir="auto">I think the dataset section in user guide (<a href="http://scikit-learn.org/dev/datasets/index.html" rel="nofollow">http://scikit-learn.org/dev/datasets/index.html</a>) is hard to follow. See the subsections:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="5.1. General dataset API
5.2. Toy datasets
5.3. Sample images
5.4. Sample generators
5.5. Datasets in svmlight / libsvm format
5.6. Loading from external datasets
5.7. The Olivetti faces dataset
5.8. The 20 newsgroups text dataset
5.9. Downloading datasets from the mldata.org repository
5.10. The Labeled Faces in the Wild face recognition dataset
5.11. Forest covertypes
5.12. RCV1 dataset
5.13. Kddcup 99 dataset
5.14. Boston House Prices dataset
5.15. Breast Cancer Wisconsin (Diagnostic) Database
5.16. Diabetes dataset
5.17. Optical Recognition of Handwritten Digits Data Set
5.18. Iris Plants Database
5.19. Linnerrud dataset"><pre class="notranslate"><code class="notranslate">5.1. General dataset API
5.2. Toy datasets
5.3. Sample images
5.4. Sample generators
5.5. Datasets in svmlight / libsvm format
5.6. Loading from external datasets
5.7. The Olivetti faces dataset
5.8. The 20 newsgroups text dataset
5.9. Downloading datasets from the mldata.org repository
5.10. The Labeled Faces in the Wild face recognition dataset
5.11. Forest covertypes
5.12. RCV1 dataset
5.13. Kddcup 99 dataset
5.14. Boston House Prices dataset
5.15. Breast Cancer Wisconsin (Diagnostic) Database
5.16. Diabetes dataset
5.17. Optical Recognition of Handwritten Digits Data Set
5.18. Iris Plants Database
5.19. Linnerrud dataset
</code></pre></div>
<p dir="auto">I can't find the logic behind such organization.<br>
I think we should first divide the section into two subsections: one for dataset loaders, one for sample generators. For dataset loaders, we can further divide according to <code class="notranslate">fetch_</code> and <code class="notranslate">load_</code>. For sample generators, we can further divide according to different tasks (e.g., regression, classification).<br>
Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="292969074" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/10555" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/10555/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/10555">#10555</a><br>
What do others think?</p> | <p dir="auto">Here is an issue that I came across with Count Vectorizer and its use with Column Transformer and Pipelines</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/54541490/sklearn-text-and-numeric-features-with-columntransformer-has-value-error/57970935#57970935" rel="nofollow">https://stackoverflow.com/questions/54541490/sklearn-text-and-numeric-features-with-columntransformer-has-value-error/57970935#57970935</a></p>
<p dir="auto">I found a work around using by removing the column name to be processed directly instead of just a list.</p>
<p dir="auto">This may be the way that it is intended to function, but if not, a simple bug fix would be just to add a simple line of code to change the list of column names to the content of the list if the length of the list is one.</p>
<h4 dir="auto">Description</h4>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<h4 dir="auto">Expected Results</h4>
<h4 dir="auto">Actual Results</h4>
<h4 dir="auto">Versions</h4> | 0 |
<h1 dir="auto">Environment</h1>
<p dir="auto">Windows build number: 10.0.18362.239<br>
Windows Terminal version (if applicable): 0.3<br>
Relatively clean OS, Ubuntu and WSL installed.</p>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Open the Terminal app</li>
<li>Close the Terminal app</li>
</ol>
<p dir="auto">Only happens when the terminal is closed and PS is the active tab. Does not happen if Ubuntu or command line is the active tab or if I close a PS tab but Terminal app stays open.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">I expect it to close with no errors</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">An error pops out telling me that "PowerShell has stopped working" as in the screenshot.<br>
"Standard" PowerShell works just fine.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/29314003/62493451-0f07f500-b7c9-11e9-83de-13369874dac3.png"><img width="265" alt="PowerShell has stopped working error in Terminal" src="https://user-images.githubusercontent.com/29314003/62493451-0f07f500-b7c9-11e9-83de-13369874dac3.png" style="max-width: 100%;"></a></p> | <p dir="auto">We have a job object for the conhost in PTY mode that is supporting the connection on each tab. But this was because the conhosts weren't exiting.</p>
<p dir="auto">However, conhosts should just exit when they have nothing to do.</p>
<p dir="auto">This represents taking the job object off and figuring out what the actual underlying issue is that is keeping the conhost from realizing it can just exit.</p> | 1 |
<p dir="auto">For example the following works fine:</p>
<h2 dir="auto">Box Sizing:</h2>
<p dir="auto"><code class="notranslate">_base.css</code></p>
<p dir="auto">But if I remove the ticks like this:</p>
<h2 dir="auto">Box Sizing:</h2>
<p dir="auto">_base.css:</p>
<p dir="auto">Syntax highlighting no longer works for the text that follows</p> | <p dir="auto">If in the markdown code there is a <code class="notranslate">*</code>, everything after that character will have italic style.<br>
I saw this recently in the GitHub diffs (e.g. <a href="https://github.com/github/git-lfs/commit/d8f780329b64e789553bc8ccccfb993ebc430325">this one</a>):</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2864371/7065956/19a9a52a-dec6-11e4-8201-9fe89f2ff9d5.png"><img src="https://cloud.githubusercontent.com/assets/2864371/7065956/19a9a52a-dec6-11e4-8201-9fe89f2ff9d5.png" alt="screenshot from 2015-04-09 13 56 03" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2864371/7065957/19abe218-dec6-11e4-8365-1953a6cefecf.png"><img src="https://cloud.githubusercontent.com/assets/2864371/7065957/19abe218-dec6-11e4-8365-1953a6cefecf.png" alt="screenshot from 2015-04-09 14 00 08" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">My issue is about scipy.special.owens_t not returning the correct value when the second argument is infinity.</p>
<p dir="auto">For example, scipy.special.owens_t(0,numpy.inf) should return 0.25, not 0.5.</p>
<p dir="auto">It looks as if scipy.special.owens_t(x,numpy.inf) always returns twice the value that it should do. Please see <a href="https://en.wikipedia.org/wiki/Owen%27s_T_function" rel="nofollow">https://en.wikipedia.org/wiki/Owen%27s_T_function</a> for some basic information about the function. I have given some example code where the second argument gets successively larger, and it is clear what the asymptotic value should be.</p>
<h4 dir="auto">Reproducing code example:</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="large = 1e16
larger = 1e32
largest = numpy.inf
scipy.special.owens_t(0, large) # almost equal to 0.25
scipy.special.owens_t(0, larger) # equal to 0.25
scipy.special.owens_t(0, largest) # equal to 0.5 It should be 0.25
"><pre class="notranslate"><code class="notranslate">large = 1e16
larger = 1e32
largest = numpy.inf
scipy.special.owens_t(0, large) # almost equal to 0.25
scipy.special.owens_t(0, larger) # equal to 0.25
scipy.special.owens_t(0, largest) # equal to 0.5 It should be 0.25
</code></pre></div>
<h4 dir="auto">Scipy/Numpy/Python version information:</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.5.2 1.19.1 sys.version_info(major=3, minor=8, micro=5, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">1.5.2 1.19.1 sys.version_info(major=3, minor=8, micro=5, releaselevel='final', serial=0)
</code></pre></div> | <h3 dir="auto">Describe your issue.</h3>
<p dir="auto">Hello,</p>
<p dir="auto"><code class="notranslate">owens_t(0, inf)</code> gives <code class="notranslate">0.5</code>. However <code class="notranslate">owens_t(a, inf)</code> is <code class="notranslate">atan(a)/(2*pi)</code> , so <code class="notranslate">owens_t(0, inf)</code> shoud give <code class="notranslate">0.25</code>.</p>
<h3 dir="auto">Reproducing Code Example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from scipy import special
from math import atan, pi, inf
special.owens_t(0,inf)
# 0.5
atan(inf)/2/pi
# 0.25"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">scipy</span> <span class="pl-k">import</span> <span class="pl-s1">special</span>
<span class="pl-k">from</span> <span class="pl-s1">math</span> <span class="pl-k">import</span> <span class="pl-s1">atan</span>, <span class="pl-s1">pi</span>, <span class="pl-s1">inf</span>
<span class="pl-s1">special</span>.<span class="pl-en">owens_t</span>(<span class="pl-c1">0</span>,<span class="pl-s1">inf</span>)
<span class="pl-c"># 0.5</span>
<span class="pl-en">atan</span>(<span class="pl-s1">inf</span>)<span class="pl-c1">/</span><span class="pl-c1">2</span><span class="pl-c1">/</span><span class="pl-s1">pi</span>
<span class="pl-c"># 0.25</span></pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="No error message"><pre class="notranslate">No error message</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version information</h3>
<p dir="auto">scipy 1.7.1, python 3.9.5</p> | 1 |
<h3 dir="auto">Version</h3>
<p dir="auto">2.6.8</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codesandbox.io/s/wwoxp636jk" rel="nofollow">https://codesandbox.io/s/wwoxp636jk</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Add a click listener on window in a child component</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">Before Vue 2.6, the click event was not propagated to the child component because it was not created yet.</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">The click event is now propagated to the child after it is created and mounted.</p>
<hr>
<p dir="auto">Do I need now to explicitly add the modifier <code class="notranslate">.stop</code> to all my parent click events if I add click listeners on window in my child components?</p> | <h3 dir="auto">Version</h3>
<p dir="auto">2.6.0-beta.1</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codepen.io/frlinw/pen/OreZMz" rel="nofollow">https://codepen.io/frlinw/pen/OreZMz</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Click on "Click me"</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">demo with v2.5.22 show the expected behavior: <a href="https://codepen.io/frlinw/pen/XoLYMR" rel="nofollow">https://codepen.io/frlinw/pen/XoLYMR</a></p>
<p dir="auto">the "Dropdown" component should not be able to handle a click event which is supposed to create it</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">the Dropdown is automatically closed because it handles the click event</p> | 1 |
<p dir="auto">Hi,</p>
<p dir="auto">I'm new to flutter. I just installed flutter on windows 10 pro, and runned 'flutter doctor'. It is exiting unexpectedly. When running in verbose mode the output is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="c:\Tools>flutter doctor -v
[ +13 ms] [C:\Tools\flutter\] git rev-parse --abbrev-ref --symbolic @{u}
[ +71 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/alpha
[ +1 ms] [C:\Tools\flutter\] git rev-parse --abbrev-ref HEAD
[ +51 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ +1 ms] alpha
[ +1 ms] [C:\Tools\flutter\] git ls-remote --get-url origin
[ +49 ms] Exit code 0 from: git ls-remote --get-url origin
[ +1 ms] https://github.com/flutter/flutter.git
[ +1 ms] [C:\Tools\flutter\] git log -n 1 --pretty=format:%H
[ +53 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ +1 ms] d957c8f040902aa3fd44b367150bde56b64cec83
[ +1 ms] [C:\Tools\flutter\] git log -n 1 --pretty=format:%ar
[ +50 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ +1 ms] 4 days ago
[ +205 ms] Unable to locate an Android SDK.
[ +39 ms] Downloading Material fonts...
[ +6 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/fonts/13ac995daa9dda0a6ba0a45f1fccc541e616a74c/fonts.zip
[ +209 ms] Received response from server, collecting bytes...
[ +606 ms] Downloading package sky_engine...
[ +2 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/sky_engine.zip
[ +242 ms] Received response from server, collecting bytes...
[ +513 ms] Downloading common tools...
[ +2 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/flutter_patched_sdk.zip
[ +385 ms] Received response from server, collecting bytes...
[+1491 ms] Downloading windows-x64 tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/windows-x64/artifacts.zip
[ +451 ms] Received response from server, collecting bytes...
[ +458 ms] Downloading windows-x64 tools...
[ +2 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/dart-sdk-windows-x64.zip
[ +513 ms] Received response from server, collecting bytes...
[+7390 ms] Downloading android-arm-profile/windows-x64 tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-arm-profile/windows-x64.zip
[ +501 ms] Received response from server, collecting bytes...
[ +586 ms] Downloading android-arm-release/windows-x64 tools...
[ +3 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-arm-release/windows-x64.zip
[ +615 ms] Received response from server, collecting bytes...
[ +560 ms] Downloading android-x86 tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-x86/artifacts.zip
[ +464 ms] Received response from server, collecting bytes...
[+2568 ms] Downloading android-x64 tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-x64/artifacts.zip
[ +417 ms] Received response from server, collecting bytes...
[+2451 ms] Downloading android-arm tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-arm/artifacts.zip
[ +823 ms] Received response from server, collecting bytes...
[+1122 ms] Downloading android-arm-profile tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-arm-profile/artifacts.zip
[ +395 ms] Received response from server, collecting bytes...
[+1039 ms] Downloading android-arm-release tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-arm-release/artifacts.zip
[ +240 ms] Received response from server, collecting bytes...
[+1273 ms] Downloading Gradle Wrapper...
[ +2 ms] Downloading: https://android.googlesource.com/platform/tools/base/+archive/0b5c1398d1d04ac245a310de98825cb7b3278e2a/templates/gradle/wrapper.tgz
[ +905 ms] Received response from server, collecting bytes...
[ +976 ms] [√] Flutter (on Microsoft Windows [Version 10.0.15063], locale fo-FO, channel alpha)
[ +1 ms] • Flutter at C:\Tools\flutter
[ ] • Framework revision d957c8f040 (4 days ago), 2017-11-30 13:29:59 -0800
[ ] • Engine revision 77d8acb9be
[ ] • Tools Dart version 1.25.0-dev.11.0
[ ] • Engine Dart version 2.0.0-dev.9.0
[ +1 ms] [X] Android toolchain - develop for Android devices
[ ] X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
[ ] [X] Android Studio (not installed)
[ ] • Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
[ +151 ms] Unable to locate an Android SDK.
[ +73 ms] Listing devices using null
[ +1 ms] [√] Connected devices
[ ] • None
Oops; flutter has exited unexpectedly.
[ +23 ms] Sending crash report to Google.
[ +735 ms] Crash report sent (report ID: de3b1ae01245ec73)
Crash report written to c:\Tools\flutter_02.log;
please let us know at https://github.com/flutter/flutter/issues.
[ +293 ms] ensureAnalyticsSent: 0ms
[ +1 ms] exiting with code 1
The log file contains this:
Flutter crash report; please file at https://github.com/flutter/flutter/issues."><pre class="notranslate"><code class="notranslate">c:\Tools>flutter doctor -v
[ +13 ms] [C:\Tools\flutter\] git rev-parse --abbrev-ref --symbolic @{u}
[ +71 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/alpha
[ +1 ms] [C:\Tools\flutter\] git rev-parse --abbrev-ref HEAD
[ +51 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ +1 ms] alpha
[ +1 ms] [C:\Tools\flutter\] git ls-remote --get-url origin
[ +49 ms] Exit code 0 from: git ls-remote --get-url origin
[ +1 ms] https://github.com/flutter/flutter.git
[ +1 ms] [C:\Tools\flutter\] git log -n 1 --pretty=format:%H
[ +53 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ +1 ms] d957c8f040902aa3fd44b367150bde56b64cec83
[ +1 ms] [C:\Tools\flutter\] git log -n 1 --pretty=format:%ar
[ +50 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ +1 ms] 4 days ago
[ +205 ms] Unable to locate an Android SDK.
[ +39 ms] Downloading Material fonts...
[ +6 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/fonts/13ac995daa9dda0a6ba0a45f1fccc541e616a74c/fonts.zip
[ +209 ms] Received response from server, collecting bytes...
[ +606 ms] Downloading package sky_engine...
[ +2 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/sky_engine.zip
[ +242 ms] Received response from server, collecting bytes...
[ +513 ms] Downloading common tools...
[ +2 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/flutter_patched_sdk.zip
[ +385 ms] Received response from server, collecting bytes...
[+1491 ms] Downloading windows-x64 tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/windows-x64/artifacts.zip
[ +451 ms] Received response from server, collecting bytes...
[ +458 ms] Downloading windows-x64 tools...
[ +2 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/dart-sdk-windows-x64.zip
[ +513 ms] Received response from server, collecting bytes...
[+7390 ms] Downloading android-arm-profile/windows-x64 tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-arm-profile/windows-x64.zip
[ +501 ms] Received response from server, collecting bytes...
[ +586 ms] Downloading android-arm-release/windows-x64 tools...
[ +3 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-arm-release/windows-x64.zip
[ +615 ms] Received response from server, collecting bytes...
[ +560 ms] Downloading android-x86 tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-x86/artifacts.zip
[ +464 ms] Received response from server, collecting bytes...
[+2568 ms] Downloading android-x64 tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-x64/artifacts.zip
[ +417 ms] Received response from server, collecting bytes...
[+2451 ms] Downloading android-arm tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-arm/artifacts.zip
[ +823 ms] Received response from server, collecting bytes...
[+1122 ms] Downloading android-arm-profile tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-arm-profile/artifacts.zip
[ +395 ms] Received response from server, collecting bytes...
[+1039 ms] Downloading android-arm-release tools...
[ +1 ms] Downloading: https://storage.googleapis.com/flutter_infra/flutter/77d8acb9be65e6725c7c4292fe2e3b1159c0aeb9/android-arm-release/artifacts.zip
[ +240 ms] Received response from server, collecting bytes...
[+1273 ms] Downloading Gradle Wrapper...
[ +2 ms] Downloading: https://android.googlesource.com/platform/tools/base/+archive/0b5c1398d1d04ac245a310de98825cb7b3278e2a/templates/gradle/wrapper.tgz
[ +905 ms] Received response from server, collecting bytes...
[ +976 ms] [√] Flutter (on Microsoft Windows [Version 10.0.15063], locale fo-FO, channel alpha)
[ +1 ms] • Flutter at C:\Tools\flutter
[ ] • Framework revision d957c8f040 (4 days ago), 2017-11-30 13:29:59 -0800
[ ] • Engine revision 77d8acb9be
[ ] • Tools Dart version 1.25.0-dev.11.0
[ ] • Engine Dart version 2.0.0-dev.9.0
[ +1 ms] [X] Android toolchain - develop for Android devices
[ ] X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
[ ] [X] Android Studio (not installed)
[ ] • Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
[ +151 ms] Unable to locate an Android SDK.
[ +73 ms] Listing devices using null
[ +1 ms] [√] Connected devices
[ ] • None
Oops; flutter has exited unexpectedly.
[ +23 ms] Sending crash report to Google.
[ +735 ms] Crash report sent (report ID: de3b1ae01245ec73)
Crash report written to c:\Tools\flutter_02.log;
please let us know at https://github.com/flutter/flutter/issues.
[ +293 ms] ensureAnalyticsSent: 0ms
[ +1 ms] exiting with code 1
The log file contains this:
Flutter crash report; please file at https://github.com/flutter/flutter/issues.
</code></pre></div>
<h2 dir="auto">command</h2>
<p dir="auto">flutter doctor -v</p>
<h2 dir="auto">exception</h2>
<p dir="auto">ArgumentError: Invalid argument(s): Invalid locale 'fo_FO'</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#0 Intl._throwLocaleError (package:intl/intl.dart:231)
#1 Intl.verifiedLocale (package:intl/intl.dart:225)
#2 Intl.verifiedLocale (package:intl/intl.dart:210)
#3 new NumberFormat._forPattern (package:intl/src/intl/number_format.dart:486)
#4 new NumberFormat.decimalPattern (package:intl/src/intl/number_format.dart:175)
#5 kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:97)
#6 kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:97)
#7 getElapsedAsMilliseconds (package:flutter_tools/src/base/utils.dart:105)
#8 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:202)
<asynchronous suspension>
#9 CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:279)
<asynchronous suspension>
#11 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#12 new Future.sync (dart:async/future.dart:222)
#13 CommandRunner.run (package:args/command_runner.dart:109)
#14 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:162)
#15 run.<anonymous closure> (package:flutter_tools/runner.dart:89)
<asynchronous suspension>
#16 AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#17 AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#18 _rootRun (dart:async/zone.dart:1120)
#19 _CustomZone.run (dart:async/zone.dart:1001)
#20 runZoned (dart:async/zone.dart:1467)
#21 AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#22 run (package:flutter_tools/runner.dart:60)
<asynchronous suspension>
#23 main (package:flutter_tools/executable.dart:43)
<asynchronous suspension>
#24 main (file:///C:/Tools/flutter/packages/flutter_tools/bin/flutter_tools.dart:16)
#25 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)"><pre class="notranslate"><code class="notranslate">#0 Intl._throwLocaleError (package:intl/intl.dart:231)
#1 Intl.verifiedLocale (package:intl/intl.dart:225)
#2 Intl.verifiedLocale (package:intl/intl.dart:210)
#3 new NumberFormat._forPattern (package:intl/src/intl/number_format.dart:486)
#4 new NumberFormat.decimalPattern (package:intl/src/intl/number_format.dart:175)
#5 kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:97)
#6 kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:97)
#7 getElapsedAsMilliseconds (package:flutter_tools/src/base/utils.dart:105)
#8 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:202)
<asynchronous suspension>
#9 CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:279)
<asynchronous suspension>
#11 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#12 new Future.sync (dart:async/future.dart:222)
#13 CommandRunner.run (package:args/command_runner.dart:109)
#14 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:162)
#15 run.<anonymous closure> (package:flutter_tools/runner.dart:89)
<asynchronous suspension>
#16 AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#17 AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#18 _rootRun (dart:async/zone.dart:1120)
#19 _CustomZone.run (dart:async/zone.dart:1001)
#20 runZoned (dart:async/zone.dart:1467)
#21 AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#22 run (package:flutter_tools/runner.dart:60)
<asynchronous suspension>
#23 main (package:flutter_tools/executable.dart:43)
<asynchronous suspension>
#24 main (file:///C:/Tools/flutter/packages/flutter_tools/bin/flutter_tools.dart:16)
#25 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
</code></pre></div>
<h2 dir="auto">flutter doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (on Microsoft Windows [Version 10.0.15063], locale fo-FO, channel alpha)
• Flutter at C:\Tools\flutter
• Framework revision d957c8f040 (4 days ago), 2017-11-30 13:29:59 -0800
• Engine revision 77d8acb9be
• Tools Dart version 1.25.0-dev.11.0
• Engine Dart version 2.0.0-dev.9.0
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
[✗] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
[✓] Connected devices
• None
"><pre class="notranslate"><code class="notranslate">[✓] Flutter (on Microsoft Windows [Version 10.0.15063], locale fo-FO, channel alpha)
• Flutter at C:\Tools\flutter
• Framework revision d957c8f040 (4 days ago), 2017-11-30 13:29:59 -0800
• Engine revision 77d8acb9be
• Tools Dart version 1.25.0-dev.11.0
• Engine Dart version 2.0.0-dev.9.0
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
[✗] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
[✓] Connected devices
• None
</code></pre></div>
<p dir="auto">What is wrong?</p> | <p dir="auto">Internal: b/155674981</p>
<p dir="auto">When I use <code class="notranslate">GestureDetector</code> and put <code class="notranslate">behavior</code> = <code class="notranslate">translucent</code>, I cannot tap on anything bellow it. Also when I use <code class="notranslate">GestureDetector</code> and put behavior lets say <code class="notranslate">opaque</code> and have <code class="notranslate">RawMaterialButton</code> as a <code class="notranslate">child</code>, taps on button are registered on <code class="notranslate">Button</code> but not on <code class="notranslate">GestureDetector</code> and expected behavior in this case would be that taps do not pass to the child.<br>
Example:</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
home: new MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return new Scaffold(
body: new Stack(
children: <Widget>[
new Positioned(
left: 0.0,
right: 0.0,
top: 200.0,
bottom: 200.0,
child: new TextField(
textAlign: TextAlign.center,
style: const TextStyle(
color: Colors.blue,
),
),
),
new Positioned.fill(
child: new GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: (){
print("Clicked gesture");
},
),
),
// new Positioned.fill(
// child: new GestureDetector(
// behavior: HitTestBehavior.opaque,
// onTap: (){
// print("Clicked gesture");
// },
// child: new RawMaterialButton(
// child: new Text(
// 'BUTTON',
// textAlign: TextAlign.center,
// ),
// onPressed: (){
// print("Clicked button");
// },
// ),
// ),
// ),
],
),
);
}
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s">'package:flutter/material.dart'</span>;
<span class="pl-k">void</span> <span class="pl-en">main</span>() <span class="pl-k">=></span> <span class="pl-en">runApp</span>(<span class="pl-k">new</span> <span class="pl-c1">MyApp</span>());
<span class="pl-k">class</span> <span class="pl-c1">MyApp</span> <span class="pl-k">extends</span> <span class="pl-c1">StatelessWidget</span> {
<span class="pl-k">@override</span>
<span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">MaterialApp</span>(
title<span class="pl-k">:</span> <span class="pl-s">'Flutter Demo'</span>,
home<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">MyHomePage</span>(),
);
}
}
<span class="pl-k">class</span> <span class="pl-c1">MyHomePage</span> <span class="pl-k">extends</span> <span class="pl-c1">StatefulWidget</span> {
<span class="pl-k">@override</span>
<span class="pl-c1">_MyHomePageState</span> <span class="pl-en">createState</span>() <span class="pl-k">=></span> <span class="pl-k">new</span> <span class="pl-c1">_MyHomePageState</span>();
}
<span class="pl-k">class</span> <span class="pl-c1">_MyHomePageState</span> <span class="pl-k">extends</span> <span class="pl-c1">State</span><<span class="pl-c1">MyHomePage</span>> {
<span class="pl-k">@override</span>
<span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>(
body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Stack</span>(
children<span class="pl-k">:</span> <span class="pl-k"><</span><span class="pl-c1">Widget</span><span class="pl-k">></span>[
<span class="pl-k">new</span> <span class="pl-c1">Positioned</span>(
left<span class="pl-k">:</span> <span class="pl-c1">0.0</span>,
right<span class="pl-k">:</span> <span class="pl-c1">0.0</span>,
top<span class="pl-k">:</span> <span class="pl-c1">200.0</span>,
bottom<span class="pl-k">:</span> <span class="pl-c1">200.0</span>,
child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TextField</span>(
textAlign<span class="pl-k">:</span> <span class="pl-c1">TextAlign</span>.center,
style<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">TextStyle</span>(
color<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.blue,
),
),
),
<span class="pl-k">new</span> <span class="pl-c1">Positioned</span>.<span class="pl-en">fill</span>(
child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">GestureDetector</span>(
behavior<span class="pl-k">:</span> <span class="pl-c1">HitTestBehavior</span>.translucent,
onTap<span class="pl-k">:</span> (){
<span class="pl-en">print</span>(<span class="pl-s">"Clicked gesture"</span>);
},
),
),
<span class="pl-c">// new Positioned.fill(</span>
<span class="pl-c">// child: new GestureDetector(</span>
<span class="pl-c">// behavior: HitTestBehavior.opaque,</span>
<span class="pl-c">// onTap: (){</span>
<span class="pl-c">// print("Clicked gesture");</span>
<span class="pl-c">// },</span>
<span class="pl-c">// child: new RawMaterialButton(</span>
<span class="pl-c">// child: new Text(</span>
<span class="pl-c">// 'BUTTON',</span>
<span class="pl-c">// textAlign: TextAlign.center,</span>
<span class="pl-c">// ),</span>
<span class="pl-c">// onPressed: (){</span>
<span class="pl-c">// print("Clicked button");</span>
<span class="pl-c">// },</span>
<span class="pl-c">// ),</span>
<span class="pl-c">// ),</span>
<span class="pl-c">// ),</span>
],
),
);
}
}</pre></div>
<p dir="auto">In this example, I would expect that GestureDetector receives tap input, but also that TextField gets focus, but what happens is that taps are registered in GestureDetector, but nothing passes to the TextField. If I comment out GestureDetector part, TextField works.<br>
Further, you can comment out first two widgets in stack and uncomment last one to check other issue- when GestureDetector has child. I would expect that no tap is passed to child but child receives input and GestureDetector does not.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v0.5.5-pre.10, on Mac OS X 10.13.4 17E202, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4)
[✓] Android Studio (version 3.1)
[!] IntelliJ IDEA Ultimate Edition (version 2018.1.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected devices (2 available)
"><pre class="notranslate"><code class="notranslate">flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v0.5.5-pre.10, on Mac OS X 10.13.4 17E202, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4)
[✓] Android Studio (version 3.1)
[!] IntelliJ IDEA Ultimate Edition (version 2018.1.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected devices (2 available)
</code></pre></div> | 0 |
<p dir="auto">Apologies if this has already been asked, couldn't find anything though. But do you have the capability to utilize multiple objective functions, say a "Split" similar to "Merge"? The goal would be to implement a model like the one given here:</p>
<p dir="auto"><a href="https://github.com/rbgirshick/fast-rcnn">https://github.com/rbgirshick/fast-rcnn</a></p>
<p dir="auto">That is, have a classifier and a regression objective function that both provide gradient information to backprop.</p> | 0 |
|
<h2 dir="auto"><g-emoji class="g-emoji" alias="information_source" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png">ℹ</g-emoji> Computer information</h2>
<p dir="auto">Version: 1.0.0<br>
OS Version: Microsoft Windows NT 10.0.19041.0<br>
IntPtr Length: 8<br>
x64: True<br>
Date: 08/12/2020 09:39:21</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide detailed reproduction steps (if any)</h2>
<p dir="auto">NA, Exception</p>
<h3 dir="auto">✔️ Expected result</h3>
<p dir="auto">NA</p>
<h3 dir="auto"><g-emoji class="g-emoji" alias="x" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/274c.png">❌</g-emoji> Actual result</h3>
<p dir="auto">Exception:<br>
System.ObjectDisposedException: Cannot access a disposed object.<br>
Object name: 'Timer'.<br>
at System.Timers.Timer.set_Enabled(Boolean value)<br>
at System.Timers.Timer.Start()<br>
at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.UpdateIsVisibleCache()<br>
at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br>
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br>
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br>
at System.Windows.Window.SetRootVisual()<br>
at System.Windows.Window.SetRootVisualAndUpdateSTC()<br>
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br>
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br>
at System.Windows.Window.CreateSourceWindowDuringShow()<br>
at System.Windows.Window.SafeCreateWindowDuringShow()<br>
at System.Windows.Window.ShowHelper(Object booleanBox)<br>
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br>
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</p>
<p dir="auto"><a href="https://github.com/microsoft/PowerToys/files/5061368/2020-08-12.txt">2020-08-12.txt</a></p>
<h2 dir="auto">📷 Screenshots</h2>
<p dir="auto">None</p> | <p dir="auto">Popup tells me to give y'all this.</p>
<p dir="auto"><a href="https://github.com/microsoft/PowerToys/files/5009460/2020-07-31.txt">2020-07-31.txt</a></p>
<p dir="auto">Version: 1.0.0<br>
OS Version: Microsoft Windows NT 10.0.19041.0<br>
IntPtr Length: 8<br>
x64: True<br>
Date: 07/31/2020 17:29:59<br>
Exception:<br>
System.ObjectDisposedException: Cannot access a disposed object.<br>
Object name: 'Timer'.<br>
at System.Timers.Timer.set_Enabled(Boolean value)<br>
at System.Timers.Timer.Start()<br>
at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.UpdateIsVisibleCache()<br>
at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br>
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br>
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br>
at System.Windows.Window.SetRootVisual()<br>
at System.Windows.Window.SetRootVisualAndUpdateSTC()<br>
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br>
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br>
at System.Windows.Window.CreateSourceWindowDuringShow()<br>
at System.Windows.Window.SafeCreateWindowDuringShow()<br>
at System.Windows.Window.ShowHelper(Object booleanBox)<br>
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br>
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</p> | 1 |
<p dir="auto">Hello,</p>
<p dir="auto">I am trying to run two plugins at the same time however I get the following <code class="notranslate">Cannot inherit from final class</code> error on startup and neo4j fails to startup.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2016-10-10 14:37:27.911+0000 INFO Starting...
2016-10-10 14:37:28.403+0000 INFO Bolt enabled on localhost:7687.
2016-10-10 14:37:31.305+0000 INFO [c.g.r.b.RuntimeKernelExtension] GraphAware Runtime disabled.
2016-10-10 14:37:34.974+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@349cc412' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@349cc412' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@349cc412' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:215)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:67)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@349cc412' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:187)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, /home/ahmetkizilay/WORK/TOOLS/neo4j-community-3.0.6/data/databases/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:40)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:55)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.proc.Procedures@22067885' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:140)
... 10 more
Caused by: java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader$1.fetchNextOrNull(ProcedureJarLoader.java:132)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader$1.fetchNextOrNull(ProcedureJarLoader.java:110)
at org.neo4j.collection.PrefetchingRawIterator.peek(PrefetchingRawIterator.java:50)
at org.neo4j.collection.PrefetchingRawIterator.hasNext(PrefetchingRawIterator.java:36)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProcedures(ProcedureJarLoader.java:85)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProceduresFromDir(ProcedureJarLoader.java:77)
at org.neo4j.kernel.impl.proc.Procedures.start(Procedures.java:125)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
... 12 more
"><pre class="notranslate"><code class="notranslate">2016-10-10 14:37:27.911+0000 INFO Starting...
2016-10-10 14:37:28.403+0000 INFO Bolt enabled on localhost:7687.
2016-10-10 14:37:31.305+0000 INFO [c.g.r.b.RuntimeKernelExtension] GraphAware Runtime disabled.
2016-10-10 14:37:34.974+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@349cc412' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@349cc412' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@349cc412' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:215)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:67)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@349cc412' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:187)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, /home/ahmetkizilay/WORK/TOOLS/neo4j-community-3.0.6/data/databases/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:40)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:55)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.proc.Procedures@22067885' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:140)
... 10 more
Caused by: java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader$1.fetchNextOrNull(ProcedureJarLoader.java:132)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader$1.fetchNextOrNull(ProcedureJarLoader.java:110)
at org.neo4j.collection.PrefetchingRawIterator.peek(PrefetchingRawIterator.java:50)
at org.neo4j.collection.PrefetchingRawIterator.hasNext(PrefetchingRawIterator.java:36)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProcedures(ProcedureJarLoader.java:85)
at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProceduresFromDir(ProcedureJarLoader.java:77)
at org.neo4j.kernel.impl.proc.Procedures.start(Procedures.java:125)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
... 12 more
</code></pre></div>
<p dir="auto">Specifically I am trying to run GraphAware's timetree plugin along with ElasticSearch plugin. I have no problems with running them individually.</p>
<ul dir="auto">
<li>Neo4j Community Edition 3.0.6</li>
<li><a href="https://github.com/graphaware/neo4j-timetree">Graphaware's Timetree Plugin</a> with
<ul dir="auto">
<li>graphaware-server-community-all-3.0.6.43.jar</li>
<li>graphaware-timetree-3.0.6.43.25.jar</li>
</ul>
</li>
<li><a href="https://github.com/neo4j-contrib/neo4j-elasticsearch">ElasticSearch plugin</a> (branch 3.0)
<ul dir="auto">
<li>jars created from source with <code class="notranslate">mvn clean install -DskipTests</code></li>
</ul>
</li>
<li>java-1.8.0-openjdk-amd64</li>
<li>Ubuntu 14.04</li>
</ul>
<p dir="auto">Related issues: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="182036957" data-permission-text="Title is private" data-url="https://github.com/graphaware/neo4j-timetree/issues/62" data-hovercard-type="issue" data-hovercard-url="/graphaware/neo4j-timetree/issues/62/hovercard" href="https://github.com/graphaware/neo4j-timetree/issues/62">graphaware/neo4j-timetree#62</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="182032553" data-permission-text="Title is private" data-url="https://github.com/neo4j-contrib/neo4j-elasticsearch/issues/26" data-hovercard-type="issue" data-hovercard-url="/neo4j-contrib/neo4j-elasticsearch/issues/26/hovercard" href="https://github.com/neo4j-contrib/neo4j-elasticsearch/issues/26">neo4j-contrib/neo4j-elasticsearch#26</a><br>
Thanks a lot.</p> | <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tomasteicher/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tomasteicher">@tomasteicher</a>: 'ExecutionEngine->execute method can accept params for inserting parameters into cypher query. It would be grate if it would be possible to pass also relationships types in this way.</p>
<p dir="auto">For example</p>
<p dir="auto">params.put( "relationshipType", KNOWS );</p>
<p dir="auto">Value of property (KNOWS here) could be RelationshipType or String.'</p> | 0 |
<h3 dir="auto">Preflight Checklist</h3>
<ul dir="auto">
<li>[x ] I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li>[x ] I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li>[x ] I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>7.1.2</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Ubuntu 18.04.3 LTS</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>6.0.6</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto"><code class="notranslate">BrowserWindow</code> created in fullscreen mode</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Can see toolbar with File, Edit, View etc. menus</p>
<h3 dir="auto">To Reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ git clone https://github.com/webianproject/shell-kiosk.git
$ cd shell-kiosk
$ npm install
$ npm start"><pre class="notranslate"><code class="notranslate">$ git clone https://github.com/webianproject/shell-kiosk.git
$ cd shell-kiosk
$ npm install
$ npm start
</code></pre></div>
<p dir="auto"><code class="notranslate">BrowserView</code> is instantiated here <a href="https://github.com/webianproject/shell-kiosk/blob/master/chrome.js#L17">https://github.com/webianproject/shell-kiosk/blob/master/chrome.js#L17</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" this.mainWindow = new BrowserWindow({
fullscreen: true,
webPreferences: {
nodeIntegration: true,
webviewTag: true
}
});"><pre class="notranslate"><code class="notranslate"> this.mainWindow = new BrowserWindow({
fullscreen: true,
webPreferences: {
nodeIntegration: true,
webviewTag: true
}
});
</code></pre></div>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">Used to work on Electron 6.0.6. First noticed the problem after upgrading to Electron 7.1.2.<br>
Still works on Mac OS.</p> | <h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>7.1.2</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Windows 10 1909</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>7.x.x (in another Windows 10 1909 computer)</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">The menu that appears below the app title (the one with File, Edit, View...) must dissappear.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Nothing. It does nothing. The menu is still there. as if nothing happened.</p>
<h3 dir="auto">To reproduce</h3>
<p dir="auto">This is basically the code I am testing:</p>
<p dir="auto">const { app, BrowserWindow } = require('electron');</p>
<p dir="auto">function createWindow() {<br>
let win = new BrowserWindow({<br>
width: 800,<br>
height: 600,<br>
webPreferences: {<br>
nodeIntegration: true,<br>
}<br>
})<br>
win.setMenuBarVisibility(false);<br>
win.loadFile('./public/index.html')<br>
}</p>
<p dir="auto">app.on('ready', createWindow)</p>
<p dir="auto">Everything works as expected, except the menu, which it still shows.</p>
<h3 dir="auto">Screenshots</h3>
<p dir="auto"><a href="url">https://i.imgur.com/kJJf0JE.png</a></p> | 1 |
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>2.8+</td>
</tr>
</tbody>
</table>
<p dir="auto">If I register a custom expression language function via a class implementing <code class="notranslate">ExpressionFunctionProviderInterface</code> and tagging it with <code class="notranslate">security.expression_language_provider</code> then I cannot use this function within an <code class="notranslate">allow_if</code> expression in my access control config.</p>
<p dir="auto">Specifically in my case I have the <code class="notranslate">is_granted</code> function registered with a custom provider. Using it with the authorization checker for example works fine:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$authorizationChecker->isGranted(new Expression("is_granted('something') and/or ..."));"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>authorizationChecker</span>-><span class="pl-en">isGranted</span>(<span class="pl-k">new</span> <span class="pl-v">Expression</span>("<span class="pl-s">is_granted('something') and/or ...</span>"));</pre></div>
<p dir="auto">However using it inside the access control config results in an error:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" access_control:
- { path: ^/, allow_if: "is_granted('some_custom_attribute')" }"><pre class="notranslate"> <span class="pl-ent">access_control</span>:
- <span class="pl-s">{ path: ^/, allow_if: "is_granted('some_custom_attribute')" }</span></pre></div>
<p dir="auto">=></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(1/1) SyntaxErrorThe function "is_granted" does not exist around position 1 for expression `is_granted('some_custom_attribute')`.
--
in Parser.php (line 198)
at Parser->parsePrimaryExpression()in Parser.php (line 149)
at Parser->getPrimary()in Parser.php (line 110)
at Parser->parseExpression()in Parser.php (line 100)
at Parser->parse(object(TokenStream), array('object', 'request', 'roles', 'token', 'trust_resolver', 'user'))in ExpressionLanguage.php (line 108)
at ExpressionLanguage->parse('is_granted(\'some_custom_attribute\')', array('object', 'request', 'roles', 'token', 'trust_resolver', 'user'))in SecurityExtension.php (line 671)
at SecurityExtension->createExpression(object(ContainerBuilder), 'is_granted(\'some_custom_attribute\')')in SecurityExtension.php (line 224)"><pre class="notranslate"><code class="notranslate">(1/1) SyntaxErrorThe function "is_granted" does not exist around position 1 for expression `is_granted('some_custom_attribute')`.
--
in Parser.php (line 198)
at Parser->parsePrimaryExpression()in Parser.php (line 149)
at Parser->getPrimary()in Parser.php (line 110)
at Parser->parseExpression()in Parser.php (line 100)
at Parser->parse(object(TokenStream), array('object', 'request', 'roles', 'token', 'trust_resolver', 'user'))in ExpressionLanguage.php (line 108)
at ExpressionLanguage->parse('is_granted(\'some_custom_attribute\')', array('object', 'request', 'roles', 'token', 'trust_resolver', 'user'))in SecurityExtension.php (line 671)
at SecurityExtension->createExpression(object(ContainerBuilder), 'is_granted(\'some_custom_attribute\')')in SecurityExtension.php (line 224)
</code></pre></div>
<p dir="auto">This happens because custom function providers are not loaded at all within the <code class="notranslate">SecurityExtension</code>:</p>
<p dir="auto"><a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php#L741">https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php#L741</a></p> | <table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.2.9</td>
</tr>
</tbody>
</table>
<p dir="auto">It's exactly the same problem of this issue : <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="201036074" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/21305" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/21305/hovercard" href="https://github.com/symfony/symfony/issues/21305">#21305</a></p>
<p dir="auto">Except i using it in securty.yml allow_if and i got :<br>
Error: The function "test" does not exist around position 1.</p>
<p dir="auto">With @Security annotation everything is ok.</p> | 1 |
<p dir="auto">In <a href="https://github.com/flutter/engine/blob/master/lib/ui/window.dart#L219"><code class="notranslate">ui.window.sendPlatformMessage</code></a>, we should have a way to pass an error callback.</p>
<p dir="auto">Once we had that, in <a href="https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/services/platform_messages.dart#L49"><code class="notranslate">PlatformMessages._sendPlatformMessage</code></a>, we could wire it up so as to call <code class="notranslate">Completer.completeError()</code></p> | <p dir="auto"><a href="https://docs.flutter.io/flutter/services/HostMessages-class.html" rel="nofollow">https://docs.flutter.io/flutter/services/HostMessages-class.html</a></p>
<p dir="auto">We can use the <a href="https://www.dartlang.org/articles/libraries/futures-and-error-handling" rel="nofollow">Futures error handling</a> API for this. Throwing a native exception crashes the app (on Android), so it's not a good way of handling errors.</p>
<p dir="auto">The HostMessages API should complete with an error if you send a message to native code and a handler isn't installed. (Right now on Android it completes with null and on iOS it never completes.)</p> | 1 |
<p dir="auto">Hello</p>
<p dir="auto">I tried to index an double array {1, 2, 3, 4, 5} and let ES automatically detect the type. Then I wrote a plugin to get the value as follows</p>
<p dir="auto">ScriptDocValues docHashValues = (ScriptDocValues) doc().get("array");<br>
final List tmp = ((ScriptDocValues.Doubles) docHashValues).getValues();</p>
<p dir="auto">However I found the tmp size is always <= 4. Is this a bug or there are some limitations for array size in ES? Thanks!</p> | <p dir="auto"><strong>Elasticsearch version</strong>:<br>
alpha5</p>
<p dir="auto"><strong>Plugins installed</strong>: []<br>
None</p>
<p dir="auto"><strong>JVM version</strong>:<br>
java version "1.8.0_71"<br>
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)<br>
Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)</p>
<p dir="auto"><strong>OS version</strong>:<br>
OSX</p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:<br>
Exception thrown in netty4 module while importing dashboards for metricbeat.</p>
<p dir="auto"><strong>Steps to reproduce</strong>:</p>
<ol dir="auto">
<li>Start ES alpha5</li>
<li>Import the Kibana dashboard for metricbeat: cd metricbeat-5.0.0-alpha5-darwin-x86_64/kibana && ./import_dashboards.sh</li>
<li>Observe ES logs:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2016-08-09 11:31:01,091][WARN ][http.netty4 ] [wtOV9Vb] caught exception while handling client http traffic, closing connection [id: 0x1320b717, L:/0:0:0:0:0:0:0:1:9200 - R:/0:0:0:0:0:0:0:1:54732]
java.lang.UnsupportedOperationException: unsupported message type: DefaultFullHttpResponse (expected: ByteBuf, FileRegion)
at io.netty.channel.nio.AbstractNioByteChannel.filterOutboundMessage(AbstractNioByteChannel.java:260)
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(AbstractChannel.java:799)
at io.netty.channel.DefaultChannelPipeline$HeadContext.write(DefaultChannelPipeline.java:1291)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:748)
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:811)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:824)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:804)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:841)
at io.netty.handler.codec.MessageAggregator.decode(MessageAggregator.java:222)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:571)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:474)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:428)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:398)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877)
at java.lang.Thread.run(Thread.java:745)"><pre class="notranslate"><code class="notranslate">[2016-08-09 11:31:01,091][WARN ][http.netty4 ] [wtOV9Vb] caught exception while handling client http traffic, closing connection [id: 0x1320b717, L:/0:0:0:0:0:0:0:1:9200 - R:/0:0:0:0:0:0:0:1:54732]
java.lang.UnsupportedOperationException: unsupported message type: DefaultFullHttpResponse (expected: ByteBuf, FileRegion)
at io.netty.channel.nio.AbstractNioByteChannel.filterOutboundMessage(AbstractNioByteChannel.java:260)
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(AbstractChannel.java:799)
at io.netty.channel.DefaultChannelPipeline$HeadContext.write(DefaultChannelPipeline.java:1291)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:748)
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:811)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:824)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:804)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:841)
at io.netty.handler.codec.MessageAggregator.decode(MessageAggregator.java:222)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:571)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:474)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:428)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:398)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877)
at java.lang.Thread.run(Thread.java:745)
</code></pre></div> | 0 |
<p dir="auto">Tested with Firefox last stable & developer edition (Aurora).<br>
If i open a new tab or one with content, and i drag it away (to open a new window), and move the cursor over Atom it closes.</p>
<p dir="auto">Here the shell output:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="mfkinder@wk-boe001:~$ atom
mfkinder@wk-boe001:~$ [14953:0213/170206:ERROR:browser_main_loop.cc(164)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[14983:0213/170206:INFO:renderer_main.cc(211)] Renderer process started
App load time: 314ms
[14953:0213/170208:INFO:CONSOLE(11)] "activate linter-jshint", source: /home/mfkinder/.atom/packages/linter-jshint/lib/init.coffee (11)
[14953:0213/170208:INFO:CONSOLE(79)] "Window load time: 1688ms", source: file:///usr/share/atom/resources/app/static/index.js (79)
The program 'atom' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAtom (invalid Atom parameter)'.
(Details: serial 495 error_code 5 request_code 20 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)"><pre class="notranslate">mfkinder@wk-boe001:<span class="pl-k">~</span>$ atom
mfkinder@wk-boe001:<span class="pl-k">~</span>$ [14953:0213/170206:ERROR:browser_main_loop.cc(164)] Running without the SUID sandbox<span class="pl-k">!</span> See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment <span class="pl-k">for</span> more information on developing with the sandbox on.
[14983:0213/170206:INFO:renderer_main.cc(211)] Renderer process started
App load time: 314ms
[14953:0213/170208:INFO:CONSOLE(11)] <span class="pl-s"><span class="pl-pds">"</span>activate linter-jshint<span class="pl-pds">"</span></span>, source: /home/mfkinder/.atom/packages/linter-jshint/lib/init.coffee (11)
[14953:0213/170208:INFO:CONSOLE(79)] <span class="pl-s"><span class="pl-pds">"</span>Window load time: 1688ms<span class="pl-pds">"</span></span>, source: file:///usr/share/atom/resources/app/static/index.js (79)
The program <span class="pl-s"><span class="pl-pds">'</span>atom<span class="pl-pds">'</span></span> received an X Window System error.
This probably reflects a bug <span class="pl-k">in</span> the program.
The error was <span class="pl-s"><span class="pl-pds">'</span>BadAtom (invalid Atom parameter)<span class="pl-pds">'</span></span>.
(Details: serial 495 error_code 5 request_code 20 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously<span class="pl-k">;</span>
that is, you will receive the error a <span class="pl-k">while</span> after causing it.
To debug your program, run it with the --sync <span class="pl-c1">command</span> line
option to change this behavior. You can <span class="pl-k">then</span> get a meaningful
backtrace from your debugger <span class="pl-k">if</span> you <span class="pl-c1">break</span> on the <span class="pl-en">gdk_x_error</span>() function.)</pre></div>
<p dir="auto">Here tested with "--safe"</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="mfkinder@wk-boe001:~$ atom --safe
mfkinder@wk-boe001:~$ [14753:0213/170133:ERROR:browser_main_loop.cc(164)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[14783:0213/170133:INFO:renderer_main.cc(211)] Renderer process started
App load time: 303ms
[14753:0213/170135:INFO:CONSOLE(79)] "Window load time: 1552ms", source: file:///usr/share/atom/resources/app/static/index.js (79)
The program 'atom' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAtom (invalid Atom parameter)'.
(Details: serial 448 error_code 5 request_code 20 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)"><pre class="notranslate">mfkinder@wk-boe001:<span class="pl-k">~</span>$ atom --safe
mfkinder@wk-boe001:<span class="pl-k">~</span>$ [14753:0213/170133:ERROR:browser_main_loop.cc(164)] Running without the SUID sandbox<span class="pl-k">!</span> See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment <span class="pl-k">for</span> more information on developing with the sandbox on.
[14783:0213/170133:INFO:renderer_main.cc(211)] Renderer process started
App load time: 303ms
[14753:0213/170135:INFO:CONSOLE(79)] <span class="pl-s"><span class="pl-pds">"</span>Window load time: 1552ms<span class="pl-pds">"</span></span>, source: file:///usr/share/atom/resources/app/static/index.js (79)
The program <span class="pl-s"><span class="pl-pds">'</span>atom<span class="pl-pds">'</span></span> received an X Window System error.
This probably reflects a bug <span class="pl-k">in</span> the program.
The error was <span class="pl-s"><span class="pl-pds">'</span>BadAtom (invalid Atom parameter)<span class="pl-pds">'</span></span>.
(Details: serial 448 error_code 5 request_code 20 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously<span class="pl-k">;</span>
that is, you will receive the error a <span class="pl-k">while</span> after causing it.
To debug your program, run it with the --sync <span class="pl-c1">command</span> line
option to change this behavior. You can <span class="pl-k">then</span> get a meaningful
backtrace from your debugger <span class="pl-k">if</span> you <span class="pl-c1">break</span> on the <span class="pl-en">gdk_x_error</span>() function.)</pre></div>
<p dir="auto">OS: Ubuntu 14.10 x64<br>
Plugins installed:<br>
mfkinder@wk-boe001:~$ apm list<br>
Built-in Atom packages (84)<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
└── [email protected]</p>
<p dir="auto">/home/mfkinder/.atom/packages (11)<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
├── [email protected]<br>
└── [email protected]</p> | <p dir="auto">Atom Version: 0.129.0<br>
Video of me triggering the bug: <a href="http://ara.sh/private/atom-crash.ogv" rel="nofollow">http://ara.sh/private/atom-crash.ogv</a><br>
Reproducible every time.</p>
<p dir="auto">Environment:<br>
Ubuntu 14.04 (all updates installed as of filing this issue)<br>
Unity desktop environment</p>
<p dir="auto">Repro steps:</p>
<ol dir="auto">
<li>Launch atom from the Terminal</li>
<li>Open a Firefox window (or use an existing one)</li>
<li>Drag the Firefox tab anywhere over the Atom window</li>
</ol>
<p dir="auto">Actual behavior:<br>
It crashes</p>
<p dir="auto">Expected behavior:<br>
Not crash :-)</p>
<p dir="auto">Additional Information:<br>
The terminal prints out the following after the crash:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[7950:0920/180947:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[7950:0920/180947:ERROR:browser_main_loop.cc(189)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
ATTENTION: default value of option force_s3tc_enable overridden by environment.
App load time: 88ms
[7984:0920/180947:INFO:renderer_main.cc(227)] Renderer process started
[7950:0920/180948:INFO:CONSOLE(18)] "Window load time: 778ms", source: /opt/atom/resources/app/src/window-bootstrap.js (18)
The program 'atom' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAtom (invalid Atom parameter)'.
(Details: serial 1360 error_code 5 request_code 20 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)"><pre class="notranslate"><code class="notranslate">[7950:0920/180947:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[7950:0920/180947:ERROR:browser_main_loop.cc(189)] GTK theme error: Unable to locate theme engine in module_path: "pixmap",
ATTENTION: default value of option force_s3tc_enable overridden by environment.
App load time: 88ms
[7984:0920/180947:INFO:renderer_main.cc(227)] Renderer process started
[7950:0920/180948:INFO:CONSOLE(18)] "Window load time: 778ms", source: /opt/atom/resources/app/src/window-bootstrap.js (18)
The program 'atom' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAtom (invalid Atom parameter)'.
(Details: serial 1360 error_code 5 request_code 20 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
</code></pre></div> | 1 |
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No</li>
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 10.14.5</li>
<li>TensorFlow installed from (source or binary): <code class="notranslate">pip install tensorflow==1.14.0</code></li>
<li>TensorFlow version (use command below): 1.14.0</li>
<li>Python version: 3.7.4 with virtualenv</li>
</ul>
<p dir="auto"><strong>Describe the current behavior</strong><br>
When I try to run <code class="notranslate">tensorboard --logdir=.</code> I get this ValueError: Duplicate plugins for name projector<br>
<strong>Describe the expected behavior</strong><br>
Tensorboard should launch<br>
<strong>Code to reproduce the issue</strong><br>
<code class="notranslate">tensorboard --logdir=.</code></p>
<p dir="auto"><strong>Other info / logs</strong><br>
Ideally, I would ultimately like to run <code class="notranslate"> tensorboard --logdir=gs://[bucket_name]</code>, but I have not even been able to use tensorboard for models with logdirs that are local.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "/Users/len/research/.venv/bin/tensorboard", line 10, in <module>
sys.exit(run_main())
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/main.py", line 64, in run_main
app.run(tensorboard.main, flags_parser=tensorboard.configure)
File "/Users/len/research/.venv/lib/python3.7/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/Users/len/research/.venv/lib/python3.7/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/program.py", line 228, in main
server = self._make_server()
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/program.py", line 309, in _make_server
self.assets_zip_provider)
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/backend/application.py", line 161, in standard_tensorboard_wsgi
reload_task)
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/backend/application.py", line 194, in TensorBoardWSGIApp
return TensorBoardWSGI(plugins, path_prefix)
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/backend/application.py", line 245, in __init__
raise ValueError('Duplicate plugins for name %s' % plugin.plugin_name)
ValueError: Duplicate plugins for name projector"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "/Users/len/research/.venv/bin/tensorboard", line 10, in <module>
sys.exit(run_main())
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/main.py", line 64, in run_main
app.run(tensorboard.main, flags_parser=tensorboard.configure)
File "/Users/len/research/.venv/lib/python3.7/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/Users/len/research/.venv/lib/python3.7/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/program.py", line 228, in main
server = self._make_server()
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/program.py", line 309, in _make_server
self.assets_zip_provider)
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/backend/application.py", line 161, in standard_tensorboard_wsgi
reload_task)
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/backend/application.py", line 194, in TensorBoardWSGIApp
return TensorBoardWSGI(plugins, path_prefix)
File "/Users/len/research/.venv/lib/python3.7/site-packages/tensorboard/backend/application.py", line 245, in __init__
raise ValueError('Duplicate plugins for name %s' % plugin.plugin_name)
ValueError: Duplicate plugins for name projector
</code></pre></div> | <p dir="auto">Hi!</p>
<p dir="auto">So far, I I have to say that TensorBoard is a really great tool to analyze the training procedure.<br>
However, I often find myself comparing various runs and wondering "wait, which version of my code was that and which parameters did I use?".<br>
Currently, the only way to "document" a Run is the name of the log directory - so I find myself encoding all kinds of cryptic acronyms into the directory name.</p>
<p dir="auto">What would be really awesome is some sort of feature that allows the training scripts to pass Data to the TensorBoard logs. This could be in any form, maybe as sort of "tags" or as key-value pairs, or simply as a plain old string called "description" or something.</p>
<p dir="auto">Is this something that sounds useful to others as well? Is this feasible?</p> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="key_1 = jax.random.PRNGKey(1)
key_2 = jax.random.PRNGKey(2)
print("output for key_1:", jax.random.randint(key_1, (), 0, 2**31))
print("output for key_2:", jax.random.randint(key_2, (), 0, 2**31))"><pre class="notranslate"><code class="notranslate">key_1 = jax.random.PRNGKey(1)
key_2 = jax.random.PRNGKey(2)
print("output for key_1:", jax.random.randint(key_1, (), 0, 2**31))
print("output for key_2:", jax.random.randint(key_2, (), 0, 2**31))
</code></pre></div>
<p dir="auto">yields</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="output for key_1: 0
output for key_2: 0"><pre class="notranslate"><code class="notranslate">output for key_1: 0
output for key_2: 0
</code></pre></div>
<p dir="auto">And indeed, the function returns 0 for any key you pass it, so long as <code class="notranslate">maxval >= 2**31</code>.</p>
<p dir="auto">I guess this is an issue with the dtype, since <code class="notranslate">maxval=2**31-1</code> works as expected.</p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check for duplicate issues.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Provide a complete example of how to reproduce the bug, wrapped in triple backticks like this:</li>
</ul>
<p dir="auto">When run on colab w/ GPU runtime the following code (<a href="https://colab.research.google.com/drive/1zFK5h_6Jnzw5kPRKpR9Dko4kVpQa2qxL" rel="nofollow">notebook</a>),</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import jax
import numpy as np
print(jax.__version__)
jax.scipy.linalg.sqrtm(np.random.uniform(size=(8,8)))"><pre class="notranslate"><code class="notranslate">import jax
import numpy as np
print(jax.__version__)
jax.scipy.linalg.sqrtm(np.random.uniform(size=(8,8)))
</code></pre></div>
<p dir="auto">results in,</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Include stack trace</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0.3.4
---------------------------------------------------------------------------
JaxStackTraceBeforeTransformation Traceback (most recent call last)
[/usr/lib/python3.7/runpy.py](https://localhost:8080/#) in _run_module_as_main(***failed resolving arguments***)
192 return _run_code(code, main_globals, None,
--> 193 "__main__", mod_spec)
194
53 frames
[/usr/lib/python3.7/runpy.py](https://localhost:8080/#) in _run_code(***failed resolving arguments***)
84 __spec__ = mod_spec)
---> 85 exec(code, run_globals)
86 return run_globals
[/usr/local/lib/python3.7/dist-packages/ipykernel_launcher.py](https://localhost:8080/#) in <module>()
15 from ipykernel import kernelapp as app
---> 16 app.launch_new_instance()
[/usr/local/lib/python3.7/dist-packages/traitlets/config/application.py](https://localhost:8080/#) in launch_instance(***failed resolving arguments***)
845 app.initialize(argv)
--> 846 app.start()
847
[/usr/local/lib/python3.7/dist-packages/ipykernel/kernelapp.py](https://localhost:8080/#) in start(***failed resolving arguments***)
498 try:
--> 499 self.io_loop.start()
500 except KeyboardInterrupt:
[/usr/local/lib/python3.7/dist-packages/tornado/platform/asyncio.py](https://localhost:8080/#) in start(***failed resolving arguments***)
131 asyncio.set_event_loop(self.asyncio_loop)
--> 132 self.asyncio_loop.run_forever()
133 finally:
[/usr/lib/python3.7/asyncio/base_events.py](https://localhost:8080/#) in run_forever(***failed resolving arguments***)
540 while True:
--> 541 self._run_once()
542 if self._stopping:
[/usr/lib/python3.7/asyncio/base_events.py](https://localhost:8080/#) in _run_once(***failed resolving arguments***)
1785 else:
-> 1786 handle._run()
1787 handle = None # Needed to break cycles when an exception occurs.
[/usr/lib/python3.7/asyncio/events.py](https://localhost:8080/#) in _run(***failed resolving arguments***)
87 try:
---> 88 self._context.run(self._callback, *self._args)
89 except Exception as exc:
[/usr/local/lib/python3.7/dist-packages/tornado/platform/asyncio.py](https://localhost:8080/#) in _handle_events(***failed resolving arguments***)
121 fileobj, handler_func = self.handlers[fd]
--> 122 handler_func(fileobj, events)
123
[/usr/local/lib/python3.7/dist-packages/tornado/stack_context.py](https://localhost:8080/#) in null_wrapper(***failed resolving arguments***)
299 _state.contexts = cap_contexts[0]
--> 300 return fn(*args, **kwargs)
301 finally:
[/usr/local/lib/python3.7/dist-packages/zmq/eventloop/zmqstream.py](https://localhost:8080/#) in _handle_events(***failed resolving arguments***)
451 if zmq_events & zmq.POLLIN and self.receiving():
--> 452 self._handle_recv()
453 if not self.socket:
[/usr/local/lib/python3.7/dist-packages/zmq/eventloop/zmqstream.py](https://localhost:8080/#) in _handle_recv(***failed resolving arguments***)
480 callback = self._recv_callback
--> 481 self._run_callback(callback, msg)
482
[/usr/local/lib/python3.7/dist-packages/zmq/eventloop/zmqstream.py](https://localhost:8080/#) in _run_callback(***failed resolving arguments***)
430 # inside our blanket exception handler rather than outside.
--> 431 callback(*args, **kwargs)
432 except Exception:
[/usr/local/lib/python3.7/dist-packages/tornado/stack_context.py](https://localhost:8080/#) in null_wrapper(***failed resolving arguments***)
299 _state.contexts = cap_contexts[0]
--> 300 return fn(*args, **kwargs)
301 finally:
[/usr/local/lib/python3.7/dist-packages/ipykernel/kernelbase.py](https://localhost:8080/#) in dispatcher(***failed resolving arguments***)
282 def dispatcher(msg):
--> 283 return self.dispatch_shell(stream, msg)
284 return dispatcher
[/usr/local/lib/python3.7/dist-packages/ipykernel/kernelbase.py](https://localhost:8080/#) in dispatch_shell(***failed resolving arguments***)
232 try:
--> 233 handler(stream, idents, msg)
234 except Exception:
[/usr/local/lib/python3.7/dist-packages/ipykernel/kernelbase.py](https://localhost:8080/#) in execute_request(***failed resolving arguments***)
398 reply_content = self.do_execute(code, silent, store_history,
--> 399 user_expressions, allow_stdin)
400
[/usr/local/lib/python3.7/dist-packages/ipykernel/ipkernel.py](https://localhost:8080/#) in do_execute(***failed resolving arguments***)
207 try:
--> 208 res = shell.run_cell(code, store_history=store_history, silent=silent)
209 finally:
[/usr/local/lib/python3.7/dist-packages/ipykernel/zmqshell.py](https://localhost:8080/#) in run_cell(***failed resolving arguments***)
536 self._last_traceback = None
--> 537 return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
538
[/usr/local/lib/python3.7/dist-packages/IPython/core/interactiveshell.py](https://localhost:8080/#) in run_cell(***failed resolving arguments***)
2717 has_raised = self.run_ast_nodes(code_ast.body, cell_name,
-> 2718 interactivity=interactivity, compiler=compiler, result=result)
2719
[/usr/local/lib/python3.7/dist-packages/IPython/core/interactiveshell.py](https://localhost:8080/#) in run_ast_nodes(***failed resolving arguments***)
2827 code = compiler(mod, cell_name, "single")
-> 2828 if self.run_code(code, result):
2829 return True
[/usr/local/lib/python3.7/dist-packages/IPython/core/interactiveshell.py](https://localhost:8080/#) in run_code(***failed resolving arguments***)
2881 #rprint('Running code', repr(code_obj)) # dbg
-> 2882 exec(code_obj, self.user_global_ns, self.user_ns)
2883 finally:
[<ipython-input-1-f00b9a3dc36a>](https://localhost:8080/#) in <module>()
5
----> 6 jax.scipy.linalg.sqrtm(np.random.uniform(size=(16,16)))
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in sqrtm(***failed resolving arguments***)
657 raise NotImplementedError("Blocked version is not implemented yet.")
--> 658 return _sqrtm(A)
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in _sqrtm(***failed resolving arguments***)
637 def _sqrtm(A):
--> 638 T, Z = schur(A, output='complex')
639 sqrt_T = _sqrtm_triu(T)
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in schur(***failed resolving arguments***)
116 "Expected 'output' to be either 'real' or 'complex', got output={}.".format(output))
--> 117 return _schur(a, output)
118
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in _schur(***failed resolving arguments***)
109 a = a.astype(jnp.result_type(a.dtype, 0j))
--> 110 return lax_linalg.schur(a)
111
JaxStackTraceBeforeTransformation: TypeError: _schur_translation_rule() got an unexpected keyword argument 'select_callable'
The preceding stack trace is the source of the JAX operation that, once transformed by JAX, triggered the following exception.
--------------------
The above exception was the direct cause of the following exception:
UnfilteredStackTrace Traceback (most recent call last)
[<ipython-input-1-f00b9a3dc36a>](https://localhost:8080/#) in <module>()
5
----> 6 jax.scipy.linalg.sqrtm(np.random.uniform(size=(16,16)))
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in sqrtm(A, blocksize)
657 raise NotImplementedError("Blocked version is not implemented yet.")
--> 658 return _sqrtm(A)
[/usr/local/lib/python3.7/dist-packages/jax/_src/traceback_util.py](https://localhost:8080/#) in reraise_with_filtered_traceback(*args, **kwargs)
161 try:
--> 162 return fun(*args, **kwargs)
163 except Exception as e:
[/usr/local/lib/python3.7/dist-packages/jax/_src/api.py](https://localhost:8080/#) in cache_miss(*args, **kwargs)
434 device=device, backend=backend, name=flat_fun.__name__,
--> 435 donated_invars=donated_invars, inline=inline)
436 out_pytree_def = out_tree()
[/usr/local/lib/python3.7/dist-packages/jax/core.py](https://localhost:8080/#) in bind(self, fun, *args, **params)
1708 def bind(self, fun, *args, **params):
-> 1709 return call_bind(self, fun, *args, **params)
1710
[/usr/local/lib/python3.7/dist-packages/jax/core.py](https://localhost:8080/#) in call_bind(primitive, fun, *args, **params)
1720 tracers = map(top_trace.full_raise, args)
-> 1721 outs = top_trace.process_call(primitive, fun, tracers, params)
1722 return map(full_lower, apply_todos(env_trace_todo(), outs))
[/usr/local/lib/python3.7/dist-packages/jax/core.py](https://localhost:8080/#) in process_call(self, primitive, f, tracers, params)
613 def process_call(self, primitive, f, tracers, params):
--> 614 return primitive.impl(f, *tracers, **params)
615 process_map = process_call
[/usr/local/lib/python3.7/dist-packages/jax/_src/dispatch.py](https://localhost:8080/#) in _xla_call_impl(***failed resolving arguments***)
142 compiled_fun = _xla_callable(fun, device, backend, name, donated_invars,
--> 143 *unsafe_map(arg_spec, args))
144 try:
[/usr/local/lib/python3.7/dist-packages/jax/linear_util.py](https://localhost:8080/#) in memoized_fun(fun, *args)
271 else:
--> 272 ans = call(fun, *args)
273 cache[key] = (ans, fun.stores)
[/usr/local/lib/python3.7/dist-packages/jax/_src/dispatch.py](https://localhost:8080/#) in _xla_callable_uncached(fun, device, backend, name, donated_invars, *arg_specs)
169 return lower_xla_callable(fun, device, backend, name, donated_invars,
--> 170 *arg_specs).compile().unsafe_call
171
[/usr/local/lib/python3.7/dist-packages/jax/_src/profiler.py](https://localhost:8080/#) in wrapper(*args, **kwargs)
205 with TraceAnnotation(name, **decorator_kwargs):
--> 206 return func(*args, **kwargs)
207 return wrapper
[/usr/local/lib/python3.7/dist-packages/jax/_src/dispatch.py](https://localhost:8080/#) in lower_xla_callable(fun, device, backend, name, donated_invars, *arg_specs)
259 module_name, closed_jaxpr, backend.platform,
--> 260 mlir.ReplicaAxisContext(axis_env), name_stack, donated_invars)
261 else:
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in lower_jaxpr_to_module(module_name, jaxpr, platform, axis_context, name_stack, donated_args, replicated_args, arg_shardings, result_shardings)
493 arg_shardings=arg_shardings, result_shardings=result_shardings,
--> 494 input_output_aliases=input_output_aliases)
495
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in lower_jaxpr_to_fun(ctx, name, jaxpr, public, replace_units_with_dummy, replace_tokens_with_dummy, replicated_args, arg_shardings, result_shardings, input_output_aliases)
636 jaxpr.jaxpr, map(ir_constants, jaxpr.consts),
--> 637 *args)
638 outs = []
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in jaxpr_subcomp(ctx, jaxpr, consts, *args)
722 ans = rule(rule_ctx, *map(_unwrap_singleton_ir_values, in_nodes),
--> 723 **eqn.params)
724
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in _xla_call_lower(***failed resolving arguments***)
783 backend, ctx.module_context, ctx.avals_in, ctx.avals_out,
--> 784 *args)
785
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in _call_lowering(fn_name, stack_name, call_jaxpr, backend, ctx, avals_in, avals_out, *args)
771 symbol_name = lower_jaxpr_to_fun(sub_ctx, fn_name,
--> 772 core.ClosedJaxpr(call_jaxpr, ())).name.value
773 call = func_dialect.CallOp(flat_output_types,
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in lower_jaxpr_to_fun(ctx, name, jaxpr, public, replace_units_with_dummy, replace_tokens_with_dummy, replicated_args, arg_shardings, result_shardings, input_output_aliases)
636 jaxpr.jaxpr, map(ir_constants, jaxpr.consts),
--> 637 *args)
638 outs = []
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in jaxpr_subcomp(ctx, jaxpr, consts, *args)
722 ans = rule(rule_ctx, *map(_unwrap_singleton_ir_values, in_nodes),
--> 723 **eqn.params)
724
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in cached_lowering(ctx, *args, **params)
935 if func is None:
--> 936 func = _emit_lowering_rule_as_fun(partial(f, **params), ctx)
937 ctx.module_context.cached_primitive_lowerings[key] = func
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in _emit_lowering_rule_as_fun(lowering_rule, ctx)
665 map(len, input_types))
--> 666 outs = lowering_rule(ctx, *_unwrap_singleton_ir_values(unflattened_args))
667 func_dialect.ReturnOp(util.flatten(map(wrap_singleton_ir_values, outs)))
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in fallback(ctx, *args, **params)
952 xla_computation = xla.primitive_subcomputation(
--> 953 module_ctx.platform, module_ctx.axis_env, prim, *ctx.avals_in, **params)
954 submodule_str = xc._xla.mlir.xla_computation_to_mlir_module(xla_computation)
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/xla.py](https://localhost:8080/#) in primitive_subcomputation(platform, axis_env, prim, *avals, **params)
445 name_stack=new_name_stack())
--> 446 ans = f(ctx.replace(builder=c), avals, None, *xla_args, **params)
447 if prim.multiple_results:
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/xla.py](https://localhost:8080/#) in f_new(ctx, avals_in, avals_out, *xla_args, **params)
1035 return jaxpr_subcomp(ctx, jaxpr, _xla_consts(ctx.builder, consts),
-> 1036 *xla_args)
1037 return f_new
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/xla.py](https://localhost:8080/#) in jaxpr_subcomp(ctx, jaxpr, consts, *args)
611 ans = rule(eqn_ctx, map(aval, eqn.invars), map(aval, eqn.outvars),
--> 612 *in_nodes, **eqn.params)
613
UnfilteredStackTrace: TypeError: _schur_translation_rule() got an unexpected keyword argument 'select_callable'
The stack trace below excludes JAX-internal frames.
The preceding is the original exception that occurred, unmodified.
--------------------
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
[<ipython-input-1-f00b9a3dc36a>](https://localhost:8080/#) in <module>()
4 print(jax.__version__)
5
----> 6 jax.scipy.linalg.sqrtm(np.random.uniform(size=(16,16)))
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in sqrtm(A, blocksize)
656 if blocksize > 1:
657 raise NotImplementedError("Blocked version is not implemented yet.")
--> 658 return _sqrtm(A)
TypeError: _schur_translation_rule() got an unexpected keyword argument 'select_callable'"><pre class="notranslate"><code class="notranslate">0.3.4
---------------------------------------------------------------------------
JaxStackTraceBeforeTransformation Traceback (most recent call last)
[/usr/lib/python3.7/runpy.py](https://localhost:8080/#) in _run_module_as_main(***failed resolving arguments***)
192 return _run_code(code, main_globals, None,
--> 193 "__main__", mod_spec)
194
53 frames
[/usr/lib/python3.7/runpy.py](https://localhost:8080/#) in _run_code(***failed resolving arguments***)
84 __spec__ = mod_spec)
---> 85 exec(code, run_globals)
86 return run_globals
[/usr/local/lib/python3.7/dist-packages/ipykernel_launcher.py](https://localhost:8080/#) in <module>()
15 from ipykernel import kernelapp as app
---> 16 app.launch_new_instance()
[/usr/local/lib/python3.7/dist-packages/traitlets/config/application.py](https://localhost:8080/#) in launch_instance(***failed resolving arguments***)
845 app.initialize(argv)
--> 846 app.start()
847
[/usr/local/lib/python3.7/dist-packages/ipykernel/kernelapp.py](https://localhost:8080/#) in start(***failed resolving arguments***)
498 try:
--> 499 self.io_loop.start()
500 except KeyboardInterrupt:
[/usr/local/lib/python3.7/dist-packages/tornado/platform/asyncio.py](https://localhost:8080/#) in start(***failed resolving arguments***)
131 asyncio.set_event_loop(self.asyncio_loop)
--> 132 self.asyncio_loop.run_forever()
133 finally:
[/usr/lib/python3.7/asyncio/base_events.py](https://localhost:8080/#) in run_forever(***failed resolving arguments***)
540 while True:
--> 541 self._run_once()
542 if self._stopping:
[/usr/lib/python3.7/asyncio/base_events.py](https://localhost:8080/#) in _run_once(***failed resolving arguments***)
1785 else:
-> 1786 handle._run()
1787 handle = None # Needed to break cycles when an exception occurs.
[/usr/lib/python3.7/asyncio/events.py](https://localhost:8080/#) in _run(***failed resolving arguments***)
87 try:
---> 88 self._context.run(self._callback, *self._args)
89 except Exception as exc:
[/usr/local/lib/python3.7/dist-packages/tornado/platform/asyncio.py](https://localhost:8080/#) in _handle_events(***failed resolving arguments***)
121 fileobj, handler_func = self.handlers[fd]
--> 122 handler_func(fileobj, events)
123
[/usr/local/lib/python3.7/dist-packages/tornado/stack_context.py](https://localhost:8080/#) in null_wrapper(***failed resolving arguments***)
299 _state.contexts = cap_contexts[0]
--> 300 return fn(*args, **kwargs)
301 finally:
[/usr/local/lib/python3.7/dist-packages/zmq/eventloop/zmqstream.py](https://localhost:8080/#) in _handle_events(***failed resolving arguments***)
451 if zmq_events & zmq.POLLIN and self.receiving():
--> 452 self._handle_recv()
453 if not self.socket:
[/usr/local/lib/python3.7/dist-packages/zmq/eventloop/zmqstream.py](https://localhost:8080/#) in _handle_recv(***failed resolving arguments***)
480 callback = self._recv_callback
--> 481 self._run_callback(callback, msg)
482
[/usr/local/lib/python3.7/dist-packages/zmq/eventloop/zmqstream.py](https://localhost:8080/#) in _run_callback(***failed resolving arguments***)
430 # inside our blanket exception handler rather than outside.
--> 431 callback(*args, **kwargs)
432 except Exception:
[/usr/local/lib/python3.7/dist-packages/tornado/stack_context.py](https://localhost:8080/#) in null_wrapper(***failed resolving arguments***)
299 _state.contexts = cap_contexts[0]
--> 300 return fn(*args, **kwargs)
301 finally:
[/usr/local/lib/python3.7/dist-packages/ipykernel/kernelbase.py](https://localhost:8080/#) in dispatcher(***failed resolving arguments***)
282 def dispatcher(msg):
--> 283 return self.dispatch_shell(stream, msg)
284 return dispatcher
[/usr/local/lib/python3.7/dist-packages/ipykernel/kernelbase.py](https://localhost:8080/#) in dispatch_shell(***failed resolving arguments***)
232 try:
--> 233 handler(stream, idents, msg)
234 except Exception:
[/usr/local/lib/python3.7/dist-packages/ipykernel/kernelbase.py](https://localhost:8080/#) in execute_request(***failed resolving arguments***)
398 reply_content = self.do_execute(code, silent, store_history,
--> 399 user_expressions, allow_stdin)
400
[/usr/local/lib/python3.7/dist-packages/ipykernel/ipkernel.py](https://localhost:8080/#) in do_execute(***failed resolving arguments***)
207 try:
--> 208 res = shell.run_cell(code, store_history=store_history, silent=silent)
209 finally:
[/usr/local/lib/python3.7/dist-packages/ipykernel/zmqshell.py](https://localhost:8080/#) in run_cell(***failed resolving arguments***)
536 self._last_traceback = None
--> 537 return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
538
[/usr/local/lib/python3.7/dist-packages/IPython/core/interactiveshell.py](https://localhost:8080/#) in run_cell(***failed resolving arguments***)
2717 has_raised = self.run_ast_nodes(code_ast.body, cell_name,
-> 2718 interactivity=interactivity, compiler=compiler, result=result)
2719
[/usr/local/lib/python3.7/dist-packages/IPython/core/interactiveshell.py](https://localhost:8080/#) in run_ast_nodes(***failed resolving arguments***)
2827 code = compiler(mod, cell_name, "single")
-> 2828 if self.run_code(code, result):
2829 return True
[/usr/local/lib/python3.7/dist-packages/IPython/core/interactiveshell.py](https://localhost:8080/#) in run_code(***failed resolving arguments***)
2881 #rprint('Running code', repr(code_obj)) # dbg
-> 2882 exec(code_obj, self.user_global_ns, self.user_ns)
2883 finally:
[<ipython-input-1-f00b9a3dc36a>](https://localhost:8080/#) in <module>()
5
----> 6 jax.scipy.linalg.sqrtm(np.random.uniform(size=(16,16)))
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in sqrtm(***failed resolving arguments***)
657 raise NotImplementedError("Blocked version is not implemented yet.")
--> 658 return _sqrtm(A)
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in _sqrtm(***failed resolving arguments***)
637 def _sqrtm(A):
--> 638 T, Z = schur(A, output='complex')
639 sqrt_T = _sqrtm_triu(T)
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in schur(***failed resolving arguments***)
116 "Expected 'output' to be either 'real' or 'complex', got output={}.".format(output))
--> 117 return _schur(a, output)
118
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in _schur(***failed resolving arguments***)
109 a = a.astype(jnp.result_type(a.dtype, 0j))
--> 110 return lax_linalg.schur(a)
111
JaxStackTraceBeforeTransformation: TypeError: _schur_translation_rule() got an unexpected keyword argument 'select_callable'
The preceding stack trace is the source of the JAX operation that, once transformed by JAX, triggered the following exception.
--------------------
The above exception was the direct cause of the following exception:
UnfilteredStackTrace Traceback (most recent call last)
[<ipython-input-1-f00b9a3dc36a>](https://localhost:8080/#) in <module>()
5
----> 6 jax.scipy.linalg.sqrtm(np.random.uniform(size=(16,16)))
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in sqrtm(A, blocksize)
657 raise NotImplementedError("Blocked version is not implemented yet.")
--> 658 return _sqrtm(A)
[/usr/local/lib/python3.7/dist-packages/jax/_src/traceback_util.py](https://localhost:8080/#) in reraise_with_filtered_traceback(*args, **kwargs)
161 try:
--> 162 return fun(*args, **kwargs)
163 except Exception as e:
[/usr/local/lib/python3.7/dist-packages/jax/_src/api.py](https://localhost:8080/#) in cache_miss(*args, **kwargs)
434 device=device, backend=backend, name=flat_fun.__name__,
--> 435 donated_invars=donated_invars, inline=inline)
436 out_pytree_def = out_tree()
[/usr/local/lib/python3.7/dist-packages/jax/core.py](https://localhost:8080/#) in bind(self, fun, *args, **params)
1708 def bind(self, fun, *args, **params):
-> 1709 return call_bind(self, fun, *args, **params)
1710
[/usr/local/lib/python3.7/dist-packages/jax/core.py](https://localhost:8080/#) in call_bind(primitive, fun, *args, **params)
1720 tracers = map(top_trace.full_raise, args)
-> 1721 outs = top_trace.process_call(primitive, fun, tracers, params)
1722 return map(full_lower, apply_todos(env_trace_todo(), outs))
[/usr/local/lib/python3.7/dist-packages/jax/core.py](https://localhost:8080/#) in process_call(self, primitive, f, tracers, params)
613 def process_call(self, primitive, f, tracers, params):
--> 614 return primitive.impl(f, *tracers, **params)
615 process_map = process_call
[/usr/local/lib/python3.7/dist-packages/jax/_src/dispatch.py](https://localhost:8080/#) in _xla_call_impl(***failed resolving arguments***)
142 compiled_fun = _xla_callable(fun, device, backend, name, donated_invars,
--> 143 *unsafe_map(arg_spec, args))
144 try:
[/usr/local/lib/python3.7/dist-packages/jax/linear_util.py](https://localhost:8080/#) in memoized_fun(fun, *args)
271 else:
--> 272 ans = call(fun, *args)
273 cache[key] = (ans, fun.stores)
[/usr/local/lib/python3.7/dist-packages/jax/_src/dispatch.py](https://localhost:8080/#) in _xla_callable_uncached(fun, device, backend, name, donated_invars, *arg_specs)
169 return lower_xla_callable(fun, device, backend, name, donated_invars,
--> 170 *arg_specs).compile().unsafe_call
171
[/usr/local/lib/python3.7/dist-packages/jax/_src/profiler.py](https://localhost:8080/#) in wrapper(*args, **kwargs)
205 with TraceAnnotation(name, **decorator_kwargs):
--> 206 return func(*args, **kwargs)
207 return wrapper
[/usr/local/lib/python3.7/dist-packages/jax/_src/dispatch.py](https://localhost:8080/#) in lower_xla_callable(fun, device, backend, name, donated_invars, *arg_specs)
259 module_name, closed_jaxpr, backend.platform,
--> 260 mlir.ReplicaAxisContext(axis_env), name_stack, donated_invars)
261 else:
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in lower_jaxpr_to_module(module_name, jaxpr, platform, axis_context, name_stack, donated_args, replicated_args, arg_shardings, result_shardings)
493 arg_shardings=arg_shardings, result_shardings=result_shardings,
--> 494 input_output_aliases=input_output_aliases)
495
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in lower_jaxpr_to_fun(ctx, name, jaxpr, public, replace_units_with_dummy, replace_tokens_with_dummy, replicated_args, arg_shardings, result_shardings, input_output_aliases)
636 jaxpr.jaxpr, map(ir_constants, jaxpr.consts),
--> 637 *args)
638 outs = []
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in jaxpr_subcomp(ctx, jaxpr, consts, *args)
722 ans = rule(rule_ctx, *map(_unwrap_singleton_ir_values, in_nodes),
--> 723 **eqn.params)
724
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in _xla_call_lower(***failed resolving arguments***)
783 backend, ctx.module_context, ctx.avals_in, ctx.avals_out,
--> 784 *args)
785
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in _call_lowering(fn_name, stack_name, call_jaxpr, backend, ctx, avals_in, avals_out, *args)
771 symbol_name = lower_jaxpr_to_fun(sub_ctx, fn_name,
--> 772 core.ClosedJaxpr(call_jaxpr, ())).name.value
773 call = func_dialect.CallOp(flat_output_types,
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in lower_jaxpr_to_fun(ctx, name, jaxpr, public, replace_units_with_dummy, replace_tokens_with_dummy, replicated_args, arg_shardings, result_shardings, input_output_aliases)
636 jaxpr.jaxpr, map(ir_constants, jaxpr.consts),
--> 637 *args)
638 outs = []
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in jaxpr_subcomp(ctx, jaxpr, consts, *args)
722 ans = rule(rule_ctx, *map(_unwrap_singleton_ir_values, in_nodes),
--> 723 **eqn.params)
724
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in cached_lowering(ctx, *args, **params)
935 if func is None:
--> 936 func = _emit_lowering_rule_as_fun(partial(f, **params), ctx)
937 ctx.module_context.cached_primitive_lowerings[key] = func
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in _emit_lowering_rule_as_fun(lowering_rule, ctx)
665 map(len, input_types))
--> 666 outs = lowering_rule(ctx, *_unwrap_singleton_ir_values(unflattened_args))
667 func_dialect.ReturnOp(util.flatten(map(wrap_singleton_ir_values, outs)))
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/mlir.py](https://localhost:8080/#) in fallback(ctx, *args, **params)
952 xla_computation = xla.primitive_subcomputation(
--> 953 module_ctx.platform, module_ctx.axis_env, prim, *ctx.avals_in, **params)
954 submodule_str = xc._xla.mlir.xla_computation_to_mlir_module(xla_computation)
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/xla.py](https://localhost:8080/#) in primitive_subcomputation(platform, axis_env, prim, *avals, **params)
445 name_stack=new_name_stack())
--> 446 ans = f(ctx.replace(builder=c), avals, None, *xla_args, **params)
447 if prim.multiple_results:
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/xla.py](https://localhost:8080/#) in f_new(ctx, avals_in, avals_out, *xla_args, **params)
1035 return jaxpr_subcomp(ctx, jaxpr, _xla_consts(ctx.builder, consts),
-> 1036 *xla_args)
1037 return f_new
[/usr/local/lib/python3.7/dist-packages/jax/interpreters/xla.py](https://localhost:8080/#) in jaxpr_subcomp(ctx, jaxpr, consts, *args)
611 ans = rule(eqn_ctx, map(aval, eqn.invars), map(aval, eqn.outvars),
--> 612 *in_nodes, **eqn.params)
613
UnfilteredStackTrace: TypeError: _schur_translation_rule() got an unexpected keyword argument 'select_callable'
The stack trace below excludes JAX-internal frames.
The preceding is the original exception that occurred, unmodified.
--------------------
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
[<ipython-input-1-f00b9a3dc36a>](https://localhost:8080/#) in <module>()
4 print(jax.__version__)
5
----> 6 jax.scipy.linalg.sqrtm(np.random.uniform(size=(16,16)))
[/usr/local/lib/python3.7/dist-packages/jax/_src/scipy/linalg.py](https://localhost:8080/#) in sqrtm(A, blocksize)
656 if blocksize > 1:
657 raise NotImplementedError("Blocked version is not implemented yet.")
--> 658 return _sqrtm(A)
TypeError: _schur_translation_rule() got an unexpected keyword argument 'select_callable'
</code></pre></div> | 0 |
<p dir="auto">[PowerToys Run] Clear Inputbox after Search</p>
<p dir="auto">It would be nice to clear the Inputbox (Searchtext) after choosing a result.<br>
It can be an option in settings menu to switch on or off.</p> | <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/65631993/82387225-1a749600-9a54-11ea-8e53-7f5a316b176d.gif"><img src="https://user-images.githubusercontent.com/65631993/82387225-1a749600-9a54-11ea-8e53-7f5a316b176d.gif" alt="vl9jLZAIRn_Trim-output" data-animated-image="" style="max-width: 100%;"></a><br>
as you can see it goes to the same window i searched before . I am not very good at explaining i hope you can get what im trying to say</p> | 1 |
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">After upgrading to 3.0.0, colormaps added to images with mpl_toolkits.axes_grid1.make_axes_locatable().append_axes overwrite the entire image. This happens in a jupyter notebook with %matplotlib inline but not with %matplotlib notebook. Also sometimes seen in scripts saving to .PNG (but I cannot reproduce it today).</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<p dir="auto">This should be run as a Jupyter Notebook so see the problem.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
import numpy as np
a = np.random.normal(size=(300,300))
cmap = 'hot'
fig, ax = plt.subplots(figsize=(6,5))
imshow = ax.imshow(a,cmap=cmap)
divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.05)
plt.colorbar(imshow, cax=cax)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">from</span> <span class="pl-s1">mpl_toolkits</span>.<span class="pl-s1">axes_grid1</span> <span class="pl-k">import</span> <span class="pl-s1">make_axes_locatable</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">normal</span>(<span class="pl-s1">size</span><span class="pl-c1">=</span>(<span class="pl-c1">300</span>,<span class="pl-c1">300</span>))
<span class="pl-s1">cmap</span> <span class="pl-c1">=</span> <span class="pl-s">'hot'</span>
<span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>(<span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">6</span>,<span class="pl-c1">5</span>))
<span class="pl-s1">imshow</span> <span class="pl-c1">=</span> <span class="pl-s1">ax</span>.<span class="pl-en">imshow</span>(<span class="pl-s1">a</span>,<span class="pl-s1">cmap</span><span class="pl-c1">=</span><span class="pl-s1">cmap</span>)
<span class="pl-s1">divider</span> <span class="pl-c1">=</span> <span class="pl-en">make_axes_locatable</span>(<span class="pl-s1">ax</span>)
<span class="pl-s1">cax</span> <span class="pl-c1">=</span> <span class="pl-s1">divider</span>.<span class="pl-en">append_axes</span>(<span class="pl-s">"right"</span>, <span class="pl-s1">size</span><span class="pl-c1">=</span><span class="pl-s">"5%"</span>, <span class="pl-s1">pad</span><span class="pl-c1">=</span><span class="pl-c1">0.05</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">colorbar</span>(<span class="pl-s1">imshow</span>, <span class="pl-s1">cax</span><span class="pl-c1">=</span><span class="pl-s1">cax</span>)</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<p dir="auto">The colorbar overwrites the entire image.</p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">A nice colorbar next to the image - it worked in v. 2.1.1 and I am 99% sure it worked in later 2.X versions of matplotlib.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: MacOS 10.13.6 AND Ubuntu 18.04.1</li>
<li>Matplotlib version: 3.0.0</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): module://ipykernel.pylab.backend_inline</li>
<li>Python version: 3.7.0 and 3.6.6</li>
<li>Jupyter version (if applicable): notebook 5.7.0</li>
<li>Other libraries:</li>
</ul> | <h3 dir="auto">Problem</h3>
<p dir="auto">As discussed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1323308840" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/23525" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/23525/hovercard" href="https://github.com/matplotlib/matplotlib/pull/23525">#23525</a>, the legend treats every label as distinct and will therefore display them even when visually indistinguishable.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1300499/185444858-4a539a36-7376-46ba-81be-6270ac235eca.png"><img src="https://user-images.githubusercontent.com/1300499/185444858-4a539a36-7376-46ba-81be-6270ac235eca.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Proposed solution</h3>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timhoffm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timhoffm">@timhoffm</a> raised the good point that we don't want to break the artist-(label, handle) link in case the artist gets updated, so I think an alternative solution is maybe to have this logic in the legend. Something like a <code class="notranslate">duplicate</code> keyword argument to legend:</p>
<ul dir="auto">
<li><code class="notranslate">duplicate=True</code>, default, current behavior</li>
<li><code class="notranslate">duplicate=False</code> - triggers a check of legend objects. If multiple legend handles have the same properties (class, color/edgecolor, hatch, size/width/edgewidth, etc) and the same label, then a new handle with those properties linked to all the artists is shown in place of the original handles.</li>
</ul>
<p dir="auto">I'm not sure if this is even doable in the current architecture, but if possible this would be designed so that updates to properties that update handles/legends propagate back to create new entries on the legend as needed. The advantage of this approach is that it would facilitate explicitly linking legend labels & handles to multiple artists.</p>
<p dir="auto">I think currently duplicates are eliminated manually either by omitting the labels on some artists or creating a custom legend handle. Neither approach preserves a link between a legend entry and all the artists it is intended to describe.</p> | 0 |
<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Can you help us out in labelling this by telling us what kind of ticket this this? You can say:</p>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">winrm_v2_fixes <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/b07f8e7a7e113d2b55cca517aab26f6ee504e53f/hovercard" href="https://github.com/ansible/ansible/commit/b07f8e7a7e113d2b55cca517aab26f6ee504e53f"><tt>b07f8e7</tt></a> (currently in PR, shouldn't matter)</p>
<h5 dir="auto">Ansible Configuration:</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Control node: ubuntu 14.04, target node Windows 2012R2</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">I have a role with a delegate_to: 127.0.0.1 which loops but should never report "changed". Although changed_when: Never is set, it reports changed on V2. The V1 branch stays silent as it should</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Use the role trondhindenes.win_reboot with the following vars:<br>
winreboot_simulate: yes (note that this will reboot the target node)</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">None of the task in the role should report change</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">The task "Looping while waiting for WinRM" reports changed.</p> | <h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">1.9.4</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Controller OSX 10.10.5<br>
Targe nodes CentOS 6.6</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Using ":" as a key:value format in /etc/ansible/facts/* it seems the behavior varies, sometimes omitting one of the values and displaying only the first one while other times if I have only 1 line using ":" and the others are without then it's displaying the output accurate .</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Different examples bellow :</p>
<h6 dir="auto">1</h6>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[tags]
role:db
role:slave"><pre class="notranslate"><code class="notranslate">[tags]
role:db
role:slave
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "slave"
}
},"><pre class="notranslate"><code class="notranslate">success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "slave"
}
},
</code></pre></div>
<h6 dir="auto">2</h6>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[tags]
role:db=
role:slave="><pre class="notranslate"><code class="notranslate">[tags]
role:db=
role:slave=
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "slave="
}
},"><pre class="notranslate"><code class="notranslate">success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "slave="
}
},
</code></pre></div>
<h6 dir="auto">3</h6>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[tags]
role:db=
slave="><pre class="notranslate"><code class="notranslate">[tags]
role:db=
slave=
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "db=",
"slave": ""
}
},"><pre class="notranslate"><code class="notranslate">success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "db=",
"slave": ""
}
},
</code></pre></div>
<h6 dir="auto">4</h6>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[tags]
role:db=
role:slave="><pre class="notranslate"><code class="notranslate">[tags]
role:db=
role:slave=
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "slave="
}
},"><pre class="notranslate"><code class="notranslate">success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "slave="
}
},
</code></pre></div>
<h6 dir="auto">5</h6>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[tags]
role:db
role:slave"><pre class="notranslate"><code class="notranslate">[tags]
role:db
role:slave
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "slave"
}
},"><pre class="notranslate"><code class="notranslate">success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "slave"
}
},
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[tags]
role:db
role:slave"><pre class="notranslate"><code class="notranslate">[tags]
role:db
role:slave
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "db",
"role": "slave"
}
},"><pre class="notranslate"><code class="notranslate">success >> {
"ansible_facts": {
"ansible_local": {
"monitoring": {
"tags": {
"role": "db",
"role": "slave"
}
},
</code></pre></div>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">See steps To Reproduce section.</p> | 0 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/xxxx</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.
<ul dir="auto">
<li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/galkin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/galkin">@galkin</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/SimonSchick/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/SimonSchick">@SimonSchick</a> and many others (and git blame doesn't load them all...)</li>
</ul>
</li>
</ul>
<p dir="auto">The Node typings appear to be incompatible with tsc 3.6.4:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~/src/DefinitelyTyped/types/node $ tsc --version
Version 3.6.4
~/src/DefinitelyTyped/types/node $ tsc
../../../../.config/yarn/global/node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6 - error TS2300: Duplicate identifier 'IteratorResult'.
41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
~~~~~~~~~~~~~~
index.d.ts:72:11
72 interface IteratorResult<T> { }
~~~~~~~~~~~~~~
'IteratorResult' was also declared here.
index.d.ts:72:11 - error TS2300: Duplicate identifier 'IteratorResult'.
72 interface IteratorResult<T> { }
~~~~~~~~~~~~~~
../../../../.config/yarn/global/node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6
41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
~~~~~~~~~~~~~~
'IteratorResult' was also declared here.
test/querystring.ts:47:11 - error TS2322: Type 'ParsedUrlQueryInput' is not assignable to type 'string | ParsedUrlQuery | null'.
Type 'ParsedUrlQueryInput' is not assignable to type 'string'.
47 const query: string | null | querystring.ParsedUrlQuery = queryInput;
~~~~~
Found 3 errors."><pre class="notranslate"><code class="notranslate">~/src/DefinitelyTyped/types/node $ tsc --version
Version 3.6.4
~/src/DefinitelyTyped/types/node $ tsc
../../../../.config/yarn/global/node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6 - error TS2300: Duplicate identifier 'IteratorResult'.
41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
~~~~~~~~~~~~~~
index.d.ts:72:11
72 interface IteratorResult<T> { }
~~~~~~~~~~~~~~
'IteratorResult' was also declared here.
index.d.ts:72:11 - error TS2300: Duplicate identifier 'IteratorResult'.
72 interface IteratorResult<T> { }
~~~~~~~~~~~~~~
../../../../.config/yarn/global/node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6
41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
~~~~~~~~~~~~~~
'IteratorResult' was also declared here.
test/querystring.ts:47:11 - error TS2322: Type 'ParsedUrlQueryInput' is not assignable to type 'string | ParsedUrlQuery | null'.
Type 'ParsedUrlQueryInput' is not assignable to type 'string'.
47 const query: string | null | querystring.ParsedUrlQuery = queryInput;
~~~~~
Found 3 errors.
</code></pre></div> | <p dir="auto">I created my typings repository before, but since this one is already much more popular I think that I should move my typings here, so they can reach more people and people can improve them.</p>
<p dir="auto">So if you don't mind, can I move my typing here?</p>
<p dir="auto">Thanks in advance.</p>
<p dir="auto">PS: My repository is this one: <a href="https://github.com/soywiz/typescript-node-definitions">https://github.com/soywiz/typescript-node-definitions</a></p> | 0 |
<p dir="auto">In 0.10.8, if I have a TypeScript Definition for a JavaScript file, there is validation done on the parameters. This was particularly useful for finding broken APIs.</p>
<p dir="auto">Example of definition file and code:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7843164/13714107/8da20336-e79a-11e5-87e5-8a3164caabec.png"><img src="https://cloud.githubusercontent.com/assets/7843164/13714107/8da20336-e79a-11e5-87e5-8a3164caabec.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">In 0.10.8, a warning is shown for an incorrect type:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7843164/13714116/9f7416f8-e79a-11e5-9063-7b0ed08021f5.png"><img src="https://cloud.githubusercontent.com/assets/7843164/13714116/9f7416f8-e79a-11e5-9063-7b0ed08021f5.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Now, in 0.10.10, there is no validation at all. The "100" shows as being valid:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7843164/13714176/0722b250-e79b-11e5-9cf5-c353ab67501c.png"><img src="https://cloud.githubusercontent.com/assets/7843164/13714176/0722b250-e79b-11e5-9cf5-c353ab67501c.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Losing the validation is a big loss. When switching to Salsa, was this the intention? Is there any properties that can be set to have the JavaScript intellisense + validation go back to the old engine (I believe it was using the TypeScript engine).</p>
<p dir="auto">Thanks</p> | <p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="129227097" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/6658" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/6658/hovercard" href="https://github.com/microsoft/TypeScript/issues/6658">#6658</a> for background.</p>
<p dir="auto">Currently for JavaScript files we provide a very limited set of errors, mostly for syntax errors. There are a number of grammatical and type errors that would be useful to display also.</p>
<p dir="auto">Brief notes from ad hoc discussion in the team room include:</p>
<ul dir="auto">
<li>Move the code that flags TypeScript syntax in JavaScript files for better error handling</li>
<li>Add a distinction between errors and warnings to avoid "valid" JavaScript containing errors</li>
<li>Make the warnings user configurable as part of the project (i.e. may enable/disable certain warnings)</li>
</ul>
<p dir="auto">More detailed design to come...</p> | 1 |
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code</strong>: yes</li>
<li><strong>OS Platform and Distribution</strong>: Linux Ubuntu 16.04</li>
<li><strong>TensorFlow installed from</strong>: source</li>
<li><strong>TensorFlow version</strong>: v1.2.0-rc0-312-g0b72359 1.2.0-rc0</li>
<li><strong>Bazel version</strong>: 0.4.5</li>
<li><strong>CUDA/cuDNN version</strong>: 8.0/5.1</li>
<li><strong>GPU model and memory</strong>: NVIDIA GeForce GTX 750 Ti</li>
</ul>
<p dir="auto">After recompiling TensorFlow I got this strange log message.<br>
I doesn't seem to affect any of the computation.<br>
All of the other tools behave as expected.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="WARNING:tensorflow:Error encountered when serializing LAYER_NAME_UIDS.
Type is unsupported, or the types of the items don't match field type in CollectionDef.
'dict' object has no attribute 'name'"><pre class="notranslate"><code class="notranslate">WARNING:tensorflow:Error encountered when serializing LAYER_NAME_UIDS.
Type is unsupported, or the types of the items don't match field type in CollectionDef.
'dict' object has no attribute 'name'
</code></pre></div> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "AI_control_4layer.py", line 218, in <module>
writer)
File "/home/longfei/Repository/drl_navigation/saved_neural_qlearning.py", line 61, in __init__
self.create_variables()
File "/home/longfei/Repository/drl_navigation/saved_neural_qlearning.py", line 148, in create_variables
self.train_op = self.optimizer.apply_gradients(gradients)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py", line 412, in apply_gradients
self._create_slots(var_list)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/rmsprop.py", line 101, in _create_slots
self._get_or_make_slot(v, val_rms, "rms", self._name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py", line 639, in _get_or_make_slot
named_slots[var] = slot_creator.create_slot(var, val, op_name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 101, in create_slot
return _create_slot_var(primary, val, '')
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 55, in _create_slot_var
slot = variable_scope.get_variable(scope, initializer=val, trainable=False)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 988, in get_variable
custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 890, in get_variable
custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 348, in get_variable
validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 333, in _true_getter
caching_device=caching_device, validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 684, in _get_single_variable
validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 226, in __init__
expected_shape=expected_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 322, in _init_from_args
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/state_ops.py", line 178, in variable_op_v2
shared_name=shared_name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_state_ops.py", line 708, in _variable_v2
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2398, in create_op
self._add_op(ret)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2099, in _add_op
"is already used" % op.name)
ValueError: cannot add op with name q_network/W_conv1/RMSProp as that name is already used"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "AI_control_4layer.py", line 218, in <module>
writer)
File "/home/longfei/Repository/drl_navigation/saved_neural_qlearning.py", line 61, in __init__
self.create_variables()
File "/home/longfei/Repository/drl_navigation/saved_neural_qlearning.py", line 148, in create_variables
self.train_op = self.optimizer.apply_gradients(gradients)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py", line 412, in apply_gradients
self._create_slots(var_list)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/rmsprop.py", line 101, in _create_slots
self._get_or_make_slot(v, val_rms, "rms", self._name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py", line 639, in _get_or_make_slot
named_slots[var] = slot_creator.create_slot(var, val, op_name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 101, in create_slot
return _create_slot_var(primary, val, '')
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 55, in _create_slot_var
slot = variable_scope.get_variable(scope, initializer=val, trainable=False)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 988, in get_variable
custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 890, in get_variable
custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 348, in get_variable
validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 333, in _true_getter
caching_device=caching_device, validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 684, in _get_single_variable
validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 226, in __init__
expected_shape=expected_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 322, in _init_from_args
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/state_ops.py", line 178, in variable_op_v2
shared_name=shared_name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_state_ops.py", line 708, in _variable_v2
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2398, in create_op
self._add_op(ret)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2099, in _add_op
"is already used" % op.name)
ValueError: cannot add op with name q_network/W_conv1/RMSProp as that name is already used
</code></pre></div> | 0 |
<p dir="auto">I have not had a chance to test this under other conditions yet, but i suspect it may affect other non mod_rewrite url rewriting modules, and does not happen with path info based routing, nor when a bundle:controller:action style path is given.</p>
<p dir="auto">given the twig snippet:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{% render url('some_partial') %}"><pre class="notranslate"><code class="notranslate">{% render url('some_partial') %}
</code></pre></div>
<p dir="auto">the sub request to handle the render tag seems to ignore the uri passed to it and use UNENCODED_URL instead, this continues round and round until the stack gets too big and it errors.</p>
<p dir="auto">from a really quick look it appears to be a conflict in how <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Request.php#L1461">Request::prepareRequestUri</a> retrieves the uri and how <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Request.php#L268">Request::create</a> creates it, along with the fact <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/RenderingStrategy/DefaultRenderingStrategy.php#L77">DefaultRenderingStratergy::createSubRequest</a> passes through the original server array.</p>
<p dir="auto">Off the top of my head a solution might be to check for a SYMFONY_URI environment variable above all else and set that in create method, this would ensure the frameworks value is always honoured.</p> | <p dir="auto">I am using child forms to prevent code duplication as explained here: <a href="https://symfony.com/doc/current/form/inherit_data_option.html" rel="nofollow">https://symfony.com/doc/current/form/inherit_data_option.html</a></p>
<p dir="auto">But this result in "nested" fields names for child forms (<code class="notranslate">foo[address]</code>, <code class="notranslate">foo[zipcode]</code>, etc...).</p>
<p dir="auto">In a classical web application, this is not a problem because Symfony render form HTML and we don't really care about fields names.<br>
But when using it for an API application, we want all the request parameters as the same level and not in a nested sub level.</p>
<p dir="auto">Actually it's possible to set an empty form name on the root form only.<br>
Why can't we make it possible on child forms too?</p>
<p dir="auto">Maybe another way exists to add field of a form type we want to include in our form at the same level of the current form?</p> | 0 |
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2>
<p dir="auto">I'm using rtx 3090 to create a simple float32 tensor in cuda. It's very weird it would take too much time after importing huggingface transformers library. However the same code below doesn't have any issues in 20-series cards.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">The following code would reproduce the behavior:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import torch
import time
import transformers
if __name__ == '__main__':
t = time.time()
x = torch.zeros((50273,), dtype=torch.float32).cuda()
print('took:', time.time() - t)
print('done')"><pre class="notranslate"><code class="notranslate">import torch
import time
import transformers
if __name__ == '__main__':
t = time.time()
x = torch.zeros((50273,), dtype=torch.float32).cuda()
print('took:', time.time() - t)
print('done')
</code></pre></div>
<p dir="auto">result:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="took: 137.26064133644104
done"><pre class="notranslate"><code class="notranslate">took: 137.26064133644104
done
</code></pre></div>
<p dir="auto">I think the size doesn't matter, any size could reproduce this result in 3090 cards. I don't have rtx 3080, therefore don't know if the issue would exist in 3080 card.</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Here is the result after commenting the <code class="notranslate">import transformers</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="took: 0.8175389766693115
done"><pre class="notranslate"><code class="notranslate">took: 0.8175389766693115
done
</code></pre></div>
<h2 dir="auto">Environment</h2>
<p dir="auto">The pytorch is built from the master branch of pytorch github. The transformer library is 3.3.1.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Collecting environment information...
PyTorch version: 1.7.0a0+9d5607f
Is debug build: True
CUDA used to build PyTorch: 11.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.1 LTS (x86_64)
GCC version: (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Clang version: Could not collect
CMake version: version 3.18.2
Python version: 3.8 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: GeForce RTX 3090
Nvidia driver version: 455.23.05
cuDNN version: Probably one of the following:
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_train.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_train.so.8
HIP runtime version: N/A
MIOpen runtime version: N/A
Versions of relevant libraries:
[pip3] numpy==1.19.1
[pip3] numpydoc==1.1.0
[pip3] pytorch-pretrained-bert==0.6.2
[pip3] torch==1.7.0a0
[conda] blas 1.0 mkl
[conda] cudatoolkit 10.2.89 hfd86e86_1
[conda] mkl 2020.2 256
[conda] mkl-include 2020.2 256
[conda] mkl-service 2.3.0 py38he904b0f_0
[conda] mkl_fft 1.1.0 py38h23d657b_0
[conda] mkl_random 1.1.1 py38h0573a6f_0
[conda] numpy 1.18.5 pypi_0 pypi
[conda] numpy-base 1.19.1 py38hfa32c7d_0
[conda] numpydoc 1.1.0 py_0
[conda] pytorch-pretrained-bert 0.6.2 pypi_0 pypi
[conda] torch 1.7.0a0 pypi_0 pypi"><pre class="notranslate"><code class="notranslate">Collecting environment information...
PyTorch version: 1.7.0a0+9d5607f
Is debug build: True
CUDA used to build PyTorch: 11.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.1 LTS (x86_64)
GCC version: (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Clang version: Could not collect
CMake version: version 3.18.2
Python version: 3.8 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: GeForce RTX 3090
Nvidia driver version: 455.23.05
cuDNN version: Probably one of the following:
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_train.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_train.so.8
HIP runtime version: N/A
MIOpen runtime version: N/A
Versions of relevant libraries:
[pip3] numpy==1.19.1
[pip3] numpydoc==1.1.0
[pip3] pytorch-pretrained-bert==0.6.2
[pip3] torch==1.7.0a0
[conda] blas 1.0 mkl
[conda] cudatoolkit 10.2.89 hfd86e86_1
[conda] mkl 2020.2 256
[conda] mkl-include 2020.2 256
[conda] mkl-service 2.3.0 py38he904b0f_0
[conda] mkl_fft 1.1.0 py38h23d657b_0
[conda] mkl_random 1.1.1 py38h0573a6f_0
[conda] numpy 1.18.5 pypi_0 pypi
[conda] numpy-base 1.19.1 py38hfa32c7d_0
[conda] numpydoc 1.1.0 py_0
[conda] pytorch-pretrained-bert 0.6.2 pypi_0 pypi
[conda] torch 1.7.0a0 pypi_0 pypi
</code></pre></div>
<h2 dir="auto">Additional context</h2>
<p dir="auto">I don't know the issue come from transformer library or pytorch. But since the same code under same setting works in rtx 2080. I guess there is a higher chance the problem come from pytorch itself. Thanks for any help.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ngimel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ngimel">@ngimel</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/csarofeen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/csarofeen">@csarofeen</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ptrblck/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ptrblck">@ptrblck</a></p> | <h2 dir="auto">Edit: If you see this error, please go to <a href="https://pytorch.org/get-started/locally/" rel="nofollow">https://pytorch.org/get-started/locally/</a> and download a wheel built with cuda 11.x</h2>
<hr>
<p dir="auto">**Hi</p>
<h1 dir="auto">I recently purchased RTX 3080 and got this error</h1>
<h1 dir="auto">GeForce RTX 3080 with CUDA capability sm_86 is not compatible with the current PyTorch installation.<br>
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37.</h1>
<p dir="auto">and my cuda version is following:</p>
<ul dir="auto">
<li>torch.cuda_version</li>
<li>Out[3]: '10.2'</li>
</ul>
<p dir="auto">Should I install the latest cudatoolkit 11.0? but It seems Pytorch only provides cudatoolkit 10.2 like below screenshot.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/52276191/93667640-7ca4dc80-fac2-11ea-80de-47cbdcfa9cd5.png"><img src="https://user-images.githubusercontent.com/52276191/93667640-7ca4dc80-fac2-11ea-80de-47cbdcfa9cd5.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Is there any solution for this issue?<br>
How do I get sm_86 binary capability?</p>
<p dir="auto">thanks in advance**</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/malfet/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/malfet">@malfet</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/seemethere/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/seemethere">@seemethere</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/walterddr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/walterddr">@walterddr</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ngimel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ngimel">@ngimel</a></p> | 1 |
<p dir="auto">I'm fleshing out the json library to add support for a <code class="notranslate">to_json</code> iface, among other things, and I'm finding a lot of code duplication between my instances. Here's an example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="iface to_json {
fn to_json_writer(wr: io::writer);
fn to_json_str() -> str;
}
impl of to_json for float {
fn to_json_writer(wr: io::writer) {
wr.write_str(float::to_str(self, 6u));
}
fn to_json_str() -> str {
io::with_str_writer(self.to_json_writer)
}
}
impl of to_json for int {
fn to_json_writer(wr: io::writer) {
wr.write_str(int::str(self));
}
fn to_json_str() -> str {
io::with_str_writer(self.to_json_writer)
}
}
..."><pre class="notranslate"><code class="notranslate">iface to_json {
fn to_json_writer(wr: io::writer);
fn to_json_str() -> str;
}
impl of to_json for float {
fn to_json_writer(wr: io::writer) {
wr.write_str(float::to_str(self, 6u));
}
fn to_json_str() -> str {
io::with_str_writer(self.to_json_writer)
}
}
impl of to_json for int {
fn to_json_writer(wr: io::writer) {
wr.write_str(int::str(self));
}
fn to_json_str() -> str {
io::with_str_writer(self.to_json_writer)
}
}
...
</code></pre></div>
<p dir="auto">Every implementation's <code class="notranslate">to_json_str</code> is just a straight copy of the others. It would be much nicer if we could provide default versions of functions like <code class="notranslate">to_json_str</code> and just have the implementations inherit it.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="iface to_json {
fn to_json_writer(wr: io::writer);
fn to_json_str() -> str {
io::with_str_writer(self.to_json_writer)
}
}"><pre class="notranslate"><code class="notranslate">iface to_json {
fn to_json_writer(wr: io::writer);
fn to_json_str() -> str {
io::with_str_writer(self.to_json_writer)
}
}
</code></pre></div> | <p dir="auto">Hi folks,</p>
<p dir="auto">I think my code is wrong, but since it says this is a compiler bug I thought I'd file it.</p>
<p dir="auto">I'm on <code class="notranslate">rustc 0.11.0-pre-nightly (bb5695b95c288c442dbe528f7e1c1b08f79f033d 2014-06-29 23:36:43 +0000)</code> (os x)</p>
<p dir="auto">I have the following code:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="extern crate crypto = "rust-crypto";
use std::io::stdio::println;
use crypto::md5::Md5;
use crypto::digest::Digest;
fn main() {
println!("{}", ketama("Hello World!"));
}
fn ketama(key: &str) -> u8 {
// 2: Create MD5 digset
let mut sh = Md5::new();
sh.input_str(key);
let mut digest = Vec::from_elem((sh.output_bits()+7)/8, 0u8);
sh.result(digest.as_mut_slice());
// 3: Construct the ketama hash
let result =
((digest.get(3) & 0xFF) << 24) |
((digest.get(2) & 0xFF) << 16) |
((digest.get(1) & 0xFF) << 8) |
(digest.get(0) & 0xFF);
result
}
#[cfg(test)]
mod tests {
use ketama;
fn test_ketama() {
assert!(3979113294, ketama("26"));
}
}"><pre class="notranslate"><span class="pl-k">extern</span> <span class="pl-k">crate</span> crypto = <span class="pl-s">"rust-crypto"</span><span class="pl-kos">;</span>
<span class="pl-k">use</span> std<span class="pl-kos">::</span>io<span class="pl-kos">::</span>stdio<span class="pl-kos">::</span>println<span class="pl-kos">;</span>
<span class="pl-k">use</span> crypto<span class="pl-kos">::</span>md5<span class="pl-kos">::</span><span class="pl-v">Md5</span><span class="pl-kos">;</span>
<span class="pl-k">use</span> crypto<span class="pl-kos">::</span>digest<span class="pl-kos">::</span><span class="pl-v">Digest</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{}"</span>, ketama<span class="pl-kos">(</span><span class="pl-s">"Hello World!"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">ketama</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-smi">str</span><span class="pl-kos">)</span> -> <span class="pl-smi">u8</span> <span class="pl-kos">{</span>
<span class="pl-c">// 2: Create MD5 digset</span>
<span class="pl-k">let</span> <span class="pl-k">mut</span> sh = <span class="pl-smi">Md5</span><span class="pl-kos">::</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
sh<span class="pl-kos">.</span><span class="pl-en">input_str</span><span class="pl-kos">(</span>key<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> <span class="pl-k">mut</span> digest = <span class="pl-smi">Vec</span><span class="pl-kos">::</span><span class="pl-en">from_elem</span><span class="pl-kos">(</span><span class="pl-kos">(</span>sh<span class="pl-kos">.</span><span class="pl-en">output_bits</span><span class="pl-kos">(</span><span class="pl-kos">)</span>+<span class="pl-c1">7</span><span class="pl-kos">)</span>/<span class="pl-c1">8</span><span class="pl-kos">,</span> <span class="pl-c1">0u8</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
sh<span class="pl-kos">.</span><span class="pl-en">result</span><span class="pl-kos">(</span>digest<span class="pl-kos">.</span><span class="pl-en">as_mut_slice</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// 3: Construct the ketama hash</span>
<span class="pl-k">let</span> result =
<span class="pl-kos">(</span><span class="pl-kos">(</span>digest<span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-c1">3</span><span class="pl-kos">)</span> <span class="pl-c1">&</span> <span class="pl-c1">0xFF</span><span class="pl-kos">)</span> << <span class="pl-c1">24</span><span class="pl-kos">)</span> |
<span class="pl-kos">(</span><span class="pl-kos">(</span>digest<span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span> <span class="pl-c1">&</span> <span class="pl-c1">0xFF</span><span class="pl-kos">)</span> << <span class="pl-c1">16</span><span class="pl-kos">)</span> |
<span class="pl-kos">(</span><span class="pl-kos">(</span>digest<span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">)</span> <span class="pl-c1">&</span> <span class="pl-c1">0xFF</span><span class="pl-kos">)</span> << <span class="pl-c1">8</span><span class="pl-kos">)</span> |
<span class="pl-kos">(</span>digest<span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">)</span> <span class="pl-c1">&</span> <span class="pl-c1">0xFF</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
result
<span class="pl-kos">}</span>
<span class="pl-c1">#<span class="pl-kos">[</span>cfg<span class="pl-kos">(</span>test<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">mod</span> tests <span class="pl-kos">{</span>
<span class="pl-k">use</span> ketama<span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">test_ketama</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">assert</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-c1">3979113294</span>, ketama<span class="pl-kos">(</span><span class="pl-s">"26"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">and the error popped up as I added the <code class="notranslate">use ketama</code> to the tests module.</p>
<p dir="auto">When I run <code class="notranslate">cargo test</code> on my file I get:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="┌─[✗]─[michael@daschlbase]─[~/code/rust/ketama]
└──╼ RUST_BACKTRACE=1 cargo test
Fresh rust-crypto v0.1.0 (https://github.com/DaGenix/rust-crypto.git)
Compiling ketama-rs v0.1.0 (file:/Users/michaelnitschinger/code/rust/ketama)
<std macros>:8:12: 35:21 error: mismatched types: expected `bool` but found `<generic integer #0>` (expected bool but found integral variable)
<std macros>:8 if !$cond {
<std macros>:9 fail!($($arg),+)
<std macros>:10 }
<std macros>:11 );
<std macros>:12 )
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'index out of bounds: the len is 12 but the index is 12', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/lib.rs:1
stack backtrace:
1: 0x1054f0655 - rt::backtrace::imp::write::h33d600b14bcc0ad7tPp::v0.11.0.pre
2: 0x1054f6bf7 - failure::on_fail::h8275f76a6db57202M5p::v0.11.0.pre
3: 0x1057a7e09 - unwind::begin_unwind_inner::hd390bdc7271bbf4cIVd::v0.11.0.pre
4: 0x1057a78bd - unwind::begin_unwind_fmt::hfa8fc7b11f5dad16bTd::v0.11.0.pre
5: 0x1057a7711 - rust_begin_unwind
6: 0x1057f3bbe - failure::begin_unwind::h29121687d16d4062X2v::v0.11.0.pre
7: 0x1057f8189 - failure::fail_bounds_check::hb0b1b63e7b73cbf690v::v0.11.0.pre
8: 0x104c7715d - codemap::FileMap::get_line::hf69850111b874f5dRDd::v0.11.0.pre
9: 0x104c73656 - diagnostic::emit::hc4f6ec047e6b64740uc::v0.11.0.pre
10: 0x104c6e652 - diagnostic::EmitterWriter.Emitter::emit::h892977fb7f421d339qc::v0.11.0.pre
11: 0x104c6c953 - diagnostic::Handler::emit::h755ef325bde394dakec::v0.11.0.pre
12: 0x104c6b975 - diagnostic::SpanHandler::span_err::h266f98379c75b6f9Q4b::v0.11.0.pre
13: 0x102669cb6 - middle::typeck::infer::InferCtxt<'a>::type_error_message_str_with_expected::h506fef97717d30f26Kw::v0.11.0.pre
14: 0x102714993 - middle::typeck::infer::InferCtxt<'a>::type_error_message::h4ac10c0197867eadOSw::v0.11.0.pre
15: 0x102714ad9 - middle::typeck::infer::InferCtxt<'a>::report_mismatched_types::h09f90236d1ff10f5TTw::v0.11.0.pre
16: 0x1026cf748 - middle::typeck::check::demand::suptype::closure.91708
17: 0x1026cf680 - middle::typeck::check::demand::suptype_with_fn::h5aef443dd5c41e99dga::v0.11.0.pre
18: 0x10271eec8 - middle::typeck::check::check_expr_has_type::closure.92600
19: 0x102718eec - middle::typeck::check::check_expr_with_unifier::h7a4a57fad133af797rf::v0.11.0.pre
20: 0x1027198ef - middle::typeck::check::check_expr_with_unifier::h7a4a57fad133af797rf::v0.11.0.pre
21: 0x102733001 - middle::typeck::check::check_stmt::h2a033ee04cabfc221ih::v0.11.0.pre
22: 0x1026ef142 - middle::typeck::check::check_block_with_expected::h020999ba5c44c098cnh::v0.11.0.pre
23: 0x1026ead0d - middle::typeck::check::check_fn::h6413530500ad7359jUc::v0.11.0.pre
24: 0x1026ea6e0 - middle::typeck::check::check_bare_fn::h42022f9acab71088RJc::v0.11.0.pre
25: 0x1026e43ee - middle::typeck::check::check_item::h06e560567b39b12e5gd::v0.11.0.pre
26: 0x1026e5d3d - visit::walk_item::h12564307020263923332::v0.11.0.pre
27: 0x1026ea4c0 - middle::typeck::check::check_item_types::h8b297d641b758de99Ic::v0.11.0.pre
28: 0x10285c24e - middle::typeck::check_crate::h901cb82af492c67cSJC::v0.11.0.pre
29: 0x102cb0dc8 - driver::driver::phase_3_run_analysis_passes::h5dd5f16878eed1ed84p::v0.11.0.pre
30: 0x102cabe15 - driver::driver::compile_input::h85050a3ac86049856Rp::v0.11.0.pre
31: 0x102d7256b - driver::run_compiler::hae8f05bffa41c7b05Bs::v0.11.0.pre
32: 0x102d6fd86 - driver::main_args::closure.117272
33: 0x102d8445b - task::TaskBuilder<S>::try_future::closure.118413
34: 0x102d842f4 - task::TaskBuilder<S>::spawn_internal::closure.118390
35: 0x104be895c - task::spawn_opts::closure.7562
36: 0x10580d0ac - rust_try
37: 0x1057a42aa - unwind::try::h803831d3cb7669807Jd::v0.11.0.pre
38: 0x1057a3fac - task::Task::run::h4a0e5408354628dfZVc::v0.11.0.pre
39: 0x104be87eb - task::spawn_opts::closure.7507
40: 0x1057a6b19 - thread::thread_start::h5aa600706e7c5c88xid::v0.11.0.pre
41: 0x7fff92c10899 - _pthread_body
42: 0x7fff92c1072a - _pthread_struct_init"><pre class="notranslate"><code class="notranslate">┌─[✗]─[michael@daschlbase]─[~/code/rust/ketama]
└──╼ RUST_BACKTRACE=1 cargo test
Fresh rust-crypto v0.1.0 (https://github.com/DaGenix/rust-crypto.git)
Compiling ketama-rs v0.1.0 (file:/Users/michaelnitschinger/code/rust/ketama)
<std macros>:8:12: 35:21 error: mismatched types: expected `bool` but found `<generic integer #0>` (expected bool but found integral variable)
<std macros>:8 if !$cond {
<std macros>:9 fail!($($arg),+)
<std macros>:10 }
<std macros>:11 );
<std macros>:12 )
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'index out of bounds: the len is 12 but the index is 12', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/lib.rs:1
stack backtrace:
1: 0x1054f0655 - rt::backtrace::imp::write::h33d600b14bcc0ad7tPp::v0.11.0.pre
2: 0x1054f6bf7 - failure::on_fail::h8275f76a6db57202M5p::v0.11.0.pre
3: 0x1057a7e09 - unwind::begin_unwind_inner::hd390bdc7271bbf4cIVd::v0.11.0.pre
4: 0x1057a78bd - unwind::begin_unwind_fmt::hfa8fc7b11f5dad16bTd::v0.11.0.pre
5: 0x1057a7711 - rust_begin_unwind
6: 0x1057f3bbe - failure::begin_unwind::h29121687d16d4062X2v::v0.11.0.pre
7: 0x1057f8189 - failure::fail_bounds_check::hb0b1b63e7b73cbf690v::v0.11.0.pre
8: 0x104c7715d - codemap::FileMap::get_line::hf69850111b874f5dRDd::v0.11.0.pre
9: 0x104c73656 - diagnostic::emit::hc4f6ec047e6b64740uc::v0.11.0.pre
10: 0x104c6e652 - diagnostic::EmitterWriter.Emitter::emit::h892977fb7f421d339qc::v0.11.0.pre
11: 0x104c6c953 - diagnostic::Handler::emit::h755ef325bde394dakec::v0.11.0.pre
12: 0x104c6b975 - diagnostic::SpanHandler::span_err::h266f98379c75b6f9Q4b::v0.11.0.pre
13: 0x102669cb6 - middle::typeck::infer::InferCtxt<'a>::type_error_message_str_with_expected::h506fef97717d30f26Kw::v0.11.0.pre
14: 0x102714993 - middle::typeck::infer::InferCtxt<'a>::type_error_message::h4ac10c0197867eadOSw::v0.11.0.pre
15: 0x102714ad9 - middle::typeck::infer::InferCtxt<'a>::report_mismatched_types::h09f90236d1ff10f5TTw::v0.11.0.pre
16: 0x1026cf748 - middle::typeck::check::demand::suptype::closure.91708
17: 0x1026cf680 - middle::typeck::check::demand::suptype_with_fn::h5aef443dd5c41e99dga::v0.11.0.pre
18: 0x10271eec8 - middle::typeck::check::check_expr_has_type::closure.92600
19: 0x102718eec - middle::typeck::check::check_expr_with_unifier::h7a4a57fad133af797rf::v0.11.0.pre
20: 0x1027198ef - middle::typeck::check::check_expr_with_unifier::h7a4a57fad133af797rf::v0.11.0.pre
21: 0x102733001 - middle::typeck::check::check_stmt::h2a033ee04cabfc221ih::v0.11.0.pre
22: 0x1026ef142 - middle::typeck::check::check_block_with_expected::h020999ba5c44c098cnh::v0.11.0.pre
23: 0x1026ead0d - middle::typeck::check::check_fn::h6413530500ad7359jUc::v0.11.0.pre
24: 0x1026ea6e0 - middle::typeck::check::check_bare_fn::h42022f9acab71088RJc::v0.11.0.pre
25: 0x1026e43ee - middle::typeck::check::check_item::h06e560567b39b12e5gd::v0.11.0.pre
26: 0x1026e5d3d - visit::walk_item::h12564307020263923332::v0.11.0.pre
27: 0x1026ea4c0 - middle::typeck::check::check_item_types::h8b297d641b758de99Ic::v0.11.0.pre
28: 0x10285c24e - middle::typeck::check_crate::h901cb82af492c67cSJC::v0.11.0.pre
29: 0x102cb0dc8 - driver::driver::phase_3_run_analysis_passes::h5dd5f16878eed1ed84p::v0.11.0.pre
30: 0x102cabe15 - driver::driver::compile_input::h85050a3ac86049856Rp::v0.11.0.pre
31: 0x102d7256b - driver::run_compiler::hae8f05bffa41c7b05Bs::v0.11.0.pre
32: 0x102d6fd86 - driver::main_args::closure.117272
33: 0x102d8445b - task::TaskBuilder<S>::try_future::closure.118413
34: 0x102d842f4 - task::TaskBuilder<S>::spawn_internal::closure.118390
35: 0x104be895c - task::spawn_opts::closure.7562
36: 0x10580d0ac - rust_try
37: 0x1057a42aa - unwind::try::h803831d3cb7669807Jd::v0.11.0.pre
38: 0x1057a3fac - task::Task::run::h4a0e5408354628dfZVc::v0.11.0.pre
39: 0x104be87eb - task::spawn_opts::closure.7507
40: 0x1057a6b19 - thread::thread_start::h5aa600706e7c5c88xid::v0.11.0.pre
41: 0x7fff92c10899 - _pthread_body
42: 0x7fff92c1072a - _pthread_struct_init
</code></pre></div>
<p dir="auto">feel free to close if its not an issue.<br>
Cheers,<br>
Michael</p> | 0 |
<h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">Having multiple event handlers that call the very same function add noise to the templates.<br>
I propose to DRY that a bit.</p>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto">Currently you can pass multiple functions to a single event handler like so:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<component
@click="func1(); func2()"
></component>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">component</span>
<span class="pl-c1">@click</span>="<span class="pl-s">func1(); func2()</span>"
<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">component</span><span class="pl-kos">></span></pre></div>
<p dir="auto">However, I think it would be really handy to be able to do the inverse, ie. passing the same function to multiple event handlers.<br>
Today for instance I have to do this:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<component v-model.number="foo"
@doDelayedStuff="delayedStuff"
@wheel.native="delayedStuff"
@mouseenter.native="callFooUpdate"
@focus.native="callFooUpdate"
@keyup.native="callBar"
@mouseleave.native="callFooClear"
@blur.native="callFooClear"
@change.native="callFooClear"
@click.prevent="doStuff"
@keyup.75="doStuff"
></component>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">component</span> <span class="pl-c1">v-model.number</span>="<span class="pl-s">foo</span>"
<span class="pl-c1">@doDelayedStuff</span>="<span class="pl-s">delayedStuff</span>"
<span class="pl-c1">@wheel.native</span>="<span class="pl-s">delayedStuff</span>"
<span class="pl-c1">@mouseenter.native</span>="<span class="pl-s">callFooUpdate</span>"
<span class="pl-c1">@focus.native</span>="<span class="pl-s">callFooUpdate</span>"
<span class="pl-c1">@keyup.native</span>="<span class="pl-s">callBar</span>"
<span class="pl-c1">@mouseleave.native</span>="<span class="pl-s">callFooClear</span>"
<span class="pl-c1">@blur.native</span>="<span class="pl-s">callFooClear</span>"
<span class="pl-c1">@change.native</span>="<span class="pl-s">callFooClear</span>"
<span class="pl-c1">@click.prevent</span>="<span class="pl-s">doStuff</span>"
<span class="pl-c1">@keyup.75</span>="<span class="pl-s">doStuff</span>"
<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">component</span><span class="pl-kos">></span></pre></div>
<p dir="auto">It would be great if you could instead do that:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<component v-model.number="foo"
@[doDelayedStuff, wheel.native]="delayedStuff"
@[mouseenter.native, focus.native]="callFooUpdate"
@keyup.native="callBar"
@[mouseleave.native, blur.native, change.native]="callFooClear"
@[click.prevent, keyup.75]="doStuff"
></component>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">component</span> <span class="pl-c1">v-model.number</span>="<span class="pl-s">foo</span>"
<span class="pl-c1">@[doDelayedStuff,</span> <span class="pl-c1">wheel.native]</span>="<span class="pl-s">delayedStuff</span>"
<span class="pl-c1">@[mouseenter.native,</span> <span class="pl-c1">focus.native]</span>="<span class="pl-s">callFooUpdate</span>"
<span class="pl-c1">@keyup.native</span>="<span class="pl-s">callBar</span>"
<span class="pl-c1">@[mouseleave.native,</span> <span class="pl-c1">blur.native,</span> <span class="pl-c1">change.native]</span>="<span class="pl-s">callFooClear</span>"
<span class="pl-c1">@[click.prevent,</span> <span class="pl-c1">keyup.75]</span>="<span class="pl-s">doStuff</span>"
<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">component</span><span class="pl-kos">></span></pre></div>
<p dir="auto">That way you can more clearly see in one glance how many different behavior are attached to a component. Also, modifying the callbacks is easier.</p>
<p dir="auto">Thoughts? <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p> | <h3 dir="auto">What problem does this feature solve?</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="So far a hack such as
<template>
{{foo}}
</template>
//js
var promise = new Promise(s=>setTimeout(s(1)))
{
data:{foo:''},
computed:{
async bar(){
return await promise
}
},
watch:{
async bar(){
this.foo = await bar
}
}
}
"><pre class="notranslate"><code class="notranslate">So far a hack such as
<template>
{{foo}}
</template>
//js
var promise = new Promise(s=>setTimeout(s(1)))
{
data:{foo:''},
computed:{
async bar(){
return await promise
}
},
watch:{
async bar(){
this.foo = await bar
}
}
}
</code></pre></div>
<h3 dir="auto">What does the proposed API look like?</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<template>
{{await foo}}
</template>
//js
var promise = new Promise(s=>setTimeout(s(1)))
{
computed:{
async foo(){
return await promise
}
},
}
"><pre class="notranslate"><code class="notranslate"><template>
{{await foo}}
</template>
//js
var promise = new Promise(s=>setTimeout(s(1)))
{
computed:{
async foo(){
return await promise
}
},
}
</code></pre></div> | 0 |
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> using LinearAlgebra
julia> LinearAlgebra.hello()
ERROR: UndefVarError: hello not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base ./Base.jl:26
[2] top-level scope
@ REPL[2]:1"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-k">using</span> LinearAlgebra
julia<span class="pl-k">></span> LinearAlgebra<span class="pl-k">.</span><span class="pl-c1">hello</span>()
ERROR<span class="pl-k">:</span> UndefVarError<span class="pl-k">:</span> hello not defined
Stacktrace<span class="pl-k">:</span>
[<span class="pl-c1">1</span>] <span class="pl-c1">getproperty</span>(x<span class="pl-k">::</span><span class="pl-c1">Module</span>, f<span class="pl-k">::</span><span class="pl-c1">Symbol</span>)
@ Base <span class="pl-k">./</span>Base<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">26</span>
[<span class="pl-c1">2</span>] top<span class="pl-k">-</span>level scope
@ REPL[<span class="pl-c1">2</span>]<span class="pl-k">:</span><span class="pl-c1">1</span></pre></div>
<p dir="auto">The error could be more helpful with <code class="notranslate">ERROR: UndefVarError: no binding hello defined in module LinearAlgebra</code></p> | <p dir="auto">Following this LoopVectorization issue asking for <code class="notranslate">begin</code>/<code class="notranslate">end</code> support: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="863088807" data-permission-text="Title is private" data-url="https://github.com/JuliaSIMD/LoopVectorization.jl/issues/246" data-hovercard-type="issue" data-hovercard-url="/JuliaSIMD/LoopVectorization.jl/issues/246/hovercard" href="https://github.com/JuliaSIMD/LoopVectorization.jl/issues/246">JuliaSIMD/LoopVectorization.jl#246</a></p>
<p dir="auto">I was curious how Base Julia correctly handled <code class="notranslate">begin</code>/<code class="notranslate">end</code> with <code class="notranslate">CartesianIndex</code>.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> i = CartesianIndex((1,2))
CartesianIndex(1, 2)
julia> A = rand(6,5,4,3,2);
julia> A[i,begin,end,2]
ERROR: BoundsError: attempt to access 6×5×4×3×2 Array{Float64, 5} at index [1, 2, 1, 4, 2]
Stacktrace:
[1] getindex
@ ./array.jl:834 [inlined]
[2] getindex(::Array{Float64, 5}, ::CartesianIndex{2}, ::Int64, ::Int64, ::Int64)
@ Base ./multidimensional.jl:638
[3] top-level scope
@ REPL[17]:1
julia> A[i,begin,begin,begin]
0.5712471105637651
julia> A[i,begin,begin,end]
ERROR: BoundsError: attempt to access 6×5×4×3×2 Array{Float64, 5} at index [1, 2, 1, 1, 3]
Stacktrace:
[1] getindex
@ ./array.jl:834 [inlined]
[2] getindex(::Array{Float64, 5}, ::CartesianIndex{2}, ::Int64, ::Int64, ::Int64)
@ Base ./multidimensional.jl:638
[3] top-level scope
@ REPL[19]:1"><pre class="notranslate">julia<span class="pl-k">></span> i <span class="pl-k">=</span> <span class="pl-c1">CartesianIndex</span>((<span class="pl-c1">1</span>,<span class="pl-c1">2</span>))
<span class="pl-c1">CartesianIndex</span>(<span class="pl-c1">1</span>, <span class="pl-c1">2</span>)
julia<span class="pl-k">></span> A <span class="pl-k">=</span> <span class="pl-c1">rand</span>(<span class="pl-c1">6</span>,<span class="pl-c1">5</span>,<span class="pl-c1">4</span>,<span class="pl-c1">3</span>,<span class="pl-c1">2</span>);
julia<span class="pl-k">></span> A[i,<span class="pl-c1">begin</span>,<span class="pl-c1">end</span>,<span class="pl-c1">2</span>]
ERROR<span class="pl-k">:</span> BoundsError<span class="pl-k">:</span> attempt to access <span class="pl-c1">6</span><span class="pl-k">×</span><span class="pl-c1">5</span><span class="pl-k">×</span><span class="pl-c1">4</span><span class="pl-k">×</span><span class="pl-c1">3</span><span class="pl-k">×</span><span class="pl-c1">2</span> Array{Float64, <span class="pl-c1">5</span>} at index [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">4</span>, <span class="pl-c1">2</span>]
Stacktrace<span class="pl-k">:</span>
[<span class="pl-c1">1</span>] getindex
@ <span class="pl-k">./</span>array<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">834</span> [inlined]
[<span class="pl-c1">2</span>] <span class="pl-c1">getindex</span>(<span class="pl-k">::</span><span class="pl-c1">Array{Float64, 5}</span>, <span class="pl-k">::</span><span class="pl-c1">CartesianIndex{2}</span>, <span class="pl-k">::</span><span class="pl-c1">Int64</span>, <span class="pl-k">::</span><span class="pl-c1">Int64</span>, <span class="pl-k">::</span><span class="pl-c1">Int64</span>)
@ Base <span class="pl-k">./</span>multidimensional<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">638</span>
[<span class="pl-c1">3</span>] top<span class="pl-k">-</span>level scope
@ REPL[<span class="pl-c1">17</span>]<span class="pl-k">:</span><span class="pl-c1">1</span>
julia<span class="pl-k">></span> A[i,<span class="pl-c1">begin</span>,<span class="pl-c1">begin</span>,<span class="pl-c1">begin</span>]
<span class="pl-c1">0.5712471105637651</span>
julia<span class="pl-k">></span> A[i,<span class="pl-c1">begin</span>,<span class="pl-c1">begin</span>,<span class="pl-c1">end</span>]
ERROR<span class="pl-k">:</span> BoundsError<span class="pl-k">:</span> attempt to access <span class="pl-c1">6</span><span class="pl-k">×</span><span class="pl-c1">5</span><span class="pl-k">×</span><span class="pl-c1">4</span><span class="pl-k">×</span><span class="pl-c1">3</span><span class="pl-k">×</span><span class="pl-c1">2</span> Array{Float64, <span class="pl-c1">5</span>} at index [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">3</span>]
Stacktrace<span class="pl-k">:</span>
[<span class="pl-c1">1</span>] getindex
@ <span class="pl-k">./</span>array<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">834</span> [inlined]
[<span class="pl-c1">2</span>] <span class="pl-c1">getindex</span>(<span class="pl-k">::</span><span class="pl-c1">Array{Float64, 5}</span>, <span class="pl-k">::</span><span class="pl-c1">CartesianIndex{2}</span>, <span class="pl-k">::</span><span class="pl-c1">Int64</span>, <span class="pl-k">::</span><span class="pl-c1">Int64</span>, <span class="pl-k">::</span><span class="pl-c1">Int64</span>)
@ Base <span class="pl-k">./</span>multidimensional<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">638</span>
[<span class="pl-c1">3</span>] top<span class="pl-k">-</span>level scope
@ REPL[<span class="pl-c1">19</span>]<span class="pl-k">:</span><span class="pl-c1">1</span></pre></div>
<p dir="auto">The <code class="notranslate">Meta.@lower</code>, shown separately because it messes up highlighting of all downstream code (edit: edited it to close the opening "`"):</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> Meta.@lower A[i,begin,end,2]
:($(Expr(:thunk, CodeInfo(
@ none within `top-level scope`
1 ─ %1 = Base.firstindex(A, 2)
│ %2 = Base.lastindex(A, 3)
│ %3 = Base.getindex(A, i, %1, %2, 2)
└── return %3
))))"><pre class="notranslate">julia<span class="pl-k">></span> Meta<span class="pl-k">.</span><span class="pl-c1">@lower</span> A[i,<span class="pl-c1">begin</span>,<span class="pl-c1">end</span>,<span class="pl-c1">2</span>]
:(<span class="pl-k">$</span>(<span class="pl-c1">Expr</span>(<span class="pl-c1">:thunk</span>, <span class="pl-c1">CodeInfo</span>(
@ none within <span class="pl-s"><span class="pl-pds">`</span>top-level scope<span class="pl-pds">`</span></span>
<span class="pl-c1">1</span> ─ <span class="pl-k">%</span><span class="pl-c1">1</span> <span class="pl-k">=</span> Base<span class="pl-k">.</span><span class="pl-c1">firstindex</span>(A, <span class="pl-c1">2</span>)
│ <span class="pl-k">%</span><span class="pl-c1">2</span> <span class="pl-k">=</span> Base<span class="pl-k">.</span><span class="pl-c1">lastindex</span>(A, <span class="pl-c1">3</span>)
│ <span class="pl-k">%</span><span class="pl-c1">3</span> <span class="pl-k">=</span> Base<span class="pl-k">.</span><span class="pl-c1">getindex</span>(A, i, <span class="pl-k">%</span><span class="pl-c1">1</span>, <span class="pl-k">%</span><span class="pl-c1">2</span>, <span class="pl-c1">2</span>)
└── <span class="pl-k">return</span> <span class="pl-k">%</span><span class="pl-c1">3</span>
))))</pre></div>
<p dir="auto"><code class="notranslate">begin</code>/<code class="notranslate">end</code> is syntax based, so the second index -> <code class="notranslate">firstindex(A,2)</code>/<code class="notranslate">lastindex(A,2)</code>, without considering that the first index could be of varying dimension.</p> | 0 |
<h1 dir="auto">Description of the new feature/enhancement</h1>
<p dir="auto">There doesn't seem to be an obvious way to detect when running from the terminal. This is a issue for applications and libraries where behavior is dependent on the terminal. For example, a Python library may require colorama for some terminals and not others.</p>
<h1 dir="auto">Proposed technical implementation details</h1>
<p dir="auto">The most common and portable way to do this is to set the TERM environment variable when initializing the terminal.</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18362.239[run "ver" at a command prompt]
Windows Terminal version 0.2.1831.0:
Any other software? No"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.239[run "ver" at a command prompt]
Windows Terminal version 0.2.1831.0:
Any other software? No
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">material. --><br>
Opened one WSL terminal tab with a relatively long path like this:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/44165182/62001710-04928f00-b129-11e9-9292-ae974dcc4369.png"><img src="https://user-images.githubusercontent.com/44165182/62001710-04928f00-b129-11e9-9292-ae974dcc4369.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">The path is too long to give other opened tabs space to show.</p>
<p dir="auto">I opened another WSL tab, but I cannot see it in the tab bar, only when I maximize the window size can I see it.</p>
<h2 dir="auto">normal size</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/44165182/62001733-74a11500-b129-11e9-81a2-11ea31aa7709.png"><img src="https://user-images.githubusercontent.com/44165182/62001733-74a11500-b129-11e9-81a2-11ea31aa7709.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">maximum size</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/44165182/62001722-48859400-b129-11e9-90d0-64750d945afc.png"><img src="https://user-images.githubusercontent.com/44165182/62001722-48859400-b129-11e9-90d0-64750d945afc.png" alt="image" style="max-width: 100%;"></a></p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The tab with relatively long path should shorten itself to give other tabs enough space to show, like in vscode or vs.</p>
<p dir="auto">Actually this could not be a bug, but may be an issue or feature to be considered.</p> | 0 |
<p dir="auto"><strong>Description</strong></p>
<p dir="auto">The old documentation for <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=63407290" rel="nofollow">Scheduler Basics</a> should be reviewed and incorporated into <a href="https://github.com/apache/airflow/tree/master/docs">Airflow Documentation</a></p>
<p dir="auto"><strong>Use case / motivation</strong></p>
<p dir="auto">To remove documentation duplication and clean it up.</p>
<p dir="auto"><strong>Related Issues</strong></p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="673709470" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/10178" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/10178/hovercard" href="https://github.com/apache/airflow/issues/10178">#10178</a></p> | <h3 dir="auto">Apache Airflow Provider(s)</h3>
<p dir="auto">google</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">apache-airflow 2.5.0<br>
apache-airflow-providers-apache-beam 4.1.0<br>
apache-airflow-providers-cncf-kubernetes 5.0.0<br>
apache-airflow-providers-google 8.6.0<br>
apache-airflow-providers-grpc 3.1.0</p>
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.5.0</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Debian 11</p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Official Apache Airflow Helm Chart</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">KubernetesExecutor</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">GCSToBigQueryOperator allows multiple ways to specify schema of the BigQuery table:</p>
<ol dir="auto">
<li>Setting autodetect == True</li>
<li>Setting schema_fields directly with autodetect == False</li>
<li>Setting a schema_object and optionally a schema_object_bucket with autodetect == False</li>
</ol>
<p dir="auto">This third method seems to be broken in the latest provider version (8.6.0) and will always result in this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2022-12-16, 21:06:18 UTC] {taskinstance.py:1772} ERROR - Task failed with exception
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.9/site-packages/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py", line 395, in execute
self.configuration = self._check_schema_fields(self.configuration)
File "/home/airflow/.local/lib/python3.9/site-packages/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py", line 524, in _check_schema_fields
raise RuntimeError(
RuntimeError: Table schema was not found. Set autodetect=True to automatically set schema fields from source objects or pass schema_fields explicitly"><pre class="notranslate"><code class="notranslate">[2022-12-16, 21:06:18 UTC] {taskinstance.py:1772} ERROR - Task failed with exception
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.9/site-packages/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py", line 395, in execute
self.configuration = self._check_schema_fields(self.configuration)
File "/home/airflow/.local/lib/python3.9/site-packages/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py", line 524, in _check_schema_fields
raise RuntimeError(
RuntimeError: Table schema was not found. Set autodetect=True to automatically set schema fields from source objects or pass schema_fields explicitly
</code></pre></div>
<p dir="auto">The reason for this is because <a href="https://github.com/apache/airflow/blob/25bdbc8e6768712bad6043618242eec9c6632618/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py#L318-L320">this block</a> where <code class="notranslate">if self.schema_object and self.source_format != "DATASTORE_BACKUP":</code>. fails to set self.schema_fields. It only sets the local variable, schema_fields. When self._check_schema_fields is subsequently called <a href="https://github.com/apache/airflow/blob/25bdbc8e6768712bad6043618242eec9c6632618/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py#L395">here</a>, we enter the <a href="https://github.com/apache/airflow/blob/25bdbc8e6768712bad6043618242eec9c6632618/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py#L523-L528">first block</a> because autodetect is false and schema_fields is not set.</p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">No error should be raised if autodetect is set to False and a valid schema_object is provided</p>
<h3 dir="auto">How to reproduce</h3>
<ol dir="auto">
<li>Create a simple BigQuery table with a single column col1:</li>
</ol>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="CREATE TABLE `my-project.my_dataset.test_gcs_to_bigquery` (col1 INT);"><pre class="notranslate">CREATE TABLE <span class="pl-s"><span class="pl-pds">`</span>my-project.my_dataset.test_gcs_to_bigquery<span class="pl-pds">`</span></span> (col1 <span class="pl-k">INT</span>);</pre></div>
<ol start="2" dir="auto">
<li>Upload a json blob for this object to a bucket (e.g., data/schemas/table.json)</li>
<li>Upload a simple CSV for the source file to load to a bucket (e.g., data/source/file.csv)</li>
<li>Run the following command:</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" gcs_to_biquery = GCSToBigQueryOperator(
task_id="gcs_to_bigquery",
destination_project_dataset_table="my-project.my_dataset.test_gcs_to_bigquery",
bucket="my_bucket_name",
create_disposition="CREATE_IF_NEEDED",
write_disposition="WRITE_TRUNCATE",
source_objects=["data/source/file.csv"],
source_format="CSV",
autodetect=False,
schema_object="data/schemas/table.json",
)"><pre class="notranslate"> <span class="pl-s1">gcs_to_biquery</span> <span class="pl-c1">=</span> <span class="pl-v">GCSToBigQueryOperator</span>(
<span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-s">"gcs_to_bigquery"</span>,
<span class="pl-s1">destination_project_dataset_table</span><span class="pl-c1">=</span><span class="pl-s">"my-project.my_dataset.test_gcs_to_bigquery"</span>,
<span class="pl-s1">bucket</span><span class="pl-c1">=</span><span class="pl-s">"my_bucket_name"</span>,
<span class="pl-s1">create_disposition</span><span class="pl-c1">=</span><span class="pl-s">"CREATE_IF_NEEDED"</span>,
<span class="pl-s1">write_disposition</span><span class="pl-c1">=</span><span class="pl-s">"WRITE_TRUNCATE"</span>,
<span class="pl-s1">source_objects</span><span class="pl-c1">=</span>[<span class="pl-s">"data/source/file.csv"</span>],
<span class="pl-s1">source_format</span><span class="pl-c1">=</span><span class="pl-s">"CSV"</span>,
<span class="pl-s1">autodetect</span><span class="pl-c1">=</span><span class="pl-c1">False</span>,
<span class="pl-s1">schema_object</span><span class="pl-c1">=</span><span class="pl-s">"data/schemas/table.json"</span>,
)</pre></div>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | 0 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.29.2]</li>
<li>Operating System: [macOS 13.2, macOS 11.5.2] ※but, I didn't check other versions.</li>
<li>Browser: [Chromium]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul dir="auto">
<li>[] I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], },
},
});"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span><span class="pl-kos"></span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Test file (self-contained)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { expect, test } from '@playwright/test';
test('testTitle', async ({ page }) => {
await page.goto('url');
await expect(page).toHaveTitle(/pageTitle/);
await page.evaluate(() => window.scroll({ top: 0 }));
await expect(page).toHaveScreenshot(); // problem occurred
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">expect</span><span class="pl-kos">,</span> <span class="pl-s1">test</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'testTitle'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">'url'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveTitle</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>pageTitle<span class="pl-c1">/</span></span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">evaluate</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-en">scroll</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">top</span>: <span class="pl-c1">0</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveScreenshot</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// problem occurred</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>Run the test</li>
<li>and then error occurred</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: Screenshot comparison failed:
6 pixels (ratio 0.01 of all image pixels) are different."><pre class="notranslate"><code class="notranslate">Error: Screenshot comparison failed:
6 pixels (ratio 0.01 of all image pixels) are different.
</code></pre></div>
<p dir="auto"><strong>Expected</strong><br>
The test should be succeeded no matter who does it.</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">The following errors may or may not occur when the same test is performed by different engineers.<br>
There are people who succeed even if the version of mac Os is different, but the error in the attached screenshot occurs</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/65144660/223423139-7966b242-8539-42ae-9a5f-fee9d5b788e4.png"><img src="https://user-images.githubusercontent.com/65144660/223423139-7966b242-8539-42ae-9a5f-fee9d5b788e4.png" alt="image" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/65144660/223422977-64dee4ca-6bf8-4421-8f13-dc034afcaf5d.png"><img src="https://user-images.githubusercontent.com/65144660/223422977-64dee4ca-6bf8-4421-8f13-dc034afcaf5d.png" alt="image" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/65144660/223425568-b59c4b87-2705-49a9-94c1-57e2f5c927d2.png"><img src="https://user-images.githubusercontent.com/65144660/223425568-b59c4b87-2705-49a9-94c1-57e2f5c927d2.png" alt="image" style="max-width: 100%;"></a></p> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: 1.32.1</li>
<li>Operating System: Windows 11</li>
<li>Browser: All</li>
<li>Other info: We leverage "Webpack" normally to package our test files but we are able to remove all of the "Webpackifying" except for the source map comment to repro this issue</li>
</ul>
<h3 dir="auto">Source code</h3>
<p dir="auto">Create two test files in the same directory:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// bad.playwright.ui.test.js
throw new Error("ERROR");
//# sourceMappingURL=bad.playwright.ui.test.js.map"><pre class="notranslate"><span class="pl-c">// bad.playwright.ui.test.js</span>
<span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">"ERROR"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">//# sourceMappingURL=bad.playwright.ui.test.js.map</span></pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// good.playwright.ui.test.js
import { test, expect } from "@playwright/test";
test("has title", async ({ page }) => {
await page.goto("https://playwright.dev/");
await expect(page).toHaveTitle(/Playwright/);
});"><pre class="notranslate"><span class="pl-c">// good.playwright.ui.test.js</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span><span class="pl-kos">,</span> <span class="pl-s1">expect</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"@playwright/test"</span><span class="pl-kos">;</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"has title"</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">"https://playwright.dev/"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveTitle</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Playwright<span class="pl-c1">/</span></span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">//package.json</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"name": "repro",
"version": "1.0.0",
"description": "repro",
"main": "index.ts",
"module": "index.ts",
"private": true,
"sideEffects": false,
"license": "UNLICENSED",
"dependencies": {
"@playwright/test": "1.32.1",
"playwright": "1.32.1"
}
}"><pre class="notranslate">{
<span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>repro<span class="pl-pds">"</span></span>,
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.0.0<span class="pl-pds">"</span></span>,
<span class="pl-ent">"description"</span>: <span class="pl-s"><span class="pl-pds">"</span>repro<span class="pl-pds">"</span></span>,
<span class="pl-ent">"main"</span>: <span class="pl-s"><span class="pl-pds">"</span>index.ts<span class="pl-pds">"</span></span>,
<span class="pl-ent">"module"</span>: <span class="pl-s"><span class="pl-pds">"</span>index.ts<span class="pl-pds">"</span></span>,
<span class="pl-ent">"private"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"sideEffects"</span>: <span class="pl-c1">false</span>,
<span class="pl-ent">"license"</span>: <span class="pl-s"><span class="pl-pds">"</span>UNLICENSED<span class="pl-pds">"</span></span>,
<span class="pl-ent">"dependencies"</span>: {
<span class="pl-ent">"@playwright/test"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.32.1<span class="pl-pds">"</span></span>,
<span class="pl-ent">"playwright"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.32.1<span class="pl-pds">"</span></span>
}
}</pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li><code class="notranslate">yarn install</code></li>
<li><code class="notranslate">yarn playwright test good.playwright.ui.test</code></li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">I expect the <code class="notranslate">good.playwright.ui.test.ts</code> to execute and pass since it's the example test from Playwright</p>
<p dir="auto"><strong>Actual</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: ERROR
at bad.playwright.ui.test.js:1
> 1 | throw new Error("ERROR");
| ^
2 | //# sourceMappingURL=bad.playwright.ui.test.js.map
3 |
at Object.<anonymous> (C:\Users\...\Downloads\PortableCookie\bad.playwright.ui.test.js:1:7)
error Command failed with exit code 1."><pre class="notranslate"><code class="notranslate">Error: ERROR
at bad.playwright.ui.test.js:1
> 1 | throw new Error("ERROR");
| ^
2 | //# sourceMappingURL=bad.playwright.ui.test.js.map
3 |
at Object.<anonymous> (C:\Users\...\Downloads\PortableCookie\bad.playwright.ui.test.js:1:7)
error Command failed with exit code 1.
</code></pre></div>
<p dir="auto">For some reason the <code class="notranslate">bad</code> Playwright test gets executed, if I remove the <code class="notranslate">//# sourceMappingURL=bad.playwright.ui.test.js.map</code> comment it works fine .</p>
<p dir="auto">This is very strange, I don't think this is by design.</p>
<p dir="auto">For more context, we have "Jest" and "Playwright" test files side by side as we are migrating runners..</p> | 0 |
<p dir="auto"><code class="notranslate">A_mul_B!(B, A, B)</code> replaces B with all zeros for the case where A is not small and square:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="X = randn(3, 2)
Y = randn(3, 3)
Z = randn(3, 4)
M = randn(3, 3)
R = expm(M - M')
display(A_mul_B!(X, R, X))
display(A_mul_B!(Y, R, Y))
display(A_mul_B!(Z, R, Z))"><pre class="notranslate">X <span class="pl-k">=</span> <span class="pl-c1">randn</span>(<span class="pl-c1">3</span>, <span class="pl-c1">2</span>)
Y <span class="pl-k">=</span> <span class="pl-c1">randn</span>(<span class="pl-c1">3</span>, <span class="pl-c1">3</span>)
Z <span class="pl-k">=</span> <span class="pl-c1">randn</span>(<span class="pl-c1">3</span>, <span class="pl-c1">4</span>)
M <span class="pl-k">=</span> <span class="pl-c1">randn</span>(<span class="pl-c1">3</span>, <span class="pl-c1">3</span>)
R <span class="pl-k">=</span> <span class="pl-c1">expm</span>(M <span class="pl-k">-</span> M<span class="pl-k">'</span>)
<span class="pl-c1">display</span>(<span class="pl-c1">A_mul_B!</span>(X, R, X))
<span class="pl-c1">display</span>(<span class="pl-c1">A_mul_B!</span>(Y, R, Y))
<span class="pl-c1">display</span>(<span class="pl-c1">A_mul_B!</span>(Z, R, Z))</pre></div>
<p dir="auto">outputs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="3x2 Array{Float64,2}:
0.0 0.0
0.0 0.0
0.0 0.0
3x3 Array{Float64,2}:
1.6548 0.742438 -1.50673
0.282773 -1.35856 -0.39896
0.700949 -1.27408 -0.846028
3x4 Array{Float64,2}:
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0"><pre class="notranslate"><code class="notranslate">3x2 Array{Float64,2}:
0.0 0.0
0.0 0.0
0.0 0.0
3x3 Array{Float64,2}:
1.6548 0.742438 -1.50673
0.282773 -1.35856 -0.39896
0.700949 -1.27408 -0.846028
3x4 Array{Float64,2}:
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
</code></pre></div>
<p dir="auto">Here's my version info:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 0.4.0
Commit 0ff703b* (2015-10-08 06:20 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin13.4.0)
CPU: Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.3"><pre class="notranslate"><code class="notranslate">Julia Version 0.4.0
Commit 0ff703b* (2015-10-08 06:20 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin13.4.0)
CPU: Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.3
</code></pre></div> | <p dir="auto">It seems there is a bug in A_mul_B! when both matrices have dimension (1, 1)</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="a = fill(1.0, (1,1)) ; b = fill(1.0, (1,1)) ; A_mul_B!(a, a, b)
#> 1x1 Array{Float64,2}:
#> 0.0"><pre class="notranslate">a <span class="pl-k">=</span> <span class="pl-c1">fill</span>(<span class="pl-c1">1.0</span>, (<span class="pl-c1">1</span>,<span class="pl-c1">1</span>)) ; b <span class="pl-k">=</span> <span class="pl-c1">fill</span>(<span class="pl-c1">1.0</span>, (<span class="pl-c1">1</span>,<span class="pl-c1">1</span>)) ; <span class="pl-c1">A_mul_B!</span>(a, a, b)
<span class="pl-c"><span class="pl-c">#</span>> 1x1 Array{Float64,2}:</span>
<span class="pl-c"><span class="pl-c">#</span>> 0.0</span></pre></div>
<p dir="auto">I expected the results to return 1 but it returns 0. This happens both in 0.3.9 and 0.4.0-dev+5446</p> | 1 |
<p dir="auto">by <strong>jackbox55</strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?
1. Download test case
2. extract test case
3. cd unmarshal_testcase && make && ./unmarshal_testcase
Expected: 9th and 16th item to be parsed like the others
Instead: the 9th and 17th item are empty strings
It doesn't appear to to effect further items? at least up to 24.
(hg log -l 1): changeset: 4024:1d9d926b1aa7</pre>
<p dir="auto">Attachments:</p>
<ol dir="auto">
<li><a href="https://storage.googleapis.com/go-attachment/147/0/unmarshal_testcase.tar.gz" rel="nofollow">unmarshal_testcase.tar.gz</a> (595 bytes)</li>
</ol> | <pre class="notranslate">What does 'go version' print?
go version go1.3.2 darwin/amd64
What steps reproduce the problem?
1. hg pull && hg update
2. cd src
3. ./all.bash
What happened?
--- FAIL: TestParseInSydney (0.00 seconds)
format_test.go:201: ParseInLocation(Feb 01 2013 EST, Sydney) = 2013-02-01 00:00:00 +0000 EST, want 2013-02-01 00:00:00 +1100 AEDT
Please provide any additional information below.
I have Mac OS X Mavericks 10.9.5. I removed the original installation and tried to build
on a fresh clone but I got the same result.</pre> | 0 |
<p dir="auto">I upgraded my game to r70 (From r63) and noticed that my torch was not moving with the camera.</p>
<p dir="auto">I position the target for the spot light in-front of the camera, but it now appears I must manually call</p>
<p dir="auto">this.flashLight.target.updateMatrix() ;</p>
<p dir="auto">to get the light to follow the new target position.</p>
<p dir="auto">Was this an intended change? If so please close this issue, but this did work correctly in r63 and before.</p>
<p dir="auto">James</p> | <p dir="auto">Bug: The changes to spotLight.target.position are not affecting.</p>
<p dir="auto">Normal work with r68: <a href="http://jsfiddle.net/doexclusive/jhoe4ynr/" rel="nofollow">http://jsfiddle.net/doexclusive/jhoe4ynr/</a><br>
Bug with r69 and from dev branch: <a href="http://jsfiddle.net/doexclusive/6dhdbpw9/" rel="nofollow">http://jsfiddle.net/doexclusive/6dhdbpw9/</a></p> | 1 |
<p dir="auto">After reading some different methods of utilizing CSS modules within Nextjs pages, I'm wanting to know if the same concept can be applied to components but with SASS. This is one of the examples I'm referencing to:</p>
<p dir="auto"><a href="https://github.com/zeit/next.js/tree/canary/examples/with-next-sass">https://github.com/zeit/next.js/tree/canary/examples/with-next-sass</a></p>
<p dir="auto">What I'm trying to achieve is something like this with the following file structure:</p>
<p dir="auto">Reusable components are in a folder structure so both <code class="notranslate">.js</code> and <code class="notranslate">.sass</code> files are in the same area.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="├── pages
│ ├── index.js
├── components
│ ├── Button
│ │ ├── index.js
│ │ ├── index.sass"><pre class="notranslate"><code class="notranslate">├── pages
│ ├── index.js
├── components
│ ├── Button
│ │ ├── index.js
│ │ ├── index.sass
</code></pre></div>
<p dir="auto">Import components as usual...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// pages/index.js
import Button from 'components/Button'
...
<Button
className='book'
text="I'm a button"
href='/about'
/>
"><pre class="notranslate"><code class="notranslate">// pages/index.js
import Button from 'components/Button'
...
<Button
className='book'
text="I'm a button"
href='/about'
/>
</code></pre></div>
<p dir="auto">Import styles from the component's <code class="notranslate">sass</code> file, then pass the styles as properties with <code class="notranslate">styles.btn</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// components/Button/index.js
// Libraries
import React, { Component } from 'react'
import Link from 'next/link'
// Styles
import styles from './index.sass'
export default class Button extends Component {
constructor(props) {
super(props)
}
componentDidMount() {
}
render() {
return (
this.props.href
? (
<a className={styles.btn + this.props.className} target='_blank' href={this.props.href}>
{this.props.text}
</a>
) : (
<Link href={this.props.link}>
<a className={styles.btn + this.props.className}>
{this.props.text}
</a>
</Link>
)
)
}
}
"><pre class="notranslate"><code class="notranslate">// components/Button/index.js
// Libraries
import React, { Component } from 'react'
import Link from 'next/link'
// Styles
import styles from './index.sass'
export default class Button extends Component {
constructor(props) {
super(props)
}
componentDidMount() {
}
render() {
return (
this.props.href
? (
<a className={styles.btn + this.props.className} target='_blank' href={this.props.href}>
{this.props.text}
</a>
) : (
<Link href={this.props.link}>
<a className={styles.btn + this.props.className}>
{this.props.text}
</a>
</Link>
)
)
}
}
</code></pre></div>
<p dir="auto">Button's styling.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// components/Button/index.sass
.btn
color: red
"><pre class="notranslate"><code class="notranslate">// components/Button/index.sass
.btn
color: red
</code></pre></div>
<p dir="auto">My <code class="notranslate">next.config.js</code> setup:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const path = require('path')
const glob = require('glob')
const withSASS = require('@zeit/next-sass')
module.exports = withSASS({
cssModules: true,
distDir: 'public',
exportPathMap: function () {
return {
"/": { page: "/" },
"/about": { page: "/about" },
}
},
webpack: (config, { dev }) => {
return config
}
})
"><pre class="notranslate"><code class="notranslate">const path = require('path')
const glob = require('glob')
const withSASS = require('@zeit/next-sass')
module.exports = withSASS({
cssModules: true,
distDir: 'public',
exportPathMap: function () {
return {
"/": { page: "/" },
"/about": { page: "/about" },
}
},
webpack: (config, { dev }) => {
return config
}
})
</code></pre></div>
<p dir="auto">The markup for the page renders, but styles aren't being applied and the class name has a weird string with it (book is the class passed in the Button properties):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<a class="EGxqjOug9lYuZ5fOMdFUbbook" target="_blank" href="/about">I'm a button</a>"><pre class="notranslate"><code class="notranslate"><a class="EGxqjOug9lYuZ5fOMdFUbbook" target="_blank" href="/about">I'm a button</a>
</code></pre></div>
<p dir="auto">With all of this, I have a couple of questions concerning this setup:</p>
<ol dir="auto">
<li>Is what I'm trying to achieve even possible to do at the moment?</li>
<li>Is this issue depending on how my <code class="notranslate">next.config.js</code> file is setup?</li>
<li>How would I be able to import other <code class="notranslate">sass</code> files from different directories into the <code class="notranslate">index.sass</code> of my component? For example, if I want to import breakpoint mixins into my button component, will that cause any issues with modules?</li>
</ol>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">I just started to use next.js, but after the completion of the installation is encountered, only in macOS, win 10 is normal.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">`These relative modules were not found:</p>
<ul dir="auto">
<li>../../../../.4.1.4@next/dist/lib/error.js in ./node_modules/.4.1.4@next/dist/pages/_error.js?entry</li>
<li>../../../../.4.1.4@next/dist/server/document.js in ./node_modules/.4.1.4@next/dist/pages/_document.js?entry<br>
(node:6711) DeprecationWarning: Module.chunks: Use Module.forEachChunk/mapChunks/getNumberOfChunks/isInChunk/addChunk/removeChunk instead`</li>
</ul>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">My operation process :<br>
<code class="notranslate">mkdir gw</code><br>
<code class="notranslate">cd gw</code><br>
<code class="notranslate">npm install --save next react react-dom</code><br>
<code class="notranslate">mkdir pages</code><br>
<code class="notranslate">cd pages</code><br>
<code class="notranslate">vim index.js</code><br>
index.js content<br>
<code class="notranslate">export default () => <div>Welcome to next.js!</div></code><br>
package.json<br>
<code class="notranslate">{ "scripts": { "a": "next", "build": "next build", "start": "next start" }, "dependencies": { "next": "^4.1.4", "react": "^16.1.0", "react-dom": "^16.1.0" } }</code><br>
<code class="notranslate">npm run dev</code></p>
<h2 dir="auto">Context</h2>
<p dir="auto">I'm just going to do my project with next.js, but I've got this problem at the beginning.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>4.1.4</td>
</tr>
<tr>
<td>node</td>
<td>8.0.0</td>
</tr>
<tr>
<td>OS</td>
<td>macOS 10.12.6</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>
<p dir="auto">I hope to get help. Thank you very much!</p> | 0 |
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: <code class="notranslate">5.1.0b1 (singularity)</code></p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -> celery:5.1.0b1 (singularity) kombu:5.1.0b1 py:3.8.5
billiard:3.6.4.0 py-amqp:5.0.6
platform -> system:Linux arch:64bit, ELF
kernel version:5.8.0-48-generic imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:amqp results:redis://localhost/
broker_url: 'amqp://guest:********@localhost:5672//'
result_backend: 'redis://localhost/'
deprecated_settings: None"><pre class="notranslate"><code class="notranslate">software -> celery:5.1.0b1 (singularity) kombu:5.1.0b1 py:3.8.5
billiard:3.6.4.0 py-amqp:5.0.6
platform -> system:Linux arch:64bit, ELF
kernel version:5.8.0-48-generic imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:amqp results:redis://localhost/
broker_url: 'amqp://guest:********@localhost:5672//'
result_backend: 'redis://localhost/'
deprecated_settings: None
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Celery Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import celery
app = celery.Celery(
broker='amqp://localhost',
backend='redis://localhost',
)
@app.task
def task_a(number):
print(f'Task A: {number}')
return number
@app.task
def task_b(number):
print(f'Task B: {number}')
return number
@app.task
def task_c(number):
print(f'Task C: {number}')
if __name__ == '__main__':
celery.chord(
(celery.chain(task_a.s(i), task_b.s()))
for i in range(3)
)(task_c.s()) # yapf: disable
app.start()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">celery</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">celery</span>.<span class="pl-v">Celery</span>(
<span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">'amqp://localhost'</span>,
<span class="pl-s1">backend</span><span class="pl-c1">=</span><span class="pl-s">'redis://localhost'</span>,
)
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">task_a</span>(<span class="pl-s1">number</span>):
<span class="pl-en">print</span>(<span class="pl-s">f'Task A: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">number</span><span class="pl-kos">}</span></span>'</span>)
<span class="pl-k">return</span> <span class="pl-s1">number</span>
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">task_b</span>(<span class="pl-s1">number</span>):
<span class="pl-en">print</span>(<span class="pl-s">f'Task B: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">number</span><span class="pl-kos">}</span></span>'</span>)
<span class="pl-k">return</span> <span class="pl-s1">number</span>
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">task_c</span>(<span class="pl-s1">number</span>):
<span class="pl-en">print</span>(<span class="pl-s">f'Task C: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">number</span><span class="pl-kos">}</span></span>'</span>)
<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>:
<span class="pl-s1">celery</span>.<span class="pl-en">chord</span>(
(<span class="pl-s1">celery</span>.<span class="pl-en">chain</span>(<span class="pl-s1">task_a</span>.<span class="pl-en">s</span>(<span class="pl-s1">i</span>), <span class="pl-s1">task_b</span>.<span class="pl-en">s</span>()))
<span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">3</span>)
)(<span class="pl-s1">task_c</span>.<span class="pl-en">s</span>()) <span class="pl-c"># yapf: disable</span>
<span class="pl-s1">app</span>.<span class="pl-en">start</span>()</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Expected output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2021-04-11 16:44:51,364: WARNING/ForkPoolWorker-15] Task A: 0
[2021-04-11 16:44:51,364: WARNING/ForkPoolWorker-16] Task A: 1
[2021-04-11 16:44:51,364: WARNING/ForkPoolWorker-1] Task A: 2
[2021-04-11 16:44:51,387: WARNING/ForkPoolWorker-4] Task B: 2
[2021-04-11 16:44:51,387: WARNING/ForkPoolWorker-3] Task B: 0
[2021-04-11 16:44:51,387: WARNING/ForkPoolWorker-2] Task B: 1
[2021-04-11 16:44:51,413: WARNING/ForkPoolWorker-15] Task C: [0, 1, 2]"><pre class="notranslate"><code class="notranslate">[2021-04-11 16:44:51,364: WARNING/ForkPoolWorker-15] Task A: 0
[2021-04-11 16:44:51,364: WARNING/ForkPoolWorker-16] Task A: 1
[2021-04-11 16:44:51,364: WARNING/ForkPoolWorker-1] Task A: 2
[2021-04-11 16:44:51,387: WARNING/ForkPoolWorker-4] Task B: 2
[2021-04-11 16:44:51,387: WARNING/ForkPoolWorker-3] Task B: 0
[2021-04-11 16:44:51,387: WARNING/ForkPoolWorker-2] Task B: 1
[2021-04-11 16:44:51,413: WARNING/ForkPoolWorker-15] Task C: [0, 1, 2]
</code></pre></div>
<p dir="auto">On <code class="notranslate">celery==5.0.5</code> it works fine</p>
<h1 dir="auto">Actual Behavior</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2021-04-11 16:33:24,583: WARNING/ForkPoolWorker-15] Task A: 0
[2021-04-11 16:33:24,583: WARNING/ForkPoolWorker-1] Task A: 2
[2021-04-11 16:33:24,583: WARNING/ForkPoolWorker-16] Task A: 1
[2021-04-11 16:33:24,608: WARNING/ForkPoolWorker-4] Task B: 2
[2021-04-11 16:33:24,608: WARNING/ForkPoolWorker-2] Task B: 0
[2021-04-11 16:33:24,608: WARNING/ForkPoolWorker-3] Task B: 1"><pre class="notranslate"><code class="notranslate">[2021-04-11 16:33:24,583: WARNING/ForkPoolWorker-15] Task A: 0
[2021-04-11 16:33:24,583: WARNING/ForkPoolWorker-1] Task A: 2
[2021-04-11 16:33:24,583: WARNING/ForkPoolWorker-16] Task A: 1
[2021-04-11 16:33:24,608: WARNING/ForkPoolWorker-4] Task B: 2
[2021-04-11 16:33:24,608: WARNING/ForkPoolWorker-2] Task B: 0
[2021-04-11 16:33:24,608: WARNING/ForkPoolWorker-3] Task B: 1
</code></pre></div> | <h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: 5.05 and master (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/2411504f4164ac9acfa20007038d37591c6f57e5/hovercard" href="https://github.com/celery/celery/commit/2411504f4164ac9acfa20007038d37591c6f57e5"><tt>2411504</tt></a>)</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -> celery:5.1.0b2 (singularity) kombu:5.1.0b1 py:3.9.5
billiard:3.6.4.0 py-amqp:5.0.6
platform -> system:Darwin arch:64bit
kernel version:20.4.0 imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:amqp results:disabled
deprecated_settings: None"><pre class="notranslate"><code class="notranslate">software -> celery:5.1.0b2 (singularity) kombu:5.1.0b1 py:3.9.5
billiard:3.6.4.0 py-amqp:5.0.6
platform -> system:Darwin arch:64bit
kernel version:20.4.0 imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:amqp results:disabled
deprecated_settings: None
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: Unknown, tested on 3.9</li>
<li><strong>Minimal Celery Version</strong>: Unknown, tested on 5.05 and master</li>
<li><strong>Minimal Kombu Version</strong>: N/A</li>
<li><strong>Minimal Broker Version</strong>: N/A</li>
<li><strong>Minimal Result Backend Version</strong>: N/A</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A</li>
<li><strong>Minimal Broker Client Version</strong>: N/A</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp==5.0.6
billiard==3.6.4.0
celery @ git+https://github.com/celery/celery.git@2411504f4164ac9acfa20007038d37591c6f57e5
click==7.1.2
click-didyoumean==0.0.3
click-plugins==1.1.1
click-repl==0.1.6
kombu==5.1.0b1
prompt-toolkit==3.0.18
pytz==2021.1
six==1.16.0
vine==5.0.0
wcwidth==0.2.5"><pre class="notranslate"><code class="notranslate">amqp==5.0.6
billiard==3.6.4.0
celery @ git+https://github.com/celery/celery.git@2411504f4164ac9acfa20007038d37591c6f57e5
click==7.1.2
click-didyoumean==0.0.3
click-plugins==1.1.1
click-repl==0.1.6
kombu==5.1.0b1
prompt-toolkit==3.0.18
pytz==2021.1
six==1.16.0
vine==5.0.0
wcwidth==0.2.5
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
</p><p dir="auto"><code class="notranslate">app.py</code>:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import celery
app = celery.Celery()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">celery</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">celery</span>.<span class="pl-v">Celery</span>()</pre></div>
<p dir="auto"><code class="notranslate">camera.py</code>:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from celery.events.snapshot import Polaroid
class Camera(Polaroid):
def on_shutter(self, _):
print("Hello!")"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">events</span>.<span class="pl-s1">snapshot</span> <span class="pl-k">import</span> <span class="pl-v">Polaroid</span>
<span class="pl-k">class</span> <span class="pl-v">Camera</span>(<span class="pl-v">Polaroid</span>):
<span class="pl-k">def</span> <span class="pl-en">on_shutter</span>(<span class="pl-s1">self</span>, <span class="pl-s1">_</span>):
<span class="pl-en">print</span>(<span class="pl-s">"Hello!"</span>)</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">The following command should (attempt to) start the event camera:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ celery -A app events -c camera
...
ModuleNotFoundError: No module named 'camera'"><pre class="notranslate"><code class="notranslate">$ celery -A app events -c camera
...
ModuleNotFoundError: No module named 'camera'
</code></pre></div>
<p dir="auto">(The bug is independent of whether the module <code class="notranslate">camera</code> exists.)</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">A backtrace is produced:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "/Users/user/Desktop/tmp/venv/bin/celery", line 8, in <module>
sys.exit(main())
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/celery/__main__.py", line 15, in main
sys.exit(_main())
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/celery/bin/celery.py", line 213, in main
return celery(auto_envvar_prefix="CELERY")
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/celery/bin/base.py", line 132, in caller
return f(ctx, *args, **kwargs)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/celery/bin/events.py", line 90, in events
return _run_evcam(camera, app=app, freq=frequency, maxrate=maxrate,
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/celery/bin/events.py", line 37, in _run_evcam
return cam()
TypeError: evcam() got an unexpected keyword argument 'executable'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "/Users/user/Desktop/tmp/venv/bin/celery", line 8, in <module>
sys.exit(main())
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/celery/__main__.py", line 15, in main
sys.exit(_main())
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/celery/bin/celery.py", line 213, in main
return celery(auto_envvar_prefix="CELERY")
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/celery/bin/base.py", line 132, in caller
return f(ctx, *args, **kwargs)
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/celery/bin/events.py", line 90, in events
return _run_evcam(camera, app=app, freq=frequency, maxrate=maxrate,
File "/Users/user/Desktop/tmp/venv/lib/python3.9/site-packages/celery/bin/events.py", line 37, in _run_evcam
return cam()
TypeError: evcam() got an unexpected keyword argument 'executable'
</code></pre></div> | 0 |
<h2 dir="auto">Motivation</h2>
<p dir="auto">Historically organizations partaking in the release process have managed their own fork of incubator-superset which is deployed in production via a Git submodule. Both companies have been actively developing Superset and deploy internally (features and bug fixes) at a higher cadence than the public PyPI releases. These forks came about because of the potential instability of the master branch (see <a href="https://github.com/apache/incubator-superset/issues/6132" data-hovercard-type="issue" data-hovercard-url="/apache/superset/issues/6132/hovercard">SIP-13</a>) and provided a mechanism to cherry-pick specific commits thus ensuring an increased stability.</p>
<p dir="auto">These organizations have discussed ways of trying to fold these forked branches back into the incubator-superset repo to better ensure consistency and to serve as a mechanism for formalizing the release process which is somewhat sporadic.</p>
<h2 dir="auto">Proposed Change</h2>
<p dir="auto">The proposed solution is based primarily on having release branches where certain organizations are the primary beta testers for stabilizing the branch.</p>
<h3 dir="auto">Master branch</h3>
<p dir="auto">There will be no changes to how the <code class="notranslate">master</code> branch currently works. We will do our best to keep the <code class="notranslate">master</code> branch healthy in part by the initiatives outlined in <a href="https://github.com/apache/incubator-superset/issues/6132" data-hovercard-type="issue" data-hovercard-url="/apache/superset/issues/6132/hovercard">SIP-13</a>. If you create a pull request, please do it against the <code class="notranslate">master</code> branch. We will maintain stable branches for releases separately but we don’t accept pull requests to them directly. Instead, we will cherry-pick non-breaking changes from <code class="notranslate">master</code> to the two latest releases.</p>
<h3 dir="auto">Release Cadence</h3>
<p dir="auto">We propose a regular release cadence of every <strong>two weeks</strong>. This period is a tradeoff between stability and flexibility ensuring that new features can be deployed within a reasonable time frame. Furthermore the longer the release cadence the greater the potential conflict when cherry-picking commits. A release will be deployed two weeks after it was cut.</p>
<p dir="auto">We propose that each release branch is fully managed by a single organization.</p>
<h3 dir="auto">Branch Naming</h3>
<p dir="auto">We propose that all Git branches follow the <code class="notranslate"><prefix>/<suffix></code> naming convention:</p>
<ul dir="auto">
<li>Personal: <code class="notranslate"><username>/<issue></code>, i.e., <code class="notranslate">jane-doe/issue-123</code></li>
<li>Feature: <code class="notranslate">feature/<name></code>, i.e., <code class="notranslate">feature/dashboard-v2</code></li>
<li>Release: <code class="notranslate">release/<version></code>, i.e., <code class="notranslate">release/1.1</code></li>
</ul>
<p dir="auto">Note if <code class="notranslate">/</code> is troublesome we suggest using a two hyphens (<code class="notranslate">--</code>) instead.</p>
<h3 dir="auto">Semantic Versioning</h3>
<p dir="auto">Superset follows semantic versioning (<code class="notranslate"><major>.<minor>.<patch></code>) although the major version has remained fixed at zero. We should release patch versions for bug fixes, minor versions for new features, and the major version for breaking changes. When we make breaking changes, we should also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance.</p>
<p dir="auto">Git release branches represent the <code class="notranslate"><major>.<minor></code> level whereas Git tags (associated with a specific commit) represent the fully defined <code class="notranslate"><major>.<minor>.<patch></code> version. Note tags may contain an optional release candidate suffix (<code class="notranslate">-rc</code>).</p>
<h3 dir="auto">The Git Ecosystem</h3>
<p dir="auto">The following diagram describes the <code class="notranslate">apache/incubator-superset</code> Git ecosystem and how we plan to couple this with several organization's internal deployment (superset-internal which uses a Git submodule) which will help serve as a mechanism for stabilizing a release.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4567245/47102523-d96e2d00-d1f1-11e8-9291-a9addf007bac.png"><img src="https://user-images.githubusercontent.com/4567245/47102523-d96e2d00-d1f1-11e8-9291-a9addf007bac.png" alt="release" style="max-width: 100%;"></a></p>
<h4 dir="auto">Day 0</h4>
<p dir="auto">On day 0 the next release branch (<code class="notranslate">release/1.1</code>) will be cut from <code class="notranslate">master</code> which references the latest commit. The commit will be tagged with <code class="notranslate">v1.1.0-rc</code> (the v1.1.0 release candidate) and deployed to PyPI.</p>
<h4 dir="auto">Day 0 - 13</h4>
<p dir="auto">Only commits associated which resolve bugs present in the release candidate will be cherry-picked onto the release branch. Fixes to features added after the cut will not be cherry picked (†). Note there may be potential merge conflicts (which will have to be resolved) when cherry-picking a fix due to an upstream commit which is not in the release (‡). If this is too complex the cherry-pick should be skipped (---) as it will be included in the next release. New features can be committed on <code class="notranslate">master</code> <strong>if and only if</strong> they’re defined in their entirety within the two week cycle. Larger features should be developed on a feature specific branch (which is then merged into <code class="notranslate">master</code>) or using feature flags.</p>
<p dir="auto">The following diagram shows the use of a feature branch which spans multiple releases.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4567245/47102567-eee35700-d1f1-11e8-8b1b-3de48729ebc3.png"><img src="https://user-images.githubusercontent.com/4567245/47102567-eee35700-d1f1-11e8-8b1b-3de48729ebc3.png" alt="feature" style="max-width: 100%;"></a></p>
<h4 dir="auto">Day 7</h4>
<p dir="auto">Organizations partaking in the release process will update the Git submodule reference to point to the release (<code class="notranslate">release/1.1</code>). This seven day lag provides a soak period of ensuring that critical bugs are not deployed to our production environments. The update is made to the <code class="notranslate">.gitmodules</code> file,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[submodule "incubator-superset"]
path = incubator-superset
url = https://github.com/apache/incubator-superset
branch = release/1.1"><pre class="notranslate"><code class="notranslate">[submodule "incubator-superset"]
path = incubator-superset
url = https://github.com/apache/incubator-superset
branch = release/1.1
</code></pre></div>
<p dir="auto">which ensures it tracks the correct release branch. Like the two week release process the submodule branch will be updated every two weeks.</p>
<h4 dir="auto">Day 7 - 20</h4>
<p dir="auto">Periodically organizations partaking in the release process will ensure that the submodule in their internal deployment will reference the latest commit from the remote branch (which contains all the cherries) via,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git submodule update --remote --recursive --merge "><pre class="notranslate"><code class="notranslate">git submodule update --remote --recursive --merge
</code></pre></div>
<p dir="auto">which will fetch the latest changes for each submodule, merge them in, and check out the latest revision of the submodule. This step allows us to further test and stabilize the branch in a production environment.</p>
<h4 dir="auto">Day 14</h4>
<p dir="auto">The first (non release candidate) version will be tagged (<code class="notranslate">v1.1.0</code>) and deployed to PyPI which references the latest commit on the branch (*). Simultaneously the next release branch (<code class="notranslate">release/1.2</code>) will be cut from <code class="notranslate">master</code> which will mimic <code class="notranslate">v1.1.0</code> except it will also include any feature commits which were merged in the past 14 days. Note a new release branch is cut if and only if feature commits were added, to prevent duplication.</p>
<p dir="auto">The following diagram shows an example where on day 14 a new release branch is not cut as there were no new features added since day 0. The next viable release cut date will then be day 28 to preserve the release cadence.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4567245/47102650-24884000-d1f2-11e8-8039-e01e55343e17.png"><img src="https://user-images.githubusercontent.com/4567245/47102650-24884000-d1f2-11e8-8039-e01e55343e17.png" alt="no-release" style="max-width: 100%;"></a></p>
<h4 dir="auto">Day 14 - 27</h4>
<p dir="auto">Additional bug fixes to commits in the release candidate will be cherry-picked onto the <em>n</em> most recent releases (where <em>n</em> = 2, i.e.,<code class="notranslate"> release/1.1</code> and <code class="notranslate">release/1.2</code>). Throughout this period the tag can be updated (incrementing the patch) as desired based on the severity of the fix.</p>
<h4 dir="auto">Day 28 -</h4>
<p dir="auto">Assuming there is a new release branch (<code class="notranslate">release/1.3</code>) we will no longer be picking cherries onto <code class="notranslate">release/1.1</code> since we only support two releases (<code class="notranslate">release/1.2</code> and <code class="notranslate">release/1.3</code>). In summary most release branches will have a four week active lifespan.</p>
<p dir="auto">Branches should exist for infinitum to ensure critical security fixes can be patched to the necessary branch.</p>
<h4 dir="auto">Database Migrations</h4>
<p dir="auto">Database migrations (which are handled via <a href="https://alembic.zzzcomputing.com/en/latest/" rel="nofollow">Alembic</a>) have an additional lineage component (used to determine upgrades and downgrades) which further complicates matters. We need to ensure the playback of versions is correct when upgrading to a newer release and that a downgrade is never necessary.</p>
<p dir="auto">The logic for cherry-picking migrations is similar to above whereas migrations can be cherry-picked onto a release branch <strong>if and only if</strong> all of its ancestors are present on the branch. Given that there no notion of resolving merge conflicts in Alembic, any migration (and thus future migrations) related to a feature will be skipped (<code class="notranslate">--</code>) and included in the next release.</p>
<h2 dir="auto">Action Items</h2>
<p dir="auto">Currently we plan on manually cherry-picking the commits from <code class="notranslate">master</code> to the desired release branch. This could be automated in the future based on PR tags and/or the assistance from a bot.</p>
<p dir="auto">We also should check with Apache whether there are any concerns/feasibility issues with releasing on a two week cadence.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/beto/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/beto">@beto</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mistercrunch/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mistercrunch">@mistercrunch</a></p> | <p dir="auto">As a continuation feature to the native-filters left side panel there is a requirement on focusing users on charts by a specific user-path in watch a short summary for the current active filters that applies the current scope in order to make the dashboard more readable oriented in the cases where dashboards are served as a client-facing application.</p>
<p dir="auto">For that we offer the Filter summary bar which it is another element that can be dragged into the dashboard layout (as charts, tabs , column ,row and etc') , which means it would be optional to use in each dashboard</p>
<h1 dir="auto">prototype</h1>
<p dir="auto"><a href="https://www.figma.com/proto/g3MebAB0lUc0aa5pLRcepn/Superset-Filter-Summary-Bar?page-id=0%3A1&node-id=1%3A2&scaling=min-zoom&starting-point-node-id=1%3A2" rel="nofollow">Figma</a></p>
<h2 dir="auto">key features:</h2>
<ol dir="auto">
<li>the filter summary bar will always be displayed upon dragging it into the layout</li>
<li>upon scope change like tab change, filters will only display the active filters for that scope</li>
<li>the purpose of this is not to show accurate filters that are being applied as the filter indicator main purpose but just a summary of what filters are active on the scope</li>
</ol>
<p dir="auto">note: we might consider hiding(CSS) those chart filter indicators in order to focus the user on visualization themself but that is for the dashboard creator to decide on each dashboard separately</p>
<h2 dir="auto">backward compatibility:</h2>
<p dir="auto">if you don't drag the filter summary bar into the dashboard feature will not be used at all and existing functionality remains intact</p>
<h3 dir="auto">dashboard preview:</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/47772523/137370293-cf9ae225-ac23-4c50-9825-d22bdb9c670b.png"><img src="https://user-images.githubusercontent.com/47772523/137370293-cf9ae225-ac23-4c50-9825-d22bdb9c670b.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Summary Filter bar component</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/47772523/137370427-f498cea8-94d9-4045-a90c-d23e1605a6e2.png"><img src="https://user-images.githubusercontent.com/47772523/137370427-f498cea8-94d9-4045-a90c-d23e1605a6e2.png" alt="image" style="max-width: 100%;"></a></p> | 0 |
<h3 dir="auto">Describe your issue.</h3>
<p dir="auto">I'm inconsistently getting a RuntimeWarning from scipy, seemingly only after running a matplotlib plotting function. This isn't really a problem for me, but it is weird and I didn't see it referenced anywhere so I figured I would at least raise an issue.</p>
<p dir="auto">I don't get the runtime error if I just run <code class="notranslate">beta.pdf(xs, 1.2, 1.8)</code> outside the plotting function. In general the error seems to appear inconsistently, and I'm not entirely sure how to characterise the conditions accurately.</p>
<p dir="auto">This is possibly related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="781683689" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/13364" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/13364/hovercard" href="https://github.com/scipy/scipy/issues/13364">#13364</a>, since <a href="https://github.com/scipy/scipy/issues/13364#issuecomment-860052441" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/13364/hovercard">this comment</a> has the same error from some tests. I am also on an M1 mac, and using the miniforge version of scipy).</p>
<h3 dir="auto">Reproducing Code Example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
from scipy.stats import beta
import numpy as np
xs = np.linspace(0, 1, 100)
plt.plot(xs, beta.pdf(xs, 1.2, 1.8))
beta.ppf(0.01, 1.2, 1.8)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">stats</span> <span class="pl-k">import</span> <span class="pl-s1">beta</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">xs</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">100</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">xs</span>, <span class="pl-s1">beta</span>.<span class="pl-en">pdf</span>(<span class="pl-s1">xs</span>, <span class="pl-c1">1.2</span>, <span class="pl-c1">1.8</span>))
<span class="pl-s1">beta</span>.<span class="pl-en">ppf</span>(<span class="pl-c1">0.01</span>, <span class="pl-c1">1.2</span>, <span class="pl-c1">1.8</span>)</pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/opt/homebrew/Caskroom/miniforge/base/envs/smokey/lib/python3.9/site-packages/scipy/stats/_continuous_distns.py:624: RuntimeWarning: overflow encountered in _beta_ppf
return _boost._beta_ppf(q, a, b)"><pre class="notranslate">/opt/homebrew/Caskroom/miniforge/base/envs/smokey/lib/python3.9/site-packages/scipy/stats/_continuous_distns.py:624: RuntimeWarning: overflow encountered <span class="pl-k">in</span> _beta_ppf
<span class="pl-k">return</span> _boost._beta_ppf(q, a, b)</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version information</h3>
<p dir="auto">1.7.0 1.21.2 sys.version_info(major=3, minor=9, micro=6, releaselevel='final', serial=0)</p> | <h3 dir="auto">Describe your issue</h3>
<p dir="auto">Several statistical distribution methods emit warnings stemming from Boost. This issue tracks the status of all of them.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">beta.ppf</code> as reported here; should be fixed by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1393910253" data-permission-text="Title is private" data-url="https://github.com/boostorg/math/issues/827" data-hovercard-type="pull_request" data-hovercard-url="/boostorg/math/pull/827/hovercard" href="https://github.com/boostorg/math/pull/827">boostorg/math#827</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">ncf</code> as reported in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1388256302" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/17101" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/17101/hovercard" href="https://github.com/scipy/scipy/issues/17101">gh-17101</a>, should be fixed by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1410540033" data-permission-text="Title is private" data-url="https://github.com/boostorg/math/issues/846" data-hovercard-type="pull_request" data-hovercard-url="/boostorg/math/pull/846/hovercard" href="https://github.com/boostorg/math/pull/846">boostorg/math#846</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">nct</code> - I'm not sure that this has been reported separately yet. Is it caused by the same sort of thing?</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">ncx2</code> - Ditto.</li>
</ul>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1418900239" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/17272" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/17272/hovercard" href="https://github.com/scipy/scipy/pull/17272">gh-17272</a> will silence <a href="https://github.com/scipy/scipy/issues/14901#issuecomment-1272504168" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/14901/hovercard">the failures in SciPy's tests</a> temporarily, but as many of these marks as possible should be removed when <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1405303062" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/17207" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/17207/hovercard" href="https://github.com/scipy/scipy/pull/17207">gh-17207</a> merges.</p>
<hr>
<p dir="auto"><em>Original Post</em></p>
<h3 dir="auto">Describe your issue.</h3>
<p dir="auto">macOS CI is failing due to an overflow. I am still trying to reproduce locally.</p>
<p dir="auto">NumPy was updated to 1.21.3, could be this or another dependency.</p>
<p dir="auto"><a href="https://github.com/scipy/scipy/runs/3960228039">https://github.com/scipy/scipy/runs/3960228039</a></p>
<h3 dir="auto">Reproducing Code Example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# from scipy/stats/tests/test_distributions.py:2878: in test_issue_12796
import numpy as np
from scipy import stats
q = 0.999995
a = np.array([ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])
b = np.array([99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991, 99990, 99989, 99988, 99987, 99986, 99985, 99984, 99983, 99982, 99981])
stats.beta.ppf(q, a, b)"><pre class="notranslate"><span class="pl-c"># from scipy/stats/tests/test_distributions.py:2878: in test_issue_12796</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">from</span> <span class="pl-s1">scipy</span> <span class="pl-k">import</span> <span class="pl-s1">stats</span>
<span class="pl-s1">q</span> <span class="pl-c1">=</span> <span class="pl-c1">0.999995</span>
<span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([ <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>, <span class="pl-c1">5</span>, <span class="pl-c1">6</span>, <span class="pl-c1">7</span>, <span class="pl-c1">8</span>, <span class="pl-c1">9</span>, <span class="pl-c1">10</span>, <span class="pl-c1">11</span>, <span class="pl-c1">12</span>, <span class="pl-c1">13</span>, <span class="pl-c1">14</span>, <span class="pl-c1">15</span>, <span class="pl-c1">16</span>, <span class="pl-c1">17</span>, <span class="pl-c1">18</span>, <span class="pl-c1">19</span>, <span class="pl-c1">20</span>])
<span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">99999</span>, <span class="pl-c1">99998</span>, <span class="pl-c1">99997</span>, <span class="pl-c1">99996</span>, <span class="pl-c1">99995</span>, <span class="pl-c1">99994</span>, <span class="pl-c1">99993</span>, <span class="pl-c1">99992</span>, <span class="pl-c1">99991</span>, <span class="pl-c1">99990</span>, <span class="pl-c1">99989</span>, <span class="pl-c1">99988</span>, <span class="pl-c1">99987</span>, <span class="pl-c1">99986</span>, <span class="pl-c1">99985</span>, <span class="pl-c1">99984</span>, <span class="pl-c1">99983</span>, <span class="pl-c1">99982</span>, <span class="pl-c1">99981</span>])
<span class="pl-s1">stats</span>.<span class="pl-s1">beta</span>.<span class="pl-en">ppf</span>(<span class="pl-s1">q</span>, <span class="pl-s1">a</span>, <span class="pl-s1">b</span>)</pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="FAILED scipy/stats/tests/test_distributions.py::TestBeta::test_issue_12635 - ...
927
FAILED scipy/stats/tests/test_distributions.py::TestBeta::test_issue_12794 - ...
928
FAILED scipy/stats/tests/test_distributions.py::TestBeta::test_issue_12796 - ...
...
scipy/stats/_continuous_distns.py:626: in _ppf
916
return _boost._beta_ppf(q, a, b)
917
E RuntimeWarning: overflow encountered in _beta_ppf"><pre class="notranslate">FAILED scipy/stats/tests/test_distributions.py::TestBeta::test_issue_12635 - ...
927
FAILED scipy/stats/tests/test_distributions.py::TestBeta::test_issue_12794 - ...
928
FAILED scipy/stats/tests/test_distributions.py::TestBeta::test_issue_12796 - ...
...
scipy/stats/_continuous_distns.py:626: <span class="pl-k">in</span> _ppf
916
<span class="pl-k">return</span> _boost._beta_ppf(q, a, b)
917
E RuntimeWarning: overflow encountered <span class="pl-k">in</span> _beta_ppf</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version information</h3>
<p dir="auto">master on macOS/CI</p> | 1 |
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bstrie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bstrie">@bstrie</a> So, this code raises an assertion in llvm when compiling with -g. Without -g it works fine.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(unboxed_closures)]
pub struct A;
impl A {
pub fn foo(&self, f: Box<Fn<(), ()> + 'static>) ->
Box<Fn<(), ()> + 'static> {
(box move |&:| {
(*f).call(())
})
}
}"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>unboxed_closures<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">A</span><span class="pl-kos">;</span>
<span class="pl-k">impl</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
<span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">self</span><span class="pl-kos">,</span> <span class="pl-s1">f</span><span class="pl-kos">:</span> <span class="pl-smi">Box</span><span class="pl-kos"><</span><span class="pl-smi">Fn</span><span class="pl-kos"><</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">></span> + <span class="pl-c1">'</span><span class="pl-ent">static</span><span class="pl-kos">></span><span class="pl-kos">)</span> ->
<span class="pl-smi">Box</span><span class="pl-kos"><</span><span class="pl-smi">Fn</span><span class="pl-kos"><</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">></span> + <span class="pl-c1">'</span><span class="pl-ent">static</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-kos">(</span>box <span class="pl-k">move</span> |<span class="pl-c1">&</span><span class="pl-kos">:</span>| <span class="pl-kos">{</span>
<span class="pl-kos">(</span><span class="pl-c1">*</span>f<span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Raised assertion is</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc: /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/llvm/lib/IR/Instructions.cpp:1086: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
[1] 1800 abort (core dumped) rustc --crate-type lib test.rs -g"><pre class="notranslate"><code class="notranslate">rustc: /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/llvm/lib/IR/Instructions.cpp:1086: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
[1] 1800 abort (core dumped) rustc --crate-type lib test.rs -g
</code></pre></div>
<p dir="auto">Edit: reduced code more</p> | <p dir="auto">rust version: rustc 0.12.0-pre-nightly (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/09abbbdafc08654b78c8529c1a0c03d628bb2d91/hovercard" href="https://github.com/rust-lang/rust/commit/09abbbdafc08654b78c8529c1a0c03d628bb2d91"><tt>09abbbd</tt></a> 2014-09-11 00:05:41 +0000)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Assertion failed: (getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"), function AssertOK, file /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/llvm/lib/IR/Instructions.cpp, line 1085."><pre class="notranslate"><code class="notranslate">Assertion failed: (getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"), function AssertOK, file /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/llvm/lib/IR/Instructions.cpp, line 1085.
</code></pre></div>
<p dir="auto">code to reproduce:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trait Tr: Clone {
fn clone_to_tobj(&self) -> Box<Tr> {
return box self.clone()
}
}
#[deriving(Clone)]
struct A;
impl Tr for A {
}
fn main() {
let a: Box<Tr> = box A;
}"><pre class="notranslate"><code class="notranslate">trait Tr: Clone {
fn clone_to_tobj(&self) -> Box<Tr> {
return box self.clone()
}
}
#[deriving(Clone)]
struct A;
impl Tr for A {
}
fn main() {
let a: Box<Tr> = box A;
}
</code></pre></div>
<p dir="auto">but this compiles fine</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trait Tr: Clone {
fn clone_to_tobj(&self) -> Box<Tr> {
box self.clone()
}
}
#[deriving(Clone)]
struct A;
impl Tr for A {
}
fn main() {
let a: Box<Tr> = box A;
}"><pre class="notranslate"><code class="notranslate">trait Tr: Clone {
fn clone_to_tobj(&self) -> Box<Tr> {
box self.clone()
}
}
#[deriving(Clone)]
struct A;
impl Tr for A {
}
fn main() {
let a: Box<Tr> = box A;
}
</code></pre></div> | 1 |
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: 4.3.0</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.7.1</li>
<li><strong>Minimal Celery Version</strong>: 4.3.0</li>
<li><strong>Minimal Kombu Version</strong>: 4.2.1</li>
<li><strong>Minimal Broker Version</strong>: redis==2.10.6</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: redis==2.10.6</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp==2.2.2
appdirs==1.4.3
appnope==0.1.0
argh==0.26.2
attrs==17.4.0
autoflake==1.1
Babel==2.6.0
backports.shutil-get-terminal-size==1.0.0
billiard==3.5.0.3
bleach==3.0.2
boto3==1.7.22
botocore==1.10.22
cachetools==3.1.0
celery==4.3.0
certifi==2018.1.18
chardet==3.0.4
colorama==0.3.9
contextlib2==0.5.5
coverage==4.5.1
decorator==4.2.1
defusedxml==0.5.0
dj-database-url==0.5.0
Django==2.2
django-admin-rangefilter==0.3.12
django-allauth==0.35.0
django-celery-beat==1.1.1
django-cors-middleware==1.3.1
django-cursor-pagination==0.1.2
django-extensions==2.0.0
django-filter==1.1.0
django-formtools==2.1
django-otp==0.5.0
django-phonenumber-field==1.3.0
django-prometheus==1.0.15
django-two-factor-auth==1.8.0
django-viewflow-pro==1.4.2
djangorestframework==3.7.7
djangorestframework-simplejwt==3.2.2
djproxy==2.3.4
docopt==0.6.2
docutils==0.14
elasticsearch==6.0.0
enum34==1.1.6
ephem==3.7.6.0
factory-boy==2.11.1
Faker==0.8.11
flake8==3.5.0
flake8-isort==2.4
flake8-polyfill==1.0.2
freezegun==0.3.11
gevent==1.3.7
google-api-core==1.7.0
google-auth==1.6.2
googleapis-common-protos==1.5.6
graphene==2.0.1
graphene-django==2.0.0
graphql-core==2.0
graphql-relay==0.4.5
greenlet==0.4.15
grpcio==1.17.1
grpcio-tools==1.17.1
gunicorn==19.9.0
idna==2.6
img2pdf==0.3.2
ipdb==0.11
ipython==6.2.1
ipython-genutils==0.2.0
iso8601==0.1.12
isort==4.3.4
jedi==0.11.1
jmespath==0.9.3
jsonfield==2.0.2
kombu==4.2.1
mccabe==0.6.1
mock==2.0.0
mypy==0.641
mypy-extensions==0.4.1
mypy-protobuf==1.7
numpy==1.16.2
oauthlib==2.0.6
opencensus==0.1.10
packaging==17.1
parso==0.1.1
pathlib2==2.3.0
pathtools==0.1.2
pbr==3.1.1
pdfrw==0.4
permissive-search==0.1.7
pexpect==4.4.0
phonenumberslite==8.10.4
pickleshare==0.7.4
Pillow==5.4.1
pkginfo==1.4.2
pluggy==0.6.0
prometheus-client==0.5.0
promise==2.1
prompt-toolkit==1.0.15
protobuf==3.6.1
psycopg2-binary==2.7.6.1
ptyprocess==0.5.2
py==1.5.2
pyasn1==0.4.5
pyasn1-modules==0.2.4
pycodestyle==2.3.1
pycountry==18.5.26
pycurl==7.43.0.1
pyflakes==1.6.0
Pygments==2.2.0
PyJWT==1.6.1
pyparsing==2.2.0
pytest==3.4.1
pytest-cov==2.5.1
pytest-django==3.1.2
pytest-watch==4.1.0
pythia-python==1.5.2
python-dateutil==2.7.0
python-http-client==3.1.0
python3-openid==3.1.0
pytz==2018.3
PyYAML==3.12
qrcode==6.1
raven==6.6.0
readme-renderer==24.0
redis==2.10.6
reportlab==3.5.13
requests==2.20.0
requests_aws4auth==0.9
requests-mock==1.4.0
requests-oauthlib==0.8.0
requests-toolbelt==0.8.0
rsa==4.0
Rx==1.6.1
s3transfer==0.1.13
scandir==1.7
sendgrid==5.3.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.11.0
snapshottest==0.5.0
termcolor==1.1.0
testfixtures==5.4.0
text-unidecode==1.2
tqdm==4.19.8
traitlets==4.3.2
twine==1.12.1
typed-ast==1.1.0
typing==3.6.4
ulid==1.1
Unidecode==1.0.22
urllib3==1.22
vine==1.1.4
watchdog==0.8.3
wcwidth==0.1.7
webencodings==0.5.1
whitenoise==3.3.1
wrapt==1.10.11
yapf==0.20.2"><pre class="notranslate"><code class="notranslate">amqp==2.2.2
appdirs==1.4.3
appnope==0.1.0
argh==0.26.2
attrs==17.4.0
autoflake==1.1
Babel==2.6.0
backports.shutil-get-terminal-size==1.0.0
billiard==3.5.0.3
bleach==3.0.2
boto3==1.7.22
botocore==1.10.22
cachetools==3.1.0
celery==4.3.0
certifi==2018.1.18
chardet==3.0.4
colorama==0.3.9
contextlib2==0.5.5
coverage==4.5.1
decorator==4.2.1
defusedxml==0.5.0
dj-database-url==0.5.0
Django==2.2
django-admin-rangefilter==0.3.12
django-allauth==0.35.0
django-celery-beat==1.1.1
django-cors-middleware==1.3.1
django-cursor-pagination==0.1.2
django-extensions==2.0.0
django-filter==1.1.0
django-formtools==2.1
django-otp==0.5.0
django-phonenumber-field==1.3.0
django-prometheus==1.0.15
django-two-factor-auth==1.8.0
django-viewflow-pro==1.4.2
djangorestframework==3.7.7
djangorestframework-simplejwt==3.2.2
djproxy==2.3.4
docopt==0.6.2
docutils==0.14
elasticsearch==6.0.0
enum34==1.1.6
ephem==3.7.6.0
factory-boy==2.11.1
Faker==0.8.11
flake8==3.5.0
flake8-isort==2.4
flake8-polyfill==1.0.2
freezegun==0.3.11
gevent==1.3.7
google-api-core==1.7.0
google-auth==1.6.2
googleapis-common-protos==1.5.6
graphene==2.0.1
graphene-django==2.0.0
graphql-core==2.0
graphql-relay==0.4.5
greenlet==0.4.15
grpcio==1.17.1
grpcio-tools==1.17.1
gunicorn==19.9.0
idna==2.6
img2pdf==0.3.2
ipdb==0.11
ipython==6.2.1
ipython-genutils==0.2.0
iso8601==0.1.12
isort==4.3.4
jedi==0.11.1
jmespath==0.9.3
jsonfield==2.0.2
kombu==4.2.1
mccabe==0.6.1
mock==2.0.0
mypy==0.641
mypy-extensions==0.4.1
mypy-protobuf==1.7
numpy==1.16.2
oauthlib==2.0.6
opencensus==0.1.10
packaging==17.1
parso==0.1.1
pathlib2==2.3.0
pathtools==0.1.2
pbr==3.1.1
pdfrw==0.4
permissive-search==0.1.7
pexpect==4.4.0
phonenumberslite==8.10.4
pickleshare==0.7.4
Pillow==5.4.1
pkginfo==1.4.2
pluggy==0.6.0
prometheus-client==0.5.0
promise==2.1
prompt-toolkit==1.0.15
protobuf==3.6.1
psycopg2-binary==2.7.6.1
ptyprocess==0.5.2
py==1.5.2
pyasn1==0.4.5
pyasn1-modules==0.2.4
pycodestyle==2.3.1
pycountry==18.5.26
pycurl==7.43.0.1
pyflakes==1.6.0
Pygments==2.2.0
PyJWT==1.6.1
pyparsing==2.2.0
pytest==3.4.1
pytest-cov==2.5.1
pytest-django==3.1.2
pytest-watch==4.1.0
pythia-python==1.5.2
python-dateutil==2.7.0
python-http-client==3.1.0
python3-openid==3.1.0
pytz==2018.3
PyYAML==3.12
qrcode==6.1
raven==6.6.0
readme-renderer==24.0
redis==2.10.6
reportlab==3.5.13
requests==2.20.0
requests_aws4auth==0.9
requests-mock==1.4.0
requests-oauthlib==0.8.0
requests-toolbelt==0.8.0
rsa==4.0
Rx==1.6.1
s3transfer==0.1.13
scandir==1.7
sendgrid==5.3.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.11.0
snapshottest==0.5.0
termcolor==1.1.0
testfixtures==5.4.0
text-unidecode==1.2
tqdm==4.19.8
traitlets==4.3.2
twine==1.12.1
typed-ast==1.1.0
typing==3.6.4
ulid==1.1
Unidecode==1.0.22
urllib3==1.22
vine==1.1.4
watchdog==0.8.3
wcwidth==0.1.7
webencodings==0.5.1
whitenoise==3.3.1
wrapt==1.10.11
yapf==0.20.2
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@celery_app.task(name="some_name")
def some_function(
*,
first_kw: str = "default value 1",
second_kw: str,
third_kw: str,
n_minus_one_kw: str,
last_kw: str = "default value 2"
):
service.make_service(
kw_1=first_kw,
kw_2=second_lw,
kw_3=third_kw,
kw_4=n_minus_one_kw,
kw_5=last_kw,
)
"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">celery_app</span>.<span class="pl-en">task</span>(<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"some_name"</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">some_function</span>(
<span class="pl-c1">*</span>,
<span class="pl-s1">first_kw</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-s">"default value 1"</span>,
<span class="pl-s1">second_kw</span>: <span class="pl-s1">str</span>,
<span class="pl-s1">third_kw</span>: <span class="pl-s1">str</span>,
<span class="pl-s1">n_minus_one_kw</span>: <span class="pl-s1">str</span>,
<span class="pl-s1">last_kw</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-s">"default value 2"</span>
):
<span class="pl-s1">service</span>.<span class="pl-en">make_service</span>(
<span class="pl-s1">kw_1</span><span class="pl-c1">=</span><span class="pl-s1">first_kw</span>,
<span class="pl-s1">kw_2</span><span class="pl-c1">=</span><span class="pl-s1">second_lw</span>,
<span class="pl-s1">kw_3</span><span class="pl-c1">=</span><span class="pl-s1">third_kw</span>,
<span class="pl-s1">kw_4</span><span class="pl-c1">=</span><span class="pl-s1">n_minus_one_kw</span>,
<span class="pl-s1">kw_5</span><span class="pl-c1">=</span><span class="pl-s1">last_kw</span>,
)</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">I expect that my function kwargs with default values will be optional. In example I suppose that first_kw and last_kw will be optional, and other will be required keyword arguments.</p>
<h1 dir="auto">Actual Behavior</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kwonlyargs_optional = [(kw, i) for i, kw in enumerate(spec.kwonlyargs[-split:])]"><pre class="notranslate"><code class="notranslate">kwonlyargs_optional = [(kw, i) for i, kw in enumerate(spec.kwonlyargs[-split:])]
</code></pre></div>
<p dir="auto">will return (kw, i) tuple for kwonlyargs in reversed order. But if I will pass default value for first and last element, and didn't provide default value for second, third, ... (n-1)th element, then this kwonlyargs_optional will assign optional parameter for (n-1)th element and latest elements, not for first and last. And it will cause an error for typing checking, if you wouldn't provide explicitly kward arg for first kwarg argument.</p>
<p dir="auto">Possible solution:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kwonlyargs_optional = [(kw, i) for i, kw in enumerate(spec.kwonlydefaults.keys())]"><pre class="notranslate"><code class="notranslate">kwonlyargs_optional = [(kw, i) for i, kw in enumerate(spec.kwonlydefaults.keys())]
</code></pre></div> | <h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="571454173" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5969" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5969/hovercard" href="https://github.com/celery/celery/issues/5969">#5969</a></p>
<h4 dir="auto">Possible Duplicates</h4>
<p dir="auto">My post<br>
<a href="https://stackoverflow.com/questions/66462079/celery-task-does-not-get-send-to-broker" rel="nofollow">https://stackoverflow.com/questions/66462079/celery-task-does-not-get-send-to-broker</a></p>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: 5.0.5</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -> celery:5.0.5 (singularity) kombu:5.0.2 py:3.7.8
billiard:3.6.3.0 py-amqp:5.0.5
platform -> system:Linux arch:64bit
kernel version:4.15.0-20-generic imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:pyamqp results:db+postgresql://docker:**@pg_db:5432/
broker: 'pyamqp://guest@my-rabbit//'
celery_accept_content: ['json']
environ: {
'CELERY_BROKER': 'pyamqp://guest@my-rabbit//',
'CELERY_BROKER_URL': 'amqp://guest:********@my-rabbit:5672//',
'GPG_KEY': '********',
'HOME': '/home/snake',
'LANG': 'C.UTF-8',
'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:',
'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'PWD': '/home/snake',
'PYTHONDONTWRITEBYTECODE': '1',
'PYTHONUNBUFFERED': '1',
'PYTHON_VERSION': '3.7.8',
'SHLVL': '1',
'TERM': 'xterm',
'_': '/usr/local/bin/celery'}
result_backend: 'db+postgresql://docker:********@pg_db:5432/'
result_persistent: False
result_serializer: 'json'
task_serializer: 'json'
worker_concurrency: 16
deprecated_settings: None
"><pre class="notranslate"><code class="notranslate">software -> celery:5.0.5 (singularity) kombu:5.0.2 py:3.7.8
billiard:3.6.3.0 py-amqp:5.0.5
platform -> system:Linux arch:64bit
kernel version:4.15.0-20-generic imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:pyamqp results:db+postgresql://docker:**@pg_db:5432/
broker: 'pyamqp://guest@my-rabbit//'
celery_accept_content: ['json']
environ: {
'CELERY_BROKER': 'pyamqp://guest@my-rabbit//',
'CELERY_BROKER_URL': 'amqp://guest:********@my-rabbit:5672//',
'GPG_KEY': '********',
'HOME': '/home/snake',
'LANG': 'C.UTF-8',
'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:',
'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'PWD': '/home/snake',
'PYTHONDONTWRITEBYTECODE': '1',
'PYTHONUNBUFFERED': '1',
'PYTHON_VERSION': '3.7.8',
'SHLVL': '1',
'TERM': 'xterm',
'_': '/usr/local/bin/celery'}
result_backend: 'db+postgresql://docker:********@pg_db:5432/'
result_persistent: False
result_serializer: 'json'
task_serializer: 'json'
worker_concurrency: 16
deprecated_settings: None
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.7</li>
<li><strong>Minimal Celery Version</strong>: 4.7.7</li>
<li><strong>Minimal Kombu Version</strong>: 5.0.2</li>
<li><strong>Minimal Broker Version</strong>: RabbitMQ</li>
<li><strong>Minimal Result Backend Version</strong>: N/A</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: 4.15.0-20-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="30803" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/21" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/21/hovercard" href="https://github.com/celery/celery/issues/21">#21</a>-Ubuntu SMP</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="alembic==1.5.5
amqp==5.0.5
Beaker==1.11.0
billiard==3.6.3.0
celery==5.0.5
certifi==2020.12.5
cffi==1.14.5
chardet==4.0.0
click==7.1.2
click-didyoumean==0.0.3
click-plugins==1.1.1
click-repl==0.1.6
cryptography==3.4.6
defusedxml==0.7.0
et-xmlfile==1.0.1
Flask==1.1.1
Flask-Migrate==2.5.3
Flask-pyoidc==3.4.0
Flask-SQLAlchemy==2.4.1
Flask-Testing==0.8.1
Flask-WTF==0.14.3
future==0.18.2
gunicorn==20.0.4
idna==2.10
importlib-metadata==3.7.0
importlib-resources==5.1.2
itsdangerous==1.1.0
jdcal==1.4.1
Jinja2==2.11.3
kombu==5.0.2
Mako==1.1.4
MarkupSafe==1.1.1
oic==1.1.2
openpyxl==3.0.3
prompt-toolkit==3.0.16
psycopg2==2.8.6
pycparser==2.20
pycryptodomex==3.10.1
pyjwkest==1.4.2
pyodbc==4.0.30
python-dateutil==2.8.1
python-editor==1.0.4
python-Levenshtein==0.12.2
pytz==2021.1
requests==2.25.1
six==1.15.0
SQLAlchemy==1.3.23
typing-extensions==3.7.4.3
urllib3==1.26.3
vine==5.0.0
wcwidth==0.2.5
Werkzeug==1.0.1
WTForms==2.3.3
zipp==3.4.1"><pre class="notranslate"><code class="notranslate">alembic==1.5.5
amqp==5.0.5
Beaker==1.11.0
billiard==3.6.3.0
celery==5.0.5
certifi==2020.12.5
cffi==1.14.5
chardet==4.0.0
click==7.1.2
click-didyoumean==0.0.3
click-plugins==1.1.1
click-repl==0.1.6
cryptography==3.4.6
defusedxml==0.7.0
et-xmlfile==1.0.1
Flask==1.1.1
Flask-Migrate==2.5.3
Flask-pyoidc==3.4.0
Flask-SQLAlchemy==2.4.1
Flask-Testing==0.8.1
Flask-WTF==0.14.3
future==0.18.2
gunicorn==20.0.4
idna==2.10
importlib-metadata==3.7.0
importlib-resources==5.1.2
itsdangerous==1.1.0
jdcal==1.4.1
Jinja2==2.11.3
kombu==5.0.2
Mako==1.1.4
MarkupSafe==1.1.1
oic==1.1.2
openpyxl==3.0.3
prompt-toolkit==3.0.16
psycopg2==2.8.6
pycparser==2.20
pycryptodomex==3.10.1
pyjwkest==1.4.2
pyodbc==4.0.30
python-dateutil==2.8.1
python-editor==1.0.4
python-Levenshtein==0.12.2
pytz==2021.1
requests==2.25.1
six==1.15.0
SQLAlchemy==1.3.23
typing-extensions==3.7.4.3
urllib3==1.26.3
vine==5.0.0
wcwidth==0.2.5
Werkzeug==1.0.1
WTForms==2.3.3
zipp==3.4.1
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h3 dir="auto">Broker details</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Listeners
Interface: [::], port: 15672, protocol: http, purpose: HTTP API
Interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0"><pre class="notranslate"><code class="notranslate">Listeners
Interface: [::], port: 15672, protocol: http, purpose: HTTP API
Interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
</code></pre></div>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">.delay and .apply_async tasks are send to rabbitmq broker.</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">When I try to send my task to broker (RabbitMQ) it hangs.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# python shell
promise = foo.s(first_arg="2").apply_async()
# blocking indefinitely. I expected a promise object."><pre class="notranslate"><span class="pl-c"># python shell</span>
<span class="pl-s1">promise</span> <span class="pl-c1">=</span> <span class="pl-s1">foo</span>.<span class="pl-en">s</span>(<span class="pl-s1">first_arg</span><span class="pl-c1">=</span><span class="pl-s">"2"</span>).<span class="pl-en">apply_async</span>()
<span class="pl-c"># blocking indefinitely. I expected a promise object.</span></pre></div>
<p dir="auto">If I run the task synchronously it works as expected.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# python shell
promise = foo.s(first_arg="2").apply()
>>> hello argument 2"><pre class="notranslate"><span class="pl-c"># python shell</span>
<span class="pl-s1">promise</span> <span class="pl-c1">=</span> <span class="pl-s1">foo</span>.<span class="pl-en">s</span>(<span class="pl-s1">first_arg</span><span class="pl-c1">=</span><span class="pl-s">"2"</span>).<span class="pl-en">apply</span>()
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">hello</span> <span class="pl-s1">argument</span> <span class="pl-c1">2</span></pre></div>
<p dir="auto">If I interrupt <code class="notranslate">.apply_async()</code> with ctrl+c I get a traceback with some clues:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/kombu/utils/functional.py", line 32, in __call__
return self.__value__
AttributeError: 'ChannelPromise' object has no attribute '__value__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/amqp/transport.py", line 173, in _connect
host, port, family, socket.SOCK_STREAM, SOL_TCP)
File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -9] Address family for hostname not supported
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/kombu/utils/functional.py", line 325, in retry_over_time
return fun(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/kombu/connection.py", line 866, in _connection_factory
self._connection = self._establish_connection()
File "/usr/local/lib/python3.7/site-packages/kombu/connection.py", line 801, in _establish_connection
conn = self.transport.establish_connection()
File "/usr/local/lib/python3.7/site-packages/kombu/transport/pyamqp.py", line 128, in establish_connection
conn.connect()
File "/usr/local/lib/python3.7/site-packages/amqp/connection.py", line 323, in connect
self.transport.connect()
File "/usr/local/lib/python3.7/site-packages/amqp/transport.py", line 113, in connect
self._connect(self.host, self.port, self.connect_timeout)
File "/usr/local/lib/python3.7/site-packages/amqp/transport.py", line 184, in _connect
"failed to resolve broker hostname"))
File "/usr/local/lib/python3.7/site-packages/amqp/transport.py", line 197, in _connect
self.sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/celery/canvas.py", line 225, in apply_async
return _apply(args, kwargs, **options)
File "/usr/local/lib/python3.7/site-packages/celery/app/task.py", line 565, in apply_async
**options
File "/usr/local/lib/python3.7/site-packages/celery/app/base.py", line 749, in send_task
amqp.send_task_message(P, name, message, **options)
File "/usr/local/lib/python3.7/site-packages/celery/app/amqp.py", line 532, in send_task_message
**properties
File "/usr/local/lib/python3.7/site-packages/kombu/messaging.py", line 178, in publish
exchange_name, declare,
File "/usr/local/lib/python3.7/site-packages/kombu/connection.py", line 525, in _ensured
return fun(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/kombu/messaging.py", line 184, in _publish
channel = self.channel
File "/usr/local/lib/python3.7/site-packages/kombu/messaging.py", line 206, in _get_channel
channel = self._channel = channel()
File "/usr/local/lib/python3.7/site-packages/kombu/utils/functional.py", line 34, in __call__
value = self.__value__ = self.__contract__()
File "/usr/local/lib/python3.7/site-packages/kombu/messaging.py", line 221, in <lambda>
channel = ChannelPromise(lambda: connection.default_channel)
File "/usr/local/lib/python3.7/site-packages/kombu/connection.py", line 884, in default_channel
self._ensure_connection(**conn_opts)
File "/usr/local/lib/python3.7/site-packages/kombu/connection.py", line 439, in _ensure_connection
callback, timeout=timeout
File "/usr/local/lib/python3.7/site-packages/kombu/utils/functional.py", line 339, in retry_over_time
sleep(1.0)"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/kombu/utils/functional.py", line 32, in __call__
return self.__value__
AttributeError: 'ChannelPromise' object has no attribute '__value__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/amqp/transport.py", line 173, in _connect
host, port, family, socket.SOCK_STREAM, SOL_TCP)
File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -9] Address family for hostname not supported
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/kombu/utils/functional.py", line 325, in retry_over_time
return fun(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/kombu/connection.py", line 866, in _connection_factory
self._connection = self._establish_connection()
File "/usr/local/lib/python3.7/site-packages/kombu/connection.py", line 801, in _establish_connection
conn = self.transport.establish_connection()
File "/usr/local/lib/python3.7/site-packages/kombu/transport/pyamqp.py", line 128, in establish_connection
conn.connect()
File "/usr/local/lib/python3.7/site-packages/amqp/connection.py", line 323, in connect
self.transport.connect()
File "/usr/local/lib/python3.7/site-packages/amqp/transport.py", line 113, in connect
self._connect(self.host, self.port, self.connect_timeout)
File "/usr/local/lib/python3.7/site-packages/amqp/transport.py", line 184, in _connect
"failed to resolve broker hostname"))
File "/usr/local/lib/python3.7/site-packages/amqp/transport.py", line 197, in _connect
self.sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/celery/canvas.py", line 225, in apply_async
return _apply(args, kwargs, **options)
File "/usr/local/lib/python3.7/site-packages/celery/app/task.py", line 565, in apply_async
**options
File "/usr/local/lib/python3.7/site-packages/celery/app/base.py", line 749, in send_task
amqp.send_task_message(P, name, message, **options)
File "/usr/local/lib/python3.7/site-packages/celery/app/amqp.py", line 532, in send_task_message
**properties
File "/usr/local/lib/python3.7/site-packages/kombu/messaging.py", line 178, in publish
exchange_name, declare,
File "/usr/local/lib/python3.7/site-packages/kombu/connection.py", line 525, in _ensured
return fun(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/kombu/messaging.py", line 184, in _publish
channel = self.channel
File "/usr/local/lib/python3.7/site-packages/kombu/messaging.py", line 206, in _get_channel
channel = self._channel = channel()
File "/usr/local/lib/python3.7/site-packages/kombu/utils/functional.py", line 34, in __call__
value = self.__value__ = self.__contract__()
File "/usr/local/lib/python3.7/site-packages/kombu/messaging.py", line 221, in <lambda>
channel = ChannelPromise(lambda: connection.default_channel)
File "/usr/local/lib/python3.7/site-packages/kombu/connection.py", line 884, in default_channel
self._ensure_connection(**conn_opts)
File "/usr/local/lib/python3.7/site-packages/kombu/connection.py", line 439, in _ensure_connection
callback, timeout=timeout
File "/usr/local/lib/python3.7/site-packages/kombu/utils/functional.py", line 339, in retry_over_time
sleep(1.0)
</code></pre></div>
<p dir="auto">The broker connection string looks like this in the system:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="~$ env | grep BROKER
CELERY_BROKER=pyamqp://[email protected]//"><pre class="notranslate"><span class="pl-k">~</span>$ env <span class="pl-k">|</span> grep BROKER
CELERY_BROKER=pyamqp://[email protected]//</pre></div>
<p dir="auto">The broker connection string in python:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# python shell
from src.celery import app
app.pool.connection
>>> Connection: amqp://guest:**@localhost:5672//"><pre class="notranslate"><span class="pl-c"># python shell</span>
<span class="pl-k">from</span> <span class="pl-s1">src</span>.<span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-s1">app</span>
<span class="pl-s1">app</span>.<span class="pl-s1">pool</span>.<span class="pl-s1">connection</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-v">Connection</span>: <span class="pl-s1">amqp</span>:<span class="pl-c1">//</span><span class="pl-s1">guest</span>:<span class="pl-c1">**</span>@<span class="pl-s1">localhost</span>:<span class="pl-c1">5672</span><span class="pl-c1">//</span></pre></div>
<p dir="auto">Before you suggest that RabbitMQ is not running, or the connection string is bad; my celery worker (consumer) process is able to connect with the same connection string.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-------------- celery@f9ab48fc6b63 v5.0.5 (singularity)
--- ***** -----
-- ******* ---- Linux-4.15.0-20-generic-x86_64-with-debian-9.12 2021-03-05 07:56:29
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: celery_statst_api:0x7f15b6de0450
- ** ---------- .> transport: amqp://guest:**@my-rabbit:5672//
- ** ---------- .> results: postgresql://docker:**@pg_db:5432/
- *** --- * --- .> concurrency: 16 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[tasks]
. foo_task
. (long list of tasks)
[2021-03-05 07:56:30,564: INFO/MainProcess] Connected to amqp://guest:**@my-rabbit:5672//
[2021-03-05 07:56:30,581: INFO/MainProcess] mingle: searching for neighbors
[2021-03-05 07:56:31,622: INFO/MainProcess] mingle: all alone
[2021-03-05 07:56:31,647: INFO/MainProcess] celery@f9ab48fc6b63 ready."><pre class="notranslate"><code class="notranslate">-------------- celery@f9ab48fc6b63 v5.0.5 (singularity)
--- ***** -----
-- ******* ---- Linux-4.15.0-20-generic-x86_64-with-debian-9.12 2021-03-05 07:56:29
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: celery_statst_api:0x7f15b6de0450
- ** ---------- .> transport: amqp://guest:**@my-rabbit:5672//
- ** ---------- .> results: postgresql://docker:**@pg_db:5432/
- *** --- * --- .> concurrency: 16 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[tasks]
. foo_task
. (long list of tasks)
[2021-03-05 07:56:30,564: INFO/MainProcess] Connected to amqp://guest:**@my-rabbit:5672//
[2021-03-05 07:56:30,581: INFO/MainProcess] mingle: searching for neighbors
[2021-03-05 07:56:31,622: INFO/MainProcess] mingle: all alone
[2021-03-05 07:56:31,647: INFO/MainProcess] celery@f9ab48fc6b63 ready.
</code></pre></div>
<p dir="auto">This is how I connect app/producer to the broker.<br>
The file celeryconfig.py contains setup for broker url backend, concurrency, etc.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# celery_tasks.py
# imports...
app = Celery('celery_statst_api')
app.config_from_object(celeryconfig) # import config file
@app.task(name="foo")
def foo(first_arg: str) -> str:
print(f"thanks for {first_arg}")
return "OK"
"><pre class="notranslate"><span class="pl-c"># celery_tasks.py</span>
<span class="pl-c"># imports...</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">'celery_statst_api'</span>)
<span class="pl-s1">app</span>.<span class="pl-en">config_from_object</span>(<span class="pl-s1">celeryconfig</span>) <span class="pl-c"># import config file</span>
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">task</span>(<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"foo"</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">foo</span>(<span class="pl-s1">first_arg</span>: <span class="pl-s1">str</span>) <span class="pl-c1">-></span> <span class="pl-s1">str</span>:
<span class="pl-en">print</span>(<span class="pl-s">f"thanks for <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">first_arg</span><span class="pl-kos">}</span></span>"</span>)
<span class="pl-k">return</span> <span class="pl-s">"OK"</span></pre></div> | 0 |
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">this would expand upon _load_enums() in postgresql/base.py, so that any kind of custom type is recognized during reflection. We'd likely have to create some kind of "ad-hoc" type that is declared like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy.dialects.postgresql import TYPE
Column("mycolumn", TYPE("MY_CUSTOM_TYPE"))"><pre class="notranslate"><code class="notranslate">from sqlalchemy.dialects.postgresql import TYPE
Column("mycolumn", TYPE("MY_CUSTOM_TYPE"))
</code></pre></div> | <p dir="auto"><strong>Migrated issue, originally created by David Lord (<a href="https://github.com/davidism">@davidism</a>)</strong></p>
<p dir="auto">I have the following models:</p>
<ul dir="auto">
<li><code class="notranslate">Device</code></li>
<li><code class="notranslate">DeviceSource</code> has a foreign key and relationship to <code class="notranslate">Device</code></li>
<li><code class="notranslate">LDAPDeviceSource</code> is a joined-table inheritance of <code class="notranslate">DeviceSource</code></li>
</ul>
<p dir="auto">In order to make defining new <code class="notranslate">DeviceSource</code> subclasses easier, I created <code class="notranslate">DeviceSourceMixin</code>, which inherits from <code class="notranslate">DeviceSource</code> and provides declared attrs for <code class="notranslate">__tablename__</code> and the foreign primary <code class="notranslate">id</code>. <code class="notranslate">DeviceSourceMixin</code> is <code class="notranslate">__abstract__</code> so that it doesn't create a table of its own.</p>
<p dir="auto">The issue is that this intermediate <code class="notranslate">__abstract__</code> seems to break the declarative model. The foreign key and relationship in <code class="notranslate">DeviceSource</code> do not get inherited by <code class="notranslate">LDAPDeviceSource</code> when subclassing <code class="notranslate">DeviceSourceMixin</code>.</p>
<p dir="auto">This code demonstrates the issue:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sqlalchemy as sa
from sqlalchemy.ext.declarative import declared_attr, as_declarative
from sqlalchemy.orm import Session, relationship
engine = sa.create_engine('sqlite:///:memory:', echo=True)
session = Session(bind=engine)
@as_declarative(bind=engine)
class Base(object):
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()
id = sa.Column(sa.Integer, primary_key=True)
class Device(Base):
pass
class DeviceSource(Base):
type = sa.Column(sa.String, nullable=False)
device_id = sa.Column(sa.Integer, sa.ForeignKey(Device.id), nullable=False)
device = relationship(Device, backref='sources')
__mapper_args__ = {
'polymorphic_on': type
}
class DeviceSourceMixin(DeviceSource):
__abstract__ = True
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()
@declared_attr
def id(cls):
return sa.Column(sa.Integer, sa.ForeignKey(DeviceSource.id), primary_key=True)
class LDAPDeviceSource(DeviceSourceMixin):
name = sa.Column(sa.String, nullable=False)
__mapper_args__ = {
'polymorphic_identity': 'ldap'
}
Base.metadata.create_all()
d1 = Device()
s1 = LDAPDeviceSource(device=d1, name='s1')
session.add(s1)
session.commit()"><pre class="notranslate"><code class="notranslate">import sqlalchemy as sa
from sqlalchemy.ext.declarative import declared_attr, as_declarative
from sqlalchemy.orm import Session, relationship
engine = sa.create_engine('sqlite:///:memory:', echo=True)
session = Session(bind=engine)
@as_declarative(bind=engine)
class Base(object):
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()
id = sa.Column(sa.Integer, primary_key=True)
class Device(Base):
pass
class DeviceSource(Base):
type = sa.Column(sa.String, nullable=False)
device_id = sa.Column(sa.Integer, sa.ForeignKey(Device.id), nullable=False)
device = relationship(Device, backref='sources')
__mapper_args__ = {
'polymorphic_on': type
}
class DeviceSourceMixin(DeviceSource):
__abstract__ = True
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()
@declared_attr
def id(cls):
return sa.Column(sa.Integer, sa.ForeignKey(DeviceSource.id), primary_key=True)
class LDAPDeviceSource(DeviceSourceMixin):
name = sa.Column(sa.String, nullable=False)
__mapper_args__ = {
'polymorphic_identity': 'ldap'
}
Base.metadata.create_all()
d1 = Device()
s1 = LDAPDeviceSource(device=d1, name='s1')
session.add(s1)
session.commit()
</code></pre></div>
<p dir="auto">It produces the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "/home/david/Projects/cedar/example2.py", line 62, in <module>
s1 = LDAPDeviceSource(device=d1, name='s1')
File "<string>", line 4, in __init__
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/state.py", line 260, in _initialize_instance
return manager.original_init(*mixed[1:], **kwargs)
File "<string>", line 6, in __init__
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/ext/declarative/base.py", line 526, in _declarative_constructor
setattr(self, k, kwargs[k])
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 226, in __set__
instance_dict(instance), value, None)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 812, in set
value = self.fire_replace_event(state, dict_, value, old, initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 832, in fire_replace_event
state, value, previous, initiator or self._replace_token)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 1148, in emit_backref_from_scalar_set_event
passive=PASSIVE_NO_FETCH)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 980, in append
collection.append_with_event(value, initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/collections.py", line 653, in append_with_event
self._data()._sa_appender(item, _sa_initiator=initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/collections.py", line 1047, in append
item = __set(self, item, _sa_initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/collections.py", line 1019, in __set
item = executor.fire_append_event(item, _sa_initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/collections.py", line 716, in fire_append_event
item, initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 929, in fire_append_event
value = fn(state, value, initiator or self._append_token)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 1157, in emit_backref_from_collection_append_event
child_impl = child_state.manager[key].impl
KeyError: 'device'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "/home/david/Projects/cedar/example2.py", line 62, in <module>
s1 = LDAPDeviceSource(device=d1, name='s1')
File "<string>", line 4, in __init__
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/state.py", line 260, in _initialize_instance
return manager.original_init(*mixed[1:], **kwargs)
File "<string>", line 6, in __init__
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/ext/declarative/base.py", line 526, in _declarative_constructor
setattr(self, k, kwargs[k])
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 226, in __set__
instance_dict(instance), value, None)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 812, in set
value = self.fire_replace_event(state, dict_, value, old, initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 832, in fire_replace_event
state, value, previous, initiator or self._replace_token)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 1148, in emit_backref_from_scalar_set_event
passive=PASSIVE_NO_FETCH)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 980, in append
collection.append_with_event(value, initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/collections.py", line 653, in append_with_event
self._data()._sa_appender(item, _sa_initiator=initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/collections.py", line 1047, in append
item = __set(self, item, _sa_initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/collections.py", line 1019, in __set
item = executor.fire_append_event(item, _sa_initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/collections.py", line 716, in fire_append_event
item, initiator)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 929, in fire_append_event
value = fn(state, value, initiator or self._append_token)
File "/home/david/.virtualenvs/cedar/lib/python3.4/site-packages/sqlalchemy/orm/attributes.py", line 1157, in emit_backref_from_collection_append_event
child_impl = child_state.manager[key].impl
KeyError: 'device'
</code></pre></div> | 0 |
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/target-the-same-element-with-multiple-jquery-selectors#?solution=%0Afccss%0A%20%20%24%28document%29.ready%28function%28%29%20%7B%0A%20%20%20%20%0A%24%28%22button%22%29.addclass%28%22animated%22%29%3B%0A%24%28%22.btn%22%29.addclass%28%22shake%22%29%3B%0A%24%20%28%22%23target1%22%29.addclass%28%22animated%E2%80%9A%20shake%20btn-primary%22%29%3B%0A%20%20%7D%29%3B%0Afcces%0A%20%0A%0A%3C!--%20Only%20change%20code%20above%20this%20line.%20--%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Ch3%20class%3D%22text-primary%20text-center%22%3EjQuery%20Playground%3C%2Fh3%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23left-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22left-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target1%22%3E%23target1%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target2%22%3E%23target2%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target3%22%3E%23target3%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23right-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22right-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target4%22%3E%23target4%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target5%22%3E%23target5%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target6%22%3E%23target6%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A" rel="nofollow">Target the same element with multiple jQuery Selectors</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
<script>
$(document).ready(function() {
$("button").addclass("animated");
$(".btn").addclass("shake");
$ ("#target1").addclass("animated‚ shake btn-primary");
});
</script>
<!-- Only change code above this line. -->
<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">ready</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"button"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">addclass</span><span class="pl-kos">(</span><span class="pl-s">"animated"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">".btn"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">addclass</span><span class="pl-kos">(</span><span class="pl-s">"shake"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span> <span class="pl-kos">(</span><span class="pl-s">"#target1"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">addclass</span><span class="pl-kos">(</span><span class="pl-s">"animated‚ shake btn-primary"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-c"><!-- Only change code above this line. --></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">container-fluid</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h3</span> <span class="pl-c1">class</span>="<span class="pl-s">text-primary text-center</span>"<span class="pl-kos">></span>jQuery Playground<span class="pl-kos"></</span><span class="pl-ent">h3</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">row</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h4</span><span class="pl-kos">></span>#left-well<span class="pl-kos"></</span><span class="pl-ent">h4</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">left-well</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target1</span>"<span class="pl-kos">></span>#target1<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target2</span>"<span class="pl-kos">></span>#target2<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target3</span>"<span class="pl-kos">></span>#target3<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h4</span><span class="pl-kos">></span>#right-well<span class="pl-kos"></</span><span class="pl-ent">h4</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">right-well</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target4</span>"<span class="pl-kos">></span>#target4<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target5</span>"<span class="pl-kos">></span>#target5<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target6</span>"<span class="pl-kos">></span>#target6<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div> | <p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/target-the-same-element-with-multiple-jquery-selectors#?solution=%0Afccss%0A%20%20%24%28document%29.ready%28function%28%29%20%7B%0A%20%20%20%20%0A%20%20%20%24%28%22button%22%29%20.addclass%28%22animated%22%29%3B%0A%20%20%20%24%28%22.btn%22%29.addclass%28%22shake%22%29%3B%0A%20%20%20%20%0A%20%20%20%24%28%22%23target1%22%29.addclass%28%22animated%20shake%20btn-primery%22%29%20%3B%0A%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%0A%0A%20%20%7D%29%3B%0A%20%20%0Afcces%0A%0A%3C!--%20Only%20change%20code%20above%20this%20line.%20--%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Ch3%20class%3D%22text-primary%20text-center%22%3EjQuery%20Playground%3C%2Fh3%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23left-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22left-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target1%22%3E%23target1%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target2%22%3E%23target2%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target3%22%3E%23target3%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23right-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22right-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target4%22%3E%23target4%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target5%22%3E%23target5%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target6%22%3E%23target6%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A" rel="nofollow">Target the same element with multiple jQuery Selectors</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
<script>
$(document).ready(function() {
$("button") .addclass("animated");
$(".btn").addclass("shake");
$("#target1").addclass("animated shake btn-primery") ;
});
</script>
<!-- Only change code above this line. -->
<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">ready</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"button"</span><span class="pl-kos">)</span> <span class="pl-kos">.</span><span class="pl-en">addclass</span><span class="pl-kos">(</span><span class="pl-s">"animated"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">".btn"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">addclass</span><span class="pl-kos">(</span><span class="pl-s">"shake"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target1"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">addclass</span><span class="pl-kos">(</span><span class="pl-s">"animated shake btn-primery"</span><span class="pl-kos">)</span> <span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-c"><!-- Only change code above this line. --></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">container-fluid</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h3</span> <span class="pl-c1">class</span>="<span class="pl-s">text-primary text-center</span>"<span class="pl-kos">></span>jQuery Playground<span class="pl-kos"></</span><span class="pl-ent">h3</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">row</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h4</span><span class="pl-kos">></span>#left-well<span class="pl-kos"></</span><span class="pl-ent">h4</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">left-well</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target1</span>"<span class="pl-kos">></span>#target1<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target2</span>"<span class="pl-kos">></span>#target2<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target3</span>"<span class="pl-kos">></span>#target3<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h4</span><span class="pl-kos">></span>#right-well<span class="pl-kos"></</span><span class="pl-ent">h4</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">right-well</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target4</span>"<span class="pl-kos">></span>#target4<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target5</span>"<span class="pl-kos">></span>#target5<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target6</span>"<span class="pl-kos">></span>#target6<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div> | 1 |
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong><br>
v5.0.1</li>
<li><strong>Operating System:</strong><br>
Linux Mint 19.1, using the Cinnamon desktop environment</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">When creating a tray and setting a click event (but no context menu) it was expected that the event would trigger when clicking directly on the tray icon.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Instead the tray displays a context menu with a normal menu item that uses as label the tray tooltip (or the project name if no tooltip has been set). The click event is triggered when clicking on the menu item, not on the tray icon.<br>
Also since the tooltip is used to create a menu item, none appears when hovering the tray icon.</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">Here's the repo for my project : <a href="mailto:[email protected]">[email protected]</a>:chrisalexandrepena/googledrive_linux.git<br>
The index.js only creates a tray with click event that opens a window.<br>
All that is needed to run the code is:<br>
$ git clone <a href="mailto:[email protected]">[email protected]</a>:chrisalexandrepena/googledrive_linux.git<br>
$ npm install<br>
$ npm start</p> | <ul dir="auto">
<li>
<p dir="auto">Output of <code class="notranslate">node_modules/.bin/electron --version</code>: v3.0.2 and v4.0.0</p>
</li>
<li>
<p dir="auto">Operating System (Platform and Version): Linux bitang 4.15.0-36-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="16777688" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/39" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/39/hovercard" href="https://github.com/electron/electron/issues/39">#39</a>-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux</p>
</li>
<li>
<p dir="auto">Output of <code class="notranslate">node_modules/.bin/electron --version</code> on last known working Electron version (if applicable): v2</p>
</li>
</ul>
<p dir="auto"><strong>Expected Behavior</strong></p>
<p dir="auto">I used the toggle show/hide of the window on the tray click and in v2 it was working.</p>
<p dir="auto"><strong>Actual behavior</strong></p>
<p dir="auto">When I click now on the tray, it opens the context menu - which was working on right click only.</p>
<p dir="auto"><strong>To Reproduce</strong></p>
<p dir="auto">If you provide a URL, please list the commands required to clone/setup/run your repo e.g.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ git clone https://github.com/patrikx3/onenote
$ npm install
$ ./bin/p3x-onenote.js"><pre class="notranslate">$ git clone https://github.com/patrikx3/onenote
$ npm install
$ ./bin/p3x-onenote.js</pre></div>
<p dir="auto"><strong>Screenshots</strong><br>
not applicable</p>
<p dir="auto"><strong>Additional Information</strong><br>
i suppose it is informative.</p> | 1 |
<p dir="auto">I know that the new IO is being worked on, but I could see this being a sneaky thing that gets lost.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(io)]
use std::io::Write;
fn main() {
write!(&mut std::io::stdout(), "Hello world").unwrap();
}"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>io<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">use</span> std<span class="pl-kos">::</span>io<span class="pl-kos">::</span><span class="pl-v">Write</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">write</span><span class="pl-en">!</span><span class="pl-kos">(</span>&<span class="pl-k">mut</span> std::io::stdout<span class="pl-kos">(</span><span class="pl-kos">)</span>, <span class="pl-s">"Hello world"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">unwrap</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">This code prints nothing. If we use <code class="notranslate">stderr</code> instead, there is output.</p>
<p dir="auto"><code class="notranslate">rustc 1.0.0-nightly (270a677d4 2015-03-07) (built 2015-03-07)</code></p> | <p dir="auto">The <a href="https://github.com/rust-lang/rust/pull/19654" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/19654/hovercard">final step</a> of runtime removal changes the threading/process model so that the process shuts down when the main thread exits. But several shared resources, like the helper thread for timeouts, are shut down when the main thread exits (but before the process ends), and they are not prepared to be used after shut down, but other threads may try to access them during the shutdown sequence of the main thread.</p>
<p dir="auto">As an interim solution, the <code class="notranslate">at_exit</code> cleanup routine is simply skipped.</p>
<p dir="auto">Ultimately, these resources should be made to safely handle asynchronous shutdown, usually by panicking if called from a detached thread when the main thread is ending.</p> | 1 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.0.0"><pre class="notranslate"><code class="notranslate">ansible 2.1.0.0
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults]
hostfile = hosts
roles_path = ./roles:./external_roles
transport = ssh
hash_behaviour = merge
retry_files_enabled = False
[ssh_connection]
ssh_args = -o ForwardAgent=yes
scp_if_ssh = True
control_path = ~/.ssh/mux-%%r@%%h:%%p"><pre class="notranslate"><code class="notranslate">[defaults]
hostfile = hosts
roles_path = ./roles:./external_roles
transport = ssh
hash_behaviour = merge
retry_files_enabled = False
[ssh_connection]
ssh_args = -o ForwardAgent=yes
scp_if_ssh = True
control_path = ~/.ssh/mux-%%r@%%h:%%p
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CentOS Linux release 7.2.1511"><pre class="notranslate"><code class="notranslate">CentOS Linux release 7.2.1511
</code></pre></div>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">While running long provisioning playbooks on localhost (<code class="notranslate">-c local</code>, not tested on remote) with this version of ansible it hangs forever in different places (usually hags on <code class="notranslate">stat</code>, <code class="notranslate">template</code> <code class="notranslate">file link|absent</code> modules, although there are also other modules).</p>
<p dir="auto">when looking into that machine I got strange errors:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ABRT has detected 2 problem(s). For more info run: abrt-cli list --since 1469104014`
# abrt-cli list
id e89d19d057aae4b747282a38f0dcfa4cecbf0ccf
reason: systemd-logind killed by SIGABRT
time: Thu Jul 21 12:30:05 2016
cmdline: /usr/lib/systemd/systemd-logind
package: systemd-208-11.el7_0.6
uid: 0 (root)
count: 1
Directory: /var/spool/abrt/ccpp-2016-07-21-12:30:05-608
id 6c1edc19fab7dec6dc2a3873dcba243dc6d4be12
reason: systemd-journald killed by SIGABRT
time: Thu Jul 21 12:30:05 2016
cmdline: /usr/lib/systemd/systemd-journald
package: systemd-208-11.el7_0.6
uid: 0 (root)
count: 1
Directory: /var/spool/abrt/ccpp-2016-07-21-12:30:05-355"><pre class="notranslate"><code class="notranslate">ABRT has detected 2 problem(s). For more info run: abrt-cli list --since 1469104014`
# abrt-cli list
id e89d19d057aae4b747282a38f0dcfa4cecbf0ccf
reason: systemd-logind killed by SIGABRT
time: Thu Jul 21 12:30:05 2016
cmdline: /usr/lib/systemd/systemd-logind
package: systemd-208-11.el7_0.6
uid: 0 (root)
count: 1
Directory: /var/spool/abrt/ccpp-2016-07-21-12:30:05-608
id 6c1edc19fab7dec6dc2a3873dcba243dc6d4be12
reason: systemd-journald killed by SIGABRT
time: Thu Jul 21 12:30:05 2016
cmdline: /usr/lib/systemd/systemd-journald
package: systemd-208-11.el7_0.6
uid: 0 (root)
count: 1
Directory: /var/spool/abrt/ccpp-2016-07-21-12:30:05-355
</code></pre></div>
<p dir="auto">thsese are in <code class="notranslate">systemctl</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<E2><97><8F> kdump.service loaded failed failed Crash recovery kernel arming
<E2><97><8F> rightimage.service loaded failed failed LSB: RightLink agent updater
<E2><97><8F> rightlink.service loaded failed failed LSB: RightLink agent
<E2><97><8F> rightscale.service loaded failed failed LSB: RightScale startup"><pre class="notranslate"><code class="notranslate"><E2><97><8F> kdump.service loaded failed failed Crash recovery kernel arming
<E2><97><8F> rightimage.service loaded failed failed LSB: RightLink agent updater
<E2><97><8F> rightlink.service loaded failed failed LSB: RightLink agent
<E2><97><8F> rightscale.service loaded failed failed LSB: RightScale startup
</code></pre></div>
<p dir="auto">a part of <code class="notranslate">dmesg</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ 893.387473] ansible-playboo[5172]: segfault at 4e40bc000095 ip 00007f7ec189c258 sp 00007f7eb705c990 error 4 in libpython2.7.so.1.0[7f7ec178d000+178000]
[ 893.408028] abrt-hook-ccpp[5173]: segfault at 0 ip 00007f39920e753b sp 00007fffb1f06b30 error 4 in libreport.so.0.0.1[7f39920d9000+25000]
[ 893.414979] Process 5173(abrt-hook-ccpp) has RLIMIT_CORE set to 1
[ 893.418125] Aborting core"><pre class="notranslate"><code class="notranslate">[ 893.387473] ansible-playboo[5172]: segfault at 4e40bc000095 ip 00007f7ec189c258 sp 00007f7eb705c990 error 4 in libpython2.7.so.1.0[7f7ec178d000+178000]
[ 893.408028] abrt-hook-ccpp[5173]: segfault at 0 ip 00007f39920e753b sp 00007fffb1f06b30 error 4 in libreport.so.0.0.1[7f39920d9000+25000]
[ 893.414979] Process 5173(abrt-hook-ccpp) has RLIMIT_CORE set to 1
[ 893.418125] Aborting core
</code></pre></div> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">Default Variable management</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.4.0 (fix-aos-login-port 395d4d4c5b) last updated 2017/05/09 08:59:20 (GMT -700)
config file = /Users/damien/projects/cloudlabs-topologies/two-tier-arista-l3/ansible.cfg
configured module search path = [u'/Users/damien/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Users/damien/projects/ansible/lib/ansible
executable location = /Users/damien/projects/ansible/bin/ansible
python version = 2.7.10 (default, Feb 6 2017, 23:53:20) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]"><pre class="notranslate"><code class="notranslate">ansible 2.4.0 (fix-aos-login-port 395d4d4c5b) last updated 2017/05/09 08:59:20 (GMT -700)
config file = /Users/damien/projects/cloudlabs-topologies/two-tier-arista-l3/ansible.cfg
configured module search path = [u'/Users/damien/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Users/damien/projects/ansible/lib/ansible
executable location = /Users/damien/projects/ansible/bin/ansible
python version = 2.7.10 (default, Feb 6 2017, 23:53:20) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate">
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Mac OS 10.12.4</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When using multiple inventory files, saved in the directory <code class="notranslate">inventory/</code>, variables stored in <code class="notranslate">host_vars/<inventory_hostname>/xxx.yaml</code> are not loaded.</p>
<p dir="auto">Assuming we have 4 devices, defined in 2 inventories files:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="project/
inventory/
inv1
host_ccc id=11
host_ddd id=12
inv2
host_aaa id=1
host_bbb id=2
host_vars/
host_aaa/
fqdn.yaml `myvar: this is my var`
host_bbb.yaml `myvar: this is my var` "><pre class="notranslate"><code class="notranslate">project/
inventory/
inv1
host_ccc id=11
host_ddd id=12
inv2
host_aaa id=1
host_bbb id=2
host_vars/
host_aaa/
fqdn.yaml `myvar: this is my var`
host_bbb.yaml `myvar: this is my var`
</code></pre></div>
<p dir="auto">When I'm running a playbook just on 1 device <code class="notranslate">host_ccc</code> (using limit) the variable from <code class="notranslate">host_aaa</code> > hostvars['host_aaa'].myvar` is undefined</p>
<p dir="auto">if I merge my inventories files (inv1 and inv2) into a single file, the same variable <code class="notranslate">hostvars['host_aaa'].myvar</code> exist for host_ccc</p>
<p dir="auto">I clearly have a different behavior with 1 or 2 inventory files</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<ul dir="auto">
<li>Create a <code class="notranslate">host_vars</code> directory and create some variable file for 3 hosts</li>
<li>Create a inventory directory and create 2 inventories files, with 2 hosts each</li>
<li>Create another inventory with the same content as both previous inventory files combined</li>
<li>Create a playbook to show variables defined inside host_vars for each host</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="├── host_vars
│ ├── host_aaa
│ │ └── var.yaml
│ ├── host_bbb.yaml
│ └── host_ccc.yaml
├── inventory
│ ├── inv1
│ └── inv2
├── inventory.ini
└── pb.show_var.yaml"><pre class="notranslate"><code class="notranslate">├── host_vars
│ ├── host_aaa
│ │ └── var.yaml
│ ├── host_bbb.yaml
│ └── host_ccc.yaml
├── inventory
│ ├── inv1
│ └── inv2
├── inventory.ini
└── pb.show_var.yaml
</code></pre></div>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# pb.show_var.yaml
- name: Print Variables
hosts: all
gather_facts: no
connection: local
tasks:
- name: Variables for dev_aaa
debug: var=hostvars['host_aaa'].myvar
- name: Variables for dev_bbb
debug: var=hostvars['host_bbb'].myvar
- name: Variables for dev_ccc (self)
debug: var=myvar"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> pb.show_var.yaml</span>
- <span class="pl-ent">name</span>: <span class="pl-s">Print Variables</span>
<span class="pl-ent">hosts</span>: <span class="pl-s">all</span>
<span class="pl-ent">gather_facts</span>: <span class="pl-s">no</span>
<span class="pl-ent">connection</span>: <span class="pl-s">local</span>
<span class="pl-ent">tasks</span>:
- <span class="pl-ent">name</span>: <span class="pl-s">Variables for dev_aaa</span>
<span class="pl-ent">debug</span>: <span class="pl-s">var=hostvars['host_aaa'].myvar</span>
- <span class="pl-ent">name</span>: <span class="pl-s">Variables for dev_bbb</span>
<span class="pl-ent">debug</span>: <span class="pl-s">var=hostvars['host_bbb'].myvar</span>
- <span class="pl-ent">name</span>: <span class="pl-s">Variables for dev_ccc (self)</span>
<span class="pl-ent">debug</span>: <span class="pl-s">var=myvar</span></pre></div>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Inventory
host_aaa id=1
host_bbb id=2
host_ccc id=11
host_ddd id=12"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> Inventory</span>
host_aaa <span class="pl-k">id</span>=1
host_bbb <span class="pl-k">id</span>=2
host_ccc <span class="pl-k">id</span>=11
host_ddd <span class="pl-k">id</span>=12</pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Variables from <code class="notranslate">host_aaa</code> and <code class="notranslate">host_bbb</code> should be defined <code class="notranslate">host_ccc</code> when using multiple inventory files</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(ansible-dev) ➜ ansible-bug-inventory-01 git:(master) ansible-playbook -i inventory pb.show_var.yaml --limit=host_ccc
PLAY [Print Variables] **********************************************************************************************
TASK [Variables for dev_aaa] **********************************************************************************************
ok: [host_ccc] => {
"hostvars['host_aaa'].myvar": "VARIABLE IS NOT DEFINED!" <<<<<
}
TASK [Variables for dev_bbb] **********************************************************************************************
ok: [host_ccc] => {
"hostvars['host_bbb'].myvar": "VARIABLE IS NOT DEFINED!" <<<<<<
}
TASK [Variables for dev_ccc (self)] **********************************************************************************************
ok: [host_ccc] => {
"myvar": "this is my var"
}
PLAY RECAP **********************************************************************************************
host_ccc : ok=3 changed=0 unreachable=0 failed=0
(ansible-dev) ➜ ansible-bug-inventory-01 ansible-playbook -i inventory.ini pb.show_var.yaml --limit=host_ccc
PLAY [Print Variables] *********************************************************************************************
TASK [Variables for dev_aaa] **********************************************************************************************
ok: [host_ccc] => {
"hostvars['host_aaa'].myvar": "this is my var"
}
TASK [Variables for dev_bbb] **********************************************************************************************
ok: [host_ccc] => {
"hostvars['host_bbb'].myvar": "this is my var"
}
TASK [Variables for dev_ccc (self)] **********************************************************************************************
ok: [host_ccc] => {
"myvar": "this is my var"
}
PLAY RECAP **********************************************************************************************
host_ccc : ok=3 changed=0 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">(ansible-dev) ➜ ansible-bug-inventory-01 git:(master) ansible-playbook -i inventory pb.show_var.yaml --limit=host_ccc
PLAY [Print Variables] **********************************************************************************************
TASK [Variables for dev_aaa] **********************************************************************************************
ok: [host_ccc] => {
"hostvars['host_aaa'].myvar": "VARIABLE IS NOT DEFINED!" <<<<<
}
TASK [Variables for dev_bbb] **********************************************************************************************
ok: [host_ccc] => {
"hostvars['host_bbb'].myvar": "VARIABLE IS NOT DEFINED!" <<<<<<
}
TASK [Variables for dev_ccc (self)] **********************************************************************************************
ok: [host_ccc] => {
"myvar": "this is my var"
}
PLAY RECAP **********************************************************************************************
host_ccc : ok=3 changed=0 unreachable=0 failed=0
(ansible-dev) ➜ ansible-bug-inventory-01 ansible-playbook -i inventory.ini pb.show_var.yaml --limit=host_ccc
PLAY [Print Variables] *********************************************************************************************
TASK [Variables for dev_aaa] **********************************************************************************************
ok: [host_ccc] => {
"hostvars['host_aaa'].myvar": "this is my var"
}
TASK [Variables for dev_bbb] **********************************************************************************************
ok: [host_ccc] => {
"hostvars['host_bbb'].myvar": "this is my var"
}
TASK [Variables for dev_ccc (self)] **********************************************************************************************
ok: [host_ccc] => {
"myvar": "this is my var"
}
PLAY RECAP **********************************************************************************************
host_ccc : ok=3 changed=0 unreachable=0 failed=0
</code></pre></div> | 0 |
<p dir="auto">Feature request of LSP: features like "source.addMissingImports", "source.organizeImports"</p> | <p dir="auto">It seems that there is no refactoring available when using this extension?</p>
<p dir="auto">With extension off:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12832280/120679459-1a91d900-c491-11eb-9cbd-7b03513dd975.png"><img src="https://user-images.githubusercontent.com/12832280/120679459-1a91d900-c491-11eb-9cbd-7b03513dd975.png" alt="Screenshot from 2021-06-03 17-26-02" style="max-width: 100%;"></a></p>
<p dir="auto">With it on:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12832280/120679529-2da4a900-c491-11eb-8652-0586db8b3d9f.png"><img src="https://user-images.githubusercontent.com/12832280/120679529-2da4a900-c491-11eb-8652-0586db8b3d9f.png" alt="Screenshot from 2021-06-03 17-25-41" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="52964375" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/4014" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/4014/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/4014">scikit-learn/scikit-learn#4014</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a = np.array(['eggs', 'spam', 'spam', 'eggs', 'spam', 'spam', 'spam', 'spam',
'spam', 'spam', 'spam', 'eggs', 'eggs', 'spam', 'eggs', 'eggs',
'eggs', 'eggs', 'eggs', 'spam'],
dtype='|S4')
b = np.array(['eggs', 'spam', 'spam', 'eggs', 'eggs', 'spam', 'spam', 'spam',
'spam', 'eggs', 'spam', 'eggs', 'spam', 'eggs', 'spam', 'spam',
'eggs', 'spam', 'spam', 'eggs'],
dtype='|S4')
print(a == b)
print(np.equal(a, b))"><pre class="notranslate"><code class="notranslate">a = np.array(['eggs', 'spam', 'spam', 'eggs', 'spam', 'spam', 'spam', 'spam',
'spam', 'spam', 'spam', 'eggs', 'eggs', 'spam', 'eggs', 'eggs',
'eggs', 'eggs', 'eggs', 'spam'],
dtype='|S4')
b = np.array(['eggs', 'spam', 'spam', 'eggs', 'eggs', 'spam', 'spam', 'spam',
'spam', 'eggs', 'spam', 'eggs', 'spam', 'eggs', 'spam', 'spam',
'eggs', 'spam', 'spam', 'eggs'],
dtype='|S4')
print(a == b)
print(np.equal(a, b))
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ True True True True False True True True True False True True
False False False False True False False False]
NotImplemented"><pre class="notranslate"><code class="notranslate">[ True True True True False True True True True False True True
False False False False True False False False]
NotImplemented
</code></pre></div> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> import numpy as np
>>> x = np.array('abc', 'c')
>>> x == x
array([ True, True, True], dtype=bool)
>>> np.equal(x, x)
NotImplemented"><pre class="notranslate"><code class="notranslate">>>> import numpy as np
>>> x = np.array('abc', 'c')
>>> x == x
array([ True, True, True], dtype=bool)
>>> np.equal(x, x)
NotImplemented
</code></pre></div> | 1 |
<h2 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> Feature</h2>
<p dir="auto">label smoothing addition to standard cross entropy?</p>
<h2 dir="auto">Motivation</h2>
<h2 dir="auto">Pitch</h2>
<h2 dir="auto">Alternatives</h2>
<h2 dir="auto">Additional context</h2> | <p dir="auto">Currently our cross entropy loss (i.e., <a href="https://pytorch.org/docs/stable/nn.html#crossentropyloss" rel="nofollow">nn.CrossEntropyLoss</a>) only supports a hard target class, i.e., wanting to maximize the output (log) probability of a particular class. But in many times training w.r.t. a soft target distribution (i.e., wanting the output to match a particular distribution) is quite useful too, e.g., preventing overfitting.</p>
<h2 dir="auto">Math</h2>
<p dir="auto">Cross entropy loss operates on logits after softmax.</p>
<p dir="auto">Denote the input vector as <code class="notranslate">x</code>. Log softmax computes a vector <code class="notranslate">y</code> of same length as <code class="notranslate">x</code>, where <code class="notranslate">y_i = x_i - log( \sum_j exp(x_j) )</code>, representing the log likelihood of each class.</p>
<ul dir="auto">
<li>
<p dir="auto">In the hard target case, if the target clss is <code class="notranslate">c</code>, the loss is simply negative log likelihood loss <code class="notranslate">-y_c</code>.</p>
</li>
<li>
<p dir="auto">In the soft target case, let the target distribution vector be <code class="notranslate">p</code> (i.e., <code class="notranslate">p_i</code> is the target probability for predicting class <code class="notranslate">i</code>). The loss is the KL divergence</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="D( softmax(x) || p) = \sum_i p_i (log p_i / softmax(x)_i) = -\sum_i p_i y_i + constant"><pre class="notranslate"><code class="notranslate">D( softmax(x) || p) = \sum_i p_i (log p_i / softmax(x)_i) = -\sum_i p_i y_i + constant
</code></pre></div>
<p dir="auto">The constant is independent of <code class="notranslate">x</code> and thus discarded. Our loss formula is just <code class="notranslate">-\sum_i p_i y_i</code>.</p>
<p dir="auto">When <code class="notranslate">p_c = 1</code> for some class <code class="notranslate">c</code>, this simplifies to the hard target class.</p>
<p dir="auto">The formula for gradient computation can be easily derived from this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
d l / d y_i = -p_i
d y_i / d x_i = 1 - exp(x_i) / \sum_j exp(x_j) = 1 - exp(y_i)
# suppose k != i
d y_k / d_x_i = -exp(x_i) / \sum_j exp(x_j) = - exp(y_i)
# so
d l / d x_i = exp(y_i) (\sum p) - p_i = exp (y_i) - p_i (= softmax(x) - p_i).
"><pre class="notranslate"><code class="notranslate">
d l / d y_i = -p_i
d y_i / d x_i = 1 - exp(x_i) / \sum_j exp(x_j) = 1 - exp(y_i)
# suppose k != i
d y_k / d_x_i = -exp(x_i) / \sum_j exp(x_j) = - exp(y_i)
# so
d l / d x_i = exp(y_i) (\sum p) - p_i = exp (y_i) - p_i (= softmax(x) - p_i).
</code></pre></div>
</li>
</ul>
<h2 dir="auto">Possible Implementation</h2>
<p dir="auto">Currently our cross entropy loss implementation takes in batched <code class="notranslate">x</code> of shape <code class="notranslate">(N, C)</code> and floating point dtype (<code class="notranslate">N</code> is the batch size and <code class="notranslate">C</code> is the number of classes), and a batched target class indices vector <code class="notranslate">target</code> of shape <code class="notranslate">(N)</code>, where <code class="notranslate">target[i]</code> is the index of the desired output class, and dtype <code class="notranslate">long</code> (an integral type).</p>
<p dir="auto">Since we want it to also take in soft target distribution as target, we can allow it to also take in <code class="notranslate">target</code> as a target batched distribution of shape <code class="notranslate">(N, C)</code>, and detect whether we want soft target or hard target basing on shape and dtype.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gchanan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gchanan">@gchanan</a></p> | 1 |
<h1 dir="auto">Description of the new feature/enhancement</h1>
<p dir="auto">It would be good to show a shortcut tooltip (<code class="notranslate">alt+1</code>, etc) when hovering on an unselected tab.</p>
<p dir="auto">Users might know the shortcut only if they read Settings.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">N/A</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18362.0
"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Set-PSReadLineOption -Colors @{
"Command" = [ConsoleColor]::Yellow
}"><pre class="notranslate"><code class="notranslate">Set-PSReadLineOption -Colors @{
"Command" = [ConsoleColor]::Yellow
}
</code></pre></div>
<p dir="auto">in scheme change color for powershell / pwsh .exe</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" "brightYellow": "#F9F1A5","><pre class="notranslate"><code class="notranslate"> "brightYellow": "#F9F1A5",
</code></pre></div>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">yellow should change the [ConsoleColor]::Yellow color but does not</p> | 0 |
<p dir="auto">There was a bug introduced in the <code class="notranslate">walk</code> module ~1hr ago. The issue is in version <code class="notranslate">[email protected]</code>. For some reason, <code class="notranslate">npm install</code> is resolving the <code class="notranslate">2.3.11</code> version, even though the latest <code class="notranslate">next.js</code> <code class="notranslate">package.json</code> pins the walk module to <code class="notranslate">2.3.9</code>.</p>
<p dir="auto">Either way, a bad publish in the <code class="notranslate">walk</code> module has occurred and will likely break builds if that version is resolved.</p>
<p dir="auto">For reference:<br>
2.3.10: <a href="https://unpkg.com/[email protected]/lib/node-type-emitter.js" rel="nofollow">https://unpkg.com/[email protected]/lib/node-type-emitter.js</a> (no flagSet var)<br>
2.3.11: <a href="https://unpkg.com/[email protected]/lib/node-type-emitter.js" rel="nofollow">https://unpkg.com/[email protected]/lib/node-type-emitter.js</a> (undefined flagSet var)</p>
<p dir="auto">This is from my <code class="notranslate">package.lock.json</code> after running <code class="notranslate">npm install</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""next": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/next/-/next-3.2.3.tgz",
"integrity": "sha512-oJ8qi+t+rsEY3vll7jc5zDEoRyUzGsKoSi1Tx7vYYHYIjdmcG3fgjLBuHp5YkP6nzhldzs+tJhK36fJzM1Uh6w==",
"requires": {
"ansi-html": "0.0.7",
"babel-core": "6.25.0",
"babel-generator": "6.25.0",
"babel-loader": "7.1.1",
"babel-plugin-module-resolver": "2.6.2",
"babel-plugin-react-require": "3.0.0",
"babel-plugin-syntax-dynamic-import": "6.18.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-es2015-modules-commonjs": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.22.0",
"babel-plugin-transform-react-jsx-source": "6.22.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.5",
"babel-plugin-transform-runtime": "6.22.0",
"babel-preset-env": "1.6.0",
"babel-preset-react": "6.24.1",
"babel-runtime": "6.23.0",
"babel-template": "6.25.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"cross-spawn": "5.1.0",
"del": "3.0.0",
"etag": "1.8.0",
"fresh": "0.5.0",
"friendly-errors-webpack-plugin": "1.5.0",
"glob": "7.1.1",
"glob-promise": "3.1.0",
"hoist-non-react-statics": "2.5.0",
"htmlescape": "1.1.1",
"http-status": "1.0.1",
"json-loader": "0.5.4",
"loader-utils": "1.1.0",
"md5-file": "3.1.1",
"minimist": "1.2.0",
"mkdirp-then": "1.2.0",
"mv": "2.1.1",
"mz": "2.6.0",
"path-match": "1.2.4",
"pkg-up": "2.0.0",
"prop-types": "15.5.10",
"prop-types-exact": "1.1.2",
"react-hot-loader": "3.0.0-beta.7",
"recursive-copy": "2.0.9",
"send": "0.15.6",
"source-map-support": "0.4.15",
"strip-ansi": "3.0.1",
"styled-jsx": "1.0.11",
"touch": "3.1.0",
"unfetch": "3.0.0",
"url": "0.11.0",
"uuid": "3.1.0",
"walk": "2.3.11",
"webpack": "3.3.0",
"webpack-dev-middleware": "1.11.0",
"webpack-hot-middleware": "2.18.2",
"write-file-webpack-plugin": "4.1.0",
"xss-filters": "1.2.7"
}"><pre class="notranslate"><code class="notranslate">"next": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/next/-/next-3.2.3.tgz",
"integrity": "sha512-oJ8qi+t+rsEY3vll7jc5zDEoRyUzGsKoSi1Tx7vYYHYIjdmcG3fgjLBuHp5YkP6nzhldzs+tJhK36fJzM1Uh6w==",
"requires": {
"ansi-html": "0.0.7",
"babel-core": "6.25.0",
"babel-generator": "6.25.0",
"babel-loader": "7.1.1",
"babel-plugin-module-resolver": "2.6.2",
"babel-plugin-react-require": "3.0.0",
"babel-plugin-syntax-dynamic-import": "6.18.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-es2015-modules-commonjs": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.22.0",
"babel-plugin-transform-react-jsx-source": "6.22.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.5",
"babel-plugin-transform-runtime": "6.22.0",
"babel-preset-env": "1.6.0",
"babel-preset-react": "6.24.1",
"babel-runtime": "6.23.0",
"babel-template": "6.25.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"cross-spawn": "5.1.0",
"del": "3.0.0",
"etag": "1.8.0",
"fresh": "0.5.0",
"friendly-errors-webpack-plugin": "1.5.0",
"glob": "7.1.1",
"glob-promise": "3.1.0",
"hoist-non-react-statics": "2.5.0",
"htmlescape": "1.1.1",
"http-status": "1.0.1",
"json-loader": "0.5.4",
"loader-utils": "1.1.0",
"md5-file": "3.1.1",
"minimist": "1.2.0",
"mkdirp-then": "1.2.0",
"mv": "2.1.1",
"mz": "2.6.0",
"path-match": "1.2.4",
"pkg-up": "2.0.0",
"prop-types": "15.5.10",
"prop-types-exact": "1.1.2",
"react-hot-loader": "3.0.0-beta.7",
"recursive-copy": "2.0.9",
"send": "0.15.6",
"source-map-support": "0.4.15",
"strip-ansi": "3.0.1",
"styled-jsx": "1.0.11",
"touch": "3.1.0",
"unfetch": "3.0.0",
"url": "0.11.0",
"uuid": "3.1.0",
"walk": "2.3.11",
"webpack": "3.3.0",
"webpack-dev-middleware": "1.11.0",
"webpack-hot-middleware": "2.18.2",
"write-file-webpack-plugin": "4.1.0",
"xss-filters": "1.2.7"
}
</code></pre></div>
<p dir="auto">Also, this package does not have a github repository so I cannot file it there, but this is the source code in question - <a href="https://git.coolaj86.com/coolaj86/fs-walk.js/src/branch/master/lib/node-type-emitter.js#L53" rel="nofollow">https://git.coolaj86.com/coolaj86/fs-walk.js/src/branch/master/lib/node-type-emitter.js#L53</a></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto"><code class="notranslate">next export</code> should execute successfully</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Running <code class="notranslate">npm install</code>, then <code class="notranslate">next build</code>, then <code class="notranslate">next export</code> will throw this error.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>3.2.3</td>
</tr>
<tr>
<td>node</td>
<td>8.9.x</td>
</tr>
<tr>
<td>OS</td>
<td>osx @ latest</td>
</tr>
<tr>
<td>browser</td>
<td></td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | <h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">When using next.js with a custom-server, <code class="notranslate">publicRuntimeConfig</code> is undefined in the client.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Check the logs on these Codesandboxes:<br>
Working without a server: <a href="https://codesandbox.io/s/zxn9k1l483" rel="nofollow">hello-world</a><br>
Not working with a custom server: <a href="https://codesandbox.io/s/rr1v861l2p" rel="nofollow">custom-server-express</a></p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto"><code class="notranslate">publicRuntimeConfig</code> to be as set in <code class="notranslate">next.config.js</code>.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>Version of Next.js: 7.0.2</li>
</ul>
<p dir="auto">What am I missing here? Is <code class="notranslate">getConfig</code> not supposed to work with a custom server? What would be the alternative?</p> | 0 |
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">df = pd.DataFrame({"a" : [0,1,2], "b" : [1,2,3]})<br>
df[["a", "a"]].apply(lambda x: x[0] + x[1], axis = 1)</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">0 0<br>
1 2<br>
2 4<br>
dtype: int64</p>
<h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4>
<p dir="auto">Traceback (most recent call last):<br>
File "C:\Users\Alexander\Anaconda3\lib\site-packages\pandas\indexes\base.py", line 1980, in get_value<br>
tz=getattr(series.dtype, 'tz', None))<br>
File "pandas\index.pyx", line 103, in pandas.index.IndexEngine.get_value (pandas\index.c:3332)<br>
File "pandas\index.pyx", line 111, in pandas.index.IndexEngine.get_value (pandas\index.c:3035)<br>
File "pandas\index.pyx", line 154, in pandas.index.IndexEngine.get_loc (pandas\index.c:3955)<br>
File "pandas\index.pyx", line 169, in pandas.index.IndexEngine._get_loc_duplicates (pandas\index.c:4236)<br>
TypeError: unorderable types: str() > int()</p>
</blockquote>
</blockquote>
</blockquote>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "", line 1, in <br>
File "C:\Users\Alexander\Anaconda3\lib\site-packages\pandas\core\frame.py", line 4061, in apply<br>
return self._apply_standard(f, axis, reduce=reduce)<br>
File "C:\Users\Alexander\Anaconda3\lib\site-packages\pandas\core\frame.py", line 4157, in _apply_standard<br>
results[i] = func(v)<br>
File "", line 1, in <br>
File "C:\Users\Alexander\Anaconda3\lib\site-packages\pandas\core\series.py", line 583, in <strong>getitem</strong><br>
result = self.index.get_value(self, key)<br>
File "C:\Users\Alexander\Anaconda3\lib\site-packages\pandas\indexes\base.py", line 2000, in get_value<br>
raise IndexError(key)<br>
IndexError: (0, 'occurred at index 0')</p>
<p dir="auto">This is the error I get when running on Python 3.5.1/Pandas 0.18.1 on Windows. I get the expected output on Linux running Python 2.7.11/Pandas 0.18.1.</p> | <p dir="auto">The last line of the following code snippet does not work, while it seems it should. Am I overlooking something?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="df = pd.DataFrame(np.random.randn(9,2), index=[1,1,1,2,2,2,3,3,3], columns=['a', 'b'])
df
df.loc[[1, 2]] # works
df.loc[:,['a', 'b']] # works
df.loc[[1, 2], ['a', 'b']] # does not work"><pre class="notranslate"><code class="notranslate">df = pd.DataFrame(np.random.randn(9,2), index=[1,1,1,2,2,2,3,3,3], columns=['a', 'b'])
df
df.loc[[1, 2]] # works
df.loc[:,['a', 'b']] # works
df.loc[[1, 2], ['a', 'b']] # does not work
</code></pre></div>
<p dir="auto">You don't have this with an index without duplicates.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [1]: df = pd.DataFrame(np.random.randn(9,2), index=[1,1,1,2,2,2,3,3,3], colum
ns=['a', 'b'])
In [2]: df
Out[2]:
a b
1 0.714735 -1.125141
1 0.061066 -0.737312
1 0.269988 1.434862
2 0.336829 1.040681
2 0.929521 -1.142978
2 0.272813 -0.370184
3 -0.520348 1.126233
3 0.232261 -0.075287
3 -0.314570 -2.635400
[9 rows x 2 columns]
In [3]: df.loc[[1, 2]]
Out[3]:
a b
1 0.714735 -1.125141
1 0.061066 -0.737312
1 0.269988 1.434862
2 0.336829 1.040681
2 0.929521 -1.142978
2 0.272813 -0.370184
[6 rows x 2 columns]
In [4]: df.loc[:,['a', 'b']]
Out[4]:
a b
1 0.714735 -1.125141
1 0.061066 -0.737312
1 0.269988 1.434862
2 0.336829 1.040681
2 0.929521 -1.142978
2 0.272813 -0.370184
3 -0.520348 1.126233
3 0.232261 -0.075287
3 -0.314570 -2.635400
[9 rows x 2 columns]
In [5]: df.loc[[1, 2], ['a', 'b']]
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-5-617013ef905a> in <module>()
----> 1 df.loc[[1, 2], ['a', 'b']]
c:\users\vdbosscj\scipy\pandas-joris\pandas\core\indexing.pyc in __getitem__(sel
f, key)
1152 def __getitem__(self, key):
1153 if type(key) is tuple:
-> 1154 return self._getitem_tuple(key)
1155 else:
1156 return self._getitem_axis(key, axis=0)
c:\users\vdbosscj\scipy\pandas-joris\pandas\core\indexing.pyc in _getitem_tuple(
self, tup)
680 # ugly hack for GH #836
681 if self._multi_take_opportunity(tup):
--> 682 return self._multi_take(tup)
683
684 # no shortcut needed
c:\users\vdbosscj\scipy\pandas-joris\pandas\core\indexing.pyc in _multi_take(sel
f, tup)
726 return o.reindex(**d)
727 except:
--> 728 raise self._exception
729
730 def _convert_for_reindex(self, key, axis=0):
KeyError:"><pre class="notranslate"><code class="notranslate">In [1]: df = pd.DataFrame(np.random.randn(9,2), index=[1,1,1,2,2,2,3,3,3], colum
ns=['a', 'b'])
In [2]: df
Out[2]:
a b
1 0.714735 -1.125141
1 0.061066 -0.737312
1 0.269988 1.434862
2 0.336829 1.040681
2 0.929521 -1.142978
2 0.272813 -0.370184
3 -0.520348 1.126233
3 0.232261 -0.075287
3 -0.314570 -2.635400
[9 rows x 2 columns]
In [3]: df.loc[[1, 2]]
Out[3]:
a b
1 0.714735 -1.125141
1 0.061066 -0.737312
1 0.269988 1.434862
2 0.336829 1.040681
2 0.929521 -1.142978
2 0.272813 -0.370184
[6 rows x 2 columns]
In [4]: df.loc[:,['a', 'b']]
Out[4]:
a b
1 0.714735 -1.125141
1 0.061066 -0.737312
1 0.269988 1.434862
2 0.336829 1.040681
2 0.929521 -1.142978
2 0.272813 -0.370184
3 -0.520348 1.126233
3 0.232261 -0.075287
3 -0.314570 -2.635400
[9 rows x 2 columns]
In [5]: df.loc[[1, 2], ['a', 'b']]
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-5-617013ef905a> in <module>()
----> 1 df.loc[[1, 2], ['a', 'b']]
c:\users\vdbosscj\scipy\pandas-joris\pandas\core\indexing.pyc in __getitem__(sel
f, key)
1152 def __getitem__(self, key):
1153 if type(key) is tuple:
-> 1154 return self._getitem_tuple(key)
1155 else:
1156 return self._getitem_axis(key, axis=0)
c:\users\vdbosscj\scipy\pandas-joris\pandas\core\indexing.pyc in _getitem_tuple(
self, tup)
680 # ugly hack for GH #836
681 if self._multi_take_opportunity(tup):
--> 682 return self._multi_take(tup)
683
684 # no shortcut needed
c:\users\vdbosscj\scipy\pandas-joris\pandas\core\indexing.pyc in _multi_take(sel
f, tup)
726 return o.reindex(**d)
727 except:
--> 728 raise self._exception
729
730 def _convert_for_reindex(self, key, axis=0):
KeyError:
</code></pre></div> | 0 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/apache/shardingsphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response <strong>more than 7 days</strong> and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">4.0.0</p>
<h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">Sharding-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">primary key produced by key generator<br>
Logic SQL:<br>
insert into test_complex (<code class="notranslate">name</code>,age,create_time,modified_time,user_id,phone,address)<br>
values(?,?,?,?,?, ?,?) , (?,?,?,?,?,?,?)<br>
route result of sharding key(id)<br>
logicName=sharding_db, value=461910991453999105, hash=1101970151 , mod=1<br>
logicName=sharding_db, mod=1 ,route =sharding_db_1<br>
logicName=test_complex, value=461910991453999105, hash=1101970151 , mod=7<br>
logicName=test_complex, mod=7 ,route =test_complex_7</p>
<p dir="auto">logicName=sharding_db, value=461910991453999108, hash=1101970154 , mod=0<br>
logicName=sharding_db, mod=0 ,route =sharding_db_0<br>
logicName=test_complex, value=461910991453999108, hash=1101970154 , mod=2<br>
logicName=test_complex, mod=2 ,route =test_complex_2</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Actual SQL: sharding_db_1 ::: insert into test_complex_3 (<code class="notranslate">name</code>,age,create_time,modified_time,user_id,phone,address,id) values<br>
(?, ?, ?, ?, ?, ?, ?, ?),(?, ?, ?, ?, ?, ?, ?, ?)<br>
::: [null, 1, 2020-04-28 15:09:21.415, 2020-04-28 15:09:21.415, 09c53d8e85934bbf8aeeec3d4711c0c95, 09c53d8e85934bbf8aeeec3d4711c0c95, 时代峰峻克鲁赛德, 461910991453999108, null, 1, 2020-04-28 15:09:21.415, 2020-04-28 15:09:21.415, 09c53d8e85934bbf8aeeec3d4711c0c98, 09c53d8e85934bbf8aeeec3d4711c0c98, 时代峰峻克鲁赛德, 461910991453999105]</p>
<h3 dir="auto">Reason analyze (If you can)</h3>
<p dir="auto">ShardingGeneratedKeyInsertValueParameterRewriter rewrite generateKey values had a descendingIterator<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/31645800/80464764-d9192b00-896c-11ea-8ee9-39ff979e871f.png"><img src="https://user-images.githubusercontent.com/31645800/80464764-d9192b00-896c-11ea-8ee9-39ff979e871f.png" alt="image" style="max-width: 100%;"></a><br>
the params had a descending order of route result, cause th actual sql is wrong<br>
why use descendingIterator here ? if use common iterator would cause some problems?</p>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> | <h2 dir="auto">Bug Report</h2>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">5.1.1</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-Proxy</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">i hava three databases of mysql,one for write,tow for read,i use ShardingSphere-Proxy and config readwrite-splitting, when a select not in transaction, i think it will route to read database .</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">begin, all my examples run good util a request with <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/transactional/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/transactional">@transactional</a> ,after this request,all select sql route to write database even in other request</p>
<h3 dir="auto">Reason analyze (If you can)</h3>
<p dir="auto">i debug the ShardingSphere-Proxy,find the TransactionHolder.isTransaction=true,but i can't understand why a request with transaction can affect other request</p>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<hr>
<p dir="auto">config-readwrite-splitting.yaml</p>
<p dir="auto">schemaName: x1db_shardingsphere</p>
<p dir="auto">dataSources:<br>
write_ds_141:<br>
url: jdbc:mysql://10.110.34.141:3306/x1db?serverTimezone=UTC&useSSL=false&characterEncoding=utf8<br>
username: root<br>
password:<br>
connectionTimeoutMilliseconds: 30000<br>
idleTimeoutMilliseconds: 60000<br>
maxLifetimeMilliseconds: 1800000<br>
maxPoolSize: 50<br>
minPoolSize: 1<br>
read_ds_151:<br>
url: jdbc:mysql://10.110.34.151:3306/x1db?serverTimezone=UTC&useSSL=false&characterEncoding=utf8<br>
username: root<br>
password:<br>
connectionTimeoutMilliseconds: 30000<br>
idleTimeoutMilliseconds: 60000<br>
maxLifetimeMilliseconds: 1800000<br>
maxPoolSize: 50<br>
minPoolSize: 1<br>
read_ds_152:<br>
url: jdbc:mysql://10.110.34.152:3306/x1db?serverTimezone=UTC&useSSL=false&characterEncoding=utf8<br>
username: root<br>
password:<br>
connectionTimeoutMilliseconds: 30000<br>
idleTimeoutMilliseconds: 60000<br>
maxLifetimeMilliseconds: 1800000<br>
maxPoolSize: 50<br>
minPoolSize: 1</p>
<p dir="auto">rules:</p>
<ul dir="auto">
<li>!READWRITE_SPLITTING<br>
dataSources:<br>
readwrite_ds:<br>
type: Static<br>
props:<br>
write-data-source-name: write_ds_141<br>
read-data-source-names: read_ds_151, read_ds_152</li>
</ul>
<hr>
<p dir="auto">server.yaml</p>
<p dir="auto">rules:</p>
<ul dir="auto">
<li>!AUTHORITY<br>
users:
<ul dir="auto">
<li>root@%:shardingsphere@141<br>
provider:<br>
type: ALL_PRIVILEGES_PERMITTED</li>
</ul>
</li>
<li>!SQL_PARSER<br>
sqlCommentParseEnabled: true<br>
sqlStatementCache:<br>
initialCapacity: 2000<br>
maximumSize: 65535<br>
concurrencyLevel: 4<br>
parseTreeCache:<br>
initialCapacity: 128<br>
maximumSize: 1024<br>
concurrencyLevel: 4<br>
props:<br>
max-connections-size-per-query: 1<br>
kernel-executor-size: 16<br>
proxy-frontend-flush-threshold: 128<br>
proxy-opentracing-enabled: false<br>
proxy-hint-enabled: false<br>
sql-show: true<br>
check-table-metadata-enabled: false<br>
show-process-list-enabled: false<br>
proxy-backend-query-fetch-size: -1<br>
check-duplicate-table-enabled: false<br>
proxy-frontend-executor-size: 0<br>
proxy-backend-executor-suitable: OLAP<br>
proxy-frontend-max-connections: 0 # Less than or equal to 0 means no limitation.<br>
sql-federation-enabled: false<br>
proxy-backend-driver-type: JDBC</li>
</ul>
<hr>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16077783/163531912-e37b0634-45e4-4d26-beb6-9943953d97b1.png"><img src="https://user-images.githubusercontent.com/16077783/163531912-e37b0634-45e4-4d26-beb6-9943953d97b1.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> | 0 |
<p dir="auto"><strong>Set alphamap will make transparent material behind invisible</strong></p>
<p dir="auto">In the screenshot, an aphamap is applied on the pink patch and set the transparent = true. The blue patch also set transparent = true. It can be seen that the part of the blue patch that behind the pink patch is invisible. If the transparent = false (like purple patch), everything is fine.</p>
<p dir="auto"><strong>Screenshots</strong></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/77861330/129310910-10715e2b-bbb7-4f2a-af29-226ac40b8033.png"><img src="https://user-images.githubusercontent.com/77861330/129310910-10715e2b-bbb7-4f2a-af29-226ac40b8033.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Platform:</strong></p>
<ul dir="auto">
<li>Device: [Desktop]</li>
<li>OS: [Windows]</li>
<li>Browser: [Chrome]</li>
<li>Three.js version: [dev]</li>
</ul> | <h5 dir="auto">Description of the problem</h5>
<p dir="auto">We (<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Jozain/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Jozain">@Jozain</a> and myself) are currently implementing out-of-order transparency for ThreeJS for a project of ours. We'd like to contribute it back. We are implementing the method of Morgan Mcguire, Weighted-Blended Order Independent Transparency: <a href="http://casual-effects.blogspot.ca/2014/03/weighted-blended-order-independent.html" rel="nofollow">http://casual-effects.blogspot.ca/2014/03/weighted-blended-order-independent.html</a></p>
<p dir="auto">We are helped a lot by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/arose/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/arose">@arose</a>'s example OIT code on which our stuff will be partially based, just our stuff will be designed into the core of Three.JS: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="33441946" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/4814" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/4814/hovercard" href="https://github.com/mrdoob/three.js/issues/4814">#4814</a></p>
<p dir="auto">Here is an proposed example of how to enable this mode:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var renderer = new THREE.WebGLRendererer( .... );
// add new "transparency" variable to renderer to select the transparency rendering mode
//renderer.transparency = THREE.PaintersTransparency; // the current ThreeJS method, the painter's algorithm
renderer.transparency = THREE.OrderIndependentTransperancy; // the new OIT method"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">renderer</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">WebGLRendererer</span><span class="pl-kos">(</span> ...<span class="pl-kos">.</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// add new "transparency" variable to renderer to select the transparency rendering mode</span>
<span class="pl-c">//renderer.transparency = THREE.PaintersTransparency; // the current ThreeJS method, the painter's algorithm</span>
<span class="pl-s1">renderer</span><span class="pl-kos">.</span><span class="pl-c1">transparency</span> <span class="pl-c1">=</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">OrderIndependentTransperancy</span><span class="pl-kos">;</span> <span class="pl-c">// the new OIT method</span></pre></div>
<p dir="auto">This mode will be implemented by a new WebGLOrderIndependentTransparency class that will be responsible for managing the buffers. It will create two additional RenderTargets that will track the size of the current render buffer. The first will be the accumulation buffer which we will render all transparency objects to and then we will render the objects as well to some alpha product buffers - thus two separate renders. This will be followed by a "resolve" stage that renders the transparent objects over top of the existing beauty render of the opaque objects.</p>
<p dir="auto">This workflow will work with base WebGL and work with multi-sample buffers as well. It can obviously be speed up using multiple render targets, but this shouldn't be that slow for non-huge numbers of transparent objects.</p>
<p dir="auto">We are going to implement this now, just wanted to give a heads up as to our design so that if you have feedback on it, we can incorporate it now.</p>
<p dir="auto">/ping <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/WestLangley/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/WestLangley">@WestLangley</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/arose/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/arose">@arose</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/spidersharma03/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/spidersharma03">@spidersharma03</a></p> | 1 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: xxx</li>
<li>Operating System version: xxx</li>
<li>Java version: xxx</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">nacos registry serviceName may conflict when we have two provider with same service but one config version as A and left group empty and<br>
one config group as A and left version empty</p>
<p dir="auto">the two provider would get registered with same key provdier:serviceName:A.</p>
<p dir="auto">the cause of this issue is we ignore empty value when we construct the key, relative code is</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" private String getServiceName(URL url) {
String category = url.getParameter(CATEGORY_KEY, DEFAULT_CATEGORY);
return getServiceName(url, category);
}
private String getServiceName(URL url, String category) {
StringBuilder serviceNameBuilder = new StringBuilder(category);
append(serviceNameBuilder, url, INTERFACE_KEY);
append(serviceNameBuilder, url, VERSION_KEY);
append(serviceNameBuilder, url, GROUP_KEY);
return serviceNameBuilder.toString();
}
private void append(StringBuilder target, URL url, String parameterName) {
target.append(SERVICE_NAME_SEPARATOR);
String parameterValue = url.getParameter(parameterName);
if (!StringUtils.isBlank(parameterValue)) {
target.append(parameterValue);
}
}"><pre class="notranslate"> <span class="pl-k">private</span> <span class="pl-smi">String</span> <span class="pl-s1">getServiceName</span>(<span class="pl-smi">URL</span> <span class="pl-s1">url</span>) {
<span class="pl-smi">String</span> <span class="pl-s1">category</span> = <span class="pl-s1">url</span>.<span class="pl-en">getParameter</span>(<span class="pl-c1">CATEGORY_KEY</span>, <span class="pl-c1">DEFAULT_CATEGORY</span>);
<span class="pl-k">return</span> <span class="pl-en">getServiceName</span>(<span class="pl-s1">url</span>, <span class="pl-s1">category</span>);
}
<span class="pl-k">private</span> <span class="pl-smi">String</span> <span class="pl-s1">getServiceName</span>(<span class="pl-smi">URL</span> <span class="pl-s1">url</span>, <span class="pl-smi">String</span> <span class="pl-s1">category</span>) {
<span class="pl-smi">StringBuilder</span> <span class="pl-s1">serviceNameBuilder</span> = <span class="pl-k">new</span> <span class="pl-smi">StringBuilder</span>(<span class="pl-s1">category</span>);
<span class="pl-en">append</span>(<span class="pl-s1">serviceNameBuilder</span>, <span class="pl-s1">url</span>, <span class="pl-c1">INTERFACE_KEY</span>);
<span class="pl-en">append</span>(<span class="pl-s1">serviceNameBuilder</span>, <span class="pl-s1">url</span>, <span class="pl-c1">VERSION_KEY</span>);
<span class="pl-en">append</span>(<span class="pl-s1">serviceNameBuilder</span>, <span class="pl-s1">url</span>, <span class="pl-c1">GROUP_KEY</span>);
<span class="pl-k">return</span> <span class="pl-s1">serviceNameBuilder</span>.<span class="pl-en">toString</span>();
}
<span class="pl-k">private</span> <span class="pl-smi">void</span> <span class="pl-s1">append</span>(<span class="pl-smi">StringBuilder</span> <span class="pl-s1">target</span>, <span class="pl-smi">URL</span> <span class="pl-s1">url</span>, <span class="pl-smi">String</span> <span class="pl-s1">parameterName</span>) {
<span class="pl-s1">target</span>.<span class="pl-en">append</span>(<span class="pl-c1">SERVICE_NAME_SEPARATOR</span>);
<span class="pl-smi">String</span> <span class="pl-s1">parameterValue</span> = <span class="pl-s1">url</span>.<span class="pl-en">getParameter</span>(<span class="pl-s1">parameterName</span>);
<span class="pl-k">if</span> (!<span class="pl-smi">StringUtils</span>.<span class="pl-en">isBlank</span>(<span class="pl-s1">parameterValue</span>)) {
<span class="pl-s1">target</span>.<span class="pl-en">append</span>(<span class="pl-s1">parameterValue</span>);
}
}</pre></div>
<p dir="auto">i think we should just keep a SEPARATOR as placeholder for empty value.</p>
<ol dir="auto">
<li>xxx</li>
<li>xxx</li>
<li>xxx</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps?</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">General Description</h3>
<p dir="auto">I noticed that there are many test to production inheritance structure in test code. Maybe it is not the best practice for test design. I suggest that we can use existing mock framework to refactor these structures.</p>
<h3 dir="auto">Refactor Goal</h3>
<p dir="auto">Increase the readability for test code and decrease the coupling between test and production code.</p>
<p dir="auto">The child test class that inherit production class will be removed after refactoring, relevant dependencies will be replaced by mocking framework.</p> | 0 |
<p dir="auto">On testing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="133425257" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/2994" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/2994/hovercard" href="https://github.com/microsoft/vscode/issues/2994">#2994</a></p>
<p dir="auto">In the following snippet place the caret on 'hello' and perform a 'Fold' operation:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class xyz {
foo() {
if (a == b) {
hello
} else {
world
}
}
}"><pre class="notranslate"><code class="notranslate">class xyz {
foo() {
if (a == b) {
hello
} else {
world
}
}
}
</code></pre></div>
<p dir="auto">Observe: 'foo()' get collapsed but I would expect that the 'if' gets collapsed.</p> | <p dir="auto">Testing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="133425257" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/2994" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/2994/hovercard" href="https://github.com/microsoft/vscode/issues/2994">#2994</a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/22350/13283270/3de70c92-daed-11e5-84dd-766846602e2a.gif"><img src="https://cloud.githubusercontent.com/assets/22350/13283270/3de70c92-daed-11e5-84dd-766846602e2a.gif" alt="bug" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">When my cursor is at line <code class="notranslate">266</code> and run the Fold action, the folding block that starts at line <code class="notranslate">263</code> gets folded. I expected that the block that starts at line <code class="notranslate">265</code> to be folded instead.</p>
<p dir="auto">When the cursor is at line <code class="notranslate">265</code>, behaviour is as expected, by the way.</p> | 1 |
<p dir="auto"><a href="https://groups.google.com/forum/#!topic/julia-users/IHKQVFVWSMY" rel="nofollow">This is from julia-users</a>. The example is:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function g(a)
if a
f() = 2
else
f() = 3
end
return f
end
f = g(true)
f() # Returns 3"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">g</span>(a)
<span class="pl-k">if</span> a
<span class="pl-en">f</span>() <span class="pl-k">=</span> <span class="pl-c1">2</span>
<span class="pl-k">else</span>
<span class="pl-en">f</span>() <span class="pl-k">=</span> <span class="pl-c1">3</span>
<span class="pl-k">end</span>
<span class="pl-k">return</span> f
<span class="pl-k">end</span>
f <span class="pl-k">=</span> <span class="pl-c1">g</span>(<span class="pl-c1">true</span>)
<span class="pl-c1">f</span>() <span class="pl-c"><span class="pl-c">#</span> Returns 3</span></pre></div>
<p dir="auto">What's also interesting is that g(false) in another REPL session gives an error: "f not defined". So in this setup you either get the second function (if you ask for the first one), or you get nothing! This is on Commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/59d153957596c1d798de08427fa97da370119163/hovercard" href="https://github.com/JuliaLang/julia/commit/59d153957596c1d798de08427fa97da370119163"><tt>59d1539</tt></a> (4 days old master).</p> | <p dir="auto">I have been trying to determine why a program that I am running reports a 4x difference in the amount of resident memory that Linux says Julia is requesting versus the output of <code class="notranslate">Base.summarysize()</code>. I am unclear if this is a bug or just my naivete:</p>
<p dir="auto">Declare a new structure with a single <code class="notranslate">Dict</code> child:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct Container{K, V}
child::Dict{K, V}
end"><pre class="notranslate"><span class="pl-k">struct</span> Container{K, V}
child<span class="pl-k">::</span><span class="pl-c1">Dict{K, V}</span>
<span class="pl-k">end</span></pre></div>
<p dir="auto">Create two examples, each with 1000 byte random data:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="container_1 = Container(Dict(:test => rand(UInt8, 1000)))
container_2 = Container(Dict(:test => rand(UInt8, 1000)))"><pre class="notranslate">container_1 <span class="pl-k">=</span> <span class="pl-c1">Container</span>(<span class="pl-c1">Dict</span>(<span class="pl-c1">:test</span> <span class="pl-k">=></span> <span class="pl-c1">rand</span>(UInt8, <span class="pl-c1">1000</span>)))
container_2 <span class="pl-k">=</span> <span class="pl-c1">Container</span>(<span class="pl-c1">Dict</span>(<span class="pl-c1">:test</span> <span class="pl-k">=></span> <span class="pl-c1">rand</span>(UInt8, <span class="pl-c1">1000</span>)))</pre></div>
<p dir="auto">Asking for their size yield 1504 and 1504 for <code class="notranslate">container_1</code> and <code class="notranslate">container_2</code>. However,</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Base.summarysize([container_1, container_2])"><pre class="notranslate">Base<span class="pl-k">.</span><span class="pl-c1">summarysize</span>([container_1, container_2])</pre></div>
<p dir="auto">returns 56 bytes rather than a value greater than 1504 + 1504.</p>
<p dir="auto">Note that using standard <code class="notranslate">Dicts</code> works fine:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dict_1 = Dict(:test => rand(UInt8, 1000))
dict_2 = Dict(:test => rand(UInt8, 1000))
println(Base.summarysize(dict_1))
println(Base.summarysize(dict_2))
println(Base.summarysize([dict_1, dict_2]))"><pre class="notranslate">dict_1 <span class="pl-k">=</span> <span class="pl-c1">Dict</span>(<span class="pl-c1">:test</span> <span class="pl-k">=></span> <span class="pl-c1">rand</span>(UInt8, <span class="pl-c1">1000</span>))
dict_2 <span class="pl-k">=</span> <span class="pl-c1">Dict</span>(<span class="pl-c1">:test</span> <span class="pl-k">=></span> <span class="pl-c1">rand</span>(UInt8, <span class="pl-c1">1000</span>))
<span class="pl-c1">println</span>(Base<span class="pl-k">.</span><span class="pl-c1">summarysize</span>(dict_1))
<span class="pl-c1">println</span>(Base<span class="pl-k">.</span><span class="pl-c1">summarysize</span>(dict_2))
<span class="pl-c1">println</span>(Base<span class="pl-k">.</span><span class="pl-c1">summarysize</span>([dict_1, dict_2]))</pre></div>
<p dir="auto">Returns, as expected: <code class="notranslate">dict_1</code> => 1496 bytes, <code class="notranslate">dict_2</code> => 1496 bytes, and <code class="notranslate">[dict_1, dict_2]</code> => 3048 bytes.</p>
<p dir="auto">Version info:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
OS: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, haswell)
Environment:
JULIA_NUM_THREADS = 3"><pre class="notranslate"><code class="notranslate">Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
OS: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, haswell)
Environment:
JULIA_NUM_THREADS = 3
</code></pre></div> | 0 |
<p dir="auto">[Enter steps to reproduce below:]</p>
<ol dir="auto">
<li>...</li>
<li>...</li>
</ol>
<p dir="auto"><strong>Atom Version</strong>: 0.165.0<br>
<strong>System</strong>: linux 3.17.0-031700-generic<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: EACCES, open '/home/joao/.atom/compile-cache/cson/5af7724b023a6274b520f79f04fb798a67319ca7.json'</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At fs.js:75
Error: EACCES, open '/home/joao/.atom/compile-cache/cson/5af7724b023a6274b520f79f04fb798a67319ca7.json'
at Error (native)
"><pre class="notranslate"><code class="notranslate">At fs.js:75
Error: EACCES, open '/home/joao/.atom/compile-cache/cson/5af7724b023a6274b520f79f04fb798a67319ca7.json'
at Error (native)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<h3 dir="auto">Config</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"core": {
"disabledPackages": [
"metrics"
]
}
}"><pre class="notranslate"><code class="notranslate">{
"core": {
"disabledPackages": [
"metrics"
]
}
}
</code></pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
No installed packages
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
<span class="pl-en">No</span> <span class="pl-en">installed</span> packages
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | <p dir="auto">Just a moment ago I stumbled upon a similar issue to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="38535094" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/3056" data-hovercard-type="issue" data-hovercard-url="/atom/atom/issues/3056/hovercard" href="https://github.com/atom/atom/issues/3056">#3056</a>. As a background: I do like atom so much, that I started it to use it as a drop-in replacement for gedit. Even to edit system configuration files. In this scenario it's quite common to invoke editors via sudo.</p>
<p dir="auto">Atom will start in a broken state if you it was previously launched i.e with something like <code class="notranslate">sudo atom /etc/hosts</code>, because in this case <code class="notranslate">$HOME</code> still points the original user directory, though the process is started under root privileges. This seems to be <a href="https://security.stackexchange.com/a/18399" rel="nofollow">a distribution specific default behavior of sudo</a>.</p>
<p dir="auto">As result <strong>any file created</strong> in this Atom session will become unwriteable for the original user and will lead to application errors inside Atom:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[30615:0724/202223:INFO:CONSOLE(29)] "Error: EACCES, permission denied '/home/ben/.atom/compile-cache/less/62b7a669af25a948e0632eac5cb2bf860f9c0e6e/imports.json'"><pre class="notranslate"><code class="notranslate">[30615:0724/202223:INFO:CONSOLE(29)] "Error: EACCES, permission denied '/home/ben/.atom/compile-cache/less/62b7a669af25a948e0632eac5cb2bf860f9c0e6e/imports.json'
</code></pre></div>
<p dir="auto">To be honest: You are able run into similar issues on other programs too, but most of them tend not to create new files unless triggered. I'm not aware which actions trigger Atom to create new files under <code class="notranslate">$HOME</code> <em>after the initial first launch</em> for a user.</p>
<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li>Start <code class="notranslate">atom</code> and exit</li>
<li><code class="notranslate">rm -r ~/.atom/compile-cache/less</code> to provoke Atom creating new files</li>
<li><code class="notranslate">sudo atom</code> and exit</li>
<li><code class="notranslate">atom</code></li>
</ol>
<p dir="auto">This will be the case on all plattforms, where sudo keeps the original $HOME setting which can be tested i.e. by calling <code class="notranslate">sudo sh -c 'echo $HOME'</code></p> | 1 |
<p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong></p>
<p dir="auto">This is a feature request for Normal-inverse-gamma distribution support at <code class="notranslate">scipy.stats</code> subpackage.</p>
<p dir="auto">I will implement and open a pull request if approved.</p>
<p dir="auto"><strong>Describe the solution you'd like</strong></p>
<p dir="auto">Normal-inverse-gamma distribution distribution is the conjugate prior of a Normal distribution with unknown mean and variance [1], which is is commonly used in Bayesian statistics.</p>
<p dir="auto">[1] Murphy, Kevin. (2007). Conjugate Bayesian analysis of the Gaussian distribution.</p>
<p dir="auto"><strong>Describe alternatives you've considered</strong></p>
<p dir="auto"><strong>Additional context (e.g. screenshots)</strong></p> | <p dir="auto">Right now the <a href="https://en.wikipedia.org/wiki/Normal-inverse-gamma_distribution" rel="nofollow">Normal-inverse-gamma distribution</a> is missing in <code class="notranslate">scipy.stats</code>. I think it qualifies as useful addition since it is the <a href="https://en.wikipedia.org/wiki/Conjugate_prior" rel="nofollow">conjugate prior</a> of the normal distribution in case mean and variance are unknown. Therefore the Normal-inverse-gamma distribution is important for Bayesian inference which has been for years and still is a trending topic in the domain of data science.</p> | 1 |
<p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubelet-serial-gce-e2e-ci/279/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubelet-serial-gce-e2e-ci/279/</a></p>
<p dir="auto">Failed: [k8s.io] Resource-usage [Serial] [Slow] regular resource usage tracking [Benchmark] resource tracking for 10 pods per node {E2eNode Suite}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/var/lib/jenkins/workspace/kubelet-serial-gce-e2e-ci/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e_node/resource_usage_test.go:57
Expected error:
<*errors.errorString | 0xc82050ea50>: {
s: "pod ran to completion",
}
pod ran to completion
not to have occurred
/var/lib/jenkins/workspace/kubelet-serial-gce-e2e-ci/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/pods.go:57"><pre class="notranslate"><code class="notranslate">/var/lib/jenkins/workspace/kubelet-serial-gce-e2e-ci/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e_node/resource_usage_test.go:57
Expected error:
<*errors.errorString | 0xc82050ea50>: {
s: "pod ran to completion",
}
pod ran to completion
not to have occurred
/var/lib/jenkins/workspace/kubelet-serial-gce-e2e-ci/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/pods.go:57
</code></pre></div> | <p dir="auto">We need an issue to track this.</p>
<p dir="auto">Recently we added the memory eviction test <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="164568805" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28693" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/28693/hovercard" href="https://github.com/kubernetes/kubernetes/pull/28693">#28693</a>.<br>
Currently, it is running in the serial test job. However, after adding it all test running after it could not start pod.</p>
<p dir="auto">They all failed with the reason <code class="notranslate">Evicted: The node was low on compute resources.</code>.</p>
<p dir="auto">Currently, we are not sure that:</p>
<ul dir="auto">
<li>Is this because the memory is not reclaimed?</li>
<li>Is this because cadvisor probe interval is too long?</li>
<li>Is this because there is any bug in current memory eviction implementation?</li>
</ul>
<p dir="auto">Anyhow, currently all serial node e2e builds are red, we should fix this or disable the test.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/derekwaynecarr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/derekwaynecarr">@derekwaynecarr</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vishh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vishh">@vishh</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mtaufen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mtaufen">@mtaufen</a><br>
/cc @kubernetes/sig-node</p> | 1 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.6</li>
<li>Java version: JDK8</li>
</ul>
<p dir="auto">DUBBO客户端与服务端建立连接超时,然后抛出异常。请问是否可以添加上重试的特性?</p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.3</li>
<li>Operating System version: win10</li>
<li>Java version: 1.8</li>
<li>SpringBootVersion: 2.0.6 2.0.9</li>
<li>nacos server: 1.1.3</li>
<li>AlibabaCloudStarterNacosDiscovery: 2.0.0</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>boostrap.yml</li>
</ol>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="spring:
application:
name: demo-banana
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
namespace: 8e135e43-4e66-462b-9039-300f6f8f55c2
config:
server-addr: 127.0.0.1:8848"><pre class="notranslate"><span class="pl-ent">spring</span>:
<span class="pl-ent">application</span>:
<span class="pl-ent">name</span>: <span class="pl-s">demo-banana</span>
<span class="pl-ent">cloud</span>:
<span class="pl-ent">nacos</span>:
<span class="pl-ent">discovery</span>:
<span class="pl-ent">server-addr</span>: <span class="pl-s">127.0.0.1:8848</span>
<span class="pl-ent">namespace</span>: <span class="pl-s">8e135e43-4e66-462b-9039-300f6f8f55c2</span>
<span class="pl-ent">config</span>:
<span class="pl-ent">server-addr</span>: <span class="pl-s">127.0.0.1:8848</span></pre></div>
<ol start="2" dir="auto">
<li>application.yaml</li>
</ol>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="server:
port: 8200
management:
endpoints:
web:
exposure:
include: "*""><pre class="notranslate"><span class="pl-ent">server</span>:
<span class="pl-ent">port</span>: <span class="pl-c1">8200</span>
<span class="pl-ent">management</span>:
<span class="pl-ent">endpoints</span>:
<span class="pl-ent">web</span>:
<span class="pl-ent">exposure</span>:
<span class="pl-ent">include</span>: <span class="pl-s"><span class="pl-pds">"</span>*<span class="pl-pds">"</span></span></pre></div>
<ol start="3" dir="auto">
<li>dubbo.xml</li>
</ol>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://dubbo.apache.org/schema/dubbo
http://dubbo.apache.org/schema/dubbo/dubbo.xsd">
<!-- 提供方应用信息,用于计算依赖关系 -->
<dubbo:application name="${spring.application.name}" logger="slf4j"/>
<dubbo:config-center address="nacos://127.0.0.1:8848" namespace="public" config-file="dubbo.properties" group="DEFAULT_GROUP"/>
<!-- <dubbo:registry address="nacos://127.0.0.1:8848"/>-->
<dubbo:reference interface="com.example.apple.export.AppleExport" lazy="true" />
</beans>"><pre class="notranslate"><?<span class="pl-ent">xml</span><span class="pl-e"> version</span>=<span class="pl-s"><span class="pl-pds">"</span>1.0<span class="pl-pds">"</span></span><span class="pl-e"> encoding</span>=<span class="pl-s"><span class="pl-pds">"</span>UTF-8<span class="pl-pds">"</span></span>?>
<<span class="pl-ent">beans</span> <span class="pl-e">xmlns</span>=<span class="pl-s"><span class="pl-pds">"</span>http://www.springframework.org/schema/beans<span class="pl-pds">"</span></span>
<span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">xsi</span>=<span class="pl-s"><span class="pl-pds">"</span>http://www.w3.org/2001/XMLSchema-instance<span class="pl-pds">"</span></span>
<span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">dubbo</span>=<span class="pl-s"><span class="pl-pds">"</span>http://dubbo.apache.org/schema/dubbo<span class="pl-pds">"</span></span>
<span class="pl-e">xsi</span><span class="pl-e">:</span><span class="pl-e">schemaLocation</span>=<span class="pl-s"><span class="pl-pds">"</span>http://www.springframework.org/schema/beans</span>
<span class="pl-s"> http://www.springframework.org/schema/beans/spring-beans-4.3.xsd</span>
<span class="pl-s"> http://dubbo.apache.org/schema/dubbo</span>
<span class="pl-s"> http://dubbo.apache.org/schema/dubbo/dubbo.xsd<span class="pl-pds">"</span></span>>
<span class="pl-c"><span class="pl-c"><!--</span> 提供方应用信息,用于计算依赖关系 <span class="pl-c">--></span></span>
<<span class="pl-ent">dubbo</span><span class="pl-ent">:</span><span class="pl-ent">application</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>${spring.application.name}<span class="pl-pds">"</span></span> <span class="pl-e">logger</span>=<span class="pl-s"><span class="pl-pds">"</span>slf4j<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">dubbo</span><span class="pl-ent">:</span><span class="pl-ent">config-center</span> <span class="pl-e">address</span>=<span class="pl-s"><span class="pl-pds">"</span>nacos://127.0.0.1:8848<span class="pl-pds">"</span></span> <span class="pl-e">namespace</span>=<span class="pl-s"><span class="pl-pds">"</span>public<span class="pl-pds">"</span></span> <span class="pl-e">config-file</span>=<span class="pl-s"><span class="pl-pds">"</span>dubbo.properties<span class="pl-pds">"</span></span> <span class="pl-e">group</span>=<span class="pl-s"><span class="pl-pds">"</span>DEFAULT_GROUP<span class="pl-pds">"</span></span>/>
<span class="pl-c"><span class="pl-c"><!--</span> <dubbo:registry address="nacos://127.0.0.1:8848"/><span class="pl-c">--></span></span>
<<span class="pl-ent">dubbo</span><span class="pl-ent">:</span><span class="pl-ent">reference</span> <span class="pl-e">interface</span>=<span class="pl-s"><span class="pl-pds">"</span>com.example.apple.export.AppleExport<span class="pl-pds">"</span></span> <span class="pl-e">lazy</span>=<span class="pl-s"><span class="pl-pds">"</span>true<span class="pl-pds">"</span></span> />
</<span class="pl-ent">beans</span>></pre></div>
<p dir="auto">4.dubbo.properties</p>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dubbo.registry.address=nacos://127.0.0.1:8848"><pre class="notranslate"><span class="pl-k">dubbo.registry.address</span>=nacos://127.0.0.1:8848</pre></div>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">启动成功</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">启动失败</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2019-08-16 08:39:37.717] INFO org.apache.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [D:\SDK\JDK8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\Developer\Jetbrains\IntelliJ IDEA\jbr\\bin;D:\Developer\Jetbrains\IntelliJ IDEA\jbr\\bin\server;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;D:\SDK\JDK8\bin;D:\SDK\Python3;C:\Users\xiaolei.fu\AppData\Local\Microsoft\WindowsApps;D:\Common\BandZip\;D:\Developer\Microsoft VS Code\bin;D:\Developer\Jetbrains\IntelliJ IDEA\bin;;.]
[2019-08-16 08:39:37.821] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
[2019-08-16 08:39:37.834] INFO com.alibaba.cloud.sentinel.SentinelWebAutoConfiguration : [Sentinel Starter] register Sentinel CommonFilter with urlPatterns: [/*].
[2019-08-16 08:39:38.510] INFO com.alibaba.nacos.client.naming : initializer namespace from System Property :null
[2019-08-16 08:39:38.510] INFO com.alibaba.nacos.client.naming : initializer namespace from System Environment :null
[2019-08-16 08:39:38.510] INFO com.alibaba.nacos.client.naming : initializer namespace from System Property :null
[2019-08-16 08:39:38.516] DEBUG com.alibaba.nacos.client.naming : failover switch is not found, failover00-00---000-VIPSRV_FAILOVER_SWITCH-000---00-00
[2019-08-16 08:39:38.796] INFO org.apache.catalina.core.StandardService : Stopping service [Tomcat]
[2019-08-16 08:39:38.801] WARN org.apache.catalina.loader.WebappClassLoaderBase : The web application [ROOT] appears to have started a thread named [com.alibaba.nacos.naming.client.listener] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
com.alibaba.nacos.client.naming.core.EventDispatcher$Notifier.run(EventDispatcher.java:114)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)"><pre class="notranslate"><code class="notranslate">[2019-08-16 08:39:37.717] INFO org.apache.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [D:\SDK\JDK8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\Developer\Jetbrains\IntelliJ IDEA\jbr\\bin;D:\Developer\Jetbrains\IntelliJ IDEA\jbr\\bin\server;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;D:\SDK\JDK8\bin;D:\SDK\Python3;C:\Users\xiaolei.fu\AppData\Local\Microsoft\WindowsApps;D:\Common\BandZip\;D:\Developer\Microsoft VS Code\bin;D:\Developer\Jetbrains\IntelliJ IDEA\bin;;.]
[2019-08-16 08:39:37.821] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
[2019-08-16 08:39:37.834] INFO com.alibaba.cloud.sentinel.SentinelWebAutoConfiguration : [Sentinel Starter] register Sentinel CommonFilter with urlPatterns: [/*].
[2019-08-16 08:39:38.510] INFO com.alibaba.nacos.client.naming : initializer namespace from System Property :null
[2019-08-16 08:39:38.510] INFO com.alibaba.nacos.client.naming : initializer namespace from System Environment :null
[2019-08-16 08:39:38.510] INFO com.alibaba.nacos.client.naming : initializer namespace from System Property :null
[2019-08-16 08:39:38.516] DEBUG com.alibaba.nacos.client.naming : failover switch is not found, failover00-00---000-VIPSRV_FAILOVER_SWITCH-000---00-00
[2019-08-16 08:39:38.796] INFO org.apache.catalina.core.StandardService : Stopping service [Tomcat]
[2019-08-16 08:39:38.801] WARN org.apache.catalina.loader.WebappClassLoaderBase : The web application [ROOT] appears to have started a thread named [com.alibaba.nacos.naming.client.listener] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
com.alibaba.nacos.client.naming.core.EventDispatcher$Notifier.run(EventDispatcher.java:114)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
</code></pre></div> | 0 |
<p dir="auto">Maybe this is actually an issue with Visual Studio, but when I create a typescript project and provoke a build error, I'll get the error message twice in the Error List - one time from IntelliSense and one time from the compiler.</p>
<p dir="auto">And it looks like - when doing something similar in C# - the error messages are merged when they are identical. I do not know, if that is actually how it works, but it would explain the behavior, because the message from the TypeScript compiler is prefixed with "Build: " and for some strange reason the error code does not show up in the the list either, so the messages are not identical.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/299575/9812015/d5281c68-587a-11e5-817a-7c153a23c5ef.png"><img src="https://cloud.githubusercontent.com/assets/299575/9812015/d5281c68-587a-11e5-817a-7c153a23c5ef.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">If that's not the case, the question remains: why are errors shown twice for TypeScript, but not for C#? :)</p> | <p dir="auto">Hi gyus,<br>
I could not find duplicate so I am posting here.</p>
<p dir="auto"><strong>TypeScript Version:</strong> <code class="notranslate">1.8.9</code><br>
Target: <code class="notranslate">es5</code></p>
<p dir="auto"><strong>Code:</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var myMap = new Map();
myMap.set(0, "zero");
myMap.set(1, "one");
for (var [key, value] of myMap) {
console.log(key + " = " + value);
}"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">myMap</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Map</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">myMap</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-s">"zero"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">myMap</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-s">"one"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-kos">[</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">]</span> <span class="pl-k">of</span> <span class="pl-s1">myMap</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">key</span> <span class="pl-c1">+</span> <span class="pl-s">" = "</span> <span class="pl-c1">+</span> <span class="pl-s1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Actual emit:</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var myMap = new Map();
myMap.set(0, "zero");
myMap.set(1, "one");
for (var _i = 0, myMap_1 = myMap; _i < myMap_1.length; _i++) {
var _a = myMap_1[_i], key = _a[0], value = _a[1];
console.log(key + " = " + value);
}"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">myMap</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Map</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">myMap</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-s">"zero"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">myMap</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-s">"one"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">_i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-s1">myMap_1</span> <span class="pl-c1">=</span> <span class="pl-s1">myMap</span><span class="pl-kos">;</span> <span class="pl-s1">_i</span> <span class="pl-c1"><</span> <span class="pl-s1">myMap_1</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">_i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">_a</span> <span class="pl-c1">=</span> <span class="pl-s1">myMap_1</span><span class="pl-kos">[</span><span class="pl-s1">_i</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">key</span> <span class="pl-c1">=</span> <span class="pl-s1">_a</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-s1">_a</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">key</span> <span class="pl-c1">+</span> <span class="pl-s">" = "</span> <span class="pl-c1">+</span> <span class="pl-s1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">The problem is that <code class="notranslate">Map</code>(and <code class="notranslate">Set</code> too) instance does not have <code class="notranslate">length</code> property, instead it has <code class="notranslate">size</code> property. As result loop does not traverse</p>
<p dir="auto"><a href="http://www.typescriptlang.org/play/index.html#src=var%20myMap%20%3D%20new%20Map%28%29%3B%0D%0AmyMap.set%280%2C%20%22zero%22%29%3B%0D%0AmyMap.set%281%2C%20%22one%22%29%3B%0D%0Afor%20%28var%20%5Bkey%2C%20value%5D%20of%20myMap%29%20%7B%0D%0A%20%20console.log%28key%20%2B%20%22%20%3D%20%22%20%2B%20value%29%3B%0D%0A%7D" rel="nofollow">Playground</a></p> | 0 |
<p dir="auto">This issue is only ocuring in [Iphone 12].</p>
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v131.1]</li>
<li>Operating System: Ubuntu</li>
<li>Browser: DEVICE_TYPE=iPhone12</li>
<li>Other info:</li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" it("renders the component", async () => {
await page.click("text=Go to page");
await expect(page).toHaveSelector(`.gotopage`);
});
"><pre class="notranslate"> <span class="pl-en">it</span><span class="pl-kos">(</span><span class="pl-s">"renders the component"</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-s">"text=Go to page"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveSelector</span><span class="pl-kos">(</span><span class="pl-s">`.gotopage`</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<p dir="auto">[Describe actual behavior]<br>
locator resolved to ...<br>
attempting click action<br>
waiting for element to be visible, enabled and stable<br>
element is visible, enabled and stable<br>
scrolling into view if needed<br>
done scrolling<br>
element is outside of the viewport</p> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.33.0]</li>
<li>Operating System: [Windows 11, macOS 13.2]</li>
<li>Browser: [Chromium]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { test } from "@playwright/test";
test("test", async ({ page }) => {
await page.goto("https://letcode.in/table");
// This does not locate the first row
page.getByRole("row").nth(0);
// Only this locates the first row
page.getByRole("row").first();
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"@playwright/test"</span><span class="pl-kos">;</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"test"</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">"https://letcode.in/table"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// This does not locate the first row</span>
<span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByRole</span><span class="pl-kos">(</span><span class="pl-s">"row"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">nth</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Only this locates the first row</span>
<span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByRole</span><span class="pl-kos">(</span><span class="pl-s">"row"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">first</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto"><code class="notranslate">page.getByRole("row").nth(0);</code> shoud locate the first row.</p>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/78950093/237922456-44d0e892-d499-4a5f-a1ca-c593149d3168.png"><img width="1518" alt="image" src="https://user-images.githubusercontent.com/78950093/237922456-44d0e892-d499-4a5f-a1ca-c593149d3168.png" style="max-width: 100%;"></a>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto"><code class="notranslate">page.getByRole("row").nth(0);</code> does not locate the first row. Only <code class="notranslate">page.getByRole("row").first();</code> locates the first row.</p>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/78950093/237922830-6f8b93cb-cb01-49bb-a98a-12ee53945e31.png"><img width="1522" alt="image" src="https://user-images.githubusercontent.com/78950093/237922830-6f8b93cb-cb01-49bb-a98a-12ee53945e31.png" style="max-width: 100%;"></a> | 0 |
<p dir="auto">The following code is miscompiled on my OS X laptop:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="use std;
native "cdecl" mod libc = "" {
fn printf(s: *u8, a: int); /* A tenuous definition, indeed. Herp, derp. */
}
fn main() {
let b = std::str::bytes("%d\n");
let b8 = unsafe { std::vec::unsafe::to_ptr(b) };
libc::printf(b8, 4);
let a = bind libc::printf(b8, 5);
a(); /* core dump */
}"><pre class="notranslate"><code class="notranslate">use std;
native "cdecl" mod libc = "" {
fn printf(s: *u8, a: int); /* A tenuous definition, indeed. Herp, derp. */
}
fn main() {
let b = std::str::bytes("%d\n");
let b8 = unsafe { std::vec::unsafe::to_ptr(b) };
libc::printf(b8, 4);
let a = bind libc::printf(b8, 5);
a(); /* core dump */
}
</code></pre></div>
<p dir="auto">I also reproed on my Linux machine, in which I captured this GDB session:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(gdb) break printf
Breakpoint 1 at 0x8048b78
(gdb) run
Starting program: /storage/homes/joshua/rust/build/bindbad
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xf7917b70 (LWP 15444)]
[Switching to Thread 0xf7917b70 (LWP 15444)]
Breakpoint 1, __printf (format=0x804ca68 "%d\n") at printf.c:29
29 printf.c: No such file or directory.
in printf.c
(gdb) c
Continuing.
4
Breakpoint 1, __printf (format=0x10 <Address 0x10 out of bounds>) at printf.c:29
29 in printf.c
(gdb)"><pre class="notranslate"><code class="notranslate">(gdb) break printf
Breakpoint 1 at 0x8048b78
(gdb) run
Starting program: /storage/homes/joshua/rust/build/bindbad
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xf7917b70 (LWP 15444)]
[Switching to Thread 0xf7917b70 (LWP 15444)]
Breakpoint 1, __printf (format=0x804ca68 "%d\n") at printf.c:29
29 printf.c: No such file or directory.
in printf.c
(gdb) c
Continuing.
4
Breakpoint 1, __printf (format=0x10 <Address 0x10 out of bounds>) at printf.c:29
29 in printf.c
(gdb)
</code></pre></div> | <p dir="auto">this test (src/test/run-pass/c-stack-as-value.rs) yields a LLVM compilation error:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// xfail-test
native "c-stack-cdecl" mod rustrt {
fn unsupervise();
}
fn main() {
let _foo = rustrt::unsupervise;
}"><pre class="notranslate"><span class="pl-c">// xfail-test</span>
native <span class="pl-s">"c-stack-cdecl"</span> <span class="pl-k">mod</span> rustrt <span class="pl-kos">{</span>
<span class="pl-k">fn</span> <span class="pl-en">unsupervise</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> _foo = rustrt<span class="pl-kos">::</span>unsupervise<span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div> | 1 |
<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sorgloomer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sorgloomer">@sorgloomer</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.5.1</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
plugins: ['transform-es2015-modules-amd']
}"><pre class="notranslate"><code class="notranslate">{
plugins: ['transform-es2015-modules-amd']
}
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require("foo").bar;"><pre class="notranslate"><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"foo"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">bar</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">Trying to compile the above code with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var babel = require('babel-core');
console.log(babel.transform(
'require("foo").bar;',
{ plugins: ['transform-es2015-modules-amd'] }
).code);"><pre class="notranslate"><code class="notranslate">var babel = require('babel-core');
console.log(babel.transform(
'require("foo").bar;',
{ plugins: ['transform-es2015-modules-amd'] }
).code);
</code></pre></div>
<p dir="auto">results in this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: unknown: Property object of MemberExpression expected node to be of a type ["Expression"] but instead got null
at Object.validate (C:\_temp\babel6-test\node_modules\babel-types\lib\definitions\index.js:101:13)
at Object.validate (C:\_temp\babel6-test\node_modules\babel-types\lib\index.js:269:9)
at NodePath._replaceWith (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\replacement.js:201:7)
at NodePath._remove (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\removal.js:55:10)
at NodePath.remove (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\removal.js:27:8)
at PluginPass.CallExpression (C:\_temp\babel6-test\node_modules\babel-plugin-transform-es2015-modules-amd\lib\index.js:51:12)
at NodePath._call (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:74:18)
at NodePath.call (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:46:17)
at NodePath.visit (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:104:12)
at TraversalContext.visitQueue (C:\_temp\babel6-test\node_modules\babel-traverse\lib\context.js:156:16)"><pre class="notranslate"><code class="notranslate">TypeError: unknown: Property object of MemberExpression expected node to be of a type ["Expression"] but instead got null
at Object.validate (C:\_temp\babel6-test\node_modules\babel-types\lib\definitions\index.js:101:13)
at Object.validate (C:\_temp\babel6-test\node_modules\babel-types\lib\index.js:269:9)
at NodePath._replaceWith (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\replacement.js:201:7)
at NodePath._remove (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\removal.js:55:10)
at NodePath.remove (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\removal.js:27:8)
at PluginPass.CallExpression (C:\_temp\babel6-test\node_modules\babel-plugin-transform-es2015-modules-amd\lib\index.js:51:12)
at NodePath._call (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:74:18)
at NodePath.call (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:46:17)
at NodePath.visit (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:104:12)
at TraversalContext.visitQueue (C:\_temp\babel6-test\node_modules\babel-traverse\lib\context.js:156:16)
</code></pre></div>
<p dir="auto">Maybe we could have an option to completely turn off treating <code class="notranslate">require</code> calls in es6 modules as imports</p> | <blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/greypants/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/greypants">@greypants</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.5.2</li>
<li><strong>Node version:</strong> 4.2.4</li>
<li><strong>npm version:</strong> 2.14.12</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="react"><pre class="notranslate"><code class="notranslate">react
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<div label="foo" label="label is duplicated" />"><pre class="notranslate"><span class="pl-c1"><</span><span class="pl-ent">div</span> <span class="pl-c1">label</span><span class="pl-c1">=</span><span class="pl-s">"foo"</span> <span class="pl-c1">label</span><span class="pl-c1">=</span><span class="pl-s">"label is duplicated"</span> <span class="pl-c1">/</span><span class="pl-c1">></span></pre></div>
<h3 dir="auto">Description</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<div label="foo" label="label is duplicated" />
"><pre class="notranslate"><code class="notranslate"><div label="foo" label="label is duplicated" />
</code></pre></div>
<p dir="auto">Will transpile to</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="React.createElement('div', { label: '...', name: '...', label: '...' })"><pre class="notranslate"><code class="notranslate">React.createElement('div', { label: '...', name: '...', label: '...' })
</code></pre></div>
<p dir="auto">The duplicate definition of <code class="notranslate">label</code> on the object literal will will cause the following error in IE 10+</p>
<blockquote>
<p dir="auto">SCRIPT1046: Multiple definitions of a property not allowed in strict mode`</p>
</blockquote>
<p dir="auto">It'd be great to at least throw a warning, if not break transpiling altogether.</p> | 0 |
<p dir="auto">On AlpineLinux, which is a mil based Linux distributive, some of numpy's test fail. The log is attached.<br>
<a href="https://github.com/numpy/numpy/files/106482/log.txt">log.txt</a></p>
<p dir="auto">There are two types of issues - one for various missed overflow/underflow exceptions, the second one is for incorrect results from musl's trigonometric functions.</p>
<p dir="auto">The first one can be fixed by including <code class="notranslate">fenv.h</code> header in musl builds, AFAIU this can be done in <code class="notranslate">numpy/numpy/core/src/npymath/ieee754.c.src</code> and <code class="notranslate">numpy/core/include/numpy/ufuncobject.h </code> by replacing <code class="notranslate">__GLIBC__</code> with <code class="notranslate">__GNUC__</code></p>
<p dir="auto">The second group can be fixed by disabling the trigonometric functions in <code class="notranslate">numpy/numpy/core/src/private/npy_config.h</code> not only for glibc, but also for musl. An issue here is that musl doesn't provide any macro like the <code class="notranslate">__GLIBC__</code> to detect it.</p>
<p dir="auto">So the question, is numpy interested in such a patch? Could you please share your opinions what is best way to implement it?</p>
<p dir="auto">Otherwise the patch can be implement in corresponding package for AlpineLinux</p> | <p dir="auto">I've ran into issue with linalg.solve on different systems: in RHEL and Ubuntu it will raise an LinAlgError exception, but on Alpine it will return <code class="notranslate">nan</code>.</p>
<p dir="auto">Ubuntu:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ docker run -it --rm ubuntu:18.04 /bin/sh
$ apt-get install python3-numpy
# python3
Python 3.6.6 (default, Sep 12 2018, 18:26:19)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.linalg.solve(numpy.array([[0]]), numpy.array([[0]]))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/numpy/linalg/linalg.py", line 375, in solve
r = gufunc(a, b, signature=signature, extobj=extobj)
File "/usr/lib/python3/dist-packages/numpy/linalg/linalg.py", line 90, in _raise_linalgerror_singular
raise LinAlgError("Singular matrix")
numpy.linalg.linalg.LinAlgError: Singular matrix"><pre class="notranslate">$ docker run -it --rm ubuntu:18.04 /bin/sh
$ apt-get install python3-numpy
<span class="pl-c"><span class="pl-c">#</span> python3</span>
Python 3.6.6 (default, Sep 12 2018, 18:26:19)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type <span class="pl-s"><span class="pl-pds">"</span>help<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>copyright<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>credits<span class="pl-pds">"</span></span> or <span class="pl-s"><span class="pl-pds">"</span>license<span class="pl-pds">"</span></span> <span class="pl-k">for</span> more information.
<span class="pl-k">>>></span> import numpy
<span class="pl-k">>>></span> numpy.linalg.solve(numpy.array([[0]]), numpy.array([[0]]))
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span><stdin><span class="pl-pds">"</span></span>, line 1, <span class="pl-k">in</span> <span class="pl-k"><</span>module<span class="pl-k">></span>
File <span class="pl-s"><span class="pl-pds">"</span>/usr/lib/python3/dist-packages/numpy/linalg/linalg.py<span class="pl-pds">"</span></span>, line 375, <span class="pl-k">in</span> solve
r <span class="pl-k">=</span> gufunc(a, b, signature=signature, extobj=extobj)
File <span class="pl-s"><span class="pl-pds">"</span>/usr/lib/python3/dist-packages/numpy/linalg/linalg.py<span class="pl-pds">"</span></span>, line 90, <span class="pl-k">in</span> _raise_linalgerror_singular
raise LinAlgError(<span class="pl-s"><span class="pl-pds">"</span>Singular matrix<span class="pl-pds">"</span></span>)
numpy.linalg.linalg.LinAlgError: Singular matrix</pre></div>
<p dir="auto">Alpine:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ docker run -it --rm alpine:3.8 /bin/sh
# apk --update add python3 py3-numpy
/ # python3
Python 3.6.6 (default, Aug 24 2018, 05:04:18)
[GCC 6.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.linalg.solve(numpy.array([[0]]), numpy.array([[0]]))
array([[nan]])"><pre class="notranslate"><code class="notranslate">$ docker run -it --rm alpine:3.8 /bin/sh
# apk --update add python3 py3-numpy
/ # python3
Python 3.6.6 (default, Aug 24 2018, 05:04:18)
[GCC 6.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.linalg.solve(numpy.array([[0]]), numpy.array([[0]]))
array([[nan]])
</code></pre></div>
<p dir="auto">I would expect to receive same exception on Alpine as well. Is this known issue?</p>
<p dir="auto">I've tried to use either lapack or openblas on alpine, compile numpy from source — it's still would return <code class="notranslate">nan</code>.</p> | 1 |
<p dir="auto"><code class="notranslate">runFromBundle</code> on FlutterView can be called only once. Some add-to-app use cases (such as letting <code class="notranslate">RecyclerView</code> manage the lifecycle of the <code class="notranslate">FlutterView</code>) requires us to be able to unload these bundles and load them up again. This also affects use cases where the app bundles are dynamically loaded from a URL. According to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sbaranov/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sbaranov">@sbaranov</a>, this is one the roadmap so I am creating a tracker issue here. Please dedupe as needed.</p> | <p dir="auto">It might already be in the plans. But I notice the Shrine we show in flutter_gallery is the only pre-Material-theming shrine.</p>
<p dir="auto">This is not at all urgent.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11857803/40324056-2d56b188-5cec-11e8-941d-b6e5df9e0cd2.png"><img src="https://user-images.githubusercontent.com/11857803/40324056-2d56b188-5cec-11e8-941d-b6e5df9e0cd2.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">FYI <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/willlarche/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/willlarche">@willlarche</a></p> | 0 |
<h3 dir="auto">Context</h3>
<p dir="auto">I have a neo4j dashboard (7474) behind a reverse proxy binded on https (443)</p>
<h3 dir="auto">What I get</h3>
<p dir="auto">When trying to access the dashboard from https I get redirected to http</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="curl -ILk 'https://neo4j-redirect-issue/' -H 'Accept: text/html'
HTTP/1.1 303 See Other
Location: https://neo4j-redirect-issue/browser
Content-Type: text/html
Access-Control-Allow-Origin: *
Server: Jetty(9.0.5.v20130815)
HTTP/1.1 302 Found
Location: http://neo4j-redirect-issue/browser/
Server: Jetty(9.0.5.v20130815)
curl: (7) Failed to connect to neo4j-redirect-issue port 80: Connection refused"><pre class="notranslate">curl -ILk <span class="pl-s"><span class="pl-pds">'</span>https://neo4j-redirect-issue/<span class="pl-pds">'</span></span> -H <span class="pl-s"><span class="pl-pds">'</span>Accept: text/html<span class="pl-pds">'</span></span>
HTTP/1.1 303 See Other
Location: https://neo4j-redirect-issue/browser
Content-Type: text/html
Access-Control-Allow-Origin: <span class="pl-k">*</span>
Server: Jetty(9.0.5.v20130815)
HTTP/1.1 302 Found
Location: http://neo4j-redirect-issue/browser/
Server: Jetty(9.0.5.v20130815)
curl: (7) Failed to connect to neo4j-redirect-issue port 80: Connection refused</pre></div>
<p dir="auto">Here we see the scheme is kept in the first 303 redirect, but lost in the next 302 (when adding the trailing slash).</p>
<h3 dir="auto">What I expect</h3>
<p dir="auto">I expect the scheme to be kept along all redirects so a call to <code class="notranslate">https://neo4j-redirect-issue/</code> end up to <code class="notranslate">https://neo4j-redirect-issue/browser/</code></p> | <p dir="auto">Webadmin interface doesn't use the <code class="notranslate">X-Forwarded-Host</code> and <code class="notranslate">X-Forwarded-Proto</code> headers to generate URLs. The URLs are correctly generated in the REST interface.</p>
<h3 dir="auto">With 1.9.4</h3>
<p dir="auto">A basic query</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -i -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474/db/data/
HTTP/1.1 200 OK
Content-Length: 876
Content-Type: application/json; charset=UTF-8
Access-Control-Allow-Origin: *
Server: Jetty(6.1.25)
{
"extensions" : {
"CypherPlugin" : {
"execute_query" : "https://external.foo.bar:1234/db/data/ext/CypherPlugin/graphdb/execute_query"
},
"GremlinPlugin" : {
"execute_script" : "https://external.foo.bar:1234/db/data/ext/GremlinPlugin/graphdb/execute_script"
}
},
"node" : "https://external.foo.bar:1234/db/data/node",
"reference_node" : "https://external.foo.bar:1234/db/data/node/0",
"node_index" : "https://external.foo.bar:1234/db/data/index/node",
"relationship_index" : "https://external.foo.bar:1234/db/data/index/relationship",
"extensions_info" : "https://external.foo.bar:1234/db/data/ext",
"relationship_types" : "https://external.foo.bar:1234/db/data/relationship/types",
"batch" : "https://external.foo.bar:1234/db/data/batch",
"cypher" : "https://external.foo.bar:1234/db/data/cypher",
"neo4j_version" : "1.9.4"
}"><pre class="notranslate"><code class="notranslate">$ curl -i -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474/db/data/
HTTP/1.1 200 OK
Content-Length: 876
Content-Type: application/json; charset=UTF-8
Access-Control-Allow-Origin: *
Server: Jetty(6.1.25)
{
"extensions" : {
"CypherPlugin" : {
"execute_query" : "https://external.foo.bar:1234/db/data/ext/CypherPlugin/graphdb/execute_query"
},
"GremlinPlugin" : {
"execute_script" : "https://external.foo.bar:1234/db/data/ext/GremlinPlugin/graphdb/execute_script"
}
},
"node" : "https://external.foo.bar:1234/db/data/node",
"reference_node" : "https://external.foo.bar:1234/db/data/node/0",
"node_index" : "https://external.foo.bar:1234/db/data/index/node",
"relationship_index" : "https://external.foo.bar:1234/db/data/index/relationship",
"extensions_info" : "https://external.foo.bar:1234/db/data/ext",
"relationship_types" : "https://external.foo.bar:1234/db/data/relationship/types",
"batch" : "https://external.foo.bar:1234/db/data/batch",
"cypher" : "https://external.foo.bar:1234/db/data/cypher",
"neo4j_version" : "1.9.4"
}
</code></pre></div>
<p dir="auto">A request simulating a browser</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -i -H 'Accept: text/html' -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474/db/data/
HTTP/1.1 200 OK
Content-Length: 1195
Content-Type: text/html; charset=UTF-8
Access-Control-Allow-Origin: *
Server: Jetty(6.1.25)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>Root</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href='http://resthtml.neo4j.org/style/rest.css' rel='stylesheet' type='text/css'>
<script type='text/javascript' src='/webadmin/htmlbrowse.js'></script>
</head>
<body onload='javascript:neo4jHtmlBrowse.start();' id='root'>
<div id='content'><div id='header'><h1><a title='Neo4j REST interface' href='/'><span>Neo4j REST interface</span></a></h1></div>
<div id='page-body'>
<table class="root"><caption>Root</caption>
<tr class='odd'><th>relationship_index</th><td><a href="https://external.foo.bar:1234/db/data/index/relationship">https://external.foo.bar:1234/db/data/index/relationship</a></td></tr>
<tr><th>node_index</th><td><a href="https://external.foo.bar:1234/db/data/index/node">https://external.foo.bar:1234/db/data/index/node</a></td></tr>
<tr class='odd'><th>reference_node</th><td><a href="https://external.foo.bar:1234/db/data/node/0" class="node">https://external.foo.bar:1234/db/data/node/0</a></td></tr>
</table>
<div class='break'>&nbsp;</div></div></div></body></html>"><pre class="notranslate"><code class="notranslate">$ curl -i -H 'Accept: text/html' -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474/db/data/
HTTP/1.1 200 OK
Content-Length: 1195
Content-Type: text/html; charset=UTF-8
Access-Control-Allow-Origin: *
Server: Jetty(6.1.25)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>Root</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href='http://resthtml.neo4j.org/style/rest.css' rel='stylesheet' type='text/css'>
<script type='text/javascript' src='/webadmin/htmlbrowse.js'></script>
</head>
<body onload='javascript:neo4jHtmlBrowse.start();' id='root'>
<div id='content'><div id='header'><h1><a title='Neo4j REST interface' href='/'><span>Neo4j REST interface</span></a></h1></div>
<div id='page-body'>
<table class="root"><caption>Root</caption>
<tr class='odd'><th>relationship_index</th><td><a href="https://external.foo.bar:1234/db/data/index/relationship">https://external.foo.bar:1234/db/data/index/relationship</a></td></tr>
<tr><th>node_index</th><td><a href="https://external.foo.bar:1234/db/data/index/node">https://external.foo.bar:1234/db/data/index/node</a></td></tr>
<tr class='odd'><th>reference_node</th><td><a href="https://external.foo.bar:1234/db/data/node/0" class="node">https://external.foo.bar:1234/db/data/node/0</a></td></tr>
</table>
<div class='break'>&nbsp;</div></div></div></body></html>
</code></pre></div>
<p dir="auto">In both cases, the URLs are <code class="notranslate">https://external.foo.bar:1234/...</code></p>
<p dir="auto">However, if we try to get the webadmin interface:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -i -H 'Accept: text/html' -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474
HTTP/1.1 303 See Other
Location: http://localhost:7474/webadmin
Content-Type: text/html
Access-Control-Allow-Origin: *
Content-Length: 0
Server: Jetty(6.1.25)
$ curl -i -H 'Accept: text/html' -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474/webadmin
HTTP/1.1 302 Found
Location: http://localhost:7474/webadmin/
Content-Length: 0
Server: Jetty(6.1.25)"><pre class="notranslate"><code class="notranslate">$ curl -i -H 'Accept: text/html' -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474
HTTP/1.1 303 See Other
Location: http://localhost:7474/webadmin
Content-Type: text/html
Access-Control-Allow-Origin: *
Content-Length: 0
Server: Jetty(6.1.25)
$ curl -i -H 'Accept: text/html' -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474/webadmin
HTTP/1.1 302 Found
Location: http://localhost:7474/webadmin/
Content-Length: 0
Server: Jetty(6.1.25)
</code></pre></div>
<p dir="auto">In both cases, the generated URL is <code class="notranslate">http://localhost:7474/</code></p>
<h3 dir="auto">With 2.0.0-M06</h3>
<p dir="auto">The same behaviour is found in 2.0.0-M06</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -i -H 'Accept: text/html' -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474/
HTTP/1.1 303 See Other
Location: http://localhost:7474/browser
Content-Type: text/html
Access-Control-Allow-Origin: *
Content-Length: 0
Server: Jetty(9.0.5.v20130815)
$ curl -i -H 'Accept: text/html' -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474/db/data/
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Access-Control-Allow-Origin: *
Content-Length: 1195
Server: Jetty(9.0.5.v20130815)
[...] <a href="https://external.foo.bar:1234/db/data/node/0" class="node">https://external.foo.bar:1234/db/data/node/0</a></td></tr>
</table>"><pre class="notranslate"><code class="notranslate">$ curl -i -H 'Accept: text/html' -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474/
HTTP/1.1 303 See Other
Location: http://localhost:7474/browser
Content-Type: text/html
Access-Control-Allow-Origin: *
Content-Length: 0
Server: Jetty(9.0.5.v20130815)
$ curl -i -H 'Accept: text/html' -H 'X-Forwarded-Host: external.foo.bar:1234' -H 'X-Forwarded-Proto: https' localhost:7474/db/data/
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Access-Control-Allow-Origin: *
Content-Length: 1195
Server: Jetty(9.0.5.v20130815)
[...] <a href="https://external.foo.bar:1234/db/data/node/0" class="node">https://external.foo.bar:1234/db/data/node/0</a></td></tr>
</table>
</code></pre></div> | 1 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.32]</li>
<li>Operating System: [Windows 11]</li>
<li>Browser: [WebKit]</li>
<li>Other info:</li>
</ul>
<p dir="auto">i set userAgent in browsercontext using launchPersistentContext as<br>
<code class="notranslate">Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1</code></p>
<p dir="auto">but when checking in webkits console its showing as<br>
<code class="notranslate">Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/605.1.15 (KHTML, like Gecko)</code></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/108714133/234859842-f9e9a570-71a0-4a17-bfda-546e79533228.png"><img src="https://user-images.githubusercontent.com/108714133/234859842-f9e9a570-71a0-4a17-bfda-546e79533228.png" alt="image" style="max-width: 100%;"></a></p> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.32.2]</li>
<li>Operating System: [macOS 13.3]</li>
<li>Browser: [WebKit]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<p dir="auto"><strong>main.js file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { webkit } = require('playwright');
const test = async () => {
const context = await webkit.launchPersistentContext('path_for_user_dir', {headless: false});
const page = await context.newPage();
await page.goto('https://www.abc.com');
}
test();"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> webkit <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'playwright'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-en">test</span> <span class="pl-c1">=</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">context</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">webkit</span><span class="pl-kos">.</span><span class="pl-en">launchPersistentContext</span><span class="pl-kos">(</span><span class="pl-s">'path_for_user_dir'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">headless</span>: <span class="pl-c1">false</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">'https://www.abc.com'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>package.json</strong></p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"name": "testcafe",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"start": "node main.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"testcafe": "^2.0.0"
},
"devDependencies": {
"@playwright/test": "^1.32.2",
"playwright": "^1.32.2"
}
}"><pre class="notranslate">{
<span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>testcafe<span class="pl-pds">"</span></span>,
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.0.0<span class="pl-pds">"</span></span>,
<span class="pl-ent">"description"</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>,
<span class="pl-ent">"main"</span>: <span class="pl-s"><span class="pl-pds">"</span>main.js<span class="pl-pds">"</span></span>,
<span class="pl-ent">"scripts"</span>: {
<span class="pl-ent">"start"</span>: <span class="pl-s"><span class="pl-pds">"</span>node main.js<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"keywords"</span>: [],
<span class="pl-ent">"author"</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>,
<span class="pl-ent">"license"</span>: <span class="pl-s"><span class="pl-pds">"</span>ISC<span class="pl-pds">"</span></span>,
<span class="pl-ent">"dependencies"</span>: {
<span class="pl-ent">"testcafe"</span>: <span class="pl-s"><span class="pl-pds">"</span>^2.0.0<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"devDependencies"</span>: {
<span class="pl-ent">"@playwright/test"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.32.2<span class="pl-pds">"</span></span>,
<span class="pl-ent">"playwright"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.32.2<span class="pl-pds">"</span></span>
}
}</pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>npm start</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">It should open webkit browser with latest version (saw in doc and npm package link that it supports 16.4).</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">When I use launchPersistentContext method it opens old webkit browser 13.x.x (checked in user agent of browesr and other online sites) and when I use launch method it opens up in new version of webkit which is 16.4.</p>
<p dir="auto">I don't know if I'm missing something.</p> | 1 |
<p dir="auto">Regarding the <code class="notranslate">spider_idle</code> signal, <a href="https://doc.scrapy.org/en/latest/topics/signals.html#spider-idle" rel="nofollow">the doc says</a>:</p>
<blockquote>
<p dir="auto">If the idle state persists after all handlers of this signal have finished, the engine starts closing the spider. After the spider has finished closing, the spider_closed signal is sent.</p>
<p dir="auto">You can, for example, schedule some requests in your <code class="notranslate">spider_idle</code> handler to prevent the spider from being closed.</p>
</blockquote>
<p dir="auto">However, the spider may still close even when it has scheduled some requests within a <code class="notranslate">spider_idle</code> handler, if all such requests are filtered due to duplication.<br>
In this case, the engine would still have <code class="notranslate">self.spider_is_idle(spider)</code> evaluated to <code class="notranslate">True</code> after finishing all <code class="notranslate">spider_idle</code> handlers.<br>
<a href="https://github.com/scrapy/scrapy/blob/05ce1296c6a60f23e81af7ec38ac1855e78be79f/scrapy/core/engine.py#L284">Related code in <code class="notranslate">scrapy/core/engine.py</code></a></p>
<p dir="auto">Below is an example illustrating this issue. In this example, one may expect the spider to send three requests, but with the current version of Scrapy (<code class="notranslate">05ce1296</code>) there'll be only one request.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# coding: utf8
import scrapy
import scrapy.signals
class TestSpider(scrapy.Spider):
name = 'test'
urls = None
def start_requests(self):
self.urls = [
'http://httpbin.org/get?foo=bar',
'http://httpbin.org/get?bar=baz',
'http://httpbin.org/get?baz=foo',
'http://httpbin.org/get?baz=foo',
]
self.crawler.signals.connect(self.on_idle, scrapy.signals.spider_idle)
return []
def on_idle(self, spider):
if self.urls:
url = self.urls.pop()
self.crawler.engine.crawl(scrapy.Request(url), self)
def parse(self, response):
pass"><pre class="notranslate"><span class="pl-c"># coding: utf8</span>
<span class="pl-k">import</span> <span class="pl-s1">scrapy</span>
<span class="pl-k">import</span> <span class="pl-s1">scrapy</span>.<span class="pl-s1">signals</span>
<span class="pl-k">class</span> <span class="pl-v">TestSpider</span>(<span class="pl-s1">scrapy</span>.<span class="pl-v">Spider</span>):
<span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s">'test'</span>
<span class="pl-s1">urls</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span>
<span class="pl-k">def</span> <span class="pl-en">start_requests</span>(<span class="pl-s1">self</span>):
<span class="pl-s1">self</span>.<span class="pl-s1">urls</span> <span class="pl-c1">=</span> [
<span class="pl-s">'http://httpbin.org/get?foo=bar'</span>,
<span class="pl-s">'http://httpbin.org/get?bar=baz'</span>,
<span class="pl-s">'http://httpbin.org/get?baz=foo'</span>,
<span class="pl-s">'http://httpbin.org/get?baz=foo'</span>,
]
<span class="pl-s1">self</span>.<span class="pl-s1">crawler</span>.<span class="pl-s1">signals</span>.<span class="pl-en">connect</span>(<span class="pl-s1">self</span>.<span class="pl-s1">on_idle</span>, <span class="pl-s1">scrapy</span>.<span class="pl-s1">signals</span>.<span class="pl-s1">spider_idle</span>)
<span class="pl-k">return</span> []
<span class="pl-k">def</span> <span class="pl-en">on_idle</span>(<span class="pl-s1">self</span>, <span class="pl-s1">spider</span>):
<span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">urls</span>:
<span class="pl-s1">url</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">urls</span>.<span class="pl-en">pop</span>()
<span class="pl-s1">self</span>.<span class="pl-s1">crawler</span>.<span class="pl-s1">engine</span>.<span class="pl-en">crawl</span>(<span class="pl-s1">scrapy</span>.<span class="pl-v">Request</span>(<span class="pl-s1">url</span>), <span class="pl-s1">self</span>)
<span class="pl-k">def</span> <span class="pl-en">parse</span>(<span class="pl-s1">self</span>, <span class="pl-s1">response</span>):
<span class="pl-k">pass</span></pre></div>
<p dir="auto">(Save it to <code class="notranslate">a.py</code> and use <code class="notranslate">scrapy runspider a.py</code> to test.)</p>
<p dir="auto">My suggestion is to have <code class="notranslate">ExecutionEngine._spider_idle</code> updated to make sure the spider does not get closed, as long as there's any request scheduled within a <code class="notranslate">spider_idle</code> handler.</p> | <p dir="auto">It seems to be <a href="https://github.com/scrapy/scrapy/pull/5611" data-hovercard-type="pull_request" data-hovercard-url="/scrapy/scrapy/pull/5611/hovercard">failing</a> in CI environment excepts where dependency versions are pinned. I suspect it may be because of the latest w3lib release.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_____________ CrawlSpiderTest.test_process_request_instance_method _____________
self = <tests.test_spider.CrawlSpiderTest testMethod=test_process_request_instance_method>
def test_process_request_instance_method(self):
response = HtmlResponse("http://example.org/somepage/index.html", body=self.test_body)
class _CrawlSpider(self.spider_class):
name = "test"
allowed_domains = ['example.org']
rules = (
Rule(LinkExtractor(), process_request='process_request_upper'),
)
def process_request_upper(self, request, response):
return request.replace(url=request.url.upper())
spider = _CrawlSpider()
output = list(spider._requests_to_follow(response))
self.assertEqual(len(output), 3)
self.assertTrue(all(map(lambda r: isinstance(r, Request), output)))
> self.assertEqual([r.url for r in output],
['http://example.org/SOMEPAGE/ITEM/12.HTML',
'http://example.org/ABOUT.HTML',
'http://example.org/NOFOLLOW.HTML'])
/home/runner/work/scrapy/scrapy/tests/test_spider.py:363:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/scrapy/scrapy/.tox/py/lib/python3.8/site-packages/twisted/trial/_synctest.py:422: in assertEqual
super().assertEqual(first, second, msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.test_spider.CrawlSpiderTest testMethod=test_process_request_instance_method>
msg = "Lists differ: ['http://example.org/SOMEPAGE/ITEM/12.HTML', 'http[58 chars]TML'] != ['http://example.org/SOMEPAGE/ITEM...,\n- 'http://example.org/NOFOLLOW.HTML']\n+ 'http://example.org/ABOUT.HTML',\n+ 'http://example.org/NOFOLLOW.HTML']"
def fail(self, msg=None):
"""
Absolutely fail the test. Do not pass go, do not collect $200.
@param msg: the message that will be displayed as the reason for the
failure
"""
> raise self.failureException(msg)
E twisted.trial.unittest.FailTest: Lists differ: ['http://example.org/SOMEPAGE/ITEM/12.HTML', 'http[58 chars]TML'] != ['http://example.org/SOMEPAGE/ITEM/12.HTML', 'http[58 chars]TML']
E
E First differing element 0:
E 'http://example.org/SOMEPAGE/ITEM/12.HTML'
E 'http://example.org/SOMEPAGE/ITEM/12.HTML'
E
E - ['http://example.org/SOMEPAGE/ITEM/12.HTML',
E ? ^^^^^^^ ^^^
E
E + ['http://example.org/SOMEPAGE/ITEM/12.HTML',
E ? ^^^^^^^ ^^^
E
E - 'http://example.org/ABOUT.HTML',
E - 'http://example.org/NOFOLLOW.HTML']
E + 'http://example.org/ABOUT.HTML',
E + 'http://example.org/NOFOLLOW.HTML']"><pre class="notranslate"><code class="notranslate">_____________ CrawlSpiderTest.test_process_request_instance_method _____________
self = <tests.test_spider.CrawlSpiderTest testMethod=test_process_request_instance_method>
def test_process_request_instance_method(self):
response = HtmlResponse("http://example.org/somepage/index.html", body=self.test_body)
class _CrawlSpider(self.spider_class):
name = "test"
allowed_domains = ['example.org']
rules = (
Rule(LinkExtractor(), process_request='process_request_upper'),
)
def process_request_upper(self, request, response):
return request.replace(url=request.url.upper())
spider = _CrawlSpider()
output = list(spider._requests_to_follow(response))
self.assertEqual(len(output), 3)
self.assertTrue(all(map(lambda r: isinstance(r, Request), output)))
> self.assertEqual([r.url for r in output],
['http://example.org/SOMEPAGE/ITEM/12.HTML',
'http://example.org/ABOUT.HTML',
'http://example.org/NOFOLLOW.HTML'])
/home/runner/work/scrapy/scrapy/tests/test_spider.py:363:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/scrapy/scrapy/.tox/py/lib/python3.8/site-packages/twisted/trial/_synctest.py:422: in assertEqual
super().assertEqual(first, second, msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.test_spider.CrawlSpiderTest testMethod=test_process_request_instance_method>
msg = "Lists differ: ['http://example.org/SOMEPAGE/ITEM/12.HTML', 'http[58 chars]TML'] != ['http://example.org/SOMEPAGE/ITEM...,\n- 'http://example.org/NOFOLLOW.HTML']\n+ 'http://example.org/ABOUT.HTML',\n+ 'http://example.org/NOFOLLOW.HTML']"
def fail(self, msg=None):
"""
Absolutely fail the test. Do not pass go, do not collect $200.
@param msg: the message that will be displayed as the reason for the
failure
"""
> raise self.failureException(msg)
E twisted.trial.unittest.FailTest: Lists differ: ['http://example.org/SOMEPAGE/ITEM/12.HTML', 'http[58 chars]TML'] != ['http://example.org/SOMEPAGE/ITEM/12.HTML', 'http[58 chars]TML']
E
E First differing element 0:
E 'http://example.org/SOMEPAGE/ITEM/12.HTML'
E 'http://example.org/SOMEPAGE/ITEM/12.HTML'
E
E - ['http://example.org/SOMEPAGE/ITEM/12.HTML',
E ? ^^^^^^^ ^^^
E
E + ['http://example.org/SOMEPAGE/ITEM/12.HTML',
E ? ^^^^^^^ ^^^
E
E - 'http://example.org/ABOUT.HTML',
E - 'http://example.org/NOFOLLOW.HTML']
E + 'http://example.org/ABOUT.HTML',
E + 'http://example.org/NOFOLLOW.HTML']
</code></pre></div>
<p dir="auto">There is a second issue about IPv6 resolving, but I wonder if it could also be related to w3lib:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="___________ CrawlerProcessSubprocess.test_ipv6_default_name_resolver ___________
self = <tests.test_crawler.CrawlerProcessSubprocess testMethod=test_ipv6_default_name_resolver>
def test_ipv6_default_name_resolver(self):
log = self.run_script('default_name_resolver.py')
self.assertIn('Spider closed (finished)', log)
> self.assertIn("'downloader/exception_type_count/twisted.internet.error.DNSLookupError': 1,", log)
/home/runner/work/scrapy/scrapy/tests/test_crawler.py:384:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.test_crawler.CrawlerProcessSubprocess testMethod=test_ipv6_default_name_resolver>
containee = "'downloader/exception_type_count/twisted.internet.error.DNSLookupError': 1,"
container = '/home/runner/work/scrapy/scrapy/.tox/py/lib/python3.8/site-packages/coverage/inorout.py:472: CoverageWarning: --inclu...me.datetime(2022, 8, 28, 16, 9, 4, 748022)}\n2022-08-28 16:09:04 [scrapy.core.engine] INFO: Spider closed (finished)\n'
msg = None
def assertIn(self, containee, container, msg=None):
"""
Fail the test if C{containee} is not found in C{container}.
@param containee: the value that should be in C{container}
@param container: a sequence type, or in the case of a mapping type,
will follow semantics of 'if key in dict.keys()'
@param msg: if msg is None, then the failure message will be
'%r not in %r' % (first, second)
"""
if containee not in container:
> raise self.failureException(msg or f"{containee!r} not in {container!r}")
E twisted.trial.unittest.FailTest: "'downloader/exception_type_count/twisted.internet.error.DNSLookupError': 1," not in '/home/runner/work/scrapy/scrapy/.tox/py/lib/python3.8/site-packages/coverage/inorout.py:472: CoverageWarning: --include is ignored because --source is set (include-ignored)\n self.warn("--include is ignored because --source is set", slug="include-ignored")\n2022-08-28 16:09:04 [scrapy.utils.log] INFO: Scrapy 2.6.2 started (bot: scrapybot)\n2022-08-28 16:09:04 [scrapy.utils.log] INFO: Versions: lxml 4.9.1.0, libxml2 2.9.14, cssselect 1.1.0, parsel 1.6.0, w3lib 2.0.1, Twisted 22.4.0, Python 3.8.13 (default, Jul 22 2022, 10:42:37) - [GCC 7.5.0], pyOpenSSL 20.0.1 (OpenSSL 1.1.1l 24 Aug 2021), cryptography 3.4.8, Platform Linux-5.4.0-1086-azure-x86_64-with-glibc2.2.5\n2022-08-28 16:09:04 [scrapy.crawler] INFO: Overridden settings:\n{\'RETRY_ENABLED\': False}\n2022-08-28 16:09:04 [py.warnings] WARNING: /home/runner/work/scrapy/scrapy/scrapy/utils/request.py:[231](https://github.com/scrapy/scrapy/runs/8058868863?check_suite_focus=true#step:5:232): ScrapyDeprecationWarning: \'PREVIOUS_VERSION\' is a deprecated value for the \'REQUEST_FINGERPRINTER_IMPLEMENTATION\' setting.\n\nIt is also the default value. In other words, it is normal to get this warning if you have not defined a value for the \'REQUEST_FINGERPRINTER_IMPLEMENTATION\' setting. This is so for backward compatibility reasons, but it will change in a future version of Scrapy.\n\nSee the documentation of the \'REQUEST_FINGERPRINTER_IMPLEMENTATION\' setting for information on how to handle this deprecation.\n return cls(crawler)\n\n2022-08-28 16:09:04 [scrapy.utils.log] DEBUG: Using reactor: twisted.internet.epollreactor.EPollReactor\n2022-08-28 16:09:04 [scrapy.extensions.telnet] INFO: Telnet Password: 753efe10088dde0a\n2022-08-28 16:09:04 [scrapy.middleware] INFO: Enabled extensions:\n[\'scrapy.extensions.corestats.CoreStats\',\n \'scrapy.extensions.telnet.TelnetConsole\',\n \'scrapy.extensions.memusage.MemoryUsage\',\n \'scrapy.extensions.logstats.LogStats\']\n2022-08-28 16:09:04 [scrapy.middleware] INFO: Enabled downloader middlewares:\n[\'scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware\',\n \'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware\',\n \'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware\',\n \'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware\',\n \'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware\',\n \'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware\',\n \'scrapy.downloadermiddlewares.redirect.RedirectMiddleware\',\n \'scrapy.downloadermiddlewares.cookies.CookiesMiddleware\',\n \'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware\',\n \'scrapy.downloadermiddlewares.stats.DownloaderStats\']\n2022-08-28 16:09:04 [scrapy.middleware] INFO: Enabled spider middlewares:\n[\'scrapy.spidermiddlewares.httperror.HttpErrorMiddleware\',\n \'scrapy.spidermiddlewares.offsite.OffsiteMiddleware\',\n \'scrapy.spidermiddlewares.referer.RefererMiddleware\',\n \'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware\',\n \'scrapy.spidermiddlewares.depth.DepthMiddleware\']\n2022-08-28 16:09:04 [scrapy.middleware] INFO: Enabled item pipelines:\n[]\n2022-08-28 16:09:04 [scrapy.core.engine] INFO: Spider opened\n2022-08-28 16:09:04 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)\n2022-08-28 16:09:04 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6023\n2022-08-28 16:09:04 [scrapy.core.scraper] ERROR: Error downloading <GET http://::1>\nTraceback (most recent call last):\n File "/home/runner/work/scrapy/scrapy/scrapy/core/downloader/middleware.py", line 49, in process_request\n return (yield download_func(request=request, spider=spider))\nValueError: invalid hostname: :\n2022-08-28 16:09:04 [scrapy.core.engine] INFO: Closing spider (finished)\n2022-08-28 16:09:04 [scrapy.statscollectors] INFO: Dumping Scrapy stats:\n{\'downloader/exception_count\': 1,\n \'downloader/exception_type_count/builtins.ValueError\': 1,\n \'downloader/request_bytes\': 210,\n \'downloader/request_count\': 1,\n \'downloader/request_method_count/GET\': 1,\n \'elapsed_time_seconds\': 0.208906,\n \'finish_reason\': \'finished\',\n \'finish_time\': datetime.datetime(2022, 8, 28, 16, 9, 4, 956928),\n \'log_count/DEBUG\': 1,\n \'log_count/ERROR\': 1,\n \'log_count/INFO\': 10,\n \'log_count/WARNING\': 1,\n \'memusage/max\': 144793600,\n \'memusage/startup\': 144793600,\n \'scheduler/dequeued\': 1,\n \'scheduler/dequeued/memory\': 1,\n \'scheduler/enqueued\': 1,\n \'scheduler/enqueued/memory\': 1,\n \'start_time\': datetime.datetime(2022, 8, 28, 16, 9, 4, 748022)}\n2022-08-28 16:09:04 [scrapy.core.engine] INFO: Spider closed (finished)\n'"><pre class="notranslate"><code class="notranslate">___________ CrawlerProcessSubprocess.test_ipv6_default_name_resolver ___________
self = <tests.test_crawler.CrawlerProcessSubprocess testMethod=test_ipv6_default_name_resolver>
def test_ipv6_default_name_resolver(self):
log = self.run_script('default_name_resolver.py')
self.assertIn('Spider closed (finished)', log)
> self.assertIn("'downloader/exception_type_count/twisted.internet.error.DNSLookupError': 1,", log)
/home/runner/work/scrapy/scrapy/tests/test_crawler.py:384:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.test_crawler.CrawlerProcessSubprocess testMethod=test_ipv6_default_name_resolver>
containee = "'downloader/exception_type_count/twisted.internet.error.DNSLookupError': 1,"
container = '/home/runner/work/scrapy/scrapy/.tox/py/lib/python3.8/site-packages/coverage/inorout.py:472: CoverageWarning: --inclu...me.datetime(2022, 8, 28, 16, 9, 4, 748022)}\n2022-08-28 16:09:04 [scrapy.core.engine] INFO: Spider closed (finished)\n'
msg = None
def assertIn(self, containee, container, msg=None):
"""
Fail the test if C{containee} is not found in C{container}.
@param containee: the value that should be in C{container}
@param container: a sequence type, or in the case of a mapping type,
will follow semantics of 'if key in dict.keys()'
@param msg: if msg is None, then the failure message will be
'%r not in %r' % (first, second)
"""
if containee not in container:
> raise self.failureException(msg or f"{containee!r} not in {container!r}")
E twisted.trial.unittest.FailTest: "'downloader/exception_type_count/twisted.internet.error.DNSLookupError': 1," not in '/home/runner/work/scrapy/scrapy/.tox/py/lib/python3.8/site-packages/coverage/inorout.py:472: CoverageWarning: --include is ignored because --source is set (include-ignored)\n self.warn("--include is ignored because --source is set", slug="include-ignored")\n2022-08-28 16:09:04 [scrapy.utils.log] INFO: Scrapy 2.6.2 started (bot: scrapybot)\n2022-08-28 16:09:04 [scrapy.utils.log] INFO: Versions: lxml 4.9.1.0, libxml2 2.9.14, cssselect 1.1.0, parsel 1.6.0, w3lib 2.0.1, Twisted 22.4.0, Python 3.8.13 (default, Jul 22 2022, 10:42:37) - [GCC 7.5.0], pyOpenSSL 20.0.1 (OpenSSL 1.1.1l 24 Aug 2021), cryptography 3.4.8, Platform Linux-5.4.0-1086-azure-x86_64-with-glibc2.2.5\n2022-08-28 16:09:04 [scrapy.crawler] INFO: Overridden settings:\n{\'RETRY_ENABLED\': False}\n2022-08-28 16:09:04 [py.warnings] WARNING: /home/runner/work/scrapy/scrapy/scrapy/utils/request.py:[231](https://github.com/scrapy/scrapy/runs/8058868863?check_suite_focus=true#step:5:232): ScrapyDeprecationWarning: \'PREVIOUS_VERSION\' is a deprecated value for the \'REQUEST_FINGERPRINTER_IMPLEMENTATION\' setting.\n\nIt is also the default value. In other words, it is normal to get this warning if you have not defined a value for the \'REQUEST_FINGERPRINTER_IMPLEMENTATION\' setting. This is so for backward compatibility reasons, but it will change in a future version of Scrapy.\n\nSee the documentation of the \'REQUEST_FINGERPRINTER_IMPLEMENTATION\' setting for information on how to handle this deprecation.\n return cls(crawler)\n\n2022-08-28 16:09:04 [scrapy.utils.log] DEBUG: Using reactor: twisted.internet.epollreactor.EPollReactor\n2022-08-28 16:09:04 [scrapy.extensions.telnet] INFO: Telnet Password: 753efe10088dde0a\n2022-08-28 16:09:04 [scrapy.middleware] INFO: Enabled extensions:\n[\'scrapy.extensions.corestats.CoreStats\',\n \'scrapy.extensions.telnet.TelnetConsole\',\n \'scrapy.extensions.memusage.MemoryUsage\',\n \'scrapy.extensions.logstats.LogStats\']\n2022-08-28 16:09:04 [scrapy.middleware] INFO: Enabled downloader middlewares:\n[\'scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware\',\n \'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware\',\n \'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware\',\n \'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware\',\n \'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware\',\n \'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware\',\n \'scrapy.downloadermiddlewares.redirect.RedirectMiddleware\',\n \'scrapy.downloadermiddlewares.cookies.CookiesMiddleware\',\n \'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware\',\n \'scrapy.downloadermiddlewares.stats.DownloaderStats\']\n2022-08-28 16:09:04 [scrapy.middleware] INFO: Enabled spider middlewares:\n[\'scrapy.spidermiddlewares.httperror.HttpErrorMiddleware\',\n \'scrapy.spidermiddlewares.offsite.OffsiteMiddleware\',\n \'scrapy.spidermiddlewares.referer.RefererMiddleware\',\n \'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware\',\n \'scrapy.spidermiddlewares.depth.DepthMiddleware\']\n2022-08-28 16:09:04 [scrapy.middleware] INFO: Enabled item pipelines:\n[]\n2022-08-28 16:09:04 [scrapy.core.engine] INFO: Spider opened\n2022-08-28 16:09:04 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)\n2022-08-28 16:09:04 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6023\n2022-08-28 16:09:04 [scrapy.core.scraper] ERROR: Error downloading <GET http://::1>\nTraceback (most recent call last):\n File "/home/runner/work/scrapy/scrapy/scrapy/core/downloader/middleware.py", line 49, in process_request\n return (yield download_func(request=request, spider=spider))\nValueError: invalid hostname: :\n2022-08-28 16:09:04 [scrapy.core.engine] INFO: Closing spider (finished)\n2022-08-28 16:09:04 [scrapy.statscollectors] INFO: Dumping Scrapy stats:\n{\'downloader/exception_count\': 1,\n \'downloader/exception_type_count/builtins.ValueError\': 1,\n \'downloader/request_bytes\': 210,\n \'downloader/request_count\': 1,\n \'downloader/request_method_count/GET\': 1,\n \'elapsed_time_seconds\': 0.208906,\n \'finish_reason\': \'finished\',\n \'finish_time\': datetime.datetime(2022, 8, 28, 16, 9, 4, 956928),\n \'log_count/DEBUG\': 1,\n \'log_count/ERROR\': 1,\n \'log_count/INFO\': 10,\n \'log_count/WARNING\': 1,\n \'memusage/max\': 144793600,\n \'memusage/startup\': 144793600,\n \'scheduler/dequeued\': 1,\n \'scheduler/dequeued/memory\': 1,\n \'scheduler/enqueued\': 1,\n \'scheduler/enqueued/memory\': 1,\n \'start_time\': datetime.datetime(2022, 8, 28, 16, 9, 4, 748022)}\n2022-08-28 16:09:04 [scrapy.core.engine] INFO: Spider closed (finished)\n'
</code></pre></div> | 0 |
<p dir="auto">pytorch 1.0<br>
DOC err:torch.nn.CrossEntropyLoss<br>
if weight=NONE<br>
loss(x,class)=−x[class]+log(j∑exp(x[j])) ,The result is correct.</p>
<p dir="auto">if weight!=NONE<br>
loss(x,class)=weight[class]*(−x[class]+log(j∑exp(x[j]))) ,The result is wrong?</p>
<hr>
<h2 dir="auto">import torch<br>
import torch.nn.functional as F<br>
a=[[-5.,-6.],[3.,2.],[3.,2.]]<br>
c=[1,0,1]<br>
b=[3.,2.]<br>
input=torch.tensor(a,requires_grad=True)<br>
target = torch.tensor(c)<br>
weight = torch.tensor(b)<br>
output = F.cross_entropy(input,target,weight,reduce=True,size_average=True)<br>
z=output.sum()<br>
z.backward()<br>
print(output,input.grad)</h2>
<p dir="auto">tensor(0.8847, grad_fn=) tensor([[ 0.2089, -0.2089],<br>
[-0.1153, 0.1153],<br>
[ 0.2089, -0.2089]])</p> | <p dir="auto">Hi,</p>
<p dir="auto">there is something strange in the <code class="notranslate">backward</code> step (or maybe something I don't understand). If I define a Module that takes 3 inputs, the <code class="notranslate">grad_input</code> has to be of size 3, right ? But this is not the case here (from the backward_hook point of view):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
def bh(m,go,gi):
print("Grad Input")
print(go)
print("Grad Output")
print(gi)
class M(nn.Module):
def __init__(self):
super(M,self).__init__()
self.register_backward_hook(bh)
def forward(self,x,y,z):
return (x+y+z)
x=Variable(torch.randn(1,5),requires_grad=True)
y=Variable(torch.randn(1,5),requires_grad=True)
z=Variable(torch.randn(1,5),requires_grad=True)
criterion=nn.MSELoss()
mod=M()
out=mod(x,y,z)
loss=criterion(out,Variable(torch.randn(1,5)))
loss.backward()```
In that case, when I print grad_input throught the hook function, it is just composed of two elements... Could you tell me where am I wrong ? But `x.grad, y.grad and z.grad` seem correctly computed
cc @ezyang @gchanan @zou3519 @SsnL @albanD @gqchen"><pre lang="import" class="notranslate"><code class="notranslate">from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
def bh(m,go,gi):
print("Grad Input")
print(go)
print("Grad Output")
print(gi)
class M(nn.Module):
def __init__(self):
super(M,self).__init__()
self.register_backward_hook(bh)
def forward(self,x,y,z):
return (x+y+z)
x=Variable(torch.randn(1,5),requires_grad=True)
y=Variable(torch.randn(1,5),requires_grad=True)
z=Variable(torch.randn(1,5),requires_grad=True)
criterion=nn.MSELoss()
mod=M()
out=mod(x,y,z)
loss=criterion(out,Variable(torch.randn(1,5)))
loss.backward()```
In that case, when I print grad_input throught the hook function, it is just composed of two elements... Could you tell me where am I wrong ? But `x.grad, y.grad and z.grad` seem correctly computed
cc @ezyang @gchanan @zou3519 @SsnL @albanD @gqchen
</code></pre></div> | 0 |
<p dir="auto">I have npm scripts for all my build tasks. How do I run these from Code? To be honest it's not a major problem switching to a console but it would be nice to run from within code.</p>
<p dir="auto">I would have thought this was a candidate for standard behaviour shipped with code?</p>
<p dir="auto">I looked at creating tasks and the output processor but got quite lost. For example there seems to be only one task allowed.</p> | <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3857604/13547555/f566763e-e2e8-11e5-92a3-ac69cad667fa.png"><img src="https://cloud.githubusercontent.com/assets/3857604/13547555/f566763e-e2e8-11e5-92a3-ac69cad667fa.png" alt="image" style="max-width: 100%;"></a></p> | 0 |
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">The parameter <code class="notranslate">linewidth</code> from the <code class="notranslate">LineBasicMaterial</code> <a href="https://threejs.org/docs/index.html#api/en/materials/LineBasicMaterial" rel="nofollow">class</a> is ignored. The expected outcome is to set the width of a line with this parameter.</p>
<p dir="auto">Code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="container = document.createElement('div');
document.body.appendChild(container);
camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 10000);
camera.position.set(0, 0, 150);
scene = new THREE.Scene();
scene.add(camera);
renderer = new THREE.WebGLRenderer({
clearAlpha: 1
});
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setClearColor(0xcaffee, 1);
document.body.appendChild(renderer.domElement);
var material = new THREE.LineBasicMaterial( { color: 0xff0000, linewidth: 10000000 } );
var points = [];
points.push( new THREE.Vector3(-50, 0, 0 ) );
points.push( new THREE.Vector3( 50, 0, 0 ) );
var geometry = new THREE.BufferGeometry().setFromPoints( points );
var line = new THREE.Line( geometry, material );
scene.add( line );
renderer.render( scene, camera );
animate();
function animate() {
requestAnimationFrame(animate);
renderer.render(scene, camera);
}"><pre class="notranslate"><code class="notranslate">container = document.createElement('div');
document.body.appendChild(container);
camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 10000);
camera.position.set(0, 0, 150);
scene = new THREE.Scene();
scene.add(camera);
renderer = new THREE.WebGLRenderer({
clearAlpha: 1
});
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setClearColor(0xcaffee, 1);
document.body.appendChild(renderer.domElement);
var material = new THREE.LineBasicMaterial( { color: 0xff0000, linewidth: 10000000 } );
var points = [];
points.push( new THREE.Vector3(-50, 0, 0 ) );
points.push( new THREE.Vector3( 50, 0, 0 ) );
var geometry = new THREE.BufferGeometry().setFromPoints( points );
var line = new THREE.Line( geometry, material );
scene.add( line );
renderer.render( scene, camera );
animate();
function animate() {
requestAnimationFrame(animate);
renderer.render(scene, camera);
}
</code></pre></div>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r119</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> macOS 10.14.6</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> | <h5 dir="auto">Description of the problem</h5>
<p dir="auto"><code class="notranslate">LineBasicMaterial</code> no work in Chrome. Works great in Firefox. Worked in in Chrome 54 until we updated to latest release. We get the lines, they have no width. I know this has been reported a million times in regard to Windows but I'm on Mac OS 10.11.6.</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r82</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Mac</li>
</ul>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5>
<p dir="auto">NVIDIA GeForce GT 750M</p> | 1 |
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pd.Series(range(10))"><pre class="notranslate"><span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-en">range</span>(<span class="pl-c1">10</span>))</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">There is a option <code class="notranslate">display.show_dimensions</code> which allow show the dimension of a <code class="notranslate">DataFrame</code>, while it would be useful if the length of a <code class="notranslate">Series</code> can be set to show when the index is not a range list.</p>
<h4 dir="auto">Expected Output</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
dtype: int64
[10 elements/items/or something else...]"><pre class="notranslate"><code class="notranslate">0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
dtype: int64
[10 elements/items/or something else...]
</code></pre></div>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.1.final.0
python-bits: 64
OS: Darwin
OS-release: 16.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
<p dir="auto">pandas: 0.19.2<br>
nose: 1.3.7<br>
pip: 9.0.1<br>
setuptools: 34.3.3<br>
Cython: 0.25.2<br>
numpy: 1.12.1<br>
scipy: 0.19.0<br>
statsmodels: 0.8.0<br>
xarray: 0.9.1<br>
IPython: 5.3.0<br>
sphinx: 1.5.3<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2016.10<br>
blosc: None<br>
bottleneck: 1.2.0<br>
tables: None<br>
numexpr: 2.6.2<br>
matplotlib: 2.0.0<br>
openpyxl: 2.4.5<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: 0.9.6<br>
lxml: 3.7.3<br>
bs4: 4.5.3<br>
html5lib: 0.999999999<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: 1.1.7<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.5<br>
boto: None<br>
pandas_datareader: 0.3.0.post</p>
</details> | <p dir="auto">rather than <code class="notranslate">display.max_rows</code> directly</p>
<p dir="auto">for considency with the new 'truncate' option</p> | 1 |
<p dir="auto">This is part of the Rust tutorial session. The whole purpose of the exercise was to find a mistake in the block expression.</p>
<p dir="auto">See Exercise 2.1<br>
<a href="http://pnkfelix.github.io/cyot/tutorial/exercises/ex_part_2" rel="nofollow">http://pnkfelix.github.io/cyot/tutorial/exercises/ex_part_2</a></p>
<p dir="auto">With rust compile this:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn foo() -> i32 {
42
}
pub fn main() {
let the_sum :i32 = {
foo();
};
let the_other_sum = {
foo();
};
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -> <span class="pl-smi">i32</span> <span class="pl-kos">{</span>
<span class="pl-c1">42</span>
<span class="pl-kos">}</span>
<span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> the_sum <span class="pl-kos">:</span><span class="pl-smi">i32</span> = <span class="pl-kos">{</span>
<span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> the_other_sum = <span class="pl-kos">{</span>
<span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">It outputs this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bug_block.rs:7:24: 9:6 error: mismatched types:
expected `i32`,
found `()`
(expected i32,
found ()) [E0308]
bug_block.rs:7 let the_sum :i32 = {
bug_block.rs:8 foo();
bug_block.rs:9 };
error: aborting due to previous error"><pre class="notranslate"><code class="notranslate">bug_block.rs:7:24: 9:6 error: mismatched types:
expected `i32`,
found `()`
(expected i32,
found ()) [E0308]
bug_block.rs:7 let the_sum :i32 = {
bug_block.rs:8 foo();
bug_block.rs:9 };
error: aborting due to previous error
</code></pre></div>
<p dir="auto">It should also put a warning for line 12: "possibly missing return value". This would catch the bug.</p> | <p dir="auto">When <code class="notranslate">if</code> and <code class="notranslate">else</code> arms have incompatible types, like below, the compiler should point at both arms with the evaluated type and also suggest removal of trailing semicolon if relevant.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn main() {
let a = if false { "x" } else { "y"; };
}"><pre class="notranslate"><code class="notranslate">fn main() {
let a = if false { "x" } else { "y"; };
}
</code></pre></div>
<p dir="auto"><a href="https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=cd54d41c43d1b10a53aef3fd1bd0c848" rel="nofollow">Current</a>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error[E0308]: if and else have incompatible types
--> src/main.rs:2:13
|
2 | let a = if false { "x" } else { "y"; };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &str, found ()
|
= note: expected type `&str`
found type `()`"><pre class="notranslate"><code class="notranslate">error[E0308]: if and else have incompatible types
--> src/main.rs:2:13
|
2 | let a = if false { "x" } else { "y"; };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &str, found ()
|
= note: expected type `&str`
found type `()`
</code></pre></div>
<p dir="auto">Suggested:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error[E0308]: if and else have incompatible types
--> src/main.rs:2:13
|
2 | let a = if false { "x" } else { "y"; };
| --- ^^^- help: remove this semicolon
| | |
| | expected &str, found ()
| this arm evaluates to &str
= note: expected type `&str`
found type `()`"><pre class="notranslate"><code class="notranslate">error[E0308]: if and else have incompatible types
--> src/main.rs:2:13
|
2 | let a = if false { "x" } else { "y"; };
| --- ^^^- help: remove this semicolon
| | |
| | expected &str, found ()
| this arm evaluates to &str
= note: expected type `&str`
found type `()`
</code></pre></div>
<p dir="auto"><em>Example taken from <a href="https://alantrick.ca/writings/programming/python_to_rust/" rel="nofollow">lessons learned in Converting a Python library to Rust</a> article</em></p> | 1 |
<p dir="auto">Say I keep my containers as light weight as possible, perhaps using alpine or some other light weight distro.</p>
<p dir="auto">When something goes wrong in a pod, it can be difficult to exec in and debug sometimes because there are no debugging tools in the container.</p>
<p dir="auto">It would be awesome if you could temporarily attach a new sidecar container to the specified pod for debugging purposes.</p>
<p dir="auto">something like:<br>
kubectl exec -it mypod -s mydebugcont /bin/bash</p>
<p dir="auto">It could even perhaps take a -c flag and attach to the same pid namespace of the specified container so stuff like running strace -p would work.</p> | <p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p> | 0 |
<p dir="auto">[Enter steps to reproduce below:]</p>
<p dir="auto">1.Opened two files<br>
2. Right click to split</p>
<p dir="auto"><strong>Atom Version</strong>: 1.0.0<br>
<strong>System</strong>: Windows 8.1<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: Cannot find module './context-menu'<br>
Error: Cannot find module './context-menu'<br>
at Function.Module._resolveFilename (module.js:328:15)<br>
at Function.Module._load (module.js:270:25)<br>
at Module.require (module.js:357:17)<br>
at require (module.js:376:17)<br>
at BrowserWindow. (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\src\browser\atom-window.js:149:27)<br>
at emitOne (events.js:77:13)<br>
at BrowserWindow.emit (events.js:166:7)<br>
at callFunction (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br>
at EventEmitter. (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)<br>
at emitMany (events.js:108:13)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\src\browser\atom-window.js:149:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\src\window-event-handler.js:150:33)
at HTMLDocument.handler (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)"><pre class="notranslate"><code class="notranslate">At C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\src\browser\atom-window.js:149:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\src\window-event-handler.js:150:33)
at HTMLDocument.handler (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\Benjamin\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {
"themes": [
"one-dark-ui",
"atom-dark-syntax"
]
},
"editor": {
"invisibles": {}
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {
<span class="pl-ent">"themes"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>one-dark-ui<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>atom-dark-syntax<span class="pl-pds">"</span></span>
]
},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"invisibles"</span>: {}
}
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
autocomplete-php, v0.3.6
javascript-snippets, v1.0.0
minimap, v4.10.1
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
autocomplete<span class="pl-k">-</span>php, v0.<span class="pl-ii">3</span>.<span class="pl-ii">6</span>
javascript<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">0</span>.<span class="pl-ii">0</span>
minimap, v4.<span class="pl-ii">10</span>.<span class="pl-ii">1</span>
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | <p dir="auto">I right-clicked on a folder in the tree view</p>
<p dir="auto"><strong>Atom Version</strong>: 0.194.0<br>
<strong>System</strong>: Windows 7 Entreprise<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: Cannot find module './context-menu'<br>
Error: Cannot find module './context-menu'<br>
at Function.Module._resolveFilename (module.js:328:15)<br>
at Function.Module._load (module.js:270:25)<br>
at Module.require (module.js:357:17)<br>
at require (module.js:376:17)<br>
at BrowserWindow. (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)<br>
at emitOne (events.js:77:13)<br>
at BrowserWindow.emit (events.js:166:7)<br>
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br>
at EventEmitter. (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)<br>
at emitMany (events.js:108:13)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\window-event-handler.js:149:33)
at HTMLDocument.handler (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
"><pre class="notranslate"><code class="notranslate">At C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\window-event-handler.js:149:33)
at HTMLDocument.handler (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -4:55.5.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused)
2x -3:41.6.0 window:focus-pane-on-right (atom-text-editor.editor)
-3:17.5.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-2:47.4.0 editor:newline (atom-text-editor.editor.is-focused)
-2:38.2.0 core:cut (atom-text-editor.editor)
-2:36.5.0 core:paste (atom-text-editor.editor.is-focused)
-2:26.6.0 core:save (atom-text-editor.editor.is-focused)
-2:20.6.0 core:move-down (atom-text-editor.editor)
-2:20.4.0 autocomplete-plus:confirm (atom-text-editor.editor)
-2:15.8.0 core:save (atom-text-editor.editor)
-2:08.7.0 core:copy (atom-text-editor.editor.is-focused)
-2:01.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:59.7.0 core:save (atom-text-editor.editor.is-focused)
-1:52.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:51.6.0 core:save (atom-text-editor.editor.is-focused)
-1:30.6.0 core:backspace (atom-text-editor.editor)"><pre class="notranslate"><code class="notranslate"> -4:55.5.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused)
2x -3:41.6.0 window:focus-pane-on-right (atom-text-editor.editor)
-3:17.5.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-2:47.4.0 editor:newline (atom-text-editor.editor.is-focused)
-2:38.2.0 core:cut (atom-text-editor.editor)
-2:36.5.0 core:paste (atom-text-editor.editor.is-focused)
-2:26.6.0 core:save (atom-text-editor.editor.is-focused)
-2:20.6.0 core:move-down (atom-text-editor.editor)
-2:20.4.0 autocomplete-plus:confirm (atom-text-editor.editor)
-2:15.8.0 core:save (atom-text-editor.editor)
-2:08.7.0 core:copy (atom-text-editor.editor.is-focused)
-2:01.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:59.7.0 core:save (atom-text-editor.editor.is-focused)
-1:52.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:51.6.0 core:save (atom-text-editor.editor.is-focused)
-1:30.6.0 core:backspace (atom-text-editor.editor)
</code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {
"ignoredNames": [
"node_modules"
],
"themes": [
"atom-dark-ui",
"seti-syntax"
],
"disabledPackages": [
"Tern"
],
"projectHome": "Y:\\app-tfoumax"
},
"editor": {
"invisibles": {},
"softWrap": true,
"showIndentGuide": true
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {
<span class="pl-ent">"ignoredNames"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>node_modules<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"themes"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>atom-dark-ui<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>seti-syntax<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"disabledPackages"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>Tern<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"projectHome"</span>: <span class="pl-s"><span class="pl-pds">"</span>Y:<span class="pl-cce">\\</span>app-tfoumax<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"invisibles"</span>: {},
<span class="pl-ent">"softWrap"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"showIndentGuide"</span>: <span class="pl-c1">true</span>
}
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
autocomplete-plus, v2.12.0
autocomplete-snippets, v1.2.0
javascript-snippets, v1.0.0
jshint, v1.3.5
language-ejs, v0.1.0
linter, v0.12.1
pretty-json, v0.3.3
save-session, v0.14.0
Search, v0.4.0
seti-syntax, v0.4.0
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
autocomplete<span class="pl-k">-</span>plus, v2.<span class="pl-ii">12</span>.<span class="pl-ii">0</span>
autocomplete<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">2</span>.<span class="pl-ii">0</span>
javascript<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">0</span>.<span class="pl-ii">0</span>
jshint, v1.<span class="pl-ii">3</span>.<span class="pl-ii">5</span>
language<span class="pl-k">-</span>ejs, v0.<span class="pl-ii">1</span>.<span class="pl-ii">0</span>
linter, v0.<span class="pl-ii">12</span>.<span class="pl-ii">1</span>
pretty<span class="pl-k">-</span>json, v0.<span class="pl-ii">3</span>.<span class="pl-ii">3</span>
save<span class="pl-k">-</span>session, v0.<span class="pl-ii">14</span>.<span class="pl-ii">0</span>
Search, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span>
seti<span class="pl-k">-</span>syntax, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span>
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | 1 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
So I am maintaining 4 very large projects in Angular.<br>
There is no way for me to know, when I open each project, which code has been deprecated.<br>
The only reported issue I see is when I run AOT, a message of <code class="notranslate"><template></code> now needing to be <code class="notranslate"><ng-template></code><br>
However, there are no mentions of any issues with things like Renderer now needing to ne Renderer2.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
I expect TypeScript and / or cli to report a summary of all deprecated API so we can fix'em before ng5 is out.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@angular/cli: 1.0.0
node: 6.9.5
os: win32 x64
@angular/animations: 4.0.0
@angular/common: 4.0.0
@angular/compiler: 4.0.0
@angular/core: 4.0.0
@angular/forms: 4.0.0
@angular/http: 4.0.0
@angular/platform-browser: 4.0.0
@angular/platform-browser-dynamic: 4.0.0
@angular/router: 4.0.0
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.0
@angular/language-service: 4.0.0
@ngtools/webpack: 1.3.0"><pre class="notranslate"><code class="notranslate">@angular/cli: 1.0.0
node: 6.9.5
os: win32 x64
@angular/animations: 4.0.0
@angular/common: 4.0.0
@angular/compiler: 4.0.0
@angular/core: 4.0.0
@angular/forms: 4.0.0
@angular/http: 4.0.0
@angular/platform-browser: 4.0.0
@angular/platform-browser-dynamic: 4.0.0
@angular/router: 4.0.0
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.0
@angular/language-service: 4.0.0
@ngtools/webpack: 1.3.0
</code></pre></div>
<p dir="auto">Not sure if this issue should be opened against cli repo.</p>
<p dir="auto">FYI, in WebStorm I will see cross outs on deprecated API, but again, I am dealing with thousands of files so I can't open each one and look for cross outs, see below:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5090936/24413073/332af346-138f-11e7-9bbd-18befd55bc3c.PNG"><img src="https://cloud.githubusercontent.com/assets/5090936/24413073/332af346-138f-11e7-9bbd-18befd55bc3c.PNG" alt="capture" style="max-width: 100%;"></a></p>
<p dir="auto">Angular 2 Kitchen sink: <a href="http://ng2.javascriptninja.io" rel="nofollow">http://ng2.javascriptninja.io</a><br>
and source@ <a href="https://github.com/born2net/Angular-kitchen-sink">https://github.com/born2net/Angular-kitchen-sink</a><br>
Regards,</p>
<p dir="auto">Sean</p> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see "><pre class="notranslate"><code class="notranslate">[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see
</code></pre></div>
<p dir="auto">A more general problem: we need somehow export/expose enums, static fields, classes, functions etc. into template without abusing class fields.</p>
<p dir="auto">maybe component can add a <code class="notranslate">imports</code> key in metadata</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Component({
template: `<template [ngIf]="state == StateEnum.Idle"></template`,
imports: [{import: StateEnum, as: "StateEnum"}]
})"><pre class="notranslate"><code class="notranslate">@Component({
template: `<template [ngIf]="state == StateEnum.Idle"></template`,
imports: [{import: StateEnum, as: "StateEnum"}]
})
</code></pre></div>
<p dir="auto">briefly as</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Component({
template: `<template [ngIf]="state == StateEnum.Idle"></template`,
imports: [StateEnum]
})"><pre class="notranslate"><code class="notranslate">@Component({
template: `<template [ngIf]="state == StateEnum.Idle"></template`,
imports: [StateEnum]
})
</code></pre></div>
<p dir="auto">this feature used more like providers</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="158563143" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/9029" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/9029/hovercard" href="https://github.com/angular/angular/issues/9029">#9029</a></p> | 0 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: 1.35.0</li>
<li>Operating System: [Ubuntu 22.04 amd64]</li>
<li>Browser: [Chromium, Firefox]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { firefox,chromium } = require('playwright');
(async () => {
const browser = await chromium.launch(
{
headless:true,
args: ['--no-sandbox']
}
);
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('https://www.baidu.com');
await page.screenshot({ path: 'example.png' });
await browser.close();
console.log('success');
})();"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> firefox<span class="pl-kos">,</span>chromium <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'playwright'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">browser</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">chromium</span><span class="pl-kos">.</span><span class="pl-en">launch</span><span class="pl-kos">(</span>
<span class="pl-kos">{</span>
<span class="pl-c1">headless</span>:<span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">args</span>: <span class="pl-kos">[</span><span class="pl-s">'--no-sandbox'</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span>
<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">context</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">newContext</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">'https://www.baidu.com'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">screenshot</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">path</span>: <span class="pl-s">'example.png'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'success'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">logs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
browserType.launch: Browser closed.
==================== Browser output: ====================
<launching> /root/.cache/ms-playwright/chromium-1067/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-xhQibb --remote-debugging-pipe --no-startup-window
<launched> pid=39161
[pid=39161][err] [0611/044944.462754:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.031667:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.031834:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.059913:FATAL:zygote_main_linux.cc(145)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007d11504 logging::LogMessage::~LogMessage()
[pid=39161][err] #3 0x004007d11fbe logging::LogMessage::~LogMessage()
[pid=39161][err] #4 0x004007cfbd47 logging::CheckError::~CheckError()
[pid=39161][err] #5 0x0040071cb6b8 content::ZygoteMain()
[pid=39161][err] #6 0x0040071c46c6 content::RunZygote()
[pid=39161][err] #7 0x0040071c5592 content::RunOtherNamedProcessTypeMain()
[pid=39161][err] #8 0x0040071c6952 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #9 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #10 0x0040071c415d content::ContentMain()
[pid=39161][err] #11 0x004007835331 headless::HeadlessShellMain()
[pid=39161][err] #12 0x00400398f265 ChromeMain
[pid=39161][err] #13 0x004010ee9d90 <unknown>
[pid=39161][err] #14 0x004010ee9e40 __libc_start_main
[pid=39161][err] #15 0x00400398f02a _start
[pid=39161][err]
[pid=39161][err] [0611/044945.059918:FATAL:zygote_main_linux.cc(145)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007d11504 logging::LogMessage::~LogMessage()
[pid=39161][err] #3 0x004007d11fbe logging::LogMessage::~LogMessage()
[pid=39161][err] #4 0x004007cfbd47 logging::CheckError::~CheckError()
[pid=39161][err] #5 0x0040071cb6b8 content::ZygoteMain()
[pid=39161][err] #6 0x0040071c46c6 content::RunZygote()
[pid=39161][err] #7 0x0040071c5592 content::RunOtherNamedProcessTypeMain()
[pid=39161][err] #8 0x0040071c6952 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #9 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #10 0x0040071c415d content::ContentMain()
[pid=39161][err] #11 0x004007835331 headless::HeadlessShellMain()
[pid=39161][err] #12 0x00400398f265 ChromeMain
[pid=39161][err] #13 0x004010ee9d90 <unknown>
[pid=39161][err] #14 0x004010ee9e40 __libc_start_main
[pid=39161][err] #15 0x00400398f02a _start
[pid=39161][err]
[pid=39161][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[pid=39161][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[pid=39161][err] [0611/044945.734913:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[pid=39161][err] Received signal 11 SEGV_MAPERR 74652f202d2d29
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007dcf981 base::debug::(anonymous namespace)::StackDumpSignalHandler()
[pid=39161][err] #3 0x004010f02520 <unknown>
[pid=39161][err] #4 0x004008783009 FcCharSetFreeze
[pid=39161][err] #5 0x004008783837 FcCharSetSerializeAlloc
[pid=39161][err] #6 0x0040087923dc FcValueListSerializeAlloc
[pid=39161][err] #7 0x004008792331 FcPatternSerializeAlloc
[pid=39161][err] #8 0x00400878a110 FcFontSetSerializeAlloc
[pid=39161][err] #9 0x004008780500 FcDirCacheBuild
[pid=39161][err] #10 0x004008786223 FcDirCacheScan
[pid=39161][err] #11 0x0040087862c0 IA__FcDirCacheRead
[pid=39161][err] #12 0x00400877ac67 FcConfigAddDirList
[pid=39161][err] #13 0x00400877abb2 IA__FcConfigBuildFonts
[pid=39161][err] #14 0x00400878a8d1 IA__FcInitLoadConfigAndFonts
[pid=39161][err] #15 0x00400877a0c1 FcConfigInit
[pid=39161][err] #16 0x00400848e9c4 base::NoDestructor<>::NoDestructor<>()
[pid=39161][err] #17 0x00400848e2ad gfx::GetGlobalFontConfig()
[pid=39161][err] #18 0x004005d268be content::BrowserMainRunnerImpl::Initialize()
[pid=39161][err] #19 0x00400dee16eb headless::HeadlessContentMainDelegate::RunProcess()
[pid=39161][err] #20 0x0040071c51e2 content::RunBrowserProcessMain()
[pid=39161][err] #21 0x0040071c6b84 content::ContentMainRunnerImpl::RunBrowser()
[pid=39161][err] #22 0x0040071c6976 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #23 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #24 0x0040071c415d content::ContentMain()
[pid=39161][err] #25 0x00400783521e headless::HeadlessShellMain()
[pid=39161][err] #26 0x00400398f265 ChromeMain
[pid=39161][err] #27 0x004010ee9d90 <unknown>
[pid=39161][err] #28 0x004010ee9e40 __libc_start_main
[pid=39161][err] #29 0x00400398f02a _start
[pid=39161][err] r8: 000036480006ce00 r9: 0000364800114340 r10: 000036480006c000 r11: 0000000000000000
[pid=39161][err] r12: 0000364800114480 r13: 6374652f202d2d21 r14: 0000000000000008 r15: 00003648000264c0
[pid=39161][err] di: 000000400e12b978 si: 0000000000000006 bp: 00000040101c9110 bx: 0000000000000008
[pid=39161][err] dx: 0000000000000001 ax: 0000000000000000 cx: 0000000000000000 sp: 00000040101c9090
[pid=39161][err] ip: 0000004008783009 efl: 0000000000000206 cgf: 002b000000000033 erf: 0000000000000004
[pid=39161][err] trp: ffffffffffffffff msk: 0000000000000000 cr2: 0074652f202d2d29
[pid=39161][err] [end of stack trace]
[pid=39161][err] qemu: uncaught target signal 11 (Segmentation fault) - core dumped"><pre class="notranslate"><code class="notranslate">node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
browserType.launch: Browser closed.
==================== Browser output: ====================
<launching> /root/.cache/ms-playwright/chromium-1067/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-xhQibb --remote-debugging-pipe --no-startup-window
<launched> pid=39161
[pid=39161][err] [0611/044944.462754:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.031667:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.031834:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.059913:FATAL:zygote_main_linux.cc(145)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007d11504 logging::LogMessage::~LogMessage()
[pid=39161][err] #3 0x004007d11fbe logging::LogMessage::~LogMessage()
[pid=39161][err] #4 0x004007cfbd47 logging::CheckError::~CheckError()
[pid=39161][err] #5 0x0040071cb6b8 content::ZygoteMain()
[pid=39161][err] #6 0x0040071c46c6 content::RunZygote()
[pid=39161][err] #7 0x0040071c5592 content::RunOtherNamedProcessTypeMain()
[pid=39161][err] #8 0x0040071c6952 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #9 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #10 0x0040071c415d content::ContentMain()
[pid=39161][err] #11 0x004007835331 headless::HeadlessShellMain()
[pid=39161][err] #12 0x00400398f265 ChromeMain
[pid=39161][err] #13 0x004010ee9d90 <unknown>
[pid=39161][err] #14 0x004010ee9e40 __libc_start_main
[pid=39161][err] #15 0x00400398f02a _start
[pid=39161][err]
[pid=39161][err] [0611/044945.059918:FATAL:zygote_main_linux.cc(145)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007d11504 logging::LogMessage::~LogMessage()
[pid=39161][err] #3 0x004007d11fbe logging::LogMessage::~LogMessage()
[pid=39161][err] #4 0x004007cfbd47 logging::CheckError::~CheckError()
[pid=39161][err] #5 0x0040071cb6b8 content::ZygoteMain()
[pid=39161][err] #6 0x0040071c46c6 content::RunZygote()
[pid=39161][err] #7 0x0040071c5592 content::RunOtherNamedProcessTypeMain()
[pid=39161][err] #8 0x0040071c6952 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #9 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #10 0x0040071c415d content::ContentMain()
[pid=39161][err] #11 0x004007835331 headless::HeadlessShellMain()
[pid=39161][err] #12 0x00400398f265 ChromeMain
[pid=39161][err] #13 0x004010ee9d90 <unknown>
[pid=39161][err] #14 0x004010ee9e40 __libc_start_main
[pid=39161][err] #15 0x00400398f02a _start
[pid=39161][err]
[pid=39161][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[pid=39161][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[pid=39161][err] [0611/044945.734913:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[pid=39161][err] Received signal 11 SEGV_MAPERR 74652f202d2d29
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007dcf981 base::debug::(anonymous namespace)::StackDumpSignalHandler()
[pid=39161][err] #3 0x004010f02520 <unknown>
[pid=39161][err] #4 0x004008783009 FcCharSetFreeze
[pid=39161][err] #5 0x004008783837 FcCharSetSerializeAlloc
[pid=39161][err] #6 0x0040087923dc FcValueListSerializeAlloc
[pid=39161][err] #7 0x004008792331 FcPatternSerializeAlloc
[pid=39161][err] #8 0x00400878a110 FcFontSetSerializeAlloc
[pid=39161][err] #9 0x004008780500 FcDirCacheBuild
[pid=39161][err] #10 0x004008786223 FcDirCacheScan
[pid=39161][err] #11 0x0040087862c0 IA__FcDirCacheRead
[pid=39161][err] #12 0x00400877ac67 FcConfigAddDirList
[pid=39161][err] #13 0x00400877abb2 IA__FcConfigBuildFonts
[pid=39161][err] #14 0x00400878a8d1 IA__FcInitLoadConfigAndFonts
[pid=39161][err] #15 0x00400877a0c1 FcConfigInit
[pid=39161][err] #16 0x00400848e9c4 base::NoDestructor<>::NoDestructor<>()
[pid=39161][err] #17 0x00400848e2ad gfx::GetGlobalFontConfig()
[pid=39161][err] #18 0x004005d268be content::BrowserMainRunnerImpl::Initialize()
[pid=39161][err] #19 0x00400dee16eb headless::HeadlessContentMainDelegate::RunProcess()
[pid=39161][err] #20 0x0040071c51e2 content::RunBrowserProcessMain()
[pid=39161][err] #21 0x0040071c6b84 content::ContentMainRunnerImpl::RunBrowser()
[pid=39161][err] #22 0x0040071c6976 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #23 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #24 0x0040071c415d content::ContentMain()
[pid=39161][err] #25 0x00400783521e headless::HeadlessShellMain()
[pid=39161][err] #26 0x00400398f265 ChromeMain
[pid=39161][err] #27 0x004010ee9d90 <unknown>
[pid=39161][err] #28 0x004010ee9e40 __libc_start_main
[pid=39161][err] #29 0x00400398f02a _start
[pid=39161][err] r8: 000036480006ce00 r9: 0000364800114340 r10: 000036480006c000 r11: 0000000000000000
[pid=39161][err] r12: 0000364800114480 r13: 6374652f202d2d21 r14: 0000000000000008 r15: 00003648000264c0
[pid=39161][err] di: 000000400e12b978 si: 0000000000000006 bp: 00000040101c9110 bx: 0000000000000008
[pid=39161][err] dx: 0000000000000001 ax: 0000000000000000 cx: 0000000000000000 sp: 00000040101c9090
[pid=39161][err] ip: 0000004008783009 efl: 0000000000000206 cgf: 002b000000000033 erf: 0000000000000004
[pid=39161][err] trp: ffffffffffffffff msk: 0000000000000000 cr2: 0074652f202d2d29
[pid=39161][err] [end of stack trace]
[pid=39161][err] qemu: uncaught target signal 11 (Segmentation fault) - core dumped
</code></pre></div> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.33.0]</li>
<li>Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts
import type { PlaywrightTestConfig } from '@playwright/test';
import { LaunchOptions, devices } from '@playwright/test';
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
require('dotenv').config();
const browserOptions: LaunchOptions = {
slowMo: 0,
args: [
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
],
firefoxUserPrefs: {
'media.navigator.streams.fake': true,
'media.navigator.permission.disabled': true,
},
};
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testDir: './tests',
/* Maximum time one test can run for. */
timeout: 500 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 50000,
},
/* Run tests in files in parallel */
fullyParallel: process.env.PARALLEL == 'true',
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: parseInt(process.env.RETRIES || '1'),
/* Opt out of parallel tests on CI. */
workers: parseInt(process.env.WORKERS || '20'),
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [['html', { outputFolder: 'playwright-report' }]],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
baseURL: process.env.FRONT,
headless: process.env.HEADLESS == 'true',
launchOptions: browserOptions,
trace: 'on',
// browserName: process.env.BROWSER,
channel: process.env.CHANNEL,
},
/* Configure projects for major browsers */
projects: [
{
name: 'Chrome Desktop',
use: {
headless: true,
...devices['Desktop Chrome'],
channel: 'chrome',
},
},
],
/* Folder for test artifacts such as screenshots, videos, traces, etc. */
// outputDir: 'test-results/',
/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// port: 3000,
// },
};
export default config;"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span>
<span class="pl-k">import</span> <span class="pl-s1">type</span> <span class="pl-kos">{</span> <span class="pl-v">PlaywrightTestConfig</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">LaunchOptions</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Read environment variables from file.</span>
<span class="pl-c"> * https://github.com/motdotla/dotenv</span>
<span class="pl-c"> */</span>
<span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'dotenv'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">config</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">browserOptions</span>: <span class="pl-v">LaunchOptions</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c1">slowMo</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span>
<span class="pl-c1">args</span>: <span class="pl-kos">[</span>
<span class="pl-s">'--use-fake-ui-for-media-stream'</span><span class="pl-kos">,</span>
<span class="pl-s">'--use-fake-device-for-media-stream'</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">firefoxUserPrefs</span>: <span class="pl-kos">{</span>
<span class="pl-s">'media.navigator.streams.fake'</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-s">'media.navigator.permission.disabled'</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * See https://playwright.dev/docs/test-configuration.</span>
<span class="pl-c"> */</span>
<span class="pl-k">const</span> <span class="pl-s1">config</span>: <span class="pl-v">PlaywrightTestConfig</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c1">testDir</span>: <span class="pl-s">'./tests'</span><span class="pl-kos">,</span>
<span class="pl-c">/* Maximum time one test can run for. */</span>
<span class="pl-c1">timeout</span>: <span class="pl-c1">500</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span>
<span class="pl-c1">expect</span>: <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Maximum time expect() should wait for the condition to be met.</span>
<span class="pl-c"> * For example in `await expect(locator).toHaveText();`</span>
<span class="pl-c"> */</span>
<span class="pl-c1">timeout</span>: <span class="pl-c1">50000</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c">/* Run tests in files in parallel */</span>
<span class="pl-c1">fullyParallel</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">PARALLEL</span> <span class="pl-c1">==</span> <span class="pl-s">'true'</span><span class="pl-kos">,</span>
<span class="pl-c">/* Fail the build on CI if you accidentally left test.only in the source code. */</span>
<span class="pl-c1">forbidOnly</span>: <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span><span class="pl-kos">,</span>
<span class="pl-c">/* Retry on CI only */</span>
<span class="pl-c1">retries</span>: <span class="pl-en">parseInt</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">RETRIES</span> <span class="pl-c1">||</span> <span class="pl-s">'1'</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-c">/* Opt out of parallel tests on CI. */</span>
<span class="pl-c1">workers</span>: <span class="pl-en">parseInt</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">WORKERS</span> <span class="pl-c1">||</span> <span class="pl-s">'20'</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-c">/* Reporter to use. See https://playwright.dev/docs/test-reporters */</span>
<span class="pl-c1">reporter</span>: <span class="pl-kos">[</span><span class="pl-kos">[</span><span class="pl-s">'html'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">outputFolder</span>: <span class="pl-s">'playwright-report'</span> <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c">/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span>
<span class="pl-c1">baseURL</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">FRONT</span><span class="pl-kos">,</span>
<span class="pl-c1">headless</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">HEADLESS</span> <span class="pl-c1">==</span> <span class="pl-s">'true'</span><span class="pl-kos">,</span>
<span class="pl-c1">launchOptions</span>: <span class="pl-s1">browserOptions</span><span class="pl-kos">,</span>
<span class="pl-c1">trace</span>: <span class="pl-s">'on'</span><span class="pl-kos">,</span>
<span class="pl-c">// browserName: process.env.BROWSER,</span>
<span class="pl-c1">channel</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CHANNEL</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c">/* Configure projects for major browsers */</span>
<span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'Chrome Desktop'</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span>
<span class="pl-c1">headless</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">channel</span>: <span class="pl-s">'chrome'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c">/* Folder for test artifacts such as screenshots, videos, traces, etc. */</span>
<span class="pl-c">// outputDir: 'test-results/',</span>
<span class="pl-c">/* Run your local dev server before starting the tests */</span>
<span class="pl-c">// webServer: {</span>
<span class="pl-c">// command: 'npm run start',</span>
<span class="pl-c">// port: 3000,</span>
<span class="pl-c">// },</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">config</span><span class="pl-kos">;</span></pre></div>
<hr>
<p dir="auto"><strong>Steps</strong><br>
1- Set the config <code class="notranslate">trace: 'retain-on-failure',</code> on // playwright.config.ts<br>
2- Set the HTML report config <code class="notranslate">reporter: [['html', { outputFolder: 'playwright-report' }]],</code> on // playwright.config.ts<br>
3- Create any test that contains at least 5 steps and one of the tests is failing<br>
4- Observe the time-travel results</p>
<hr>
<p dir="auto">Use this command to run the test and check the time travel trace</p>
<p dir="auto"><code class="notranslate">npx playwright test</code></p>
<p dir="auto">or</p>
<p dir="auto"><code class="notranslate">npx playwright test --reporter=html</code></p>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">This is the expected behaviour when enabling the config <code class="notranslate">trace: 'retain-on-failure',</code>. Using this config it should display all steps in the time-travel report if any step failed.</p>
<details open="" class="details-reset border rounded-2">
<summary class="px-3 py-2">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-camera-video">
<path d="M16 3.75v8.5a.75.75 0 0 1-1.136.643L11 10.575v.675A1.75 1.75 0 0 1 9.25 13h-7.5A1.75 1.75 0 0 1 0 11.25v-6.5C0 3.784.784 3 1.75 3h7.5c.966 0 1.75.784 1.75 1.75v.675l3.864-2.318A.75.75 0 0 1 16 3.75Zm-6.5 1a.25.25 0 0 0-.25-.25h-7.5a.25.25 0 0 0-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-6.5ZM11 8.825l3.5 2.1v-5.85l-3.5 2.1Z"></path>
</svg>
<span aria-label="Video description 2023-05-11_11-24-57.mp4" class="m-1">2023-05-11_11-24-57.mp4</span>
<span class="dropdown-caret"></span>
</summary>
<video src="https://user-images.githubusercontent.com/83456381/237745174-5119f13d-7d8d-4ea5-b461-4d727a4b28a1.mp4" data-canonical-src="https://user-images.githubusercontent.com/83456381/237745174-5119f13d-7d8d-4ea5-b461-4d727a4b28a1.mp4" controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" style="max-height:640px; min-height: 200px">
</video>
</details>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">This is the behaviour when enabling the config <code class="notranslate">trace: 'retain-on-failure',</code>. Please see attached video</p>
<details open="" class="details-reset border rounded-2">
<summary class="px-3 py-2">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-camera-video">
<path d="M16 3.75v8.5a.75.75 0 0 1-1.136.643L11 10.575v.675A1.75 1.75 0 0 1 9.25 13h-7.5A1.75 1.75 0 0 1 0 11.25v-6.5C0 3.784.784 3 1.75 3h7.5c.966 0 1.75.784 1.75 1.75v.675l3.864-2.318A.75.75 0 0 1 16 3.75Zm-6.5 1a.25.25 0 0 0-.25-.25h-7.5a.25.25 0 0 0-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-6.5ZM11 8.825l3.5 2.1v-5.85l-3.5 2.1Z"></path>
</svg>
<span aria-label="Video description 2023-05-11_11-36-06.mp4" class="m-1">2023-05-11_11-36-06.mp4</span>
<span class="dropdown-caret"></span>
</summary>
<video src="https://user-images.githubusercontent.com/83456381/237742419-fa90f076-e2a2-4ea2-8ddb-421154858f8c.mp4" data-canonical-src="https://user-images.githubusercontent.com/83456381/237742419-fa90f076-e2a2-4ea2-8ddb-421154858f8c.mp4" controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" style="max-height:640px; min-height: 200px">
</video>
</details> | 0 |
<p dir="auto"><a href="http://freecodecamp.com/challenges/waypoint-iterate-with-javascript-while-loops" rel="nofollow">http://freecodecamp.com/challenges/waypoint-iterate-with-javascript-while-loops</a><br>
Currently asks the user, "Let's try getting a for loop to work by pushing values to an array."<br>
Should be, "Let's try getting a while loop to work by pushing values to an array."</p> | <p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-iterate-with-javascript-while-loops" rel="nofollow">http://freecodecamp.com/challenges/waypoint-iterate-with-javascript-while-loops</a> has an issue.</p>
<p dir="auto">Text reads, "Let's try getting a for loop to work by pushing values to an array." It should instead read, "Let's try getting a while loop to work by pushing values to an array."</p> | 1 |
<h3 dir="auto">Bug</h3>
<p dir="auto">There is a difference between <code class="notranslate">class Base</code> and <code class="notranslate">class Base extends Object</code> that shouldn't be there.</p>
<p dir="auto">Classes explicitly extending Object (and their subclasses) are always instances of Object and <strong>are not instances of the respective classes</strong>.</p>
<p dir="auto"><strong>Function calls fail</strong> on classes explicitly extending Object (and their subclasses).</p>
<h3 dir="auto">Code demonstrating the differences between Babel & Node</h3>
<p dir="auto">Output of the console.log()'s are added as comments to the lines.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Base1 extends Object {
constructor(name) {
super();
this.name = name;
}
getName() {
return this.name;
}
}
class Base2 {
constructor(name) {
this.name = name;
}
getName() {
return this.name;
}
}
let b = new Base1("name1");
// --BABEL-- // --NODE--
console.log(b instanceof Object); // true // true
console.log(b instanceof Base1); // false // true
console.log(b.constructor.name); // Object // Base1
console.log(b.getName()); // TypeError: b.getName is not a function // name1
console.log(b); // { name: 'name1' } // Base1 { name: 'name1' }
console.log();
b = new Base2("name2");
// --BABEL & NODE--
console.log(b instanceof Object); // true
console.log(b instanceof Base2); // true
console.log(b.constructor.name); // Base2
console.log(b.getName()); // name2
console.log(b); // Base2 { name: 'name2' }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Base1</span> <span class="pl-k">extends</span> <span class="pl-v">Object</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">name</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">name</span> <span class="pl-c1">=</span> <span class="pl-s1">name</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">getName</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">class</span> <span class="pl-v">Base2</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">name</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">name</span> <span class="pl-c1">=</span> <span class="pl-s1">name</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">getName</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">let</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Base1</span><span class="pl-kos">(</span><span class="pl-s">"name1"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// --BABEL-- // --NODE--</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">b</span> <span class="pl-k">instanceof</span> <span class="pl-v">Object</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// true // true</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">b</span> <span class="pl-k">instanceof</span> <span class="pl-v">Base1</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// false // true</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-c1">constructor</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Object // Base1</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-en">getName</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// TypeError: b.getName is not a function // name1</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// { name: 'name1' } // Base1 { name: 'name1' }</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Base2</span><span class="pl-kos">(</span><span class="pl-s">"name2"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// --BABEL & NODE--</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">b</span> <span class="pl-k">instanceof</span> <span class="pl-v">Object</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// true</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">b</span> <span class="pl-k">instanceof</span> <span class="pl-v">Base2</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// true</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-c1">constructor</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Base2</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-en">getName</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// name2</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Base2 { name: 'name2' }</span></pre></div>
<h3 dir="auto">Babel Configuration</h3>
<p dir="auto">.babelrc</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"presets": ["es2015", "es2016", "es2017"]
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"presets"</span>: <span class="pl-kos">[</span><span class="pl-s">"es2015"</span><span class="pl-kos">,</span> <span class="pl-s">"es2016"</span><span class="pl-kos">,</span> <span class="pl-s">"es2017"</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">package.json / cli command (file is in src folder and result in lib folder)</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" "devDependencies": {
"babel-cli": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2016": "^6.24.1",
"babel-preset-es2017": "^6.24.1"
},
"scripts": {
"build": "babel src --out-dir lib",
"watch": "babel src -w --out-dir lib"
}"><pre class="notranslate"> <span class="pl-s">"devDependencies"</span>: <span class="pl-kos">{</span>
<span class="pl-s">"babel-cli"</span>: <span class="pl-s">"^6.26.0"</span><span class="pl-kos">,</span>
<span class="pl-s">"babel-polyfill"</span>: <span class="pl-s">"^6.26.0"</span><span class="pl-kos">,</span>
<span class="pl-s">"babel-preset-es2015"</span>: <span class="pl-s">"^6.24.1"</span><span class="pl-kos">,</span>
<span class="pl-s">"babel-preset-es2016"</span>: <span class="pl-s">"^6.24.1"</span><span class="pl-kos">,</span>
<span class="pl-s">"babel-preset-es2017"</span>: <span class="pl-s">"^6.24.1"</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-s">"scripts"</span>: <span class="pl-kos">{</span>
<span class="pl-s">"build"</span>: <span class="pl-s">"babel src --out-dir lib"</span><span class="pl-kos">,</span>
<span class="pl-s">"watch"</span>: <span class="pl-s">"babel src -w --out-dir lib"</span>
<span class="pl-kos">}</span></pre></div>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">There should be no difference between instances created with <code class="notranslate">class Base</code> and <code class="notranslate">class Base extends Object</code>.</p>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto"><code class="notranslate">class Base</code> instances behave correctly.<br>
<code class="notranslate">class Base extends Object</code> instances fail to implement functions and the correct type (constructor name, instanceof).</p>
<h3 dir="auto">Context</h3>
<p dir="auto"><code class="notranslate">class Base extends Object</code> is needed for <a href="https://flow.org" rel="nofollow">static type checker Flow</a> to accept <code class="notranslate">obj['propName'] = 123</code>.</p>
<h3 dir="auto">Environment</h3>
<table role="table">
<thead>
<tr>
<th>software</th>
<th>version(s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Babel</td>
<td>6.26.0</td>
</tr>
<tr>
<td>node</td>
<td>8.3.0</td>
</tr>
<tr>
<td>npm</td>
<td>5.3.0</td>
</tr>
<tr>
<td>Operating System</td>
<td>macOS 10.12 & Windows 10</td>
</tr>
</tbody>
</table> | <p dir="auto">Current Babel transform, when it comes to call the parent</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">_possibleConstructorReturn</span><span class="pl-kos">(</span><span class="pl-s1">self</span><span class="pl-kos">,</span> <span class="pl-s1">call</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">self</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">ReferenceError</span><span class="pl-kos">(</span><span class="pl-s">"this hasn't been initialised - super() hasn't been called"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">return</span> <span class="pl-s1">call</span> <span class="pl-c1">&&</span> <span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">call</span> <span class="pl-c1">===</span> <span class="pl-s">"object"</span> <span class="pl-c1">||</span> <span class="pl-k">typeof</span> <span class="pl-s1">call</span> <span class="pl-c1">===</span> <span class="pl-s">"function"</span><span class="pl-kos">)</span> ? <span class="pl-s1">call</span> : <span class="pl-s1">self</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">It's a way too poor implementation.</p>
<p dir="auto">If we take the current basic ES6 compat syntax:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class List extends Array {}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">List</span> <span class="pl-k">extends</span> <span class="pl-v">Array</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">We'll realize babel does a bad job.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var l = new List();
l instanceof List; // false"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">l</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">List</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">l</span> <span class="pl-k">instanceof</span> <span class="pl-v">List</span><span class="pl-kos">;</span> <span class="pl-c">// false</span></pre></div>
<p dir="auto">The reason is simple: Babel replace the returns and exit, without caring about userland expectations.</p>
<p dir="auto">This is how above basic extend should desugar:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function List() {
return Object.setPrototypeOf(
Array.apply(this, arguments),
List.prototype
);
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-v">List</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span>
<span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-smi">arguments</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span>
<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">It's a very ad-hoc case for the initial example that currently fails, but it's good enough to understand that inheriting the prototype is the least of the problem.</p>
<p dir="auto">Indeed, we have 3 ways to do that within a transpiled code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// losing the initial prototype
// for polyfilled ES5+ or lower
List.prototype = Object.create(
Array.prototype,
{constructor: {
configurable: true,
writable: true,
value: List.prototype
}}
);
// using a cleaner way
// for ES5+ compliant targets
Object.setPrototypeOf(
List.prototype,
Array.prototype
);
// using a cleaner way
// that works well with
// partially polyfilled .setPrototypeOf
List.prototype = Object.setPrototypeOf(
List.prototype,
Array.prototype
);"><pre class="notranslate"><span class="pl-c">// losing the initial prototype</span>
<span class="pl-c">// for polyfilled ES5+ or lower</span>
<span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span>
<span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span><span class="pl-c1">constructor</span>: <span class="pl-kos">{</span>
<span class="pl-c1">configurable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">writable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">value</span>: <span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span>
<span class="pl-kos">}</span><span class="pl-kos">}</span>
<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// using a cleaner way</span>
<span class="pl-c">// for ES5+ compliant targets</span>
<span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span>
<span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span>
<span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span>
<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// using a cleaner way</span>
<span class="pl-c">// that works well with</span>
<span class="pl-c">// partially polyfilled .setPrototypeOf</span>
<span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span>
<span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span>
<span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span>
<span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Solved the inheritance bit, considering Babel also set the prototype of each constructor,<br>
we need to address cases where a <code class="notranslate">super</code> call might "<em>upgrade</em>" the current context, like it is for <code class="notranslate">HTMLELement</code> or exotic native objects.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// native ES6 static example
class List extends Array {
constructor(a, b, c) {
super(a, b);
this.push(c);
}
}"><pre class="notranslate"><span class="pl-c">// native ES6 static example</span>
<span class="pl-k">class</span> <span class="pl-v">List</span> <span class="pl-k">extends</span> <span class="pl-v">Array</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">a</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">,</span> <span class="pl-s1">c</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-s1">a</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">c</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Above case should desugar to something like the follwoing:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function List(a, b, c) {
// the super bit
var self = Object.setPrototypeOf(
Array.call(this, a, b),
List.prototype
);
// the rest with swapped context
self.push(c);
// at the end
return self;
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-v">List</span><span class="pl-kos">(</span><span class="pl-s1">a</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">,</span> <span class="pl-s1">c</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// the super bit</span>
<span class="pl-k">var</span> <span class="pl-s1">self</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span>
<span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-s1">a</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span>
<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// the rest with swapped context</span>
<span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">c</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// at the end</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">which is also ad-hoc example code for the previous example.</p>
<p dir="auto">Considering a transpiler will get the arguments part easily right, this is how previous case could be generically transpiled for arguments used in both constructors:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// to make it as generic as possible
function Child() {
// the super call bit desugar to ...
var
instance = Object.getPrototypeOf(Child)
.apply(this, arguments),
type = instance ? typeof instance : '',
// if Parent overwrote its default return
self = (type === 'object' || type === 'function') ?
// upgrade the instance to reflect Child constructor
Object.setPrototypeOf(instance, Child.prototype) :
// otherwise use the current context as is
this
;
// at this point, the rest of the constructor
// should use `self` instead of `this`
self.push(c);
// and return `self` reference at the end
return self;
}"><pre class="notranslate"><span class="pl-c">// to make it as generic as possible</span>
<span class="pl-k">function</span> <span class="pl-v">Child</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// the super call bit desugar to ...</span>
<span class="pl-k">var</span>
<span class="pl-s1">instance</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">getPrototypeOf</span><span class="pl-kos">(</span><span class="pl-v">Child</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-smi">arguments</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-s1">type</span> <span class="pl-c1">=</span> <span class="pl-s1">instance</span> ? <span class="pl-k">typeof</span> <span class="pl-s1">instance</span> : <span class="pl-s">''</span><span class="pl-kos">,</span>
<span class="pl-c">// if Parent overwrote its default return</span>
<span class="pl-s1">self</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">type</span> <span class="pl-c1">===</span> <span class="pl-s">'object'</span> <span class="pl-c1">||</span> <span class="pl-s1">type</span> <span class="pl-c1">===</span> <span class="pl-s">'function'</span><span class="pl-kos">)</span> ?
<span class="pl-c">// upgrade the instance to reflect Child constructor</span>
<span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span><span class="pl-s1">instance</span><span class="pl-kos">,</span> <span class="pl-v">Child</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">)</span> :
<span class="pl-c">// otherwise use the current context as is</span>
<span class="pl-smi">this</span>
<span class="pl-kos">;</span>
<span class="pl-c">// at this point, the rest of the constructor</span>
<span class="pl-c">// should use `self` instead of `this`</span>
<span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">c</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// and return `self` reference at the end</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">The last problem is that modern syntax would use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect" rel="nofollow">Reflect</a> to create any sort of object, instead of old, ES3 friendly, <code class="notranslate">.call</code> or <code class="notranslate">.apply</code> way.</p>
<p dir="auto">Following a past, present, and even future proof approach:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var
reConstruct = typeof Reflect === 'object' ?
Reflect.construct :
function (Parent, args, Child) {
return Parent.apply(this, args);
}
;
function Child() {
// the super call bit
var
instance = reConstruct.call(
this,
Object.getPrototypeOf(Child),
arguments,
Child
),
type = instance ? typeof instance : '',
self = (type === 'object' || type === 'function') ?
Object.setPrototypeOf(instance, Child.prototype) :
this
;
// the rest of the constructor body
self.push(c);
// at the end or instead of empty returns
return self;
}"><pre class="notranslate"><span class="pl-k">var</span>
<span class="pl-s1">reConstruct</span> <span class="pl-c1">=</span> <span class="pl-k">typeof</span> <span class="pl-v">Reflect</span> <span class="pl-c1">===</span> <span class="pl-s">'object'</span> ?
<span class="pl-v">Reflect</span><span class="pl-kos">.</span><span class="pl-c1">construct</span> :
<span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-v">Parent</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">,</span> <span class="pl-v">Child</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-v">Parent</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-v">Child</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// the super call bit</span>
<span class="pl-k">var</span>
<span class="pl-s1">instance</span> <span class="pl-c1">=</span> <span class="pl-s1">reConstruct</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span>
<span class="pl-smi">this</span><span class="pl-kos">,</span>
<span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">getPrototypeOf</span><span class="pl-kos">(</span><span class="pl-v">Child</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-smi">arguments</span><span class="pl-kos">,</span>
<span class="pl-v">Child</span>
<span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-s1">type</span> <span class="pl-c1">=</span> <span class="pl-s1">instance</span> ? <span class="pl-k">typeof</span> <span class="pl-s1">instance</span> : <span class="pl-s">''</span><span class="pl-kos">,</span>
<span class="pl-s1">self</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">type</span> <span class="pl-c1">===</span> <span class="pl-s">'object'</span> <span class="pl-c1">||</span> <span class="pl-s1">type</span> <span class="pl-c1">===</span> <span class="pl-s">'function'</span><span class="pl-kos">)</span> ?
<span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span><span class="pl-s1">instance</span><span class="pl-kos">,</span> <span class="pl-v">Child</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">)</span> :
<span class="pl-smi">this</span>
<span class="pl-kos">;</span>
<span class="pl-c">// the rest of the constructor body</span>
<span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">c</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// at the end or instead of empty returns</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Above solution would work with userland, exotic, or DOM constructors, and in both native and transpiled engines.</p> | 1 |
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> versioninfo()
Julia Version 1.3.0-rc4.1
Commit 8c4656b97a (2019-10-15 14:08 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_CMDSTAN_HOME = /home/tamas/src/cmdstan/"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-c1">versioninfo</span>()
Julia Version <span class="pl-c1">1.3</span>.<span class="pl-c1">0</span><span class="pl-k">-</span>rc4.<span class="pl-c1">1</span>
Commit <span class="pl-c1">8</span>c4656b97a (<span class="pl-c1">2019</span><span class="pl-k">-</span><span class="pl-c1">10</span><span class="pl-k">-</span><span class="pl-c1">15</span> <span class="pl-c1">14</span><span class="pl-k">:</span><span class="pl-c1">08</span> UTC)
Platform Info<span class="pl-k">:</span>
OS<span class="pl-k">:</span> Linux (x86_64<span class="pl-k">-</span>linux<span class="pl-k">-</span>gnu)
CPU<span class="pl-k">:</span> <span class="pl-c1">Intel</span>(R) <span class="pl-c1">Core</span>(TM) i5<span class="pl-k">-</span><span class="pl-c1">8250</span>U CPU @ <span class="pl-c1">1.60</span>GHz
WORD_SIZE<span class="pl-k">:</span> <span class="pl-c1">64</span>
LIBM<span class="pl-k">:</span> libopenlibm
LLVM<span class="pl-k">:</span> libLLVM<span class="pl-k">-</span><span class="pl-c1">6.0</span>.<span class="pl-c1">1</span> (ORCJIT, skylake)
Environment<span class="pl-k">:</span>
JULIA_CMDSTAN_HOME <span class="pl-k">=</span> <span class="pl-k">/</span>home<span class="pl-k">/</span>tamas<span class="pl-k">/</span>src<span class="pl-k">/</span>cmdstan<span class="pl-k">/</span></pre></div>
<p dir="auto">MWE condensed from <a href="https://discourse.julialang.org/t/type-stable-zip-of-tuple/30105" rel="nofollow">discussion</a>:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="using Test
# wrapper is pretty much irrelevant for the problem, just to make an MWE
@inline wrapper(itrs) = sum(prod(first.(i)) for i in Iterators.product(itrs...))
zipped1(pairs) = wrapper(map(pair -> zip(pair...), pairs))
zipped2(pairs) = wrapper(map(pair -> zip(pair[1], pair[2]), pairs))
pairs = (1:5 => 1:5, 2:3 => 2:3)
@inferred zipped1(pairs) # ERROR: return type Int64 does not match inferred return type Any
@inferred zipped2(pairs) # inferred correctly"><pre class="notranslate"><span class="pl-k">using</span> Test
<span class="pl-c"><span class="pl-c">#</span> wrapper is pretty much irrelevant for the problem, just to make an MWE</span>
<span class="pl-c1">@inline</span> <span class="pl-en">wrapper</span>(itrs) <span class="pl-k">=</span> <span class="pl-c1">sum</span>(<span class="pl-c1">prod</span>(<span class="pl-c1">first</span>.(i)) <span class="pl-k">for</span> i <span class="pl-k">in</span> Iterators<span class="pl-k">.</span><span class="pl-c1">product</span>(itrs<span class="pl-k">...</span>))
<span class="pl-en">zipped1</span>(pairs) <span class="pl-k">=</span> <span class="pl-c1">wrapper</span>(<span class="pl-c1">map</span>(pair <span class="pl-k">-></span> <span class="pl-c1">zip</span>(pair<span class="pl-k">...</span>), pairs))
<span class="pl-en">zipped2</span>(pairs) <span class="pl-k">=</span> <span class="pl-c1">wrapper</span>(<span class="pl-c1">map</span>(pair <span class="pl-k">-></span> <span class="pl-c1">zip</span>(pair[<span class="pl-c1">1</span>], pair[<span class="pl-c1">2</span>]), pairs))
pairs <span class="pl-k">=</span> (<span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">5</span> <span class="pl-k">=></span> <span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">5</span>, <span class="pl-c1">2</span><span class="pl-k">:</span><span class="pl-c1">3</span> <span class="pl-k">=></span> <span class="pl-c1">2</span><span class="pl-k">:</span><span class="pl-c1">3</span>)
<span class="pl-c1">@inferred</span> <span class="pl-c1">zipped1</span>(pairs) <span class="pl-c"><span class="pl-c">#</span> ERROR: return type Int64 does not match inferred return type Any</span>
<span class="pl-c1">@inferred</span> <span class="pl-c1">zipped2</span>(pairs) <span class="pl-c"><span class="pl-c">#</span> inferred correctly</span></pre></div>
<p dir="auto">I found some similar-looking issues, but this did not look like a duplicate of any of them.</p> | <p dir="auto">In a few places, the performance of splatting a number has shown up: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="357406108" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/29060" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/29060/hovercard" href="https://github.com/JuliaLang/julia/pull/29060">#29060</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="351903955" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/28764" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/28764/hovercard?comment_id=419917783&comment_type=issue_comment" href="https://github.com/JuliaLang/julia/pull/28764#issuecomment-419917783">#28764 (comment)</a> and working around this give signficiant speed-ups.<br>
The code is well inferred but there is a call to <code class="notranslate">_apply</code> instead of the actual method. This dissapears if the number is wrapped in a tuple.</p>
<p dir="auto">It would be nice to have this fixed so these type of workarounds are no longer needed.</p>
<p dir="auto">Ref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="329345982" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/27434" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/27434/hovercard?comment_id=400335764&comment_type=issue_comment" href="https://github.com/JuliaLang/julia/pull/27434#issuecomment-400335764">#27434 (comment)</a></p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mbauman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mbauman">@mbauman</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/martinholters/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/martinholters">@martinholters</a></p> | 1 |
<p dir="auto">when exporting node's properties using neo4j-shell( start p=node(1) return p;), the data within {..} seems to comply with json protocol as json object, but if there is double quotes(") in property value, no escape for it("), this cause trouble when I try to parse the property data with json libs</p> | <p dir="auto">Neo4j 2.0, attempting to copy dumped subgrap into 2nd DB, using the Movies sample graph:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="neo4j-shell -port 1338 -c 'dump match n return n limit 500;' |neo4j-shell -path aa -file -
Transaction started
ERROR (-v for expanded information):
SyntaxException: Invalid input 'B': expected whitespace, '.', node labels, '[', "=~", IN, IS, '*', '/', '%', '^', '+', '-', '<', '>', "<=", ">=", '=', "<>", "!=", AND, XOR, OR, ',' or ']' (line 708, column 47)
"create _11396-[:`ACTED_IN` {`roles`:["Brutus "Brutal" Howell"]}]->_11394""><pre class="notranslate"><code class="notranslate">neo4j-shell -port 1338 -c 'dump match n return n limit 500;' |neo4j-shell -path aa -file -
Transaction started
ERROR (-v for expanded information):
SyntaxException: Invalid input 'B': expected whitespace, '.', node labels, '[', "=~", IN, IS, '*', '/', '%', '^', '+', '-', '<', '>', "<=", ">=", '=', "<>", "!=", AND, XOR, OR, ',' or ']' (line 708, column 47)
"create _11396-[:`ACTED_IN` {`roles`:["Brutus "Brutal" Howell"]}]->_11394"
</code></pre></div>
<p dir="auto">Issue should be somewhere around <em>org.neo4j.cypher.export.SubGraphExporter#formatProperties(org.neo4j.graphdb.PropertyContainer)</em></p> | 1 |
<p dir="auto">A left-over header causes the _cat/plugin endpoint to throw :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl localhost:9200/_cat/plugins
{"error":"ElasticsearchIllegalStateException[mismatch on num
}"><pre class="notranslate"><code class="notranslate">curl localhost:9200/_cat/plugins
{"error":"ElasticsearchIllegalStateException[mismatch on num
}
</code></pre></div> | <p dir="auto">NEED: In many (if not majority cases) when present users with business analytics, the user would want to see numbers for complete data set. No matter how you aggregate it should present the same data with the same number of documents. Inability to handle "missing" values exclude those from analysis making analyzed data set incomplete and grand totals dependent on which field(s) the aggregation is done. It is impossible to explain to the users why the lower level totals do not add up to the upper level ones!</p>
<p dir="auto">WORKAROUND: Currently field based bucket aggregations (term, range etc) have no way to aggregate missing values. The only way is to use missing aggregation on the same level and the same field as the term aggregation itself. It is easy enough when dealing with one level aggregations but if you have 2-3 level aggregation number of "missing" aggregations (and complete lower level aggregation to be repeated in them) mushrooms very quickly to the point that the query is huge, convoluted and not debuggable. It may affect performance as well. Also fetched date needs to be heavily post-processed to extract multiple levels aggregation buckets from under various "missing" elements and put them inline with the regular aggregation values. Below please see a simple query to do 2 level aggregation with just one sum metrics</p>
<p dir="auto">PROPOSAL: I would suggest that any aggregation operating on a field should have a missing option. If missing config is specified, aggregation should accumulate missing values under that value and honor any nested aggregations within. It should never assume any value like 0 or _missing since it may clash with actual keys. If it is not specified the aggregation should skip missing values as it does now.</p>
<p dir="auto">This approach makes it entirely compatible with existing logic and give developers complete control over whether to aggregate missing and under what key. In cases when it is not needed (and not specified) there will be no performance overhead. But when it needed it will work faster as we would not need to do missing aggregation and aggregations under it separately (same goes for "other" aggregation)</p>
<p dir="auto">To be honest, I would love to see the same handling for "other" - documents that have not been included in aggregation due to the aggregation size constraints. Again the same rationale - ability to slice complete data set regardless of aggregation structure. It is just as needed as "missing" and just as troublesome to calculate but<br>
I could understand if you did not add it as it may be not compatible with your algorithms but PLEASE PLEASE add "missing" handling at least</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
},
"missing": {
"missing": {
"field": "division"
},
"aggs": {
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
},
"missing": {
"missing": {
"field": "fy"
}
},
"group": {
"terms": {
"field": "fy",
"order": { "_term": "asc" }
},
"aggs": {
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
}
}
}
}
},
"group": {
"terms": {
"field": "division",
"order": { "_term": "asc" },
size:100
},
"aggs": {
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
},
"missing": {
"missing": {
"field": "fy"
},
"aggs": {
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
}
}
},
"group": {
"terms": {
"field": "fy",
"order": { "_term": "asc" }
},
"aggs": {
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
}
}
}
}
}
}"><pre class="notranslate"><code class="notranslate">{
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
},
"missing": {
"missing": {
"field": "division"
},
"aggs": {
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
},
"missing": {
"missing": {
"field": "fy"
}
},
"group": {
"terms": {
"field": "fy",
"order": { "_term": "asc" }
},
"aggs": {
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
}
}
}
}
},
"group": {
"terms": {
"field": "division",
"order": { "_term": "asc" },
size:100
},
"aggs": {
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
},
"missing": {
"missing": {
"field": "fy"
},
"aggs": {
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
}
}
},
"group": {
"terms": {
"field": "fy",
"order": { "_term": "asc" }
},
"aggs": {
"total": {
"sum": {
"field": "money.totals.obligationTotal"
}
}
}
}
}
}
}
</code></pre></div>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/uboness/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/uboness">@uboness</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jpountz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jpountz">@jpountz</a></p> | 0 |
<p dir="auto">A max number of failures or failure backoff policy for Jobs would be useful.</p>
<p dir="auto">Imagine you have an ETL job in production that's failing due to some pathological input.<br>
By the time you spot it, it's already been rescheduled thousands of times. As an example, I had 20 broken jobs that kept getting rescheduled; killing them took forever -- and crashed the Kubernetes dashboard in the process.</p>
<p dir="auto">Today, "restartPolicy" is not respected by Jobs because the goal is to achieve successful completion. (Strangely, "restartPolicy: Never" is still valid YAML.) This means failed jobs keep getting rescheduled. When you go to delete them, you have to delete all the pods they've been scheduled on. Deletes are rate limited, and in v1.3+, the verbose "you're being throttled" messages are hidden from you when you run the <code class="notranslate">kubectl</code> command to delete a job. So it just looks like it's taking forever! This is not a pleasant UX if you have a runaway job in prod or if you're testing out a new job and it takes minutes to clean up after a broken test.</p>
<p dir="auto">What are your thoughts on specifying a maximum number of failures/retries or adding a failure backoff restart policy?</p>
<p dir="auto">(cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/thockin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/thockin">@thockin</a> , who <a href="https://twitter.com/zazius/status/758816688171126784" rel="nofollow">suggested I file this feature request</a>)</p>
<hr>
<p dir="auto">Ninja edit: <a href="http://stackoverflow.com/questions/35141607/is-there-a-max-retries-for-kubernetes-jobs" rel="nofollow">per this SO thread</a>, the throttling issue is avoidable by using the OnFailure restart policy to keep rescheduling to the same pods, rather than to new pods -- i.e. this prevents the explosion of the number of pods. And deadlines can help weed out failures after a certain amount of time.</p>
<p dir="auto">However, suppose my ETL job takes an hour to run properly but may fail within seconds if the input data is bad. I'd rather specify a maximum number of retries than a high deadline.</p> | <p dir="auto">Today <code class="notranslate">kubectl exec sh</code> depends on a shell being present in each container image. I think we can do better.</p>
<p dir="auto">What if we had something like <code class="notranslate">kubectl sh</code> which would run a statically linked busybox (or something like that) that was provided by the host node and made that enter the cgroups and namespaces and chroot of the container? We already have a short list of features that only work if the host node has some piece of software installed, this would be the same.</p> | 0 |
<p dir="auto">Hello guys, im facing a problem which im not sure if it<code class="notranslate">s a Bug on THREE.js or it</code>s really how Points works.. consider the following code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var maxPoints = 10;
var group = new THREE.Group();
for (var i = 0; i < maxPoints; i++) {
var x = Math.random();
var y = Math.random();
var z = Math.random();
var geometry: new THREE.BufferGeometry(),
var vertices: new Float32Array(maxPoints * 3),
vertices[i * 3 + 0] = x;
vertices[i * 3 + 1] = y;
vertices[i * 3 + 2] = z;
var attribute = new THREE.BufferAttribute(vertices, 3).setDynamic(true);
geometry.addAttribute('position', attribute);
geometry.setDrawRange(i, 1);
// i only want to display one point if i dont set this i end up with 2 points,
// 1 at a random position and one at the center (0,0,0) for all objects in the group
group.add(new THREE.Points(geometry));
}
...
scene.add(group);
"><pre class="notranslate"><code class="notranslate">var maxPoints = 10;
var group = new THREE.Group();
for (var i = 0; i < maxPoints; i++) {
var x = Math.random();
var y = Math.random();
var z = Math.random();
var geometry: new THREE.BufferGeometry(),
var vertices: new Float32Array(maxPoints * 3),
vertices[i * 3 + 0] = x;
vertices[i * 3 + 1] = y;
vertices[i * 3 + 2] = z;
var attribute = new THREE.BufferAttribute(vertices, 3).setDynamic(true);
geometry.addAttribute('position', attribute);
geometry.setDrawRange(i, 1);
// i only want to display one point if i dont set this i end up with 2 points,
// 1 at a random position and one at the center (0,0,0) for all objects in the group
group.add(new THREE.Points(geometry));
}
...
scene.add(group);
</code></pre></div>
<p dir="auto">The Problem im facing is that by creating a Point using BufferGeometry i always end up with 2 points, one always at the center and another randomly positioned. so if i am to create 1000 points i end up with 2000, been 2000 centered at the coordinates (0,0,0). It`s not 2000 Instance of Points but 1000 instance with 2 dots each, which i dont know how to make it only draw one,</p>
<p dir="auto">i temporarily fixed it by setting drawRange, but i surely think it`s not the right way, as i end up with a array with lots and lots of 0 values for the bufferposition for each point..</p> | <p dir="auto">Not sure if this is a bug, but the triangulation fails, although shape is simple. See the images, code and description of the problem:</p>
<p dir="auto"><a href="http://stackoverflow.com/questions/16241854/holes-in-polygons-causes-triangulation-failure-in-three-js" rel="nofollow">http://stackoverflow.com/questions/16241854/holes-in-polygons-causes-triangulation-failure-in-three-js</a></p>
<p dir="auto">Without holes works.</p>
<p dir="auto">Every combination of orientation has no effect.</p>
<hr>
<p dir="auto">UPDATE: I checked the Three.js code and there is a link to <a href="http://www.sakri.net/blog/2009/06/12/an-approach-to-triangulating-polygons-with-holes/" rel="nofollow">http://www.sakri.net/blog/2009/06/12/an-approach-to-triangulating-polygons-with-holes/</a>, which says that 90% of times it works.</p>
<p dir="auto">If that method is used for triangulation in Three.js, 90% propability is not acceptable in production environments.</p> | 0 |
<p dir="auto">Hi.</p>
<p dir="auto">I am trying to upsert sales data (salesId (Primary Key), itemId and description) to a table and I am running into some problems, specifically<br>
(1) an attribute error: <code class="notranslate">AttributeError: 'StrSQLCompiler' object has no attribute 'visit_on_duplicate_key_update'</code> and<br>
(2) an unsupported compilation error: <code class="notranslate">sqlalchemy.exc.UnsupportedCompilationError: Compiler <sqlalchemy.sql.compiler.StrSQLCompiler object at 0x110e4eda0> can't render element of type <class 'sqlalchemy.dialects.mysql.dml.OnDuplicateClause'></code> error.</p>
<p dir="auto">Both the errors above trigger when I try to print the on_duplicate_key_stmt variable. I am wondering if I did something wrong here. Thanks</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import copy
import sqlalchemy as sa
from sqlalchemy.dialects.mysql import insert
_metadata = sa.MetaData()
Sales = sa.Table(
'sales',
_metadata,
sa.Column('salesId', sa.String(32), primary_key=True),
sa.Column('itemId', sa.String(32)),
sa.Column('description', sa.String(32)),
)
sales_data = {'salesId': '1', 'itemId': '1', 'description': 'TESTING'}
sales_data_no_id = copy.deepcopy(sales_data)
sales_id = sales_data_no_id.pop('salesId')
insert_stmt = insert(Sales).values(sales_data)
on_duplicate_key_stmt = insert_stmt.on_duplicate_key_update(**sales_data_no_id)
print(on_duplicate_key_stmt)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">copy</span>
<span class="pl-k">import</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">as</span> <span class="pl-s1">sa</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span>.<span class="pl-s1">mysql</span> <span class="pl-k">import</span> <span class="pl-s1">insert</span>
<span class="pl-s1">_metadata</span> <span class="pl-c1">=</span> <span class="pl-s1">sa</span>.<span class="pl-v">MetaData</span>()
<span class="pl-v">Sales</span> <span class="pl-c1">=</span> <span class="pl-s1">sa</span>.<span class="pl-v">Table</span>(
<span class="pl-s">'sales'</span>,
<span class="pl-s1">_metadata</span>,
<span class="pl-s1">sa</span>.<span class="pl-v">Column</span>(<span class="pl-s">'salesId'</span>, <span class="pl-s1">sa</span>.<span class="pl-v">String</span>(<span class="pl-c1">32</span>), <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>),
<span class="pl-s1">sa</span>.<span class="pl-v">Column</span>(<span class="pl-s">'itemId'</span>, <span class="pl-s1">sa</span>.<span class="pl-v">String</span>(<span class="pl-c1">32</span>)),
<span class="pl-s1">sa</span>.<span class="pl-v">Column</span>(<span class="pl-s">'description'</span>, <span class="pl-s1">sa</span>.<span class="pl-v">String</span>(<span class="pl-c1">32</span>)),
)
<span class="pl-s1">sales_data</span> <span class="pl-c1">=</span> {<span class="pl-s">'salesId'</span>: <span class="pl-s">'1'</span>, <span class="pl-s">'itemId'</span>: <span class="pl-s">'1'</span>, <span class="pl-s">'description'</span>: <span class="pl-s">'TESTING'</span>}
<span class="pl-s1">sales_data_no_id</span> <span class="pl-c1">=</span> <span class="pl-s1">copy</span>.<span class="pl-en">deepcopy</span>(<span class="pl-s1">sales_data</span>)
<span class="pl-s1">sales_id</span> <span class="pl-c1">=</span> <span class="pl-s1">sales_data_no_id</span>.<span class="pl-en">pop</span>(<span class="pl-s">'salesId'</span>)
<span class="pl-s1">insert_stmt</span> <span class="pl-c1">=</span> <span class="pl-en">insert</span>(<span class="pl-v">Sales</span>).<span class="pl-en">values</span>(<span class="pl-s1">sales_data</span>)
<span class="pl-s1">on_duplicate_key_stmt</span> <span class="pl-c1">=</span> <span class="pl-s1">insert_stmt</span>.<span class="pl-en">on_duplicate_key_update</span>(<span class="pl-c1">**</span><span class="pl-s1">sales_data_no_id</span>)
<span class="pl-en">print</span>(<span class="pl-s1">on_duplicate_key_stmt</span>)</pre></div> | <p dir="auto"><strong>Migrated issue, originally created by Dmytro Starosud (<a href="https://github.com/dima-starosud">@dima-starosud</a>)</strong></p>
<p dir="auto">This is using sqlalchemy 1.2.0b3.</p>
<p dir="auto">I've faced weird behavior shown in following code snippet. Assertion in that test fails. But if you comment either <code class="notranslate">#1</code> or <code class="notranslate">#2</code> or both it will pass.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Base = declarative_base()
class Target(Base):
__tablename__ = 'target'
id = Column(Integer, primary_key=True)
descriptors = lambda: inspect(Target).all_orm_descriptors.keys()
# these two calls make test fail
configure_mappers() #1
descriptors() #2
Target.value = hybrid_property(lambda _: 'Hello!')
configure_mappers()
assert 'value' in descriptors()"><pre class="notranslate"><code class="notranslate"> Base = declarative_base()
class Target(Base):
__tablename__ = 'target'
id = Column(Integer, primary_key=True)
descriptors = lambda: inspect(Target).all_orm_descriptors.keys()
# these two calls make test fail
configure_mappers() #1
descriptors() #2
Target.value = hybrid_property(lambda _: 'Hello!')
configure_mappers()
assert 'value' in descriptors()
</code></pre></div>
<p dir="auto">Please let me know if I get it wrong.</p>
<p dir="auto">Thanks a lot in advance!</p> | 0 |
<h2 dir="auto">Problem</h2>
<p dir="auto">Our code is riddled with snippets that look like this:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if err != nil {
return nil, err
}"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-s1">err</span> <span class="pl-c1">!=</span> <span class="pl-c1">nil</span> {
<span class="pl-k">return</span> <span class="pl-c1">nil</span>, <span class="pl-s1">err</span>
}</pre></div>
<p dir="auto">These lines bubble errors up the call stack until someone decides to log them and move on:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if err != nil {
glog.Errorf("Something failed: %v", err)
}"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-s1">err</span> <span class="pl-c1">!=</span> <span class="pl-c1">nil</span> {
<span class="pl-s1">glog</span>.<span class="pl-en">Errorf</span>(<span class="pl-s">"Something failed: %v"</span>, <span class="pl-s1">err</span>)
}</pre></div>
<p dir="auto">Which can yield an unhelpful error message like (fake, but not totally unreasonable):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E0426 01:02:59.506727 2740 manager.go:110] Something failed: unexpected EOF"><pre class="notranslate"><code class="notranslate">E0426 01:02:59.506727 2740 manager.go:110] Something failed: unexpected EOF
</code></pre></div>
<p dir="auto">And now we're tasked with trying to crawl through the code to figure out where that error actually came from.</p>
<p dir="auto">We discourage logging an error that's also returned (duplicate log statements interwoven throughout the code can also be confusing), but if you (the person debugging) is lucky someone has attached a unique context message that can help you find the source (e.g. <code class="notranslate">Operation foo called on pod bar (441234) failed: %v</code>).</p>
<h2 dir="auto">Assumptions</h2>
<ul dir="auto">
<li>Errors are relatively uncommon - i.e. this doesn't apply to "not found" errors that should probably be <code class="notranslate">bool</code>s, or errors which can be generated in a tight loop</li>
<li>Errors are ephemeral - that is, they are handled (e.g. logged) and then discarded (not stored anywhere)</li>
<li>When an error is produced, it is not always possible to know how it will be handled, or even how severe it is</li>
</ul>
<h2 dir="auto">Proposal</h2>
<p dir="auto">From the above assumptions, I get 2 guiding principles:</p>
<ol dir="auto">
<li>If returning an error, it is your job to provide the maximum amount of debugging information and context around that error.</li>
<li>If handling an error, it is your job to use the <em>appropriate</em> context for the specific case (e.g. a critical failure should have more detail than something that is expected to occassionally fail and will be retried).</li>
</ol>
<p dir="auto">To this end, I'd like to create a kubernetes error package that we promote everywhere. The constructor could look something like (rough sketch, not final API):</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func New(msg string, context ...Context) Error { ... } // Context TBD
func Wrap(msg string, err error, context ...Context) Error { ... }"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">New</span>(<span class="pl-s1">msg</span> <span class="pl-smi">string</span>, <span class="pl-s1">context</span> <span class="pl-c1">...</span><span class="pl-smi">Context</span>) <span class="pl-smi">Error</span> { <span class="pl-c1">...</span> } <span class="pl-c">// Context TBD</span>
<span class="pl-k">func</span> <span class="pl-en">Wrap</span>(<span class="pl-s1">msg</span> <span class="pl-smi">string</span>, <span class="pl-s1">err</span> <span class="pl-smi">error</span>, <span class="pl-s1">context</span> <span class="pl-c1">...</span><span class="pl-smi">Context</span>) <span class="pl-smi">Error</span> { <span class="pl-c1">...</span> }</pre></div>
<p dir="auto">In addition to the provided message, error, and context the constructors could automatically attach additional metadata such as: a full stack trace, timestamp, etc.</p>
<p dir="auto">We would also provide formatting functions that could flatten the error objects and format them to various levels of detail for logging. Finally, to get the maximum benefit, we would want to discourage the pattern of returning a raw error without first wrapping it with extra context.</p>
<p dir="auto">For implementation, there are already several projects which provide similar functionality:</p>
<ul dir="auto">
<li><a href="https://github.com/go-errors/errors">https://github.com/go-errors/errors</a> (<a href="http://blog.bugsnag.com/go-errors" rel="nofollow">blog</a>)</li>
<li><a href="https://github.com/hashicorp/errwrap">https://github.com/hashicorp/errwrap</a></li>
</ul>
<p dir="auto">X-ref: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="66523592" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/6461" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/6461/hovercard" href="https://github.com/kubernetes/kubernetes/issues/6461">#6461</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="142710553" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/23338" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/23338/hovercard" href="https://github.com/kubernetes/kubernetes/issues/23338">#23338</a> - This proposal is independent of which log library we use, we just need to provide functions to log the appropriate context in whatever format.</p>
<p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/thockin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/thockin">@thockin</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timothysc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timothysc">@timothysc</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pwittrock/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pwittrock">@pwittrock</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bgrant0607/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bgrant0607">@bgrant0607</a></p> | <p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.): external service</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):<br>
v1.5.0-alpha.0.2084+162d80eced3989</p>
<p dir="auto"><strong>What happened</strong>:<br>
ExternalName type service cannot be created if without <code class="notranslate">spec.ports</code>.</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):<br>
Create a ExternalName type service: <code class="notranslate">kubectl create -f ExternalName type service</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "my-service"
},
"spec": {
"type": "ExternalName",
"externalName": "my.database.example.com"
}
}"><pre class="notranslate"><code class="notranslate">{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "my-service"
},
"spec": {
"type": "ExternalName",
"externalName": "my.database.example.com"
}
}
</code></pre></div>
<p dir="auto"><strong>Actual results</strong>:<br>
ExternalName type service created failed.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# kubectl create -f externalname-service.json
error: error validating "externalname-service.json": error validating data: field ports: is required; if you choose to ignore these errors, turn validation off with --validate=false"><pre class="notranslate"><code class="notranslate"># kubectl create -f externalname-service.json
error: error validating "externalname-service.json": error validating data: field ports: is required; if you choose to ignore these errors, turn validation off with --validate=false
</code></pre></div>
<p dir="auto"><strong>Expected results</strong>:<br>
Service should be created successful.</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:<br>
You can refer to the docs about externalname type service: <a href="https://github.com/kubernetes/kubernetes.github.io/blob/release-1.4/docs/user-guide/services/index.md">https://github.com/kubernetes/kubernetes.github.io/blob/release-1.4/docs/user-guide/services/index.md</a><br>
The docs indicated that <code class="notranslate">An ExternalName service is a special case of service that does not have selectors. It does not define any ports or endpoints. Rather, it serves as a way to return an alias to an external service residing outside the cluster.</code></p> | 0 |
<p dir="auto">I'm using Memcached I set the following session<br>
<code class="notranslate">$m = $this->get("session.handler.memcached"); $m->write($session->getId(),array("lol"=>"mdr")); $m->close();</code><br>
In another page , I execute this :<br>
<code class="notranslate">$session = $this->getRequest()->getSession(); $session->start(); $m = $this->get("session.handler.memcached"); var_dump($m->read($session->getId())['lol']); $m->close();</code></p>
<p dir="auto">Sometimes I get "mdr" sometimes I get "_" . is this a bug ?<br>
is the same session gets overriden ?</p> | <p dir="auto">Let's say you add a time field like this:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/** @var FormBuilderInterface $builder */
$builder->add('time', TimeTime::class, [
'model_timezone' => 'UTC',
'view_timezone' => 'America/New_York',
]);"><pre class="notranslate"><span class="pl-c">/** @var FormBuilderInterface $builder */</span>
<span class="pl-s1"><span class="pl-c1">$</span>builder</span>-><span class="pl-en">add</span>(<span class="pl-s">'time'</span>, <span class="pl-v">TimeTime</span>::class, [
<span class="pl-s">'model_timezone'</span> => <span class="pl-s">'UTC'</span>,
<span class="pl-s">'view_timezone'</span> => <span class="pl-s">'America/New_York'</span>,
]);</pre></div>
<p dir="auto">So users are entering the "time" field in their local time. Right now (2016-03-30) this happens to be during daylight savings time in (most of) the US: UTC is four hours ahead.</p>
<p dir="auto">Saving the form with a time value of 1AM, I would expect the UTC time to be 5am. Instead it comes back as 6am because the <a href="https://github.com/symfony/symfony/blob/86eee064dd9953a5739adac2a4b5cbaa486c9081/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php#L183-L185">model transformer</a> uses 1970-01-01 as the date (not during DST).</p>
<p dir="auto">I'm not sure if this is actually a bug or not. The behavior makes sense when you look at it from the perspective of the field being time only without a frame of reference for the date -- it doesn't care about DST.</p>
<p dir="auto">But the fact that it does conversion from one TZ to another makes it a bit weird: the conversion doesn't act as expected.</p>
<p dir="auto">Might be useful to pass a reference date to the form that the model transformer can use and default that value to 1970-01-01?</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$builder->add('time', TimeTime::class, [
'model_timezone' => 'UTC',
'view_timezone' => 'America/New_York',
'current_date' => new \DateTime('now'), // default to 1970-01-01
]);"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>builder</span>-><span class="pl-en">add</span>(<span class="pl-s">'time'</span>, <span class="pl-v">TimeTime</span>::class, [
<span class="pl-s">'model_timezone'</span> => <span class="pl-s">'UTC'</span>,
<span class="pl-s">'view_timezone'</span> => <span class="pl-s">'America/New_York'</span>,
<span class="pl-s">'current_date'</span> => <span class="pl-k">new</span> \<span class="pl-v">DateTime</span>(<span class="pl-s">'now'</span>), <span class="pl-c">// default to 1970-01-01</span>
]);</pre></div> | 0 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18362.267]
Windows Terminal version: 0.3.2142.0
Any other software:
* Powershell6
* Windows Subsystem for Linux - Ubuntu
"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.267]
Windows Terminal version: 0.3.2142.0
Any other software:
* Powershell6
* Windows Subsystem for Linux - Ubuntu
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ul dir="auto">
<li>Open Windows Terminal with <code class="notranslate">cmd.exe</code> as the default profile .</li>
<li>Open a new terminal tab hosting <code class="notranslate">pwsh.exe</code> or <code class="notranslate">WSL Ubuntu</code></li>
<li>Type <code class="notranslate">exit</code> to close the new tab</li>
<li>Back in the <code class="notranslate">cmd.exe</code> tab, <code class="notranslate">type</code> a reasonably sized text file to the console. (<em>Mine was a 59,219 byte csv file</em>)</li>
</ul>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The terminal console should scroll through the text file.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto"><strong>Terminal</strong> crashes with no error message.<br>
The <strong>Windows Problem Report</strong> lists the following detail:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Description
Faulting Application Path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.3.2142.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Problem signature
Problem Event Name: MoAppCrash
Package Full Name: Microsoft.WindowsTerminal_0.3.2142.0_x64__8wekyb3d8bbwe
Application Name: praid:App
Application Version: 1.0.1908.2002
Application Timestamp: 5d448424
Fault Module Name: TerminalControl.dll
Fault Module Version: 1.0.1908.2002
Fault Module Timestamp: 5d448318
Exception Code: c0000005
Exception Offset: 0000000000018abb
OS Version: 10.0.18362.2.0.0.768.101
Locale ID: 2057
Additional Information 1: 17fc
Additional Information 2: 17fc9f89663473fc7bed7d821c616059
Additional Information 3: df83
Additional Information 4: df83cd4f4def141c4bbf7772ff64cc94"><pre lang="none" class="notranslate"><code class="notranslate">Description
Faulting Application Path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.3.2142.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Problem signature
Problem Event Name: MoAppCrash
Package Full Name: Microsoft.WindowsTerminal_0.3.2142.0_x64__8wekyb3d8bbwe
Application Name: praid:App
Application Version: 1.0.1908.2002
Application Timestamp: 5d448424
Fault Module Name: TerminalControl.dll
Fault Module Version: 1.0.1908.2002
Fault Module Timestamp: 5d448318
Exception Code: c0000005
Exception Offset: 0000000000018abb
OS Version: 10.0.18362.2.0.0.768.101
Locale ID: 2057
Additional Information 1: 17fc
Additional Information 2: 17fc9f89663473fc7bed7d821c616059
Additional Information 3: df83
Additional Information 4: df83cd4f4def141c4bbf7772ff64cc94
</code></pre></div> | <p dir="auto">Requesting that an option exist for a quake style drop down of the terminal window from the top of the screen be added. (Not unlike ConEmu for windows, Guake or Yakuake)</p> | 0 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>DubboX version: 2.8.4</li>
<li>Java version: 1.8.0_191</li>
<li>Spring Boot Version: 2.0.3.RELEASE</li>
<li>Spring Cloud Version: Finchley.SR4</li>
<li>Brave version: 5.4.2</li>
<li>brave-instrumentation-dubbo-rpc:5.4.2</li>
</ul>
<p dir="auto">Starting with version <code class="notranslate">2.0.0</code>, Spring Cloud Sleuth uses <a href="https://github.com/openzipkin/brave">Brave</a> as the tracing library. This project use Dubbo TraceFilter implemented by brave-instrumentation-dubbo-rpc. The Project configuration as below:</p>
<p dir="auto">application.properties</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="spring.sleuth.web.enabled=true
spring.sleuth.web.client.enabled=true
spring.sleuth.sampler.probability=0.0
spring.sleuth.log.slf4j.enabled=true
spring.application.name=${dubbo.app}"><pre class="notranslate"><code class="notranslate">spring.sleuth.web.enabled=true
spring.sleuth.web.client.enabled=true
spring.sleuth.sampler.probability=0.0
spring.sleuth.log.slf4j.enabled=true
spring.application.name=${dubbo.app}
</code></pre></div>
<p dir="auto">dubbo.xml</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" <dubbo:provider filter="tracing"/>
<dubbo:consumer filter="tracing"/>"><pre class="notranslate"> <<span class="pl-ent">dubbo</span><span class="pl-ent">:</span><span class="pl-ent">provider</span> <span class="pl-e">filter</span>=<span class="pl-s"><span class="pl-pds">"</span>tracing<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">dubbo</span><span class="pl-ent">:</span><span class="pl-ent">consumer</span> <span class="pl-e">filter</span>=<span class="pl-s"><span class="pl-pds">"</span>tracing<span class="pl-pds">"</span></span>/></pre></div>
<p dir="auto">we found that some time we lost the tracing information when invoke dubbo service from ServiceB to ServiceC.<br>
the two service log infomation as below:</p>
<p dir="auto">serviceB<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2460207/78625105-b9d33480-78bd-11ea-9016-d510cb36f82a.png"><img src="https://user-images.githubusercontent.com/2460207/78625105-b9d33480-78bd-11ea-9016-d510cb36f82a.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">serviceC<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2460207/78625121-c9eb1400-78bd-11ea-8dcf-2ee7c993a011.png"><img src="https://user-images.githubusercontent.com/2460207/78625121-c9eb1400-78bd-11ea-8dcf-2ee7c993a011.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">the tracing infomation of the first and second invocation is lost, and the third is passed. and we also found that the thread name of the invocation which is lost tracing is all start with [http-nio], but the thread name start with [DubboServerHandler-] got the tracing infomation. We don't know the underlying mechanism between this two invocation.</p>
<p dir="auto">the tracing infomation is injected into the attachments of the RpcInvocation. We debug and found that<br>
<code class="notranslate">AbstractProxyInvoker</code> is not get and pass down the attachments<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2460207/78625319-585f9580-78be-11ea-8f7a-16b0c245ca06.png"><img src="https://user-images.githubusercontent.com/2460207/78625319-585f9580-78be-11ea-8f7a-16b0c245ca06.png" alt="image" style="max-width: 100%;"></a></p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<p dir="auto">branch: master</p>
<p dir="auto">functions take & put in org.apache.dubbo.common.utils.Stack consider no the situation that index plus mSize is negative .</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public E get(int index) {
if (index >= mSize) {
throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + mSize);
}
return index < 0 ? mElements.get(index + mSize) : mElements.get(index);
}
public E set(int index, E value) {
if (index >= mSize) {
throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + mSize);
}
return mElements.set(index < 0 ? index + mSize : index, value);
}
public E remove(int index) {
if (index >= mSize) {
throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + mSize);
}
E ret = mElements.remove(index < 0 ? index + mSize : index);
mSize--;
return ret;
}"><pre class="notranslate"><span class="pl-k">public</span> <span class="pl-smi">E</span> <span class="pl-s1">get</span>(<span class="pl-smi">int</span> <span class="pl-s1">index</span>) {
<span class="pl-k">if</span> (<span class="pl-s1">index</span> >= <span class="pl-s1">mSize</span>) {
<span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">IndexOutOfBoundsException</span>(<span class="pl-s">"Index: "</span> + <span class="pl-s1">index</span> + <span class="pl-s">", Size: "</span> + <span class="pl-s1">mSize</span>);
}
<span class="pl-k">return</span> <span class="pl-s1">index</span> < <span class="pl-c1">0</span> ? <span class="pl-s1">mElements</span>.<span class="pl-en">get</span>(<span class="pl-s1">index</span> + <span class="pl-s1">mSize</span>) : <span class="pl-s1">mElements</span>.<span class="pl-en">get</span>(<span class="pl-s1">index</span>);
}
<span class="pl-k">public</span> <span class="pl-smi">E</span> <span class="pl-s1">set</span>(<span class="pl-smi">int</span> <span class="pl-s1">index</span>, <span class="pl-smi">E</span> <span class="pl-s1">value</span>) {
<span class="pl-k">if</span> (<span class="pl-s1">index</span> >= <span class="pl-s1">mSize</span>) {
<span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">IndexOutOfBoundsException</span>(<span class="pl-s">"Index: "</span> + <span class="pl-s1">index</span> + <span class="pl-s">", Size: "</span> + <span class="pl-s1">mSize</span>);
}
<span class="pl-k">return</span> <span class="pl-s1">mElements</span>.<span class="pl-en">set</span>(<span class="pl-s1">index</span> < <span class="pl-c1">0</span> ? <span class="pl-s1">index</span> + <span class="pl-s1">mSize</span> : <span class="pl-s1">index</span>, <span class="pl-s1">value</span>);
}
<span class="pl-k">public</span> <span class="pl-smi">E</span> <span class="pl-s1">remove</span>(<span class="pl-smi">int</span> <span class="pl-s1">index</span>) {
<span class="pl-k">if</span> (<span class="pl-s1">index</span> >= <span class="pl-s1">mSize</span>) {
<span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">IndexOutOfBoundsException</span>(<span class="pl-s">"Index: "</span> + <span class="pl-s1">index</span> + <span class="pl-s">", Size: "</span> + <span class="pl-s1">mSize</span>);
}
<span class="pl-smi">E</span> <span class="pl-s1">ret</span> = <span class="pl-s1">mElements</span>.<span class="pl-en">remove</span>(<span class="pl-s1">index</span> < <span class="pl-c1">0</span> ? <span class="pl-s1">index</span> + <span class="pl-s1">mSize</span> : <span class="pl-s1">index</span>);
<span class="pl-s1">mSize</span>--;
<span class="pl-k">return</span> <span class="pl-s1">ret</span>;
}</pre></div>
<p dir="auto">the implementations are not strict.</p> | 0 |
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax
import jax.numpy as jnp
from jax.experimental import enable_x64
@jax.jit
def f(x):
with enable_x64():
return x.view(jnp.int64)
f(jnp.arange(10).reshape(5,2))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>
<span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">jnp</span>
<span class="pl-k">from</span> <span class="pl-s1">jax</span>.<span class="pl-s1">experimental</span> <span class="pl-k">import</span> <span class="pl-s1">enable_x64</span>
<span class="pl-en">@<span class="pl-s1">jax</span>.<span class="pl-s1">jit</span></span>
<span class="pl-k">def</span> <span class="pl-en">f</span>(<span class="pl-s1">x</span>):
<span class="pl-k">with</span> <span class="pl-en">enable_x64</span>():
<span class="pl-k">return</span> <span class="pl-s1">x</span>.<span class="pl-en">view</span>(<span class="pl-s1">jnp</span>.<span class="pl-s1">int64</span>)
<span class="pl-en">f</span>(<span class="pl-s1">jnp</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10</span>).<span class="pl-en">reshape</span>(<span class="pl-c1">5</span>,<span class="pl-c1">2</span>))</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
main.py in <module>
----> 1 pack_fragments(jnp.array(-10.01), jnp.array(-1))
[... skipping hidden 14 frame]
.../python3.9/site-packages/jax/_src/util.py in safe_map(f, *args)
42 for arg in args[1:]:
43 assert len(arg) == n, 'length mismatch: {}'.format(list(map(len, args)))
---> 44 return list(map(f, *args))
45
46 def unzip2(xys):
RuntimeError: INVALID_ARGUMENT: Binary op shift-left with different element types: u64[1,2] and u32[1,2]."><pre class="notranslate"><code class="notranslate">---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
main.py in <module>
----> 1 pack_fragments(jnp.array(-10.01), jnp.array(-1))
[... skipping hidden 14 frame]
.../python3.9/site-packages/jax/_src/util.py in safe_map(f, *args)
42 for arg in args[1:]:
43 assert len(arg) == n, 'length mismatch: {}'.format(list(map(len, args)))
---> 44 return list(map(f, *args))
45
46 def unzip2(xys):
RuntimeError: INVALID_ARGUMENT: Binary op shift-left with different element types: u64[1,2] and u32[1,2].
</code></pre></div> | <p dir="auto">minimal repro:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax import jit, experimental
@jit
def f(a):
with experimental.enable_x64():
return 1 + a
f(1)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">jax</span> <span class="pl-k">import</span> <span class="pl-s1">jit</span>, <span class="pl-s1">experimental</span>
<span class="pl-en">@<span class="pl-s1">jit</span></span>
<span class="pl-k">def</span> <span class="pl-en">f</span>(<span class="pl-s1">a</span>):
<span class="pl-k">with</span> <span class="pl-s1">experimental</span>.<span class="pl-en">enable_x64</span>():
<span class="pl-k">return</span> <span class="pl-c1">1</span> <span class="pl-c1">+</span> <span class="pl-s1">a</span>
<span class="pl-en">f</span>(<span class="pl-c1">1</span>)</pre></div>
<div class="highlight highlight-text-python-traceback notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="RuntimeError: Invalid argument: Binary op add with different element types: s64[] and s32[]."><pre class="notranslate"><span class="pl-en">RuntimeError</span>: <span class="pl-s">Invalid argument: Binary op add with different element types: s64[] and s32[].</span></pre></div> | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.