text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<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">Adding <code class="notranslate">epoch</code> argument to <code class="notranslate">step()</code> function of MultiStepLR lead to false learning rate.</p>
<h2 dir="auto">To Reproduce</h2>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from torch import nn
import torch
net = nn.Linear(30, 10)
optimizer = torch.optim.Adam(net.parameters(), lr=0.001)
s = torch.optim.lr_scheduler.MultiStepLR(optimizer, [10, 20, 30], gamma=0.1)
print(s.get_lr())
s.step(1)
print(s.get_lr())"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">torch</span> <span class="pl-k">import</span> <span class="pl-s1">nn</span>
<span class="pl-k">import</span> <span class="pl-s1">torch</span>
<span class="pl-s1">net</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">Linear</span>(<span class="pl-c1">30</span>, <span class="pl-c1">10</span>)
<span class="pl-s1">optimizer</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-s1">optim</span>.<span class="pl-v">Adam</span>(<span class="pl-s1">net</span>.<span class="pl-en">parameters</span>(), <span class="pl-s1">lr</span><span class="pl-c1">=</span><span class="pl-c1">0.001</span>)
<span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-s1">optim</span>.<span class="pl-s1">lr_scheduler</span>.<span class="pl-v">MultiStepLR</span>(<span class="pl-s1">optimizer</span>, [<span class="pl-c1">10</span>, <span class="pl-c1">20</span>, <span class="pl-c1">30</span>], <span class="pl-s1">gamma</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>)
<span class="pl-en">print</span>(<span class="pl-s1">s</span>.<span class="pl-en">get_lr</span>())
<span class="pl-s1">s</span>.<span class="pl-en">step</span>(<span class="pl-c1">1</span>)
<span class="pl-en">print</span>(<span class="pl-s1">s</span>.<span class="pl-en">get_lr</span>())</pre></div>
<p dir="auto">Output</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[0.001]
[1.0000000000000002e-06]"><pre class="notranslate"><code class="notranslate">[0.001]
[1.0000000000000002e-06]
</code></pre></div>
<h2 dir="auto">Expected behavior</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[0.001]
[0.001]"><pre class="notranslate"><code class="notranslate">[0.001]
[0.001]
</code></pre></div>
<h2 dir="auto">Environment</h2>
<p dir="auto">PyTorch version: 1.4.0a0+d5bf51b<br>
Is debug build: No<br>
CUDA used to build PyTorch: 9.0</p>
<p dir="auto">OS: Ubuntu 16.04.6 LTS<br>
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609<br>
CMake version: version 3.14.0</p>
<p dir="auto">Python version: 3.6<br>
Is CUDA available: Yes<br>
CUDA runtime version: 9.0.176<br>
GPU models and configuration:<br>
GPU 0: TITAN Xp<br>
GPU 1: TITAN Xp<br>
GPU 2: TITAN Xp<br>
GPU 3: TITAN Xp</p>
<p dir="auto">Nvidia driver version: 430.26<br>
cuDNN version: Could not collect</p>
<p dir="auto">Versions of relevant libraries:</p>
<p dir="auto">[pip] numpy==1.17.3<br>
[pip] torch==1.4.0a0+d5bf51b<br>
[conda] blas 1.0 mkl<br>
[conda] magma-cuda90 2.5.0 1 pytorch<br>
[conda] mkl 2019.4 243<br>
[conda] mkl-include 2019.4 243<br>
[conda] mkl-service 2.3.0 py36he904b0f_0<br>
[conda] mkl_fft 1.0.15 py36ha843d7b_0<br>
[conda] mkl_random 1.1.0 py36hd6b4f25_0<br>
[conda] torch 1.4.0a0+d5bf51b pypi_0 pypi</p>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Possible cause might be that the milestones of MultiStepLR is a <code class="notranslate">counter</code> rather then a list, which leads to false action of <code class="notranslate">bisect</code> in <code class="notranslate">get_lr</code> function.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vincentqb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vincentqb">@vincentqb</a></p> | <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">MultiStepLR is broken with <code class="notranslate">.step(epoch=xyz)</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import torch
t = torch.tensor(1.0, requires_grad=True)
opt = torch.optim.SGD([t], lr=0.01)
s = torch.optim.lr_scheduler.MultiStepLR(opt, milestones=[19])
print('lr', opt.param_groups[0]['lr'])
opt.step()
s.step(0)
print('lr', opt.param_groups[0]['lr'])"><pre class="notranslate"><code class="notranslate">import torch
t = torch.tensor(1.0, requires_grad=True)
opt = torch.optim.SGD([t], lr=0.01)
s = torch.optim.lr_scheduler.MultiStepLR(opt, milestones=[19])
print('lr', opt.param_groups[0]['lr'])
opt.step()
s.step(0)
print('lr', opt.param_groups[0]['lr'])
</code></pre></div>
<p dir="auto">Outputs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="lr 0.01
lr 0.001"><pre class="notranslate"><code class="notranslate">lr 0.01
lr 0.001
</code></pre></div>
<p dir="auto">I'm aware that <code class="notranslate">.step(epoch=xyz)</code> is deprecated, but it's used by third-party libraries, like <a href="https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pytorch_lightning/trainer/training_loop.py#L341">https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pytorch_lightning/trainer/training_loop.py#L341</a>.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vincentqb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vincentqb">@vincentqb</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/williamFalcon/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/williamFalcon">@williamFalcon</a> ^</p>
<p dir="auto">I've debugged the issue and it seems to be caused by <code class="notranslate">bisect_right()</code> not playing well with <code class="notranslate">Counter</code>: <a href="https://github.com/pytorch/pytorch/blob/master/torch/optim/lr_scheduler.py#L399">https://github.com/pytorch/pytorch/blob/master/torch/optim/lr_scheduler.py#L399</a></p>
<p dir="auto">This can be fixed by casting self.milestones to list before bisection. If that's an acceptable fix, I'm happy to send a PR.</p>
<h2 dir="auto">Environment</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Collecting environment information...
PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.1
OS: Ubuntu 18.04.3 LTS
GCC version: (Ubuntu 4.8.5-4ubuntu8) 4.8.5
CMake version: version 3.12.1
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.1.243
GPU models and configuration:
GPU 0: GeForce RTX 2080 Ti
GPU 1: GeForce RTX 2080 Ti
Nvidia driver version: 440.33.01
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.3
Versions of relevant libraries:
[pip3] numpy==1.17.2
[pip3] pytorch-lightning==0.5.3.2
[pip3] torch==1.4.0
[pip3] torch2trt==0.0.3
[pip3] torchvision==0.6.0a0
[conda] Could not collect"><pre class="notranslate"><code class="notranslate">Collecting environment information...
PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.1
OS: Ubuntu 18.04.3 LTS
GCC version: (Ubuntu 4.8.5-4ubuntu8) 4.8.5
CMake version: version 3.12.1
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.1.243
GPU models and configuration:
GPU 0: GeForce RTX 2080 Ti
GPU 1: GeForce RTX 2080 Ti
Nvidia driver version: 440.33.01
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.3
Versions of relevant libraries:
[pip3] numpy==1.17.2
[pip3] pytorch-lightning==0.5.3.2
[pip3] torch==1.4.0
[pip3] torch2trt==0.0.3
[pip3] torchvision==0.6.0a0
[conda] Could not collect
</code></pre></div> | 1 |
<h4 dir="auto">Description</h4>
<p dir="auto">The average_precision_score() function in sklearn doesn't return a correct AUC value.</p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<p dir="auto">Example:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
"""
Desc: average_precision_score returns overestimated AUC of precision-recall curve
"""
# pathological example
p = [0.833, 0.800] # precision
r = [0.294, 0.235] # recall
# computation of average_precision_score()
print("AUC = {:3f}".format(-np.sum(np.diff(r) * np.array(p)[:-1]))) # _binary_uninterpolated_average_precision()
# computation of auc() with trapezoid interpolation
print("AUC TRAP. = {:3f}".format(-np.trapz(p, r)))
# possible fix in _binary_uninterpolated_average_precision() **(edited)**
print("AUC FIX = {:3f}".format(-np.sum(np.diff(r) * np.minimum(p[:-1], p[1:])))
#>> AUC = 0.049147
#>> AUC TRAP. = 0.048174
#>> AUC FIX = 0.047200"><pre class="notranslate"><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-s">"""</span>
<span class="pl-s"> Desc: average_precision_score returns overestimated AUC of precision-recall curve</span>
<span class="pl-s">"""</span>
<span class="pl-c"># pathological example</span>
<span class="pl-s1">p</span> <span class="pl-c1">=</span> [<span class="pl-c1">0.833</span>, <span class="pl-c1">0.800</span>] <span class="pl-c"># precision</span>
<span class="pl-s1">r</span> <span class="pl-c1">=</span> [<span class="pl-c1">0.294</span>, <span class="pl-c1">0.235</span>] <span class="pl-c"># recall</span>
<span class="pl-c"># computation of average_precision_score()</span>
<span class="pl-en">print</span>(<span class="pl-s">"AUC = {:3f}"</span>.<span class="pl-en">format</span>(<span class="pl-c1">-</span><span class="pl-s1">np</span>.<span class="pl-en">sum</span>(<span class="pl-s1">np</span>.<span class="pl-en">diff</span>(<span class="pl-s1">r</span>) <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-s1">p</span>)[:<span class="pl-c1">-</span><span class="pl-c1">1</span>]))) <span class="pl-c"># _binary_uninterpolated_average_precision()</span>
<span class="pl-c"># computation of auc() with trapezoid interpolation</span>
<span class="pl-en">print</span>(<span class="pl-s">"AUC TRAP. = {:3f}"</span>.<span class="pl-en">format</span>(<span class="pl-c1">-</span><span class="pl-s1">np</span>.<span class="pl-en">trapz</span>(<span class="pl-s1">p</span>, <span class="pl-s1">r</span>)))
<span class="pl-c"># possible fix in _binary_uninterpolated_average_precision() **(edited)**</span>
<span class="pl-s1">print</span>(<span class="pl-s">"AUC FIX = {:3f}"</span>.<span class="pl-en">format</span>(<span class="pl-c1">-</span><span class="pl-s1">np</span>.<span class="pl-en">sum</span>(<span class="pl-s1">np</span>.<span class="pl-en">diff</span>(<span class="pl-s1">r</span>) <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">minimum</span>(<span class="pl-s1">p</span>[:<span class="pl-c1">-</span><span class="pl-c1">1</span>], <span class="pl-s1">p</span>[<span class="pl-c1">1</span>:])))
<span class="pl-c">#>> AUC = 0.049147</span>
<span class="pl-c">#>> AUC TRAP. = 0.048174</span>
<span class="pl-c">#>> AUC FIX = 0.047200</span></pre></div>
<h4 dir="auto">Expected Results</h4>
<p dir="auto">AUC without interpolation = (0.294 - 0.235) * 0.800 = 0.472<br>
AUC with trapezoidal interpolation = 0.472 + (0.294 - 0.235) * (0.833 - 0.800) / 2 = 0.0482</p>
<h4 dir="auto">Actual Results</h4>
<p dir="auto">This is what sklearn implements for AUC without interpolation (<a href="https://scikit-learn.org/stable/modules/generated/sklearn.metrics.average_precision_score.html" rel="nofollow">https://scikit-learn.org/stable/modules/generated/sklearn.metrics.average_precision_score.html</a>):</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sum((r[i] - r[i+1]) * p[i] for i in range(len(p)-1))
>> 0.049147"><pre class="notranslate"><span class="pl-en">sum</span>((<span class="pl-s1">r</span>[<span class="pl-s1">i</span>] <span class="pl-c1">-</span> <span class="pl-s1">r</span>[<span class="pl-s1">i</span><span class="pl-c1">+</span><span class="pl-c1">1</span>]) <span class="pl-c1">*</span> <span class="pl-s1">p</span>[<span class="pl-s1">i</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-en">len</span>(<span class="pl-s1">p</span>)<span class="pl-c1">-</span><span class="pl-c1">1</span>))
<span class="pl-c1">>></span> <span class="pl-c1">0.049147</span></pre></div>
<p dir="auto">This is what I think is correct (<strong>no longer; see edit</strong>):</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sum((r[i] - r[i+1]) * p[i+1] for i in range(len(p)-1))
>> 0.047200"><pre class="notranslate"><span class="pl-en">sum</span>((<span class="pl-s1">r</span>[<span class="pl-s1">i</span>] <span class="pl-c1">-</span> <span class="pl-s1">r</span>[<span class="pl-s1">i</span><span class="pl-c1">+</span><span class="pl-c1">1</span>]) <span class="pl-c1">*</span> <span class="pl-s1">p</span>[<span class="pl-s1">i</span><span class="pl-c1">+</span><span class="pl-c1">1</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-en">len</span>(<span class="pl-s1">p</span>)<span class="pl-c1">-</span><span class="pl-c1">1</span>))
<span class="pl-c1">>></span> <span class="pl-c1">0.047200</span></pre></div>
<p dir="auto"><strong>EDIT:</strong> I found that the above 'correct' implementation doesn't always underestimate. It depends on the input. Therefore I have revised the uninterpolated AUC calculation to this:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sum((r[i] - r[i+1]) * min(p[i] + p[i+1]) for i in range(len(p)-1))
>> 0.047200"><pre class="notranslate"><span class="pl-en">sum</span>((<span class="pl-s1">r</span>[<span class="pl-s1">i</span>] <span class="pl-c1">-</span> <span class="pl-s1">r</span>[<span class="pl-s1">i</span><span class="pl-c1">+</span><span class="pl-c1">1</span>]) <span class="pl-c1">*</span> <span class="pl-en">min</span>(<span class="pl-s1">p</span>[<span class="pl-s1">i</span>] <span class="pl-c1">+</span> <span class="pl-s1">p</span>[<span class="pl-s1">i</span><span class="pl-c1">+</span><span class="pl-c1">1</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-en">len</span>(<span class="pl-s1">p</span>)<span class="pl-c1">-</span><span class="pl-c1">1</span>))
<span class="pl-c1">>></span> <span class="pl-c1">0.047200</span></pre></div>
<p dir="auto">This has the advantage that the AUC calculation is more consistent; it is either equal or underestimated, but never overestimated (compared to the current uninterpolated AUC function). Below I show some examples on what it does:</p>
<ul dir="auto">
<li>Example 1: all work fine</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="p = [0.3, 1.0]
r = [1.0, 0.0]
#Results:
>> 0.30 # sklearn's _binary_uninterpolated_average_precision()
>> 0.30 # my consistent _binary_uninterpolated_average_precision()
>> 0.65 # np.trapz() (trapezoidal interpolation)"><pre class="notranslate"><span class="pl-s1">p</span> <span class="pl-c1">=</span> [<span class="pl-c1">0.3</span>, <span class="pl-c1">1.0</span>]
<span class="pl-s1">r</span> <span class="pl-c1">=</span> [<span class="pl-c1">1.0</span>, <span class="pl-c1">0.0</span>]
<span class="pl-c">#Results:</span><span class="pl-s1"></span>
<span class="pl-c1">>></span> <span class="pl-c1">0.30</span> <span class="pl-c"># sklearn's _binary_uninterpolated_average_precision()</span><span class="pl-s1"></span>
<span class="pl-c1">>></span> <span class="pl-c1">0.30</span> <span class="pl-c"># my consistent _binary_uninterpolated_average_precision()</span>
<span class="pl-c1">>></span> <span class="pl-c1">0.65</span> <span class="pl-c"># np.trapz() (trapezoidal interpolation)</span></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/36004944/52123847-9a8ca780-2627-11e9-8abb-a313102e74ab.png"><img src="https://user-images.githubusercontent.com/36004944/52123847-9a8ca780-2627-11e9-8abb-a313102e74ab.png" alt="pr_curve1" style="max-width: 100%;"></a></p>
<ul dir="auto">
<li>Example 2: sklearn's _binary_uninterpolated_average_precision returns inaccurate number</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="p = [1.0, 0.3]
r = [1.0, 0.0]
#Results:
>> 1.00 # sklearn's _binary_uninterpolated_average_precision()
>> 0.30 # my consistent _binary_uninterpolated_average_precision()
>> 0.65 # np.trapz() (trapezoidal interpolation)"><pre class="notranslate"><span class="pl-s1">p</span> <span class="pl-c1">=</span> [<span class="pl-c1">1.0</span>, <span class="pl-c1">0.3</span>]
<span class="pl-s1">r</span> <span class="pl-c1">=</span> [<span class="pl-c1">1.0</span>, <span class="pl-c1">0.0</span>]
<span class="pl-c">#Results:</span><span class="pl-s1"></span>
<span class="pl-c1">>></span> <span class="pl-c1">1.00</span> <span class="pl-c"># sklearn's _binary_uninterpolated_average_precision()</span><span class="pl-s1"></span>
<span class="pl-c1">>></span> <span class="pl-c1">0.30</span> <span class="pl-c"># my consistent _binary_uninterpolated_average_precision()</span>
<span class="pl-c1">>></span> <span class="pl-c1">0.65</span> <span class="pl-c"># np.trapz() (trapezoidal interpolation)</span></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/36004944/52123845-99f41100-2627-11e9-8b55-f0957980ecd5.png"><img src="https://user-images.githubusercontent.com/36004944/52123845-99f41100-2627-11e9-8b55-f0957980ecd5.png" alt="pr_curve2" style="max-width: 100%;"></a></p>
<ul dir="auto">
<li>Example 3: extra example</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="p = [0.4, 0.1, 1.0]
r = [1.0, 0.9, 0.0]
#Results:
>> 0.13 # sklearn's _binary_uninterpolated_average_precision()
>> 0.10 # my consistent _binary_uninterpolated_average_precision()
>> 0.52 # np.trapz() (trapezoidal interpolation)"><pre class="notranslate"><span class="pl-s1">p</span> <span class="pl-c1">=</span> [<span class="pl-c1">0.4</span>, <span class="pl-c1">0.1</span>, <span class="pl-c1">1.0</span>]
<span class="pl-s1">r</span> <span class="pl-c1">=</span> [<span class="pl-c1">1.0</span>, <span class="pl-c1">0.9</span>, <span class="pl-c1">0.0</span>]
<span class="pl-c">#Results:</span><span class="pl-s1"></span>
<span class="pl-c1">>></span> <span class="pl-c1">0.13</span> <span class="pl-c"># sklearn's _binary_uninterpolated_average_precision()</span><span class="pl-s1"></span>
<span class="pl-c1">>></span> <span class="pl-c1">0.10</span> <span class="pl-c"># my consistent _binary_uninterpolated_average_precision()</span>
<span class="pl-c1">>></span> <span class="pl-c1">0.52</span> <span class="pl-c"># np.trapz() (trapezoidal interpolation)</span></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/36004944/52123846-9a8ca780-2627-11e9-8460-2ccb398dfa12.png"><img src="https://user-images.githubusercontent.com/36004944/52123846-9a8ca780-2627-11e9-8460-2ccb398dfa12.png" alt="pr_curve3" style="max-width: 100%;"></a></p>
<h4 dir="auto">Versions</h4>
<p dir="auto">Windows-10-10.0.17134-SP0<br>
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)]<br>
NumPy 1.14.0<br>
SciPy 1.0.0<br>
Scikit-Learn 0.19.1</p> | <p dir="auto">Hi,</p>
<p dir="auto">Scikit Learn seems to implement Precision Recall curves (and Average Precision values/AUC under PR curve) in a non-standard way, without documenting the discrepancy. The standard way of computing Precision Recall numbers is by interpolating the curve, as described here:<br>
<a href="http://nlp.stanford.edu/IR-book/html/htmledition/evaluation-of-ranked-retrieval-results-1.html" rel="nofollow">http://nlp.stanford.edu/IR-book/html/htmledition/evaluation-of-ranked-retrieval-results-1.html</a><br>
the motivation is to</p>
<ol dir="auto">
<li>Smooth out the kinks and reduce noise contribution to the score</li>
<li>In any practical application, if your PR curve ever went up, then you would strictly prefer to set your threshold there rather than at the original place (achieving both more precision and recall). Hence, people prefer to interpolate the curve, which better integrates out the threshold parameter and gives a more sensible estimate of the real performance.</li>
</ol>
<p dir="auto">This is also what standard code for Pascal VOC does and explain this in their writeup:<br>
<a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.157.5766&rep=rep1&type=pdf" rel="nofollow">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.157.5766&rep=rep1&type=pdf</a></p>
<p dir="auto">VL_FEAT also has options for interpolation:<br>
<a href="http://www.vlfeat.org/matlab/vl_pr.html" rel="nofollow">http://www.vlfeat.org/matlab/vl_pr.html</a><br>
and as shown in their code here: <a href="https://github.com/vlfeat/vlfeat/blob/edc378a722ea0d79e29f4648a54bb62f32b22568/toolbox/plotop/vl_pr.m">https://github.com/vlfeat/vlfeat/blob/edc378a722ea0d79e29f4648a54bb62f32b22568/toolbox/plotop/vl_pr.m</a></p>
<p dir="auto">The concern is that people using the scikit version will see incorrectly reported LOWER performance, than what they might see reported in other papers.</p> | 1 |
<pre class="notranslate">What steps will reproduce the problem?
1. Make a package X.
2. Write another package Y that (perhaps transitively) depends on X.
3. Write a test for package X that depends on Y, and have that test be in package X
(i.e. not in package X_test).
4. Build and run the test.
What is the expected output?
6l should refuse to link the test due to the cycle.
What do you see instead?
One of two things:
- 6l refuses to link the test due to "linker skew", or
- 6l links the test, and the resultant test binary ends up initialising package X twice.
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g/6l.
Which operating system are you using?
Linux.
Which revision are you using? (hg identify)
weekly.2011-06-16
(but it's been around since March)</pre> | <pre class="notranslate">this code fails with the following error messages:
under revision d5e8f3fa95c4 tip.
/tmp/go-build221965265/local/test/_obj/_cgo_gotypes.go:14: invalid recursive type
_Ctype_U
/tmp/go-build221965265/local/test/_obj/_cgo_gotypes.go:14: invalid recursive type
_Ctype_union___0
this might easily be the same as <a href="https://golang.org/issue/3082" rel="nofollow">issue #3082</a>.
package foo
/*
typedef union
{
int a;
} U;
U* mkT() {
return 0;
}
*/
import "C"
func Foo() {
C.mkT()
}</pre> | 0 |
<p dir="auto">Regular expressions that include a Unicode category matcher throw an error, while they work fine in Node and in Chrome.</p>
<p dir="auto">Example:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""0a".match(/\p{L}/u);"><pre class="notranslate"><span class="pl-s">"0a"</span><span class="pl-kos">.</span><span class="pl-en">match</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">\p<span class="pl-kos">{</span>L<span class="pl-kos">}</span></span><span class="pl-c1">/</span>u</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Expected output:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[ 'a', index: 1, input: '0a', groups: undefined ]"><pre class="notranslate"><span class="pl-kos">[</span> <span class="pl-s">'a'</span><span class="pl-kos">,</span> <span class="pl-s1">index</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-s1">input</span>: <span class="pl-s">'0a'</span><span class="pl-kos">,</span> <span class="pl-s1">groups</span>: <span class="pl-c1">undefined</span> <span class="pl-kos">]</span></pre></div>
<p dir="auto">Actual output:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<unknown>:1:5
"0a".match(/\p{L}/u)
^
Uncaught SyntaxError: Invalid regular expression: /\p{L}/: Invalid property name
at <unknown>:1:6
at evaluate (js/repl.ts:87:34)
at replLoop (js/repl.ts:145:13)"><pre class="notranslate"><span class="pl-c1"><</span><span class="pl-ent">unknown</span><span class="pl-c1">></span>:1:5
"0a".match(/\p<span class="pl-kos">{</span><span class="pl-v">L</span><span class="pl-kos">}</span>/u)
^
Uncaught SyntaxError: Invalid regular expression: /\p<span class="pl-kos">{</span><span class="pl-v">L</span><span class="pl-kos">}</span>/: Invalid property name
at <span class="pl-c1"><</span><span class="pl-ent">unknown</span><span class="pl-c1">></span>:1:6
at evaluate (js/repl.ts:87:34)
at replLoop (js/repl.ts:145:13)</pre></div>
<p dir="auto">I brought this up on Gitter and it was suspected to be due to the lack of ICU.</p> | <p dir="auto">As seen in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="422116599" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1952" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1952/hovercard" href="https://github.com/denoland/deno/issues/1952">#1952</a> / <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="405562913" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1636" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1636/hovercard" href="https://github.com/denoland/deno/issues/1636">#1636</a> ICU needs to be added in Deno build.</p>
<p dir="auto">Switching this flag to true maybe: <a href="https://github.com/denoland/deno/blob/master/.gn#L50">https://github.com/denoland/deno/blob/master/.gn#L50</a> ?</p>
<p dir="auto">ref: <a href="https://v8.dev/docs/i18n" rel="nofollow">https://v8.dev/docs/i18n</a></p> | 1 |
<p dir="auto">"Glide" network load library how to configure the combination of "android-gif-drawable" library.<br>
"android-gif-drawable":<a href="https://github.com/koral--/android-gif-drawable">https://github.com/koral--/android-gif-drawable</a>.</p>
<p dir="auto">Now I use the "Glide" network to load the library, and then pass Gifdrawable the gifImageView, but the two fragment switch, at the same time, each fragment which has a list of loading gif picture, switch, the list of gif graphics display animation card pause.</p> | <p dir="auto">Gif animation in <strong>recyclerview</strong> stop playing after scrolling and if i scroll again two or three times animation automatically starts again. This problem doesn't occur always. I am using glide 3.7.0-SNAPSHOT. I am using glide in code like this:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(context)
.load(MyApp.INSTANCE.getUser().getUserAvatar())
.fitCenter()
.centerCrop()
.thumbnail(0.1f)
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.placeholder(R.drawable.ic_profile_picture)
.into(holder.imageView); "><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">context</span>)
.<span class="pl-en">load</span>(<span class="pl-smi">MyApp</span>.<span class="pl-c1">INSTANCE</span>.<span class="pl-en">getUser</span>().<span class="pl-en">getUserAvatar</span>())
.<span class="pl-en">fitCenter</span>()
.<span class="pl-en">centerCrop</span>()
.<span class="pl-en">thumbnail</span>(<span class="pl-c1">0.1f</span>)
.<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">SOURCE</span>)
.<span class="pl-en">placeholder</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">ic_profile_picture</span>)
.<span class="pl-en">into</span>(<span class="pl-s1">holder</span>.<span class="pl-s1">imageView</span>); </pre></div>
<p dir="auto">Am I doing something wrong ?</p> | 1 |
<p dir="auto">Hi all,</p>
<p dir="auto">first and foremost, thanks very much for Next.js. It's great.</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">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">In versions prior to 5, our ssr was functioning as expected for every page.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Since we upgraded to 5, the page mapped as in<br>
<a href="https://github.com/em-casa/frontend/blob/master/server.js#L39">https://github.com/em-casa/frontend/blob/master/server.js#L39</a><br>
started flashing 404 and displaying if rendered server-side (losing the context).</p>
<p dir="auto">I ended up making a bare-bones page just to make sure, see<br>
<a href="https://github.com/em-casa/frontend/blob/fix-filtered-calls-to-url/pages/listings/index.js">https://github.com/em-casa/frontend/blob/fix-filtered-calls-to-url/pages/listings/index.js</a><br>
and it still happens.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>In production: <a href="https://emcasa.com/imoveis" rel="nofollow">https://emcasa.com/imoveis</a></li>
<li>A branch that if cloned will reproduce the issue without needing the backend:<br>
<a href="https://github.com/em-casa/frontend/tree/fix-filtered-calls-to-url">https://github.com/em-casa/frontend/tree/fix-filtered-calls-to-url</a></li>
<li>If testing locally, the page in question is <code class="notranslate">localhost:3000/imoveis</code></li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">I tried to make sure this isn't an Express issue or anything of the sort. Wonder if anyone has been experiencing something similar. Any help will be greatly appreciated.</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>5.0.0</td>
</tr>
<tr>
<td>node</td>
<td>9.5.0</td>
</tr>
<tr>
<td>OS</td>
<td>macOS highSierra</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table> | <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">The page loads on IE 11.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">An error is thrown.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="296140338" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/10237" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/10237/hovercard" href="https://github.com/mui/material-ui/issues/10237">mui/material-ui#10237</a></li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto"><code class="notranslate">startsWith()</code> isn't supported by IE 11.<br>
<a href="https://github.com/zeit/next.js/blob/85f341c9d834114be1127cf73a04bc3517cc2f67/lib/head.js#L63">https://github.com/zeit/next.js/blob/85f341c9d834114be1127cf73a04bc3517cc2f67/lib/head.js#L63</a></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>5.0.0</td>
</tr>
<tr>
<td>node</td>
<td>9.4.0</td>
</tr>
<tr>
<td>OS</td>
<td></td>
</tr>
<tr>
<td>browser</td>
<td></td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | 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.18363.836]
PowerToys version: v0.18.2
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run"><pre class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18363.836]
PowerToys version: v0.18.2
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Run PowerToys as Admin<br>
Attempt to launch PT Run via Alt+Space shortcut</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">PowerToys Run should trigger, displaying UI</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">PowerToys Run does not trigger</p>
<h1 dir="auto">Screenshots</h1>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7157790/83909992-6d766a80-a72f-11ea-9be6-e7e14df8bb35.gif"><img src="https://user-images.githubusercontent.com/7157790/83909992-6d766a80-a72f-11ea-9be6-e7e14df8bb35.gif" alt="As Admin" data-animated-image="" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7157790/83910029-79fac300-a72f-11ea-857d-d5a776dfc147.gif"><img src="https://user-images.githubusercontent.com/7157790/83910029-79fac300-a72f-11ea-857d-d5a776dfc147.gif" alt="As Standard User" data-animated-image="" style="max-width: 100%;"></a></p> | <h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">Right now, it seems like only Shortcuts in the format of "Alt + KEY" or "Ctrl + KEY" are supported. Some people have special keys or remapped keys (my Capslock is F15 for example) and would like to use these as shortcut. Right now, it's not transparent what would be an accepted shortcut and what wouldn't. Right now the best workaround is to remap not accepted key combinations to combinations that would be accepted. This is awkward.</p>
<p dir="auto">I propose that users should have more freedom in setting their shortcuts.</p> | 0 |
<p dir="auto"><a href="https://stackoverflow.com/questions/48453346/arguments-for-imshow-in-matplotlib-are-ambiguous" rel="nofollow">This Stackoverflow question</a> brings the confusing matrix dimensions used in the <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imshow.html?highlight=matplotlib%20pyplot%20imshow#matplotlib.pyplot.imshow" rel="nofollow"><code class="notranslate">imshow</code> documentation</a> to our attention.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/23121882/35418515-e0bc43f6-0232-11e8-8797-f2ed98149f80.png"><img src="https://user-images.githubusercontent.com/23121882/35418515-e0bc43f6-0232-11e8-8797-f2ed98149f80.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">According to the docstring one may use arrays of shapes <code class="notranslate">(n, m)</code> etc. which are then named <code class="notranslate">MxN</code>.</p>
<p dir="auto">However, according to <a href="https://en.wikipedia.org/wiki/Matrix_(mathematics)" rel="nofollow">wikipedia</a></p>
<blockquote>
<p dir="auto">A matrix with m rows and n columns is called an m × n matrix or m-by-n matrix.</p>
</blockquote>
<p dir="auto">This is also the convention used by numpy, e.g. the <a href="https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.ndarray.html" rel="nofollow">arrays.ndarray.html</a> speaks about</p>
<blockquote>
<p dir="auto">A 2-dimensional array of size 2 x 3, composed of 4-byte integer elements:<br>
<code class="notranslate">x = np.array([[1, 2, 3], [4, 5, 6]], np.int32)</code></p>
</blockquote>
<p dir="auto">The documentation should therefore either speak of</p>
<ul dir="auto">
<li>shape <code class="notranslate">(n, m)</code>, or <code class="notranslate">n x m</code> array (<code class="notranslate">nxm</code> looks strange)</li>
<li>shape <code class="notranslate">(N, M)</code> or <code class="notranslate">NxM</code> array</li>
<li>shape <code class="notranslate">(m, n)</code> or <code class="notranslate">m x n</code> array</li>
<li>shape <code class="notranslate">(M, N)</code> or <code class="notranslate">M x N</code> array</li>
</ul>
<p dir="auto">Now, which is better? All capitalized or not, <code class="notranslate">n</code> or <code class="notranslate">m</code> being rows?</p> | <h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Using savefig to pdf and png, outputs are different.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import matplotlib.pyplot as plt
from matplotlib.offsetbox import AnchoredText
fig, ax = plt.subplots(1, 1, figsize=(3.2, 3.2))
ax.imshow(np.random.rand(100 ,100), cmap='Blues', vmin=-0.1, vmax=0.8)
at = AnchoredText("texts",
prop=dict(size=12), frameon=True,
loc='upper left',borderpad=0.05,
)
#at.patch.set_boxstyle("round, pad=0.,rounding_size=0.2")
at.patch.set_alpha(0.5)
at.patch.set_edgecolor([1, 1, 1, 0.5])
at.patch.set_linewidth(1)
ax.add_artist(at)
fig.savefig('test.pdf', dpi=300)
fig.savefig('test.png', dpi=300, transparent=False) "><pre class="notranslate"><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">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">matplotlib</span>.<span class="pl-s1">offsetbox</span> <span class="pl-k">import</span> <span class="pl-v">AnchoredText</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-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">3.2</span>, <span class="pl-c1">3.2</span>))
<span class="pl-s1">ax</span>.<span class="pl-en">imshow</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-c1">100</span> ,<span class="pl-c1">100</span>), <span class="pl-s1">cmap</span><span class="pl-c1">=</span><span class="pl-s">'Blues'</span>, <span class="pl-s1">vmin</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">0.1</span>, <span class="pl-s1">vmax</span><span class="pl-c1">=</span><span class="pl-c1">0.8</span>)
<span class="pl-s1">at</span> <span class="pl-c1">=</span> <span class="pl-v">AnchoredText</span>(<span class="pl-s">"texts"</span>,
<span class="pl-s1">prop</span><span class="pl-c1">=</span><span class="pl-en">dict</span>(<span class="pl-s1">size</span><span class="pl-c1">=</span><span class="pl-c1">12</span>), <span class="pl-s1">frameon</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">loc</span><span class="pl-c1">=</span><span class="pl-s">'upper left'</span>,<span class="pl-s1">borderpad</span><span class="pl-c1">=</span><span class="pl-c1">0.05</span>,
)
<span class="pl-c">#at.patch.set_boxstyle("round, pad=0.,rounding_size=0.2")</span>
<span class="pl-s1">at</span>.<span class="pl-s1">patch</span>.<span class="pl-en">set_alpha</span>(<span class="pl-c1">0.5</span>)
<span class="pl-s1">at</span>.<span class="pl-s1">patch</span>.<span class="pl-en">set_edgecolor</span>([<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0.5</span>])
<span class="pl-s1">at</span>.<span class="pl-s1">patch</span>.<span class="pl-en">set_linewidth</span>(<span class="pl-c1">1</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">add_artist</span>(<span class="pl-s1">at</span>)
<span class="pl-s1">fig</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'test.pdf'</span>, <span class="pl-s1">dpi</span><span class="pl-c1">=</span><span class="pl-c1">300</span>)
<span class="pl-s1">fig</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'test.png'</span>, <span class="pl-s1">dpi</span><span class="pl-c1">=</span><span class="pl-c1">300</span>, <span class="pl-s1">transparent</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) </pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<p dir="auto">pdf:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/15790176/110589554-8e358a00-81b1-11eb-9f02-8b78ead25127.png"><img src="https://user-images.githubusercontent.com/15790176/110589554-8e358a00-81b1-11eb-9f02-8b78ead25127.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">png:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/15790176/110589579-9a214c00-81b1-11eb-9b43-cc2c73959740.png"><img src="https://user-images.githubusercontent.com/15790176/110589579-9a214c00-81b1-11eb-9b43-cc2c73959740.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">PNG output has extra lines around the text, which is undesired.</p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: Windows 10</li>
<li>Matplotlib version (<code class="notranslate">import matplotlib; print(matplotlib.__version__)</code>): 3.3.4</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): Qt5Agg</li>
<li>Python version: 3.7</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries:</li>
</ul> | 0 |
<pre class="notranslate">The strconv package's ParseFloat / ParseInt only take string.
To reduce allocations, I need to parse an int from a []byte.
I attempted to convert strconv's Parse internals to use []byte instead, and then make
the existing string versions make an unsafe []byte of the string's memory using
reflect.SliceHeader / reflect.StringHeader, but the reflect package already depends on
strconv, so there's an import loop.</pre> | <pre class="notranslate">From golang-dev:
"""
Matthew Endsley:
I was testing the go1.3rc1 release on our codebase and found it failed one of our test
cases involving http responses.
It appears that in some cases, http.Response.Write will emit 2 Content-Length headers. A
short example the reproduces the behavior can be found here:
<a href="http://play.golang.org/p/qsH1MeVSHu" rel="nofollow">http://play.golang.org/p/qsH1MeVSHu</a>
In go 1.2 this generated the following output:
HTTP/1.1 200 OK
Content-Length: 0
In go1.3rc1 I'm getting the following:
HTTP/1.1 200 OK
Content-Length: 0
Content-Length: 0
For reference, on current tip (087e446f2c41) I see the same output as go1.3rc1
As a side note, this issue only occurs if response.Request.Method is "POST".
If the request method is "GET" the duplicate Content-Length is not emitted.
"""
The problem was introduced in revision b2ebbbcfc615 for fixing <a href="https://golang.org/issue/5381" rel="nofollow">issue #5381</a>. The net/http
Server doesn't use this code, but it is a regression from 1.2. In the earlier fix, I
didn't take care of the case where PUT/POST were special-cased in transfer.go ages ago
in revision 4d792b5bea35 for HTTP Requests, but the transfer code deals with both
Requests and Responses, so a Content-Length of length 0 was always being sent for
Responses too. That code deserves a second look in Go 1.4, but will fix minimally for
now.</pre> | 0 |
<h2 dir="auto">STR</h2>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="extern {
static error_message_count: u32; // anything will do
}
pub static BAZ: u32 = *&error_message_count;
fn main() {}"><pre class="notranslate"><span class="pl-k">extern</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> error_message_count<span class="pl-kos">:</span> <span class="pl-smi">u32</span><span class="pl-kos">;</span> <span class="pl-c">// anything will do</span>
<span class="pl-kos">}</span>
<span class="pl-k">pub</span> <span class="pl-k">static</span> <span class="pl-v">BAZ</span><span class="pl-kos">:</span> <span class="pl-smi">u32</span> = <span class="pl-c1">*</span><span class="pl-c1">&</span>error_message_count<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-kos">}</span></pre></div>
<h2 dir="auto"></h2> | <h1 dir="auto">Native pointer vectors</h1>
<p dir="auto">This bug is a <em>request for comment</em>. I am but a novice Rust developer, but I suspect that this would be a strong addition to the language.</p>
<p dir="auto">The exact mechanics were fleshed out further in this bug; read down for more on what actually was implemented.</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">While working on bindings for FFTW (the Fastest Fourier Transform in the West), I ran into the hairy issue that it doesn't seem possible to have Rust hold vector pointers to the outside world. What do I mean by this -- and why do we care? Well, I'll provide (a distilled version of) the FFTW APIs in question, by way of example:</p>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="double *fftw_malloc(size_t sz);
fftw_plan_t *fftw_plan_fft(size_t n, double *in, double *out, int flags); /* morally */
void fftw_execute(fftw_plan_t *plan);"><pre class="notranslate"><span class="pl-smi">double</span> <span class="pl-c1">*</span><span class="pl-en">fftw_malloc</span>(<span class="pl-smi">size_t</span> <span class="pl-s1">sz</span>);
<span class="pl-smi">fftw_plan_t</span> <span class="pl-c1">*</span><span class="pl-en">fftw_plan_fft</span>(<span class="pl-smi">size_t</span> <span class="pl-s1">n</span>, <span class="pl-smi">double</span> <span class="pl-c1">*</span><span class="pl-s1">in</span>, <span class="pl-smi">double</span> <span class="pl-c1">*</span><span class="pl-s1">out</span>, <span class="pl-smi">int</span> <span class="pl-s1">flags</span>); <span class="pl-c">/* morally */</span>
<span class="pl-smi">void</span> <span class="pl-en">fftw_execute</span>(<span class="pl-smi">fftw_plan_t</span> <span class="pl-c1">*</span><span class="pl-s1">plan</span>);</pre></div>
<p dir="auto">The general course of action when using FFTW is to use <code class="notranslate">fftw_malloc</code> to get a chunk of space to store your inputs and outputs, then create a "plan" with <code class="notranslate">fftw_plan</code> (a potentially expensive operation, but if you intend to run many FFTs, ultimately time-saving), and then finally execute the plan with <code class="notranslate">fftw_execute</code> when you've populated your buffers. You can <code class="notranslate">fftw_execute</code> the same plan many times (and, in fact, if you can, you should!) after refilling the buffers and taking data out.</p>
<p dir="auto">In FFTW-land, <code class="notranslate">fftw_malloc</code> is not strictly necessary as the only way to get memory, but it's a Damn Good Idea -- and as I'll discuss in a moment, not using it doesn't save us. <code class="notranslate">fftw_malloc</code> goes out of its way to obtain memory that has "nice" properties; for instance, it tries hard to align things not just to <code class="notranslate">double</code> boundaries, but also to cache lines, depending on how much memory you ask for. If it knows anything else interesting about your system, it takes that into account. So, it's not fatal to not use it, if that's the only thing you can do ... but it sure does hurt.</p>
<p dir="auto">Currently, in Rust, there is no way to import a pointer from the outside world and use it mutably, nor is there a way to tell Rust that this pointer may be written to by an outside API. The closest thing that Rust has is <code class="notranslate">vec::unsafe::from_buf</code>, which in turn calls <code class="notranslate">rustrt::vec_from_buf_shared</code>, but the first thing that <code class="notranslate">vec_from_buf_shared</code> does is <em>allocate a new space and copy the memory away</em>! This makes it unsuitable for referencing both the <code class="notranslate">in</code> and the <code class="notranslate">out</code> pointers; changing a pointer that has been imported through this mechanism will cause changes not to get written back to the outside world, and executing a transform to (and overwriting the contents of) a pointer that has been imported through this mechanism will cause Rust to not see the changes that happen after the copy.</p>
<p dir="auto">In this case, we have another option, though. We could create a vector inside Rust, and use <code class="notranslate">vec::unsafe::to_ptr</code> to create a pointer to it. This will work, but it is dangerously broken (violates safety) in three ways. In the first, Rust is not in control of the lifecycle of the external reference; Rust cannot know when the external reference no longer exists, and may prematurely garbage collect the vector. This can happen, for instance, in the case in which a reference to the <code class="notranslate">out</code> pointer is still live, and a reference to the plan is still live, but the reference to the <code class="notranslate">in</code> pointer is dead; calling <code class="notranslate">fftw_execute</code> on this <code class="notranslate">plan</code> will result in doing accesses to the dead <code class="notranslate">in</code> vector, which may have been garbage collected.</p>
<p dir="auto">In the second, Rust may reallocate memory out from under the external application. The vector can be appended to, which may cause a reallocation to occur. The external application's pointer will not be updated, and when it goes to access that pointer, that memory will be dead. In the case of a "correct" usage, this will not occur (i.e., the programmer can be instructed not to do that), but this violates safety; at the very least, <code class="notranslate">+=</code> now becomes an <code class="notranslate">unsafe</code> operation.</p>
<p dir="auto">In the third, perhaps most compellingly, this locks Rust into a world in which it is not permissible to have a copying garbage collector. Right now, Rust does ref-counting and garbage collection with free()... but this need not always be the case! Another implementation of Rust could very conceivably experiment with garbage collection schemes for better performance. If the behavior of pointers were already specified, it would be one story, but currently that behavior is not -- and I argue, for the better.</p>
<p dir="auto">In short, the language's existing capabilities for this are not sufficient to operate with at least one API.</p>
<h2 dir="auto">Use cases</h2>
<p dir="auto">The FFTW API is not the only system in which the current capabilities for referring to native memory are insufficient. Consider also:</p>
<ul dir="auto">
<li>A framebuffer interface, in which an external resource has <code class="notranslate">mmap()</code>ed some memory. Accesses must go to exactly those addresses; none else will do.</li>
<li>A command queue interface, in which a set of commands are provided for an external device (say, a graphics card) to DMA to and from chunks of memory. (This is how modern graphics cards operate.) Accesses must go to some prescribed address, usually managed through a remote resource manager (DRI, et al); no other address will do.</li>
</ul>
<p dir="auto">These are both examples of requiring a specific address... recall, however, that there are surely many applications that require some mutable chunk of memory, any mutable chunk at all! Consider, for instance, the <code class="notranslate">ioctl()</code> interface on Linux, which has a similar "combination input/output buffer".</p>
<p dir="auto">The FFTW API is one of many cases that require mutable memory accessible to the native system.</p>
<h2 dir="auto">Proposed solution</h2>
<p dir="auto">I propose the addition of a vector qualifier, <code class="notranslate">[native T]</code>. The type <code class="notranslate">[native T]</code> does not unify with <code class="notranslate">[T]</code>; it is mainly distinct from the normal vector, but that dereferencing indexes in it and iterating over it both work.</p>
<p dir="auto">The type <code class="notranslate">[native T]</code> has one introduction form:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="unsafe fn std::vec::unsafe::native<T>(ptr: *T, elts: uint) -> [native T];"><pre class="notranslate"><span class="pl-k">unsafe</span> <span class="pl-k">fn</span> std<span class="pl-kos">::</span>vec<span class="pl-kos">::</span>unsafe<span class="pl-kos">::</span>native<<span class="pl-v">T</span>><span class="pl-kos">(</span>ptr<span class="pl-kos">:</span> <span class="pl-c1">*</span><span class="pl-v">T</span><span class="pl-kos">,</span> elts<span class="pl-kos">:</span> uint<span class="pl-kos">)</span> -> <span class="pl-kos">[</span>native <span class="pl-v">T</span><span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">The following elimination forms of vectors function for native vectors:</p>
<ul dir="auto">
<li><code class="notranslate">v[a]</code> as an expression (with size checking)</li>
<li><code class="notranslate">v[a]</code> as an lvalue (with size checking)</li>
<li><code class="notranslate">for t: T in v</code> as a loop construct</li>
</ul>
<p dir="auto">Notably, the following form does not function:</p>
<ul dir="auto">
<li><code class="notranslate">v += vp</code> as an append</li>
</ul>
<p dir="auto">When a native vector goes out of scope, the native memory pointed to is not modified or otherwise operated upon.</p>
<p dir="auto">These are the basic rules for a native vector.</p>
<h2 dir="auto">Implementation</h2>
<p dir="auto">A native vector has the following internal representation:</p>
<p dir="auto"><code class="notranslate">type native_repr<T> = { len: uint, data: *T };</code></p>
<p dir="auto">It is distinct in the type system because it does not share a representation with a Rust vector. This choice was made to avoid the performance cost of having to check at run time whether any given vector is a Rust vector or a native vector before accessing it.</p>
<p dir="auto">Translation is presumably very similar to Rust vectors.</p>
<p dir="auto">It could be the case that no <code class="notranslate">rustrt</code> support is needed for this, since the <code class="notranslate">native_repr</code> type can be constructed purely in Rust, and then can be <code class="notranslate">reinterpret_cast</code>ed into a native vector.</p>
<h2 dir="auto">Extensions</h2>
<p dir="auto">The above describes a basic semantics for a native vector. It provides a semantics sufficient to behave safely, but missing are two potentially useful extensions. These are optional, and certainly not required for a first pass implementation, but would make the native vector substantially more usable.</p>
<h3 dir="auto"><code class="notranslate">[native? T]</code> unification</h3>
<p dir="auto">There is currently a substantial vector library built up to operate on Rust vectors. Just because some operations do not apply, it does not make sense to have to duplicate the ones that do. For that, I propose the <code class="notranslate">[native? T]</code> qualifier, similar to <code class="notranslate">[mutable? T]</code>. Presumably a separate code path would have to be emitted at translate time. I do not know enough about the inner workings of <code class="notranslate">mutable?</code> to comment on how similar this might be, and how possible this might be given the existing Rust codebase.</p>
<h3 dir="auto">Built in destructors</h3>
<p dir="auto">It can be potentially useful to have Rust take over lifecycle management of memory, if the FFI binding builder is careful. Classically, the mechanism by which one might do this is as such:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type mem = {
vec : [native f64],
dtor : @mem_res
};
fn malloc(n : uint) -> mem {
let mem = fftw_native::fftw_malloc(n * 8u);
ret { vec: unsafe { vec::unsafe::native(mem as *f64, n) }, dtor: @mem_res(mem) };
}
resource mem_res(mem: fftw_native::mem) {
fftw_native::fftw_free(mem);
}"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">mem</span> = <span class="pl-kos">{</span>
<span class="pl-smi">vec</span> <span class="pl-kos">:</span> <span class="pl-kos">[</span><span class="pl-smi">native</span> f64<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-smi">dtor</span> <span class="pl-kos">:</span> @<span class="pl-smi">mem_res</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">malloc</span><span class="pl-kos">(</span><span class="pl-s1">n</span> <span class="pl-kos">:</span> <span class="pl-smi">uint</span><span class="pl-kos">)</span> -> <span class="pl-smi">mem</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> mem = fftw_native<span class="pl-kos">::</span><span class="pl-en">fftw_malloc</span><span class="pl-kos">(</span>n <span class="pl-c1">*</span> <span class="pl-c1">8</span>u<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">ret</span> <span class="pl-kos">{</span> <span class="pl-c1">vec</span><span class="pl-kos">:</span> <span class="pl-k">unsafe</span> <span class="pl-kos">{</span> vec<span class="pl-kos">::</span>unsafe<span class="pl-kos">::</span><span class="pl-en">native</span><span class="pl-kos">(</span>mem <span class="pl-k">as</span> <span class="pl-c1">*</span><span class="pl-smi">f64</span><span class="pl-kos">,</span> n<span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">dtor</span><span class="pl-kos">:</span> @<span class="pl-en">mem_res</span><span class="pl-kos">(</span>mem<span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">resource</span> mem_res<span class="pl-kos">(</span>mem<span class="pl-kos">:</span> fftw_native<span class="pl-kos">::</span>mem<span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-kos">{</span>
fftw_native<span class="pl-kos">::</span><span class="pl-en">fftw_free</span><span class="pl-kos">(</span>mem<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">This has the unfortunate downside that a user of the API can extract the <code class="notranslate">vec</code> from the <code class="notranslate">type mem</code>, and let the <code class="notranslate">type mem</code> itself go out of scope (or otherwise become dead). When the <code class="notranslate">type mem</code> itself becomes dead, the resource can immediately be freed, even though the native vector may still be live; this can violate safety.</p>
<p dir="auto">A native vector, then, may wish to have an introduction form that includes a resource pointer associated with it, for built-in cleanup.</p>
<h2 dir="auto">Conclusion</h2>
<p dir="auto">In this document, I describe a new form of vector called the native vector. The native vector allows Rust to safely interact with external memory. The introduction form is unsafe, so although it would permit inter-task shared memory communication, it does not do so in a particularly novel fashion. This proposed solution addresses all of the mentioned use cases in what seems (to the untrained eye!) like an elegant, Rust-like fashion.</p>
<p dir="auto">Thoughts?</p> | 0 |
<p dir="auto">Geometries having Face4's with MeshFaceMaterial assigned will throw a "map error" after merging vertices with Geometry.mergeVertices.</p>
<p dir="auto">Reason is obvious: mergeVertices triangulates the Face4 to two Face3's but doesn't copy over Face4.materialIndex.</p>
<p dir="auto">So after mergeVertices the geometry contains Face3's without Face3.materialIndex set.<br>
Then of course MeshFaceMaterial can't find its material.</p> | <p dir="auto"><strong>Describe the bug</strong></p>
<p dir="auto">TypeScript projects that import the typings from <code class="notranslate">examples/jsm/modifiers/CurveModifier.d.ts</code>, or <code class="notranslate">TessellateModifier.d.ts</code> fail to compile due to some type errors.</p>
<p dir="auto"><strong>In <code class="notranslate">CurveModifier.d.ts</code></strong><br>
<code class="notranslate">Material</code> is imported several times at the start resulting in duplicate identifiers:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { Geometry, Material, Mesh } from '../../../build/three.module';
import {
DataTexture,
Curve,
Uniform,
Material,
InstancedMesh
} from '../../../src/Three';"><pre class="notranslate"><code class="notranslate">import { Geometry, Material, Mesh } from '../../../build/three.module';
import {
DataTexture,
Curve,
Uniform,
Material,
InstancedMesh
} from '../../../src/Three';
</code></pre></div>
<p dir="auto">I believe the solution to this is to remove that first import line, moving <code class="notranslate">Geomery</code> and <code class="notranslate">Mesh</code> into the import line below it.</p>
<p dir="auto">This line looks to refer to the accompanying <code class="notranslate">js</code> file, and introduces a duplicate identifier:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { Flow } from './CurveModifier';"><pre class="notranslate"><code class="notranslate">import { Flow } from './CurveModifier';
</code></pre></div>
<p dir="auto">I believe the solution is to remove the line.</p>
<p dir="auto">The use of <code class="notranslate">Curve</code> in this file is missing a type argument. I'm not sure what <code class="notranslate">Flow</code> does so I'm not sure what value that argument should be, but perhaps it should be <code class="notranslate">THREE.Vector3</code>?</p>
<p dir="auto"><strong>In TessellateModifier.d.ts</strong></p>
<p dir="auto">There are some initializers despite this being an ambient context:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="maxEdgeLength: number = 0.1;
maxIterations: number = 6;
maxFaces: number = Infinity;"><pre class="notranslate"><code class="notranslate">maxEdgeLength: number = 0.1;
maxIterations: number = 6;
maxFaces: number = Infinity;
</code></pre></div>
<p dir="auto">I believe these should not provide values.</p>
<p dir="auto">Let me know if I've messed something up in my TypeScript settings though <g-emoji class="g-emoji" alias="joy" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f602.png">😂</g-emoji> . I can probably provide a PR with these fixes if it's helpful!</p> | 0 |
<ul dir="auto">
<li>VSCode Version: > 1.1</li>
<li>OS Version: Ubuntu Mate / Linux</li>
</ul>
<p dir="auto">It would be good if VS Code Supports Raspberry Pi 2/3 or provide arm binaries alongside the x86 and x86-64 binaries for linux</p> | <ul dir="auto">
<li>have a watch expression</li>
</ul>
<p dir="auto">you cannot select to copy the value of the watch expression</p> | 0 |
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Run FancyZones from the second monitor (on my machine it's monitor one, but monitor two is the primary monitor).</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The Choose Your Layout shows an overlay which should cover the monitor.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">It's offset to the left by half the monitor width.. So all I see is the right half of the overlay, overlaying the left half of the monitor. Other than that it works, for example I can edit the layout (the right half of it), and when I apply it it applies correctly over the whole monitor. Same if I select an existing template. It's just the overlay experience that's offset.</p>
<h1 dir="auto">Screenshots</h1> | <p dir="auto">Originally reported by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/brenca/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/brenca">@brenca</a></p>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Primary monitor at 125% or any other scaling that is not 100%<br>
Second monitor on the left of the primary monitor.<br>
Open FZ editor on second monitor and select the <code class="notranslate">Columns</code> layout.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The three columns should fit the monitor.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The columns are shifted to the right and cover part of the primary monitor.<br>
If the second monitor is also scaling at 125% the layout is shifted to the left.</p>
<h1 dir="auto">Screenshots</h1>
<p dir="auto">More details here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="508579500" data-permission-text="Title is private" data-url="https://github.com/microsoft/PowerToys/issues/520" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/PowerToys/pull/520/hovercard" href="https://github.com/microsoft/PowerToys/pull/520">#520</a></p> | 1 |
<p dir="auto">Opened atom today and found the console open, and saying this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="activate linter-csslint /home/ubuntu/.atom/packages/linter-csslint/lib/init.coffee:11
activate linter-jshint /home/ubuntu/.atom/packages/linter-jshint/lib/init.coffee:11
activate linter-write-good /home/ubuntu/.atom/packages/linter-write-good/lib/init.coffee:11
Window load time: 866ms index.js:46
TypeError: undefined is not a function
at InlineView.render (/home/ubuntu/.atom/packages/linter/lib/inline-view.coffee:13:23)
at LinterView.updateViews (/home/ubuntu/.atom/packages/linter/lib/linter-view.coffee:200:19)
at LinterView.display (/home/ubuntu/.atom/packages/linter/lib/linter-view.coffee:188:6)
at /home/ubuntu/.atom/packages/linter/lib/linter-view.coffee:75:10
at Config.module.exports.Config.observeKeyPath (/usr/share/atom/resources/app/src/config.js:556:9)
at Config.module.exports.Config.observe (/usr/share/atom/resources/app/src/config.js:133:21)
at LinterView.handleConfigChanges (/home/ubuntu/.atom/packages/linter/lib/linter-view.coffee:72:36)
at new LinterView (/home/ubuntu/.atom/packages/linter/lib/linter-view.coffee:36:6)
at /home/ubuntu/.atom/packages/linter/lib/init.coffee:77:24
at /usr/share/atom/resources/app/src/workspace.js:278:16
at /usr/share/atom/resources/app/src/workspace.js:323:18
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:71:11)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (/usr/share/atom/resources/app/src/pane-container.js:361:27)
at /usr/share/atom/resources/app/src/pane-container.js:348:26
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:71:11)
at Pane.module.exports.Pane.addItem (/usr/share/atom/resources/app/src/pane.js:320:20)
at Pane.module.exports.Pane.activateItem (/usr/share/atom/resources/app/src/pane.js:299:14)
at /usr/share/atom/resources/app/src/workspace.js:483:16
at _fulfilled (/usr/share/atom/resources/app/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/share/atom/resources/app/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/share/atom/resources/app/node_modules/q/q.js:749:13)
at /usr/share/atom/resources/app/node_modules/q/q.js:557:44
at flush (/usr/share/atom/resources/app/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:378:11)
/usr/share/atom/resources/app/src/workspace.js:499(anonymous function) /usr/share/atom/resources/app/src/workspace.js:499
Uncaught TypeError: undefined is not a function /home/ubuntu/.atom/packages/linter/lib/inline-view.coffee:24"><pre class="notranslate"><code class="notranslate">activate linter-csslint /home/ubuntu/.atom/packages/linter-csslint/lib/init.coffee:11
activate linter-jshint /home/ubuntu/.atom/packages/linter-jshint/lib/init.coffee:11
activate linter-write-good /home/ubuntu/.atom/packages/linter-write-good/lib/init.coffee:11
Window load time: 866ms index.js:46
TypeError: undefined is not a function
at InlineView.render (/home/ubuntu/.atom/packages/linter/lib/inline-view.coffee:13:23)
at LinterView.updateViews (/home/ubuntu/.atom/packages/linter/lib/linter-view.coffee:200:19)
at LinterView.display (/home/ubuntu/.atom/packages/linter/lib/linter-view.coffee:188:6)
at /home/ubuntu/.atom/packages/linter/lib/linter-view.coffee:75:10
at Config.module.exports.Config.observeKeyPath (/usr/share/atom/resources/app/src/config.js:556:9)
at Config.module.exports.Config.observe (/usr/share/atom/resources/app/src/config.js:133:21)
at LinterView.handleConfigChanges (/home/ubuntu/.atom/packages/linter/lib/linter-view.coffee:72:36)
at new LinterView (/home/ubuntu/.atom/packages/linter/lib/linter-view.coffee:36:6)
at /home/ubuntu/.atom/packages/linter/lib/init.coffee:77:24
at /usr/share/atom/resources/app/src/workspace.js:278:16
at /usr/share/atom/resources/app/src/workspace.js:323:18
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:71:11)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (/usr/share/atom/resources/app/src/pane-container.js:361:27)
at /usr/share/atom/resources/app/src/pane-container.js:348:26
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:71:11)
at Pane.module.exports.Pane.addItem (/usr/share/atom/resources/app/src/pane.js:320:20)
at Pane.module.exports.Pane.activateItem (/usr/share/atom/resources/app/src/pane.js:299:14)
at /usr/share/atom/resources/app/src/workspace.js:483:16
at _fulfilled (/usr/share/atom/resources/app/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/share/atom/resources/app/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/share/atom/resources/app/node_modules/q/q.js:749:13)
at /usr/share/atom/resources/app/node_modules/q/q.js:557:44
at flush (/usr/share/atom/resources/app/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:378:11)
/usr/share/atom/resources/app/src/workspace.js:499(anonymous function) /usr/share/atom/resources/app/src/workspace.js:499
Uncaught TypeError: undefined is not a function /home/ubuntu/.atom/packages/linter/lib/inline-view.coffee:24
</code></pre></div>
<p dir="auto">I can't even open a new file from the <code class="notranslate">File</code> menu.</p> | <p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mickburke/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mickburke">@mickburke</a> on December 17, 2014 10:15</em></p>
<p dir="auto">I'm running Atom on openSuSE 13.2 and it was working perfectly up until this morning. I open any files (PHP, YAML etc) and the title of the window changes but the contents of the file isn't dislpayed.</p>
<p dir="auto">Then the following error is given:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: undefined is not a function
at InlineView.render (/home/michael/.atom/packages/linter/lib/inline-view.coffee:13:23)
at LinterView.updateViews (/home/michael/.atom/packages/linter/lib/linter-view.coffee:200:19)
at LinterView.display (/home/michael/.atom/packages/linter/lib/linter-view.coffee:188:6)
at /home/michael/.atom/packages/linter/lib/linter-view.coffee:75:10
at Config.module.exports.Config.observeKeyPath (/usr/local/share/atom/resources/app/src/config.js:556:9)
at Config.module.exports.Config.observe (/usr/local/share/atom/resources/app/src/config.js:133:21)
at LinterView.handleConfigChanges (/home/michael/.atom/packages/linter/lib/linter-view.coffee:72:36)
at new LinterView (/home/michael/.atom/packages/linter/lib/linter-view.coffee:36:6)
at /home/michael/.atom/packages/linter/lib/init.coffee:77:24
at /usr/local/share/atom/resources/app/src/workspace.js:278:16
at /usr/local/share/atom/resources/app/src/workspace.js:323:18
at Emitter.module.exports.Emitter.emit (/usr/local/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:71:11)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (/usr/local/share/atom/resources/app/src/pane-container.js:374:27)
at /usr/local/share/atom/resources/app/src/pane-container.js:361:26
at Emitter.module.exports.Emitter.emit (/usr/local/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:71:11)
at Pane.module.exports.Pane.addItem (/usr/local/share/atom/resources/app/src/pane.js:338:20)
at Pane.module.exports.Pane.activateItem (/usr/local/share/atom/resources/app/src/pane.js:317:14)
at /usr/local/share/atom/resources/app/src/workspace.js:483:16
at _fulfilled (/usr/local/share/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/share/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/share/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:749:13)
at /usr/local/share/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:557:44
at flush (/usr/local/share/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:378:11)
/usr/local/share/atom/resources/app/src/workspace.js:499"><pre class="notranslate"><code class="notranslate">TypeError: undefined is not a function
at InlineView.render (/home/michael/.atom/packages/linter/lib/inline-view.coffee:13:23)
at LinterView.updateViews (/home/michael/.atom/packages/linter/lib/linter-view.coffee:200:19)
at LinterView.display (/home/michael/.atom/packages/linter/lib/linter-view.coffee:188:6)
at /home/michael/.atom/packages/linter/lib/linter-view.coffee:75:10
at Config.module.exports.Config.observeKeyPath (/usr/local/share/atom/resources/app/src/config.js:556:9)
at Config.module.exports.Config.observe (/usr/local/share/atom/resources/app/src/config.js:133:21)
at LinterView.handleConfigChanges (/home/michael/.atom/packages/linter/lib/linter-view.coffee:72:36)
at new LinterView (/home/michael/.atom/packages/linter/lib/linter-view.coffee:36:6)
at /home/michael/.atom/packages/linter/lib/init.coffee:77:24
at /usr/local/share/atom/resources/app/src/workspace.js:278:16
at /usr/local/share/atom/resources/app/src/workspace.js:323:18
at Emitter.module.exports.Emitter.emit (/usr/local/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:71:11)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (/usr/local/share/atom/resources/app/src/pane-container.js:374:27)
at /usr/local/share/atom/resources/app/src/pane-container.js:361:26
at Emitter.module.exports.Emitter.emit (/usr/local/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:71:11)
at Pane.module.exports.Pane.addItem (/usr/local/share/atom/resources/app/src/pane.js:338:20)
at Pane.module.exports.Pane.activateItem (/usr/local/share/atom/resources/app/src/pane.js:317:14)
at /usr/local/share/atom/resources/app/src/workspace.js:483:16
at _fulfilled (/usr/local/share/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/share/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/share/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:749:13)
at /usr/local/share/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:557:44
at flush (/usr/local/share/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:378:11)
/usr/local/share/atom/resources/app/src/workspace.js:499
</code></pre></div>
<p dir="auto">And</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Uncaught TypeError: undefined is not a function - from /home/michael/.atom/packages/linter/lib/inline-view.coffee:24"><pre class="notranslate"><code class="notranslate">Uncaught TypeError: undefined is not a function - from /home/michael/.atom/packages/linter/lib/inline-view.coffee:24
</code></pre></div>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="52222412" data-permission-text="Title is private" data-url="https://github.com/atom/deprecation-cop/issues/13" data-hovercard-type="issue" data-hovercard-url="/atom/deprecation-cop/issues/13/hovercard" href="https://github.com/atom/deprecation-cop/issues/13">atom/deprecation-cop#13</a></em></p> | 1 |
<p dir="auto"><strong>Migrated issue, originally created by Andrey Semenov</strong></p>
<p dir="auto"><a href="https://gist.github.com/SantjagoCorkez/db207a7b533d1d6f05ae">https://gist.github.com/SantjagoCorkez/db207a7b533d1d6f05ae</a></p>
<p dir="auto">When providing a ColumnElement itself into .group_by()/.order_by() the query compiler does not automatically quote the reference to that producing a query that in some circumstances becomes invalid (for example in case there are columns with the same name as the ColumnElement's label within the query).</p>
<p dir="auto">This became an issue at 1.0.0 (and not resolved in 1.0.1)</p> | <p dir="auto"><strong>Migrated issue, originally created by petergrace (<a href="https://github.com/petergrace">@petergrace</a>)</strong></p>
<p dir="auto">I posted a stackoverflow question about this and someone mentioned I should also post the issue here since 1.0.0 is still in beta. You can see the nicely-formatted post here: <a href="http://stackoverflow.com/questions/29212205/in-sqlalchemy-group-by-on-column-property-no-longer-works-in-1-0-0b1" rel="nofollow">http://stackoverflow.com/questions/29212205/in-sqlalchemy-group-by-on-column-property-no-longer-works-in-1-0-0b1</a></p>
<p dir="auto">Here's a dump of the text of that question:</p>
<p dir="auto">A change from 0.9.9 to 1.0.0b1 in the query functionality is causing me some heartburn. I have a group_by clause that uses a column_property.</p>
<p dir="auto">In 0.9.9, the generated query reproduces the calculated value in GROUP BY by actually calculating the value again. In 1.0.0b1, the calculation is wrapped in an anon_1, and MSSQL won't let you group_by a named value for a calculated field.</p>
<p dir="auto">Is there some way to revert to the old behavior without requiring a specific version?</p>
<p dir="auto">The below code generates the following SQL in 0.9.9:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT
count(cdr_extended.[UniqueID]) AS [CallCount],
sum(cdr_extended.[Duration]) AS [TotalSeconds],
ext_map.[FName] + ' ' + ext_map.[LName] AS anon_1
FROM cdr_extended, ext_map
WHERE
(ext_map.exten = cdr_extended.[Extension]
OR ext_map.prev_exten = cdr_extended.[Extension])
AND cdr_extended.[StartTime] > '2015-01-01'
AND cdr_extended.[Extension] IN ('8297')
GROUP BY ext_map.[FName] + ' ' + ext_map.[LName]
DESC
"><pre class="notranslate"><code class="notranslate">SELECT
count(cdr_extended.[UniqueID]) AS [CallCount],
sum(cdr_extended.[Duration]) AS [TotalSeconds],
ext_map.[FName] + ' ' + ext_map.[LName] AS anon_1
FROM cdr_extended, ext_map
WHERE
(ext_map.exten = cdr_extended.[Extension]
OR ext_map.prev_exten = cdr_extended.[Extension])
AND cdr_extended.[StartTime] > '2015-01-01'
AND cdr_extended.[Extension] IN ('8297')
GROUP BY ext_map.[FName] + ' ' + ext_map.[LName]
DESC
</code></pre></div>
<p dir="auto">However, in 1.0.0, it produces this code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT
count(cdr_extended.[UniqueID]) AS [CallCount],
sum(cdr_extended.[Duration]) AS [TotalSeconds],
ext_map.[FName] + ' ' + ext_map.[LName] AS anon_1
FROM cdr_extended, ext_map
WHERE
(ext_map.exten = cdr_extended.[Extension]
OR ext_map.prev_exten = cdr_extended.[Extension])
AND cdr_extended.[StartTime] > '2015-01-01'
AND cdr_extended.[Extension] IN ('8297')
GROUP BY anon_1
DESC
"><pre class="notranslate"><code class="notranslate">SELECT
count(cdr_extended.[UniqueID]) AS [CallCount],
sum(cdr_extended.[Duration]) AS [TotalSeconds],
ext_map.[FName] + ' ' + ext_map.[LName] AS anon_1
FROM cdr_extended, ext_map
WHERE
(ext_map.exten = cdr_extended.[Extension]
OR ext_map.prev_exten = cdr_extended.[Extension])
AND cdr_extended.[StartTime] > '2015-01-01'
AND cdr_extended.[Extension] IN ('8297')
GROUP BY anon_1
DESC
</code></pre></div>
<p dir="auto">Here's the model:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class EMap(Base):
FName = Column(String(length=45))
LName = Column(String(length=45))
AssociateName = column_property(FName + " " + LName)
DBSession.query(func.count(ExtendedCDR.UniqueID)
.label("CallCount"),func.sum(ExtendedCDR.Duration)
.label("TotalSeconds"))
.filter(or_(ExtensionMap.exten == ExtendedCDR.Extension,ExtensionMap.prev_exten == ExtendedCDR.Extension))
.filter(ExtendedCDR.StartTime>jan1)
.filter(ExtendedCDR.Extension.in_(extensions))
.group_by(ExtensionMap.AssociateName)
.order_by(func.count(ExtendedCDR.UniqueID).desc())
"><pre class="notranslate"><code class="notranslate">class EMap(Base):
FName = Column(String(length=45))
LName = Column(String(length=45))
AssociateName = column_property(FName + " " + LName)
DBSession.query(func.count(ExtendedCDR.UniqueID)
.label("CallCount"),func.sum(ExtendedCDR.Duration)
.label("TotalSeconds"))
.filter(or_(ExtensionMap.exten == ExtendedCDR.Extension,ExtensionMap.prev_exten == ExtendedCDR.Extension))
.filter(ExtendedCDR.StartTime>jan1)
.filter(ExtendedCDR.Extension.in_(extensions))
.group_by(ExtensionMap.AssociateName)
.order_by(func.count(ExtendedCDR.UniqueID).desc())
</code></pre></div>
<p dir="auto">And finally, here's the actual stack trace when the group_by fails:</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/python2.7/site-packages/pyramid_exclog-0.7-py2.7.egg/pyramid_exclog/__init__.py", line 111, in exclog_tween
return handler(request)
File "/usr/local/lib/python2.7/site-packages/pyramid-1.5.4-py2.7.egg/pyramid/router.py", line 163, in handle_request
response = view_callable(context, request)
File "/usr/local/lib/python2.7/site-packages/pyramid-1.5.4-py2.7.egg/pyramid/config/views.py", line 245, in _secured_view
return view(context, request)
File "/usr/local/lib/python2.7/site-packages/pyramid-1.5.4-py2.7.egg/pyramid/config/views.py", line 355, in rendered_view
result = view(context, request)
File "/usr/local/lib/python2.7/site-packages/pyramid-1.5.4-py2.7.egg/pyramid/config/views.py", line 501, in _requestonly_view
response = view(request)
File "/opt/cedar/cedar/views/ViewMyDashboard.py", line 51, in MyDashboardView
YearList = ObstinateDatabaseQueryAll(DBSession.query(func.count(ExtendedCDR.UniqueID).label("CallCount"),func.sum(ExtendedCDR.Duration).label("TotalSeconds"),ExtensionMap.AssociateName).filter(or_(ExtensionMap.exten == ExtendedCDR.Extension,ExtensionMap.prev_exten == ExtendedCDR.Extension)).filter(ExtendedCDR.StartTime>year_today).filter(ExtendedCDR.Extension.in_(extensions)).group_by(ExtensionMap.AssociateName).order_by(func.count(ExtendedCDR.UniqueID).desc()))
File "/opt/cedar/cedar/controllers/db.py", line 40, in ObstinateDatabaseQueryAll
ret=query.all()
File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2408, in all
return list(self)
File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2525, in __iter__
return self._execute_and_instances(context)
File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2540, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
compiled_sql, distilled_params
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1332, in _handle_dbapi_exception
exc_info
File "build/bdist.linux-x86_64/egg/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1139, in _execute_context
context)
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/default.py", line 442, in do_execute
cursor.execute(statement, parameters)
ProgrammingError: (pyodbc.ProgrammingError) ('42S22', "[42S22] [FreeTDS][SQL Server]Invalid column name 'anon_1'. (207) (SQLExecDirectW)") [SQL: 'SELECT count(cdr_extended.[UniqueID]) AS [CallCount], sum(cdr_extended.[Duration]) AS [TotalSeconds], ext_map.[FName] + ? + ext_map.[LName] AS anon_1 \nFROM cdr_extended, ext_map \nWHERE (ext_map.exten = cdr_extended.[Extension] OR ext_map.prev_exten = cdr_extended.[Extension]) AND cdr_extended.[StartTime] > ? AND cdr_extended.[Extension] IN (?) GROUP BY anon_1 ORDER BY count(cdr_extended.[UniqueID]) DESC'] [parameters: (' ', datetime.datetime(2015, 1, 1, 0, 0), '8297')]"><pre class="notranslate"><code class="notranslate">#!
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pyramid_exclog-0.7-py2.7.egg/pyramid_exclog/__init__.py", line 111, in exclog_tween
return handler(request)
File "/usr/local/lib/python2.7/site-packages/pyramid-1.5.4-py2.7.egg/pyramid/router.py", line 163, in handle_request
response = view_callable(context, request)
File "/usr/local/lib/python2.7/site-packages/pyramid-1.5.4-py2.7.egg/pyramid/config/views.py", line 245, in _secured_view
return view(context, request)
File "/usr/local/lib/python2.7/site-packages/pyramid-1.5.4-py2.7.egg/pyramid/config/views.py", line 355, in rendered_view
result = view(context, request)
File "/usr/local/lib/python2.7/site-packages/pyramid-1.5.4-py2.7.egg/pyramid/config/views.py", line 501, in _requestonly_view
response = view(request)
File "/opt/cedar/cedar/views/ViewMyDashboard.py", line 51, in MyDashboardView
YearList = ObstinateDatabaseQueryAll(DBSession.query(func.count(ExtendedCDR.UniqueID).label("CallCount"),func.sum(ExtendedCDR.Duration).label("TotalSeconds"),ExtensionMap.AssociateName).filter(or_(ExtensionMap.exten == ExtendedCDR.Extension,ExtensionMap.prev_exten == ExtendedCDR.Extension)).filter(ExtendedCDR.StartTime>year_today).filter(ExtendedCDR.Extension.in_(extensions)).group_by(ExtensionMap.AssociateName).order_by(func.count(ExtendedCDR.UniqueID).desc()))
File "/opt/cedar/cedar/controllers/db.py", line 40, in ObstinateDatabaseQueryAll
ret=query.all()
File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2408, in all
return list(self)
File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2525, in __iter__
return self._execute_and_instances(context)
File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py", line 2540, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
compiled_sql, distilled_params
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1332, in _handle_dbapi_exception
exc_info
File "build/bdist.linux-x86_64/egg/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1139, in _execute_context
context)
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/default.py", line 442, in do_execute
cursor.execute(statement, parameters)
ProgrammingError: (pyodbc.ProgrammingError) ('42S22', "[42S22] [FreeTDS][SQL Server]Invalid column name 'anon_1'. (207) (SQLExecDirectW)") [SQL: 'SELECT count(cdr_extended.[UniqueID]) AS [CallCount], sum(cdr_extended.[Duration]) AS [TotalSeconds], ext_map.[FName] + ? + ext_map.[LName] AS anon_1 \nFROM cdr_extended, ext_map \nWHERE (ext_map.exten = cdr_extended.[Extension] OR ext_map.prev_exten = cdr_extended.[Extension]) AND cdr_extended.[StartTime] > ? AND cdr_extended.[Extension] IN (?) GROUP BY anon_1 ORDER BY count(cdr_extended.[UniqueID]) DESC'] [parameters: (' ', datetime.datetime(2015, 1, 1, 0, 0), '8297')]
</code></pre></div> | 1 |
<p dir="auto">Hi! I'm using scipy version 0.18.1 under ubuntu, but when I run scipy.test() in the terminal, it raise the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="======================================================================
ERROR: test_fitpack.TestSplder.test_kink
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/usr/lib/python2.7/dist-packages/scipy/interpolate/tests/test_fitpack.py", line 329, in test_kink
splder(spl2, 2) # Should work
File "/usr/lib/python2.7/dist-packages/scipy/interpolate/fitpack.py", line 1186, in splder
"and is not differentiable %d times") % n)
ValueError: The spline has internal repeated knots and is not differentiable 2 times
======================================================================
FAIL: Regression test for #651: better handling of badly conditioned
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/scipy/signal/tests/test_filter_design.py", line 36, in test_bad_filter
assert_raises(BadCoefficients, tf2zpk, [1e-15], [1.0, 1.0])
File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 1020, in assert_raises
return nose.tools.assert_raises(*args,**kwargs)
AssertionError: BadCoefficients not raised
----------------------------------------------------------------------
Ran 8936 tests in 50.777s
FAILED (KNOWNFAIL=115, SKIP=199, errors=1, failures=1)
<nose.result.TextTestResult run=8936 errors=1 failures=1>
"><pre class="notranslate"><code class="notranslate">======================================================================
ERROR: test_fitpack.TestSplder.test_kink
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/usr/lib/python2.7/dist-packages/scipy/interpolate/tests/test_fitpack.py", line 329, in test_kink
splder(spl2, 2) # Should work
File "/usr/lib/python2.7/dist-packages/scipy/interpolate/fitpack.py", line 1186, in splder
"and is not differentiable %d times") % n)
ValueError: The spline has internal repeated knots and is not differentiable 2 times
======================================================================
FAIL: Regression test for #651: better handling of badly conditioned
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/scipy/signal/tests/test_filter_design.py", line 36, in test_bad_filter
assert_raises(BadCoefficients, tf2zpk, [1e-15], [1.0, 1.0])
File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 1020, in assert_raises
return nose.tools.assert_raises(*args,**kwargs)
AssertionError: BadCoefficients not raised
----------------------------------------------------------------------
Ran 8936 tests in 50.777s
FAILED (KNOWNFAIL=115, SKIP=199, errors=1, failures=1)
<nose.result.TextTestResult run=8936 errors=1 failures=1>
</code></pre></div>
<p dir="auto">I don't know how to fix it, can anyone help me? thanks very much!</p> | <p dir="auto">I've recently updated scipy in Fedora to newest 0.13.0 release and I can see one test failure on every architecture, both in python 2 and 3:</p>
<h5 dir="auto">Python 3.3.2</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: test_fitpack.TestSplder.test_kink
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILDROOT/scipy-0.13.0-1.fc21.arm/usr/lib/python3.3/site-packages/scipy/interpolate/fitpack.py", line 1178, in splder
c = (c[1:-1-k] - c[:-2-k]) * k / dt
FloatingPointError: invalid value encountered in true_divide
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/builddir/build/BUILDROOT/scipy-0.13.0-1.fc21.arm/usr/lib/python3.3/site-packages/scipy/interpolate/tests/test_fitpack.py", line 329, in test_kink
splder(spl2, 2) # Should work
File "/builddir/build/BUILDROOT/scipy-0.13.0-1.fc21.arm/usr/lib/python3.3/site-packages/scipy/interpolate/fitpack.py", line 1186, in splder
"and is not differentiable %d times") % n)
ValueError: The spline has internal repeated knots and is not differentiable 2 times"><pre class="notranslate"><code class="notranslate">ERROR: test_fitpack.TestSplder.test_kink
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILDROOT/scipy-0.13.0-1.fc21.arm/usr/lib/python3.3/site-packages/scipy/interpolate/fitpack.py", line 1178, in splder
c = (c[1:-1-k] - c[:-2-k]) * k / dt
FloatingPointError: invalid value encountered in true_divide
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/builddir/build/BUILDROOT/scipy-0.13.0-1.fc21.arm/usr/lib/python3.3/site-packages/scipy/interpolate/tests/test_fitpack.py", line 329, in test_kink
splder(spl2, 2) # Should work
File "/builddir/build/BUILDROOT/scipy-0.13.0-1.fc21.arm/usr/lib/python3.3/site-packages/scipy/interpolate/fitpack.py", line 1186, in splder
"and is not differentiable %d times") % n)
ValueError: The spline has internal repeated knots and is not differentiable 2 times
</code></pre></div>
<h5 dir="auto">Python 2.7.5</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: test_fitpack.TestSplder.test_kink
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILDROOT/scipy-0.13.0-1.fc21.arm/usr/lib/python2.7/site-packages/scipy/interpolate/tests/test_fitpack.py", line 329, in test_kink
splder(spl2, 2) # Should work
File "/builddir/build/BUILDROOT/scipy-0.13.0-1.fc21.arm/usr/lib/python2.7/site-packages/scipy/interpolate/fitpack.py", line 1186, in splder
"and is not differentiable %d times") % n)
ValueError: The spline has internal repeated knots and is not differentiable 2 times"><pre class="notranslate"><code class="notranslate">ERROR: test_fitpack.TestSplder.test_kink
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILDROOT/scipy-0.13.0-1.fc21.arm/usr/lib/python2.7/site-packages/scipy/interpolate/tests/test_fitpack.py", line 329, in test_kink
splder(spl2, 2) # Should work
File "/builddir/build/BUILDROOT/scipy-0.13.0-1.fc21.arm/usr/lib/python2.7/site-packages/scipy/interpolate/fitpack.py", line 1186, in splder
"and is not differentiable %d times") % n)
ValueError: The spline has internal repeated knots and is not differentiable 2 times
</code></pre></div>
<h4 dir="auto">Setup</h4>
<p dir="auto">numpy 1.8.0<br>
atlas 3.10.1<br>
blas 3.4.2<br>
lapack 3.4.2</p>
<h4 dir="auto">Build logs:</h4>
<p dir="auto"><a href="http://kojipkgs.fedoraproject.org/packages/scipy/0.13.0/1.fc21/data/logs/armv7hl/build.log" rel="nofollow">http://kojipkgs.fedoraproject.org/packages/scipy/0.13.0/1.fc21/data/logs/armv7hl/build.log</a><br>
<a href="http://kojipkgs.fedoraproject.org/packages/scipy/0.13.0/1.fc21/data/logs/i686/build.log" rel="nofollow">http://kojipkgs.fedoraproject.org/packages/scipy/0.13.0/1.fc21/data/logs/i686/build.log</a><br>
<a href="http://kojipkgs.fedoraproject.org/packages/scipy/0.13.0/1.fc21/data/logs/x86_64/build.log" rel="nofollow">http://kojipkgs.fedoraproject.org/packages/scipy/0.13.0/1.fc21/data/logs/x86_64/build.log</a></p> | 1 |
<p dir="auto">After updating to 126+ fonts look terrible.</p>
<p dir="auto">Windows 7 x64 with cleartype.</p>
<p dir="auto">Atom settings:<br>
font size: 12<br>
"use hardware acceleration" unchecked.</p>
<p dir="auto">Screens:<br>
<a href="https://cloud.githubusercontent.com/assets/142528/4271009/fc78ab9e-3cd2-11e4-84e9-feb0df65d904.png" rel="nofollow">125</a><br>
<a href="https://cloud.githubusercontent.com/assets/142528/4271010/fcc2bcf2-3cd2-11e4-8cfb-950ce2731b92.png" rel="nofollow">126</a><br>
<a href="https://cloud.githubusercontent.com/assets/142528/4271041/86695bf0-3cd3-11e4-87e3-6cf26974f88c.png" rel="nofollow">127</a></p> | <p dir="auto">I'm on Ubuntu 14.04 and every time I alt+tab or make Atom lose focus in any way, the cursor position disappears. I have to click on the window to make it reappear.</p> | 0 |
<ul dir="auto">
<li>
<p dir="auto">Your Windows build number: (Type <code class="notranslate">ver</code> at a Windows Command Prompt)<br>
Microsoft Windows [Version 10.0.18362.53]<br>
Windows Terminal: 0.1.1211.0 (this was a signed daily build of the appx)</p>
</li>
<li>
<p dir="auto">What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)</p>
</li>
</ul>
<p dir="auto">Running this .NET Core app causes the Terminal to hang. This app uses Unicode.NET to generate emoji string encodings.</p>
<div class="highlight highlight-source-cs notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="using NeoSmart.Unicode;
using System;
using System.Text;
namespace HangWindowsTerminal
{
class Program
{
static void Main(string[] args)
{
Console.OutputEncoding = Encoding.UTF8;
foreach (var emoji in Emoji.All)
{
try
{
Console.Write(emoji.ToString());
}
catch (Exception e)
{
Console.Write($"[FAILED: {emoji.Name} - {e.Message}]");
}
}
}
}
}"><pre class="notranslate"><span class="pl-k">using</span> NeoSmart<span class="pl-kos">.</span>Unicode<span class="pl-kos">;</span>
<span class="pl-k">using</span> System<span class="pl-kos">;</span>
<span class="pl-k">using</span> System<span class="pl-kos">.</span>Text<span class="pl-kos">;</span>
<span class="pl-k">namespace</span> <span class="pl-v">HangWindowsTerminal</span>
<span class="pl-kos">{</span>
<span class="pl-k">class</span> <span class="pl-smi">Program</span>
<span class="pl-kos">{</span>
<span class="pl-k"><span class="pl-k">static</span></span> <span class="pl-smi">void</span> <span class="pl-en">Main</span><span class="pl-kos">(</span><span class="pl-smi">string</span><span class="pl-kos">[</span><span class="pl-kos">]</span> <span class="pl-s1">args</span><span class="pl-kos">)</span>
<span class="pl-kos">{</span>
Console<span class="pl-kos">.</span>OutputEncoding <span class="pl-c1">=</span> Encoding<span class="pl-kos">.</span>UTF8<span class="pl-kos">;</span>
<span class="pl-k">foreach</span> <span class="pl-kos">(</span><span class="pl-smi">var</span> emoji <span class="pl-k">in</span> Emoji<span class="pl-kos">.</span>All<span class="pl-kos">)</span>
<span class="pl-kos">{</span>
<span class="pl-k">try</span>
<span class="pl-kos">{</span>
Console<span class="pl-kos">.</span><span class="pl-en">Write</span><span class="pl-kos">(</span>emoji<span class="pl-kos">.</span><span class="pl-en">ToString</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">catch</span> <span class="pl-kos">(</span><span class="pl-smi">Exception</span> <span class="pl-s1">e</span><span class="pl-kos">)</span>
<span class="pl-kos">{</span>
Console<span class="pl-kos">.</span><span class="pl-en">Write</span><span class="pl-kos">(</span><span class="pl-s">$"</span><span class="pl-s">[FAILED: </span><span class="pl-kos">{</span>emoji<span class="pl-kos">.</span>Name<span class="pl-kos">}</span><span class="pl-s"> - </span><span class="pl-kos">{</span>e<span class="pl-kos">.</span>Message<span class="pl-kos">}</span><span class="pl-s">]</span><span class="pl-s">"</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>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Unicode.net" Version="0.1.2" />
</ItemGroup>
</Project>"><pre class="notranslate"><<span class="pl-ent">Project</span> <span class="pl-e">Sdk</span>=<span class="pl-s"><span class="pl-pds">"</span>Microsoft.NET.Sdk<span class="pl-pds">"</span></span>>
<<span class="pl-ent">PropertyGroup</span>>
<<span class="pl-ent">OutputType</span>>Exe</<span class="pl-ent">OutputType</span>>
<<span class="pl-ent">TargetFramework</span>>netcoreapp2.2</<span class="pl-ent">TargetFramework</span>>
</<span class="pl-ent">PropertyGroup</span>>
<<span class="pl-ent">ItemGroup</span>>
<<span class="pl-ent">PackageReference</span> <span class="pl-e">Include</span>=<span class="pl-s"><span class="pl-pds">"</span>Unicode.net<span class="pl-pds">"</span></span> <span class="pl-e">Version</span>=<span class="pl-s"><span class="pl-pds">"</span>0.1.2<span class="pl-pds">"</span></span> />
</<span class="pl-ent">ItemGroup</span>>
</<span class="pl-ent">Project</span>></pre></div>
<ul dir="auto">
<li>What's wrong / what should be happening instead:</li>
</ul>
<p dir="auto">Once the loop gets to certain characters (with modifers?) the terminal hangs. Not always the same character. I'd expect problematic chars to be skipped or replaced with '??':</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18265132/57547709-4ecf5580-731c-11e9-8e2e-3e8947766662.png"><img src="https://user-images.githubusercontent.com/18265132/57547709-4ecf5580-731c-11e9-8e2e-3e8947766662.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18265132/57547987-1c722800-731d-11e9-968f-9726a896200d.png"><img src="https://user-images.githubusercontent.com/18265132/57547987-1c722800-731d-11e9-968f-9726a896200d.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">No repro in classic cmd.exe</p> | <p dir="auto">For example, the ‘defaultProfile’ in the settings is 'wsl‘, but I want to fill in the parameter 'defaultProfile = cmd ‘ when filling in the address bar, so I can open cmd directly instead of wsl</p> | 0 |
<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.4.4</td>
</tr>
</tbody>
</table>
<p dir="auto">Hello guys,</p>
<p dir="auto">after updating from 3.4.3 to 3.4.4 we noticed a 10x increase in memory usage when running our testsuite. To analyze the issue, we profiled both execution (3.4.3 and 3.4.4) with blackfire (see links below). Looking at the comparison of both runs we had the idea to revert <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="289633837" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/25835" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/25835/hovercard" href="https://github.com/symfony/symfony/pull/25835">#25835</a>. Running blackfire again shows a decreased memory consumption.</p>
<p dir="auto">The cache was cleared prior to each run.</p>
<p dir="auto">If you need further information let me know. Unfortunately I can not share the code base.</p>
<p dir="auto">3.4.4: <a href="https://blackfire.io/profiles/22ed34e8-9827-48ef-8ed4-7eaf9a6218c5/graph" rel="nofollow">https://blackfire.io/profiles/22ed34e8-9827-48ef-8ed4-7eaf9a6218c5/graph</a><br>
3.4.3: <a href="https://blackfire.io/profiles/eacbfc2d-6592-4003-9d16-6c967286d36e/graph" rel="nofollow">https://blackfire.io/profiles/eacbfc2d-6592-4003-9d16-6c967286d36e/graph</a><br>
3.4.4 with reverted <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="289633837" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/25835" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/25835/hovercard" href="https://github.com/symfony/symfony/pull/25835">#25835</a>: <a href="https://blackfire.io/profiles/df3e9f4a-d28c-4a4e-8cf9-ea48a1659328/graph" rel="nofollow">https://blackfire.io/profiles/df3e9f4a-d28c-4a4e-8cf9-ea48a1659328/graph</a></p>
<p dir="auto">Comparisons:<br>
<a href="https://blackfire.io/profiles/compare/dbb5091e-5da7-429f-a007-de0bfcf1b29f/graph" rel="nofollow">3.4.3 -> 3.4.4</a><br>
<a href="https://blackfire.io/profiles/compare/b930e7ec-b984-45da-82d4-d5bf73d20343/graph" rel="nofollow">3.4.4 -> 3.4.4 w/o 25835</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.4.4</td>
</tr>
</tbody>
</table>
<p dir="auto">Memory leak has occurred with a PR of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="289555668" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/25829" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/25829/hovercard" href="https://github.com/symfony/symfony/pull/25829">#25829</a>, reproduced with the following code.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="composer create-project symfony/skeleton memory-leak-check "^3.4"
cd memory-leak-check
composer req phpunit log browser-kit psr/log"><pre class="notranslate"><code class="notranslate">composer create-project symfony/skeleton memory-leak-check "^3.4"
cd memory-leak-check
composer req phpunit log browser-kit psr/log
</code></pre></div>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class MemoryLeakCheckTest extends WebTestCase
{
protected function setUp()
{
parent::setUp();
for ($i = 0; $i < 1000; $i++) {
self::createClient()->request('GET', '/');
}
}
protected function tearDown()
{
var_dump((memory_get_usage() / 1024 / 1024));
}
function testEEE1() {
}
function testEEE2() {
}
function testEEE3() {
}
function testEEE4() {
}
function testEEE5() {
}
function testEEE6() {
}
function testEEE7() {
}
function testEEE8() {
}
function testEEE9() {
}
function testEEE10() {
}
function testEEE11() {
}
function testEEE12() {
}
function testEEE13() {
}
function testEEE14() {
}
function testEEE15() {
}
function testEEE16() {
}
}"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Bundle</span>\<span class="pl-v">FrameworkBundle</span>\<span class="pl-v">Test</span>\<span class="pl-v">WebTestCase</span>;
<span class="pl-k">class</span> <span class="pl-v">MemoryLeakCheckTest</span> <span class="pl-k">extends</span> <span class="pl-v">WebTestCase</span>
{
<span class="pl-k">protected</span> <span class="pl-k">function</span> <span class="pl-en">setUp</span>()
{
<span class="pl-smi">parent</span>::<span class="pl-en">setUp</span>();
for (<span class="pl-s1"><span class="pl-c1">$</span>i</span> = <span class="pl-c1">0</span>; <span class="pl-s1"><span class="pl-c1">$</span>i</span> < <span class="pl-c1">1000</span>; <span class="pl-s1"><span class="pl-c1">$</span>i</span>++) {
<span class="pl-smi">self</span>::<span class="pl-en">createClient</span>()-><span class="pl-en">request</span>(<span class="pl-s">'GET'</span>, <span class="pl-s">'/'</span>);
}
}
<span class="pl-k">protected</span> <span class="pl-k">function</span> <span class="pl-en">tearDown</span>()
{
var_dump((memory_get_usage() / <span class="pl-c1">1024</span> / <span class="pl-c1">1024</span>));
}
<span class="pl-k">function</span> <span class="pl-en">testEEE1</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE2</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE3</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE4</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE5</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE6</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE7</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE8</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE9</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE10</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE11</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE12</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE13</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE14</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE15</span>() {
}
<span class="pl-k">function</span> <span class="pl-en">testEEE16</span>() {
}
}</pre></div>
<p dir="auto">We got this result.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="memory-leak-check% php vendor/bin/simple-phpunit
PHPUnit 6.3.1 by Sebastian Bergmann and contributors.
Testing Project Test Suite
Rfloat(51.022598266602)
Rfloat(96.973236083984)
Rfloat(143.40355682373)
Rfloat(188.87760162354)
Rfloat(236.3078994751)
Rfloat(281.73819732666)
Rfloat(327.21188354492)
Rfloat(372.64218139648)
Rfloat(422.07247924805)
Rfloat(467.50344085693)
Rfloat(512.9732208252)
Rfloat(558.40351867676)
Rfloat(603.83381652832)
Rfloat(649.30750274658)
Rfloat(694.73780059814)
R 16 / 16 (100%)float(740.16809844971)
Time: 35.43 seconds, Memory: 748.00MB"><pre class="notranslate"><code class="notranslate">memory-leak-check% php vendor/bin/simple-phpunit
PHPUnit 6.3.1 by Sebastian Bergmann and contributors.
Testing Project Test Suite
Rfloat(51.022598266602)
Rfloat(96.973236083984)
Rfloat(143.40355682373)
Rfloat(188.87760162354)
Rfloat(236.3078994751)
Rfloat(281.73819732666)
Rfloat(327.21188354492)
Rfloat(372.64218139648)
Rfloat(422.07247924805)
Rfloat(467.50344085693)
Rfloat(512.9732208252)
Rfloat(558.40351867676)
Rfloat(603.83381652832)
Rfloat(649.30750274658)
Rfloat(694.73780059814)
R 16 / 16 (100%)float(740.16809844971)
Time: 35.43 seconds, Memory: 748.00MB
</code></pre></div>
<p dir="auto">It is possible to fix it with the following patch.</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="index 047883a70c..0b7e4269bb 100644
--- a/src/Symfony/Component/Debug/ErrorHandler.php
+++ b/src/Symfony/Component/Debug/ErrorHandler.php
@@ -134,7 +134,7 @@ class ErrorHandler
if (!$replace && $prev) {
restore_error_handler();
}
- if (is_array($prev = set_exception_handler(array($handler, 'handleException'))) && $prev[0] === $handler) {
+ if (is_array($prev = set_exception_handler(array($handler, 'handleException'))) && get_class($prev[0]) === get_class($handler)) {
restore_exception_handler();
} else {
$handler->setExceptionHandler($prev);"><pre class="notranslate">index 047883a70c..0b7e4269bb 100644
<span class="pl-md">--- a/src/Symfony/Component/Debug/ErrorHandler.php</span>
<span class="pl-mi1">+++ b/src/Symfony/Component/Debug/ErrorHandler.php</span>
<span class="pl-mdr">@@ -134,7 +134,7 @@</span> class ErrorHandler
if (!$replace && $prev) {
restore_error_handler();
}
<span class="pl-md"><span class="pl-md">-</span> if (is_array($prev = set_exception_handler(array($handler, 'handleException'))) && $prev[0] === $handler) {</span>
<span class="pl-mi1"><span class="pl-mi1">+</span> if (is_array($prev = set_exception_handler(array($handler, 'handleException'))) && get_class($prev[0]) === get_class($handler)) {</span>
restore_exception_handler();
} else {
$handler->setExceptionHandler($prev);</pre></div>
<p dir="auto">The results of the modified</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="php vendor/bin/simple-phpunit
PHPUnit 6.3.1 by Sebastian Bergmann and contributors.
Testing Project Test Suite
Rfloat(5.1568069458008)
Rfloat(5.1869430541992)
Rfloat(5.1967391967773)
Rfloat(5.2065353393555)
Rfloat(5.2163314819336)
Rfloat(5.2261276245117)
Rfloat(5.2359237670898)
Rfloat(5.245719909668)
Rfloat(5.2555160522461)
Rfloat(5.2656173706055)
Rfloat(5.2754135131836)
Rfloat(5.2852096557617)
Rfloat(5.2950057983398)
Rfloat(5.304801940918)
Rfloat(5.3145980834961)
R 16 / 16 (100%)float(5.3243942260742)
Time: 35.72 seconds, Memory: 6.00MB"><pre class="notranslate"><code class="notranslate">php vendor/bin/simple-phpunit
PHPUnit 6.3.1 by Sebastian Bergmann and contributors.
Testing Project Test Suite
Rfloat(5.1568069458008)
Rfloat(5.1869430541992)
Rfloat(5.1967391967773)
Rfloat(5.2065353393555)
Rfloat(5.2163314819336)
Rfloat(5.2261276245117)
Rfloat(5.2359237670898)
Rfloat(5.245719909668)
Rfloat(5.2555160522461)
Rfloat(5.2656173706055)
Rfloat(5.2754135131836)
Rfloat(5.2852096557617)
Rfloat(5.2950057983398)
Rfloat(5.304801940918)
Rfloat(5.3145980834961)
R 16 / 16 (100%)float(5.3243942260742)
Time: 35.72 seconds, Memory: 6.00MB
</code></pre></div> | 1 |
<p dir="auto"><strong>Flutter environment:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel beta, v0.7.3, on Linux, locale en_US.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.1)
✗ Android license status unknown.
[✓] Android Studio (version 3.1)
[✓] IntelliJ IDEA Community Edition (version 2018.2)
[✓] VS Code (version 1.27.1)
[✓] Connected devices (1 available)"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel beta, v0.7.3, on Linux, locale en_US.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.1)
✗ Android license status unknown.
[✓] Android Studio (version 3.1)
[✓] IntelliJ IDEA Community Edition (version 2018.2)
[✓] VS Code (version 1.27.1)
[✓] Connected devices (1 available)
</code></pre></div>
<p dir="auto"><strong>Coding context:</strong><br>
calling steps: home widget -> drawer item (routing) -> ONE Widget : successful for the first time.<br>
then back to home widget-> repeat above steps -> bug as follow</p>
<p dir="auto"><strong>Bug information:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I/flutter ( 5796): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 5796): The following assertion was thrown building Builder:
I/flutter ( 5796): 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3736 pos 12: '_state._widget ==
I/flutter ( 5796): null': is not true.
I/flutter ( 5796):
I/flutter ( 5796): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter ( 5796): more information in this error message to help you determine and fix the underlying cause.
I/flutter ( 5796): In either case, please report this assertion by filing a bug on GitHub:
I/flutter ( 5796): https://github.com/flutter/flutter/issues/new
I/flutter ( 5796):
I/flutter ( 5796): When the exception was thrown, this was the stack:
I/flutter ( 5796): #2 new StatefulElement (package:flutter/src/widgets/framework.dart:3736:12)
I/flutter ( 5796): #3 StatefulWidget.createElement (package:flutter/src/widgets/framework.dart:789:42)
I/flutter ( 5796): #4 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2917:40)
I/flutter ( 5796): #5 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #6 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #7 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #8 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #9 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #10 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #11 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #12 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #13 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #14 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #15 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #16 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #17 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #18 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #19 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #20 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #21 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #22 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #23 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #24 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #25 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #26 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #27 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #28 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #29 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #30 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
I/flutter ( 5796): #31 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #32 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #33 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #34 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #35 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #36 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #37 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #38 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #39 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #40 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #41 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #42 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #43 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
I/flutter ( 5796): #44 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #45 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #46 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #47 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #48 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #49 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #50 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #51 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #52 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #53 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #54 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #55 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #56 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #57 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #58 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #59 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #60 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #61 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #62 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
I/flutter ( 5796): #63 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #64 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #65 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #66 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #67 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #68 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #69 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #70 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #71 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #72 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #73 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #74 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #75 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #76 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #77 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #78 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #79 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #80 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #81 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #82 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #83 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #84 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
I/flutter ( 5796): #85 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #86 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #87 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #88 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #89 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #90 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #91 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
I/flutter ( 5796): #92 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #93 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #94 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #95 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4449:32)
I/flutter ( 5796): #96 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4781:17)
I/flutter ( 5796): #97 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #98 _TheatreElement.update (package:flutter/src/widgets/overlay.dart:507:16)
I/flutter ( 5796): #99 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #100 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #101 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #102 StatefulElement.update (package:flutter/src/widgets/framework.dart:3811:5)
I/flutter ( 5796): #103 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #104 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #105 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #106 ProxyElement.update (package:flutter/src/widgets/framework.dart:3921:5)
I/flutter ( 5796): #107 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #108 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4673:14)
I/flutter ( 5796): #109 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #110 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #111 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #112 StatefulElement.update (package:flutter/src/widgets/framework.dart:3811:5)
I/flutter ( 5796): #113 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #114 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4673:14)
I/flutter ( 5796): #115 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #116 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4673:14)
I/flutter ( 5796): #117 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #118 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #119 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #120 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2255:33)
I/flutter ( 5796): #121 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:653:20)
I/flutter ( 5796): #122 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
I/flutter ( 5796): #123 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter ( 5796): #124 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter ( 5796): #125 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
I/flutter ( 5796): #126 _invoke (dart:ui/hooks.dart:128:13)
I/flutter ( 5796): #127 _drawFrame (dart:ui/hooks.dart:117:3)
I/flutter ( 5796): (elided 2 frames from class _AssertionError)
I/flutter ( 5796): ═════════════════════════════════════════════════════════════════"><pre class="notranslate"><code class="notranslate">I/flutter ( 5796): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 5796): The following assertion was thrown building Builder:
I/flutter ( 5796): 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3736 pos 12: '_state._widget ==
I/flutter ( 5796): null': is not true.
I/flutter ( 5796):
I/flutter ( 5796): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter ( 5796): more information in this error message to help you determine and fix the underlying cause.
I/flutter ( 5796): In either case, please report this assertion by filing a bug on GitHub:
I/flutter ( 5796): https://github.com/flutter/flutter/issues/new
I/flutter ( 5796):
I/flutter ( 5796): When the exception was thrown, this was the stack:
I/flutter ( 5796): #2 new StatefulElement (package:flutter/src/widgets/framework.dart:3736:12)
I/flutter ( 5796): #3 StatefulWidget.createElement (package:flutter/src/widgets/framework.dart:789:42)
I/flutter ( 5796): #4 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2917:40)
I/flutter ( 5796): #5 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #6 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #7 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #8 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #9 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #10 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #11 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #12 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #13 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #14 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #15 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #16 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #17 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #18 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #19 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #20 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #21 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #22 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #23 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #24 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #25 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #26 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #27 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #28 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #29 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #30 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
I/flutter ( 5796): #31 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #32 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #33 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #34 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #35 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #36 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #37 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #38 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #39 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #40 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #41 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #42 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #43 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
I/flutter ( 5796): #44 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #45 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #46 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #47 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #48 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #49 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #50 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #51 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #52 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #53 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #54 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #55 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #56 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #57 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #58 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #59 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #60 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #61 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #62 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
I/flutter ( 5796): #63 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #64 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #65 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #66 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #67 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #68 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #69 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #70 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #71 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #72 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
I/flutter ( 5796): #73 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #74 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #75 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #76 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #77 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #78 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #79 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #80 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #81 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #82 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #83 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #84 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
I/flutter ( 5796): #85 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #86 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #87 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #88 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #89 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #90 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
I/flutter ( 5796): #91 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
I/flutter ( 5796): #92 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
I/flutter ( 5796): #93 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
I/flutter ( 5796): #94 Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
I/flutter ( 5796): #95 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4449:32)
I/flutter ( 5796): #96 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4781:17)
I/flutter ( 5796): #97 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #98 _TheatreElement.update (package:flutter/src/widgets/overlay.dart:507:16)
I/flutter ( 5796): #99 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #100 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #101 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #102 StatefulElement.update (package:flutter/src/widgets/framework.dart:3811:5)
I/flutter ( 5796): #103 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #104 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #105 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #106 ProxyElement.update (package:flutter/src/widgets/framework.dart:3921:5)
I/flutter ( 5796): #107 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #108 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4673:14)
I/flutter ( 5796): #109 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #110 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #111 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #112 StatefulElement.update (package:flutter/src/widgets/framework.dart:3811:5)
I/flutter ( 5796): #113 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #114 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4673:14)
I/flutter ( 5796): #115 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #116 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4673:14)
I/flutter ( 5796): #117 Element.updateChild (package:flutter/src/widgets/framework.dart:2711:15)
I/flutter ( 5796): #118 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
I/flutter ( 5796): #119 Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
I/flutter ( 5796): #120 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2255:33)
I/flutter ( 5796): #121 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:653:20)
I/flutter ( 5796): #122 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
I/flutter ( 5796): #123 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter ( 5796): #124 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter ( 5796): #125 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
I/flutter ( 5796): #126 _invoke (dart:ui/hooks.dart:128:13)
I/flutter ( 5796): #127 _drawFrame (dart:ui/hooks.dart:117:3)
I/flutter ( 5796): (elided 2 frames from class _AssertionError)
I/flutter ( 5796): ═════════════════════════════════════════════════════════════════
</code></pre></div> | <p dir="auto">For example, I'm trying to find documentation on NetworkImage, to load images from my server.<br>
Google (and search on the flutter.io) both point me to <a href="https://docs.flutter.io/flutter/material/Image/Image.network.html" rel="nofollow">https://docs.flutter.io/flutter/material/Image/Image.network.html</a> which returns 404.</p> | 0 |
<p dir="auto">Duplicate</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 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=""> This has already been asked to the <a href="https://github.com/celery/celery/discussions">discussions forum</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" checked=""> 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>: celery:5.2.3 (dawn-chorus)</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.2.3 (dawn-chorus) kombu:5.2.3 py:3.9.10
billiard:3.6.4.0 redis:4.1.2
platform -> system:Linux arch:64bit, ELF
kernel version:4.4.0-19041-Microsoft imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:django-celery-results-backend
"><pre class="notranslate"><code class="notranslate">software -> celery:5.2.3 (dawn-chorus) kombu:5.2.3 py:3.9.10
billiard:3.6.4.0 redis:4.1.2
platform -> system:Linux arch:64bit, ELF
kernel version:4.4.0-19041-Microsoft imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:django-celery-results-backend
</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=""><pre class="notranslate"></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">All the tasks will be submitted to the queue</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">Hi all, I'm experiencing a weird behavior/bug after upgrading from celery 5.05 to celery 5.2.3.<br>
I'm trying to create a chord that consists of a group of 10 tasks.<br>
When I'm using an iterator to build the celery group, only 2 tasks are published. When I'm using the exact same iterator but converting it to a list, it publishes all the 10 tasks. The same code works under celery 5.0.5.</p>
<p dir="auto">I'm posting the code I'm running both with celery 5.0.5 and with celery 5.2.3 (no worker is running)</p>
<p dir="auto">Example on celery 5.2.3:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [14]: (celery.group(task_a.s(i) for i in range(10)) | task_b.s(999)).apply_async() # note: the group is taking an iterator as input
Out[14]: <AsyncResult: f003701a-3996-4ad8-aeae-13daf9fd1290>
In [15]: redis_client.llen('celery')
Out[15]: 3 # The 3 tasks that are in the queue are the 2 first group tasks + a chord unlock task
In [16]: redis_client.flushdb()
Out[16]: True
In [17]: redis_client.llen('celery')
Out[17]: 0
In [18]: (celery.group([task_a.s(i) for i in range(10)]) | task_b.s(999)).apply_async() # note: the group is taking a list as input
Out[18]: <AsyncResult: 67332373-accb-4ca7-9cb3-3dcd276cacca>
In [19]: redis_client.llen('celery')
Out[19]: 11
celery report:
software -> celery:5.2.3 (dawn-chorus) kombu:5.2.3 py:3.9.10
billiard:3.6.4.0 redis:4.1.2
platform -> system:Linux arch:64bit, ELF
kernel version:4.4.0-19041-Microsoft imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:django-celery-results-backend"><pre class="notranslate"><code class="notranslate">In [14]: (celery.group(task_a.s(i) for i in range(10)) | task_b.s(999)).apply_async() # note: the group is taking an iterator as input
Out[14]: <AsyncResult: f003701a-3996-4ad8-aeae-13daf9fd1290>
In [15]: redis_client.llen('celery')
Out[15]: 3 # The 3 tasks that are in the queue are the 2 first group tasks + a chord unlock task
In [16]: redis_client.flushdb()
Out[16]: True
In [17]: redis_client.llen('celery')
Out[17]: 0
In [18]: (celery.group([task_a.s(i) for i in range(10)]) | task_b.s(999)).apply_async() # note: the group is taking a list as input
Out[18]: <AsyncResult: 67332373-accb-4ca7-9cb3-3dcd276cacca>
In [19]: redis_client.llen('celery')
Out[19]: 11
celery report:
software -> celery:5.2.3 (dawn-chorus) kombu:5.2.3 py:3.9.10
billiard:3.6.4.0 redis:4.1.2
platform -> system:Linux arch:64bit, ELF
kernel version:4.4.0-19041-Microsoft imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:django-celery-results-backend
</code></pre></div>
<p dir="auto">Example on celery 5.0.5:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [7]: (celery.group(task_a.s(i) for i in range(10)) | task_b.s(999)).apply_async() # note: the group is taking an iterator as input
Out[7]: <AsyncResult: bb395128-1ebb-4181-9def-9d0c26bb88ff>
In [8]: redis_client.llen('celery')
Out[8]: 10
In [9]: redis_client.flushdb()
Out[9]: True
In [10]: redis_client.llen('celery')
Out[10]: 0
In [11]: (celery.group([task_a.s(i) for i in range(10)]) | task_b.s(999)).apply_async() # note: the group is taking a list as input
Out[11]: <AsyncResult: d3344171-3dae-475f-9c5e-895aff5e6be0>
In [12]: redis_client.llen('celery')
Out[12]: 10
celery report:
software -> celery:5.0.5 (singularity) kombu:5.2.3 py:3.9.10
billiard:3.6.4.0 redis:4.1.2
platform -> system:Linux arch:64bit, ELF
kernel version:4.4.0-19041-Microsoft imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:django-celery-results-backend"><pre class="notranslate"><code class="notranslate">In [7]: (celery.group(task_a.s(i) for i in range(10)) | task_b.s(999)).apply_async() # note: the group is taking an iterator as input
Out[7]: <AsyncResult: bb395128-1ebb-4181-9def-9d0c26bb88ff>
In [8]: redis_client.llen('celery')
Out[8]: 10
In [9]: redis_client.flushdb()
Out[9]: True
In [10]: redis_client.llen('celery')
Out[10]: 0
In [11]: (celery.group([task_a.s(i) for i in range(10)]) | task_b.s(999)).apply_async() # note: the group is taking a list as input
Out[11]: <AsyncResult: d3344171-3dae-475f-9c5e-895aff5e6be0>
In [12]: redis_client.llen('celery')
Out[12]: 10
celery report:
software -> celery:5.0.5 (singularity) kombu:5.2.3 py:3.9.10
billiard:3.6.4.0 redis:4.1.2
platform -> system:Linux arch:64bit, ELF
kernel version:4.4.0-19041-Microsoft imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:django-celery-results-backend
</code></pre></div> | 0 |
<p dir="auto">Successfully installed torch-0.4.0 (cu90/torch-0.4.0-cp36-cp36m-win_amd64.whl )</p>
<p dir="auto">when run a test.py , got an errors like this:<br>
File "E:/baidu/DuReader-master/DuReader-master/PyTorch/Test.py", line 1, in <br>
import torch<br>
File "F:\Program Files\python3.6.1\lib\site-packages\torch_<em>init</em>_.py", line 78, in <br>
from torch._C import *<br>
ImportError: DLL load failed: 找不到指定的模块。</p>
<p dir="auto">My environment is python3.6.1+cuda9.0. the same environment run tensorflow is ok!</p> | <p dir="auto">File "", line 4, in <br>
import torch</p>
<p dir="auto">File "C:\Users\hp i3\Anaconda3\lib\site-packages\torch_<em>init</em>_.py", line 76, in <br>
from torch._C import *</p>
<p dir="auto">ImportError: DLL load failed: The specified module could not be found.</p> | 1 |
<h2 dir="auto">Bug Report</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I would like to work on a fix!</li>
</ul>
<p dir="auto"><strong>Current behavior</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Cannot redefine property: c"><pre class="notranslate"><code class="notranslate">TypeError: Cannot redefine property: c
</code></pre></div>
<p dir="auto">Namespace reexports are transpiled like this:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for(key ...){
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return imported[key];
}
});
}"><pre class="notranslate"><span class="pl-k">for</span><span class="pl-kos">(</span><span class="pl-s1">key</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">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">enumerable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-en">get</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-k">return</span> <span class="pl-s1">imported</span><span class="pl-kos">[</span><span class="pl-s1">key</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">But the spec allows for reexporting a symbol twice in the same file if it is actually the same binding (see example code below).</p>
<p dir="auto">This means that <code class="notranslate">Object.defineProperty(exports, "c", ...)</code> is called twice, causing the error.</p>
<p dir="auto">One of the packages that do this is <code class="notranslate">@fluentui/react</code> (this came up in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="589784968" data-permission-text="Title is private" data-url="https://github.com/parcel-bundler/parcel/issues/4399" data-hovercard-type="issue" data-hovercard-url="/parcel-bundler/parcel/issues/4399/hovercard" href="https://github.com/parcel-bundler/parcel/issues/4399">parcel-bundler/parcel#4399</a>)</p>
<p dir="auto"><strong>Input Code</strong></p>
<ul dir="auto">
<li><a href="https://github.com/mischnic/parcel-issue-4399">https://github.com/mischnic/parcel-issue-4399</a> (<code class="notranslate">lib/</code> already contains the Babel output of <code class="notranslate">src-valid</code>)</li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export * from "./a.js";
export * from "./b.js";
// ---- everything below is just for context ---
// a.js
export { c } from './c.js'; // <--
export const a = "a";
// b.js
export { c } from './c.js'; // <--
export const b = "b";
// c.js
export function c() {
return false;
}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">"./a.js"</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">"./b.js"</span><span class="pl-kos">;</span>
<span class="pl-c">// ---- everything below is just for context ---</span>
<span class="pl-c">// a.js</span>
<span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-s1">c</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./c.js'</span><span class="pl-kos">;</span> <span class="pl-c">// <-- </span>
<span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s">"a"</span><span class="pl-kos">;</span>
<span class="pl-c">// b.js</span>
<span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-s1">c</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./c.js'</span><span class="pl-kos">;</span> <span class="pl-c">// <-- </span>
<span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s">"b"</span><span class="pl-kos">;</span>
<span class="pl-c">// c.js</span>
<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">c</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-c1">false</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">The first file should export <code class="notranslate">a, b, c</code> (and not throw).</p>
<p dir="auto"><strong>Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)</strong></p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="babel --plugins @babel/plugin-transform-modules-commonjs --delete-dir-on-start src-valid -d lib"><pre class="notranslate">babel --plugins @babel/plugin-transform-modules-commonjs --delete-dir-on-start src-valid -d lib</pre></div>
<p dir="auto"><strong>Environment</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" System:
OS: macOS 10.15.4
Binaries:
Node: 14.4.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
npmPackages:
@babel/cli: ^7.10.1 => 7.10.1
@babel/core: ^7.10.2 => 7.10.2
@babel/plugin-transform-modules-commonjs: ^7.10.1 => 7.10.1"><pre class="notranslate"><code class="notranslate"> System:
OS: macOS 10.15.4
Binaries:
Node: 14.4.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
npmPackages:
@babel/cli: ^7.10.1 => 7.10.1
@babel/core: ^7.10.2 => 7.10.2
@babel/plugin-transform-modules-commonjs: ^7.10.1 => 7.10.1
</code></pre></div>
<p dir="auto"><strong>Possible Solution</strong><br>
Not use <code class="notranslate">Object.defineProperty</code>? <code class="notranslate">configurable: true</code> ? But all of these have other sideffects</p>
<p dir="auto"><strong>Additional context</strong></p>
<p dir="auto">Technically, f there are conflicting reexports (see <code class="notranslate">src-invalid</code>), there should be a SyntaxError (!).</p>
<p dir="auto">But even <a href="https://rollupjs.org/repl/?version=2.15.0&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmV4cG9ydCUyMColMjBmcm9tJTIwJTVDJTIyLiUyRmEuanMlNUMlMjIlM0IlNUNuZXhwb3J0JTIwKiUyMGZyb20lMjAlNUMlMjIuJTJGYi5qcyU1QyUyMiUzQiUyMiUyQyUyMmlzRW50cnklMjIlM0F0cnVlJTdEJTJDJTdCJTIybmFtZSUyMiUzQSUyMmEuanMlMjIlMkMlMjJjb2RlJTIyJTNBJTIyZXhwb3J0JTIwJTdCJTIwYyUyMCU3RCUyMGZyb20lMjAnLiUyRmMxLmpzJyUzQiU1Q25leHBvcnQlMjBjb25zdCUyMGElMjAlM0QlMjAlNUMlMjJhJTVDJTIyJTNCJTIyJTJDJTIyaXNFbnRyeSUyMiUzQWZhbHNlJTdEJTJDJTdCJTIybmFtZSUyMiUzQSUyMmIuanMlMjIlMkMlMjJjb2RlJTIyJTNBJTIyZXhwb3J0JTIwJTdCJTIwYyUyMCU3RCUyMGZyb20lMjAnLiUyRmMyLmpzJyUzQiU1Q25leHBvcnQlMjBjb25zdCUyMGIlMjAlM0QlMjAlNUMlMjJiJTVDJTIyJTNCJTIyJTJDJTIyaXNFbnRyeSUyMiUzQWZhbHNlJTdEJTJDJTdCJTIybmFtZSUyMiUzQSUyMmMxLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmV4cG9ydCUyMGZ1bmN0aW9uJTIwYygpJTIwJTdCJTVDbiU1Q3RyZXR1cm4lMjBmYWxzZSUzQiU1Q24lN0QlMjIlN0QlMkMlN0IlMjJuYW1lJTIyJTNBJTIyYzIuanMlMjIlMkMlMjJjb2RlJTIyJTNBJTIyZXhwb3J0JTIwZnVuY3Rpb24lMjBjKCklMjAlN0IlNUNuJTVDdHJldHVybiUyMHRydWUlM0IlNUNuJTdEJTIyJTdEJTVEJTJDJTIyb3B0aW9ucyUyMiUzQSU3QiUyMmZvcm1hdCUyMiUzQSUyMmVzJTIyJTJDJTIybmFtZSUyMiUzQSUyMm15QnVuZGxlJTIyJTJDJTIyYW1kJTIyJTNBJTdCJTIyaWQlMjIlM0ElMjIlMjIlN0QlMkMlMjJnbG9iYWxzJTIyJTNBJTdCJTdEJTdEJTJDJTIyZXhhbXBsZSUyMiUzQW51bGwlN0Q=" rel="nofollow">Rollup doesn't handle this correctly</a> (and Babel cannot work across multiple files anyway). <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="637362926" data-permission-text="Title is private" data-url="https://github.com/rollup/rollup/issues/3629" data-hovercard-type="issue" data-hovercard-url="/rollup/rollup/issues/3629/hovercard" href="https://github.com/rollup/rollup/issues/3629">rollup/rollup#3629</a></p> | <p dir="auto">having the same problem here but in Safari<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="78129280" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/1574" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/1574/hovercard" href="https://github.com/babel/babel/issues/1574">#1574</a></p> | 0 |
<p dir="auto">Add support of partial classes. <a href="https://github.com/Microsoft/TypeScript/wiki/Mixins">Mixins</a> is not the same, because it's run-time realization. Need compile realization, where partial classes will be combine into one before converting typescript to javascript.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//FileA.ts
partial class ClassA
{
constructor(public name: string) {}
public sayHello(): string { return "hi!"; }
}
//FileB.ts
partial class ClassA
{
public sayBye(): string { return "by!"; }
}"><pre class="notranslate"><span class="pl-c">//FileA.ts</span>
<span class="pl-s1">partial</span> <span class="pl-k">class</span> <span class="pl-v">ClassA</span>
<span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">public</span> <span class="pl-s1">name</span>: <span class="pl-s1">string</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-en">public</span> <span class="pl-s1">sayHello</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-s1">string</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">"hi!"</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-c">//FileB.ts</span>
<span class="pl-s1">partial</span><span class="pl-kos"></span> <span class="pl-k">class</span> <span class="pl-v">ClassA</span>
<span class="pl-kos">{</span>
<span class="pl-c1">public</span> <span class="pl-c1">sayBye</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-c1">string</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">"by!"</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">will be:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="partial class ClassA
{
constructor(public name: string) {}
public sayHello(): string { return "hi!"; }
public sayBye(): string { return "by!"; }
}"><pre class="notranslate"><span class="pl-s1">partial</span> <span class="pl-k">class</span> <span class="pl-v">ClassA</span>
<span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">public</span> <span class="pl-s1">name</span>: <span class="pl-s1">string</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-en">public</span> <span class="pl-s1">sayHello</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-s1">string</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">"hi!"</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-en">public</span> <span class="pl-s1">sayBye</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-s1">string</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">"by!"</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div> | <p dir="auto">Please enable "line numbers" as a default for the code editor.</p>
<p dir="auto">This is a duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="60743747" data-permission-text="Title is private" data-url="https://github.com/dotnet/fsharp/issues/304" data-hovercard-type="issue" data-hovercard-url="/dotnet/fsharp/issues/304/hovercard" href="https://github.com/dotnet/fsharp/issues/304">dotnet/fsharp#304</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="60871716" data-permission-text="Title is private" data-url="https://github.com/dotnet/roslyn/issues/1222" data-hovercard-type="issue" data-hovercard-url="/dotnet/roslyn/issues/1222/hovercard" href="https://github.com/dotnet/roslyn/issues/1222">dotnet/roslyn#1222</a>, but we think it should be done for all languages (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="60743747" data-permission-text="Title is private" data-url="https://github.com/dotnet/fsharp/issues/304" data-hovercard-type="issue" data-hovercard-url="/dotnet/fsharp/issues/304/hovercard?comment_id=78557404&comment_type=issue_comment" href="https://github.com/dotnet/fsharp/issues/304#issuecomment-78557404">dotnet/fsharp#304 (comment)</a>)</p> | 0 |
<p dir="auto">For the code below, the tabs are not responding...</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from 'react';
import mui from 'material-ui';
import {Tabs, Tab} from 'material-ui';
const ThemeManager = new mui.Styles.ThemeManager();
class JSTabs extends React.Component {
getChildContext() {
return {
muiTheme: ThemeManager.getCurrentTheme()
};
}
render() {
return <Tabs>
<Tab label="Item One" >
<div>
<h2>Tab One Template Example</h2>
<p>
This is an example of a tab template!
</p>
<p>
You can put any sort of HTML or react component in here.
</p>
</div>
</Tab>
<Tab label="Item Two" >
<div>
<h2>Tab Two Template Example</h2>
<p>
This is another example of a tab template!
</p>
<p>
Fair warning - the next tab routes to home!
</p>
</div>
</Tab>
<Tab
label="Item Three"
route="home"
onActive={this._onActive} />
</Tabs>
}
_onActive(tab){
this.context.router.transitionTo(tab.props.route);
}
}
JSTabs.childContextTypes = {muiTheme: React.PropTypes.object};
React.render(<JSTabs />,document.querySelector('body'));"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-s1">mui</span> <span class="pl-k">from</span> <span class="pl-s">'material-ui'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">Tabs</span><span class="pl-kos">,</span> <span class="pl-v">Tab</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'material-ui'</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-v">ThemeManager</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-s1">mui</span><span class="pl-kos">.</span><span class="pl-c1">Styles</span><span class="pl-kos">.</span><span class="pl-c1">ThemeManager</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">JSTabs</span> <span class="pl-k">extends</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span> <span class="pl-kos">{</span>
<span class="pl-en">getChildContext</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-kos">{</span>
<span class="pl-c1">muiTheme</span>: <span class="pl-v">ThemeManager</span><span class="pl-kos">.</span><span class="pl-en">getCurrentTheme</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-en">render</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-c1"><</span><span class="pl-ent">Tabs</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">Tab</span> <span class="pl-c1">label</span><span class="pl-c1">=</span><span class="pl-s">"Item One"</span> <span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">h2</span><span class="pl-c1">></span>Tab One Template Example<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">h2</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">p</span><span class="pl-c1">></span>
This is an example of a tab template!
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">p</span><span class="pl-c1">></span>
You can put any sort of HTML or react component in here.
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">Tab</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">Tab</span> <span class="pl-c1">label</span><span class="pl-c1">=</span><span class="pl-s">"Item Two"</span> <span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">h2</span><span class="pl-c1">></span>Tab Two Template Example<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">h2</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">p</span><span class="pl-c1">></span>
This is another example of a tab template!
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">p</span><span class="pl-c1">></span>
Fair warning - the next tab routes to home!
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">Tab</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">Tab</span>
<span class="pl-c1">label</span><span class="pl-c1">=</span><span class="pl-s">"Item Three"</span>
<span class="pl-c1">route</span><span class="pl-c1">=</span><span class="pl-s">"home"</span>
<span class="pl-c1">onActive</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">_onActive</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">Tabs</span><span class="pl-c1">></span>
<span class="pl-kos">}</span>
<span class="pl-en">_onActive</span><span class="pl-kos">(</span><span class="pl-s1">tab</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">context</span><span class="pl-kos">.</span><span class="pl-c1">router</span><span class="pl-kos">.</span><span class="pl-en">transitionTo</span><span class="pl-kos">(</span><span class="pl-s1">tab</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">route</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-v">JSTabs</span><span class="pl-kos">.</span><span class="pl-c1">childContextTypes</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-c1">muiTheme</span>: <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">PropTypes</span><span class="pl-kos">.</span><span class="pl-c1">object</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-ent">JSTabs</span> <span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">,</span><span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">querySelector</span><span class="pl-kos">(</span><span class="pl-s">'body'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | <p dir="auto">I inserted Tabs code into my component. OK, Tabs displayed on page but second tab remains inactive and I can't set it active.<br>
Where I'm not right?<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10769646/5972646/cb85782c-a8a8-11e4-801a-2c3f01dab6d1.png"><img src="https://cloud.githubusercontent.com/assets/10769646/5972646/cb85782c-a8a8-11e4-801a-2c3f01dab6d1.png" alt="kiss_12kb 1422604209" style="max-width: 100%;"></a><br>
Tabs code:<br>
<code class="notranslate"><div className="authorization"></code><br>
<code class="notranslate"><Tabs></code><br>
<code class="notranslate"><Tab label="Авторизация"></code><br>
<code class="notranslate">{login}</code><br>
<code class="notranslate"></Tab></code><br>
<code class="notranslate"><Tab label="Регистрация"></code><br>
<code class="notranslate">{register}</code><br>
<code class="notranslate"></Tab></code><br>
<code class="notranslate"></Tabs></code><br>
<code class="notranslate"></div></code></p> | 1 |
<p dir="auto">I installed babel and run <code class="notranslate">babel-node</code> which version is 5.8.21.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="> const b = 1
'use strict'
> b =2
2
> b
2
> const b = 3
'use strict'
> b
3"><pre class="notranslate"><span class="pl-c1">></span> <span class="pl-k">const</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>
<span class="pl-s">'use strict'</span>
<span class="pl-c1">></span> <span class="pl-s1">b</span> <span class="pl-c1">=</span><span class="pl-c1">2</span>
<span class="pl-c1">2</span>
<span class="pl-c1">></span> <span class="pl-s1">b</span>
<span class="pl-c1">2</span>
<span class="pl-c1">></span> <span class="pl-s1">const</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span>
<span class="pl-s">'use strict'</span>
<span class="pl-c1">></span> <span class="pl-s1">b</span>
<span class="pl-c1">3</span></pre></div>
<p dir="auto">Obviously the ES6 code result is not correct. I compile the code with io.js, it throw the erro message:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="TypeError: Identifier 'b' has already been declared"><pre class="notranslate">TypeError: <span class="pl-v">Identifier</span><span class="pl-kos"></span> <span class="pl-s">'b'</span> <span class="pl-s1">has</span> <span class="pl-s1">already</span> <span class="pl-s1">been</span> <span class="pl-s1">declared</span></pre></div>
<p dir="auto">Why babel-node let constant variable changed?</p> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ babel-node
> const PI = 3.14
'use strict'
> PI = 0 // Try to change a constant value
0
> PI
0
>"><pre class="notranslate"><code class="notranslate">$ babel-node
> const PI = 3.14
'use strict'
> PI = 0 // Try to change a constant value
0
> PI
0
>
</code></pre></div>
<p dir="auto">This problem only happens inside the REPL, it should throw an error since <code class="notranslate">babel</code> and <code class="notranslate">babel-node -e</code> can produce the error correctly.<br>
<em>Babel version: v5.6.14</em></p> | 1 |
<p dir="auto">Please go to Stack Overflow for help and support:</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/tagged/tensorflow" rel="nofollow">https://stackoverflow.com/questions/tagged/tensorflow</a></p>
<p dir="auto">If you open a GitHub issue, here is our policy:</p>
<ol dir="auto">
<li>It must be a bug or a feature request.</li>
<li>The form below must be filled out.</li>
<li>It shouldn't be a TensorBoard issue. Those go <a href="https://github.com/tensorflow/tensorboard/issues">here</a>.</li>
</ol>
<p dir="auto"><strong>Here's why we have that policy</strong>: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.</p>
<hr>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: YES</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>:<br>
Generating Tensorflow model: Ubuntu 16.04 LTS (GNU/Linux 4.4.0-91-generic x86_64)<br>
Load Tensorflow model: macOS 10.12 Sierra</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: TensorFlow is installed from source</li>
<li><strong>TensorFlow version (use command below)</strong>: TensorFlow version 1.2.0</li>
<li><strong>Python version</strong>: Python version 3.5</li>
<li><strong>Bazel version (if compiling from source)</strong>: Bazel version 0.5.3</li>
<li><strong>CUDA/cuDNN version</strong>: None</li>
<li><strong>GPU model and memory</strong>: NA</li>
<li><strong>Exact command to reproduce</strong>:</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">Error happen when call "status = session_t->Create(graph)"</p>
<p dir="auto">error message:<br>
2017-08-16 13:22:27.692781+0800 CameraExample[6322:2753781] Error adding graph to session: No OpKernel was registered to support Op 'RandomUniform' with these attrs. Registered devices: [CPU], Registered kernels:<br>
</p>
<h3 dir="auto">Source code / logs</h3>
<h2 dir="auto">Export models as *.pb file: (In python)<br>
self.saver.save(self.sess, self.my_path_to_model + "model.ckpt", global_step=i)<br>
output_graph_def = tf.graph_util.convert_variables_to_constants(self.sess,self.sess.graph_def,output_node_names=['models_simple/y_conv'])<br>
with tf.gfile.FastGFile(self.my_path_to_model+ 'graph.pb', mode = 'wb') as f:<br>
f.write(output_graph_def.SerializeToString())</h2>
<p dir="auto">IOS:</p>
<h2 dir="auto">use the following operations to process exported model</h2>
<p dir="auto">#Call freeze_graph, synthesize graph.pb and CKPT, generate frozen.pb<br>
bazel-bin/tensorflow/python/tools/freeze_graph <br>
--input_graph=XXXX/graph.pb <br>
--input_checkpoint=XXXX/model.ckpt-0 <br>
--output_node_names=models_simple/Placeholder,models_simple/y_conv <br>
--input_binary <br>
--output_graph=XXXX/frozen.pb</p>
<p dir="auto">#Call optimize_for_inference, reduce the operation, replace the calculation can not run in the iOS version, generate inference.pb<br>
bazel-bin/tensorflow/python/tools/optimize_for_inference <br>
--input=XXXX/frozen.pb <br>
--output=XXXX/inference.pb <br>
--input_names=models_simple/Placeholder <br>
--output_names=models_simple/y_conv <br>
--frozen_graph=True</p>
<h2 dir="auto">#Call quantize_graph to further optimize the graph, generate rounded_graph.pb<br>
bazel-bin/tensorflow/tools/quantization/quantize_graph <br>
--input=XXXX/inference.pb <br>
--output=XXXX/rounded_graph.pb <br>
--output_node_names=models_simple/y_conv <br>
--mode=weights_rounded</h2>
<p dir="auto">Then, execute the following code, (BOOL)loadGraphFromPath executed successfully, but error raised at "status = session_t->Create(graph)"</p>
<ul dir="auto">
<li>
<p dir="auto">(BOOL)loadGraphFromPath:(NSString *)path<br>
{<br>
auto status = ReadBinaryProto(tensorflow::Env::Default(), path.fileSystemRepresentation, &graph);<br>
if (!status.ok()) {<br>
NSLog(@"Error reading graph: %s", status.error_message().c_str());<br>
return NO;<br>
}</p>
<p dir="auto">// This prints out the names of the nodes in the graph.<br>
auto nodeCount = graph.node_size();<br>
NSLog(@"Node count: %d", nodeCount);<br>
for (auto i = 0; i < nodeCount; ++i) {<br>
auto node = graph.node(i);<br>
NSLog(@"Node %d: %s '%s'", i, node.op().c_str(), node.name().c_str());<br>
}</p>
<p dir="auto">return YES;<br>
}</p>
</li>
</ul>
<p dir="auto">create tf session:</p>
<ul dir="auto">
<li>
<p dir="auto">(BOOL)createSession<br>
{<br>
tensorflow::SessionOptions options;<br>
auto status = tensorflow::NewSession(options, &session_t);<br>
if (!status.ok()) {<br>
NSLog(@"Error creating session: %s", status.error_message().c_str());<br>
return NO;<br>
}</p>
<p dir="auto">status = session_t->Create(graph);<br>
if (!status.ok()) {<br>
// error<br>
NSLog(@"Error adding graph to session: %s", status.error_message().c_str());<br>
return NO;<br>
}</p>
<p dir="auto">return YES;<br>
}</p>
</li>
</ul>
<p dir="auto">error message:<br>
2017-08-16 13:22:27.692781+0800 CameraExample[6322:2753781] Error adding graph to session: No OpKernel was registered to support Op 'RandomUniform' with these attrs. Registered devices: [CPU], Registered kernels:<br>
</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" [[Node: dropout/random_uniform/RandomUniform = RandomUniform[T=DT_INT32, dtype=DT_FLOAT, seed=87654321, seed2=24](dropout/Shape)]]"><pre class="notranslate"><code class="notranslate"> [[Node: dropout/random_uniform/RandomUniform = RandomUniform[T=DT_INT32, dtype=DT_FLOAT, seed=87654321, seed2=24](dropout/Shape)]]
</code></pre></div>
<h1 dir="auto">It seems that RandomUniform was not supported on iOS , but when I called freeze_graph, those which are not supported on iOS should be deleted. What can I do for this problem?</h1> | <p dir="auto">Hi!</p>
<p dir="auto">Im working with the python wrapper for tensorflow. Is there any intentions of implement similar wrappers for the R languages?</p> | 0 |
<p dir="auto">Hi,</p>
<p dir="auto">I've run into a problem while running my next.js app in production. I use next.js with <a href="https://github.com/FormidableLabs/urql">URQL</a> and the <a href="https://github.com/zeit/next-plugins/tree/master/packages/next-sass">ZEIT SASS package</a> for next.js. When i run the app in dev mode it runs fine while navigating the routes. After i build the app and start it in production i run into a problem though.</p>
<p dir="auto">If i go to my second route directly (localhost:3000/test, without a graphql query) and try navigating to a route with a query (localhost:3000/) it won't execute the query and stays on the initial route (localhost:300/test). I first reported a bug with the guys from URQL (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="486008692" data-permission-text="Title is private" data-url="https://github.com/urql-graphql/urql/issues/411" data-hovercard-type="issue" data-hovercard-url="/urql-graphql/urql/issues/411/hovercard" href="https://github.com/urql-graphql/urql/issues/411">urql-graphql/urql#411</a>) but they couldn't help me.</p>
<p dir="auto">To reproduce my issue i created a repo to check out: <a href="https://github.com/erickm/next-urql-sass/tree/master/examples/3-ssr-with-nextjs">https://github.com/erickm/next-urql-sass/tree/master/examples/3-ssr-with-nextjs</a>.</p>
<p dir="auto">It looks like the error occurs while passing the data props to a custom component (only when using the sass function, without the sass pacakge it works fine).</p>
<p dir="auto">To reproduce:</p>
<ol dir="auto">
<li>checkout the repo & install</li>
<li><code class="notranslate">yarn build && yarn start</code></li>
<li>navigate to <code class="notranslate">localhost:3000/test</code></li>
<li>try to go to the home page (here is where i get stuck)</li>
</ol>
<p dir="auto">When i remove withSass in the next.config.js and remove the sass imports and sytles, build it and start it again it works fine.</p>
<p dir="auto">For reference i created a gif:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2747197/63921600-635a6980-ca43-11e9-9d9e-9e1d6c331138.gif"><img src="https://user-images.githubusercontent.com/2747197/63921600-635a6980-ca43-11e9-9d9e-9e1d6c331138.gif" alt="navigating" data-animated-image="" style="max-width: 100%;"></a></p> | <h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">When I'm running my next.js website on my local environment (only on local), and I try to access a page other than the homepage on an Apple device (Safari for desktop or anything on iOS), I get this error:<br>
<code class="notranslate">undefined is not an object (evaluating 'modules[moduleId].call')</code></p>
<p dir="auto">This is very very very specific as you can see.</p>
<p dir="auto">Actually it doesn't really bother me as it's only hapenning in dev mode.<br>
And I don't develop on Apple devices.</p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16116486/46108786-26587800-c1df-11e8-9648-793396b582ce.jpg"><img src="https://user-images.githubusercontent.com/16116486/46108786-26587800-c1df-11e8-9648-793396b582ce.jpg" alt="image-1" style="max-width: 100%;"></a></p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: iOS 11.4.1</li>
<li>Browser: Chrome, Safari</li>
<li>Version of Next.js: 6.1.2</li>
</ul> | 0 |
<h1 dir="auto">Description of the new feature/enhancement</h1>
<p dir="auto">Currently it is not possible to set <code class="notranslate">colorScheme</code> or <code class="notranslate">padding</code> on a global level, only per profile.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">Every setting that can be per-profile, minus the obvious ones like name and guid etc, should be able to be set on a global level as well.</p> | <h1 dir="auto">Windows 10 1903 Build 18362.449</h1>
<p dir="auto">Terminal version 0.6.2951.0</p>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Drag the window from either the right or left side and shrink it until the tabs are no longer visible. Extend the window back out until there is enough room for a few tabs.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The tabs disappear when the window becomes to small to display them. Then slide back out when the window is resized to fit them again.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The tabs don't reappear on the tab bar unless you click to add a new tab, then they all pop back in. The tab bar scroll buttons are there but don't so anything when clicked.</p> | 0 |
<p dir="auto">It always open in the same window.</p>
<p dir="auto">Also, when there is an instance of vscode running, runs <code class="notranslate">code .</code> on terminal brings up that instance instead of opening new window with the current folder nor open the current folder on the existing instance.</p> | <p dir="auto">Ubuntu 12.04, vscode 0.10.1</p>
<p dir="auto">Currently when you run <code class="notranslate">Code</code> if there is an instances already running (or shift clicking the app icon in Windows/Ubuntu) it will activate the currently opened window. This should open a new instance, the same goes for opening a new instance of <code class="notranslate">Code</code> with a folder as an argument when an instance is already open.</p>
<p dir="auto">It's a very common use case for many developers to have multiple editors with the same folder open.</p>
<p dir="auto"><strong>Repro:</strong></p>
<ol dir="auto">
<li><code class="notranslate">Code</code> (open instance of vscode)</li>
<li><code class="notranslate">Code</code></li>
</ol>
<p dir="auto"><strong>Expected:</strong><br>
A new instance of vscode is opened</p>
<p dir="auto"><strong>Actual:</strong><br>
The current instance of vscode is activated</p> | 1 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/367e898802735b8510af5ace5df6fc0cbdc1f09e811a081ed4c8abceca11658a/68747470733a2f2f7777772e657665726e6f74652e636f6d2f6c2f4171515159756c5244393942747073324a504148756441667a73345375475977382d45422f696d6167652e706e67"><img src="https://camo.githubusercontent.com/367e898802735b8510af5ace5df6fc0cbdc1f09e811a081ed4c8abceca11658a/68747470733a2f2f7777772e657665726e6f74652e636f6d2f6c2f4171515159756c5244393942747073324a504148756441667a73345375475977382d45422f696d6167652e706e67" alt="" data-canonical-src="https://www.evernote.com/l/AqQQYulRD99Btps2JPAHudAfzs4SuGYw8-EB/image.png" style="max-width: 100%;"></a></p> | <p dir="auto">Hi,<br>
I just can't use the website with Safari as of the release of the new design.<br>
At any given time there is a blank panel on the right site of the webpage, the only links I can click on are map and chat, they both pop out a new panel that overlaps the blank one, but if I close the panel it does not dismiss the blank one. <a href="https://imgur.com/Fwk4yjU" rel="nofollow">Screenshot for clarification</a></p>
<p dir="auto">Website works fine on Chrome or Firefox on my computer, so I guess its just an safari Issue?</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="In [2]: pd.Series(index=range(10))[{1:2,3:4}]
Out[2]:
1 NaN
3 NaN
dtype: float64
In [3]: pd.Series(index=range(10))[{1:2,3:4}.keys()]
Out[3]:
1 NaN
3 NaN
dtype: float64
In [4]: pd.DataFrame(index=range(10), columns=range(10))[{1:2,3:4}]
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4-5b29d5d42cf2> in <module>()
----> 1 pd.DataFrame(index=range(10), columns=range(10))[{1:2,3:4}]
~/nobackup/repo/pandas/pandas/core/frame.py in __getitem__(self, key)
2683 return self._getitem_multilevel(key)
2684 else:
-> 2685 return self._getitem_column(key)
2686
2687 def _getitem_column(self, key):
~/nobackup/repo/pandas/pandas/core/frame.py in _getitem_column(self, key)
2690 # get column
2691 if self.columns.is_unique:
-> 2692 return self._get_item_cache(key)
2693
2694 # duplicate columns & possible reduce dimensionality
~/nobackup/repo/pandas/pandas/core/generic.py in _get_item_cache(self, item)
2482 """Return the cached item, item represents a label indexer."""
2483 cache = self._item_cache
-> 2484 res = cache.get(item)
2485 if res is None:
2486 values = self._data.get(item)
TypeError: unhashable type: 'dict'
In [5]: pd.DataFrame(index=range(10), columns=range(10))[{1:2,3:4}.keys()]
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-030f516d9637> in <module>()
----> 1 pd.DataFrame(index=range(10), columns=range(10))[{1:2,3:4}.keys()]
~/nobackup/repo/pandas/pandas/core/frame.py in __getitem__(self, key)
2683 return self._getitem_multilevel(key)
2684 else:
-> 2685 return self._getitem_column(key)
2686
2687 def _getitem_column(self, key):
~/nobackup/repo/pandas/pandas/core/frame.py in _getitem_column(self, key)
2690 # get column
2691 if self.columns.is_unique:
-> 2692 return self._get_item_cache(key)
2693
2694 # duplicate columns & possible reduce dimensionality
~/nobackup/repo/pandas/pandas/core/generic.py in _get_item_cache(self, item)
2482 """Return the cached item, item represents a label indexer."""
2483 cache = self._item_cache
-> 2484 res = cache.get(item)
2485 if res is None:
2486 values = self._data.get(item)
TypeError: unhashable type: 'dict_keys'"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>))[{<span class="pl-c1">1</span>:<span class="pl-c1">2</span>,<span class="pl-c1">3</span>:<span class="pl-c1">4</span>}]
<span class="pl-v">Out</span>[<span class="pl-c1">2</span>]:
<span class="pl-c1">1</span> <span class="pl-v">NaN</span>
<span class="pl-c1">3</span> <span class="pl-v">NaN</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span>
<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>))[{<span class="pl-c1">1</span>:<span class="pl-c1">2</span>,<span class="pl-c1">3</span>:<span class="pl-c1">4</span>}.<span class="pl-en">keys</span>()]
<span class="pl-v">Out</span>[<span class="pl-c1">3</span>]:
<span class="pl-c1">1</span> <span class="pl-v">NaN</span>
<span class="pl-c1">3</span> <span class="pl-v">NaN</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span>
<span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>), <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>))[{<span class="pl-c1">1</span>:<span class="pl-c1">2</span>,<span class="pl-c1">3</span>:<span class="pl-c1">4</span>}]
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">TypeError</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-c1"><</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">4</span><span class="pl-c1">-</span><span class="pl-c1">5</span><span class="pl-s1">b29d5d42cf2</span><span class="pl-c1">></span> <span class="pl-s1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>()
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">1</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>), <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>))[{<span class="pl-c1">1</span>:<span class="pl-c1">2</span>,<span class="pl-c1">3</span>:<span class="pl-c1">4</span>}]
<span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-s1">nobackup</span><span class="pl-c1">/</span><span class="pl-s1">repo</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">frame</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">__getitem__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>)
<span class="pl-c1">2683</span> <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_getitem_multilevel</span>(<span class="pl-s1">key</span>)
<span class="pl-c1">2684</span> <span class="pl-s1">else</span>:
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">2685</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_getitem_column</span>(<span class="pl-s1">key</span>)
<span class="pl-c1">2686</span>
<span class="pl-c1">2687</span> <span class="pl-k">def</span> <span class="pl-en">_getitem_column</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>):
<span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-s1">nobackup</span><span class="pl-c1">/</span><span class="pl-s1">repo</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">frame</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_getitem_column</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>)
<span class="pl-c1">2690</span> <span class="pl-c"># get column</span>
<span class="pl-c1">2691</span> <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">columns</span>.<span class="pl-s1">is_unique</span>:
<span class="pl-c1">-></span> <span class="pl-c1">2692</span> <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_item_cache</span>(<span class="pl-s1">key</span>)
<span class="pl-c1">2693</span>
<span class="pl-c1">2694</span> <span class="pl-c"># duplicate columns & possible reduce dimensionality</span>
<span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-s1">nobackup</span><span class="pl-c1">/</span><span class="pl-s1">repo</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">generic</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_get_item_cache</span>(<span class="pl-s1">self</span>, <span class="pl-s1">item</span>)
<span class="pl-c1">2482</span> <span class="pl-s">"""Return the cached item, item represents a label indexer."""</span>
<span class="pl-c1">2483</span> <span class="pl-s1">cache</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_item_cache</span>
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">2484</span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">cache</span>.<span class="pl-en">get</span>(<span class="pl-s1">item</span>)
<span class="pl-c1">2485</span> <span class="pl-k">if</span> <span class="pl-s1">res</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>:
<span class="pl-c1">2486</span> <span class="pl-s1">values</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_data</span>.<span class="pl-en">get</span>(<span class="pl-s1">item</span>)
<span class="pl-v">TypeError</span>: <span class="pl-s1">unhashable</span> <span class="pl-s1">type</span>: <span class="pl-s">'dict'</span>
<span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>), <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>))[{<span class="pl-c1">1</span>:<span class="pl-c1">2</span>,<span class="pl-c1">3</span>:<span class="pl-c1">4</span>}.<span class="pl-en">keys</span>()]
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">TypeError</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-c1"><</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">5</span><span class="pl-c1">-</span><span class="pl-c1">030</span><span class="pl-s1">f516d9637</span><span class="pl-c1">></span> <span class="pl-s1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>()
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">1</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>), <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>))[{<span class="pl-c1">1</span>:<span class="pl-c1">2</span>,<span class="pl-c1">3</span>:<span class="pl-c1">4</span>}.<span class="pl-en">keys</span>()]
<span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-s1">nobackup</span><span class="pl-c1">/</span><span class="pl-s1">repo</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">frame</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">__getitem__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>)
<span class="pl-c1">2683</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_getitem_multilevel</span>(<span class="pl-s1">key</span>)
<span class="pl-c1">2684</span> <span class="pl-k">else</span>:
<span class="pl-c1">-></span> <span class="pl-c1">2685</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_getitem_column</span>(<span class="pl-s1">key</span>)
<span class="pl-c1">2686</span>
<span class="pl-c1">2687</span> <span class="pl-k">def</span> <span class="pl-en">_getitem_column</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>):
<span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-s1">nobackup</span><span class="pl-c1">/</span><span class="pl-s1">repo</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">frame</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_getitem_column</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>)
<span class="pl-c1">2690</span> <span class="pl-c"># get column</span>
<span class="pl-c1">2691</span> <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">columns</span>.<span class="pl-s1">is_unique</span>:
<span class="pl-c1">-></span> <span class="pl-c1">2692</span> <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_item_cache</span>(<span class="pl-s1">key</span>)
<span class="pl-c1">2693</span>
<span class="pl-c1">2694</span> <span class="pl-c"># duplicate columns & possible reduce dimensionality</span>
<span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-s1">nobackup</span><span class="pl-c1">/</span><span class="pl-s1">repo</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">generic</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_get_item_cache</span>(<span class="pl-s1">self</span>, <span class="pl-s1">item</span>)
<span class="pl-c1">2482</span> <span class="pl-s">"""Return the cached item, item represents a label indexer."""</span>
<span class="pl-c1">2483</span> <span class="pl-s1">cache</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_item_cache</span>
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">2484</span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">cache</span>.<span class="pl-en">get</span>(<span class="pl-s1">item</span>)
<span class="pl-c1">2485</span> <span class="pl-k">if</span> <span class="pl-s1">res</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>:
<span class="pl-c1">2486</span> <span class="pl-s1">values</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_data</span>.<span class="pl-en">get</span>(<span class="pl-s1">item</span>)
<span class="pl-v">TypeError</span>: <span class="pl-s1">unhashable</span> <span class="pl-s1">type</span>: <span class="pl-s">'dict_keys'</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">I know that <code class="notranslate">DataFrame.__getitem__</code> is a mess ( <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="59948062" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/9595" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/9595/hovercard" href="https://github.com/pandas-dev/pandas/issues/9595">#9595</a> ), but I don't see why dicts and dict keys shouldn't be just considered list-likes as it happens with <code class="notranslate">Series</code>.</p>
<h4 dir="auto">Expected Output</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [6]: pd.DataFrame(index=range(10), columns=range(10))[list({1:2,3:4})]
Out[6]:
1 3
0 NaN NaN
1 NaN NaN
2 NaN NaN
3 NaN NaN
4 NaN NaN
5 NaN NaN
6 NaN NaN
7 NaN NaN
8 NaN NaN
9 NaN NaN"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">6</span>]: <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>), <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">10</span>))[<span class="pl-en">list</span>({<span class="pl-c1">1</span>:<span class="pl-c1">2</span>,<span class="pl-c1">3</span>:<span class="pl-c1">4</span>})]
<span class="pl-v">Out</span>[<span class="pl-c1">6</span>]:
<span class="pl-c1">1</span> <span class="pl-c1">3</span>
<span class="pl-c1">0</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">2</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">3</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">4</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">5</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">6</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">7</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">8</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">9</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span></pre></div>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.5.3.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 4.9.0-6-amd64<br>
machine: x86_64<br>
processor:<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: it_IT.UTF-8<br>
LOCALE: it_IT.UTF-8</p>
<p dir="auto">pandas: 0.24.0.dev0+25.gcd0447102<br>
pytest: 3.5.0<br>
pip: 9.0.1<br>
setuptools: 39.2.0<br>
Cython: 0.25.2<br>
numpy: 1.14.3<br>
scipy: 0.19.0<br>
pyarrow: None<br>
xarray: None<br>
IPython: 6.2.1<br>
sphinx: 1.5.6<br>
patsy: 0.5.0<br>
dateutil: 2.7.3<br>
pytz: 2018.4<br>
blosc: None<br>
bottleneck: 1.2.0dev<br>
tables: 3.3.0<br>
numexpr: 2.6.1<br>
feather: 0.3.1<br>
matplotlib: 2.2.2.post1153+gff6786446<br>
openpyxl: 2.3.0<br>
xlrd: 1.0.0<br>
xlwt: 1.3.0<br>
xlsxwriter: 0.9.6<br>
lxml: 4.1.1<br>
bs4: 4.5.3<br>
html5lib: 0.999999999<br>
sqlalchemy: 1.0.15<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.10<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: 0.2.1</p>
</details> | <p dir="auto">Should use a more intelligent algorithm than using <code class="notranslate">np.random.permutation</code></p> | 0 |
<h1 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> Feature request</h1>
<p dir="auto">We have:</p>
<ol dir="auto">
<li><code class="notranslate">finetune_trainer.py</code> has</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" n_train: Optional[int] = field(default=-1, metadata={"help": "# training examples. -1 means use all."})
n_val: Optional[int] = field(default=-1, metadata={"help": "# validation examples. -1 means use all."})
n_test: Optional[int] = field(default=-1, metadata={"help": "# test examples. -1 means use all."})"><pre class="notranslate"><code class="notranslate"> n_train: Optional[int] = field(default=-1, metadata={"help": "# training examples. -1 means use all."})
n_val: Optional[int] = field(default=-1, metadata={"help": "# validation examples. -1 means use all."})
n_test: Optional[int] = field(default=-1, metadata={"help": "# test examples. -1 means use all."})
</code></pre></div>
<ol start="2" dir="auto">
<li>some other <code class="notranslate">run_</code> scripts use <code class="notranslate">--n_obs</code></li>
<li><code class="notranslate">--max_steps</code> in the main trainer - which works only on the train_dataset - no ability to limit items on eval_dataset</li>
</ol>
<p dir="auto">Requests/Questions:</p>
<ol dir="auto">
<li>How does one use <code class="notranslate">--max_steps</code> if one needs to use a different number of items for train and eval?</li>
<li>Can we have a consistent way across examples to do this same thing?</li>
</ol>
<p dir="auto">Thank you.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sgugger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sgugger">@sgugger</a></p> | <p dir="auto">The <code class="notranslate">examples</code> have an incosistency of how the cl args are defined and parsed. Some rely on PL's main args as <code class="notranslate">finetune.py</code> does: <a href="https://github.com/huggingface/transformers/blob/master/examples/seq2seq/finetune.py#L410">https://github.com/huggingface/transformers/blob/master/examples/seq2seq/finetune.py#L410</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" parser = argparse.ArgumentParser()
parser = pl.Trainer.add_argparse_args(parser)"><pre class="notranslate"><code class="notranslate"> parser = argparse.ArgumentParser()
parser = pl.Trainer.add_argparse_args(parser)
</code></pre></div>
<p dir="auto">others like <code class="notranslate">run_pl_glue.py</code> rely on <code class="notranslate">lightening_base.py</code>'s main args: <a href="https://github.com/huggingface/transformers/blob/master/examples/text-classification/run_pl_glue.py#L176">https://github.com/huggingface/transformers/blob/master/examples/text-classification/run_pl_glue.py#L176</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" parser = argparse.ArgumentParser()
add_generic_args(parser, os.getcwd())"><pre class="notranslate"><code class="notranslate"> parser = argparse.ArgumentParser()
add_generic_args(parser, os.getcwd())
</code></pre></div>
<p dir="auto">now that we pushed <code class="notranslate">--gpus</code> into <code class="notranslate">lightening_base.py</code>'s main args the scripts that run PL's main args collide and we have:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fail.argparse.ArgumentError: argument --gpus: conflicting option string: --gpus"><pre class="notranslate"><code class="notranslate">fail.argparse.ArgumentError: argument --gpus: conflicting option string: --gpus
</code></pre></div>
<p dir="auto">i.e. PL already supplies <code class="notranslate">--gpus</code> and many other args that some of the scripts in <code class="notranslate">examples</code> re-define.</p>
<p dir="auto">So either the example scripts need to stop using <code class="notranslate">pl.Trainer.add_argparse_args(parser)</code> and rely exclusively on <code class="notranslate">lightning_base.add_generic_args</code>, or we need a different clean approach. It appears that different scripts have different needs arg-wise. But they all use <code class="notranslate">lightning_base</code>.</p>
<p dir="auto">The problem got exposed in: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="665494213" data-permission-text="Title is private" data-url="https://github.com/huggingface/transformers/issues/6027" data-hovercard-type="pull_request" data-hovercard-url="/huggingface/transformers/pull/6027/hovercard" href="https://github.com/huggingface/transformers/pull/6027">#6027</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="674625886" data-permission-text="Title is private" data-url="https://github.com/huggingface/transformers/issues/6307" data-hovercard-type="pull_request" data-hovercard-url="/huggingface/transformers/pull/6307/hovercard" href="https://github.com/huggingface/transformers/pull/6307">#6307</a></p> | 0 |
<p dir="auto"><strong>Elasticsearch version</strong>: 2.3.1</p>
<p dir="auto"><strong>JVM version</strong>:</p>
<blockquote>
<p dir="auto">[gsmith@crowley ~ ] > java -version<br>
java version "1.8.0_45"<br>
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)<br>
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)</p>
</blockquote>
<p dir="auto"><strong>OS version</strong>: OS X 10.10.5</p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:</p>
<p dir="auto">Response to <code class="notranslate">_cat/fielddata</code> when there is an actual "ip" field in the indexed data reports the IP address of the node in the column where the size of fielddata used by the "ip" field should appear.</p>
<p dir="auto"><strong>Steps to reproduce</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#0. Delete the index
DELETE test_field_data
#1. Create the index with a document:
POST test_field_data/test_field_data
{"reason": "something is off", "ip": "192.168.1.0"}
#2. Flush
POST _flush
#3. Perform a search that loads fielddata
GET test_field_data/_search
{
"query": {
"match_all": {}
},
"aggs": {
"ip": {
"terms": {
"field": "ip",
"size": 10
}
},
"reason": {
"terms": {
"field": "reason",
"size": 10
}
}
}
}
#4. Inspect the fielddata
GET _cat/fielddata/ip,reason?v"><pre class="notranslate"><code class="notranslate">#0. Delete the index
DELETE test_field_data
#1. Create the index with a document:
POST test_field_data/test_field_data
{"reason": "something is off", "ip": "192.168.1.0"}
#2. Flush
POST _flush
#3. Perform a search that loads fielddata
GET test_field_data/_search
{
"query": {
"match_all": {}
},
"aggs": {
"ip": {
"terms": {
"field": "ip",
"size": 10
}
},
"reason": {
"terms": {
"field": "reason",
"size": 10
}
}
}
}
#4. Inspect the fielddata
GET _cat/fielddata/ip,reason?v
</code></pre></div>
<p dir="auto">The return looks like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="id host ip node total reason ip
FNsjPCVATN-xsg7O0vxIuQ 127.0.0.1 127.0.0.1 only 2.8kb 488b 127.0.0.1 "><pre class="notranslate"><code class="notranslate">id host ip node total reason ip
FNsjPCVATN-xsg7O0vxIuQ 127.0.0.1 127.0.0.1 only 2.8kb 488b 127.0.0.1
</code></pre></div>
<p dir="auto">I have also seen a response from a 3 node cluster, also v 2.3.1, where two of the nodes are reported as shown above, and the third node actually has the fielddata usage reported, both in the correct place and in the column where the node ip address is supposed to appear.</p> | <p dir="auto">If you have <code class="notranslate">minimum_master_nodes</code> set and you don't supply enough nodes in <code class="notranslate">d.z.p.unicast.hosts</code>, a node can fail to join the cluster. Described at <a href="http://thread.gmane.org/gmane.comp.search.elasticsearch.user/740" rel="nofollow">http://thread.gmane.org/gmane.comp.search.elasticsearch.user/740</a>.</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/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" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/wiki/FAQ">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.0-SNAPSHOT</li>
<li>Operating System version: linux</li>
<li>Java version: jdk8</li>
</ul>
<h3 dir="auto">Step to reproduce this issue</h3>
<ol dir="auto">
<li>restart ci to test</li>
</ol>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps?</p>
<p dir="auto">ci passed</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What is actually happen?</p>
<p dir="auto">ci failed to pass</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="WARNING: Interceptor for {http://webservice.protocol.rpc.dubbo.apache.org/}DemoService#{http://webservice.protocol.rpc.dubbo.apache.org/}getSize1 has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not receive Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:65)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:535)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:444)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:345)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:298)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:81)
at com.sun.proxy.$Proxy32.getSize(Unknown Source)
at org.apache.dubbo.common.bytecode.Wrapper1.invokeMethod(Wrapper1.java)
at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47)
at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:76)
at org.apache.dubbo.rpc.protocol.AbstractProxyProtocol$2.doInvoke(AbstractProxyProtocol.java:97)
at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:154)
at org.apache.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:49)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)
at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:77)
at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:66)
at org.apache.dubbo.common.bytecode.proxy1.getSize(proxy1.java)
at org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest.testDemoProtocol(WebserviceProtocolTest.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking http://127.0.0.1:9019/org.apache.dubbo.rpc.protocol.webservice.DemoService: Read timed out
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1390)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1374)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:658)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
... 43 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:735)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream$2.run(URLConnectionHTTPConduit.java:379)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream$2.run(URLConnectionHTTPConduit.java:375)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:375)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1587)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1616)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1560)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1361)
... 46 more
testDemoProtocol(org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest) Time elapsed: 6.841 sec <<< ERROR!
org.apache.dubbo.rpc.RpcException: Failed to invoke remote service: interface org.apache.dubbo.rpc.protocol.webservice.DemoService, method: getSize, cause: Could not receive Message.
at org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest.testDemoProtocol(WebserviceProtocolTest.java:41)
Caused by: org.apache.cxf.interceptor.Fault: Could not receive Message.
at org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest.testDemoProtocol(WebserviceProtocolTest.java:41)
Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking http://127.0.0.1:9019/org.apache.dubbo.rpc.protocol.webservice.DemoService: Read timed out
at org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest.testDemoProtocol(WebserviceProtocolTest.java:41)
Caused by: java.net.SocketTimeoutException: Read timed out
at org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest.testDemoProtocol(WebserviceProtocolTest.java:41)"><pre class="notranslate"><code class="notranslate">WARNING: Interceptor for {http://webservice.protocol.rpc.dubbo.apache.org/}DemoService#{http://webservice.protocol.rpc.dubbo.apache.org/}getSize1 has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not receive Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:65)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:535)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:444)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:345)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:298)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:81)
at com.sun.proxy.$Proxy32.getSize(Unknown Source)
at org.apache.dubbo.common.bytecode.Wrapper1.invokeMethod(Wrapper1.java)
at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47)
at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:76)
at org.apache.dubbo.rpc.protocol.AbstractProxyProtocol$2.doInvoke(AbstractProxyProtocol.java:97)
at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:154)
at org.apache.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:49)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)
at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:77)
at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:66)
at org.apache.dubbo.common.bytecode.proxy1.getSize(proxy1.java)
at org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest.testDemoProtocol(WebserviceProtocolTest.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking http://127.0.0.1:9019/org.apache.dubbo.rpc.protocol.webservice.DemoService: Read timed out
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1390)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1374)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:658)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
... 43 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:735)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream$2.run(URLConnectionHTTPConduit.java:379)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream$2.run(URLConnectionHTTPConduit.java:375)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:375)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1587)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1616)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1560)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1361)
... 46 more
testDemoProtocol(org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest) Time elapsed: 6.841 sec <<< ERROR!
org.apache.dubbo.rpc.RpcException: Failed to invoke remote service: interface org.apache.dubbo.rpc.protocol.webservice.DemoService, method: getSize, cause: Could not receive Message.
at org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest.testDemoProtocol(WebserviceProtocolTest.java:41)
Caused by: org.apache.cxf.interceptor.Fault: Could not receive Message.
at org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest.testDemoProtocol(WebserviceProtocolTest.java:41)
Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking http://127.0.0.1:9019/org.apache.dubbo.rpc.protocol.webservice.DemoService: Read timed out
at org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest.testDemoProtocol(WebserviceProtocolTest.java:41)
Caused by: java.net.SocketTimeoutException: Read timed out
at org.apache.dubbo.rpc.protocol.webservice.WebserviceProtocolTest.testDemoProtocol(WebserviceProtocolTest.java:41)
</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/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" checked=""> 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: master branch, latest code as of 9/8/2018.</li>
<li>Operating System version: not os specific</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Step to reproduce this issue</h3>
<ol dir="auto">
<li>Checkout the latest code, using git clone.</li>
<li>import all projects as maven projects in eclipse.</li>
<li>Do a full build</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">There should be no validation error</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">There are several xml/xsd validation errors reported on “dubbo-config-spring” project:</p>
<p dir="auto">Description Resource Path Location Type<br>
cvc-complex-type.2.2: Element 'name' must have no element [children], and the value must be valid. web-fragment.xml /dubbo-config-spring/src/main/resources/META-INF line 5 XML Problem<br>
cvc-elt.1: Cannot find the declaration of element 'beans'. provider-nested-service.xml /dubbo-config-spring/src/test/resources/org/apache/dubbo/config/spring line 22 XML Problem<br>
cvc-pattern-valid: Value 'dubbo-fragment' is not facet-valid with respect to pattern '($|<em>|\p{L})(\p{L}|\p{Nd}|</em>|$)*' for type 'null'. web-fragment.xml /dubbo-config-spring/src/main/resources/META-INF line 5 XML Problem<br>
Referenced file contains errors (<a href="http://dubbo.apache.org/schema/dubbo" rel="nofollow">http://dubbo.apache.org/schema/dubbo</a>). For more information, right click on the message in the Problems View and select "Show Details..." annotation-consumer.xml /dubbo-config-spring/src/test/resources/org/apache/dubbo/config/spring line 1 XML Problem<br>
src-resolve: Cannot resolve the name 'beans:property' to a(n) 'element declaration' component. dubbo.xsd /dubbo-config-spring/src/main/resources/META-INF line 1106 XML Schema Problem<br>
src-resolve: Cannot resolve the name 'beans:property' to a(n) 'element declaration' component. dubbo.xsd /dubbo-config-spring/src/main/resources/META-INF/compat line 1112 XML Schema Problem<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1620432/45254268-2582b200-b3a8-11e8-8c81-af517d1bc37f.png"><img src="https://user-images.githubusercontent.com/1620432/45254268-2582b200-b3a8-11e8-8c81-af517d1bc37f.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">What is actually happen?</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> | 0 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
when using babel with plugin-transform-flow-strip-types type imports like <code class="notranslate">import { type MyType } from '...'</code> are not stripped out. Instead they are transformed to <code class="notranslate">require('math');</code></p>
<p dir="auto"><strong>Input Code</strong><br>
<a href="https://babeljs.io/repl/#?babili=false&browsers=&build=&builtIns=false&spec=false&loose=true&code_lz=JYWwDg9gTgLgBAbzjAnmApnAsgQxgCzgF84AzKCEOAchD32oG4g&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=react%2Cenv&prettier=false&targets=Node-8.9&version=6.26.0&envVersion=1.6.2" rel="nofollow">https://babeljs.io/repl/#?babili=false&browsers=&build=&builtIns=false&spec=false&loose=true&code_lz=JYWwDg9gTgLgBAbzjAnmApnAsgQxgCzgF84AzKCEOAchD32oG4g&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=react%2Cenv&prettier=false&targets=Node-8.9&version=6.26.0&envVersion=1.6.2</a></p>
<p dir="auto"><strong>Expected behavior/code</strong><br>
strip out type declaration</p>
<p dir="auto"><strong>Additional context/</strong><br>
Why don't I just use the usual <code class="notranslate">import type { MyType } from '...'</code> you ask...<br>
My form is accepted by flow & intelliSence in VS Code, giving tooltip info on the types, whereas the usual form is accepted, but does not show any type information...</p>
<p dir="auto"><code class="notranslate">import { type </code> is accepted fine by flow...</p> | <h3 dir="auto">Bug</h3>
<p dir="auto">Named type imports are stripped differently based on which syntax is used. <code class="notranslate">import { type X } from 'X'</code> results in <code class="notranslate">import 'X'</code>, while <code class="notranslate">import type { X } from 'X'</code> is stripped completely. As a result, the two statements are not equivalent.</p>
<h3 dir="auto">Input Code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { type X } from 'X';
import type { Y } from 'Y';"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">type</span> <span class="pl-v">X</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'X'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-s1">type</span> <span class="pl-kos">{</span> <span class="pl-v">Y</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'Y'</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Babel Configuration (.babelrc, package.json, cli command)</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"presets" : ["babel-preset-flow"]
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"presets"</span> : <span class="pl-kos">[</span><span class="pl-s">"babel-preset-flow"</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">At the minimum I expect both imports to be treated equally, i.e. either both are stripped or both result in an import. My intuition says that it should be the empty output, since I don't expect types to have runtime behaviour, but flow itself currently doesn't seem to have a stance on this (ref: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="259501453" data-permission-text="Title is private" data-url="https://github.com/facebook/flow/issues/4935" data-hovercard-type="issue" data-hovercard-url="/facebook/flow/issues/4935/hovercard" href="https://github.com/facebook/flow/issues/4935">facebook/flow#4935</a>).</p>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import 'X';
"><pre class="notranslate"><code class="notranslate">import 'X';
</code></pre></div>
<h3 dir="auto">Possible Solution</h3>
<p dir="auto">Strip <code class="notranslate">import { type X }</code> statements completely.</p>
<h3 dir="auto">Context</h3>
<p dir="auto">I ran into this issue while trying to resolve a circular dependency, where an <code class="notranslate">import { type X }</code> completed the circle (to my surprise). After a long debugging session I noticed that this circle got broken by just replacing <code class="notranslate">import { type X }</code> with <code class="notranslate">import type { X }</code>, something which isn't documented anywhere nor very intuitive.</p>
<p dir="auto">(The actual context for the circular dependency is quite complicated. If necessary I can still provide it on request)</p>
<h3 dir="auto">Your Environment</h3>
<table role="table">
<thead>
<tr>
<th>software</th>
<th>version(s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Babel</td>
<td>v6.26.0</td>
</tr>
<tr>
<td>babel-preset-flow</td>
<td>v6.23.0</td>
</tr>
<tr>
<td>node</td>
<td>v8.4.0</td>
</tr>
<tr>
<td>npm</td>
<td>v5.3.0</td>
</tr>
<tr>
<td>Operating System</td>
<td>Linux (Fedora 25 64-bit)</td>
</tr>
</tbody>
</table> | 1 |
<p dir="auto">I've just encountered this issue and after a few hours spent investigating I'm think I know what's going on.</p>
<p dir="auto">But first, some context:</p>
<p dir="auto">Let's say in my database I've got the following two tables:</p>
<ol dir="auto">
<li>base.customer</li>
<li>report.customer</li>
</ol>
<p dir="auto">I need to automap them both and, <strong>crucially, I want both classes to just be called 'customer'</strong>.</p>
<p dir="auto">I don't want to have to convert them to a python identifier using custom logic passed to the <code class="notranslate">AutomapBase.prepare(classname_for_table=)</code> argument. For example, the seemingly obvious solution would be to replace the dot with an underscore and name them <code class="notranslate">base_customer</code>, and <code class="notranslate">report_customer</code> respectively, to make them valid python identifiers. But this is inelegant, and there will always be ambiguity.</p>
<p dir="auto">What if I have a schema called <code class="notranslate">customer_view</code> with a table called <code class="notranslate">customer</code>, and another schema called <code class="notranslate">customer</code> with a table called <code class="notranslate">view_customer</code>? Both classes then get mapped as <code class="notranslate">customer_view_customer</code>. Maybe not the best example, but it should showcase the issue.</p>
<p dir="auto">You can spend forever coming up with ways to try to avoid this (maybe use 2 underscores instead of 1), and you still won't guarantee it works in every situation (some database schemas use double underscores in their object names as well to represent m2m relationships).</p>
<p dir="auto">And it will just make everything more needlessly complicated. If you do this you now have to change the <code class="notranslate">AutomapBase.prepare(name_for_scalar_relationship=, name_for_collection_relationship=)</code> arguments so that you can still reference relationships nicely: for example: <code class="notranslate">customer1.email_address_collection</code> rather than <code class="notranslate">customer.base_email_address_collection</code>, and <code class="notranslate">some_email.customer</code> rather than <code class="notranslate">some_email.base_customer</code>.</p>
<p dir="auto">The more elegant and idiomatic way to handle this seems to me to separate out the namespaces of schemas, to then allow duplication of names across different namespaces. As the Zen of Python states: "Namespaces are one honking great idea -- let's do more of those!"</p>
<p dir="auto">So what I've done is I've created a new <code class="notranslate">AutomapBase</code> for every schema in my database in a loop, and called <code class="notranslate">AutomapBase.prepare(schema=)</code> individually for each, passing the specific schema to each one. I've also used the <code class="notranslate">AutomapBase.prepare(classname_for_table=)</code> argument to ensure that the schema name is not included in the name of the newly mapped class.</p>
<p dir="auto">Now I can assign my <code class="notranslate">base_automap.classes</code> as <code class="notranslate">base</code>, my <code class="notranslate">report_automap.classes</code> as <code class="notranslate">report</code>, and then simply reference my classes as <code class="notranslate">base.customer</code> and <code class="notranslate">report.customer</code>, and it's so clean!</p>
<p dir="auto">The part that gets me is that this ALMOST works. In fact, it works like a dream so long as there are no tables across the whole database that have duplicate names.</p>
<p dir="auto">However, as soon as there are duplicates, the root <code class="notranslate">_ModuleMarker</code> (the one referenced as <code class="notranslate">_sa_module_registry</code> within each base's <code class="notranslate">_decl_class_registry</code>), through the <code class="notranslate">_ModuleMarker</code> of whichever module your <code class="notranslate">AutomapBase</code> was declared in (I think it's <code class="notranslate">sqlalchemy.ext.automap</code> unless you use a custom base), now has a <code class="notranslate">_MultipleClassMarker</code> against that table name in its <code class="notranslate">_ModuleMarker.contents</code> attribute, which will kill the old weakref as soon as a duplicate table name comes along.</p>
<p dir="auto">And without this weakref being alive, several downstream parts of the automapping machinery (such as the <code class="notranslate">_relationships_for_fks()</code> method) just fail gracelessly, because they rely on this weakref being alive to work.</p>
<p dir="auto">While googling around for this before posting this issue I've found this StackOverflow question (<a href="https://stackoverflow.com/questions/57118047/typeerror-issubclass-arg-2-must-be-a-class-or-tuple-of-classes" rel="nofollow">https://stackoverflow.com/questions/57118047/typeerror-issubclass-arg-2-must-be-a-class-or-tuple-of-classes</a>) which I believe stems from the same cause. While I can't be 100% certain, the poster of this question probably had a schema change be made to his/her database that caused there to be multiple tables with the same name across different schemas, so their automapping broke.</p>
<p dir="auto">This error is basically the same one I've been getting. The weakref-invoking property <code class="notranslate">_DeferredMapperConfig.cls</code> returns <code class="notranslate">None</code> from its dead weakref, which then causes an <code class="notranslate">issubclass()</code> check to receive <code class="notranslate">None</code> as its second argument, rather than a type. Many other methods called downstream of <code class="notranslate">AutomapBase.prepare()</code> also fail in similar ways due to the unexpected presence of <code class="notranslate">None</code>, rather than a base.</p>
<p dir="auto">And the part that's kind of hilarious is that just as the poster in that StackOverflow issue mentioned, sometimes it just randomly works! This does actually make sense, since Python makes no guarantees about when it garbage-collects unreferenced objects. So if you get lucky your reference might still be alive by the time the flow of execution gets to that point. Will it work? Won't it? Who knows! :)</p>
<p dir="auto">I'm wondering if we can get a patch in to the way <code class="notranslate">_MultipleClassMarker</code> works, so that it can keep track of multiple database objects with identical name stems (the part of the object name after the schema) simultaneously in a schema-aware manner?</p>
<p dir="auto">If that's too much effort then at minimum a small change keeping the weakrefs cached in this situation rather than killing them off should be a decent compromise, since it will mean the automapper can still finish doing its job, and the only additional memory costs incurred will be for tables with duplicate names, which should hopefully not be too many.</p>
<p dir="auto">In the long-term I think it would be preferable to add in better multi-schema support to <code class="notranslate">AutomapBase.prepare()</code> just in general, but that's a much bigger job. It's kind of silly that in order to namespace my automapped classes the same way we namespace our objects everywhere else in both Python and SQL, we need to use duplicate <code class="notranslate">AutomapBase</code> objects as a hacky workaround.</p>
<p dir="auto">Sorry for this wall of text, this really got away from me a bit.</p>
<p dir="auto">I'd be crazy grateful if this could be considered.</p>
<p dir="auto">Thanks for your time.</p> | <p dir="auto"><strong>Migrated issue, originally created by jek (<a href="https://github.com/jek">@jek</a>)</strong></p>
<p dir="auto">Implement generic MERGE, aka 'upsert'. In ANSI, it looks like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MERGE INTO table_name1 USING table_name2 ON (condition)
WHEN MATCHED THEN UPDATE SET column1 = value1 [column2 = value2 ...](,)
WHEN NOT MATCHED THEN INSERT columns VALUES (values) "><pre class="notranslate"><code class="notranslate">MERGE INTO table_name1 USING table_name2 ON (condition)
WHEN MATCHED THEN UPDATE SET column1 = value1 [column2 = value2 ...](,)
WHEN NOT MATCHED THEN INSERT columns VALUES (values)
</code></pre></div>
<p dir="auto">Dialect support differs pretty widely. A quick & likely inaccurate poll:</p>
<ul dir="auto">
<li>Oracle 9+ has a MERGE</li>
<li>t-sql 2008 has a MERGE, earlier can maybe do <code class="notranslate">IF EXISTS(SELECT ...)</code></li>
<li>MySQL is limited to a key violation condition, and can do either <code class="notranslate">INSERT ... ON DUPLICATE KEY UPDATE</code> or <code class="notranslate">REPLACE INTO</code>, INSERT being preferable</li>
<li>SQLite is limited to a key violation condition, and has <code class="notranslate">INSERT .. ON CONFLICT REPLACE</code></li>
</ul> | 0 |
<p dir="auto">I did not really realize that, but the recent change in multi-output behavior means that there are deprecation warnings for each call to <code class="notranslate">score</code> with multi-output data:</p>
<blockquote>
<p dir="auto">DeprecationWarning: Default 'multioutput' behavior now corresponds to 'variance_weighted' value, it will be changed to 'uniform_average' in 0.18.</p>
</blockquote>
<p dir="auto">Is that desired? Is there a way around it?<br>
And do we want to catch them in the tests?<br>
Currently the test output is HUGE.</p> | <p dir="auto">There are way too many warnings in the test suite, see <a href="https://travis-ci.org/scikit-learn/scikit-learn/jobs/74122431" rel="nofollow">https://travis-ci.org/scikit-learn/scikit-learn/jobs/74122431</a></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Function decision_function is deprecated [decision_function was removed from regressors]</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> DataDimensionalityWarning in random_projection. Not sure if the test should just ignore those or we should have different defaults? ping <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ogrisel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ogrisel">@ogrisel</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> "Default 'multioutput' behavior now corresponds to 'variance_weighted' value" not sure if there is a way around these? ping <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/arjoly/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/arjoly">@arjoly</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jnothman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jnothman">@jnothman</a> ?</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> "The decision_function_shape default value will change from 'ovo' to 'ovr' in 0.18. This will change the shape of the decision function returned by SVC." SVC has a new decision_function shape. Should either be ignored or the shape should be set to <code class="notranslate">ovr</code> explicitly for now.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ConvergenceWarning: Objective did not converge. These are in coordinate_decent in the linear models. I'm not sure when they started showing up. Maybe <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/agramfort/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/agramfort">@agramfort</a> knows?</li>
</ul> | 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: all</li>
<li>Operating System version: win 10</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>consumer more than one service, and specify duplicated interfaceName with different consumer service, such as</li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" @Reference(check = false, interfaceName = "demoService")
private DemoService demoService;
@Reference(check = false, interfaceName = "demoService")
private DemoServiceB demoServiceB;"><pre class="notranslate"> <span class="pl-c1">@</span><span class="pl-c1">Reference</span>(<span class="pl-s1">check</span> = <span class="pl-c1">false</span>, <span class="pl-s1">interfaceName</span> = <span class="pl-s">"demoService"</span>)
<span class="pl-k">private</span> <span class="pl-smi">DemoService</span> <span class="pl-s1">demoService</span>;
<span class="pl-c1">@</span><span class="pl-c1">Reference</span>(<span class="pl-s1">check</span> = <span class="pl-c1">false</span>, <span class="pl-s1">interfaceName</span> = <span class="pl-s">"demoService"</span>)
<span class="pl-k">private</span> <span class="pl-smi">DemoServiceB</span> <span class="pl-s1">demoServiceB</span>;</pre></div>
<ol start="2" dir="auto">
<li>run provider</li>
<li>run consumer</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">a more meaningful exception</p>
<h3 dir="auto">Actual Result</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Caused by: java.lang.IllegalArgumentException: Can not set dubbo.test.api.DemoServiceB field dubbo.test.common.consumer.service.ConsumerServiceDemo.demoServiceB to com.alibaba.dubbo.common.bytecode.proxy0
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81)
at java.lang.reflect.Field.set(Field.java:764)
at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor$ReferenceFieldElement.inject(ReferenceAnnotationBeanPostProcessor.java:367)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.postProcessPropertyValues(ReferenceAnnotationBeanPostProcessor.java:92)
... 12 more"><pre class="notranslate"><code class="notranslate">Caused by: java.lang.IllegalArgumentException: Can not set dubbo.test.api.DemoServiceB field dubbo.test.common.consumer.service.ConsumerServiceDemo.demoServiceB to com.alibaba.dubbo.common.bytecode.proxy0
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81)
at java.lang.reflect.Field.set(Field.java:764)
at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor$ReferenceFieldElement.inject(ReferenceAnnotationBeanPostProcessor.java:367)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.postProcessPropertyValues(ReferenceAnnotationBeanPostProcessor.java:92)
... 12 more
</code></pre></div>
<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>
<p dir="auto">I think we should check if the type is matched when the interfaceName of Reference annotation is the same.</p> | <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/wiki/FAQ">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">Step to reproduce this issue</h3>
<ol dir="auto">
<li>xxx</li>
<li>xxx</li>
<li>xxx</li>
</ol>
<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 is actually happen?</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> | 0 |
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):<br>
Client Version: version.Info{Major:"1", Minor:"4+", GitVersion:"v1.4.0-alpha.2.1807+f80530c7f77e2f", GitCommit:"f80530c7f77e2fd272e6718b7d1754df0869d478", GitTreeState:"clean", BuildDate:"2016-08-29T12:08:57Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}<br>
Server Version: version.Info{Major:"1", Minor:"4+", GitVersion:"v1.4.0-alpha.2.1807+f80530c7f77e2f", GitCommit:"f80530c7f77e2fd272e6718b7d1754df0869d478", GitTreeState:"clean", BuildDate:"2016-08-29T12:03:17Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}</p>
<p dir="auto"><strong>Environment</strong>:<br>
2 kubelet nodes + 1 master, deployed by local vagrant provider</p>
<p dir="auto"><strong>What happened</strong>:<br>
While working on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="172401381" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/31098" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/31098/hovercard" href="https://github.com/kubernetes/kubernetes/issues/31098">#31098</a> I added <code class="notranslate">--eviction-hard=memory.available<90%</code> to evict pets from node-1. It did its job and they were evicted, but after that pod was constantly re-scheduled onto same node.</p>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
Expected that eviction-hard will prevent pod from being scheduled onto the same node, as long as evict condition is preserved.</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<ol dir="auto">
<li>Create petset (i was using cockroachdb example)</li>
<li>Add <code class="notranslate">--eviction-hard=memory.available<90%</code> (or another condition which will evict pods from node)</li>
</ol>
<p dir="auto">I didn't try it with regular pods, so you may need to use my patch <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="174252606" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/31777" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/31777/hovercard" href="https://github.com/kubernetes/kubernetes/pull/31777">#31777</a></p> | <p dir="auto"><strong>Description of problem</strong><br>
Create a petset, when pod is evicted, the petset can't create a new pod on other node and make sure pod is running.</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):<br>
v1.4.0-alpha.2.1427+5b6e1c37c66098</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<ol dir="auto">
<li>Config kubele eviction-hard="memory.available<${value}"</li>
<li>Create a peset and wait all pod is running</li>
<li>Make node MemoryPressure=true</li>
<li>Check all pod status</li>
</ol>
<p dir="auto"><strong>What happened</strong>:<br>
4. pod is evicted and petset can't create new pod and make sure pod is running.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[root@dhcp-140-39 ~]# kubectl get pod --show-all
NAME READY STATUS RESTARTS AGE
hello-petset-0 0/1 Evicted 0 32m
hello-petset-1 0/1 Evicted 0 24m
[root@dhcp-140-39 ~]# kubectl get petset
NAME DESIRED CURRENT AGE
hello-petset 2 2 32m"><pre class="notranslate"><code class="notranslate">[root@dhcp-140-39 ~]# kubectl get pod --show-all
NAME READY STATUS RESTARTS AGE
hello-petset-0 0/1 Evicted 0 32m
hello-petset-1 0/1 Evicted 0 24m
[root@dhcp-140-39 ~]# kubectl get petset
NAME DESIRED CURRENT AGE
hello-petset 2 2 32m
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
4. Petset create new pod on other node and make sure pod is running.</p> | 1 |
<p dir="auto">Didn't find engine for operation quantized::conv_prepack NoQEngine (operator () at ..\aten\src\ATen\native\quantized\cpu\qconv_prepack.cpp:264)<br>
(no backtrace available)</p>
<p dir="auto">win10<br>
python3.6<br>
pytorch1.3</p>
<p dir="auto">code:<br>
from torch.quantization import convert<br>
model_quantized_and_trained = convert(model_ft_tuned, inplace=True)</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/peterjc123/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/peterjc123">@peterjc123</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jerryzh168/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jerryzh168">@jerryzh168</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jianyuh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jianyuh">@jianyuh</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dzhulgakov/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dzhulgakov">@dzhulgakov</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/raghuramank100/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/raghuramank100">@raghuramank100</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jamesr66a/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jamesr66a">@jamesr66a</a></p> | <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 Request [Solved]</h2>
<p dir="auto">The <code class="notranslate">torch::jit::load</code> works well for loading both quantized model and un-quantized model on Linux and MacOS. But it will throw an error on Windows when loading the quantized model.</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="cookie" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f36a.png">🍪</g-emoji> Currently, official FBGEMM can be compiled with PyTorch for Windows.</h2>
<p dir="auto">PR: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="564301894" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/33250" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33250/hovercard" href="https://github.com/pytorch/pytorch/pull/33250">#33250</a></p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="cookie" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f36a.png">🍪</g-emoji> <del>Current Unofficial Method</del></h2>
<p dir="auto">Currently we compile <code class="notranslate">libtorch-1.3.1</code> with <a href="https://github.com/marian-nmt/FBGEMM">FBGEMM marian-nmt version</a> by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ykim362/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ykim362">@ykim362</a> on windows successfully. And the quantized model works pretty well on windows (200 ms -> 57 ms). Thanks for the effort from <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ykim362/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ykim362">@ykim362</a>. Hope <code class="notranslate">fbgemm</code> for windows can be aggregated in the <strong>future/next</strong> release of PyTorch. You know, the need of quantization for windows is as much as for Linux and ARM.</p>
<p dir="auto">Some details:</p>
<ul dir="auto">
<li>PyTorch-1.3.1 : <a href="https://github.com/pytorch/pytorch/tree/v1.3.1">released branch with tag-1.3.1</a></li>
<li>FBGEMM : <a href="https://github.com/marian-nmt/FBGEMM">marian-nmt version</a> by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ykim362/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ykim362">@ykim362</a></li>
<li><code class="notranslate">set CAFFE2=OFF</code> when compiling on windows</li>
</ul>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Quick steps to reproduce the behavior:</p>
<ol dir="auto">
<li>Use a model under <a href="https://github.com/pytorch/vision/tree/master/torchvision/models/quantization">torchvision/models/quantization</a>, for example, mobilenet.</li>
<li>In model definition py file, add</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if __name__ == '__main__':
model = mobilenet_v2(pretrained=False, progress=True, quantize=True)
torch.jit.save(torch.jit.script(model), 'mov2.pt')"><pre class="notranslate"><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">model</span> <span class="pl-c1">=</span> <span class="pl-en">mobilenet_v2</span>(<span class="pl-s1">pretrained</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">progress</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">quantize</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">torch</span>.<span class="pl-s1">jit</span>.<span class="pl-en">save</span>(<span class="pl-s1">torch</span>.<span class="pl-s1">jit</span>.<span class="pl-en">script</span>(<span class="pl-s1">model</span>), <span class="pl-s">'mov2.pt'</span>)</pre></div>
<ol start="3" dir="auto">
<li>Load the scripted model in Linux, MacOS, and Windows</li>
</ol>
<div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#include <torch/torch.h>
#include <torch/script.h>
#include <iostream>
#include <memory>
int main(int argc, const char* argv[]) {
torch::jit::script::Module quant_model;
quant_model = torch::jit::load(argv[1]);
}"><pre class="notranslate">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds"><</span>torch/torch.h<span class="pl-pds">></span></span>
#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds"><</span>torch/script.h<span class="pl-pds">></span></span>
#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds"><</span>iostream<span class="pl-pds">></span></span>
#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds"><</span>memory<span class="pl-pds">></span></span>
<span class="pl-k">int</span> <span class="pl-en">main</span>(<span class="pl-k">int</span> argc, <span class="pl-k">const</span> <span class="pl-k">char</span>* argv[]) {
torch::jit::script::Module quant_model;
quant_model = <span class="pl-c1">torch::jit::load</span>(argv[<span class="pl-c1">1</span>]);
}</pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">The <code class="notranslate">torch::jit::load</code> works well for loading both quantized model and un-quantized model on Linux and MacOS. But it will throw an error on Windows when loading the quantized model:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="The field 'training' was left unitialized after __setstate__, but expected a value of type 'bool' (postSetStateValidate at ..\..\torch\csrc\jit\import.cpp:52)
(no backtrace available)"><pre class="notranslate">The field <span class="pl-s"><span class="pl-pds">'</span>training<span class="pl-pds">'</span></span> was left unitialized after __setstate__, but expected a value of <span class="pl-c1">type</span> <span class="pl-s"><span class="pl-pds">'</span>bool<span class="pl-pds">'</span></span> (postSetStateValidate at ..<span class="pl-cce">\.</span>.<span class="pl-cce">\t</span>orch<span class="pl-cce">\c</span>src<span class="pl-cce">\j</span>it<span class="pl-cce">\i</span>mport.cpp:52)
(no backtrace available)</pre></div>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>PyTorch Version: 1.3.1</li>
<li>LibTorch Version: 1.3.1</li>
<li>OS: Ubuntu, MacOS, and Windows10</li>
</ul>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/suo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/suo">@suo</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jerryzh168/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jerryzh168">@jerryzh168</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jianyuh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jianyuh">@jianyuh</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dzhulgakov/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dzhulgakov">@dzhulgakov</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/raghuramank100/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/raghuramank100">@raghuramank100</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jamesr66a/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jamesr66a">@jamesr66a</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/soumith/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/soumith">@soumith</a></p> | 1 |
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p>
<p dir="auto">BUG.</p>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">Here is <a href="https://jsfiddle.net/martinsvk/69z2wepo/57522/" rel="nofollow">JSFiddle</a>, just try to edit the default value <code class="notranslate">2.34</code> to something else, like <code class="notranslate">3.45</code>. As soon as i insert dot, cursor stars to jump in input.</p>
<p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong></p>
<p dir="auto">It is not working in Chrome <code class="notranslate">v53</code> on React <code class="notranslate">v15.3.2</code> and also <code class="notranslate">v15.3.1</code>. I did not try to go very far back, but i tried it on old JSBin with React <code class="notranslate">v0.13.2</code> and that worked.</p>
<p dir="auto">On Firefox it is correctly <strong>working</strong>.</p> | <p dir="auto">This appears to have been introduced in a new Chrome version, but I can't find any reference to where.</p>
<p dir="auto">Affected/Tested Browsers (OS X):</p>
<ul dir="auto">
<li>Chrome 51.0.2704.106 (64-bit)</li>
<li>Opera 39.0.2256.15</li>
</ul>
<p dir="auto">Unaffected Browsers:</p>
<ul dir="auto">
<li>Safari 9.1</li>
<li>Firefox 49</li>
</ul>
<p dir="auto">Backspacing in an input element with <code class="notranslate">value</code> or <code class="notranslate">defaultValue</code> set causes some very odd behavior. Once a decimal point is gone, it can't easily be re-added.</p>
<p dir="auto">Example:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1197375/16786390/1d722fd4-485a-11e6-8969-780d4e4e9752.gif"><img src="https://cloud.githubusercontent.com/assets/1197375/16786390/1d722fd4-485a-11e6-8969-780d4e4e9752.gif" alt="react-input-bug" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">In this example, I simply backspaced twice. On the second backspace, when I expect <code class="notranslate">3.</code> to be showing, the input instead reads <code class="notranslate">3</code> and the cursor has moved to the beginning. The next two jumps are my attempts to add another decimal point.</p>
<p dir="auto">Fiddle: <a href="https://jsfiddle.net/kmqz6kw8/" rel="nofollow">https://jsfiddle.net/kmqz6kw8/</a></p>
<p dir="auto">Tested with React 15.2.</p>
<p dir="auto">Notes: This only occurs when <code class="notranslate">value</code> or <code class="notranslate">defaultValue</code> is set. If neither is set, the input behaves properly. We are currently working around this issue by (unfortunately) setting the input value on <code class="notranslate">componentDidMount</code> via a ref.</p> | 1 |
<p dir="auto">When attempting to detect a TextField in a test using containsMatchingElement, the detection failed. I narrowed it down to some issue with boolean properties.</p>
<p dir="auto">Version: 0.19.4</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/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<h2 dir="auto">Current Behavior</h2>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Here's the example code that is failing. I would expect both tests to pass, but only the first one does. <del>I will move this code to codesandbox.io and add link</del> Looks like codesandbox doesn't support running tests.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from 'react'
import { assert, expect } from 'chai'
import { shallow } from 'enzyme'
import TextField from 'material-ui/TextField'
// Successfully detect TextField
class TestComponent1 extends React.Component {
render(){
return (
<TextField />
)
}
}
describe('<TestComponent1 />', function(){
it('detects TextField', function(){
const testComponentWrapper = shallow(<TestComponent1 />)
assert.isTrue(testComponentWrapper.containsMatchingElement(<TextField />))
})
})
// Fails to detect TextField
class TestComponent2 extends React.Component {
render(){
return (
<TextField
fullWidth={true}
/>
)
}
}
describe('<TestComponent2 />', function(){
it('detects TextField', function(){
const testComponentWrapper = shallow(<TestComponent2 />)
assert.isTrue(testComponentWrapper.containsMatchingElement(<TextField />))
})
})"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">assert</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">'chai'</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">shallow</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'enzyme'</span>
<span class="pl-k">import</span> <span class="pl-v">TextField</span> <span class="pl-k">from</span> <span class="pl-s">'material-ui/TextField'</span>
<span class="pl-c">// Successfully detect TextField</span>
<span class="pl-k">class</span> <span class="pl-v">TestComponent1</span> <span class="pl-k">extends</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span> <span class="pl-kos">{</span>
<span class="pl-en">render</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-kos">(</span>
<span class="pl-c1"><</span><span class="pl-ent">TextField</span> <span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-en">describe</span><span class="pl-kos">(</span><span class="pl-s">'<TestComponent1 />'</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">it</span><span class="pl-kos">(</span><span class="pl-s">'detects TextField'</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-k">const</span> <span class="pl-s1">testComponentWrapper</span> <span class="pl-c1">=</span> <span class="pl-en">shallow</span><span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-ent">TestComponent1</span> <span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">)</span>
<span class="pl-s1">assert</span><span class="pl-kos">.</span><span class="pl-en">isTrue</span><span class="pl-kos">(</span><span class="pl-s1">testComponentWrapper</span><span class="pl-kos">.</span><span class="pl-en">containsMatchingElement</span><span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-ent">TextField</span> <span class="pl-c1">/</span><span class="pl-c1">></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">// Fails to detect TextField</span>
<span class="pl-k">class</span> <span class="pl-v">TestComponent2</span> <span class="pl-k">extends</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span> <span class="pl-kos">{</span>
<span class="pl-en">render</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-kos">(</span>
<span class="pl-c1"><</span><span class="pl-ent">TextField</span>
<span class="pl-c1">fullWidth</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">true</span><span class="pl-kos">}</span>
<span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-en">describe</span><span class="pl-kos">(</span><span class="pl-s">'<TestComponent2 />'</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">it</span><span class="pl-kos">(</span><span class="pl-s">'detects TextField'</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-k">const</span> <span class="pl-s1">testComponentWrapper</span> <span class="pl-c1">=</span> <span class="pl-en">shallow</span><span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-ent">TestComponent2</span> <span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">)</span>
<span class="pl-s1">assert</span><span class="pl-kos">.</span><span class="pl-en">isTrue</span><span class="pl-kos">(</span><span class="pl-s1">testComponentWrapper</span><span class="pl-kos">.</span><span class="pl-en">containsMatchingElement</span><span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-ent">TextField</span> <span class="pl-c1">/</span><span class="pl-c1">></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>
<h2 dir="auto">Context</h2>
<p dir="auto">Trying to use best practice <code class="notranslate">containsMatchingElement(Element w/ Props)</code> instead of <code class="notranslate">find(Element).props()</code></p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>0.19.4</td>
</tr>
<tr>
<td>React</td>
<td>15.6.2</td>
</tr>
<tr>
<td>enzyme</td>
<td>3.1.1</td>
</tr>
</tbody>
</table> | <p dir="auto">The top component is AppContainer, which yields the App component which build as a class. App component is wrapped with the MuiThemeProvider wrapper, which has one child - div element. In the console there is a warning "Warning: Failed prop type: The prop 'theme' is marked as required in 'MuiThemeProvideWrapper', but its value is 'undefined'."<br>
I later get the error "Uncaught TypeError: Cannot read property 'prepareStyles' of undefined<br>
at DatePicker.render" which seems to be related. According to the documentation there is no need to provide a theme as the Light Theme is used as default (<a href="http://www.material-ui.com/#/customization/themes" rel="nofollow">http://www.material-ui.com/#/customization/themes</a> & <a href="http://www.material-ui.com/#/get-started/usage" rel="nofollow">http://www.material-ui.com/#/get-started/usage</a>). However, the problem persists also when I apply the Dark Theme according to instuctions on the Theme page.<br>
I couldn't find any info about this warning.</p>
<ul dir="auto">
<li>[ x] I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Here is a link to the app with the warnings and errors in the console:<br>
Here is a link to my code: <a href="https://github.com/carpben/notifications/tree/master/src">https://github.com/carpben/notifications/tree/master/src</a></p>
<ol dir="auto">
<li>npm install material-ui -S</li>
<li>in the top component import MuiThemeProvider.<br>
3.render MuiThemeProvider with one child</li>
<li>Render a material Ui Component somewhere in your app.</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">At the moment I can't use Material UI at all.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>0.22</td>
</tr>
<tr>
<td>React</td>
<td>16</td>
</tr>
<tr>
<td>browser</td>
<td>chrome</td>
</tr>
<tr>
<td>etc</td>
<td>Windows 10, create react app, redux, bash on ubuntu on windows</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">elasticsearch - 0.90.2</p>
<p dir="auto">/opt/elasticsearch-0.90.2 # bin/plugin --url /opt/mobz-elasticsearch-head-0c2ac0b.zip --install head<br>
Usage:<br>
-u, --url [plugin location] : Set exact URL to download the plugin from<br>
-i, --install [plugin name] : Downloads and installs listed plugins [*]<br>
-r, --remove [plugin name] : Removes listed plugins<br>
-l, --list : List installed plugins<br>
-v, --verbose : Prints verbose messages<br>
-h, --help : Prints this help message</p>
<p dir="auto">[*] Plugin name could be:<br>
elasticsearch/plugin/version for official elasticsearch plugins (download from download.elasticsearch.org)<br>
groupId/artifactId/version for community plugins (download from maven central or oss sonatype)<br>
username/repository for site plugins (download from github master)</p>
<p dir="auto">Message:<br>
Command [--url] unknown.</p> | <p dir="auto">may be duplicate of or related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="27822054" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/5170" data-hovercard-type="pull_request" data-hovercard-url="/elastic/elasticsearch/pull/5170/hovercard" href="https://github.com/elastic/elasticsearch/pull/5170">#5170</a></p>
<p dir="auto">using elasticsearch 1.0.0</p>
<p dir="auto">I have a query where I would like to use search_type=scan to scroll through all contacts owned by a user. It works fine if the user has enough contacts but I have one user where there are only two contacts and this fails.</p>
<p dir="auto">So I do a GET on<br>
<a href="http://localhost:9200/users/contact/_search?search_type=scan&scroll=60m&size=100" rel="nofollow">http://localhost:9200/users/contact/_search?search_type=scan&scroll=60m&size=100</a><br>
{<br>
"query": {<br>
"term": {<br>
"userId": {<br>
"value": "1o"<br>
}<br>
}<br>
}<br>
}</p>
<p dir="auto">I get back the following response<br>
{<br>
"_scroll_id":"c2Nhbjs1OzIwMTpxS1hwWW80MFJvV0hwbjdBcm5JRkF3OzIwNDpxS1hwWW80MFJvV0hwbjdBcm5JRkF3OzIwMzpxS1hwWW80MFJvV0hwbjdBcm5JRkF3OzIwMjpxS1hwWW80MFJvV0hwbjdBcm5JRkF3OzIwNTpxS1hwWW80MFJvV0hwbjdBcm5JRkF3OzE7dG90YWxfaGl0czoyOw==",<br>
"took":1,<br>
"timed_out":false,<br>
"_shards":{<br>
"total":5,<br>
"successful":5,<br>
"failed":0<br>
},<br>
"hits":{<br>
"total":2,<br>
"max_score":0.0,<br>
"hits":[</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>
<p dir="auto">and then <a href="http://localhost:9200/_search/scroll?scroll=60m" rel="nofollow">http://localhost:9200/_search/scroll?scroll=60m</a><br>
c2Nhbjs1OzIwMTpxS1hwWW80MFJvV0hwbjdBcm5JRkF3OzIwNDpxS1hwWW80MFJvV0hwbjdBcm5JRkF3OzIwMzpxS1hwWW80MFJvV0hwbjdBcm5JRkF3OzIwMjpxS1hwWW80MFJvV0hwbjdBcm5JRkF3OzIwNTpxS1hwWW80MFJvV0hwbjdBcm5JRkF3OzE7dG90YWxfaGl0czoyOw==</p>
<p dir="auto">fails with a SearchContextMissingException</p>
<p dir="auto">The same query for a user with 30000 contacts works fine and pages through the results like I would expect. The above query returns the two results normally if I query without search_type=scan</p>
<p dir="auto">So it only fails if the result set is smaller than the page size</p> | 0 |
<h2 dir="auto">🐛 Bug</h2>
<p dir="auto">My basic Conda environment is python 3.7, but creating a new environment and installing in it Pytorch ('conda install pytorch-nightly cuda92 -c pytorch'), python --version gives me 'Python 3.5.6 :: Anaconda, Inc.'.</p>
<p dir="auto">This bug seems very similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="345406963" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/9967" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/9967/hovercard" href="https://github.com/pytorch/pytorch/issues/9967">#9967</a>, although the issue there is supposed to be closed, so I also left a comment there.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>Install Anaconda with python 3.7 and Cuda 9.2 on Ubuntu 16.04</li>
<li>Create a new environment</li>
<li>Check that python version is still 3.7</li>
<li>Install Pytorch with 'conda install pytorch-nightly cuda92 -c pytorch'</li>
<li>Check the python version now. In my case, it is now 3.5.6</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Pytorch is said to be working with python 3.7 in the download page, so there's no reason it would downgrade it.</p>
<h2 dir="auto">Environment</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PyTorch version: 1.0.0.dev20181022
Is debug build: No
CUDA used to build PyTorch: 9.0.176
OS: Ubuntu 16.04.3 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
CMake version: Could not collect
Python version: 3.5
Is CUDA available: Yes
CUDA runtime version: 9.2.148
GPU models and configuration: GPU 0: GeForce GTX 1070
Nvidia driver version: 396.37
cuDNN version: Could not collect
Versions of relevant libraries:
[pip] numpy (1.15.2)
[pip] torch (1.0.0.dev20181022)
[conda] cuda92 1.0 0 pytorch
[conda] pytorch-nightly 1.0.0.dev20181022 py3.5_cuda9.0.176_cudnn7.1.2_0 pytorch
"><pre class="notranslate"><code class="notranslate">PyTorch version: 1.0.0.dev20181022
Is debug build: No
CUDA used to build PyTorch: 9.0.176
OS: Ubuntu 16.04.3 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
CMake version: Could not collect
Python version: 3.5
Is CUDA available: Yes
CUDA runtime version: 9.2.148
GPU models and configuration: GPU 0: GeForce GTX 1070
Nvidia driver version: 396.37
cuDNN version: Could not collect
Versions of relevant libraries:
[pip] numpy (1.15.2)
[pip] torch (1.0.0.dev20181022)
[conda] cuda92 1.0 0 pytorch
[conda] pytorch-nightly 1.0.0.dev20181022 py3.5_cuda9.0.176_cudnn7.1.2_0 pytorch
</code></pre></div>
<h2 dir="auto">Additional context</h2>
<p dir="auto">It's the first time I write an issue on Github, so I apologize in advance if it is not very clear or something ;)...</p>
<p dir="auto">Thanks in advance for your help !!<br>
Sebastien</p> | <h2 dir="auto">🐛 Bug</h2>
<p dir="auto">My basic Conda environment is python 3.7, but creating a new environment and installing in it Pytorch ('conda install pytorch-nightly cuda92 -c pytorch'), python --version gives me 'Python 3.5.6 :: Anaconda, Inc.'.</p>
<p dir="auto">This bug seems very similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="345406963" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/9967" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/9967/hovercard" href="https://github.com/pytorch/pytorch/issues/9967">#9967</a>, although the issue there is supposed to be closed, so I also left a comment there.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>Install Anaconda with python 3.7 and Cuda 9.2 on Ubuntu 16.04</li>
<li>Create a new environment</li>
<li>Check that python version is still 3.7</li>
<li>Install Pytorch with 'conda install pytorch-nightly cuda92 -c pytorch'</li>
<li>Check the python version now. In my case, it is now 3.5.6</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Pytorch is said to be working with python 3.7 in the download page, so there's no reason it would downgrade it.</p>
<h2 dir="auto">Environment</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PyTorch version: 1.0.0.dev20181022
Is debug build: No
CUDA used to build PyTorch: 9.0.176
OS: Ubuntu 16.04.3 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
CMake version: Could not collect
Python version: 3.5
Is CUDA available: Yes
CUDA runtime version: 9.2.148
GPU models and configuration: GPU 0: GeForce GTX 1070
Nvidia driver version: 396.37
cuDNN version: Could not collect
Versions of relevant libraries:
[pip] numpy (1.15.2)
[pip] torch (1.0.0.dev20181022)
[conda] cuda92 1.0 0 pytorch
[conda] pytorch-nightly 1.0.0.dev20181022 py3.5_cuda9.0.176_cudnn7.1.2_0 pytorch
"><pre class="notranslate"><code class="notranslate">PyTorch version: 1.0.0.dev20181022
Is debug build: No
CUDA used to build PyTorch: 9.0.176
OS: Ubuntu 16.04.3 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
CMake version: Could not collect
Python version: 3.5
Is CUDA available: Yes
CUDA runtime version: 9.2.148
GPU models and configuration: GPU 0: GeForce GTX 1070
Nvidia driver version: 396.37
cuDNN version: Could not collect
Versions of relevant libraries:
[pip] numpy (1.15.2)
[pip] torch (1.0.0.dev20181022)
[conda] cuda92 1.0 0 pytorch
[conda] pytorch-nightly 1.0.0.dev20181022 py3.5_cuda9.0.176_cudnn7.1.2_0 pytorch
</code></pre></div>
<h2 dir="auto">Additional context</h2>
<p dir="auto">It's the first time I write an issue on Github, so I apologize in advance if it is not very clear or something ;)...</p>
<p dir="auto">Thanks in advance for your help !!<br>
Sebastien</p> | 1 |
<p dir="auto">I'm running atom on archlinux.<br>
I have three config folders for atom that I found in my ~<br>
.atom<br>
.config/Atom<br>
.config/Atom-Shell</p>
<p dir="auto">It would be nice to move .atom to .config<br>
Also one folder inside .config would be nice<br>
while we're at it, for linux it's usual to have lower-case letters</p> | <p dir="auto">When splitting a pane you end up with the same file open in two panes. While splitting a file is a useful feature it should be separate from splitting panes. It is frustrating having to close the extra file view every time I split a pane.</p>
<p dir="auto">I should be able to split panes without ending up with duplicate views of the same file, but I should also be able to split a file into multiple views if I want.</p> | 0 |
<ul dir="auto">
<li>Electron version: ^1.1.1</li>
<li>Operating system: El Capitan 10.11.5</li>
</ul>
<p dir="auto">Here the gist:<br>
<a href="https://gist.github.com/oxcarga/289dadcd829458b50823c6b57bf8e218/edit">https://gist.github.com/oxcarga/289dadcd829458b50823c6b57bf8e218/edit</a></p>
<p dir="auto">In renderer process we have a simple button calling <code class="notranslate">remote.dialog.showOpenDialog()</code><br>
with a callback fn which just prints in console the filenames for the selected images.</p>
<p dir="auto">At some point callback fn ( callback for dialog.showOpenDialog() ) stops being called. Lets say we repeat this process some times:</p>
<p dir="auto">(with console opened)</p>
<ol dir="auto">
<li>click btn (dialog opens)</li>
</ol>
<ul dir="auto">
<li>"clicked!" is console-logged
<ol dir="auto">
<li>select 1,5 or N number of images from X folder</li>
<li>hit open</li>
</ol>
</li>
<li>array length & array itself are console-logged
<ol dir="auto">
<li>repeat <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="14015029" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/1" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/1/hovercard" href="https://github.com/electron/electron/issues/1">#1</a></li>
</ol>
</li>
</ul>
<p dir="auto">Do this for several times, then stop for a while, then try again.<br>
Not sure how or why but this reproduces the issue for me. At some point we just get the "clicked!" console log and we stops receiving callback's console logs.</p>
<p dir="auto">P.D.: gist above is ready to run<br>
<code class="notranslate">npm install && npm start</code></p> | <ul dir="auto">
<li>Electron version: 1.2.1+ possibly 1.0+</li>
<li>Operating system:Windows 10 - others?</li>
</ul>
<p dir="auto">nativeImage now has possible bug. When using "electron-canvas-to-buffer" it was working 100% reliable in Electron 0.37.2.<br>
It is broken now in Electron 1.2.1 +, possibly in Electron 1.0 +</p>
<p dir="auto"><a href="https://github.com/mattdesl/electron-canvas-to-buffer">https://github.com/mattdesl/electron-canvas-to-buffer</a></p>
<p dir="auto">This module is fairly simple but very convenient and makes use of Electrons built in nativeImage.</p>
<p dir="auto">Details:</p>
<ol dir="auto">
<li>After a few series of changing Canvas elements and saving the canvas the file is no longer saved. When the file is not written, However the file dialog is presented, and it appears that the file is saved, But it doesn't really save the file.</li>
<li>Happens saving either .jpg or .png.</li>
<li>May save OK a few times, eventually it will fail.</li>
<li>Once it fails it will not ever save canvas again until app is restarted again.</li>
<li>Tested many many canvas edits and files saves, never fails in Electron 0.37.2 Rock Solid.</li>
<li>I am using fabric.js for canvas manipulation.</li>
</ol>
<p dir="auto">7.The initial canvas save to file always works.</p>
<p dir="auto">8.When the file save fails there is no error generated. The app does not generate an error when the write fails, But it does not generate a "Write of',filePath,'was successful' in the console during the failure. So lack of "success" is the actual error indication. See the saveCallback function in "canvastest.js" in the zip files or as below. "throw err" doesn't present itself when the file doesn't write.</p>
<p dir="auto">function saveTheFile(){<br>
dialog.showSaveDialog({title:'Testing a save dialog',defaultPath:'image.png'},saveCallback);<br>
}</p>
<p dir="auto">function saveCallback(filePath){<br>
// as a buffer<br>
var buffer = canvasBuffer(canvas, 'image/png')<br>
// write canvas to file<br>
fs.writeFile(filePath, buffer, function (err) {<br>
//throw err<br>
if(err)throw err;else console.log('Write of',filePath,'was successful');<br>
})</p>
<p dir="auto">9.Using Windows 10 x64, Windows 32 bit version of Electron</p>
<p dir="auto">You can test good (made on Electron 0.37.2) vs. bad (made on Electron 1.2.1) app. Zip files are too big to attach here. I have it on my website. Just load a photo on the canvas and save. Both apps are the same code, just made minor changes to allow the new version 1.2.1 Electron to work, for example removing "dashes" in require statements, as you had to do in electron-canvas-to-buffer V 2.0.</p>
<p dir="auto">Apps can be launched just click "Electron.exe" in root of the zip file.</p>
<p dir="auto">Using Electron V 0.37.2<br>
<a href="http://www.mgparrish.com/FabricSaveCanvasGood.zip" rel="nofollow">http://www.mgparrish.com/FabricSaveCanvasGood.zip</a></p>
<p dir="auto">Using Electron V 1.21<br>
<a href="http://www.mgparrish.com/FabricSaveCanvasBug.zip" rel="nofollow">http://www.mgparrish.com/FabricSaveCanvasBug.zip</a></p> | 1 |
<p dir="auto">This compiled as of yesterday, but no longer does:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
let mut foo = ~[];
'foo: for i in [1, 2, 3].iter() {
foo.push(i);
}
}"><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> <span class="pl-k">mut</span> foo = ~<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-c1">'</span>foo<span class="pl-kos">:</span> <span class="pl-k">for</span> i <span class="pl-k">in</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-c1">3</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">iter</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
foo<span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span>i<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="test.rs:4:9: 4:12 error: unresolved name `foo`.
test.rs:4 foo.push(i);
^~~
error: aborting due to previous error"><pre class="notranslate"><code class="notranslate">test.rs:4:9: 4:12 error: unresolved name `foo`.
test.rs:4 foo.push(i);
^~~
error: aborting due to previous error
</code></pre></div>
<p dir="auto">Renaming either the label or the variable fixes the error.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 0.10-pre (329fcd4 2014-02-23 15:37:05 -0800)
host: x86_64-unknown-linux-gnu]"><pre class="notranslate"><code class="notranslate">rustc 0.10-pre (329fcd4 2014-02-23 15:37:05 -0800)
host: x86_64-unknown-linux-gnu]
</code></pre></div>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/edwardw/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/edwardw">@edwardw</a></p> | <p dir="auto">After <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="66251624" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/24034" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/24034/hovercard" href="https://github.com/rust-lang/rust/pull/24034">#24034</a> lands we will be setting <code class="notranslate">CLOEXEC</code> on all file descriptors on unix in the standard library. Currently we do so in a nonatomic fashion, however, so it's possible to continue to leak file descriptors into children if a thread is concurrently forking.</p>
<p dir="auto">Many platforms have methods of creating <code class="notranslate">CLOEXEC</code> file descriptors atomically, but many of the APIs are quite new and they need to be properly detected at runtime. For example, the current instances of <code class="notranslate">fd.set_cloexec()</code> that need to be migrated are listed below. A reminder of our minimum platform requirements are linux 2.6.18 and OSX 10.7.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">File::open</code> - this should specify the <code class="notranslate">O_CLOEXEC</code> flag. This flag was added in linux 2.6.23 and appears to exist on OSX 10.7. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="102674575" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/27971" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/27971/hovercard" href="https://github.com/rust-lang/rust/pull/27971">#27971</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">Socket::new</code> - this should be specify the <code class="notranslate">SOCK_CLOEXEC</code> flag in the <code class="notranslate">type</code> argument (second). This flag was only added in linux 2.6.27 and does not exist on OSX. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="131506389" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/31417" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/31417/hovercard" href="https://github.com/rust-lang/rust/pull/31417">#31417</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">Socket::accept</code> - this should be replaced with a call to <code class="notranslate">accept4</code>. This system call was only added in linux 2.6.28 and does not exist on OSX. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="131506389" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/31417" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/31417/hovercard" href="https://github.com/rust-lang/rust/pull/31417">#31417</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">Socket::duplicate</code> - this should be replaced with <code class="notranslate">dup3</code> (linux 2.6.27, not on OSX) or <code class="notranslate">F_DUPFD_CLOEXEC</code> (linux 2.6.24, appears to exist on OSX 10.7). <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="102874701" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/27980" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/27980/hovercard" href="https://github.com/rust-lang/rust/pull/27980">#27980</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">anon_pipe</code> - this could be replaced with <code class="notranslate">pipe2</code> on linux 2.6.27 and perhaps <code class="notranslate">socketpair</code> on OSX (not confirmed). <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="131506389" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/31417" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/31417/hovercard" href="https://github.com/rust-lang/rust/pull/31417">#31417</a></li>
</ul>
<p dir="auto">The hard part about this bug is figuring out if it's possible to avoid compile-time detection of these functions (and instead rely on runtime detection).</p> | 0 |
<p dir="auto">I am writing a simple todo list component with:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Vue.component('todo-list', {
props: ['todos'],
template:
`<ol>
<li v-for="(td, ix) in todos">
{{td}}
<button title="delete" @click="todos.splice(ix,1)">X</button>
<button title="move up" @click="todos.swap(ix,ix-1)" v-show="ix>0">^</button>
</li>
</ol>`,
})"><pre class="notranslate"><span class="pl-v">Vue</span><span class="pl-kos">.</span><span class="pl-en">component</span><span class="pl-kos">(</span><span class="pl-s">'todo-list'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">props</span>: <span class="pl-kos">[</span><span class="pl-s">'todos'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>:
<span class="pl-s">`<ol></span>
<span class="pl-s"> <li v-for="(td, ix) in todos"></span>
<span class="pl-s"> {{td}}</span>
<span class="pl-s"> <button title="delete" @click="todos.splice(ix,1)">X</button></span>
<span class="pl-s"> <button title="move up" @click="todos.swap(ix,ix-1)" v-show="ix>0">^</button></span>
<span class="pl-s"> </li></span>
<span class="pl-s"> </ol>`</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">For this to work I need (in core/observer/array.js) something like:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Array.prototype.swap = function(x,y) {
var t = this[x]
this[x] = this[y]
this[y] = t
}
const arrayProto = Array.prototype
export const arrayMethods = Object.create(arrayProto)
/**
* Intercept mutating methods and emit events
*/
;[
'push',
'pop',
'shift',
'unshift',
'splice',
'swap', // added
'sort',
'reverse'
]"><pre class="notranslate"><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-en">swap</span> <span class="pl-c1">=</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">x</span><span class="pl-kos">,</span><span class="pl-s1">y</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">t</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">[</span><span class="pl-s1">x</span><span class="pl-kos">]</span>
<span class="pl-smi">this</span><span class="pl-kos">[</span><span class="pl-s1">x</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">[</span><span class="pl-s1">y</span><span class="pl-kos">]</span>
<span class="pl-smi">this</span><span class="pl-kos">[</span><span class="pl-s1">y</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">t</span>
<span class="pl-kos">}</span>
<span class="pl-k">const</span> <span class="pl-s1">arrayProto</span> <span class="pl-c1">=</span> <span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span>
<span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">arrayMethods</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-s1">arrayProto</span><span class="pl-kos">)</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Intercept mutating methods and emit events</span>
<span class="pl-c"> */</span>
<span class="pl-kos">;</span><span class="pl-kos">[</span>
<span class="pl-s">'push'</span><span class="pl-kos">,</span>
<span class="pl-s">'pop'</span><span class="pl-kos">,</span>
<span class="pl-s">'shift'</span><span class="pl-kos">,</span>
<span class="pl-s">'unshift'</span><span class="pl-kos">,</span>
<span class="pl-s">'splice'</span><span class="pl-kos">,</span>
<span class="pl-s">'swap'</span><span class="pl-kos">,</span> <span class="pl-c">// added</span>
<span class="pl-s">'sort'</span><span class="pl-kos">,</span>
<span class="pl-s">'reverse'</span>
<span class="pl-kos">]</span></pre></div>
<p dir="auto">It works when I (lazily) fixed dist/vue.js, but did not run the tests.<br>
I think it is worth to add swap this way because notify() is run just once, am I wrong?</p> | <h3 dir="auto">Version</h3>
<p dir="auto">2.6.11</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://github.com/dxvladislavvolkov/vue-issue">https://github.com/dxvladislavvolkov/vue-issue</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li>Clone repo</li>
<li>Run npm i</li>
<li>Run npm run serve</li>
<li>Open console. You see the wrong parent element</li>
</ol>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">I want to see my-comp2 as the parent of my-comp</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">I get #app element as the parent of my-comp</p>
<hr>
<p dir="auto">To reproduce I create two js files and create my components using extend. Then I import my files to index js and create global components using Vue.component. After it, I get the wrong parent of a component when I wrap my-comp</p> | 0 |
<p dir="auto">So as per the documentation, I tried using two different offsets for desktop and phone. But I could not find the col-lg-offset on the CDN hosted css file.</p>
<p dir="auto"><a href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css" rel="nofollow">http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css</a></p>
<p dir="auto">Am not sure if this is an issue or am I going wrong somewhere?</p> | <p dir="auto">To increase/decrease the size of form controls, you can add the classes input-lg or input-sm (at least according to the website [http://getbootstrap.com/css/#forms] - which is the most consistent solution). In the css code, however, the classes are called input-large and input-small.</p> | 1 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">core</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.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.14 (default, Jan 17 2018, 14:28:32) [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)"><pre class="notranslate"><code class="notranslate">ansible 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.14 (default, Jan 17 2018, 14:28:32) [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-config dump --only-changed
(no output)"><pre class="notranslate"><code class="notranslate">$ ansible-config dump --only-changed
(no output)
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">handlers in roles that have been loaded using <code class="notranslate">include_role</code> are not executed when used in the "conventional" way. Using <code class="notranslate">listen</code> works, though.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#!/bin/bash
tmp=$(mktemp -d)
cd "${tmp}"
tee ansible.cfg <<EOF
[defaults]
nocows = 1
force_handlers = True
EOF
mkdir -p roles/role_{import,include{,_works}}/{tasks,handlers}
tee roles/role_{import,include}/handlers/main.yml <<EOF
---
- name: "my handler"
debug: msg="running handler in {{role_name}}"
EOF
tee roles/role_{import,include{,_works}}/tasks/main.yml <<EOF
---
- name: "do something"
command: /bin/true
notify: my handler
EOF
tee roles/role_include_works/handlers/main.yml <<EOF
---
- name: "my handler"
listen: ['my handler']
debug: msg="running handler in {{role_name}}"
EOF
tee run.yml <<EOF
---
- hosts: localhost
gather_facts: no
tasks:
- import_role: name=role_import
- include_role: name=role_include
- include_role: name=role_include_works
EOF
ansible-playbook run.yml"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#!</span>/bin/bash</span>
tmp=<span class="pl-s"><span class="pl-pds">$(</span>mktemp -d<span class="pl-pds">)</span></span>
<span class="pl-c1">cd</span> <span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">${tmp}</span><span class="pl-pds">"</span></span>
tee ansible.cfg <span class="pl-s"><span class="pl-k"><<</span><span class="pl-k">EOF</span></span>
<span class="pl-s">[defaults]</span>
<span class="pl-s">nocows = 1</span>
<span class="pl-s">force_handlers = True</span>
<span class="pl-s"><span class="pl-k">EOF</span></span>
mkdir -p roles/role_{import,include{,_works}}/{tasks,handlers}
tee roles/role_{import,include}/handlers/main.yml <span class="pl-s"><span class="pl-k"><<</span><span class="pl-k">EOF</span></span>
<span class="pl-s">---</span>
<span class="pl-s">- name: "my handler"</span>
<span class="pl-s"> debug: msg="running handler in {{role_name}}"</span>
<span class="pl-s"><span class="pl-k">EOF</span></span>
tee roles/role_{import,include{,_works}}/tasks/main.yml <span class="pl-s"><span class="pl-k"><<</span><span class="pl-k">EOF</span></span>
<span class="pl-s">---</span>
<span class="pl-s">- name: "do something"</span>
<span class="pl-s"> command: /bin/true</span>
<span class="pl-s"> notify: my handler</span>
<span class="pl-s"><span class="pl-k">EOF</span></span>
tee roles/role_include_works/handlers/main.yml <span class="pl-s"><span class="pl-k"><<</span><span class="pl-k">EOF</span></span>
<span class="pl-s">---</span>
<span class="pl-s">- name: "my handler"</span>
<span class="pl-s"> listen: ['my handler']</span>
<span class="pl-s"> debug: msg="running handler in {{role_name}}"</span>
<span class="pl-s"><span class="pl-k">EOF</span></span>
tee run.yml <span class="pl-s"><span class="pl-k"><<</span><span class="pl-k">EOF</span></span>
<span class="pl-s">---</span>
<span class="pl-s">- hosts: localhost</span>
<span class="pl-s"> gather_facts: no</span>
<span class="pl-s"> tasks:</span>
<span class="pl-s"> - import_role: name=role_import</span>
<span class="pl-s"> - include_role: name=role_include</span>
<span class="pl-s"> - include_role: name=role_include_works</span>
<span class="pl-s"><span class="pl-k">EOF</span></span>
ansible-playbook run.yml</pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
TASK [role_import : do something] *****************************************************************
changed: [localhost]
TASK [include_role] *******************************************************************************
TASK [role_include : do something] ****************************************************************
changed: [localhost]
TASK [include_role] *******************************************************************************
TASK [role_include_works : do something] **********************************************************
changed: [localhost]
RUNNING HANDLER [role_import : my handler] ********************************************************
ok: [localhost] => {
"msg": "running handler in role_import"
}
RUNNING HANDLER [role_include : my handler] ********************************************************
ok: [localhost] => {
"msg": "running handler in role_include"
}
RUNNING HANDLER [role_include_works : my handler] *************************************************
ok: [localhost] => {
"msg": "running handler in role_include_works"
}
PLAY RECAP ****************************************************************************************
localhost : ok=5 changed=3 unreachable=0 failed=0 "><pre lang="PLAY" class="notranslate"><code class="notranslate">
TASK [role_import : do something] *****************************************************************
changed: [localhost]
TASK [include_role] *******************************************************************************
TASK [role_include : do something] ****************************************************************
changed: [localhost]
TASK [include_role] *******************************************************************************
TASK [role_include_works : do something] **********************************************************
changed: [localhost]
RUNNING HANDLER [role_import : my handler] ********************************************************
ok: [localhost] => {
"msg": "running handler in role_import"
}
RUNNING HANDLER [role_include : my handler] ********************************************************
ok: [localhost] => {
"msg": "running handler in role_include"
}
RUNNING HANDLER [role_include_works : my handler] *************************************************
ok: [localhost] => {
"msg": "running handler in role_include_works"
}
PLAY RECAP ****************************************************************************************
localhost : ok=5 changed=3 unreachable=0 failed=0
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [localhost] **********************************************************************************
TASK [role_import : do something] *****************************************************************
changed: [localhost]
TASK [include_role] *******************************************************************************
TASK [role_include : do something] ****************************************************************
changed: [localhost]
TASK [include_role] *******************************************************************************
TASK [role_include_works : do something] **********************************************************
changed: [localhost]
RUNNING HANDLER [role_import : my handler] ********************************************************
ok: [localhost] => {
"msg": "running handler in role_import"
}
RUNNING HANDLER [role_include_works : my handler] *************************************************
ok: [localhost] => {
"msg": "running handler in role_include_works"
}
PLAY RECAP ****************************************************************************************
localhost : ok=5 changed=3 unreachable=0 failed=0 "><pre class="notranslate"><code class="notranslate">PLAY [localhost] **********************************************************************************
TASK [role_import : do something] *****************************************************************
changed: [localhost]
TASK [include_role] *******************************************************************************
TASK [role_include : do something] ****************************************************************
changed: [localhost]
TASK [include_role] *******************************************************************************
TASK [role_include_works : do something] **********************************************************
changed: [localhost]
RUNNING HANDLER [role_import : my handler] ********************************************************
ok: [localhost] => {
"msg": "running handler in role_import"
}
RUNNING HANDLER [role_include_works : my handler] *************************************************
ok: [localhost] => {
"msg": "running handler in role_include_works"
}
PLAY RECAP ****************************************************************************************
localhost : ok=5 changed=3 unreachable=0 failed=0
</code></pre></div> | <h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug report.</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">1.5.5</p>
<h5 dir="auto">Environment:</h5>
<ul dir="auto">
<li>Workstation: Archlinux</li>
<li>Managed host(s): CentOS 6.5, Ubuntu 12.04, Archlinux, ...</li>
</ul>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Follow up for <a href="https://github.com/ansible/ansible/issues/6443" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/6443/hovercard">#6443</a> and <a href="https://github.com/ansible/ansible/issues/6499" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/6499/hovercard">#6499</a>.</p>
<p dir="auto">Using git module with</p>
<ul dir="auto">
<li>sudo: yes</li>
<li>sudo_user: some_user</li>
</ul>
<p dir="auto">results in Python os.stat error when <em>ansible_ssh_user</em> remote hosts<br>
$HOME directory was created with umask 0077 resulting in 0700 directory<br>
permissions of /home/<em>ansible_ssh_user</em>.</p>
<p dir="auto">Cloning a repository using SSH or HTTP as transport layer. Connecting<br>
to the managed node with -c local or SSH.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-playbook -c local -vvvv /path/to/playbook.yml"><pre class="notranslate"><code class="notranslate">$ ansible-playbook -c local -vvvv /path/to/playbook.yml
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---
- hosts: localhost
sudo: yes
sudo_user: root
vars:
- git_user_name: foobar
- git_user_home: /tmp/{{ git_user_name }}
- git_clone_repo: https://github.com/ansible/ansible
tasks:
- name: Ensure ansible_ssh_user home directory permissions
file:
state=directory
mode=0700
dest={{ ansible_env['PWD'] }}
- name: Create Git user
user:
name={{ git_user_name }}
home={{ git_user_home }}
shell=/bin/bash
- name: Clone Git repository
sudo: yes
sudo_user: "{{ git_user_name }}"
git:
repo={{ git_clone_repo }}
dest={{ git_user_home }}/clone_me_some_repo_for_great_good
force=yes
remote=origin"><pre class="notranslate"><code class="notranslate">
---
- hosts: localhost
sudo: yes
sudo_user: root
vars:
- git_user_name: foobar
- git_user_home: /tmp/{{ git_user_name }}
- git_clone_repo: https://github.com/ansible/ansible
tasks:
- name: Ensure ansible_ssh_user home directory permissions
file:
state=directory
mode=0700
dest={{ ansible_env['PWD'] }}
- name: Create Git user
user:
name={{ git_user_name }}
home={{ git_user_home }}
shell=/bin/bash
- name: Clone Git repository
sudo: yes
sudo_user: "{{ git_user_name }}"
git:
repo={{ git_clone_repo }}
dest={{ git_user_home }}/clone_me_some_repo_for_great_good
force=yes
remote=origin
</code></pre></div>
<p dir="auto">Cleaning up:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ sudo userdel --remove foobar
$ sudo rm -rf /tmp/foobar"><pre class="notranslate"><code class="notranslate">$ sudo userdel --remove foobar
$ sudo rm -rf /tmp/foobar
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ sudo -i
$ [ -d /tmp/foobar/clone_me_some_repo_for_great_good/.git ]
$ echo $?
0"><pre class="notranslate"><code class="notranslate">$ sudo -i
$ [ -d /tmp/foobar/clone_me_some_repo_for_great_good/.git ]
$ echo $?
0
</code></pre></div>
<h5 dir="auto">Actual Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ANSIBLE_NOCOWS=1 ansible-playbook -c local -vvvv /tmp/github-bug-report/playbook.yml
PLAY [localhost] **************************************************************
GATHERING FACTS ***************************************************************
<localhost> REMOTE_MODULE setup
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826 && chmod a+rx /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826 && echo /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826']
<localhost> PUT /tmp/tmpUyGh5T TO /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826/setup
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=smqkhnaznohkkoqjrgsrlghissfvtnau] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-smqkhnaznohkkoqjrgsrlghissfvtnau; /usr/bin/python2 /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826/setup; rm -rf /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826/ >/dev/null 2>&1'"'"''
ok: [localhost]
TASK: [Ensure ansible_ssh_user home directory permissions] ********************
<localhost> REMOTE_MODULE file state=directory mode=0700 dest=/home/ssh_user
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477 && chmod a+rx /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477 && echo /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477']
<localhost> PUT /tmp/tmpiyGv99 TO /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477/file
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=dpmuynuqcjjmfyvfumzbeldutfblhhsq] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-dpmuynuqcjjmfyvfumzbeldutfblhhsq; /usr/bin/python2 /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477/file; rm -rf /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477/ >/dev/null 2>&1'"'"''
ok: [localhost] => {"changed": false, "gid": 100, "group": "users", "mode": "0700", "owner": "ssh_user", "path": "/home/ssh_user", "size": 956, "state": "directory", "uid": 1042}
TASK: [Create Git user] *******************************************************
<localhost> REMOTE_MODULE user name=foobar home=/tmp/foobar shell=/bin/bash
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750 && chmod a+rx /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750 && echo /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750']
<localhost> PUT /tmp/tmpdiz_cO TO /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750/user
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=lwvqzyalydhiquyjktyqonjclueegsut] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-lwvqzyalydhiquyjktyqonjclueegsut; /usr/bin/python2 /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750/user; rm -rf /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750/ >/dev/null 2>&1'"'"''
ok: [localhost] => {"append": false, "changed": false, "comment": "", "group": 1043, "home": "/tmp/foobar", "move_home": false, "name": "foobar", "shell": "/bin/bash", "state": "present", "uid": 1043}
TASK: [Clone Git repository] **************************************************
<localhost> REMOTE_MODULE git repo=https://github.com/ansible/ansible dest=/tmp/foobar/clone_me_some_repo_for_great_good force=yes remote=origin
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p /tmp/ansible-tmp-1398244809.91-40810594643527 && chmod a+rx /tmp/ansible-tmp-1398244809.91-40810594643527 && echo /tmp/ansible-tmp-1398244809.91-40810594643527']
<localhost> PUT /tmp/tmpV7Dqnb TO /tmp/ansible-tmp-1398244809.91-40810594643527/git
<localhost> EXEC ['/bin/sh', '-c', 'chmod a+r /tmp/ansible-tmp-1398244809.91-40810594643527/git']
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=uofualorxsuihhxfftcbklsehewekjop] password: " -u foobar /bin/sh -c '"'"'echo SUDO-SUCCESS-uofualorxsuihhxfftcbklsehewekjop; /usr/bin/python2 /tmp/ansible-tmp-1398244809.91-40810594643527/git'"'"''
<localhost> EXEC ['/bin/sh', '-c', 'rm -rf /tmp/ansible-tmp-1398244809.91-40810594643527/ >/dev/null 2>&1']
failed: [localhost] => {"cmd": ["/usr/bin/git", "ls-remote", "https://github.com/ansible/ansible", "-h", "refs/heads/HEAD"], "failed": true, "rc": 128}
stderr: fatal: failed to stat '.': Permission denied
msg: fatal: failed to stat '.': Permission denied
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/home/ssh_user/playbook.retry
localhost : ok=3 changed=0 unreachable=0 failed=1
[1] 6514 exit 2 ANSIBLE_NOCOWS=1 ansible-playbook -c local -vvvv "><pre class="notranslate"><code class="notranslate">ANSIBLE_NOCOWS=1 ansible-playbook -c local -vvvv /tmp/github-bug-report/playbook.yml
PLAY [localhost] **************************************************************
GATHERING FACTS ***************************************************************
<localhost> REMOTE_MODULE setup
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826 && chmod a+rx /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826 && echo /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826']
<localhost> PUT /tmp/tmpUyGh5T TO /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826/setup
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=smqkhnaznohkkoqjrgsrlghissfvtnau] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-smqkhnaznohkkoqjrgsrlghissfvtnau; /usr/bin/python2 /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826/setup; rm -rf /tmp/ansible/ssh_user/ansible-tmp-1398244809.55-224144278976826/ >/dev/null 2>&1'"'"''
ok: [localhost]
TASK: [Ensure ansible_ssh_user home directory permissions] ********************
<localhost> REMOTE_MODULE file state=directory mode=0700 dest=/home/ssh_user
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477 && chmod a+rx /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477 && echo /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477']
<localhost> PUT /tmp/tmpiyGv99 TO /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477/file
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=dpmuynuqcjjmfyvfumzbeldutfblhhsq] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-dpmuynuqcjjmfyvfumzbeldutfblhhsq; /usr/bin/python2 /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477/file; rm -rf /tmp/ansible/ssh_user/ansible-tmp-1398244809.76-13206589431477/ >/dev/null 2>&1'"'"''
ok: [localhost] => {"changed": false, "gid": 100, "group": "users", "mode": "0700", "owner": "ssh_user", "path": "/home/ssh_user", "size": 956, "state": "directory", "uid": 1042}
TASK: [Create Git user] *******************************************************
<localhost> REMOTE_MODULE user name=foobar home=/tmp/foobar shell=/bin/bash
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750 && chmod a+rx /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750 && echo /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750']
<localhost> PUT /tmp/tmpdiz_cO TO /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750/user
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=lwvqzyalydhiquyjktyqonjclueegsut] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-lwvqzyalydhiquyjktyqonjclueegsut; /usr/bin/python2 /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750/user; rm -rf /tmp/ansible/ssh_user/ansible-tmp-1398244809.83-38414991496750/ >/dev/null 2>&1'"'"''
ok: [localhost] => {"append": false, "changed": false, "comment": "", "group": 1043, "home": "/tmp/foobar", "move_home": false, "name": "foobar", "shell": "/bin/bash", "state": "present", "uid": 1043}
TASK: [Clone Git repository] **************************************************
<localhost> REMOTE_MODULE git repo=https://github.com/ansible/ansible dest=/tmp/foobar/clone_me_some_repo_for_great_good force=yes remote=origin
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p /tmp/ansible-tmp-1398244809.91-40810594643527 && chmod a+rx /tmp/ansible-tmp-1398244809.91-40810594643527 && echo /tmp/ansible-tmp-1398244809.91-40810594643527']
<localhost> PUT /tmp/tmpV7Dqnb TO /tmp/ansible-tmp-1398244809.91-40810594643527/git
<localhost> EXEC ['/bin/sh', '-c', 'chmod a+r /tmp/ansible-tmp-1398244809.91-40810594643527/git']
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=uofualorxsuihhxfftcbklsehewekjop] password: " -u foobar /bin/sh -c '"'"'echo SUDO-SUCCESS-uofualorxsuihhxfftcbklsehewekjop; /usr/bin/python2 /tmp/ansible-tmp-1398244809.91-40810594643527/git'"'"''
<localhost> EXEC ['/bin/sh', '-c', 'rm -rf /tmp/ansible-tmp-1398244809.91-40810594643527/ >/dev/null 2>&1']
failed: [localhost] => {"cmd": ["/usr/bin/git", "ls-remote", "https://github.com/ansible/ansible", "-h", "refs/heads/HEAD"], "failed": true, "rc": 128}
stderr: fatal: failed to stat '.': Permission denied
msg: fatal: failed to stat '.': Permission denied
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/home/ssh_user/playbook.retry
localhost : ok=3 changed=0 unreachable=0 failed=1
[1] 6514 exit 2 ANSIBLE_NOCOWS=1 ansible-playbook -c local -vvvv
</code></pre></div> | 0 |
<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/02/2020 12:09: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>
<h2 dir="auto"><g-emoji class="g-emoji" alias="camera" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4f7.png">📷</g-emoji> Screenshots</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/60983100/89128251-0a4c4e80-d4ba-11ea-9151-61c33ecd3a67.png"><img src="https://user-images.githubusercontent.com/60983100/89128251-0a4c4e80-d4ba-11ea-9151-61c33ecd3a67.png" alt="image" style="max-width: 100%;"></a><br>
<a href="https://github.com/microsoft/PowerToys/files/5012506/2020-08-02.txt">2020-08-02.txt</a></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">Currently:</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/scipy/scipy/blob/f34de3a87010bebf6cc1e9474dc58d315d75f52d/setup.py#L542">scipy/setup.py</a>
</p>
<p class="mb-0 color-fg-muted">
Line 542
in
<a data-pjax="true" class="commit-tease-sha" href="/scipy/scipy/commit/f34de3a87010bebf6cc1e9474dc58d315d75f52d">f34de3a</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="L542" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="542"></td>
<td id="LC542" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">np_minversion</span> <span class="pl-c1">=</span> <span class="pl-s">'1.17.3'</span> </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto">But one can still do the following (say, in Python 3.9.7):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip install "numpy==1.18.5"
pip install "scipy==1.7.3" # Does not attempt to upgrade numpy"><pre class="notranslate"><code class="notranslate">pip install "numpy==1.18.5"
pip install "scipy==1.7.3" # Does not attempt to upgrade numpy
</code></pre></div>
<p dir="auto">and then encounter this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> from scipy import signal
...\scipy\signal\__init__.py in <module>
308 from .spectral import *
309 from .wavelets import *
--> 310 from ._peak_finding import *
311 from .windows import get_window # keep this one in signal namespace
312
...\scipy\signal\_peak_finding.py in <modul
e>
6
7 from scipy.signal.wavelets import cwt, ricker
----> 8 from scipy.stats import scoreatpercentile
9
10 from ._peak_finding_utils import (
...\scipy\stats\__init__.py in <module>
439 """
440
--> 441 from .stats import *
442 from .distributions import *
443 from .morestats import *
...\scipy\stats\stats.py in <module>
41 import scipy.special as special
42 from scipy import linalg
---> 43 from . import distributions
44 from . import mstats_basic
45 from ._stats_mstats_common import (_find_repeats, linregress, theilslope
s,
...\scipy\stats\distributions.py in <module
>
9
10 from . import _continuous_distns
---> 11 from . import _discrete_distns
12
13 from ._continuous_distns import *
...\scipy\stats\_discrete_distns.py in <mod
ule>
17 _check_shape)
18 import scipy.stats._boost as _boost
---> 19 from .biasedurn import (_PyFishersNCHypergeometric,
20 _PyWalleniusNCHypergeometric,
21 _PyStochasticLib3)
biasedurn.pyx in init scipy.stats.biasedurn()
ModuleNotFoundError: No module named 'numpy.random.bit_generator'"><pre class="notranslate"><code class="notranslate">>>> from scipy import signal
...\scipy\signal\__init__.py in <module>
308 from .spectral import *
309 from .wavelets import *
--> 310 from ._peak_finding import *
311 from .windows import get_window # keep this one in signal namespace
312
...\scipy\signal\_peak_finding.py in <modul
e>
6
7 from scipy.signal.wavelets import cwt, ricker
----> 8 from scipy.stats import scoreatpercentile
9
10 from ._peak_finding_utils import (
...\scipy\stats\__init__.py in <module>
439 """
440
--> 441 from .stats import *
442 from .distributions import *
443 from .morestats import *
...\scipy\stats\stats.py in <module>
41 import scipy.special as special
42 from scipy import linalg
---> 43 from . import distributions
44 from . import mstats_basic
45 from ._stats_mstats_common import (_find_repeats, linregress, theilslope
s,
...\scipy\stats\distributions.py in <module
>
9
10 from . import _continuous_distns
---> 11 from . import _discrete_distns
12
13 from ._continuous_distns import *
...\scipy\stats\_discrete_distns.py in <mod
ule>
17 _check_shape)
18 import scipy.stats._boost as _boost
---> 19 from .biasedurn import (_PyFishersNCHypergeometric,
20 _PyWalleniusNCHypergeometric,
21 _PyStochasticLib3)
biasedurn.pyx in init scipy.stats.biasedurn()
ModuleNotFoundError: No module named 'numpy.random.bit_generator'
</code></pre></div>
<p dir="auto">Workaround: Manually upgrade numpy.</p>
<p dir="auto">ref: <a href="https://numpy.org/doc/stable/release/1.19.0-notes.html#numpy-random-bit-generator-moved-to-numpy-random-bit-generator" rel="nofollow">https://numpy.org/doc/stable/release/1.19.0-notes.html#numpy-random-bit-generator-moved-to-numpy-random-bit-generator</a></p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/duytnguyendtn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/duytnguyendtn">@duytnguyendtn</a></p> | <p dir="auto">I'm using the NLU framework <a href="https://rasa.com" rel="nofollow">Rasa</a> using TensorFlow which is relying on scipy. I have no issues running the code on a amd64 platform, but I'm using a Raspberry Pi 4 aarch64 architecture, where I hit the problem:</p>
<blockquote>
<p dir="auto">ModuleNotFoundError: No module named 'numpy.random.bit_generator'</p>
</blockquote>
<p dir="auto">I thought recompiling everything would fix this issue with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip3 install scipy==1.7.1 numpy==1.18.5 scikit-learn==0.24.2 --no-cache-dir --no-binary :all:"><pre class="notranslate"><code class="notranslate">pip3 install scipy==1.7.1 numpy==1.18.5 scikit-learn==0.24.2 --no-cache-dir --no-binary :all:
</code></pre></div>
<p dir="auto">but I get the same error.</p>
<p dir="auto">I cannot update at least numpy, because version 1.19 is introducing some breaking changes and TensorFlow does not work anymore.</p>
<h4 dir="auto">Reproducing code example:</h4>
<p dir="auto">The problem can be also reproduced by executing in a Python 3 shell:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="mkdir test
cd test
python3 -m venv venv
source venv/bin/activate
pip3 install scipy==1.7.1 numpy==1.18.5 scikit-learn==0.24.2
python3"><pre class="notranslate">mkdir <span class="pl-c1">test</span>
<span class="pl-c1">cd</span> <span class="pl-c1">test</span>
python3 -m venv venv
<span class="pl-c1">source</span> venv/bin/activate
pip3 install scipy==1.7.1 numpy==1.18.5 scikit-learn==0.24.2
python3</pre></div>
<p dir="auto">Within the Python 3 shell execute:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import scipy.stats"><pre class="notranslate"><code class="notranslate">import scipy.stats
</code></pre></div>
<h4 dir="auto">Error message:</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> import scipy.stats
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/__init__.py", line 441, in <module>
from .stats import *
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/stats.py", line 43, in <module>
from . import distributions
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/distributions.py", line 11, in <module>
from . import _discrete_distns
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/_discrete_distns.py", line 19, in <module>
from .biasedurn import (_PyFishersNCHypergeometric,
File "biasedurn.pyx", line 1, in init scipy.stats.biasedurn
ModuleNotFoundError: No module named 'numpy.random.bit_generator'"><pre class="notranslate"><code class="notranslate">>>> import scipy.stats
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/__init__.py", line 441, in <module>
from .stats import *
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/stats.py", line 43, in <module>
from . import distributions
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/distributions.py", line 11, in <module>
from . import _discrete_distns
File "/home/ubuntu/accessibility/a/venv/lib/python3.8/site-packages/scipy/stats/_discrete_distns.py", line 19, in <module>
from .biasedurn import (_PyFishersNCHypergeometric,
File "biasedurn.pyx", line 1, in init scipy.stats.biasedurn
ModuleNotFoundError: No module named 'numpy.random.bit_generator'
</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.7.1 1.18.5 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">1.7.1 1.18.5 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)
</code></pre></div> | 1 |
<h4 dir="auto">Describe the workflow you want to enable</h4>
<p dir="auto">Ability to plot the PR curve given <code class="notranslate">probas_pred</code> instead of <code class="notranslate">estimator, X</code>.</p>
<h4 dir="auto">Describe your proposed solution</h4>
<p dir="auto"><code class="notranslate">plot_precision_recall_curve()</code> should accept either <code class="notranslate">estimator, X</code> or <code class="notranslate">probas_pred</code>.</p>
<h4 dir="auto">Describe alternatives you've considered, if relevant</h4>
<p dir="auto">Alternatively, <code class="notranslate">precision_recall_curve()</code> could plot the PR curve if keyword argument <code class="notranslate">plot=True</code>.</p>
<h4 dir="auto">Additional context</h4> | <p dir="auto">The signature of <code class="notranslate">plot_confusion_matrix</code> is currently:</p>
<p dir="auto"><code class="notranslate">sklearn.metrics.plot_confusion_matrix(estimator, X, y_true, labels=None, sample_weight=None, normalize=None, display_labels=None, include_values=True, xticks_rotation='horizontal', values_format=None, cmap='viridis', ax=None)</code></p>
<p dir="auto">The function takes an estimator and raw data and can not be used with already predicted labels. This has some downsides:</p>
<ul dir="auto">
<li>If a confusion matrix should be plotted but the predictions should also be used elsewhere (e.g. calculating accuracy_score) the estimation has to be performed several times. That takes longer and can result in different values if the estimator is randomized.</li>
<li>If no estimator is available (e.g. predictions loaded from a file) the plot can not be used at all.</li>
</ul>
<p dir="auto">Suggestion: allow passing predicted labels <code class="notranslate">y_pred</code> to <code class="notranslate">plot_confusion_matrix</code> that will be used instead of <code class="notranslate">estimator</code> and <code class="notranslate">X</code>. In my opinion the cleanest solution would be to remove the prediction step from the function and use a signature similar to that of <code class="notranslate">accuracy_score</code>, e.g. <code class="notranslate">(y_true, y_pred, labels=None, sample_weight=None, ...)</code>. However in order to maintain backwards compatibility, <code class="notranslate">y_pred</code> can be added as an optional keyword argument.</p>
<p dir="auto">TODO:</p>
<ul dir="auto">
<li>
<p dir="auto">Introduce the class methods for the currently existing plots:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">ConfusionMatrixDisplay</code> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="715485974" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/18543" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/18543/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/18543">#18543</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">PrecisionRecallDisplay</code> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="946907798" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/20552" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/20552/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/20552">#20552</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">RocCurveDisplay</code> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="948050789" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/20569" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/20569/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/20569">#20569</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">DetCurveDisplay</code> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="794129835" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/19278" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/19278/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/19278">#19278</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">PartialDependenceDisplay</code>. For this one, we don't want to introduce the <code class="notranslate">from_predictions</code> classmethod because it would not make sense, we only want <code class="notranslate">from_estimator</code>.</li>
</ul>
</li>
<li>
<p dir="auto">For all Display listed above, deprecate their corresponding <code class="notranslate">plot_...</code> function. We don't need to deprecate <code class="notranslate">plot_det_curve</code> because it hasn't been released yet, we can just remove it.</p>
</li>
<li>
<p dir="auto">for new PRs like <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="630742675" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/17443" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/17443/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/17443">#17443</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="667059094" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/18020" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/18020/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/18020">#18020</a> we can implement the class methods right away instead of introducing a <code class="notranslate">plot</code> function.</p>
</li>
</ul> | 1 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: 1.33.0</li>
<li>Operating System: Windows</li>
<li>Browser: Firefox</li>
<li>Other info: Node: 18.16.0</li>
</ul>
<h3 dir="auto">Source code</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="async runVisualChecksAfterProjectSave(headless) {
if (headless) {
// Start comparing snapshots on Custom tab
await this.customTabBtn.click();
await this.page.waitForLoadState("load", { timeout: 10 * 1000 });
await expect(async () => {
await expect(this.projectCard).toHaveScreenshot({
mask: [this.projectNameInput, this.footerRegisterLabel],
});
}).toPass({ timeout: 10000, intervals: [1000, 2000, 3000] });"><pre class="notranslate"><code class="notranslate">async runVisualChecksAfterProjectSave(headless) {
if (headless) {
// Start comparing snapshots on Custom tab
await this.customTabBtn.click();
await this.page.waitForLoadState("load", { timeout: 10 * 1000 });
await expect(async () => {
await expect(this.projectCard).toHaveScreenshot({
mask: [this.projectNameInput, this.footerRegisterLabel],
});
}).toPass({ timeout: 10000, intervals: [1000, 2000, 3000] });
</code></pre></div>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">As described on this feature wish: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1589510284" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/20987" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/20987/hovercard" href="https://github.com/microsoft/playwright/issues/20987">#20987</a></p>
<p dir="auto"><code class="notranslate">expect.toPass()</code> should be walk around for image testing for pages that take bit more time to load content, goal is to reduce flaky tests. I would expect that toPass will retry toHaveScreenshot() for the timeout provided in <code class="notranslate">toPass()</code>. The default timeout for <code class="notranslate">expect()</code> is set for 5 sec. But in our case, assertion fails after 403s</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/29520131/245068395-bef5531c-150c-4c24-96b1-ebd5c07b5712.png"><img src="https://user-images.githubusercontent.com/29520131/245068395-bef5531c-150c-4c24-96b1-ebd5c07b5712.png" alt="image" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/29520131/245069495-23049d31-870c-4da9-a9d4-f6bf527d477c.png"><img src="https://user-images.githubusercontent.com/29520131/245069495-23049d31-870c-4da9-a9d4-f6bf527d477c.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">Wrapping <code class="notranslate">toHaveScreenshot()</code> with <code class="notranslate">expect.toPass</code> should extend assertion timeout either for default timeout set for <code class="notranslate">expect()</code> or for timeout set inside <code class="notranslate">toPass()</code> and give us flexibility for visual testing.</p> | <ul dir="auto">
<li>Playwright Version: 1.0.2</li>
<li>Operating System: Windows</li>
<li>Browser: Chromium</li>
</ul>
<p dir="auto">I use playwright for integration tests in my project and I have a page with many iframes that are loaded dynamically. When i receive a request, one of the iframes should be open, but chromium immediately disconnects after opening the iframe with the error:<br>
messageWithStack.split is not a function<br>
in this line<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/53441891/84261380-56b38780-ab24-11ea-8d8d-de32c7d9f9d7.png"><img src="https://user-images.githubusercontent.com/53441891/84261380-56b38780-ab24-11ea-8d8d-de32c7d9f9d7.png" alt="image" style="max-width: 100%;"></a><br>
This is because the messageWithStack variable is false (boolean) and not a string type.<br>
In browser firefox and webkit it works fine, without any disconnects.</p> | 0 |
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Title sums it up all I guess.<br>
Related:</p>
<ul dir="auto">
<li>Issue <a href="https://github.com/matplotlib/matplotlib/issues/3517" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/3517/hovercard">#3517</a> on Github</li>
<li><a href="https://stackoverflow.com/questions/10960463/non-ascii-characters-in-matplotlib" rel="nofollow">This</a> and <a href="https://stackoverflow.com/questions/40956636/missing-polish-characters-in-matplotlib-pyplot-labels-regardless-of-using-utf-8?noredirect=1&lq=1" rel="nofollow">this</a> on stack exchange</li>
</ul>
<p dir="auto">Here I used sinhala as <a href="http://unicode.org/faq/indic.html" rel="nofollow">Indic Script</a> instance.<br>
I think the font family has to do something with this issue since output to different font families are different. I'm not an expert in these stuff. Help appreciated to to get this work even with a different font family.<br>
An example is given below for which I've tried with 3 different font families.<br>
<strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from matplotlib import rc
families = ['WARNA','LKLUG','Arial']
for familyname in families:
rc('font', family=familyname)
from matplotlib import pyplot as plt
import numpy as np
r = np.linspace(0.1,5,100)
A = 3*2/(r*2)+np.pi*r**2
fig = plt.figure()
axes = fig.add_axes([.1,.1,.8,.8])
axes.plot(r,A)
axes.set_ylabel(u'වර්ගඵලය')
axes.set_xlabel(u'අරය')
axes.set_title(familyname)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">rc</span>
<span class="pl-s1">families</span> <span class="pl-c1">=</span> [<span class="pl-s">'WARNA'</span>,<span class="pl-s">'LKLUG'</span>,<span class="pl-s">'Arial'</span>]
<span class="pl-k">for</span> <span class="pl-s1">familyname</span> <span class="pl-c1">in</span> <span class="pl-s1">families</span>:
<span class="pl-en">rc</span>(<span class="pl-s">'font'</span>, <span class="pl-s1">family</span><span class="pl-c1">=</span><span class="pl-s1">familyname</span>)
<span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</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">r</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0.1</span>,<span class="pl-c1">5</span>,<span class="pl-c1">100</span>)
<span class="pl-v">A</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span><span class="pl-c1">*</span><span class="pl-c1">2</span><span class="pl-c1">/</span>(<span class="pl-s1">r</span><span class="pl-c1">*</span><span class="pl-c1">2</span>)<span class="pl-c1">+</span><span class="pl-s1">np</span>.<span class="pl-s1">pi</span><span class="pl-c1">*</span><span class="pl-s1">r</span><span class="pl-c1">**</span><span class="pl-c1">2</span>
<span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>()
<span class="pl-s1">axes</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">add_axes</span>([<span class="pl-c1">.1</span>,<span class="pl-c1">.1</span>,<span class="pl-c1">.8</span>,<span class="pl-c1">.8</span>])
<span class="pl-s1">axes</span>.<span class="pl-en">plot</span>(<span class="pl-s1">r</span>,<span class="pl-v">A</span>)
<span class="pl-s1">axes</span>.<span class="pl-en">set_ylabel</span>(<span class="pl-s">u'වර්ගඵලය'</span>)
<span class="pl-s1">axes</span>.<span class="pl-en">set_xlabel</span>(<span class="pl-s">u'අරය'</span>)
<span class="pl-s1">axes</span>.<span class="pl-en">set_title</span>(<span class="pl-s1">familyname</span>)</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/5713d323f515f4277b2596293f4e37abf56a631112b1fb3d433b44dd7099ec67/687474703a2f2f692e696d6775722e636f6d2f4b754864456d6b2e706e67"><img src="https://camo.githubusercontent.com/5713d323f515f4277b2596293f4e37abf56a631112b1fb3d433b44dd7099ec67/687474703a2f2f692e696d6775722e636f6d2f4b754864456d6b2e706e67" alt="Result 1" data-canonical-src="http://i.imgur.com/KuHdEmk.png" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/5898965bc1f3e4f94ce9b1fda309bc139da144e4589eee05ba463d64affaef5d/687474703a2f2f692e696d6775722e636f6d2f33646f7a6d66302e706e67"><img src="https://camo.githubusercontent.com/5898965bc1f3e4f94ce9b1fda309bc139da144e4589eee05ba463d64affaef5d/687474703a2f2f692e696d6775722e636f6d2f33646f7a6d66302e706e67" alt="Result 2" data-canonical-src="http://i.imgur.com/3dozmf0.png" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/b2d033549dc2f5708c5319a904c203c2966f918b91e56e0b2903ad45a718b319/687474703a2f2f692e696d6775722e636f6d2f57573230694e6c2e706e67"><img src="https://camo.githubusercontent.com/b2d033549dc2f5708c5319a904c203c2966f918b91e56e0b2903ad45a718b319/687474703a2f2f692e696d6775722e636f6d2f57573230694e6c2e706e67" alt="Result 3" data-canonical-src="http://i.imgur.com/WW20iNl.png" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">Result 1 looks fine but it has 2 problems:</p>
<ul dir="auto">
<li>Accents not been placed in the correct location. ("්" in "වර්ගඵලය" is placed after "ර" not before)</li>
<li>Letter "A" is not renderd in the title "WARNA"</li>
</ul>
<p dir="auto">Issues in result 2:</p>
<ul dir="auto">
<li>Same previous accent issue</li>
<li>Axis values or title not shown at all</li>
</ul>
<p dir="auto">Issues in result 3:</p>
<ul dir="auto">
<li>No Sinhala script shown.</li>
</ul>
<p dir="auto"><strong>Versions</strong></p>
<table role="table">
<thead>
<tr>
<th>Software</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Python</td>
<td>2.7.13 64bit [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]</td>
</tr>
<tr>
<td>IPython</td>
<td>5.1.0</td>
</tr>
<tr>
<td>OS</td>
<td>Linux 4.4.0 78 generic x86_64 with debian jessie sid</td>
</tr>
<tr>
<td>matplotlib</td>
<td>1.5.1</td>
</tr>
</tbody>
</table>
<p dir="auto">(Matplotlib from anaconda bundle)</p>
<p dir="auto">Wed Jun 14 22:54:11 2017 +0530</p> | <p dir="auto">a normalized distribution should have sum(bins) = 1 or at least be able to have this as an option</p> | 0 |
<p dir="auto">Given the following code:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait Stream<T, N: Stream<T>> {
}
pub fn main() {
println!("zomg");
}"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">Stream</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">N</span><span class="pl-kos">:</span> <span class="pl-smi">Stream</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-kos">{</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-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"zomg"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Running rustc gives the following output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="task 'rustc' has overflowed its stack
[1] 47380 illegal hardware instruction rustc types.rs"><pre class="notranslate"><code class="notranslate">task 'rustc' has overflowed its stack
[1] 47380 illegal hardware instruction rustc types.rs
</code></pre></div> | <p dir="auto">Compiling the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trait Chromosome<C: Chromosome> {
fn random() -> C;
}"><pre class="notranslate"><code class="notranslate">trait Chromosome<C: Chromosome> {
fn random() -> C;
}
</code></pre></div>
<p dir="auto">Causes the following output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="task 'rustc' has overflowed its stack
Illegal instruction"><pre class="notranslate"><code class="notranslate">task 'rustc' has overflowed its stack
Illegal instruction
</code></pre></div>
<p dir="auto">The code was an unintentional typo, and probably isn't valid, but I think the compiler should handle this a lot better, as there's no indication of what the problem is, or where it lies. In large compilation units with complex templating etc., that could be a big roadblock.</p> | 1 |
<h2 dir="auto">Checklist</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -> celery:4.2.0rc4 (windowlicker) kombu:4.2.0 py:2.7.12
billiard:3.5.0.3 py-amqp:2.3.1
platform -> system:Linux arch:64bit, ELF imp:CPython
loader -> celery.loaders.default.Loader
settings -> transport:amqp results:disabled"><pre class="notranslate"><code class="notranslate">software -> celery:4.2.0rc4 (windowlicker) kombu:4.2.0 py:2.7.12
billiard:3.5.0.3 py-amqp:2.3.1
platform -> system:Linux arch:64bit, ELF imp:CPython
loader -> celery.loaders.default.Loader
settings -> transport:amqp results:disabled
</code></pre></div>
<ul class="contains-task-list">
<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>
</ul>
<p dir="auto">Celery versions affected: 4.2.0rc4, 4.2.0rc2<br>
Last working version: 4.1.1</p>
<h2 dir="auto">Steps to reproduce</h2>
<ol dir="auto">
<li>Start up a worker with gevent pool</li>
<li>send celery control cancel_consumer remote comand</li>
<li>Send celery control add_consumer remote command</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Cancel consumer should remove all the workers consuming from the given queue<br>
Add consumer should add a specified consumer to the given queue</p>
<h2 dir="auto">Actual behavior</h2>
<p dir="auto">Cancel consumer removes the workers from the queue as expected<br>
Add consumer throws the following exception and the worker dies</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
worker_1 | File "/usr/local/lib/python2.7/site-packages/gevent/hub.py", line 866, in switch
worker_1 | switch(value)
worker_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/pidbox.py", line 120, in loop
worker_1 | connection.drain_events(timeout=1.0)
worker_1 | File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 301, in drain_events
worker_1 | return self.transport.drain_events(self.connection, **kwargs)
worker_1 | File "/usr/local/lib/python2.7/site-packages/kombu/transport/pyamqp.py", line 103, in drain_events
worker_1 | return connection.drain_events(**kwargs)
worker_1 | File "/usr/local/lib/python2.7/site-packages/amqp/connection.py", line 491, in drain_events
worker_1 | while not self.blocking_read(timeout):
worker_1 | File "/usr/local/lib/python2.7/site-packages/amqp/connection.py", line 496, in blocking_read
worker_1 | frame = self.transport.read_frame()
worker_1 | File "/usr/local/lib/python2.7/site-packages/amqp/transport.py", line 243, in read_frame
worker_1 | frame_header = read(7, True)
worker_1 | File "/usr/local/lib/python2.7/site-packages/amqp/transport.py", line 418, in _read
worker_1 | s = recv(n - len(rbuf))
worker_1 | File "/usr/local/lib/python2.7/site-packages/gevent/_socket2.py", line 277, in recv
worker_1 | return sock.recv(*args)
worker_1 | error: [Errno 104] Connection reset by peer
worker_1 | Mon May 28 19:40:01 2018 <built-in method switch of greenlet.greenlet object at 0x7f5b24653c30> failed with error"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
worker_1 | File "/usr/local/lib/python2.7/site-packages/gevent/hub.py", line 866, in switch
worker_1 | switch(value)
worker_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/pidbox.py", line 120, in loop
worker_1 | connection.drain_events(timeout=1.0)
worker_1 | File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 301, in drain_events
worker_1 | return self.transport.drain_events(self.connection, **kwargs)
worker_1 | File "/usr/local/lib/python2.7/site-packages/kombu/transport/pyamqp.py", line 103, in drain_events
worker_1 | return connection.drain_events(**kwargs)
worker_1 | File "/usr/local/lib/python2.7/site-packages/amqp/connection.py", line 491, in drain_events
worker_1 | while not self.blocking_read(timeout):
worker_1 | File "/usr/local/lib/python2.7/site-packages/amqp/connection.py", line 496, in blocking_read
worker_1 | frame = self.transport.read_frame()
worker_1 | File "/usr/local/lib/python2.7/site-packages/amqp/transport.py", line 243, in read_frame
worker_1 | frame_header = read(7, True)
worker_1 | File "/usr/local/lib/python2.7/site-packages/amqp/transport.py", line 418, in _read
worker_1 | s = recv(n - len(rbuf))
worker_1 | File "/usr/local/lib/python2.7/site-packages/gevent/_socket2.py", line 277, in recv
worker_1 | return sock.recv(*args)
worker_1 | error: [Errno 104] Connection reset by peer
worker_1 | Mon May 28 19:40:01 2018 <built-in method switch of greenlet.greenlet object at 0x7f5b24653c30> failed with error
</code></pre></div> | <p dir="auto">Celery version: <code class="notranslate">4.2.0</code></p>
<h2 dir="auto">Steps to reproduce</h2>
<p dir="auto">docker-compose.yml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="version: '2'
services:
worker:
build: .
depends_on:
- rabbitmq
rabbitmq:
image: rabbitmq:alpine"><pre class="notranslate"><span class="pl-ent">version</span>: <span class="pl-s"><span class="pl-pds">'</span>2<span class="pl-pds">'</span></span>
<span class="pl-ent">services</span>:
<span class="pl-ent">worker</span>:
<span class="pl-ent">build</span>: <span class="pl-s">.</span>
<span class="pl-ent">depends_on</span>:
- <span class="pl-s">rabbitmq</span>
<span class="pl-ent">rabbitmq</span>:
<span class="pl-ent">image</span>: <span class="pl-s">rabbitmq:alpine</span></pre></div>
<p dir="auto">Dockerfile</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="FROM alpine
RUN apk add --no-cache build-base python3 python3-dev
RUN pip3 install celery eventlet
CMD celery -b amqp://rabbitmq worker -P eventlet --loglevel=DEBUG"><pre class="notranslate"><code class="notranslate">FROM alpine
RUN apk add --no-cache build-base python3 python3-dev
RUN pip3 install celery eventlet
CMD celery -b amqp://rabbitmq worker -P eventlet --loglevel=DEBUG
</code></pre></div>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ docker-compose up --build"><pre class="notranslate">$ <span class="pl-s1">docker-compose up --build</span></pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Worker stays connected without errors</p>
<h2 dir="auto">Actual behavior</h2>
<p dir="auto">3 minutes after startup, the worker reports several errors with a Traceback, similar to the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2018-06-14 20:11:44,213: WARNING/MainProcess] Traceback (most recent call last):
[2018-06-14 20:11:44,213: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/eventlet/hubs/poll.py", line 114, in wait
listener.cb(fileno)
[2018-06-14 20:11:44,214: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/celery/worker/pidbox.py", line 120, in loop
connection.drain_events(timeout=1.0)
[2018-06-14 20:11:44,214: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 301, in drain_events
return self.transport.drain_events(self.connection, **kwargs)
[2018-06-14 20:11:44,215: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 103, in drain_events
return connection.drain_events(**kwargs)
[2018-06-14 20:11:44,216: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 491, in drain_events
while not self.blocking_read(timeout):
[2018-06-14 20:11:44,217: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 496, in blocking_read
frame = self.transport.read_frame()
[2018-06-14 20:11:44,217: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 243, in read_frame
frame_header = read(7, True)
[2018-06-14 20:11:44,218: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 426, in _read
raise IOError('Socket closed')
[2018-06-14 20:11:44,218: WARNING/MainProcess] OSError: Socket closed
[2018-06-14 20:11:44,219: WARNING/MainProcess] Removing descriptor: 7"><pre class="notranslate"><code class="notranslate">[2018-06-14 20:11:44,213: WARNING/MainProcess] Traceback (most recent call last):
[2018-06-14 20:11:44,213: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/eventlet/hubs/poll.py", line 114, in wait
listener.cb(fileno)
[2018-06-14 20:11:44,214: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/celery/worker/pidbox.py", line 120, in loop
connection.drain_events(timeout=1.0)
[2018-06-14 20:11:44,214: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 301, in drain_events
return self.transport.drain_events(self.connection, **kwargs)
[2018-06-14 20:11:44,215: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 103, in drain_events
return connection.drain_events(**kwargs)
[2018-06-14 20:11:44,216: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 491, in drain_events
while not self.blocking_read(timeout):
[2018-06-14 20:11:44,217: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 496, in blocking_read
frame = self.transport.read_frame()
[2018-06-14 20:11:44,217: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 243, in read_frame
frame_header = read(7, True)
[2018-06-14 20:11:44,218: WARNING/MainProcess] File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 426, in _read
raise IOError('Socket closed')
[2018-06-14 20:11:44,218: WARNING/MainProcess] OSError: Socket closed
[2018-06-14 20:11:44,219: WARNING/MainProcess] Removing descriptor: 7
</code></pre></div>
<p dir="auto">In addition, the rabbitmq server reports warnings similar to the following (repeated twice):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2018-06-14 20:11:44.209 [warning] <0.586.0> closing AMQP connection <0.586.0> (172.19.0.3:42678 -> 172.19.0.2:5672):
missed heartbeats from client, timeout: 60s"><pre class="notranslate"><code class="notranslate">2018-06-14 20:11:44.209 [warning] <0.586.0> closing AMQP connection <0.586.0> (172.19.0.3:42678 -> 172.19.0.2:5672):
missed heartbeats from client, timeout: 60s
</code></pre></div> | 1 |
<p dir="auto">Atom 0.196.0<br>
Mac OS X 10.10.3</p>
<p dir="auto">"Reveal in tree view" does not always put tree view selection on revealed file. It seems to depend on the previous selection/collapse state of the tree view. Here's an example of a repro:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/80917/7506811/06d06e0c-f41a-11e4-861f-22bfcaa77251.gif"><img src="https://cloud.githubusercontent.com/assets/80917/7506811/06d06e0c-f41a-11e4-861f-22bfcaa77251.gif" alt="treeview" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">Note that if you just collapse the tree and then reveal the file, it works fine, but if you change the selection to the other directory, then collapse the tree, then choosing "reveal in treeview" expands the tree to reveal the correct file, but the selection stays on the root directory.</p> | <h3 dir="auto">Repro steps:</h3>
<ol dir="auto">
<li>Open the <code class="notranslate">image-view</code> repository in safe mode <code class="notranslate">atom --safe</code></li>
<li>Open the <code class="notranslate">spec/fixtures</code> folder</li>
<li>Open <code class="notranslate">binary-file.png</code></li>
<li>Collapse the <code class="notranslate">spec</code> folder</li>
<li>Collapse the root folder (<code class="notranslate">image-view</code>)</li>
<li>Right click on the image and select <code class="notranslate">Reveal in Tree View</code> from the context menu</li>
</ol>
<p dir="auto"><strong>Expected:</strong><br>
<code class="notranslate">binary-file.png</code> to be highlighted because it was revealed</p>
<p dir="auto"><strong>Actual:</strong><br>
The <code class="notranslate">spec</code> folder is expanded but the file is not selected</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1058982/19150598/f7c24948-8bc7-11e6-838e-fba97de42127.gif"><img src="https://cloud.githubusercontent.com/assets/1058982/19150598/f7c24948-8bc7-11e6-838e-fba97de42127.gif" alt="reveal root" data-animated-image="" style="max-width: 100%;"></a></p>
<hr>
<p dir="auto">Repro Steps:</p>
<ol dir="auto">
<li>Open file inside a folder that visible in the tree view</li>
<li>Collapse folder with file</li>
<li>In file, right click and select Reveal in Tree View</li>
</ol>
<p dir="auto">The desired behavior is that the file is highlighted and not the parent folder. The desired behavior happens if the folder is expanded.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1620641/3587219/1f4d0fba-0c37-11e4-9416-89d406ae7046.Gif"><img src="https://cloud.githubusercontent.com/assets/1620641/3587219/1f4d0fba-0c37-11e4-9416-89d406ae7046.Gif" alt="croppercapture 1" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">Windows 7, Atom Version 0.115.0</p> | 1 |
<p dir="auto">I was getting a problem where the only lighting affecting the json model, with its default phong shading, was ambient.</p>
<p dir="auto">I believe the issue was the bump scale array as changing this to a value to not an array ie 1.0 fixed the issue for me...<br>
<code class="notranslate">"mapBumpScale":[10.0,10.0]</code></p>
<p dir="auto">Is this a new feature for bump map materials that we are be able to adjust x and y offset?...and for what version is this compatible with?</p>
<p dir="auto">Json Exporter vers 1.5.0<br>
r77 (npm version)<br>
Blender 2.77<br>
OSX Mac El Capitan 10.11.6</p> | <p dir="auto">When exporting a model from Blender to the threejs json format the materials bumpScale properties are arrays, while threejs expects regular values.</p>
<p dir="auto">Actual export:<br>
<code class="notranslate">"bumpScale":[0.1,0.1]</code>]</p>
<p dir="auto">Expected by threejs:<br>
<code class="notranslate">"bumpScale": 0.1</code></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"> r77</li>
</ul> | 1 |
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: just tried to import it.</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Windows 10 x64</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: binary</li>
<li><strong>TensorFlow version (use command below)</strong>: tried 1.10 down to 1.4, none worked, only cpu versions.</li>
<li><strong>Python version</strong>: 3.7 (also tried with 3.6)</li>
<li><strong>CPU model and memory</strong>: Intel core-i3 6100 - Skylake architecture [Tried on another system with the same OS and even more advanced cpu, still didn't work.]</li>
<li><strong>Exact command to reproduce</strong>: import tensorflow</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">Can't import. I double checked everything. From github and stackoverflow issues to whether or not my cpu supports avx instructions (it does) and even enabled intel virutalization option from boot. <strong>(Please consider these lines before tagging this as a duplicate.)</strong></p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto">Traceback (most recent call last):<br>
File "FlowTest.py", line 15, in <br>
import tensorflow<br>
File "C:\Users\there\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_<em>init</em>_.py", line 22, in <br>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import<br>
File "C:\Users\there\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python_<em>init</em>_.py", line 49, in <br>
from tensorflow.python import pywrap_tensorflow<br>
File "C:\Users\there\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <br>
raise ImportError(msg)<br>
ImportError: Traceback (most recent call last):<br>
File "C:\Users\there\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper<br>
fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(<strong>file</strong>)])<br>
File "C:\Users\there\AppData\Local\Programs\Python\Python37\lib\imp.py", line 297, in find_module<br>
raise ImportError(_ERR_MSG.format(name), name=name)<br>
ImportError: No module named '_pywrap_tensorflow_internal'</p>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "C:\Users\there\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <br>
from tensorflow.python.pywrap_tensorflow_internal import *<br>
File "C:\Users\there\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <br>
_pywrap_tensorflow_internal = swig_import_helper()<br>
File "C:\Users\there\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper<br>
import _pywrap_tensorflow_internal<br>
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'</p>
<p dir="auto">Failed to load the native TensorFlow runtime.</p>
<p dir="auto">See <a href="https://www.tensorflow.org/install/install_sources#common_installation_problems" rel="nofollow">https://www.tensorflow.org/install/install_sources#common_installation_problems</a></p>
<p dir="auto">for some common reasons and solutions. Include the entire stack trace<br>
above this error message when asking for help.</p> | <p dir="auto">I'm sure developers are working hard to catch up with Python 3.7.<br>
Is there any timeline?</p>
<p dir="auto">pip3 install tensorflow - apparently does not work, building from source:</p>
<p dir="auto">OS Platform and Distribution: Mac OS X 10.13.5<br>
Python: Python 3.7.0 (Homebrew)<br>
TensorFlow installed from: source (<a href="https://github.com/tensorflow/tensorflow.git">https://github.com/tensorflow/tensorflow.git</a>)<br>
TensorFlow version: TensorFlow 1.9.0-rc2<br>
Bazel version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Build label: 0.15.0-homebrew
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jun 26 12:42:27 2018 (1530016947)
Build timestamp: 1530016947
Build timestamp as int: 1530016947"><pre class="notranslate"><code class="notranslate">Build label: 0.15.0-homebrew
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jun 26 12:42:27 2018 (1530016947)
Build timestamp: 1530016947
Build timestamp as int: 1530016947
</code></pre></div>
<p dir="auto">CUDA/cuDNN version: None<br>
GPU model and memory: None<br>
Exact command to reproduce:<br>
<code class="notranslate">bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Starting local Bazel server and connecting to it...
...........................
WARNING: /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/BUILD:1992:1: in srcs attribute of cc_library rule @grpc//:grpc_nanopb: please do not import '@grpc//third_party/nanopb:pb_common.c' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'grpc_generate_one_off_targets', the error might have been caused by the macro implementation in /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/bazel/grpc_build_system.bzl:172:12
WARNING: /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/BUILD:1992:1: in srcs attribute of cc_library rule @grpc//:grpc_nanopb: please do not import '@grpc//third_party/nanopb:pb_decode.c' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'grpc_generate_one_off_targets', the error might have been caused by the macro implementation in /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/bazel/grpc_build_system.bzl:172:12
WARNING: /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/BUILD:1992:1: in srcs attribute of cc_library rule @grpc//:grpc_nanopb: please do not import '@grpc//third_party/nanopb:pb_encode.c' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'grpc_generate_one_off_targets', the error might have been caused by the macro implementation in /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/bazel/grpc_build_system.bzl:172:12
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/learn/BUILD:17:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:exporter': No longer supported. Switch to SavedModel immediately.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/learn/BUILD:17:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:gc': No longer supported. Switch to SavedModel immediately.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/timeseries/python/timeseries/BUILD:356:1: in py_library rule //tensorflow/contrib/timeseries/python/timeseries:ar_model: target '//tensorflow/contrib/timeseries/python/timeseries:ar_model' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/timeseries/python/timeseries/state_space_models/BUILD:73:1: in py_library rule //tensorflow/contrib/timeseries/python/timeseries/state_space_models:kalman_filter: target '//tensorflow/contrib/timeseries/python/timeseries/state_space_models:kalman_filter' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/timeseries/python/timeseries/state_space_models/BUILD:230:1: in py_library rule //tensorflow/contrib/timeseries/python/timeseries/state_space_models:filtering_postprocessor: target '//tensorflow/contrib/timeseries/python/timeseries/state_space_models:filtering_postprocessor' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/bayesflow/BUILD:17:1: in py_library rule //tensorflow/contrib/bayesflow:bayesflow_py: target '//tensorflow/contrib/bayesflow:bayesflow_py' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/seq2seq/BUILD:23:1: in py_library rule //tensorflow/contrib/seq2seq:seq2seq_py: target '//tensorflow/contrib/seq2seq:seq2seq_py' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/kfac/python/ops/BUILD:80:1: in py_library rule //tensorflow/contrib/kfac/python/ops:loss_functions: target '//tensorflow/contrib/kfac/python/ops:loss_functions' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/BUILD:14:1: in py_library rule //tensorflow/contrib:contrib_py: target '//tensorflow/contrib:contrib_py' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
INFO: Analysed target //tensorflow/tools/pip_package:build_pip_package (303 packages loaded).
INFO: Found 1 target...
INFO: From Linking external/grpc/libgrpc_base_c.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(endpoint_pair_uv.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(endpoint_pair_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(ev_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(fork_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(gethostname_fallback.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(gethostname_host_name_max.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(iocp_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(iomgr_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(pollset_set_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(pollset_uv.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(pollset_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(resolve_address_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(socket_utils_linux.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(socket_utils_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(socket_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(tcp_client_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(tcp_server_utils_posix_noifaddrs.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(tcp_server_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(tcp_uv.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(tcp_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(timer_uv.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(unix_sockets_posix_noop.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(wakeup_fd_eventfd.o) has no symbols
INFO: From Linking external/grpc/libalts_util.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libalts_util.a(check_gcp_environment_linux.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libalts_util.a(check_gcp_environment_windows.o) has no symbols
INFO: From Linking external/grpc/libtsi.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libtsi.a(ssl_session_openssl.o) has no symbols
INFO: From Linking external/grpc/libgrpc++_base.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc++_base.a(rpc_method.o) has no symbols
INFO: From Linking external/grpc/libgpr_base.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(cpu_iphone.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(cpu_linux.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(cpu_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(env_linux.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(env_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(log_android.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(log_linux.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(log_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(string_util_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(string_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(sync_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(time_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(tls_pthread.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(tmpfile_msys.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(tmpfile_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(wrap_memcpy.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(thd_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(stap_timers.o) has no symbols
INFO: From Linking external/grpc/third_party/address_sorting/libaddress_sorting.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/third_party/address_sorting/libaddress_sorting.a(address_sorting_windows.o) has no symbols
ERROR: /Users/zardoz/Projects/tensorflow/tensorflow/python/BUILD:5315:1: Executing genrule //tensorflow/python:framework/fast_tensor_util.pyx_cython_translation failed (Exit 1)
Traceback (most recent call last):
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/execroot/org_tensorflow/bazel-out/host/bin/external/cython/cython_binary.runfiles/cython/cython.py", line 17, in <module>
main(command_line = 1)
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Main.py", line 720, in main
result = compile(sources, options)
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Main.py", line 695, in compile
return compile_multiple(source, options)
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Main.py", line 666, in compile_multiple
context = options.create_context()
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Main.py", line 590, in create_context
self.cplus, self.language_level, options=self)
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Main.py", line 75, in __init__
from . import Builtin, CythonScope
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/CythonScope.py", line 5, in <module>
from .UtilityCode import CythonUtilityCode
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/UtilityCode.py", line 3, in <module>
from .TreeFragment import parse_from_strings, StringParseContext
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/TreeFragment.py", line 17, in <module>
from .Visitor import VisitorTransform
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Visitor.py", line 15, in <module>
from . import ExprNodes
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/ExprNodes.py", line 2875
await = None
^
SyntaxError: invalid syntax
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 179.318s, Critical Path: 6.38s
INFO: 413 processes: 413 local.
FAILED: Build did NOT complete successfully"><pre class="notranslate"><code class="notranslate">Starting local Bazel server and connecting to it...
...........................
WARNING: /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/BUILD:1992:1: in srcs attribute of cc_library rule @grpc//:grpc_nanopb: please do not import '@grpc//third_party/nanopb:pb_common.c' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'grpc_generate_one_off_targets', the error might have been caused by the macro implementation in /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/bazel/grpc_build_system.bzl:172:12
WARNING: /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/BUILD:1992:1: in srcs attribute of cc_library rule @grpc//:grpc_nanopb: please do not import '@grpc//third_party/nanopb:pb_decode.c' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'grpc_generate_one_off_targets', the error might have been caused by the macro implementation in /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/bazel/grpc_build_system.bzl:172:12
WARNING: /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/BUILD:1992:1: in srcs attribute of cc_library rule @grpc//:grpc_nanopb: please do not import '@grpc//third_party/nanopb:pb_encode.c' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'grpc_generate_one_off_targets', the error might have been caused by the macro implementation in /private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/grpc/bazel/grpc_build_system.bzl:172:12
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/learn/BUILD:17:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:exporter': No longer supported. Switch to SavedModel immediately.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/learn/BUILD:17:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:gc': No longer supported. Switch to SavedModel immediately.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/timeseries/python/timeseries/BUILD:356:1: in py_library rule //tensorflow/contrib/timeseries/python/timeseries:ar_model: target '//tensorflow/contrib/timeseries/python/timeseries:ar_model' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/timeseries/python/timeseries/state_space_models/BUILD:73:1: in py_library rule //tensorflow/contrib/timeseries/python/timeseries/state_space_models:kalman_filter: target '//tensorflow/contrib/timeseries/python/timeseries/state_space_models:kalman_filter' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/timeseries/python/timeseries/state_space_models/BUILD:230:1: in py_library rule //tensorflow/contrib/timeseries/python/timeseries/state_space_models:filtering_postprocessor: target '//tensorflow/contrib/timeseries/python/timeseries/state_space_models:filtering_postprocessor' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/bayesflow/BUILD:17:1: in py_library rule //tensorflow/contrib/bayesflow:bayesflow_py: target '//tensorflow/contrib/bayesflow:bayesflow_py' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/seq2seq/BUILD:23:1: in py_library rule //tensorflow/contrib/seq2seq:seq2seq_py: target '//tensorflow/contrib/seq2seq:seq2seq_py' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/kfac/python/ops/BUILD:80:1: in py_library rule //tensorflow/contrib/kfac/python/ops:loss_functions: target '//tensorflow/contrib/kfac/python/ops:loss_functions' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /Users/zardoz/Projects/tensorflow/tensorflow/contrib/BUILD:14:1: in py_library rule //tensorflow/contrib:contrib_py: target '//tensorflow/contrib:contrib_py' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
INFO: Analysed target //tensorflow/tools/pip_package:build_pip_package (303 packages loaded).
INFO: Found 1 target...
INFO: From Linking external/grpc/libgrpc_base_c.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(endpoint_pair_uv.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(endpoint_pair_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(ev_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(fork_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(gethostname_fallback.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(gethostname_host_name_max.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(iocp_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(iomgr_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(pollset_set_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(pollset_uv.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(pollset_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(resolve_address_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(socket_utils_linux.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(socket_utils_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(socket_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(tcp_client_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(tcp_server_utils_posix_noifaddrs.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(tcp_server_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(tcp_uv.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(tcp_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(timer_uv.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(unix_sockets_posix_noop.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc_base_c.a(wakeup_fd_eventfd.o) has no symbols
INFO: From Linking external/grpc/libalts_util.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libalts_util.a(check_gcp_environment_linux.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libalts_util.a(check_gcp_environment_windows.o) has no symbols
INFO: From Linking external/grpc/libtsi.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libtsi.a(ssl_session_openssl.o) has no symbols
INFO: From Linking external/grpc/libgrpc++_base.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgrpc++_base.a(rpc_method.o) has no symbols
INFO: From Linking external/grpc/libgpr_base.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(cpu_iphone.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(cpu_linux.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(cpu_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(env_linux.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(env_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(log_android.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(log_linux.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(log_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(string_util_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(string_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(sync_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(time_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(tls_pthread.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(tmpfile_msys.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(tmpfile_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(wrap_memcpy.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(thd_windows.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/libgpr_base.a(stap_timers.o) has no symbols
INFO: From Linking external/grpc/third_party/address_sorting/libaddress_sorting.a [for host]:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bazel-out/host/bin/external/grpc/third_party/address_sorting/libaddress_sorting.a(address_sorting_windows.o) has no symbols
ERROR: /Users/zardoz/Projects/tensorflow/tensorflow/python/BUILD:5315:1: Executing genrule //tensorflow/python:framework/fast_tensor_util.pyx_cython_translation failed (Exit 1)
Traceback (most recent call last):
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/execroot/org_tensorflow/bazel-out/host/bin/external/cython/cython_binary.runfiles/cython/cython.py", line 17, in <module>
main(command_line = 1)
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Main.py", line 720, in main
result = compile(sources, options)
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Main.py", line 695, in compile
return compile_multiple(source, options)
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Main.py", line 666, in compile_multiple
context = options.create_context()
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Main.py", line 590, in create_context
self.cplus, self.language_level, options=self)
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Main.py", line 75, in __init__
from . import Builtin, CythonScope
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/CythonScope.py", line 5, in <module>
from .UtilityCode import CythonUtilityCode
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/UtilityCode.py", line 3, in <module>
from .TreeFragment import parse_from_strings, StringParseContext
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/TreeFragment.py", line 17, in <module>
from .Visitor import VisitorTransform
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/Visitor.py", line 15, in <module>
from . import ExprNodes
File "/private/var/tmp/_bazel_zardoz/5e080a8a46c0e2b2146c013eb1079337/external/cython/Cython/Compiler/ExprNodes.py", line 2875
await = None
^
SyntaxError: invalid syntax
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 179.318s, Critical Path: 6.38s
INFO: 413 processes: 413 local.
FAILED: Build did NOT complete successfully
</code></pre></div> | 1 |
<p dir="auto">First of all, let me say sorry for the fact that this issue will most probably not comply with the issue reporting guidelines. This is due to the fact that I am not a developer using electron but just a user using electron apps, in particular Franz (<a href="http://meetfranz.com" rel="nofollow">http://meetfranz.com</a>) and Skype (the new electron version of it). Since the issue I want to report appeared in both apps, I assume that it is an issue of electron itself, but if I am wrong here, let me know.</p>
<p dir="auto">The issue is of rather cosmetic nature: The text color in the menu bar seems to be hard coded to white when not hovered and black when hovered. This leads to the problem that in dark themes the text becomes hard to read when hovered and on light themes when not hovered. Here are some screenshots demonstrating the issue in Skype:</p>
<p dir="auto">Light theme, not hovered: <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1191480/26819946/5afdde44-4aa1-11e7-97ae-0d6f34cd9567.png"><img src="https://cloud.githubusercontent.com/assets/1191480/26819946/5afdde44-4aa1-11e7-97ae-0d6f34cd9567.png" alt="auswahl_054" style="max-width: 100%;"></a><br>
Light theme, hovered: <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1191480/26819944/5af10cf0-4aa1-11e7-8f73-4ef3a30d232e.png"><img src="https://cloud.githubusercontent.com/assets/1191480/26819944/5af10cf0-4aa1-11e7-8f73-4ef3a30d232e.png" alt="auswahl_053" style="max-width: 100%;"></a><br>
Dark theme, not hovered: <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1191480/26819943/5aeda5d8-4aa1-11e7-9b7a-62664926b7c0.png"><img src="https://cloud.githubusercontent.com/assets/1191480/26819943/5aeda5d8-4aa1-11e7-9b7a-62664926b7c0.png" alt="auswahl_051" style="max-width: 100%;"></a><br>
Dark theme, hovered: <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1191480/26819945/5afb6312-4aa1-11e7-9997-e70b0f0a1661.png"><img src="https://cloud.githubusercontent.com/assets/1191480/26819945/5afb6312-4aa1-11e7-9997-e70b0f0a1661.png" alt="auswahl_052" style="max-width: 100%;"></a></p>
<ul dir="auto">
<li>Electron version: Unknown, I'm using binary packages of Franz and Skype.</li>
<li>Operating system: Manjaro Linux</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">The text color in the menu bar should follow the theme settings like in native (GTK) applications</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">The text color is hard to read if hovered on dark themes or not hovered on light themes</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Use Skype or Franz on Linux with light or dark GTK themes.</p> | <p dir="auto">Google recently added a "use_gtk3" build flag to Chormium - export GYP_DEFINES="$GYP_DEFINES use_gtk3=1".</p>
<p dir="auto">I think most end-users on GTK3 desktops would prefer to use modern widgets. It might be too early to add it as a default, but eventually it be nice.</p>
<p dir="auto">Video of Chromium 47 w gtk3:<br>
<a href="https://www.youtube.com/watch?v=TJidbdaHCYc" rel="nofollow">https://www.youtube.com/watch?v=TJidbdaHCYc</a></p>
<p dir="auto">This somewhat relates to an old issue I opened up:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="47451488" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/765" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/765/hovercard" href="https://github.com/electron/electron/issues/765">#765</a></p> | 1 |
<p dir="auto">I didn't find the Deno in the docker hub.<br>
Is there an official container ?</p> | <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hayd/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hayd">@hayd</a> started a while <a href="https://github.com/hayd/deno-docker">https://github.com/hayd/deno-docker</a></p>
<p dir="auto">This can be ported to be integrated as the Official Deno docker image. So 3 steps are needed:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Integrate generation of docker image in the CI</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Test the generated docker image</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Publish image on the docker hub / github hub on release</li>
</ul>
<p dir="auto">Also do we plan to release on docker hub only or we push it to github registry also? It's just a matter of URL in the command in the CI but <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ry/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ry">@ry</a> and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/piscisaureus/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/piscisaureus">@piscisaureus</a> have to create / set credentials in the project.</p> | 1 |
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">my nextjs version is 9.1.7-canary.14,but it's still not work when I downgrade to 9.0.0<br>
here the code is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Router from 'next/router';
...
handleClick = (index) => {
Router.push('/user');
};
...
<div onClick={this.handleClick}>click</div>"><pre class="notranslate"><code class="notranslate">import Router from 'next/router';
...
handleClick = (index) => {
Router.push('/user');
};
...
<div onClick={this.handleClick}>click</div>
</code></pre></div>
<p dir="auto">I've tried :<br>
import {withRouter} from'next/router'<br>
import Link from'next/link'<br>
and all above don't work on ios10.x.x</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p>
<ol dir="auto">
<li>create-<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-app">next-app</a> <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-demo">next-demo</a></li>
<li>cd <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-demo">next-demo</a> and create a new test page file in pages folder 'test.js',and then type some code in this file</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import React from 'react'
const Test = (props) => (
<div>
test
</div>
)
export default Test "><pre class="notranslate"><code class="notranslate">import React from 'react'
const Test = (props) => (
<div>
test
</div>
)
export default Test
</code></pre></div>
<ol start="3" dir="auto">
<li>and add router to home page:<br>
import {useRouter}from 'next/router'<br>
const router=useRouter()<br>
the whole test content in home.js is:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import React from 'react'
import {useRouter}from 'next/router'
const Home = () => {
const router=useRouter()
const handleClick=()=>{
console.log('click')
router.push('/test')}
return (
<div>
<h1 className="title" onClick={handleClick}>welcome to Next!</h1>
</div>
)}
export default Home"><pre class="notranslate"><code class="notranslate">import React from 'react'
import {useRouter}from 'next/router'
const Home = () => {
const router=useRouter()
const handleClick=()=>{
console.log('click')
router.push('/test')}
return (
<div>
<h1 className="title" onClick={handleClick}>welcome to Next!</h1>
</div>
)}
export default Home
</code></pre></div>
<ol start="4" dir="auto">
<li></li>
</ol>
<p dir="auto">start developing,run yarn dev,you will find that all above works well ,you click the h1 tag and page changed, but this will not work on ios 10.x.x</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">next/router support ios10.x.x</p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto">If applicable, add screenshots to help explain your problem.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/36290410/71758467-fb2d0000-2eda-11ea-948e-6e82ae03e795.png"><img src="https://user-images.githubusercontent.com/36290410/71758467-fb2d0000-2eda-11ea-948e-6e82ae03e795.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS:ios10.0.1 and ios10.2 and ios10.3 are tested,not work</li>
<li>Browser (if applies) [e.g. chrome, safari]</li>
<li>Version of Next.js:9.1.7 &9.0.0 &9.1.7-canary.14</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Add any other context about the problem here.</p> | <ul dir="auto">
<li>[x ] 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"><code class="notranslate">yarn build</code> should build app.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Failing with</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="yarn build v0.27.5
$ next build
> Using external babel configuration
> location: "/Users/steida/dev/este/.babelrc"
> Using "webpack" config function defined in next.config.js.
(node:45475) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'indexOf' of null
(node:45475) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code."><pre class="notranslate">yarn build v0.27.5
$ next build
<span class="pl-k">></span> Using external babel configuration
<span class="pl-k">></span> location: <span class="pl-s"><span class="pl-pds">"</span>/Users/steida/dev/este/.babelrc<span class="pl-pds">"</span></span>
<span class="pl-k">></span> Using <span class="pl-s"><span class="pl-pds">"</span>webpack<span class="pl-pds">"</span></span> config <span class="pl-k">function</span> <span class="pl-en">defined</span> <span class="pl-k">in</span> next.config.js.
(node:45475) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot <span class="pl-c1">read</span> property <span class="pl-s"><span class="pl-pds">'</span>indexOf<span class="pl-pds">'</span></span> of null
(node:45475) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero <span class="pl-c1">exit</span> code.</pre></div>
<p dir="auto">3.0.1-beta.14 works.</p> | 0 |
<p dir="auto">I found what looks like a bug/oversight.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="jjulia> d = Dict(i=>rand() for i in 1:3)
Dict{Int64, Float64} with 3 entries:
2 => 0.192129
3 => 0.340718
1 => 0.154868
julia> v = [d,d]
2-element Vector{Dict{Int64, Float64}}:
Dict(2 => 0.19212863767897548, 3 => 0.34071840174647483, 1 => 0.15486801172387077)
Dict(2 => 0.19212863767897548, 3 => 0.34071840174647483, 1 => 0.15486801172387077)
julia> union(keys.(v)...)
Set{Int64} with 3 elements:
2
3
1
julia> union(keys.(v[1:1])...)
ERROR: MethodError: no method matching copy(::Base.KeySet{Int64, Dict{Int64, Float64}})
Closest candidates are:
copy(::Union{SubArray{T, N, var"#s5", I, L} where {var"#s5"<:(PooledArrays.PooledArray{T, R, N, RA} where {N, RA}), I, L}, PooledArrays.PooledArray{T, R, N, RA} where RA} where {T, N, R}) at /home/joe/.julia/packages/PooledArrays/CV8kA/src/PooledArrays.jl:212
copy(::SubArray{var"#s832", var"#s831", var"#s830", I, L} where {var"#s832", var"#s831", var"#s830"<:Union{SparseArrays.AbstractSparseMatrixCSC, SparseArrays.SparseVector}, I, L}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/SparseArrays/src/sparsevector.jl:720
copy(::SubArray) at subarray.jl:70
...
Stacktrace:
[1] union(s::Base.KeySet{Int64, Dict{Int64, Float64}})
@ Base ./abstractset.jl:49
[2] top-level scope
@ REPL[30]:1"><pre class="notranslate">jjulia<span class="pl-k">></span> d <span class="pl-k">=</span> <span class="pl-c1">Dict</span>(i<span class="pl-k">=></span><span class="pl-c1">rand</span>() <span class="pl-k">for</span> i <span class="pl-k">in</span> <span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">3</span>)
Dict{Int64, Float64} with <span class="pl-c1">3</span> entries<span class="pl-k">:</span>
<span class="pl-c1">2</span> <span class="pl-k">=></span> <span class="pl-c1">0.192129</span>
<span class="pl-c1">3</span> <span class="pl-k">=></span> <span class="pl-c1">0.340718</span>
<span class="pl-c1">1</span> <span class="pl-k">=></span> <span class="pl-c1">0.154868</span>
julia<span class="pl-k">></span> v <span class="pl-k">=</span> [d,d]
<span class="pl-c1">2</span><span class="pl-k">-</span>element Vector{Dict{Int64, Float64}}<span class="pl-k">:</span>
<span class="pl-c1">Dict</span>(<span class="pl-c1">2</span> <span class="pl-k">=></span> <span class="pl-c1">0.19212863767897548</span>, <span class="pl-c1">3</span> <span class="pl-k">=></span> <span class="pl-c1">0.34071840174647483</span>, <span class="pl-c1">1</span> <span class="pl-k">=></span> <span class="pl-c1">0.15486801172387077</span>)
<span class="pl-c1">Dict</span>(<span class="pl-c1">2</span> <span class="pl-k">=></span> <span class="pl-c1">0.19212863767897548</span>, <span class="pl-c1">3</span> <span class="pl-k">=></span> <span class="pl-c1">0.34071840174647483</span>, <span class="pl-c1">1</span> <span class="pl-k">=></span> <span class="pl-c1">0.15486801172387077</span>)
julia<span class="pl-k">></span> <span class="pl-c1">union</span>(<span class="pl-c1">keys</span>.(v)<span class="pl-k">...</span>)
Set{Int64} with <span class="pl-c1">3</span> elements<span class="pl-k">:</span>
<span class="pl-c1">2</span>
<span class="pl-c1">3</span>
<span class="pl-c1">1</span>
julia<span class="pl-k">></span> <span class="pl-c1">union</span>(<span class="pl-c1">keys</span>.(v[<span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">1</span>])<span class="pl-k">...</span>)
ERROR<span class="pl-k">:</span> MethodError<span class="pl-k">:</span> no method matching <span class="pl-c1">copy</span>(<span class="pl-k">::</span><span class="pl-c1">Base.KeySet{Int64, Dict{Int64, Float64}}</span>)
Closest candidates are<span class="pl-k">:</span>
<span class="pl-c1">copy</span>(<span class="pl-k">::</span><span class="pl-c1">Union{SubArray{T, N, var"#s5", I, L} where {var"#s5"<:(PooledArrays.PooledArray{T, R, N, RA} where {N, RA}), I, L}, PooledArrays.PooledArray{T, R, N, RA} where RA}</span> <span class="pl-k">where</span> {T, N, R}) at <span class="pl-k">/</span>home<span class="pl-k">/</span>joe<span class="pl-k">/</span><span class="pl-k">.</span>julia<span class="pl-k">/</span>packages<span class="pl-k">/</span>PooledArrays<span class="pl-k">/</span>CV8kA<span class="pl-k">/</span>src<span class="pl-k">/</span>PooledArrays<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">212</span>
<span class="pl-c1">copy</span>(<span class="pl-k">::</span><span class="pl-c1">SubArray{var"#s832", var"#s831", var"#s830", I, L}</span> <span class="pl-k">where</span> {<span class="pl-c1">var"#s832"</span>, <span class="pl-c1">var"#s831"</span>, <span class="pl-c1">var"#s830"</span><span class="pl-k"><:</span><span class="pl-c1">Union{SparseArrays.AbstractSparseMatrixCSC, SparseArrays.SparseVector}</span>, I, L}) at <span class="pl-k">/</span>buildworker<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_linux64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>SparseArrays<span class="pl-k">/</span>src<span class="pl-k">/</span>sparsevector<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">720</span>
<span class="pl-c1">copy</span>(<span class="pl-k">::</span><span class="pl-c1">SubArray</span>) at subarray<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">70</span>
<span class="pl-k">...</span>
Stacktrace<span class="pl-k">:</span>
[<span class="pl-c1">1</span>] <span class="pl-c1">union</span>(s<span class="pl-k">::</span><span class="pl-c1">Base.KeySet{Int64, Dict{Int64, Float64}}</span>)
@ Base <span class="pl-k">./</span>abstractset<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">49</span>
[<span class="pl-c1">2</span>] top<span class="pl-k">-</span>level scope
@ REPL[<span class="pl-c1">30</span>]<span class="pl-k">:</span><span class="pl-c1">1</span></pre></div>
<p dir="auto">When I use <code class="notranslate">union(Set.(keys.(v[1:1))...)</code> it works as expected.</p> | <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> d = Dict(1=>2)
Dict{Int64,Int64} with 1 entry:
1 => 2
julia> union(keys(d))
ERROR: MethodError: no method matching copy(::Base.KeySet{Int64,Dict{Int64,Int64}})
julia> union(keys(d), keys(d))
Set([1])"><pre class="notranslate">julia<span class="pl-k">></span> d <span class="pl-k">=</span> <span class="pl-c1">Dict</span>(<span class="pl-c1">1</span><span class="pl-k">=></span><span class="pl-c1">2</span>)
Dict{Int64,Int64} with <span class="pl-c1">1</span> entry<span class="pl-k">:</span>
<span class="pl-c1">1</span> <span class="pl-k">=></span> <span class="pl-c1">2</span>
julia<span class="pl-k">></span> <span class="pl-c1">union</span>(<span class="pl-c1">keys</span>(d))
ERROR<span class="pl-k">:</span> MethodError<span class="pl-k">:</span> no method matching <span class="pl-c1">copy</span>(<span class="pl-k">::</span><span class="pl-c1">Base.KeySet{Int64,Dict{Int64,Int64}}</span>)
julia<span class="pl-k">></span> <span class="pl-c1">union</span>(<span class="pl-c1">keys</span>(d), <span class="pl-c1">keys</span>(d))
<span class="pl-c1">Set</span>([<span class="pl-c1">1</span>])</pre></div> | 1 |
<p dir="auto"><strong>Glide Version</strong>: 4.0.0-RC0</p>
<p dir="auto"><strong>Integration libraries</strong>: okhttp-integration:4.0.0-RC0</p>
<p dir="auto"><strong>Device/Android Version</strong>: Galaxy S6 SDK version 25</p>
<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:<br>
When using an annotation processor, generated class GlideRequests contains duplicate field:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Override
public <ResourceType> GlideRequest<ResourceType> as(Class<ResourceType> resourceClass) {
return new GlideRequest<>(glide, this, resourceClass);
}
@Override
public <ResourceType> GlideRequest<ResourceType> as(Class<ResourceType> resourceClass) {
return (GlideRequest<ResourceType>) super.as(resourceClass);
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">public</span> <<span class="pl-smi">ResourceType</span>> <span class="pl-s1">GlideRequest</span><<span class="pl-s1">ResourceType</span>> <span class="pl-s1">as</span>(<span class="pl-smi">Class</span><<span class="pl-smi">ResourceType</span>> <span class="pl-s1">resourceClass</span>) {
<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">GlideRequest</span><>(<span class="pl-s1">glide</span>, <span class="pl-smi">this</span>, <span class="pl-s1">resourceClass</span>);
}
<span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">public</span> <<span class="pl-smi">ResourceType</span>> <span class="pl-s1">GlideRequest</span><<span class="pl-s1">ResourceType</span>> <span class="pl-s1">as</span>(<span class="pl-smi">Class</span><<span class="pl-smi">ResourceType</span>> <span class="pl-s1">resourceClass</span>) {
<span class="pl-k">return</span> (<span class="pl-smi">GlideRequest</span><<span class="pl-smi">ResourceType</span>>) <span class="pl-en">super</span>.<span class="pl-en">as</span>(<span class="pl-s1">resourceClass</span>);
}</pre></div>
<p dir="auto">My module:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@GlideModule
public class GlideAppModule extends AppGlideModule {
@Override
public void applyOptions(Context context, GlideBuilder builder) {
builder.setDiskCache(new InternalCacheDiskCacheFactory(context, 20 * 1024 * 1024));
}
@Override
public boolean isManifestParsingEnabled() {
return false;
}
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">GlideModule</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">GlideAppModule</span> <span class="pl-k">extends</span> <span class="pl-smi">AppGlideModule</span> {
<span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">applyOptions</span>(<span class="pl-smi">Context</span> <span class="pl-s1">context</span>, <span class="pl-smi">GlideBuilder</span> <span class="pl-s1">builder</span>) {
<span class="pl-s1">builder</span>.<span class="pl-en">setDiskCache</span>(<span class="pl-k">new</span> <span class="pl-smi">InternalCacheDiskCacheFactory</span>(<span class="pl-s1">context</span>, <span class="pl-c1">20</span> * <span class="pl-c1">1024</span> * <span class="pl-c1">1024</span>));
}
<span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">public</span> <span class="pl-smi">boolean</span> <span class="pl-en">isManifestParsingEnabled</span>() {
<span class="pl-k">return</span> <span class="pl-c1">false</span>;
}
}</pre></div>
<p dir="auto">Extension:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@GlideExtension
public final class GlideAppExtension {
private GlideAppExtension() {}
@GlideOption
private static void cropCircle(RequestOptions options) {
// TODO
}
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">GlideExtension</span>
<span class="pl-k">public</span> <span class="pl-k">final</span> <span class="pl-k">class</span> <span class="pl-smi">GlideAppExtension</span> {
<span class="pl-k">private</span> <span class="pl-smi">GlideAppExtension</span>() {}
<span class="pl-c1">@</span><span class="pl-c1">GlideOption</span>
<span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">cropCircle</span>(<span class="pl-smi">RequestOptions</span> <span class="pl-s1">options</span>) {
<span class="pl-c">// TODO</span>
}
}</pre></div>
<p dir="auto">Should i use in build.gradle:<br>
<code class="notranslate">annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'</code><br>
or<br>
<code class="notranslate">compile 'com.github.bumptech.glide:compiler:4.0.0-RC0</code></p>
<p dir="auto">I've tried both, and tried SNAPSHOT version<br>
Also in the documentation example the first argument is RequestOptions<?>, but the class from the sources is not generic?</p>
<p dir="auto">Also in the code bellow, error drawable is not used when the url is null, and docs state: "null models will cause the error drawable to be displayed", this is working in the latest 3.x version.</p>
<p dir="auto"><strong>Glide load line / <code class="notranslate">GlideModule</code> (if any) / list Adapter code (if any)</strong>:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="GlideApp.with(this).load(contractImage) // contractImage is null
.transform(new CropCircleTransformation())
.error(errorDrawable)
.into(imageView);"><pre class="notranslate"><span class="pl-smi">GlideApp</span>.<span class="pl-en">with</span>(<span class="pl-smi">this</span>).<span class="pl-en">load</span>(<span class="pl-s1">contractImage</span>) <span class="pl-c">// contractImage is null</span>
.<span class="pl-en">transform</span>(<span class="pl-k">new</span> <span class="pl-smi">CropCircleTransformation</span>())
.<span class="pl-en">error</span>(<span class="pl-s1">errorDrawable</span>)
.<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div> | <p dir="auto">We just started using Glide and I've been comparing the default RESULT disk cache strategy vs. SOURCE and I'm noticing that SOURCE is noticeably faster to render a newly net-retrieved image to the screen.</p>
<p dir="auto">I'm playing with two second-gen Nexus 7's with Lollipop side-by-side with images ~200K, 700x700 average. I made the most minimal example I can and have ~100 images in a vanilla RecyclerView with a LinearLayoutManager where 4-5 images will be visible on screen at a time. If I start up both configurations from scratch and scroll to the very bottom of the view the SOURCE config finishes showing the images in less than a second whereas the RESULT config finishes showing them in 2-4 seconds. This is consistent with regular scrolling where images come down one at a time: SOURCE is always faster than RESULT.</p>
<p dir="auto">Without diving in too deep into the code myself I'm suspecting that RESULT resizes the image before it shows it on screen. I'd imagine you could make it as fast as SOURCE if on the first/network retrieval you immediately show the full image in the view like SOURCE but on a background thread continue resizing the image and store it in the disk cache resized so on the second request it shows up resized.</p>
<p dir="auto">And now that I've actually typed all that out I can see how that might be unexpected for someone not using something like fitCenter() where the difference between SOURCE and RESULT looks almost the same on screen...hmmm.</p>
<p dir="auto">Does this use case sound interesting to you, though? I assume there're probably extension points where I could create the behavior I want using custom targets or something but I do really like how Glide handles all the view/adapter/recycling stuff behind the curtains for me.</p>
<p dir="auto">Any suggestions for how to accomplish this with existing apis or if this is a valid enhancement request?</p>
<p dir="auto">Thanks much!</p>
<p dir="auto">Details:</p>
<p dir="auto"><strong>RecyclerView.Adapter</strong></p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Override
public void onBindViewHolder(ViewHolder holder, int position) {
Glide.with(holder.itemView.getContext())
.load(thumbnails[position])
.fitCenter()
.crossFade()
// .diskCacheStrategy(DiskCacheStrategy.SOURCE)
.into(holder.image);
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-s1">onBindViewHolder</span>(<span class="pl-smi">ViewHolder</span> <span class="pl-s1">holder</span>, <span class="pl-smi">int</span> <span class="pl-s1">position</span>) {
<span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">holder</span>.<span class="pl-s1">itemView</span>.<span class="pl-en">getContext</span>())
.<span class="pl-en">load</span>(<span class="pl-s1">thumbnails</span>[<span class="pl-s1">position</span>])
.<span class="pl-en">fitCenter</span>()
.<span class="pl-en">crossFade</span>()
<span class="pl-c">// .diskCacheStrategy(DiskCacheStrategy.SOURCE)</span>
.<span class="pl-en">into</span>(<span class="pl-s1">holder</span>.<span class="pl-s1">image</span>);
}</pre></div>
<p dir="auto"><strong>View Layout</strong></p>
<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"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="200dp"
android:scaleType="centerCrop"
android:background="#444444"
android:layout_marginBottom="10dp" />
"><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">ImageView</span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">android</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/apk/res/android<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>200dp<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">scaleType</span>=<span class="pl-s"><span class="pl-pds">"</span>centerCrop<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">background</span>=<span class="pl-s"><span class="pl-pds">"</span>#444444<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_marginBottom</span>=<span class="pl-s"><span class="pl-pds">"</span>10dp<span class="pl-pds">"</span></span> />
</pre></div> | 0 |
<p dir="auto">report error:</p>
<p dir="auto">Error:Failed to resolve: annotationProcessor<br>
Error:Failed to resolve: com.android.support:support-annotations:26.0.2</p>
<p dir="auto">on<br>
compileSdkVersion 25<br>
buildToolsVersion '25.0.3'</p>
<p dir="auto">compile 'com.github.bumptech.glide:glide:4.1.1'<br>
compile 'com.github.bumptech.glide:okhttp3-integration:4.1.1@aar'<br>
annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1'</p> | <p dir="auto">After adding the latest gradle 4.1.1:</p>
<p dir="auto">compile 'com.github.bumptech.glide:glide:4.1.1'<br>
compile 'com.android.support:support-v4:25.3.1'<br>
annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1'</p>
<p dir="auto">It says failed to resolve annotationProcessor. I need to revert to 4.0.0 release to make this work</p> | 1 |
<p dir="auto">I'm not sure if this is a bug, or I'm missing something.</p>
<p dir="auto">I am compiling my TypeScript to ES6 and then using the babel preprocessor to run my tests in Karma. The class is as follows</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { BaseModel, notEmpty } from '../main';
export class TestModel extends BaseModel {
@notEmpty('Test property can not be empty')
public testProperty: string;
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">BaseModel</span><span class="pl-kos">,</span> <span class="pl-s1">notEmpty</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'../main'</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">TestModel</span> <span class="pl-k">extends</span> <span class="pl-smi">BaseModel</span> <span class="pl-kos">{</span>
@<span class="pl-en">notEmpty</span><span class="pl-kos">(</span><span class="pl-s">'Test property can not be empty'</span><span class="pl-kos">)</span>
<span class="pl-k">public</span> <span class="pl-c1">testProperty</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">The above class compiles to</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if (typeof __decorate !== "function") __decorate = function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
}
};
import { BaseModel, notEmpty } from '../main';
export class TestModel extends BaseModel {
}
__decorate([
notEmpty('Test property can not be empty')
], TestModel.prototype, "testProperty");
"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">__decorate</span> <span class="pl-c1">!==</span> <span class="pl-s">"function"</span><span class="pl-kos">)</span> <span class="pl-en">__decorate</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">decorators</span><span class="pl-kos">,</span> <span class="pl-s1">target</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">desc</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-k">typeof</span> <span class="pl-v">Reflect</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-v">Reflect</span><span class="pl-kos">.</span><span class="pl-c1">decorate</span> <span class="pl-c1">===</span> <span class="pl-s">"function"</span><span class="pl-kos">)</span> <span class="pl-k">return</span> <span class="pl-v">Reflect</span><span class="pl-kos">.</span><span class="pl-en">decorate</span><span class="pl-kos">(</span><span class="pl-s1">decorators</span><span class="pl-kos">,</span> <span class="pl-s1">target</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">desc</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-smi">arguments</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">2</span>: <span class="pl-k">return</span> <span class="pl-s1">decorators</span><span class="pl-kos">.</span><span class="pl-en">reduceRight</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">o</span><span class="pl-kos">,</span> <span class="pl-s1">d</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">(</span><span class="pl-s1">d</span> <span class="pl-c1">&&</span> <span class="pl-s1">d</span><span class="pl-kos">(</span><span class="pl-s1">o</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-s1">o</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">target</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">case</span> <span class="pl-c1">3</span>: <span class="pl-k">return</span> <span class="pl-s1">decorators</span><span class="pl-kos">.</span><span class="pl-en">reduceRight</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">o</span><span class="pl-kos">,</span> <span class="pl-s1">d</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">(</span><span class="pl-s1">d</span> <span class="pl-c1">&&</span> <span class="pl-s1">d</span><span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">void</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-k">void</span> <span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">case</span> <span class="pl-c1">4</span>: <span class="pl-k">return</span> <span class="pl-s1">decorators</span><span class="pl-kos">.</span><span class="pl-en">reduceRight</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">o</span><span class="pl-kos">,</span> <span class="pl-s1">d</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">(</span><span class="pl-s1">d</span> <span class="pl-c1">&&</span> <span class="pl-s1">d</span><span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">o</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-s1">o</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">desc</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">import</span> <span class="pl-kos">{</span> <span class="pl-v">BaseModel</span><span class="pl-kos">,</span> <span class="pl-s1">notEmpty</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'../main'</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">TestModel</span> <span class="pl-k">extends</span> <span class="pl-v">BaseModel</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>
<span class="pl-en">__decorate</span><span class="pl-kos">(</span><span class="pl-kos">[</span>
<span class="pl-en">notEmpty</span><span class="pl-kos">(</span><span class="pl-s">'Test property can not be empty'</span><span class="pl-kos">)</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-v">TestModel</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span> <span class="pl-s">"testProperty"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">This compiled code doesn't run. Unfortunately I don't get a helpful error either so I'm not exactly sure the problem. However if I mess with the compiled JavaScript a bit</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// changing the first line from ...
if (typeof __decorate !== "function") __decorate = function (decorators, target, key, desc) {
// code here
}
// to this
if (typeof __decorate !== "function") window.__decorate = function (decorators, target, key, desc) {
// code here
}
// or to this, which would work in both browser and server environments
if (typeof __decorate !== "function") var __decorate = function (decorators, target, key, desc) {
// code here
}"><pre class="notranslate"><span class="pl-c">// changing the first line from ...</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">__decorate</span> <span class="pl-c1">!==</span> <span class="pl-s">"function"</span><span class="pl-kos">)</span> <span class="pl-en">__decorate</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">decorators</span><span class="pl-kos">,</span> <span class="pl-s1">target</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">desc</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// code here</span>
<span class="pl-kos">}</span>
<span class="pl-c">// to this</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">__decorate</span> <span class="pl-c1">!==</span> <span class="pl-s">"function"</span><span class="pl-kos">)</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-en">__decorate</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">decorators</span><span class="pl-kos">,</span> <span class="pl-s1">target</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">desc</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// code here</span>
<span class="pl-kos">}</span>
<span class="pl-c">// or to this, which would work in both browser and server environments</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">__decorate</span> <span class="pl-c1">!==</span> <span class="pl-s">"function"</span><span class="pl-kos">)</span> <span class="pl-k">var</span> <span class="pl-en">__decorate</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">decorators</span><span class="pl-kos">,</span> <span class="pl-s1">target</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">desc</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// code here</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">with either of those changes everything seems to work fine. Like I said though, I'm not sure if its a bug or I'm missing some small thing.</p> | <p dir="auto">I believe it's expected that <code class="notranslate">tsc -t es6</code> should be externally transpilable to ES5 (eg with Babel)</p>
<p dir="auto">See <a href="https://gist.github.com/alexeagle/24243fbb87dbd8bad6f1">https://gist.github.com/alexeagle/24243fbb87dbd8bad6f1</a></p>
<p dir="auto">Babel replaces the __decorate line <code class="notranslate">this.__decorate</code> with <code class="notranslate">undefined.__decorate</code> so that gives a runtime error. <code class="notranslate">Uncaught TypeError: Cannot read property '__decorate' of undefined app_bin.js:7</code></p>
<p dir="auto">Note I also tried this with Closure Compiler ES6->ES5, and had a different problem because of this line in the emit:<br>
<code class="notranslate">Object.defineProperty(App, "name", { value: "App", configurable: true });</code><br>
in ES6 spec, new objects are configurable:true by default, but in mainline Chrome it is configurable:false by default so this is also a runtime error. For this case, it leads me to wonder if ES5->ES6 transpilers should be expected to translate API incompatibilities in addition to new ES6 syntax.</p> | 1 |
<p dir="auto">Tested on a real Pixel XL Android 9 (API 28)<br>
image_picker version: 0.4.10</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.IllegalArgumentException: Unknown URI: content://downloads/public_downloads/15"><pre class="notranslate"><code class="notranslate">java.lang.IllegalArgumentException: Unknown URI: content://downloads/public_downloads/15
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="D/AndroidRuntime(13697): Shutting down VM
E/AndroidRuntime(13697): FATAL EXCEPTION: main
E/AndroidRuntime(13697): Process: com.example.test, PID: 13697
E/AndroidRuntime(13697): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2342, result=-1, data=Intent { dat=content://com.android.providers.downloads.documents/document/15 flg=0x1 }} to activity {com.example.test/com.example.test.MainActivity}: java.lang.IllegalArgumentException: Unknown URI: content://downloads/public_downloads/15
E/AndroidRuntime(13697): at android.app.ActivityThread.deliverResults(ActivityThread.java:4360)
E/AndroidRuntime(13697): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4402)
E/AndroidRuntime(13697): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
E/AndroidRuntime(13697): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
E/AndroidRuntime(13697): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
E/AndroidRuntime(13697): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
E/AndroidRuntime(13697): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(13697): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime(13697): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/AndroidRuntime(13697): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(13697): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(13697): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
E/AndroidRuntime(13697): Caused by: java.lang.IllegalArgumentException: Unknown URI: content://downloads/public_downloads/15
E/AndroidRuntime(13697): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:165)
E/AndroidRuntime(13697): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
E/AndroidRuntime(13697): at android.content.ContentProviderProxy.query(ContentProviderNative.java:418)
E/AndroidRuntime(13697): at android.content.ContentResolver.query(ContentResolver.java:802)
E/AndroidRuntime(13697): at android.content.ContentResolver.query(ContentResolver.java:752)
E/AndroidRuntime(13697): at android.content.ContentResolver.query(ContentResolver.java:710)
E/AndroidRuntime(13697): at io.flutter.plugins.imagepicker.FileUtils.getDataColumn(FileUtils.java:117)
E/AndroidRuntime(13697): at io.flutter.plugins.imagepicker.FileUtils.getPathFromLocalUri(FileUtils.java:69)
E/AndroidRuntime(13697): at io.flutter.plugins.imagepicker.FileUtils.getPathFromUri(FileUtils.java:41)
E/AndroidRuntime(13697): at io.flutter.plugins.imagepicker.ImagePickerDelegate.handleChooseImageResult(ImagePickerDelegate.java:395)
E/AndroidRuntime(13697): at io.flutter.plugins.imagepicker.ImagePickerDelegate.onActivityResult(ImagePickerDelegate.java:375)
E/AndroidRuntime(13697): at io.flutter.app.FlutterPluginRegistry.onActivityResult(FlutterPluginRegistry.java:210)
E/AndroidRuntime(13697): at io.flutter.app.FlutterActivityDelegate.onActivityResult(FlutterActivityDelegate.java:139)
E/AndroidRuntime(13697): at io.flutter.app.FlutterActivity.onActivityResult(FlutterActivity.java:138)
E/AndroidRuntime(13697): at android.app.Activity.dispatchActivityResult(Activity.java:7454)
E/AndroidRuntime(13697): at android.app.ActivityThread.deliverResults(ActivityThread.java:4353)
E/AndroidRuntime(13697): ... 11 more
I/Process (13697): Sending signal. PID: 13697 SIG: 9
Application finished."><pre class="notranslate"><code class="notranslate">D/AndroidRuntime(13697): Shutting down VM
E/AndroidRuntime(13697): FATAL EXCEPTION: main
E/AndroidRuntime(13697): Process: com.example.test, PID: 13697
E/AndroidRuntime(13697): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2342, result=-1, data=Intent { dat=content://com.android.providers.downloads.documents/document/15 flg=0x1 }} to activity {com.example.test/com.example.test.MainActivity}: java.lang.IllegalArgumentException: Unknown URI: content://downloads/public_downloads/15
E/AndroidRuntime(13697): at android.app.ActivityThread.deliverResults(ActivityThread.java:4360)
E/AndroidRuntime(13697): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4402)
E/AndroidRuntime(13697): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
E/AndroidRuntime(13697): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
E/AndroidRuntime(13697): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
E/AndroidRuntime(13697): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
E/AndroidRuntime(13697): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(13697): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime(13697): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/AndroidRuntime(13697): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(13697): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(13697): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
E/AndroidRuntime(13697): Caused by: java.lang.IllegalArgumentException: Unknown URI: content://downloads/public_downloads/15
E/AndroidRuntime(13697): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:165)
E/AndroidRuntime(13697): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
E/AndroidRuntime(13697): at android.content.ContentProviderProxy.query(ContentProviderNative.java:418)
E/AndroidRuntime(13697): at android.content.ContentResolver.query(ContentResolver.java:802)
E/AndroidRuntime(13697): at android.content.ContentResolver.query(ContentResolver.java:752)
E/AndroidRuntime(13697): at android.content.ContentResolver.query(ContentResolver.java:710)
E/AndroidRuntime(13697): at io.flutter.plugins.imagepicker.FileUtils.getDataColumn(FileUtils.java:117)
E/AndroidRuntime(13697): at io.flutter.plugins.imagepicker.FileUtils.getPathFromLocalUri(FileUtils.java:69)
E/AndroidRuntime(13697): at io.flutter.plugins.imagepicker.FileUtils.getPathFromUri(FileUtils.java:41)
E/AndroidRuntime(13697): at io.flutter.plugins.imagepicker.ImagePickerDelegate.handleChooseImageResult(ImagePickerDelegate.java:395)
E/AndroidRuntime(13697): at io.flutter.plugins.imagepicker.ImagePickerDelegate.onActivityResult(ImagePickerDelegate.java:375)
E/AndroidRuntime(13697): at io.flutter.app.FlutterPluginRegistry.onActivityResult(FlutterPluginRegistry.java:210)
E/AndroidRuntime(13697): at io.flutter.app.FlutterActivityDelegate.onActivityResult(FlutterActivityDelegate.java:139)
E/AndroidRuntime(13697): at io.flutter.app.FlutterActivity.onActivityResult(FlutterActivity.java:138)
E/AndroidRuntime(13697): at android.app.Activity.dispatchActivityResult(Activity.java:7454)
E/AndroidRuntime(13697): at android.app.ActivityThread.deliverResults(ActivityThread.java:4353)
E/AndroidRuntime(13697): ... 11 more
I/Process (13697): Sending signal. PID: 13697 SIG: 9
Application finished.
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel dev, v0.8.2, on Mac OS X 10.14 18A384a, locale de-CH)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
[✓] Android Studio (version 3.1)
[✓] Connected devices (3 available)
• No issues found!"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel dev, v0.8.2, on Mac OS X 10.14 18A384a, locale de-CH)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
[✓] Android Studio (version 3.1)
[✓] Connected devices (3 available)
• No issues found!
</code></pre></div> | <p dir="auto">I'm working on flutter app that uses a TabView where each view contains a widget with a GlobalKey.</p>
<p dir="auto">With the latest master channel, the app crashes on switching between the tabs.</p>
<p dir="auto">However, if I do the following three things, it appears to be very stable.</p>
<ol dir="auto">
<li>merge in this PR: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="356398020" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/21350" data-hovercard-type="pull_request" data-hovercard-url="/flutter/flutter/pull/21350/hovercard" href="https://github.com/flutter/flutter/pull/21350">#21350</a></li>
</ol>
<p dir="auto">The rationale for the PR is in the PR and its linked issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="254692632" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/11895" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/11895/hovercard" href="https://github.com/flutter/flutter/issues/11895">#11895</a></p>
<ol start="2" dir="auto">
<li>remove the following <code class="notranslate">assert</code> in <code class="notranslate">scroll_position.dart</code>, as per issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="335114781" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/18756" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/18756/hovercard" href="https://github.com/flutter/flutter/issues/18756">#18756</a>.</li>
</ol>
<p dir="auto">As per my comment in that issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="335114781" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/18756" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/18756/hovercard?comment_id=415387519&comment_type=issue_comment" href="https://github.com/flutter/flutter/issues/18756#issuecomment-415387519">#18756 (comment)</a>, it is unclear to me why it is important that <code class="notranslate">pixels != null</code> at this point in the code. I'd love if this assert would read <code class="notranslate">assert(pixels != null, "And here's why it's important...")</code>. Removing it appears to be harmless.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--- a/packages/flutter/lib/src/widgets/scroll_position.dart
+++ b/packages/flutter/lib/src/widgets/scroll_position.dart
@@ -658,7 +658,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
@override
void dispose() {
- assert(pixels != null);
+ // assert(pixels != null);
activity?.dispose(); // it will be null if it got absorbed by another ScrollPosition
_activity = null;
super.dispose();"><pre class="notranslate"><code class="notranslate">--- a/packages/flutter/lib/src/widgets/scroll_position.dart
+++ b/packages/flutter/lib/src/widgets/scroll_position.dart
@@ -658,7 +658,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
@override
void dispose() {
- assert(pixels != null);
+ // assert(pixels != null);
activity?.dispose(); // it will be null if it got absorbed by another ScrollPosition
_activity = null;
super.dispose();
</code></pre></div>
<ol start="3" dir="auto">
<li>In <code class="notranslate">Element.updateChild</code>, change the position of checking that a GlobalKey is not being reused by a different widget so that it occurs after the old child widget has had a chance to be deactivated, thus freeing the GlobalKey to be used in the new widget.</li>
</ol>
<p dir="auto">See <a href="https://stackoverflow.com/questions/49862572/multiple-widgets-used-the-same-globalkey?rq=1" rel="nofollow">https://stackoverflow.com/questions/49862572/multiple-widgets-used-the-same-globalkey?rq=1</a> for some more background on this, and an example.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--- a/packages/flutter/lib/src/widgets/framework.dart
+++ b/packages/flutter/lib/src/widgets/framework.dart
@@ -2705,18 +2705,12 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
/// | **child != null** | Old child is removed, returns null. | Old child updated if possible, returns child or new [Element]. |
@protected
Element updateChild(Element child, Widget newWidget, dynamic newSlot) {
- assert(() {
- if (newWidget != null && newWidget.key is GlobalKey) {
- final GlobalKey key = newWidget.key;
- key._debugReserveFor(this);
- }
- return true;
- }());
if (newWidget == null) {
if (child != null)
deactivateChild(child);
return null;
}
+
if (child != null) {
if (child.widget == newWidget) {
if (child.slot != newSlot)
@@ -2737,6 +2731,13 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
deactivateChild(child);
assert(child._parent == null);
}
+ assert(() {
+ if (newWidget.key is GlobalKey) {
+ final GlobalKey key = newWidget.key;
+ key._debugReserveFor(this);
+ }
+ return true;
+ }());
return inflateWidget(newWidget, newSlot);
}"><pre class="notranslate"><code class="notranslate">--- a/packages/flutter/lib/src/widgets/framework.dart
+++ b/packages/flutter/lib/src/widgets/framework.dart
@@ -2705,18 +2705,12 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
/// | **child != null** | Old child is removed, returns null. | Old child updated if possible, returns child or new [Element]. |
@protected
Element updateChild(Element child, Widget newWidget, dynamic newSlot) {
- assert(() {
- if (newWidget != null && newWidget.key is GlobalKey) {
- final GlobalKey key = newWidget.key;
- key._debugReserveFor(this);
- }
- return true;
- }());
if (newWidget == null) {
if (child != null)
deactivateChild(child);
return null;
}
+
if (child != null) {
if (child.widget == newWidget) {
if (child.slot != newSlot)
@@ -2737,6 +2731,13 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
deactivateChild(child);
assert(child._parent == null);
}
+ assert(() {
+ if (newWidget.key is GlobalKey) {
+ final GlobalKey key = newWidget.key;
+ key._debugReserveFor(this);
+ }
+ return true;
+ }());
return inflateWidget(newWidget, newSlot);
}
</code></pre></div>
<p dir="auto">It's okay to move the assert to the end, because it cannot possibly trigger on the other code paths.<br>
Either <code class="notranslate">newWidget == null</code>, so it can't have a <code class="notranslate">GlobalKey</code> anyway. Or <code class="notranslate">child.widget == newWidget</code> so the <code class="notranslate">GlobalKey</code> is already being used by the child. Or (see code below), <code class="notranslate">Widget.canUpdate(child.widget, newWidget)</code> is true, which means that <code class="notranslate">child.widget.key == newWidget.key</code>, according to the rules of being allowed to replace a widget.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" if (Widget.canUpdate(child.widget, newWidget)) {
if (child.slot != newSlot)
updateSlotForChild(child, newSlot);
child.update(newWidget);
assert(child.widget == newWidget);
assert(() {
child.owner._debugElementWasRebuilt(child);
return true;
}());
return child;
}
"><pre class="notranslate"><code class="notranslate"> if (Widget.canUpdate(child.widget, newWidget)) {
if (child.slot != newSlot)
updateSlotForChild(child, newSlot);
child.update(newWidget);
assert(child.widget == newWidget);
assert(() {
child.owner._debugElementWasRebuilt(child);
return true;
}());
return child;
}
</code></pre></div>
<p dir="auto">Therefore, the only place that needs to have the assert to check we're not using a <code class="notranslate">GlobalKey</code> more than once, is near the end of this method.</p>
<p dir="auto">I imagine that (1) will land on Master shortly (thanks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dnfield/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dnfield">@dnfield</a>)</p>
<p dir="auto">I think we need some clarity about why <code class="notranslate">assert(pixels != null)</code> is or isn't important to proceed with (2).</p>
<p dir="auto">While (3) fixes my problem, and I think I have pretty robust reasoning what bug it fixes and why this is an appropriate fix, I have no idea how to move this forward into a PR. I'd like some advice, or for someone from the core team to take a look.</p>
<p dir="auto">Thanks</p> | 0 |
<p dir="auto">Please add ability to map Key to Shortcut in Keyboard Manager.</p>
<p dir="auto">Example: Map CapsLock key to Alt + Shift shortcut to switch between input languages just like macOS.</p>
<p dir="auto">Thank you very much</p> | <h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">My laptop vendor didn't included simple media keys on keyboard. I use PT to create shortcuts to virtual keys like Media Play/Pause, Volume Up/Down.</p>
<p dir="auto">In Keyboard Manager there are two options: Remap Keyboard (key to key) and Remap Shortcuts (key combination to key combination). But when I try to create shortcut like this:</p>
<blockquote>
<p dir="auto">Ctrl + Alt + Up => Volume Up<br>
Ctrl + Alt + Down => Volume Down<br>
Ctrl + Alt + Right => Media Play/Pause</p>
</blockquote>
<p dir="auto">I always get an error <code class="notranslate">Shortcut must start with a modifier key</code> over target shortcut key. But in this case, there's no modifier key needed. So I end up with same combinations with Ctrl, as they work ok:</p>
<blockquote>
<p dir="auto">Ctrl + Alt + Up => <strong>Ctrl</strong> + Volume Up<br>
Ctrl + Alt + Down => <strong>Ctrl</strong> + Volume Down<br>
Ctrl + Alt + Right => <strong>Ctrl</strong> + Media Play/Pause</p>
</blockquote>
<p dir="auto">I would like to define shortcuts (especially for media keys) without needing to fake shortcut with Ctrl.</p>
<h1 dir="auto">Proposed technical implementation details</h1>
<p dir="auto">I think the right side of shortcut shouldn't require modifier key. Even standard keys can be mapped as destination without modifier - if someone want to type <code class="notranslate">X</code> by pressing Ctrl + Alt + Shift + z, this should be allowed.</p> | 1 |
<h2 dir="auto">Problem Description</h2>
<p dir="auto">If I render the slider with code like:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<Slider step={1} min={0} max={this.state.max} value={this.state.currentValue} />"><pre class="notranslate"><span class="pl-c1"><</span><span class="pl-ent">Slider</span> <span class="pl-c1">step</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">1</span><span class="pl-kos">}</span> <span class="pl-c1">min</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">0</span><span class="pl-kos">}</span> <span class="pl-c1">max</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">max</span><span class="pl-kos">}</span> <span class="pl-c1">value</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">currentValue</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">></span></pre></div>
<p dir="auto">And then I call <code class="notranslate">setState</code> to increase <code class="notranslate">max</code>, the slider does not update the position of the marker. If I increase <code class="notranslate">max</code> again, then the marker position updates to be where it should have been on the previous render (e.g. it is still wrong).</p>
<p dir="auto">For example,</p>
<ul dir="auto">
<li>first render, max={100} value={50} and the marker appears in the middle of the slider as it should.</li>
<li>second render, max={200} value={50} and the marker is <em>still</em> in the middle of the slider (it should be at the 25% position)</li>
<li>third render, max={400} value={50} and the marker is now at the 25% mark (it should be at the 12.5% position).</li>
</ul>
<p dir="auto">This issue seems related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="138986534" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/3619" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/3619/hovercard" href="https://github.com/mui/material-ui/issues/3619">#3619</a>.</p>
<h2 dir="auto">Versions</h2>
<ul dir="auto">
<li>Material-UI: v0.15.0-beta.2</li>
<li>React: 15.0.1</li>
<li>Browser: Chrome 49.0.2623.112 m (Windows 10 x64)</li>
</ul> | <p dir="auto">Changing value, min and/or max props at the same time results in an broken state. This happens because on value change percent is re-calculated based on current min/max not based on the new ones:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" componentWillReceiveProps(nextProps, nextContext) {
...
if (nextProps.value !== undefined && !this.state.dragging) {
this.setValue(nextProps.value);
}
},
...
setValue(i) {
// calculate percentage
let percent = (i - this.props.min) / (this.props.max - this.props.min);
....
},"><pre class="notranslate"> <span class="pl-en">componentWillReceiveProps</span><span class="pl-kos">(</span><span class="pl-s1">nextProps</span><span class="pl-kos">,</span> <span class="pl-s1">nextContext</span><span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-kos">{</span>
...
<span class="pl-en">if</span> <span class="pl-kos">(</span><span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">value</span> <span class="pl-c1">!==</span> <span class="pl-c1">undefined</span> <span class="pl-c1">&&</span> <span class="pl-c1">!</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">dragging</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">setValue</span><span class="pl-kos">(</span><span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">value</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-en">setValue</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-kos">{</span>
<span class="pl-c">// calculate percentage</span>
<span class="pl-k">let</span> <span class="pl-s1">percent</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">i</span> <span class="pl-c1">-</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">min</span><span class="pl-kos">)</span> <span class="pl-c1">/</span> <span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">max</span> <span class="pl-c1">-</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">min</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> | 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: master</li>
<li>Operating System version: any</li>
<li>Java version: any</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>no step</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">1.dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/script/ScriptRouter.java<br>
2.dubbo-common/src/main/java/org/apache/dubbo/common/config/configcenter/file/FileSystemDynamicConfiguration.java<br>
3.dubbo-common/src/main/java/org/apache/dubbo/common/json/GenericJSONConverter.java<br>
4.dubbo-common/src/main/java/org/apache/dubbo/common/utils/ReflectUtils.java<br>
5.dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ApplicationModel.java<br>
6.dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java<br>
7.dubbo-container/dubbo-container-api/src/main/java/org/apache/dubbo/container/Main.java<br>
8.dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/report/support/AbstractMetadataReport.java<br>
9.dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/store/BaseWritableMetadataService.java<br>
10.dubbo-metadata/dubbo-metadata-definition-protobuf/src/main/java/org/apache/dubbo/metadata/definition/protobuf/ProtobufTypeBuilder.java<br>
11.dubbo-monitor/dubbo-monitor-api/src/main/java/org/apache/dubbo/monitor/support/AbstractMonitorFactory.java<br>
12.dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/server/DubboLogo.java<br>
13.dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/server/Server.java<br>
14.dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/server/handler/QosProcessHandler.java<br>
15.dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/server/handler/TelnetProcessHandler.java<br>
16.dubbo-plugin/dubbo-qos/src/test/java/org/apache/dubbo/qos/server/handler/TelnetProcessHandlerTest.java<br>
17.dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/servlet/DispatcherServlet.java<br>
18.dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyClient.java<br>
19.dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/DeprecatedFilter.java<br>
20.dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java<br>
21.dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/filter/TraceFilter.java<br>
22.dubbo-rpc/dubbo-rpc-native-thrift/src/main/java/org/apache/dubbo/rpc/protocol/nativethrift/ThriftProtocol.java<br>
23.dubbo-serialization/dubbo-serialization-fst/src/main/java/org/apache/dubbo/common/serialize/fst/FstFactory.java</p>
<p dir="auto">What do you expected from the above steps?</p>
<p dir="auto">1.changes constants in a class to uppercase and underscores between words</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=""><pre class="notranslate"><code class="notranslate"></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/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" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/wiki/FAQ">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.5.10</li>
<li>Operating System version: Mac</li>
<li>Java version: 1.7</li>
</ul>
<h3 dir="auto">Issue Description</h3>
<p dir="auto">In java serialization, the writeReplace method allows the developer to provide a replacement object that will be serialized instead of the original one.</p>
<p dir="auto">Normally, this method would return another object. However, some classes may return itself, e.g. <a href="https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java#L173">JsonMappingException#Reference</a>.</p>
<p dir="auto">In this case, hessian2 would enter an infinite recursion and finally get the <code class="notranslate">java.lang.StackOverflowError</code>.</p>
<h3 dir="auto">Step to reproduce this issue</h3>
<ol dir="auto">
<li>Define a class with a <code class="notranslate">writeReplace</code> method return <code class="notranslate">this</code></li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" public class WriteReplaceReturningItself implements Serializable {
private static final long serialVersionUID = 1L;
private String name;
WriteReplaceReturningItself(String name) {
this.name = name;
}
public String getName() {
return name;
}
/**
* Some object may return itself for wrapReplace, e.g.
* https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java#L173
*/
Object writeReplace() {
//do some extra things
return this;
}
}"><pre class="notranslate"> <span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">WriteReplaceReturningItself</span> <span class="pl-k">implements</span> <span class="pl-smi">Serializable</span> {
<span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-k">final</span> <span class="pl-smi">long</span> <span class="pl-s1">serialVersionUID</span> = <span class="pl-c1">1L</span>;
<span class="pl-k">private</span> <span class="pl-smi">String</span> <span class="pl-s1">name</span>;
<span class="pl-smi">WriteReplaceReturningItself</span>(<span class="pl-smi">String</span> <span class="pl-s1">name</span>) {
<span class="pl-smi">this</span>.<span class="pl-s1">name</span> = <span class="pl-s1">name</span>;
}
<span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-en">getName</span>() {
<span class="pl-k">return</span> <span class="pl-s1">name</span>;
}
<span class="pl-c">/**</span>
<span class="pl-c"> * Some object may return itself for wrapReplace, e.g.</span>
<span class="pl-c"> * https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java#L173</span>
<span class="pl-c"> */</span>
<span class="pl-smi">Object</span> <span class="pl-en">writeReplace</span>() {
<span class="pl-c">//do some extra things</span>
<span class="pl-k">return</span> <span class="pl-smi">this</span>;
}
}</pre></div>
<ol start="2" dir="auto">
<li>Use <code class="notranslate">Hessian2Output</code> to serialize it</li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" ByteArrayOutputStream bout = new ByteArrayOutputStream();
Hessian2Output out = new Hessian2Output(bout);
out.writeObject(data);
out.flush();"><pre class="notranslate"> <span class="pl-smi">ByteArrayOutputStream</span> <span class="pl-s1">bout</span> = <span class="pl-k">new</span> <span class="pl-smi">ByteArrayOutputStream</span>();
<span class="pl-smi">Hessian2Output</span> <span class="pl-s1">out</span> = <span class="pl-k">new</span> <span class="pl-smi">Hessian2Output</span>(<span class="pl-s1">bout</span>);
<span class="pl-s1">out</span>.<span class="pl-en">writeObject</span>(<span class="pl-s1">data</span>);
<span class="pl-s1">out</span>.<span class="pl-en">flush</span>();</pre></div>
<ol start="3" dir="auto">
<li>Error occurs</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.StackOverflowError
at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:302)
at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:381)
at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:226)
at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:383)
at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:226)"><pre class="notranslate"><code class="notranslate">java.lang.StackOverflowError
at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:302)
at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:381)
at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:226)
at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:383)
at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:226)
</code></pre></div>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">The serialization process should complete with no exception or error.</p>
<h3 dir="auto">Actual Result</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.StackOverflowError
at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:302)
at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:381)
at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:226)
at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:383)
at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:226)"><pre class="notranslate"><code class="notranslate">java.lang.StackOverflowError
at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:302)
at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:381)
at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:226)
at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:383)
at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:226)
</code></pre></div> | 0 |
<p dir="auto">I'm cross compiling from linux to arm using a custom cross tool and getting the following error. It looks like it is switching the arch from arm to x86_64 during the build of the standard library.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/root/.cache/bazel/_bazel_root/f8087e59fd95af1ae29e8fcb7ff1a3dc/external/io_bazel_rules_go/BUILD.bazel:9:1: GoStdlib external/io_bazel_rules_go/linux_arm_stripped/stdlib%/pkg failed (Exit 1) process-wrapper failed: error executing command
(cd /root/.cache/bazel/_bazel_root/f8087e59fd95af1ae29e8fcb7ff1a3dc/execroot/__main__ && \
exec env - \
CC=tools/compilers/arm/gcc/clang/clang \
CGO_CFLAGS='--sysroot=external/arm_compiler/arm-buildroot-linux-gnueabihf/sysroot --target=armv6z-raspberrypi-linux-gnueabihf -mfloat-abi=hard -mfpu=vfp -isystem external/arm_compiler/lib/gcc/arm-buildroot-linux-gnueabihf/5.4.0/include -isystem external/arm_compiler/arm-buildroot-linux-gnueabihf/sysroot/usr/include -isystem external/arm_compiler/lib/gcc/arm-buildroot-linux-gnueabihf/5.4.0/include-fixed -U_FORTIFY_SOURCE -fstack-protector -fPIE -fdiagnostics-color=always -fno-omit-frame-pointer -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted"' \
CGO_ENABLED=1 \
CGO_LDFLAGS='--sysroot=external/arm_compiler/arm-buildroot-linux-gnueabihf/sysroot -lstdc++ -latomic -lm -lpthread -Lexternal/arm_compiler/arm-buildroot-linux-gnueabihf/lib -Lexternal/arm_compiler/arm-buildroot-linux-gnueabihf/sysroot/lib -Lexternal/arm_compiler/arm-buildroot-linux-gnueabihf/sysroot/usr/lib -Lexternal/arm_compiler/lib/gcc/arm-buildroot-linux-gnueabihf/5.4.0 -Bexternal/arm_compiler/arm-buildroot-linux-gnueabihf/bin -Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3 -no-canonical-prefixes -pie -Wl,-z,relro,-z,now' \
GOARCH=arm \
GOOS=linux \
GOROOT=external/go_sdk \
GOROOT_FINAL=GOROOT \
PATH=tools/compilers/arm/gcc:tools/compilers/arm/gcc/clang:/bin:/usr/bin \
TMPDIR=/tmp \
/root/.cache/bazel/_bazel_root/f8087e59fd95af1ae29e8fcb7ff1a3dc/execroot/__main__/_bin/process-wrapper '--timeout=0' '--kill_delay=15' bazel-out/host/bin/external/io_bazel_rules_go/go/tools/builders/linux_amd64_stripped/stdlib -sdk external/go_sdk -installsuffix linux_arm -out bazel-out/armeabi-v7a-fastbuild/bin/external/io_bazel_rules_go/linux_arm_stripped/stdlib% -filter_buildid bazel-out/host/bin/external/io_bazel_rules_go/go/tools/builders/linux_amd64_stripped/filter_buildid)
# runtime/cgo
arm-buildroot-linux-gneabihf-ld: unrecognised emulation mode: elf_x86_64
Supported emulations: armelf_linux_eabi armelfb_linux_eabi"><pre class="notranslate"><code class="notranslate">/root/.cache/bazel/_bazel_root/f8087e59fd95af1ae29e8fcb7ff1a3dc/external/io_bazel_rules_go/BUILD.bazel:9:1: GoStdlib external/io_bazel_rules_go/linux_arm_stripped/stdlib%/pkg failed (Exit 1) process-wrapper failed: error executing command
(cd /root/.cache/bazel/_bazel_root/f8087e59fd95af1ae29e8fcb7ff1a3dc/execroot/__main__ && \
exec env - \
CC=tools/compilers/arm/gcc/clang/clang \
CGO_CFLAGS='--sysroot=external/arm_compiler/arm-buildroot-linux-gnueabihf/sysroot --target=armv6z-raspberrypi-linux-gnueabihf -mfloat-abi=hard -mfpu=vfp -isystem external/arm_compiler/lib/gcc/arm-buildroot-linux-gnueabihf/5.4.0/include -isystem external/arm_compiler/arm-buildroot-linux-gnueabihf/sysroot/usr/include -isystem external/arm_compiler/lib/gcc/arm-buildroot-linux-gnueabihf/5.4.0/include-fixed -U_FORTIFY_SOURCE -fstack-protector -fPIE -fdiagnostics-color=always -fno-omit-frame-pointer -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted"' \
CGO_ENABLED=1 \
CGO_LDFLAGS='--sysroot=external/arm_compiler/arm-buildroot-linux-gnueabihf/sysroot -lstdc++ -latomic -lm -lpthread -Lexternal/arm_compiler/arm-buildroot-linux-gnueabihf/lib -Lexternal/arm_compiler/arm-buildroot-linux-gnueabihf/sysroot/lib -Lexternal/arm_compiler/arm-buildroot-linux-gnueabihf/sysroot/usr/lib -Lexternal/arm_compiler/lib/gcc/arm-buildroot-linux-gnueabihf/5.4.0 -Bexternal/arm_compiler/arm-buildroot-linux-gnueabihf/bin -Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3 -no-canonical-prefixes -pie -Wl,-z,relro,-z,now' \
GOARCH=arm \
GOOS=linux \
GOROOT=external/go_sdk \
GOROOT_FINAL=GOROOT \
PATH=tools/compilers/arm/gcc:tools/compilers/arm/gcc/clang:/bin:/usr/bin \
TMPDIR=/tmp \
/root/.cache/bazel/_bazel_root/f8087e59fd95af1ae29e8fcb7ff1a3dc/execroot/__main__/_bin/process-wrapper '--timeout=0' '--kill_delay=15' bazel-out/host/bin/external/io_bazel_rules_go/go/tools/builders/linux_amd64_stripped/stdlib -sdk external/go_sdk -installsuffix linux_arm -out bazel-out/armeabi-v7a-fastbuild/bin/external/io_bazel_rules_go/linux_arm_stripped/stdlib% -filter_buildid bazel-out/host/bin/external/io_bazel_rules_go/go/tools/builders/linux_amd64_stripped/filter_buildid)
# runtime/cgo
arm-buildroot-linux-gneabihf-ld: unrecognised emulation mode: elf_x86_64
Supported emulations: armelf_linux_eabi armelfb_linux_eabi
</code></pre></div>
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
<li>Operating System / Platform => <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
<li>Compiler => <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
</ul>
<h5 dir="auto">Detailed description</h5>
<h5 dir="auto">Steps to reproduce</h5> | <h5 dir="auto">Detailed description</h5>
<p dir="auto">Several builds (e.g. <a href="http://pullrequest.opencv.org/buildbot/builders/precommit_linux64_no_opt/builds/17355" rel="nofollow">this</a> and <a href="http://pullrequest.opencv.org/buildbot/builders/precommit_linux64_no_opt/builds/17347" rel="nofollow">this</a>) are failing, due to bad parsing of the test results..</p>
<h5 dir="auto">Actual results</h5>
<p dir="auto">Failure with the following status:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test_dnn test_dnn ; cases (tests): 0 (0) ; passed: 695 ; failed "><pre class="notranslate"><code class="notranslate">test_dnn test_dnn ; cases (tests): 0 (0) ; passed: 695 ; failed
</code></pre></div>
<h5 dir="auto">Expected results</h5>
<p dir="auto">Success with the following status:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test_dnn test_dnn ; cases (tests): 60 (887) ; passed: 887 ; "><pre class="notranslate"><code class="notranslate">test_dnn test_dnn ; cases (tests): 60 (887) ; passed: 887 ;
</code></pre></div> | 0 |
<p dir="auto"><strong>Well, not yet</strong>. We need a plan for doing so. The v1 effort started 18 months ago. We have had some interesting discussion in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="279093101" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/9388" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/9388/hovercard" href="https://github.com/mui/material-ui/issues/9388">#9388</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="284472596" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/9614" data-hovercard-type="pull_request" data-hovercard-url="/mui/material-ui/pull/9614/hovercard" href="https://github.com/mui/material-ui/pull/9614">#9614</a>.<br>
Here are the problems I want to solve all at once:</p>
<ol dir="auto">
<li>How can we make the migration from v0.x to v1 as smooth as possible? Right now, people have to do it in a single batch. It's very hard.</li>
<li>How can we scale the number of components we support? The community has been building a lot of components on top of Material-UI, with large quality distribution.</li>
<li>Some of our components are pretty stable while some aren't. Should the few unstable components prevent us from releasing the stable components earlier?</li>
</ol>
<p dir="auto">I'm proposing the following plan, any feedback is welcomed.<br>
If we follow it. I'm expecting the to see the first v1 stable release of our components in a month or two and to complete it in 6 months or so.</p>
<h2 dir="auto">We take advantage of <code class="notranslate">@material-ui</code> npm scope name</h2>
<p dir="auto">Effectively people imports will change:</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="-import { Button } from 'material-ui';
+import { Button } from '@material-ui/core';"><pre class="notranslate"><span class="pl-md"><span class="pl-md">-</span>import { Button } from 'material-ui';</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>import { Button } from '@material-ui/core';</span></pre></div>
<p dir="auto">I have opened <a href="https://twitter.com/olivtassinari/status/947161769528655888" rel="nofollow">a poll on Twitter</a> to collect some feedback.</p>
<h3 dir="auto">Pros</h3>
<ul dir="auto">
<li>It will signal to the world what's official and what's not.</li>
<li>It will prevent any future package name clashing.</li>
<li>It will make the transition from v0.x to v1 much easier.<br>
Without, it's really tricky as some external libs might be relying on <a href="mailto:[email protected]">[email protected]</a> while others on <a href="mailto:[email protected]">[email protected]</a>. In this situation, people can't have both versions installed at the same time.<br>
They only have one option. <strong>They do the migration in one go</strong>. This solves pain point n°1 and a bit of n°2.</li>
<li>We can remove 2k lines of code and close <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="281071814" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/9469" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/9469/hovercard" href="https://github.com/mui/material-ui/issues/9469">#9469</a>.</li>
</ul>
<h3 dir="auto">Cons</h3>
<ul dir="auto">
<li>The downloads stats restart from scratch. It should only be a short time issue. It's not something I would worry about.</li>
</ul>
<p dir="auto">Overall, the Babel blog on this topic is very interesting <a href="https://babeljs.io/blog/2017/12/27/nearing-the-7.0-release" rel="nofollow">https://babeljs.io/blog/2017/12/27/nearing-the-7.0-release</a>.</p>
<h2 dir="auto">We create a lab package</h2>
<p dir="auto">The package can be named <code class="notranslate">@material-ui/lab</code> or <a href="https://en.wikipedia.org/wiki/De_novo" rel="nofollow"><code class="notranslate">@material-ui/denovo</code></a> as <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rosskevin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rosskevin">@rosskevin</a> likes it.<br>
What's more important is that we can leverage this package.</p>
<h3 dir="auto">Pros</h3>
<ul dir="auto">
<li>Right now we can consider all our components as belonging to the lab. But as we solve all the core issues and stabilize some components, we can start promoting and gradually components from lab to core (stable). It's solving problem n°3. v1 will be complete once we merge v1-beta into the master branch and we move <a href="https://material-ui.com" rel="nofollow">https://material-ui.com</a> to <a href="http://material-ui.com" rel="nofollow">http://material-ui.com</a>.</li>
<li>Let's say we ship X, a new component as soon as we merge the pull-request. People might jump to conclusion. "X is buggy, I bet the other components are the same. I'm not going to use this crap".<br>
Having a lab package is creating a clear contract. People know what they can expect from the components. It's solving problem n°2.</li>
<li>Releasing a high-quality component is a time-consuming process. People feedbacks are critical. Having a lab package can encourage people giving feedback.</li>
<li>We can do more experimentations.</li>
</ul>
<h3 dir="auto">Cons</h3>
<ul dir="auto">
<li>We will need to set up the infrastructure needed for such package.</li>
</ul>
<p dir="auto">Overall, the Blueprint approach in interesting to have a look at <a href="http://blueprintjs.com/docs/#labs" rel="nofollow">http://blueprintjs.com/docs/#labs</a>.</p>
<h2 dir="auto">mono-repository <g-emoji class="g-emoji" alias="heart" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2764.png">❤️</g-emoji></h2>
<p dir="auto">No matter what. I think that we should try very hard to keep the project in a single GitHub repository.</p>
<p dir="auto">cc @mui-org/core-contributors</p> | <p dir="auto">It's actually WebStorm bug, but they fix bugs lots of time. New beta.17 component exports look like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="declare const AppBar: React.ComponentType<AppBarProps>;
export default AppBar;
"><pre class="notranslate"><code class="notranslate">declare const AppBar: React.ComponentType<AppBarProps>;
export default AppBar;
</code></pre></div>
<p dir="auto">Webstorm does not recognize props of such exported components in TSX files and props suggestions and auto-completing not works. It only recognizes when somewhere the class or stateless function is declared.</p>
<p dir="auto">For auto-complete and props suggestion working I should create wrappers:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import * as React from 'react';
import {default as MuiAppBar, AppBarProps } from 'material-ui/AppBar';
class AppBarDumb extends React.Component<AppBarProps> {}
export default (cl => MuiAppBar)(AppBarDumb);"><pre class="notranslate"><code class="notranslate">import * as React from 'react';
import {default as MuiAppBar, AppBarProps } from 'material-ui/AppBar';
class AppBarDumb extends React.Component<AppBarProps> {}
export default (cl => MuiAppBar)(AppBarDumb);
</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/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h1 dir="auto">Possible solution</h1>
<p dir="auto">Return back type definitions of classes, not constants of ComponentClass types.</p>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>1.0.0-beta.17</td>
</tr>
<tr>
<td>Typescript</td>
<td>2.4.2</td>
</tr>
<tr>
<td>React</td>
<td>16.0.0</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">I am webpacking the <a href="https://www.npmjs.org/package/cheerio" rel="nofollow">cheerio</a> library and hit an error in its index.js:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in ./~/cheerio/index.js
Module not found: Error: Cannot resolve file or directory ./package in MYPROJECT\node_modules\cheerio.
@ ./~/cheerio/index.js 13:18-38"><pre class="notranslate"><code class="notranslate">ERROR in ./~/cheerio/index.js
Module not found: Error: Cannot resolve file or directory ./package in MYPROJECT\node_modules\cheerio.
@ ./~/cheerio/index.js 13:18-38
</code></pre></div>
<p dir="auto">The code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="exports.version = require('./package').version;"><pre class="notranslate"><span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">version</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'./package'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">version</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">It's obviously just trying to load package.json from the same directory. The Node <a href="http://nodejs.org/api/modules.html" rel="nofollow">Modules documentation</a> states:</p>
<blockquote>
<p dir="auto">If the exact filename is not found, then node will attempt to load the required filename with the added extension of .js, .json, and then .node.</p>
</blockquote>
<p dir="auto">So, if we expect that npm packages are going to make use of this with vanilla 'require,' I think webpack should make the json loader default. I believe that would mean changing:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="options.resolve.extensions = ["", ".node", ".er.js", ".js"];"><pre class="notranslate"><span class="pl-s1">options</span><span class="pl-kos">.</span><span class="pl-c1">resolve</span><span class="pl-kos">.</span><span class="pl-c1">extensions</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">""</span><span class="pl-kos">,</span> <span class="pl-s">".node"</span><span class="pl-kos">,</span> <span class="pl-s">".er.js"</span><span class="pl-kos">,</span> <span class="pl-s">".js"</span><span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">in <a href="https://github.com/webpack/enhanced-require/blob/master/lib/require.js">https://github.com/webpack/enhanced-require/blob/master/lib/require.js</a></p>
<p dir="auto">to:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="options.resolve.extensions = ["", ".node", ".er.js", ".js", ".json"];"><pre class="notranslate"><span class="pl-s1">options</span><span class="pl-kos">.</span><span class="pl-c1">resolve</span><span class="pl-kos">.</span><span class="pl-c1">extensions</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">""</span><span class="pl-kos">,</span> <span class="pl-s">".node"</span><span class="pl-kos">,</span> <span class="pl-s">".er.js"</span><span class="pl-kos">,</span> <span class="pl-s">".js"</span><span class="pl-kos">,</span> <span class="pl-s">".json"</span><span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Right?</p> | <h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong><br>
i am not sure whether this is webpack-dev-server issue or webpack or something else, however after 1st hot reload happens there is a constant error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="jsonp chunk loading:103 Uncaught TypeError: Cannot read property 'push' of undefined
at self.webpackHotUpdatePACKAGEJSONNAME (jsonp chunk loading:103)"><pre class="notranslate"><code class="notranslate">jsonp chunk loading:103 Uncaught TypeError: Cannot read property 'push' of undefined
at self.webpackHotUpdatePACKAGEJSONNAME (jsonp chunk loading:103)
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="self["webpackHotUpdatePACKAGEJSONNAME"] = (chunkId, moreModules, runtime) => {
for(var moduleId in moreModules) {
if(__webpack_require__.o(moreModules, moduleId)) {
currentUpdate[moduleId] = moreModules[moduleId];
if(currentUpdatedModulesList) currentUpdatedModulesList.push(moduleId);
}
}
if(runtime) currentUpdateRuntime.push(runtime); // error happens here
if(waitingUpdateResolves[chunkId]) {
waitingUpdateResolves[chunkId]();
waitingUpdateResolves[chunkId] = undefined;
}
};"><pre class="notranslate"><code class="notranslate">self["webpackHotUpdatePACKAGEJSONNAME"] = (chunkId, moreModules, runtime) => {
for(var moduleId in moreModules) {
if(__webpack_require__.o(moreModules, moduleId)) {
currentUpdate[moduleId] = moreModules[moduleId];
if(currentUpdatedModulesList) currentUpdatedModulesList.push(moduleId);
}
}
if(runtime) currentUpdateRuntime.push(runtime); // error happens here
if(waitingUpdateResolves[chunkId]) {
waitingUpdateResolves[chunkId]();
waitingUpdateResolves[chunkId] = undefined;
}
};
</code></pre></div>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto">launch dev-server with hot:true</p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
does not happen in webpack@4<br>
i think that the issue is that this variable <code class="notranslate">currentUpdateRuntime</code> is accessed before it is initialized in:<br>
<code class="notranslate">__webpack_require__.hmrI.jsonp</code><br>
or<br>
<code class="notranslate">__webpack_require__.hmrC.jsonp</code></p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 5.1.0<br>
Node.js version: v12.18.0<br>
Operating System: Windows 10<br>
Additional tools:<br>
webpack-devs-server@latest</p> | 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.10005]
Windows Terminal version (if applicable): um? The windows terminal preview, current one in store
Any other software?
Used boht vim 8 and nano to test.
# Steps to reproduce
Open a multi line file in a terminal editor. I have tried both vim 8 and nano. In the editor attempt to hold the down key vim: j & nano: down arrow. The cursor will love down. However, when you release the key the cursor will continue to move down multiple lines past where stopped.
# Expected behavior
The expected is that the terminal be more response and when a key is released it is registered soon
# Actual behavior
When released the editor continues to move for 5-7 lines of text."><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.10005]
Windows Terminal version (if applicable): um? The windows terminal preview, current one in store
Any other software?
Used boht vim 8 and nano to test.
# Steps to reproduce
Open a multi line file in a terminal editor. I have tried both vim 8 and nano. In the editor attempt to hold the down key vim: j & nano: down arrow. The cursor will love down. However, when you release the key the cursor will continue to move down multiple lines past where stopped.
# Expected behavior
The expected is that the terminal be more response and when a key is released it is registered soon
# Actual behavior
When released the editor continues to move for 5-7 lines of text.
</code></pre></div> | <p dir="auto">Change the UI for tab tiles, increase the height respective to the window action buttons. Same as edge, currently there height is not suitable and there edges are cornered, which resemble material design instead of fluent design. Plus make the design consistent with the tab actions buttons (e.g. '+'). One has outline effect on hover, other has text color change. The edge design is very polished, it should follow its footsteps for fluent design.</p> | 0 |
<p dir="auto">After upgrading to <code class="notranslate">0.19.9</code>, <a href="http://clojureelasticsearch.info" rel="nofollow">Elastisch</a> test suite that resets indexes by specifying index name as <code class="notranslate">_all</code> now fails. ElasticSearch responds with 404s:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -XDELETE 'http://localhost:9200/_all?pretty=true'
{
"error" : "IndexMissingException[[_all] missing]",
"status" : 404
}"><pre class="notranslate"><code class="notranslate">curl -XDELETE 'http://localhost:9200/_all?pretty=true'
{
"error" : "IndexMissingException[[_all] missing]",
"status" : 404
}
</code></pre></div>
<p dir="auto">I am not sure if this change is intentional but looks like <code class="notranslate">_all</code> should not be treated as a regular index name. <code class="notranslate">action.disable_delete_all_indices</code> is not set in my config.</p> | <p dir="auto">curl <a href="http://localhost:9200/_all/_status" rel="nofollow">http://localhost:9200/_all/_status</a><br>
{"error":"IndexMissingException[[_all] missing]","status":404}</p>
<p dir="auto">Works in 0.19.8</p>
<p dir="auto">Looks like /_status does work, is /_all/_status no longer supported on purpose? <a href="http://www.elasticsearch.org/guide/reference/api/admin-indices-status.html" rel="nofollow">http://www.elasticsearch.org/guide/reference/api/admin-indices-status.html</a> kind of says it should still work, but not clear.</p> | 1 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">include_role</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2.3.0.0"><pre class="notranslate"><code class="notranslate">2.3.0.0
</code></pre></div>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Handlers are not found in <code class="notranslate">include_role</code>.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="roles/test/
├── included
│ └── handlers
│ └── main.yml
└── main
└── tasks
└── main.yml"><pre class="notranslate"><code class="notranslate">roles/test/
├── included
│ └── handlers
│ └── main.yml
└── main
└── tasks
└── main.yml
</code></pre></div>
<p dir="auto">roles/test/main/tasks/main.yml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- debug: msg="ping"
changed_when: yes
notify: pong
- include_role:
name: test/included
"><pre class="notranslate">- <span class="pl-ent">debug</span>: <span class="pl-s">msg="ping"</span>
<span class="pl-ent">changed_when</span>: <span class="pl-s">yes</span>
<span class="pl-ent">notify</span>: <span class="pl-s">pong</span>
- <span class="pl-ent">include_role</span>:
<span class="pl-ent">name</span>: <span class="pl-s">test/included</span>
</pre></div>
<p dir="auto">roles/test/included/handlers/main.yml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: pong
debug: msg="pong""><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">pong</span>
<span class="pl-ent">debug</span>: <span class="pl-s">msg="pong"</span></pre></div>
<p dir="auto">playbook</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- hosts: all
roles:
- role: test/main
handlers:
- name: other
debug: msg="other"
"><pre class="notranslate">- <span class="pl-ent">hosts</span>: <span class="pl-s">all</span>
<span class="pl-ent">roles</span>:
- <span class="pl-ent">role</span>: <span class="pl-s">test/main</span>
<span class="pl-ent">handlers</span>:
- <span class="pl-ent">name</span>: <span class="pl-s">other</span>
<span class="pl-ent">debug</span>: <span class="pl-s">msg="other"</span>
</pre></div>
<p dir="auto">Note <code class="notranslate">handlers</code> section, works fine without it!</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [all] *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
TASK [setup] **********************************************************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [all]
TASK [test/main : debug] **********************************************************************************************************************************************************************************************************************************************************************************************************************************************
ERROR! The requested handler 'pong' was not found in either the main handlers list nor in the listening handlers list
"><pre class="notranslate"><code class="notranslate">PLAY [all] *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
TASK [setup] **********************************************************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [all]
TASK [test/main : debug] **********************************************************************************************************************************************************************************************************************************************************************************************************************************************
ERROR! The requested handler 'pong' was not found in either the main handlers list nor in the listening handlers list
</code></pre></div>
<p dir="auto">Clone of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="242378008" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/26698" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/26698/hovercard" href="https://github.com/ansible/ansible/issues/26698">#26698</a> that was closed instead of waiting for an update, good job <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/abadger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/abadger">@abadger</a>.</p> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">include_role module</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0.0
config file =
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.2.0.0
config file =
configured module search path = Default w/o overrides
</code></pre></div>
<p dir="auto">Installed with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip2 install --user --upgrade git+https://github.com/ansible/[email protected]#egg=ansible"><pre class="notranslate"><code class="notranslate">pip2 install --user --upgrade git+https://github.com/ansible/[email protected]#egg=ansible
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">No config file.</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Sample to reproduce runs on gentoo with target also being gentoo.</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">If I include a role with the <code class="notranslate">include_role</code> module from a play with handlers then its handlers from the role are not available.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[email protected]:/var/tmp
$ git clone https://gitlab.com/iwan.aucamp/issue-ansible-201610-000-include_role.git
Cloning into 'issue-ansible-201610-000-include_role'...
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 10 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (10/10), done.
Checking connectivity... done.
[email protected]:/var/tmp
$ cd issue-ansible-201610-000-include_role
[email protected]:/var/tmp/issue-ansible-201610-000-include_role
(failed reverse-i-search)`ansibile -p': cd issue-^Csible-201610-000-include_role
[email protected]:/var/tmp/issue-ansible-201610-000-include_role
$ ansible-playbook main.yml
[email protected]:/var/tmp/issue-ansible-201610-000-include_role
$ find . -name .git -prune -o -type f ! -name 'README*' -print | sort | xargs grep '^'
./main.yml:# vim: set sts=2 ts=2 sw=2 filetype=yaml expandtab:
./main.yml:---
./main.yml:- hosts: localhost
./main.yml: tasks:
./main.yml: - name: "this should trigger main-handler-one"
./main.yml: command: "uname -a"
./main.yml: notify: "main-handler-one"
./main.yml: - include_role: { name: "test.irh", static: yes }
./main.yml: handlers:
./main.yml: - name: "main-handler-one"
./main.yml: debug: { msg: "in main-handler-one" }
./roles/test.irh/handlers/main.yml:# vim: set sts=2 ts=2 sw=2 filetype=yaml expandtab:
./roles/test.irh/handlers/main.yml:---
./roles/test.irh/handlers/main.yml:- name: test.irh-handler-one
./roles/test.irh/handlers/main.yml: debug: { msg: "in test.irh-handler-one" }
./roles/test.irh/tasks/main.yml:# vim: set sts=2 ts=2 sw=2 filetype=yaml expandtab:
./roles/test.irh/tasks/main.yml:---
./roles/test.irh/tasks/main.yml:- name: "this should trigger test.irh-handler-one"
./roles/test.irh/tasks/main.yml: command: "uname -a"
./roles/test.irh/tasks/main.yml: notify: test.irh-handler-one"><pre class="notranslate"><code class="notranslate">[email protected]:/var/tmp
$ git clone https://gitlab.com/iwan.aucamp/issue-ansible-201610-000-include_role.git
Cloning into 'issue-ansible-201610-000-include_role'...
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 10 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (10/10), done.
Checking connectivity... done.
[email protected]:/var/tmp
$ cd issue-ansible-201610-000-include_role
[email protected]:/var/tmp/issue-ansible-201610-000-include_role
(failed reverse-i-search)`ansibile -p': cd issue-^Csible-201610-000-include_role
[email protected]:/var/tmp/issue-ansible-201610-000-include_role
$ ansible-playbook main.yml
[email protected]:/var/tmp/issue-ansible-201610-000-include_role
$ find . -name .git -prune -o -type f ! -name 'README*' -print | sort | xargs grep '^'
./main.yml:# vim: set sts=2 ts=2 sw=2 filetype=yaml expandtab:
./main.yml:---
./main.yml:- hosts: localhost
./main.yml: tasks:
./main.yml: - name: "this should trigger main-handler-one"
./main.yml: command: "uname -a"
./main.yml: notify: "main-handler-one"
./main.yml: - include_role: { name: "test.irh", static: yes }
./main.yml: handlers:
./main.yml: - name: "main-handler-one"
./main.yml: debug: { msg: "in main-handler-one" }
./roles/test.irh/handlers/main.yml:# vim: set sts=2 ts=2 sw=2 filetype=yaml expandtab:
./roles/test.irh/handlers/main.yml:---
./roles/test.irh/handlers/main.yml:- name: test.irh-handler-one
./roles/test.irh/handlers/main.yml: debug: { msg: "in test.irh-handler-one" }
./roles/test.irh/tasks/main.yml:# vim: set sts=2 ts=2 sw=2 filetype=yaml expandtab:
./roles/test.irh/tasks/main.yml:---
./roles/test.irh/tasks/main.yml:- name: "this should trigger test.irh-handler-one"
./roles/test.irh/tasks/main.yml: command: "uname -a"
./roles/test.irh/tasks/main.yml: notify: test.irh-handler-one
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">I expected <code class="notranslate">test.irh-handler-one</code> to run.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Could not find <code class="notranslate">test.irh-handler-one</code>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-playbook main.yml
[WARNING]: Host file not found: /etc/ansible/hosts
[WARNING]: provided hosts list is empty, only localhost is available
PLAY [localhost] ***************************************************************
TASK [setup] *******************************************************************
ok: [localhost]
TASK [this should trigger main-handler-one] ************************************
changed: [localhost]
TASK [test.irh : this should trigger test.irh-handler-one] *********************
ERROR! The requested handler 'test.irh-handler-one' was not found in either the main handlers list nor in the listening handlers list"><pre class="notranslate"><code class="notranslate">$ ansible-playbook main.yml
[WARNING]: Host file not found: /etc/ansible/hosts
[WARNING]: provided hosts list is empty, only localhost is available
PLAY [localhost] ***************************************************************
TASK [setup] *******************************************************************
ok: [localhost]
TASK [this should trigger main-handler-one] ************************************
changed: [localhost]
TASK [test.irh : this should trigger test.irh-handler-one] *********************
ERROR! The requested handler 'test.irh-handler-one' was not found in either the main handlers list nor in the listening handlers list
</code></pre></div> | 1 |
<p dir="auto"><code class="notranslate">console.log(router)</code> shows correct asPath but If I access <code class="notranslate">console.log(router.asPath)</code> shows the previous URL</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">Code (<code class="notranslate">_app.js</code>)</h2>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default class MyApp extends App {
constructor(props) {
super(props)
}
static async getInitialProps({ Component, router, ctx }) {
// Router.asPath shows current URL, can be seen from browser console as below
console.log(router)
// But if i access the asPath property as below, it shows previous URL. On server side, it's fine
console.log(router.asPath)
}
...
}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">MyApp</span> <span class="pl-k">extends</span> <span class="pl-v">App</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">props</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">props</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-k">static</span> <span class="pl-k">async</span> <span class="pl-en">getInitialProps</span><span class="pl-kos">(</span><span class="pl-kos">{</span> Component<span class="pl-kos">,</span> router<span class="pl-kos">,</span> ctx <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// Router.asPath shows current URL, can be seen from browser console as below</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">router</span><span class="pl-kos">)</span>
<span class="pl-c">// But if i access the asPath property as below, it shows previous URL. On server side, it's fine</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">router</span><span class="pl-kos">.</span><span class="pl-c1">asPath</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>
...
<span class="pl-kos">}</span></pre></div>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Refer to above code, <code class="notranslate">router.asPath</code> should return current URL on client side</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Refer to above code, <code class="notranslate">router.asPath</code> returns previous URL on client side</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Please refer to above code example.</p>
<h2 dir="auto">Context</h2>
<p dir="auto">After url is <a href="https://github.com/zeit/next.js/blob/master/errors/url-deprecated.md">deprecated</a>, we pass URL from <code class="notranslate">_app.js</code>, as all pages need this for some sort of SEO related stuffs.</p>
<p dir="auto">as a workaround using <code class="notranslate">ctx.asPath</code> for now</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>6.0.0</td>
</tr>
<tr>
<td>node</td>
<td>9.x</td>
</tr>
<tr>
<td>OS</td>
<td>mac</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table> | <h1 dir="auto">Feature request</h1>
<p dir="auto">Client-side navigation without <code class="notranslate">getInitialProps</code> being called</p>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/31973492/63555645-9908cb00-c4f6-11e9-8869-d2ea47ab3939.png"><img width="1036" alt="Screen Shot 2019-08-22 at 3 32 11 PM" src="https://user-images.githubusercontent.com/31973492/63555645-9908cb00-c4f6-11e9-8869-d2ea47ab3939.png" style="max-width: 100%;"></a></p>
<ul dir="auto">
<li>
<p dir="auto">Headless CMS data is requested on every client-side route, slowing down the site.</p>
</li>
<li>
<p dir="auto">API keys are visible</p>
</li>
</ul>
<h2 dir="auto">Describe the solution you'd like</h2>
<p dir="auto">I'd like to be able to navigate through a site client-side (for page transitions) without having data requests in <code class="notranslate">getInitialProps</code></p>
<h2 dir="auto">Describe alternatives you've considered</h2>
<ul dir="auto">
<li>Gatsby</li>
<li>if statements inside <code class="notranslate">getInitialProps()</code> that only runs requests on the server. Results in an error, <code class="notranslate">An unexpected error has occurred.</code></li>
</ul> | 0 |
<p dir="auto">In the following program:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package main
import "fmt"
func main() {
const A = 0xfffffffffffffffff // error
// const A = 0x8000000000000000 // error
// const A = 0x7fffffffffffffff // ok
a := string(A)
for i, r := range a {
fmt.Printf("%d: %x\n", i, r)
}
}"><pre class="notranslate"><span class="pl-k">package</span> main
<span class="pl-k">import</span> <span class="pl-s">"fmt"</span>
<span class="pl-k">func</span> <span class="pl-en">main</span>() {
<span class="pl-k">const</span> <span class="pl-s1">A</span> <span class="pl-c1">=</span> <span class="pl-c1">0xfffffffffffffffff</span> <span class="pl-c">// error</span>
<span class="pl-c">// const A = 0x8000000000000000 // error</span>
<span class="pl-c">// const A = 0x7fffffffffffffff // ok</span>
<span class="pl-s1">a</span> <span class="pl-c1">:=</span> <span class="pl-en">string</span>(<span class="pl-s1">A</span>)
<span class="pl-k">for</span> <span class="pl-s1">i</span>, <span class="pl-s1">r</span> <span class="pl-c1">:=</span> <span class="pl-k">range</span> <span class="pl-s1">a</span> {
<span class="pl-s1">fmt</span>.<span class="pl-en">Printf</span>(<span class="pl-s">"%d: %x<span class="pl-cce">\n</span>"</span>, <span class="pl-s1">i</span>, <span class="pl-s1">r</span>)
}
}</pre></div>
<p dir="auto">The compiler issues error message <code class="notranslate">overflow in int -> string</code>.</p>
<p dir="auto">Form the Go Spec <a href="https://golang.org/ref/spec#Conversions" rel="nofollow">https://golang.org/ref/spec#Conversions</a></p>
<blockquote>
<p dir="auto">A constant value x can be converted to type T in any of these cases:</p>
<ul dir="auto">
<li>x is an integer constant and T is a string type. The same rule as for non-constant x applies in this case.</li>
</ul>
</blockquote>
<p dir="auto">...</p>
<blockquote>
<p dir="auto">A non-constant value x can be converted to type T in any of these cases:</p>
<ul dir="auto">
<li>x is an integer or a slice of bytes or runes and T is a string type.</li>
</ul>
</blockquote>
<p dir="auto">...</p>
<blockquote>
<p dir="auto">Conversions to and from a string type</p>
<ol dir="auto">
<li>Converting a signed or unsigned integer value to a string type yields a string containing the UTF-8<br>
representation of the integer. Values outside the range of valid Unicode code points are converted to<br>
"\uFFFD".</li>
</ol>
</blockquote>
<p dir="auto">According to the above, the conversion should succeed, with the resulting string containing the UTF-8 encoding of <code class="notranslate">0xfffd</code>.</p>
<p dir="auto"><code class="notranslate">gccgo</code> does not issue an error and behaves as in the spec.</p> | <p dir="auto">Gc rejects to compile the following program:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package a
var a = string(9223372036854775808)"><pre class="notranslate"><span class="pl-k">package</span> a
<span class="pl-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-en">string</span>(<span class="pl-c1">9223372036854775808</span>)</pre></div>
<p dir="auto">saying:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="overflow in int -> string"><pre class="notranslate"><code class="notranslate">overflow in int -> string
</code></pre></div>
<p dir="auto">go/types compile it successfully.</p>
<p dir="auto">Compilers must agree on whether it is a valid Go program or not.</p>
<p dir="auto">on commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/golang/go/commit/af817890aa7b628234075a6cb01a3a435fb8317d/hovercard" href="https://github.com/golang/go/commit/af817890aa7b628234075a6cb01a3a435fb8317d"><tt>af81789</tt></a></p> | 1 |
<p dir="auto">Currently, json.Unmarshal (and json.Decoder.Decode) ignore fields in the incoming JSON which are absent in a target struct.</p>
<p dir="auto">For example, the JSON <code class="notranslate">{ "A": true, "B": 123 }</code> will successfully unmarshal into <code class="notranslate">struct { A bool }</code>.</p>
<p dir="auto">This makes it difficult to do strict JSON parsing. One place this is an issue is in API creation, since you want to reject unknown fields on incoming JSON requests to allow safe introduction of new fields in the future (I've had this use case previously when working on a JSON REST API). It also can lead to typos leading to bugs in production: when a field is almost always the zero value in incoming JSON, you might not realise you're not even reading a misspelled field.</p>
<p dir="auto">I propose that a new method is added to <code class="notranslate">Decoder</code> to turn on this stricter parsing, in much the same way <code class="notranslate">UseNumber</code> is used today. When in strict parsing mode, a key in the incoming JSON which cannot be applied to a struct will result in an <code class="notranslate">MissingFieldError</code> error. Like <code class="notranslate">UnmarshalTypeError</code>, decoding would continue for the remaining incoming data.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="d := json.NewDecoder(r.Body)
d.UseStrictFields()
err := d.Decode(myStruct)"><pre class="notranslate"><code class="notranslate">d := json.NewDecoder(r.Body)
d.UseStrictFields()
err := d.Decode(myStruct)
</code></pre></div> | <ol dir="auto">
<li>What version of Go are you using? <code class="notranslate">5.3</code></li>
<li>What operating system and processor architecture are you using? <code class="notranslate">amd64,windows</code></li>
<li>What did you do?<br>
Read this: <a href="https://mailarchive.ietf.org/arch/msg/json/Ju-bwuRv-bq9IuOGzwqlV3aU9XE" rel="nofollow">https://mailarchive.ietf.org/arch/msg/json/Ju-bwuRv-bq9IuOGzwqlV3aU9XE</a></li>
<li>What did you expect to see?<br>
...</li>
<li>What did you see instead?<br>
...</li>
</ol> | 1 |
<h2 dir="auto">Proposed functionality</h2>
<p dir="auto">A new <code class="notranslate">setStorageState()</code> API on the <code class="notranslate">context</code> object that applies any given storage state to the current page.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="context.setStorageState({ path: '/storage.json' })
context.setStorageState({
cookies: [...],
origins: [...]
})"><pre class="notranslate"><span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">setStorageState</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">path</span>: <span class="pl-s">'/storage.json'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">setStorageState</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">cookies</span>: <span class="pl-kos">[</span>...<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">origins</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 API is opposite in its functionality to the existing <code class="notranslate">context.storageState()</code> that flushes the storage state to the disk.</p>
<h2 dir="auto">Use case</h2>
<p dir="auto">The <a href="https://playwright.dev/docs/test-auth#reuse-signed-in-state" rel="nofollow">Authentication</a> docs showcase a great example of creating a browser context, performing sign-in, and storing that session in a JSON file. However, to <em>use</em> that session file you need to create a new browsing context. This is not suitable when using <code class="notranslate">@playwright/test</code> and wanting to control auth state per test.</p>
<p dir="auto">The recommended example shows that we can create separate contexts with a different session, and that works great, but you lose the ability to use the already existing <code class="notranslate">context</code> that gets created by the Playwright test runner. You also lose any custom fixtures as they are attached to that default context.</p>
<p dir="auto">In general, I see no reason not to have the "read" functionality for the session state.</p>
<h2 dir="auto">Implementation</h2>
<p dir="auto">You're already using this logic in Playwright, it's just internal:</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/microsoft/playwright/blob/1303e3e355fcdfd4e7f66650dbd9fca6645db5e3/packages/playwright-core/src/server/browserContext.ts#L512-L537">playwright/packages/playwright-core/src/server/browserContext.ts</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 512 to 537
in
<a data-pjax="true" class="commit-tease-sha" href="/microsoft/playwright/commit/1303e3e355fcdfd4e7f66650dbd9fca6645db5e3">1303e3e</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="L512" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="512"></td>
<td id="LC512" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">async</span> <span class="pl-en">setStorageState</span><span class="pl-kos">(</span><span class="pl-s1">metadata</span>: <span class="pl-smi">CallMetadata</span><span class="pl-kos">,</span> <span class="pl-s1">state</span>: <span class="pl-smi">NonNullable</span><span class="pl-kos"><</span><span class="pl-s1">channels</span><span class="pl-kos">.</span><span class="pl-smi">BrowserNewContextParams</span><span class="pl-kos">[</span><span class="pl-s">'storageState'</span><span class="pl-kos">]</span><span class="pl-kos">></span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td>
</tr>
<tr class="border-0">
<td id="L513" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="513"></td>
<td id="LC513" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">_settingStorageState</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L514" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="514"></td>
<td id="LC514" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">try</span> <span class="pl-kos">{</span> </td>
</tr>
<tr class="border-0">
<td id="L515" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="515"></td>
<td id="LC515" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">state</span><span class="pl-kos">.</span><span class="pl-c1">cookies</span><span class="pl-kos">)</span> </td>
</tr>
<tr class="border-0">
<td id="L516" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="516"></td>
<td id="LC516" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">await</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">addCookies</span><span class="pl-kos">(</span><span class="pl-s1">state</span><span class="pl-kos">.</span><span class="pl-c1">cookies</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L517" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="517"></td>
<td id="LC517" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">state</span><span class="pl-kos">.</span><span class="pl-c1">origins</span> <span class="pl-c1">&&</span> <span class="pl-s1">state</span><span class="pl-kos">.</span><span class="pl-c1">origins</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td>
</tr>
<tr class="border-0">
<td id="L518" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="518"></td>
<td id="LC518" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">const</span> <span class="pl-s1">internalMetadata</span> <span class="pl-c1">=</span> <span class="pl-en">serverSideCallMetadata</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L519" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="519"></td>
<td id="LC519" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <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-smi">this</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-s1">internalMetadata</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L520" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="520"></td>
<td id="LC520" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">_setServerRequestInterceptor</span><span class="pl-kos">(</span><span class="pl-s1">handler</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> </td>
</tr>
<tr class="border-0">
<td id="L521" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="521"></td>
<td id="LC521" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">handler</span><span class="pl-kos">.</span><span class="pl-en">fulfill</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">body</span>: <span class="pl-s">'<html></html>'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">catch</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L522" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="522"></td>
<td id="LC522" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L523" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="523"></td>
<td id="LC523" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">const</span> <span class="pl-s1">originState</span> <span class="pl-k">of</span> <span class="pl-s1">state</span><span class="pl-kos">.</span><span class="pl-c1">origins</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td>
</tr>
<tr class="border-0">
<td id="L524" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="524"></td>
<td id="LC524" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">const</span> <span class="pl-s1">frame</span> <span class="pl-c1">=</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">mainFrame</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L525" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="525"></td>
<td id="LC525" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">await</span> <span class="pl-s1">frame</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s1">metadata</span><span class="pl-kos">,</span> <span class="pl-s1">originState</span><span class="pl-kos">.</span><span class="pl-c1">origin</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L526" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="526"></td>
<td id="LC526" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">await</span> <span class="pl-s1">frame</span><span class="pl-kos">.</span><span class="pl-en">evaluateExpression</span><span class="pl-kos">(</span><span class="pl-s">`</span> </td>
</tr>
<tr class="border-0">
<td id="L527" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="527"></td>
<td id="LC527" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> originState => {</span> </td>
</tr>
<tr class="border-0">
<td id="L528" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="528"></td>
<td id="LC528" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> for (const { name, value } of (originState.localStorage || []))</span> </td>
</tr>
<tr class="border-0">
<td id="L529" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="529"></td>
<td id="LC529" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> localStorage.setItem(name, value);</span> </td>
</tr>
<tr class="border-0">
<td id="L530" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="530"></td>
<td id="LC530" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> }`</span><span class="pl-kos">,</span> <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-s1">originState</span><span class="pl-kos">,</span> <span class="pl-s">'utility'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L531" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="531"></td>
<td id="LC531" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td>
</tr>
<tr class="border-0">
<td id="L532" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="532"></td>
<td id="LC532" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-s1">internalMetadata</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L533" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="533"></td>
<td id="LC533" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td>
</tr>
<tr class="border-0">
<td id="L534" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="534"></td>
<td id="LC534" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span> </td>
</tr>
<tr class="border-0">
<td id="L535" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="535"></td>
<td id="LC535" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">_settingStorageState</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L536" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="536"></td>
<td id="LC536" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td>
</tr>
<tr class="border-0">
<td id="L537" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="537"></td>
<td id="LC537" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto">I propose to abstract it into a general function, dropping internals like <code class="notranslate">this. _settingStorageState</code>, and reuse it in the new <code class="notranslate">page.setStorageState()</code> API.</p> | <p dir="auto">We have the ability to sniff websockets and use events on messages bi directionally, which is great, but can we also modify those messages? Either change them if they are fired, or send them directly to the websocket? It seems like following the "Route.ContinueAsync" flow works well, but it'd be even better if we can create a request since we already have the "WebSocket" class within the event handler.</p>
<p dir="auto">Note: also created on the C# implementation repo since that's what I'm using, but figured I'd put it here too since this appears to be the main repo. We can close whichever is more appropriate:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="904255351" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright-dotnet/issues/1450" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright-dotnet/issues/1450/hovercard" href="https://github.com/microsoft/playwright-dotnet/issues/1450">microsoft/playwright-dotnet#1450</a></p> | 0 |
<p dir="auto">From <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="68505997" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/6380" data-hovercard-type="pull_request" data-hovercard-url="/atom/atom/pull/6380/hovercard?comment_id=94878888&comment_type=issue_comment" href="https://github.com/atom/atom/pull/6380#issuecomment-94878888">#6380 (comment)</a></p>
<blockquote>
<p dir="auto">I think it's critical. It's not about atom crashing or not crashing. It's about a myriad of other things crashing on a computer. It's about being able to not kill a junior because he or she accidentally hit the reset button on your computer. Sublime gives you the "don't worry about it" guarantee. It's a state of mind and affects your workflow. I was used to having many unnamed buffers open with random scratch data. I didn't need to save it anywhere but sublime kept them around.</p>
</blockquote>
<hr>
<p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/maxbrunsfeld/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/maxbrunsfeld">@maxbrunsfeld</a> on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="68505997" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/6380" data-hovercard-type="pull_request" data-hovercard-url="/atom/atom/pull/6380/hovercard?comment_id=94881588&comment_type=issue_comment" href="https://github.com/atom/atom/pull/6380#issuecomment-94881588">#6380 (comment)</a></p>
<blockquote>
<p dir="auto">I think this use case is covered though, because Atom should quit normally during a system restart (at least on OSX and Linux).</p>
</blockquote>
<p dir="auto">Not when I hard reset my computer with a physical reset button which is quite accessible and happens to be right next to the USB ports.</p>
<hr>
<p dir="auto">Open atom, type some text, and hit <code class="notranslate">Ctrl+Q</code></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/753919/7258673/e6d837c8-e812-11e4-8232-c4f8d736fb5c.png"><img src="https://cloud.githubusercontent.com/assets/753919/7258673/e6d837c8-e812-11e4-8232-c4f8d736fb5c.png" alt="screenshot from 2015-04-21 10 40 49" style="max-width: 100%;"></a></p>
<p dir="auto">I should not be able to lose work at all, at any time, for any reason. In sublime I can do the above and then immediately re-open and all is well.</p>
<hr>
<p dir="auto">To summarize, we need a few things:</p>
<ul dir="auto">
<li>Save unnamed buffers when atom is closed normally</li>
<li>Porting the "hot exit" feature from sublime. When atom is closed, it is immediately closed without any popup and can be re-opened in the exact state it was left</li>
<li>On some configurable interval we save the state to allow the application to pick back up in case of fire</li>
</ul> | <p dir="auto">One feature I love of an increasing number of Mac OSX Lion and above apps is the auto-saving of untitled buffers. If I quit an app that supports this behavior and re-open it, even untitled buffers (never explicitly named and saved) are restored. This lets me have greater confidence about using these apps as "clipboards," knowing that even if I crash or accidentally close the app, I'll have some reasonably up-to-date copy of the file restored.</p>
<p dir="auto">Sublime is the front-of-mind example for this in my daily workflow.</p> | 1 |
<ul dir="auto">
<li>[√] 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>[√] 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.4.1</li>
<li>Operating System version: docker alpine in k8s</li>
<li>Java version: 1.8</li>
<li>register: nacos 1.1.3</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>Start module A and module B, A depends on B, the register is nacos. Now A invoke B's dubbo interface correct.</li>
<li>Restart module B, because in k8s and module B’s IP address is changed.</li>
<li>Now A invoke B correct, but A begin reconnect to the old provider B and can not stop. The logs as below:</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">What do you expected from the above steps?</h3>
<p dir="auto">stop reconnect to the old provider</p>
<h3 dir="auto">What actually happens?</h3>
<p dir="auto">Actual Result is cannot stop reconnect to the old provider</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="[ERROR] 2020-03-31 22:16:19.303 [] [] [dubbo-client-idleCheck-thread-1] ReconnectTimerTask.doTask[51]: [DUBBO] Fail to connect to HeaderExchangeClient [channel=org.apache.dubbo.remoting.transport.netty4.NettyClient [10.42.1.119:0 -> /10.42.1.115:20881]], dubbo version: 2.7.4.1, current host: 10.42.1.119
org.apache.dubbo.remoting.RemotingException: client(url: dubbo://10.42.1.115:20881/com.alibaba.cloud.dubbo.service.DubboMetadataService?anyhost=true&application=mall-open&bind.ip=10.42.1.115&bind.port=20881&check=false&codec=dubbo&deprecated=false&dubbo=2.0.2&dynamic=true&generic=true&group=mall-goods&heartbeat=60000&interface=com.alibaba.cloud.dubbo.service.DubboMetadataService&lazy=false&methods=getAllServiceKeys,getServiceRestMetadata,getExportedURLs,getAllExportedURLs&pid=6&qos.enable=false&register.ip=10.42.1.119&release=2.7.4.1&remote.application=mall-goods&revision=2.2.0.RELEASE&side=consumer&sticky=false&timeout=30000&timestamp=1585642448627&version=1.0.0) failed to connect to server /10.42.1.115:20881 client-side timeout 3000ms (elapsed: 3000ms) from netty client 10.42.1.119 using dubbo version 2.7.4.1
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:166)
at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:190)
at org.apache.dubbo.remoting.transport.AbstractClient.reconnect(AbstractClient.java:246)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.reconnect(HeaderExchangeClient.java:155)
at org.apache.dubbo.remoting.exchange.support.header.ReconnectTimerTask.doTask(ReconnectTimerTask.java:49)
at org.apache.dubbo.remoting.exchange.support.header.AbstractTimerTask.run(AbstractTimerTask.java:87)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:648)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:727)
at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:449)
at java.lang.Thread.run(Thread.java:748)
[ERROR] 2020-03-31 22:17:23.303 [] [] [dubbo-client-idleCheck-thread-1] ReconnectTimerTask.doTask[51]: [DUBBO] Fail to connect to HeaderExchangeClient [channel=org.apache.dubbo.remoting.transport.netty4.NettyClient [10.42.1.119:0 -> /10.42.1.115:20881]], dubbo version: 2.7.4.1, current host: 10.42.1.119
org.apache.dubbo.remoting.RemotingException: client(url: dubbo://10.42.1.115:20881/com.alibaba.cloud.dubbo.service.DubboMetadataService?anyhost=true&application=mall-open&bind.ip=10.42.1.115&bind.port=20881&check=false&codec=dubbo&deprecated=false&dubbo=2.0.2&dynamic=true&generic=true&group=mall-goods&heartbeat=60000&interface=com.alibaba.cloud.dubbo.service.DubboMetadataService&lazy=false&methods=getAllServiceKeys,getServiceRestMetadata,getExportedURLs,getAllExportedURLs&pid=6&qos.enable=false&register.ip=10.42.1.119&release=2.7.4.1&remote.application=mall-goods&revision=2.2.0.RELEASE&side=consumer&sticky=false&timeout=30000&timestamp=1585642448627&version=1.0.0) failed to connect to server /10.42.1.115:20881 client-side timeout 3000ms (elapsed: 3000ms) from netty client 10.42.1.119 using dubbo version 2.7.4.1
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:166)
at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:190)
at org.apache.dubbo.remoting.transport.AbstractClient.reconnect(AbstractClient.java:246)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.reconnect(HeaderExchangeClient.java:155)
at org.apache.dubbo.remoting.exchange.support.header.ReconnectTimerTask.doTask(ReconnectTimerTask.java:49)
at org.apache.dubbo.remoting.exchange.support.header.AbstractTimerTask.run(AbstractTimerTask.java:87)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:648)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:727)
at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:449)
at java.lang.Thread.run(Thread.java:748)
[ERROR] 2020-03-31 22:18:27.303 [] [] [dubbo-client-idleCheck-thread-1] ReconnectTimerTask.doTask[51]: [DUBBO] Fail to connect to HeaderExchangeClient [channel=org.apache.dubbo.remoting.transport.netty4.NettyClient [10.42.1.119:0 -> /10.42.1.115:20881]], dubbo version: 2.7.4.1, current host: 10.42.1.119
org.apache.dubbo.remoting.RemotingException: client(url: dubbo://10.42.1.115:20881/com.alibaba.cloud.dubbo.service.DubboMetadataService?anyhost=true&application=mall-open&bind.ip=10.42.1.115&bind.port=20881&check=false&codec=dubbo&deprecated=false&dubbo=2.0.2&dynamic=true&generic=true&group=mall-goods&heartbeat=60000&interface=com.alibaba.cloud.dubbo.service.DubboMetadataService&lazy=false&methods=getAllServiceKeys,getServiceRestMetadata,getExportedURLs,getAllExportedURLs&pid=6&qos.enable=false&register.ip=10.42.1.119&release=2.7.4.1&remote.application=mall-goods&revision=2.2.0.RELEASE&side=consumer&sticky=false&timeout=30000&timestamp=1585642448627&version=1.0.0) failed to connect to server /10.42.1.115:20881 client-side timeout 3000ms (elapsed: 3000ms) from netty client 10.42.1.119 using dubbo version 2.7.4.1
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:166)
at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:190)
at org.apache.dubbo.remoting.transport.AbstractClient.reconnect(AbstractClient.java:246)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.reconnect(HeaderExchangeClient.java:155)
at org.apache.dubbo.remoting.exchange.support.header.ReconnectTimerTask.doTask(ReconnectTimerTask.java:49)
at org.apache.dubbo.remoting.exchange.support.header.AbstractTimerTask.run(AbstractTimerTask.java:87)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:648)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:727)
at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:449)
at java.lang.Thread.run(Thread.java:748)"><pre class="notranslate"><code class="notranslate">[ERROR] 2020-03-31 22:16:19.303 [] [] [dubbo-client-idleCheck-thread-1] ReconnectTimerTask.doTask[51]: [DUBBO] Fail to connect to HeaderExchangeClient [channel=org.apache.dubbo.remoting.transport.netty4.NettyClient [10.42.1.119:0 -> /10.42.1.115:20881]], dubbo version: 2.7.4.1, current host: 10.42.1.119
org.apache.dubbo.remoting.RemotingException: client(url: dubbo://10.42.1.115:20881/com.alibaba.cloud.dubbo.service.DubboMetadataService?anyhost=true&application=mall-open&bind.ip=10.42.1.115&bind.port=20881&check=false&codec=dubbo&deprecated=false&dubbo=2.0.2&dynamic=true&generic=true&group=mall-goods&heartbeat=60000&interface=com.alibaba.cloud.dubbo.service.DubboMetadataService&lazy=false&methods=getAllServiceKeys,getServiceRestMetadata,getExportedURLs,getAllExportedURLs&pid=6&qos.enable=false&register.ip=10.42.1.119&release=2.7.4.1&remote.application=mall-goods&revision=2.2.0.RELEASE&side=consumer&sticky=false&timeout=30000&timestamp=1585642448627&version=1.0.0) failed to connect to server /10.42.1.115:20881 client-side timeout 3000ms (elapsed: 3000ms) from netty client 10.42.1.119 using dubbo version 2.7.4.1
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:166)
at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:190)
at org.apache.dubbo.remoting.transport.AbstractClient.reconnect(AbstractClient.java:246)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.reconnect(HeaderExchangeClient.java:155)
at org.apache.dubbo.remoting.exchange.support.header.ReconnectTimerTask.doTask(ReconnectTimerTask.java:49)
at org.apache.dubbo.remoting.exchange.support.header.AbstractTimerTask.run(AbstractTimerTask.java:87)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:648)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:727)
at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:449)
at java.lang.Thread.run(Thread.java:748)
[ERROR] 2020-03-31 22:17:23.303 [] [] [dubbo-client-idleCheck-thread-1] ReconnectTimerTask.doTask[51]: [DUBBO] Fail to connect to HeaderExchangeClient [channel=org.apache.dubbo.remoting.transport.netty4.NettyClient [10.42.1.119:0 -> /10.42.1.115:20881]], dubbo version: 2.7.4.1, current host: 10.42.1.119
org.apache.dubbo.remoting.RemotingException: client(url: dubbo://10.42.1.115:20881/com.alibaba.cloud.dubbo.service.DubboMetadataService?anyhost=true&application=mall-open&bind.ip=10.42.1.115&bind.port=20881&check=false&codec=dubbo&deprecated=false&dubbo=2.0.2&dynamic=true&generic=true&group=mall-goods&heartbeat=60000&interface=com.alibaba.cloud.dubbo.service.DubboMetadataService&lazy=false&methods=getAllServiceKeys,getServiceRestMetadata,getExportedURLs,getAllExportedURLs&pid=6&qos.enable=false&register.ip=10.42.1.119&release=2.7.4.1&remote.application=mall-goods&revision=2.2.0.RELEASE&side=consumer&sticky=false&timeout=30000&timestamp=1585642448627&version=1.0.0) failed to connect to server /10.42.1.115:20881 client-side timeout 3000ms (elapsed: 3000ms) from netty client 10.42.1.119 using dubbo version 2.7.4.1
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:166)
at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:190)
at org.apache.dubbo.remoting.transport.AbstractClient.reconnect(AbstractClient.java:246)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.reconnect(HeaderExchangeClient.java:155)
at org.apache.dubbo.remoting.exchange.support.header.ReconnectTimerTask.doTask(ReconnectTimerTask.java:49)
at org.apache.dubbo.remoting.exchange.support.header.AbstractTimerTask.run(AbstractTimerTask.java:87)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:648)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:727)
at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:449)
at java.lang.Thread.run(Thread.java:748)
[ERROR] 2020-03-31 22:18:27.303 [] [] [dubbo-client-idleCheck-thread-1] ReconnectTimerTask.doTask[51]: [DUBBO] Fail to connect to HeaderExchangeClient [channel=org.apache.dubbo.remoting.transport.netty4.NettyClient [10.42.1.119:0 -> /10.42.1.115:20881]], dubbo version: 2.7.4.1, current host: 10.42.1.119
org.apache.dubbo.remoting.RemotingException: client(url: dubbo://10.42.1.115:20881/com.alibaba.cloud.dubbo.service.DubboMetadataService?anyhost=true&application=mall-open&bind.ip=10.42.1.115&bind.port=20881&check=false&codec=dubbo&deprecated=false&dubbo=2.0.2&dynamic=true&generic=true&group=mall-goods&heartbeat=60000&interface=com.alibaba.cloud.dubbo.service.DubboMetadataService&lazy=false&methods=getAllServiceKeys,getServiceRestMetadata,getExportedURLs,getAllExportedURLs&pid=6&qos.enable=false&register.ip=10.42.1.119&release=2.7.4.1&remote.application=mall-goods&revision=2.2.0.RELEASE&side=consumer&sticky=false&timeout=30000&timestamp=1585642448627&version=1.0.0) failed to connect to server /10.42.1.115:20881 client-side timeout 3000ms (elapsed: 3000ms) from netty client 10.42.1.119 using dubbo version 2.7.4.1
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:166)
at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:190)
at org.apache.dubbo.remoting.transport.AbstractClient.reconnect(AbstractClient.java:246)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.reconnect(HeaderExchangeClient.java:155)
at org.apache.dubbo.remoting.exchange.support.header.ReconnectTimerTask.doTask(ReconnectTimerTask.java:49)
at org.apache.dubbo.remoting.exchange.support.header.AbstractTimerTask.run(AbstractTimerTask.java:87)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:648)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:727)
at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:449)
at java.lang.Thread.run(Thread.java:748)
</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/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" checked=""> 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: 2.7.0</li>
<li>Operating System version: any</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">Our company's registry is able to support request route (same as TagRouter), but we are able to combine one invoker to two different route rule.<br>
eg:<br>
TagRoute1:<br>
-> Group1 (weight: 1)<br>
-> Invoker1<br>
-> Gropu2 (weight: 9)<br>
-> Invoker2<br>
TagRoute2:<br>
-> Group1 (weight: 5)<br>
-> Invoker1<br>
-> Gropu2 (weight: 5)<br>
-> Invoker2</p>
<p dir="auto">In the consumer side, the call to Invoker1 and Invoker2 will have 1:9 weight in TagRoute1. The 5:5 weight for them in TagRoute2.<br>
The issue is that the dubbo get weight from invoker url, not in route level.</p>
<p dir="auto">I have some ideas for that which one do you prefer? If solutions have been fixed, then i can send a PR to fix it.</p>
<ol dir="auto">
<li>Add setUrl method for Invoker, then we are able to set weight in invoker URL.</li>
<li>Extend the invoker with weight property, then we are able to set weight for each invoker in the Router level.</li>
<li>Extend the AbstractLoadBalance, we are able to extend the getWeight.</li>
</ol>
<p dir="auto">When</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> | 0 |
<h4 dir="auto">Instructions</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/20180897/44659546-2d049b80-aa37-11e8-8b9d-505440c93bf0.png"><img src="https://user-images.githubusercontent.com/20180897/44659546-2d049b80-aa37-11e8-8b9d-505440c93bf0.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/20180897/44659569-41489880-aa37-11e8-9660-8d4b461ee452.png"><img src="https://user-images.githubusercontent.com/20180897/44659569-41489880-aa37-11e8-9660-8d4b461ee452.png" alt="image" style="max-width: 100%;"></a></p>
<h4 dir="auto">Summary</h4>
<h4 dir="auto">Context</h4> | <p dir="auto">For example, twitter uses stream api to publish tweet updates in a single http connection via chunked encoding.</p>
<p dir="auto">I'm doing something similar with one of my servers for a publish-subscribe model.</p>
<p dir="auto">As far as I can tell, axios doesn't support chunked encoding at the moment - if I just do a <code class="notranslate">.get</code> it just keeps going forever without triggering <code class="notranslate">.then</code> and there's no way to handle new data as it arrives.</p> | 0 |
<p dir="auto">Running Chrome [Version 44.0.2403.155 (64-bit)] on Mac [Version 10.10.5 (14F27)]. Solution appears to be correct, but is not being accepted. Entered manually and also cut & paste from example.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7781587/9428615/4bab1276-4982-11e5-8019-1064ab0f01c3.png"><img src="https://cloud.githubusercontent.com/assets/7781587/9428615/4bab1276-4982-11e5-8019-1064ab0f01c3.png" alt="screen shot 2015-08-23 at 10 32 17 am" style="max-width: 100%;"></a></p>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-target-html-elements-with-selectors-using-jquery" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-target-html-elements-with-selectors-using-jquery</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-target-html-elements-with-selectors-using-jquery" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-target-html-elements-with-selectors-using-jquery</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible. On this challenge I'm trying to figure out if I got the right code or not. I talk to a camper about this challenge and he said there was bugs, but they have been fixed. So I'm just wondering if its me or not. My code is</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" <script>
$(document).ready(function() {
$("button").addClass("animated bounce");
});
</script>
"><pre class="notranslate"> <span class="pl-c1"><</span><span class="pl-ent">script</span><span class="pl-c1">></span>
$(document).ready(function() <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 bounce"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>);
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">script</span><span class="pl-c1">></span></pre></div> | 1 |
<p dir="auto">Atom will reload a file if no changes have been made but if you make changes and then the file is updated by another person before you save there is no indication that you are about to override someone else changes. This is problematic when working on remote shares where a team can be editing the same file. It would be nice if Atom would prompt you that the file was changed outside of Atom and ask if you would like to reload the file.</p> | <p dir="auto">today i worked on a project with sublime text and atom. i edited a file on sublime text, saved the changes and opened atom(the same file). both editors were open at the same time. but when i go to atom, there was no change detection to the file and all the changes, made in sublime text, were gone.</p>
<p dir="auto">what i miss is a popup, mentioning that the file has changed and ask whether reloading.</p> | 1 |
<p dir="auto">It seems that numpy does not recognize the following overflow error:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: import numpy as np
In [2]: data = np.array((65536, 65535), dtype=np.int32)
In [3]: np.geterr()
Out[3]: {'divide': 'warn', 'invalid': 'warn', 'over': 'warn', 'under': 'ignore'}
In [4]: np.cumprod(data)
Out[4]: array([ 65536, -65536], dtype=int32)
In [5]: with np.errstate(over="raise"):
...: np.cumprod(data)
...:"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>((<span class="pl-c1">65536</span>, <span class="pl-c1">65535</span>), <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">int32</span>)
<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">np</span>.<span class="pl-en">geterr</span>()
<span class="pl-v">Out</span>[<span class="pl-c1">3</span>]: {<span class="pl-s">'divide'</span>: <span class="pl-s">'warn'</span>, <span class="pl-s">'invalid'</span>: <span class="pl-s">'warn'</span>, <span class="pl-s">'over'</span>: <span class="pl-s">'warn'</span>, <span class="pl-s">'under'</span>: <span class="pl-s">'ignore'</span>}
<span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">np</span>.<span class="pl-en">cumprod</span>(<span class="pl-s1">data</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">4</span>]: <span class="pl-en">array</span>([ <span class="pl-c1">65536</span>, <span class="pl-c1">-</span><span class="pl-c1">65536</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">int32</span>)
<span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">with</span> <span class="pl-s1">np</span>.<span class="pl-en">errstate</span>(<span class="pl-s1">over</span><span class="pl-c1">=</span><span class="pl-s">"raise"</span>):
...: <span class="pl-s1">np</span>.<span class="pl-en">cumprod</span>(<span class="pl-s1">data</span>)
...:</pre></div>
<p dir="auto">No warnings or exceptions are raised</p> | <p dir="auto">I just noticed that this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [1]: import numpy as np
In [2]: arr = np.zeros((2, 3), dtype=np.int16) + np.int16(3201)
In [3]: arr.T.dot(arr)
Out[3]:
array([[-19966, -19966, -19966],
[-19966, -19966, -19966],
[-19966, -19966, -19966]], dtype=int16)"><pre class="notranslate"><code class="notranslate">In [1]: import numpy as np
In [2]: arr = np.zeros((2, 3), dtype=np.int16) + np.int16(3201)
In [3]: arr.T.dot(arr)
Out[3]:
array([[-19966, -19966, -19966],
[-19966, -19966, -19966],
[-19966, -19966, -19966]], dtype=int16)
</code></pre></div>
<p dir="auto">spits out no warning about integer overflow. Is it possible to generate one?</p> | 1 |
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
import pandas as pd
import numpy as np
df = pd.DataFrame({'a': np.random.randint(0, 100, 10)})
df['b'] = pd.cut(df['a'], np.arange(0, 110, 10))
pd.merge(df, df, on='b')
"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</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">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'a'</span>: <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-c1">0</span>, <span class="pl-c1">100</span>, <span class="pl-c1">10</span>)})
<span class="pl-s1">df</span>[<span class="pl-s">'b'</span>] <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">cut</span>(<span class="pl-s1">df</span>[<span class="pl-s">'a'</span>], <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>, <span class="pl-c1">110</span>, <span class="pl-c1">10</span>))
<span class="pl-s1">pd</span>.<span class="pl-en">merge</span>(<span class="pl-s1">df</span>, <span class="pl-s1">df</span>, <span class="pl-s1">on</span><span class="pl-c1">=</span><span class="pl-s">'b'</span>)</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">pd.merge(df, df, on='b')</p>
<p dir="auto">Out:<br>
a_x b a_y<br>
0 66 (60, 70] 66<br>
1 66 (60, 70] 68<br>
2 68 (60, 70] 66<br>
3 68 (60, 70] 68<br>
4 93 (90, 100] 93<br>
5 43 (40, 50] 43<br>
6 43 (40, 50] 43<br>
7 43 (40, 50] 43<br>
8 43 (40, 50] 43<br>
9 37 (30, 40] 37<br>
10 37 (30, 40] 35<br>
11 35 (30, 40] 37<br>
12 35 (30, 40] 35<br>
13 2 (0, 10] 2<br>
14 2 (0, 10] 4<br>
15 4 (0, 10] 2<br>
16 4 (0, 10] 4<br>
17 86 (80, 90] 86</p>
<p dir="auto">df</p>
<p dir="auto">Out:<br>
a b<br>
0 66 (60, 70]<br>
1 93 (90, 100]<br>
2 43 (40, 50]<br>
3 37 (30, 40]<br>
4 68 (60, 70]<br>
5 2 (0, 10]<br>
6 43 (40, 50]<br>
7 86 (80, 90]<br>
8 35 (30, 40]<br>
9 4 (0, 10]</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">merge result's len should be equal to df</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.6.4.final.0<br>
python-bits: 64<br>
OS: Darwin<br>
OS-release: 17.5.0<br>
machine: x86_64<br>
processor: i386<br>
byteorder: little<br>
LC_ALL: en_US.UTF-8<br>
LANG: en_US.UTF-8<br>
LOCALE: en_US.UTF-8</p>
<p dir="auto">pandas: 0.21.0<br>
pytest: None<br>
pip: 9.0.1<br>
setuptools: 28.8.0<br>
Cython: None<br>
numpy: 1.13.1<br>
scipy: 0.19.1<br>
pyarrow: None<br>
xarray: None<br>
IPython: 6.0.0<br>
sphinx: None<br>
patsy: None<br>
dateutil: 2.6.1<br>
pytz: 2017.3<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: None<br>
feather: None<br>
matplotlib: None<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: 0.999999999<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.6<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details> | <p dir="auto"><code class="notranslate">pd.qcut</code> doesn't seem to support <code class="notranslate">ndarray</code> type. However, <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.qcut.html" rel="nofollow">docstrings</a> points <code class="notranslate">x : ndarray or Series</code></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [46]: d = range(5)
In [47]: d
Out[47]: [0, 1, 2, 3, 4]
In [48]: pd.qcut(d, [0, 1])
Out[48]:
[(-0.001, 4.0], (-0.001, 4.0], (-0.001, 4.0], (-0.001, 4.0], (-0.001, 4.0]]
Categories (1, interval[float64]): [(-0.001, 4.0]]
In [49]: d = np.array(range(5))
In [50]: d
Out[50]: array([0, 1, 2, 3, 4])
In [51]: pd.qcut(d, [0, 1])
Out[51]:
[(-0.001, 4.0], (-0.001, 4.0], (-0.001, 4.0], (-0.001, 4.0], (-0.001, 4.0]]
Categories (1, interval[float64]): [(-0.001, 4.0]]
In [52]: d = np.array([[x] for x in range(5)])
In [53]: type(d)
Out[53]: numpy.ndarray
In [54]: d
Out[54]:
array([[0],
[1],
[2],
[3],
[4]])
In [55]: pd.qcut(d, [0, 1])
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-55-b172e74b0ffd> in <module>()
----> 1 pd.qcut(d, [0, 1])
e:\github\pandas\pandas\core\reshape\tile.pyc in qcut(x, q, labels, retbins, precision, duplicates)
206 fac, bins = _bins_to_cuts(x, bins, labels=labels,
207 precision=precision, include_lowest=True,
--> 208 dtype=dtype, duplicates=duplicates)
209
210 return _postprocess_for_cut(fac, bins, retbins, x_is_series,
e:\github\pandas\pandas\core\reshape\tile.pyc in _bins_to_cuts(x, bins, right, labels, precision, include_lowest, dtype, duplicates)
258
259 np.putmask(ids, na_mask, 0)
--> 260 result = algos.take_nd(labels, ids - 1)
261
262 else:
e:\github\pandas\pandas\core\algorithms.pyc in take_nd(arr, indexer, axis, out, fill_value, mask_info, allow_fill)
1318 if is_categorical(arr):
1319 return arr.take_nd(indexer, fill_value=fill_value,
-> 1320 allow_fill=allow_fill)
1321 elif is_datetimetz(arr):
1322 return arr.take(indexer, fill_value=fill_value, allow_fill=allow_fill)
e:\github\pandas\pandas\core\categorical.pyc in take_nd(self, indexer, allow_fill, fill_value)
1703 assert isna(fill_value)
1704
-> 1705 codes = take_1d(self._codes, indexer, allow_fill=True, fill_value=-1)
1706 result = self._constructor(codes, categories=self.categories,
1707 ordered=self.ordered, fastpath=True)
e:\github\pandas\pandas\core\algorithms.pyc in take_nd(arr, indexer, axis, out, fill_value, mask_info, allow_fill)
1381 func = _get_take_nd_function(arr.ndim, arr.dtype, out.dtype, axis=axis,
1382 mask_info=mask_info)
-> 1383 func(arr, indexer, out, fill_value)
1384
1385 if flip_order:
e:\github\pandas\pandas\_libs\algos_take_helper.pxi in pandas._libs.algos.take_1d_int8_int8 (pandas\_libs\algos.c:75951)()
560 @cython.boundscheck(False)
561 def take_1d_int8_int8(ndarray[int8_t, ndim=1] values,
--> 562 int64_t[:] indexer,
563 int8_t[:] out,
564 fill_value=np.nan):
ValueError: Buffer has wrong number of dimensions (expected 1, got 2)"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">46</span>]: <span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-en">range</span>(<span class="pl-c1">5</span>)
<span class="pl-v">In</span> [<span class="pl-c1">47</span>]: <span class="pl-s1">d</span>
<span class="pl-v">Out</span>[<span class="pl-c1">47</span>]: [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>]
<span class="pl-v">In</span> [<span class="pl-c1">48</span>]: <span class="pl-s1">pd</span>.<span class="pl-en">qcut</span>(<span class="pl-s1">d</span>, [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>])
<span class="pl-v">Out</span>[<span class="pl-c1">48</span>]:
[(<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>], (<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>], (<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>], (<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>], (<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>]]
<span class="pl-v">Categories</span> (<span class="pl-c1">1</span>, <span class="pl-s1">interval</span>[<span class="pl-s1">float64</span>]): [(<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>]]
<span class="pl-v">In</span> [<span class="pl-c1">49</span>]: <span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-en">range</span>(<span class="pl-c1">5</span>))
<span class="pl-v">In</span> [<span class="pl-c1">50</span>]: <span class="pl-s1">d</span>
<span class="pl-v">Out</span>[<span class="pl-c1">50</span>]: <span class="pl-en">array</span>([<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>])
<span class="pl-v">In</span> [<span class="pl-c1">51</span>]: <span class="pl-s1">pd</span>.<span class="pl-en">qcut</span>(<span class="pl-s1">d</span>, [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>])
<span class="pl-v">Out</span>[<span class="pl-c1">51</span>]:
[(<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>], (<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>], (<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>], (<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>], (<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>]]
<span class="pl-v">Categories</span> (<span class="pl-c1">1</span>, <span class="pl-s1">interval</span>[<span class="pl-s1">float64</span>]): [(<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">4.0</span>]]
<span class="pl-v">In</span> [<span class="pl-c1">52</span>]: <span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([[<span class="pl-s1">x</span>] <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">5</span>)])
<span class="pl-v">In</span> [<span class="pl-c1">53</span>]: <span class="pl-en">type</span>(<span class="pl-s1">d</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">53</span>]: <span class="pl-s1">numpy</span>.<span class="pl-s1">ndarray</span>
<span class="pl-v">In</span> [<span class="pl-c1">54</span>]: <span class="pl-s1">d</span>
<span class="pl-v">Out</span>[<span class="pl-c1">54</span>]:
<span class="pl-en">array</span>([[<span class="pl-c1">0</span>],
[<span class="pl-c1">1</span>],
[<span class="pl-c1">2</span>],
[<span class="pl-c1">3</span>],
[<span class="pl-c1">4</span>]])
<span class="pl-v">In</span> [<span class="pl-c1">55</span>]: <span class="pl-s1">pd</span>.<span class="pl-en">qcut</span>(<span class="pl-s1">d</span>, [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>])
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">ValueError</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-c1"><</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">55</span><span class="pl-c1">-</span><span class="pl-s1">b172e74b0ffd</span><span class="pl-c1">></span> <span class="pl-s1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>()
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">1</span> <span class="pl-s1">pd</span>.<span class="pl-en">qcut</span>(<span class="pl-s1">d</span>, [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>])
<span class="pl-s1">e</span>:\g<span class="pl-s1">ithub</span>\p<span class="pl-s1">andas</span>\p<span class="pl-s1">andas</span>\c<span class="pl-s1">ore</span>\r<span class="pl-s1">eshape</span>\t<span class="pl-s1">ile</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">qcut</span>(<span class="pl-s1">x</span>, <span class="pl-s1">q</span>, <span class="pl-s1">labels</span>, <span class="pl-s1">retbins</span>, <span class="pl-s1">precision</span>, <span class="pl-s1">duplicates</span>)
<span class="pl-c1">206</span> <span class="pl-s1">fac</span>, <span class="pl-s1">bins</span> <span class="pl-c1">=</span> <span class="pl-en">_bins_to_cuts</span>(<span class="pl-s1">x</span>, <span class="pl-s1">bins</span>, <span class="pl-s1">labels</span><span class="pl-c1">=</span><span class="pl-s1">labels</span>,
<span class="pl-c1">207</span> <span class="pl-s1">precision</span><span class="pl-c1">=</span><span class="pl-s1">precision</span>, <span class="pl-s1">include_lowest</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">208</span> <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">dtype</span>, <span class="pl-s1">duplicates</span><span class="pl-c1">=</span><span class="pl-s1">duplicates</span>)
<span class="pl-c1">209</span>
<span class="pl-c1">210</span> <span class="pl-s1">return</span> <span class="pl-s1">_postprocess_for_cut</span>(<span class="pl-s1">fac</span>, <span class="pl-s1">bins</span>, <span class="pl-s1">retbins</span>, <span class="pl-s1">x_is_series</span>,
<span class="pl-s1">e</span>:\g<span class="pl-s1">ithub</span>\p<span class="pl-s1">andas</span>\p<span class="pl-s1">andas</span>\c<span class="pl-s1">ore</span>\r<span class="pl-s1">eshape</span>\t<span class="pl-s1">ile</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">_bins_to_cuts</span>(<span class="pl-s1">x</span>, <span class="pl-s1">bins</span>, <span class="pl-s1">right</span>, <span class="pl-s1">labels</span>, <span class="pl-s1">precision</span>, <span class="pl-s1">include_lowest</span>, <span class="pl-s1">dtype</span>, <span class="pl-s1">duplicates</span>)
<span class="pl-c1">258</span>
<span class="pl-c1">259</span> <span class="pl-s1">np</span>.<span class="pl-en">putmask</span>(<span class="pl-s1">ids</span>, <span class="pl-s1">na_mask</span>, <span class="pl-c1">0</span>)
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">260</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">algos</span>.<span class="pl-en">take_nd</span>(<span class="pl-s1">labels</span>, <span class="pl-s1">ids</span> <span class="pl-c1">-</span> <span class="pl-c1">1</span>)
<span class="pl-c1">261</span>
<span class="pl-c1">262</span> <span class="pl-k">else</span>:
<span class="pl-s1">e</span>:\g<span class="pl-s1">ithub</span>\p<span class="pl-s1">andas</span>\p<span class="pl-s1">andas</span>\c<span class="pl-s1">ore</span>\a<span class="pl-s1">lgorithms</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">take_nd</span>(<span class="pl-s1">arr</span>, <span class="pl-s1">indexer</span>, <span class="pl-s1">axis</span>, <span class="pl-s1">out</span>, <span class="pl-s1">fill_value</span>, <span class="pl-s1">mask_info</span>, <span class="pl-s1">allow_fill</span>)
<span class="pl-c1">1318</span> <span class="pl-k">if</span> <span class="pl-en">is_categorical</span>(<span class="pl-s1">arr</span>):
<span class="pl-c1">1319</span> <span class="pl-s1">return</span> <span class="pl-s1">arr</span>.<span class="pl-en">take_nd</span>(<span class="pl-s1">indexer</span>, <span class="pl-s1">fill_value</span><span class="pl-c1">=</span><span class="pl-s1">fill_value</span>,
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">1320</span> <span class="pl-s1">allow_fill</span><span class="pl-c1">=</span><span class="pl-s1">allow_fill</span>)
<span class="pl-c1">1321</span> <span class="pl-k">elif</span> <span class="pl-en">is_datetimetz</span>(<span class="pl-s1">arr</span>):
<span class="pl-c1">1322</span> <span class="pl-s1">return</span> <span class="pl-s1">arr</span>.<span class="pl-en">take</span>(<span class="pl-s1">indexer</span>, <span class="pl-s1">fill_value</span><span class="pl-c1">=</span><span class="pl-s1">fill_value</span>, <span class="pl-s1">allow_fill</span><span class="pl-c1">=</span><span class="pl-s1">allow_fill</span>)
<span class="pl-s1">e</span>:\g<span class="pl-s1">ithub</span>\p<span class="pl-s1">andas</span>\p<span class="pl-s1">andas</span>\c<span class="pl-s1">ore</span>\c<span class="pl-s1">ategorical</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">take_nd</span>(<span class="pl-s1">self</span>, <span class="pl-s1">indexer</span>, <span class="pl-s1">allow_fill</span>, <span class="pl-s1">fill_value</span>)
<span class="pl-c1">1703</span> <span class="pl-k">assert</span> <span class="pl-s1">isna</span>(<span class="pl-s1">fill_value</span>)
<span class="pl-c1">1704</span>
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">1705</span> <span class="pl-s1">codes</span> <span class="pl-c1">=</span> <span class="pl-s1">take_1d</span>(<span class="pl-s1">self</span>.<span class="pl-s1">_codes</span>, <span class="pl-s1">indexer</span>, <span class="pl-s1">allow_fill</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">fill_value</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>)
<span class="pl-c1">1706</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_constructor</span>(<span class="pl-s1">codes</span>, <span class="pl-s1">categories</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">categories</span>,
<span class="pl-c1">1707</span> <span class="pl-s1">ordered</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">ordered</span>, <span class="pl-s1">fastpath</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">e</span>:\g<span class="pl-s1">ithub</span>\p<span class="pl-s1">andas</span>\p<span class="pl-s1">andas</span>\c<span class="pl-s1">ore</span>\a<span class="pl-s1">lgorithms</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">take_nd</span>(<span class="pl-s1">arr</span>, <span class="pl-s1">indexer</span>, <span class="pl-s1">axis</span>, <span class="pl-s1">out</span>, <span class="pl-s1">fill_value</span>, <span class="pl-s1">mask_info</span>, <span class="pl-s1">allow_fill</span>)
<span class="pl-c1">1381</span> <span class="pl-s1">func</span> <span class="pl-c1">=</span> <span class="pl-s1">_get_take_nd_function</span>(<span class="pl-s1">arr</span>.<span class="pl-s1">ndim</span>, <span class="pl-s1">arr</span>.<span class="pl-s1">dtype</span>, <span class="pl-s1">out</span>.<span class="pl-s1">dtype</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-s1">axis</span>,
<span class="pl-c1">1382</span> <span class="pl-s1">mask_info</span><span class="pl-c1">=</span><span class="pl-s1">mask_info</span>)
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">1383</span> <span class="pl-en">func</span>(<span class="pl-s1">arr</span>, <span class="pl-s1">indexer</span>, <span class="pl-s1">out</span>, <span class="pl-s1">fill_value</span>)
<span class="pl-c1">1384</span>
<span class="pl-c1">1385</span> <span class="pl-k">if</span> <span class="pl-s1">flip_order</span>:
<span class="pl-s1">e</span>:\g<span class="pl-s1">ithub</span>\p<span class="pl-s1">andas</span>\p<span class="pl-s1">andas</span>\_<span class="pl-s1">libs</span>\a<span class="pl-s1">lgos_take_helper</span>.<span class="pl-s1">pxi</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">_libs</span>.<span class="pl-s1">algos</span>.<span class="pl-en">take_1d_int8_int8</span> (<span class="pl-s1">pandas</span>\_<span class="pl-s1">libs</span>\a<span class="pl-s1">lgos</span>.<span class="pl-s1">c</span>:<span class="pl-c1">75951</span>)()
<span class="pl-c1">560</span> @<span class="pl-s1">cython</span>.<span class="pl-en">boundscheck</span>(<span class="pl-c1">False</span>)
<span class="pl-c1">561</span> <span class="pl-k">def</span> <span class="pl-s1">take_1d_int8_int8</span>(<span class="pl-s1">ndarray</span>[<span class="pl-s1">int8_t</span>, <span class="pl-s1">ndim</span><span class="pl-c1">=</span><span class="pl-c1">1</span>] <span class="pl-s1">values</span>,
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">562</span> <span class="pl-s1">int64_t</span>[:] <span class="pl-s1">indexer</span>,
<span class="pl-c1">563</span> <span class="pl-s1">int8_t</span>[:] <span class="pl-s1">out</span>,
<span class="pl-c1">564</span> <span class="pl-s1">fill_value</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">nan</span>):
<span class="pl-v">ValueError</span>: <span class="pl-v">Buffer</span> <span class="pl-s1">has</span> <span class="pl-s1">wrong</span> <span class="pl-s1">number</span> <span class="pl-s1">of</span> <span class="pl-en">dimensions</span> (<span class="pl-s1">expected</span> <span class="pl-c1">1</span>, <span class="pl-s1">got</span> <span class="pl-c1">2</span>)</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto"><code class="notranslate">pd.qcut</code> doesn't seem to support <code class="notranslate">ndarray</code> type. However, <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.qcut.html" rel="nofollow">docstrings</a> points <code class="notranslate">x : ndarray or Series</code>.</p>
<p dir="auto">Is this expected behavior or does it imply ndarray means for shape <code class="notranslate">(n, )</code> only?</p>
<p dir="auto">I can confirm this was working in earlier versions.</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 61 Stepping 4, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
<p dir="auto">pandas: 0.22.0.dev0+16.gd70526b<br>
pytest: 3.2.0<br>
pip: 9.0.1<br>
setuptools: 36.2.7<br>
Cython: 0.24.1<br>
numpy: 1.12.1<br>
scipy: 0.19.1<br>
pyarrow: None<br>
xarray: None<br>
IPython: 5.1.0<br>
sphinx: 1.4.6<br>
patsy: 0.4.1<br>
dateutil: 2.5.3<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: 1.2.0<br>
tables: 3.2.2<br>
numexpr: 2.6.2<br>
feather: None<br>
matplotlib: 2.0.2<br>
openpyxl: 2.3.2<br>
xlrd: 1.0.0<br>
xlwt: 1.1.2<br>
xlsxwriter: 0.9.3<br>
lxml: 3.6.4<br>
bs4: 4.5.1<br>
html5lib: 0.999999999<br>
sqlalchemy: 1.0.13<br>
pymysql: 0.7.9.None<br>
psycopg2: 2.7.3.1 (dt dec pq3 ext lo64)<br>
jinja2: 2.8<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details> | 0 |
<h4 dir="auto">Challenge Name</h4>
<p dir="auto"><a href="https://www.freecodecamp.com/challenges/missing-letters" rel="nofollow">https://www.freecodecamp.com/challenges/missing-letters</a></p>
<h4 dir="auto">Issue Description</h4>
<p dir="auto">The link that should direct to 'String.charCodeAt()', directs to the FCC map instead of the MDN page.</p>
<h4 dir="auto">Browser Information</h4>
<ul dir="auto">
<li>Chrome, Version: 50</li>
<li>Operating System: OSX</li>
</ul> | <p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/missing-letters#?solution=%0Afunction%20fearNotLetter%28str%29%20%7B%0A%20%20a%3Dstr.split%28%22%22%29%3B%0A%20%20for%28var%20i%3Da%5B0%5D%29%0A%7D%0A%0AfearNotLetter%28%22abce%22%29%3B%0A" rel="nofollow">Missing letters</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">The link String.charCodeAt() has the href set to undefinded instead of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt</a>.</p> | 1 |
<p dir="auto">The following snippet:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="macro_rules! getarg {
(x => $e:expr) => (println! ("x = {}", $e));
$b:block => $b;
}
fn main() {
getarg! (x => 1 + 2);
getarg! {
}
}"><pre class="notranslate"><code class="notranslate">macro_rules! getarg {
(x => $e:expr) => (println! ("x = {}", $e));
$b:block => $b;
}
fn main() {
getarg! (x => 1 + 2);
getarg! {
}
}
</code></pre></div>
<p dir="auto">gives the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="src/main.rs:3:1: 4:2 error: internal compiler error: wrong-structured lhs for follow check (didn't find a TtDelimited or TtSequence)"><pre class="notranslate"><code class="notranslate">src/main.rs:3:1: 4:2 error: internal compiler error: wrong-structured lhs for follow check (didn't find a TtDelimited or TtSequence)
</code></pre></div>
<p dir="auto">This is the backtrace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="stack backtrace:
1: 0x104fe5da3 - sys::backtrace::write::h36da3fb1e07e78da0nC
2: 0x105013da5 - panicking::on_panic::haade6d6d86433bf5HOL
3: 0x104f3d5d8 - rt::unwind::begin_unwind_inner::h00317caea0131299UvL
4: 0x1045efb5f - rt::unwind::begin_unwind::h15168281961459128075
5: 0x1045efb0c - diagnostic::SpanHandler::span_bug::hbfe227f81d0cd8devYE
6: 0x104741719 - ext::base::ExtCtxt<'a>::span_bug::hdb7ec5648176a7f89y7
7: 0x104740ed5 - ext::tt::macro_rules::compile::ha9fc6d551176d0ddx5i
8: 0x104740265 - ext::base::ExtCtxt<'a>::insert_macro::h91b42296cf30a29dSw7
9: 0x1047b49f0 - ext::expand::expand_item_mac::hb9eabd9a17097c78v5d
10: 0x1047a0227 - ext::expand::expand_annotatable::hb2c7b6cf1688383b0ze
11: 0x10479c230 - ext::expand::expand_item::h82a19f3ce454f84daZd
12: 0x1047ab7a2 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_item::h7f85720548281771dSe
13: 0x1047ab578 - fold::noop_fold_mod::closure.58932
14: 0x1047ab316 - iter::FlatMap<I, U, F>.Iterator::next::h10055531995118448306
15: 0x1047aaf60 - vec::Vec<T>.FromIterator<T>::from_iter::h8228182012818297599
16: 0x1047aab9f - fold::noop_fold_mod::h3115526397988167409
17: 0x1047a6a7c - ext::expand::expand_item_underscore::h52c4b03ceb86d01b02d
18: 0x10480f552 - fold::Folder::fold_item_simple::h4379758381320372925
19: 0x10480ecd3 - ptr::P<T>::map::h1390305908052494351
20: 0x1047a1b95 - ext::expand::expand_annotatable::hb2c7b6cf1688383b0ze
21: 0x10479c230 - ext::expand::expand_item::h82a19f3ce454f84daZd
22: 0x1047ab7a2 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_item::h7f85720548281771dSe
23: 0x10481be94 - ext::expand::expand_crate::h8ce8d9aec4e20430IYe
24: 0x1016c70d4 - driver::phase_2_configure_and_expand::closure.20378
25: 0x10167a90b - driver::phase_2_configure_and_expand::h7df30fbfe33501e73ta
26: 0x10166a436 - driver::compile_input::h1408964d65bdd4c4Gba
27: 0x101743bf7 - run_compiler::hc234a0e393bd73edZbc
28: 0x101741071 - thunk::F.Invoke<A, R>::invoke::h15756873051927943851
29: 0x10173fcd0 - rt::unwind::try::try_fn::h4998921728403241693
30: 0x10508ae09 - rust_try_inner
31: 0x10508adf6 - rust_try
32: 0x101740435 - thunk::F.Invoke<A, R>::invoke::h14944404643238507248
33: 0x104ffcc83 - sys::thread::thread_start::h384864084e567330e4G
34: 0x7fff8e031268 - _pthread_body
35: 0x7fff8e0311e5 - _pthread_body"><pre class="notranslate"><code class="notranslate">stack backtrace:
1: 0x104fe5da3 - sys::backtrace::write::h36da3fb1e07e78da0nC
2: 0x105013da5 - panicking::on_panic::haade6d6d86433bf5HOL
3: 0x104f3d5d8 - rt::unwind::begin_unwind_inner::h00317caea0131299UvL
4: 0x1045efb5f - rt::unwind::begin_unwind::h15168281961459128075
5: 0x1045efb0c - diagnostic::SpanHandler::span_bug::hbfe227f81d0cd8devYE
6: 0x104741719 - ext::base::ExtCtxt<'a>::span_bug::hdb7ec5648176a7f89y7
7: 0x104740ed5 - ext::tt::macro_rules::compile::ha9fc6d551176d0ddx5i
8: 0x104740265 - ext::base::ExtCtxt<'a>::insert_macro::h91b42296cf30a29dSw7
9: 0x1047b49f0 - ext::expand::expand_item_mac::hb9eabd9a17097c78v5d
10: 0x1047a0227 - ext::expand::expand_annotatable::hb2c7b6cf1688383b0ze
11: 0x10479c230 - ext::expand::expand_item::h82a19f3ce454f84daZd
12: 0x1047ab7a2 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_item::h7f85720548281771dSe
13: 0x1047ab578 - fold::noop_fold_mod::closure.58932
14: 0x1047ab316 - iter::FlatMap<I, U, F>.Iterator::next::h10055531995118448306
15: 0x1047aaf60 - vec::Vec<T>.FromIterator<T>::from_iter::h8228182012818297599
16: 0x1047aab9f - fold::noop_fold_mod::h3115526397988167409
17: 0x1047a6a7c - ext::expand::expand_item_underscore::h52c4b03ceb86d01b02d
18: 0x10480f552 - fold::Folder::fold_item_simple::h4379758381320372925
19: 0x10480ecd3 - ptr::P<T>::map::h1390305908052494351
20: 0x1047a1b95 - ext::expand::expand_annotatable::hb2c7b6cf1688383b0ze
21: 0x10479c230 - ext::expand::expand_item::h82a19f3ce454f84daZd
22: 0x1047ab7a2 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_item::h7f85720548281771dSe
23: 0x10481be94 - ext::expand::expand_crate::h8ce8d9aec4e20430IYe
24: 0x1016c70d4 - driver::phase_2_configure_and_expand::closure.20378
25: 0x10167a90b - driver::phase_2_configure_and_expand::h7df30fbfe33501e73ta
26: 0x10166a436 - driver::compile_input::h1408964d65bdd4c4Gba
27: 0x101743bf7 - run_compiler::hc234a0e393bd73edZbc
28: 0x101741071 - thunk::F.Invoke<A, R>::invoke::h15756873051927943851
29: 0x10173fcd0 - rt::unwind::try::try_fn::h4998921728403241693
30: 0x10508ae09 - rust_try_inner
31: 0x10508adf6 - rust_try
32: 0x101740435 - thunk::F.Invoke<A, R>::invoke::h14944404643238507248
33: 0x104ffcc83 - sys::thread::thread_start::h384864084e567330e4G
34: 0x7fff8e031268 - _pthread_body
35: 0x7fff8e0311e5 - _pthread_body
</code></pre></div> | <p dir="auto">A simple malformed macro makes the compiler crash.</p>
<p dir="auto">Code:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="macro_rules! code_block {
$c:block => $c
}"><pre class="notranslate"><span class="pl-k">macro_rules!</span> code_block <span class="pl-kos">{</span>
$c<span class="pl-kos">:</span>block => $c
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Playpen error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<anon>:1:1: 3:2 error: internal compiler error: wrong-structured lhs for follow check (didn't find a TtDelimited or TtSequence)
<anon>:1 macro_rules! code_block {
<anon>:2 $c:block => $c
<anon>:3 }
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
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:130"><pre class="notranslate"><code class="notranslate"><anon>:1:1: 3:2 error: internal compiler error: wrong-structured lhs for follow check (didn't find a TtDelimited or TtSequence)
<anon>:1 macro_rules! code_block {
<anon>:2 $c:block => $c
<anon>:3 }
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
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:130
</code></pre></div>
<p dir="auto">Playpen: <a href="http://is.gd/COoZe7" rel="nofollow">http://is.gd/COoZe7</a></p> | 1 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(jython) r@r-V ~ $ python --version
Jython 2.7.1b3
(jython) r@r-V ~ $ pip install requests==2.11.1
Collecting requests==2.11.1
Using cached requests-2.11.1-py2.py3-none-any.whl
Installing collected packages: requests
Found existing installation: requests 2.11.0
Uninstalling requests-2.11.0:
Successfully uninstalled requests-2.11.0
Successfully installed requests-2.11.1
(jython) r@r-V ~ $ pip install requests==2.12.0
Collecting requests==2.12.0
Using cached requests-2.12.0-py2.py3-none-any.whl
Installing collected packages: requests
Found existing installation: requests 2.11.1
Uninstalling requests-2.11.1:
Successfully uninstalled requests-2.11.1
Rolling back uninstall of requests
Exception:
Traceback (most recent call last):
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/commands/install.py", line 338, in run
requirement_set.install(
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/commands/install.py", line 338, in run
requirement_set.install(
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/req/req_set.py", line 780, in install
requirement.install(
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/req/req_install.py", line 1057, in move_wheel_files
move_wheel_files(
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/wheel.py", line 272, in move_wheel_files
compileall.compile_dir(source, force=True, quiet=True)
File "/home/r/jython/Lib/compileall.py", line 56, in compile_dir
if not compile_dir(fullname, maxlevels - 1, dfile, force, rx,
File "/home/r/jython/Lib/compileall.py", line 56, in compile_dir
if not compile_dir(fullname, maxlevels - 1, dfile, force, rx,
File "/home/r/jython/Lib/compileall.py", line 56, in compile_dir
if not compile_dir(fullname, maxlevels - 1, dfile, force, rx,
File "/home/r/jython/Lib/compileall.py", line 50, in compile_dir
if not compile_file(fullname, ddir, force, rx, quiet):
File "/home/r/jython/Lib/compileall.py", line 99, in compile_file
ok = py_compile.compile(fullname, None, dfile, True)
File "/home/r/jython/Lib/compileall.py", line 99, in compile_file
ok = py_compile.compile(fullname, None, dfile, True)
File "/home/r/jython/Lib/py_compile.py", line 96, in compile
_py_compile.compile(file, cfile, dfile)
File "/home/r/jython/Lib/py_compile.py", line 96, in compile
_py_compile.compile(file, cfile, dfile)
RuntimeException: java.lang.RuntimeException: Method code too large!
(jython) r@r-V ~ $ "><pre class="notranslate"><code class="notranslate">(jython) r@r-V ~ $ python --version
Jython 2.7.1b3
(jython) r@r-V ~ $ pip install requests==2.11.1
Collecting requests==2.11.1
Using cached requests-2.11.1-py2.py3-none-any.whl
Installing collected packages: requests
Found existing installation: requests 2.11.0
Uninstalling requests-2.11.0:
Successfully uninstalled requests-2.11.0
Successfully installed requests-2.11.1
(jython) r@r-V ~ $ pip install requests==2.12.0
Collecting requests==2.12.0
Using cached requests-2.12.0-py2.py3-none-any.whl
Installing collected packages: requests
Found existing installation: requests 2.11.1
Uninstalling requests-2.11.1:
Successfully uninstalled requests-2.11.1
Rolling back uninstall of requests
Exception:
Traceback (most recent call last):
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/commands/install.py", line 338, in run
requirement_set.install(
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/commands/install.py", line 338, in run
requirement_set.install(
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/req/req_set.py", line 780, in install
requirement.install(
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/req/req_install.py", line 1057, in move_wheel_files
move_wheel_files(
File "/home/r/.virtualenvs/jython/Lib/site-packages/pip/wheel.py", line 272, in move_wheel_files
compileall.compile_dir(source, force=True, quiet=True)
File "/home/r/jython/Lib/compileall.py", line 56, in compile_dir
if not compile_dir(fullname, maxlevels - 1, dfile, force, rx,
File "/home/r/jython/Lib/compileall.py", line 56, in compile_dir
if not compile_dir(fullname, maxlevels - 1, dfile, force, rx,
File "/home/r/jython/Lib/compileall.py", line 56, in compile_dir
if not compile_dir(fullname, maxlevels - 1, dfile, force, rx,
File "/home/r/jython/Lib/compileall.py", line 50, in compile_dir
if not compile_file(fullname, ddir, force, rx, quiet):
File "/home/r/jython/Lib/compileall.py", line 99, in compile_file
ok = py_compile.compile(fullname, None, dfile, True)
File "/home/r/jython/Lib/compileall.py", line 99, in compile_file
ok = py_compile.compile(fullname, None, dfile, True)
File "/home/r/jython/Lib/py_compile.py", line 96, in compile
_py_compile.compile(file, cfile, dfile)
File "/home/r/jython/Lib/py_compile.py", line 96, in compile
_py_compile.compile(file, cfile, dfile)
RuntimeException: java.lang.RuntimeException: Method code too large!
(jython) r@r-V ~ $
</code></pre></div>
<p dir="auto">This might not be a bug in <code class="notranslate">requests</code>, but perhaps it is workaroundable? Has any change been done in 2.12.0 that caused a very big method to be created?</p> | <p dir="auto">When using requests, I've just upgraded and I'm having the following error:<br>
<code class="notranslate">import requests as rq</code></p>
<p dir="auto"><code class="notranslate">File "C:\Users\_HOME_\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\__init__.py", line 53, in <module></code></p>
<p dir="auto"><code class="notranslate">major, minor, patch= urllib3_version</code></p>
<p dir="auto"><code class="notranslate">ValueError: not enough values to unpack (expected 3, got 1)</code></p> | 0 |
<p dir="auto"><em>This works</em><br>
<code class="notranslate">deno run --allow-write writeToFile.ts</code></p>
<p dir="auto"><em>But this does not, it just ignores the flag</em><br>
<code class="notranslate">deno run writeToFile.ts --allow-write</code></p>
<p dir="auto">It should at least throw a warning or something, not just silently ignore flags passed like in the second example. Please adjust the parser in such a way, that the second example will also work.</p> | <p dir="auto">The order of the CLI flags should not be of importance. Check this example</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6124435/62263509-c9d87180-b41c-11e9-8da9-b683316e0ad7.png"><img src="https://user-images.githubusercontent.com/6124435/62263509-c9d87180-b41c-11e9-8da9-b683316e0ad7.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Shouldn't</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" deno test.ts --config tsconfig.json"><pre class="notranslate"><code class="notranslate"> deno test.ts --config tsconfig.json
</code></pre></div>
<p dir="auto">be the same as</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno --config tsconfig.json test.ts"><pre class="notranslate"><code class="notranslate">deno --config tsconfig.json test.ts
</code></pre></div>
<p dir="auto">or maybe I'm wrong?</p> | 1 |
<p dir="auto"><code class="notranslate">scrollToHash</code> doesn't work as expected.</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">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 would expect the anchor to be scrolled to.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Anchor is scrolled to correctly, but quickly after the scroll position is reset to the top of the page.<br>
Increasing the setTimeout value fixes the issue but seems brittle.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Add anchor to url</li>
<li>Visit page</li>
</ol>
<h2 dir="auto">Context</h2>
<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.2.3</td>
</tr>
<tr>
<td>node</td>
<td></td>
</tr>
<tr>
<td>OS</td>
<td>MacOS</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 64</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | <p dir="auto">I am using your <a href="https://github.com/zeit/next.js/blob/master/examples/with-scoped-stylesheets-and-postcss/pages/index.js">CSS example</a> to add postcss to my project but unless I put my css inside the <code class="notranslate">./pages</code> folder I get an undefined error.</p>
<p dir="auto"><code class="notranslate">import {stylesheet, classNames} from 'css/styles.css'</code></p>
<p dir="auto">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.</p>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">For the <code class="notranslate">paragraph</code> class from <code class="notranslate">styles</code> to render.</p>
<p dir="auto"><code class="notranslate">.paragraph { composes: font-color from 'global.css'; font-size: 20px; color:red; }</code></p>
<h2 dir="auto">Current Behavior</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR Failed to compile with 1 errors
This dependency was not found:
* css/styles.css in ./pages?entry
To install it, you can run: npm install --save css/styles.css"><pre class="notranslate"><code class="notranslate">ERROR Failed to compile with 1 errors
This dependency was not found:
* css/styles.css in ./pages?entry
To install it, you can run: npm install --save css/styles.css
</code></pre></div>
<h1 dir="auto">My next.config.js file is as follows:</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const fs = require('fs')
const trash = require('trash')
module.exports = {
webpack: (config) => {
config.plugins = config.plugins.filter(
(plugin) => (plugin.constructor.name !== 'UglifyJsPlugin')
)
config.module.rules.push(
{
test: /\.css$/,
use: [
{
loader: 'emit-file-loader',
options: {
name: 'dist/[path][name].[ext]'
}
},
{
loader: 'skeleton-loader',
options: {
procedure: function (content) {
const fileName = `${this._module.userRequest}.json`
const classNames = fs.readFileSync(fileName, 'utf8')
trash(fileName)
return ['module.exports = {',
`classNames: ${classNames},`,
`stylesheet: \`${content}\``,
'}'
].join('')
}
}
},
'postcss-loader'
]
}
)
return config
}
}"><pre class="notranslate"><code class="notranslate">const fs = require('fs')
const trash = require('trash')
module.exports = {
webpack: (config) => {
config.plugins = config.plugins.filter(
(plugin) => (plugin.constructor.name !== 'UglifyJsPlugin')
)
config.module.rules.push(
{
test: /\.css$/,
use: [
{
loader: 'emit-file-loader',
options: {
name: 'dist/[path][name].[ext]'
}
},
{
loader: 'skeleton-loader',
options: {
procedure: function (content) {
const fileName = `${this._module.userRequest}.json`
const classNames = fs.readFileSync(fileName, 'utf8')
trash(fileName)
return ['module.exports = {',
`classNames: ${classNames},`,
`stylesheet: \`${content}\``,
'}'
].join('')
}
}
},
'postcss-loader'
]
}
)
return config
}
}
</code></pre></div>
<p dir="auto">The only time this works is if I add all the CSS files inside the <code class="notranslate">./pages</code> directory which I find will become messy and bloated. I am using React.js with Next.js. I presume the same problems will arise if I add an <code class="notranslate">./assets</code> folder at the same level as <code class="notranslate">./pages</code>. How can I keep the file types separated and/or for <code class="notranslate"><style dangerouslySetInnerHTML={{__html: stylesheet}} /></code> to render an external stylesheet instead of styles?</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/mui-org/material-ui/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"><code class="notranslate">ListItemSecondaryAction</code> should be able to be <code class="notranslate">hidden</code> by default, then <code class="notranslate">visible</code> on hover. This is a really common use case, so if possible, we should consider a clean way to make this (optional) behavior available behind a boolean property.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">When implemented with css sibling selectors and hovering over the secondary action, the icon blinks continuously. When hovered anywhere else on the <code class="notranslate">ListItem</code>, the blinking stops and works as expected.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/136564/36174641-8225ebae-10d2-11e8-9fdd-498cafb583fd.gif"><img src="https://user-images.githubusercontent.com/136564/36174641-8225ebae-10d2-11e8-9fdd-498cafb583fd.gif" alt="blink2" data-animated-image="" style="max-width: 100%;"></a></p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Using css sibling selector (shown above): <a href="https://codesandbox.io/s/xo0mmyv2oo" rel="nofollow">https://codesandbox.io/s/xo0mmyv2oo</a></p>
<h2 dir="auto">Context</h2>
<p dir="auto">Secondary actions visible for larger lists (e.g. Google contacts list) can be overwhelming. Hiding icons until hovered is a common way to declutter user interfaces.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>1.0.0-beta.33</td>
</tr>
<tr>
<td>React</td>
<td>16.2.0</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table>
<p dir="auto">Any guidance <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/oliviertassinari/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/oliviertassinari">@oliviertassinari</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kof/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kof">@kof</a> as to what the root cause of blinking?</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/mui-org/material-ui/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">You should be able to select text from the options labels in order to copy and paste it somewhere else.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">It's not possible to select/highlight the text in the option labels. What happens when you try to click and drag over the text is the option gets selected and nothing else.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Have a form with Checkbox or RadioButton controls.</li>
<li>Click and drag over the option labels text attempting to select the text</li>
<li>Text does not get selected</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">Users cannot copy and paste text from option labels in order to google/research/translate or do whatever they may need with such string. Please note that such behavior is possible on Google forms, as per screenshot: <a href="https://imgur.com/Fa5B6oO" rel="nofollow">https://imgur.com/Fa5B6oO</a></p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>0.18.7</td>
</tr>
<tr>
<td>React</td>
<td>15.6.2</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 61.0.3163.91</td>
</tr>
</tbody>
</table> | 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=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</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/tkqubo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tkqubo">@tkqubo</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/seansfkelley/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/seansfkelley">@seansfkelley</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/thasner/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/thasner">@thasner</a> @kenzierocks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/clayne11/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/clayne11">@clayne11</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tansongyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tansongyang">@tansongyang</a></li>
</ul>
</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" "devDependencies": {
"typescript": "^2.4.2"
},
"dependencies": {
"@types/react-redux": "5.0.3",
"react": "^15.6.1",
"react-redux": "^5.0.6",
"redux": "^3.7.2"
}"><pre class="notranslate"><code class="notranslate"> "devDependencies": {
"typescript": "^2.4.2"
},
"dependencies": {
"@types/react-redux": "5.0.3",
"react": "^15.6.1",
"react-redux": "^5.0.6",
"redux": "^3.7.2"
}
</code></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as React from 'react';
import { connect } from 'react-redux';
@connect()
class MyComponent extends React.Component<any, any> {
get property(): string { return "value" }
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-smi">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">connect</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-redux'</span><span class="pl-kos">;</span>
@<span class="pl-en">connect</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">class</span> <span class="pl-smi">MyComponent</span> <span class="pl-k">extends</span> <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span><span class="pl-kos"><</span><span class="pl-smi">any</span><span class="pl-kos">,</span> <span class="pl-smi">any</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">get</span> <span class="pl-en">property</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">string</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">"value"</span> <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Error on <code class="notranslate">@connect</code> line:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Unable to resolve signature of class decorator when called as an expression.
Type 'ComponentClass<Pick<any, any>>' is not assignable to type 'typeof MyComponent'.
Type 'Component<Pick<any, any>, ComponentState>' is not assignable to type 'MyComponent'.
Property 'property' is missing in type 'Component<Pick<any, any>, ComponentState>'."><pre class="notranslate"><code class="notranslate">Unable to resolve signature of class decorator when called as an expression.
Type 'ComponentClass<Pick<any, any>>' is not assignable to type 'typeof MyComponent'.
Type 'Component<Pick<any, any>, ComponentState>' is not assignable to type 'MyComponent'.
Property 'property' is missing in type 'Component<Pick<any, any>, ComponentState>'.
</code></pre></div>
<p dir="auto">It does not even work with just simple <code class="notranslate">render()</code> either:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@connect()
class MyComponent extends React.Component<any, any> {
render() {
return (<div></div>);
}
}"><pre class="notranslate">@<span class="pl-en">connect</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">class</span> <span class="pl-smi">MyComponent</span> <span class="pl-k">extends</span> <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span><span class="pl-kos"><</span><span class="pl-smi">any</span><span class="pl-kos">,</span> <span class="pl-smi">any</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-en">render</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-kos">(</span><span class="pl-kos"><</span><span class="pl-smi">div</span><span class="pl-kos">></span><span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-smi">div</span><span class="pl-c1">></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="Unable to resolve signature of class decorator when called as an expression.
Type 'ComponentClass<Pick<any, any>>' is not assignable to type 'typeof MyComponent'.
Type 'Component<Pick<any, any>, ComponentState>' is not assignable to type 'MyComponent'.
Types of property 'render' are incompatible.
Type '() => false | Element' is not assignable to type '() => Element'.
Type 'false | Element' is not assignable to type 'Element'.
Type 'false' is not assignable to type 'Element'."><pre class="notranslate"><code class="notranslate">Unable to resolve signature of class decorator when called as an expression.
Type 'ComponentClass<Pick<any, any>>' is not assignable to type 'typeof MyComponent'.
Type 'Component<Pick<any, any>, ComponentState>' is not assignable to type 'MyComponent'.
Types of property 'render' are incompatible.
Type '() => false | Element' is not assignable to type '() => Element'.
Type 'false | Element' is not assignable to type 'Element'.
Type 'false' is not assignable to type 'Element'.
</code></pre></div>
<p dir="auto">It works with an empty Component class (which is covered by a test case) but it's just an useless trivial situation.</p> | <p dir="auto">Trying to use <a href="https://github.com/reactjs/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options">react-redux's <code class="notranslate">connect</code></a> as a class decorator can cause error messages of the form <code class="notranslate">Type 'foo' is not assignable to type 'void'</code>. The issue with these typings seems to be that <a href="https://github.com/Microsoft/TypeScript/issues/4881" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/4881/hovercard">TypeScript doesn't allow <code class="notranslate">ClassDecorator</code>s to change the signature of the thing that they decorate</a>, but <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/d417f687ab0c81ed72bffbc5dace5f643369bb70/react-redux/react-redux.d.ts#L14">this is the current implementation of the react-redux typings</a> and is done purposefully, since <a href="https://github.com/reactjs/react-redux/blob/master/docs/api.md#remarks">react-redux returns a different instance with a different signature for the props</a>.</p>
<p dir="auto">Using <code class="notranslate">connect</code> as a function works as expected; it's only the usage as a decorator that causes type problems.</p>
<p dir="auto">Suggestions are welcome, but any proposed solutions should be a strict improvement on what the typings can currently express, which is to say, sacrificing the current correctness of the usage-as-a-function typings is not acceptable (partly because that would be a severe regression and partly because decorators are deemed "experimental" and therefore, I assert, secondary to standard function usage).</p>
<p dir="auto">I don't know that a complete solution to the decorator-typing problem is possible while <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="107375551" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/4881" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/4881/hovercard" href="https://github.com/microsoft/TypeScript/issues/4881">microsoft/TypeScript#4881</a> is outstanding. That said, there are incremental improvements in this case, such as by (first pass) outputting any kind of <code class="notranslate">React.ComponentClass</code> so the code at least compiles, then (second pass) outputting a component that accepts the intersection of all the props (own as well as connected), even though that would be too lenient, so the code type checks at least some of the props.</p>
<p dir="auto">The only workaround I have right now is to not use <code class="notranslate">connect</code> as a decorator. Some may find it ugly stylistically, but it type-checks correctly, isn't any lengthier and is usable in more places than a decorator.</p>
<p dir="auto">Instead of:</p>
<div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@connect(mapStateToProps, mapDispatchToProps)
class MyComponent extends React.Component<...> { ... }"><pre class="notranslate">@<span class="pl-en">connect</span><span class="pl-kos">(</span><span class="pl-s1">mapStateToProps</span><span class="pl-kos">,</span> <span class="pl-s1">mapDispatchToProps</span><span class="pl-kos">)</span>
<span class="pl-k">class</span> <span class="pl-smi">MyComponent</span> <span class="pl-k">extends</span> <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span><span class="pl-c1"><</span>...<span class="pl-c1">></span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span></pre></div>
<p dir="auto">use (something along the lines of):</p>
<div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyComponentImpl extends React.Component<...> { ... }
const MyComponent = connect(mapStateToProps, mapDispatchToProps)(MyComponentImpl);"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">MyComponentImpl</span> <span class="pl-k">extends</span> <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span><span class="pl-c1"><</span>...<span class="pl-c1">></span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span>
<span class="pl-k">const</span> <span class="pl-smi">MyComponent</span> <span class="pl-c1">=</span> <span class="pl-en">connect</span><span class="pl-kos">(</span><span class="pl-s1">mapStateToProps</span><span class="pl-kos">,</span> <span class="pl-s1">mapDispatchToProps</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-smi">MyComponentImpl</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Note that <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="144688052" data-permission-text="Title is private" data-url="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/8787" data-hovercard-type="issue" data-hovercard-url="/DefinitelyTyped/DefinitelyTyped/issues/8787/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/8787">#8787</a> comes into play here and is sometimes conflated with this issue. You may also want a type hint or a cast to make sure the output component has the proper type.</p>
<p dir="auto">Edit: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="188141684" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/12114" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/TypeScript/pull/12114/hovercard" href="https://github.com/microsoft/TypeScript/pull/12114">microsoft/TypeScript#12114</a> may help with this case: the decorator could potentially be written to create an all-optional version of the props for the generated component, which isn't totally ideal but continues to let your implementation be more assertive about prop nullity.</p> | 1 |
<p dir="auto">As a typescript developer, I am building libraries for my client enterprise at work. The libraries has a lot of interfaces, types, clases, enums, variables... that are not intended to be public on the final comiled file, but I'm forced to export them to reuse at the other inner modules (before coupling them into one single file).</p>
<p dir="auto">I would like to be able to generate de .d.ts file of my .js without the <code class="notranslate">internal</code> members. I know they will be really accesible at JavaScript, but not at the definitions file.</p>
<p dir="auto">This is really significant because others could use those definicion files to use the libraries, or to generate automatically public documentation (ie. <a href="http://typedoc.io/" rel="nofollow">http://typedoc.io/</a>).</p> | <p dir="auto">Currently the spec reads: Protected property members can be accessed only within their declaring class and classes derived from their declaring class, and a protected instance property member must be accessed through an instance of the enclosing class.</p>
<p dir="auto">Relaxing the constraint, "member must be accessed through an instance of the enclosing class" to allow all classes derived from the declaring class as long as they are declared in the same module as the declaring class, would make it possible to have module internal access.</p>
<p dir="auto">This is closer to how Java implements protected access, rather than C#. Are there plans to add an <code class="notranslate">internal</code> access modifier? If not, then this may be a way to alleviate the pain of encapsulating internal class state.</p> | 1 |
<p dir="auto">I lost most of my work last night when there were problems on the server. I think this is the 4th time this has happened with my account. My points number reflects over 300 while my map does not.<br>
I have been working at this for close to a year, if not over a year.<br>
And the issue was closed even though my map is not restored to where it should be.</p>
<p dir="auto">Lost most of my work last night <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="110210744" data-permission-text="Title is private" data-url="https://github.com/freeCodeCamp/freeCodeCamp/issues/3629" data-hovercard-type="issue" data-hovercard-url="/freeCodeCamp/freeCodeCamp/issues/3629/hovercard" href="https://github.com/freeCodeCamp/freeCodeCamp/issues/3629">#3629</a></p>
<p dir="auto">Help please</p> | <p dir="auto">Prior to the update I had completed all waypoints, bonfires and ziplines up until TicTacToe.<br>
After completing challenges in section 4. "Gear Up For Success" I noticed that a large amount of waypoints and bonfires had become "incomplete"(I've attached a screenshot below to show what I mean. ) and the solutions did not show up on my profile however I still had the points from those challenges (I'm currently at 305 after re-doing a challenge that became incomplete to try and re-create the bug).</p>
<p dir="auto">I haven't been able to recreate the bug however I believe it's related to the new challenges being completed and overwriting previously completed challenges somehow.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/506160/10336734/b720e886-6d46-11e5-9c88-da9c33eda1b9.png"><img src="https://cloud.githubusercontent.com/assets/506160/10336734/b720e886-6d46-11e5-9c88-da9c33eda1b9.png" alt="screen shot 2015-10-07 at 10 53 22 pm" style="max-width: 100%;"></a></p> | 1 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: version 10.0.18362.239
Windows Terminal version (if applicable):0.3.2142.0 from Microsoft Store "><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: version 10.0.18362.239
Windows Terminal version (if applicable):0.3.2142.0 from Microsoft Store
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Fresh install of Terminal from Microsoft Store</li>
<li>Try to open the default Azure Cloud Shell tab and close the tab without login</li>
<li>Enter something in default PowerShell and press Enter, for example, type "abc" and press Enter</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Displays the return value or error information of the command</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Crash</p> | <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 (if applicable): 0.3.2171.0
Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.267]
Windows Terminal version (if applicable): 0.3.2171.0
Any other software?
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<h1 dir="auto">Expected behavior</h1>
<h1 dir="auto">Actual behavior</h1> | 0 |
<h4 dir="auto">Write Arrow Functions</h4>
<p dir="auto"><a href="http://beta.freecodecamp.com/en/challenges/es6/write-arrow-functions" rel="nofollow">http://beta.freecodecamp.com/en/challenges/es6/write-arrow-functions</a></p>
<h4 dir="auto">Issue Description</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
// change code below this line
var magic = () => {
return new Date();
};
// change code above this line
// test your code
console.log(magic());"><pre class="notranslate"><code class="notranslate">
// change code below this line
var magic = () => {
return new Date();
};
// change code above this line
// test your code
console.log(magic());
</code></pre></div>
<p dir="auto">should fail<br>
<code class="notranslate">Test magic is const</code></p>
<h4 dir="auto">Browser Information</h4>
<ul dir="auto">
<li>Browser Name, Version: Chrome</li>
<li>Operating System: Mac</li>
<li>Mobile, Desktop, or Tablet: Desktop</li>
</ul>
<h4 dir="auto">Your Code</h4>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
"><pre class="notranslate"></pre></div>
<h4 dir="auto">Screenshot</h4> | <p dir="auto">Challenge <a href="http://beta.freecodecamp.com/en/challenges/es6/arrow-functions" rel="nofollow">arrow-functions</a> passes tests with any or no input.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36</code>.</p>
<p dir="auto">It seems that the tests will pass without changing any code (as pictured). All tests passed with a blank code editor and when gibberish was entered into the code editor as well. I've tried a hard refresh and incognito and the problem persists.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3643243/22361549/1813f8a6-e418-11e6-9905-49a8c261c2cb.jpg"><img src="https://cloud.githubusercontent.com/assets/3643243/22361549/1813f8a6-e418-11e6-9905-49a8c261c2cb.jpg" alt="arrow-functions" style="max-width: 100%;"></a></p> | 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.