text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<h3 dir="auto"><g-emoji class="g-emoji" alias="computer" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4bb.png">💻</g-emoji></h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Would you like to work on this feature?</li>
</ul>
<h3 dir="auto">What problem are you trying to solve?</h3>
<p dir="auto">TypeScript 4.7 Beta ships with <code class="notranslate">in</code> and<code class="notranslate"> out</code> modifiers for type parameters on type declarations.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type Getter<out T> = () => T;
type Setter<in T> = (value: T) => void;
interface State<in out T> {
get: () => T;
set: (value: T) => void;
}"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">Getter</span><span class="pl-c1"><</span><span class="pl-smi">out</span> <span class="pl-smi">T</span><span class="pl-c1">></span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi">T</span><span class="pl-kos">;</span>
<span class="pl-k">type</span> <span class="pl-smi">Setter</span><span class="pl-c1"><</span><span class="pl-smi">in</span> <span class="pl-smi">T</span><span class="pl-c1">></span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-k">interface</span> <span class="pl-smi">State</span><span class="pl-c1"><</span><span class="pl-smi">in</span> <span class="pl-s1">out</span> <span class="pl-smi">T</span><span class="pl-c1">></span> <span class="pl-kos">{</span>
<span class="pl-c1">get</span>: <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi">T</span><span class="pl-kos">;</span>
<span class="pl-c1">set</span>: <span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">TypeScript developers using Babel will need to support this syntax.</p>
<p dir="auto">These <code class="notranslate">in</code> and <code class="notranslate">out</code> modifiers can only be placed on type parameter declarations for</p>
<ul dir="auto">
<li><code class="notranslate">type</code> aliases</li>
<li><code class="notranslate">interface</code> declarations</li>
<li><code class="notranslate">class</code> declarations</li>
<li><a href="https://github.com/microsoft/TypeScript/issues/48618" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/48618/hovercard"><del><em>possibly</em></del> <code class="notranslate">class</code> expressions</a></li>
</ul>
<p dir="auto">It is possible to have <code class="notranslate">in</code>, <code class="notranslate">out</code>, and <code class="notranslate">in out</code>. Duplicates are not allowed, and <code class="notranslate">in</code> must always come before <code class="notranslate">out</code>.</p>
<h3 dir="auto">Describe the solution you'd like</h3>
<p dir="auto">For the next minor version of Babel, we may want to implement this feature.</p>
<h3 dir="auto">Describe alternatives you've considered</h3>
<p dir="auto">There are alternative compilers, but that would not be ideal for Babel users.</p>
<h3 dir="auto">Documentation, Adoption, Migration Strategy</h3>
<p dir="auto"><em>No response</em></p> | <h3 dir="auto"><g-emoji class="g-emoji" alias="computer" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4bb.png">💻</g-emoji></h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Would you like to work on a fix?</li>
</ul>
<h3 dir="auto">How are you using Babel?</h3>
<p dir="auto">Other (Next.js, Gatsby, vue-cli, ...)</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="function foo(...[x]) {
var x = 1
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">foo</span><span class="pl-kos">(</span>...<span class="pl-kos">[</span><span class="pl-s1">x</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">/repl.js: Duplicate declaration "x"</p>
<h3 dir="auto">Configuration file name</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Configuration</h3>
<p dir="auto"><a href="https://babeljs.io/repl#?browsers=chrome%2033&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=GYVwdgxgLglg9mABMOcAUA6LBtAHgXQEpEBvAKEQDcBDAJ0V0QF5EBGMgXyA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env&prettier=false&targets=&version=7.16.9&externalPlugins=&assumptions=%7B%7D" rel="nofollow">https://babeljs.io/repl#?browsers=chrome%2033&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=GYVwdgxgLglg9mABMOcAUA6LBtAHgXQEpEBvAKEQDcBDAJ0V0QF5EBGMgXyA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env&prettier=false&targets=&version=7.16.9&externalPlugins=&assumptions=%7B%7D</a></p>
<h3 dir="auto">Current and expected behavior</h3>
<p dir="auto">Current :error<br>
expected : no error</p>
<h3 dir="auto">Environment</h3>
<p dir="auto">.</p>
<h3 dir="auto">Possible solution</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context</h3>
<p dir="auto">.</p> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [1]: import pandas, numpy
In [2]: df = pandas.DataFrame(numpy.random.random((100000, 4)))
In [3]: %timeit df.loc[55555]
10000 loops, best of 3: 118 µs per loop
In [4]: %timeit df.loc[[55555]]
1000 loops, best of 3: 324 µs per loop"><pre class="notranslate"><code class="notranslate">In [1]: import pandas, numpy
In [2]: df = pandas.DataFrame(numpy.random.random((100000, 4)))
In [3]: %timeit df.loc[55555]
10000 loops, best of 3: 118 µs per loop
In [4]: %timeit df.loc[[55555]]
1000 loops, best of 3: 324 µs per loop
</code></pre></div>
<p dir="auto">... makes sense to me.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [5]: df.index = list(range(99999)) + [55555]
In [6]: %timeit df.loc[55555]
100 loops, best of 3: 4.04 ms per loop
In [7]: %timeit df.loc[[55555]]
100 loops, best of 3: 16.8 ms per loop"><pre class="notranslate"><code class="notranslate">In [5]: df.index = list(range(99999)) + [55555]
In [6]: %timeit df.loc[55555]
100 loops, best of 3: 4.04 ms per loop
In [7]: %timeit df.loc[[55555]]
100 loops, best of 3: 16.8 ms per loop
</code></pre></div>
<p dir="auto">Non-unique index, slower (the second call probably has to scan all the index): still makes sense to me. Sorting should improve things...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [8]: df.sort(inplace=True)
In [9]: %timeit df.loc[55555]
1000 loops, best of 3: 239 µs per loop
In [10]: %timeit df.loc[[55555]]
100 loops, best of 3: 17.2 ms per loop"><pre class="notranslate"><code class="notranslate">In [8]: df.sort(inplace=True)
In [9]: %timeit df.loc[55555]
1000 loops, best of 3: 239 µs per loop
In [10]: %timeit df.loc[[55555]]
100 loops, best of 3: 17.2 ms per loop
</code></pre></div>
<p dir="auto">... here I'm lost: why this huge difference? The difference is even larger (3 orders of magnitude) in a real database I am working on. Clearly,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [12]: df.loc[[55555]] == df.loc[55555]
Out[12]:
0 1 2 3
55555 True True True True
55555 True True True True"><pre class="notranslate"><code class="notranslate">In [12]: df.loc[[55555]] == df.loc[55555]
Out[12]:
0 1 2 3
55555 True True True True
55555 True True True True
</code></pre></div>
<p dir="auto">(As a sidenote: the reason why I'm doing calls such as df.loc[[a_label]] is that df.loc[a_label] will return sometimes a Series, sometimes a DataFrame. I currently solve this by using df.loc[df.index == a_label], which is however ~3x slower than df.loc[a_label] - but much faster than the above df.loc[[a_label]].)</p> | <h3 dir="auto">Code example:</h3>
<p dir="auto">File <code class="notranslate">test.csv</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=",a,a,b
0,1,2,3
1,4,5,6"><pre class="notranslate"><code class="notranslate">,a,a,b
0,1,2,3
1,4,5,6
</code></pre></div>
<p dir="auto">Python code:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd
df = pd.read_csv("test.csv")
df.columns.values"><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-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-s">"test.csv"</span>)
<span class="pl-s1">df</span>.<span class="pl-s1">columns</span>.<span class="pl-s1">values</span></pre></div>
<p dir="auto">Gives <code class="notranslate">['a', 'a.1', 'b' ] </code> and not, as documented <code class="notranslate">['a.0', 'a.1', 'b']</code></p>
<h4 dir="auto">Problem description</h4>
<p dir="auto">The documentation states that names will be specified as ‘X.0’...’X.N’, but in fact the names become 'X','X.1',...'X.N'</p>
<p dir="auto">So in contrast to what the documentation says, the duplicate column-name is not changed at the first occurrence and only subsequent occurrences get a number appended.</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">Either change the code to mangle the first duplicate column name, or simply fix the documentation.</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.3.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 4.14.11-200.fc26.x86_64<br>
machine: x86_64<br>
processor: x86_64<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: en_US.UTF-8<br>
LOCALE: en_US.UTF-8</p>
<p dir="auto">pandas: 0.22.0<br>
pytest: 3.3.1<br>
pip: 9.0.1<br>
setuptools: 36.6.0<br>
Cython: None<br>
numpy: 1.14.0<br>
scipy: 0.19.1<br>
pyarrow: None<br>
xarray: None<br>
IPython: 6.2.1<br>
sphinx: 1.5.5<br>
patsy: None<br>
dateutil: 2.6.1<br>
pytz: 2017.3<br>
blosc: None<br>
bottleneck: 1.2.1<br>
tables: 3.3.0<br>
numexpr: 2.6.1<br>
feather: None<br>
matplotlib: 2.1.1<br>
openpyxl: None<br>
xlrd: 1.0.0<br>
xlwt: 1.1.2<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: 4.6.0<br>
html5lib: 1.0b10<br>
sqlalchemy: 1.1.13<br>
pymysql: None<br>
psycopg2: 2.6.2 (dt dec pq3 ext lo64)<br>
jinja2: 2.9.6<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details> | 0 |
<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/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/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.3</li>
<li>Operating System version: xxx</li>
<li>Java version: xxx</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<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?<br>
dubbo应该强依赖1.20yaml</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:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/15937567/69050498-20ee6a80-0a3d-11ea-9326-df6ae9214a72.png"><img src="https://user-images.githubusercontent.com/15937567/69050498-20ee6a80-0a3d-11ea-9326-df6ae9214a72.png" alt="image" style="max-width: 100%;"></a></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">consume端发送URL时,怎么给URL添加自定义参数?</p>
<p dir="auto">查阅官方文档,发现有个“信息交换扩展(exchanger)”貌似可以实现在发送的URL里添加自定义参数。<br>
但,网上没有相关自定义扩展的案例,不知道如何实现?</p>
<p dir="auto">我期望的是:<br>
consume端,在发送URL时,携带sessionId一起发送,http请求。(求解)<br>
provider端,配有Spring Session的请求拦截器,通过URL获取到sessionId,以达到session共享的目的。(这部分已经扩展,可以从Cookie和URL里拦截请求获取sessionId)</p>
<p dir="auto">信息交换扩展<br>
扩展说明<br>
基于传输层之上,实现 Request-Response 信息交换语义。</p>
<p dir="auto">扩展接口<br>
com.alibaba.dubbo.remoting.exchange.Exchanger<br>
com.alibaba.dubbo.remoting.exchange.ExchangeServer<br>
com.alibaba.dubbo.remoting.exchange.ExchangeClient</p>
<p dir="auto">扩展配置<br>
<dubbo:protocol exchanger="xxx" /></p>
<p dir="auto"><dubbo:provider exchanger="xxx" /></p>
<p dir="auto">已知扩展<br>
com.alibaba.dubbo.remoting.exchange.exchanger.HeaderExchanger</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: 18950
Windows Terminal version (if applicable): 0.3
Any other software? Python, Firefox, Visual Studio, etc. They shouldn't impact this problem."><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 18950
Windows Terminal version (if applicable): 0.3
Any other software? Python, Firefox, Visual Studio, etc. They shouldn't impact this problem.
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Open the Windows Settings app.</li>
<li>Change from dark mode to light mode, or vice versa.</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The Windows Terminal title bar color will change after a simple change in the Settings app and adapt to the rest of the Windows environment.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The Windows Terminal title bar color stays the same after the Settings app dark/light mode change. I have to restart the app in order for the Terminal title bar to obey the Settings change.</p>
<p dir="auto">(Not talking about accent color, by the way)</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number:
Platform ServicePack Version VersionString
-------- ----------- ------- -------------
Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0
Windows Terminal version (if applicable): 0.5.2762.0
Any other software?
GNU nano (windows port, installed from chocolatey.)"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number:
Platform ServicePack Version VersionString
-------- ----------- ------- -------------
Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0
Windows Terminal version (if applicable): 0.5.2762.0
Any other software?
GNU nano (windows port, installed from chocolatey.)
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Run GNU nano.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Cursor is aligned with where the text is appearing, follows after a newline, etc. (screenshot of conhost)</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/38d1998ea6bbcf8bffd9f2d4c28c891e433b327e145ed8772e21bed36fb198a2/68747470733a2f2f75706c6f6164732e6b73636f74742e63662f7368617265782f636d645f39734a795538327239482e706e67"><img src="https://camo.githubusercontent.com/38d1998ea6bbcf8bffd9f2d4c28c891e433b327e145ed8772e21bed36fb198a2/68747470733a2f2f75706c6f6164732e6b73636f74742e63662f7368617265782f636d645f39734a795538327239482e706e67" alt="conhost screenshot" data-canonical-src="https://uploads.kscott.cf/sharex/cmd_9sJyU82r9H.png" style="max-width: 100%;"></a></p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Cursor doesn't follow after a newline, and doesn't stay aligned to the insert point.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/fa58a26d8385a79925e2abd06de181a8d31a58a5df9c35f5590eef334a5fc4d7/68747470733a2f2f75706c6f6164732e6b73636f74742e63662f7368617265782f57696e646f77735465726d696e616c5f6c787951476367376a772e706e67"><img src="https://camo.githubusercontent.com/fa58a26d8385a79925e2abd06de181a8d31a58a5df9c35f5590eef334a5fc4d7/68747470733a2f2f75706c6f6164732e6b73636f74742e63662f7368617265782f57696e646f77735465726d696e616c5f6c787951476367376a772e706e67" alt="windows terminal screenshot" data-canonical-src="https://uploads.kscott.cf/sharex/WindowsTerminal_lxyQGcg7jw.png" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">Hey.<br>
So I briefly talked with <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tacaswell/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tacaswell">@tacaswell</a> about this. I mostly use scatter to show a discrete third variable via color (say I plot weight vs height and want to color by gender). The current scatter is not entirely equipped for this, because it doesn't really allow me to create the legend that I want, and I doesn't allow me to use cyclers on the symbols or color.<br>
What I want can be relatively trivially implemented as a for-loop over the unique values of the discrete variable, and calling plot once for each.<br>
I use this A LOT, and other data sciency folks, too, I think, so it would be nice to have a one-liner for this, i.e. implement a function that does that for you.</p>
<p dir="auto">My question is:<br>
Should this go into matplotlib or somewhere else?<br>
If it should go into matplotlib, should it go into scatter or into a new function?</p> | <p dir="auto">currently specifying an array for color or size, only works for continuous data. using markers and colors mapped to subsets based on categorical data is hard and manual (basically you subset the data in a loop and call plot multiple times).</p>
<p dir="auto">i thought it would be hard as list-of-string already means something for some parameters (markers and colors can be specified as strings). but there is pandas’ <a href="http://pandas.pydata.org/pandas-docs/stable/categorical.html" rel="nofollow">category dtype</a>.</p>
<p dir="auto">i propose that using a categorical vector for one of these parameters should be automatically mapped to a palette of colors/markers when specified as <code class="notranslate">c</code> or <code class="notranslate">marker</code>.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# with A, B, C, being either categorical or quantitative,
# S being quantitative, and M being categorical
plt.scatter('A', 'B', s='S', c='C', marker='M', data=df)
# of course also works with arrays, and bool acts like categorical data:
plt.scatter(arr[:,0], arr[:,1], c=arr[:,-1] > 0)"><pre class="notranslate"><span class="pl-c"># with A, B, C, being either categorical or quantitative,</span>
<span class="pl-c"># S being quantitative, and M being categorical</span>
<span class="pl-s1">plt</span>.<span class="pl-en">scatter</span>(<span class="pl-s">'A'</span>, <span class="pl-s">'B'</span>, <span class="pl-s1">s</span><span class="pl-c1">=</span><span class="pl-s">'S'</span>, <span class="pl-s1">c</span><span class="pl-c1">=</span><span class="pl-s">'C'</span>, <span class="pl-s1">marker</span><span class="pl-c1">=</span><span class="pl-s">'M'</span>, <span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">df</span>)
<span class="pl-c"># of course also works with arrays, and bool acts like categorical data:</span>
<span class="pl-s1">plt</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">arr</span>[:,<span class="pl-c1">0</span>], <span class="pl-s1">arr</span>[:,<span class="pl-c1">1</span>], <span class="pl-s1">c</span><span class="pl-c1">=</span><span class="pl-s1">arr</span>[:,<span class="pl-c1">-</span><span class="pl-c1">1</span>] <span class="pl-c1">></span> <span class="pl-c1">0</span>)</pre></div>
<h2 dir="auto">more palettes than just the colormap</h2>
<p dir="auto">the color palette for categorical data would be <code class="notranslate">plt.rcParams['axes.prop_cycle'].by_key()['color']</code>, the marker palette a new <code class="notranslate">rcParam</code> (maybe?)</p>
<p dir="auto">those palettes would be cycled if there are too many categories.</p>
<h2 dir="auto">legends</h2>
<ul dir="auto">
<li>categorical: legend</li>
<li>discrete: (ordered legend or segmented bar)</li>
<li>continuous: bar (colorbar for color, isosceles trapezoid for size)</li>
</ul>
<h2 dir="auto">open questions</h2>
<ul dir="auto">
<li>are integers treated as quantitiative + discrete (legend containing all separate values) or continuous (bar)</li>
<li>how to specify if a legend/colorbar/sizebar should created? it makes sense to automatically do it if we use the <code class="notranslate">data=</code> interface</li>
</ul> | 1 |
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">main</code> branch of Celery.</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="https://docs.celeryq.dev/en/main/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/main">commit log</a><br>
to find out if the bug was already fixed in the main 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">main</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">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: 5.2.7</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<code class="notranslate">
import os
from celery import Celery
<p dir="auto">os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proj.settings')</p>
</code><p dir="auto"><code class="notranslate">app = Celery('proj')<br>
app.conf.update({<br>
'broker_url': 'redis://localhost:8000/11',<br>
'result_backend': 'django-db',<br>
'accept_content': ['json'],<br>
'task_serializer': 'json',<br>
'result_serializer': 'json',<br>
'worker_force_execv': True,<br>
'worker_concurrency': 10,<br>
'task_time_limit': 60 * 60,<br>
'worker_max_tasks_per_child': 200,<br>
'beat_tz_aware': False,<br>
'result_extended': True,<br>
})<br>
app.conf.timezone = 'Asia/Shanghai'<br>
app.conf.enable_utc = False<br>
app.autodiscover_tasks()<br>
</code></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.8.6</li>
<li><strong>Minimal Celery Version</strong>: 5.2.7</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: CentOS Linux release 7.9.2009 (Core)</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<code class="notranslate">
aioredis==1.3.1
amqp==5.1.1
ansible-runner==2.2.0
asgiref==3.5.2
async-timeout==4.0.2
attrs==21.4.0
autobahn==22.5.1
Automat==20.2.0
backports.zoneinfo==0.2.1
billiard==3.6.4.0
celery==5.2.7
certifi==2022.6.15
cffi==1.15.0
channels==3.0.4
channels-redis==3.4.0
charset-normalizer==2.1.0
click==8.1.3
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.2.0
constantly==15.1.0
cron-descriptor==1.3.0
cryptography==37.0.2
cx-Oracle==8.3.0
daphne==3.0.2
Deprecated==1.2.13
Django==4.0.5
django-celery-beat==2.5.0
django-celery-results==2.5.1
django-cors-headers==3.13.0
django-redis==5.2.0
django-simpleui==2023.3.1
django-timezone-field==5.0
djangorestframework==3.14.0
djangorestframework-simplejwt==5.2.2
docopt==0.6.2
docutils==0.18.1
flower==1.2.0
hiredis==2.0.0
humanize==4.6.0
hyperlink==21.0.0
idna==3.3
incremental==21.3.0
kombu==5.2.4
ldap3==2.9.1
lockfile==0.12.2
msgpack==1.0.4
mysqlclient==2.1.0
packaging==21.3
pexpect==4.8.0
pipreqs==0.4.11
prometheus-client==0.16.0
prompt-toolkit==3.0.29
ptyprocess==0.7.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
PyJWT==2.6.0
pyOpenSSL==22.0.0
pyparsing==3.0.9
python-crontab==2.6.0
python-daemon==2.3.0
python-dateutil==2.8.2
pytz==2022.1
PyYAML==6.0
redis==4.3.3
requests==2.28.1
service-identity==21.1.0
six==1.16.0
sqlparse==0.4.2
supervisor==4.2.4
tornado==6.3.1
Twisted==22.4.0
txaio==22.2.1
typing_extensions==4.2.0
tzdata==2022.2
urllib3==1.26.9
vine==5.0.0
wcwidth==0.2.5
wrapt==1.14.1
yapf==0.32.0
yarg==0.1.9
zope.interface==5.4.0
</code>
</details>
Steps to reproduce
<ol dir="auto">
<li>Start Celery with the following configuration:</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#proj/celery.py
import os
from celery import Celery
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proj.settings')
app = Celery('proj')
app.conf.update({
'broker_url': 'redis://localhost:8000/11',
'result_backend': 'django-db',
'accept_content': ['json'],
'task_serializer': 'json',
'result_serializer': 'json',
'worker_force_execv': True,
'worker_concurrency': 10,
'task_time_limit': 60 * 60,
'worker_max_tasks_per_child': 200,
'beat_tz_aware': False,
'result_extended': True,
})
app.conf.timezone = 'Asia/Shanghai'
app.conf.enable_utc = False
app.autodiscover_tasks()"><pre class="notranslate"><span class="pl-c">#proj/celery.py</span>
<span class="pl-k">import</span> <span class="pl-s1">os</span>
<span class="pl-k">from</span> <span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-v">Celery</span>
<span class="pl-s1">os</span>.<span class="pl-s1">environ</span>.<span class="pl-en">setdefault</span>(<span class="pl-s">'DJANGO_SETTINGS_MODULE'</span>, <span class="pl-s">'proj.settings'</span>)
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">'proj'</span>)
<span class="pl-s1">app</span>.<span class="pl-s1">conf</span>.<span class="pl-en">update</span>({
<span class="pl-s">'broker_url'</span>: <span class="pl-s">'redis://localhost:8000/11'</span>,
<span class="pl-s">'result_backend'</span>: <span class="pl-s">'django-db'</span>,
<span class="pl-s">'accept_content'</span>: [<span class="pl-s">'json'</span>],
<span class="pl-s">'task_serializer'</span>: <span class="pl-s">'json'</span>,
<span class="pl-s">'result_serializer'</span>: <span class="pl-s">'json'</span>,
<span class="pl-s">'worker_force_execv'</span>: <span class="pl-c1">True</span>,
<span class="pl-s">'worker_concurrency'</span>: <span class="pl-c1">10</span>,
<span class="pl-s">'task_time_limit'</span>: <span class="pl-c1">60</span> <span class="pl-c1">*</span> <span class="pl-c1">60</span>,
<span class="pl-s">'worker_max_tasks_per_child'</span>: <span class="pl-c1">200</span>,
<span class="pl-s">'beat_tz_aware'</span>: <span class="pl-c1">False</span>,
<span class="pl-s">'result_extended'</span>: <span class="pl-c1">True</span>,
})
<span class="pl-s1">app</span>.<span class="pl-s1">conf</span>.<span class="pl-s1">timezone</span> <span class="pl-c1">=</span> <span class="pl-s">'Asia/Shanghai'</span>
<span class="pl-s1">app</span>.<span class="pl-s1">conf</span>.<span class="pl-s1">enable_utc</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-s1">app</span>.<span class="pl-en">autodiscover_tasks</span>()</pre></div>
<ol start="2" dir="auto">
<li>Add a task to the app:</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# myapp/tasks.py
from proj.celery import app
@app.task
def add():
print('aa')"><pre class="notranslate"><span class="pl-c"># myapp/tasks.py</span>
<span class="pl-k">from</span> <span class="pl-s1">proj</span>.<span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-s1">app</span>
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">add</span>():
<span class="pl-en">print</span>(<span class="pl-s">'aa'</span>)</pre></div>
<ol start="3" dir="auto">
<li>Attempt to call the task with the following code:</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# myapp/views.py
def task_page(request):
from dbaOps.celery import app
print(app.tasks.keys())
return render(request, 'myapp/tasks.html')"><pre class="notranslate"><span class="pl-c"># myapp/views.py</span>
<span class="pl-k">def</span> <span class="pl-en">task_page</span>(<span class="pl-s1">request</span>):
<span class="pl-k">from</span> <span class="pl-s1">dbaOps</span>.<span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-s1">app</span>
<span class="pl-en">print</span>(<span class="pl-s1">app</span>.<span class="pl-s1">tasks</span>.<span class="pl-en">keys</span>())
<span class="pl-k">return</span> <span class="pl-en">render</span>(<span class="pl-s1">request</span>, <span class="pl-s">'myapp/tasks.html'</span>)</pre></div>
<p dir="auto">Expected behavior<br>
The task myapp.tasks.add should be listed in the output of app.tasks.keys().</p>
<p dir="auto">Actual Behavior<br>
The task myapp.tasks.add does not appear in the output of app.tasks.keys(). However, when I modify the import statement in views.py to from myapp.tasks import app, the task does appear in the list.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# myapp/views.py
def task_page(request):
from myapp.tasks import app
print(app.tasks.keys())
return render(request, 'myapp/tasks.html')"><pre class="notranslate"><span class="pl-c"># myapp/views.py</span>
<span class="pl-k">def</span> <span class="pl-en">task_page</span>(<span class="pl-s1">request</span>):
<span class="pl-k">from</span> <span class="pl-s1">myapp</span>.<span class="pl-s1">tasks</span> <span class="pl-k">import</span> <span class="pl-s1">app</span>
<span class="pl-en">print</span>(<span class="pl-s1">app</span>.<span class="pl-s1">tasks</span>.<span class="pl-en">keys</span>())
<span class="pl-k">return</span> <span class="pl-en">render</span>(<span class="pl-s1">request</span>, <span class="pl-s">'myapp/tasks.html'</span>)</pre></div>
<p dir="auto">I would appreciate any help in understanding why this is happening and how to resolve it. Thank you!</p>
<p dir="auto">Related Issues and Possible Duplicates<br>
Related Issues<br>
None<br>
Possible Duplicates<br>
None</p> | <p dir="auto">There's an issue in the implementation of <code class="notranslate">celery.schedules.crontab</code> method that can cause <code class="notranslate">crontab.is_due</code> to claim a schedule is due at a time that is completely unrelated to the given crontab parameters. This appears to happen in cases where the <code class="notranslate">last_run_at</code> value is older than the most recent feasible time the schedule could have run. It looks like that this issue was introduced as part of complex logic added nearly 8 years ago to improve the accuracy of time remaining estimates for <code class="notranslate">crontab</code> periodic tasks: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/4ed89ec49582b540149cf06047f091ebd20fb300/hovercard" href="https://github.com/celery/celery/commit/4ed89ec49582b540149cf06047f091ebd20fb300"><tt>4ed89ec</tt></a></p>
<h2 dir="auto">Checklist</h2>
<p dir="auto">Issue first observed in a celery deployment running celery v3.1.19</p>
<p dir="auto">From inspecting the <code class="notranslate">celery.schedules.crontab</code> code it appears likely that this issue is present in all celery versions as far back as v2.1.0 through to v4.1.1 .</p>
<p dir="auto">Unit tests (please see below) confirm issue is still present in master (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/b599b96960be9dd42b3dee82a58bd1d711df0317/hovercard" href="https://github.com/celery/celery/commit/b599b96960be9dd42b3dee82a58bd1d711df0317"><tt>b599b96</tt></a> at time of writing).</p>
<h2 dir="auto">Steps to reproduce</h2>
<p dir="auto">Please apply this patch to celery master branch, remove <code class="notranslate">@skip.todo</code> from the first new test, run unit tests, observe the first of these added unit tests fails:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="diff --git a/t/unit/app/test_schedules.py b/t/unit/app/test_schedules.py
index a7b3025..0340461 100644
--- a/t/unit/app/test_schedules.py
+++ b/t/unit/app/test_schedules.py
@@ -26,6 +26,18 @@ def patch_crontab_nowfun(cls, retval):
cls.nowfun = prev_nowfun
+def is_time_feasible_wrt_crontab_schedule(t, z):
+ # z : celery.schedules.crontab instance
+ t = z.maybe_make_aware(t)
+ return (
+ t.month in z.month_of_year and
+ (t.isoweekday() % 7) in z.day_of_week and
+ t.day in z.day_of_month and
+ t.hour in z.hour and
+ t.minute in z.minute
+ )
+
+
@skip.unless_module('ephem')
class test_solar:
@@ -803,3 +815,59 @@ class test_crontab_is_due:
due, remaining = self.yearly.is_due(datetime(2009, 3, 12, 7, 30))
assert not due
assert remaining == 4 * 24 * 60 * 60 - 3 * 60 * 60
+
+ @skip.todo('FIXME crontab logic is defective when last_run_at is older than the most recent feasible time wrt schedule')
+ def test_daily_execution_if_last_run_at_was_days_ago_and_current_time_does_not_match_crontab_schedule_then_execution_is_not_due(self):
+ z = self.crontab(hour=7, minute=30)
+ last_run_at = datetime(2018, 6, 1, 7, 30)
+ now = datetime(2018, 6, 9, 23, 48)
+ expected_next_execution_time = datetime(2018, 6, 10, 7, 30)
+ expected_remaining = (expected_next_execution_time - now).total_seconds()
+ # check our assumptions
+ assert is_time_feasible_wrt_crontab_schedule(last_run_at, z)
+ assert not is_time_feasible_wrt_crontab_schedule(now, z)
+ assert is_time_feasible_wrt_crontab_schedule(expected_next_execution_time, z)
+ assert now < expected_next_execution_time
+ assert expected_remaining == (7 * 60 + 30 + 12) * 60
+ # test is_due
+ with patch_crontab_nowfun(z, now):
+ due, remaining = z.is_due(last_run_at=last_run_at)
+ assert remaining == expected_remaining
+ assert not due
+
+ def test_daily_execution_if_last_run_at_was_the_most_recent_feasible_time_wrt_schedule_in_past_and_current_time_does_not_match_crontab_schedule_then_execution_is_not_due(self):
+ z = self.crontab(hour=7, minute=30)
+ last_run_at = datetime(2018, 6, 9, 7, 30)
+ now = datetime(2018, 6, 9, 23, 48)
+ expected_next_execution_time = datetime(2018, 6, 10, 7, 30)
+ expected_remaining = (expected_next_execution_time - now).total_seconds()
+ # check our assumptions
+ assert is_time_feasible_wrt_crontab_schedule(last_run_at, z)
+ assert not is_time_feasible_wrt_crontab_schedule(now, z)
+ assert is_time_feasible_wrt_crontab_schedule(expected_next_execution_time, z)
+ assert now < expected_next_execution_time
+ assert expected_remaining == (7 * 60 + 30 + 12) * 60
+ # test is_due
+ with patch_crontab_nowfun(z, now):
+ due, remaining = z.is_due(last_run_at=last_run_at)
+ assert remaining == expected_remaining
+ assert not due
+
+ def test_daily_execution_if_last_run_at_was_more_recent_than_the_most_recent_feasible_time_wrt_schedule_in_past_and_current_time_does_not_match_crontab_schedule_then_execution_is_not_due(self):
+ z = self.crontab(hour=7, minute=30)
+ last_run_at = datetime(2018, 6, 9, 10, 30) # not feasible wrt to current schedule. case can happen if schedule is modified after a run
+ now = datetime(2018, 6, 9, 23, 48)
+ expected_next_execution_time = datetime(2018, 6, 10, 7, 30)
+ expected_remaining = (expected_next_execution_time - now).total_seconds()
+ # check our assumptions
+ assert not is_time_feasible_wrt_crontab_schedule(last_run_at, z)
+ assert not is_time_feasible_wrt_crontab_schedule(now, z)
+ assert is_time_feasible_wrt_crontab_schedule(expected_next_execution_time, z)
+ assert now < expected_next_execution_time
+ assert expected_remaining == (7 * 60 + 30 + 12) * 60
+ # test is_due
+ with patch_crontab_nowfun(z, now):
+ due, remaining = z.is_due(last_run_at=last_run_at)
+ assert remaining == expected_remaining
+ assert not due
+"><pre class="notranslate"><code class="notranslate">diff --git a/t/unit/app/test_schedules.py b/t/unit/app/test_schedules.py
index a7b3025..0340461 100644
--- a/t/unit/app/test_schedules.py
+++ b/t/unit/app/test_schedules.py
@@ -26,6 +26,18 @@ def patch_crontab_nowfun(cls, retval):
cls.nowfun = prev_nowfun
+def is_time_feasible_wrt_crontab_schedule(t, z):
+ # z : celery.schedules.crontab instance
+ t = z.maybe_make_aware(t)
+ return (
+ t.month in z.month_of_year and
+ (t.isoweekday() % 7) in z.day_of_week and
+ t.day in z.day_of_month and
+ t.hour in z.hour and
+ t.minute in z.minute
+ )
+
+
@skip.unless_module('ephem')
class test_solar:
@@ -803,3 +815,59 @@ class test_crontab_is_due:
due, remaining = self.yearly.is_due(datetime(2009, 3, 12, 7, 30))
assert not due
assert remaining == 4 * 24 * 60 * 60 - 3 * 60 * 60
+
+ @skip.todo('FIXME crontab logic is defective when last_run_at is older than the most recent feasible time wrt schedule')
+ def test_daily_execution_if_last_run_at_was_days_ago_and_current_time_does_not_match_crontab_schedule_then_execution_is_not_due(self):
+ z = self.crontab(hour=7, minute=30)
+ last_run_at = datetime(2018, 6, 1, 7, 30)
+ now = datetime(2018, 6, 9, 23, 48)
+ expected_next_execution_time = datetime(2018, 6, 10, 7, 30)
+ expected_remaining = (expected_next_execution_time - now).total_seconds()
+ # check our assumptions
+ assert is_time_feasible_wrt_crontab_schedule(last_run_at, z)
+ assert not is_time_feasible_wrt_crontab_schedule(now, z)
+ assert is_time_feasible_wrt_crontab_schedule(expected_next_execution_time, z)
+ assert now < expected_next_execution_time
+ assert expected_remaining == (7 * 60 + 30 + 12) * 60
+ # test is_due
+ with patch_crontab_nowfun(z, now):
+ due, remaining = z.is_due(last_run_at=last_run_at)
+ assert remaining == expected_remaining
+ assert not due
+
+ def test_daily_execution_if_last_run_at_was_the_most_recent_feasible_time_wrt_schedule_in_past_and_current_time_does_not_match_crontab_schedule_then_execution_is_not_due(self):
+ z = self.crontab(hour=7, minute=30)
+ last_run_at = datetime(2018, 6, 9, 7, 30)
+ now = datetime(2018, 6, 9, 23, 48)
+ expected_next_execution_time = datetime(2018, 6, 10, 7, 30)
+ expected_remaining = (expected_next_execution_time - now).total_seconds()
+ # check our assumptions
+ assert is_time_feasible_wrt_crontab_schedule(last_run_at, z)
+ assert not is_time_feasible_wrt_crontab_schedule(now, z)
+ assert is_time_feasible_wrt_crontab_schedule(expected_next_execution_time, z)
+ assert now < expected_next_execution_time
+ assert expected_remaining == (7 * 60 + 30 + 12) * 60
+ # test is_due
+ with patch_crontab_nowfun(z, now):
+ due, remaining = z.is_due(last_run_at=last_run_at)
+ assert remaining == expected_remaining
+ assert not due
+
+ def test_daily_execution_if_last_run_at_was_more_recent_than_the_most_recent_feasible_time_wrt_schedule_in_past_and_current_time_does_not_match_crontab_schedule_then_execution_is_not_due(self):
+ z = self.crontab(hour=7, minute=30)
+ last_run_at = datetime(2018, 6, 9, 10, 30) # not feasible wrt to current schedule. case can happen if schedule is modified after a run
+ now = datetime(2018, 6, 9, 23, 48)
+ expected_next_execution_time = datetime(2018, 6, 10, 7, 30)
+ expected_remaining = (expected_next_execution_time - now).total_seconds()
+ # check our assumptions
+ assert not is_time_feasible_wrt_crontab_schedule(last_run_at, z)
+ assert not is_time_feasible_wrt_crontab_schedule(now, z)
+ assert is_time_feasible_wrt_crontab_schedule(expected_next_execution_time, z)
+ assert now < expected_next_execution_time
+ assert expected_remaining == (7 * 60 + 30 + 12) * 60
+ # test is_due
+ with patch_crontab_nowfun(z, now):
+ due, remaining = z.is_due(last_run_at=last_run_at)
+ assert remaining == expected_remaining
+ assert not due
+
</code></pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">No matter what the value of <code class="notranslate">last_run_at</code> is, <code class="notranslate">crontab.is_due(last_run_at)</code> should never return <code class="notranslate">schedstate(True, rem)</code> when the current time <code class="notranslate">now</code> is not feasible with respect to the given crontab parameters.</p>
<h2 dir="auto">Actual behavior</h2>
<p dir="auto">if <code class="notranslate">last_run_at</code> value is older than the most recent time that is feasible with respect to the given crontab parameters then <code class="notranslate">crontab.is_due(last_run_at)</code> returns <code class="notranslate">schedstate(True, rem)</code> when the current time is not feasible with respect to the crontab parameters.</p>
<h2 dir="auto">Comments</h2>
<p dir="auto">This behaviour is surprising as it is an undocumented departure from cron-like behaviour. This behaviour is somewhat like an undocumented variant of uncontrollable <code class="notranslate">anacron</code> behaviour. "Uncontrollable" in the sense that unlike <code class="notranslate">anacrontab</code>'s <code class="notranslate">START_HOURS_RANGE</code> parameter - there is no control at all over when tasks will be run when a scheduled execution is missed.</p>
<p dir="auto">We experience this issue in production using the venerable Celery version of 3.1.19 : we have a celery beat process that is backed by a database using custom scheduler code that is derived from the django-celery-beat scheduler. Suppose we stop this celery beat process for some reason such as scheduled maintenance or during a deployment that needs to redeploy code to our celery cluster. When we later restart celery beat again then some or all <code class="notranslate">celery.schedules.crontab</code> scheduled tasks may immediately execute if there was a time during the celery beat downtime period that matches the crontab parameters.</p>
<p dir="auto">One hack that can mitigate this behaviour is updating the "last_run_at" value for all celery crontab scheduled periodic tasks to the current time when celery beat starts, before celery beat makes any calls to the <code class="notranslate">celery.schedules.crontab.is_due</code> method.</p> | 0 |
<h4 dir="auto">Description</h4>
<p dir="auto">I'm running GridSearch for Gradient Boosting algorithm and for some parameters it just hangs after 10-15 minutes on my laptop. First iterations produce the python processes according to CPU number (8 in my case) with the visible workload and then the processes are gone, no progress reported. I've found the similar issue <a href="https://github.com/scikit-learn/scikit-learn/issues/3605" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/3605/hovercard">GridSearchCV processes hang with n_jobs</a> however it's closed so I've decided to open new issue.</p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<p dir="auto">My data setup:<br>
It's <a href="https://archive.ics.uci.edu/ml/datasets/Census+Income" rel="nofollow">Census data</a> from UCI repository<br>
Originally there are 13 features:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RangeIndex: 45222 entries, 0 to 45221
Data columns (total 14 columns):
age 45222 non-null int64
workclass 45222 non-null object
education_level 45222 non-null object
education-num 45222 non-null float64
marital-status 45222 non-null object
occupation 45222 non-null object
relationship 45222 non-null object
race 45222 non-null object
sex 45222 non-null object
capital-gain 45222 non-null float64
capital-loss 45222 non-null float64
hours-per-week 45222 non-null float64
native-country 45222 non-null object
income 45222 non-null object
dtypes: float64(4), int64(1), object(9)
memory usage: 4.8+ MB"><pre class="notranslate"><code class="notranslate">RangeIndex: 45222 entries, 0 to 45221
Data columns (total 14 columns):
age 45222 non-null int64
workclass 45222 non-null object
education_level 45222 non-null object
education-num 45222 non-null float64
marital-status 45222 non-null object
occupation 45222 non-null object
relationship 45222 non-null object
race 45222 non-null object
sex 45222 non-null object
capital-gain 45222 non-null float64
capital-loss 45222 non-null float64
hours-per-week 45222 non-null float64
native-country 45222 non-null object
income 45222 non-null object
dtypes: float64(4), int64(1), object(9)
memory usage: 4.8+ MB
</code></pre></div>
<p dir="auto">And then I get 103 total features after one-hot encoding.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sklearn.grid_search import GridSearchCV
from sklearn.metrics import fbeta_score, make_scorer,accuracy_score
clf = GradientBoostingClassifier()
parameters = {'loss': ['deviance', 'exponential'],
'warm_start':[True,False],
'max_depth':[4,5,6,7], - with this setup went away for
'n_estimators': [100, 200,300]
}
scorer = make_scorer(fbeta_score, beta=0.5)
grid_obj = GridSearchCV(clf,param_grid=parameters,scoring=scorer,n_jobs=-1,verbose=10 )
grid_fit = grid_obj.fit(X_train,y_train)
best_clf = grid_fit.best_estimator_"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">grid_search</span> <span class="pl-k">import</span> <span class="pl-v">GridSearchCV</span>
<span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">metrics</span> <span class="pl-k">import</span> <span class="pl-s1">fbeta_score</span>, <span class="pl-s1">make_scorer</span>,<span class="pl-s1">accuracy_score</span>
<span class="pl-s1">clf</span> <span class="pl-c1">=</span> <span class="pl-v">GradientBoostingClassifier</span>()
<span class="pl-s1">parameters</span> <span class="pl-c1">=</span> {<span class="pl-s">'loss'</span>: [<span class="pl-s">'deviance'</span>, <span class="pl-s">'exponential'</span>],
<span class="pl-s">'warm_start'</span>:[<span class="pl-c1">True</span>,<span class="pl-c1">False</span>],
<span class="pl-s">'max_depth'</span>:[<span class="pl-c1">4</span>,<span class="pl-c1">5</span>,<span class="pl-c1">6</span>,<span class="pl-c1">7</span>], <span class="pl-c1">-</span> <span class="pl-s1">with</span> <span class="pl-s1">this</span> <span class="pl-s1">setup</span> <span class="pl-s1">went</span> <span class="pl-s1">away</span> <span class="pl-s1">for</span>
'<span class="pl-s1">n_estimators</span>': [<span class="pl-c1">100</span>, <span class="pl-c1">200</span>,<span class="pl-c1">300</span>]
}
<span class="pl-s1">scorer</span> <span class="pl-c1">=</span> <span class="pl-en">make_scorer</span>(<span class="pl-s1">fbeta_score</span>, <span class="pl-s1">beta</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>)
<span class="pl-s1">grid_obj</span> <span class="pl-c1">=</span> <span class="pl-v">GridSearchCV</span>(<span class="pl-s1">clf</span>,<span class="pl-s1">param_grid</span><span class="pl-c1">=</span><span class="pl-s1">parameters</span>,<span class="pl-s1">scoring</span><span class="pl-c1">=</span><span class="pl-s1">scorer</span>,<span class="pl-s1">n_jobs</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>,<span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">10</span> )
<span class="pl-s1">grid_fit</span> <span class="pl-c1">=</span> <span class="pl-s1">grid_obj</span>.<span class="pl-en">fit</span>(<span class="pl-v">X_train</span>,<span class="pl-s1">y_train</span>)
<span class="pl-s1">best_clf</span> <span class="pl-c1">=</span> <span class="pl-s1">grid_fit</span>.<span class="pl-s1">best_estimator_</span></pre></div>
<h4 dir="auto">Versions</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Darwin-16.7.0-x86_64-i386-64bit
('Python', '2.7.10 (default, Sep 23 2015, 04:34:14) \n[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)]')
('NumPy', '1.13.3')
('SciPy', '1.0.0')
('Scikit-Learn', '0.19.1')
('Scikit-Learn', '0.19.1')"><pre class="notranslate"><code class="notranslate">Darwin-16.7.0-x86_64-i386-64bit
('Python', '2.7.10 (default, Sep 23 2015, 04:34:14) \n[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)]')
('NumPy', '1.13.3')
('SciPy', '1.0.0')
('Scikit-Learn', '0.19.1')
('Scikit-Learn', '0.19.1')
</code></pre></div>
<h4 dir="auto">Actual Results</h4>
<p dir="auto">The output of incomplete process after 3 hours of running:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Fitting 3 folds for each of 48 candidates, totalling 144 fits
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4, score=0.748376 - 1.1min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4, score=0.744681 - 1.1min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4, score=0.748376 - 1.1min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4 ..
[Parallel(n_jobs=-1)]: Done 2 tasks | elapsed: 1.1min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4, score=0.755791 - 1.1min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4, score=0.744681 - 1.1min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4, score=0.755791 - 1.1min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4, score=0.755238 - 2.0min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4, score=0.748726 - 2.0min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4, score=0.755390 - 2.3min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4 ..
[Parallel(n_jobs=-1)]: Done 9 tasks | elapsed: 3.4min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4, score=0.748651 - 2.3min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4, score=0.757694 - 2.3min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4, score=0.757694 - 2.3min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4, score=0.753342 - 3.1min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4, score=0.749265 - 3.2min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4, score=0.753419 - 3.2min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5, score=0.757060 - 1.8min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5 ..
[Parallel(n_jobs=-1)]: Done 16 tasks | elapsed: 5.2min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5, score=0.749191 - 1.8min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4, score=0.759966 - 3.4min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5, score=0.759275 - 1.9min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5, score=0.758360 - 1.9min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4, score=0.750019 - 3.2min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4, score=0.759813 - 3.3min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5, score=0.748366 - 1.8min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5, score=0.759275 - 1.8min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5, score=0.752455 - 3.0min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5 ...
[Parallel(n_jobs=-1)]: Done 25 tasks | elapsed: 8.3min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5, score=0.749569 - 3.0min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5, score=0.752148 - 3.0min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5, score=0.757131 - 3.1min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5, score=0.749570 - 2.9min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5, score=0.757797 - 2.9min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5, score=0.747161 - 3.8min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5, score=0.747114 - 3.8min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6, score=0.752622 - 1.8min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6, score=0.747398 - 1.8min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6 ..
[Parallel(n_jobs=-1)]: Done 34 tasks | elapsed: 11.4min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5, score=0.757843 - 3.6min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5, score=0.747010 - 3.5min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5, score=0.748530 - 3.3min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5, score=0.757692 - 3.3min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6, score=0.757374 - 1.8min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6, score=0.752622 - 1.8min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6, score=0.750770 - 1.8min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6, score=0.757374 - 1.9min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6, score=0.749492 - 4.6min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6, score=0.745467 - 4.7min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6, score=0.756200 - 5.1min
[Parallel(n_jobs=-1)]: Done 45 tasks | elapsed: 17.6min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6, score=0.752206 - 5.1min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6, score=0.745467 - 5.2min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6, score=0.755925 - 5.2min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6, score=0.749421 - 7.4min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6, score=0.744302 - 7.6min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7, score=0.753965 - 3.7min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7, score=0.742774 - 3.7min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7 ..
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6, score=0.749497 - 7.0min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6, score=0.750551 - 7.2min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7, score=0.755611 - 3.9min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6, score=0.740919 - 7.2min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=7 ..
[Parallel(n_jobs=-1)]: Done 56 tasks | elapsed: 24.8min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7, score=0.753425 - 3.9min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=7 ..
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6, score=0.751236 - 7.2min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=7 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7, score=0.746959 - 4.1min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7, score=0.754571 - 4.3min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=7 ..."><pre class="notranslate"><code class="notranslate">Fitting 3 folds for each of 48 candidates, totalling 144 fits
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4, score=0.748376 - 1.1min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4, score=0.744681 - 1.1min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4, score=0.748376 - 1.1min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4 ..
[Parallel(n_jobs=-1)]: Done 2 tasks | elapsed: 1.1min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=4, score=0.755791 - 1.1min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4, score=0.744681 - 1.1min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=4, score=0.755791 - 1.1min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4, score=0.755238 - 2.0min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4, score=0.748726 - 2.0min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4, score=0.755390 - 2.3min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4 ..
[Parallel(n_jobs=-1)]: Done 9 tasks | elapsed: 3.4min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4, score=0.748651 - 2.3min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4 ..
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=4, score=0.757694 - 2.3min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=4, score=0.757694 - 2.3min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4, score=0.753342 - 3.1min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4, score=0.749265 - 3.2min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4, score=0.753419 - 3.2min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5, score=0.757060 - 1.8min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5 ..
[Parallel(n_jobs=-1)]: Done 16 tasks | elapsed: 5.2min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5, score=0.749191 - 1.8min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=4, score=0.759966 - 3.4min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=5, score=0.759275 - 1.9min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5, score=0.758360 - 1.9min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4, score=0.750019 - 3.2min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=4, score=0.759813 - 3.3min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5, score=0.748366 - 1.8min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=5, score=0.759275 - 1.8min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5, score=0.752455 - 3.0min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5 ...
[Parallel(n_jobs=-1)]: Done 25 tasks | elapsed: 8.3min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5, score=0.749569 - 3.0min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5, score=0.752148 - 3.0min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=5, score=0.757131 - 3.1min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5, score=0.749570 - 2.9min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=5, score=0.757797 - 2.9min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5, score=0.747161 - 3.8min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5, score=0.747114 - 3.8min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6, score=0.752622 - 1.8min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6, score=0.747398 - 1.8min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6 ..
[Parallel(n_jobs=-1)]: Done 34 tasks | elapsed: 11.4min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=5, score=0.757843 - 3.6min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5, score=0.747010 - 3.5min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5, score=0.748530 - 3.3min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=5, score=0.757692 - 3.3min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=6, score=0.757374 - 1.8min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6, score=0.752622 - 1.8min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6, score=0.750770 - 1.8min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=6, score=0.757374 - 1.9min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6, score=0.749492 - 4.6min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6 ...
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6, score=0.745467 - 4.7min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=6, score=0.756200 - 5.1min
[Parallel(n_jobs=-1)]: Done 45 tasks | elapsed: 17.6min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6, score=0.752206 - 5.1min
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6 ..
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6, score=0.745467 - 5.2min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=6, score=0.755925 - 5.2min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6, score=0.749421 - 7.4min
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6, score=0.744302 - 7.6min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7, score=0.753965 - 3.7min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7 ..
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7, score=0.742774 - 3.7min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7 ..
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6, score=0.749497 - 7.0min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=6, score=0.750551 - 7.2min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=100, loss=deviance, warm_start=True, max_depth=7, score=0.755611 - 3.9min
[CV] n_estimators=200, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6, score=0.740919 - 7.2min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=7 ..
[Parallel(n_jobs=-1)]: Done 56 tasks | elapsed: 24.8min
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7, score=0.753425 - 3.9min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=7 ..
[CV] n_estimators=300, loss=deviance, warm_start=False, max_depth=6, score=0.751236 - 7.2min
[CV] n_estimators=200, loss=deviance, warm_start=False, max_depth=7 ..
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7, score=0.746959 - 4.1min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=7 ...
[CV] n_estimators=100, loss=deviance, warm_start=False, max_depth=7, score=0.754571 - 4.3min
[CV] n_estimators=300, loss=deviance, warm_start=True, max_depth=7 ...
</code></pre></div>
<h4 dir="auto">Expected Results</h4> | <p dir="auto">The below is the source code:</p>
<p dir="auto">import sqlite3<br>
import re<br>
import time<br>
import csv<br>
import numpy as np<br>
from sklearn.naive_bayes import MultinomialNB<br>
from sklearn.naive_bayes import BernoulliNB<br>
from sklearn.naive_bayes import GaussianNB<br>
from sklearn.utils import shuffle<br>
from sklearn.model_selection import train_test_split<br>
from sklearn.model_selection import cross_val_score<br>
from sklearn.learning_curve import learning_curve<br>
from sklearn.model_selection import GridSearchCV,RandomizedSearchCV<br>
from matplotlib import pyplot as pl<br>
from matplotlib.backends.backend_pdf import PdfPages<br>
from scipy import sparse<br>
from sklearn.feature_extraction.text import TfidfVectorizer<br>
from sklearn.feature_extraction.text import HashingVectorizer<br>
from sklearn.ensemble import RandomForestClassifier<br>
from sklearn.ensemble import ExtraTreesClassifier<br>
from sklearn.ensemble import AdaBoostClassifier<br>
from sklearn.tree import DecisionTreeClassifier<br>
from sklearn.datasets import make_blobs<br>
from sklearn import svm<br>
from sklearn.externals import joblib<br>
from sklearn.metrics import precision_recall_fscore_support<br>
from sklearn.metrics import f1_score<br>
from sklearn.metrics import accuracy_score<br>
import glob,os<br>
#MultiNomial</p>
<p dir="auto">from xgboost import XGBClassifier<br>
import xgboost<br>
from tpot import TPOTClassifier</p>
<p dir="auto">tpot_config = {<br>
'xgboost.XGBClassifier': {<br>
'n_estimators':[50,100,150,200],<br>
'max_depth':[2,3,4,5,6,7,8,9],<br>
'min_child_weight':[2,3,4,5],<br>
'colsample_bytree':[0.2,0.6,0.8],<br>
'colsample_bylevel':[0.2,0.6,0.8],<br>
'objective':['multi:softprob']</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">param = {<br>
'n_estimators':[200],<br>
'max_depth':[3,5,4],<br>
'min_child_weight':[4,5,3],<br>
'colsample_bytree':[0.2,0.6,0.8],<br>
'colsample_bylevel':[0.2,0.6,0.8]</p>
<p dir="auto">}<br>
#pipeline_optimizer = TPOTClassifier(generations=5, population_size=20, cv=2,max_eval_time_mins=30,random_state=42, verbosity=200, config_dict=tpot_config,n_jobs = 10)</p>
<p dir="auto">clf=XGBClassifier(objective= 'multi:softprob')</p>
<p dir="auto">gsearch1 = GridSearchCV(estimator = clf, param_grid = param,cv=2,verbose = 100,n_jobs = -1)<br>
gsearch1.fit(X_train, y_train)<br>
print gsearch1.bestscore<br>
print gsearch1.bestparams</p>
<p dir="auto">#Omitted code relevant to data loading. It works fine for n_jobs =1</p>
<p dir="auto">I am using Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39).<br>
scikit-learn (0.19.1)</p>
<p dir="auto">Because of this issue, TPOT also hangs as it uses SciKit learn GridSearchCV for internal operations.</p> | 1 |
<p dir="auto">Steps to reproduce:</p>
<ol dir="auto">
<li>Login with an user in level 282.</li>
<li>Go to <a href="http://freecodecamp.com" rel="nofollow">http://freecodecamp.com</a></li>
</ol>
<p dir="auto">Actual: Redirect to challenge 0.<br>
Expected: Redirect to most recent challenge. One challenge after my last challenge finished. Never redirect to a challenge that the user has already finished.</p> | <p dir="auto">every time i log in i am taken back to the start of the new user challenges<br>
I'm using FF 43.0.4 on windows 10</p> | 1 |
<p dir="auto">I'm following the 5 minutes Quick Start<br>
<a href="https://angular.io/docs/js/latest/quickstart.html" rel="nofollow">https://angular.io/docs/js/latest/quickstart.html</a></p>
<p dir="auto">But, I got the error below from Browser:<br>
Failed to load resource: the server responded with a status of 404 (Not Found)<br>
<a href="mailto:[email protected]">[email protected]</a>:1 Potentially unhandled rejection [3] Error loading "appone" at <a href="https://registry.jspm.io/appone.js" rel="nofollow">https://registry.jspm.io/appone.js</a><br>
Not Found: <a href="https://registry.jspm.io/appone.js" rel="nofollow">https://registry.jspm.io/appone.js</a> (WARNING: non-Error used)</p>
<p dir="auto">[file appone.html]</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<!doctype html>
<html>
<head>
<title>Angular 2 Quickstart</title>
<script src="https://github.jspm.io/jmcriffey/[email protected]/traceur-runtime.js"></script>
<script src="https://jspm.io/[email protected]"></script>
<script src="https://code.angularjs.org/2.0.0-alpha.34/angular2.js"></script>
</head>
<body>
<!-- The app component created in appone.ts -->
<my-app></my-app>
<script>
System.config({
baseURL: '/app'
});
System.import('appone');
</script>
</body>
</html>"><pre class="notranslate"><code class="notranslate"><!doctype html>
<html>
<head>
<title>Angular 2 Quickstart</title>
<script src="https://github.jspm.io/jmcriffey/[email protected]/traceur-runtime.js"></script>
<script src="https://jspm.io/[email protected]"></script>
<script src="https://code.angularjs.org/2.0.0-alpha.34/angular2.js"></script>
</head>
<body>
<!-- The app component created in appone.ts -->
<my-app></my-app>
<script>
System.config({
baseURL: '/app'
});
System.import('appone');
</script>
</body>
</html>
</code></pre></div>
<p dir="auto">[My Enviroment Information]<br>
TypeScript 1.5.3<br>
Browsers: IE 11 and Chrome 44 (Both has this problem)</p> | <p dir="auto">Currently, the 'patchEventTargetMethods' method in utils.js seems to cause an error under Microsoft Edge. The bind operation fails because the function object that is passed is not of type 'function' as expected but is an object instance of type 'FunctionWrapper'.</p>
<p dir="auto">Here's the output I get in the console:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SCRIPT5022: Expecting function got: [object FunctionWrapper]
core.js (44,7)"><pre class="notranslate"><code class="notranslate">SCRIPT5022: Expecting function got: [object FunctionWrapper]
core.js (44,7)
</code></pre></div>
<p dir="auto">Putting a breakpoint in the bind function, I see that typeof fn returns "object".</p>
<p dir="auto">I'm not sure whether the issue is actually caused by zone.js, angular or another dependency and I don't really know how to go about and debug it..</p>
<p dir="auto">Here's a basic plunker that has the issue: <a href="http://embed.plnkr.co/GohfcaiNrwVRn8Hq42tM/preview" rel="nofollow">http://embed.plnkr.co/GohfcaiNrwVRn8Hq42tM/preview</a></p> | 1 |
<p dir="auto">Currently in a debugger session, console.log etc will not show by default.<br>
Some debuggers can pipe output, though this will be less featureful and not as readily available as channeling through the debugger protocol.</p>
<p dir="auto">V8 has a builtin console that is "debugger protocol" enabled, resulting in messages like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client < {"method":"Console.messageAdded","params":{"message":{"source":"console-api","level":"log","text":"Adding 1 2","url":"/home/gudmund/code/ts-test/build/index.js","line":2,"column":13}}}
Client < {"method":"Runtime.consoleAPICalled","params":{"type":"log","args":[{"type":"string","value":"Adding "},{"type":"number","value":1,"description":"1"},{"type":"number","value":2,"description":"2"}],"executionContextId":1,"timestamp":1587836285935.544,"stackTrace":{"callFrames":[{"functionName":"add","scriptId":"54","url":"file:///home/gudmund/code/ts-test/build/index.js","lineNumber":1,"columnNumber":12},{"functionName":"","scriptId":"54","url":"file:///home/gudmund/code/ts-test/build/index.js","lineNumber":7,"columnNumber":15},{"functionName":"Module._compile","scriptId":"44","url":"internal/modules/cjs/loader.js","lineNumber":1152,"columnNumber":13},{"functionName":"Module._extensions..js","scriptId":"44","url":"internal/modules/cjs/loader.js","lineNumber":1175,"columnNumber":9},{"functionName":"Module.load","scriptId":"44","url":"internal/modules/cjs/loader.js","lineNumber":999,"columnNumber":31},{"functionName":"Module._load","scriptId":"44","url":"internal/modules/cjs/loader.js","lineNumber":898,"columnNumber":13},{"functionName":"executeUserEntryPoint","scriptId":"53","url":"internal/modules/run_main.js","lineNumber":73,"columnNumber":11},{"functionName":"","scriptId":"40","url":"internal/main/run_main_module.js","lineNumber":17,"columnNumber":46}]}}}"><pre class="notranslate"><code class="notranslate">Client < {"method":"Console.messageAdded","params":{"message":{"source":"console-api","level":"log","text":"Adding 1 2","url":"/home/gudmund/code/ts-test/build/index.js","line":2,"column":13}}}
Client < {"method":"Runtime.consoleAPICalled","params":{"type":"log","args":[{"type":"string","value":"Adding "},{"type":"number","value":1,"description":"1"},{"type":"number","value":2,"description":"2"}],"executionContextId":1,"timestamp":1587836285935.544,"stackTrace":{"callFrames":[{"functionName":"add","scriptId":"54","url":"file:///home/gudmund/code/ts-test/build/index.js","lineNumber":1,"columnNumber":12},{"functionName":"","scriptId":"54","url":"file:///home/gudmund/code/ts-test/build/index.js","lineNumber":7,"columnNumber":15},{"functionName":"Module._compile","scriptId":"44","url":"internal/modules/cjs/loader.js","lineNumber":1152,"columnNumber":13},{"functionName":"Module._extensions..js","scriptId":"44","url":"internal/modules/cjs/loader.js","lineNumber":1175,"columnNumber":9},{"functionName":"Module.load","scriptId":"44","url":"internal/modules/cjs/loader.js","lineNumber":999,"columnNumber":31},{"functionName":"Module._load","scriptId":"44","url":"internal/modules/cjs/loader.js","lineNumber":898,"columnNumber":13},{"functionName":"executeUserEntryPoint","scriptId":"53","url":"internal/modules/run_main.js","lineNumber":73,"columnNumber":11},{"functionName":"","scriptId":"40","url":"internal/main/run_main_module.js","lineNumber":17,"columnNumber":46}]}}}
</code></pre></div>
<p dir="auto">From which one can inspect logged variables via the debugger.<br>
<a href="https://github.com/v8/v8/blob/master/src/inspector/v8-console.cc#L219">https://github.com/v8/v8/blob/master/src/inspector/v8-console.cc#L219</a><br>
This <code class="notranslate">console</code> implementation is available on globalThis.</p>
<p dir="auto">In trying to utilize this, there were two issues:</p>
<ul dir="auto">
<li><strong>Detection of debugger/inspector mode</strong>. If the normal 'console...' calls are to be routed to the v8 implementation in debugger mode, I did not see a way to detect debugger/inspector mode.</li>
<li><strong>Implementation routing of console calls to v8 console</strong>.</li>
</ul>
<p dir="auto">There is a simple example implementation in a PR incoming below, just meant to illustrate.</p>
<h3 dir="auto">Diff between deno's and v8's <code class="notranslate">console</code></h3>
<p dir="auto">A simple name comparison gives the following diff.</p>
<p dir="auto"><strong>v8 extra:</strong></p>
<ul dir="auto">
<li><code class="notranslate">context(name)</code> - <a href="https://umaar.com/dev-tips/153-log-management/" rel="nofollow">Used to group outputs into tabs in devtools</a></li>
<li><code class="notranslate">profile(name?: string)</code> - Profile code. Have not investigated if this works currently</li>
<li><code class="notranslate">profileEnd()</code></li>
<li><code class="notranslate">timeStamp(name?: string)</code> - <a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/timeStamp" rel="nofollow">Adds a labeled mark to be used with <code class="notranslate">Performance</code></a></li>
</ul>
<p dir="auto"><strong>deno extra:</strong></p>
<ul dir="auto">
<li>(<code class="notranslate">indentLevel</code> - internal)</li>
</ul> | 1 |
|
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto"><code class="notranslate">with_dict</code></p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible --version
ansible 2.1.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible --version
ansible 2.1.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Running Ansible from: Arch Linux<br>
Target Host: Centos 7, Arch Linux</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When passing a dictionary via <code class="notranslate">with_dict</code> in a task and using certain portions of it to create values of another dictionary variable, nulls are not being preserved and incorrectly passed as empty string ""</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- hosts: localhost
gather_facts: no
vars:
# defaults (for single nodes)
param1: "defaultParam1"
param2: ~
param3: ""
param4: []
# overrides (for multiple nodes)
nodes:
node1:
config_path: /tmp/node1.conf
config_overrides:
param1: "node1Param1"
param2: ~
param3: ""
param4: []
node2:
config_path: /tmp/node2.conf
config_overrides:
# dictionaries to be converted to json in config
single_node_config:
Param1: "{{ param1 }}"
Param2: "{{ param2 }}"
Param3: "{{ param3 }}"
Param4: "{{ param4 }}"
multi_node_config:
Param1: "{{ item.value.config_overrides.param1 | default(param1) }}"
Param2: "{{ item.value.config_overrides.param2 | default(param2) }}"
Param3: "{{ item.value.config_overrides.param3 | default(param3) }}"
Param4: "{{ item.value.config_overrides.param4 | default(param4) }}"
# toggle
enable_multi_nodes: false
tasks:
# task for single node
- name: create config
copy:
content: "{{ single_node_config | to_nice_json }}"
dest: /tmp/single.conf
when: enable_multi_nodes != true
# task multi nodes
- name: create configs
copy:
content: "{{ multi_node_config | to_nice_json }}"
dest: "{{ item.value.config_path }}"
with_dict: "{{ nodes }}"
when: enable_multi_nodes == true"><pre class="notranslate"><code class="notranslate">- hosts: localhost
gather_facts: no
vars:
# defaults (for single nodes)
param1: "defaultParam1"
param2: ~
param3: ""
param4: []
# overrides (for multiple nodes)
nodes:
node1:
config_path: /tmp/node1.conf
config_overrides:
param1: "node1Param1"
param2: ~
param3: ""
param4: []
node2:
config_path: /tmp/node2.conf
config_overrides:
# dictionaries to be converted to json in config
single_node_config:
Param1: "{{ param1 }}"
Param2: "{{ param2 }}"
Param3: "{{ param3 }}"
Param4: "{{ param4 }}"
multi_node_config:
Param1: "{{ item.value.config_overrides.param1 | default(param1) }}"
Param2: "{{ item.value.config_overrides.param2 | default(param2) }}"
Param3: "{{ item.value.config_overrides.param3 | default(param3) }}"
Param4: "{{ item.value.config_overrides.param4 | default(param4) }}"
# toggle
enable_multi_nodes: false
tasks:
# task for single node
- name: create config
copy:
content: "{{ single_node_config | to_nice_json }}"
dest: /tmp/single.conf
when: enable_multi_nodes != true
# task multi nodes
- name: create configs
copy:
content: "{{ multi_node_config | to_nice_json }}"
dest: "{{ item.value.config_path }}"
with_dict: "{{ nodes }}"
when: enable_multi_nodes == true
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cat /tmp/single.conf /tmp/node1.conf /tmp/node2.conf
{
"Param1": "defaultParam1",
"Param2": null,
"Param3": "",
"Param4": []
}
{
"Param1": "node1Param1",
"Param2": null,
"Param3": "",
"Param4": []
}
{
"Param1": "defaultParam1",
"Param2": null,
"Param3": "",
"Param4": []
}"><pre class="notranslate"><code class="notranslate">cat /tmp/single.conf /tmp/node1.conf /tmp/node2.conf
{
"Param1": "defaultParam1",
"Param2": null,
"Param3": "",
"Param4": []
}
{
"Param1": "node1Param1",
"Param2": null,
"Param3": "",
"Param4": []
}
{
"Param1": "defaultParam1",
"Param2": null,
"Param3": "",
"Param4": []
}
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cat /tmp/single.conf /tmp/node1.conf /tmp/node2.conf
{
"Param1": "defaultParam1",
"Param2": null,
"Param3": "",
"Param4": []
}
{
"Param1": "node1Param1",
"Param2": "",
"Param3": "",
"Param4": []
}
{
"Param1": "defaultParam1",
"Param2": "",
"Param3": "",
"Param4": []
}"><pre class="notranslate"><code class="notranslate">cat /tmp/single.conf /tmp/node1.conf /tmp/node2.conf
{
"Param1": "defaultParam1",
"Param2": null,
"Param3": "",
"Param4": []
}
{
"Param1": "node1Param1",
"Param2": "",
"Param3": "",
"Param4": []
}
{
"Param1": "defaultParam1",
"Param2": "",
"Param3": "",
"Param4": []
}
</code></pre></div> | <h5 dir="auto">SUMMARY</h5>
<p dir="auto">None becomes <code class="notranslate">""</code> when assigned to variable.</p>
<p dir="auto">A comparison between a variable and what was assigned to it will return <code class="notranslate">false</code>.</p>
<p dir="auto">Ran into this while using <code class="notranslate">lookup('file', '/nonexistent', errors='ignore')</code> - had to change a <code class="notranslate">when:</code> condition depending on whether comparing the lookup, or a variable with the lookup result.</p>
<h5 dir="auto">ISSUE TYPE</h5>
<p dir="auto">Bug Report</p>
<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.7.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/foo/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.5 (default, May 11 2018, 04:00:52) [GCC 8.1.0]"><pre class="notranslate"><code class="notranslate">ansible 2.7.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/foo/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.5 (default, May 11 2018, 04:00:52) [GCC 8.1.0]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- set_fact:
foo: "{{ None }}"
- debug:
msg: "{{ foo == None }}"
- debug:
msg: "{{ foo == '' }}""><pre class="notranslate">- <span class="pl-ent">set_fact</span>:
<span class="pl-ent">foo</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ None }}<span class="pl-pds">"</span></span>
- <span class="pl-ent">debug</span>:
<span class="pl-ent">msg</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ foo == None }}<span class="pl-pds">"</span></span>
- <span class="pl-ent">debug</span>:
<span class="pl-ent">msg</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ foo == '' }}<span class="pl-pds">"</span></span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto"><code class="notranslate">true</code>, <code class="notranslate">false</code></p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto"><code class="notranslate">false</code>, <code class="notranslate">true</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [debug] **********************************************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": false
}
TASK [debug] **********************************************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": true
}"><pre class="notranslate"><code class="notranslate">TASK [debug] **********************************************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": false
}
TASK [debug] **********************************************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": true
}
</code></pre></div> | 1 |
<h1 dir="auto">🚀 Feature request</h1>
<p dir="auto">Hello!<br>
I am using the translation pipeline, and I noticed that even though I have to specify the language when I create the pipeline, the passed model overwrites that. So pipeline created as<br>
<code class="notranslate">nlp = pipeline('translation_en_to_de', 'Helsinki-NLP/opus-mt-en-jap')</code><br>
would translate english to japanese, in contrary to the task name. Is this the intended way of translating other languages, will it change in the future?</p>
<p dir="auto">Would it be possible to just add a single 'translation' task for pipelines, which would then resolve the languages based on the model (which it seems to do anyway now) ?</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">It would clear up the current confusion, and make the <code class="notranslate">pipeline</code> function singature less prone to change.<br>
It could also possibly reduce code duplication in <a href="https://github.com/huggingface/transformers/blob/master/src/transformers/pipelines.py">https://github.com/huggingface/transformers/blob/master/src/transformers/pipelines.py</a></p>
<h2 dir="auto">My contribution</h2>
<p dir="auto">I'd love to help with a PR, though I'm confused: The <code class="notranslate">SUPPORTED_TASKS</code> dictionary in pipelines.py contains exactly the same entries for each translation pipeline, even the default model is the same, yet the specific pipelines actually translate to different languages 🤔</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</h2>
<p dir="auto">I would like a function like <code class="notranslate">glue_convert_examples_to_features</code> for sequence labelling tasks.</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">The motivation is that I need much better flexibility for sequence labelling tasks. Its not enough to have a final, and decided for me model, for this task. I want just the features (a sequence of features/embeddings I guess).</p>
<h2 dir="auto">Additional context</h2>
<p dir="auto">This can be generalized to any dataset with a specific format.</p> | 0 |
<h5 dir="auto">Description of the problem</h5>
<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"> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r95</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>
<p dir="auto"><em>I previously posted this problem on Stackoverflow but got no responses. However I decided to post it here as well as it's only a problem with FBX models and not OBJ models, which makes it look like some kind of bug.</em></p>
<p dir="auto">I am loading FBX models for my project. I Want to create multiple objects of the same FBX model but loading each separately is very inefficient so I would like to save one loaded model and clone it. This concept is working with the .OBJ format.</p>
<p dir="auto">Everything works as expected but then I use "model.clone();" nothing really happens.<br>
The model is no longer visible but I get no errors. If you compare the cloned model with the original they look exactly the same so I don't know why it's not showing up.</p>
<p dir="auto">The part of the code where you can compare the two is:<br>
"var sendModel = model;//Works<br>
//var sendModel = model.clone();//Doesn't works"<br>
Starting at line 30.</p>
<p dir="auto">Here is some simplified working source code:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" <!DOCTYPE html>
<html>
<head>
</head>
<body>
<script src="https://vitalkia.com/jsLibraries/zlib.min.js"></script>
<script src="https://threejs.org/build/three.js"></script>
<script src="https://threejs.org/examples/js/loaders/FBXLoader.js">
</script>
<script>
var aspectRatio = 240 / 135;
var scene;
var renderer;
var loaderFBX;
var camera = new THREE.PerspectiveCamera(45, aspectRatio, 1, 10000);
//Actual code
//Setus up scene and renderer
sceneSetup();
//Load fbx and render
//IGNORE ERROR ABOUT NOT FINDING THE RIGHT TEXTURE. It still works
loaderFBX.load("https://threejs.org/examples/models/fbx/Samba Dancing.fbx", function(model){
//Sending the object "model" works
//But using model.clone() does not. It doesn't give any errors or anything, it's just not visible
//If you compare the cloned model with the original they look exactly the same.
var sendModel = model;//Works
//var sendModel = model.clone();//Doesn't works
console.log("Original: ");
console.log(model);
console.log("Cloned: ");
console.log(model.clone());
calcDistance(sendModel);
scene.add(sendModel);
renderer.render(scene, camera);
});
function calcDistance(model){
var bbox = new THREE.Box3().setFromObject(model);
var camDistance = bbox.max.z;
if(bbox.max.x > camDistance){
camDistance = bbox.max.x;
}
if(bbox.max.y*aspectRatio > camDistance){
camDistance = bbox.max.y*aspectRatio;
}
camera.position.z = camDistance;
model.position.x -= bbox.getCenter().x;
model.position.y -= bbox.getCenter().y;
}
function sceneSetup(){
loaderFBX = new THREE.FBXLoader();
scene = new THREE.Scene();
renderer = new THREE.WebGLRenderer({antialias: true, alpha: true});
renderer.setSize(240, 135);
document.body.appendChild(renderer.domElement);
var light1 = new THREE.PointLight(0xffffff, 1, 100000000);
light1.position.set(0, 0, 15);
scene.add(light1);
var newLightPoint = new THREE.HemisphereLight(0x8be2ff, 0xfff9cf, 0.55);
scene.add(newLightPoint);
camera.position.set(0, 0, 100);
scene.add(camera);
}
</script>
</body>
</html>"><pre class="notranslate"> <span class="pl-c1"><!DOCTYPE html<span class="pl-kos">></span></span>
<span class="pl-kos"><</span><span class="pl-ent">html</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">head</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">head</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">body</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">script</span> <span class="pl-c1">src</span>="<span class="pl-s">https://vitalkia.com/jsLibraries/zlib.min.js</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">script</span> <span class="pl-c1">src</span>="<span class="pl-s">https://threejs.org/build/three.js</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">script</span> <span class="pl-c1">src</span>="<span class="pl-s">https://threejs.org/examples/js/loaders/FBXLoader.js</span>"<span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-k">var</span> <span class="pl-s1">aspectRatio</span> <span class="pl-c1">=</span> <span class="pl-c1">240</span> <span class="pl-c1">/</span> <span class="pl-c1">135</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">scene</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">renderer</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">loaderFBX</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">camera</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">PerspectiveCamera</span><span class="pl-kos">(</span><span class="pl-c1">45</span><span class="pl-kos">,</span> <span class="pl-s1">aspectRatio</span><span class="pl-kos">,</span> <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">10000</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">//Actual code</span>
<span class="pl-c">//Setus up scene and renderer</span>
<span class="pl-en">sceneSetup</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">//Load fbx and render</span>
<span class="pl-c">//IGNORE ERROR ABOUT NOT FINDING THE RIGHT TEXTURE. It still works</span>
<span class="pl-s1">loaderFBX</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">(</span><span class="pl-s">"https://threejs.org/examples/models/fbx/Samba Dancing.fbx"</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">model</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-c">//Sending the object "model" works</span>
<span class="pl-c">//But using model.clone() does not. It doesn't give any errors or anything, it's just not visible</span>
<span class="pl-c">//If you compare the cloned model with the original they look exactly the same.</span>
<span class="pl-k">var</span> <span class="pl-s1">sendModel</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span><span class="pl-kos">;</span><span class="pl-c">//Works</span>
<span class="pl-c">//var sendModel = model.clone();//Doesn't works</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"Original: "</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">model</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"Cloned: "</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">model</span><span class="pl-kos">.</span><span class="pl-en">clone</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">calcDistance</span><span class="pl-kos">(</span><span class="pl-s1">sendModel</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">scene</span><span class="pl-kos">.</span><span class="pl-en">add</span><span class="pl-kos">(</span><span class="pl-s1">sendModel</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">renderer</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">scene</span><span class="pl-kos">,</span> <span class="pl-s1">camera</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">function</span> <span class="pl-en">calcDistance</span><span class="pl-kos">(</span><span class="pl-s1">model</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">bbox</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">Box3</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">setFromObject</span><span class="pl-kos">(</span><span class="pl-s1">model</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">camDistance</span> <span class="pl-c1">=</span> <span class="pl-s1">bbox</span><span class="pl-kos">.</span><span class="pl-c1">max</span><span class="pl-kos">.</span><span class="pl-c1">z</span><span class="pl-kos">;</span>
<span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-s1">bbox</span><span class="pl-kos">.</span><span class="pl-c1">max</span><span class="pl-kos">.</span><span class="pl-c1">x</span> <span class="pl-c1">></span> <span class="pl-s1">camDistance</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-s1">camDistance</span> <span class="pl-c1">=</span> <span class="pl-s1">bbox</span><span class="pl-kos">.</span><span class="pl-c1">max</span><span class="pl-kos">.</span><span class="pl-c1">x</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-s1">bbox</span><span class="pl-kos">.</span><span class="pl-c1">max</span><span class="pl-kos">.</span><span class="pl-c1">y</span><span class="pl-c1">*</span><span class="pl-s1">aspectRatio</span> <span class="pl-c1">></span> <span class="pl-s1">camDistance</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-s1">camDistance</span> <span class="pl-c1">=</span> <span class="pl-s1">bbox</span><span class="pl-kos">.</span><span class="pl-c1">max</span><span class="pl-kos">.</span><span class="pl-c1">y</span><span class="pl-c1">*</span><span class="pl-s1">aspectRatio</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-s1">camera</span><span class="pl-kos">.</span><span class="pl-c1">position</span><span class="pl-kos">.</span><span class="pl-c1">z</span> <span class="pl-c1">=</span> <span class="pl-s1">camDistance</span><span class="pl-kos">;</span>
<span class="pl-s1">model</span><span class="pl-kos">.</span><span class="pl-c1">position</span><span class="pl-kos">.</span><span class="pl-c1">x</span> <span class="pl-c1">-=</span> <span class="pl-s1">bbox</span><span class="pl-kos">.</span><span class="pl-en">getCenter</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">x</span><span class="pl-kos">;</span>
<span class="pl-s1">model</span><span class="pl-kos">.</span><span class="pl-c1">position</span><span class="pl-kos">.</span><span class="pl-c1">y</span> <span class="pl-c1">-=</span> <span class="pl-s1">bbox</span><span class="pl-kos">.</span><span class="pl-en">getCenter</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">y</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">function</span> <span class="pl-en">sceneSetup</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-s1">loaderFBX</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">FBXLoader</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">scene</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">Scene</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">renderer</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">WebGLRenderer</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">antialias</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">alpha</span>: <span class="pl-c1">true</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">renderer</span><span class="pl-kos">.</span><span class="pl-en">setSize</span><span class="pl-kos">(</span><span class="pl-c1">240</span><span class="pl-kos">,</span> <span class="pl-c1">135</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-c1">body</span><span class="pl-kos">.</span><span class="pl-en">appendChild</span><span class="pl-kos">(</span><span class="pl-s1">renderer</span><span class="pl-kos">.</span><span class="pl-c1">domElement</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">light1</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">PointLight</span><span class="pl-kos">(</span><span class="pl-c1">0xffffff</span><span class="pl-kos">,</span> <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">100000000</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">light1</span><span class="pl-kos">.</span><span class="pl-c1">position</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">15</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">scene</span><span class="pl-kos">.</span><span class="pl-en">add</span><span class="pl-kos">(</span><span class="pl-s1">light1</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">newLightPoint</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">HemisphereLight</span><span class="pl-kos">(</span><span class="pl-c1">0x8be2ff</span><span class="pl-kos">,</span> <span class="pl-c1">0xfff9cf</span><span class="pl-kos">,</span> <span class="pl-c1">0.55</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">scene</span><span class="pl-kos">.</span><span class="pl-en">add</span><span class="pl-kos">(</span><span class="pl-s1">newLightPoint</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">camera</span><span class="pl-kos">.</span><span class="pl-c1">position</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">100</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">scene</span><span class="pl-kos">.</span><span class="pl-en">add</span><span class="pl-kos">(</span><span class="pl-s1">camera</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">body</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">html</span><span class="pl-kos">></span></pre></div> | <p dir="auto">There are a few things which geometry.clone() doesn't copy a reference to, which it should.</p>
<p dir="auto">.bones<br>
.skinWeights<br>
.skinIndices<br>
.animations<br>
.animation</p>
<p dir="auto">are all left without references to the original, which leads to skinning being broken unless the references to those are manually copied. I think references should be passed as it's less confusing, but I don't think they should be deep copies, or this would lead to mostly wasted memory.</p> | 1 |
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li>[ x] 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>[ x] 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>[ x] 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>[ x] I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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>[ x] I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="299009247" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4551" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/4551/hovercard?comment_id=367607234&comment_type=issue_comment" href="https://github.com/celery/celery/issues/4551#issuecomment-367607234">#4551 (comment)</a></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: 4.3.0</strong>:</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="celeryworker_1 | [2019-09-30 12:10:16,485: INFO/MainProcess] Received task: django_dask.users.tasks.get_users_count[0b2cd4f1-e6a9-41af-974c-bd9a60ddc648]"><pre class="notranslate"><code class="notranslate">celeryworker_1 | [2019-09-30 12:10:16,485: INFO/MainProcess] Received task: django_dask.users.tasks.get_users_count[0b2cd4f1-e6a9-41af-974c-bd9a60ddc648]
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.6.6</li>
<li><strong>Minimal Celery Version</strong>: 4.3.0</li>
<li><strong>Minimal Kombu Version</strong>: Unknown</li>
<li><strong>Minimal Broker Version</strong>: redis==3.3.8</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: Docker image python:3.6.6</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>
<p dir="auto">Install cookiecutter django with celery and add dask package. You can either add dask as a service in docker-compose or initiate a local cluster within the <code class="notranslate">{app}/users/app.py</code></p>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate">
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">That I am able to further create subprocesses within the task by triggering dask within celery task.</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">I am trying to start subprocesses of scikit learn within a task of celery. I am aware that joblib will run it sequentially if it is already running in a process. Therefore, based on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="299009247" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4551" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/4551/hovercard?comment_id=367607234&comment_type=issue_comment" href="https://github.com/celery/celery/issues/4551#issuecomment-367607234">#4551 (comment)</a>, I have installed Dask and changed joblib <code class="notranslate">parallel_backend</code> to dask and run the below function one time normally; i.e. <code class="notranslate">get_users_count()</code> and another time with <code class="notranslate">apply_async()</code>; i.e., <code class="notranslate">get_users_count.apply_async()</code>. The former ran successfully and the later showed that the worker has received the message (as shown in the <code class="notranslate">celery report</code> above). and celery worker hangs and become unresponsive, I tried to access the worker in flower, however I received <code class="notranslate">Unknown worker 'celery@0bb51b1f7782'</code> as if it is died (which was previously accessible before calling the function).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@celery_app.task()
def get_users_count():
"""A pointless Celery task to demonstrate usage."""
from sklearn.utils import parallel_backend
import numpy as np
from sklearn.cluster import KMeans
parallel_backend("dask")
kmeans = KMeans(n_jobs=-1, n_init=5, verbose=10)
kmeans.fit(np.random.rand(1000).reshape(500, 2))
return User.objects.count()"><pre class="notranslate"><code class="notranslate">@celery_app.task()
def get_users_count():
"""A pointless Celery task to demonstrate usage."""
from sklearn.utils import parallel_backend
import numpy as np
from sklearn.cluster import KMeans
parallel_backend("dask")
kmeans = KMeans(n_jobs=-1, n_init=5, verbose=10)
kmeans.fit(np.random.rand(1000).reshape(500, 2))
return User.objects.count()
</code></pre></div> | <h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have 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"> 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" checked=""> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<p dir="auto">error when get task state or other attribute value.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> taskid="d7b78dfa-5602-4a4e-bf4e-dff1c9a8e46e"
>>> task = TAA.AsyncResult(taskid)
>>>
>>> task.state
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/celery/result.py", line 473, in state
return self._get_task_meta()['status']
File "/usr/local/lib/python3.7/site-packages/celery/result.py", line 412, in _get_task_meta
return self._maybe_set_cache(self.backend.get_task_meta(self.id))
File "/usr/local/lib/python3.7/site-packages/celery/backends/base.py", line 386, in get_task_meta
meta = self._get_task_meta_for(task_id)
File "/usr/local/lib/python3.7/site-packages/celery/backends/base.py", line 730, in _get_task_meta_for
return self.decode_result(meta)
File "/usr/local/lib/python3.7/site-packages/celery/backends/base.py", line 305, in decode_result
return self.meta_from_decoded(self.decode(payload))
File "/usr/local/lib/python3.7/site-packages/celery/backends/base.py", line 301, in meta_from_decoded
meta['result'] = self.exception_to_python(meta['result'])
File "/usr/local/lib/python3.7/site-packages/celery/backends/base.py", line 281, in exception_to_python
exc = cls(*exc_msg if isinstance(exc_msg, tuple) else exc_msg)
TypeError: __init__() missing 2 required positional arguments: 'doc' and 'pos'"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">taskid</span><span class="pl-c1">=</span><span class="pl-s">"d7b78dfa-5602-4a4e-bf4e-dff1c9a8e46e"</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">task</span> <span class="pl-c1">=</span> <span class="pl-v">TAA</span>.<span class="pl-v">AsyncResult</span>(<span class="pl-s1">taskid</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">task</span>.<span class="pl-s1">state</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-v">File</span> <span class="pl-s">"<stdin>"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</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-v">File</span> <span class="pl-s">"/usr/local/lib/python3.7/site-packages/celery/result.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">473</span>, <span class="pl-s1">in</span> <span class="pl-s1">state</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_task_meta</span>()[<span class="pl-s">'status'</span>]
<span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.7/site-packages/celery/result.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">412</span>, <span class="pl-s1">in</span> <span class="pl-s1">_get_task_meta</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_maybe_set_cache</span>(<span class="pl-s1">self</span>.<span class="pl-s1">backend</span>.<span class="pl-en">get_task_meta</span>(<span class="pl-s1">self</span>.<span class="pl-s1">id</span>))
<span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.7/site-packages/celery/backends/base.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">386</span>, <span class="pl-s1">in</span> <span class="pl-s1">get_task_meta</span>
<span class="pl-s1">meta</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_task_meta_for</span>(<span class="pl-s1">task_id</span>)
<span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.7/site-packages/celery/backends/base.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">730</span>, <span class="pl-s1">in</span> <span class="pl-s1">_get_task_meta_for</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">decode_result</span>(<span class="pl-s1">meta</span>)
<span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.7/site-packages/celery/backends/base.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">305</span>, <span class="pl-s1">in</span> <span class="pl-s1">decode_result</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">meta_from_decoded</span>(<span class="pl-s1">self</span>.<span class="pl-en">decode</span>(<span class="pl-s1">payload</span>))
<span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.7/site-packages/celery/backends/base.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">301</span>, <span class="pl-s1">in</span> <span class="pl-s1">meta_from_decoded</span>
<span class="pl-s1">meta</span>[<span class="pl-s">'result'</span>] <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">exception_to_python</span>(<span class="pl-s1">meta</span>[<span class="pl-s">'result'</span>])
<span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.7/site-packages/celery/backends/base.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">281</span>, <span class="pl-s1">in</span> <span class="pl-s1">exception_to_python</span>
<span class="pl-s1">exc</span> <span class="pl-c1">=</span> <span class="pl-en">cls</span>(<span class="pl-c1">*</span><span class="pl-s1">exc_msg</span> <span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">exc_msg</span>, <span class="pl-s1">tuple</span>) <span class="pl-k">else</span> <span class="pl-s1">exc_msg</span>)
<span class="pl-v">TypeError</span>: <span class="pl-en">__init__</span>() <span class="pl-s1">missing</span> <span class="pl-c1">2</span> <span class="pl-s1">required</span> <span class="pl-s1">positional</span> <span class="pl-s1">arguments</span>: <span class="pl-s">'doc'</span> <span class="pl-c1">and</span> <span class="pl-s">'pos'</span></pre></div>
<p dir="auto">The content of the taskid task in redis:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"status": "FAILURE",
"result": {
"exc_type": "JSONDecodeError",
"exc_message": [
"Expecting ',' delimiter: line 1 column 528408 (char 528407)"
],
"exc_module": "json.decoder"
},
"traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/site-packages/celery/app/trace.py\", line 385, in trace_task\n R = retval = fun(*args, **kwargs)\n File \"/usr/local/lib/python3.7/site-packages/celery/app/trace.py\", line 648, in __protected_call__\n return self.run(*args, **kwargs)\n File \"/Users/youzhengchuan/PycharmProjects/collector/pcdn/analysis/__init__.py\", line 14, in telegraf_abnormal_analysis\n ret = taa.analysis(sts, ets, lot)\n File \"/Users/youzhengchuan/PycharmProjects/collector/pcdn/analysis/telegraf_abnormal_analysis.py\", line 42, in analysis\n online = self._query.groupby(**params)\n File \"/Users/youzhengchuan/PycharmProjects/collector/pcdn/analysis/query.py\", line 35, in groupby\n ret = self._query.groupby(**params)\n File \"/usr/local/lib/python3.7/site-packages/pydruid/client.py\", line 306, in groupby\n return self._post(query)\n File \"/usr/local/lib/python3.7/site-packages/pydruid/client.py\", line 571, in _post\n query.parse(data)\n File \"/usr/local/lib/python3.7/site-packages/pydruid/query.py\", line 53, in parse\n res = json.loads(self.result_json)\n File \"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py\", line 348, in loads\n return _default_decoder.decode(s)\n File \"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py\", line 337, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n File \"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py\", line 353, in raw_decode\n obj, end = self.scan_once(s, idx)\njson.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 528408 (char 528407)\n",
"children": [],
"task_id": "d7b78dfa-5602-4a4e-bf4e-dff1c9a8e46e",
"date_done": "2019-09-04T08:11:17.388695"
}"><pre class="notranslate">{
<span class="pl-ent">"status"</span>: <span class="pl-s"><span class="pl-pds">"</span>FAILURE<span class="pl-pds">"</span></span>,
<span class="pl-ent">"result"</span>: {
<span class="pl-ent">"exc_type"</span>: <span class="pl-s"><span class="pl-pds">"</span>JSONDecodeError<span class="pl-pds">"</span></span>,
<span class="pl-ent">"exc_message"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>Expecting ',' delimiter: line 1 column 528408 (char 528407)<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"exc_module"</span>: <span class="pl-s"><span class="pl-pds">"</span>json.decoder<span class="pl-pds">"</span></span>
},
"traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/site-packages/celery/app/trace.py\", line 385, in trace_task\n R = retval = fun(*args, **kwargs)\n File \"/usr/local/lib/python3.7/site-packages/celery/app/trace.py\", line 648, in __protected_call__\n return self.run(*args, **kwargs)\n File \"/Users/youzhengchuan/PycharmProjects/collector/pcdn/analysis/__init__.py\", line 14, in telegraf_abnormal_analysis\n ret = taa.analysis(sts, ets, lot)\n File \"/Users/youzhengchuan/PycharmProjects/collector/pcdn/analysis/telegraf_abnormal_analysis.py\", line 42, in analysis\n online = self._query.groupby(**params)\n File \"/Users/youzhengchuan/PycharmProjects/collector/pcdn/analysis/query.py\", line 35, in groupby\n ret = self._query.groupby(**params)\n File \"/usr/local/lib/python3.7/site-packages/pydruid/client.py\", line 306, in groupby\n return self._post(query)\n File \"/usr/local/lib/python3.7/site-packages/pydruid/client.py\", line 571, in _post\n query.parse(data)\n File \"/usr/local/lib/python3.7/site-packages/pydruid/query.py\", line 53, in parse\n res = json.loads(self.result_json)\n File \"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py\", line 348, in loads\n return _default_decoder.decode(s)\n File \"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py\", line 337, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n File \"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py\", line 353, in raw_decode\n obj, end = self.scan_once(s, idx)\njson.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 528408 (char 528407)\n",
<span class="pl-ent">"children"</span>: [],
<span class="pl-ent">"task_id"</span>: <span class="pl-s"><span class="pl-pds">"</span>d7b78dfa-5602-4a4e-bf4e-dff1c9a8e46e<span class="pl-pds">"</span></span>,
<span class="pl-ent">"date_done"</span>: <span class="pl-s"><span class="pl-pds">"</span>2019-09-04T08:11:17.388695<span class="pl-pds">"</span></span>
}</pre></div>
<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>:</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 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>
<h1 dir="auto">Actual Behavior</h1> | 0 |
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tvyomkesh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tvyomkesh">@tvyomkesh</a> opened some issues (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="56145838" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/9384" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/9384/hovercard" href="https://github.com/pandas-dev/pandas/issues/9384">#9384</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="56168004" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/9389" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/9389/hovercard" href="https://github.com/pandas-dev/pandas/issues/9389">#9389</a>) on errors in the examples (and some PRs to fix this). This raised the following question to me:</p>
<p dir="auto">Apart from fixing the examples, I think we should think for a moment what we want to do with these examples. Why do we want them? What is their function?<br>
And depending on that, do we want to update/extend them? Or maybe move them to the docs?</p>
<p dir="auto">I personally never looked at these examples. And they are also quite outdated. Eg using the ols from pandas is somewhat (unofficially) deprecated for the use of statsmodels, and the finance module in matplotlib is deprecated starting from matplotlib 1.4. And to get such data, I think pandas-datareader should be used.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jreback/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jreback">@jreback</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/TomAugspurger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/TomAugspurger">@TomAugspurger</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/shoyer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/shoyer">@shoyer</a></p> | <p dir="auto"><code class="notranslate">DataFrame.from_dict</code> does not seem to behave <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.from_dict.html" rel="nofollow">according to the documentation</a>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd
print("pandas.from_dict(<dict>, orient='index')")
print(pd.DataFrame.from_dict(dict([ ['key1', 1],['key2',2] ]), orient='index'))
print("pandas.from_dict(<list [<list>]>, orient='columns')")
print(pd.DataFrame.from_dict([ ['key1', 1],['key2',2] ], orient='columns'))
print("pandas.from_dict(<dict>, orient='columns')")
print(pd.DataFrame.from_dict(dict([ ['key1', 1],['key2',2] ]), orient='columns'))
"><pre class="notranslate"><code class="notranslate">import pandas as pd
print("pandas.from_dict(<dict>, orient='index')")
print(pd.DataFrame.from_dict(dict([ ['key1', 1],['key2',2] ]), orient='index'))
print("pandas.from_dict(<list [<list>]>, orient='columns')")
print(pd.DataFrame.from_dict([ ['key1', 1],['key2',2] ], orient='columns'))
print("pandas.from_dict(<dict>, orient='columns')")
print(pd.DataFrame.from_dict(dict([ ['key1', 1],['key2',2] ]), orient='columns'))
</code></pre></div>
<h4 dir="auto">Produces</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pandas.from_dict(<dict>, orient='index')
0
key2 2
key1 1
pandas.from_dict(<list [<list>]>, orient='columns')
0 1
0 key1 1
1 key2 2
pandas.from_dict(<dict>, orient='columns')
Traceback (most recent call last):
File "../../bin/pandaserr.py", line 10, in <module>
print(pd.DataFrame.from_dict(dict([ ['key1', 1],['key2',2] ]), orient='columns'))
File "/home/cwarth/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 804, in from_dict
return cls(data, index=index, columns=columns, dtype=dtype)
File "/home/cwarth/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 226, in __init__
mgr = self._init_dict(data, index, columns, dtype=dtype)
File "/home/cwarth/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 363, in _init_dict
dtype=dtype)
File "/home/cwarth/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 5158, in _arrays_to_mgr
index = extract_index(arrays)
File "/home/cwarth/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 5197, in extract_index
raise ValueError('If using all scalar values, you must pass'
ValueError: If using all scalar values, you must pass an index"><pre class="notranslate"><code class="notranslate">pandas.from_dict(<dict>, orient='index')
0
key2 2
key1 1
pandas.from_dict(<list [<list>]>, orient='columns')
0 1
0 key1 1
1 key2 2
pandas.from_dict(<dict>, orient='columns')
Traceback (most recent call last):
File "../../bin/pandaserr.py", line 10, in <module>
print(pd.DataFrame.from_dict(dict([ ['key1', 1],['key2',2] ]), orient='columns'))
File "/home/cwarth/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 804, in from_dict
return cls(data, index=index, columns=columns, dtype=dtype)
File "/home/cwarth/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 226, in __init__
mgr = self._init_dict(data, index, columns, dtype=dtype)
File "/home/cwarth/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 363, in _init_dict
dtype=dtype)
File "/home/cwarth/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 5158, in _arrays_to_mgr
index = extract_index(arrays)
File "/home/cwarth/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 5197, in extract_index
raise ValueError('If using all scalar values, you must pass'
ValueError: If using all scalar values, you must pass an index
</code></pre></div>
<p dir="auto">According to the reference documentation, "If the keys of the passed dict should be the columns of the resulting DataFrame, pass ‘columns’" That doesn't appear to be what is happening.</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto"><code class="notranslate">from_dict(<dict>, orient='index')</code> works as expected.<br>
I would expect <code class="notranslate">from_dict(..., orient='columns')</code> to return a dataframe with the dictionary keys forming the column index, like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" key1 key2
0 1 2"><pre class="notranslate"><code class="notranslate"> key1 key2
0 1 2
</code></pre></div>
<p dir="auto">I would expect <code class="notranslate">from_dict()</code> to take a dict as a parameter in either case. Instead it appears to take a a dict for <code class="notranslate">orient='index'</code> and a list of lists (or tuples) for <code class="notranslate">orient='columns'</code>. Passing a dict with integer values when <code class="notranslate">orient='columns'</code> causes a crash.</p>
<h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-45-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.17.1
nose: 1.3.6
pip: 8.0.2
setuptools: 18.8
Cython: 0.23.2
numpy: 1.10.4
scipy: 0.15.1
statsmodels: 0.6.1
IPython: 4.0.3
sphinx: 1.2.3
patsy: 0.3.0
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: None
tables: 3.1.1
numexpr: 2.2.2
matplotlib: 1.5.0
openpyxl: 2.2.0-b1
xlrd: 0.9.4
xlwt: 0.7.5
xlsxwriter: None
lxml: 3.3.3
bs4: 4.3.2
html5lib: 0.999
httplib2: 0.9
apiclient: None
sqlalchemy: 1.0.11
pymysql: None
psycopg2: None
Jinja2: None"><pre class="notranslate"><code class="notranslate">INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-45-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.17.1
nose: 1.3.6
pip: 8.0.2
setuptools: 18.8
Cython: 0.23.2
numpy: 1.10.4
scipy: 0.15.1
statsmodels: 0.6.1
IPython: 4.0.3
sphinx: 1.2.3
patsy: 0.3.0
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: None
tables: 3.1.1
numexpr: 2.2.2
matplotlib: 1.5.0
openpyxl: 2.2.0-b1
xlrd: 0.9.4
xlwt: 0.7.5
xlsxwriter: None
lxml: 3.3.3
bs4: 4.3.2
html5lib: 0.999
httplib2: 0.9
apiclient: None
sqlalchemy: 1.0.11
pymysql: None
psycopg2: None
Jinja2: None
</code></pre></div> | 0 |
<p dir="auto">Secret key names like <strong>id_rsa</strong> and <strong>id_rsa.pub</strong> are illegal (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="103907197" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/13357" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/13357/hovercard" href="https://github.com/kubernetes/kubernetes/issues/13357">#13357</a>). This makes it impossible to use secrets for loading ssh keys and other files with underscores into your containers.</p>
<p dir="auto">Can the restrictions be loosened so it maps to linux filename restrictions instead of DNS_SUBDOMAIN?</p> | <p dir="auto">Currently the key of a piece of secret data has to be a DNS subdomain. We went with DNS subdomains instead of defining a new format during the implementation because we assumed that a dns subdomain was a strict subset of the eventual format to use. It has been suggested in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="74443715" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/7974" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/7974/hovercard" href="https://github.com/kubernetes/kubernetes/pull/7974">#7974</a> that we create a format to model file names use that format to validate keys in secrets.</p> | 1 |
<p dir="auto">From <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="153092664" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/6106" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/6106/hovercard" href="https://github.com/microsoft/vscode/issues/6106">#6106</a>:</p>
<p dir="auto">we currently do not have support to contribute actions to the context menu of the explorer or to the editor title area, but we have actions there to open a preview from a markdown file in both places and we also have an action to jump back to the source from a markdown preview</p> | <p dir="auto">I'd like to add a context menu item that performs a Google search using the current selection.</p>
<p dir="auto">However, there doesn't seem to be a way to bind to the right click or to an open context menu event.</p>
<p dir="auto">I see several requests for features to add to the context menu... wouldn't it be easier if VS Code just made it possible for extensions to register a context menu entry?</p> | 1 |
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>2.7</td>
</tr>
</tbody>
</table>
<p dir="auto">Hi there!</p>
<p dir="auto">This morning I faced <a href="https://github.com/javiereguiluz/EasyAdminBundle/issues/1913">an issue</a> in EasyAdminBundle related to form themes and <code class="notranslate">form.parent</code> check in Twig.</p>
<p dir="auto">Briefly, the problem happen if we have a simple form with a field named <code class="notranslate">parent</code>. The situation gets worse depending on whether the <code class="notranslate">parent</code> field has children or not.</p>
<p dir="auto">First, let's see the <code class="notranslate">FormView</code> class, especially the <code class="notranslate">parent</code> property and <code class="notranslate">\ArrayAccess</code> methods:<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/symfony/symfony/blob/61b753443d6903d8a9644f62caf020fdfca3ef6f/src/Symfony/Component/Form/FormView.php#L19-L126">symfony/src/Symfony/Component/Form/FormView.php</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 19 to 126
in
<a data-pjax="true" class="commit-tease-sha" href="/symfony/symfony/commit/61b753443d6903d8a9644f62caf020fdfca3ef6f">61b7534</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="L19" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="19"></td>
<td id="LC19" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">class</span> <span class="pl-v">FormView</span> <span class="pl-k">implements</span> \<span class="pl-v">ArrayAccess</span>, \<span class="pl-v">IteratorAggregate</span>, \<span class="pl-v">Countable</span> </td>
</tr>
<tr class="border-0">
<td id="L20" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="20"></td>
<td id="LC20" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
</tr>
<tr class="border-0">
<td id="L21" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="21"></td>
<td id="LC21" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">/**</span> </td>
</tr>
<tr class="border-0">
<td id="L22" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="22"></td>
<td id="LC22" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * The variables assigned to this view.</span> </td>
</tr>
<tr class="border-0">
<td id="L23" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="23"></td>
<td id="LC23" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> */</span> </td>
</tr>
<tr class="border-0">
<td id="L24" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="24"></td>
<td id="LC24" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">public</span> <span class="pl-c1"><span class="pl-c1">$</span>vars</span> = <span class="pl-en">array</span>( </td>
</tr>
<tr class="border-0">
<td id="L25" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="25"></td>
<td id="LC25" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">'value'</span> => <span class="pl-c1">null</span>, </td>
</tr>
<tr class="border-0">
<td id="L26" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="26"></td>
<td id="LC26" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">'attr'</span> => <span class="pl-en">array</span>(), </td>
</tr>
<tr class="border-0">
<td id="L27" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="27"></td>
<td id="LC27" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> ); </td>
</tr>
<tr class="border-0">
<td id="L28" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="28"></td>
<td id="LC28" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L29" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="29"></td>
<td id="LC29" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">/**</span> </td>
</tr>
<tr class="border-0">
<td id="L30" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="30"></td>
<td id="LC30" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * The parent view.</span> </td>
</tr>
<tr class="border-0">
<td id="L31" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="31"></td>
<td id="LC31" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> */</span> </td>
</tr>
<tr class="border-0">
<td id="L32" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="32"></td>
<td id="LC32" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">public</span> <span class="pl-c1"><span class="pl-c1">$</span>parent</span>; </td>
</tr>
<tr class="border-0">
<td id="L33" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="33"></td>
<td id="LC33" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L34" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="34"></td>
<td id="LC34" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">/**</span> </td>
</tr>
<tr class="border-0">
<td id="L35" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="35"></td>
<td id="LC35" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * The child views.</span> </td>
</tr>
<tr class="border-0">
<td id="L36" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="36"></td>
<td id="LC36" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> *</span> </td>
</tr>
<tr class="border-0">
<td id="L37" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="37"></td>
<td id="LC37" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * @var FormView[]</span> </td>
</tr>
<tr class="border-0">
<td id="L38" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="38"></td>
<td id="LC38" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> */</span> </td>
</tr>
<tr class="border-0">
<td id="L39" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="39"></td>
<td id="LC39" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">public</span> <span class="pl-c1"><span class="pl-c1">$</span>children</span> = <span class="pl-en">array</span>(); </td>
</tr>
<tr class="border-0">
<td id="L40" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="40"></td>
<td id="LC40" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L41" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="41"></td>
<td id="LC41" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">/**</span> </td>
</tr>
<tr class="border-0">
<td id="L42" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="42"></td>
<td id="LC42" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * Is the form attached to this renderer rendered?</span> </td>
</tr>
<tr class="border-0">
<td id="L43" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="43"></td>
<td id="LC43" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> *</span> </td>
</tr>
<tr class="border-0">
<td id="L44" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="44"></td>
<td id="LC44" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * Rendering happens when either the widget or the row method was called.</span> </td>
</tr>
<tr class="border-0">
<td id="L45" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="45"></td>
<td id="LC45" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * Row implicitly includes widget, however certain rendering mechanisms</span> </td>
</tr>
<tr class="border-0">
<td id="L46" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="46"></td>
<td id="LC46" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * have to skip widget rendering when a row is rendered.</span> </td>
</tr>
<tr class="border-0">
<td id="L47" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="47"></td>
<td id="LC47" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> *</span> </td>
</tr>
<tr class="border-0">
<td id="L48" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="48"></td>
<td id="LC48" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * @var bool</span> </td>
</tr>
<tr class="border-0">
<td id="L49" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="49"></td>
<td id="LC49" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> */</span> </td>
</tr>
<tr class="border-0">
<td id="L50" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="50"></td>
<td id="LC50" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>rendered</span> = <span class="pl-c1">false</span>; </td>
</tr>
<tr class="border-0">
<td id="L51" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="51"></td>
<td id="LC51" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L52" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="52"></td>
<td id="LC52" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>methodRendered</span> = <span class="pl-c1">false</span>; </td>
</tr>
<tr class="border-0">
<td id="L53" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="53"></td>
<td id="LC53" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L54" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="54"></td>
<td id="LC54" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">__construct</span>(<span class="pl-smi"><span class="pl-smi">FormView</span></span> <span class="pl-s1"><span class="pl-c1">$</span>parent</span> = <span class="pl-c1">null</span>) </td>
</tr>
<tr class="border-0">
<td id="L55" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="55"></td>
<td id="LC55" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
</tr>
<tr class="border-0">
<td id="L56" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="56"></td>
<td id="LC56" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">parent</span> = <span class="pl-s1"><span class="pl-c1">$</span>parent</span>; </td>
</tr>
<tr class="border-0">
<td id="L57" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="57"></td>
<td id="LC57" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
<tr class="border-0">
<td id="L58" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="58"></td>
<td id="LC58" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L59" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="59"></td>
<td id="LC59" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">/**</span> </td>
</tr>
<tr class="border-0">
<td id="L60" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="60"></td>
<td id="LC60" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * Returns whether the view was already rendered.</span> </td>
</tr>
<tr class="border-0">
<td id="L61" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="61"></td>
<td id="LC61" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> *</span> </td>
</tr>
<tr class="border-0">
<td id="L62" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="62"></td>
<td id="LC62" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * @return bool Whether this view's widget is rendered</span> </td>
</tr>
<tr class="border-0">
<td id="L63" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="63"></td>
<td id="LC63" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> */</span> </td>
</tr>
<tr class="border-0">
<td id="L64" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="64"></td>
<td id="LC64" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">isRendered</span>() </td>
</tr>
<tr class="border-0">
<td id="L65" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="65"></td>
<td id="LC65" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
</tr>
<tr class="border-0">
<td id="L66" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="66"></td>
<td id="LC66" 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-c1">true</span> === <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">rendered</span> || <span class="pl-c1">0</span> === count(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">children</span>)) { </td>
</tr>
<tr class="border-0">
<td id="L67" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="67"></td>
<td id="LC67" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">rendered</span>; </td>
</tr>
<tr class="border-0">
<td id="L68" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="68"></td>
<td id="LC68" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
<tr class="border-0">
<td id="L69" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="69"></td>
<td id="LC69" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L70" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="70"></td>
<td id="LC70" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">foreach</span> (<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">children</span> <span class="pl-k">as</span> <span class="pl-s1"><span class="pl-c1">$</span>child</span>) { </td>
</tr>
<tr class="border-0">
<td id="L71" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="71"></td>
<td id="LC71" 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-s1"><span class="pl-c1">$</span>child</span>-><span class="pl-en">isRendered</span>()) { </td>
</tr>
<tr class="border-0">
<td id="L72" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="72"></td>
<td id="LC72" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-c1">false</span>; </td>
</tr>
<tr class="border-0">
<td id="L73" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="73"></td>
<td id="LC73" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
<tr class="border-0">
<td id="L74" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="74"></td>
<td id="LC74" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
<tr class="border-0">
<td id="L75" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="75"></td>
<td id="LC75" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L76" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="76"></td>
<td id="LC76" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">rendered</span> = <span class="pl-c1">true</span>; </td>
</tr>
<tr class="border-0">
<td id="L77" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="77"></td>
<td id="LC77" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
<tr class="border-0">
<td id="L78" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="78"></td>
<td id="LC78" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L79" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="79"></td>
<td id="LC79" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">/**</span> </td>
</tr>
<tr class="border-0">
<td id="L80" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="80"></td>
<td id="LC80" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * Marks the view as rendered.</span> </td>
</tr>
<tr class="border-0">
<td id="L81" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="81"></td>
<td id="LC81" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> *</span> </td>
</tr>
<tr class="border-0">
<td id="L82" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="82"></td>
<td id="LC82" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * @return $this</span> </td>
</tr>
<tr class="border-0">
<td id="L83" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="83"></td>
<td id="LC83" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> */</span> </td>
</tr>
<tr class="border-0">
<td id="L84" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="84"></td>
<td id="LC84" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">setRendered</span>() </td>
</tr>
<tr class="border-0">
<td id="L85" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="85"></td>
<td id="LC85" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
</tr>
<tr class="border-0">
<td id="L86" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="86"></td>
<td id="LC86" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">rendered</span> = <span class="pl-c1">true</span>; </td>
</tr>
<tr class="border-0">
<td id="L87" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="87"></td>
<td id="LC87" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L88" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="88"></td>
<td id="LC88" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>; </td>
</tr>
<tr class="border-0">
<td id="L89" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="89"></td>
<td id="LC89" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
<tr class="border-0">
<td id="L90" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="90"></td>
<td id="LC90" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L91" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="91"></td>
<td id="LC91" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">/**</span> </td>
</tr>
<tr class="border-0">
<td id="L92" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="92"></td>
<td id="LC92" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * @return bool</span> </td>
</tr>
<tr class="border-0">
<td id="L93" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="93"></td>
<td id="LC93" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> */</span> </td>
</tr>
<tr class="border-0">
<td id="L94" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="94"></td>
<td id="LC94" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">isMethodRendered</span>() </td>
</tr>
<tr class="border-0">
<td id="L95" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="95"></td>
<td id="LC95" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
</tr>
<tr class="border-0">
<td id="L96" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="96"></td>
<td id="LC96" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">methodRendered</span>; </td>
</tr>
<tr class="border-0">
<td id="L97" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="97"></td>
<td id="LC97" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
<tr class="border-0">
<td id="L98" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="98"></td>
<td id="LC98" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L99" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="99"></td>
<td id="LC99" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">setMethodRendered</span>() </td>
</tr>
<tr class="border-0">
<td id="L100" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="100"></td>
<td id="LC100" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
</tr>
<tr class="border-0">
<td id="L101" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="101"></td>
<td id="LC101" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">methodRendered</span> = <span class="pl-c1">true</span>; </td>
</tr>
<tr class="border-0">
<td id="L102" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="102"></td>
<td id="LC102" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
<tr class="border-0">
<td id="L103" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="103"></td>
<td id="LC103" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L104" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="104"></td>
<td id="LC104" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">/**</span> </td>
</tr>
<tr class="border-0">
<td id="L105" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="105"></td>
<td id="LC105" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * Returns a child by name (implements \ArrayAccess).</span> </td>
</tr>
<tr class="border-0">
<td id="L106" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="106"></td>
<td id="LC106" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> *</span> </td>
</tr>
<tr class="border-0">
<td id="L107" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="107"></td>
<td id="LC107" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * @param string $name The child name</span> </td>
</tr>
<tr class="border-0">
<td id="L108" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="108"></td>
<td id="LC108" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> *</span> </td>
</tr>
<tr class="border-0">
<td id="L109" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="109"></td>
<td id="LC109" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * @return self The child view</span> </td>
</tr>
<tr class="border-0">
<td id="L110" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="110"></td>
<td id="LC110" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> */</span> </td>
</tr>
<tr class="border-0">
<td id="L111" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="111"></td>
<td id="LC111" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">offsetGet</span>(<span class="pl-s1"><span class="pl-c1">$</span>name</span>) </td>
</tr>
<tr class="border-0">
<td id="L112" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="112"></td>
<td id="LC112" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
</tr>
<tr class="border-0">
<td id="L113" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="113"></td>
<td id="LC113" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">children</span>[<span class="pl-s1"><span class="pl-c1">$</span>name</span>]; </td>
</tr>
<tr class="border-0">
<td id="L114" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="114"></td>
<td id="LC114" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
<tr class="border-0">
<td id="L115" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="115"></td>
<td id="LC115" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L116" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="116"></td>
<td id="LC116" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">/**</span> </td>
</tr>
<tr class="border-0">
<td id="L117" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="117"></td>
<td id="LC117" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * Returns whether the given child exists (implements \ArrayAccess).</span> </td>
</tr>
<tr class="border-0">
<td id="L118" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="118"></td>
<td id="LC118" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> *</span> </td>
</tr>
<tr class="border-0">
<td id="L119" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="119"></td>
<td id="LC119" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * @param string $name The child name</span> </td>
</tr>
<tr class="border-0">
<td id="L120" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="120"></td>
<td id="LC120" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> *</span> </td>
</tr>
<tr class="border-0">
<td id="L121" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="121"></td>
<td id="LC121" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * @return bool Whether the child view exists</span> </td>
</tr>
<tr class="border-0">
<td id="L122" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="122"></td>
<td id="LC122" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> */</span> </td>
</tr>
<tr class="border-0">
<td id="L123" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="123"></td>
<td id="LC123" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">offsetExists</span>(<span class="pl-s1"><span class="pl-c1">$</span>name</span>) </td>
</tr>
<tr class="border-0">
<td id="L124" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="124"></td>
<td id="LC124" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
</tr>
<tr class="border-0">
<td id="L125" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="125"></td>
<td id="LC125" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> isset(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">children</span>[<span class="pl-s1"><span class="pl-c1">$</span>name</span>]); </td>
</tr>
<tr class="border-0">
<td id="L126" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="126"></td>
<td id="LC126" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto">In PHP context there's no problem, the main form view has the <code class="notranslate">$form->parent</code> property and its children's fields (<code class="notranslate">$form['parent']</code>), each one accessible unmistakably by syntax. <strong>But</strong>, in Twig context, this access/check <code class="notranslate">{% if form.parent is null/empty %}</code> causes a naming collision. The <code class="notranslate">parent</code> attribute is resolved by Twig following the steps below:</p>
<blockquote>
<p dir="auto"><a href="https://twig.symfony.com/doc/2.x/templates.html#variables" rel="nofollow">https://twig.symfony.com/doc/2.x/templates.html#variables</a><br>
For convenience's sake <code class="notranslate">form.parent</code> does the following things on the PHP layer:</p>
<ul dir="auto">
<li><a href="https://github.com/twigphp/Twig/blob/31b577863b5ae8d19e2cefd174e95a433f16491f/lib/Twig/Extension/Core.php#L1437-L1445">check if <code class="notranslate">form</code> is an array and <code class="notranslate">parent</code> a valid element;</a> <-- always wins in this particular case</li>
<li>if not, and if <code class="notranslate">form</code> is an object, check that <code class="notranslate">parent</code> is a valid property; <-- never reached</li>
<li>...</li>
<li>if not, and if <code class="notranslate">form</code> is an object, check that <code class="notranslate">getParent</code> is a valid method;</li>
</ul>
</blockquote>
<p dir="auto">Therefore, the <code class="notranslate">parent</code> child field view is returned instead of the real <code class="notranslate">parent</code> view (which is null in this case)!</p>
<p dir="auto">There's some place in the source where this kind of check is done and surely in many bundles and apps:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2028198/32636294-245a0ef6-c582-11e7-9ed7-0995f191c61d.png"><img src="https://user-images.githubusercontent.com/2028198/32636294-245a0ef6-c582-11e7-9ed7-0995f191c61d.png" alt="form_parent" style="max-width: 100%;"></a></p>
<p dir="auto">I'm not sure if there's a workaround for current projects/bundles rely on the Symfony form themes templates. I don't think it is a bug of Twig either, but a design error of the <code class="notranslate">FormView</code> class, which is specially designed to work in Twig context.</p>
<p dir="auto">We may need a getter method for this <code class="notranslate">parent</code> property by now and check <code class="notranslate">{% if form.getParent %}</code> everywhere avoiding the first rule. Wdyt? thoughts?</p> | <p dir="auto">How can know if a form has a parent or not, in a view?</p>
<p dir="auto">The fast answer is:</p>
<div class="highlight highlight-text-html-twig notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{{ form.parent }}"><pre class="notranslate">{{ <span class="pl-smi">form</span>.<span class="pl-smi">parent</span> }}</pre></div>
<p dir="auto">but if the form has a child called <code class="notranslate">parent</code> the above statement always return a result, even when they do not have a real parent.</p>
<p dir="auto">then the only way to know if has a real parent is something like:</p>
<div class="highlight highlight-text-html-twig notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{% set hasParent = (form.parent is not null and (not form.offsetExists('parent') or form.parent != form.offsetGet('parent'))) %}"><pre class="notranslate">{% <span class="pl-k">set</span> <span class="pl-smi">hasParent</span> <span class="pl-k">=</span> (<span class="pl-smi">form</span>.<span class="pl-smi">parent</span> <span class="pl-k">is not</span> <span class="pl-c1">null</span> <span class="pl-k">and</span> (<span class="pl-smi">not</span> form.<span class="pl-smi">offsetExists</span>(<span class="pl-s"><span class="pl-pds">'</span>parent<span class="pl-pds">'</span></span>) <span class="pl-k">or</span> <span class="pl-smi">form</span>.<span class="pl-smi">parent</span> <span class="pl-k">!=</span> form.<span class="pl-smi">offsetGet</span>(<span class="pl-s"><span class="pl-pds">'</span>parent<span class="pl-pds">'</span></span>))) %}</pre></div>
<p dir="auto">I'm missing something?</p>
<p dir="auto">a method <code class="notranslate">hasParent()</code> is needed in the FormView to avoid the \ArrayAccess.</p> | 1 |
<p dir="auto">👋 team,</p>
<p dir="auto">I am working on <a href="https://community.algolia.com/docsearch/" rel="nofollow">DocSearch</a> , an algolia tool. We are proud to feature the search from your documentation website.</p>
<p dir="auto">Congrats for the v7 <g-emoji class="g-emoji" alias="clap" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44f.png">👏</g-emoji></p>
<p dir="auto">It needed <a href="https://github.com/algolia/docsearch-configs/commit/6563a0730d9a51ff3a3c0b44f7ed0ecb1d7952eb">an update from our side</a> in order to avoid having duplicates from v7 and the latest 6.26.3. No worries, everything is proactively updated (we monitor big changes)</p>
<p dir="auto">If you want, we do offer filtering over <code class="notranslate">language</code> and <code class="notranslate">version</code>. Since you are using Docusaurus, the <code class="notranslate">version</code> and <code class="notranslate">language</code> filters are handled automatically from the Search-UI. We will need you to enable it and check that your Docusaurus instance is updated.</p>
<p dir="auto">Please ping me if you want to enable this feature. I will PR the required changes from <a href="https://github.com/algolia/docsearch-configs/blob/master/configs/babeljs.json">your DocSearch configuration</a>.</p>
<p dir="auto">Your website will have an adaptive search instead of only retrieving the latest version.</p> | <p dir="auto">Babel very strange move comments: example, DojoDoc comments in function and info about copyright.</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="// Available via the modified BSD license. See LICENSE for details.
import a from "a";
const ESC = 27;
var obj = {
isValid: function(/*Boolean*/ /*===== isFocused =====*/) {
return true;
}
};"><pre class="notranslate"><span class="pl-c">// Available via the modified BSD license. See LICENSE for details.</span>
<span class="pl-k">import</span> <span class="pl-s1">a</span> <span class="pl-k">from</span> <span class="pl-s">"a"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-c1">ESC</span> <span class="pl-c1">=</span> <span class="pl-c1">27</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-en">isValid</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-c">/*Boolean*/</span> <span class="pl-c">/*===== isFocused =====*/</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Babel Configuration (.babelrc, package.json, cli command)</h3>
<p dir="auto">es2015 preset</p>
<h3 dir="auto">Expected Behavior</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Available via the modified BSD license. See LICENSE for details.
"use strict";
var _a = require("a");
var _a2 = _interopRequireDefault(_a);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ESC = 27;
var obj = {
isValid: function isValid(/*Boolean*/ /*===== isFocused =====*/){
return true;
}
};"><pre class="notranslate"><span class="pl-c">// Available via the modified BSD license. See LICENSE for details.</span>
<span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_a</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"a"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_a2</span> <span class="pl-c1">=</span> <span class="pl-en">_interopRequireDefault</span><span class="pl-kos">(</span><span class="pl-s1">_a</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-en">_interopRequireDefault</span><span class="pl-kos">(</span><span class="pl-s1">obj</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">obj</span> <span class="pl-c1">&&</span> <span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">__esModule</span> ? <span class="pl-s1">obj</span> : <span class="pl-kos">{</span> <span class="pl-c1">default</span>: <span class="pl-s1">obj</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-k">var</span> <span class="pl-c1">ESC</span> <span class="pl-c1">=</span> <span class="pl-c1">27</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-en">isValid</span>: <span class="pl-k">function</span> <span class="pl-en">isValid</span><span class="pl-kos">(</span><span class="pl-c">/*Boolean*/</span> <span class="pl-c">/*===== isFocused =====*/</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Current Behavior</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""use strict";
var _a = require("a");
var _a2 = _interopRequireDefault(_a);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ESC = 27; // Available via the modified BSD license. See LICENSE for details.
var obj = {
isValid: function isValid() /*Boolean*/ /*===== isFocused =====*/{
return true;
}
};"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_a</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"a"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_a2</span> <span class="pl-c1">=</span> <span class="pl-en">_interopRequireDefault</span><span class="pl-kos">(</span><span class="pl-s1">_a</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-en">_interopRequireDefault</span><span class="pl-kos">(</span><span class="pl-s1">obj</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">obj</span> <span class="pl-c1">&&</span> <span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">__esModule</span> ? <span class="pl-s1">obj</span> : <span class="pl-kos">{</span> <span class="pl-c1">default</span>: <span class="pl-s1">obj</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-k">var</span> <span class="pl-c1">ESC</span> <span class="pl-c1">=</span> <span class="pl-c1">27</span><span class="pl-kos">;</span> <span class="pl-c">// Available via the modified BSD license. See LICENSE for details.</span>
<span class="pl-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-en">isValid</span>: <span class="pl-k">function</span> <span class="pl-en">isValid</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c">/*Boolean*/</span> <span class="pl-c">/*===== isFocused =====*/</span><span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Your Environment</h3>
<p dir="auto">You can reproduce on your sandbox ("Try it out"): <a href="http://babeljs.io/repl/" rel="nofollow">http://babeljs.io/repl/</a></p> | 0 |
<p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-kops-aws-updown/3289/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-kops-aws-updown/3289/</a></p>
<p dir="auto">Multiple broken tests:</p>
<p dir="auto">Failed: [k8s.io] Networking [k8s.io] Granular Checks: Pods should function for intra-pod communication: udp [Conformance] {Kubernetes e2e suite}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/common/networking.go:45
Oct 23 18:38:04.743: Failed to find expected endpoints:
Tries 0
Command curl -q -s 'http://100.96.2.6:8080/dial?request=hostName&protocol=udp&host=10.123.45.3&port=8081&tries=1'
retrieved map[]
expected map[netserver-1:{}]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/networking_utils.go:206"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/common/networking.go:45
Oct 23 18:38:04.743: Failed to find expected endpoints:
Tries 0
Command curl -q -s 'http://100.96.2.6:8080/dial?request=hostName&protocol=udp&host=10.123.45.3&port=8081&tries=1'
retrieved map[]
expected map[netserver-1:{}]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/networking_utils.go:206
</code></pre></div>
<p dir="auto">Failed: [k8s.io] Networking [k8s.io] Granular Checks: Pods should function for node-pod communication: http [Conformance] {Kubernetes e2e suite}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/common/networking.go:52
Oct 23 18:39:59.326: Failed to find expected endpoints:
Tries 0
Command curl -q -s --connect-timeout 1 http://10.123.45.6:8080/hostName
retrieved map[]
expected map[netserver-0:{}]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/networking_utils.go:255"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/common/networking.go:52
Oct 23 18:39:59.326: Failed to find expected endpoints:
Tries 0
Command curl -q -s --connect-timeout 1 http://10.123.45.6:8080/hostName
retrieved map[]
expected map[netserver-0:{}]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/networking_utils.go:255
</code></pre></div>
<p dir="auto">Issues about this test specifically: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="179675806" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/33631" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/33631/hovercard" href="https://github.com/kubernetes/kubernetes/issues/33631">#33631</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="180814116" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/33995" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/33995/hovercard" href="https://github.com/kubernetes/kubernetes/issues/33995">#33995</a></p>
<p dir="auto">Failed: [k8s.io] Networking [k8s.io] Granular Checks: Pods should function for node-pod communication: udp [Conformance] {Kubernetes e2e suite}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/common/networking.go:59
Oct 23 18:35:27.966: Failed to find expected endpoints:
Tries 0
Command echo 'hostName' | timeout -t 3 nc -w 1 -u 10.123.45.4 8081
retrieved map[]
expected map[netserver-0:{}]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/networking_utils.go:255"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/common/networking.go:59
Oct 23 18:35:27.966: Failed to find expected endpoints:
Tries 0
Command echo 'hostName' | timeout -t 3 nc -w 1 -u 10.123.45.4 8081
retrieved map[]
expected map[netserver-0:{}]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/networking_utils.go:255
</code></pre></div>
<p dir="auto">Failed: [k8s.io] Networking [k8s.io] Granular Checks: Pods should function for intra-pod communication: http [Conformance] {Kubernetes e2e suite}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/common/networking.go:38
Oct 23 18:38:03.456: Failed to find expected endpoints:
Tries 0
Command curl -q -s 'http://100.96.2.7:8080/dial?request=hostName&protocol=http&host=10.123.45.5&port=8080&tries=1'
retrieved map[]
expected map[netserver-1:{}]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/networking_utils.go:206"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/common/networking.go:38
Oct 23 18:38:03.456: Failed to find expected endpoints:
Tries 0
Command curl -q -s 'http://100.96.2.7:8080/dial?request=hostName&protocol=http&host=10.123.45.5&port=8080&tries=1'
retrieved map[]
expected map[netserver-1:{}]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/networking_utils.go:206
</code></pre></div>
<p dir="auto">Previous issues for this suite: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="181317292" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/34196" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/34196/hovercard" href="https://github.com/kubernetes/kubernetes/issues/34196">#34196</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="182924896" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/34777" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/34777/hovercard" href="https://github.com/kubernetes/kubernetes/issues/34777">#34777</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="184531250" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/35305" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/35305/hovercard" href="https://github.com/kubernetes/kubernetes/issues/35305">#35305</a></p> | <p dir="auto">Failed: <a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-kops-aws-updown/2102/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-kops-aws-updown/2102/</a></p>
<p dir="auto">Run so broken it didn't make JUnit output!</p> | 1 |
<p dir="auto">After installing <a href="https://pypi.org/project/numpy/#files" rel="nofollow">the latest</a> release with <code class="notranslate">pip</code> (support for 10.8.5 seems to be declared in the filename: numpy-1.16.1-cp37-cp37m-macosx_<strong>10_6</strong>_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl), <code class="notranslate">numpy</code> fails with the following error:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
3.7.0 (default, Jul 15 2018, 23:10:01)
[Clang 5.1 (clang-503.0.40)]
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
File "/Users/username/Library/Python/3.7/lib/python/site-packages/matplotlib/__init__.py", line 141, in <module>
from . import cbook, rcsetup
File "/Users/username/Library/Python/3.7/lib/python/site-packages/matplotlib/cbook/__init__.py", line 33, in <module>
import numpy as np
File "/Users/username/Library/Python/3.7/lib/python/site-packages/numpy/__init__.py", line 148, in <module>
from . import fft
File "/Users/username/Library/Python/3.7/lib/python/site-packages/numpy/fft/__init__.py", line 6, in <module>
from .fftpack import *
File "/Users/username/Library/Python/3.7/lib/python/site-packages/numpy/fft/fftpack.py", line 44, in <module>
from . import fftpack_lite as fftpack
ImportError: dlopen(/Users/username/Library/Python/3.7/lib/python/site-packages/numpy/fft/fftpack_lite.cpython-37m-darwin.so, 2): Symbol not found: ___sincos_stret
Referenced from: /Users/username/Library/Python/3.7/lib/python/site-packages/numpy/fft/fftpack_lite.cpython-37m-darwin.so
Expected in: /usr/lib/libSystem.B.dylib
in /Users/username/Library/Python/3.7/lib/python/site-packages/numpy/fft/fftpack_lite.cpython-37m-darwin.so"><pre class="notranslate"><span class="pl-c1">3.7</span>.<span class="pl-c1">0</span> (<span class="pl-s1">default</span>, <span class="pl-v">Jul</span> <span class="pl-c1">15</span> <span class="pl-c1">2018</span>, <span class="pl-c1">23</span>:<span class="pl-c1">10</span>:<span class="pl-c1">01</span>)
[<span class="pl-v">Clang</span> <span class="pl-c1">5.1</span> (<span class="pl-s1">clang</span><span class="pl-c1">-</span><span class="pl-c1">503.0</span>.<span class="pl-c1">40</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-v">File</span> <span class="pl-s">"<stdin>"</span>, <span class="pl-s1">line</span> <span class="pl-c1">5</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-v">File</span> <span class="pl-s">"/Users/username/Library/Python/3.7/lib/python/site-packages/matplotlib/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">141</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-s1">from</span> . <span class="pl-s1">import</span> <span class="pl-s1">cbook</span>, <span class="pl-s1">rcsetup</span>
<span class="pl-v">File</span> <span class="pl-s">"/Users/username/Library/Python/3.7/lib/python/site-packages/matplotlib/cbook/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">33</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-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">File</span> <span class="pl-s">"/Users/username/Library/Python/3.7/lib/python/site-packages/numpy/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">148</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-s1">from</span> . <span class="pl-s1">import</span> <span class="pl-s1">fft</span>
<span class="pl-v">File</span> <span class="pl-s">"/Users/username/Library/Python/3.7/lib/python/site-packages/numpy/fft/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">6</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-s1">from</span> .<span class="pl-s1">fftpack</span> <span class="pl-s1">import</span> <span class="pl-c1">*</span>
<span class="pl-v">File</span> <span class="pl-s">"/Users/username/Library/Python/3.7/lib/python/site-packages/numpy/fft/fftpack.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">44</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-s1">from</span> . <span class="pl-s1">import</span> <span class="pl-s1">fftpack_lite</span> <span class="pl-k">as</span> <span class="pl-s1">fftpack</span>
<span class="pl-v">ImportError</span>: <span class="pl-s1">dlopen</span>(<span class="pl-c1">/</span><span class="pl-v">Users</span><span class="pl-c1">/</span><span class="pl-s1">username</span><span class="pl-c1">/</span><span class="pl-v">Library</span><span class="pl-c1">/</span><span class="pl-v">Python</span><span class="pl-c1">/</span><span class="pl-c1">3.7</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">numpy</span><span class="pl-c1">/</span><span class="pl-s1">fft</span><span class="pl-c1">/</span><span class="pl-s1">fftpack_lite</span>.<span class="pl-s1">cpython</span><span class="pl-c1">-</span><span class="pl-c1">37</span><span class="pl-s1">m</span><span class="pl-c1">-</span><span class="pl-s1">darwin</span>.<span class="pl-s1">so</span>, <span class="pl-c1">2</span>): <span class="pl-v">Symbol</span> <span class="pl-c1">not</span> <span class="pl-s1">found</span>: <span class="pl-s1">___sincos_stret</span>
<span class="pl-v">Referenced</span> <span class="pl-s1">from</span>: <span class="pl-c1">/</span><span class="pl-v">Users</span><span class="pl-c1">/</span><span class="pl-s1">username</span><span class="pl-c1">/</span><span class="pl-v">Library</span><span class="pl-c1">/</span><span class="pl-v">Python</span><span class="pl-c1">/</span><span class="pl-c1">3.7</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">numpy</span><span class="pl-c1">/</span><span class="pl-s1">fft</span><span class="pl-c1">/</span><span class="pl-s1">fftpack_lite</span>.<span class="pl-s1">cpython</span><span class="pl-c1">-</span><span class="pl-c1">37</span><span class="pl-s1">m</span><span class="pl-c1">-</span><span class="pl-s1">darwin</span>.<span class="pl-s1">so</span>
<span class="pl-v">Expected</span> <span class="pl-c1">in</span>: <span class="pl-c1">/</span><span class="pl-s1">usr</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">libSystem</span>.<span class="pl-v">B</span>.<span class="pl-s1">dylib</span>
<span class="pl-s1">in</span> <span class="pl-c1">/</span><span class="pl-v">Users</span><span class="pl-c1">/</span><span class="pl-s1">username</span><span class="pl-c1">/</span><span class="pl-v">Library</span><span class="pl-c1">/</span><span class="pl-v">Python</span><span class="pl-c1">/</span><span class="pl-c1">3.7</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">numpy</span><span class="pl-c1">/</span><span class="pl-s1">fft</span><span class="pl-c1">/</span><span class="pl-s1">fftpack_lite</span>.<span class="pl-s1">cpython</span><span class="pl-c1">-</span><span class="pl-c1">37</span><span class="pl-s1">m</span><span class="pl-c1">-</span><span class="pl-s1">darwin</span>.<span class="pl-s1">so</span></pre></div> | <p dir="auto">On MacOS 10.6 importing latest numpy results in this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> import numpy
Traceback (most recent call last):
File "/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/__init__.py", line 16, in <module>
from . import multiarray
File "/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/multiarray.py", line 12, in <module>
from . import overrides
File "/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/overrides.py", line 6, in <module>
from numpy.core._multiarray_umath import (
ImportError: dlopen(/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so, 2): Symbol not found: __tlv_bootstrap
Referenced from: /Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libopenblasp-r0.3.5.dev.dylib
Expected in: /usr/lib/libSystem.B.dylib
in /Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libopenblasp-r0.3.5.dev.dylib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/__init__.py", line 142, in <module>
from . import core
File "/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/__init__.py", line 47, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
Here is how to proceed:
- If you're working with a numpy git repository, try `git clean -xdf`
(removes all files not under version control) and rebuild numpy.
- If you are simply trying to use the numpy version that you have installed:
your installation is broken - please reinstall numpy.
- If you have already reinstalled and that did not fix the problem, then:
1. Check that you are using the Python you expect (you're using /Library/Frameworks/Python.framework/Versions/3.7/bin/python3),
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy versions you're trying to use.
2. If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues. Please include details on:
- how you installed Python
- how you installed numpy
- your operating system
- whether or not you have multiple versions of Python installed
- if you built from source, your compiler versions and ideally a build log
Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.
Original error was: dlopen(/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so, 2): Symbol not found: __tlv_bootstrap
Referenced from: /Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libopenblasp-r0.3.5.dev.dylib
Expected in: /usr/lib/libSystem.B.dylib
in /Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libopenblasp-r0.3.5.dev.dylib"><pre class="notranslate"><code class="notranslate">>>> import numpy
Traceback (most recent call last):
File "/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/__init__.py", line 16, in <module>
from . import multiarray
File "/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/multiarray.py", line 12, in <module>
from . import overrides
File "/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/overrides.py", line 6, in <module>
from numpy.core._multiarray_umath import (
ImportError: dlopen(/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so, 2): Symbol not found: __tlv_bootstrap
Referenced from: /Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libopenblasp-r0.3.5.dev.dylib
Expected in: /usr/lib/libSystem.B.dylib
in /Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libopenblasp-r0.3.5.dev.dylib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/__init__.py", line 142, in <module>
from . import core
File "/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/__init__.py", line 47, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
Here is how to proceed:
- If you're working with a numpy git repository, try `git clean -xdf`
(removes all files not under version control) and rebuild numpy.
- If you are simply trying to use the numpy version that you have installed:
your installation is broken - please reinstall numpy.
- If you have already reinstalled and that did not fix the problem, then:
1. Check that you are using the Python you expect (you're using /Library/Frameworks/Python.framework/Versions/3.7/bin/python3),
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy versions you're trying to use.
2. If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues. Please include details on:
- how you installed Python
- how you installed numpy
- your operating system
- whether or not you have multiple versions of Python installed
- if you built from source, your compiler versions and ideally a build log
Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.
Original error was: dlopen(/Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so, 2): Symbol not found: __tlv_bootstrap
Referenced from: /Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libopenblasp-r0.3.5.dev.dylib
Expected in: /usr/lib/libSystem.B.dylib
in /Users/artcs/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libopenblasp-r0.3.5.dev.dylib
</code></pre></div>
<p dir="auto">This happens with Python 2.7.15 as well as 3.7.1.<br>
A websearch for <code class="notranslate">__tlv_bootstrap</code> shows this seems to be an error related to libs compiled with llvm on MacOS 10.7 which causes them to no longer work on 10.6.<br>
The wheel installed via <code class="notranslate">pip install --user numpy</code> implies compatibility with 10.6 however and installation works fine. Only it cannot be used. Can this be fixed or if not can someone point me to the latest working version for SL?</p> | 1 |
<h3 dir="auto">Overview</h3>
<p dir="auto">Some Executors, currently a subset of the local Executors, run in a single threaded fashion and have certain limitations and requirements, many of which are hardcoded. To add a new single threaded Executor would require changes to core Airflow code.<br>
Note: This coupling often shows up with SQLite compatibility checks since it does not support multiple connections.</p>
<h3 dir="auto">Examples</h3>
<ul dir="auto">
<li><strong>2a</strong>) SQLite check done in configuration.py: <div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/apache/airflow/blob/26f94c5370587f73ebd935cecf208c6a36bdf9b6/airflow/configuration.py#L412-L419">airflow/airflow/configuration.py</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 412 to 419
in
<a data-pjax="true" class="commit-tease-sha" href="/apache/airflow/commit/26f94c5370587f73ebd935cecf208c6a36bdf9b6">26f94c5</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="L412" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="412"></td>
<td id="LC412" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">is_executor_without_sqlite_support</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">get</span>(<span class="pl-s">"core"</span>, <span class="pl-s">"executor"</span>) <span class="pl-c1">not</span> <span class="pl-c1">in</span> ( </td>
</tr>
<tr class="border-0">
<td id="L413" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="413"></td>
<td id="LC413" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">'DebugExecutor'</span>, </td>
</tr>
<tr class="border-0">
<td id="L414" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="414"></td>
<td id="LC414" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">'SequentialExecutor'</span>, </td>
</tr>
<tr class="border-0">
<td id="L415" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="415"></td>
<td id="LC415" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> ) </td>
</tr>
<tr class="border-0">
<td id="L416" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="416"></td>
<td id="LC416" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">is_sqlite</span> <span class="pl-c1">=</span> <span class="pl-s">"sqlite"</span> <span class="pl-c1">in</span> <span class="pl-s1">self</span>.<span class="pl-en">get</span>(<span class="pl-s">'database'</span>, <span class="pl-s">'sql_alchemy_conn'</span>) </td>
</tr>
<tr class="border-0">
<td id="L417" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="417"></td>
<td id="LC417" 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-s1">is_sqlite</span> <span class="pl-c1">and</span> <span class="pl-s1">is_executor_without_sqlite_support</span>: </td>
</tr>
<tr class="border-0">
<td id="L418" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="418"></td>
<td id="LC418" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">raise</span> <span class="pl-v">AirflowConfigException</span>(<span class="pl-s">f"error: cannot use sqlite with the <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-en">get</span>(<span class="pl-s">'core'</span>, <span class="pl-s">'executor'</span>)<span class="pl-kos">}</span></span>"</span>) </td>
</tr>
<tr class="border-0">
<td id="L419" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="419"></td>
<td id="LC419" 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-s1">is_sqlite</span>: </td>
</tr>
</tbody></table>
</div>
</div>
</li>
<li><strong>2b</strong>) When running in standalone mode SQLite compatibility is checked: <div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/apache/airflow/blob/26f94c5370587f73ebd935cecf208c6a36bdf9b6/airflow/cli/commands/standalone_command.py#L160-L165">airflow/airflow/cli/commands/standalone_command.py</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 160 to 165
in
<a data-pjax="true" class="commit-tease-sha" href="/apache/airflow/commit/26f94c5370587f73ebd935cecf208c6a36bdf9b6">26f94c5</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="L160" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="160"></td>
<td id="LC160" 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-s">"sqlite"</span> <span class="pl-c1">in</span> <span class="pl-s1">conf</span>.<span class="pl-en">get</span>(<span class="pl-s">"database"</span>, <span class="pl-s">"sql_alchemy_conn"</span>): </td>
</tr>
<tr class="border-0">
<td id="L161" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="161"></td>
<td id="LC161" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">self</span>.<span class="pl-en">print_output</span>(<span class="pl-s">"standalone"</span>, <span class="pl-s">"Forcing executor to SequentialExecutor"</span>) </td>
</tr>
<tr class="border-0">
<td id="L162" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="162"></td>
<td id="LC162" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">env</span>[<span class="pl-s">"AIRFLOW__CORE__EXECUTOR"</span>] <span class="pl-c1">=</span> <span class="pl-s1">executor_constants</span>.<span class="pl-v">SEQUENTIAL_EXECUTOR</span> </td>
</tr>
<tr class="border-0">
<td id="L163" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="163"></td>
<td id="LC163" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">else</span>: </td>
</tr>
<tr class="border-0">
<td id="L164" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="164"></td>
<td id="LC164" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">self</span>.<span class="pl-en">print_output</span>(<span class="pl-s">"standalone"</span>, <span class="pl-s">"Forcing executor to LocalExecutor"</span>) </td>
</tr>
<tr class="border-0">
<td id="L165" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="165"></td>
<td id="LC165" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">env</span>[<span class="pl-s">"AIRFLOW__CORE__EXECUTOR"</span>] <span class="pl-c1">=</span> <span class="pl-s1">executor_constants</span>.<span class="pl-v">LOCAL_EXECUTOR</span> </td>
</tr>
</tbody></table>
</div>
</div>
</li>
<li><strong>2c</strong>) Sensors in <code class="notranslate">poke</code> mode can block execution of DAGs when running with single process Executors, currently hardcoded to DebugExecutor (although should also include SequentialExecutor): <div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/apache/airflow/blob/27e2101f6ee5567b2843cbccf1dca0b0e7c96186/airflow/sensors/base.py#L243">airflow/airflow/sensors/base.py</a>
</p>
<p class="mb-0 color-fg-muted">
Line 243
in
<a data-pjax="true" class="commit-tease-sha" href="/apache/airflow/commit/27e2101f6ee5567b2843cbccf1dca0b0e7c96186">27e2101</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="L243" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="243"></td>
<td id="LC243" 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-s1">conf</span>.<span class="pl-en">get</span>(<span class="pl-s">'core'</span>, <span class="pl-s">'executor'</span>) <span class="pl-c1">==</span> <span class="pl-s">"DebugExecutor"</span>: </td>
</tr>
</tbody></table>
</div>
</div>
</li>
</ul>
<h3 dir="auto">Proposal</h3>
<p dir="auto">A static method or attribute on the Executor class which can be checked by core code.</p>
<p dir="auto">There is a precedent already set with the <code class="notranslate">supports_ad_hoc_ti_run</code> attribute, see:<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/apache/airflow/blob/fb741fd87254e235f99d7d67e558dafad601f253/airflow/executors/kubernetes_executor.py#L435">airflow/airflow/executors/kubernetes_executor.py</a>
</p>
<p class="mb-0 color-fg-muted">
Line 435
in
<a data-pjax="true" class="commit-tease-sha" href="/apache/airflow/commit/fb741fd87254e235f99d7d67e558dafad601f253">fb741fd</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="L435" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="435"></td>
<td id="LC435" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">supports_ad_hoc_ti_run</span>: <span class="pl-s1">bool</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span> </td>
</tr>
</tbody></table>
</div>
</div>
<div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/apache/airflow/blob/26f94c5370587f73ebd935cecf208c6a36bdf9b6/airflow/www/views.py#L1735-L1737">airflow/airflow/www/views.py</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 1735 to 1737
in
<a data-pjax="true" class="commit-tease-sha" href="/apache/airflow/commit/26f94c5370587f73ebd935cecf208c6a36bdf9b6">26f94c5</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="L1735" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1735"></td>
<td id="LC1735" 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-c1">not</span> <span class="pl-en">getattr</span>(<span class="pl-s1">executor</span>, <span class="pl-s">"supports_ad_hoc_ti_run"</span>, <span class="pl-c1">False</span>): </td>
</tr>
<tr class="border-0">
<td id="L1736" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1736"></td>
<td id="LC1736" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">msg</span> <span class="pl-c1">=</span> <span class="pl-s">"Only works with the Celery, CeleryKubernetes or Kubernetes executors"</span> </td>
</tr>
<tr class="border-0">
<td id="L1737" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1737"></td>
<td id="LC1737" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-en">redirect_or_json</span>(<span class="pl-s1">origin</span>, <span class="pl-s1">msg</span>, <span class="pl-s">"error"</span>, <span class="pl-c1">400</span>) </td>
</tr>
</tbody></table>
</div>
</div>
<p></p> | <h3 dir="auto">Description</h3>
<p dir="auto">The databricks provider can be updated to a deferrable task introduced in airflow 2.2.0. This will significnatly reduce cpu usage, memory usage on LocalExecutor and improve reliability since state is stored in the airflow metastore.</p>
<h3 dir="auto">Use case/motivation</h3>
<p dir="auto">Currently the databricks operators works by calling the databricks REST API to submit a spark job and polling it every 20 secs to check when it is done. This creates the following inefficiencies:</p>
<ul dir="auto">
<li>If the airflow executor process crashes, a duplicate job can be created in databricks since airflow doesn't save the databricks job run id.</li>
<li>Each task instance of the databricks operators run its own process, however 95% of the time the process is idle and waiting to repoll the databricks API. If you want to 50 jobs in parallel, you will use a non trivial amount of memory / CPU just to poll a rest API.</li>
</ul>
<h3 dir="auto">Related issues</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit a PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="* Error running Gradle:
Exit code 1 from: /home/travis/build/flutter/flutter sdk/examples/flutter_gallery/android/gradlew app:properties:
Starting a Gradle Daemon (subsequent builds will be faster)
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.1.2/gradle-core-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.1.0-alpha01/bundletool-0.1.0-alpha01.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.1.2/builder-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.1.2/compilerCommon-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre8/1.2.0/kotlin-stdlib-jre8-1.2.0.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.1/asm-5.1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.1/asm-analysis-5.1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.1/asm-parent-5.1.pom
Download https://jcenter.bintray.com/org/ow2/ow2/1.3/ow2-1.3.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-commons/5.1/asm-commons-5.1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-util/5.1/asm-util-5.1.pom
Download https://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.3.3/proguard-gradle-5.3.3.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-parent/5.3.3/proguard-parent-5.3.3.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.1.2/gradle-api-3.1.2.pom
Download https://jcenter.bintray.com/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
Download https://jcenter.bintray.com/com/google/auto/value/auto-value/1.5.2/auto-value-1.5.2.pom
Download https://jcenter.bintray.com/com/google/guava/guava/22.0/guava-22.0.pom
Download https://jcenter.bintray.com/com/google/auto/auto-parent/3/auto-parent-3.pom
Download https://jcenter.bintray.com/com/google/guava/guava-parent/22.0/guava-parent-22.0.pom
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java-util/3.4.0/protobuf-java-util-3.4.0.pom
Download https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.1.2/error_prone_annotations-2.1.2.pom
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-parent/3.4.0/protobuf-parent-3.4.0.pom
Download https://jcenter.bintray.com/com/google/errorprone/error_prone_parent/2.1.2/error_prone_parent-2.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/0.1.0/aapt2-proto-0.1.0.pom
Download https://jcenter.bintray.com/com/google/google/1/google-1.pom
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java/3.4.0/protobuf-java-3.4.0.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.1.2/builder-model-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.1.2/builder-test-api-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/common/26.1.2/common-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.1.2/sdk-common-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.1.2/manifest-merger-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.1.2/ddmlib-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.1.2/shared-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.1.2/protos-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.1.2/tracker-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.1.2/apksig-3.1.2.pom
Download https://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.pom
Download https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.56/bcpkix-jdk15on-1.56.pom
Download https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.1/asm-tree-5.1.pom
Download https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.pom
Download https://jcenter.bintray.com/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.1.2/sdklib-26.1.2.pom
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-reflect/1.2.0/kotlin-reflect-1.2.0.pom
Download https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.1.2/baseLibrary-3.1.2.pom
Download https://jcenter.bintray.com/org/antlr/antlr4/4.5.3/antlr4-4.5.3.pom
Download https://jcenter.bintray.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.pom
Download https://jcenter.bintray.com/com/squareup/javapoet/1.8.0/javapoet-1.8.0.pom
Download https://jcenter.bintray.com/org/antlr/antlr4-master/4.5.3/antlr4-master-4.5.3.pom
Download https://jcenter.bintray.com/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
Download https://jcenter.bintray.com/com/google/code/gson/gson/2.7/gson-2.7.pom
Download https://jcenter.bintray.com/com/android/tools/annotations/24.5.0/annotations-24.5.0.pom
Download https://jcenter.bintray.com/com/google/code/gson/gson-parent/2.7/gson-parent-2.7.pom
Download https://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/25/commons-parent-25.pom
Download https://jcenter.bintray.com/org/apache/apache/9/apache-9.pom
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.2.0/kotlin-stdlib-1.2.0.pom
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.2.0/kotlin-stdlib-jre7-1.2.0.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.3.3/proguard-base-5.3.3.pom
Download https://jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.pom
Download https://jcenter.bintray.com/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.pom
Download https://jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.pom
Download https://jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-parent/1.14/animal-sniffer-parent-1.14.pom
Download https://jcenter.bintray.com/org/codehaus/mojo/mojo-parent/34/mojo-parent-34.pom
Download https://jcenter.bintray.com/org/codehaus/codehaus-parent/4/codehaus-parent-4.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.1.2/layoutlib-api-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.1.2/dvlib-26.1.2.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.2.6/httpclient-4.2.6.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-compress/1.12/commons-compress-1.12.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/39/commons-parent-39.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.2.6/httpcomponents-client-4.2.6.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/project/7/project-7.pom
Download https://jcenter.bintray.com/org/apache/apache/16/apache-16.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.pom
Download https://jcenter.bintray.com/org/apache/apache/13/apache-13.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.1.2/repository-26.1.2.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.1/httpcomponents-client-4.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/project/4.1.1/project-4.1.1.pom
Download https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.pom
Download https://jcenter.bintray.com/org/jetbrains/annotations/13.0/annotations-13.0.pom
Download https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-runtime/2.2.11/jaxb-runtime-2.2.11.pom
Download https://jcenter.bintray.com/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.pom
Download https://jcenter.bintray.com/com/sun/xml/bind/mvn/jaxb-runtime-parent/2.2.11/jaxb-runtime-parent-2.2.11.pom
Download https://jcenter.bintray.com/com/sun/activation/all/1.2.0/all-1.2.0.pom
Download https://jcenter.bintray.com/com/sun/xml/bind/mvn/jaxb-parent/2.2.11/jaxb-parent-2.2.11.pom
Download https://jcenter.bintray.com/net/java/jvnet-parent/1/jvnet-parent-1.pom
Download https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.pom
Download https://jcenter.bintray.com/com/sun/xml/bind/jaxb-bom-ext/2.2.11/jaxb-bom-ext-2.2.11.pom
Download https://jcenter.bintray.com/com/google/jimfs/jimfs-parent/1.1/jimfs-parent-1.1.pom
Download https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-bom/2.2.11/jaxb-bom-2.2.11.pom
Download https://jcenter.bintray.com/net/java/jvnet-parent/4/jvnet-parent-4.pom
Download https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.2.5/httpcore-4.2.5.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/5/commons-parent-5.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-core/4.2.5/httpcomponents-core-4.2.5.pom
Download https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom
Download https://jcenter.bintray.com/commons-codec/commons-codec/1.6/commons-codec-1.6.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/22/commons-parent-22.pom
Download https://jcenter.bintray.com/org/jvnet/staxex/stax-ex/1.7.7/stax-ex-1.7.7.pom
Download https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-core/2.2.11/jaxb-core-2.2.11.pom
Download https://jcenter.bintray.com/net/java/jvnet-parent/3/jvnet-parent-3.pom
Download https://jcenter.bintray.com/com/sun/xml/fastinfoset/FastInfoset/1.2.13/FastInfoset-1.2.13.pom
Download https://jcenter.bintray.com/com/sun/xml/fastinfoset/fastinfoset-project/1.2.13/fastinfoset-project-1.2.13.pom
Download https://jcenter.bintray.com/javax/xml/bind/jaxb-api/2.2.12-b140109.1041/jaxb-api-2.2.12-b140109.1041.pom
Download https://jcenter.bintray.com/org/glassfish/jaxb/txw2/2.2.11/txw2-2.2.11.pom
Download https://jcenter.bintray.com/com/sun/istack/istack-commons-runtime/2.21/istack-commons-runtime-2.21.pom
Download https://jcenter.bintray.com/com/sun/xml/bind/mvn/jaxb-txw-parent/2.2.11/jaxb-txw-parent-2.2.11.pom
Download https://jcenter.bintray.com/com/sun/istack/istack-commons/2.21/istack-commons-2.21.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.1.2/annotations-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.1.2/gradle-core-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.1.2/builder-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.1.2/gradle-api-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.1.2/compilerCommon-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.1.2/manifest-merger-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.1.2/sdk-common-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.1.2/sdklib-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.1.2/repository-26.1.2.jar
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre8/1.2.0/kotlin-stdlib-jre8-1.2.0.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.1/asm-analysis-5.1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-commons/5.1/asm-commons-5.1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-util/5.1/asm-util-5.1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.1/asm-tree-5.1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.1/asm-5.1.jar
Download https://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.3.3/proguard-gradle-5.3.3.jar
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java-util/3.4.0/protobuf-java-util-3.4.0.jar
Download https://jcenter.bintray.com/com/google/auto/value/auto-value/1.5.2/auto-value-1.5.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.1.2/builder-test-api-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.1.2/ddmlib-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.1.2/tracker-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.1.2/shared-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.1.2/layoutlib-api-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.1.2/dvlib-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/common/26.1.2/common-26.1.2.jar
Download https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.jar
Download https://jcenter.bintray.com/com/google/guava/guava/22.0/guava-22.0.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/0.1.0/aapt2-proto-0.1.0.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.1.2/protos-26.1.2.jar
Download https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.1.2/error_prone_annotations-2.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.1.2/builder-model-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.1.2/apksig-3.1.2.jar
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java/3.4.0/protobuf-java-3.4.0.jar
Download https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.56/bcpkix-jdk15on-1.56.jar
Download https://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.jar
Download https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.jar
Download https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.jar
Download https://jcenter.bintray.com/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.jar
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-reflect/1.2.0/kotlin-reflect-1.2.0.jar
Download https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.1.2/baseLibrary-3.1.2.jar
Download https://jcenter.bintray.com/org/antlr/antlr4/4.5.3/antlr4-4.5.3.jar
Download https://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.jar
Download https://jcenter.bintray.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar
Download https://jcenter.bintray.com/com/squareup/javapoet/1.8.0/javapoet-1.8.0.jar
Download https://jcenter.bintray.com/com/google/code/gson/gson/2.7/gson-2.7.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.1.2/annotations-26.1.2.jar
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.2.0/kotlin-stdlib-jre7-1.2.0.jar
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.2.0/kotlin-stdlib-1.2.0.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.3.3/proguard-base-5.3.3.jar
Download https://jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar
Download https://jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar
Download https://jcenter.bintray.com/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.2.6/httpclient-4.2.6.jar
Download https://jcenter.bintray.com/org/apache/commons/commons-compress/1.12/commons-compress-1.12.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar
Download https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar
Download https://jcenter.bintray.com/org/jetbrains/annotations/13.0/annotations-13.0.jar
Download https://jcenter.bintray.com/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.jar
Download https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-runtime/2.2.11/jaxb-runtime-2.2.11.jar
Download https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.2.5/httpcore-4.2.5.jar
Download https://jcenter.bintray.com/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
Download https://jcenter.bintray.com/org/jvnet/staxex/stax-ex/1.7.7/stax-ex-1.7.7.jar
Download https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-core/2.2.11/jaxb-core-2.2.11.jar
Download https://jcenter.bintray.com/com/sun/xml/fastinfoset/FastInfoset/1.2.13/FastInfoset-1.2.13.jar
Download https://jcenter.bintray.com/javax/xml/bind/jaxb-api/2.2.12-b140109.1041/jaxb-api-2.2.12-b140109.1041.jar
Download https://jcenter.bintray.com/org/glassfish/jaxb/txw2/2.2.11/txw2-2.2.11.jar
Download https://jcenter.bintray.com/com/sun/istack/istack-commons-runtime/2.21/istack-commons-runtime-2.21.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.1.0-alpha01/bundletool-0.1.0-alpha01.jar
Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
* Where:
Build file '/home/travis/build/flutter/flutter sdk/examples/flutter_gallery/android/app/build.gradle' line: 25
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not resolve all files for configuration 'classpath'.
> Could not resolve com.android.tools.build:gradle:3.1.2.
Required by:
unspecified:unspecified:unspecified
> Could not resolve com.android.tools.build:gradle:3.1.2.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'.
> Read timed out
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 3s
Please review your Gradle project setup in the android/ folder."><pre class="notranslate"><code class="notranslate">* Error running Gradle:
Exit code 1 from: /home/travis/build/flutter/flutter sdk/examples/flutter_gallery/android/gradlew app:properties:
Starting a Gradle Daemon (subsequent builds will be faster)
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.1.2/gradle-core-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.1.0-alpha01/bundletool-0.1.0-alpha01.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.1.2/builder-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.1.2/compilerCommon-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre8/1.2.0/kotlin-stdlib-jre8-1.2.0.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.1/asm-5.1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.1/asm-analysis-5.1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.1/asm-parent-5.1.pom
Download https://jcenter.bintray.com/org/ow2/ow2/1.3/ow2-1.3.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-commons/5.1/asm-commons-5.1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-util/5.1/asm-util-5.1.pom
Download https://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.3.3/proguard-gradle-5.3.3.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-parent/5.3.3/proguard-parent-5.3.3.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.1.2/gradle-api-3.1.2.pom
Download https://jcenter.bintray.com/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
Download https://jcenter.bintray.com/com/google/auto/value/auto-value/1.5.2/auto-value-1.5.2.pom
Download https://jcenter.bintray.com/com/google/guava/guava/22.0/guava-22.0.pom
Download https://jcenter.bintray.com/com/google/auto/auto-parent/3/auto-parent-3.pom
Download https://jcenter.bintray.com/com/google/guava/guava-parent/22.0/guava-parent-22.0.pom
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java-util/3.4.0/protobuf-java-util-3.4.0.pom
Download https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.1.2/error_prone_annotations-2.1.2.pom
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-parent/3.4.0/protobuf-parent-3.4.0.pom
Download https://jcenter.bintray.com/com/google/errorprone/error_prone_parent/2.1.2/error_prone_parent-2.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/0.1.0/aapt2-proto-0.1.0.pom
Download https://jcenter.bintray.com/com/google/google/1/google-1.pom
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java/3.4.0/protobuf-java-3.4.0.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.1.2/builder-model-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.1.2/builder-test-api-3.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/common/26.1.2/common-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.1.2/sdk-common-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.1.2/manifest-merger-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.1.2/ddmlib-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.1.2/shared-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.1.2/protos-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.1.2/tracker-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.1.2/apksig-3.1.2.pom
Download https://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.pom
Download https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.56/bcpkix-jdk15on-1.56.pom
Download https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.1/asm-tree-5.1.pom
Download https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.pom
Download https://jcenter.bintray.com/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.1.2/sdklib-26.1.2.pom
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-reflect/1.2.0/kotlin-reflect-1.2.0.pom
Download https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.1.2/baseLibrary-3.1.2.pom
Download https://jcenter.bintray.com/org/antlr/antlr4/4.5.3/antlr4-4.5.3.pom
Download https://jcenter.bintray.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.pom
Download https://jcenter.bintray.com/com/squareup/javapoet/1.8.0/javapoet-1.8.0.pom
Download https://jcenter.bintray.com/org/antlr/antlr4-master/4.5.3/antlr4-master-4.5.3.pom
Download https://jcenter.bintray.com/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
Download https://jcenter.bintray.com/com/google/code/gson/gson/2.7/gson-2.7.pom
Download https://jcenter.bintray.com/com/android/tools/annotations/24.5.0/annotations-24.5.0.pom
Download https://jcenter.bintray.com/com/google/code/gson/gson-parent/2.7/gson-parent-2.7.pom
Download https://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/25/commons-parent-25.pom
Download https://jcenter.bintray.com/org/apache/apache/9/apache-9.pom
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.2.0/kotlin-stdlib-1.2.0.pom
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.2.0/kotlin-stdlib-jre7-1.2.0.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.3.3/proguard-base-5.3.3.pom
Download https://jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.pom
Download https://jcenter.bintray.com/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.pom
Download https://jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.pom
Download https://jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-parent/1.14/animal-sniffer-parent-1.14.pom
Download https://jcenter.bintray.com/org/codehaus/mojo/mojo-parent/34/mojo-parent-34.pom
Download https://jcenter.bintray.com/org/codehaus/codehaus-parent/4/codehaus-parent-4.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.1.2/layoutlib-api-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.1.2/dvlib-26.1.2.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.2.6/httpclient-4.2.6.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-compress/1.12/commons-compress-1.12.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/39/commons-parent-39.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.2.6/httpcomponents-client-4.2.6.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/project/7/project-7.pom
Download https://jcenter.bintray.com/org/apache/apache/16/apache-16.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.pom
Download https://jcenter.bintray.com/org/apache/apache/13/apache-13.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.1.2/repository-26.1.2.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.1/httpcomponents-client-4.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/project/4.1.1/project-4.1.1.pom
Download https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.pom
Download https://jcenter.bintray.com/org/jetbrains/annotations/13.0/annotations-13.0.pom
Download https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-runtime/2.2.11/jaxb-runtime-2.2.11.pom
Download https://jcenter.bintray.com/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.pom
Download https://jcenter.bintray.com/com/sun/xml/bind/mvn/jaxb-runtime-parent/2.2.11/jaxb-runtime-parent-2.2.11.pom
Download https://jcenter.bintray.com/com/sun/activation/all/1.2.0/all-1.2.0.pom
Download https://jcenter.bintray.com/com/sun/xml/bind/mvn/jaxb-parent/2.2.11/jaxb-parent-2.2.11.pom
Download https://jcenter.bintray.com/net/java/jvnet-parent/1/jvnet-parent-1.pom
Download https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.pom
Download https://jcenter.bintray.com/com/sun/xml/bind/jaxb-bom-ext/2.2.11/jaxb-bom-ext-2.2.11.pom
Download https://jcenter.bintray.com/com/google/jimfs/jimfs-parent/1.1/jimfs-parent-1.1.pom
Download https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-bom/2.2.11/jaxb-bom-2.2.11.pom
Download https://jcenter.bintray.com/net/java/jvnet-parent/4/jvnet-parent-4.pom
Download https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.2.5/httpcore-4.2.5.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/5/commons-parent-5.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-core/4.2.5/httpcomponents-core-4.2.5.pom
Download https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom
Download https://jcenter.bintray.com/commons-codec/commons-codec/1.6/commons-codec-1.6.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/22/commons-parent-22.pom
Download https://jcenter.bintray.com/org/jvnet/staxex/stax-ex/1.7.7/stax-ex-1.7.7.pom
Download https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-core/2.2.11/jaxb-core-2.2.11.pom
Download https://jcenter.bintray.com/net/java/jvnet-parent/3/jvnet-parent-3.pom
Download https://jcenter.bintray.com/com/sun/xml/fastinfoset/FastInfoset/1.2.13/FastInfoset-1.2.13.pom
Download https://jcenter.bintray.com/com/sun/xml/fastinfoset/fastinfoset-project/1.2.13/fastinfoset-project-1.2.13.pom
Download https://jcenter.bintray.com/javax/xml/bind/jaxb-api/2.2.12-b140109.1041/jaxb-api-2.2.12-b140109.1041.pom
Download https://jcenter.bintray.com/org/glassfish/jaxb/txw2/2.2.11/txw2-2.2.11.pom
Download https://jcenter.bintray.com/com/sun/istack/istack-commons-runtime/2.21/istack-commons-runtime-2.21.pom
Download https://jcenter.bintray.com/com/sun/xml/bind/mvn/jaxb-txw-parent/2.2.11/jaxb-txw-parent-2.2.11.pom
Download https://jcenter.bintray.com/com/sun/istack/istack-commons/2.21/istack-commons-2.21.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.1.2/annotations-26.1.2.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.1.2/gradle-core-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.1.2/builder-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.1.2/gradle-api-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.1.2/compilerCommon-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.1.2/manifest-merger-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.1.2/sdk-common-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.1.2/sdklib-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.1.2/repository-26.1.2.jar
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre8/1.2.0/kotlin-stdlib-jre8-1.2.0.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.1/asm-analysis-5.1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-commons/5.1/asm-commons-5.1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-util/5.1/asm-util-5.1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.1/asm-tree-5.1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.1/asm-5.1.jar
Download https://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.3.3/proguard-gradle-5.3.3.jar
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java-util/3.4.0/protobuf-java-util-3.4.0.jar
Download https://jcenter.bintray.com/com/google/auto/value/auto-value/1.5.2/auto-value-1.5.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.1.2/builder-test-api-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.1.2/ddmlib-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.1.2/tracker-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.1.2/shared-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.1.2/layoutlib-api-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.1.2/dvlib-26.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/common/26.1.2/common-26.1.2.jar
Download https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.jar
Download https://jcenter.bintray.com/com/google/guava/guava/22.0/guava-22.0.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/0.1.0/aapt2-proto-0.1.0.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.1.2/protos-26.1.2.jar
Download https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.1.2/error_prone_annotations-2.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.1.2/builder-model-3.1.2.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.1.2/apksig-3.1.2.jar
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java/3.4.0/protobuf-java-3.4.0.jar
Download https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.56/bcpkix-jdk15on-1.56.jar
Download https://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.jar
Download https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.jar
Download https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.jar
Download https://jcenter.bintray.com/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.jar
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-reflect/1.2.0/kotlin-reflect-1.2.0.jar
Download https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.1.2/baseLibrary-3.1.2.jar
Download https://jcenter.bintray.com/org/antlr/antlr4/4.5.3/antlr4-4.5.3.jar
Download https://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.jar
Download https://jcenter.bintray.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar
Download https://jcenter.bintray.com/com/squareup/javapoet/1.8.0/javapoet-1.8.0.jar
Download https://jcenter.bintray.com/com/google/code/gson/gson/2.7/gson-2.7.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.1.2/annotations-26.1.2.jar
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.2.0/kotlin-stdlib-jre7-1.2.0.jar
Download https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.2.0/kotlin-stdlib-1.2.0.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.3.3/proguard-base-5.3.3.jar
Download https://jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar
Download https://jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar
Download https://jcenter.bintray.com/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.2.6/httpclient-4.2.6.jar
Download https://jcenter.bintray.com/org/apache/commons/commons-compress/1.12/commons-compress-1.12.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar
Download https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar
Download https://jcenter.bintray.com/org/jetbrains/annotations/13.0/annotations-13.0.jar
Download https://jcenter.bintray.com/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.jar
Download https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-runtime/2.2.11/jaxb-runtime-2.2.11.jar
Download https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.2.5/httpcore-4.2.5.jar
Download https://jcenter.bintray.com/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
Download https://jcenter.bintray.com/org/jvnet/staxex/stax-ex/1.7.7/stax-ex-1.7.7.jar
Download https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-core/2.2.11/jaxb-core-2.2.11.jar
Download https://jcenter.bintray.com/com/sun/xml/fastinfoset/FastInfoset/1.2.13/FastInfoset-1.2.13.jar
Download https://jcenter.bintray.com/javax/xml/bind/jaxb-api/2.2.12-b140109.1041/jaxb-api-2.2.12-b140109.1041.jar
Download https://jcenter.bintray.com/org/glassfish/jaxb/txw2/2.2.11/txw2-2.2.11.jar
Download https://jcenter.bintray.com/com/sun/istack/istack-commons-runtime/2.21/istack-commons-runtime-2.21.jar
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.1.0-alpha01/bundletool-0.1.0-alpha01.jar
Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
* Where:
Build file '/home/travis/build/flutter/flutter sdk/examples/flutter_gallery/android/app/build.gradle' line: 25
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not resolve all files for configuration 'classpath'.
> Could not resolve com.android.tools.build:gradle:3.1.2.
Required by:
unspecified:unspecified:unspecified
> Could not resolve com.android.tools.build:gradle:3.1.2.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'.
> Read timed out
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 3s
Please review your Gradle project setup in the android/ folder.
</code></pre></div>
<p dir="auto">build_and_deploy_gallery shard on Travis.</p> | <p dir="auto">We should consider detecting network errors in gradle and retrying...</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Initializing gradle... 6.3s
Resolving dependencies...
* Error running Gradle:
Exit code 1 from: /home/travis/build/flutter/flutter sdk/examples/flutter_gallery/android/gradlew app:properties:
Starting a Gradle Daemon (subsequent builds will be faster)
Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.1.2.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.1.2.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'.
> Remote host closed connection during handshake
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 24s
Please review your Gradle project setup in the android/ folder."><pre class="notranslate"><span class="pl-c1">Initializing</span> gradle... <span class="pl-c1">6.</span>3s
<span class="pl-c1">Resolving</span> dependencies...
<span class="pl-k">*</span> <span class="pl-c1">Error</span> running <span class="pl-c1">Gradle</span><span class="pl-k">:</span>
<span class="pl-c1">Exit</span> code <span class="pl-c1">1</span> from<span class="pl-k">:</span> <span class="pl-k">/</span>home<span class="pl-k">/</span>travis<span class="pl-k">/</span>build<span class="pl-k">/</span>flutter<span class="pl-k">/</span>flutter sdk<span class="pl-k">/</span>examples<span class="pl-k">/</span>flutter_gallery<span class="pl-k">/</span>android<span class="pl-k">/</span>gradlew app<span class="pl-k">:</span>properties<span class="pl-k">:</span>
<span class="pl-c1">Starting</span> a <span class="pl-c1">Gradle</span> <span class="pl-c1">Daemon</span> (subsequent builds will be faster)
<span class="pl-c1">Picked</span> up <span class="pl-c1">_JAVA_OPTIONS</span><span class="pl-k">:</span> <span class="pl-k">-</span><span class="pl-c1">Xmx2048m</span> <span class="pl-k">-</span><span class="pl-c1">Xms512m</span>
<span class="pl-c1">FAILURE</span><span class="pl-k">:</span> <span class="pl-c1">Build</span> failed <span class="pl-k">with</span> an exception.
<span class="pl-k">*</span> <span class="pl-c1">What</span> went wrong<span class="pl-k">:</span>
<span class="pl-c1">A</span> problem occurred configuring root project <span class="pl-s">'android'</span>.
<span class="pl-k">></span> <span class="pl-c1">Could</span> not resolve all files <span class="pl-k">for</span> configuration <span class="pl-s">':classpath'</span>.
<span class="pl-k">></span> <span class="pl-c1">Could</span> not resolve com.android.tools.build<span class="pl-k">:</span>gradle<span class="pl-k">:</span><span class="pl-c1">3.1</span>.<span class="pl-c1">2</span>.
<span class="pl-c1">Required</span> by<span class="pl-k">:</span>
project <span class="pl-k">:</span>
<span class="pl-k">></span> <span class="pl-c1">Could</span> not resolve com.android.tools.build<span class="pl-k">:</span>gradle<span class="pl-k">:</span><span class="pl-c1">3.1</span>.<span class="pl-c1">2</span>.
<span class="pl-k">></span> <span class="pl-c1">Could</span> not <span class="pl-k">get</span> resource <span class="pl-s">'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'</span>.
<span class="pl-k">></span> <span class="pl-c1">Could</span> not <span class="pl-c1">GET</span> <span class="pl-s">'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'</span>.
<span class="pl-k">></span> <span class="pl-c1">Remote</span> host closed connection during handshake
<span class="pl-k">*</span> <span class="pl-c1">Try</span><span class="pl-k">:</span>
<span class="pl-c1">Run</span> <span class="pl-k">with</span> <span class="pl-k">--</span>stacktrace option to <span class="pl-k">get</span> the stack trace. <span class="pl-c1">Run</span> <span class="pl-k">with</span> <span class="pl-k">--</span>info or <span class="pl-k">--</span>debug option to <span class="pl-k">get</span> more log output. <span class="pl-c1">Run</span> <span class="pl-k">with</span> <span class="pl-k">--</span>scan to <span class="pl-k">get</span> full insights.
<span class="pl-k">*</span> <span class="pl-c1">Get</span> more help at https<span class="pl-k">:</span><span class="pl-c">//help.gradle.org</span>
<span class="pl-c1">BUILD</span> <span class="pl-c1">FAILED</span> <span class="pl-k">in</span> 24s
<span class="pl-c1">Please</span> review your <span class="pl-c1">Gradle</span> project setup <span class="pl-k">in</span> the android<span class="pl-k">/</span> folder.</pre></div> | 1 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ ] bug report
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
There is no way to trigger a navigation while preventing a pushState event</p>
<p dir="auto"><strong>Expected/desired behavior</strong><br>
There should by a way of preventing the pushState event, maybe using the NavigationExtras:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this.router.navigate(['/myRoute', {id= id}], {preventPushState: true});"><pre class="notranslate"><code class="notranslate">this.router.navigate(['/myRoute', {id= id}], {preventPushState: true});
</code></pre></div>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
I have a route that listen for its fragment parameters. When they are not present, I setup default values and trigger a navigation so that the url is updated correctly. There is no way for the user to go back since it will always be redirected from [route without param]->[route with param]. I would like to update the url without pushing an history state.</p> | <p dir="auto">This issue is related to the new-new router:</p>
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ ] bug report
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
There is not currently any way to navigate through an application while skipping the browser history.</p>
<p dir="auto"><strong>Expected/desired behavior</strong><br>
In the router-deprecated there was a second parameter on the <code class="notranslate">navigateByUrl</code> method that allowed us to <code class="notranslate">skipLocationChange</code>. It would be nice if the <code class="notranslate">navigate</code> method allowed this too.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
I have a specific use case where we have a 'loader' component that does a service call and essentially decides where to route you. I would like to be able to navigate to this loader component without including it in the back button history so that the browser doesn't get stuck in an infinite loop of going back to the loader only to get redirected.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.0-rc.3</li>
<li><strong>Router version:</strong> alpha.7</li>
<li><strong>Browser:</strong> [all]</li>
<li><strong>Language:</strong> [all]</li>
</ul> | 1 |
<p dir="auto">I don`t know if it is bug or feature, but since you put into input with type number two minuses it will stop calling <code class="notranslate">onChange</code> callback, but value inside input will change</p>
<p dir="auto"><strong>React 15.4.2</strong><br>
<strong>Browser Version 60.0.3112.90 (Official Build) (64-bit)</strong></p> | <p dir="auto">A controlled number input, without a corresponding <code class="notranslate">setState</code> function, still allows <code class="notranslate">e</code>, <code class="notranslate">-</code> and <code class="notranslate">.</code> to be entered (and numbers can be inputted afterwards). I could be incorrect but I don't believe this is the desired behavior.</p>
<p dir="auto"><a href="https://jsfiddle.net/vervujhm/" rel="nofollow">Here's a JSFiddle</a> demonstrating the issue.</p> | 1 |
<p dir="auto">I'm pretty sure this was not the behavior last week, but at least today in the new atom version it is.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4172079/8305507/a9c56920-19a7-11e5-9d1e-61ce449c9a63.gif"><img src="https://cloud.githubusercontent.com/assets/4172079/8305507/a9c56920-19a7-11e5-9d1e-61ce449c9a63.gif" alt="select-inside" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">System: Win8.1, Atom 0.211.0</p> | <p dir="auto">Originally reported over at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="62505237" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/6008" data-hovercard-type="issue" data-hovercard-url="/atom/atom/issues/6008/hovercard" href="https://github.com/atom/atom/issues/6008">atom/atom#6008</a> (thanks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/philsinatra/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/philsinatra">@philsinatra</a>!).</p>
<p dir="auto">Example:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<div class="wrapper">
<div class="main">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corrupti ipsam ullam magni minus, aperiam animi, quasi corporis. Impedit expedita, excepturi, iure corporis quo maxime, aperiam perferendis voluptas praesentium sint quam.</p>
</div>
</div>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">wrapper</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">main</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corrupti ipsam ullam magni minus, aperiam animi, quasi corporis. Impedit expedita, excepturi, iure corporis quo maxime, aperiam perferendis voluptas praesentium sint quam.<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div>
<p dir="auto">Position the cursor after <code class="notranslate">class="wrapper"></code> and execute the "Select inside brackets" command. Result:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/38924/6715602/dc81038c-cd9f-11e4-812f-4d65fdd14279.png"><img src="https://cloud.githubusercontent.com/assets/38924/6715602/dc81038c-cd9f-11e4-812f-4d65fdd14279.png" alt="screen shot 2015-03-18 at 18 43 34" style="max-width: 100%;"></a></p>
<p dir="auto">Instead, I expected to see this:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/38924/6715626/fa558392-cd9f-11e4-8f67-649da1f3deaf.png"><img src="https://cloud.githubusercontent.com/assets/38924/6715626/fa558392-cd9f-11e4-8f67-649da1f3deaf.png" alt="screen shot 2015-03-18 at 18 52 37" style="max-width: 100%;"></a></p>
<p dir="auto">I'm guessing that the command doesn't expect it will see any attributes, so it just selects starting from where it thinks the <code class="notranslate">></code> of the opening tag will be?</p> | 1 |
<p dir="auto">Hi, please help me understand why this component is not working as intended?<br>
Of the two use cases is working only case 2...</p>
<h2 dir="auto">Source</h2>
<p dir="auto"><strong>component</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Component, Input} from 'angular2/core';
@Component({
selector: 'c12-viewport-footer',
templateUrl: 'viewport-footer.html'
})
export class ViewportFooterComponent {
@Input()
button: boolean = false;
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-smi">Component</span><span class="pl-kos">,</span> <span class="pl-smi">Input</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/core'</span><span class="pl-kos">;</span>
@<span class="pl-smi">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'c12-viewport-footer'</span><span class="pl-kos">,</span>
<span class="pl-c1">templateUrl</span>: <span class="pl-s">'viewport-footer.html'</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">ViewportFooterComponent</span> <span class="pl-kos">{</span>
@<span class="pl-smi">Input</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-c1">button</span>: <span class="pl-smi">boolean</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>view</strong></p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<div class="c12-viewport__footer" [ngClass]="{'c12-viewport__footer--button': button}">
<template [ngIf]="!button">
<ng-content></ng-content>
</template>
<template [ngIf]="button">
<button class="...">
<ng-content></ng-content>
</button>
</template>
</div>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">c12-viewport__footer</span>" <span class="pl-c1">[ngClass]</span>="<span class="pl-s">{'c12-viewport__footer--button': button}</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">template</span> <span class="pl-c1">[ngIf]</span>="<span class="pl-s">!button</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">ng-content</span><span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">ng-content</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">template</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">template</span> <span class="pl-c1">[ngIf]</span>="<span class="pl-s">button</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">...</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">ng-content</span><span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">ng-content</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">template</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div>
<h2 dir="auto">Example use</h2>
<p dir="auto"><strong>Case 1</strong></p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<c12-viewport>
...
<c12-viewport-footer>
SOME_HTML_CONTENT
</c12-viewport-footer>
<c12-viewport>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">c12-viewport</span><span class="pl-kos">></span>
...
<span class="pl-kos"><</span><span class="pl-ent">c12-viewport-footer</span><span class="pl-kos">></span>
SOME_HTML_CONTENT
<span class="pl-kos"></</span><span class="pl-ent">c12-viewport-footer</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">c12-viewport</span><span class="pl-kos">></span></pre></div>
<p dir="auto"><strong>Case 2</strong></p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<c12-viewport>
...
<c12-viewport-footer [button]="true">
SOME_TEXT_CONTENT
</c12-viewport-footer>
<c12-viewport>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">c12-viewport</span><span class="pl-kos">></span>
...
<span class="pl-kos"><</span><span class="pl-ent">c12-viewport-footer</span> <span class="pl-c1">[button]</span>="<span class="pl-s">true</span>"<span class="pl-kos">></span>
SOME_TEXT_CONTENT
<span class="pl-kos"></</span><span class="pl-ent">c12-viewport-footer</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">c12-viewport</span><span class="pl-kos">></span></pre></div> | <p dir="auto">version: <code class="notranslate">ng2-beta12</code><br>
For some reason the order in which templates are defined is causing issues with transclusion.</p>
<p dir="auto"><a href="http://plnkr.co/edit/OmMGa65bNfrrQn0i5Wwm?p=preview" rel="nofollow">Doesn't Work for buttons but works for link</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<template [ngIf]="href ===''">
<button [ngClass]="cssClassList">
<ng-content></ng-content>
</button>
</template>
<template [ngIf]="href !==''">
<a [ngClass]="cssClassList" href="href">
<ng-content></ng-content>
</a>
</template>"><pre class="notranslate"><code class="notranslate"><template [ngIf]="href ===''">
<button [ngClass]="cssClassList">
<ng-content></ng-content>
</button>
</template>
<template [ngIf]="href !==''">
<a [ngClass]="cssClassList" href="href">
<ng-content></ng-content>
</a>
</template>
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2133184/14080610/46e6e0a0-f4d4-11e5-9317-4acd79f61101.png"><img src="https://cloud.githubusercontent.com/assets/2133184/14080610/46e6e0a0-f4d4-11e5-9317-4acd79f61101.png" alt="screen shot 2016-03-28 at 10 59 34 am" style="max-width: 100%;"></a></p>
<p dir="auto"><a href="http://plnkr.co/edit/ccpnmdnU53B5JqZMBnxP?p=preview" rel="nofollow">Works for buttons but not for links</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<template [ngIf]="href !==''">
<a [ngClass]="cssClassList" href="href">
<ng-content></ng-content>
</a>
</template>
<template [ngIf]="href ===''">
<button [ngClass]="cssClassList">
<ng-content></ng-content>
</button>
</template>"><pre class="notranslate"><code class="notranslate"><template [ngIf]="href !==''">
<a [ngClass]="cssClassList" href="href">
<ng-content></ng-content>
</a>
</template>
<template [ngIf]="href ===''">
<button [ngClass]="cssClassList">
<ng-content></ng-content>
</button>
</template>
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2133184/14080621/57ccd636-f4d4-11e5-8f57-e5c8fbb856ee.png"><img src="https://cloud.githubusercontent.com/assets/2133184/14080621/57ccd636-f4d4-11e5-8f57-e5c8fbb856ee.png" alt="screen shot 2016-03-28 at 10 59 46 am" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">NumPy can create boolean arrays out of strings, but cannot convert string arrays to bool_. I think we should follow Python here and assign truth values to strings.</p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> import numpy as np
>>> np.array('N', dtype='?')
array(True)
>>> np.array('N').astype('?')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: 'N'"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></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-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-s">'N'</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'?'</span>)
<span class="pl-en">array</span>(<span class="pl-c1">True</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-s">'N'</span>).<span class="pl-en">astype</span>(<span class="pl-s">'?'</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-v">File</span> <span class="pl-s">"<stdin>"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</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-v">ValueError</span>: <span class="pl-s1">invalid</span> <span class="pl-s1">literal</span> <span class="pl-k">for</span> <span class="pl-en">int</span>() <span class="pl-s1">with</span> <span class="pl-s1">base</span> <span class="pl-c1">10</span>: <span class="pl-s">'N'</span></pre></div>
<h3 dir="auto">Error message:</h3>
<h3 dir="auto">Numpy/Python version information:</h3> | <p dir="auto">The following table shows the extents of the problem</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="x : str
sc = np.str_(x)
arr = np.array(x, np.str_)"><pre class="notranslate"><span class="pl-s1">x</span> : <span class="pl-s1">str</span>
<span class="pl-s1">sc</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">str_</span>(<span class="pl-s1">x</span>)
<span class="pl-s1">arr</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-s1">np</span>.<span class="pl-s1">str_</span>)</pre></div>
<table role="table">
<thead>
<tr>
<th><code class="notranslate">x</code></th>
<th><code class="notranslate">bool(x)</code></th>
<th><code class="notranslate">bool(sc)</code></th>
<th><code class="notranslate">bool(arr[()])</code></th>
<th><code class="notranslate">bool(arr)</code></th>
<th><code class="notranslate">sc.astype(bool)</code></th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="notranslate">''</code></td>
<td><code class="notranslate">False</code></td>
<td><code class="notranslate">False</code></td>
<td><code class="notranslate">False</code></td>
<td><code class="notranslate">False</code></td>
<td><code class="notranslate">ValueError</code></td>
</tr>
<tr>
<td><code class="notranslate">'\0'</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">False</code></td>
<td><code class="notranslate">False</code></td>
<td><code class="notranslate">ValueError</code></td>
</tr>
<tr>
<td><code class="notranslate">' '</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">False</code></td>
<td><code class="notranslate">ValueError</code></td>
</tr>
<tr>
<td><code class="notranslate">' \0'</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">False</code></td>
<td><code class="notranslate">ValueError</code></td>
</tr>
<tr>
<td><code class="notranslate">'0'</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">False</code></td>
</tr>
<tr>
<td><code class="notranslate">'1'</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
</tr>
<tr>
<td><code class="notranslate">'\0 '</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">ValueError</code></td>
</tr>
<tr>
<td><code class="notranslate">' \0 '</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">True</code></td>
<td><code class="notranslate">ValueError</code></td>
</tr>
</tbody>
</table>
<details>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def call_or_exc(f):
try:
return f()
except Exception as e:
return e
def truthiness(x):
x_arr = np.array(x)
x_sc = np.unicode_(x)
x_sc2 = x_arr[()]
return bool(x), bool(x_sc), bool(x_sc2), bool(x_arr), call_or_exc(lambda: x_sc.astype(bool))
def fmt(x):
if isinstance(x, str): return repr(x).replace(r'\x00', r'\0')
if isinstance(x, Exception): return type(x).__name__
return repr(x)
print(' | '.join("`{}`".format(x) for x in ['x', 'bool(x)', 'bool(sc)', 'bool(arr[()])', 'bool(arr)', 'sc.astype(bool)']))
print(' | '.join(['--'] * 6))
for val in ['', '\0', ' ', ' \0', '0', '1', '\0 ', ' \0 ']:
print(' | '.join("`{}`".format(fmt(x)) for x in (val,)+truthiness(val)))"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">call_or_exc</span>(<span class="pl-s1">f</span>):
<span class="pl-k">try</span>:
<span class="pl-k">return</span> <span class="pl-en">f</span>()
<span class="pl-k">except</span> <span class="pl-v">Exception</span> <span class="pl-k">as</span> <span class="pl-s1">e</span>:
<span class="pl-k">return</span> <span class="pl-s1">e</span>
<span class="pl-k">def</span> <span class="pl-en">truthiness</span>(<span class="pl-s1">x</span>):
<span class="pl-s1">x_arr</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-s1">x_sc</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">unicode_</span>(<span class="pl-s1">x</span>)
<span class="pl-s1">x_sc2</span> <span class="pl-c1">=</span> <span class="pl-s1">x_arr</span>[()]
<span class="pl-k">return</span> <span class="pl-en">bool</span>(<span class="pl-s1">x</span>), <span class="pl-en">bool</span>(<span class="pl-s1">x_sc</span>), <span class="pl-en">bool</span>(<span class="pl-s1">x_sc2</span>), <span class="pl-en">bool</span>(<span class="pl-s1">x_arr</span>), <span class="pl-en">call_or_exc</span>(<span class="pl-k">lambda</span>: <span class="pl-s1">x_sc</span>.<span class="pl-en">astype</span>(<span class="pl-s1">bool</span>))
<span class="pl-k">def</span> <span class="pl-en">fmt</span>(<span class="pl-s1">x</span>):
<span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">x</span>, <span class="pl-s1">str</span>): <span class="pl-k">return</span> <span class="pl-en">repr</span>(<span class="pl-s1">x</span>).<span class="pl-en">replace</span>(<span class="pl-s">r'\x00'</span>, <span class="pl-s">r'\0'</span>)
<span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">x</span>, <span class="pl-v">Exception</span>): <span class="pl-k">return</span> <span class="pl-en">type</span>(<span class="pl-s1">x</span>).<span class="pl-s1">__name__</span>
<span class="pl-k">return</span> <span class="pl-en">repr</span>(<span class="pl-s1">x</span>)
<span class="pl-en">print</span>(<span class="pl-s">' | '</span>.<span class="pl-en">join</span>(<span class="pl-s">"`{}`"</span>.<span class="pl-en">format</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-s">'x'</span>, <span class="pl-s">'bool(x)'</span>, <span class="pl-s">'bool(sc)'</span>, <span class="pl-s">'bool(arr[()])'</span>, <span class="pl-s">'bool(arr)'</span>, <span class="pl-s">'sc.astype(bool)'</span>]))
<span class="pl-en">print</span>(<span class="pl-s">' | '</span>.<span class="pl-en">join</span>([<span class="pl-s">'--'</span>] <span class="pl-c1">*</span> <span class="pl-c1">6</span>))
<span class="pl-k">for</span> <span class="pl-s1">val</span> <span class="pl-c1">in</span> [<span class="pl-s">''</span>, <span class="pl-s">'\0'</span>, <span class="pl-s">' '</span>, <span class="pl-s">' \0'</span>, <span class="pl-s">'0'</span>, <span class="pl-s">'1'</span>, <span class="pl-s">'\0 '</span>, <span class="pl-s">' \0 '</span>]:
<span class="pl-en">print</span>(<span class="pl-s">' | '</span>.<span class="pl-en">join</span>(<span class="pl-s">"`{}`"</span>.<span class="pl-en">format</span>(<span class="pl-en">fmt</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-s1">val</span>,)<span class="pl-c1">+</span><span class="pl-en">truthiness</span>(<span class="pl-s1">val</span>)))</pre></div>
<summary>Generated with...</summary>
</details>
<p dir="auto">The differences come down to:</p>
<ul dir="auto">
<li><code class="notranslate">bool(arr[()])</code> - indexing string arrays causes trailing nulls to be truncated. This is unavoidable.</li>
<li><code class="notranslate">bool(arr)</code> - has special handling to treat spaces as falsy. This seems unpythonic, since that's not how <code class="notranslate">str.__bool__</code> behaves - are we stuck with it</li>
<li><code class="notranslate">arr.astype(bool)</code> - treated as <code class="notranslate">arr.astype(int).astype(bool)</code>, which seems bizarre</li>
</ul> | 1 |
<p dir="auto">In our project we have a number of files where tabs are strictly required (a format we do not control). However, we want to normalize tabs to spaces throughout the rest of the project.</p>
<p dir="auto">For now, I just ask that people don't edit those files in VSCode. I even considered adding them to the ignore list for VSCode itself. But it's not uncommon to have file-specific settings, so I thought it would be nice if VSCode allowed for more complex patterns - much like <code class="notranslate">files.exclude</code>, perhaps something like:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""editor.insertSpaces": true,
"diffEditor.ignoreTrimWhitespace": true,
"files.settings": {
"**/*.idt": {
"editor.insertSpaces": false,
"diffEditor.ignoreTrimWhitespace": false
}
}"><pre class="notranslate"><span class="pl-ent">"editor.insertSpaces"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"diffEditor.ignoreTrimWhitespace"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"files.settings"</span>: {
<span class="pl-ent">"**/*.idt"</span>: {
<span class="pl-ent">"editor.insertSpaces"</span>: <span class="pl-c1">false</span>,
<span class="pl-ent">"diffEditor.ignoreTrimWhitespace"</span>: <span class="pl-c1">false</span>
}
}</pre></div> | <p dir="auto">The new fuzzy file picker makes it really hard to me to find files in huge projects (~5,000 source files). Regardless of what I'm typing in the file picker I receive a lot of results I definitely don't want. Example below:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3448684/12812691/b717e3da-cb33-11e5-8fa8-43488987fbc5.png"><img src="https://cloud.githubusercontent.com/assets/3448684/12812691/b717e3da-cb33-11e5-8fa8-43488987fbc5.png" alt="fuzzyfilepicker" style="max-width: 100%;"></a></p>
<p dir="auto">The old file picker used to work like the IntelliSense widget which feels consistent to me as a user. Is there a way to turn on the old file picker again?</p> | 0 |
<p dir="auto">Using pandas 0.10.1</p>
<p dir="auto">Pandas allows creating a dataframe with two columns with the same name. (I disagree that it should be allowed, but it is allowed, so OK). However, it doesn't handle that correctly in several cases.<br>
Pandas ought to either completely disallow duplicate named columns <em>or</em> handle them everywhere. But it shouldn't handle them in some cases but not others.</p>
<p dir="auto">Problem 1: Round-trip to a CSV<br>
Dump the dataframe to a CSV and then read it back. Even though duplicate columns are supposed to be legal, Pandas won't allow that in the CSV import/export.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df = pandas.DataFrame([[1,2]], columns=['a','a'])
#Note df has two identically named columns now
df.to_csv('foo.csv')
df2 = pandas.DataFrame.from_csv('foo.csv')
#Note df2 does NOT have the same columns anymore. the "a" was renamed "a.1"
#At the least, you ought to get some warning that dumping to a CSV will
#lose column names."><pre class="notranslate"><span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-v">DataFrame</span>([[<span class="pl-c1">1</span>,<span class="pl-c1">2</span>]], <span class="pl-s1">columns</span><span class="pl-c1">=</span>[<span class="pl-s">'a'</span>,<span class="pl-s">'a'</span>])
<span class="pl-c">#Note df has two identically named columns now</span>
<span class="pl-s1">df</span>.<span class="pl-en">to_csv</span>(<span class="pl-s">'foo.csv'</span>)
<span class="pl-s1">df2</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-v">DataFrame</span>.<span class="pl-en">from_csv</span>(<span class="pl-s">'foo.csv'</span>)
<span class="pl-c">#Note df2 does NOT have the same columns anymore. the "a" was renamed "a.1"</span>
<span class="pl-c">#At the least, you ought to get some warning that dumping to a CSV will </span>
<span class="pl-c">#lose column names.</span></pre></div>
<p dir="auto">Problem 2: Merging to a dataframe with dup columns does not work</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df = pandas.DataFrame([[1,2,3]], columns=['a','a','b'])
df.merge(df, how='left', on='b')
#Result: Very misleading error message
# edit: reindexing error"><pre class="notranslate"><span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-v">DataFrame</span>([[<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>]], <span class="pl-s1">columns</span><span class="pl-c1">=</span>[<span class="pl-s">'a'</span>,<span class="pl-s">'a'</span>,<span class="pl-s">'b'</span>])
<span class="pl-s1">df</span>.<span class="pl-en">merge</span>(<span class="pl-s1">df</span>, <span class="pl-s1">how</span><span class="pl-c1">=</span><span class="pl-s">'left'</span>, <span class="pl-s1">on</span><span class="pl-c1">=</span><span class="pl-s">'b'</span>)
<span class="pl-c">#Result: Very misleading error message</span>
<span class="pl-c"># edit: reindexing error</span></pre></div>
<p dir="auto">I'd be ok with almost any solution (disallowing duplicate named columns, giving you a warning when you do it, handling it correctly in the merge and csv read, etc). But it should be consistently one way or the other.</p> | <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="import pandas as pd
df = pd.DataFrame({'a': ['Hello', 'World']})
df['a'] = df['a'].astype('S')
df['b'] = df['a'].astype('S')
print(df.dtypes)"><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-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-s">'Hello'</span>, <span class="pl-s">'World'</span>]})
<span class="pl-s1">df</span>[<span class="pl-s">'a'</span>] <span class="pl-c1">=</span> <span class="pl-s1">df</span>[<span class="pl-s">'a'</span>].<span class="pl-en">astype</span>(<span class="pl-s">'S'</span>)
<span class="pl-s1">df</span>[<span class="pl-s">'b'</span>] <span class="pl-c1">=</span> <span class="pl-s1">df</span>[<span class="pl-s">'a'</span>].<span class="pl-en">astype</span>(<span class="pl-s">'S'</span>)
<span class="pl-en">print</span>(<span class="pl-s1">df</span>.<span class="pl-s1">dtypes</span>)</pre></div>
<p dir="auto">Output is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a object
b |S5
dtype: object"><pre class="notranslate"><code class="notranslate">a object
b |S5
dtype: object
</code></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">The new column has the correct dtype of numpy byte string, the old column no contains<br>
the new values but still has dtype <code class="notranslate">object</code>.</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">Both columns should have dtype 'S'</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
import pandas as pd
<p dir="auto">df = pd.DataFrame({'a': ['Hello', 'World']})</p>
<p dir="auto">df['a'] = df['a'].astype('S')<br>
df['b'] = df['a'].astype('S')</p>
<p dir="auto">print(df.dtypes)</p>
</details> | 0 |
<p dir="auto"><strong>Glide Version</strong>: 4.0.0-RC1</p>
<p dir="auto"><strong>Integration libraries</strong>: okhttp3, recyclerview</p>
<p dir="auto"><strong>Device/Android Version</strong>: Fails on One plus 3t, and Nexus 6p</p>
<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>: Have a long list of items, scroll fast, when you rotate the screen (setRetainInstance(true)) the fragment stays in position. as soon as you then start to scroll this crash happens</p>
<p dir="auto"><strong>Stack trace / LogCat</strong>:</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="java.lang.IllegalStateException: Failed to remove target from managers
at com.bumptech.glide.Glide.removeFromManagers(Glide.java:625)
at com.bumptech.glide.RequestManager.untrackOrDelegate(RequestManager.java:426)
at com.bumptech.glide.RequestManager.clear(RequestManager.java:412)
at com.bumptech.glide.RequestManager.clear(RequestManager.java:397)
at xxx.loadImage(ChatAdapter.java:162)
at xxx.onBindViewHolder(ChatAdapter.java:156)
at xxx.onBindViewHolder(ChatAdapter.java:111)
at xxx.onBindViewHolder(ChatAdapter.java:49)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6507)
at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5450)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5716)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5555)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5551)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2211)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1538)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1498)
at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1312)
at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1057)
at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4836)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:886)
at android.view.Choreographer.doCallbacks(Choreographer.java:698)
at android.view.Choreographer.doFrame(Choreographer.java:630)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:872)
at android.os.Handler.handleCallback(Handler.java:769)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)"><pre class="notranslate"><span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">IllegalStateException</span>: <span class="pl-en">Failed</span> <span class="pl-en">to</span> <span class="pl-en">remove</span> <span class="pl-en">target</span> <span class="pl-en">from</span> <span class="pl-en">managers</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">Glide</span><span class="pl-kos">.</span><span class="pl-en">removeFromManagers</span><span class="pl-kos">(</span><span class="pl-v">Glide</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:625</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">RequestManager</span><span class="pl-kos">.</span><span class="pl-en">untrackOrDelegate</span><span class="pl-kos">(</span><span class="pl-v">RequestManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:426</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">RequestManager</span><span class="pl-kos">.</span><span class="pl-en">clear</span><span class="pl-kos">(</span><span class="pl-v">RequestManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:412</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">RequestManager</span><span class="pl-kos">.</span><span class="pl-en">clear</span><span class="pl-kos">(</span><span class="pl-v">RequestManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:397</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">xxx</span><span class="pl-kos">.</span><span class="pl-en">loadImage</span><span class="pl-kos">(</span><span class="pl-v">ChatAdapter</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:162</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">xxx</span><span class="pl-kos">.</span><span class="pl-en">onBindViewHolder</span><span class="pl-kos">(</span><span class="pl-v">ChatAdapter</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:156</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">xxx</span><span class="pl-kos">.</span><span class="pl-en">onBindViewHolder</span><span class="pl-kos">(</span><span class="pl-v">ChatAdapter</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:111</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">xxx</span><span class="pl-kos">.</span><span class="pl-en">onBindViewHolder</span><span class="pl-kos">(</span><span class="pl-v">ChatAdapter</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:49</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">widget</span><span class="pl-kos">.</span><span class="pl-en">RecyclerView</span>$Adapter<span class="pl-kos">.</span><span class="pl-en">bindViewHolder</span><span class="pl-kos">(</span><span class="pl-v">RecyclerView</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:6507</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">widget</span><span class="pl-kos">.</span><span class="pl-en">RecyclerView</span>$Recycler<span class="pl-kos">.</span><span class="pl-en">tryBindViewHolderByDeadline</span><span class="pl-kos">(</span><span class="pl-v">RecyclerView</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:5450</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">widget</span><span class="pl-kos">.</span><span class="pl-en">RecyclerView</span>$Recycler<span class="pl-kos">.</span><span class="pl-en">tryGetViewHolderForPositionByDeadline</span><span class="pl-kos">(</span><span class="pl-v">RecyclerView</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:5716</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">widget</span><span class="pl-kos">.</span><span class="pl-en">RecyclerView</span>$Recycler<span class="pl-kos">.</span><span class="pl-en">getViewForPosition</span><span class="pl-kos">(</span><span class="pl-v">RecyclerView</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:5555</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">widget</span><span class="pl-kos">.</span><span class="pl-en">RecyclerView</span>$Recycler<span class="pl-kos">.</span><span class="pl-en">getViewForPosition</span><span class="pl-kos">(</span><span class="pl-v">RecyclerView</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:5551</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">widget</span><span class="pl-kos">.</span><span class="pl-en">LinearLayoutManager</span>$LayoutState<span class="pl-kos">.</span><span class="pl-en">next</span><span class="pl-kos">(</span><span class="pl-v">LinearLayoutManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:2211</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">widget</span><span class="pl-kos">.</span><span class="pl-en">LinearLayoutManager</span><span class="pl-kos">.</span><span class="pl-en">layoutChunk</span><span class="pl-kos">(</span><span class="pl-v">LinearLayoutManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1538</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">widget</span><span class="pl-kos">.</span><span class="pl-en">LinearLayoutManager</span><span class="pl-kos">.</span><span class="pl-en">fill</span><span class="pl-kos">(</span><span class="pl-v">LinearLayoutManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1498</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">widget</span><span class="pl-kos">.</span><span class="pl-en">LinearLayoutManager</span><span class="pl-kos">.</span><span class="pl-en">scrollBy</span><span class="pl-kos">(</span><span class="pl-v">LinearLayoutManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1312</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">widget</span><span class="pl-kos">.</span><span class="pl-en">LinearLayoutManager</span><span class="pl-kos">.</span><span class="pl-en">scrollVerticallyBy</span><span class="pl-kos">(</span><span class="pl-v">LinearLayoutManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1057</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">widget</span><span class="pl-kos">.</span><span class="pl-en">RecyclerView</span>$ViewFlinger<span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">RecyclerView</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:4836</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">Choreographer</span>$CallbackRecord<span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">Choreographer</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:886</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">Choreographer</span><span class="pl-kos">.</span><span class="pl-en">doCallbacks</span><span class="pl-kos">(</span><span class="pl-v">Choreographer</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:698</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">Choreographer</span><span class="pl-kos">.</span><span class="pl-en">doFrame</span><span class="pl-kos">(</span><span class="pl-v">Choreographer</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:630</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">Choreographer</span>$FrameDisplayEventReceiver<span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">Choreographer</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:872</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">Handler</span><span class="pl-kos">.</span><span class="pl-en">handleCallback</span><span class="pl-kos">(</span><span class="pl-v">Handler</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:769</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">Handler</span><span class="pl-kos">.</span><span class="pl-en">dispatchMessage</span><span class="pl-kos">(</span><span class="pl-v">Handler</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:98</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">Looper</span><span class="pl-kos">.</span><span class="pl-en">loop</span><span class="pl-kos">(</span><span class="pl-v">Looper</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:164</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:6541</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">reflect</span><span class="pl-kos">.</span><span class="pl-en">Method</span><span class="pl-kos">.</span><span class="pl-en">invoke</span><span class="pl-kos">(</span><span class="pl-en">Native</span> <span class="pl-v">Method</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">internal</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">Zygote</span>$MethodAndArgsCaller<span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">Zygote</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:240</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">internal</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">ZygoteInit</span><span class="pl-kos">.</span><span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-v">ZygoteInit</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:767</span><span class="pl-kos">)</span></pre></div> | <p dir="auto"><strong>Glide Version</strong>: 3.7.0</p>
<p dir="auto"><strong>Integration libraries</strong>: no</p>
<p dir="auto"><strong>Device/Android Version</strong>: HUAWEI P7</p>
<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>: Set a touch effect for ImageView</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=" class TestAdapter extends RecyclerView.Adapter<TestAdapter.TestViewHolder> {
private String[] imageUrls;
private Context mContext;
public TestAdapter(Context context, String[] imageUrls) {
this.mContext = context;
this.imageUrls = imageUrls;
}
@Override
public TestViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.
from(mContext).inflate(R.layout.item_recyclerview_history, parent, false);
TestActivity.TestAdapter.TestViewHolder holder = new TestActivity.TestAdapter.TestViewHolder(view);
holder.image.setRatio(1.5f);
return holder;
}
@Override
public void onBindViewHolder(TestViewHolder holder, int position) {
Glide.with(TestActivity.this).load(imageUrls[position]).
crossFade().placeholder(R.mipmap.pic_error).into(holder.image);
}
@Override
public int getItemCount() {
return imageUrls.length;
}
class TestViewHolder extends RecyclerView.ViewHolder {
RatioImageView image;
public TestViewHolder(View itemView) {
super(itemView);
image = (RatioImageView) itemView.findViewById(R.id.image);
}
}
}
// This is my RatioImageView .Actually it is from (https://github.com/HMY314/NineGridLayout/blob/master/app/src/main/java/com/hmy/ninegridlayout/view/RatioImageView.java)
public class RatioImageView extends ImageView {
private float mRatio = 0f;
public RatioImageView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public RatioImageView(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RatioImageView);
mRatio = typedArray.getFloat(R.styleable.RatioImageView_ratio, 0f);
typedArray.recycle();
}
public RatioImageView(Context context) {
super(context);
}
public void setRatio(float ratio) {
mRatio = ratio;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int width = MeasureSpec.getSize(widthMeasureSpec);
if (mRatio != 0) {
float height = width / mRatio;
heightMeasureSpec = MeasureSpec.makeMeasureSpec((int) height, MeasureSpec.EXACTLY);
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
Drawable drawable = getDrawable();
if (drawable != null) {
drawable.mutate().setColorFilter(Color.GRAY,
PorterDuff.Mode.MULTIPLY);
}
break;
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
Drawable drawableUp = getDrawable();
if (drawableUp != null) {
drawableUp.mutate().clearColorFilter();
}
break;
}
return super.onTouchEvent(event);
}
}
"><pre class="notranslate"> <span class="pl-k">class</span> <span class="pl-smi">TestAdapter</span> <span class="pl-k">extends</span> <span class="pl-smi">RecyclerView</span>.<span class="pl-smi">Adapter</span><<span class="pl-smi">TestAdapter</span>.<span class="pl-smi">TestViewHolder</span>> {
<span class="pl-k">private</span> <span class="pl-smi">String</span>[] <span class="pl-s1">imageUrls</span>;
<span class="pl-k">private</span> <span class="pl-smi">Context</span> <span class="pl-s1">mContext</span>;
<span class="pl-k">public</span> <span class="pl-smi">TestAdapter</span>(<span class="pl-smi">Context</span> <span class="pl-s1">context</span>, <span class="pl-smi">String</span>[] <span class="pl-s1">imageUrls</span>) {
<span class="pl-smi">this</span>.<span class="pl-s1">mContext</span> = <span class="pl-s1">context</span>;
<span class="pl-smi">this</span>.<span class="pl-s1">imageUrls</span> = <span class="pl-s1">imageUrls</span>;
}
<span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">public</span> <span class="pl-smi">TestViewHolder</span> <span class="pl-en">onCreateViewHolder</span>(<span class="pl-smi">ViewGroup</span> <span class="pl-s1">parent</span>, <span class="pl-smi">int</span> <span class="pl-s1">viewType</span>) {
<span class="pl-smi">View</span> <span class="pl-s1">view</span> = <span class="pl-smi">LayoutInflater</span>.
<span class="pl-en">from</span>(<span class="pl-s1">mContext</span>).<span class="pl-en">inflate</span>(<span class="pl-smi">R</span>.<span class="pl-s1">layout</span>.<span class="pl-s1">item_recyclerview_history</span>, <span class="pl-s1">parent</span>, <span class="pl-c1">false</span>);
<span class="pl-smi">TestActivity</span>.<span class="pl-smi">TestAdapter</span>.<span class="pl-smi">TestViewHolder</span> <span class="pl-s1">holder</span> = <span class="pl-k">new</span> <span class="pl-smi">TestActivity</span>.<span class="pl-smi">TestAdapter</span>.<span class="pl-smi">TestViewHolder</span>(<span class="pl-s1">view</span>);
<span class="pl-s1">holder</span>.<span class="pl-s1">image</span>.<span class="pl-en">setRatio</span>(<span class="pl-c1">1.5f</span>);
<span class="pl-k">return</span> <span class="pl-s1">holder</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">onBindViewHolder</span>(<span class="pl-smi">TestViewHolder</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-smi">TestActivity</span>.<span class="pl-smi">this</span>).<span class="pl-en">load</span>(<span class="pl-s1">imageUrls</span>[<span class="pl-s1">position</span>]).
<span class="pl-en">crossFade</span>().<span class="pl-en">placeholder</span>(<span class="pl-smi">R</span>.<span class="pl-s1">mipmap</span>.<span class="pl-s1">pic_error</span>).<span class="pl-en">into</span>(<span class="pl-s1">holder</span>.<span class="pl-s1">image</span>);
}
<span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">public</span> <span class="pl-smi">int</span> <span class="pl-en">getItemCount</span>() {
<span class="pl-k">return</span> <span class="pl-s1">imageUrls</span>.<span class="pl-s1">length</span>;
}
<span class="pl-k">class</span> <span class="pl-smi">TestViewHolder</span> <span class="pl-k">extends</span> <span class="pl-smi">RecyclerView</span>.<span class="pl-smi">ViewHolder</span> {
<span class="pl-smi">RatioImageView</span> <span class="pl-s1">image</span>;
<span class="pl-k">public</span> <span class="pl-smi">TestViewHolder</span>(<span class="pl-smi">View</span> <span class="pl-s1">itemView</span>) {
<span class="pl-en">super</span>(<span class="pl-s1">itemView</span>);
<span class="pl-s1">image</span> = (<span class="pl-smi">RatioImageView</span>) <span class="pl-s1">itemView</span>.<span class="pl-en">findViewById</span>(<span class="pl-smi">R</span>.<span class="pl-s1">id</span>.<span class="pl-s1">image</span>);
}
}
}
<span class="pl-c">// This is my RatioImageView .Actually it is from (https://github.com/HMY314/NineGridLayout/blob/master/app/src/main/java/com/hmy/ninegridlayout/view/RatioImageView.java)</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">RatioImageView</span> <span class="pl-k">extends</span> <span class="pl-smi">ImageView</span> {
<span class="pl-k">private</span> <span class="pl-smi">float</span> <span class="pl-s1">mRatio</span> = <span class="pl-c1">0f</span>;
<span class="pl-k">public</span> <span class="pl-smi">RatioImageView</span>(<span class="pl-smi">Context</span> <span class="pl-s1">context</span>, <span class="pl-smi">AttributeSet</span> <span class="pl-s1">attrs</span>, <span class="pl-smi">int</span> <span class="pl-s1">defStyleAttr</span>) {
<span class="pl-en">super</span>(<span class="pl-s1">context</span>, <span class="pl-s1">attrs</span>, <span class="pl-s1">defStyleAttr</span>);
}
<span class="pl-k">public</span> <span class="pl-smi">RatioImageView</span>(<span class="pl-smi">Context</span> <span class="pl-s1">context</span>, <span class="pl-smi">AttributeSet</span> <span class="pl-s1">attrs</span>) {
<span class="pl-en">super</span>(<span class="pl-s1">context</span>, <span class="pl-s1">attrs</span>);
<span class="pl-smi">TypedArray</span> <span class="pl-s1">typedArray</span> = <span class="pl-s1">context</span>.<span class="pl-en">obtainStyledAttributes</span>(<span class="pl-s1">attrs</span>, <span class="pl-smi">R</span>.<span class="pl-s1">styleable</span>.<span class="pl-s1">RatioImageView</span>);
<span class="pl-s1">mRatio</span> = <span class="pl-s1">typedArray</span>.<span class="pl-en">getFloat</span>(<span class="pl-smi">R</span>.<span class="pl-s1">styleable</span>.<span class="pl-s1">RatioImageView_ratio</span>, <span class="pl-c1">0f</span>);
<span class="pl-s1">typedArray</span>.<span class="pl-en">recycle</span>();
}
<span class="pl-k">public</span> <span class="pl-smi">RatioImageView</span>(<span class="pl-smi">Context</span> <span class="pl-s1">context</span>) {
<span class="pl-en">super</span>(<span class="pl-s1">context</span>);
}
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">setRatio</span>(<span class="pl-smi">float</span> <span class="pl-s1">ratio</span>) {
<span class="pl-s1">mRatio</span> = <span class="pl-s1">ratio</span>;
}
<span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">protected</span> <span class="pl-smi">void</span> <span class="pl-en">onMeasure</span>(<span class="pl-smi">int</span> <span class="pl-s1">widthMeasureSpec</span>, <span class="pl-smi">int</span> <span class="pl-s1">heightMeasureSpec</span>) {
<span class="pl-smi">int</span> <span class="pl-s1">width</span> = <span class="pl-smi">MeasureSpec</span>.<span class="pl-en">getSize</span>(<span class="pl-s1">widthMeasureSpec</span>);
<span class="pl-k">if</span> (<span class="pl-s1">mRatio</span> != <span class="pl-c1">0</span>) {
<span class="pl-smi">float</span> <span class="pl-s1">height</span> = <span class="pl-s1">width</span> / <span class="pl-s1">mRatio</span>;
<span class="pl-s1">heightMeasureSpec</span> = <span class="pl-smi">MeasureSpec</span>.<span class="pl-en">makeMeasureSpec</span>((<span class="pl-smi">int</span>) <span class="pl-s1">height</span>, <span class="pl-smi">MeasureSpec</span>.<span class="pl-c1">EXACTLY</span>);
}
<span class="pl-en">super</span>.<span class="pl-en">onMeasure</span>(<span class="pl-s1">widthMeasureSpec</span>, <span class="pl-s1">heightMeasureSpec</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">onTouchEvent</span>(<span class="pl-smi">MotionEvent</span> <span class="pl-s1">event</span>) {
<span class="pl-k">switch</span> (<span class="pl-s1">event</span>.<span class="pl-en">getAction</span>()) {
<span class="pl-k">case</span> <span class="pl-smi">MotionEvent</span>.<span class="pl-c1">ACTION_DOWN</span>:
<span class="pl-smi">Drawable</span> <span class="pl-s1">drawable</span> = <span class="pl-en">getDrawable</span>();
<span class="pl-k">if</span> (<span class="pl-s1">drawable</span> != <span class="pl-c1">null</span>) {
<span class="pl-s1">drawable</span>.<span class="pl-en">mutate</span>().<span class="pl-en">setColorFilter</span>(<span class="pl-smi">Color</span>.<span class="pl-c1">GRAY</span>,
<span class="pl-smi">PorterDuff</span>.<span class="pl-s1">Mode</span>.<span class="pl-c1">MULTIPLY</span>);
}
<span class="pl-k">break</span>;
<span class="pl-k">case</span> <span class="pl-smi">MotionEvent</span>.<span class="pl-c1">ACTION_CANCEL</span>:
<span class="pl-k">case</span> <span class="pl-smi">MotionEvent</span>.<span class="pl-c1">ACTION_UP</span>:
<span class="pl-smi">Drawable</span> <span class="pl-s1">drawableUp</span> = <span class="pl-en">getDrawable</span>();
<span class="pl-k">if</span> (<span class="pl-s1">drawableUp</span> != <span class="pl-c1">null</span>) {
<span class="pl-s1">drawableUp</span>.<span class="pl-en">mutate</span>().<span class="pl-en">clearColorFilter</span>();
}
<span class="pl-k">break</span>;
}
<span class="pl-k">return</span> <span class="pl-en">super</span>.<span class="pl-en">onTouchEvent</span>(<span class="pl-s1">event</span>);
}
}</pre></div>
<p dir="auto"><strong>Layout XML</strong>:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<!--This is what my Item for RecyclerView looks like-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:orientation="vertical"
android:padding="10dp"
android:layout_height="wrap_content">
<com.glidetest.view.RatioImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_gravity="center"
android:scaleType="fitXY"
android:layout_height="match_parent"
android:clickable="true"
android:src="@mipmap/pic_error"/>
</LinearLayout>"><pre class="notranslate"><span class="pl-c"><span class="pl-c"><!--</span>This is what my Item for RecyclerView looks like<span class="pl-c">--></span></span>
<<span class="pl-ent">LinearLayout</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">orientation</span>=<span class="pl-s"><span class="pl-pds">"</span>vertical<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">padding</span>=<span class="pl-s"><span class="pl-pds">"</span>10dp<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>wrap_content<span class="pl-pds">"</span></span>>
<<span class="pl-ent">com</span>.glidetest.view.RatioImageView
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/image<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_gravity</span>=<span class="pl-s"><span class="pl-pds">"</span>center<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>fitXY<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>match_parent<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">clickable</span>=<span class="pl-s"><span class="pl-pds">"</span>true<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">src</span>=<span class="pl-s"><span class="pl-pds">"</span>@mipmap/pic_error<span class="pl-pds">"</span></span>/>
</<span class="pl-ent">LinearLayout</span>></pre></div>
<p dir="auto"><strong>Stack trace / LogCat</strong>:</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="paste stack trace and/or log here"><pre class="notranslate"><span class="pl-en">paste</span> <span class="pl-en">stack</span> <span class="pl-en">trace</span> <span class="pl-k">and</span>/<span class="pl-en">or</span> <span class="pl-en">log</span> <span class="pl-en">here</span></pre></div>
<p dir="auto"><br><br>
The original ImageView<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7380327/19336896/e66b43aa-9141-11e6-890c-ccb9c817be3c.jpeg"><img src="https://cloud.githubusercontent.com/assets/7380327/19336896/e66b43aa-9141-11e6-890c-ccb9c817be3c.jpeg" alt="screenshot_2016-10-13-12-13-16" style="max-width: 100%;"></a><br>
<br><br>
When touch ImageView<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7380327/19336906/f7da214c-9141-11e6-8339-b967e5145437.jpeg"><img src="https://cloud.githubusercontent.com/assets/7380327/19336906/f7da214c-9141-11e6-8339-b967e5145437.jpeg" alt="screenshot_2016-10-13-12-13-10" style="max-width: 100%;"></a><br>
<br><br>
Scroll the RecyclerView and scroll back, then touch the ImageView again, it disappears!!<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7380327/19336922/1a17d3da-9142-11e6-9618-10e0137367c1.jpeg"><img src="https://cloud.githubusercontent.com/assets/7380327/19336922/1a17d3da-9142-11e6-9618-10e0137367c1.jpeg" alt="screenshot_2016-10-13-12-14-04" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="151970374" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/6000" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/vscode/pull/6000/hovercard" href="https://github.com/microsoft/vscode/pull/6000">#6000</a> introduces a new top level menu for extension commands. We should discuss if such a menu is desired or not.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7069719/14929697/5e4848f2-0e91-11e6-8641-f683860decda.png"><img src="https://cloud.githubusercontent.com/assets/7069719/14929697/5e4848f2-0e91-11e6-8641-f683860decda.png" alt="1" style="max-width: 100%;"></a></p>
<p dir="auto"><a class="team-mention js-team-mention notranslate" data-error-text="Failed to load team members" data-id="1682102" data-permission-text="Team members are private" data-url="/orgs/microsoft/teams/vscode/members" data-hovercard-type="team" data-hovercard-url="/orgs/microsoft/teams/vscode/hovercard" href="https://github.com/orgs/microsoft/teams/vscode">@microsoft/vscode</a> for input</p> | <p dir="auto">Hello,</p>
<p dir="auto">It would be nice to have a possibility to create custom menu items for extensions' commands, e.g. <code class="notranslate">Edit -> Format Document</code>. I think it should work similar to <code class="notranslate">keybindings</code> contribution point.</p>
<p dir="auto">Sincerely,<br>
Ilya</p> | 1 |
<p dir="auto">I checked everything but responsive navbar and icons and the files generated (CSS) had not the right stuff.</p> | <p dir="auto">I'm trying to get Bootsrap through Customize, but every time I get a blank boostrap.css and file error.txt with the error:</p>
<blockquote>
<p dir="auto">A less error occured trying to build your bundle.<br>
You've likely entered an invalid input into the less variable field. Check your syntax and try again!<br>
thanks!</p>
<p dir="auto">{"type": "Parse", "message": "Syntax Error on line 792", "index": 25106, "filename": "bootstrap.css", "line": 792, "column": 11, "extract ": [" * margin:-5px 0 5px; "," ove rflow: hidden; "," background-color: @ top; "]}</p><p dir="auto"></p>
</blockquote>
<p dir="auto">My Settings: all items marked, except Icons.</p>
<p dir="auto">What is the problem?</p> | 1 |
<p dir="auto">After upgrading and running my migration script, I get the following exception, which I do not get when upgrading to 2.0.1:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2014-04-15 07:28:25.555+0000 ERROR [org.neo4j]: Exception when stopping org.neo4j.index.impl.lucene.LuceneDataSource@5779e710 org.neo4j.kernel.impl.transaction.xaframework.IllegalLogFormatException: Invalid log format version found, expected 3 but was 2. To be able to upgrade from an older log format version there must have been a clean shutdown of the database
java.lang.RuntimeException: org.neo4j.kernel.impl.transaction.xaframework.IllegalLogFormatException: Invalid log format version found, expected 3 but was 2. To be able to upgrade from an older log format version there must have been a clean shutdown of the database
at org.neo4j.kernel.impl.transaction.xaframework.LogPruneStrategies$TransactionTimeSpanPruneStrategy$1.reached(LogPruneStrategies.java:250)
at org.neo4j.kernel.impl.transaction.xaframework.LogPruneStrategies$AbstractPruneStrategy.prune(LogPruneStrategies.java:78)
at org.neo4j.kernel.impl.transaction.xaframework.LogPruneStrategies$TransactionTimeSpanPruneStrategy.prune(LogPruneStrategies.java:222)
at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.close(XaLogicalLog.java:739)
at org.neo4j.kernel.impl.transaction.xaframework.LogBackedXaDataSource.stop(LogBackedXaDataSource.java:69)
at org.neo4j.index.impl.lucene.LuceneDataSource.stop(LuceneDataSource.java:310)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.shutdown(LifeSupport.java:547)
at org.neo4j.kernel.lifecycle.LifeSupport.remove(LifeSupport.java:339)
at org.neo4j.kernel.impl.transaction.XaDataSourceManager.unregisterDataSource(XaDataSourceManager.java:272)
at org.neo4j.index.lucene.LuceneKernelExtension.stop(LuceneKernelExtension.java:92)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527)
at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155)
at org.neo4j.kernel.extension.KernelExtensions.stop(KernelExtensions.java:124)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527)
at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155)
at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:185)
at org.neo4j.kernel.InternalAbstractGraphDatabase.shutdown(InternalAbstractGraphDatabase.java:801)
at org.springframework.data.neo4j.support.DelegatingGraphDatabase.shutdown(DelegatingGraphDatabase.java:270)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:327)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:510)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:486)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:742)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:455)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1090)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:487)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:787)
....
Caused by: org.neo4j.kernel.impl.transaction.xaframework.IllegalLogFormatException: Invalid log format version found, expected 3 but was 2. To be able to upgrade from an older log format version there must have been a clean shutdown of the database
at org.neo4j.kernel.impl.transaction.xaframework.LogIoUtils.readLogHeader(LogIoUtils.java:70)
at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.getFirstStartRecordTimestamp(XaLogicalLog.java:1701)
at org.neo4j.kernel.impl.transaction.xaframework.LogPruneStrategies$TransactionTimeSpanPruneStrategy$1.reached(LogPruneStrategies.java:246)
... 53 more"><pre class="notranslate"><code class="notranslate">2014-04-15 07:28:25.555+0000 ERROR [org.neo4j]: Exception when stopping org.neo4j.index.impl.lucene.LuceneDataSource@5779e710 org.neo4j.kernel.impl.transaction.xaframework.IllegalLogFormatException: Invalid log format version found, expected 3 but was 2. To be able to upgrade from an older log format version there must have been a clean shutdown of the database
java.lang.RuntimeException: org.neo4j.kernel.impl.transaction.xaframework.IllegalLogFormatException: Invalid log format version found, expected 3 but was 2. To be able to upgrade from an older log format version there must have been a clean shutdown of the database
at org.neo4j.kernel.impl.transaction.xaframework.LogPruneStrategies$TransactionTimeSpanPruneStrategy$1.reached(LogPruneStrategies.java:250)
at org.neo4j.kernel.impl.transaction.xaframework.LogPruneStrategies$AbstractPruneStrategy.prune(LogPruneStrategies.java:78)
at org.neo4j.kernel.impl.transaction.xaframework.LogPruneStrategies$TransactionTimeSpanPruneStrategy.prune(LogPruneStrategies.java:222)
at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.close(XaLogicalLog.java:739)
at org.neo4j.kernel.impl.transaction.xaframework.LogBackedXaDataSource.stop(LogBackedXaDataSource.java:69)
at org.neo4j.index.impl.lucene.LuceneDataSource.stop(LuceneDataSource.java:310)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.shutdown(LifeSupport.java:547)
at org.neo4j.kernel.lifecycle.LifeSupport.remove(LifeSupport.java:339)
at org.neo4j.kernel.impl.transaction.XaDataSourceManager.unregisterDataSource(XaDataSourceManager.java:272)
at org.neo4j.index.lucene.LuceneKernelExtension.stop(LuceneKernelExtension.java:92)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527)
at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155)
at org.neo4j.kernel.extension.KernelExtensions.stop(KernelExtensions.java:124)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527)
at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155)
at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:185)
at org.neo4j.kernel.InternalAbstractGraphDatabase.shutdown(InternalAbstractGraphDatabase.java:801)
at org.springframework.data.neo4j.support.DelegatingGraphDatabase.shutdown(DelegatingGraphDatabase.java:270)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:327)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:510)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:486)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:742)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:455)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1090)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:487)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:787)
....
Caused by: org.neo4j.kernel.impl.transaction.xaframework.IllegalLogFormatException: Invalid log format version found, expected 3 but was 2. To be able to upgrade from an older log format version there must have been a clean shutdown of the database
at org.neo4j.kernel.impl.transaction.xaframework.LogIoUtils.readLogHeader(LogIoUtils.java:70)
at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.getFirstStartRecordTimestamp(XaLogicalLog.java:1701)
at org.neo4j.kernel.impl.transaction.xaframework.LogPruneStrategies$TransactionTimeSpanPruneStrategy$1.reached(LogPruneStrategies.java:246)
... 53 more
</code></pre></div> | <p dir="auto">neo4j-import does not correctly recognize Excel-type CSV wrt. double quotes and backslash</p>
<ul dir="auto">
<li>Neo4j version: 3.1</li>
<li>Operating system: Arch Linux</li>
<li>API/Driver: None</li>
<li><strong>Steps to reproduce</strong></li>
</ul>
<p dir="auto">The following CSV parsed correctly under MongoDB and MySQL, but it is failing in Neo4j:</p>
<p dir="auto"><a href="http://neuromancer.inf.um.es:8080/es.stackoverflow/Posts.csv.gz" rel="nofollow">http://neuromancer.inf.um.es:8080/es.stackoverflow/Posts.csv.gz</a></p>
<ul dir="auto">
<li>Expected behavior</li>
</ul>
<p dir="auto">CSV read correctly with default parameters, as neo4-import is supposed to convert "" to " within a field.</p>
<ul dir="auto">
<li>Actual behavior</li>
</ul>
<p dir="auto">neo4j-import fails reporing early termination of a field. The example error is the following:</p>
<p dir="auto">For an imput line with the following characters:</p>
<p dir="auto">abcdef\""ghi</p>
<p dir="auto">The parser interprets the first " as <em>one</em> double quotes, and then the next double quote is used to end the field early. I think quoting of backslash should be avoided if backslask is not specified explicitly as the quote character. The above text should produce the following complete field (using the conventions of Excel-CSV):</p>
<p dir="auto">abcdef\"ghi</p>
<p dir="auto">(that is, one backslash and one quote).</p> | 0 |
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="464954871" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/4753" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/4753/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/4753">#4753</a> causes this regression which impacts test/orm/inheritance/test_poly_perstence.py, which now creates a bad query that still passes but will stop working as of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="502223351" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/4887" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/4887/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/4887">#4887</a></p>
<p dir="auto">also that test suite needs to be rewritten</p>
<p dir="auto">basic test</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import Column
from sqlalchemy import create_engine
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import String
from sqlalchemy import Table
from sqlalchemy.orm import mapper
from sqlalchemy.orm import relationship
from sqlalchemy.orm import Session
class Person(object):
pass
class Engineer(Person):
pass
class Manager(Person):
pass
class Boss(Manager):
pass
class Company(object):
pass
metadata = MetaData()
companies = Table(
"companies",
metadata,
Column("company_id", Integer, primary_key=True),
Column("name", String(50)),
)
people = Table(
"people",
metadata,
Column("person_id", Integer, primary_key=True),
Column(
"company_id",
Integer,
ForeignKey("companies.company_id"),
nullable=False,
),
Column("name", String(50)),
Column("type", String(30)),
)
engineers = Table(
"engineers",
metadata,
Column(
"person_id", Integer, ForeignKey("people.person_id"), primary_key=True
),
Column("status", String(30)),
Column("engineer_name", String(50)),
Column("primary_language", String(50)),
)
managers = Table(
"managers",
metadata,
Column(
"person_id", Integer, ForeignKey("people.person_id"), primary_key=True
),
Column("status", String(30)),
Column("manager_name", String(50)),
)
boss = Table(
"boss",
metadata,
Column(
"boss_id", Integer, ForeignKey("managers.person_id"), primary_key=True
),
Column("golf_swing", String(30)),
)
person_with_polymorphic = "*"
manager_with_polymorphic = "*"
person_mapper = mapper(
Person,
people,
with_polymorphic=person_with_polymorphic,
polymorphic_on=people.c.type,
polymorphic_identity="person",
)
mapper(
Engineer,
engineers,
inherits=person_mapper,
polymorphic_identity="engineer",
)
mapper(
Manager,
managers,
inherits=person_mapper,
with_polymorphic=manager_with_polymorphic,
polymorphic_identity="manager",
)
mapper(Boss, boss, inherits=Manager, polymorphic_identity="boss")
mapper(
Company,
companies,
properties={
"employees": relationship(
Person,
lazy="joined",
cascade="all, delete-orphan",
backref="company",
order_by=people.c.person_id,
)
},
)
e = create_engine("sqlite://", echo="debug")
metadata.create_all(e)
session = Session(e)
c = session.query(Company).first()
"><pre class="notranslate"><code class="notranslate">from sqlalchemy import Column
from sqlalchemy import create_engine
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import String
from sqlalchemy import Table
from sqlalchemy.orm import mapper
from sqlalchemy.orm import relationship
from sqlalchemy.orm import Session
class Person(object):
pass
class Engineer(Person):
pass
class Manager(Person):
pass
class Boss(Manager):
pass
class Company(object):
pass
metadata = MetaData()
companies = Table(
"companies",
metadata,
Column("company_id", Integer, primary_key=True),
Column("name", String(50)),
)
people = Table(
"people",
metadata,
Column("person_id", Integer, primary_key=True),
Column(
"company_id",
Integer,
ForeignKey("companies.company_id"),
nullable=False,
),
Column("name", String(50)),
Column("type", String(30)),
)
engineers = Table(
"engineers",
metadata,
Column(
"person_id", Integer, ForeignKey("people.person_id"), primary_key=True
),
Column("status", String(30)),
Column("engineer_name", String(50)),
Column("primary_language", String(50)),
)
managers = Table(
"managers",
metadata,
Column(
"person_id", Integer, ForeignKey("people.person_id"), primary_key=True
),
Column("status", String(30)),
Column("manager_name", String(50)),
)
boss = Table(
"boss",
metadata,
Column(
"boss_id", Integer, ForeignKey("managers.person_id"), primary_key=True
),
Column("golf_swing", String(30)),
)
person_with_polymorphic = "*"
manager_with_polymorphic = "*"
person_mapper = mapper(
Person,
people,
with_polymorphic=person_with_polymorphic,
polymorphic_on=people.c.type,
polymorphic_identity="person",
)
mapper(
Engineer,
engineers,
inherits=person_mapper,
polymorphic_identity="engineer",
)
mapper(
Manager,
managers,
inherits=person_mapper,
with_polymorphic=manager_with_polymorphic,
polymorphic_identity="manager",
)
mapper(Boss, boss, inherits=Manager, polymorphic_identity="boss")
mapper(
Company,
companies,
properties={
"employees": relationship(
Person,
lazy="joined",
cascade="all, delete-orphan",
backref="company",
order_by=people.c.person_id,
)
},
)
e = create_engine("sqlite://", echo="debug")
metadata.create_all(e)
session = Session(e)
c = session.query(Company).first()
</code></pre></div>
<p dir="auto">the eager query contains unconverted anonymous names which are duplicating:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
SELECT anon_1.companies_company_id AS anon_1_companies_company_id, anon_1.companies_name AS anon_1_companies_name, people_1.person_id AS people_1_person_id, people_1.company_id AS people_1_company_id, people_1.name AS people_1_name, people_1.type AS people_1_type, engineers_1.person_id AS engineers_1_person_id, people_1.person_id AS "%(139980920883408 people)s_person_id_1", engineers_1.status AS engineers_1_status, engineers_1.engineer_name AS engineers_1_engineer_name, engineers_1.primary_language AS engineers_1_primary_language, managers_1.person_id AS managers_1_person_id, people_1.person_id AS "%(139980920883408 people)s_person_id_1", managers_1.status AS managers_1_status, managers_1.manager_name AS managers_1_manager_name, boss_1.boss_id AS boss_1_boss_id, boss_1.golf_swing AS boss_1_golf_swing
FROM (SELECT companies.company_id AS companies_company_id, companies.name AS companies_name
FROM companies
LIMIT ? OFFSET ?) AS anon_1 LEFT OUTER JOIN (people AS people_1 LEFT OUTER JOIN engineers AS engineers_1 ON people_1.person_id = engineers_1.person_id LEFT OUTER JOIN managers AS managers_1 ON people_1.person_id = managers_1.person_id LEFT OUTER JOIN boss AS boss_1 ON managers_1.person_id = boss_1.boss_id) ON anon_1.companies_company_id = people_1.company_id ORDER BY people_1.person_id
"><pre class="notranslate"><code class="notranslate">
SELECT anon_1.companies_company_id AS anon_1_companies_company_id, anon_1.companies_name AS anon_1_companies_name, people_1.person_id AS people_1_person_id, people_1.company_id AS people_1_company_id, people_1.name AS people_1_name, people_1.type AS people_1_type, engineers_1.person_id AS engineers_1_person_id, people_1.person_id AS "%(139980920883408 people)s_person_id_1", engineers_1.status AS engineers_1_status, engineers_1.engineer_name AS engineers_1_engineer_name, engineers_1.primary_language AS engineers_1_primary_language, managers_1.person_id AS managers_1_person_id, people_1.person_id AS "%(139980920883408 people)s_person_id_1", managers_1.status AS managers_1_status, managers_1.manager_name AS managers_1_manager_name, boss_1.boss_id AS boss_1_boss_id, boss_1.golf_swing AS boss_1_golf_swing
FROM (SELECT companies.company_id AS companies_company_id, companies.name AS companies_name
FROM companies
LIMIT ? OFFSET ?) AS anon_1 LEFT OUTER JOIN (people AS people_1 LEFT OUTER JOIN engineers AS engineers_1 ON people_1.person_id = engineers_1.person_id LEFT OUTER JOIN managers AS managers_1 ON people_1.person_id = managers_1.person_id LEFT OUTER JOIN boss AS boss_1 ON managers_1.person_id = boss_1.boss_id) ON anon_1.companies_company_id = people_1.company_id ORDER BY people_1.person_id
</code></pre></div>
<p dir="auto">clean query:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
SELECT anon_1.companies_company_id AS anon_1_companies_company_id, anon_1.companies_name AS anon_1_companies_name, people_1.person_id AS people_1_person_id, people_1.company_id AS people_1_company_id, people_1.name AS people_1_name, people_1.type AS people_1_type, engineers_1.person_id AS engineers_1_person_id, engineers_1.status AS engineers_1_status, engineers_1.engineer_name AS engineers_1_engineer_name, engineers_1.primary_language AS engineers_1_primary_language, managers_1.person_id AS managers_1_person_id, managers_1.status AS managers_1_status, managers_1.manager_name AS managers_1_manager_name, boss_1.boss_id AS boss_1_boss_id, boss_1.golf_swing AS boss_1_golf_swing
FROM (SELECT companies.company_id AS companies_company_id, companies.name AS companies_name
FROM companies
LIMIT ? OFFSET ?) AS anon_1 LEFT OUTER JOIN (people AS people_1 LEFT OUTER JOIN engineers AS engineers_1 ON people_1.person_id = engineers_1.person_id LEFT OUTER JOIN managers AS managers_1 ON people_1.person_id = managers_1.person_id LEFT OUTER JOIN boss AS boss_1 ON managers_1.person_id = boss_1.boss_id) ON anon_1.companies_company_id = people_1.company_id ORDER BY people_1.person_id
"><pre class="notranslate"><code class="notranslate">
SELECT anon_1.companies_company_id AS anon_1_companies_company_id, anon_1.companies_name AS anon_1_companies_name, people_1.person_id AS people_1_person_id, people_1.company_id AS people_1_company_id, people_1.name AS people_1_name, people_1.type AS people_1_type, engineers_1.person_id AS engineers_1_person_id, engineers_1.status AS engineers_1_status, engineers_1.engineer_name AS engineers_1_engineer_name, engineers_1.primary_language AS engineers_1_primary_language, managers_1.person_id AS managers_1_person_id, managers_1.status AS managers_1_status, managers_1.manager_name AS managers_1_manager_name, boss_1.boss_id AS boss_1_boss_id, boss_1.golf_swing AS boss_1_golf_swing
FROM (SELECT companies.company_id AS companies_company_id, companies.name AS companies_name
FROM companies
LIMIT ? OFFSET ?) AS anon_1 LEFT OUTER JOIN (people AS people_1 LEFT OUTER JOIN engineers AS engineers_1 ON people_1.person_id = engineers_1.person_id LEFT OUTER JOIN managers AS managers_1 ON people_1.person_id = managers_1.person_id LEFT OUTER JOIN boss AS boss_1 ON managers_1.person_id = boss_1.boss_id) ON anon_1.companies_company_id = people_1.company_id ORDER BY people_1.person_id
</code></pre></div> | <p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto"><a href="https://mariadb.com/kb/en/library/mariadb-1029-changelog/" rel="nofollow">https://mariadb.com/kb/en/library/mariadb-1029-changelog/</a></p>
<p dir="auto">This fixes the CHECK constraint issue <a href="https://jira.mariadb.org/browse/MDEV-13596" rel="nofollow">https://jira.mariadb.org/browse/MDEV-13596</a> that ruins booleans for us, and additionally the DROP issue <a href="https://jira.mariadb.org/browse/MDEV-11114" rel="nofollow">https://jira.mariadb.org/browse/MDEV-11114</a> was fixed as of 10.2.8: <a href="https://mariadb.com/kb/en/library/mariadb-1028-changelog/" rel="nofollow">https://mariadb.com/kb/en/library/mariadb-1028-changelog/</a></p>
<p dir="auto">propose a brief warning if mariadb 10.2[<9] is detected then go forward normally with CI support. Will need to test if <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384640259" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/4096" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/4096/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/4096">#4096</a> is still needed.</p> | 0 |
<p dir="auto"><strong>Migrated issue, originally created by mrudula chougule</strong></p>
<p dir="auto">Hi,</p>
<p dir="auto">I am having python+gtk application. I'm currently porting my python application from Ubuntu 10.04 to 14.04. I have sqlalchemy version of 0.8.4-1Ubuntu2.1 on Ubuntu 14.04. When trying to run my application, when it is trying to insert column into database it is throwing this error: **sqlalchemy.exc.compileError: Unconsumed column Name<br>
**<br>
Please share your views or ideas to resolve this error. I'm stuck!!</p>
<p dir="auto">Thanks,<br>
Mrudula</p> | <p dir="auto"><strong>Migrated issue, originally created by mrudula chougule</strong></p>
<p dir="auto">Hi,</p>
<p dir="auto">I am having python+gtk application. I'm currently porting my python application from Ubuntu 10.04 to 14.04. I have sqlalchemy version of 0.8.4-1Ubuntu2.1 on Ubuntu 14.04.<br>
When trying to run my application, when it is trying to insert column into database it is throwing this error:<br>
<strong>sqlalchemy.exc.compileError: Unconsumed column Name</strong></p>
<p dir="auto">Please share your views or ideas to resolve this error.<br>
I'm stuck!!</p>
<p dir="auto">Thanks,<br>
Mrudula</p> | 1 |
<p dir="auto">Please, implement the headless option which is available from chrome version 57.</p>
<p dir="auto">Reason:<br>
Easier usage for testing and scraping (without the xfb hack)</p> | <ul dir="auto">
<li>Electron version: 1.6.x</li>
<li>Operating system: macOS</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Several things:</p>
<ul dir="auto">
<li>The promise which is returned by executeJavascript should be rejected</li>
<li>The error and stack trace should be more meaningful (how? = what's possible?)</li>
<li>Furthermore if you listen of global errors with the debugger trough the <code class="notranslate">Runtime.exceptionThrown</code> event - there is currently no way to locate where exactly the error happened. By the way the below error output is captured by this event. There must be a way to identify the script somehow or even better return the source to create a code frame. (compile a named code or so? don't know exactly how it works...)</li>
</ul>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">When call webContents.executeJavascript and the passed javascript has a syntax error.<br>
There are several problems which make it difficult to debug:</p>
<ul dir="auto">
<li>The stack trace is useless (see screenshot)</li>
<li>The returned promise from <code class="notranslate">executeJavascript</code> hangs in the <code class="notranslate">pending</code> state</li>
<li>No identification to which injected JS it belongs to (can be skipped if the previous point is solved smart)</li>
</ul>
<h3 dir="auto">How to reproduce</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="webContents.executeJavascript('just some syntax error')"><pre class="notranslate"><span class="pl-s1">webContents</span><span class="pl-kos">.</span><span class="pl-en">executeJavascript</span><span class="pl-kos">(</span><span class="pl-s">'just some syntax error'</span><span class="pl-kos">)</span></pre></div>
<h2 dir="auto">Appendix</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1138623/24971037/c5449510-1fb6-11e7-8b89-086ae5d40db1.png"><img width="997" alt="bildschirmfoto 2017-04-12 um 19 26 47" src="https://cloud.githubusercontent.com/assets/1138623/24971037/c5449510-1fb6-11e7-8b89-086ae5d40db1.png" style="max-width: 100%;"></a></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ columnNumber: 4,
exception:
{ className: 'SyntaxError',
description: 'SyntaxError: Unexpected identifier\n at EventEmitter.electron.ipcRenderer.on (/Users/xxx/yyy/js_package_nightmare-service/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/renderer/init.js:52:28)\n at emitMany (events.js:127:13)\n at EventEmitter.emit (events.js:201:7)',
objectId: '{"injectedScriptId":1,"id":1}',
preview:
{ description: 'SyntaxError: Unexpected identifier\n at EventEmitter.electron.ipcRenderer.on (/Users/xxx/yyy/js_package_nightmare-service/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/renderer/init.js:52:28)\n at emitMany (events.js:127:13)\n at EventEmitter.emit (events.js:201:7)',
overflow: false,
properties:
[ { name: 'stack',
type: 'string',
value: 'SyntaxError: Unexpected identifier\n at EventEmi…27:13)\n at EventEmitter.emit (events.js:201:7)' },
{ name: 'message',
type: 'string',
value: 'Unexpected identifier' },
[length]: 2 ],
subtype: 'error',
type: 'object' },
subtype: 'error',
type: 'object' },
exceptionId: 1,
executionContextId: 1,
lineNumber: 0,
scriptId: '112',
stackTrace:
{ callFrames:
[ { columnNumber: 27,
functionName: 'electron.ipcRenderer.on',
lineNumber: 51,
scriptId: '65',
url: '/Users/xxx/yyy/js_package_nightmare-service/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/renderer/init.js' },
{ columnNumber: 12,
functionName: 'emitMany',
lineNumber: 126,
scriptId: '30',
url: 'events.js' },
{ columnNumber: 6,
functionName: 'emit',
lineNumber: 200,
scriptId: '30',
url: 'events.js' },
[length]: 3 ] },
text: 'Uncaught' }"><pre class="notranslate"><span class="pl-kos">{</span> <span class="pl-c1">columnNumber</span>: <span class="pl-c1">4</span><span class="pl-kos">,</span>
<span class="pl-c1">exception</span>:
<span class="pl-kos">{</span> <span class="pl-c1">className</span>: <span class="pl-s">'SyntaxError'</span><span class="pl-kos">,</span>
<span class="pl-c1">description</span>: <span class="pl-s">'SyntaxError: Unexpected identifier\n at EventEmitter.electron.ipcRenderer.on (/Users/xxx/yyy/js_package_nightmare-service/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/renderer/init.js:52:28)\n at emitMany (events.js:127:13)\n at EventEmitter.emit (events.js:201:7)'</span><span class="pl-kos">,</span>
<span class="pl-c1">objectId</span>: <span class="pl-s">'{"injectedScriptId":1,"id":1}'</span><span class="pl-kos">,</span>
<span class="pl-c1">preview</span>:
<span class="pl-kos">{</span> <span class="pl-c1">description</span>: <span class="pl-s">'SyntaxError: Unexpected identifier\n at EventEmitter.electron.ipcRenderer.on (/Users/xxx/yyy/js_package_nightmare-service/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/renderer/init.js:52:28)\n at emitMany (events.js:127:13)\n at EventEmitter.emit (events.js:201:7)'</span><span class="pl-kos">,</span>
<span class="pl-c1">overflow</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-c1">properties</span>:
<span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'stack'</span><span class="pl-kos">,</span>
<span class="pl-c1">type</span>: <span class="pl-s">'string'</span><span class="pl-kos">,</span>
<span class="pl-c1">value</span>: <span class="pl-s">'SyntaxError: Unexpected identifier\n at EventEmi…27:13)\n at EventEmitter.emit (events.js:201:7)'</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'message'</span><span class="pl-kos">,</span>
<span class="pl-c1">type</span>: <span class="pl-s">'string'</span><span class="pl-kos">,</span>
<span class="pl-c1">value</span>: <span class="pl-s">'Unexpected identifier'</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">[</span><span class="pl-s1">length</span><span class="pl-kos">]</span>: <span class="pl-c1">2</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">subtype</span>: <span class="pl-s">'error'</span><span class="pl-kos">,</span>
<span class="pl-c1">type</span>: <span class="pl-s">'object'</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">subtype</span>: <span class="pl-s">'error'</span><span class="pl-kos">,</span>
<span class="pl-c1">type</span>: <span class="pl-s">'object'</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">exceptionId</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
<span class="pl-c1">executionContextId</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
<span class="pl-c1">lineNumber</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span>
<span class="pl-c1">scriptId</span>: <span class="pl-s">'112'</span><span class="pl-kos">,</span>
<span class="pl-c1">stackTrace</span>:
<span class="pl-kos">{</span> <span class="pl-c1">callFrames</span>:
<span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">columnNumber</span>: <span class="pl-c1">27</span><span class="pl-kos">,</span>
<span class="pl-c1">functionName</span>: <span class="pl-s">'electron.ipcRenderer.on'</span><span class="pl-kos">,</span>
<span class="pl-c1">lineNumber</span>: <span class="pl-c1">51</span><span class="pl-kos">,</span>
<span class="pl-c1">scriptId</span>: <span class="pl-s">'65'</span><span class="pl-kos">,</span>
<span class="pl-c1">url</span>: <span class="pl-s">'/Users/xxx/yyy/js_package_nightmare-service/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/renderer/init.js'</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span> <span class="pl-c1">columnNumber</span>: <span class="pl-c1">12</span><span class="pl-kos">,</span>
<span class="pl-c1">functionName</span>: <span class="pl-s">'emitMany'</span><span class="pl-kos">,</span>
<span class="pl-c1">lineNumber</span>: <span class="pl-c1">126</span><span class="pl-kos">,</span>
<span class="pl-c1">scriptId</span>: <span class="pl-s">'30'</span><span class="pl-kos">,</span>
<span class="pl-c1">url</span>: <span class="pl-s">'events.js'</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span> <span class="pl-c1">columnNumber</span>: <span class="pl-c1">6</span><span class="pl-kos">,</span>
<span class="pl-c1">functionName</span>: <span class="pl-s">'emit'</span><span class="pl-kos">,</span>
<span class="pl-c1">lineNumber</span>: <span class="pl-c1">200</span><span class="pl-kos">,</span>
<span class="pl-c1">scriptId</span>: <span class="pl-s">'30'</span><span class="pl-kos">,</span>
<span class="pl-c1">url</span>: <span class="pl-s">'events.js'</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">[</span><span class="pl-s1">length</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-kos">,</span>
<span class="pl-c1">text</span>: <span class="pl-s">'Uncaught'</span> <span class="pl-kos">}</span></pre></div> | 0 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.7</li>
<li>Operating System version: Windows 64x</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto"><strong>dubboBootstrapApplicationListener</strong> is is registered repeatedly in <strong>ServiceClassPostProcessor</strong>, dubboBootstrapApplicationListener have bean registered through <strong>DubboBeanUtils.registerCommonBeans</strong> by <strong>DubboNamespaceHandler</strong> 、<strong>@EnableDubboConfig</strong> and <strong>@DubboComponentScan</strong></p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/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: 所有dubbo版本都存在</li>
<li>Operating System version: mac</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>
<p dir="auto">使用dubbo-ops禁用provider,客户端仍然能调用禁用的服务</p>
<p dir="auto">启用一个provider、consumer、dubbo-admin,禁用provider和开启provider测试。</p>
<p dir="auto">已有用户提ops issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="352818026" data-permission-text="Title is private" data-url="https://github.com/apache/dubbo-admin/issues/90" data-hovercard-type="issue" data-hovercard-url="/apache/dubbo-admin/issues/90/hovercard" href="https://github.com/apache/dubbo-admin/issues/90">apache/dubbo-admin#90</a><br>
我已经check是dubbo实现的Bug, 会尽快修复。</p>
</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<ol dir="auto">
<li>如果只有一个provider,禁用后立即生效,应该找不到服务</li>
<li>如果有多个provider,会自动找其他服务调用,除非重新启用服务,否则会忽略禁用服务</li>
</ol>
<h3 dir="auto">Actual Result</h3>
<ol dir="auto">
<li>禁用的服务持续调用</li>
</ol> | 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 NT 10.0.18362.0
Windows Terminal version (if applicable): 0.6.2951.0
Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows NT 10.0.18362.0
Windows Terminal version (if applicable): 0.6.2951.0
Any other software?
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">1 Set the following global settings in profile.json</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" "alwaysShowTabs": false,
"showTabsInTitlebar": false,"><pre class="notranslate"> <span class="pl-ent">"alwaysShowTabs"</span>: <span class="pl-c1">false</span>,
<span class="pl-ent">"showTabsInTitlebar"</span>: <span class="pl-c1">false</span>,</pre></div>
<p dir="auto">2 Start Terminal</p>
<ul dir="auto">
<li>No tab bar visible</li>
</ul>
<p dir="auto">3 <em>Control-Shift-t</em> to create a new tab</p>
<ul dir="auto">
<li>Here it's PowerShell Core, but reproduces with git-bash for example</li>
<li>Tab bar becomes visible here.</li>
<li>Switching between tabs here does not affect the outcome.</li>
</ul>
<p dir="auto">4 Type <code class="notranslate">exit</code> to terminate the currently-visible shell</p>
<ul dir="auto">
<li>Middle-clicking the active tab also works. Middle-clicking the <em>other</em> tab does not reproduce.</li>
<li>If extra shells were opened, this doesn't reproduce, it seems to only happen when the tab bar is hidden as part of closing the current tab.</li>
<li>Setting close-on-exit means this doesn't reproduce until the tab is closed, so not related to the shell process terminating.</li>
</ul>
<h1 dir="auto">Expected behavior</h1>
<ul dir="auto">
<li>Current tab closes</li>
<li>Tab bar disappears</li>
<li>Other tab is usable.</li>
</ul>
<h1 dir="auto">Actual behavior</h1>
<ul dir="auto">
<li>Current tab closes</li>
<li>Tab bar disappears</li>
<li>(!!) Other tab content is visible, but cursor is not flashing and input is not handled</li>
<li>(!!) A few seconds later, the application crashes, logged in Event Viewer:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Faulting application name: WindowsTerminal.exe, version: 1.0.1910.22001, time stamp: 0x5daf7ab2
Faulting module name: TerminalControl.dll, version: 1.0.1910.22001, time stamp: 0x5daf7988
Exception code: 0xc0000005
Fault offset: 0x0000000000008268
Faulting process ID: 0x2bec
Faulting application start time: 0x01d5a030043b34f4
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\TerminalControl.dll
Report ID: eb98c87f-b71c-4108-97b3-626d6a0af7f1
Faulting package full name: Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App"><pre class="notranslate"><code class="notranslate">Faulting application name: WindowsTerminal.exe, version: 1.0.1910.22001, time stamp: 0x5daf7ab2
Faulting module name: TerminalControl.dll, version: 1.0.1910.22001, time stamp: 0x5daf7988
Exception code: 0xc0000005
Fault offset: 0x0000000000008268
Faulting process ID: 0x2bec
Faulting application start time: 0x01d5a030043b34f4
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\TerminalControl.dll
Report ID: eb98c87f-b71c-4108-97b3-626d6a0af7f1
Faulting package full name: Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App
</code></pre></div>
<p dir="auto">I have raised a Feedback Hub issue, but it has not yet appeared in "My feedback". I'll update this ticket once it's showing up (it said it would take a few minutes, but now it shows nothing...)</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.388]
Windows Terminal version (if applicable): 0.5.2762.0
15" 2015 MacBook Pro -- integrated graphics
Any other software?
Ubuntu 1804.2019.521"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.388]
Windows Terminal version (if applicable): 0.5.2762.0
15" 2015 MacBook Pro -- integrated graphics
Any other software?
Ubuntu 1804.2019.521
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Open Windows terminal</li>
<li>Drag window</li>
</ol>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3252307/66232503-d340bd00-e69d-11e9-9330-df52ab251134.png"><img src="https://user-images.githubusercontent.com/3252307/66232503-d340bd00-e69d-11e9-9330-df52ab251134.png" alt="image" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto"><a href="https://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-templates.html" rel="nofollow">Here</a> we have;</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PUT /_template/template_1
{
"template": "te*",
"settings": {
"number_of_shards": 1
}"><pre class="notranslate"><code class="notranslate">PUT /_template/template_1
{
"template": "te*",
"settings": {
"number_of_shards": 1
}
</code></pre></div>
<p dir="auto">As you can see we reference the term <strong>template</strong> 3 times in 3 lines, which is pretty loaded - even if the second (<code class="notranslate">template_1</code>) is an example name of a template.</p>
<p dir="auto">I was speaking to a new user the other day and they mentioned that the second reference to <strong>template</strong> isn't immediately obvious that it applies to the index name/pattern that this template should match.</p>
<p dir="auto">I thought I'd raise this issue to see if perhaps we can rename it to <code class="notranslate">match_pattern</code>, or <code class="notranslate">index_pattern</code> or something else that is a little more descriptive.</p> | <p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:<br>
The short explaination:<br>
The field template In templates is vague because it is pattern matching the indices which will be working on, I think that the name should be somthing like Index pattern or so.</p>
<p dir="auto">The Long one:<br>
First to mention, I have started to use elasticsearch today,<br>
I have used a twitter template which I couldn't understand why is not working.<br>
I have searched the template file maybe It contains the index name and thats the reason It didn't work , I have noticed that when I changed the index name to the template name everything was just fine so I understood that I need to write about Index templates and I have understood that there is an index pattern matching with the template name.</p> | 1 |
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.9.0-dev.20160502</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const xs = [1,2,3];
const ys = [4,5];
xs.push(...ys);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">xs</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">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-k">const</span> <span class="pl-s1">ys</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">4</span><span class="pl-kos">,</span><span class="pl-c1">5</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-s1">xs</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span>...<span class="pl-s1">ys</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Compiled with <code class="notranslate">tsc --target es6 --strictNullChecks test.ts</code></p>
<p dir="auto"><strong>Expected behavior:</strong></p>
<p dir="auto">Compile without errors (without <code class="notranslate">--target es6</code> option, the code compiles successfully)</p>
<p dir="auto"><strong>Actual behavior:</strong></p>
<p dir="auto">Errors are emitted:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test.ts(3,9): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
Type 'undefined' is not assignable to type 'number'."><pre class="notranslate"><code class="notranslate">test.ts(3,9): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
Type 'undefined' is not assignable to type 'number'.
</code></pre></div>
<p dir="auto">Seems like values are treated nullable. (similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="151701758" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/8357" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/8357/hovercard" href="https://github.com/microsoft/TypeScript/issues/8357">#8357</a>)</p> | <p dir="auto">The variable in a for-of loop contains <code class="notranslate">undefined</code> when the target is set to es6. For es5, everything works as expected.</p>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">nightly (1.9.0-dev.20160428)</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (const x of ["a", "b"]) {
x.substring;
}"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">const</span> <span class="pl-s1">x</span> <span class="pl-k">of</span> <span class="pl-kos">[</span><span class="pl-s">"a"</span><span class="pl-kos">,</span> <span class="pl-s">"b"</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">x</span><span class="pl-kos">.</span><span class="pl-c1">substring</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">tsconfig.json:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"strictNullChecks": true
}
}"><pre class="notranslate">{
<span class="pl-ent">"compilerOptions"</span>: {
<span class="pl-ent">"module"</span>: <span class="pl-s"><span class="pl-pds">"</span>commonjs<span class="pl-pds">"</span></span>,
<span class="pl-ent">"target"</span>: <span class="pl-s"><span class="pl-pds">"</span>es6<span class="pl-pds">"</span></span>,
<span class="pl-ent">"strictNullChecks"</span>: <span class="pl-c1">true</span>
}
}</pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
Type of <code class="notranslate">x</code> is <code class="notranslate">string</code> in the loop body, no compile error.</p>
<p dir="auto"><strong>Actual behavior:</strong><br>
Type of <code class="notranslate">x</code> is <code class="notranslate">string | undefined</code>, which gives an error.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ahejlsberg/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ahejlsberg">@ahejlsberg</a></p> | 1 |
<h2 dir="auto">Background:</h2>
<p dir="auto">I have some buttons on my website that have a glyphicon plus text.</p>
<p dir="auto">I would like to be able to use hidden-xs on a span around the text inside the button. When the screen is xs (<768px) the button only shows the glyphicon. And when the screen is > 767px the text shows along side the glyphicon.</p>
<p dir="auto">But the issue is that the <code class="notranslate">hidden-xs</code> (and all other <code class="notranslate">hidden-*</code> classes) use a <code class="notranslate">display: block !important</code> to show the hidden content. THis causes the button to break into two lines.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<button class="btn btn-grey">
<span class="glyphicon glyphicon-chevron-up"></span>
<span class="hidden-xs">Top Of Page</span>
<button>"><pre class="notranslate"><code class="notranslate"><button class="btn btn-grey">
<span class="glyphicon glyphicon-chevron-up"></span>
<span class="hidden-xs">Top Of Page</span>
<button>
</code></pre></div>
<p dir="auto">When the screen is smaller than 768px, the button looks correct:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/958af3e1b6b060597a6c7c9ee9cac22755bbe9c8cbd484fb9a369698bf34aa73/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f323738313536312f313839383430342f61323461623938322d376331622d313165332d396539392d6638313838323461613364322e504e47"><img src="https://camo.githubusercontent.com/958af3e1b6b060597a6c7c9ee9cac22755bbe9c8cbd484fb9a369698bf34aa73/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f323738313536312f313839383430342f61323461623938322d376331622d313165332d396539392d6638313838323461613364322e504e47" alt="bootstrap-lt768" data-canonical-src="https://f.cloud.github.com/assets/2781561/1898404/a24ab982-7c1b-11e3-9e99-f818824aa3d2.PNG" style="max-width: 100%;"></a></p>
<p dir="auto">But then the screen is 768px or greater, the button looks like this:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/12149688ac1501e8307b91b46c9cbd7ceb28da337ba9d0912e64eb5803350ee4/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f323738313536312f313839383430372f62316338313963322d376331622d313165332d396236312d3534626537316430633664302e504e47"><img src="https://camo.githubusercontent.com/12149688ac1501e8307b91b46c9cbd7ceb28da337ba9d0912e64eb5803350ee4/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f323738313536312f313839383430372f62316338313963322d376331622d313165332d396236312d3534626537316430633664302e504e47" alt="bootstrap-img-bad" data-canonical-src="https://f.cloud.github.com/assets/2781561/1898407/b1c819c2-7c1b-11e3-9b61-54be71d0c6d0.PNG" style="max-width: 100%;"></a></p>
<p dir="auto">But it should look like the following:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/4ba84697ec10b148255fc817f30124c27fc47766bde05dbd82aab527602039ea/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f323738313536312f313839383431342f63356463366434362d376331622d313165332d393965382d3163663536663463356135382e504e47"><img src="https://camo.githubusercontent.com/4ba84697ec10b148255fc817f30124c27fc47766bde05dbd82aab527602039ea/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f323738313536312f313839383431342f63356463366434362d376331622d313165332d393965382d3163663536663463356135382e504e47" alt="bootstrap-img-correct" data-canonical-src="https://f.cloud.github.com/assets/2781561/1898414/c5dc6d46-7c1b-11e3-99e8-1cf56f4c5a58.PNG" style="max-width: 100%;"></a></p>
<h2 dir="auto">Possible Solution</h2>
<p dir="auto">What I have done is to add my own media query CSS entries to modify the behavior when <code class="notranslate">hidden-xs</code> is inside a button. Rather than setting <code class="notranslate">display</code> to <code class="notranslate">block !important</code>, I have the <code class="notranslate">display</code> set to ``inline !important`:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@media (min-width: 768px) {
button>.hidden-xs, .btn>.hidden-xs {display: inline !important; }
}"><pre class="notranslate"><code class="notranslate">@media (min-width: 768px) {
button>.hidden-xs, .btn>.hidden-xs {display: inline !important; }
}
</code></pre></div>
<p dir="auto">It would be nice to see something like this included in a future release of Boostrap.</p> | <p dir="auto">related to issues <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="16856611" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/8500" data-hovercard-type="pull_request" data-hovercard-url="/twbs/bootstrap/pull/8500/hovercard" href="https://github.com/twbs/bootstrap/pull/8500">#8500</a> , <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="14075731" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/7808" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/7808/hovercard" href="https://github.com/twbs/bootstrap/issues/7808">#7808</a> , <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="6609454" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/4929" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/4929/hovercard" href="https://github.com/twbs/bootstrap/issues/4929">#4929</a> ; using <code class="notranslate">.hidden-sm</code> to hide span within <code class="notranslate">.nav > li > a</code> . Because class is <code class="notranslate">display: block</code> above -sm then text wraps to new line. Would you consider <code class="notranslate">.hidden-*</code> classes to be <code class="notranslate">display: inline-block</code> instead ?</p>
<p dir="auto">Here's a jsfiddle of the two cases - but the repercussions could be greater outside of this situation so probably needs more consideration... <a href="http://jsfiddle.net/jholl/P86yf/" rel="nofollow">http://jsfiddle.net/jholl/P86yf/</a></p> | 1 |
<p dir="auto">I'm seeing this recovered panics in <code class="notranslate">kubelet.log</code>:</p>
<details>
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go:158
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go:128
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:86
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:87
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:49
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go:102
/usr/local/go/src/runtime/asm_amd64.s:1998
E0714 20:49:56.257473 3445 runtime.go:70] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:64
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:48
/usr/local/go/src/runtime/asm_amd64.s:472
/usr/local/go/src/runtime/panic.go:443
/usr/local/go/src/runtime/panic.go:62
/usr/local/go/src/runtime/sigpanic_unix.go:24
</details>
<p dir="auto">The same message appears multiple times in succession.</p>
<p dir="auto">It was first observed in the e2e logs of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="161987495" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27956" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/27956/hovercard" href="https://github.com/kubernetes/kubernetes/pull/27956">#27956</a>.<br>
I've confirmed the panics are happening in master by looking at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="165677488" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28978" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/28978/hovercard" href="https://github.com/kubernetes/kubernetes/pull/28978">#28978</a> that changes only a <code class="notranslate">README.md</code> file, and all tests passed.</p>
<p dir="auto">Full logs at:</p>
<ul dir="auto">
<li><a href="https://console.cloud.google.com/storage/browser/kubernetes-jenkins/pr-logs/pull/28978/kubernetes-pull-build-test-e2e-gce/49109/artifacts/e2e-gce-agent-pr-38-0-minion-group-1vnz/" rel="nofollow">https://console.cloud.google.com/storage/browser/kubernetes-jenkins/pr-logs/pull/28978/kubernetes-pull-build-test-e2e-gce/49109/artifacts/e2e-gce-agent-pr-38-0-minion-group-1vnz/</a></li>
<li>Open the file <code class="notranslate">kubelet.log</code>, search for <code class="notranslate">Observed a panic</code></li>
</ul>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/saad-ali/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/saad-ali">@saad-ali</a> PTAL</p> | <p dir="auto">When calling <code class="notranslate">/api/v1/proxy/namespaces/$n/pods/$p:1234/</code> on a pod which returns CORS headers, duplicate CORS headers are returned (from the pod and from the API). The proxy should strip CORS headers, just like the pod proxy does.</p>
<p dir="auto">Reported in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="83390552" data-permission-text="Title is private" data-url="https://github.com/openshift/origin/issues/2619" data-hovercard-type="issue" data-hovercard-url="/openshift/origin/issues/2619/hovercard?comment_id=124502062&comment_type=issue_comment" href="https://github.com/openshift/origin/issues/2619#issuecomment-124502062">openshift/origin#2619 (comment)</a></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/csrwng/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/csrwng">@csrwng</a></p> | 0 |
<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">Expected Behavior</h2>
<p dir="auto">Some users like to use tabbing and keyboard to traverse through a page. Some like to click. For checkboxes you should be able to use both to check or uncheck the checkbox.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Currently, if you use onCheck, then only the mouse works to check or uncheck the checkbox. Using the tab key to select the checkbox, then pressing say the space bar to check or uncheck the checkbox does not work.</p>
<p dir="auto">However, if you use onClick instead of onCheck, then both the mouse and the keyboard works. However, this is counter-intuitive because onClick sounds more like the one that would only work with the mouse, but it is the opposite.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Just create a Checkbox on a page, use onCheck to call a function and try to tab into it and press the spacebar. Our users are telling us it doesn't work, or that it takes them 3-5 times hitting the space bar before it takes affect. But if they click on it with a mouse, it is the 1st time.</p>
<p dir="auto">"If YOU DO NOT take time to provide a codesandbox.io reproduction, should the COMMUNITY take time to help you?"<br>
No they do not need to take the time to write a reproduction, I think it should be easy to do.</p>
<h2 dir="auto">Context</h2>
<p dir="auto">Just that we have some users that like to use their keyboard for checkbox clicking.</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.20</td>
</tr>
<tr>
<td>React</td>
<td>16.0</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table> | <p dir="auto">how can i use layout with materical-ui? thanks a lot.</p> | 0 |
<p dir="auto">All input types get set to 210px wide and 18px high, which means image buttons get squashed ridiculously. Adding the radiused box-shadow border doesn't make much sense for image buttons either.</p>
<p dir="auto">It may be too much to set those values for the individual input types since there are a number of nonstandard ones that different browsers and platforms support, but Bootstrap could at least reset height and width to auto on input[type="image"], and the fancy border stuff to none.</p> | <p dir="auto">With Bootstrap 2.0.3, tooltips were appended to the document body and so they weren't constrained to their parent container</p>
<p dir="auto">Bootstrap 2.0.3: <a href="http://jsfiddle.net/TwMdK/1/" rel="nofollow">http://jsfiddle.net/TwMdK/1/</a></p>
<p dir="auto">With Bootstrap 2.2.2, tooltips are now appended to their parent container and this can cause tooltips to appear "chopped off"</p>
<p dir="auto">Bootstrap 2.2.2: <a href="http://jsfiddle.net/VWVsV/2/" rel="nofollow">http://jsfiddle.net/VWVsV/2/</a></p> | 0 |
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => all version</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>
<p dir="auto">It seems that the hosting site is not working.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/43403683/126118323-b9465bab-0581-4b28-887e-4fcc36e6ce24.png"><img src="https://user-images.githubusercontent.com/43403683/126118323-b9465bab-0581-4b28-887e-4fcc36e6ce24.png" alt="image" style="max-width: 100%;"></a></p>
<h5 dir="auto">Steps to reproduce</h5>
<h5 dir="auto">Issue submission checklist</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I report the issue, it's not a question
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I checked the problem with documentation, FAQ, open issues,<br>
forum.opencv.org, Stack Overflow, etc and have not found solution
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I updated to latest OpenCV version and the issue is still there
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> There is reproducer code and related data files: videos, images, onnx, etc
</li>
</ul> | <h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => ❔</li>
<li>Operating System / Platform => ❔</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">Issue submission checklist</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I report the issue, it's not a question
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I checked the problem with documentation, FAQ, open issues,<br>
answers.opencv.org, Stack Overflow, etc and have not found solution
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I updated to latest OpenCV version and the issue is still there
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> There is reproducer code and related data files: videos, images, onnx, etc
</li>
</ul> | 0 |
<h2 dir="auto">Feature request</h2>
<p dir="auto">I thiink it is necessary to support alnp. For example, if a developer want to create a http2 server, alpn can make handshake quicker.</p> | <p dir="auto">This was discussed over in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="403193670" data-permission-text="Title is private" data-url="https://github.com/denoland/deno_std/issues/153" data-hovercard-type="issue" data-hovercard-url="/denoland/deno_std/issues/153/hovercard" href="https://github.com/denoland/deno_std/issues/153">denoland/deno_std#153</a> but was locked during the move.</p>
<p dir="auto">While we still have concerns around the HTTP server, we should also consider supporting HTTP/2, HTTP/3 and QUIC.</p> | 1 |
<p dir="auto"><strong>Glide Version</strong>:</p>
<p dir="auto">4.11</p>
<p dir="auto"><strong>Integration libraries</strong>:</p>
<p dir="auto">No</p>
<p dir="auto"><strong>Device/Android Version</strong>:</p>
<p dir="auto">Mi6, Android 9</p>
<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:</p>
<p dir="auto">I'm trying to load images from compressed files.</p>
<p dir="auto">From the <a href="http://bumptech.github.io/glide/tut/custom-modelloader.html#writing-the-modelloader" rel="nofollow"><code class="notranslate">ModelLoader</code> docs</a>:</p>
<blockquote>
<p dir="auto">By default, Glide provides image decoders for two types of data:</p>
<ol dir="auto">
<li><code class="notranslate">InputStream</code></li>
<li><code class="notranslate">ByteBuffer</code></li>
</ol>
</blockquote>
<p dir="auto">So I think I don't have to add a <code class="notranslate">ModelLoader</code> if I can get an <code class="notranslate">InputStream</code> out of something.</p>
<p dir="auto">Then I get the <code class="notranslate">InputStream</code> from a zip file object using <a href="https://developer.android.com/reference/java/util/zip/ZipFile#getInputStream(java.util.zip.ZipEntry)" rel="nofollow"><code class="notranslate">getInputStream</code></a> (which is a subclass of <code class="notranslate">InputStream</code>)</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="private class ZipFileInputStream extends InputStream"><pre class="notranslate"><span class="pl-k">private</span> <span class="pl-k">class</span> <span class="pl-s1">ZipFileInputStream</span> <span class="pl-k">extends</span> <span class="pl-smi">InputStream</span></pre></div>
<p dir="auto">But Glide doesn't acknowledge that it is an <code class="notranslate">InputStream</code>.</p>
<p dir="auto"><strong>Glide load line / <code class="notranslate">GlideModule</code> (if any) / list Adapter code (if any)</strong>:</p>
<p dir="auto">In fragment:</p>
<div class="highlight highlight-source-kotlin notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// From https://github.com/bumptech/glide/issues/1208,
// I think I should use 1 instance of Glide and pass it around
glide = Glide.with(this)"><pre class="notranslate"><span class="pl-c"><span class="pl-c">//</span> From https://github.com/bumptech/glide/issues/1208,</span>
<span class="pl-c"><span class="pl-c">//</span> I think I should use 1 instance of Glide and pass it around</span>
glide <span class="pl-k">=</span> <span class="pl-en">Glide</span>.<span class="pl-c1">with</span>(<span class="pl-c1">this</span>)</pre></div>
<p dir="auto"><code class="notranslate">RecyclerView</code>'s adapter:</p>
<div class="highlight highlight-source-kotlin notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class FolderAdapter(val glide: RequestManager)"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-en">FolderAdapter</span>(<span class="pl-k">val</span> <span class="pl-smi">glide</span><span class="pl-k">:</span> <span class="pl-en">RequestManager</span>)</pre></div>
<p dir="auto">and in <code class="notranslate">onBindViewHolder</code>:</p>
<div class="highlight highlight-source-kotlin notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="CoroutineScope(Dispatchers.IO).launch {
val zis = getZipInputStream()
withContext(Dispatchers.Main) {
glide.load(zis).into(holder.img)
}
}"><pre class="notranslate"><span class="pl-en">CoroutineScope</span>(<span class="pl-en">Dispatchers</span>.<span class="pl-en">IO</span>).launch {
<span class="pl-k">val</span> zis <span class="pl-k">=</span> getZipInputStream()
withContext(<span class="pl-en">Dispatchers</span>.<span class="pl-en">Main</span>) {
glide.load(zis).into(holder.img)
}
}</pre></div>
<p dir="auto"><strong>Layout XML</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"?>
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:cardview="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- No constraint for bottom, as it overrides layout_constraintDimensionRatio -->
<ImageView
android:id="@+id/library_item_folder_cover"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:layout_marginTop="0dp"
app:layout_constraintDimensionRatio="H,16:9"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:contentDescription="@string/cover_image_placeholder" />
</androidx.cardview.widget.CardView>"><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">androidx</span>.cardview.widget.CardView
<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">xmlns</span><span class="pl-e">:</span><span class="pl-e">app</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/apk/res-auto<span class="pl-pds">"</span></span>
<span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">cardview</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/apk/res-auto<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>wrap_content<span class="pl-pds">"</span></span>>
<<span class="pl-ent">androidx</span>.constraintlayout.widget.ConstraintLayout
<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>match_parent<span class="pl-pds">"</span></span>>
<span class="pl-c"><span class="pl-c"><!--</span> No constraint for bottom, as it overrides layout_constraintDimensionRatio <span class="pl-c">--></span></span>
<<span class="pl-ent">ImageView</span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/library_item_folder_cover<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>100dp<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>100dp<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_marginStart</span>=<span class="pl-s"><span class="pl-pds">"</span>0dp<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_marginEnd</span>=<span class="pl-s"><span class="pl-pds">"</span>0dp<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_marginTop</span>=<span class="pl-s"><span class="pl-pds">"</span>0dp<span class="pl-pds">"</span></span>
<span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">layout_constraintDimensionRatio</span>=<span class="pl-s"><span class="pl-pds">"</span>H,16:9<span class="pl-pds">"</span></span>
<span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">layout_constraintStart_toStartOf</span>=<span class="pl-s"><span class="pl-pds">"</span>parent<span class="pl-pds">"</span></span>
<span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">layout_constraintEnd_toEndOf</span>=<span class="pl-s"><span class="pl-pds">"</span>parent<span class="pl-pds">"</span></span>
<span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">layout_constraintTop_toTopOf</span>=<span class="pl-s"><span class="pl-pds">"</span>parent<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">contentDescription</span>=<span class="pl-s"><span class="pl-pds">"</span>@string/cover_image_placeholder<span class="pl-pds">"</span></span> />
</<span class="pl-ent">androidx</span>.cardview.widget.CardView></pre></div>
<p dir="auto"><strong>Stack trace / LogCat</strong>:</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="E/GlideExecutor: Request threw uncaught throwable
com.bumptech.glide.Registry$NoModelLoaderAvailableException: Failed to find any ModelLoaders registered for model class: class java.util.zip.ZipFile$ZipFileInflaterInputStream"><pre class="notranslate"><span class="pl-c1">E</span>/<span class="pl-v">GlideExecutor</span>: <span class="pl-v">Request</span> <span class="pl-en">threw</span> <span class="pl-en">uncaught</span> <span class="pl-en">throwable</span>
<span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">Registry</span>$NoModelLoaderAvailableException: <span class="pl-en">Failed</span> <span class="pl-en">to</span> <span class="pl-en">find</span> <span class="pl-en">any</span> <span class="pl-en">ModelLoaders</span> <span class="pl-en">registered</span> <span class="pl-k">for</span> <span class="pl-en">model</span> <span class="pl-en">class</span>: <span class="pl-k">class</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">util</span><span class="pl-kos">.</span><span class="pl-en">zip</span><span class="pl-kos">.</span><span class="pl-v">ZipFile</span>$ZipFileInflaterInputStream</pre></div> | <p dir="auto"><strong>Glide Version</strong>: 4.0.0-RC1</p>
<p dir="auto"><strong>Integration libraries</strong>: No</p>
<p dir="auto"><strong>Device/Android Version</strong>: Android 7.0</p>
<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:</p>
<p dir="auto">GlideApp.with(context).load(contentStream).into(imageView)</p>
<p dir="auto"><strong>Stack trace / LogCat</strong>:</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="06-21 23:32:21.243 10351-10351/com.pinbox.android.dev E/Glide: class com.bumptech.glide.load.engine.GlideException: Failed to load resource
06-21 23:32:21.243 10351-10634/com.pinbox.android.dev E/GlideExecutor: Request threw uncaught throwable
com.bumptech.glide.Registry$NoModelLoaderAvailableException: Failed to find any ModelLoaders for model: com.amazonaws.services.s3.model.S3ObjectInputStream@62905e5
at com.bumptech.glide.Registry.getModelLoaders(Registry.java:227)
at com.bumptech.glide.load.engine.DecodeHelper.getLoadData(DecodeHelper.java:179)
at com.bumptech.glide.load.engine.DecodeHelper.getCacheKeys(DecodeHelper.java:197)
at com.bumptech.glide.load.engine.ResourceCacheGenerator.startNext(ResourceCacheGenerator.java:41)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:282)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:249)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:222)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:347)
"><pre class="notranslate"><span class="pl-c1">06</span>-<span class="pl-c1">21</span> <span class="pl-c1">23</span><span class="pl-pds">:32</span><span class="pl-pds">:21</span><span class="pl-kos">.</span><span class="pl-c1">243</span> <span class="pl-c1">10351</span>-<span class="pl-c1">10351</span>/<span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">pinbox</span><span class="pl-kos">.</span><span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">dev</span> <span class="pl-c1">E</span>/<span class="pl-v">Glide</span>: <span class="pl-k">class</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-v">GlideException</span>: <span class="pl-v">Failed</span> <span class="pl-en">to</span> <span class="pl-en">load</span> <span class="pl-en">resource</span>
<span class="pl-c1">06</span>-<span class="pl-c1">21</span> <span class="pl-c1">23</span><span class="pl-pds">:32</span>:<span class="pl-c1">21.243</span> <span class="pl-c1">10351</span>-<span class="pl-c1">10634</span>/<span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">pinbox</span><span class="pl-kos">.</span><span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">dev</span> <span class="pl-c1">E</span>/<span class="pl-v">GlideExecutor</span>: <span class="pl-v">Request</span> <span class="pl-en">threw</span> <span class="pl-en">uncaught</span> <span class="pl-en">throwable</span>
<span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">Registry</span>$NoModelLoaderAvailableException: <span class="pl-en">Failed</span> <span class="pl-en">to</span> <span class="pl-en">find</span> <span class="pl-en">any</span> <span class="pl-v">ModelLoaders</span> <span class="pl-k">for</span> <span class="pl-en">model</span>: <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">amazonaws</span><span class="pl-kos">.</span><span class="pl-en">services</span><span class="pl-kos">.</span><span class="pl-en">s3</span><span class="pl-kos">.</span><span class="pl-en">model</span><span class="pl-kos">.</span><span class="pl-v">S3ObjectInputStream</span>@<span class="pl-c1">62905e5</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">Registry</span><span class="pl-kos">.</span><span class="pl-en">getModelLoaders</span><span class="pl-kos">(</span><span class="pl-v">Registry</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:227</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">DecodeHelper</span><span class="pl-kos">.</span><span class="pl-en">getLoadData</span><span class="pl-kos">(</span><span class="pl-v">DecodeHelper</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:179</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">DecodeHelper</span><span class="pl-kos">.</span><span class="pl-en">getCacheKeys</span><span class="pl-kos">(</span><span class="pl-v">DecodeHelper</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:197</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">ResourceCacheGenerator</span><span class="pl-kos">.</span><span class="pl-en">startNext</span><span class="pl-kos">(</span><span class="pl-v">ResourceCacheGenerator</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:41</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">runGenerators</span><span class="pl-kos">(</span><span class="pl-v">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:282</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">runWrapped</span><span class="pl-kos">(</span><span class="pl-v">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:249</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:222</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">util</span><span class="pl-kos">.</span><span class="pl-en">concurrent</span><span class="pl-kos">.</span><span class="pl-en">ThreadPoolExecutor</span><span class="pl-kos">.</span><span class="pl-en">runWorker</span><span class="pl-kos">(</span><span class="pl-v">ThreadPoolExecutor</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1133</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">util</span><span class="pl-kos">.</span><span class="pl-en">concurrent</span><span class="pl-kos">.</span><span class="pl-en">ThreadPoolExecutor</span>$Worker<span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">ThreadPoolExecutor</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:607</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">Thread</span><span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">Thread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:761</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">executor</span><span class="pl-kos">.</span><span class="pl-en">GlideExecutor</span>$DefaultThreadFactory$1<span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">GlideExecutor</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:347</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">I use AmazonS3Client for get content as input stream of my image.<br>
Finally i have S3ObjectInputStream which extends InputStream<br>
When i try to load my ImputStream to Glide I get error "Failed to find any ModelLoaders"</p>
<p dir="auto">I guess that i need to implement ModelLoader with S3ObjectInputStream, but this is a bit strange.<br>
Glide doesn't have default InputStream Model Loader ?</p> | 1 |
<h3 dir="auto">Problem</h3>
<p dir="auto">Currently the props are merged with the instance's own <code class="notranslate">data</code>, which has a few problems:</p>
<ol dir="auto">
<li>Both data and props can declare the same property name. The order and priority of the merging is not clear. Should a prop overwrite the field with the same name in data? Or the other way around? Currently, the props' initial values are available inside <code class="notranslate">data</code> functions, but the same field returned in data gets overwritten by the prop.</li>
<li>Once merged, it's not clear whether a component property is its "private" state or a prop that is passed down from (and thus can be changed by) the parent, unless you go and check the component's props declaration.</li>
</ol>
<h3 dir="auto">Proposal</h3>
<p dir="auto"><del>Move props into its own name space, for example <code class="notranslate">this.props</code>. This avoids the merging problem (we can either make <code class="notranslate">props</code> a reserved field or make it <code class="notranslate">$props</code>) and makes it explicit that something is a prop that is obtained from outside the component.</del></p>
<p dir="auto">Throw a warning if the user defines duplicate fields in <code class="notranslate">data</code> and <code class="notranslate">props</code>.</p> | <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="new Vue({
el: '#el',
template: '#tpl',
data: {
items: [
// works fine if defined here
// {title: 'Title 1', id: 1},
// {title: 'Title 2', id: 1},
// {title: 'Title 3', id: 1},
]
},
compiled: function(){
// does not work
// Uncaught TypeError: Cannot read property 'appendChild' of null
this.items = [
{title: 'Title 1', id: 1},
{title: 'Title 2', id: 1},
{title: 'Title 3', id: 1},
]
}
})"><pre class="notranslate"><span class="pl-k">new</span> <span class="pl-v">Vue</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">el</span>: <span class="pl-s">'#el'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">'#tpl'</span><span class="pl-kos">,</span>
<span class="pl-c1">data</span>: <span class="pl-kos">{</span>
<span class="pl-c1">items</span>: <span class="pl-kos">[</span>
<span class="pl-c">// works fine if defined here</span>
<span class="pl-c">// {title: 'Title 1', id: 1},</span>
<span class="pl-c">// {title: 'Title 2', id: 1},</span>
<span class="pl-c">// {title: 'Title 3', id: 1},</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-en">compiled</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-c">// does not work</span>
<span class="pl-c">// Uncaught TypeError: Cannot read property 'appendChild' of null</span>
<span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">items</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span>
<span class="pl-kos">{</span><span class="pl-c1">title</span>: <span class="pl-s">'Title 1'</span><span class="pl-kos">,</span> <span class="pl-c1">id</span>: <span class="pl-c1">1</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span><span class="pl-c1">title</span>: <span class="pl-s">'Title 2'</span><span class="pl-kos">,</span> <span class="pl-c1">id</span>: <span class="pl-c1">1</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span><span class="pl-c1">title</span>: <span class="pl-s">'Title 3'</span><span class="pl-kos">,</span> <span class="pl-c1">id</span>: <span class="pl-c1">1</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-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<div id="el"></div>
<script id="tpl" type="wtf/exception">
<div v-repeat="items" track-by="id">
{{ title }}
</div>
</script>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">id</span>="<span class="pl-s">el</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">script</span> <span class="pl-c1">id</span>="<span class="pl-s">tpl</span>" <span class="pl-c1">type</span>="<span class="pl-s">wtf/exception</span>"<span class="pl-kos">></span>
<span class="pl-c1"><</span><span class="pl-ent">div</span> <span class="pl-c1">v-repeat</span><span class="pl-c1">=</span><span class="pl-s">"items"</span> <span class="pl-c1">track-by</span><span class="pl-c1">=</span><span class="pl-s">"id"</span><span class="pl-c1">></span>
<span class="pl-kos">{</span><span class="pl-kos">{</span> title <span class="pl-kos">}</span><span class="pl-kos">}</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-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span></pre></div>
<p dir="auto"><a href="https://jsfiddle.net/sw_double/uasek0pt/" rel="nofollow">https://jsfiddle.net/sw_double/uasek0pt/</a></p> | 0 |
<p dir="auto">When am trying to run the tensorboard in anaconda prompt, I am getting below error. Can somebody help me to recover from it?</p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="tensorboard --logdir=logs/
"><pre class="notranslate"><span class="pl-s1">tensorboard</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">logdir</span><span class="pl-c1">=</span><span class="pl-s1">logs</span><span class="pl-c1">/</span></pre></div>
<h3 dir="auto">Error message:</h3>
<p dir="auto">Traceback (most recent call last):<br>
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\core_<em>init</em>_.py", line 16, in <br>
from . import multiarray<br>
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\core\multiarray.py", line 12, in <br>
from . import overrides<br>
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\core\overrides.py", line 6, in <br>
from numpy.core._multiarray_umath import (<br>
ImportError: DLL load failed: The specified module could not be found.</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\aswk\appdata\local\continuum\anaconda3\lib\runpy.py", line 193, in <em>run_module_as_main<br>
"<strong>main</strong>", mod_spec)<br>
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\runpy.py", line 85, in <em>run_code<br>
exec(code, run_globals)<br>
File "C:\Users\aswk\AppData\Local\Continuum\anaconda3\Scripts\tensorboard.exe_<em>main</em></em>.py", line 5, in <br>
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\tensorboard\main.py", line 45, in <br>
from tensorboard import default<br>
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\tensorboard\default.py", line 34, in <br>
import tensorflow as tf<br>
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\tensorflow_<em>init</em></em>.py", line 24, in <br>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import<br>
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\tensorflow\python_<em>init</em>_.py", line 47, in <br>
import numpy as np<br>
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy_<em>init</em>_.py", line 142, in <br>
from . import core<br>
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\core_<em>init</em>_.py", line 47, in <br>
raise ImportError(msg)<br>
ImportError:</p>
<p dir="auto">IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!</p>
<p dir="auto">Importing the multiarray numpy extension module failed. Most<br>
likely you are trying to import a failed build of numpy.<br>
Here is how to proceed:</p>
<ul dir="auto">
<li>If you're working with a numpy git repository, try <code class="notranslate">git clean -xdf</code><br>
(removes all files not under version control) and rebuild numpy.</li>
<li>If you are simply trying to use the numpy version that you have installed:<br>
your installation is broken - please reinstall numpy.</li>
<li>If you have already reinstalled and that did not fix the problem, then:
<ol dir="auto">
<li>
<p dir="auto">Check that you are using the Python you expect (you're using c:\users\aswk\appdata\local\continuum\anaconda3\python.exe),<br>
and that you have no directories in your PATH or PYTHONPATH that can<br>
interfere with the Python and numpy versions you're trying to use.</p>
</li>
<li>
<p dir="auto">If (1) looks fine, you can open a new issue at<br>
<a href="https://github.com/numpy/numpy/issues">https://github.com/numpy/numpy/issues</a>. Please include details on:</p>
<ul dir="auto">
<li>how you installed Python</li>
<li>how you installed numpy</li>
<li>your operating system</li>
<li>whether or not you have multiple versions of Python installed</li>
<li>if you built from source, your compiler versions and ideally a build log</li>
</ul>
<p dir="auto">Note: this error has many possible causes, so please don't comment on<br>
an existing issue about this - open a new one instead.</p>
</li>
</ol>
</li>
</ul>
<p dir="auto">Original error was: DLL load failed: The specified module could not be found.</p>
<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto">(base) C:\Users\aswk.spyder-py3\python example files\Test_project>conda list numpy<br>
packages in environment at C:\Users\aswk\AppData\Local\Continuum\anaconda3:</p>
<p dir="auto">Name Version Build Channel<br>
msgpack-numpy 0.4.3.2 pypi_0 pypi<br>
numpy 1.16.1 pypi_0 pypi<br>
numpydoc 0.8.0 py36_0</p> | <p dir="auto">Create fresh virtual env with Anaconda Navigator 1.9.6 under Windows 10, selecting Python 3.7, naming python37</p>
<p dir="auto">In the console of VSCode:</p>
<ul dir="auto">
<li>activate python37</li>
<li>pip install numpy</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(python37) D:\TfsProj\alphastone>pip install numpy
Collecting numpy
Using cached https://files.pythonhosted.org/packages/41/b8/3a6b07352c2542ca1c89be7583e7ca07bf513895b6ac59ae008054f326b1/numpy-1.16.1-cp37-cp37m-win_amd64.whl
Installing collected packages: numpy
Successfully installed numpy-1.16.1"><pre class="notranslate"><code class="notranslate">(python37) D:\TfsProj\alphastone>pip install numpy
Collecting numpy
Using cached https://files.pythonhosted.org/packages/41/b8/3a6b07352c2542ca1c89be7583e7ca07bf513895b6ac59ae008054f326b1/numpy-1.16.1-cp37-cp37m-win_amd64.whl
Installing collected packages: numpy
Successfully installed numpy-1.16.1
</code></pre></div>
<p dir="auto">(same with parameter --no-cache-dir)</p>
<ul dir="auto">
<li>python</li>
<li>import numpy</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(python37) D:\TfsProj\alphastone>python
Python 3.7.2 (default, Feb 11 2019, 14:11:50) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "C:\Users\Name\.conda\envs\python37\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
File "C:\Users\Name\.conda\envs\python37\lib\site-packages\numpy\core\multiarray.py", line 12, in <module>
from . import overrides
File "C:\Users\Name\.conda\envs\python37\lib\site-packages\numpy\core\overrides.py", line 6, in <module>
from numpy.core._multiarray_umath import (
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Name\.conda\envs\python37\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "C:\Users\Name\.conda\envs\python37\lib\site-packages\numpy\core\__init__.py", line 47, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!"><pre class="notranslate"><code class="notranslate">(python37) D:\TfsProj\alphastone>python
Python 3.7.2 (default, Feb 11 2019, 14:11:50) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "C:\Users\Name\.conda\envs\python37\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
File "C:\Users\Name\.conda\envs\python37\lib\site-packages\numpy\core\multiarray.py", line 12, in <module>
from . import overrides
File "C:\Users\Name\.conda\envs\python37\lib\site-packages\numpy\core\overrides.py", line 6, in <module>
from numpy.core._multiarray_umath import (
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Name\.conda\envs\python37\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "C:\Users\Name\.conda\envs\python37\lib\site-packages\numpy\core\__init__.py", line 47, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
</code></pre></div>
<p dir="auto">All advices, reinstallations via pip and conda, or different numpy versions (e.g. 1.15.4) didn't solve this issue for me.</p>
<p dir="auto">If I do multiple pip uninstall numpy until there is no numpy left, and then do a conda install numpy, importing numpy interestingly works (in 1.15.4).</p>
<p dir="auto">A conda install numpy does the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="The following NEW packages will be INSTALLED:
blas pkgs/main/win-64::blas-1.0-mkl
icc_rt pkgs/main/win-64::icc_rt-2019.0.0-h0cc432a_1
intel-openmp pkgs/main/win-64::intel-openmp-2019.1-144
mkl pkgs/main/win-64::mkl-2019.1-144
mkl_fft pkgs/main/win-64::mkl_fft-1.0.10-py37h14836fe_0
mkl_random pkgs/main/win-64::mkl_random-1.0.2-py37h343c172_0
numpy pkgs/main/win-64::numpy-1.15.4-py37h19fb1c0_0
numpy-base pkgs/main/win-64::numpy-base-1.15.4-py37hc3f5095_0"><pre class="notranslate"><code class="notranslate">The following NEW packages will be INSTALLED:
blas pkgs/main/win-64::blas-1.0-mkl
icc_rt pkgs/main/win-64::icc_rt-2019.0.0-h0cc432a_1
intel-openmp pkgs/main/win-64::intel-openmp-2019.1-144
mkl pkgs/main/win-64::mkl-2019.1-144
mkl_fft pkgs/main/win-64::mkl_fft-1.0.10-py37h14836fe_0
mkl_random pkgs/main/win-64::mkl_random-1.0.2-py37h343c172_0
numpy pkgs/main/win-64::numpy-1.15.4-py37h19fb1c0_0
numpy-base pkgs/main/win-64::numpy-base-1.15.4-py37hc3f5095_0
</code></pre></div>
<p dir="auto">What's missing for the pip way?<br>
Any ideas?</p> | 1 |
<p dir="auto">Hello,</p>
<p dir="auto">we moved recently from TS 1.4 to TS 1.5 with Visual Studio 2013.</p>
<p dir="auto">When we have the following class definition:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export class ErrorClass {
public foo({bar: number}) { }
}"><pre class="notranslate"><code class="notranslate">export class ErrorClass {
public foo({bar: number}) { }
}
</code></pre></div>
<p dir="auto">With the Option "Generate declaration files" and "combine javascript output into file" to true, the resulting declaration for this file will be:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class ErrorClass {
foo({bar: }: {
bar: any;
}): void;
}"><pre class="notranslate"><code class="notranslate">class ErrorClass {
foo({bar: }: {
bar: any;
}): void;
}
</code></pre></div>
<p dir="auto">Which is syntactically incorrect: The first "bar" is missing the type specifier (and is of type number instead of any).</p>
<p dir="auto">This will cause that projects using this declaration file fails to compile.</p>
<p dir="auto">Can anyone reproduce this? Is there a fix available?</p>
<p dir="auto">Kind regards,<br>
Timo</p> | <p dir="auto">I have an interface that is supposed to have a function signature of:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(param: {prop: boolean}): any"><pre class="notranslate"><code class="notranslate">(param: {prop: boolean}): any
</code></pre></div>
<p dir="auto">but I forget the parameter name (I'm not sure if this signature is considered valid):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="({prop: boolean}): any"><pre class="notranslate"><code class="notranslate">({prop: boolean}): any
</code></pre></div>
<p dir="auto">When compiling this invalid interface with the <code class="notranslate">--declaration</code> flag, an invalid <code class="notranslate">.d.ts</code> file results:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/* foo.ts */
export interface SomeInterface {
({prop: boolean}): any
}"><pre class="notranslate"><code class="notranslate">/* foo.ts */
export interface SomeInterface {
({prop: boolean}): any
}
</code></pre></div>
<p dir="auto"><code class="notranslate">tsc foo.ts --module commonjs --declaration</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/* foo.d.ts */
export interface SomeInterface {
({prop: }: {
prop: any;
}): any;
}"><pre class="notranslate"><code class="notranslate">/* foo.d.ts */
export interface SomeInterface {
({prop: }: {
prop: any;
}): any;
}
</code></pre></div>
<p dir="auto">If parameter names are optional, this should produce a valid <code class="notranslate">.d.ts</code> file. If parameter names are required, <code class="notranslate">tsc</code> should throw an error, or at least warn me that there is an issue.</p> | 1 |
<p dir="auto">Elasticsearch generates an InvalidShapeException from polygons generated by PostGIS:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MapperParsingException[failed to parse [catchment_mpoly]]; nested: InvalidShapeException[Provided shape has duplicate consecutive coordinates at: (145.105506775, -37.791859504, NaN)]"><pre class="notranslate"><code class="notranslate">MapperParsingException[failed to parse [catchment_mpoly]]; nested: InvalidShapeException[Provided shape has duplicate consecutive coordinates at: (145.105506775, -37.791859504, NaN)]
</code></pre></div>
<p dir="auto">This particular check seems overzealous.</p>
<p dir="auto">It's also surprising, given that the polygons are being fed through <code class="notranslate">ST_SimplifyPreserveTopology</code>. It is generating errors after its own precision is applied?</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="125913435" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/15880" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/15880/hovercard" href="https://github.com/elastic/elasticsearch/issues/15880">#15880</a></p>
<p dir="auto">To replicate, copy the config directory to a new location and add a simple tribe config, eg:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cp -a elasticsearch-2.2.0/config tribe
echo "tribe.t1.cluster.name: foo" >> tribe/elasticsearch.yml"><pre class="notranslate"><code class="notranslate">cp -a elasticsearch-2.2.0/config tribe
echo "tribe.t1.cluster.name: foo" >> tribe/elasticsearch.yml
</code></pre></div>
<p dir="auto">Start the tribe node as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./elasticsearch-2.2.0/bin/elasticsearch --path.conf tribe"><pre class="notranslate"><code class="notranslate">./elasticsearch-2.2.0/bin/elasticsearch --path.conf tribe
</code></pre></div>
<p dir="auto">The process dies with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread "main" java.security.AccessControlException: access denied ("java.io.FilePermission" "/Users/clinton/workspace/servers/elasticsearch-2.2.0/config/hunspell" "read")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at sun.nio.fs.UnixPath.checkRead(UnixPath.java:795)
at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:49)
at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
at java.nio.file.Files.readAttributes(Files.java:1737)
at java.nio.file.Files.isDirectory(Files.java:2192)
at org.elasticsearch.indices.analysis.HunspellService.scanAndLoadDictionaries(HunspellService.java:127)
at org.elasticsearch.indices.analysis.HunspellService.<init>(HunspellService.java:102)
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:422)
at <<<guice>>>
at org.elasticsearch.node.Node.<init>(Node.java:200)
at org.elasticsearch.tribe.TribeClientNode.<init>(TribeClientNode.java:35)
at org.elasticsearch.tribe.TribeService.<init>(TribeService.java:141)
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:422)
at <<<guice>>>
at org.elasticsearch.node.Node.<init>(Node.java:200)
at org.elasticsearch.node.Node.<init>(Node.java:128)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)"><pre class="notranslate"><code class="notranslate">Exception in thread "main" java.security.AccessControlException: access denied ("java.io.FilePermission" "/Users/clinton/workspace/servers/elasticsearch-2.2.0/config/hunspell" "read")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at sun.nio.fs.UnixPath.checkRead(UnixPath.java:795)
at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:49)
at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
at java.nio.file.Files.readAttributes(Files.java:1737)
at java.nio.file.Files.isDirectory(Files.java:2192)
at org.elasticsearch.indices.analysis.HunspellService.scanAndLoadDictionaries(HunspellService.java:127)
at org.elasticsearch.indices.analysis.HunspellService.<init>(HunspellService.java:102)
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:422)
at <<<guice>>>
at org.elasticsearch.node.Node.<init>(Node.java:200)
at org.elasticsearch.tribe.TribeClientNode.<init>(TribeClientNode.java:35)
at org.elasticsearch.tribe.TribeService.<init>(TribeService.java:141)
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:422)
at <<<guice>>>
at org.elasticsearch.node.Node.<init>(Node.java:200)
at org.elasticsearch.node.Node.<init>(Node.java:128)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
</code></pre></div>
<p dir="auto">The reason for this is that, when the tribe node tries to create a client to connect to the cluster, it doesn't pass on the <code class="notranslate">path.conf</code> setting to the client, so that when HunspellService tries to <a href="https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/indices/analysis/HunspellService.java#L114">resolve the hunspell directory</a> it uses <code class="notranslate">path.home</code> instead of the custom <code class="notranslate">path.conf</code>.</p>
<p dir="auto">Adding the absolute config path to the tribe node configuration works around this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="echo "tribe.t1.path.conf: /Users/clinton/workspace/servers/tribe/" >> tribe/elasticsearch.yml"><pre class="notranslate"><code class="notranslate">echo "tribe.t1.path.conf: /Users/clinton/workspace/servers/tribe/" >> tribe/elasticsearch.yml
</code></pre></div> | 0 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report => search github for a similar issue or PR before submitting
[x ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ ] bug report => search github for a similar issue or PR before submitting
[x ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
these are seperated</p>
<p dir="auto"><strong>Expected behavior</strong><br>
become one</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
it made confusion for my colleagues to refer them. and it is strange to deal with the same element (form) in different places in the same core.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.3</li>
</ul>
<ul dir="auto">
<li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</li>
</ul>
<ul dir="auto">
<li>
<p dir="auto"><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =</p>
</li>
</ul> | <p dir="auto">This is probably best classified as a Router feature request. I'll describe what it is, my thinking, and a use case.</p>
<p dir="auto">What it is: Currently, the V3 Router waits for an Observable to Complete before completing navigation. I would like for it to instead continue navigation after the first Observable item is returned.</p>
<p dir="auto">My thinking: Currently the Resolve treats the Observable as a Promise, defeating the power of the Observable. This doesn't present a barrier with Angular's Http, where only one item is returned. But unless I misunderstand, the point of using an Observable in Http is to allow easy extension throughout Angular into a scenario where the data is actually a stream.</p>
<p dir="auto">Use case: I have a live data feed from a remote server. I subscribe to a resource, rather than get it. When viewing this resource in a page, I only need one snapshot to complete navigation and display the component, but I would still like the updates bound to the view.</p>
<p dir="auto">More detail:</p>
<p dir="auto">Observables as first-class citizens in Angular2 are great for displaying "live data". I currently rely on, and it is becoming more common to integrate, "live data" streamed/syndicated/published from web services. Regardless of the framework used to deliver streams to the client, Observables are the obvious choice to act as intermediary between the receiving agent/service and the view.</p>
<p dir="auto">Resolvers in Angular are also very nice for a few reasons. One is that I can be sure I have all my data before performing initialization. This greatly simplifies my component initialization logic. It also simplifies managing built-in operations Angular performs, such as avoiding errors binding templates to properties on null models.</p>
<p dir="auto">But where live data comes in, the current Resolve behavior is difficult to make use of. If we suppose the live data stream never completes, we have to instead resolve, for example, to Observable.first(), and throw away the remainder of the stream.</p>
<p dir="auto">Or I can go through extra steps for each of my Observables, to Observable.publish etc. But that's not enough, because there's not a symmetric exit hook for resolve, that I see. So instead I have to do some extra magic, such as tear down resources I didn't initialize in the component.</p>
<p dir="auto">IMO, in the spirit of Rx, a better behavior would be to:</p>
<ul dir="auto">
<li>Share the Observable, e.g. via PublishReplay</li>
<li>Connect</li>
<li>Subscribe</li>
<li>Wait for the first item</li>
<li>Unsubscribe</li>
<li>Complete navigation</li>
<li>Pass the shared Observable as ResolvedData</li>
<li>When exiting navigation Disconnect</li>
</ul>
<p dir="auto">Or something similar.</p>
<p dir="auto">Your thoughts are appreciated. I'll also be happy to contribute effort if someone with design authority confirms an approach.</p> | 0 |
<p dir="auto">_Originally posted by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/CaiJingLong/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/CaiJingLong">@CaiJingLong</a> in<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="347234473" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/20171" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/20171/hovercard?comment_id=431284368&comment_type=issue_comment" href="https://github.com/flutter/flutter/issues/20171#issuecomment-431284368">#20171 (comment)</a></p>
<h2 dir="auto">flutter doctor -v</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="flutter doctor -v
[✓] Flutter (Channel dev, v0.10.0, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN)
• Flutter version 0.10.0 at /Users/caijinglong/Library/Flutter/flutter
• Framework revision d954ae6850 (10 days ago), 2018-10-09 16:21:06 -0400
• Engine revision bf377896ff
• Dart version 2.1.0-dev.6.0.flutter-a50dfd6698
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
• Android SDK at /Users/caijinglong/Library/Android/sdk/
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.2
• ANDROID_HOME = /Users/caijinglong/Library/Android/sdk/
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 28.0.2
• Dart plugin version 181.5616
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] VS Code (version 1.27.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.19.0
[!] Connected device
! No devices available
! Doctor found issues in 1 category."><pre class="notranslate"><code class="notranslate">flutter doctor -v
[✓] Flutter (Channel dev, v0.10.0, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN)
• Flutter version 0.10.0 at /Users/caijinglong/Library/Flutter/flutter
• Framework revision d954ae6850 (10 days ago), 2018-10-09 16:21:06 -0400
• Engine revision bf377896ff
• Dart version 2.1.0-dev.6.0.flutter-a50dfd6698
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
• Android SDK at /Users/caijinglong/Library/Android/sdk/
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.2
• ANDROID_HOME = /Users/caijinglong/Library/Android/sdk/
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 28.0.2
• Dart plugin version 181.5616
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] VS Code (version 1.27.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.19.0
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
</code></pre></div> | <p dir="auto">When running a flutter app within IntelliJ just after switching Flutter SDK's, a rather verbose warning is printed twice. Also, it's often printed again the next time you stop and restart the Flutter app. (It eventually goes away, but I haven't seen a pattern to when that happens.)</p>
<p dir="auto">Here's the console output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Warning! The 'flutter' tool you are currently running is from a different Flutter
repository than the one last used by this package. The repository from which the
'flutter' tool is currently executing will be used instead.
running Flutter tool: /Users/skybrian/software/flutter
previous reference : /Users/skybrian/dart/work/flutter
This can happen when you have multiple copies of flutter installed. Please check
your system path to verify that you are running the expected version (run
'flutter --version' to see which flutter is on your path).
Launching lib/main.dart on Android SDK built for x86 64 in debug mode...
Running 'gradle assembleDebug'...
Warning! The 'flutter' tool you are currently running is from a different Flutter
repository than the one last used by this package. The repository from which the
'flutter' tool is currently executing will be used instead.
running Flutter tool: /Users/skybrian/software/flutter
previous reference : /Users/skybrian/dart/work/flutter
This can happen when you have multiple copies of flutter installed. Please check
your system path to verify that you are running the expected version (run
'flutter --version' to see which flutter is on your path).
Built build/app/outputs/apk/app-debug.apk (21.7MB).
Installing build/app/outputs/apk/app.apk...
Syncing files to device Android SDK built for x86 64..."><pre class="notranslate"><code class="notranslate">Warning! The 'flutter' tool you are currently running is from a different Flutter
repository than the one last used by this package. The repository from which the
'flutter' tool is currently executing will be used instead.
running Flutter tool: /Users/skybrian/software/flutter
previous reference : /Users/skybrian/dart/work/flutter
This can happen when you have multiple copies of flutter installed. Please check
your system path to verify that you are running the expected version (run
'flutter --version' to see which flutter is on your path).
Launching lib/main.dart on Android SDK built for x86 64 in debug mode...
Running 'gradle assembleDebug'...
Warning! The 'flutter' tool you are currently running is from a different Flutter
repository than the one last used by this package. The repository from which the
'flutter' tool is currently executing will be used instead.
running Flutter tool: /Users/skybrian/software/flutter
previous reference : /Users/skybrian/dart/work/flutter
This can happen when you have multiple copies of flutter installed. Please check
your system path to verify that you are running the expected version (run
'flutter --version' to see which flutter is on your path).
Built build/app/outputs/apk/app-debug.apk (21.7MB).
Installing build/app/outputs/apk/app.apk...
Syncing files to device Android SDK built for x86 64...
</code></pre></div>
<p dir="auto">This is using:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="skybrian-macbookpro2:flutter skybrian$ flutter --version
Flutter • channel master • https://github.com/flutter/flutter.git
Framework • revision d6ec71d2c0 (18 minutes ago) • 2017-06-15 19:03:24 -0700
Engine • revision 18fdfb86bb
Tools • Dart 1.24.0-dev.6.7"><pre class="notranslate"><code class="notranslate">skybrian-macbookpro2:flutter skybrian$ flutter --version
Flutter • channel master • https://github.com/flutter/flutter.git
Framework • revision d6ec71d2c0 (18 minutes ago) • 2017-06-15 19:03:24 -0700
Engine • revision 18fdfb86bb
Tools • Dart 1.24.0-dev.6.7
</code></pre></div> | 0 |
<p dir="auto"><em>Please make sure that this is a bug. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow): no</li>
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04</li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:</li>
<li>TensorFlow installed from (source or binary):</li>
<li>TensorFlow version (use command below): tensorflow-gpu==2.0.0rc0</li>
<li>Python version: 3.6.8</li>
<li>Bazel version (if compiling from source):</li>
<li>GCC/Compiler version (if compiling from source):</li>
<li>CUDA/cuDNN version:</li>
<li>GPU model and memory:</li>
</ul>
<p dir="auto">You can collect some of this information using our environment capture<br>
<a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">script</a><br>
You can also obtain the TensorFlow version with: 1. TF 1.0: <code class="notranslate">python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</code> 2. TF 2.0: <code class="notranslate">python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"</code></p>
<p dir="auto"><strong>Describe the current behavior</strong><br>
tf.scatter_nd sums update values if indices are present multiple times. I use this function for moving pixels in an image. Some pixels are present twice and this gives wrong pixel values in scatter.</p>
<p dir="auto">tf.Tensor([ 0 11 0 10 9 0 0 12], shape=(8,), dtype=int32)<br>
tf.Tensor([ 0 11 0 10 9 0 0 24], shape=(8,), dtype=int32)<br>
tf.Tensor([ 0 11 0 10 9 0 0 36], shape=(8,), dtype=int32)<br>
<strong>Describe the expected behavior</strong><br>
I expect this behavior:</p>
<p dir="auto">tf.Tensor([ 0 11 0 10 9 0 0 12], shape=(8,), dtype=int32)<br>
tf.Tensor([ 0 11 0 10 9 0 0 12], shape=(8,), dtype=int32)<br>
tf.Tensor([ 0 11 0 10 9 0 0 12], shape=(8,), dtype=int32)</p>
<p dir="auto">Otherwise I need to find unique indices and delete multiples. And why it is adding? Maybe other options are possible then too.</p>
<p dir="auto"><strong>Code to reproduce the issue</strong><br>
Provide a reproducible test case that is the bare minimum necessary to generate the problem.<br>
indices1 = tf.constant([[4], [3], [1], [7]])<br>
updates1 = tf.constant([9, 10, 11, 12])</p>
<p dir="auto">indices2 = tf.constant([[4], [3], [1], [7], [7]])<br>
updates2 = tf.constant([9, 10, 11, 12, 12])</p>
<p dir="auto">indices3 = tf.constant([[4], [3], [1], [7], [7], [7]])<br>
updates3 = tf.constant([9, 10, 11, 12, 12, 12])</p>
<p dir="auto">shape = tf.constant([8])</p>
<p dir="auto">scatter1 = tf.scatter_nd(indices1, updates1, shape)<br>
scatter2 = tf.scatter_nd(indices2, updates2, shape)<br>
scatter3 = tf.scatter_nd(indices3, updates3, shape)</p>
<p dir="auto">print(scatter1)<br>
print(scatter2)<br>
print(scatter3)</p>
<p dir="auto"><strong>Other info / logs</strong><br>
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.</p> | <p dir="auto">The following information are for installation issues</p>
<h3 dir="auto">What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?</h3>
<p dir="auto"><a href="https://stackoverflow.com/questions/41605355/updating-the-supported-tags-for-pip#" rel="nofollow">https://stackoverflow.com/questions/41605355/updating-the-supported-tags-for-pip#</a></p>
<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System: windows</p>
<p dir="auto">Installed version of CUDA and cuDNN:<br>
(please attach the output of <code class="notranslate">ls -l /path/to/cuda/lib/libcud*</code>): Could not install tensorflow from pip, so could not reach this phase.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6542274/22343817/91ae2194-e41f-11e6-8b7b-bf4fad6e7c9a.jpg"><img src="https://cloud.githubusercontent.com/assets/6542274/22343817/91ae2194-e41f-11e6-8b7b-bf4fad6e7c9a.jpg" alt="wheel not supported in windows plattform" style="max-width: 100%;"></a></p>
<p dir="auto">installed from binary pip package, provide:</p>
<ol dir="auto">
<li>link to the pip package you installed: using version pip 9.0.1</li>
</ol>
<h3 dir="auto">What other attempted solutions have you tried?</h3>
<p dir="auto">Haven't tried making tensorflow from source since I am on windows 7. I will be trying using cmake if that doesnt workout well I will be proceeding with linux environment in my PC by reinstalling the OS itself. :(</p>
<h3 dir="auto">Logs or other output that would be helpful</h3>
<p dir="auto">Attached screenshot</p> | 0 |
<p dir="auto">I've been trying to implement Gaussian Processes Regression, which require the calculation of a matrix inverse. With regular numpy I would use <code class="notranslate">np.linalg.inv</code>, but I can't find this function back in jax.</p>
<p dir="auto">Everything else is working as expected, and I can use <code class="notranslate">np.linalg.inv</code> for basic calculations.<br>
Unfortunately, the use of <code class="notranslate">np.linalg.inv</code> keeps me from using <code class="notranslate">grad</code> to calculate gradients, which would be the most exciting part of the whole implementation!</p>
<p dir="auto">I would love to contribute a PR if someone can tell me where to start.</p> | <p dir="auto">With multiple GPUs there should be a way to direct specific computations to run on a specific GPU.</p>
<p dir="auto">Context: I want to run #gpu different models in parallel each on its own GPU.</p>
<p dir="auto">The current best solution that comes to mind is to RPC between different machines, each with 1 GPU -- I'd like to avoid doing this.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hawkinsp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hawkinsp">@hawkinsp</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mattjj/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mattjj">@mattjj</a></p> | 0 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
Using reactive forms. When swedish letters (åäö) is used in a input placeholder, the form and input is initialized as dirty. </p>
<p dir="auto">This only affects IE11, or perhaps also earlier versions of IE.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
The form and input should not be dirty because of swedish letters in placeholder.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
<a href="http://plnkr.co/edit/u3iEtQ?p=preview" rel="nofollow">http://plnkr.co/edit/u3iEtQ?p=preview</a><br>
<del><a href="http://plnkr.co/edit/LpZNI9m7j8m8tgXRFdVG?p=preview" rel="nofollow">http://plnkr.co/edit/LpZNI9m7j8m8tgXRFdVG?p=preview</a></del> (old plunk with typo and not working)</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
bug</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
Windows 10</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Angular version:</strong> 4.0.2, also affects 2.x</p>
</li>
<li>
<p dir="auto"><strong>Browser:</strong> Internet Explorer 11</p>
</li>
<li>
<p dir="auto"><strong>Language:</strong> all</p>
</li>
</ul> | <p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
Textarea element in form when binding model has initial state as dirty in IE</p>
<p dir="auto"><strong>Expected behavior</strong><br>
Textarea element in form when binding model has initial state as pristine in IE</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
Using ng-form with textarea element and bind model on that textarea</p>
<p dir="auto">Plunker example: <a href="http://plnkr.co/edit/JEgKqSEXGpUDSRDuMXcD?p=preview" rel="nofollow">http://plnkr.co/edit/JEgKqSEXGpUDSRDuMXcD?p=preview</a><br>
Inspect textarea in browser development tool. <code class="notranslate">textarea</code> and <code class="notranslate">form</code> element have <code class="notranslate">ng-pristine</code> CSS class in Chrome/Firefox/Edge while they have <code class="notranslate">ng-dirty</code> CSS class in IE.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Angular version:</strong> 2.4.7</p>
</li>
<li>
<p dir="auto"><strong>Browser:</strong> IE 11</p>
</li>
</ul> | 1 |
<p dir="auto">Neither <code class="notranslate">RFECV.fit</code> nor <code class="notranslate">GridSearchCV.fit</code> take the parameter <code class="notranslate">sample_weight</code>. Please add this as an optional parameter to both methods. This parameter is useful for unbalanced classification.</p> | <p dir="auto">Currently many of our metrics allow for sample weights, but when using the <code class="notranslate">cross_val_score</code> or <code class="notranslate">GridSearchCV</code> these are not taken into account. As I said on the mailing list, I'm not sure if this is a bug or a feature. It might depend on the domain whether we want to do this or not.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="65936029" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/4497" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/4497/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/4497">#4497</a> will allow to do this in a more consistent manner.</p> | 1 |
<p dir="auto">When I configure my default_timezone as Asia/Shanghai and kick off backfill command, it throws exceptions:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="return func(*args, session=session, **kwargs)"><pre class="notranslate"><code class="notranslate">return func(*args, session=session, **kwargs)
</code></pre></div>
<p dir="auto">File "/usr/local/lib/python3.6/site-packages/airflow/models/dagrun.py", line 181, in refresh_from_db<br>
DR.run_id == self.run_id,<br>
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3500, in one<br>
raise orm_exc.NoResultFound("No row was found for one()")<br>
sqlalchemy.orm.exc.NoResultFound: No row was found for one()</p>
<p dir="auto">Changing back to default timezone works again.</p> | <p dir="auto"><strong>Apache Airflow version: 2.0.1</strong><br>
<strong>What happened:</strong><br>
Running an airflow dags test or backfill CLI command shown in tutorial, produces the same error.</p>
<p dir="auto"><strong>dags test cli command result:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(airflow_venv) (base) app@lunar_01:airflow$ airflow dags test tutorial 2015-06-01
[2021-02-16 04:29:22,355] {dagbag.py:448} INFO - Filling up the DagBag from /home/app/Lunar/src/airflow/dags
[2021-02-16 04:29:22,372] {example_kubernetes_executor_config.py:174} WARNING - Could not import DAGs in example_kubernetes_executor_config.py: No module named 'kubernetes'
[2021-02-16 04:29:22,373] {example_kubernetes_executor_config.py:175} WARNING - Install kubernetes dependencies with: pip install apache-airflow['cncf.kubernetes']
Traceback (most recent call last):
File "/home/app/airflow_venv/bin/airflow", line 10, in <module>
sys.exit(main())
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 65, in wrapper
return func(*args, session=session, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/cli.py", line 89, in wrapper
return f(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/cli/commands/dag_command.py", line 389, in dag_test
dag.run(executor=DebugExecutor(), start_date=args.execution_date, end_date=args.execution_date)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/models/dag.py", line 1706, in run
job.run()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/base_job.py", line 237, in run
self._execute()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 65, in wrapper
return func(*args, session=session, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 805, in _execute
session=session,
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 62, in wrapper
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 715, in _execute_for_run_dates
tis_map = self._task_instances_for_dag_run(dag_run, session=session)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 62, in wrapper
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 359, in _task_instances_for_dag_run
dag_run.refresh_from_db()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 65, in wrapper
return func(*args, session=session, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/models/dagrun.py", line 178, in refresh_from_db
DR.run_id == self.run_id,
File "/home/app/airflow_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3500, in one
raise orm_exc.NoResultFound("No row was found for one()")
sqlalchemy.orm.exc.NoResultFound: No row was found for one()"><pre class="notranslate"><code class="notranslate">(airflow_venv) (base) app@lunar_01:airflow$ airflow dags test tutorial 2015-06-01
[2021-02-16 04:29:22,355] {dagbag.py:448} INFO - Filling up the DagBag from /home/app/Lunar/src/airflow/dags
[2021-02-16 04:29:22,372] {example_kubernetes_executor_config.py:174} WARNING - Could not import DAGs in example_kubernetes_executor_config.py: No module named 'kubernetes'
[2021-02-16 04:29:22,373] {example_kubernetes_executor_config.py:175} WARNING - Install kubernetes dependencies with: pip install apache-airflow['cncf.kubernetes']
Traceback (most recent call last):
File "/home/app/airflow_venv/bin/airflow", line 10, in <module>
sys.exit(main())
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 65, in wrapper
return func(*args, session=session, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/cli.py", line 89, in wrapper
return f(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/cli/commands/dag_command.py", line 389, in dag_test
dag.run(executor=DebugExecutor(), start_date=args.execution_date, end_date=args.execution_date)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/models/dag.py", line 1706, in run
job.run()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/base_job.py", line 237, in run
self._execute()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 65, in wrapper
return func(*args, session=session, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 805, in _execute
session=session,
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 62, in wrapper
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 715, in _execute_for_run_dates
tis_map = self._task_instances_for_dag_run(dag_run, session=session)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 62, in wrapper
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 359, in _task_instances_for_dag_run
dag_run.refresh_from_db()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 65, in wrapper
return func(*args, session=session, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/models/dagrun.py", line 178, in refresh_from_db
DR.run_id == self.run_id,
File "/home/app/airflow_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3500, in one
raise orm_exc.NoResultFound("No row was found for one()")
sqlalchemy.orm.exc.NoResultFound: No row was found for one()
</code></pre></div>
<p dir="auto"><strong>backfill cli command result:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(airflow_venv) (base) app@lunar_01:airflow$ airflow dags backfill tutorial --start-date 2015-06-01 --end-date 2015-06-07
/home/app/airflow_venv/lib/python3.7/site-packages/airflow/cli/commands/dag_command.py:62 PendingDeprecationWarning: --ignore-first-depends-on-past is deprecated as the value is always set to True
[2021-02-16 04:30:16,979] {dagbag.py:448} INFO - Filling up the DagBag from /home/app/Lunar/src/airflow/dags
[2021-02-16 04:30:16,996] {example_kubernetes_executor_config.py:174} WARNING - Could not import DAGs in example_kubernetes_executor_config.py: No module named 'kubernetes'
[2021-02-16 04:30:16,996] {example_kubernetes_executor_config.py:175} WARNING - Install kubernetes dependencies with: pip install apache-airflow['cncf.kubernetes']
Traceback (most recent call last):
File "/home/app/airflow_venv/bin/airflow", line 10, in <module>
sys.exit(main())
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/cli.py", line 89, in wrapper
return f(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/cli/commands/dag_command.py", line 116, in dag_backfill
run_backwards=args.run_backwards,
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/models/dag.py", line 1706, in run
job.run()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/base_job.py", line 237, in run
self._execute()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 65, in wrapper
return func(*args, session=session, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 805, in _execute
session=session,
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 62, in wrapper
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 715, in _execute_for_run_dates
tis_map = self._task_instances_for_dag_run(dag_run, session=session)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 62, in wrapper
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 359, in _task_instances_for_dag_run
dag_run.refresh_from_db()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 65, in wrapper
return func(*args, session=session, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/models/dagrun.py", line 178, in refresh_from_db
DR.run_id == self.run_id,
File "/home/app/airflow_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3500, in one
raise orm_exc.NoResultFound("No row was found for one()")
sqlalchemy.orm.exc.NoResultFound: No row was found for one()"><pre class="notranslate"><code class="notranslate">(airflow_venv) (base) app@lunar_01:airflow$ airflow dags backfill tutorial --start-date 2015-06-01 --end-date 2015-06-07
/home/app/airflow_venv/lib/python3.7/site-packages/airflow/cli/commands/dag_command.py:62 PendingDeprecationWarning: --ignore-first-depends-on-past is deprecated as the value is always set to True
[2021-02-16 04:30:16,979] {dagbag.py:448} INFO - Filling up the DagBag from /home/app/Lunar/src/airflow/dags
[2021-02-16 04:30:16,996] {example_kubernetes_executor_config.py:174} WARNING - Could not import DAGs in example_kubernetes_executor_config.py: No module named 'kubernetes'
[2021-02-16 04:30:16,996] {example_kubernetes_executor_config.py:175} WARNING - Install kubernetes dependencies with: pip install apache-airflow['cncf.kubernetes']
Traceback (most recent call last):
File "/home/app/airflow_venv/bin/airflow", line 10, in <module>
sys.exit(main())
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/cli.py", line 89, in wrapper
return f(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/cli/commands/dag_command.py", line 116, in dag_backfill
run_backwards=args.run_backwards,
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/models/dag.py", line 1706, in run
job.run()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/base_job.py", line 237, in run
self._execute()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 65, in wrapper
return func(*args, session=session, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 805, in _execute
session=session,
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 62, in wrapper
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 715, in _execute_for_run_dates
tis_map = self._task_instances_for_dag_run(dag_run, session=session)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 62, in wrapper
return func(*args, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/jobs/backfill_job.py", line 359, in _task_instances_for_dag_run
dag_run.refresh_from_db()
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/utils/session.py", line 65, in wrapper
return func(*args, session=session, **kwargs)
File "/home/app/airflow_venv/lib/python3.7/site-packages/airflow/models/dagrun.py", line 178, in refresh_from_db
DR.run_id == self.run_id,
File "/home/app/airflow_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3500, in one
raise orm_exc.NoResultFound("No row was found for one()")
sqlalchemy.orm.exc.NoResultFound: No row was found for one()
</code></pre></div> | 1 |
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<p dir="auto">A user has run the unit tests and is confused that many of them fail when running with the default SQLite database. in theory it would be nice for every single unit test to check against the current database engine and to not run if it is known that the engine does not support a given operation.</p>
<p dir="auto">(omitting unit test output, descriptions follow)</p> | <p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">because an inheritance relationship copies the properties from the base mapper to the child mapper at construction time, an add_property on the base mapper fails to propigate to the child mapper. this is most apparent when creating a backref against the base mapper:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" content_type = Table('content_type', engine,
Column('id', Integer, primary_key=True)
)
content = Table('content', engine,
Column('id', Integer, primary_key=True),
Column('content_type_id', Integer, ForeignKey('content_type.id'))
)
product = Table('product', engine,
Column('id', Integer, ForeignKey('content.id'), primary_key=True)
)
class ContentType(object): pass
class Content(object): pass
class Product(Content): pass
# this test fails currently
contents = mapper(Content, content)
products = mapper(Product, product, inherits=contents)
content_types = mapper(ContentType, content_type, properties={
'content':relation(contents, backref='contenttype')
})
p = Product()
p.contenttype = ContentType()"><pre class="notranslate"><code class="notranslate"> content_type = Table('content_type', engine,
Column('id', Integer, primary_key=True)
)
content = Table('content', engine,
Column('id', Integer, primary_key=True),
Column('content_type_id', Integer, ForeignKey('content_type.id'))
)
product = Table('product', engine,
Column('id', Integer, ForeignKey('content.id'), primary_key=True)
)
class ContentType(object): pass
class Content(object): pass
class Product(Content): pass
# this test fails currently
contents = mapper(Content, content)
products = mapper(Product, product, inherits=contents)
content_types = mapper(ContentType, content_type, properties={
'content':relation(contents, backref='contenttype')
})
p = Product()
p.contenttype = ContentType()
</code></pre></div> | 1 |
<p dir="auto">This code crashes the compiler</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
let mut a = [];
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> <span class="pl-k">mut</span> a = <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc --version
rustc 1.0.0-nightly (d754722a0 2015-03-31) (built 2015-04-01)"><pre class="notranslate"><code class="notranslate">rustc --version
rustc 1.0.0-nightly (d754722a0 2015-03-31) (built 2015-04-01)
</code></pre></div>
<p dir="auto">On windows 7 (64 bit)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a.rs:7:19: 7:21 error: internal compiler error: cat_expr Errd
a.rs:7 let mut a = [];
^~
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>', C:/bot/slave/nightly-dist-rustc-win-64/build/src/libsyntax\diagnostic.rs:130
stack backtrace:
1: 0x7121c7d3 - sys::backtrace::write::h26f3dfa5607ee31dCMD
2: 0x71231b3a - rt::unwind::register::he2da75234a8bfeefOjJ
3: 0x71183130 - rt::unwind::begin_unwind_inner::ha4ed1cd24d71fc5fYgJ
4: 0x7b5af9 - diagnostic::SpanHandler::span_bug::hbab7d9e8f930b2a0BcB
5: 0x7b5ac3 - diagnostic::SpanHandler::span_bug::hbab7d9e8f930b2a0BcB
6: 0xdd24e2 - session::Session::span_bug::h3f7ba5dcfb8c2b2buto
7: 0x1759011 - check::regionck::Rcx<'a, 'tcx>.Visitor<'v>::visit_item::h549cc8f76dffe18bGDd
8: 0x1759afa - check::regionck::Rcx<'a, 'tcx>.Visitor<'v>::visit_local::h20a6c72e4c7a864epEd
9: 0x17540f6 - check::regionck::Rcx<'a, 'tcx>.Visitor<'v>::visit_expr::hbd7455afe8974b7fVDd
10: 0x17e9f13 - check::CheckItemTypesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_ty::h516be61f8f1ab04ccOn
11: 0x17e1e41 - check::CheckItemTypesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h38e34fdef076473eQNn
12: 0x18b6598 - check_crate::h13ec7eeead4478a1BxC
13: 0x18b081c - check_crate::h13ec7eeead4478a1BxC
14: 0x652df73b - driver::phase_3_run_analysis_passes::hfb4b6f3296e77e2coGa
15: 0x652c2a65 - driver::compile_input::h99ce08289465395eQba
16: 0x65376ad3 - run_compiler::h0bba6b17cd7f9dddp2b
17: 0x65374990 - run::hd86bbfcbe6b9750a51b
18: 0x65373b9a - run::hd86bbfcbe6b9750a51b
19: 0x7126a75c - rust_try
20: 0x7126a739 - rust_try
21: 0x65373f08 - run::hd86bbfcbe6b9750a51b
22: 0x71225804 - sys::tcp::TcpListener::bind::h673da3c0fc98ee2diIH
23: 0x7ffb63a013d2 - BaseThreadInitThunk"><pre class="notranslate"><code class="notranslate">a.rs:7:19: 7:21 error: internal compiler error: cat_expr Errd
a.rs:7 let mut a = [];
^~
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>', C:/bot/slave/nightly-dist-rustc-win-64/build/src/libsyntax\diagnostic.rs:130
stack backtrace:
1: 0x7121c7d3 - sys::backtrace::write::h26f3dfa5607ee31dCMD
2: 0x71231b3a - rt::unwind::register::he2da75234a8bfeefOjJ
3: 0x71183130 - rt::unwind::begin_unwind_inner::ha4ed1cd24d71fc5fYgJ
4: 0x7b5af9 - diagnostic::SpanHandler::span_bug::hbab7d9e8f930b2a0BcB
5: 0x7b5ac3 - diagnostic::SpanHandler::span_bug::hbab7d9e8f930b2a0BcB
6: 0xdd24e2 - session::Session::span_bug::h3f7ba5dcfb8c2b2buto
7: 0x1759011 - check::regionck::Rcx<'a, 'tcx>.Visitor<'v>::visit_item::h549cc8f76dffe18bGDd
8: 0x1759afa - check::regionck::Rcx<'a, 'tcx>.Visitor<'v>::visit_local::h20a6c72e4c7a864epEd
9: 0x17540f6 - check::regionck::Rcx<'a, 'tcx>.Visitor<'v>::visit_expr::hbd7455afe8974b7fVDd
10: 0x17e9f13 - check::CheckItemTypesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_ty::h516be61f8f1ab04ccOn
11: 0x17e1e41 - check::CheckItemTypesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h38e34fdef076473eQNn
12: 0x18b6598 - check_crate::h13ec7eeead4478a1BxC
13: 0x18b081c - check_crate::h13ec7eeead4478a1BxC
14: 0x652df73b - driver::phase_3_run_analysis_passes::hfb4b6f3296e77e2coGa
15: 0x652c2a65 - driver::compile_input::h99ce08289465395eQba
16: 0x65376ad3 - run_compiler::h0bba6b17cd7f9dddp2b
17: 0x65374990 - run::hd86bbfcbe6b9750a51b
18: 0x65373b9a - run::hd86bbfcbe6b9750a51b
19: 0x7126a75c - rust_try
20: 0x7126a739 - rust_try
21: 0x65373f08 - run::hd86bbfcbe6b9750a51b
22: 0x71225804 - sys::tcp::TcpListener::bind::h673da3c0fc98ee2diIH
23: 0x7ffb63a013d2 - BaseThreadInitThunk
</code></pre></div> | <p dir="auto">Test case:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn main() { []; }"><pre class="notranslate"><code class="notranslate">fn main() { []; }
</code></pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=1 rustc test.rs
test.rs:1:13: 1:15 error: internal compiler error: cat_expr Errd
test.rs:1 fn main() { []; }
^~
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:129
stack backtrace:
1: 0xcc029720 - sys::backtrace::write::h66f3f2784d0f6c5ddgA
2: 0xcc051b80 - panicking::on_panic::h6fdde9e4e9166fe6jaJ
3: 0xcbf91c30 - rt::unwind::begin_unwind_inner::hba10c536ef2aae75MQI
4: 0xc92a10c0 - rt::unwind::begin_unwind::h11287547919384241778
5: 0xc92a1050 - diagnostic::SpanHandler::span_bug::h551f703868554ecfUBD
6: 0xc9e32fe0 - session::Session::span_bug::h10f6b5fdbea6485fbjp
7: 0xcb6c5920 - check::regionck::visit_expr::hc78138689559ecf8Yrd
8: 0xcb6c35c0 - check::regionck::Rcx<'a, 'tcx>::visit_fn_body::h75e2fac33dc50b43a4c
9: 0xcb75ee50 - check::check_bare_fn::hf42e5aabaa5cb880Oan
10: 0xcb756f40 - check::check_item::hdbe569c101f96905stn
11: 0xcb822f10 - check_crate::closure.36015
12: 0xcb81d9c0 - check_crate::h9d44bf3fde687089EXB
13: 0xcc6a38c0 - driver::phase_3_run_analysis_passes::h36c633d41f11ca74wFa
14: 0xcc689ec0 - driver::compile_input::h0de317319ab5c701Hba
15: 0xcc754e20 - run_compiler::hffa0c0711e361de8E5b
16: 0xcc753720 - thunk::F.Invoke<A, R>::invoke::h12673221910893163557
17: 0xcc752610 - rt::unwind::try::try_fn::h15130568597725528481
18: 0xcc0bd740 - rust_try_inner
19: 0xcc0bd730 - rust_try
20: 0xcc752910 - thunk::F.Invoke<A, R>::invoke::h3924406537784056782
21: 0xcc03d990 - sys::thread::thread_start::h3734be2229bd3edegEE
22: 0xc5f650c0 - start_thread
23: 0xcbc0a449 - __clone
24: 0x0 - <unknown>"><pre class="notranslate"><code class="notranslate">$ RUST_BACKTRACE=1 rustc test.rs
test.rs:1:13: 1:15 error: internal compiler error: cat_expr Errd
test.rs:1 fn main() { []; }
^~
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:129
stack backtrace:
1: 0xcc029720 - sys::backtrace::write::h66f3f2784d0f6c5ddgA
2: 0xcc051b80 - panicking::on_panic::h6fdde9e4e9166fe6jaJ
3: 0xcbf91c30 - rt::unwind::begin_unwind_inner::hba10c536ef2aae75MQI
4: 0xc92a10c0 - rt::unwind::begin_unwind::h11287547919384241778
5: 0xc92a1050 - diagnostic::SpanHandler::span_bug::h551f703868554ecfUBD
6: 0xc9e32fe0 - session::Session::span_bug::h10f6b5fdbea6485fbjp
7: 0xcb6c5920 - check::regionck::visit_expr::hc78138689559ecf8Yrd
8: 0xcb6c35c0 - check::regionck::Rcx<'a, 'tcx>::visit_fn_body::h75e2fac33dc50b43a4c
9: 0xcb75ee50 - check::check_bare_fn::hf42e5aabaa5cb880Oan
10: 0xcb756f40 - check::check_item::hdbe569c101f96905stn
11: 0xcb822f10 - check_crate::closure.36015
12: 0xcb81d9c0 - check_crate::h9d44bf3fde687089EXB
13: 0xcc6a38c0 - driver::phase_3_run_analysis_passes::h36c633d41f11ca74wFa
14: 0xcc689ec0 - driver::compile_input::h0de317319ab5c701Hba
15: 0xcc754e20 - run_compiler::hffa0c0711e361de8E5b
16: 0xcc753720 - thunk::F.Invoke<A, R>::invoke::h12673221910893163557
17: 0xcc752610 - rt::unwind::try::try_fn::h15130568597725528481
18: 0xcc0bd740 - rust_try_inner
19: 0xcc0bd730 - rust_try
20: 0xcc752910 - thunk::F.Invoke<A, R>::invoke::h3924406537784056782
21: 0xcc03d990 - sys::thread::thread_start::h3734be2229bd3edegEE
22: 0xc5f650c0 - start_thread
23: 0xcbc0a449 - __clone
24: 0x0 - <unknown>
</code></pre></div>
<p dir="auto">Compiler version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 1.0.0-nightly (b47aebe3f 2015-02-26) (built 2015-02-27)
binary: rustc
commit-hash: b47aebe3fc2da06c760fd8ea19f84cbc41d34831
commit-date: 2015-02-26
build-date: 2015-02-27
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 1.0.0-nightly (b47aebe3f 2015-02-26) (built 2015-02-27)
binary: rustc
commit-hash: b47aebe3fc2da06c760fd8ea19f84cbc41d34831
commit-date: 2015-02-26
build-date: 2015-02-27
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly
</code></pre></div>
<p dir="auto">I modified the test case in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="59341575" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/22894" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/22894/hovercard" href="https://github.com/rust-lang/rust/issues/22894">#22894</a> by moving the <code class="notranslate">&*""</code> into <code class="notranslate">fn main()</code>, and I saw the same ICE. I then changed the <code class="notranslate">""</code> to the similar <code class="notranslate">&[]</code>, and I saw an ICE with a different error message and a different stack trace (e.g. phase 3 instead of phase 4). The <code class="notranslate">&</code> and <code class="notranslate">*</code> are unnecessary.</p>
<p dir="auto">I also see the <code class="notranslate">cat_expr Errd</code> message in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="56894364" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/22037" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/22037/hovercard" href="https://github.com/rust-lang/rust/issues/22037">#22037</a>, but there are differences -- this issue happens in phase 3 rather than 4, and there is no "fictitious type" message.</p> | 1 |
<h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">I like to use multiple desktops, I have one for Work and another for Home time. I would love if I could specify certain apps to always open on a designated desktop. For example, all my work needs to be done in Chrome, but I use Firefox as my personal browser. I'd love if I could tell Chrome to always open on the Work desktop and Firefox to always open on the Home desktop.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">I'm open to methods on how to assign this kind of thing to a window. Maybe add a right click option to windows that appear when I WinKey+Tab that lets me "pin" it to a specific desktop?</p> | <p dir="auto">Please can you add feature in Keyboard Manager to map shortcuts keys to type symbols like, Alt(Left) + a would type "π".<br>
<g-emoji class="g-emoji" alias="+1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png">👍</g-emoji></p> | 0 |
<p dir="auto">There seems to have been an API change between React 0.12 and 0.13 that's not covered in the documentation. When using <code class="notranslate">JSXTransformer.transform</code> with the <code class="notranslate">sourceMap</code> option, the source map is now returned as a plain JavaScript object. Previously it would return an instance of <code class="notranslate">SourceMapGenerator</code> and you'd need to call <code class="notranslate">.toJSON()</code> to get the actual source map.</p>
<p dir="auto">Is this an intentional change that just got overlooked when writing the documentation?</p> | <p dir="auto">i'm trying to create my apps, app have function like maps app of google. my app have 2 scene: - first scene: is mapview and have a search input in the top of the scene, when user click on search input, app will navigate to second scene (search scene) - second scene: i implemented module react-native-google-places-autocomplete, when user input text this component will give suggestion and autocomplete place.</p>
<p dir="auto">I get place info (description and coordinate...) and pass this props through Actions.pop() method of react-native-router-flux. then get props and trigger componentWillReceiveProps to update region object of mapview component (first scene). But seemly componentWillReceiveProps do not work. I stuck there. Do you know how to solve it or know other way to do it? Please help me!</p>
<p dir="auto">This is my first scene code (mapview componet)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import React, { Component } from 'react';
import {
AppRegistry,
Dimensions,
StyleSheet,
Text,
TextInput,
TouchableHighlight,
Image,
View
} from 'react-native';
import { Actions } from 'react-native-router-flux';
import MapView from 'react-native-maps';
var {GooglePlacesAutocomplete} = require('react-native-google-places-autocomplete');
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 21.035080;
const LONGITUDE = 105.793627;
const LATITUDE_DELTA = 0.0922;
const LONGITUDE_DELTA = LATITUDE_DELTA * ASPECT_RATIO;
export default class Hub extends Component {
constructor(props){
super(props);
this.state = {
textQuery: 'Searh a place',
region: {},
markers:[],
mapStyle:null
};
}
componentWillMount() {
this.initial ();
};
initial () {
navigator.geolocation.getCurrentPosition(
(position) => {
console.log(position);
this.setState({
region: {
latitude: position.coords.latitude,
longitude: position.coords.longitude,
latitudeDelta: LATITUDE_DELTA,
longitudeDelta: LONGITUDE_DELTA,
},
});
}, (error) => {
console.log(error);
this.setState({
region: {
latitude: LATITUDE,
longitude: LONGITUDE,
latitudeDelta: LATITUDE_DELTA,
longitudeDelta: LONGITUDE_DELTA,
},
});
},
);
}
};
componentWillReceiveProps(nextProps){
this.updatePlace();
};
updatePlace = (props = this.props) => {
// do something with props
console.log('now running');
this.setState({
textQuery: props.address,
region: {
latitude: props.latitude,
longitude: props.longitude,
latitudeDelta: LATITUDE_DELTA,
longitudeDelta: LONGITUDE_DELTA,
},
});
};
onRegionChange = (region) => {
this.setState({ region });
};
render() {
return (
<View style ={styles.container}>
<TouchableHighlight onPress={Actions.placesearch}>
<View style={styles.searchContainer}>
<Text style={styles.seartTitle}>
{this.state.textQuery}
</Text>
</View>
</TouchableHighlight>
<MapView
style={styles.map}
region={this.state.region}
onRegionChange={this.onRegionChange}
>
{this.state.markers.map = (marker => (
<MapView.Marker
coordinate={marker.latlng}
title={marker.title}
description={marker.description}
identifier={marker.id}
/>
))}
</MapView>
</View>
);
}
}"><pre class="notranslate"><code class="notranslate">import React, { Component } from 'react';
import {
AppRegistry,
Dimensions,
StyleSheet,
Text,
TextInput,
TouchableHighlight,
Image,
View
} from 'react-native';
import { Actions } from 'react-native-router-flux';
import MapView from 'react-native-maps';
var {GooglePlacesAutocomplete} = require('react-native-google-places-autocomplete');
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 21.035080;
const LONGITUDE = 105.793627;
const LATITUDE_DELTA = 0.0922;
const LONGITUDE_DELTA = LATITUDE_DELTA * ASPECT_RATIO;
export default class Hub extends Component {
constructor(props){
super(props);
this.state = {
textQuery: 'Searh a place',
region: {},
markers:[],
mapStyle:null
};
}
componentWillMount() {
this.initial ();
};
initial () {
navigator.geolocation.getCurrentPosition(
(position) => {
console.log(position);
this.setState({
region: {
latitude: position.coords.latitude,
longitude: position.coords.longitude,
latitudeDelta: LATITUDE_DELTA,
longitudeDelta: LONGITUDE_DELTA,
},
});
}, (error) => {
console.log(error);
this.setState({
region: {
latitude: LATITUDE,
longitude: LONGITUDE,
latitudeDelta: LATITUDE_DELTA,
longitudeDelta: LONGITUDE_DELTA,
},
});
},
);
}
};
componentWillReceiveProps(nextProps){
this.updatePlace();
};
updatePlace = (props = this.props) => {
// do something with props
console.log('now running');
this.setState({
textQuery: props.address,
region: {
latitude: props.latitude,
longitude: props.longitude,
latitudeDelta: LATITUDE_DELTA,
longitudeDelta: LONGITUDE_DELTA,
},
});
};
onRegionChange = (region) => {
this.setState({ region });
};
render() {
return (
<View style ={styles.container}>
<TouchableHighlight onPress={Actions.placesearch}>
<View style={styles.searchContainer}>
<Text style={styles.seartTitle}>
{this.state.textQuery}
</Text>
</View>
</TouchableHighlight>
<MapView
style={styles.map}
region={this.state.region}
onRegionChange={this.onRegionChange}
>
{this.state.markers.map = (marker => (
<MapView.Marker
coordinate={marker.latlng}
title={marker.title}
description={marker.description}
identifier={marker.id}
/>
))}
</MapView>
</View>
);
}
}
</code></pre></div>
<p dir="auto">This is my second scene code (search places component)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import { Actions } from 'react-native-router-flux';
var {GooglePlacesAutocomplete} = require('react-native-google-places-autocomplete');
export default class PlaceSearch extends Component {
constructor(props){
super(props);
this.state = {
};
}
setLocation (data, details) {
var d, da = {};
var da = data;
var d = details;
Actions.pop({latitude: d.geometry.location.lat, longitude: d.geometry.location.lng, address: da.description});
};
render() {
return (
<View style={styles.container}>
<GooglePlacesAutocomplete
placeholder='Search'
minLength={2} // minimum length of text to search
autoFocus={false}
fetchDetails={true}
renderDescription={(row) => row.description} // custom description render
onPress={(data, details = null) => { // 'details' is provided when fetchDetails = true
this.setLocation(data, details);
//console.log(data);
//console.log(details);
}}
getDefaultValue={() => {
return ''; // text input default value
}}
query={{
// available options: https://developers.google.com/places/web-service/autocomplete
key: 'AIzaSyDwa-YQOdts8gmrY49nkl5NX8kd7PSXNIs',
language: 'vi', // language of the results
// default: 'geocode'
components: 'country:vn',
}}
styles={{
description: {
fontWeight: 'bold',
},
predefinedPlacesDescription: {
color: '#1faadb',
},
}}
currentLocation={true} // Will add a 'Current location' button at the top of the predefined places list
currentLocationLabel="Current location"
nearbyPlacesAPI='GooglePlacesSearch' // Which API to use: GoogleReverseGeocoding or GooglePlacesSearch
GoogleReverseGeocodingQuery={{
// available options for GoogleReverseGeocoding API : https://developers.google.com/maps/documentation/geocoding/intro
}}
GooglePlacesSearchQuery={{
// available options for GooglePlacesSearch API : https://developers.google.com/places/web-service/search
rankby: 'distance',
types: 'food',
}}
filterReverseGeocodingByTypes={['locality', 'administrative_area_level_3']} // filter the reverse geocoding results by types - ['locality', 'administrative_area_level_3'] if you want to display only cities
//predefinedPlaces={[homePlace, workPlace]}
debounce={200} // debounce the requests in ms. Set to 0 to remove debounce. By default 0ms.
/>
</View>
);
}
}"><pre class="notranslate"><code class="notranslate">import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import { Actions } from 'react-native-router-flux';
var {GooglePlacesAutocomplete} = require('react-native-google-places-autocomplete');
export default class PlaceSearch extends Component {
constructor(props){
super(props);
this.state = {
};
}
setLocation (data, details) {
var d, da = {};
var da = data;
var d = details;
Actions.pop({latitude: d.geometry.location.lat, longitude: d.geometry.location.lng, address: da.description});
};
render() {
return (
<View style={styles.container}>
<GooglePlacesAutocomplete
placeholder='Search'
minLength={2} // minimum length of text to search
autoFocus={false}
fetchDetails={true}
renderDescription={(row) => row.description} // custom description render
onPress={(data, details = null) => { // 'details' is provided when fetchDetails = true
this.setLocation(data, details);
//console.log(data);
//console.log(details);
}}
getDefaultValue={() => {
return ''; // text input default value
}}
query={{
// available options: https://developers.google.com/places/web-service/autocomplete
key: 'AIzaSyDwa-YQOdts8gmrY49nkl5NX8kd7PSXNIs',
language: 'vi', // language of the results
// default: 'geocode'
components: 'country:vn',
}}
styles={{
description: {
fontWeight: 'bold',
},
predefinedPlacesDescription: {
color: '#1faadb',
},
}}
currentLocation={true} // Will add a 'Current location' button at the top of the predefined places list
currentLocationLabel="Current location"
nearbyPlacesAPI='GooglePlacesSearch' // Which API to use: GoogleReverseGeocoding or GooglePlacesSearch
GoogleReverseGeocodingQuery={{
// available options for GoogleReverseGeocoding API : https://developers.google.com/maps/documentation/geocoding/intro
}}
GooglePlacesSearchQuery={{
// available options for GooglePlacesSearch API : https://developers.google.com/places/web-service/search
rankby: 'distance',
types: 'food',
}}
filterReverseGeocodingByTypes={['locality', 'administrative_area_level_3']} // filter the reverse geocoding results by types - ['locality', 'administrative_area_level_3'] if you want to display only cities
//predefinedPlaces={[homePlace, workPlace]}
debounce={200} // debounce the requests in ms. Set to 0 to remove debounce. By default 0ms.
/>
</View>
);
}
}
</code></pre></div> | 0 |
<p dir="auto">The validator (<a href="http://symfony.com/doc/master/reference/constraints/UserPassword.html" rel="nofollow">http://symfony.com/doc/master/reference/constraints/UserPassword.html</a>) fails after updating to 2.1.</p>
add('current_password', 'password', array(
'label' => 'form.current_password',
'translation_domain' => 'FOSUserBundle',
'mapped' => false,
'constraints' => new UserPassword(), <<<<< fails
));
$builder->add('new', 'repeated', array(
'type' => 'password',
'options' => array('translation_domain' => 'FOSUserBundle'),
'first_options' => array('label' => 'form.new_password'),
'second_options' => array('label' => 'form.new_password_confirmation'),
));
}
```
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Cmf\UserBundle\Entity\User',
'intention' => 'change_password',
));
}
public function getName()
{
return 'fos_user_change_password';
}
```
}
error given:
[{"message":"The User must extend
UserInterface","class":"Symfony\Component\Validator\Exception\ConstraintDefinitionException","trace":[{"namespace":"","short_class":"","class":"","type":"","function":"","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Security\Core\Validator\Constraint\UserPasswordValidator.php","line":37,"args":[]},{"namespace":"Symfony\Component\Security\Core\Validator\Constraint","short_class":"UserPasswordValidator","class":"Symfony\Component\Security\Core\Validator\Constraint\UserPasswordValidator","type":"->","function":"validate","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":182,"args":[["string","password"],["object","Symfony\Component\Security\Core\Validator\Constraint\UserPassword"]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkConstraint","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Form\Extension\Validator\Constraints\FormValidator.php","line":75,"args":[["object","Symfony\Component\Security\Core\Validator\Constraint\UserPassword"],["string","password"],["string","Default"],["string","children[current_password].data"]]},{"namespace":"Symfony\Component\Form\Extension\Validator\Constraints","short_class":"FormValidator","class":"Symfony\Component\Form\Extension\Validator\Constraints\FormValidator","type":"->","function":"validate","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":182,"args":[["object","Symfony\Component\Form\Form"],["object","Symfony\Component\Form\Extension\Validator\Constraints\Form"]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkConstraint","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":105,"args":[["object","Symfony\Component\Form\Extension\Validator\Constraints\Form"],["object","Symfony\Component\Form\Form"],["string","Default"],["string","children[current_password]"],["string","Symfony\Component\Form\Form"]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkObjectForGroup","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":85,"args":[["object","Symfony\Component\Validator\Mapping\ClassMetadata"],["object","Symfony\Component\Form\Form"],["string","Default"],["string","children[current_password]"]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkObject","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":163,"args":[["object","Symfony\Component\Validator\Mapping\ClassMetadata"],["object","Symfony\Component\Form\Form"],["string","Default"],["string","children[current_password]"]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkReference","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":156,"args":[["object","Symfony\Component\Form\Form"],["string","Default"],["string","children[current_password]"],["boolean",false],["boolean",false]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkReference","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":140,"args":[["array",{"current_password":["object","Symfony\Component\Form\Form"],"new":["object","Symfony\Component\Form\Form"]}],["string","Default"],["string","children"],["boolean",true],["boolean",false]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkMember","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":119,"args":[["object","Symfony\Component\Validator\Mapping\PropertyMetadata"],["array",{"current_password":["object","Symfony\Component\Form\Form"],"new":["object","Symfony\Component\Form\Form"]}],["string","Default"],["string","children"],["null",null]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkProperty","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":111,"args":[["object","Symfony\Component\Validator\Mapping\ClassMetadata"],["string","children"],["object","Symfony\Component\Form\Form"],["string","Default"],["string","children"],["null",null]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkObjectForGroup","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":85,"args":[["object","Symfony\Component\Validator\Mapping\ClassMetadata"],["object","Symfony\Component\Form\Form"],["string","Default"],["string",""]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkObject","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\Validator.php","line":64,"args":[["object","Symfony\Component\Validator\Mapping\ClassMetadata"],["object","Symfony\Component\Form\Form"],["string","Default"],["string",""]]},{"namespace":"Symfony\Component\Validator","short_class":"Validator","class":"Symfony\Component\Validator\Validator","type":"->","function":"Symfony\Component\Validator\{closure}","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\Validator.php","line":138,"args":[["object","Symfony\Component\Validator\GraphWalker"],["string","Default"]]},{"namespace":"Symfony\Component\Validator","short_class":"Validator","class":"Symfony\Component\Validator\Validator","type":"->","function":"validateGraph","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\Validator.php","line":67,"args":[["object","Symfony\Component\Form\Form"],["object","Closure"],["null",null]]},{"namespace":"Symfony\Component\Validator","short_class":"Validator","class":"Symfony\Component\Validator\Validator","type":"->","function":"validate","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener.php","line":55,"args":[["object","Symfony\Component\Form\Form"]]},{"namespace":"Symfony\Component\Form\Extension\Validator\EventListener","short_class":"ValidationListener","class":"Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener","type":"->","function":"validateForm","file":null,"line":null,"args":[["object","Symfony\Component\Form\FormEvent"]]},{"namespace":"","short_class":"","class":"","type":"","function":"call_user_func","file":"D:\Dev\wamp\www\cmf\app\cache\dev\classes.php","line":4781,"args":[["array",[["object","Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener"],["string","validateForm"]]],["object","Symfony\Component\Form\FormEvent"]]},{"namespace":"Symfony\Component\EventDispatcher","short_class":"EventDispatcher","class":"Symfony\Component\EventDispatcher\EventDispatcher","type":"->","function":"doDispatch","file":"D:\Dev\wamp\www\cmf\app\cache\dev\classes.php","line":4695,"args":[["array",[["array",[["object","Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener"],["string","validateForm"]]]]],["string","form.post_bind"],["object","Symfony\Component\Form\FormEvent"]]},{"namespace":"Symfony\Component\EventDispatcher","short_class":"EventDispatcher","class":"Symfony\Component\EventDispatcher\EventDispatcher","type":"->","function":"dispatch","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\ImmutableEventDispatcher.php","line":42,"args":[["string","form.post_bind"],["object","Symfony\Component\Form\FormEvent"]]},{"namespace":"Symfony\Component\EventDispatcher","short_class":"ImmutableEventDispatcher","class":"Symfony\Component\EventDispatcher\ImmutableEventDispatcher","type":"->","function":"dispatch","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Form\Form.php","line":603,"args":[["string","form.post_bind"],["object","Symfony\Component\Form\FormEvent"]]},{"namespace":"Symfony\Component\Form","short_class":"Form","class":"Symfony\Component\Form\Form","type":"->","function":"bind","file":"D:\Dev\wamp\www\cmf\src\Cmf\UserBundle\Controller\UsersController.php","line":24,"args":[["array",{"current_password":["string","password"],"new":["array",{"first":["string","test1"],"second":["string","test1"]}]}]]},{"namespace":"Cmf\UserBundle\Controller","short_class":"UsersController","class":"Cmf\UserBundle\Controller\UsersController","type":"->","function":"processForm","file":"D:\Dev\wamp\www\cmf\src\Cmf\UserBundle\Controller\UsersController.php","line":138,"args":[["object","Cmf\UserBundle\Entity\User"],["object","Cmf\UserBundle\Form\ChangePasswordType"]]},{"namespace":"Cmf\UserBundle\Controller","short_class":"UsersController","class":"Cmf\UserBundle\Controller\UsersController","type":"->","function":"patchPasswordUserAction","file":null,"line":null,"args":[["string","2"]]},{"namespace":"","short_class":"","class":"","type":"","function":"call_user_func_array","file":"D:\Dev\wamp\www\cmf\app\bootstrap.php.cache","line":1419,"args":[["array",[["object","Cmf\UserBundle\Controller\UsersController"],["string","patchPasswordUserAction"]]],["array",[["string","2"]]]]},{"namespace":"Symfony\Component\HttpKernel","short_class":"HttpKernel","class":"Symfony\Component\HttpKernel\HttpKernel","type":"->","function":"handleRaw","file":"D:\Dev\wamp\www\cmf\app\bootstrap.php.cache","line":1383,"args":[["object","Symfony\Component\HttpFoundation\Request"],["string","1"]]},{"namespace":"Symfony\Component\HttpKernel","short_class":"HttpKernel","class":"Symfony\Component\HttpKernel\HttpKernel","type":"->","function":"handle","file":"D:\Dev\wamp\www\cmf\app\bootstrap.php.cache","line":1559,"args":[["object","Symfony\Component\HttpFoundation\Request"],["string","1"],["boolean",true]]},{"namespace":"Symfony\Bundle\FrameworkBundle","short_class":"HttpKernel","class":"Symfony\Bundle\FrameworkBundle\HttpKernel","type":"->","function":"handle","file":"D:\Dev\wamp\www\cmf\app\bootstrap.php.cache","line":610,"args":[["object","Symfony\Component\HttpFoundation\Request"],["string","1"],["boolean",true]]},{"namespace":"Symfony\Component\HttpKernel","short_class":"Kernel","class":"Symfony\Component\HttpKernel\Kernel","type":"->","function":"handle","file":"D:\Dev\wamp\www\cmf\web\app_dev.php","line":28,"args":[["object","Symfony\Component\HttpFoundation\Request"]]}]}]
Removing the 'constraints' => new UserPassword(), solves the issue, but then the validation is gone.
This is after doing composer update @ 2.1 release yesterday and a default config FOSUserBundle and FOSRestBundle. | <p dir="auto">The validator (<a href="http://symfony.com/doc/master/reference/constraints/UserPassword.html" rel="nofollow">http://symfony.com/doc/master/reference/constraints/UserPassword.html</a>) fails after updating to 2.1.</p>
add('current_password', 'password', array(
'label' => 'form.current_password',
'translation_domain' => 'FOSUserBundle',
'mapped' => false,
'constraints' => new UserPassword(), <<<<< fails
));
$builder->add('new', 'repeated', array(
'type' => 'password',
'options' => array('translation_domain' => 'FOSUserBundle'),
'first_options' => array('label' => 'form.new_password'),
'second_options' => array('label' => 'form.new_password_confirmation'),
));
}
```
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Cmf\UserBundle\Entity\User',
'intention' => 'change_password',
));
}
public function getName()
{
return 'fos_user_change_password';
}
```
}
error given:
[{"message":"The User must extend
UserInterface","class":"Symfony\Component\Validator\Exception\ConstraintDefinitionException","trace":[{"namespace":"","short_class":"","class":"","type":"","function":"","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Security\Core\Validator\Constraint\UserPasswordValidator.php","line":37,"args":[]},{"namespace":"Symfony\Component\Security\Core\Validator\Constraint","short_class":"UserPasswordValidator","class":"Symfony\Component\Security\Core\Validator\Constraint\UserPasswordValidator","type":"->","function":"validate","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":182,"args":[["string","password"],["object","Symfony\Component\Security\Core\Validator\Constraint\UserPassword"]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkConstraint","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Form\Extension\Validator\Constraints\FormValidator.php","line":75,"args":[["object","Symfony\Component\Security\Core\Validator\Constraint\UserPassword"],["string","password"],["string","Default"],["string","children[current_password].data"]]},{"namespace":"Symfony\Component\Form\Extension\Validator\Constraints","short_class":"FormValidator","class":"Symfony\Component\Form\Extension\Validator\Constraints\FormValidator","type":"->","function":"validate","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":182,"args":[["object","Symfony\Component\Form\Form"],["object","Symfony\Component\Form\Extension\Validator\Constraints\Form"]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkConstraint","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":105,"args":[["object","Symfony\Component\Form\Extension\Validator\Constraints\Form"],["object","Symfony\Component\Form\Form"],["string","Default"],["string","children[current_password]"],["string","Symfony\Component\Form\Form"]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkObjectForGroup","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":85,"args":[["object","Symfony\Component\Validator\Mapping\ClassMetadata"],["object","Symfony\Component\Form\Form"],["string","Default"],["string","children[current_password]"]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkObject","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":163,"args":[["object","Symfony\Component\Validator\Mapping\ClassMetadata"],["object","Symfony\Component\Form\Form"],["string","Default"],["string","children[current_password]"]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkReference","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":156,"args":[["object","Symfony\Component\Form\Form"],["string","Default"],["string","children[current_password]"],["boolean",false],["boolean",false]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkReference","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":140,"args":[["array",{"current_password":["object","Symfony\Component\Form\Form"],"new":["object","Symfony\Component\Form\Form"]}],["string","Default"],["string","children"],["boolean",true],["boolean",false]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkMember","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":119,"args":[["object","Symfony\Component\Validator\Mapping\PropertyMetadata"],["array",{"current_password":["object","Symfony\Component\Form\Form"],"new":["object","Symfony\Component\Form\Form"]}],["string","Default"],["string","children"],["null",null]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkProperty","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":111,"args":[["object","Symfony\Component\Validator\Mapping\ClassMetadata"],["string","children"],["object","Symfony\Component\Form\Form"],["string","Default"],["string","children"],["null",null]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkObjectForGroup","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\GraphWalker.php","line":85,"args":[["object","Symfony\Component\Validator\Mapping\ClassMetadata"],["object","Symfony\Component\Form\Form"],["string","Default"],["string",""]]},{"namespace":"Symfony\Component\Validator","short_class":"GraphWalker","class":"Symfony\Component\Validator\GraphWalker","type":"->","function":"walkObject","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\Validator.php","line":64,"args":[["object","Symfony\Component\Validator\Mapping\ClassMetadata"],["object","Symfony\Component\Form\Form"],["string","Default"],["string",""]]},{"namespace":"Symfony\Component\Validator","short_class":"Validator","class":"Symfony\Component\Validator\Validator","type":"->","function":"Symfony\Component\Validator\{closure}","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\Validator.php","line":138,"args":[["object","Symfony\Component\Validator\GraphWalker"],["string","Default"]]},{"namespace":"Symfony\Component\Validator","short_class":"Validator","class":"Symfony\Component\Validator\Validator","type":"->","function":"validateGraph","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Validator\Validator.php","line":67,"args":[["object","Symfony\Component\Form\Form"],["object","Closure"],["null",null]]},{"namespace":"Symfony\Component\Validator","short_class":"Validator","class":"Symfony\Component\Validator\Validator","type":"->","function":"validate","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener.php","line":55,"args":[["object","Symfony\Component\Form\Form"]]},{"namespace":"Symfony\Component\Form\Extension\Validator\EventListener","short_class":"ValidationListener","class":"Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener","type":"->","function":"validateForm","file":null,"line":null,"args":[["object","Symfony\Component\Form\FormEvent"]]},{"namespace":"","short_class":"","class":"","type":"","function":"call_user_func","file":"D:\Dev\wamp\www\cmf\app\cache\dev\classes.php","line":4781,"args":[["array",[["object","Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener"],["string","validateForm"]]],["object","Symfony\Component\Form\FormEvent"]]},{"namespace":"Symfony\Component\EventDispatcher","short_class":"EventDispatcher","class":"Symfony\Component\EventDispatcher\EventDispatcher","type":"->","function":"doDispatch","file":"D:\Dev\wamp\www\cmf\app\cache\dev\classes.php","line":4695,"args":[["array",[["array",[["object","Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener"],["string","validateForm"]]]]],["string","form.post_bind"],["object","Symfony\Component\Form\FormEvent"]]},{"namespace":"Symfony\Component\EventDispatcher","short_class":"EventDispatcher","class":"Symfony\Component\EventDispatcher\EventDispatcher","type":"->","function":"dispatch","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\ImmutableEventDispatcher.php","line":42,"args":[["string","form.post_bind"],["object","Symfony\Component\Form\FormEvent"]]},{"namespace":"Symfony\Component\EventDispatcher","short_class":"ImmutableEventDispatcher","class":"Symfony\Component\EventDispatcher\ImmutableEventDispatcher","type":"->","function":"dispatch","file":"D:\Dev\wamp\www\cmf\vendor\symfony\symfony\src\Symfony\Component\Form\Form.php","line":603,"args":[["string","form.post_bind"],["object","Symfony\Component\Form\FormEvent"]]},{"namespace":"Symfony\Component\Form","short_class":"Form","class":"Symfony\Component\Form\Form","type":"->","function":"bind","file":"D:\Dev\wamp\www\cmf\src\Cmf\UserBundle\Controller\UsersController.php","line":24,"args":[["array",{"current_password":["string","password"],"new":["array",{"first":["string","test1"],"second":["string","test1"]}]}]]},{"namespace":"Cmf\UserBundle\Controller","short_class":"UsersController","class":"Cmf\UserBundle\Controller\UsersController","type":"->","function":"processForm","file":"D:\Dev\wamp\www\cmf\src\Cmf\UserBundle\Controller\UsersController.php","line":138,"args":[["object","Cmf\UserBundle\Entity\User"],["object","Cmf\UserBundle\Form\ChangePasswordType"]]},{"namespace":"Cmf\UserBundle\Controller","short_class":"UsersController","class":"Cmf\UserBundle\Controller\UsersController","type":"->","function":"patchPasswordUserAction","file":null,"line":null,"args":[["string","2"]]},{"namespace":"","short_class":"","class":"","type":"","function":"call_user_func_array","file":"D:\Dev\wamp\www\cmf\app\bootstrap.php.cache","line":1419,"args":[["array",[["object","Cmf\UserBundle\Controller\UsersController"],["string","patchPasswordUserAction"]]],["array",[["string","2"]]]]},{"namespace":"Symfony\Component\HttpKernel","short_class":"HttpKernel","class":"Symfony\Component\HttpKernel\HttpKernel","type":"->","function":"handleRaw","file":"D:\Dev\wamp\www\cmf\app\bootstrap.php.cache","line":1383,"args":[["object","Symfony\Component\HttpFoundation\Request"],["string","1"]]},{"namespace":"Symfony\Component\HttpKernel","short_class":"HttpKernel","class":"Symfony\Component\HttpKernel\HttpKernel","type":"->","function":"handle","file":"D:\Dev\wamp\www\cmf\app\bootstrap.php.cache","line":1559,"args":[["object","Symfony\Component\HttpFoundation\Request"],["string","1"],["boolean",true]]},{"namespace":"Symfony\Bundle\FrameworkBundle","short_class":"HttpKernel","class":"Symfony\Bundle\FrameworkBundle\HttpKernel","type":"->","function":"handle","file":"D:\Dev\wamp\www\cmf\app\bootstrap.php.cache","line":610,"args":[["object","Symfony\Component\HttpFoundation\Request"],["string","1"],["boolean",true]]},{"namespace":"Symfony\Component\HttpKernel","short_class":"Kernel","class":"Symfony\Component\HttpKernel\Kernel","type":"->","function":"handle","file":"D:\Dev\wamp\www\cmf\web\app_dev.php","line":28,"args":[["object","Symfony\Component\HttpFoundation\Request"]]}]}]
Removing the 'constraints' => new UserPassword(), solves the issue, but then the validation is gone.
This is after doing composer update @ 2.1 release yesterday and a default config FOSUserBundle and FOSRestBundle. | 1 |
<p dir="auto">by <strong>fgergo</strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?
1. compiling, linking and running ./5.out
package main
import "fmt"
func main() {
fmt.Println("Hello")
}
What is the expected output?
"Hello" is printed.
What do you see instead?
SIGILL: illegal instruction
PC=0x637c4
math.init¡1+0x30 /n/sd/1/go/src/pkg/math/pow10.go:24
math.init¡1()
math.Init¡+0x76c /n/sd/1/go/src/pkg/math/unsafe.go:21
math.Init¡()
reflect.Init¡+0x68 /n/sd/1/go/src/pkg/reflect/value.go:1234
reflect.Init¡()
fmt.Init¡+0x78 /n/sd/1/go/src/pkg/fmt/scan.go:992
fmt.Init¡()
main.init+0x68 /n/sd/1/go/src/cmd/fgergo/a.go:7
main.init()
runtime.mainstart+0x8 /n/sd/1/go/src/pkg/runtime/arm/asm.s:65
runtime.mainstart()
runtime.initdone+0x64 /n/sd/1/go/src/pkg/runtime/proc.c:-1181
runtime.initdone()
trap 0x6
error 0x0
oldmask 0x0
r0 0xe76a0
r1 0x0
r2 0xc013d686
r3 0xcad20
r4 0x0
r5 0x0
r6 0x0
r7 0x0
r8 0x0
r9 0xe7378
r10 0x40022000
fp 0xe5728
ip 0xcafebabe
sp 0x40023fb8
lr 0x640a8
pc 0x637c4
cpsr 0x20000010
fault 0x0
Which compiler are you using (5g, 6g, 8g, gccgo)?
5g
Which operating system are you using?
$ uname -a
Linux dugo 2.6.22.18 #1 Thu Mar 19 14:46:22 IST 2009 armv5tejl GNU/Linux
Which revision are you using? (hg identify)
b91808966dbd+ tip
Please provide any additional information below.
Sheevaplug
$ set|grep GO
GOARCH=arm
GOARM=5
GOOS=linux
GOROOT=/n/sd/1/go
$ gdb --quiet 5.out
(no debugging symbols found)
(gdb) r
Starting program: /n/sd/1/go/src/cmd/fgergo/5.out
Program received signal SIGILL, Illegal instruction.
0x000637c4 in ?? ()
(gdb) disassemble 0x637c0 0x637f0
Dump of assembler code from 0x637c0 to 0x637f0:
0x000637c0: nop (mov r0,r0)
0x000637c4: fconstd d0, #112
0x000637c8: vstr d0, [r0]
0x000637cc: ldr r0, [pc, #268] ; 0x638e0
0x000637d0: nop (mov r0,r0)
0x000637d4: mov r1, #8 ; 0x8
0x000637d8: add r0, r0, r1
0x000637dc: nop (mov r0,r0)
0x000637e0: fconstd d0, #36
0x000637e4: vstr d0, [r0]
0x000637e8: mov r0, #2 ; 0x2
0x000637ec: str r0, [sp, #20]
End of assembler dump.
(gdb)</pre> | <p dir="auto">go/types accepts the following program:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package a
func f() {
switch 0 {
case 0:
case 0:
}
}"><pre class="notranslate"><span class="pl-k">package</span> a
<span class="pl-k">func</span> <span class="pl-en">f</span>() {
<span class="pl-k">switch</span> <span class="pl-c1">0</span> {
<span class="pl-k">case</span> <span class="pl-c1">0</span>:
<span class="pl-k">case</span> <span class="pl-c1">0</span>:
}
}</pre></div>
<p dir="auto">While both gc and gccgo reject it with <code class="notranslate">duplicate case 0 in switch</code>.<br>
Compilers should agree on validity of this program.</p>
<p dir="auto">on commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/golang/go/commit/997b3545fd86c3a2d8e5fe6366174d7786e71278/hovercard" href="https://github.com/golang/go/commit/997b3545fd86c3a2d8e5fe6366174d7786e71278"><tt>997b354</tt></a></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: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable):
Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable):
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> | <p dir="auto">Emojis are rendering unusually small:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/172594/68474189-afccdd00-021c-11ea-8fd6-9cd870d903ac.png"><img src="https://user-images.githubusercontent.com/172594/68474189-afccdd00-021c-11ea-8fd6-9cd870d903ac.png" alt="image" style="max-width: 100%;"></a></p>
<h1 dir="auto">Environment</h1>
<p dir="auto">Microsoft Windows NT 10.0.18908.0<br>
Terminal 0.6.2951.0</p> | 0 |
<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong><br>
I am building a React App on serverless framework. I use webpack to compile both client-side and server-side code with Loadable-Components to do codesplitting. Everything works fine until I try to add <code class="notranslate">/* webpackPrefetch: true */</code> to any of the imports in my Loadables. When I do this, although everything still compiles fine, server code will hard crash when it tries to import my <code class="notranslate"><App /></code> for the SSR.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Cannot read property '__esModule' of undefined
at /Users/alexgawley/code/serverless/tmp/loadable-repro/.webpack/service/src/servers/static.js:29310:34
at Object.<anonymous> (/Users/alexgawley/code/serverless/tmp/loadable-repro/.webpack/service/src/servers/static.js:29312:12)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at /Users/alexgawley/code/serverless/tmp/loadable-repro/node_modules/serverless-offline/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js:157:133
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async InProcessRunner.run (/Users/alexgawley/code/serverless/tmp/loadable-repro/node_modules/serverless-offline/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js:157:9)"><pre class="notranslate"><code class="notranslate">TypeError: Cannot read property '__esModule' of undefined
at /Users/alexgawley/code/serverless/tmp/loadable-repro/.webpack/service/src/servers/static.js:29310:34
at Object.<anonymous> (/Users/alexgawley/code/serverless/tmp/loadable-repro/.webpack/service/src/servers/static.js:29312:12)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at /Users/alexgawley/code/serverless/tmp/loadable-repro/node_modules/serverless-offline/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js:157:133
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async InProcessRunner.run (/Users/alexgawley/code/serverless/tmp/loadable-repro/node_modules/serverless-offline/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js:157:9)
</code></pre></div>
<p dir="auto">If I remove <code class="notranslate">/* webpackPrefetch: true */</code> everything works fine again. I've looked at the compiled code in both cases and there seems to be an additional <code class="notranslate">__webpack_require__</code> function call in the prefetch version of the code that takes the well-formed <code class="notranslate">__webpack_exports__</code> and overwrites it with <code class="notranslate">undefined</code>.</p>
<p dir="auto">With <code class="notranslate">/* webpackPrefetch: true */</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/******/ // module factories are used so entry inlining is disabled
/******/ // startup
/******/ // Load entry module and return exports
/******/ var __webpack_exports__ = __webpack_require__("./src/servers/static.js");
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/ var __webpack_export_target__ = exports;
/******/ for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
/******/ if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
/******/
/******/ })()"><pre class="notranslate"><code class="notranslate">/******/ // module factories are used so entry inlining is disabled
/******/ // startup
/******/ // Load entry module and return exports
/******/ var __webpack_exports__ = __webpack_require__("./src/servers/static.js");
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/ var __webpack_export_target__ = exports;
/******/ for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
/******/ if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
/******/
/******/ })()
</code></pre></div>
<p dir="auto">Without <code class="notranslate">/* webpackPrefetch: true */</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/******/ // module factories are used so entry inlining is disabled
/******/ // startup
/******/ // Load entry module and return exports
/******/ var __webpack_exports__ = __webpack_require__("./src/servers/static.js");
/******/ var __webpack_export_target__ = exports;
/******/ for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
/******/ if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
/******/
/******/ })()"><pre class="notranslate"><code class="notranslate">/******/ // module factories are used so entry inlining is disabled
/******/ // startup
/******/ // Load entry module and return exports
/******/ var __webpack_exports__ = __webpack_require__("./src/servers/static.js");
/******/ var __webpack_export_target__ = exports;
/******/ for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
/******/ if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
/******/
/******/ })()
</code></pre></div>
<p dir="auto">Here's the definition of .O</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ result = fn();
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();"><pre class="notranslate"><code class="notranslate">(() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ result = fn();
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
</code></pre></div>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone https://github.com/agawley/loadable-repro
npm i
npm run offline"><pre class="notranslate"><code class="notranslate">git clone https://github.com/agawley/loadable-repro
npm i
npm run offline
</code></pre></div>
<p dir="auto">load <a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a></p>
<p dir="auto">Remove <code class="notranslate">/* webpackPrefetch: true */</code> from src/client/app.js for everything to work fine.</p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">I shouldn't get this error. My understanding is that adding <code class="notranslate">/* webpackPrefetch: true */</code> should "just work".</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 5.16.0<br>
Node.js version: 12.22.1<br>
Operating System: macOS 10.15.7<br>
Additional tools: See package.json in <a href="https://github.com/agawley/loadable-repro">https://github.com/agawley/loadable-repro</a></p> | <p dir="auto">So, as you may already know, with npm@3 (on the registry now, currently in beta), peerDependencies are no longer installed for you. They act as assertions, warning you if you don't meet their requirements, but they do not break the install nor do they trigger installation of the thing mentioned.</p>
<p dir="auto">This means that <code class="notranslate">npm install -g webpack</code> will not result in a working install out of the box as <code class="notranslate">node-libs-browser</code> won't be installed.</p>
<p dir="auto">I'd like to work with you all to figure out what the best solution is for this. My first reaction would be to just make <code class="notranslate">node-libs-browser</code> a regular dependency. Is there a reason not to do that?</p> | 0 |
<p dir="auto">While downloading by "Customize", allow change default fonts path:<br>
src: url('../fonts/...');</p> | <p dir="auto">Guys I don't see any option for changing fonts path variable as well?</p> | 1 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.33.0]</li>
<li>Operating System: macOS 13.2</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p>
<p dir="auto"><strong>Test file (self-contained)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" await test.step("demo1", async () => {
await page.setExtraHTTPHeaders({ token: "", secret: "" });
await page.route(/(https:\/\/(.*))/, (route) => {
const headers = route.request().headers();
headers["token"] = process.env.token ?? "";
headers["secret"] = process.env.secret ?? "";
route.continue({ headers });
});
await page.goto("https://www.google.com");
});"><pre class="notranslate"> <span class="pl-k">await</span> <span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">step</span><span class="pl-kos">(</span><span class="pl-s">"demo1"</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">setExtraHTTPHeaders</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">token</span>: <span class="pl-s">""</span><span class="pl-kos">,</span> <span class="pl-c1">secret</span>: <span class="pl-s">""</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">route</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span><span class="pl-kos">(</span>https:<span class="pl-cce">\/</span><span class="pl-cce">\/</span><span class="pl-kos">(</span>.<span class="pl-c1">*</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-c1">/</span></span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">route</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">headers</span> <span class="pl-c1">=</span> <span class="pl-s1">route</span><span class="pl-kos">.</span><span class="pl-en">request</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">headers</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">headers</span><span class="pl-kos">[</span><span class="pl-s">"token"</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">token</span> <span class="pl-c1">??</span> <span class="pl-s">""</span><span class="pl-kos">;</span>
<span class="pl-s1">headers</span><span class="pl-kos">[</span><span class="pl-s">"secret"</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">secret</span> <span class="pl-c1">??</span> <span class="pl-s">""</span><span class="pl-kos">;</span>
<span class="pl-s1">route</span><span class="pl-kos">.</span><span class="pl-en">continue</span><span class="pl-kos">(</span><span class="pl-kos">{</span> headers <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-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">"https://www.google.com"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>[Run the test]</li>
<li>[...]</li>
</ul>
<p dir="auto"><strong>Expected</strong><br>
It should not display the route.continue outside of test step<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17619539/235927296-47adc0a7-a73d-49fd-b04b-44362f15e142.png"><img src="https://user-images.githubusercontent.com/17619539/235927296-47adc0a7-a73d-49fd-b04b-44362f15e142.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Actual</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17619539/235927129-9dd5cb04-a7d9-4184-9d15-6d938a94edf9.png"><img width="435" alt="image" src="https://user-images.githubusercontent.com/17619539/235927129-9dd5cb04-a7d9-4184-9d15-6d938a94edf9.png" style="max-width: 100%;"></a></p> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: v1.35.1</li>
<li>Operating System: macOS 13.4</li>
<li>Browser: Chromium</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], },
},
});"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span><span class="pl-kos"></span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Test file (self-contained)</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { mkdtemp, rm } from "fs/promises";
import { tmpdir } from "os";
import path from "path";
import { test as base, chromium, BrowserContext } from "@playwright/test";
const test = base.extend<{
downloadsPath: string;
context: BrowserContext;
}>({
downloadsPath: async ({}, use) => {
const downloadsPath = await mkdtemp(path.join(tmpdir(), "playwright-downloads-path-"));
await use(downloadsPath);
await rm(downloadsPath, { recursive: true });
},
context: async ({ channel, downloadsPath }, use) => {
const context = await chromium.launchPersistentContext("", {
headless: false,
args: [
"--headless=new",
],
downloadsPath,
channel,
});
await use(context);
await context.close();
}
});
test("click to download", async ({ context, downloadsPath }) => {
const page = await context.newPage();
await page.goto("https://www.example.com/");
await page.setContent(`
<a href="https://github.com/microsoft/playwright/archive/refs/tags/v1.35.1.tar.gz">open</a>
`);
const cdpSession = await context.newCDPSession(page);
await cdpSession.send("Browser.setDownloadBehavior", {
behavior: "default",
downloadPath: downloadsPath,
eventsEnabled: true,
});
await cdpSession.detach();
const [download] = await Promise.all([
page.waitForEvent("download"),
page.click("a"),
]);
test.expect(await download.path()).toContain(downloadsPath);
await download.saveAs("tarball.tar.gz");
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">mkdtemp</span><span class="pl-kos">,</span> <span class="pl-s1">rm</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"fs/promises"</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">tmpdir</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"os"</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-s1">path</span> <span class="pl-k">from</span> <span class="pl-s">"path"</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span> <span class="pl-k">as</span> <span class="pl-s1">base</span><span class="pl-kos">,</span> <span class="pl-s1">chromium</span><span class="pl-kos">,</span> <span class="pl-smi">BrowserContext</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"@playwright/test"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">test</span> <span class="pl-c1">=</span> <span class="pl-s1">base</span><span class="pl-kos">.</span><span class="pl-en">extend</span><span class="pl-kos"><</span><span class="pl-kos">{</span>
<span class="pl-c1">downloadsPath</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c1">context</span>: <span class="pl-smi">BrowserContext</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">downloadsPath</span>: <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">use</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">downloadsPath</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">mkdtemp</span><span class="pl-kos">(</span><span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-en">tmpdir</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s">"playwright-downloads-path-"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-s1">downloadsPath</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-en">rm</span><span class="pl-kos">(</span><span class="pl-s1">downloadsPath</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">recursive</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-en">context</span>: <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> channel<span class="pl-kos">,</span> downloadsPath <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">use</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">context</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">chromium</span><span class="pl-kos">.</span><span class="pl-en">launchPersistentContext</span><span class="pl-kos">(</span><span class="pl-s">""</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">headless</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-c1">args</span>: <span class="pl-kos">[</span>
<span class="pl-s">"--headless=new"</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
downloadsPath<span class="pl-kos">,</span>
channel<span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-s1">context</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"click to download"</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> context<span class="pl-kos">,</span> downloadsPath <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">"https://www.example.com/"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">setContent</span><span class="pl-kos">(</span><span class="pl-s">`</span>
<span class="pl-s"> <a href="https://github.com/microsoft/playwright/archive/refs/tags/v1.35.1.tar.gz">open</a></span>
<span class="pl-s"> `</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">cdpSession</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">newCDPSession</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">cdpSession</span><span class="pl-kos">.</span><span class="pl-en">send</span><span class="pl-kos">(</span><span class="pl-s">"Browser.setDownloadBehavior"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">behavior</span>: <span class="pl-s">"default"</span><span class="pl-kos">,</span>
<span class="pl-c1">downloadPath</span>: <span class="pl-s1">downloadsPath</span><span class="pl-kos">,</span>
<span class="pl-c1">eventsEnabled</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">cdpSession</span><span class="pl-kos">.</span><span class="pl-en">detach</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-kos">[</span><span class="pl-s1">download</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-en">all</span><span class="pl-kos">(</span><span class="pl-kos">[</span>
<span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">waitForEvent</span><span class="pl-kos">(</span><span class="pl-s">"download"</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-s">"a"</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-s1">test</span><span class="pl-kos">.</span><span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-k">await</span> <span class="pl-s1">download</span><span class="pl-kos">.</span><span class="pl-en">path</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">toContain</span><span class="pl-kos">(</span><span class="pl-s1">downloadsPath</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">download</span><span class="pl-kos">.</span><span class="pl-en">saveAs</span><span class="pl-kos">(</span><span class="pl-s">"tarball.tar.gz"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>Run the test</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">The test to pass</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto"><code class="notranslate">saveAs</code> fails because the file is actually downloaded to the real user's Download folder.</p>
<p dir="auto"><strong>Notes</strong></p>
<ul dir="auto">
<li>I use <code class="notranslate">Browser.setDownloadBehavior</code> with <code class="notranslate">default</code> behavior to work around <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1520444596" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/19885" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/19885/hovercard" href="https://github.com/microsoft/playwright/issues/19885">#19885</a></li>
</ul> | 0 |
<p dir="auto">With introduction of <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-plugins">next-plugins</a> we've got more functionality and dependencies exposed in <code class="notranslate">next.config.js</code>, using plugins like <code class="notranslate">next-sass</code> and others adds extra development dependencies to the runtime, even in production mode, since <code class="notranslate">next.config.js</code> is execute at server start time.<br>
Requiring us to carry along node modules that we'd never use with production baked artifacts.</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">As we discussed last week, possible solution would be to allow next.js to read lifecycle specific configs, like <code class="notranslate">next.config.dev.js</code> and <code class="notranslate">next.config.build.js</code> with fallback to <code class="notranslate">next.config.js</code>.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Loads <code class="notranslate">next.config.js</code> irrespectively of the lifecycle stage.</p>
<p dir="auto">Thank you.</p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">When using a custom server, routing to a page should automatically bundle the styles of all included components.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">That is not the case. You will need to hard refresh the page to get the styles to be built.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Clone <a href="https://github.com/Kyle-Mendes/next-sass-modules/tree/custom-server">https://github.com/Kyle-Mendes/next-sass-modules/tree/custom-server</a> (make sure you're on the <code class="notranslate">custom-server</code> branch</li>
<li>Run <code class="notranslate">yarn dev</code></li>
<li>visit <code class="notranslate">localhost:3000</code></li>
<li>Click "Test Page"</li>
<li><strong>Observe</strong>: The <code class="notranslate">Headline</code> component is not styled.</li>
<li>Refresh the page</li>
<li><strong>Observe</strong>: The <code class="notranslate">Headline</code> component is styled.</li>
</ol>
<h3 dir="auto">NOTE:</h3>
<p dir="auto">Sometimes, even doing a hard reload results in <code class="notranslate">Headline</code> not being styled.</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</td>
</tr>
<tr>
<td>node</td>
<td>9.11.1</td>
</tr>
<tr>
<td>OS</td>
<td>Mac OS</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table> | 0 |
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.4.0</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">Upgraded airflow from 2.1.4 to 2.4.0, did airflow db upgrade, all seems to work ok<br>
In the new grid view UI though, we don't seem to be able to see running DAGs in the default grid view (All run states)<br>
Filtering for "Running" does show the DAG is actually running, with the latest DAGRun, I'm just wondering why it doesn't show for All run states, the DAG runs shown there are 1 run behind.</p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">Shows all DAG runs from latest backwards, as with old UI</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Upgrade from 2.1.4 to 2.4 and look at grid view for DAGs that have been upgraded and have many runs over the past few years.</p>
<p dir="auto">Not sure if one actually needs to upgrade airflow and db or if the bug is purely from 2.4 Grid view, probably the latter.</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Ubuntu 18.04.6 LTS (Bionic Beaver)</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">2.4 apache-airflow</p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Virtualenv installation</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">AWS Ec2 running airflow using the pinned requirements files you have</p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | <h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.4.0</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">Airflow 2.4.0's grid view has an issue:</p>
<p dir="auto"><strong>Grid view stop showing the latest DAG runs in 2.4.0 (regardless of schedule, it shows old dag runs)</strong></p>
<ul dir="auto">
<li>
<p dir="auto">case 1 (all 25 are old dag runs)<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/14293802/191109057-53522453-907d-4476-b7ef-cc40a9818422.png"><img src="https://user-images.githubusercontent.com/14293802/191109057-53522453-907d-4476-b7ef-cc40a9818422.png" alt="2022-09-19_16-12" style="max-width: 100%;"></a></p>
</li>
<li>
<p dir="auto">case 2 (old and new dag runs are mixed)<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/14293802/191372514-e0d87eb9-92be-4c89-bae4-d4361a5f582b.png"><img src="https://user-images.githubusercontent.com/14293802/191372514-e0d87eb9-92be-4c89-bae4-d4361a5f582b.png" alt="2022-09-20_17-59" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/14293802/191371326-b1a81a54-d1f3-4f55-b668-6ad563a73102.png"><img src="https://user-images.githubusercontent.com/14293802/191371326-b1a81a54-d1f3-4f55-b668-6ad563a73102.png" alt="2022-09-20_17-50" style="max-width: 100%;"></a></p>
</li>
</ul>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">How to reproduce</h3>
<ol dir="auto">
<li>Go to a DAG with >365 dag runs</li>
<li>The place where it's supposed to show the latest dag run in the "grid view" now shows an old dag run ~1 year ago</li>
</ol>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Linux Mint 20.3 Una</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Other Docker-based deployment</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | 1 |
<p dir="auto">I uncovered this general issue while testing loading JavaScript files from <code class="notranslate">node_modules</code>, but realized (and confirmed) this applies to TypeScript files also.</p>
<p dir="auto">Basically, when we search the <code class="notranslate">node_modules</code> folder, we <a href="https://github.com/Microsoft/TypeScript/blob/release-1.8/src/compiler/program.ts#L139">look for all supported extensions</a> and add them to the compilation. Currently this means that if we find a TypeScript file in a Node module (e.g. someone published their package including the source), then we compile this also.</p>
<p dir="auto">For example, if module <code class="notranslate">sausages</code> was published as follows (with the original source besides the compiler files):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" - node_modules
|- sausages
|- package.json
|- core.ts
|- core.js"><pre class="notranslate"><code class="notranslate"> - node_modules
|- sausages
|- package.json
|- core.ts
|- core.js
</code></pre></div>
<p dir="auto">Then we get the benefit of loading the <code class="notranslate">.ts</code> and getting the types from this. However on compiling an app which uses the <code class="notranslate">sausages/core</code> module, with <code class="notranslate">outDir: "out"</code>, I get the resulting output (notice how <code class="notranslate">core.js</code> from the <code class="notranslate">sausages</code> package has been compiled into a <code class="notranslate">node_modules</code> folder in my <code class="notranslate">outDir</code>).</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/993909/12893862/7ec807b8-ce48-11e5-9b00-15608d67d28c.png"><img width="133" alt="screen shot 2016-02-08 at 9 42 56 am" src="https://cloud.githubusercontent.com/assets/993909/12893862/7ec807b8-ce48-11e5-9b00-15608d67d28c.png" style="max-width: 100%;"></a></p>
<p dir="auto">I already added a flag to denote if a file was found by searching Node modules in <a href="https://github.com/Microsoft/TypeScript/pull/6928/files#diff-08a3cc4f1f9a51dbb468c2810f5229d3R72">this pull request</a>. I can refactor this to eliminate this issue if that seems reasonable.</p> | <p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.10</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface TNode {
Kids?: (TNode | string)[];
}
function foo(node: TNode) { }
foo({
Kids: [ { Kids: [ { c: 1 } ]} ]
});"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">TNode</span> <span class="pl-kos">{</span>
<span class="pl-c1">Kids</span>?: <span class="pl-kos">(</span><span class="pl-smi">TNode</span> <span class="pl-c1">|</span> <span class="pl-smi">string</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">function</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-s1">node</span>: <span class="pl-smi">TNode</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span>
<span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">Kids</span>: <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">Kids</span>: <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">c</span>: <span class="pl-c1">1</span> <span class="pl-kos">}</span> <span class="pl-kos">]</span><span class="pl-kos">}</span> <span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
The error message should contains something like "Object literal may only specify known properties, and 'c' does not exist in type 'TNode | string' "</p>
<p dir="auto"><strong>Actual behavior:</strong><br>
The error message is</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error TS2345: Argument of type '{ Kids: { Kids: { c: number; }[]; }[]; }' is not assignable to parameter of type 'TNode'.
Types of property 'Kids' are incompatible.
Type '{ Kids: { c: number; }[]; }[]' is not assignable to type '(TNode | string)[]'.
Type '{ Kids: { c: number; }[]; }' is not assignable to type 'TNode | string'.
Type '{ Kids: { c: number; }[]; }' is not assignable to type 'string'."><pre class="notranslate"><code class="notranslate">error TS2345: Argument of type '{ Kids: { Kids: { c: number; }[]; }[]; }' is not assignable to parameter of type 'TNode'.
Types of property 'Kids' are incompatible.
Type '{ Kids: { c: number; }[]; }[]' is not assignable to type '(TNode | string)[]'.
Type '{ Kids: { c: number; }[]; }' is not assignable to type 'TNode | string'.
Type '{ Kids: { c: number; }[]; }' is not assignable to type 'string'.
</code></pre></div>
<p dir="auto">The misleading part is "Type '{ Kids: { c: number; }[]; }' is not assignable to type 'string' ".</p>
<p dir="auto">If I change <code class="notranslate">TNode | string</code> to <code class="notranslate">TNode | Element</code>, the error message becomes</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error TS2345: Argument of type '{ Kids: { Kids: { c: number; }[]; }[]; }' is not assignable to parameter of type 'TNode'.
Types of property 'Kids' are incompatible.
Type '{ Kids: { c: number; }[]; }[]' is not assignable to type '(TNode | Element)[]'.
Type '{ Kids: { c: number; }[]; }' is not assignable to type 'TNode | Element'.
Type '{ Kids: { c: number; }[]; }' is not assignable to type 'Element'.
Property 'classList' is missing in type '{ Kids: { c: number; }[]; }'."><pre class="notranslate"><code class="notranslate">error TS2345: Argument of type '{ Kids: { Kids: { c: number; }[]; }[]; }' is not assignable to parameter of type 'TNode'.
Types of property 'Kids' are incompatible.
Type '{ Kids: { c: number; }[]; }[]' is not assignable to type '(TNode | Element)[]'.
Type '{ Kids: { c: number; }[]; }' is not assignable to type 'TNode | Element'.
Type '{ Kids: { c: number; }[]; }' is not assignable to type 'Element'.
Property 'classList' is missing in type '{ Kids: { c: number; }[]; }'.
</code></pre></div>
<p dir="auto">Which is also misleading.</p>
<p dir="auto">Strangely, If I reverse the order of the union types (i,e. <code class="notranslate">string | TNode</code> and <code class="notranslate">Element | TNode</code>), the error messages become expected.</p> | 0 |
<p dir="auto">We should extend the <code class="notranslate">preprocessing.Scaler</code> / <code class="notranslate">preprocessing.scale</code> utilities to feature-wise scale sparse matrices to unit scale without trying to center the data first. This work should be done in a consistent way with the <code class="notranslate">RowNormalizer</code> refactoring (re-use low level cython functions).</p> | <p dir="auto">Please help me with my installation.<br>
I followed the guideline to install sklearn and numpy, but when I ran the nosetest, it kept showing the following testing message, and finally a failed message also cited below:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" " nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),"
.......................................................................
"Ran 1603 tests in 92.776s
FAILED (SKIP=14, failures=1) ""><pre class="notranslate"><code class="notranslate"> " nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),"
.......................................................................
"Ran 1603 tests in 92.776s
FAILED (SKIP=14, failures=1) "
</code></pre></div>
<p dir="auto">Because the nosetest log is messy, I tried to excerpt non-repetitive paragraph for your diagnosis.</p>
<p dir="auto">I very appreciate your kind help.</p>
<h1 dir="auto"></h1>
<p dir="auto">Microsoft Windows [版本 6.1.7601]<br>
Copyright (c) 2009 Microsoft Corporation. All rights reserved.</p>
<p dir="auto">C:\Windows\system32>python -c "import sklearn; sklearn.test()"<br>
Running unit tests and doctests for sklearn<br>
NumPy version 1.7.0<br>
NumPy is installed in C:\Python27\lib\site-packages\numpy<br>
Python version 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)<br>
]<br>
nose version 1.2.1<br>
I: Seeding RNGs with 369887653<br>
Converged after 58 iterations.<br>
...............................................................C:\Python27\lib\s<br>
ite-packages\sklearn\manifold\spectral_embedding.py:225: UserWarning: Graph is n<br>
ot fully connected, spectral embedding may not works as expected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
..2.17927109077 55.4082834902<br>
........None<br>
.FFFFFFFFF.........S...............S............................................<br>
..............S.........................................................S..F....<br>
......................................SSS.......................C:\Python27\lib<br>
site-packages\sklearn\externals\joblib\test\test_func_inspect.py:122: UserWarnin<br>
g: Cannot inspect object <functools.partial object at 0x07500900>, ignore list w<br>
ill not work.<br>
nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
.............................___________________________________________________</p>
<hr>
<p dir="auto">test_memory setup</p>
<hr>
<hr>
<p dir="auto">test_memory teardown</p>
<hr>
<p dir="auto">..._____________________________________________________________________________</p>
<hr>
<p dir="auto">[Memory] Calling sklearn.externals.joblib.test.test_hashing.KlassWithCachedMetho<br>
d.f...<br>
f({ '#s12069__c_maps.nii.gz': [33],<br>
'#s12158__c_maps.nii.gz': [33],<br>
'#s12258__c_maps.nii.gz': [33],<br>
'#s12277__c_maps.nii.gz': [33],<br>
'#s12300__c_maps.nii.gz': [33],<br>
'#s12401__c_maps.nii.gz': [33],<br>
'#s12430__c_maps.nii.gz': [33],<br>
'#s13817__c_maps.nii.gz': [33],<br>
'#s13903__c_maps.nii.gz': [33],<br>
'#s13916__c_maps.nii.gz': [33],<br>
'#s13981__c_maps.nii.gz': [33],<br>
'#s13982__c_maps.nii.gz': [33],<br>
'#s13983__c_maps.nii.gz': [33]})<br>
________________________________________________________________f - 0.0s, 0.0min</p>
<p dir="auto">._______________________________________________________________________________<br>
_<br>
[Memory] Calling sklearn.externals.joblib.test.test_hashing.KlassWithCachedMetho<br>
d.f...<br>
f(set([ '#s12069__c_maps.nii.gz',<br>
'#s12158__c_maps.nii.gz',<br>
'#s12258__c_maps.nii.gz',<br>
'#s12277__c_maps.nii.gz',<br>
'#s12300__c_maps.nii.gz',<br>
'#s12401__c_maps.nii.gz',<br>
'#s12430__c_maps.nii.gz',<br>
'#s13817__c_maps.nii.gz',<br>
'#s13903__c_maps.nii.gz',<br>
'#s13916__c_maps.nii.gz',<br>
'#s13981__c_maps.nii.gz',<br>
'#s13982__c_maps.nii.gz',<br>
'#s13983__c_maps.nii.gz']))<br>
________________________________________________________________f - 0.0s, 0.0min</p>
<p dir="auto">..______________________________________________________________________________<br>
__<br>
test_memory setup</p>
<hr>
<p dir="auto">.............[Memory] 0.0s, 0.0min: Loading sklearn.externals.joblib.test.tes<br>
t_memory.f-alias from c:\users\navicat\appdata\local\temp\tmpydjb57\joblib\sklea<br>
rn\externals\joblib\test\test_memory\f-alias\48c4a83e3726da917be80d0e1edc1be1<br>
_____________________________________________f-alias cache loaded - 0.0s, 0.0min</p>
<p dir="auto">...[Memory] 0.0s, 0.0min: Loading sklearn.externals.joblib.test.test_memory.f<br>
-alias from c:\users\navicat\appdata\local\temp\tmpydjb57\joblib\sklearn\externa<br>
ls\joblib\test\test_memory\f-alias\48c4a83e3726da917be80d0e1edc1be1<br>
_____________________________________________f-alias cache loaded - 0.0s, 0.0min</p>
<p dir="auto">................................................................................<br>
........................________________________________________________________</p>
<hr>
<p dir="auto">test_memory teardown</p>
<hr>
<p dir="auto">._______________________________________________________________________________<br>
_<br>
setup numpy_pickle</p>
<hr>
<p dir="auto">.....................................C:\Python27\lib\site-packages\sklearn\exter<br>
nals\joblib\test\test_numpy_pickle.py:197: Warning: file "c:\users\navicat\appda<br>
ta\local\temp\tmpfsyive\test.pkl96" appears to be a zip, ignoring mmap_mode "r"<br>
flag passed<br>
numpy_pickle.load(this_filename, mmap_mode='r')<br>
.....___________________________________________________________________________</p>
<hr>
<p dir="auto">teardown numpy_pickle</p>
<hr>
<p dir="auto">.............S......C:\Python27\lib\site-packages\sklearn\feature_selection\univ<br>
ariate_selection.py:327: UserWarning: Duplicate scores. Result may depend on fea<br>
ture ordering.There are probably duplicate features, or you used a classificatio<br>
n score for a regression task.<br>
warn("Duplicate scores. Result may depend on feature ordering."<br>
...........C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarn<br>
ing: <code class="notranslate">cs_graph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarning: <code class="notranslate">cs_gr aph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
.C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarning: <code class="notranslate">cs_g raph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarning: <code class="notranslate">cs_gr aph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
.C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarning: <code class="notranslate">cs_g raph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarning: <code class="notranslate">cs_gr aph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
........................................................................C:\Pytho<br>
n27\lib\site-packages\sklearn\feature_selection\univariate_selection.py:109: Run<br>
timeWarning: invalid value encountered in divide<br>
f = msb / msw<br>
.......................F...............S...................C:\Python27\lib\site-<br>
packages\sklearn\linear_model\least_angle.py:233: UserWarning: Regressors in act<br>
ive set degenerate. Dropping a regressor, after 2 iterations, i.e. alpha=6.870e-<br>
02, with an active set of 2 regressors, and the smallest cholesky pivot element<br>
being 2.220e-16<br>
% (n_iter, alpha, n_active, diag))<br>
...---<br>
................................................................................<br>
...............................................................C:\Python27\lib\s<br>
ite-packages\nose\util.py:14: DeprecationWarning: The compiler package is deprec<br>
ated and removed in Python 3.x.<br>
from compiler.consts import CO_GENERATOR<br>
C:\Python27\lib\site-packages\nose\util.py:14: DeprecationWarning: The compiler<br>
package is deprecated and removed in Python 3.x.<br>
from compiler.consts import CO_GENERATOR<br>
...........................C:\Python27\lib\site-packages\sklearn\linear_model\te<br>
sts\test_sparse_coordinate_descent.py:104: UserWarning: With alpha=0, this algor<br>
ithm does not converge well. You are advised to use the LinearRegression estimat<br>
or<br>
clf.fit(X, Y)<br>
....C:\Python27\lib\site-packages\sklearn\linear_model\coordinate_descent.py:666<br>
: UserWarning: precompute is ignored for sparse data<br>
warnings.warn("precompute is ignored for sparse data")<br>
C:\Python27\lib\site-packages\sklearn\linear_model\coordinate_descent.py:288: Us<br>
erWarning: Objective did not converge for target 0, you might want to increase t<br>
he number of iterations<br>
' to increase the number of iterations')<br>
....................C:\Python27\lib\site-packages\numpy\core_methods.py:57: Run<br>
timeWarning: invalid value encountered in double_scalars<br>
ret = ret / float(rcount)<br>
............................................................................C:\P<br>
ython27\lib\site-packages\sklearn\utils\extmath.py:244: RuntimeWarning: underflo<br>
w encountered in exp<br>
out = np.log(np.sum(np.exp(arr - vmax), axis=0))<br>
C:\Python27\lib\site-packages\sklearn\mixture\dpgmm.py:42: RuntimeWarning: under<br>
flow encountered in exp<br>
v = np.exp(v - out)<br>
..........................................C:\Python27\lib\site-packages\sklearn<br>
mixture\gmm.py:307: RuntimeWarning: underflow encountered in exp<br>
responsibilities = np.exp(lpr - logprob[:, np.newaxis])<br>
..................................................F.......C:\Python27\lib\site-p<br>
ackages\sklearn\utils__init__.py:71: DeprecationWarning: Class NuSVC is depreca<br>
ted; to be removed in v0.14;<br>
use sklearn.svm.NuSVC instead<br>
warnings.warn(msg, category=DeprecationWarning)<br>
.C:\Python27\lib\site-packages\sklearn\utils__init__.py:71: DeprecationWarning:<br>
Class NuSVR is deprecated; to be removed in v0.14;<br>
use sklearn.svm.NuSVR instead<br>
warnings.warn(msg, category=DeprecationWarning)<br>
.C:\Python27\lib\site-packages\sklearn\utils__init__.py:71: DeprecationWarning:<br>
Class SVC is deprecated; to be removed in v0.14;<br>
use sklearn.svm.SVC instead<br>
warnings.warn(msg, category=DeprecationWarning)<br>
.C:\Python27\lib\site-packages\sklearn\utils__init__.py:71: DeprecationWarning:<br>
Class SVR is deprecated; to be removed in v0.14;<br>
use sklearn.svm.SVR instead<br>
warnings.warn(msg, category=DeprecationWarning)<br>
.......................................<br>
C:\Windows\system32>nosetests sklearn --exe<br>
................................................................................<br>
.............................................................C:\Python27\lib\sit<br>
e-packages\sklearn\manifold\spectral_embedding.py:225: UserWarning: Graph is not<br>
fully connected, spectral embedding may not works as expected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
......C:\Python27\lib\site-packages\sklearn\manifold\spectral_embedding.py:225:<br>
UserWarning: Graph is not fully connected, spectral embedding may not works as e<br>
xpected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
......................S........S.................S......S.......................<br>
................................................................................<br>
S.........S.....................................................................<br>
......................................S....S....................................<br>
.........................................SSS........................C:\Python27<br>
lib\site-packages\sklearn\externals\joblib\test\test_func_inspect.py:122: UserWa<br>
rning: Cannot inspect object <functools.partial object at 0x04A099C0>, ignore li<br>
st will not work.<br>
nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),<br>
....................................S.SS........................................<br>
................................................................................<br>
.......................C:\Python27\lib\site-packages\sklearn\externals\joblib\te<br>
st\test_func_inspect.py:122: UserWarning: Cannot inspect object <functools.parti<br>
al object at 0x04A099C0>, ignore list will not work.<br>
nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
...........S..............S.....................................................<br>
................................................................................<br>
.........................................................................S...S..<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
..................................................................FF............<br>
................................................................................<br>
....................................................C:\Python27\lib\site-package<br>
s\sklearn\manifold\spectral_embedding.py:225: UserWarning: Graph is not fully co<br>
nnected, spectral embedding may not works as expected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
................C:\Python27\lib\site-packages\sklearn\manifold\spectral_embeddin<br>
g.py:225: UserWarning: Graph is not fully connected, spectral embedding may not<br>
works as expected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
...............S...............S.S................S.............................<br>
.......................................................................S........<br>
.....................S..........................................................<br>
............................S...........S.......................................<br>
..........................SSS......................C:\Python27\lib\site-packages<br>
\sklearn\externals\joblib\test\test_func_inspect.py:122: UserWarning: Cannot ins<br>
pect object <functools.partial object at 0x04A099C0>, ignore list will not work.</p>
<p dir="auto">nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
.........................................................SSS....................<br>
.....C:\Python27\lib\site-packages\sklearn\externals\joblib\test\test_func_inspe<br>
ct.py:122: UserWarning: Cannot inspect object <functools.partial object at 0x04A<br>
099C0>, ignore list will not work.</p>
<h1 dir="auto"></h1>
<h2 dir="auto">FAIL: Test the sparse LinearSVC with the iris dataset</h2>
<p dir="auto">Traceback (most recent call last):<br>
File "C:\Python27\lib\site-packages\nose\case.py", line 197, in runTest<br>
self.test(*self.arg)<br>
File "C:\Python27\lib\site-packages\sklearn\svm\tests\test_sparse.py", line 17<br>
3, in test_linearsvc_iris<br>
clf.predict(iris.data.todense()), sp_clf.predict(iris.data))<br>
File "C:\Python27\lib\site-packages\numpy\testing\utils.py", line 812, in asse<br>
rt_array_almost_equal<br>
header=('Arrays are not almost equal to %d decimals' % decimal))<br>
File "C:\Python27\lib\site-packages\numpy\testing\utils.py", line 645, in asse<br>
rt_array_compare<br>
raise AssertionError(msg)<br>
AssertionError:<br>
Arrays are not almost equal to 6 decimals</p>
<p dir="auto">(mismatch 0.666666666667%)<br>
x: array([2, 1, 0, 2, 0, 2, 0, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 0, 0, 2, 1, 0,<br>
0, 2, 0, 0, 1, 1, 0, 2, 2, 0, 2, 2, 1, 0, 2, 1, 1, 2, 0, 2, 0, 0, 1,<br>
2, 2, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 0, 2, 1, 1, 1, 1, 2, 0,...<br>
y: array([2, 1, 0, 2, 0, 2, 0, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 0, 0, 2, 1, 0,<br>
0, 2, 0, 0, 1, 1, 0, 2, 2, 0, 2, 2, 1, 0, 2, 1, 1, 2, 0, 2, 0, 0, 1,<br>
2, 2, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 0, 2, 1, 1, 1, 1, 2, 0,...</p>
<hr>
<p dir="auto">Ran 1603 tests in 92.776s</p>
<p dir="auto">FAILED (SKIP=14, failures=1)<br>
.........................S.................S....................................<br>
.....C:\Python27\lib\site-packages\sklearn\manifold\spectral_embedding.py:225: U<br>
serWarning: Graph is not fully connected, spectral embedding may not works as ex<br>
pected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
............................................................S...........S.......<br>
.................S.............................................S................<br>
....................................................S...........................<br>
...........................SSS......................C:\Python27\lib\site-package<br>
s\sklearn\externals\joblib\test\test_func_inspect.py:122: UserWarning: Cannot in<br>
spect object <functools.partial object at 0x049F99C0>, ignore list will not work<br>
.</p> | 0 |
<p dir="auto">(I don't know if it's really a bug or if we're not supposed to do this, but it works fine when using jsx)</p>
<p dir="auto">When using the arrow function as a module exports, the generated code is wrong.<br>
The following (useless but minimal) example</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = () => arguments;"><pre class="notranslate"><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-en">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi">arguments</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">will lead to the generated code</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var _arguments = arguments;
module.exports = function () {
return _arguments;
};"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">_arguments</span> <span class="pl-c1">=</span> <span class="pl-smi">arguments</span><span class="pl-kos">;</span>
<span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-en">exports</span> <span class="pl-c1">=</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">_arguments</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">while</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = function () { return arguments; };"><pre class="notranslate"><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-en">exports</span> <span class="pl-c1">=</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-smi">arguments</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">leads to the correct version.</p> | <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"> 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 read property 'range' of null
Occurred while linting /home/jayen/docs/work/ridethewaverley/ride-the-waverley/src/util/writeresource.js:1
at OffsetStorage.setDesiredOffset (/home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/rules/indent.js:341:45)
at /home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/rules/indent.js:1397:29
at Array.forEach (<anonymous>)
at Object.TemplateLiteral [as listener] (/home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/rules/indent.js:1389:34)
at /home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/rules/indent.js:1635:55
at Array.forEach (<anonymous>)
at Program:exit (/home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/rules/indent.js:1635:26)
at /home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (/home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/linter/safe-emitter.js:45:38)"><pre class="notranslate"><code class="notranslate">TypeError: Cannot read property 'range' of null
Occurred while linting /home/jayen/docs/work/ridethewaverley/ride-the-waverley/src/util/writeresource.js:1
at OffsetStorage.setDesiredOffset (/home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/rules/indent.js:341:45)
at /home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/rules/indent.js:1397:29
at Array.forEach (<anonymous>)
at Object.TemplateLiteral [as listener] (/home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/rules/indent.js:1389:34)
at /home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/rules/indent.js:1635:55
at Array.forEach (<anonymous>)
at Program:exit (/home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/rules/indent.js:1635:26)
at /home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (/home/jayen/docs/work/ridethewaverley/ride-the-waverley/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
</code></pre></div>
<p dir="auto">Was not able to reproduce in codesandbox.</p>
<p dir="auto"><strong>Input Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const foo = '';
require(`${foo}`)?.bar;"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-s">''</span><span class="pl-kos">;</span>
<span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">foo</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span><span class="pl-kos">?.</span><span class="pl-c1">bar</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">Expected an assignment or function call and instead saw an expression. (no-unused-expressions)</p>
<p dir="auto"><strong>Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)</strong></p>
<ul dir="auto">
<li>Filename: <code class="notranslate">eslintrc-that-CRA4-wont-find.json</code></li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"extends": "react-app",
"rules": {
"array-bracket-spacing": [
"error",
"never"
],
"comma-dangle": [
"error",
"always-multiline"
],
"indent": [
"error",
2,
{
"CallExpression": {
"arguments": "first"
},
"MemberExpression": "off",
"flatTernaryExpressions": true,
"ignoredNodes": [
"JSXElement *"
]
}
],
"object-curly-spacing": [
"error",
"never"
],
"react/jsx-indent-props": [
"error",
"first"
],
"react/jsx-tag-spacing": [
"error",
{
"beforeSelfClosing": "never",
"beforeClosing": "never"
}
],
"react/self-closing-comp": [
"error",
{
"component": true,
"html": true
}
],
"sort-keys": [
"error",
"asc",
{
"caseSensitive": false,
"natural": true
}
],
"sort-vars": "error"
}
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"extends"</span>: <span class="pl-s">"react-app"</span><span class="pl-kos">,</span>
<span class="pl-s">"rules"</span>: <span class="pl-kos">{</span>
<span class="pl-s">"array-bracket-spacing"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"error"</span><span class="pl-kos">,</span>
<span class="pl-s">"never"</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"comma-dangle"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"error"</span><span class="pl-kos">,</span>
<span class="pl-s">"always-multiline"</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"indent"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"error"</span><span class="pl-kos">,</span>
<span class="pl-c1">2</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span>
<span class="pl-s">"CallExpression"</span>: <span class="pl-kos">{</span>
<span class="pl-s">"arguments"</span>: <span class="pl-s">"first"</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-s">"MemberExpression"</span>: <span class="pl-s">"off"</span><span class="pl-kos">,</span>
<span class="pl-s">"flatTernaryExpressions"</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-s">"ignoredNodes"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"JSXElement *"</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"object-curly-spacing"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"error"</span><span class="pl-kos">,</span>
<span class="pl-s">"never"</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"react/jsx-indent-props"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"error"</span><span class="pl-kos">,</span>
<span class="pl-s">"first"</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"react/jsx-tag-spacing"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"error"</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span>
<span class="pl-s">"beforeSelfClosing"</span>: <span class="pl-s">"never"</span><span class="pl-kos">,</span>
<span class="pl-s">"beforeClosing"</span>: <span class="pl-s">"never"</span>
<span class="pl-kos">}</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"react/self-closing-comp"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"error"</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span>
<span class="pl-s">"component"</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-s">"html"</span>: <span class="pl-c1">true</span>
<span class="pl-kos">}</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"sort-keys"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"error"</span><span class="pl-kos">,</span>
<span class="pl-s">"asc"</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span>
<span class="pl-s">"caseSensitive"</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-s">"natural"</span>: <span class="pl-c1">true</span>
<span class="pl-kos">}</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"sort-vars"</span>: <span class="pl-s">"error"</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></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: Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)
Binaries:
Node: 14.16.0 - /usr/bin/node
Yarn: 1.22.5 - /usr/bin/yarn
npm: 6.14.11 - /usr/bin/npm
npmPackages:
@babel/eslint-parser: ^7.13.10 => 7.13.10
eslint: ^7.23.0 => 7.23.0 "><pre class="notranslate"><code class="notranslate"> System:
OS: Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)
Binaries:
Node: 14.16.0 - /usr/bin/node
Yarn: 1.22.5 - /usr/bin/yarn
npm: 6.14.11 - /usr/bin/npm
npmPackages:
@babel/eslint-parser: ^7.13.10 => 7.13.10
eslint: ^7.23.0 => 7.23.0
</code></pre></div>
<ul dir="auto">
<li>Babel version(s): [7.12.3]</li>
<li>Node/npm version: [Node 14.16.0/npm 6.14.11]</li>
<li>OS: [Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)]</li>
<li>Monorepo: [no]</li>
<li>How you are using Babel: [<code class="notranslate">eslint</code>]</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto">No but my workaround is to separate the require from the optional chaining.</p>
<p dir="auto"><strong>Additional context</strong></p> | 0 |
<ul dir="auto">
<li>VSCode Version: 1.0.0</li>
<li>OS Version: OSX 10.11.3</li>
<li>Unity 5.3.4f1</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Configure Visual Studio Code with Unity as described at: <a href="https://code.visualstudio.com/Docs/runtimes/unity" rel="nofollow">https://code.visualstudio.com/Docs/runtimes/unity</a></li>
<li>Start debugger and set breakpoint</li>
</ol>
<p dir="auto">See screenshot: Hovering on the method parameter works and I can see its values.<br>
Hovering over the private object variables (see _startPiece, _id, etc.. in the screenshot) does <strong>not</strong> work. No hover popup is displayed.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/14895933/14955631/8c08148e-107b-11e6-9793-9dbd5b2674b9.png"><img src="https://cloud.githubusercontent.com/assets/14895933/14955631/8c08148e-107b-11e6-9793-9dbd5b2674b9.png" alt="schermafbeelding 2016-05-02 om 15 27 56" style="max-width: 100%;"></a></p> | <p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.10</p>
<p dir="auto"><strong>VSCode Version:</strong><br>
1.0.0</p>
<p dir="auto"><strong>OS</strong><br>
Linux 4.4.8-300.fc23.x86_64<br>
Fedora 23<br>
Gnome 3.18.2</p>
<p dir="auto"><strong>Project structure</strong></p>
<p dir="auto">├── dist<br>
│ ├── app.js<br>
│ ├── app.js.map<br>
│ ├── other code<br>
├── node_modules<br>
├── npm-shrinkwrap.json<br>
├── package.json<br>
├── readme.md<br>
├── src<br>
│ ├── app.ts<br>
│ ├── other code<br>
├── tsconfig.json<br>
├── tsd.json<br>
├── tslint.json<br>
└── typings<br>
├── main.d.ts</p>
<p dir="auto"><strong>tsconfig.json</strong></p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"noImplicitAny": false,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"sourceRoot": "./src",
"module": "commonjs",
"target": "es5",
"outDir": "dist"
},
"filesGlob": [
"src/**/*.ts",
"src/app.ts"
],
"exclude": [
"node_modules",
"dist",
"doc",
"Gruntfile.js"
]
}"><pre class="notranslate">{
<span class="pl-ent">"compilerOptions"</span>: {
<span class="pl-ent">"noImplicitAny"</span>: <span class="pl-c1">false</span>,
<span class="pl-ent">"removeComments"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"preserveConstEnums"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"sourceMap"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"sourceRoot"</span>: <span class="pl-s"><span class="pl-pds">"</span>./src<span class="pl-pds">"</span></span>,
<span class="pl-ent">"module"</span>: <span class="pl-s"><span class="pl-pds">"</span>commonjs<span class="pl-pds">"</span></span>,
<span class="pl-ent">"target"</span>: <span class="pl-s"><span class="pl-pds">"</span>es5<span class="pl-pds">"</span></span>,
<span class="pl-ent">"outDir"</span>: <span class="pl-s"><span class="pl-pds">"</span>dist<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"filesGlob"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>src/**/*.ts<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>src/app.ts<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"exclude"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>node_modules<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>dist<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>doc<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>Gruntfile.js<span class="pl-pds">"</span></span>
]
}</pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
vscode should look for the app.ts in the sourceRoot<br>
And "activate" intelisense</p>
<p dir="auto"><strong>Actual behavior:</strong><br>
vscode doesn't find the app.ts and because of this intelisense doesn't work</p>
<p dir="auto"><strong>Edit</strong><br>
added the intelisense part to the behavior describtion</p> | 0 |
<p dir="auto">Here is the feedback link I filed:<br>
<a href="https://aka.ms/AA62vzv" rel="nofollow">Feedback</a></p>
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows version 10.0.18970.0.
Latest Windows Terminal build (either the available bits or locally built.)"><pre lang="none" class="notranslate"><code class="notranslate">Windows version 10.0.18970.0.
Latest Windows Terminal build (either the available bits or locally built.)
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">This is the same repro as issue <a href="https://github.com/microsoft/terminal/issues/1360" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/1360/hovercard">1360</a>, which I was trying to reproduce and hit this render-related crash instead:</p>
<p dir="auto">Install <a href="https://github.com/BurntSushi/ripgrep">ripgrep</a><br>
Open wt (Windows Terminal), running PowerShell.<br>
Run the following from the root of a large drive<br>
<code class="notranslate">while ($true) { rg -i "foo" }</code></p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The terminal continually runs ripgrep against all files on the drive. It does not crash.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Eventually the process will crash. If running a debug build, you will get an Assert dialog (Abort, Retry, Ignore) and if you attach a debugger and press Retry you will see the crash is in renderer.cpp at line 642:</p>
<blockquote>
<p dir="auto">STACK_TEXT:<br>
00000005<code class="notranslate">8cefd950 00007ffe</code>d69d4f99 KERNELBASE!RaiseException+0x69<br>
00000005<code class="notranslate">8cefda30 00007ffe</code>9f018337 VCRUNTIME140D!_CxxThrowException+0x137<br>
00000005<code class="notranslate">8cefdae0 00007ffe</code>4181ec63 TerminalControl!wil::details::ThrowResultExceptionInternal+0x53<br>
00000005<code class="notranslate">8cefdbe0 00007ffe</code>4181ebe9 TerminalControl!wil::ThrowResultException+0x49<br>
00000005<code class="notranslate">8cefdc20 00007ffe</code>4181cd85 TerminalControl!wil::details::ReportFailure+0x1e5<br>
00000005<code class="notranslate">8ceff1d0 00007ffe</code>4181d131 TerminalControl!wil::details::ReportFailure_Hr+0x91<br>
00000005<code class="notranslate">8ceff230 00007ffe</code>41827084 TerminalControl!wil::details::in1diag5::_Throw_Hr+0x74<br>
00000005<code class="notranslate">8ceff280 00007ffe</code>418a6e59 TerminalControl!wil::details::in1diag5::Throw_IfFailed+0x69<br>
00000005<code class="notranslate">8ceff2c0 00007ffe</code>4193ea77 TerminalControl!Microsoft::Console::Render::Renderer::_PaintBufferOutputHelper+0x3f7<br>
00000005<code class="notranslate">8ceff4b0 00007ffe</code>4193e5f4 TerminalControl!Microsoft::Console::Render::Renderer::_PaintBufferOutput+0x394<br>
00000005<code class="notranslate">8ceff750 00007ffe</code>4193dd57 TerminalControl!Microsoft::Console::Render::Renderer::_PaintFrameForEngine+0x487<br>
00000005<code class="notranslate">8ceff8c0 00007ffe</code>4193bf95 TerminalControl!Microsoft::Console::Render::Renderer::PaintFrame+0xf5<br>
00000005<code class="notranslate">8ceff980 00007ffe</code>4193b84a TerminalControl!Microsoft::Console::Render::RenderThread::_ThreadProc+0x8a<br>
00000005<code class="notranslate">8ceff9c0 00007ffe</code>4193b7a6 TerminalControl!Microsoft::Console::Render::RenderThread::s_ThreadProc+0x46<br>
00000005<code class="notranslate">8ceffa00 00007ffe</code>d82c7034 KERNEL32!BaseThreadInitThunk+0x14<br>
00000005<code class="notranslate">8ceffa30 00007ffe</code>d8ddb1b1 ntdll!RtlUserThreadStart+0x21</p>
</blockquote>
<blockquote>
<p dir="auto">FAULTING_SOURCE_FILE: E:\src\git\Terminal\src\renderer\base\renderer.cpp<br>
FAULTING_SOURCE_LINE_NUMBER: 642<br>
SYMBOL_NAME: TerminalControl!Microsoft::Console::Render::Renderer::_PaintBufferOutputHelper+3f7</p>
</blockquote> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18362.356
Windows Terminal version: 0.4.2382.0
WSL Ubuntu 18.04"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.356
Windows Terminal version: 0.4.2382.0
WSL Ubuntu 18.04
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Run the following app using node.js after doing <code class="notranslate">npm i blessed</code></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var blessed = require('blessed');
var screen = blessed.screen({
smartCSR: true
});
screen.title = 'my window title';
var box = blessed.box({
top: 'center',
left: 'center',
width: '50%',
height: '50%',
content: 'Hello {bold}world{/bold}!',
tags: true,
border: {
type: 'line'
},
style: {
fg: 'white',
bg: 'magenta',
border: {
fg: '#f0f0f0'
},
hover: {
bg: 'green'
}
}
});
box.on('click', function (data) {
box.setContent('{center}Some different {red-fg}content{/red-fg}.{/center}');
screen.render();
});
screen.key(['escape', 'q', 'C-c'], function (ch, key) {
return process.exit(0);
});
box.focus();
screen.append(box);
screen.render();"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">blessed</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'blessed'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">screen</span> <span class="pl-c1">=</span> <span class="pl-s1">blessed</span><span class="pl-kos">.</span><span class="pl-en">screen</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">smartCSR</span>: <span class="pl-c1">true</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">screen</span><span class="pl-kos">.</span><span class="pl-c1">title</span> <span class="pl-c1">=</span> <span class="pl-s">'my window title'</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">box</span> <span class="pl-c1">=</span> <span class="pl-s1">blessed</span><span class="pl-kos">.</span><span class="pl-en">box</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">top</span>: <span class="pl-s">'center'</span><span class="pl-kos">,</span>
<span class="pl-c1">left</span>: <span class="pl-s">'center'</span><span class="pl-kos">,</span>
<span class="pl-c1">width</span>: <span class="pl-s">'50%'</span><span class="pl-kos">,</span>
<span class="pl-c1">height</span>: <span class="pl-s">'50%'</span><span class="pl-kos">,</span>
<span class="pl-c1">content</span>: <span class="pl-s">'Hello {bold}world{/bold}!'</span><span class="pl-kos">,</span>
<span class="pl-c1">tags</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">border</span>: <span class="pl-kos">{</span>
<span class="pl-c1">type</span>: <span class="pl-s">'line'</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">style</span>: <span class="pl-kos">{</span>
<span class="pl-c1">fg</span>: <span class="pl-s">'white'</span><span class="pl-kos">,</span>
<span class="pl-c1">bg</span>: <span class="pl-s">'magenta'</span><span class="pl-kos">,</span>
<span class="pl-c1">border</span>: <span class="pl-kos">{</span>
<span class="pl-c1">fg</span>: <span class="pl-s">'#f0f0f0'</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">hover</span>: <span class="pl-kos">{</span>
<span class="pl-c1">bg</span>: <span class="pl-s">'green'</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-s1">box</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'click'</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">data</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">box</span><span class="pl-kos">.</span><span class="pl-en">setContent</span><span class="pl-kos">(</span><span class="pl-s">'{center}Some different {red-fg}content{/red-fg}.{/center}'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">screen</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-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">screen</span><span class="pl-kos">.</span><span class="pl-en">key</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-s">'escape'</span><span class="pl-kos">,</span> <span class="pl-s">'q'</span><span class="pl-kos">,</span> <span class="pl-s">'C-c'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">ch</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-k">return</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">exit</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">box</span><span class="pl-kos">.</span><span class="pl-en">focus</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">screen</span><span class="pl-kos">.</span><span class="pl-en">append</span><span class="pl-kos">(</span><span class="pl-s1">box</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">screen</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></pre></div>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">When hovering, the mouse pointer position should be relayed to WSL and in return to the blessed application.<br>
When clicking, the mouse pointer event should be relayed to WSL and in return to the blessed application.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">When hovering with the mouse pointer, the box doesn't change color as it should.<br>
When clicking the box, the content is not changed.</p>
<p dir="auto">This behaviour works on WSL (Win+R + <code class="notranslate">wsl.exe -d Ubuntu-18.04</code>)</p>
<p dir="auto">Here's a gif with raw WSL and Windows Terminal running WSL side by side that compares the behaviour<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17045274/64737200-ad6f3080-d4c2-11e9-9e8e-249801978099.gif"><img src="https://user-images.githubusercontent.com/17045274/64737200-ad6f3080-d4c2-11e9-9e8e-249801978099.gif" alt="7FTS1bQfWm" data-animated-image="" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=ramkumar.k" rel="nofollow">Ramkumar Krishnan</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4691?redirect=false" rel="nofollow">SPR-4691</a></strong> and commented</p>
<p dir="auto">It would be great if we have something like SimpleJdbcUpdate similar to SimpleJdbcInsert. It should take map<column names ,values> and another map<updateColumnNames, values> as parameters and it should update table based on that.<br>
The column names in the second map should appear in the WHERE clause. There should be an overloaded method also which takes only one String(column name) which should appear in the WHERE clause.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.3</p>
<p dir="auto">20 votes, 22 watchers</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=kdonald" rel="nofollow">Keith Donald</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7745?redirect=false" rel="nofollow">SPR-7745</a></strong> and commented</p>
<p dir="auto">Would be nice extension of the resource handler work in Spring 3 in the cases where the resource handling is performed off-site with the help of a CDN such as Amazon Cloudfront. The best practice in this environment is to upload two versions of each static resource: a uncompressed version, and a compressed version. In development you would want to work with a local, uncompressed version, but in production you'd expect the gzipped version to be used and be served from the CDN.</p>
<p dir="auto">See: <a href="http://internetmarketingbyme.com/74/gzip-compression-using-amazon-s3-cloudfront-cdn/" rel="nofollow">http://internetmarketingbyme.com/74/gzip-compression-using-amazon-s3-cloudfront-cdn/</a><br>
See: <a href="http://lanyrd.com/blog/2010/ical" rel="nofollow">http://lanyrd.com/blog/2010/ical</a></p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398168938" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/16488" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/16488/hovercard" href="https://github.com/spring-projects/spring-framework/issues/16488">#16488</a> Create ResourceResolver for changing URL domain (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398104794" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11800" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11800/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11800">#11800</a> Add support for versioning resources</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398168938" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/16488" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/16488/hovercard" href="https://github.com/spring-projects/spring-framework/issues/16488">#16488</a> Create ResourceResolver for changing URL domain</li>
</ul>
<p dir="auto">1 votes, 2 watchers</p> | 0 |
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/1009" rel="nofollow">http://projects.scipy.org/scipy/ticket/1009</a> on 2009-09-30 by trac user jap, assigned to unknown.</em></p>
<p dir="auto">If there are large values in the observation matrix, the vq.kmeans method fails with the following error:</p>
<p dir="auto">(Pdb) centroids, distortion = vq.kmeans(erow, centroids, iter=1)<br>
*** UnboundLocalError: local variable 'best_book' referenced before assignment</p>
<p dir="auto">This can be fixed by applying the attached patch.</p> | <p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/1077" rel="nofollow">http://projects.scipy.org/scipy/ticket/1077</a> on 2009-12-28 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kwgoodman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kwgoodman">@kwgoodman</a>, assigned to unknown.</em></p>
<p dir="auto">Just for fun I tried kmeans on a problem that has a LOT of features. I got an error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="UnboundLocalError: local variable 'best_book' referenced before assignment"><pre class="notranslate"><code class="notranslate">UnboundLocalError: local variable 'best_book' referenced before assignment
</code></pre></div>
<p dir="auto">The exception is raised because all sets of randomly selected starting centroids gave a distance greater than the initialized value of best_dist (100k) and therefore best_book is never assigned. Increasing the hard coded best_dist solved the problem.</p>
<p dir="auto">In the patch below I initialize best_dist to np.inf:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Index: scipy/cluster/vq.py
===================================================================
--- scipy/cluster/vq.py (revision 6151)
+++ scipy/cluster/vq.py (working copy)
@@ -485,7 +485,7 @@
result = _kmeans(obs, guess, thresh = thresh)
else:
#initialize best distance value to a large value
- best_dist = 100000
+ best_dist = np.inf
No = obs.shape[0]
k = k_or_guess
if k < 1:"><pre class="notranslate"><code class="notranslate">Index: scipy/cluster/vq.py
===================================================================
--- scipy/cluster/vq.py (revision 6151)
+++ scipy/cluster/vq.py (working copy)
@@ -485,7 +485,7 @@
result = _kmeans(obs, guess, thresh = thresh)
else:
#initialize best distance value to a large value
- best_dist = 100000
+ best_dist = np.inf
No = obs.shape[0]
k = k_or_guess
if k < 1:
</code></pre></div> | 1 |
<ul dir="auto">
<li>VSCode Version: 1.0.0-alpha</li>
<li>OS Version: Windows10</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Launch VS code and open any folder which contains .ts file.</li>
<li>Configure tasks.json and tsconfig.json files.</li>
<li>Set "showOutput": "always" setting into tasks.json.</li>
<li>Perform build operation and verify error or success message in the output window.</li>
</ol>
<p dir="auto">Actual: Getting proper message when there is any build error but not getting any message when build is successful.<br>
Expected: When build is successful user should get the "Build success" message something similar to Visual Studio.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/17735796/14449052/ebf2cf3c-0023-11e6-96f4-1f234a02eeed.png"><img src="https://cloud.githubusercontent.com/assets/17735796/14449052/ebf2cf3c-0023-11e6-96f4-1f234a02eeed.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">Currently there is no way to tell if a script is running other than a spinning bar in the bottom which is hard to see. If the task doesn't spit any output than there is no way to know if it's still running or finished other than by looking at that bar. Would be nice to get something more visible and explicit.</p> | 1 |
<p dir="auto"><strong>Your Windows build number:</strong><br>
10.0.18362.86</p>
<p dir="auto"><strong>What you're doing and what's happening:</strong><br>
Trying to enter the <code class="notranslate">@</code> sign on a Swedish keyboard in a PowerShell console using <code class="notranslate">Alt Gr</code> + <code class="notranslate">2</code>.<br>
See animated gif:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/357872/57315225-7099c400-70f3-11e9-803f-4d60d11feef5.gif"><img src="https://user-images.githubusercontent.com/357872/57315225-7099c400-70f3-11e9-803f-4d60d11feef5.gif" alt="terminal" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>What's wrong / what should be happening instead:</strong><br>
Windows terminal shows <code class="notranslate">digit-argument</code> instead of outputting the <code class="notranslate">@</code> sign as expected.</p>
<p dir="auto">It's possible this is a PEBKAC error somehow but the problem doesn't show up in the normal PowerShell console... 😓</p> | <ul dir="auto">
<li>Your Windows build number: (Type <code class="notranslate">ver</code> at a Windows Command Prompt)</li>
</ul>
<p dir="auto">Microsoft Windows [Version 10.0.18362.86]</p>
<ul dir="auto">
<li>What's wrong / what should be happening instead:</li>
</ul>
<p dir="auto">When the tab is running a <code class="notranslate">wsl</code> (Debian or Ubuntu) task any character requiring Alt Gr on the German Keyboard layout (~, @, |, etc.) don't get printed at all, besides <code class="notranslate">\</code> which gets printed as <code class="notranslate"><ffffffff></code></p>
<p dir="auto">When the tab is running <code class="notranslate">cmd.exe</code> or <code class="notranslate">powershell.exe</code> the regular value of the key is returned as if Alt Gr wasn't pressed at all.</p> | 1 |
<p dir="auto">I added the glide-3.6.1.jar and YouTubeAndroidPlayerApi.jar to my project,<br>
Before adding to glide , the youtube player was working clearly, when I added glide, something went wrong and when I try to open my YouTubePlayerFrag, onCreate() method I couldn't inflate my xml.</p>
<p dir="auto">When I remove the glide, everything return normal.</p> | <p dir="auto">How to set background process as 0<br>
<a href="http://www.tomsguide.com/faq/id-2316489/limit-background-process-android-device.html" rel="nofollow">http://www.tomsguide.com/faq/id-2316489/limit-background-process-android-device.html</a></p>
<p dir="auto">A fragment in activity and execute below.</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ImageView imageView=(ImageView)getView().findViewById(view, R.id.attachment);
Glide.with(activity).load(url).asBitmap().into(imageView);"><pre class="notranslate"><span class="pl-smi">ImageView</span> <span class="pl-s1">imageView</span>=(<span class="pl-smi">ImageView</span>)<span class="pl-en">getView</span>().<span class="pl-en">findViewById</span>(<span class="pl-s1">view</span>, <span class="pl-smi">R</span>.<span class="pl-s1">id</span>.<span class="pl-s1">attachment</span>);
<span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">activity</span>).<span class="pl-en">load</span>(<span class="pl-s1">url</span>).<span class="pl-en">asBitmap</span>().<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div>
<p dir="auto">It's everything well. The image view display picture correctly.</p>
<p dir="auto">But I press home key to exit app and next step enter the other app and exit after launched.</p>
<p dir="auto">At latest, I return to my app and crash right now.</p>
<p dir="auto">I try modify</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(activity).load(url).asBitmap().into(imageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">activity</span>).<span class="pl-en">load</span>(<span class="pl-s1">url</span>).<span class="pl-en">asBitmap</span>().<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div>
<p dir="auto">to</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(fragment).load(url).asBitmap().into(imageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">fragment</span>).<span class="pl-en">load</span>(<span class="pl-s1">url</span>).<span class="pl-en">asBitmap</span>().<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div>
<p dir="auto">It still crash again.</p>
<p dir="auto">I comment</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//Glide.with(activity).load(url).asBitmap().into(imageView);"><pre class="notranslate"><span class="pl-c">//Glide.with(activity).load(url).asBitmap().into(imageView);</span></pre></div>
<p dir="auto">and run the above flow. It is everything well.</p>
<p dir="auto">My device is LG G3 Android 5.0.1</p>
<p dir="auto">It display msg about</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx.app/com.xxx.app.child.activity.SendMessageActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365)
at android.app.ActivityThread.access$800(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5272)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763)
at android.view.LayoutInflater.inflate(LayoutInflater.java:482)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
at com.oshare.app.core.ChildActionBarActivity.onCreate(ChildActionBarActivity.java:13)
at android.app.Activity.performCreate(Activity.java:5977)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2258)
... 10 more
Caused by: java.lang.IllegalStateException: Fragment com.oshare.fragment.message.SendMessageFragment did not create a view.
at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2200)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:300)
at android.support.v7.app.AppCompatDelegateImplV7.callActivityOnCreateView(AppCompatDelegateImplV7.java:838)
at android.support.v7.app.AppCompatDelegateImplV11.callActivityOnCreateView(AppCompatDelegateImplV11.java:34)
at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:826)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:725)
... 19 more"><pre class="notranslate"><span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">RuntimeException</span>: <span class="pl-en">Unable</span> <span class="pl-en">to</span> <span class="pl-en">start</span> <span class="pl-en">activity</span> <span class="pl-en">ComponentInfo</span><span class="pl-kos">{</span><span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">xxx</span><span class="pl-kos">.</span><span class="pl-en">app</span>/<span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">xxx</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">child</span><span class="pl-kos">.</span><span class="pl-en">activity</span><span class="pl-kos">.</span><span class="pl-en">SendMessageActivity</span><span class="pl-kos">}</span>: <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">InflateException</span>: <span class="pl-en">Binary</span> <span class="pl-en">XML</span> <span class="pl-en">file</span> <span class="pl-en">line</span> <span class="pl-c">#2: Error inflating class fragment</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">performLaunchActivity</span><span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:2305</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">handleLaunchActivity</span><span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:2365</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">access</span>$800<span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:148</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span>$H<span class="pl-kos">.</span><span class="pl-en">handleMessage</span><span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1283</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">Handler</span><span class="pl-kos">.</span><span class="pl-en">dispatchMessage</span><span class="pl-kos">(</span><span class="pl-v">Handler</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:102</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">Looper</span><span class="pl-kos">.</span><span class="pl-en">loop</span><span class="pl-kos">(</span><span class="pl-v">Looper</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:135</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:5272</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">reflect</span><span class="pl-kos">.</span><span class="pl-en">Method</span><span class="pl-kos">.</span><span class="pl-en">invoke</span><span class="pl-kos">(</span><span class="pl-en">Native</span> <span class="pl-v">Method</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">reflect</span><span class="pl-kos">.</span><span class="pl-en">Method</span><span class="pl-kos">.</span><span class="pl-en">invoke</span><span class="pl-kos">(</span><span class="pl-v">Method</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:372</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">internal</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">ZygoteInit</span>$MethodAndArgsCaller<span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">ZygoteInit</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:909</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">internal</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">ZygoteInit</span><span class="pl-kos">.</span><span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-v">ZygoteInit</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:704</span><span class="pl-kos">)</span>
<span class="pl-en">Caused</span> <span class="pl-pds">by</span>: <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-v">InflateException</span>: <span class="pl-v">Binary</span> <span class="pl-c1">XML</span> <span class="pl-en">file</span> <span class="pl-en">line</span> <span class="pl-c">#2: Error inflating class fragment</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">createViewFromTag</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:763</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">inflate</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:482</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">inflate</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:414</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">inflate</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:365</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">setContentView</span><span class="pl-kos">(</span><span class="pl-v">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:249</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">AppCompatActivity</span><span class="pl-kos">.</span><span class="pl-en">setContentView</span><span class="pl-kos">(</span><span class="pl-v">AppCompatActivity</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:106</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">oshare</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">core</span><span class="pl-kos">.</span><span class="pl-en">ChildActionBarActivity</span><span class="pl-kos">.</span><span class="pl-en">onCreate</span><span class="pl-kos">(</span><span class="pl-v">ChildActionBarActivity</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:13</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">Activity</span><span class="pl-kos">.</span><span class="pl-en">performCreate</span><span class="pl-kos">(</span><span class="pl-v">Activity</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:5977</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">Instrumentation</span><span class="pl-kos">.</span><span class="pl-en">callActivityOnCreate</span><span class="pl-kos">(</span><span class="pl-v">Instrumentation</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1105</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">performLaunchActivity</span><span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:2258</span><span class="pl-kos">)</span>
... <span class="pl-c1">10</span> <span class="pl-en">more</span>
<span class="pl-en">Caused</span> <span class="pl-pds">by</span>: <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">IllegalStateException</span>: <span class="pl-v">Fragment</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">oshare</span><span class="pl-kos">.</span><span class="pl-en">fragment</span><span class="pl-kos">.</span><span class="pl-en">message</span><span class="pl-kos">.</span><span class="pl-en">SendMessageFragment</span> <span class="pl-en">did</span> not <span class="pl-en">create</span> <span class="pl-en">a</span> <span class="pl-en">view</span><span class="pl-kos">.</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v4</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">FragmentManagerImpl</span><span class="pl-kos">.</span><span class="pl-en">onCreateView</span><span class="pl-kos">(</span><span class="pl-v">FragmentManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:2200</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v4</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">FragmentActivity</span><span class="pl-kos">.</span><span class="pl-en">onCreateView</span><span class="pl-kos">(</span><span class="pl-v">FragmentActivity</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:300</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">callActivityOnCreateView</span><span class="pl-kos">(</span><span class="pl-v">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:838</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">AppCompatDelegateImplV11</span><span class="pl-kos">.</span><span class="pl-en">callActivityOnCreateView</span><span class="pl-kos">(</span><span class="pl-v">AppCompatDelegateImplV11</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:34</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">onCreateView</span><span class="pl-kos">(</span><span class="pl-v">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:826</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v4</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflaterCompatHC</span>$FactoryWrapperHC<span class="pl-kos">.</span><span class="pl-en">onCreateView</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflaterCompatHC</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:44</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">createViewFromTag</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:725</span><span class="pl-kos">)</span>
... <span class="pl-c1">19</span> <span class="pl-en">more</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/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">On the server :<br>
The classname generation should occur once</p>
<p dir="auto">On the client:<br>
The classname generation should occur once</p>
<p dir="auto">Both classnames generation should match</p>
<h4 dir="auto">===========</h4>
<p dir="auto">I should be able to avoid using MuiThemeProvider at the root of my app while still be able to disable classname generation</p>
<p dir="auto">I should be able to use MUI on a route and not on another</p>
<p dir="auto">disabling classname generation should be for the whole tree, even if I got multiple sub MuiThemeProviders</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">On the server :<br>
The classname generation occur twice<br>
The first one when using apollo's getDataFromTree<br>
The second one when using reactDOMServer's renderToString</p>
<p dir="auto">On the client:<br>
The classname generation occur once, and doesn't match the one made by the server</p>
<p dir="auto">The client classname generation matches the first server classname generation, but the classnames rendered on the react components are thoses from the servers's second classname generation</p>
<p dir="auto">This is because to disable classname generation on one of the renders, I am forced to use MuiThemeProvider at the root of the tree, so i can dynamically pass "disableStylesGeneration"</p>
<h2 dir="auto">Concerns</h2>
<p dir="auto">But what if I dont want to have MuiThemeProvider at the root of my App ?<br>
In the most cases, the visitor will only hit the home page, so no need to make the server render an useless component<br>
Also, what if I got the multiple MuiThemeProvider pattern ?</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">I made a repository to illustrate the problem</p>
<p dir="auto"><a href="https://github.com/Aetherall/MUI-issue">https://github.com/Aetherall/MUI-issue</a></p>
<h2 dir="auto">Context ( based on <a href="https://github.com/Aetherall/MUI-issue">https://github.com/Aetherall/MUI-issue</a> )</h2>
<p dir="auto">I got a SSR app with two Pages<br>
Home : No MUI<br>
Dashboard: MUI<br>
Multiple: MUI - Multiple Nested Providers</p>
<p dir="auto">I don't want to use MuiThemeProvider at the root of the App, because it would mean useless execution for the majority of the visitors, which only visit Home</p>
<h2 dir="auto">Idea</h2>
<p dir="auto">The solution would be to make MuiThemeProvider get the "disableStylesGeneration" from context, and use that if no props are provided<br>
Then, we just have to make a component which takes a disable bool prop<br>
The component just inject the disableStylesGeneration value in the context depending on the value of his disable prop</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.31</td>
</tr>
<tr>
<td>React</td>
<td>^16.2.0</td>
</tr>
<tr>
<td>react-jss</td>
<td>^8.2.1</td>
</tr>
</tbody>
</table> | <p dir="auto">I've started analyzing <code class="notranslate">material-ui</code> part (quite big as it turned out) of my application bundle. My app is very simple for now, I use not many different widgets, so I was quite surprised seeing modules like <code class="notranslate">Popover</code> inside the bundle. I've traced dependency graph and I found quite a long path from <code class="notranslate">Select</code> (which I consciously use), through <code class="notranslate">SelectInput</code> and <code class="notranslate">Menu</code> modules, to that <code class="notranslate">Popover</code> thing. Why would I need it, I asked myself, I use only native <code class="notranslate">Select</code>! Quick look at <a href="https://github.com/mui-org/material-ui/blob/v1-beta/src/Select/SelectInput.js">source code of <code class="notranslate">SelectInput</code></a> gave me the answer: module <code class="notranslate">Menu</code>, which depends on <code class="notranslate">Popover</code>, is eagerly loaded even if it's not actually used. <code class="notranslate">render</code> method of <code class="notranslate">SelectInput</code> returns early in <code class="notranslate">native</code> branch of code and this is obviously not traceable by any three-shaker.</p>
<p dir="auto">I don't have extensive experience with <code class="notranslate">material-ui</code>, so I don't know if native select is the only such case or that pattern (I mean conditional usage of component based on runtime properties) is common in the project. Are you interested in optimizaton of this? I suppose for big and large projects, using a lot of different UI components, it's not an issue at all, as that <code class="notranslate">Popover</code> component will be used in some other place eventually. For me, personally, savings are quite significant, though. Removing <code class="notranslate">Menu</code> and all its dependencies shrinks my bundle by 8% (11.5 kB gzipped).</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">I'm able to use native select component without loading bunch of components used by not-native implementation.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">No matter if I use native or custom select, I have all code required by the latter one in my bundle.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto"><a href="https://codesandbox.io/s/p79koy741j" rel="nofollow">https://codesandbox.io/s/p79koy741j</a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1434406/36341262-e3469d0e-13eb-11e8-8d6a-a217e036864c.png"><img src="https://user-images.githubusercontent.com/1434406/36341262-e3469d0e-13eb-11e8-8d6a-a217e036864c.png" alt="select" style="max-width: 100%;"></a></p>
<p dir="auto">Quite a lot of dependencies for a single native select, don't you think?</p>
<h2 dir="auto">Context</h2>
<p dir="auto">It affects performance somehow (I cannot provide you real numbers, but think of downloading 11.5 kB and parsing around 50 kB of never used JS). And performance matters, right?</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>any</td>
</tr>
<tr>
<td>etc</td>
<td>-</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">As mentioned <a href="https://discord.com/channels/684898665143206084/684911491035430919/763129882594508821" rel="nofollow">here</a>:<br>
There is a problem what tests belong to which file/module. <code class="notranslate">std</code> solves that currently with prefixing every test name. Though that works, I think there would be a better solution. <code class="notranslate">deno test</code> should log file paths to differentiate the tests like so for a better overview:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="std/datetime/test.ts
test parse ... ok
test format ... ok
…
std/bytes/test.ts
test findIndex1 ... ok
test findIndex2 ... ok
…"><pre class="notranslate">std/datetime/test.ts
<span class="pl-c1">test</span> parse ... ok
<span class="pl-c1">test</span> format ... ok
…
std/bytes/test.ts
<span class="pl-c1">test</span> findIndex1 ... ok
<span class="pl-c1">test</span> findIndex2 ... ok
…</pre></div> | <p dir="auto">Currently, all tests from different test file are printed as if they are all from one file. This could be a problem on a large test suite where developer needs to find failed test case/file.</p>
<p dir="auto">In Jest, tests are grouped per file. By default, only file names and names of failed tests are shown.</p>
<h2 dir="auto">Alternative Proposals</h2>
<ol dir="auto">
<li>Show file names alongside test case.</li>
<li>Display a tree of file names and test case. File names are branches, and test cases are leafs.</li>
<li>Create a <code class="notranslate">Deno.testGroup</code> function that acts like <code class="notranslate">describe</code> in Jest, use it in <code class="notranslate">.deno.test.ts</code> to wrap import line of a test file.</li>
<li>Log test file names before execution (similar to <code class="notranslate">cargo test</code>).</li>
</ol> | 1 |
<p dir="auto">In ErrorPage Component this error is coming at last statement of "export default connect(...) ".</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React, { Component } from 'react'
import { connect } from 'react-redux';
class ErrorPage extends Component {
state = {}
render() {
return (
<div>
ErrorPage;
</div>
);
}
}
const mapStateToProps = (state) => {
console.log('====================================');
console.log(state);
console.log('====================================');
}
export default connect(mapStateToProps, null)(ErrorPage);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-v">Component</span> <span class="pl-kos">}</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">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-k">class</span> <span class="pl-v">ErrorPage</span> <span class="pl-k">extends</span> <span class="pl-v">Component</span> <span class="pl-kos">{</span>
<span class="pl-c1">state</span> <span class="pl-c1">=</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-c1"><</span><span class="pl-ent">div</span><span class="pl-c1">></span>
ErrorPage;
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">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>
<span class="pl-k">const</span> <span class="pl-en">mapStateToProps</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">state</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'===================================='</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">state</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'===================================='</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">connect</span><span class="pl-kos">(</span><span class="pl-en">mapStateToProps</span><span class="pl-kos">,</span> <span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">ErrorPage</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | <p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br>
no.<br>
<strong>What is the current behavior?</strong><br>
look this: <a href="https://www.npmjs.com/package/react-week-time-range-picker" rel="nofollow">react-week-time-range-picker</a>.</p>
<p dir="auto">This is a component written by react hooks. I run it normal when i develop it. However, when i <code class="notranslate">npm install react-week-time-range-picker</code> to test , the page report error <strong>Minified React error <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="19118479" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/321" data-hovercard-type="pull_request" data-hovercard-url="/facebook/react/pull/321/hovercard" href="https://github.com/facebook/react/pull/321">#321</a>;visit </strong><strong><a href="https://reactjs.org/docs/error-decoder.html?invariant=321" rel="nofollow">https://reactjs.org/docs/error-decoder.html?invariant=321</a> for the full message or use the non-minified dev environment for full errors and additional helpful warnings.</strong></p>
<p dir="auto">I look for the solution almost two days, but i failed.</p>
<ol dir="auto">
<li>My version is no problem</li>
<li>I think the hooks call is correct</li>
<li>I doubt it may be the third cause in the official documents,but i test it with <a href="https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react" rel="nofollow">official documents code</a>, it print true。</li>
</ol>
<p dir="auto">Now, i am muddled.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (<a href="https://jsfiddle.net/Luktwrdm/" rel="nofollow">https://jsfiddle.net/Luktwrdm/</a>) or CodeSandbox (<a href="https://codesandbox.io/s/new" rel="nofollow">https://codesandbox.io/s/new</a>) example below:</strong></p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
I hope who can help me</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>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"react": "^16.10.2",
"react-dom": "^16.10.2"
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"react"</span>: <span class="pl-s">"^16.10.2"</span><span class="pl-kos">,</span>
<span class="pl-s">"react-dom"</span>: <span class="pl-s">"^16.10.2"</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">chrome 77.</p>
<p dir="auto">Thank you!</p> | 0 |
<p dir="auto">Hello, first of all I want to say you making crazy useful things, guys, thank you!</p>
<p dir="auto">I have two elasticsearch twin (versions, configuration, everything) servers with the same data, replicated by logstash: ES1 and ES2. ES1 I restarted for a few hours ago and now I have a problems.</p>
<p dir="auto">My mapping for logstash type, same for both servers.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""nginx_accesslog": {
"dynamic_templates": [
{
"string_template": {
"mapping": { "index": "not_analyzed", "type": "string" },
"match": "*",
"match_mapping_type": "string"
}
}
],
"_all": { "enabled": false },
"_source": { "compress": true },
"properties": {
"@timestamp": { "type": "date", "format": "dateOptionalTime" },
"@version": { "type": "long" },
"api_key": { "type": "string", "index": "not_analyzed" },
"body_bytes_sent": { "type": "long" },
"host": { "type": "string", "index": "not_analyzed" },
"http_host": { "type": "string", "index": "not_analyzed" },
"http_method": { "type": "string", "index": "not_analyzed" },
"http_referer": { "type": "string", "index": "not_analyzed" },
"http_user_agent": { "type": "string", "index": "not_analyzed" },
"http_version": { "type": "string", "index": "not_analyzed" },
"http_x_forwarded_for": { "type": "string", "index": "not_analyzed" },
"message": { "type": "string", "index": "not_analyzed" },
"path": { "type": "string", "index": "not_analyzed" },
"remote_addr": { "type": "string", "index": "not_analyzed" },
"remote_user": { "type": "string", "index": "not_analyzed" },
"request": { "type": "string", "index": "not_analyzed" },
"request_time": { "type": "double" },
"status": { "type": "long" },
"tags": { "type": "string", "index": "not_analyzed" },
"type": { "type": "string", "index": "not_analyzed" }
}
}"><pre class="notranslate"><code class="notranslate">"nginx_accesslog": {
"dynamic_templates": [
{
"string_template": {
"mapping": { "index": "not_analyzed", "type": "string" },
"match": "*",
"match_mapping_type": "string"
}
}
],
"_all": { "enabled": false },
"_source": { "compress": true },
"properties": {
"@timestamp": { "type": "date", "format": "dateOptionalTime" },
"@version": { "type": "long" },
"api_key": { "type": "string", "index": "not_analyzed" },
"body_bytes_sent": { "type": "long" },
"host": { "type": "string", "index": "not_analyzed" },
"http_host": { "type": "string", "index": "not_analyzed" },
"http_method": { "type": "string", "index": "not_analyzed" },
"http_referer": { "type": "string", "index": "not_analyzed" },
"http_user_agent": { "type": "string", "index": "not_analyzed" },
"http_version": { "type": "string", "index": "not_analyzed" },
"http_x_forwarded_for": { "type": "string", "index": "not_analyzed" },
"message": { "type": "string", "index": "not_analyzed" },
"path": { "type": "string", "index": "not_analyzed" },
"remote_addr": { "type": "string", "index": "not_analyzed" },
"remote_user": { "type": "string", "index": "not_analyzed" },
"request": { "type": "string", "index": "not_analyzed" },
"request_time": { "type": "double" },
"status": { "type": "long" },
"tags": { "type": "string", "index": "not_analyzed" },
"type": { "type": "string", "index": "not_analyzed" }
}
}
</code></pre></div>
<p dir="auto">Query (I'm using Sense add-on)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="POST /logstash-2014.04.07/_search
{
"script_fields": {
"s_request_time": {
"script": "doc['request_time'].value"
}
},
"size": 20
}"><pre class="notranslate"><code class="notranslate">POST /logstash-2014.04.07/_search
{
"script_fields": {
"s_request_time": {
"script": "doc['request_time'].value"
}
},
"size": 20
}
</code></pre></div>
<p dir="auto">ES2, everything is normal:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"took": 63,
"timed_out": false,
"_shards": {
"total": 4,
"successful": 4,
"failed": 0
},
"hits": {
"total": 17041240,
"max_score": 1,
"hits": [
{
"_index": "logstash-2014.04.07",
"_type": "nginx_accesslog",
"_id": "LSfAaBwSSDS5rL6utSHQJA",
"_score": 1,
"fields": {
"s_request_time": 0.014
}
},
..."><pre class="notranslate"><code class="notranslate">{
"took": 63,
"timed_out": false,
"_shards": {
"total": 4,
"successful": 4,
"failed": 0
},
"hits": {
"total": 17041240,
"max_score": 1,
"hits": [
{
"_index": "logstash-2014.04.07",
"_type": "nginx_accesslog",
"_id": "LSfAaBwSSDS5rL6utSHQJA",
"_score": 1,
"fields": {
"s_request_time": 0.014
}
},
...
</code></pre></div>
<p dir="auto">ES1: Ooops!</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"took": 51,
"timed_out": false,
"_shards": {
"total": 4,
"successful": 4,
"failed": 0
},
"hits": {
"total": 17041131,
"max_score": 1,
"hits": [
{
"_index": "logstash-2014.04.07",
"_type": "nginx_accesslog",
"_id": "tjZo1_JmRpOu5kE2WRfURw",
"_score": 1,
"fields": {
"s_request_time": [
" \u0001?PZ\u000e+\u0001\u0003\t\u001c" <-- WAT?!
]
}
},"><pre class="notranslate"><code class="notranslate">{
"took": 51,
"timed_out": false,
"_shards": {
"total": 4,
"successful": 4,
"failed": 0
},
"hits": {
"total": 17041131,
"max_score": 1,
"hits": [
{
"_index": "logstash-2014.04.07",
"_type": "nginx_accesslog",
"_id": "tjZo1_JmRpOu5kE2WRfURw",
"_score": 1,
"fields": {
"s_request_time": [
" \u0001?PZ\u000e+\u0001\u0003\t\u001c" <-- WAT?!
]
}
},
</code></pre></div>
<p dir="auto">It's most obvious demonstration of my problem. Another thing is when I'm using data_histogram facet (in kibana) I got ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexNumericFieldData.</p>
<p dir="auto">Purging all indexes fixes problem. Not only new, but old data too misenterpreted as arrays of one string.<br>
Well, I want my doubles back. :)</p> | <p dir="auto">It appears that the Explain API ignores search_type. I'm unsure if this is by design, or because of an underlying limitation, but thought it deserved an issue report.</p>
<p dir="auto">Here is an example query showing scoring disparity due to low doc count (5 docs) spread across 5 shards. Perfectly normal for a <code class="notranslate">query_then_fetch</code> search_type:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -XGET localhost:9200/startswith/test/_search?pretty -d '{ "query": {
"match_phrase_prefix": {
"title": {
"query": "d",
"max_expansions": 5
}
}
}
}' | grep title
"_score" : 1.0, "_source" : {"title":"drunk"}
"_score" : 0.30685282, "_source" : {"title":"dzone"}
"_score" : 0.30685282, "_source" : {"title":"data"}
"_score" : 0.30685282, "_source" : {"title":"drive"}"><pre class="notranslate"><code class="notranslate">curl -XGET localhost:9200/startswith/test/_search?pretty -d '{ "query": {
"match_phrase_prefix": {
"title": {
"query": "d",
"max_expansions": 5
}
}
}
}' | grep title
"_score" : 1.0, "_source" : {"title":"drunk"}
"_score" : 0.30685282, "_source" : {"title":"dzone"}
"_score" : 0.30685282, "_source" : {"title":"data"}
"_score" : 0.30685282, "_source" : {"title":"drive"}
</code></pre></div>
<p dir="auto">Same query with search_type set to <code class="notranslate">dfs_query_then_fetch</code>, showing appropriate scoring:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" curl -XGET 'localhost:9200/startswith/test/_search?pretty=true&search_type=dfs_query_then_fetch' -d '{
"query": {
"match_phrase_prefix": {
"title": {
"query": "d",
"max_expansions": 5
}
}
}
}' | grep title
"_score" : 1.9162908, "_source" : {"title":"dzone"}
"_score" : 1.9162908, "_source" : {"title":"data"}
"_score" : 1.9162908, "_source" : {"title":"drunk"}
"_score" : 1.9162908, "_source" : {"title":"drive"}"><pre class="notranslate"><code class="notranslate"> curl -XGET 'localhost:9200/startswith/test/_search?pretty=true&search_type=dfs_query_then_fetch' -d '{
"query": {
"match_phrase_prefix": {
"title": {
"query": "d",
"max_expansions": 5
}
}
}
}' | grep title
"_score" : 1.9162908, "_source" : {"title":"dzone"}
"_score" : 1.9162908, "_source" : {"title":"data"}
"_score" : 1.9162908, "_source" : {"title":"drunk"}
"_score" : 1.9162908, "_source" : {"title":"drive"}
</code></pre></div>
<p dir="auto">Ok, with the verification out of the way, here are the corresponding Explain API examples for the "dzone" document, which in the above example has differential scoring depending on the search_type. It appears that the Explain API completely ignores the search_type, since the score remains unaffected and maxDocs does not change.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -XGET 'localhost:9200/startswith/test/gvgXfR5YRSaXu7PfFc4FkA/_explain?pretty=true&search_type=query_then_fetch' -d '{
"query": {
"match_phrase_prefix": {
"title": {
"query": "d",
"max_expansions": 5
}
}
}
}'
{
"ok" : true,
"_index" : "startswith",
"_type" : "test",
"_id" : "gvgXfR5YRSaXu7PfFc4FkA",
"matched" : true,
"explanation" : {
"value" : 0.30685282,
"description" : "fieldWeight(title:dzone in 0), product of:",
"details" : [ {
"value" : 1.0,
"description" : "tf(termFreq(title:dzone)=1)"
}, {
"value" : 0.30685282,
"description" : "idf(docFreq=1, maxDocs=1)"
}, {
"value" : 1.0,
"description" : "fieldNorm(field=title, doc=0)"
} ]
}"><pre class="notranslate"><code class="notranslate">curl -XGET 'localhost:9200/startswith/test/gvgXfR5YRSaXu7PfFc4FkA/_explain?pretty=true&search_type=query_then_fetch' -d '{
"query": {
"match_phrase_prefix": {
"title": {
"query": "d",
"max_expansions": 5
}
}
}
}'
{
"ok" : true,
"_index" : "startswith",
"_type" : "test",
"_id" : "gvgXfR5YRSaXu7PfFc4FkA",
"matched" : true,
"explanation" : {
"value" : 0.30685282,
"description" : "fieldWeight(title:dzone in 0), product of:",
"details" : [ {
"value" : 1.0,
"description" : "tf(termFreq(title:dzone)=1)"
}, {
"value" : 0.30685282,
"description" : "idf(docFreq=1, maxDocs=1)"
}, {
"value" : 1.0,
"description" : "fieldNorm(field=title, doc=0)"
} ]
}
</code></pre></div>
<p dir="auto">And now dfs_query_then_fetch:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#curl -XGET 'localhost:9200/startswith/test/gvgXfR5YRSaXu7PfFc4FkA/_explain?pretty=true&search_type=dfs_query_then_fetch' -d '{
"query": {
"match_phrase_prefix": {
"title": {
"query": "d",
"max_expansions": 5
}
}
}
}'
{
"ok" : true,
"_index" : "startswith",
"_type" : "test",
"_id" : "gvgXfR5YRSaXu7PfFc4FkA",
"matched" : true,
"explanation" : {
"value" : 0.30685282,
"description" : "fieldWeight(title:dzone in 0), product of:",
"details" : [ {
"value" : 1.0,
"description" : "tf(termFreq(title:dzone)=1)"
}, {
"value" : 0.30685282,
"description" : "idf(docFreq=1, maxDocs=1)"
}, {
"value" : 1.0,
"description" : "fieldNorm(field=title, doc=0)"
} ]
}"><pre class="notranslate"><code class="notranslate">#curl -XGET 'localhost:9200/startswith/test/gvgXfR5YRSaXu7PfFc4FkA/_explain?pretty=true&search_type=dfs_query_then_fetch' -d '{
"query": {
"match_phrase_prefix": {
"title": {
"query": "d",
"max_expansions": 5
}
}
}
}'
{
"ok" : true,
"_index" : "startswith",
"_type" : "test",
"_id" : "gvgXfR5YRSaXu7PfFc4FkA",
"matched" : true,
"explanation" : {
"value" : 0.30685282,
"description" : "fieldWeight(title:dzone in 0), product of:",
"details" : [ {
"value" : 1.0,
"description" : "tf(termFreq(title:dzone)=1)"
}, {
"value" : 0.30685282,
"description" : "idf(docFreq=1, maxDocs=1)"
}, {
"value" : 1.0,
"description" : "fieldNorm(field=title, doc=0)"
} ]
}
</code></pre></div> | 0 |
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/bonfire-return-largest-numbers-in-arrays" rel="nofollow">http://www.freecodecamp.com/challenges/bonfire-return-largest-numbers-in-arrays</a> has an issue.</p>
<p dir="auto">When you start exercising the compiler tells you "cannot read property 'eql' of undefined", the problem is that I have never stated that property and more change that I made in the editor, compile always says the same.</p> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">Every time I try to type my answer into this challenge I only get as far as typing <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="1b361f4716fdb82ba9a47d7132c2919b">$($</math-renderer> before the program freezes and I get a pop-up saying the pages are unresponsive. I have tried rebooting, changing browsers, changing computers, but the problem has persisted for many hours.</p> | 0 |
<h3 dir="auto">Website or app</h3>
<p dir="auto"><a href="https://www.youtube.com/" rel="nofollow">https://www.youtube.com/</a>, <a href="https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox,https://docs.github.com/en" rel="nofollow">https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox,https://docs.github.com/en</a></p>
<h3 dir="auto">Repro steps</h3>
<p dir="auto">I was using the YouTube website. I have a habit of checking if the website i have visited was using react or not. As always I checked for YouTube website too. But the react developer tools extension was showing the youtube website is using react.</p>
<p dir="auto">Just to make sure it was right I have installed the firefox browser then installed the react developer tools extension and opened the youtube website, But in firefox, the extension was saying the youtube is not using react.</p>
<p dir="auto">For confirming with other websites, I have visited mdn and GitHub docs in both chrome and firefox. The chrome react developer tools extension says that the mdn is using react and the firefox react developer tools extension says that the mdn is not using react. For the GitHub docs website, the chrome extension says that the GitHub docs website was using the react whereas the firefox react developer tools extension shows that the Github docs website doesn't use the react.</p>
<p dir="auto">I am attaching the screen recording. To differentiate what websites I have visited in chrome and firefox I previously opened the websites in chrome and showed the results, for firefox I have typed the query and showed the results. Can you tell why it was happening like this?</p>
<details open="" class="details-reset border rounded-2">
<summary class="px-3 py-2">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-camera-video">
<path d="M16 3.75v8.5a.75.75 0 0 1-1.136.643L11 10.575v.675A1.75 1.75 0 0 1 9.25 13h-7.5A1.75 1.75 0 0 1 0 11.25v-6.5C0 3.784.784 3 1.75 3h7.5c.966 0 1.75.784 1.75 1.75v.675l3.864-2.318A.75.75 0 0 1 16 3.75Zm-6.5 1a.25.25 0 0 0-.25-.25h-7.5a.25.25 0 0 0-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-6.5ZM11 8.825l3.5 2.1v-5.85l-3.5 2.1Z"></path>
</svg>
<span aria-label="Video description recording.mov" class="m-1">recording.mov</span>
<span class="dropdown-caret"></span>
</summary>
<video src="https://user-images.githubusercontent.com/59245935/150397327-1cae5d73-0e63-4a32-b54b-5aa3da522db4.mov" data-canonical-src="https://user-images.githubusercontent.com/59245935/150397327-1cae5d73-0e63-4a32-b54b-5aa3da522db4.mov" controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" style="max-height:640px; min-height: 200px">
</video>
</details>
<p dir="auto">Repro steps</p>
<ol dir="auto">
<li>Login to the website</li>
<li>Scrolling the website</li>
<li>Noticed the bug</li>
</ol>
<p dir="auto">Versions:</p>
<p dir="auto">Chrome: 97.0.4692.99<br>
Firefox: 96.0.2<br>
React Developer Tools:4.22.0</p>
<h3 dir="auto">How often does this bug happen?</h3>
<p dir="auto">Every time</p>
<h3 dir="auto">DevTools package (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">DevTools version (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Error message (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Error call stack (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Error component stack (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">GitHub query string (automated)</h3>
<p dir="auto"><em>No response</em></p> | <h3 dir="auto">Website or app</h3>
<p dir="auto">youtube.com, github.com, gmail.com, lucidchart.app</p>
<h3 dir="auto">Repro steps</h3>
<ol dir="auto">
<li>Open any web app not made with React (e.g.: youtube.com, amazon.com, github.com, gmail.com, lucidchart.app)</li>
<li>The react icon is ON and the popover message says:<br>
'This page is using the production build of React. ✅'</li>
</ol>
<h3 dir="auto">How often does this bug happen?</h3>
<p dir="auto">Every time</p>
<h3 dir="auto">DevTools package (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">DevTools version (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Error message (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Error call stack (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Error component stack (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">GitHub query string (automated)</h3>
<p dir="auto"><em>No response</em></p> | 1 |
<p dir="auto">I find when I'm reading the documentation that I have to do a shit ton of scrolling so I can get to the primary navigation after I've made my way so far down the page. A back to top link would seriously save me time and a some finger abrasion. The mighty mouse and touch pads aren't exactly free spinning scroll wheel machines.</p>
<p dir="auto">If I try really hard the best I can get from the bottom of the component's page to the top is 11 scroll movements...</p> | <p dir="auto">In the new docs in 3.1 the navbar is not fixed on top. It's quite hard to go to other pages when you are way down below in the docs. A back to top button on the sidebar would be nice.</p> | 1 |
<ol start="2" dir="auto">
<li>copy below exception message</li>
</ol>
<p dir="auto">Version: 1.0.0<br>
OS Version: Microsoft Windows NT 10.0.19042.0<br>
IntPtr Length: 8<br>
x64: True<br>
Date: 08/02/2020 13:50:37<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> | <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 |
<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://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li>[] I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" 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>:</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><p dir="auto">software -> celery:5.0.1 (singularity) kombu:5.0.2 py:3.8.6<br>
billiard:3.6.3.0 redis:3.5.3<br>
platform -> system:Linux arch:64bit, ELF<br>
kernel version:4.14.200-155.322.amzn2.x86_64 imp:CPython<br>
loader -> celery.loaders.app.AppLoader<br>
settings -> transport:redis results:****************</p>
<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>: 5.0.1</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">I think we are supposed to be able to run celery multi start in other directories with --workdir option passed.</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">After upgrading to 5.0.1 from 4.x, the celery multi start command stopped working when not running from the workdir, even with workdir option passed in the command. The daemon service could not start as a result.</p>
<p dir="auto">/opt/Cranberry/venv/bin/celery multi start worker1 --workdir=/opt/Cranberry/ --app=Cranberry</p>
<p dir="auto">Error from the command above:<br>
Error: Invalid value for '-A' / '--app':<br>
Unable to load celery application.<br>
Module 'cranberry' has no attribute 'celery'<br>
> <a href="mailto:[email protected]">[email protected]</a>: * Child terminated with exit code 2<br>
FAILED</p>
<p dir="auto">I inserted print('Workdir: ', workdir) at: </p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/celery/celery/blob/7c3da03a07882ca86b801ad78dd509a67cba60af/celery/bin/celery.py#L123">celery/celery/bin/celery.py</a>
</p>
<p class="mb-0 color-fg-muted">
Line 123
in
<a data-pjax="true" class="commit-tease-sha" href="/celery/celery/commit/7c3da03a07882ca86b801ad78dd509a67cba60af">7c3da03</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="L123" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="123"></td>
<td id="LC123" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
</tbody></table>
</div>
</div>
<br>
And it prints:<br>
Workdir: None<p></p>
<p dir="auto">Any help on this is much appreciated!</p>
<p dir="auto">Updates 14:50:<br>
Tried to debug it a little more and it seems multi ends up calling subprocess with "celery --app=Cranberry worker --workdir=/opt/Cranberry/ ..."<br>
The command goes to celery.bin.celery.APP.convert.<br>
I tried to print ctx.params there, and notice that the --workdir param only shows up when it's before --app in command:</p>
<blockquote>
<p dir="auto">(venv) 2 ec2-user@ip:/opt$ celery --app=Cranberry --workdir=/opt/Cranberry/ worker<br>
app convert: Cranberry {}<br>
Usage: celery [OPTIONS] COMMAND [ARGS]...</p>
<p dir="auto">Error: Invalid value for '-A' / '--app':<br>
Unable to load celery application.<br>
The module Cranberry was not found.</p>
<p dir="auto">(venv) 2 ec2-user@:/opt$ celery --workdir=/opt/Cranberry/ --app=Cranberry worker<br>
app convert: Cranberry {'workdir': '/opt/Cranberry/'}<br>
Usage: celery [OPTIONS] COMMAND [ARGS]...</p>
<p dir="auto">Error: Invalid value for '-A' / '--app':</p>
</blockquote>
<p dir="auto">And this params does not seem to be used in os.chdir or get passed to find_app.</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"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>:</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<p dir="auto">Make a task fail with an unhandled exception and see exception getting exception while handling the exception throwing the exception again.</p>
<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">Expecting to get exception one time and resolve with job failure.</p>
<h1 dir="auto">Actual Behavior</h1>
<blockquote>
<p dir="auto">[2020-11-23 17:33:17,485: ERROR/ForkPoolWorker-1] Chord 'f8c9088d-5340-496e-bbec-eab167c43ac1' raised: ValueError('could not broadcast input array from shape (3,336,244) into shape (3,336,256)')<br>
Traceback (most recent call last):<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/celery/app/trace.py", line 409, in trace_task<br>
R = retval = fun(*args, **kwargs)<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/celery/app/trace.py", line 701, in <strong>protected_call</strong><br>
return self.run(*args, **kwargs)<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/celery/app/autoretry.py", line 54, in run<br>
ret = task.retry(exc=exc, **retry_kwargs)<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/celery/app/task.py", line 703, in retry<br>
raise_with_context(exc)<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/celery/app/autoretry.py", line 34, in run<br>
return task._orig_run(*args, **kwargs)<br>
File "/var/www/django_projects/earthalytics-api/api_v3/nodes/BuildingsClassification50cm.py", line 38, in execute<br>
predictor.predict(input_path, output_path)<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/rasterprediction/predictor.py", line 94, in predict<br>
labels = inferer.predict(x)<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/rasterprediction/backend/inferer.py", line 160, in predict<br>
temp[:x.shape[0], :x.shape[1]] = x<br>
ValueError: could not broadcast input array from shape (3,336,244) into shape (3,336,256)</p>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/django_celery_results/backends/database.py", line 147, in trigger_callback<br>
ret = j(timeout=app.conf.result_chord_join_timeout, propagate=True)<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/celery/result.py", line 746, in join<br>
value = result.get(<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/celery/result.py", line 219, in get<br>
self.maybe_throw(callback=callback)<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/celery/result.py", line 335, in maybe_throw<br>
self.throw(value, self._to_remote_traceback(tb))<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/celery/result.py", line 328, in throw<br>
self.on_ready.throw(*args, **kwargs)<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/vine/promises.py", line 234, in throw<br>
reraise(type(exc), exc, tb)<br>
File "/home/ubuntu/venvs/earthalytics-api/lib/python3.8/site-packages/vine/utils.py", line 30, in reraise<br>
raise value<br>
ValueError: could not broadcast input array from shape (3,336,244) into shape (3,336,256)</p>
</blockquote> | 0 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[X] feature request"><pre class="notranslate"><code class="notranslate">[X] feature request
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">Bi-directional binding (Bannana in a box) don't work out-of-the-box for parent/child component, with child event emitter. Parent component property is not updated.</p>
<p dir="auto"><strong>Expected/desired behavior</strong></p>
<p dir="auto">Avoid duplication of binding attibutes.</p>
<p dir="auto"><strong>Reproduction of the problem</strong><br>
Parent template (DONT WORK):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<userEdit [(toggleEditInPlace)]="toggleEditInPlace"
[hidden]="!toggleEditInPlace">
</userEdit>"><pre class="notranslate"><code class="notranslate"><userEdit [(toggleEditInPlace)]="toggleEditInPlace"
[hidden]="!toggleEditInPlace">
</userEdit>
</code></pre></div>
<p dir="auto">Parent template (WORKS):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<userEdit [toggleEditInPlace]="toggleEditInPlace" (toggleEditInPlace)="toggleEditInPlace=$event"
[hidden]="!toggleEditInPlace">
</userEdit>"><pre class="notranslate"><code class="notranslate"><userEdit [toggleEditInPlace]="toggleEditInPlace" (toggleEditInPlace)="toggleEditInPlace=$event"
[hidden]="!toggleEditInPlace">
</userEdit>
</code></pre></div>
<p dir="auto">Child component:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" @Input() toggleEditInPlace:boolean=false;
@Output('toggleEditInPlace') toggleEditInPlaceEvent=new EventEmitter<boolean>();"><pre class="notranslate"><code class="notranslate"> @Input() toggleEditInPlace:boolean=false;
@Output('toggleEditInPlace') toggleEditInPlaceEvent=new EventEmitter<boolean>();
</code></pre></div>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.0-rc.5</li>
<li><strong>Browser:</strong> [all]</li>
<li><strong>Language:</strong> [all]</li>
</ul> | <p dir="auto">Hi all!</p>
<p dir="auto">Is it possible to extend DOM Elements with Angular 2?<br>
In a way I can use it like:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<button value="Click!" is="extended-button" />"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">value</span>="<span class="pl-s">Click!</span>" <span class="pl-c1">is</span>="<span class="pl-s">extended-button</span>" /></pre></div>
<p dir="auto">Thanks in advance,<br>
Tiago Braga</p> | 0 |
<p dir="auto">hello, when i downloaded "script auto setup" and ran it to create cluster on AWS, and got this error:<br>
./cluster/../cluster/../cluster/aws/../../cluster/common.sh: line 518: KUBE_MANIFESTS_TAR_URL: unbound variable</p>
<p dir="auto">I don't see this on older version, and don't know variable "KUBE_MANIFESTS_TAR_URL", does anyone explain this ?.</p>
<p dir="auto">Thanks so much!!</p> | <p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p>
<ul dir="auto">
<li>No</li>
</ul>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p>
<ul dir="auto">
<li>ebs</li>
<li>ebs detach</li>
</ul>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p>
<p dir="auto">BUG REPORT</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.2", GitCommit:"0776eab45fe28f02bbeac0f05ae1a203051a21eb", GitTreeState:"clean", BuildDate:"2016-11-24T22:35:03Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.2", GitCommit:"0776eab45fe28f02bbeac0f05ae1a203051a21eb", GitTreeState:"clean", BuildDate:"2016-11-24T22:30:23Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.2", GitCommit:"0776eab45fe28f02bbeac0f05ae1a203051a21eb", GitTreeState:"clean", BuildDate:"2016-11-24T22:35:03Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.2", GitCommit:"0776eab45fe28f02bbeac0f05ae1a203051a21eb", GitTreeState:"clean", BuildDate:"2016-11-24T22:30:23Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}
</code></pre></div>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: AWS</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): Ubuntu 16.04.1 LTS</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Linux kubecontroller-1 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux"><pre class="notranslate"><code class="notranslate">Linux kubecontroller-1 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
</code></pre></div>
<ul dir="auto">
<li><strong>Install tools</strong>: None</li>
<li><strong>Others</strong>: None</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">I've seen this behavior in 1.4.6 and earlier. When a pod with a <code class="notranslate">PersistentVolumeClaim</code>, in this case when using a <code class="notranslate">StorageClass</code>, is "moved" to another node (terminated on one node then run on the other), the persistent volume occasionally has trouble detaching to the old node. The move can be either from <code class="notranslate">kubectl apply -f <new_configuration.yml></code> or in this particular example, when draining a node, with a command such as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kubectl drain worker-3"><pre class="notranslate"><code class="notranslate">kubectl drain worker-3
</code></pre></div>
<p dir="auto">This does sometimes work. Even when it works, there are plenty of errors with the EBS volume. The kube-controller will throw lots of errors, saying it can't detach. Such as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Dec 01 17:41:47 kubecontroller-1 kube-controller-manager[5662]: E1201 17:41:47.344806 5662 attacher.go:73] Error attaching volume "aws://us-east-1c/vol-802faf11": Error attaching EBS volume "vol-802faf11" to instance "i-ca043f59": VolumeInUse: vol-802faf11 is already attached to an instance
Dec 01 17:41:47 kubecontroller-1 kube-controller-manager[5662]: status code: 400, request id:"><pre class="notranslate"><code class="notranslate">Dec 01 17:41:47 kubecontroller-1 kube-controller-manager[5662]: E1201 17:41:47.344806 5662 attacher.go:73] Error attaching volume "aws://us-east-1c/vol-802faf11": Error attaching EBS volume "vol-802faf11" to instance "i-ca043f59": VolumeInUse: vol-802faf11 is already attached to an instance
Dec 01 17:41:47 kubecontroller-1 kube-controller-manager[5662]: status code: 400, request id:
</code></pre></div>
<p dir="auto">There will be other <code class="notranslate">nestedpendingoperations.go</code> operation errors. I'm not sure if that's a symptom of a misconfiguration. Again, it appears to SOMETIMES work. IF/WHEN it works, I'll see this in the kube-controller log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: I1201 17:42:30.821032 5662 aws.go:1492] AttachVolume volume="vol-802faf11" instance="i-ca043f59" request returned {
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: AttachTime: 2016-12-01 17:42:30.662 +0000 UTC,
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: Device: "/dev/xvdba",
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: InstanceId: "i-ca043f59",
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: State: "attaching",
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: VolumeId: "vol-802faf11"
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: }
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: I1201 17:42:30.920339 5662 aws.go:1366] Waiting for volume "vol-802faf11" state: actual=attaching, desired=attached
Dec 01 17:42:41 kubecontroller-1 kube-controller-manager[5662]: I1201 17:42:41.019194 5662 aws.go:1265] Releasing in-process attachment entry: ba -> volume vol-802faf11"><pre class="notranslate"><code class="notranslate">Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: I1201 17:42:30.821032 5662 aws.go:1492] AttachVolume volume="vol-802faf11" instance="i-ca043f59" request returned {
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: AttachTime: 2016-12-01 17:42:30.662 +0000 UTC,
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: Device: "/dev/xvdba",
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: InstanceId: "i-ca043f59",
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: State: "attaching",
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: VolumeId: "vol-802faf11"
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: }
Dec 01 17:42:30 kubecontroller-1 kube-controller-manager[5662]: I1201 17:42:30.920339 5662 aws.go:1366] Waiting for volume "vol-802faf11" state: actual=attaching, desired=attached
Dec 01 17:42:41 kubecontroller-1 kube-controller-manager[5662]: I1201 17:42:41.019194 5662 aws.go:1265] Releasing in-process attachment entry: ba -> volume vol-802faf11
</code></pre></div>
<p dir="auto">But it will occasionally fail and it will never detach. On the kubelet server, this log appears:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Dec 01 19:38:55 worker-3 kubelet[1032]: I1201 19:38:55.432000 1032 reconciler.go:189] UnmountVolume operation started for volume "kubernetes.io/aws-ebs/aws://us-east-1c/vol-802faf11" (spec.Name: "ebstest-volume") from pod "fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336" (UID: "fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336").
Dec 01 19:38:55 worker-3 kubelet[1032]: I1201 19:38:55.432070 1032 aws_ebs.go:398] Error checking if mountpoint /var/lib/kubelet/pods/fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336/volumes/kubernetes.io~aws-ebs/pvc-bfd01b97-b7d2-11e6-8057-0e71c9ba25de: stat /var/lib/kubelet/pods/fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336/volumes/kubernetes.io~aws-ebs/pvc-bfd01b97-b7d2-11e6-8057-0e71c9ba25de: no such file or directory
Dec 01 19:38:55 worker-3 kubelet[1032]: E1201 19:38:55.432132 1032 nestedpendingoperations.go:262] Operation for "\"kubernetes.io/aws-ebs/aws://us-east-1c/vol-802faf11\" (\"fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336\")" failed. No retries permitted until 2016-12-01 19:40:55.432095954 +0000 UTC (durationBeforeRetry 2m0s). Error: UnmountVolume.TearDown failed for volume "kubernetes.io/aws-ebs/aws://us-east-1c/vol-802faf11" (volume.spec.Name: "ebstest-volume") pod "fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336" (UID: "fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336") with: stat /var/lib/kubelet/pods/fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336/volumes/kubernetes.io~aws-ebs/pvc-bfd01b97-b7d2-11e6-8057-0e71c9ba25de: no such file or directory"><pre class="notranslate"><code class="notranslate">Dec 01 19:38:55 worker-3 kubelet[1032]: I1201 19:38:55.432000 1032 reconciler.go:189] UnmountVolume operation started for volume "kubernetes.io/aws-ebs/aws://us-east-1c/vol-802faf11" (spec.Name: "ebstest-volume") from pod "fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336" (UID: "fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336").
Dec 01 19:38:55 worker-3 kubelet[1032]: I1201 19:38:55.432070 1032 aws_ebs.go:398] Error checking if mountpoint /var/lib/kubelet/pods/fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336/volumes/kubernetes.io~aws-ebs/pvc-bfd01b97-b7d2-11e6-8057-0e71c9ba25de: stat /var/lib/kubelet/pods/fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336/volumes/kubernetes.io~aws-ebs/pvc-bfd01b97-b7d2-11e6-8057-0e71c9ba25de: no such file or directory
Dec 01 19:38:55 worker-3 kubelet[1032]: E1201 19:38:55.432132 1032 nestedpendingoperations.go:262] Operation for "\"kubernetes.io/aws-ebs/aws://us-east-1c/vol-802faf11\" (\"fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336\")" failed. No retries permitted until 2016-12-01 19:40:55.432095954 +0000 UTC (durationBeforeRetry 2m0s). Error: UnmountVolume.TearDown failed for volume "kubernetes.io/aws-ebs/aws://us-east-1c/vol-802faf11" (volume.spec.Name: "ebstest-volume") pod "fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336" (UID: "fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336") with: stat /var/lib/kubelet/pods/fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336/volumes/kubernetes.io~aws-ebs/pvc-bfd01b97-b7d2-11e6-8057-0e71c9ba25de: no such file or directory
</code></pre></div>
<p dir="auto">And it will repeat. If I try to look in the path specified above on the particular kubelet, <code class="notranslate">/var/lib/kubelet/pods/fff0ca70-b7ee-11e6-a0c7-0e82f0b9f336/volumes/kubernetes.io~aws-ebs/</code> exists, but the <code class="notranslate">pvc-*</code> does not.</p>
<p dir="auto">On the kubelet I can actually see the mounted volume. Again, sometimes it is successful and the pod moves to another node. sometimes not.</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">Upon <code class="notranslate">kubectl drain worker-3</code>, the following actions should occur:</p>
<ul dir="auto">
<li>pod terminated.</li>
<li>EBS persistent volume unmounted.</li>
<li>EBS persistent volume mounted on another node.</li>
<li>pod created and successfully run on another node where the EBS volume is.</li>
</ul>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<ul dir="auto">
<li>Create a storage class for an EBS volume, persistent volume claim, and deployment that has a pod that uses the EBS volume.</li>
<li>Drain the particular node. Sometimes this will work as intended.</li>
</ul>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p>
<ul dir="auto">
<li>I can provide the yml files as necessary.</li>
<li>There is a second EBS volume, mounted at <code class="notranslate">/dev/xvde</code>, mounted at <code class="notranslate">/mnt/ebs</code>. This is because the standard AMI root drive is very small. The Docker path is there and the kubelet is symlinked there <code class="notranslate">/var/lib/kubelet -> /mnt/ebs/kubelet</code>. I will test this deployment WITHOUT the EBS volume and symlinks to verify.</li>
</ul> | 0 |
<p dir="auto">If you hover over an open tab, you get a little hint popup showing the full path of the file open therein, which is cool. Problem is, if you happen to close that tab with CMD-w whilst it's up, apparently it never goes away, and hangs around pointing to tabs that are clearly NOT that file any more.</p> | <p dir="auto">I had a tab open, hovered my mouse over the label and then closed the tab. Now I have a permanent tooltip I can't remove.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/9bd809e58ccf977644c52ba2eb915afe47981b5589106ea11a96e0dc2e0093bd/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313432342f313632323538302f30386661316239652d353661382d313165332d396462382d3433363965366436313238632e706e67"><img src="https://camo.githubusercontent.com/9bd809e58ccf977644c52ba2eb915afe47981b5589106ea11a96e0dc2e0093bd/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313432342f313632323538302f30386661316239652d353661382d313165332d396462382d3433363965366436313238632e706e67" alt="screen shot 2013-11-26 at 9 33 07 am" data-canonical-src="https://f.cloud.github.com/assets/1424/1622580/08fa1b9e-56a8-11e3-9db8-4369e6d6128c.png" style="max-width: 100%;"></a></p>
<p dir="auto">I believe this is related to <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/atom/tabs/commit/cba585462fb5c275a55b210356a38c03fa7835af/hovercard" href="https://github.com/atom/tabs/commit/cba585462fb5c275a55b210356a38c03fa7835af"><tt>cba5854</tt></a></p> | 1 |
<p dir="auto">When I expand a collapsible navbar and after that resize the browser window, the navbar-collapse element keeps the class "in". In my opinion the class "in" should be removed if the width is wide enough for the navbar not to be collapsed because when I call the page with a wide browser the navbar-collapse also does not get the "in" class.</p> | <p dir="auto">Currently this is duped a few times over: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="21632511" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/11243" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/11243/hovercard" href="https://github.com/twbs/bootstrap/issues/11243">#11243</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="21882564" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/11301" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/11301/hovercard" href="https://github.com/twbs/bootstrap/issues/11301">#11301</a>, and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="22230647" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/11382" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/11382/hovercard" href="https://github.com/twbs/bootstrap/issues/11382">#11382</a>—but the issue is described differently everywhere. This should clear things up and help us figure out what to do to fix it.</p>
<h4 dir="auto">Problem</h4>
<p dir="auto">Starting with a narrow viewport, one with the collapsed navbar contents, open the menu, then resize to full-width with all navbar contents visible. Shrinking the viewport back to the narrow size still shows the un-collapsed navbar contents.</p>
<p dir="auto">(Btw, this is currently visible in the docs.)</p>
<h4 dir="auto">Why this happens</h4>
<p dir="auto">We're using the collapse plugin to do this. Right now it has no idea about the dimensions of your viewport. All it does is toggle the appropriate classes based on clicks—click to open, click to hide.</p>
<p dir="auto">Our CSS utilizes those changes in classes from the plugin to style the menu accordingly. The CSS has no way to remove the <code class="notranslate">.in</code> class that the JS adds.</p>
<h4 dir="auto">Fix</h4>
<p dir="auto">We need the JS plugin to be updated to detect the viewport changes and remove the class. I don't know when or how this could happen, but that's the only solution. Will need to hear from <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/fat/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/fat">@fat</a> or anyone else with more JS-fu.</p> | 1 |
<h2 dir="auto">Environment info</h2>
<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 4.1.1</li>
<li>Platform: Linux-3.10.0-693.5.2.el7.x86_64-x86_64-with-centos-7.4.1708-Core</li>
<li>Python version: 3.7.9</li>
<li>PyTorch version (GPU?): 1.7.1 (False)</li>
<li>Tensorflow version (GPU?): not installed (NA)</li>
<li>Using GPU in script?: </li>
<li>Using distributed or parallel set-up in script?: </li>
</ul>
<h3 dir="auto">Who can help</h3>
<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>
<h2 dir="auto">Information</h2>
<p dir="auto">Model I am using (Bert, XLNet ...):bert-base-uncased</p>
<p dir="auto">The problem arises when using:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> the official example scripts: (give details below)<br>
i am fine-tuning a text_claasifiction on dbpedia_14.and i followed this colab <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/master/examples/text_classification.ipynb#scrollTo=TlqNaB8jIrJW" rel="nofollow">https://colab.research.google.com/github/huggingface/notebooks/blob/master/examples/text_classification.ipynb#scrollTo=TlqNaB8jIrJW</a></li>
</ul>
<p dir="auto">The tasks I am working on is:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> an official GLUE/SQUaD task: (give the name)<br>
datset:dbpedia_14</li>
</ul>
<h2 dir="auto">To reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<p dir="auto">error<br>
<code class="notranslate">File "train.py", line 69, in <module> trainer.train() File "/home/pliu3/projects/anaconda3/envs/calibration/lib/python3.7/site-packages/transformers/trainer.py", line 784, in train for step, inputs in enumerate(epoch_iterator): File "/home/pliu3/projects/anaconda3/envs/calibration/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__ data = self._next_data() File "/home/pliu3/projects/anaconda3/envs/calibration/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/home/pliu3/projects/anaconda3/envs/calibration/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/pliu3/projects/anaconda3/envs/calibration/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] KeyError: 2</code></p>
<p dir="auto">code</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dataset_name = 'sem_eval_2014_task_1'
num_labels_size = 3
batch_size = 4
model_checkpoint = 'bert-base-uncased'
number_train_epoch = 5
def tokenize(batch):
return tokenizer(batch['premise'], batch['hypothesis'], truncation=True, )
def compute_metrics(pred):
labels = pred.label_ids
preds = pred.predictions.argmax(-1)
precision, recall, f1, _ = precision_recall_fscore_support(labels, preds, average='micro')
acc = accuracy_score(labels, preds)
return {
'accuracy': acc,
'f1': f1,
'precision': precision,
'recall': recall
}
model = BertForSequenceClassification.from_pretrained(model_checkpoint, num_labels=num_labels_size)
tokenizer = BertTokenizerFast.from_pretrained(model_checkpoint, use_fast=True)
train_dataset = load_dataset(dataset_name, split='train')
test_dataset = load_dataset(dataset_name, split='test')
train_encoded_dataset = train_dataset.map(tokenize, batched=True)
test_encoded_dataset = test_dataset.map(tokenize, batched=True)
args = TrainingArguments(
output_dir='./results',
evaluation_strategy="epoch",
learning_rate=2e-5,
per_device_train_batch_size=batch_size,
per_device_eval_batch_size=batch_size,
num_train_epochs=number_train_epoch,
weight_decay=0.01,
do_predict=True
)
trainer = Trainer(
model=model,
args=args,
compute_metrics=compute_metrics,
train_dataset=train_encoded_dataset,
eval_dataset=test_encoded_dataset,
tokenizer=tokenizer
)
trainer.train()
trainer.evaluate()"><pre class="notranslate"><span class="pl-s1">dataset_name</span> <span class="pl-c1">=</span> <span class="pl-s">'sem_eval_2014_task_1'</span>
<span class="pl-s1">num_labels_size</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span>
<span class="pl-s1">batch_size</span> <span class="pl-c1">=</span> <span class="pl-c1">4</span>
<span class="pl-s1">model_checkpoint</span> <span class="pl-c1">=</span> <span class="pl-s">'bert-base-uncased'</span>
<span class="pl-s1">number_train_epoch</span> <span class="pl-c1">=</span> <span class="pl-c1">5</span>
<span class="pl-k">def</span> <span class="pl-en">tokenize</span>(<span class="pl-s1">batch</span>):
<span class="pl-k">return</span> <span class="pl-en">tokenizer</span>(<span class="pl-s1">batch</span>[<span class="pl-s">'premise'</span>], <span class="pl-s1">batch</span>[<span class="pl-s">'hypothesis'</span>], <span class="pl-s1">truncation</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, )
<span class="pl-k">def</span> <span class="pl-en">compute_metrics</span>(<span class="pl-s1">pred</span>):
<span class="pl-s1">labels</span> <span class="pl-c1">=</span> <span class="pl-s1">pred</span>.<span class="pl-s1">label_ids</span>
<span class="pl-s1">preds</span> <span class="pl-c1">=</span> <span class="pl-s1">pred</span>.<span class="pl-s1">predictions</span>.<span class="pl-en">argmax</span>(<span class="pl-c1">-</span><span class="pl-c1">1</span>)
<span class="pl-s1">precision</span>, <span class="pl-s1">recall</span>, <span class="pl-s1">f1</span>, <span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-en">precision_recall_fscore_support</span>(<span class="pl-s1">labels</span>, <span class="pl-s1">preds</span>, <span class="pl-s1">average</span><span class="pl-c1">=</span><span class="pl-s">'micro'</span>)
<span class="pl-s1">acc</span> <span class="pl-c1">=</span> <span class="pl-en">accuracy_score</span>(<span class="pl-s1">labels</span>, <span class="pl-s1">preds</span>)
<span class="pl-k">return</span> {
<span class="pl-s">'accuracy'</span>: <span class="pl-s1">acc</span>,
<span class="pl-s">'f1'</span>: <span class="pl-s1">f1</span>,
<span class="pl-s">'precision'</span>: <span class="pl-s1">precision</span>,
<span class="pl-s">'recall'</span>: <span class="pl-s1">recall</span>
}
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">BertForSequenceClassification</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-s1">model_checkpoint</span>, <span class="pl-s1">num_labels</span><span class="pl-c1">=</span><span class="pl-s1">num_labels_size</span>)
<span class="pl-s1">tokenizer</span> <span class="pl-c1">=</span> <span class="pl-v">BertTokenizerFast</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-s1">model_checkpoint</span>, <span class="pl-s1">use_fast</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">train_dataset</span> <span class="pl-c1">=</span> <span class="pl-en">load_dataset</span>(<span class="pl-s1">dataset_name</span>, <span class="pl-s1">split</span><span class="pl-c1">=</span><span class="pl-s">'train'</span>)
<span class="pl-s1">test_dataset</span> <span class="pl-c1">=</span> <span class="pl-en">load_dataset</span>(<span class="pl-s1">dataset_name</span>, <span class="pl-s1">split</span><span class="pl-c1">=</span><span class="pl-s">'test'</span>)
<span class="pl-s1">train_encoded_dataset</span> <span class="pl-c1">=</span> <span class="pl-s1">train_dataset</span>.<span class="pl-en">map</span>(<span class="pl-s1">tokenize</span>, <span class="pl-s1">batched</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">test_encoded_dataset</span> <span class="pl-c1">=</span> <span class="pl-s1">test_dataset</span>.<span class="pl-en">map</span>(<span class="pl-s1">tokenize</span>, <span class="pl-s1">batched</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">args</span> <span class="pl-c1">=</span> <span class="pl-v">TrainingArguments</span>(
<span class="pl-s1">output_dir</span><span class="pl-c1">=</span><span class="pl-s">'./results'</span>,
<span class="pl-s1">evaluation_strategy</span><span class="pl-c1">=</span><span class="pl-s">"epoch"</span>,
<span class="pl-s1">learning_rate</span><span class="pl-c1">=</span><span class="pl-c1">2e-5</span>,
<span class="pl-s1">per_device_train_batch_size</span><span class="pl-c1">=</span><span class="pl-s1">batch_size</span>,
<span class="pl-s1">per_device_eval_batch_size</span><span class="pl-c1">=</span><span class="pl-s1">batch_size</span>,
<span class="pl-s1">num_train_epochs</span><span class="pl-c1">=</span><span class="pl-s1">number_train_epoch</span>,
<span class="pl-s1">weight_decay</span><span class="pl-c1">=</span><span class="pl-c1">0.01</span>,
<span class="pl-s1">do_predict</span><span class="pl-c1">=</span><span class="pl-c1">True</span>
)
<span class="pl-s1">trainer</span> <span class="pl-c1">=</span> <span class="pl-v">Trainer</span>(
<span class="pl-s1">model</span><span class="pl-c1">=</span><span class="pl-s1">model</span>,
<span class="pl-s1">args</span><span class="pl-c1">=</span><span class="pl-s1">args</span>,
<span class="pl-s1">compute_metrics</span><span class="pl-c1">=</span><span class="pl-s1">compute_metrics</span>,
<span class="pl-s1">train_dataset</span><span class="pl-c1">=</span><span class="pl-s1">train_encoded_dataset</span>,
<span class="pl-s1">eval_dataset</span><span class="pl-c1">=</span><span class="pl-s1">test_encoded_dataset</span>,
<span class="pl-s1">tokenizer</span><span class="pl-c1">=</span><span class="pl-s1">tokenizer</span>
)
<span class="pl-s1">trainer</span>.<span class="pl-en">train</span>()
<span class="pl-s1">trainer</span>.<span class="pl-en">evaluate</span>()</pre></div> | <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"><code class="notranslate">transformers.BertTokenizer.from_pretrained()</code> calls <code class="notranslate">get_fast_tokenizer_file()</code> which downloads a file from the HuggingFace server but never adds it to the cache.</p>
<p dir="auto">Would be useful to cache that file (in the same folder as the models) to make CI runs more robust.</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">Try to avoid having issues such as the one below in our CI runs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://huggingface.co/api/models/mrm8488/bert-small-finetuned-squadv2"><pre class="notranslate"><code class="notranslate">E requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://huggingface.co/api/models/mrm8488/bert-small-finetuned-squadv2
</code></pre></div>
<p dir="auto">This is a duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1085873504" data-permission-text="Title is private" data-url="https://github.com/huggingface/transformers/issues/14862" data-hovercard-type="issue" data-hovercard-url="/huggingface/transformers/issues/14862/hovercard" href="https://github.com/huggingface/transformers/issues/14862">#14862</a> which was closed without getting fixed and I don't seem able to re-open it.</p> | 0 |
<p dir="auto">By default, alt-f is bound to <code class="notranslate">editor:move-to-end-of-word</code> and alt-h to <code class="notranslate">editor:delete-to-beginning-of-word</code>. These conflict with activating <code class="notranslate">File</code> and <code class="notranslate">Help</code> menus in Windows.</p>
<p dir="auto">Suggestions:</p>
<ul dir="auto">
<li>Reserve alt-f and alt-h for menu bar access and change editor shortcuts.</li>
<li>Focus and activate menu bar via a single alt press so user can navigate through the menus using arrow keys (customary behavior in Windows).</li>
</ul> | <p dir="auto">The normal Windows <code class="notranslate">Alt+{letter}</code> menu shortcuts don't work in Atom. Holding <code class="notranslate">Alt</code> highlights the relevant letter in each menu name, but then pressing the letter doesn't open the menu. For example, <code class="notranslate">Alt+F</code> should open the File menu, but instead the Key Binding Resolver shows it invoking the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="editor:move-to-end-of-word atom-text-editor resources\app\keymaps\emacs.json"><pre class="notranslate"><code class="notranslate">editor:move-to-end-of-word atom-text-editor resources\app\keymaps\emacs.json
</code></pre></div>
<p dir="auto">This is a vanilla install of Atom 0.141.0 in Windows 7 Home Premium x64. I haven't opted in to enabling anything Emacs related.</p>
<p dir="auto">Pressing Alt also doesn't focus the menu bar and allow it to be navigated by arrow keys like it normally does in Windows.</p>
<p dir="auto">I'm reporting this per <a href="https://discuss.atom.io/t/alt-key-menu-bar-interaction-overrides-shortuts/9192/5" rel="nofollow">this suggestion</a></p> | 1 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="neo4j-sh (?)$ create (t:Test {a:"abc&&def"}) return t;
Unknown command 'def"})'
neo4j-sh (?)$ "><pre class="notranslate"><code class="notranslate">neo4j-sh (?)$ create (t:Test {a:"abc&&def"}) return t;
Unknown command 'def"})'
neo4j-sh (?)$
</code></pre></div>
<p dir="auto">This breaks imports from dumps where the data contains this pattern</p> | <p dir="auto">This issue ties together all bugs related to the shell's dump command.</p>
<h2 dir="auto">Schema support</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Constraints using indexes during import: there needs a way to wait for indexes to become available after creating them, otherwise the import takes forever.
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> The shell could be extended with a command to achieve the above, but this functionality might be better introduced in Cypher, some discussion occurred here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="34736039" data-permission-text="Title is private" data-url="https://github.com/neo4j/neo4j/issues/2491" data-hovercard-type="issue" data-hovercard-url="/neo4j/neo4j/issues/2491/hovercard?comment_id=44791266&comment_type=issue_comment" href="https://github.com/neo4j/neo4j/issues/2491#issuecomment-44791266">#2491 (comment)</a>. Edit: there actually already is the <em>schema await</em> command which can be used for that purpose.</li>
</ul>
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Currently indexes and schema creation statements aren't properly generated, they need to be separate statements. Issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="34736039" data-permission-text="Title is private" data-url="https://github.com/neo4j/neo4j/issues/2491" data-hovercard-type="issue" data-hovercard-url="/neo4j/neo4j/issues/2491/hovercard" href="https://github.com/neo4j/neo4j/issues/2491">#2491</a>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nawroth/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nawroth">@nawroth</a> raised the question whether this change will break the integrated live console in the manual here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35684692" data-permission-text="Title is private" data-url="https://github.com/neo4j/neo4j/issues/2576" data-hovercard-type="pull_request" data-hovercard-url="/neo4j/neo4j/pull/2576/hovercard?comment_id=46100875&comment_type=issue_comment" href="https://github.com/neo4j/neo4j/pull/2576#issuecomment-46100875">#2576 (comment)</a> So this needs to be tested.</li>
</ul>
</li>
</ul>
<h2 dir="auto">Robustness</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Newline characters need to be properly escaped (also: tab, ...). Issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35687676" data-permission-text="Title is private" data-url="https://github.com/neo4j/neo4j/issues/2577" data-hovercard-type="issue" data-hovercard-url="/neo4j/neo4j/issues/2577/hovercard" href="https://github.com/neo4j/neo4j/issues/2577">#2577</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Strings containing <em>&&</em> confuse the shell. There might be more problems if the shell attempts to parse something inside a string. Issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35724768" data-permission-text="Title is private" data-url="https://github.com/neo4j/neo4j/issues/2579" data-hovercard-type="issue" data-hovercard-url="/neo4j/neo4j/issues/2579/hovercard" href="https://github.com/neo4j/neo4j/issues/2579">#2579</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Byte arrays are exported as int arrays. Does Cypher support byte arrays? Should it? Issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="34736039" data-permission-text="Title is private" data-url="https://github.com/neo4j/neo4j/issues/2491" data-hovercard-type="issue" data-hovercard-url="/neo4j/neo4j/issues/2491/hovercard" href="https://github.com/neo4j/neo4j/issues/2491">#2491</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Maybe (no personal experience with large data sets): scaling to allow inserting more data than fitting a single transaction. This depends on what the goal of the <em>dump</em> command is, whether it shall be usable the same way SQL people dump DBs to SQL scripts to load them into another DB or whether dump is designed for smaller data sets (this should also be documented, so people will know what to expect from the command).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Cosmetics: there shouldn't be a BEGIN/COMMIT pair for schema creation if no schema is created</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Order of dumped statements (esp. index/constrains), discussion: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="68768895" data-permission-text="Title is private" data-url="https://github.com/neo4j/neo4j/issues/4437" data-hovercard-type="pull_request" data-hovercard-url="/neo4j/neo4j/pull/4437/hovercard" href="https://github.com/neo4j/neo4j/pull/4437">#4437</a></li>
</ul> | 1 |
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="myfunc(myvar::AbstractMyType{T})::Array{T} where {T} = myvar.myproperty"><pre class="notranslate"><span class="pl-en">myfunc</span>(myvar<span class="pl-k">::</span><span class="pl-c1">AbstractMyType{T}</span>)<span class="pl-k">::</span><span class="pl-c1">Array{T}</span> <span class="pl-k">where</span> {T} <span class="pl-k">=</span> myvar<span class="pl-k">.</span>myproperty</pre></div>
<p dir="auto">throws <code class="notranslate">UndefVarError: T not defined</code> but</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function myfunc(myvar::AbstractMyType{T})::Array{T} where {T}
myvar.myproperty
end"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">myfunc</span>(myvar<span class="pl-k">::</span><span class="pl-c1">AbstractMyType{T}</span>)<span class="pl-k">::</span><span class="pl-c1">Array{T}</span> <span class="pl-k">where</span> {T}
myvar<span class="pl-k">.</span>myproperty
<span class="pl-k">end</span></pre></div>
<p dir="auto">works absolutely fine. Is there something I am missing?</p> | <p dir="auto">In other words, <code class="notranslate">::ReturnType</code> is incompatible with <code class="notranslate">where</code> clauses in the short function form declarations.<br>
I thought an exemple was more clear than my words in the title.</p> | 1 |
<p dir="auto">Duplication of request clears list of fields in the original request instead of duplicated one.</p> | <p dir="auto">According to the phpDoc annotation of <code class="notranslate">Symfony\Component\BrowserKit::getResponse()</code>, an instance of <code class="notranslate">Symfony\Component\BrowserKit\Response</code> should be returned by that method. But instead, I get an instance of <code class="notranslate">Symfony\Component\HttpFoundation\Response</code>. Unfortunately, the interfaces of both classes differ (eg. <code class="notranslate">getStatus()</code> vs. <code class="notranslate">getStatusCode()</code>). Since those phpDoc annotations are use by most IDEs for code completion, this circumstance might be confusing.</p>
<p dir="auto">I've modified the standard edition's DemoControllerTest to reproduce this issue:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
namespace Acme\DemoBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DemoControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$client->request('GET', '/demo/hello/Fabien');
$this->assertInstanceOf(
'Symfony\\Component\\BrowserKit\\Response',
$client->getResponse()
);
}
}"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-k">namespace</span> <span class="pl-v">Acme</span>\<span class="pl-v">DemoBundle</span>\<span class="pl-v">Tests</span>\<span class="pl-v">Controller</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">DemoControllerTest</span> <span class="pl-k">extends</span> <span class="pl-v">WebTestCase</span>
{
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">testIndex</span>()
{
<span class="pl-s1"><span class="pl-c1">$</span>client</span> = <span class="pl-smi"><span class="pl-k">static</span></span>::<span class="pl-en">createClient</span>();
<span class="pl-s1"><span class="pl-c1">$</span>client</span>-><span class="pl-en">request</span>(<span class="pl-s">'GET'</span>, <span class="pl-s">'/demo/hello/Fabien'</span>);
<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-en">assertInstanceOf</span>(
<span class="pl-s">'Symfony\\Component\\BrowserKit\\Response'</span>,
<span class="pl-s1"><span class="pl-c1">$</span>client</span>-><span class="pl-en">getResponse</span>()
);
}
}</pre></div>
<p dir="auto">Result:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Failed asserting that Symfony\Component\HttpFoundation\Response Object (...) is an instance of class "Symfony\Component\BrowserKit\Response"."><pre class="notranslate"><code class="notranslate">Failed asserting that Symfony\Component\HttpFoundation\Response Object (...) is an instance of class "Symfony\Component\BrowserKit\Response".
</code></pre></div>
<p dir="auto">The examples from the documentation (<a href="http://symfony.com/doc/current/book/testing.html" rel="nofollow">http://symfony.com/doc/current/book/testing.html</a>) reflect the current behavior. This is why I would suggest to adjust the phpDoc annotations accordingly.</p> | 0 |
<p dir="auto">Following Code "suddenly" (TM) gives a compiler panick:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use std::iter::Iterator;
fn map<T, U, I: Iterator<T>>(fun: |T| -> U, mut iter: I) -> Vec<U> {
let mut acc = vec![];
for elt in iter {
acc.push(fun(elt));
}
acc
}
fn main() {
let x = map(|&x| x + 2, vec![1u,2,3].iter());
println!("{}", x);
}"><pre class="notranslate"><span class="pl-k">use</span> std<span class="pl-kos">::</span>iter<span class="pl-kos">::</span><span class="pl-v">Iterator</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">map</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">U</span><span class="pl-kos">,</span> <span class="pl-smi">I</span><span class="pl-kos">:</span> <span class="pl-smi">Iterator</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>fun<span class="pl-kos">:</span> |<span class="pl-v">T</span>| -> <span class="pl-v">U</span><span class="pl-kos">,</span> <span class="pl-k">mut</span> <span class="pl-s1">iter</span><span class="pl-kos">:</span> <span class="pl-smi">I</span><span class="pl-kos">)</span> -> <span class="pl-smi">Vec</span><span class="pl-kos"><</span><span class="pl-smi">U</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> <span class="pl-k">mut</span> acc = <span class="pl-en">vec</span><span class="pl-en">!</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> elt <span class="pl-k">in</span> iter <span class="pl-kos">{</span>
acc<span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-en">fun</span><span class="pl-kos">(</span>elt<span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
acc
<span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> x = <span class="pl-en">map</span><span class="pl-kos">(</span>|<span class="pl-c1">&</span>x| x + <span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-en">vec</span><span class="pl-en">!</span><span class="pl-kos">[</span><span class="pl-c1">1</span>u,<span class="pl-c1">2</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><span class="pl-kos">;</span>
<span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{}"</span>, x<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="RUST_BACKTRACE=1 rustc main.rs
main.rs:12:15: 12:17 error: internal compiler error: Explicit deref of non-derefable type: _
main.rs:12 let x = map(|&x| x + 2, vec![1u,2,3].iter());
^~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:123
stack backtrace:
1: 0x10748ec68 - sys::backtrace::write::h2d77a7138a20fe1euut
2: 0x1074af7c3 - failure::on_fail::h2cc73921e1a3525egKz
3: 0x10741aeaa - rt::unwind::begin_unwind_inner::h532a687405d73115Hrz
4: 0x10531bd17 - rt::unwind::begin_unwind::h15459044600925994434
5: 0x10531bcb0 - rt::unwind::begin_unwind::h15459044600925994434
6: 0x10479129d - session::Session::span_bug::h716f9146fd05af890mn
7: 0x104212102 - middle::mem_categorization::MemCategorizationContext<$u{27}t$C$$u{20}TYPER$GT$::cat_pattern::h11154186174841680722
8: 0x1042022eb - check::regionck::link_pattern::h3d88852e6995969cnte
9: 0x1041f731d - check::regionck::Rcx<$u{27}a$C$$u{20}$u{27}tcx$GT$::visit_fn_body::h3531a5331ab5d017eRc
10: 0x1041fd2ae - check::regionck::visit_expr::hb02321dca5467066bgd
11: 0x104201700 - visit::walk_expr::h3328713682639576950
12: 0x1041fe1b7 - check::regionck::visit_expr::hb02321dca5467066bgd
13: 0x1041ff87d - check::regionck::visit_local::hb9b4f9d3743633d9cdd
14: 0x1041ff975 - visit::walk_block::h8586344471945380718
15: 0x1041f7349 - check::regionck::Rcx<$u{27}a$C$$u{20}$u{27}tcx$GT$::visit_fn_body::h3531a5331ab5d017eRc
16: 0x10429aa2b - check::check_bare_fn::h0d1902e379bc0448Vck
17: 0x104292a13 - check::check_item::h8ef5214e6b2fce2clwk
18: 0x10450c700 - check_crate::unboxed_closure.43369
19: 0x104507ead - check_crate::h1dd3d2699b8432207Zy
20: 0x103c0f1de - driver::phase_3_run_analysis_passes::he4e2174c0e224f23Ita
21: 0x103bf211e - driver::compile_input::h344438f314911396vba
22: 0x103d6a9d6 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h2961138960758151848
23: 0x103d672d9 - rt::unwind::try::try_fn::h13787826984171194494
24: 0x107515d29 - rust_try_inner
25: 0x107515d16 - rust_try
26: 0x103d679d7 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h9959509829464533531
27: 0x10749ec84 - sys::thread::thread_start::h772e1e477575f4beXpw
28: 0x107d8f2fc - _pthread_body
29: 0x107d8f279 - _pthread_body"><pre class="notranslate"><code class="notranslate">RUST_BACKTRACE=1 rustc main.rs
main.rs:12:15: 12:17 error: internal compiler error: Explicit deref of non-derefable type: _
main.rs:12 let x = map(|&x| x + 2, vec![1u,2,3].iter());
^~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:123
stack backtrace:
1: 0x10748ec68 - sys::backtrace::write::h2d77a7138a20fe1euut
2: 0x1074af7c3 - failure::on_fail::h2cc73921e1a3525egKz
3: 0x10741aeaa - rt::unwind::begin_unwind_inner::h532a687405d73115Hrz
4: 0x10531bd17 - rt::unwind::begin_unwind::h15459044600925994434
5: 0x10531bcb0 - rt::unwind::begin_unwind::h15459044600925994434
6: 0x10479129d - session::Session::span_bug::h716f9146fd05af890mn
7: 0x104212102 - middle::mem_categorization::MemCategorizationContext<$u{27}t$C$$u{20}TYPER$GT$::cat_pattern::h11154186174841680722
8: 0x1042022eb - check::regionck::link_pattern::h3d88852e6995969cnte
9: 0x1041f731d - check::regionck::Rcx<$u{27}a$C$$u{20}$u{27}tcx$GT$::visit_fn_body::h3531a5331ab5d017eRc
10: 0x1041fd2ae - check::regionck::visit_expr::hb02321dca5467066bgd
11: 0x104201700 - visit::walk_expr::h3328713682639576950
12: 0x1041fe1b7 - check::regionck::visit_expr::hb02321dca5467066bgd
13: 0x1041ff87d - check::regionck::visit_local::hb9b4f9d3743633d9cdd
14: 0x1041ff975 - visit::walk_block::h8586344471945380718
15: 0x1041f7349 - check::regionck::Rcx<$u{27}a$C$$u{20}$u{27}tcx$GT$::visit_fn_body::h3531a5331ab5d017eRc
16: 0x10429aa2b - check::check_bare_fn::h0d1902e379bc0448Vck
17: 0x104292a13 - check::check_item::h8ef5214e6b2fce2clwk
18: 0x10450c700 - check_crate::unboxed_closure.43369
19: 0x104507ead - check_crate::h1dd3d2699b8432207Zy
20: 0x103c0f1de - driver::phase_3_run_analysis_passes::he4e2174c0e224f23Ita
21: 0x103bf211e - driver::compile_input::h344438f314911396vba
22: 0x103d6a9d6 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h2961138960758151848
23: 0x103d672d9 - rt::unwind::try::try_fn::h13787826984171194494
24: 0x107515d29 - rust_try_inner
25: 0x107515d16 - rust_try
26: 0x103d679d7 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h9959509829464533531
27: 0x10749ec84 - sys::thread::thread_start::h772e1e477575f4beXpw
28: 0x107d8f2fc - _pthread_body
29: 0x107d8f279 - _pthread_body
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc --version --verbose
rustc 0.13.0-nightly (cc19e3380 2014-12-20 20:00:36 +0000)
binary: rustc
commit-hash: cc19e3380b4b7c63b6f1f79d1dfc213ea00e16cf
commit-date: 2014-12-20 20:00:36 +0000
host: x86_64-apple-darwin
release: 0.13.0-nightly"><pre class="notranslate"><code class="notranslate">rustc --version --verbose
rustc 0.13.0-nightly (cc19e3380 2014-12-20 20:00:36 +0000)
binary: rustc
commit-hash: cc19e3380b4b7c63b6f1f79d1dfc213ea00e16cf
commit-date: 2014-12-20 20:00:36 +0000
host: x86_64-apple-darwin
release: 0.13.0-nightly
</code></pre></div>
<p dir="auto">(probably a duplicate but the other code did not look similar to the one here in my eyes)</p> | <p dir="auto">The following code causes the compiler to fail. Conversation on IRC suggests this is a known issue, but I could not find this specific error by searching tickets for "Cannot encode region variables" nor any of the hits for "region variables".</p>
<p dir="auto">I apologize if this is a duplicate.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat ./vecpeek.rs
extern mod std; // Only for tests.
fn vec_peek<T>(v: &r/[T]) -> Option< (&r/T, &r/[T]) > {
if v.len() == 0 {
None
} else {
let head = &v[0];
let tail = v.view(1, v.len());
Some( (head, tail) )
}
}
mod tests {
/* Testing the different storage locations covers features which
* should be completely orthogonal (ie: that regions work with any
* storage area, but the language is young, so we do test just
* in case.
*/
#[test]
fn test_peek_empty_stack() {
let v : &[int] = &[];
assert (None == vec_peek(v));
}
#[test]
fn test_peek_empty_unique() {
let v : ~[int] = ~[];
assert (None == vec_peek(v));
}
#[test]
fn test_peek_empty_managed() {
let v : @[int] = @[];
assert (None == vec_peek(v));
}
/*
#[test]
fn test_peek_full_stack() {
let v: &[int] = &[1, 2, 3];
let head: &int = &v[0];
let tail: &[int] = v.view(1, v.len());
match
assert (None == vec_peek(v));
}
*/
}
$ rustc --test ./vecpeek.rs
error: internal compiler error: Cannot encode region variables
$ rustc --version
rustc 0.5 (07edf90 2012-10-13 05:57:13 -0700)
host: x86_64-unknown-linux-gnu"><pre class="notranslate"><code class="notranslate">$ cat ./vecpeek.rs
extern mod std; // Only for tests.
fn vec_peek<T>(v: &r/[T]) -> Option< (&r/T, &r/[T]) > {
if v.len() == 0 {
None
} else {
let head = &v[0];
let tail = v.view(1, v.len());
Some( (head, tail) )
}
}
mod tests {
/* Testing the different storage locations covers features which
* should be completely orthogonal (ie: that regions work with any
* storage area, but the language is young, so we do test just
* in case.
*/
#[test]
fn test_peek_empty_stack() {
let v : &[int] = &[];
assert (None == vec_peek(v));
}
#[test]
fn test_peek_empty_unique() {
let v : ~[int] = ~[];
assert (None == vec_peek(v));
}
#[test]
fn test_peek_empty_managed() {
let v : @[int] = @[];
assert (None == vec_peek(v));
}
/*
#[test]
fn test_peek_full_stack() {
let v: &[int] = &[1, 2, 3];
let head: &int = &v[0];
let tail: &[int] = v.view(1, v.len());
match
assert (None == vec_peek(v));
}
*/
}
$ rustc --test ./vecpeek.rs
error: internal compiler error: Cannot encode region variables
$ rustc --version
rustc 0.5 (07edf90 2012-10-13 05:57:13 -0700)
host: x86_64-unknown-linux-gnu
</code></pre></div> | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.