text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item">
<p dir="auto"><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. <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/90fe53f901cf2e71c570fa639aa9b39ad228fadd/hovercard" href="https://github.com/celery/celery/commit/90fe53f901cf2e71c570fa639aa9b39ad228fadd"><tt>90fe53f</tt></a></p>
</li>
<li class="task-list-item">
<p dir="auto"><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.</p>
</li>
<li class="task-list-item">
<p dir="auto"><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.</p>
</li>
<li class="task-list-item">
<p dir="auto"><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.</p>
</li>
<li class="task-list-item">
<p dir="auto"><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.</p>
</li>
<li class="task-list-item">
<p dir="auto"><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.</p>
</li>
<li class="task-list-item">
<p dir="auto"><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).</p>
</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 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" checked=""> 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="software -> celery:4.4.0 (cliffs) kombu:4.6.7 py:3.7.6
billiard:3.6.1.0 redis:3.3.11
platform -> system:Linux arch:64bit
kernel version:5.4.13-3-MANJARO imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:redis://redis:6379/2"><pre class="notranslate"><code class="notranslate">software -> celery:4.4.0 (cliffs) kombu:4.6.7 py:3.7.6
billiard:3.6.1.0 redis:3.3.11
platform -> system:Linux arch:64bit
kernel version:5.4.13-3-MANJARO imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:redis://redis:6379/2
</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="amqp==2.5.2
apipkg==1.5
attrs==19.3.0
backcall==0.1.0
billiard==3.6.1.0
blinker==1.4
boltons==19.3.0
cachetools==4.0.0
celery==4.4.0
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
Click==7.0
cryptography==2.8
decorator==4.4.1
defusedxml==0.6.0
dnspython==1.16.0
dotted==0.1.8
elasticsearch==7.1.0
elasticsearch-dsl==7.1.0
execnet==1.7.1
Flask==1.1.1
Flask-Caching==1.4.0
Flask-Cors==3.0.8
Flask-Limiter==1.1.0
Flask-Login==0.4.1
flask-mongoengine==0.9.5
flask-shell-ipython==0.4.1
Flask-WTF==0.14.2
gevent==1.4.0
google-api-core==1.15.0
google-auth==1.10.0
google-cloud-core==1.1.0
google-cloud-pubsub==1.1.0
google-cloud-storage==1.23.0
google-resumable-media==0.5.0
googleapis-common-protos==1.6.0
greenlet==0.4.15
grpc-google-iam-v1==0.12.3
grpcio==1.26.0
httpagentparser==1.9.0
httplib2==0.15.0
idna==2.8
importlib-metadata==1.4.0
ipython==7.10.2
ipython-genutils==0.2.0
itsdangerous==1.1.0
jedi==0.15.2
Jinja2==2.10.3
kombu==4.6.7
libthumbor==1.3.2
limits==1.3
MarkupSafe==1.1.1
marshmallow==3.3.0
mixpanel==4.5.0
mmh3==2.5.1
mongoengine==0.18.2
more-itertools==8.1.0
multidict==4.7.4
ndg-httpsclient==0.5.1
newrelic==5.4.1.134
nexmo==2.4.0
oauth2client==4.1.3
oauthlib==3.1.0
packaging==20.0
parso==0.5.2
pexpect==4.7.0
phonenumbers==8.11.1
pickleshare==0.7.5
Pillow-SIMD==6.0.0.post0
pluggy==0.13.1
prompt-toolkit==3.0.2
protobuf==3.9.0
ptyprocess==0.6.0
pusher==2.1.4
py==1.8.1
py-cpuinfo==5.0.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pybase62==0.4.3
pycparser==2.19
Pygments==2.5.2
PyJWT==1.7.1
pymongo==3.10.0
PyNaCl==1.3.0
pyOpenSSL==19.1.0
pyparsing==2.4.6
pytelegraf==0.3.3
pytest==5.3.2
pytest-benchmark==3.2.3
pytest-forked==1.1.3
pytest-mock==1.13.0
pytest-sugar==0.9.2
pytest-xdist==1.31.0
python-dateutil==2.8.1
python-rapidjson==0.9.1
python3-openid==3.1.0
pytz==2019.3
PyYAML==5.2
redis==3.3.11
requests==2.22.0
requests-oauthlib==1.3.0
rsa==4.0
semantic-version==2.8.3
sentry-sdk==0.13.5
six==1.13.0
social-auth-app-flask==1.0.0
social-auth-core==3.2.0
social-auth-storage-mongoengine==1.0.1
termcolor==1.1.0
traitlets==4.3.3
twilio==6.35.1
urllib3==1.25.7
uWSGI==2.0.18
vine==1.3.0
wcwidth==0.1.8
webargs==5.5.2
Werkzeug==0.15.5
WTForms==2.2.1
yarl==1.4.2
zipp==0.6.0"><pre class="notranslate"><code class="notranslate">amqp==2.5.2
apipkg==1.5
attrs==19.3.0
backcall==0.1.0
billiard==3.6.1.0
blinker==1.4
boltons==19.3.0
cachetools==4.0.0
celery==4.4.0
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
Click==7.0
cryptography==2.8
decorator==4.4.1
defusedxml==0.6.0
dnspython==1.16.0
dotted==0.1.8
elasticsearch==7.1.0
elasticsearch-dsl==7.1.0
execnet==1.7.1
Flask==1.1.1
Flask-Caching==1.4.0
Flask-Cors==3.0.8
Flask-Limiter==1.1.0
Flask-Login==0.4.1
flask-mongoengine==0.9.5
flask-shell-ipython==0.4.1
Flask-WTF==0.14.2
gevent==1.4.0
google-api-core==1.15.0
google-auth==1.10.0
google-cloud-core==1.1.0
google-cloud-pubsub==1.1.0
google-cloud-storage==1.23.0
google-resumable-media==0.5.0
googleapis-common-protos==1.6.0
greenlet==0.4.15
grpc-google-iam-v1==0.12.3
grpcio==1.26.0
httpagentparser==1.9.0
httplib2==0.15.0
idna==2.8
importlib-metadata==1.4.0
ipython==7.10.2
ipython-genutils==0.2.0
itsdangerous==1.1.0
jedi==0.15.2
Jinja2==2.10.3
kombu==4.6.7
libthumbor==1.3.2
limits==1.3
MarkupSafe==1.1.1
marshmallow==3.3.0
mixpanel==4.5.0
mmh3==2.5.1
mongoengine==0.18.2
more-itertools==8.1.0
multidict==4.7.4
ndg-httpsclient==0.5.1
newrelic==5.4.1.134
nexmo==2.4.0
oauth2client==4.1.3
oauthlib==3.1.0
packaging==20.0
parso==0.5.2
pexpect==4.7.0
phonenumbers==8.11.1
pickleshare==0.7.5
Pillow-SIMD==6.0.0.post0
pluggy==0.13.1
prompt-toolkit==3.0.2
protobuf==3.9.0
ptyprocess==0.6.0
pusher==2.1.4
py==1.8.1
py-cpuinfo==5.0.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pybase62==0.4.3
pycparser==2.19
Pygments==2.5.2
PyJWT==1.7.1
pymongo==3.10.0
PyNaCl==1.3.0
pyOpenSSL==19.1.0
pyparsing==2.4.6
pytelegraf==0.3.3
pytest==5.3.2
pytest-benchmark==3.2.3
pytest-forked==1.1.3
pytest-mock==1.13.0
pytest-sugar==0.9.2
pytest-xdist==1.31.0
python-dateutil==2.8.1
python-rapidjson==0.9.1
python3-openid==3.1.0
pytz==2019.3
PyYAML==5.2
redis==3.3.11
requests==2.22.0
requests-oauthlib==1.3.0
rsa==4.0
semantic-version==2.8.3
sentry-sdk==0.13.5
six==1.13.0
social-auth-app-flask==1.0.0
social-auth-core==3.2.0
social-auth-storage-mongoengine==1.0.1
termcolor==1.1.0
traitlets==4.3.3
twilio==6.35.1
urllib3==1.25.7
uWSGI==2.0.18
vine==1.3.0
wcwidth==0.1.8
webargs==5.5.2
Werkzeug==0.15.5
WTForms==2.2.1
yarl==1.4.2
zipp==0.6.0
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import time
from flask import Flask
from celery import Celery, group
app = Flask(__name__)
celery = Celery('app', broker='redis://redis:6379/1', backend='redis://redis:6379/2')
@celery.task
def debug():
return
@app.route('/', methods={'GET', 'POST'})
def hello_world():
task = group([
debug.si() for i in range(10)
]).apply_async()
start = time.perf_counter()
task.get(timeout=5, interval=0.01)
print('END', (time.perf_counter() - start) * 1000)
return {}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">time</span>
<span class="pl-k">from</span> <span class="pl-s1">flask</span> <span class="pl-k">import</span> <span class="pl-v">Flask</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">group</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Flask</span>(<span class="pl-s1">__name__</span>)
<span class="pl-s1">celery</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">'app'</span>, <span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">'redis://redis:6379/1'</span>, <span class="pl-s1">backend</span><span class="pl-c1">=</span><span class="pl-s">'redis://redis:6379/2'</span>)
<span class="pl-en">@<span class="pl-s1">celery</span>.<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">debug</span>():
<span class="pl-k">return</span>
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">route</span>(<span class="pl-s">'/'</span>, <span class="pl-s1">methods</span><span class="pl-c1">=</span>{<span class="pl-s">'GET'</span>, <span class="pl-s">'POST'</span>})</span>
<span class="pl-k">def</span> <span class="pl-en">hello_world</span>():
<span class="pl-s1">task</span> <span class="pl-c1">=</span> <span class="pl-en">group</span>([
<span class="pl-s1">debug</span>.<span class="pl-en">si</span>() <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">10</span>)
]).<span class="pl-en">apply_async</span>()
<span class="pl-s1">start</span> <span class="pl-c1">=</span> <span class="pl-s1">time</span>.<span class="pl-en">perf_counter</span>()
<span class="pl-s1">task</span>.<span class="pl-en">get</span>(<span class="pl-s1">timeout</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">interval</span><span class="pl-c1">=</span><span class="pl-c1">0.01</span>)
<span class="pl-en">print</span>(<span class="pl-s">'END'</span>, (<span class="pl-s1">time</span>.<span class="pl-en">perf_counter</span>() <span class="pl-c1">-</span> <span class="pl-s1">start</span>) <span class="pl-c1">*</span> <span class="pl-c1">1000</span>)
<span class="pl-k">return</span> {}</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Scheduling noop tasks and setting <code class="notranslate">interval</code> should make the response time near the set <code class="notranslate">interval</code> in ideal clean environments.</p>
<p dir="auto">Example: Setting <code class="notranslate">task.get(interval=0.1)</code> with 5x noop tasks, I would expect near <code class="notranslate">100ms</code> response.</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">Regardless of the setting of <code class="notranslate">interval</code>, the response time is at least 500ms.</p>
<p dir="auto">The cause is that <code class="notranslate">interval</code> is not passed all the way to <code class="notranslate">get_many()</code> where it defaults to <code class="notranslate">500ms</code> which is where the minimum latency is comming from.<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/celery/celery/blob/cf829307991da3815e1f7b105e736d13dbc7a325/celery/result.py#L837-L840">celery/celery/result.py</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 837 to 840
in
<a data-pjax="true" class="commit-tease-sha" href="/celery/celery/commit/cf829307991da3815e1f7b105e736d13dbc7a325">cf82930</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="L837" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="837"></td>
<td id="LC837" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">def</span> <span class="pl-en">_iter_meta</span>(<span class="pl-s1">self</span>): </td>
</tr>
<tr class="border-0">
<td id="L838" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="838"></td>
<td id="LC838" 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">meta</span> <span class="pl-k">for</span> <span class="pl-s1">_</span>, <span class="pl-s1">meta</span> <span class="pl-c1">in</span> <span class="pl-s1">self</span>.<span class="pl-s1">backend</span>.<span class="pl-en">get_many</span>( </td>
</tr>
<tr class="border-0">
<td id="L839" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="839"></td>
<td id="LC839" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> {<span class="pl-s1">r</span>.<span class="pl-s1">id</span> <span class="pl-k">for</span> <span class="pl-s1">r</span> <span class="pl-c1">in</span> <span class="pl-s1">self</span>.<span class="pl-s1">results</span>}, <span class="pl-s1">max_iterations</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, </td>
</tr>
<tr class="border-0">
<td id="L840" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="840"></td>
<td id="LC840" 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>
<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/dc03b6d342a8008d123c97cb889d19add485f8a2/celery/backends/base.py#L663-L666">celery/celery/backends/base.py</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 663 to 666
in
<a data-pjax="true" class="commit-tease-sha" href="/celery/celery/commit/dc03b6d342a8008d123c97cb889d19add485f8a2">dc03b6d</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="L663" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="663"></td>
<td id="LC663" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">def</span> <span class="pl-en">get_many</span>(<span class="pl-s1">self</span>, <span class="pl-s1">task_ids</span>, <span class="pl-s1">timeout</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">interval</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>, <span class="pl-s1">no_ack</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, </td>
</tr>
<tr class="border-0">
<td id="L664" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="664"></td>
<td id="LC664" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">on_message</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">on_interval</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">max_iterations</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, </td>
</tr>
<tr class="border-0">
<td id="L665" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="665"></td>
<td id="LC665" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-v">READY_STATES</span><span class="pl-c1">=</span><span class="pl-s1">states</span>.<span class="pl-v">READY_STATES</span>): </td>
</tr>
<tr class="border-0">
<td id="L666" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="666"></td>
<td id="LC666" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">interval</span> <span class="pl-c1">=</span> <span class="pl-c1">0.5</span> <span class="pl-k">if</span> <span class="pl-s1">interval</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span> <span class="pl-k">else</span> <span class="pl-s1">interval</span> </td>
</tr>
</tbody></table>
</div>
</div>
<p></p> | <h1 dir="auto">problem one: request be executed at the wrong time</h1>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" def _schedule_bucket_request(self, request, bucket, tokens):
bucket.can_consume(tokens)
bucket.add(request)
pri = self._limit_order = (self._limit_order + 1) % 10
hold = bucket.expected_time(tokens)
self.timer.call_after(
hold, self._on_bucket_wakeup, (bucket, tokens),
priority=pri,
)"><pre class="notranslate"> <span class="pl-k">def</span> <span class="pl-en">_schedule_bucket_request</span>(<span class="pl-s1">self</span>, <span class="pl-s1">request</span>, <span class="pl-s1">bucket</span>, <span class="pl-s1">tokens</span>):
<span class="pl-s1">bucket</span>.<span class="pl-en">can_consume</span>(<span class="pl-s1">tokens</span>)
<span class="pl-s1">bucket</span>.<span class="pl-en">add</span>(<span class="pl-s1">request</span>)
<span class="pl-s1">pri</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_limit_order</span> <span class="pl-c1">=</span> (<span class="pl-s1">self</span>.<span class="pl-s1">_limit_order</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span>) <span class="pl-c1">%</span> <span class="pl-c1">10</span>
<span class="pl-s1">hold</span> <span class="pl-c1">=</span> <span class="pl-s1">bucket</span>.<span class="pl-en">expected_time</span>(<span class="pl-s1">tokens</span>)
<span class="pl-s1">self</span>.<span class="pl-s1">timer</span>.<span class="pl-en">call_after</span>(
<span class="pl-s1">hold</span>, <span class="pl-s1">self</span>.<span class="pl-s1">_on_bucket_wakeup</span>, (<span class="pl-s1">bucket</span>, <span class="pl-s1">tokens</span>),
<span class="pl-s1">priority</span><span class="pl-c1">=</span><span class="pl-s1">pri</span>,
)</pre></div>
<h2 dir="auto">Actual behavior</h2>
<p dir="auto">If token bucket have enough token, <code class="notranslate">bucket.can_consume</code> will consume token, then compute the hold time and <strong>add timer</strong> to run it.</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">If the tokens is enough, the requests should be executed Immediate。<br>
PS: The bucket's capacity is set 1 by default, so the <code class="notranslate">hold time</code> will be tokens/fill_rate. If the fill_rate is very slow, i will wait so long time.</p>
<h1 dir="auto">problem two: may consume incorrect tokens</h1>
<h2 dir="auto">Actual behavior</h2>
<ul dir="auto">
<li><code class="notranslate">_schedule_bucket_request</code> will add request to bucket, <code class="notranslate">_on_bucket_wakeup</code>、<code class="notranslate">_schedule_oldest_bucket_request</code> will pop request from bucket.</li>
<li><code class="notranslate">bucket.add</code> add the request to right, <code class="notranslate">bucket.pop</code> pop the request from left</li>
<li><strong>the request is NOT bind with tokens</strong>, so this can cause: "execute request with incorrect tokens"</li>
</ul>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">consume the correct token when the request was executed.</p>
<h1 dir="auto">problem three: disordered schedule</h1>
<h2 dir="auto">Actual behavior</h2>
<ul dir="auto">
<li>assume that there have some request in <code class="notranslate">bucket.contents</code>, [request1, request2, ..., requestN]</li>
<li><code class="notranslate">_on_bucket_wakeup</code> will pop the <code class="notranslate">request1</code> and call <code class="notranslate">limit_move_to_pool</code> to schedule it, and call <code class="notranslate">_schedule_oldest_bucket_request</code> to schedule oldest request</li>
<li><code class="notranslate">_schedule_oldest_bucket_request</code> will pop the <code class="notranslate">request2</code>, and call <code class="notranslate">_schedule_bucket_request</code> to schedule it. But in <code class="notranslate">_schedule_bucket_request</code>, the <code class="notranslate">request2</code> will be append to bucket's tail instead of be executed or requeued.</li>
</ul>
<h2 dir="auto">Expected behavior</h2>
<ul dir="auto">
<li>keep the order when schedule request.</li>
</ul> | 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.7 及其之前的版本</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>贴出源码</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="private final ConcurrentMap<String, Object> locks = new ConcurrentHashMap<>();"><pre class="notranslate"><code class="notranslate">private final ConcurrentMap<String, Object> locks = new ConcurrentHashMap<>();
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" private List<ReferenceCountExchangeClient> getSharedClient(URL url, int connectNum) {
String key = url.getAddress();
// 略去无关代码
// 【1】
locks.putIfAbsent(key, new Object());
// 【2】
synchronized (locks.get(key)) {
clients = referenceClientMap.get(key);
if (checkClientCanUse(clients)) {
batchClientRefIncr(clients);
return clients;
}
connectNum = Math.max(connectNum, 1);
if (CollectionUtils.isEmpty(clients)) {
clients = buildReferenceCountExchangeClientList(url, connectNum);
referenceClientMap.put(key, clients);
} else {
for (int i = 0; i < clients.size(); i++) {
ReferenceCountExchangeClient referenceCountExchangeClient = clients.get(i);
if (referenceCountExchangeClient == null || referenceCountExchangeClient.isClosed()) {
clients.set(i, buildReferenceCountExchangeClient(url));
continue;
}
referenceCountExchangeClient.incrementAndGetCount();
}
}
// 【3】
locks.remove(key);
return clients;
}
}
"><pre class="notranslate"><code class="notranslate"> private List<ReferenceCountExchangeClient> getSharedClient(URL url, int connectNum) {
String key = url.getAddress();
// 略去无关代码
// 【1】
locks.putIfAbsent(key, new Object());
// 【2】
synchronized (locks.get(key)) {
clients = referenceClientMap.get(key);
if (checkClientCanUse(clients)) {
batchClientRefIncr(clients);
return clients;
}
connectNum = Math.max(connectNum, 1);
if (CollectionUtils.isEmpty(clients)) {
clients = buildReferenceCountExchangeClientList(url, connectNum);
referenceClientMap.put(key, clients);
} else {
for (int i = 0; i < clients.size(); i++) {
ReferenceCountExchangeClient referenceCountExchangeClient = clients.get(i);
if (referenceCountExchangeClient == null || referenceCountExchangeClient.isClosed()) {
clients.set(i, buildReferenceCountExchangeClient(url));
continue;
}
referenceCountExchangeClient.incrementAndGetCount();
}
}
// 【3】
locks.remove(key);
return clients;
}
}
</code></pre></div>
<ol start="2" dir="auto">
<li>问题描述:</li>
</ol>
<ul dir="auto">
<li>注意上述 【1】、【2】、【3】处代码</li>
<li>假设这种情况:并发环境下,线程 A、B 持有相同的 key,执行到该方法时。如果 A 执行到 同步块中,并在 <code class="notranslate">locks.remove(key)</code> 真正 remove 之前,线程 B 刚好执行到 <code class="notranslate">locks.putIfAbsent(key, new Object())</code>。</li>
<li>当 B 执行完该语句后,在 B 执行 <code class="notranslate">locks.get(key)</code> 之前,正好 A remove 完成。</li>
<li>此时,B 执行到 <code class="notranslate">locks.get(key)</code> 将拿到 null,此时 抛出 NPE</li>
</ul>
<ol start="3" dir="auto">
<li>问题提出:</li>
</ol>
<ul dir="auto">
<li>查看过历史 issue 后,使用 ConcurrentHashMap 解决了历史版本中 key.intern() 潜在性的死锁问题,但是随之也可能会有上述的 NPE 问题,所以这是被允许的吗?</li>
</ul> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/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: xxx</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?</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | 0 |
<h5 dir="auto">Description of the problem</h5>
<p dir="auto"><a href="https://jsfiddle.net/liyuanqiu/wkdgt8h7/5/" rel="nofollow">JSFiddle here</a></p>
<p dir="auto">I record the performance in Chrome when running this JSFiddle, it shows:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/24999464/26337944/05272af4-3faf-11e7-8e3f-362e38a151f1.png"><img src="https://cloud.githubusercontent.com/assets/24999464/26337944/05272af4-3faf-11e7-8e3f-362e38a151f1.png" alt="1024x1024" style="max-width: 100%;"></a><br>
The memory peak value getting higher and higher, but the valley value always keeps a low value.</p>
<p dir="auto">Then uncomment the two lines in line number 30 and 31:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="width = 1000;
height = 1100;"><pre class="notranslate"><code class="notranslate">width = 1000;
height = 1100;
</code></pre></div>
<p dir="auto">The canvas size is not power of two, and the memory usage increases rapidly</p>
<p dir="auto">the performance record shows:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/24999464/26337947/0bbb0e3a-3faf-11e7-9da3-ab832b9eaeb1.png"><img src="https://cloud.githubusercontent.com/assets/24999464/26337947/0bbb0e3a-3faf-11e7-9da3-ab832b9eaeb1.png" alt="1000x1100" style="max-width: 100%;"></a><br>
The memory peak value and valley value both getting higher and higher.</p>
<p dir="auto">I call the dispose method of material and texture explicitly, and remove the mesh from scene in every loop.</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r85</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>[] All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 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>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> | <p dir="auto">Right now the only way to tell the <em>RayCaster</em> to include an object or not is with setting layers, and it is limited to checking any one of the <em>RayCaster</em>'s layers is included in the objects layers.</p>
<p dir="auto">Because this check exists outside the object in a separate function, in order to override this behavior, you need to needlessly override the <em>RayCaster</em>'s <em>intersectObject</em> and <em>intersectObjects</em> functions, instead of just the outside <em>intersectObject</em> function.</p>
<p dir="auto"><strong>Possible Solutions:</strong></p>
<ol dir="auto">
<li>Move the outside <em>intersectObject</em> function into the <em>RayCaster</em> object so that only it needs to be extended. (Maybe also include a second function for just the <code class="notranslate">if ( object.layers.test( raycaster.layers ) ) {</code> part.)</li>
<li>Add some sort of specifiable test mode to the Layers object to allow for <em>all</em>, <em>exact</em>, and <em>none</em> alternative comparison modes to take advantage of the bit masking.</li>
<li>Allow passing in a custom test object/function into <em>intersectObject</em> and <em>intersectObjects</em>.</li>
</ol>
<p dir="auto"><strong>Example Current Override</strong><br>
It requires a lot of duplicate code to get the desired result.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import {
RayCaster as ThreeRayCaster
} from 'three'
function ascSort(a, b) {
return (a.distance - b.distance)
}
export default class extends ThreeRayCaster {
constructor (origin, direction, near, far) {
super(origin, direction, near, far)
this._testMode = 'all'
}
get testMode () { return this._testMode }
set testMode (value) { this._testMode = value }
_intersectObject (object, intersects, recursive) {
if (this._test(object)) {
object.raycast(this, intersects)
}
if (recursive === true) {
const children = object.children
for (let i = 0, l = children.length; i < l; ++i) {
this._intersectObject(children[i], intersects, true)
}
}
}
_test (object) {
switch (this.testMode) {
case 'any':
return object.layers.test(this.layers)
case 'none':
return !object.layers.test(this.layers)
case 'exact':
return (object.layers.mask === this.layers.mask)
case 'all':
default:
return ((object.layers.mask & this.layers.mask) === this.layers.mask)
}
}
intersectObject (object, recursive, optionalTarget) {
const intersects = optionalTarget || []
this._intersectObject(object, intersects, recursive)
intersects.sort(ascSort)
return intersects
},
intersectObjects (objects, recursive, optionalTarget) {
const intersects = optionalTarget || []
for (let i = 0, l = objects.length; i < l; i ++) {
this._intersectObject(objects[i], intersects, recursive)
}
intersects.sort(ascSort)
return intersects
}
}"><pre class="notranslate"><code class="notranslate">import {
RayCaster as ThreeRayCaster
} from 'three'
function ascSort(a, b) {
return (a.distance - b.distance)
}
export default class extends ThreeRayCaster {
constructor (origin, direction, near, far) {
super(origin, direction, near, far)
this._testMode = 'all'
}
get testMode () { return this._testMode }
set testMode (value) { this._testMode = value }
_intersectObject (object, intersects, recursive) {
if (this._test(object)) {
object.raycast(this, intersects)
}
if (recursive === true) {
const children = object.children
for (let i = 0, l = children.length; i < l; ++i) {
this._intersectObject(children[i], intersects, true)
}
}
}
_test (object) {
switch (this.testMode) {
case 'any':
return object.layers.test(this.layers)
case 'none':
return !object.layers.test(this.layers)
case 'exact':
return (object.layers.mask === this.layers.mask)
case 'all':
default:
return ((object.layers.mask & this.layers.mask) === this.layers.mask)
}
}
intersectObject (object, recursive, optionalTarget) {
const intersects = optionalTarget || []
this._intersectObject(object, intersects, recursive)
intersects.sort(ascSort)
return intersects
},
intersectObjects (objects, recursive, optionalTarget) {
const intersects = optionalTarget || []
for (let i = 0, l = objects.length; i < l; i ++) {
this._intersectObject(objects[i], intersects, recursive)
}
intersects.sort(ascSort)
return intersects
}
}
</code></pre></div>
<p dir="auto"><strong>Potential Override If More Extendable</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import {
RayCaster as ThreeRayCaster
} from 'three'
export default class extends ThreeRayCaster {
constructor (origin, direction, near, far) {
super(origin, direction, near, far)
this._testMode = 'all'
}
get testMode () { return this._testMode }
set testMode (value) { this._testMode = value }
_test (object) {
switch (this.testMode) {
case 'any':
return object.layers.test(this.layers)
case 'none':
return !object.layers.test(this.layers)
case 'exact':
return (object.layers.mask === this.layers.mask)
case 'all':
default:
return ((object.layers.mask & this.layers.mask) === this.layers.mask)
}
}
}"><pre class="notranslate"><code class="notranslate">import {
RayCaster as ThreeRayCaster
} from 'three'
export default class extends ThreeRayCaster {
constructor (origin, direction, near, far) {
super(origin, direction, near, far)
this._testMode = 'all'
}
get testMode () { return this._testMode }
set testMode (value) { this._testMode = value }
_test (object) {
switch (this.testMode) {
case 'any':
return object.layers.test(this.layers)
case 'none':
return !object.layers.test(this.layers)
case 'exact':
return (object.layers.mask === this.layers.mask)
case 'all':
default:
return ((object.layers.mask & this.layers.mask) === this.layers.mask)
}
}
}
</code></pre></div> | 0 |
<p dir="auto">hi</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="when i setting file_urls "http://m.baidu.com/api?action=redirect&token=kpyysd&from=1014090y&type=app&dltype=new&refid=2650327114&tj=soft_5845028_88031597_%E8%AF%AD%E9%9F%B3%E6%90%9C%E7%B4%A2&refp=action_search&blink=da5b687474703a2f2f7265736765742e39312e636f6d2f536f66742f436f6e74726f6c6c65722e617368783f616374696f6e3d646f776e6c6f61642674706c3d312669643d34313034393931c658&crversion=1""><pre class="notranslate"><code class="notranslate">when i setting file_urls "http://m.baidu.com/api?action=redirect&token=kpyysd&from=1014090y&type=app&dltype=new&refid=2650327114&tj=soft_5845028_88031597_%E8%AF%AD%E9%9F%B3%E6%90%9C%E7%B4%A2&refp=action_search&blink=da5b687474703a2f2f7265736765742e39312e636f6d2f536f66742f436f6e74726f6c6c65722e617368783f616374696f6e3d646f776e6c6f61642674706c3d312669643d34313034393931c658&crversion=1"
</code></pre></div>
<p dir="auto">this url redirect 3 times so when i use scrap download it the scrapy retrun 302 how can i setting it can working ? please help me!<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3350372/23991950/1795e90a-0a76-11e7-9b19-4128bfdb3914.png"><img src="https://cloud.githubusercontent.com/assets/3350372/23991950/1795e90a-0a76-11e7-9b19-4128bfdb3914.png" alt="qq 20170316182328" style="max-width: 100%;"></a></p> | <p dir="auto">Basically, what's happened is that my spider is unable to download the files because the file_urls provided are actually redirected to the final download link. However, because of the following code, the redirect download middleware is effectively disabled, which makes the download fail.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def _check_media_to_download(self, result, request, info):
if result is not None:
return result
if self.download_func:
# this ugly code was left only to support tests. TODO: remove
dfd = mustbe_deferred(self.download_func, request, info.spider)
dfd.addCallbacks(
callback=self.media_downloaded, callbackArgs=(request, info),
errback=self.media_failed, errbackArgs=(request, info))
else:
request.meta['handle_httpstatus_all'] = True
dfd = self.crawler.engine.download(request, info.spider)
dfd.addCallbacks(
callback=self.media_downloaded, callbackArgs=(request, info),
errback=self.media_failed, errbackArgs=(request, info))
return dfd"><pre class="notranslate"><code class="notranslate">def _check_media_to_download(self, result, request, info):
if result is not None:
return result
if self.download_func:
# this ugly code was left only to support tests. TODO: remove
dfd = mustbe_deferred(self.download_func, request, info.spider)
dfd.addCallbacks(
callback=self.media_downloaded, callbackArgs=(request, info),
errback=self.media_failed, errbackArgs=(request, info))
else:
request.meta['handle_httpstatus_all'] = True
dfd = self.crawler.engine.download(request, info.spider)
dfd.addCallbacks(
callback=self.media_downloaded, callbackArgs=(request, info),
errback=self.media_failed, errbackArgs=(request, info))
return dfd
</code></pre></div>
<p dir="auto">And here is the check in the redirect middleware that disables it:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if (request.meta.get('dont_redirect', False) or
response.status in getattr(spider, 'handle_httpstatus_list', []) or
response.status in request.meta.get('handle_httpstatus_list', []) or
request.meta.get('handle_httpstatus_all', False)):
return response
"><pre class="notranslate"><code class="notranslate">if (request.meta.get('dont_redirect', False) or
response.status in getattr(spider, 'handle_httpstatus_list', []) or
response.status in request.meta.get('handle_httpstatus_list', []) or
request.meta.get('handle_httpstatus_all', False)):
return response
</code></pre></div>
<p dir="auto">My question is: What is the point of enabling the handling of httpstatus_all, when it effectively disables all of the checks?</p> | 1 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/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"><a href="https://github.com/zeit/next.js/tree/canary/examples/with-i18next">https://github.com/zeit/next.js/tree/canary/examples/with-i18next</a> should run when I run <code class="notranslate">yarn && yarn dev</code></p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">I get the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Cannot read property 'node' of undefined
at Object.<anonymous> (/Users/julia/with-i18next/node_modules/react-i18next/dist/commonjs/interpolate.js:100:29)
at Module._compile (module.js:570:32)
at Module._compile (/Users/julia/with-i18next/node_modules/source-map-support/source-map-support.js:492:25)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/julia/with-i18next/node_modules/react-i18next/dist/commonjs/index.js:12:20)"><pre class="notranslate"><code class="notranslate">TypeError: Cannot read property 'node' of undefined
at Object.<anonymous> (/Users/julia/with-i18next/node_modules/react-i18next/dist/commonjs/interpolate.js:100:29)
at Module._compile (module.js:570:32)
at Module._compile (/Users/julia/with-i18next/node_modules/source-map-support/source-map-support.js:492:25)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/julia/with-i18next/node_modules/react-i18next/dist/commonjs/index.js:12:20)
</code></pre></div>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>yarn && yarn dev</li>
<li>Open localhost:3000</li>
</ol>
<h2 dir="auto">Context</h2>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>latest</td>
</tr>
<tr>
<td>node</td>
<td>6.10.0</td>
</tr>
<tr>
<td>OS</td>
<td>10.12.5</td>
</tr>
<tr>
<td>browser</td>
<td>62.0.3202.94</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | <p dir="auto">Changing the hash in the URL causes getInitialProps to be fired, which I think should've been fixed in <a href="https://github.com/zeit/next.js/pull/1250" data-hovercard-type="pull_request" data-hovercard-url="/vercel/next.js/pull/1250/hovercard">this PR</a>. See the following example repo: <a href="https://github.com/ldthorne/nextjs-back-reproduction">https://github.com/ldthorne/nextjs-back-reproduction</a>.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">If the user clicks the <code class="notranslate">go somewhere</code> link that leads to an anchor -- which will add a hash to the url -- and then clicks the back button, <code class="notranslate">getInitialProps</code> should not be called.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">If the user clicks the <code class="notranslate">go somewhere</code> link that leads to an anchor -- which will add a hash to the url -- and then clicks the back button, <code class="notranslate">getInitialProps</code> is called.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Clone repo: <a href="https://github.com/ldthorne/nextjs-back-reproduction">https://github.com/ldthorne/nextjs-back-reproduction</a>.</li>
<li><code class="notranslate">yarn</code>.</li>
<li>Open dev tools.</li>
<li>Click the <code class="notranslate">go somewhere</code> link. Notice that nothing is logged.</li>
<li>Click the browser's back button. Notice that <code class="notranslate">getInitialProps</code> is logged.</li>
</ol>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>3.0.6</td>
</tr>
<tr>
<td>node</td>
<td>8.1.2</td>
</tr>
<tr>
<td>OS</td>
<td>macOS 10.12.6</td>
</tr>
<tr>
<td>browser</td>
<td>All</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">Deno claims to be a "secure runtime for JavaScript and TYPESCRIPT", and it is one of the main reasons why I started looking into Deno.</p>
<p dir="auto">And yet, a simple test on <code class="notranslate">deno repl</code> shows that the typescript is not really supported. Is this by design? Is this Deno's technical limitations?</p>
<p dir="auto">For me, personally, being able to transpile Typescript to Javascript has relatively low value. Whether I compile the code via tsc or deno (with embedded tsc), or any other tools, has very little difference. It's just a build process.</p>
<p dir="auto">The real value for me (if Deno supports Typescript as a first class citizen, as it seems to promise) will be being able to "hide" the transpilation process from the user experience, like in REPL.</p> | <p dir="auto">PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="370451551" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/998" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/998/hovercard" href="https://github.com/denoland/deno/pull/998">#998</a> provides a REPL for Deno, but only supports plain JavaScript. It needs to support TypeScript as well.</p>
<p dir="auto">I was thinking about the approach and am writing up a couple ideas. <a href="https://github.com/TypeStrong/ts-node">ts-node</a> provides a REPL and in looking at how they accomplish it seems like a reasonably logical approach to attempt with Deno. In order to support that, I think we need to do the following:</p>
<ul dir="auto">
<li>Create a Deno Compiler API that takes in a source code and optionally previous output code, returning any new lines and any diagnostics. Maybe something like this:
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="incrementalCompile(sourceCode: SourceCode, previousOutput?: OutputCode): { diagnostics: ts.Diagnostic[], outputCode: OutputCode, additionalCode: OutputCode);"><pre class="notranslate"><span class="pl-en">incrementalCompile</span><span class="pl-kos">(</span><span class="pl-s1">sourceCode</span>: <span class="pl-smi">SourceCode</span><span class="pl-kos">,</span> <span class="pl-s1">previousOutput</span>?: <span class="pl-smi">OutputCode</span><span class="pl-kos">)</span>: <span class="pl-kos">{</span> <span class="pl-c1">diagnostics</span>: <span class="pl-s1">ts</span><span class="pl-kos">.</span><span class="pl-c1">Diagnostic</span><span class="pl-kos">[</span><span class="pl-s1"></span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">outputCode</span>: <span class="pl-smi">OutputCode</span><span class="pl-kos">,</span> <span class="pl-c1">additionalCode</span>: <span class="pl-smi">OutputCode</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
Note that the <code class="notranslate">compiler.configure()</code> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="376201025" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1136" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/1136/hovercard" href="https://github.com/denoland/deno/pull/1136">#1136</a> will likely be need as well to allow the REPL to change the configuration, which it will need to do. We might have to modify it so it actually allows some changes that we wouldn't normally allow.</li>
<li>The REPL keeps the "context" of the source code, appending lines to this context, and compiling the code incrementally.</li>
<li>The REPL then evals the incremental lines, (but not the full output code) or outputs diagnostics.</li>
</ul>
<p dir="auto">The reason it needs to work this way, is that in some cases, the TypeScript will output something higher up (like when it emits helpers) and those need to be evaled.</p>
<p dir="auto">Things like imports and async are going to be complex, I would recommend we aim for an MVP and then figure out how to go from there.</p>
<p dir="auto">cc: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bartlomieju/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bartlomieju">@bartlomieju</a></p> | 1 |
<p dir="auto">I experience the following problem using the 0.3.5 binary on Windows 7.<br>
Could anyone confirm, please ?</p>
<p dir="auto">I could go back to previous binary versions,<br>
0.3.3 was OK, the problem appeared in 0.3.4.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> 1,2,3
(1,2,0)
julia> (1,2,3)
(1,2,0)
julia> t=(1,2,3)
(1,2,0)
julia> t=tuple(1,2,3)
(1,2,0)
julia> versioninfo()
Julia Version 0.3.5
Commit a05f87b* (2015-01-08 22:33 UTC)
Platform Info:
System: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3"><pre class="notranslate"><code class="notranslate">julia> 1,2,3
(1,2,0)
julia> (1,2,3)
(1,2,0)
julia> t=(1,2,3)
(1,2,0)
julia> t=tuple(1,2,3)
(1,2,0)
julia> versioninfo()
Julia Version 0.3.5
Commit a05f87b* (2015-01-08 22:33 UTC)
Platform Info:
System: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
</code></pre></div> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.0-prerelease+3908 (2014-06-26 23:41 UTC)
_/ |\__'_|_|_|\__'_| | Commit 8f99257 (0 days old master)
|__/ | x86_64-w64-mingw32
julia> x = tuple(1,2,3)
(1,2,0)
julia> x
(1,2,0)
julia> x[3]
3
julia>
julia> versioninfo()
Julia Version 0.3.0-prerelease+3908
Commit 8f99257 (2014-06-26 23:41 UTC)
Platform Info:
System: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-4600M CPU @ 2.90GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
LAPACK: libopenblas
LIBM: libopenlibm
julia>"><pre class="notranslate"><code class="notranslate">$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.0-prerelease+3908 (2014-06-26 23:41 UTC)
_/ |\__'_|_|_|\__'_| | Commit 8f99257 (0 days old master)
|__/ | x86_64-w64-mingw32
julia> x = tuple(1,2,3)
(1,2,0)
julia> x
(1,2,0)
julia> x[3]
3
julia>
julia> versioninfo()
Julia Version 0.3.0-prerelease+3908
Commit 8f99257 (2014-06-26 23:41 UTC)
Platform Info:
System: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-4600M CPU @ 2.90GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
LAPACK: libopenblas
LIBM: libopenlibm
julia>
</code></pre></div> | 1 |
<p dir="auto">I'm missing a getAssertType() function in the ConstraintViolation class which would indicate which constraint triggered the violation.</p>
<p dir="auto">This is useful when you make your own error response format, as currently it's impossible to tell which of the constraints on a member was triggered.</p> | <p dir="auto">Following my <a href="http://stackoverflow.com/q/15206637/744147" rel="nofollow">(unanswered) question at StackOverflow</a> I'm reporting this as a bug, as no one seems to know the answer.</p>
<p dir="auto">Currently there's no way that I can see to populate the <code class="notranslate">code</code> property for the <code class="notranslate">ConstraintViolation</code> class, as it is not defined in the <code class="notranslate">Constraint</code> class. But as I see, it goes farther than that, as all the validators just ignore the parameters for the <code class="notranslate">addViolation</code> method, making it impossible for simple asserts to define a code for the violation.</p>
<p dir="auto">What I expect it to allow is the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/**
* @Assert\NotBlank(code=400)
* @Assert\Email(code=401)
*/
protected $email;"><pre class="notranslate"><code class="notranslate">/**
* @Assert\NotBlank(code=400)
* @Assert\Email(code=401)
*/
protected $email;
</code></pre></div>
<p dir="auto">Problem is, the current validators call <code class="notranslate">addViolations</code> without setting the 5th argument (<code class="notranslate">code</code>). Plus, the <code class="notranslate">Constraint</code> class doesn't implement such a <code class="notranslate">code</code> property as mentioned.</p>
<p dir="auto">If this is indeed considered a bug, I would like to send a PR with a patch, provided that this is the way that it should be working.If it's not, some directions would be amazing!</p> | 1 |
<h3 dir="auto">Describe your issue.</h3>
<p dir="auto">Using RegularGridInterpolator on a read-only 2D array with dtype numpy.float64 raises <code class="notranslate">ValueError: buffer source is read-only</code>. Of course, read-write access shouldn't be required to interpolate.</p>
<p dir="auto">It works for 2D arrays with dtype numpy.int64. Code/output is not shown, but it works both for int64 and float64 in the 3D case.</p>
<p dir="auto">The numpy array is made read-only using the <code class="notranslate">writeable</code> flag from ndarray.flags. From <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flags.html" rel="nofollow">the numpy docs</a>:</p>
<blockquote>
<p dir="auto">Only the WRITEBACKIFCOPY, WRITEABLE, and ALIGNED flags can be changed by the user, via direct assignment to the attribute or dictionary entry, or by calling <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.setflags.html#numpy.ndarray.setflags" rel="nofollow">ndarray.setflags</a>.</p>
</blockquote>
<blockquote>
<p dir="auto">WRITEABLE (W)<br>
The data area can be written to. Setting this to False locks the data, making it read-only. A view (slice, etc.) inherits WRITEABLE from its base array at creation time, but a view of a writeable array may be subsequently locked while the base array remains writeable. (The opposite is not true, in that a view of a locked array may not be made writeable. However, currently, locking a base object does not lock any views that already reference it, so under that circumstance it is possible to alter the contents of a locked array via a previously created writeable view onto it.) Attempting to change a non-writeable array raises a RuntimeError exception.</p>
</blockquote>
<p dir="auto">This may be related to the new fast path in v1.10.0 for 2D interpolation in RegularGridInterpolator (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1422329991" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/17291" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/17291/hovercard" href="https://github.com/scipy/scipy/pull/17291">#17291</a>), although I don't understand how.</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
import scipy.interpolate
a = numpy.array(
[
[0, 0, 0, 0, 0],
[0, 1, 1, 1, 0],
[0, 1, 1, 1, 0],
[0, 1, 1, 1, 0],
[0, 0, 0, 0, 0],
]
)
z = numpy.copy(a)
z.flags.writeable = False
print(z.dtype)
print(z)
interpolator = scipy.interpolate.RegularGridInterpolator(
(numpy.linspace(0, 5, num=5), numpy.linspace(0, 5, num=5)),
z,
method="linear",
)
print("Interpolation on read-only int array:", interpolator([0.5, 0.5]), ": OK.")
print()
z = numpy.copy(a)
z = z.astype(float, casting="safe")
z.flags.writeable = False
print(z.dtype)
print(z)
interpolator = scipy.interpolate.RegularGridInterpolator(
(numpy.linspace(0, 5, num=5), numpy.linspace(0, 5, num=5)),
z,
method="linear",
)
print("Interpolation on read-only float array:", interpolator([0.5, 0.5]), ": crashes.")"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span>
<span class="pl-k">import</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">interpolate</span>
<span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">array</span>(
[
[<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>],
[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>],
[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>],
[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>],
[<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>],
]
)
<span class="pl-s1">z</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">copy</span>(<span class="pl-s1">a</span>)
<span class="pl-s1">z</span>.<span class="pl-s1">flags</span>.<span class="pl-s1">writeable</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-en">print</span>(<span class="pl-s1">z</span>.<span class="pl-s1">dtype</span>)
<span class="pl-en">print</span>(<span class="pl-s1">z</span>)
<span class="pl-s1">interpolator</span> <span class="pl-c1">=</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">interpolate</span>.<span class="pl-v">RegularGridInterpolator</span>(
(<span class="pl-s1">numpy</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>, <span class="pl-c1">5</span>, <span class="pl-s1">num</span><span class="pl-c1">=</span><span class="pl-c1">5</span>), <span class="pl-s1">numpy</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>, <span class="pl-c1">5</span>, <span class="pl-s1">num</span><span class="pl-c1">=</span><span class="pl-c1">5</span>)),
<span class="pl-s1">z</span>,
<span class="pl-s1">method</span><span class="pl-c1">=</span><span class="pl-s">"linear"</span>,
)
<span class="pl-en">print</span>(<span class="pl-s">"Interpolation on read-only int array:"</span>, <span class="pl-en">interpolator</span>([<span class="pl-c1">0.5</span>, <span class="pl-c1">0.5</span>]), <span class="pl-s">": OK."</span>)
<span class="pl-en">print</span>()
<span class="pl-s1">z</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">copy</span>(<span class="pl-s1">a</span>)
<span class="pl-s1">z</span> <span class="pl-c1">=</span> <span class="pl-s1">z</span>.<span class="pl-en">astype</span>(<span class="pl-s1">float</span>, <span class="pl-s1">casting</span><span class="pl-c1">=</span><span class="pl-s">"safe"</span>)
<span class="pl-s1">z</span>.<span class="pl-s1">flags</span>.<span class="pl-s1">writeable</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-en">print</span>(<span class="pl-s1">z</span>.<span class="pl-s1">dtype</span>)
<span class="pl-en">print</span>(<span class="pl-s1">z</span>)
<span class="pl-s1">interpolator</span> <span class="pl-c1">=</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">interpolate</span>.<span class="pl-v">RegularGridInterpolator</span>(
(<span class="pl-s1">numpy</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>, <span class="pl-c1">5</span>, <span class="pl-s1">num</span><span class="pl-c1">=</span><span class="pl-c1">5</span>), <span class="pl-s1">numpy</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>, <span class="pl-c1">5</span>, <span class="pl-s1">num</span><span class="pl-c1">=</span><span class="pl-c1">5</span>)),
<span class="pl-s1">z</span>,
<span class="pl-s1">method</span><span class="pl-c1">=</span><span class="pl-s">"linear"</span>,
)
<span class="pl-en">print</span>(<span class="pl-s">"Interpolation on read-only float array:"</span>, <span class="pl-en">interpolator</span>([<span class="pl-c1">0.5</span>, <span class="pl-c1">0.5</span>]), <span class="pl-s">": crashes."</span>)</pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dtype: int64
[[0 0 0 0 0]
[0 1 1 1 0]
[0 1 1 1 0]
[0 1 1 1 0]
[0 0 0 0 0]]
Interpolation on read-only int array: [0.16] : OK.
dtype: float64
[[0. 0. 0. 0. 0.]
[0. 1. 1. 1. 0.]
[0. 1. 1. 1. 0.]
[0. 1. 1. 1. 0.]
[0. 0. 0. 0. 0.]]
Traceback (most recent call last):
File "/home/vleduc/python/newdev/rtdata/_test_bug_scipy.py", line 39, in <module>
print("Interpolation on read-only float array:", interpolator([0.5, 0.5]), ": crashes.")
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vleduc/python/venvs/rtdata-py311/lib/python3.11/site-packages/scipy/interpolate/_rgi.py", line 336, in __call__
result = evaluate_linear_2d(self.values,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "_rgi_cython.pyx", line 19, in scipy.interpolate._rgi_cython.evaluate_linear_2d
File "stringsource", line 660, in View.MemoryView.memoryview_cwrapper
File "stringsource", line 350, in View.MemoryView.memoryview.__cinit__
ValueError: buffer source array is read-only"><pre class="notranslate">dtype: int64
[[0 0 0 0 0]
[0 1 1 1 0]
[0 1 1 1 0]
[0 1 1 1 0]
[0 0 0 0 0]]
Interpolation on read-only int array: [0.16] <span class="pl-c1">:</span> OK.
dtype: float64
[[0. 0. 0. 0. 0.]
[0. 1. 1. 1. 0.]
[0. 1. 1. 1. 0.]
[0. 1. 1. 1. 0.]
[0. 0. 0. 0. 0.]]
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/vleduc/python/newdev/rtdata/_test_bug_scipy.py<span class="pl-pds">"</span></span>, line 39, <span class="pl-k">in</span> <span class="pl-k"><</span>module<span class="pl-k">></span>
print(<span class="pl-s"><span class="pl-pds">"</span>Interpolation on read-only float array:<span class="pl-pds">"</span></span>, interpolator([0.5, 0.5]), <span class="pl-s"><span class="pl-pds">"</span>: crashes.<span class="pl-pds">"</span></span>)
^^^^^^^^^^^^^^^^^^^^^^^^
File <span class="pl-s"><span class="pl-pds">"</span>/home/vleduc/python/venvs/rtdata-py311/lib/python3.11/site-packages/scipy/interpolate/_rgi.py<span class="pl-pds">"</span></span>, line 336, <span class="pl-k">in</span> __call__
result = evaluate_linear_2d(self.values,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File <span class="pl-s"><span class="pl-pds">"</span>_rgi_cython.pyx<span class="pl-pds">"</span></span>, line 19, <span class="pl-k">in</span> scipy.interpolate._rgi_cython.evaluate_linear_2d
File <span class="pl-s"><span class="pl-pds">"</span>stringsource<span class="pl-pds">"</span></span>, line 660, <span class="pl-k">in</span> View.MemoryView.memoryview_cwrapper
File <span class="pl-s"><span class="pl-pds">"</span>stringsource<span class="pl-pds">"</span></span>, line 350, <span class="pl-k">in</span> View.MemoryView.memoryview.__cinit__
ValueError: buffer <span class="pl-c1">source</span> array is read-only</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version information</h3>
<p dir="auto">1.10.0 1.24.1 sys.version_info(major=3, minor=11, micro=1, releaselevel='final', serial=0)</p> | <h3 dir="auto">Describe your issue.</h3>
<p dir="auto">Using a slightly modified version of the example from the documentation</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy
from scipy.interpolate import interpn
def value_func_3d(x, y, z):
return 2 * x + 3 * y - z
x = numpy.linspace(0, 4, 5)
y = numpy.linspace(0, 5, 6)
z = numpy.linspace(0, 6, 7)
points = (x, y, z)
values = value_func_3d(*numpy.meshgrid(*points, indexing='ij'))
point = numpy.array([2.21, 3.12, 1.15])
print(interpn(points, values, point))
for ax in points:
ax.flags.writeable = False
print(interpn(points, values, point))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span>
<span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">interpolate</span> <span class="pl-k">import</span> <span class="pl-s1">interpn</span>
<span class="pl-k">def</span> <span class="pl-en">value_func_3d</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>, <span class="pl-s1">z</span>):
<span class="pl-k">return</span> <span class="pl-c1">2</span> <span class="pl-c1">*</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-c1">3</span> <span class="pl-c1">*</span> <span class="pl-s1">y</span> <span class="pl-c1">-</span> <span class="pl-s1">z</span>
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>, <span class="pl-c1">4</span>, <span class="pl-c1">5</span>)
<span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>, <span class="pl-c1">5</span>, <span class="pl-c1">6</span>)
<span class="pl-s1">z</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>, <span class="pl-c1">6</span>, <span class="pl-c1">7</span>)
<span class="pl-s1">points</span> <span class="pl-c1">=</span> (<span class="pl-s1">x</span>, <span class="pl-s1">y</span>, <span class="pl-s1">z</span>)
<span class="pl-s1">values</span> <span class="pl-c1">=</span> <span class="pl-en">value_func_3d</span>(<span class="pl-c1">*</span><span class="pl-s1">numpy</span>.<span class="pl-en">meshgrid</span>(<span class="pl-c1">*</span><span class="pl-s1">points</span>, <span class="pl-s1">indexing</span><span class="pl-c1">=</span><span class="pl-s">'ij'</span>))
<span class="pl-s1">point</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">array</span>([<span class="pl-c1">2.21</span>, <span class="pl-c1">3.12</span>, <span class="pl-c1">1.15</span>])
<span class="pl-en">print</span>(<span class="pl-en">interpn</span>(<span class="pl-s1">points</span>, <span class="pl-s1">values</span>, <span class="pl-s1">point</span>))
<span class="pl-k">for</span> <span class="pl-s1">ax</span> <span class="pl-c1">in</span> <span class="pl-s1">points</span>:
<span class="pl-s1">ax</span>.<span class="pl-s1">flags</span>.<span class="pl-s1">writeable</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-en">print</span>(<span class="pl-en">interpn</span>(<span class="pl-s1">points</span>, <span class="pl-s1">values</span>, <span class="pl-s1">point</span>))</pre></div>
<p dir="auto">Fails with</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="...
return find_indices(self.grid, xi)
File "_rgi_cython.pyx", line 95, in scipy.interpolate._rgi_cython.find_indices
File "stringsource", line 660, in View.MemoryView.memoryview_cwrapper
File "stringsource", line 350, in View.MemoryView.memoryview.__cinit__
ValueError: buffer source array is read-only"><pre class="notranslate">...
<span class="pl-k">return</span> find_indices(self.grid, xi)
File <span class="pl-s"><span class="pl-pds">"</span>_rgi_cython.pyx<span class="pl-pds">"</span></span>, line 95, <span class="pl-k">in</span> scipy.interpolate._rgi_cython.find_indices
File <span class="pl-s"><span class="pl-pds">"</span>stringsource<span class="pl-pds">"</span></span>, line 660, <span class="pl-k">in</span> View.MemoryView.memoryview_cwrapper
File <span class="pl-s"><span class="pl-pds">"</span>stringsource<span class="pl-pds">"</span></span>, line 350, <span class="pl-k">in</span> View.MemoryView.memoryview.__cinit__
ValueError: buffer <span class="pl-c1">source</span> array is read-only</pre></div>
<p dir="auto">A more minimal example is:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy
from scipy.interpolate import _rgi
grid = (numpy.array([0, 1], dtype='f8'), )
xi = numpy.array([[0.5, 0.5], ])
grid[0].flags.writeable = False
print(_rgi.find_indices(grid, xi))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span>
<span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">interpolate</span> <span class="pl-k">import</span> <span class="pl-s1">_rgi</span>
<span class="pl-s1">grid</span> <span class="pl-c1">=</span> (<span class="pl-s1">numpy</span>.<span class="pl-en">array</span>([<span class="pl-c1">0</span>, <span class="pl-c1">1</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'f8'</span>), )
<span class="pl-s1">xi</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">array</span>([[<span class="pl-c1">0.5</span>, <span class="pl-c1">0.5</span>], ])
<span class="pl-s1">grid</span>[<span class="pl-c1">0</span>].<span class="pl-s1">flags</span>.<span class="pl-s1">writeable</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-en">print</span>(<span class="pl-s1">_rgi</span>.<span class="pl-en">find_indices</span>(<span class="pl-s1">grid</span>, <span class="pl-s1">xi</span>))</pre></div>
<p dir="auto">This may be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1402051768" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/17172" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/17172/hovercard" href="https://github.com/scipy/scipy/issues/17172">#17172</a> and may have been introduced with the cython code in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1422329991" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/17291" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/17291/hovercard" href="https://github.com/scipy/scipy/pull/17291">#17291</a></p>
<p dir="auto">Adding a const to this line appear to fix the problem locally: </p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/scipy/scipy/blob/7b858b70c16c5559c2155a6bf2c39b32e45fbb78/scipy/interpolate/_rgi_cython.pyx#L79">scipy/scipy/interpolate/_rgi_cython.pyx</a>
</p>
<p class="mb-0 color-fg-muted">
Line 79
in
<a data-pjax="true" class="commit-tease-sha" href="/scipy/scipy/commit/7b858b70c16c5559c2155a6bf2c39b32e45fbb78">7b858b7</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="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-k">double</span>[::<span class="pl-c1">1</span>] grid_i </td>
</tr>
</tbody></table>
</div>
</div>
<p></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
from scipy.interpolate import _rgi
grid = (numpy.array([0, 1], dtype='f8'), )
xi = numpy.array([[0.5, 0.5], ])
grid[0].flags.writeable = False
print(_rgi.find_indices(grid, xi))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span>
<span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">interpolate</span> <span class="pl-k">import</span> <span class="pl-s1">_rgi</span>
<span class="pl-s1">grid</span> <span class="pl-c1">=</span> (<span class="pl-s1">numpy</span>.<span class="pl-en">array</span>([<span class="pl-c1">0</span>, <span class="pl-c1">1</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'f8'</span>), )
<span class="pl-s1">xi</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">array</span>([[<span class="pl-c1">0.5</span>, <span class="pl-c1">0.5</span>], ])
<span class="pl-s1">grid</span>[<span class="pl-c1">0</span>].<span class="pl-s1">flags</span>.<span class="pl-s1">writeable</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-en">print</span>(<span class="pl-s1">_rgi</span>.<span class="pl-en">find_indices</span>(<span class="pl-s1">grid</span>, <span class="pl-s1">xi</span>))</pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="File "_rgi_cython.pyx", line 95, in scipy.interpolate._rgi_cython.find_indices
File "stringsource", line 660, in View.MemoryView.memoryview_cwrapper
File "stringsource", line 350, in View.MemoryView.memoryview.__cinit__
ValueError: buffer source array is read-only"><pre class="notranslate">File <span class="pl-s"><span class="pl-pds">"</span>_rgi_cython.pyx<span class="pl-pds">"</span></span>, line 95, <span class="pl-k">in</span> scipy.interpolate._rgi_cython.find_indices
File <span class="pl-s"><span class="pl-pds">"</span>stringsource<span class="pl-pds">"</span></span>, line 660, <span class="pl-k">in</span> View.MemoryView.memoryview_cwrapper
File <span class="pl-s"><span class="pl-pds">"</span>stringsource<span class="pl-pds">"</span></span>, line 350, <span class="pl-k">in</span> View.MemoryView.memoryview.__cinit__
ValueError: buffer <span class="pl-c1">source</span> array is read-only</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version information</h3>
<p dir="auto">1.11.0.dev0+0.057cf5c 1.24.1 sys.version_info(major=3, minor=10, micro=6, releaselevel='final', serial=0)</p> | 1 |
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Windows 10 v1803 Pro 64bit English</li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:N/A</li>
<li>TensorFlow installed from (source or binary):source</li>
<li>TensorFlow version:1.12</li>
<li>Python version:3.6</li>
<li>Installed using virtualenv? pip? conda?:pip</li>
<li>Bazel version (if compiling from source):0.15</li>
<li>GCC/Compiler version (if compiling from source):MSVC 2015 update 3</li>
<li>CUDA/cuDNN version:N/A</li>
<li>GPU model and memory:N/A</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong></p>
<p dir="auto"><strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong></p>
<p dir="auto"><em><strong>Commands</strong></em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bazel build -c opt --verbose_failures //tensorflow/cc:tutorials_example_trainer"><pre class="notranslate"><code class="notranslate">bazel build -c opt --verbose_failures //tensorflow/cc:tutorials_example_trainer
</code></pre></div>
<p dir="auto"><em><strong>Steps</strong></em><br>
Setup as described in <a href="https://www.tensorflow.org/install/source_windows" rel="nofollow">official document</a></p>
<p dir="auto">.bazelrc is customized in the following way.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import (YOUR_TENSORFLOW_FOLDER)/tf_configure.bazelrc"><pre class="notranslate"><code class="notranslate">import (YOUR_TENSORFLOW_FOLDER)/tf_configure.bazelrc
</code></pre></div>
<p dir="auto">.tf_configure.bazelrc is customized in the following way.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="build:ignite --define with_ignite_support=true
build:xla --define with_xla_support=false
build --action_env TF_NEED_OPENCL_SYCL="0"
build --action_env TF_NEED_ROCM="0"
build --action_env TF_NEED_CUDA="0"
build --action_env TF_DOWNLOAD_CLANG="0"
build:opt --copt=/arch:AVX2
build:opt --define with_default_optimizations=true
build --copt=-w --host_copt=-w
build --verbose_failures
build --distinct_host_configuration=false
build --experimental_shortened_obj_file_path=true
build --define=no_tensorflow_py_deps=true
build --define=override_eigen_strong_inline=true
build:v2 --define=tf_api_version=2"><pre class="notranslate"><code class="notranslate">build:ignite --define with_ignite_support=true
build:xla --define with_xla_support=false
build --action_env TF_NEED_OPENCL_SYCL="0"
build --action_env TF_NEED_ROCM="0"
build --action_env TF_NEED_CUDA="0"
build --action_env TF_DOWNLOAD_CLANG="0"
build:opt --copt=/arch:AVX2
build:opt --define with_default_optimizations=true
build --copt=-w --host_copt=-w
build --verbose_failures
build --distinct_host_configuration=false
build --experimental_shortened_obj_file_path=true
build --define=no_tensorflow_py_deps=true
build --define=override_eigen_strong_inline=true
build:v2 --define=tf_api_version=2
</code></pre></div>
<p dir="auto"><strong>Any other info / logs</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl icu_62::ErrorCode::~ErrorCode(void)" (__imp_??1ErrorCode@icu_62@@UEAA@XZ) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)
unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: signed char __cdecl icu_62::ErrorCode::isSuccess(void)const " (__imp_?isSuccess@ErrorCode@icu_62@@QEBACXZ) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)
unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: enum UErrorCode __cdecl icu_62::ErrorCode::reset(void)" (__imp_?reset@ErrorCode@icu_62@@QEAA?AW4UErrorCode@@XZ) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)
unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) const icu_62::ErrorCode::`vftable'" (__imp_??_7ErrorCode@icu_62@@6B@) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)"><pre class="notranslate"><code class="notranslate">unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl icu_62::ErrorCode::~ErrorCode(void)" (__imp_??1ErrorCode@icu_62@@UEAA@XZ) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)
unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: signed char __cdecl icu_62::ErrorCode::isSuccess(void)const " (__imp_?isSuccess@ErrorCode@icu_62@@QEBACXZ) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)
unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: enum UErrorCode __cdecl icu_62::ErrorCode::reset(void)" (__imp_?reset@ErrorCode@icu_62@@QEAA?AW4UErrorCode@@XZ) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)
unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) const icu_62::ErrorCode::`vftable'" (__imp_??_7ErrorCode@icu_62@@6B@) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)
</code></pre></div>
<p dir="auto">Similar to tutorials_example_trainer, build //tensorflow/examples/label_image:label_image also failed.</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): Yes</li>
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10</li>
<li>TensorFlow installed from (source or binary): Binary (Anaconda)</li>
<li>TensorFlow version (use command below): 1.13.1</li>
<li>Python version: 3.7.3</li>
<li>CUDA/cuDNN version: 10.0/7.6.0</li>
<li>GPU model and memory: NVIDIA Titan X (Pascal), 12 GB</li>
</ul>
<p dir="auto"><strong>Describe the current behavior</strong></p>
<p dir="auto"><code class="notranslate">tf.einsum</code> returns buggy values compared to <code class="notranslate">np.einsum</code> for identical parameters. Here is the current output (please find code below):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="np: 8.610251426696777
tf: 0.0"><pre class="notranslate"><code class="notranslate">np: 8.610251426696777
tf: 0.0
</code></pre></div>
<p dir="auto">Please also note that the same code works as expected when running on the CPU. It also works correctly on the GPU in TF 1.12.0, CUDA/cuDNN 9.0/7.3.1 and Python 3.6.8.</p>
<p dir="auto"><strong>Describe the expected behavior</strong></p>
<p dir="auto">Here is the expected output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="np: 8.610251426696777
tf: 8.610251426696777"><pre class="notranslate"><code class="notranslate">np: 8.610251426696777
tf: 8.610251426696777
</code></pre></div>
<p dir="auto"><strong>Code to reproduce the issue</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from __future__ import (
absolute_import,
division,
print_function
)
import tensorflow as tf
import numpy as np
tf.enable_eager_execution()
einsum_string = "bijk,bijk->bij"
# load values
S_h_numpy = np.load("./S_h.npy")
S_h = tf.convert_to_tensor(S_h_numpy, dtype=tf.float32)
h_numpy = np.load("./h.npy")
h = tf.convert_to_tensor(
h_numpy,
dtype=tf.float32
)
# perform einsum
ht_S_h_numpy = np.einsum(einsum_string, h_numpy, S_h_numpy)
ht_S_h = tf.einsum(einsum_string, h, S_h)
print("np: {np_val}\ntf: {tf_val}".format(
np_val=ht_S_h_numpy[2, 191, 191],
tf_val=ht_S_h[2, 191, 191],
))"><pre class="notranslate"><code class="notranslate">from __future__ import (
absolute_import,
division,
print_function
)
import tensorflow as tf
import numpy as np
tf.enable_eager_execution()
einsum_string = "bijk,bijk->bij"
# load values
S_h_numpy = np.load("./S_h.npy")
S_h = tf.convert_to_tensor(S_h_numpy, dtype=tf.float32)
h_numpy = np.load("./h.npy")
h = tf.convert_to_tensor(
h_numpy,
dtype=tf.float32
)
# perform einsum
ht_S_h_numpy = np.einsum(einsum_string, h_numpy, S_h_numpy)
ht_S_h = tf.einsum(einsum_string, h, S_h)
print("np: {np_val}\ntf: {tf_val}".format(
np_val=ht_S_h_numpy[2, 191, 191],
tf_val=ht_S_h[2, 191, 191],
))
</code></pre></div>
<p dir="auto"><strong>Other info / logs</strong></p>
<p dir="auto">Here are the input tensors used in the example: <a href="https://github.com/tensorflow/tensorflow/files/3296468/input_tensors.zip">input_tensors.zip</a>.</p>
<p dir="auto">The tensors are of shape (4, 192, 192, 2). I could not choose a smaller example because the buggy values appear only in part of the second and all of the following batch items. The bug therefore seems to be connected to the size of the input.</p> | 0 |
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mapreri/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mapreri">@mapreri</a> on December 24, 2014 15:19</em></p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">apt_repository module</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">never worked…</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">I'm my systems I have a lot of repositories with an arch-qualifier.<br>
e.g.:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deb [arch=ppc64el] http://ftp.debian.org/debian/ sid main
deb [arch=amd64,i386] http://dl.google.com/linux/talkplugin/deb/ stable main"><pre class="notranslate"><code class="notranslate">deb [arch=ppc64el] http://ftp.debian.org/debian/ sid main
deb [arch=amd64,i386] http://dl.google.com/linux/talkplugin/deb/ stable main
</code></pre></div>
<p dir="auto">apt_repository does not understand them and tries to re-add that repos, actually duplicating them.</p>
<p dir="auto">Moreover I'd like to be able to specify these option in ansible. Currently available options are (from sources.list(5):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" · arch=arch1,arch2,... can be used to specify for which architectures information should be downloaded. If this option is not set all architectures
defined by the APT::Architectures option will be downloaded.
· arch+=arch1,arch2,... and arch-=arch1,arch2,... which can be used to add/remove architectures from the set which will be downloaded.
· trusted=yes can be set to indicate that packages from this source are always authenticated even if the Release file is not signed or the signature can't
be checked. This disables parts of apt-secure(8) and should therefore only be used in a local and trusted context. trusted=no is the opposite which
handles even correctly authenticated sources as not authenticated."><pre class="notranslate"><code class="notranslate"> · arch=arch1,arch2,... can be used to specify for which architectures information should be downloaded. If this option is not set all architectures
defined by the APT::Architectures option will be downloaded.
· arch+=arch1,arch2,... and arch-=arch1,arch2,... which can be used to add/remove architectures from the set which will be downloaded.
· trusted=yes can be set to indicate that packages from this source are always authenticated even if the Release file is not signed or the signature can't
be checked. This disables parts of apt-secure(8) and should therefore only be used in a local and trusted context. trusted=no is the opposite which
handles even correctly authenticated sources as not authenticated.
</code></pre></div>
<p dir="auto">these options are surrounded by square brackets, and can or cannot have leading and trailing spaces between the options and the brackets.</p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="52823974" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/563" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/563/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/563">ansible/ansible-modules-core#563</a></em></p> | <ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ec2_group</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.3.2.0
config file = /home/aaron/projects/ops/provisioning/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]"><pre class="notranslate"><code class="notranslate">ansible 2.3.2.0
config file = /home/aaron/projects/ops/provisioning/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">NR</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Ubuntu 16.04</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Amazon recently released an option for attach descriptions to security group rules. Would be great to add support for this in Ansible EC2 module.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">NR Feature Request</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Able to add <code class="notranslate">description</code> to <code class="notranslate">rules</code> when using ec2_group</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">NR Feature Request</p>
<p dir="auto">If I have time, I'll probably introduce this myself (assuming Boto3 supports it already...). SS example from the Management console:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18436531/30368725-fdfb0ca0-9869-11e7-9c6a-a09de60ab84f.PNG"><img src="https://user-images.githubusercontent.com/18436531/30368725-fdfb0ca0-9869-11e7-9c6a-a09de60ab84f.PNG" alt="descriptionexample" style="max-width: 100%;"></a></p> | 0 |
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function f(a, b)
for i = 1:1000000
size(a) == size(b)
end
end
julia> @time f([1], [1])
elapsed time: 0.096288154 seconds (48000208 bytes allocated, 47.00% gc time)"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">f</span>(a, b)
<span class="pl-k">for</span> i <span class="pl-k">=</span> <span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">1000000</span>
<span class="pl-c1">size</span>(a) <span class="pl-k">==</span> <span class="pl-c1">size</span>(b)
<span class="pl-k">end</span>
<span class="pl-k">end</span>
julia<span class="pl-k">></span> <span class="pl-c1">@time</span> <span class="pl-c1">f</span>([<span class="pl-c1">1</span>], [<span class="pl-c1">1</span>])
elapsed time<span class="pl-k">:</span> <span class="pl-c1">0.096288154</span> seconds (<span class="pl-c1">48000208</span> bytes allocated, <span class="pl-c1">47.00</span><span class="pl-k">%</span> gc time)</pre></div>
<p dir="auto">This does not affect tuples in general:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function f(a, b)
for i = 1:1000000
a == b
end
end
julia> @time f((1,), (1,))
elapsed time: 0.002870282 seconds (128 bytes allocated)"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">f</span>(a, b)
<span class="pl-k">for</span> i <span class="pl-k">=</span> <span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">1000000</span>
a <span class="pl-k">==</span> b
<span class="pl-k">end</span>
<span class="pl-k">end</span>
julia<span class="pl-k">></span> <span class="pl-c1">@time</span> <span class="pl-c1">f</span>((<span class="pl-c1">1</span>,), (<span class="pl-c1">1</span>,))
elapsed time<span class="pl-k">:</span> <span class="pl-c1">0.002870282</span> seconds (<span class="pl-c1">128</span> bytes allocated)</pre></div>
<p dir="auto">This hurts <code class="notranslate">==</code> for arrays, which checks equality of sizes before proceeding, as well as in-place functions that need to check that the output is the same size as the input.</p> | <p dir="auto">Hi all,</p>
<p dir="auto">The following code seems to allocate a lot of memory:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function test!(arr::Array{(Int, Int)})
for i = 1:10_000_000
arr[1] = arr[2]
end
end
a = [(1, 1), (2, 2)]
test!(a)"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">test!</span>(arr<span class="pl-k">::</span><span class="pl-c1">Array{(Int, Int)}</span>)
<span class="pl-k">for</span> i <span class="pl-k">=</span> <span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">10_000_000</span>
arr[<span class="pl-c1">1</span>] <span class="pl-k">=</span> arr[<span class="pl-c1">2</span>]
<span class="pl-k">end</span>
<span class="pl-k">end</span>
a <span class="pl-k">=</span> [(<span class="pl-c1">1</span>, <span class="pl-c1">1</span>), (<span class="pl-c1">2</span>, <span class="pl-c1">2</span>)]
<span class="pl-c1">test!</span>(a)</pre></div>
<p dir="auto">Here are the results of <code class="notranslate">@time test!(a)</code> (using HEAD on the master branch, commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/ce29d785098564b61af0c65113595b1af7ba0acb/hovercard" href="https://github.com/JuliaLang/julia/commit/ce29d785098564b61af0c65113595b1af7ba0acb"><tt>ce29d78</tt></a>) :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="elapsed time: 0.439144953 seconds (320013808 bytes allocated, 40.35% gc time)"><pre class="notranslate"><code class="notranslate">elapsed time: 0.439144953 seconds (320013808 bytes allocated, 40.35% gc time)
</code></pre></div>
<p dir="auto">On the other hand, using a composite type works as expected:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="immutable Pair{T1, T2}
a::T1
b::T2
end
function test!(arr::Array{Pair{Int, Int}})
for i = 1:10_000_000
arr[1] = arr[2]
end
end
a = [Pair(1, 1), Pair(2, 2)]
test!(a)"><pre class="notranslate"><code class="notranslate">immutable Pair{T1, T2}
a::T1
b::T2
end
function test!(arr::Array{Pair{Int, Int}})
for i = 1:10_000_000
arr[1] = arr[2]
end
end
a = [Pair(1, 1), Pair(2, 2)]
test!(a)
</code></pre></div>
<p dir="auto">Here <code class="notranslate">@time test!(a)</code> yields</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="elapsed time: 0.022649237 seconds (80 bytes allocated)"><pre class="notranslate"><code class="notranslate">elapsed time: 0.022649237 seconds (80 bytes allocated)
</code></pre></div>
<p dir="auto">Am I missing something obvious? It seems that each assignment triggers an allocation in the case of tuples (adding <code class="notranslate">@time</code> before the assignment suggests a 32 bytes allocation). Why is that? Is this documented somewhere?</p>
<p dir="auto">(I ran into this problem when trying to use a heap to extract the top <code class="notranslate">n</code> elements from a list of tuples without sorting it first, as done in Python's <code class="notranslate">heapq.nlargest</code> method)</p> | 1 |
<p dir="auto">Support compiling multiple input .ts files into one external module.</p>
<p dir="auto">Need to determine exactly how the module boundaries are defined when doing this.</p> | <p dir="auto">For simple tsc projects, I just want to use tsc as my build command. Since tsc supports most options in tsconfig.json, it would be awesome if tsc could take --incremental as an argument, check if any of the sources are newer than the outputs and early exist if no sources are newer.</p>
<p dir="auto">Currently in source depo and nmake land, we have to duplicate a lot of the tsconfig.json options in nmake just to support incremental builds.</p> | 0 |
<h3 dir="auto"><strong>update</strong> - for real ORM upsert, please see SQLAlchemy 2.0's new feature at <a href="https://docs.sqlalchemy.org/en/20/orm/queryguide/dml.html#orm-upsert-statements" rel="nofollow">https://docs.sqlalchemy.org/en/20/orm/queryguide/dml.html#orm-upsert-statements</a></h3>
<p dir="auto">Currently there is no way to specify <code class="notranslate">on conflict</code> behaviour when using <code class="notranslate">session</code> class and it's <code class="notranslate">add</code> method which makes a decision to either <code class="notranslate">insert</code> or <code class="notranslate">update</code>.<br>
This would be a nice addition to have <code class="notranslate">on conflict</code> behaviour of this method configurable.</p> | <p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<p dir="auto">Let's consider the example given in the documentation.<br>
One can do:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="s.query(User).filter(User.user_keywords.contains(user_keyword))"><pre class="notranslate"><code class="notranslate">s.query(User).filter(User.user_keywords.contains(user_keyword))
</code></pre></div>
<p dir="auto">but he can't do:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="s.query(User).filter(User.keywords.contains(keyword))"><pre class="notranslate"><code class="notranslate">s.query(User).filter(User.keywords.contains(keyword))
</code></pre></div>
<p dir="auto">because:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="AttributeError: 'AssociationProxy' object has no attribute 'contains'"><pre class="notranslate"><code class="notranslate">AttributeError: 'AssociationProxy' object has no attribute 'contains'
</code></pre></div>
<p dir="auto">That's why, when I use the association_proxy pattern, I also add another view only relation between the two referenced objects (in this case User and Keyword), using the secondary table.<br>
I use this relation for selecting, and I use the association_proxy relation for inserting...</p>
<p dir="auto">This duplication is annoying. I don't know if it's possible to solve the problem, but I want to be able to do:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="s.query(User).filter(User.keywords.contains(keyword))"><pre class="notranslate"><code class="notranslate">s.query(User).filter(User.keywords.contains(keyword))
</code></pre></div>
<p dir="auto"><a href="mailto:[email protected]">[email protected]</a></p>
<hr>
<p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/1372/ticket-1372-associationproxy-comparators.patch">ticket-1372-associationproxy-comparators.patch</a></p> | 0 |
<p dir="auto">Is there an easy way to disable jitting for a part of the code only?</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# can't @jax.jit because it contains a non-jittable section
def foo(a):
b = bar(a) # jittable
c = scipy.bfgs.minimize(b) # non-jittable
d = zar(c) # jittable
return d
"><pre class="notranslate"><span class="pl-c"># can't @jax.jit because it contains a non-jittable section</span>
<span class="pl-k">def</span> <span class="pl-en">foo</span>(<span class="pl-s1">a</span>):
<span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-en">bar</span>(<span class="pl-s1">a</span>) <span class="pl-c"># jittable</span>
<span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">bfgs</span>.<span class="pl-en">minimize</span>(<span class="pl-s1">b</span>) <span class="pl-c"># non-jittable</span>
<span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-en">zar</span>(<span class="pl-s1">c</span>) <span class="pl-c"># jittable</span>
<span class="pl-k">return</span> <span class="pl-s1">d</span></pre></div>
<p dir="auto">This can be manually split into two different jit sections</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="bar = jax.jit(bar)
zar = jax.jit(zar)
def foo(a):
b = bar(a)
c = scipy.bfgs.minimize(b) # non-jittable
d = zar(c)
return d"><pre class="notranslate"><span class="pl-s1">bar</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-en">jit</span>(<span class="pl-s1">bar</span>)
<span class="pl-s1">zar</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-en">jit</span>(<span class="pl-s1">zar</span>)
<span class="pl-k">def</span> <span class="pl-en">foo</span>(<span class="pl-s1">a</span>):
<span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-en">bar</span>(<span class="pl-s1">a</span>)
<span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">bfgs</span>.<span class="pl-en">minimize</span>(<span class="pl-s1">b</span>) <span class="pl-c"># non-jittable</span>
<span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-en">zar</span>(<span class="pl-s1">c</span>)
<span class="pl-k">return</span> <span class="pl-s1">d</span></pre></div>
<p dir="auto">However I often have an extremely long call-stack that explicit jitting is very tedious (especially through compositions and custom_vjps) and it would be nice to be able to specify something like <code class="notranslate">@jax.nojit</code>. Not sure how the implementation detail would work though, maybe automatically generate two sets of jaxprs/HLOs that sandwich the non-jittable part?</p>
<p dir="auto">(and yes, I've tried tfp's bfgs optimizers and unfortunately it is very deficient compared to that of scipy's bfgs)</p> | <p dir="auto">It would be great to be able to <code class="notranslate">jit</code> functions that make use of custom CPU operation, i.e., implemented with NumPy arrays. This would be a really valuable extension point for integrating JAX with existing codes/algorithms, and would possibly solve the final remaining use-cases for autograd.</p>
<p dir="auto">Right now, you can use custom CPU operations if you don't <code class="notranslate">jit</code>, but that adds a very large amount of dispatch overhead.</p>
<p dir="auto">My understanding is this could be possible by making use of XLA's CustomCall support.</p> | 1 |
<p dir="auto"><strong>Content:</strong> To support <code class="notranslate">Top(expression)</code> of SQLServer query SQL, the first step is to parse this grammar through Sharding-Parser.</p>
<p dir="auto"><strong>Difficulty Rating:</strong> ★★★☆☆</p>
<p dir="auto"><strong>Requirements:</strong><br>
- Understand <code class="notranslate">g4 file</code> of <code class="notranslate">ANTLR</code><br>
- Understand <code class="notranslate">Visitor</code> mechanism of <code class="notranslate">ANTLR</code><br>
- Can modify <code class="notranslate">xml</code> file</p> | <h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/apache/incubator-shardingsphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response <strong>more than 7 days</strong> and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">4.0.1</p>
<h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">Sharding-Proxy</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">be opened<br>
navicat version:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/35563513/78348983-7b93f780-75d5-11ea-9392-823203a51067.png"><img src="https://user-images.githubusercontent.com/35563513/78348983-7b93f780-75d5-11ea-9392-823203a51067.png" alt="image" style="max-width: 100%;"></a><br>
Testing is ok<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/35563513/78349110-a8480f00-75d5-11ea-9409-899b34540ad0.png"><img src="https://user-images.githubusercontent.com/35563513/78349110-a8480f00-75d5-11ea-9409-899b34540ad0.png" alt="image" style="max-width: 100%;"></a><br>
IDEA database :<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/35563513/78349218-d62d5380-75d5-11ea-98af-2f291f50c617.png"><img src="https://user-images.githubusercontent.com/35563513/78349218-d62d5380-75d5-11ea-98af-2f291f50c617.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/35563513/78348886-57381b00-75d5-11ea-8da4-6762a26eae70.png"><img src="https://user-images.githubusercontent.com/35563513/78348886-57381b00-75d5-11ea-8da4-6762a26eae70.png" alt="image" style="max-width: 100%;"></a><br>
But DBeaver 7.0.1 is ok<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/35563513/78348947-6cad4500-75d5-11ea-9677-5acad292bab5.png"><img src="https://user-images.githubusercontent.com/35563513/78348947-6cad4500-75d5-11ea-9677-5acad292bab5.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Actual behavior</h3>
<h3 dir="auto">Reason analyze (If you can)</h3>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> | 0 |
<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.18363.836
PowerToys version: 0.18.2
PowerToy module for which you are reporting the bug (if applicable): Run"><pre class="notranslate"><code class="notranslate">Windows build number: 10.0.18363.836
PowerToys version: 0.18.2
PowerToy module for which you are reporting the bug (if applicable): Run
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Search for "Docker"/"Docker Desktop"</li>
<li>See that only the .lnk is listed</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Docker Desktop can be found.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Docker Desktop is not found (except the .lnk).</p>
<h1 dir="auto">Screenshots</h1>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/669686/83955366-dd354400-a85a-11ea-86ec-a819a66bcee0.png"><img src="https://user-images.githubusercontent.com/669686/83955366-dd354400-a85a-11ea-86ec-a819a66bcee0.png" alt="docker_lnk" style="max-width: 100%;"></a></p> | <p dir="auto">I've only tried PowerToys Run for the second time; coming from KeyPirinha, it feels a little slow, but the last release is a lot faster than it was, so kudos.</p>
<p dir="auto">I'd like to propose some settings toggles to facilitate what could become the central place to launch things on Windows machines, much like Spotlight (which isn't that great -- but it's fast) or Alfred (which is pretty good, but not free) or KeyPirinha (fast, free, only windows)</p>
<ol dir="auto">
<li>Option to rank matching windows highest</li>
</ol>
<ul dir="auto">
<li>this would make PTR a viable alternative for alt-tab and hunting for the correct window; right now, the suggestion is at the bottom, so harder to get to, and more often than not, if the window is open, the app is a bad match: I basically never want 2x mail clients, slack, web browsers, etc -- I'd like to open the app or switch to it. For things that I open frequently (and multiple instances), I have keyboard shortcuts</li>
</ul>
<ol start="2" dir="auto">
<li>I see there's a "fuzzy match", and the latest release ranks exact matches higher -- which makes sense. I'd like to see PTR learning my fuzzy matches and ranking those at the top. If I type in "ff" and move downward to select Firefox Nightly, I'd like "ff" to bring up Firefox Nightly at the top every time, with other matches below. IOW, rank matches by user selection -- if I cursored there, it's a good match</li>
<li>Option to start up blank every time -- I basically never want the last selection, and yes, the text is already selected, so I can just start typing, but it looks cluttered.</li>
</ol> | 0 |
<p dir="auto">Setting <code class="notranslate">lights: false</code> for <code class="notranslate">MeshStandardMaterial</code> throws an error in the console</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var material = new MeshStandardMaterial({ color: 0x28292d, side: DoubleSide, lights: false });"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">material</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">MeshStandardMaterial</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">color</span>: <span class="pl-c1">0x28292d</span><span class="pl-kos">,</span> <span class="pl-c1">side</span>: <span class="pl-v">DoubleSide</span><span class="pl-kos">,</span> <span class="pl-c1">lights</span>: <span class="pl-c1">false</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8645216/49014587-4f6a9a00-f189-11e8-94e1-39b07f3446ab.png"><img src="https://user-images.githubusercontent.com/8645216/49014587-4f6a9a00-f189-11e8-94e1-39b07f3446ab.png" alt="image" style="max-width: 100%;"></a></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r98</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 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>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> | <h5 dir="auto">Description of the problem</h5>
<p dir="auto"><a href="http://hedges.org/thehedges/Ver21.wrl" rel="nofollow">Here</a> is one such example of a text node with a "size" field containing only one number.</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r89</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> | 0 |
<p dir="auto">We found that Glide did not work well when loading some larger GIFs, and in order to optimize it, we converted the GIF to webp, but it's a surprise that glide does not support loading it, There are someone trying to embed Fresco's webp-animite module in Glide now, but there are some uncontrollable issues. Hopefully glide will support it soon. If there is any intention, let us know thank you.</p> | <p dir="auto">Will be very great if you will add a support for WebP format. Witch includes loading WebP images and playing the animations.. Like the Fresco library does.</p>
<p dir="auto">To add support of loading images shouldn't be hard.. the challenge is to add animation playing support.</p>
<p dir="auto">Tnx.</p> | 1 |
<p dir="auto">Hi</p>
<p dir="auto">One may want to evaluate perplexity in language modelling task. In this case it is necessary to average over sequence length, then take exponent and only then average over batch size.</p>
<p dir="auto">For now it is impossible to implement such logic with <code class="notranslate">torch.nn.NLLLoss</code> in case of implicitly result averaging or summing up.</p>
<p dir="auto">From my point of view, it may be reasonable not to perform any implicitly operations with result of loss functions to make them more flexible.</p>
<p dir="auto">Cheers!</p> | <p dir="auto">After it was verified on <a href="https://discuss.pytorch.org/t/loaded-network-has-different-shape-but-works-anyway/19398" rel="nofollow">discuss.pytorch</a> that this is indeed unwanted behaviour, I am forwarding this to you:</p>
<h2 dir="auto">Issue description</h2>
<p dir="auto">I trained a model with among others had the following layer:<br>
<code class="notranslate">final_layer.append(nn.Conv2d(64, 1, kernel_size=1))</code><br>
and then saved it to a file with state_dict and torch.save.</p>
<p dir="auto">Then, when I wanted to load that model using load_state_dict, by accident the same layer was setup as follows:<br>
<code class="notranslate">final_layer.append(nn.Conv2d(64, 32, kernel_size=1))</code></p>
<p dir="auto">Nevertheless, the model was loaded without error. It seemed that the weights were just duplicated 32 times, but I have not verified. So the question is how this is consistent with API documentation. I have not found a statement that says load_state_dict would somehow fix shape inconsistencies automatically. It seems you have a documentation vs reality mismatch here. (Now you need to decide which one to fix)</p>
<h2 dir="auto">Code example</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="path = './test_model.pth'
model = nn.Conv2d(64, 1, 3, 1, 1)
torch.save(model.state_dict(), path)
model = nn.Conv2d(64, 32, 3, 1, 1)
model.load_state_dict(torch.load(path))
for w in model.weight[:, :, 0, 0]:
print(w)"><pre class="notranslate"><code class="notranslate">path = './test_model.pth'
model = nn.Conv2d(64, 1, 3, 1, 1)
torch.save(model.state_dict(), path)
model = nn.Conv2d(64, 32, 3, 1, 1)
model.load_state_dict(torch.load(path))
for w in model.weight[:, :, 0, 0]:
print(w)
</code></pre></div>
<p dir="auto">Provided by discuss .pytorch user ptrblck</p>
<h2 dir="auto">System Info</h2>
<p dir="auto">pytorch 0.4 release</p> | 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/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: xxx</li>
<li>Operating System version: xxx</li>
<li>Java version: xxx</li>
</ul>
<h3 dir="auto">Step 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?</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What is actually happen?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | <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.5.7</li>
<li>Operating System version: linux redhat4.8</li>
<li>Java version: jdk1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>connect zookeeper with zKcli;</li>
<li>setAcl /dubbo digest🔡base64(sha(abcd)):cdrwa</li>
<li>ls /dubbo 权限受限</li>
<li>addauth digest abcd:abcd<br>
5.可以访问 ls /dubbo</li>
</ol>
<p dir="auto">What actually happens?<br>
zookeeper acl设置在dubbo中不生效<br>
If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="配置文件dubbo.properties中配置了如下信息
dubbo.registry.protocol=zookeeper
dubbo.registry.address=zookeeper的集群地址
dubbo.registry.username=abcde(故意不正确)
dubbo.registry.password=abcde(故意不正确)
dubbo.registry.client=zkclient
question(问题):
实际情况不是应该出现noauth的异常吗?
现状是没有出现异常,这是为什么?"><pre class="notranslate"><code class="notranslate">配置文件dubbo.properties中配置了如下信息
dubbo.registry.protocol=zookeeper
dubbo.registry.address=zookeeper的集群地址
dubbo.registry.username=abcde(故意不正确)
dubbo.registry.password=abcde(故意不正确)
dubbo.registry.client=zkclient
question(问题):
实际情况不是应该出现noauth的异常吗?
现状是没有出现异常,这是为什么?
</code></pre></div> | 0 |
<p dir="auto"><strong>Glide Version</strong>:</p>
<p dir="auto"><strong>Integration libraries</strong>:</p>
<p dir="auto"><strong>Device/Android Version</strong>:</p>
<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:</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="Glide.with..."><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-smi">with</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="<FrameLayout xmlns:android="..."><pre class="notranslate"><<span class="pl-ent">FrameLayout</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>...</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">It'd be great if Glide can support Jetpack compose with a composable like <code class="notranslate">GlideImage</code></p>
<p dir="auto"><strong>Expected Usage (minimum)</strong></p>
<div class="highlight highlight-source-kotlin notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="setContent {
GlideImage(url)
}"><pre class="notranslate">setContent {
<span class="pl-en">GlideImage</span>(url)
}</pre></div> | 1 |
<p dir="auto">Build 0.0.23-pre.43, installed via Play Store.<br>
The "Rows per page" text is cut off in portrait mode on a Nexus 5:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/22935389/35997484-e96a1928-0d19-11e8-86ad-e9648671a3d5.png"><img src="https://user-images.githubusercontent.com/22935389/35997484-e96a1928-0d19-11e8-86ad-e9648671a3d5.png" alt="image" style="max-width: 100%;"></a></p> | <h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li>Install the Flutter Gallery alpha from the Play store</li>
<li>Open the app & navigate to Material Components: Data tables</li>
<li>Scroll to the bottom</li>
<li>The filter on the bottom left is outside the table</li>
</ol>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/160543/36038930-5640dd00-0dc1-11e8-94ca-c0653da6ed05.png"><img src="https://user-images.githubusercontent.com/160543/36038930-5640dd00-0dc1-11e8-94ca-c0653da6ed05.png" alt="screenshot_20180209-092832_2" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">Python 3.7.5 (default, Oct 31 2019, 15:18:51) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32,</p>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">import seaborn as sns<br>
import numpy as np</p>
</blockquote>
</blockquote>
</blockquote>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">sns.<strong>version</strong><br>
'0.9.0'<br>
np.<strong>version</strong><br>
'1.18.1'</p>
</blockquote>
</blockquote>
</blockquote>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">sns.palplot(sns.diverging_palette(150, 275, s=80, l=55, n=9))</p>
</blockquote>
</blockquote>
</blockquote>
<p dir="auto">Traceback (most recent call last):<br>
File "C:\Users\Test.conda\envs\Python37\lib\site-packages\numpy\core\function_base.py", line 117, in linspace<br>
num = operator.index(num)<br>
TypeError: 'float' object cannot be interpreted as an integer</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\Test.conda\envs\Python37\lib\site-packages\seaborn\palettes.py", line 744, in diverging_palette<br>
neg = palfunc((h_neg, s, l), 128 - (sep / 2), reverse=True, input="husl")<br>
File "C:\Users\Test.conda\envs\Python37\lib\site-packages\seaborn\palettes.py", line 641, in light_palette<br>
return blend_palette(colors, n_colors, as_cmap)<br>
File "C:\Users\Test.conda\envs\Python37\lib\site-packages\seaborn\palettes.py", line 777, in blend_palette<br>
pal = _ColorPalette(pal(np.linspace(0, 1, n_colors)))<br>
File "<<strong>array_function</strong> internals>", line 6, in linspace<br>
File "C:\Users\Test.conda\envs\Python37\lib\site-packages\numpy\core\function_base.py", line 121, in linspace.format(type(num)))<br>
TypeError: object of type <class 'float'> cannot be safely interpreted as an integer.</p> | <p dir="auto">python: 3.6.9<br>
seaborn version: 0.9.0<br>
matplotlib version: 3.1.2<br>
matplotlib backend: module://ipykernel.pylab.backend_inline</p>
<p dir="auto">Trying to get a diverging palette and running code from documentation:<br>
<a href="https://seaborn.pydata.org/generated/seaborn.diverging_palette.html" rel="nofollow">https://seaborn.pydata.org/generated/seaborn.diverging_palette.html</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import seaborn as sns; sns.set()
sns.palplot(sns.diverging_palette(240, 10, n=9))"><pre class="notranslate"><code class="notranslate">import seaborn as sns; sns.set()
sns.palplot(sns.diverging_palette(240, 10, n=9))
</code></pre></div>
<p dir="auto">Error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~/.local/lib/python3.6/site-packages/numpy/core/function_base.py in linspace(start, stop, num, endpoint, retstep, dtype, axis)
116 try:
--> 117 num = operator.index(num)
118 except TypeError:
TypeError: 'float' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
<ipython-input-10-3b31105fd99b> in <module>
1 import seaborn as sns; sns.set()
----> 2 sns.palplot(sns.diverging_palette(240, 10, n=9))
~/.local/lib/python3.6/site-packages/seaborn/palettes.py in diverging_palette(h_neg, h_pos, s, l, sep, n, center, as_cmap)
742 """
743 palfunc = dark_palette if center == "dark" else light_palette
--> 744 neg = palfunc((h_neg, s, l), 128 - (sep / 2), reverse=True, input="husl")
745 pos = palfunc((h_pos, s, l), 128 - (sep / 2), input="husl")
746 midpoint = dict(light=[(.95, .95, .95, 1.)],
~/.local/lib/python3.6/site-packages/seaborn/palettes.py in light_palette(color, n_colors, reverse, as_cmap, input)
639 light = set_hls_values(color, l=.95) # noqa
640 colors = [color, light] if reverse else [light, color]
--> 641 return blend_palette(colors, n_colors, as_cmap)
642
643
~/.local/lib/python3.6/site-packages/seaborn/palettes.py in blend_palette(colors, n_colors, as_cmap, input)
775 pal = mpl.colors.LinearSegmentedColormap.from_list(name, colors)
776 if not as_cmap:
--> 777 pal = _ColorPalette(pal(np.linspace(0, 1, n_colors)))
778 return pal
779
<__array_function__ internals> in linspace(*args, **kwargs)
~/.local/lib/python3.6/site-packages/numpy/core/function_base.py in linspace(start, stop, num, endpoint, retstep, dtype, axis)
119 raise TypeError(
120 "object of type {} cannot be safely interpreted as an integer."
--> 121 .format(type(num)))
122
123 if num < 0:
TypeError: object of type <class 'float'> cannot be safely interpreted as an integer."><pre class="notranslate"><code class="notranslate">
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~/.local/lib/python3.6/site-packages/numpy/core/function_base.py in linspace(start, stop, num, endpoint, retstep, dtype, axis)
116 try:
--> 117 num = operator.index(num)
118 except TypeError:
TypeError: 'float' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
<ipython-input-10-3b31105fd99b> in <module>
1 import seaborn as sns; sns.set()
----> 2 sns.palplot(sns.diverging_palette(240, 10, n=9))
~/.local/lib/python3.6/site-packages/seaborn/palettes.py in diverging_palette(h_neg, h_pos, s, l, sep, n, center, as_cmap)
742 """
743 palfunc = dark_palette if center == "dark" else light_palette
--> 744 neg = palfunc((h_neg, s, l), 128 - (sep / 2), reverse=True, input="husl")
745 pos = palfunc((h_pos, s, l), 128 - (sep / 2), input="husl")
746 midpoint = dict(light=[(.95, .95, .95, 1.)],
~/.local/lib/python3.6/site-packages/seaborn/palettes.py in light_palette(color, n_colors, reverse, as_cmap, input)
639 light = set_hls_values(color, l=.95) # noqa
640 colors = [color, light] if reverse else [light, color]
--> 641 return blend_palette(colors, n_colors, as_cmap)
642
643
~/.local/lib/python3.6/site-packages/seaborn/palettes.py in blend_palette(colors, n_colors, as_cmap, input)
775 pal = mpl.colors.LinearSegmentedColormap.from_list(name, colors)
776 if not as_cmap:
--> 777 pal = _ColorPalette(pal(np.linspace(0, 1, n_colors)))
778 return pal
779
<__array_function__ internals> in linspace(*args, **kwargs)
~/.local/lib/python3.6/site-packages/numpy/core/function_base.py in linspace(start, stop, num, endpoint, retstep, dtype, axis)
119 raise TypeError(
120 "object of type {} cannot be safely interpreted as an integer."
--> 121 .format(type(num)))
122
123 if num < 0:
TypeError: object of type <class 'float'> cannot be safely interpreted as an integer.
</code></pre></div>
<p dir="auto">looks like its due to line 744 the 128 - (sep / 2) produces a float<br>
next line will also have issue</p> | 1 |
<p dir="auto">Hi!</p>
<p dir="auto">I'm consuming declaration files from the node packages in my project so I'm not able to modify them.<br>
Therefore I opted to override module definition.</p>
<p dir="auto">I use redux and redux-thunk. Without this override of Dispatch type all my uses of dispatch will complain about wrong type (Correct behaviour). What redux-thunk does that it allows to dispatch to not dispatch object but also functions that can dispatch multiple objects.</p>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.10</p>
<p dir="auto"><strong>Code</strong><br>
// redux-dispatch-override.d.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as redux from 'redux';
declare module 'redux' {
export interface Dispatch<S> {
<R>(asyncAction: (dispatch: Dispatch<S>, getState: () => S) => R): R;
}
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">redux</span> <span class="pl-k">from</span> <span class="pl-s">'redux'</span><span class="pl-kos">;</span>
<span class="pl-k">declare</span> module <span class="pl-s">'redux'</span> <span class="pl-kos">{</span>
<span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">Dispatch</span><span class="pl-c1"><</span><span class="pl-smi">S</span><span class="pl-c1">></span> <span class="pl-kos">{</span>
<span class="pl-c1"><</span><span class="pl-smi">R</span><span class="pl-c1">></span><span class="pl-kos">(</span><span class="pl-s1">asyncAction</span>: <span class="pl-kos">(</span><span class="pl-s1">dispatch</span>: <span class="pl-smi">Dispatch</span><span class="pl-kos"><</span><span class="pl-smi">S</span><span class="pl-kos">></span><span class="pl-kos">,</span> <span class="pl-s1">getState</span>: <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi">S</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi">R</span><span class="pl-kos">)</span>: <span class="pl-smi">R</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>
Typescript compiler actually does accept this and will no longer throw errors which is very nice.</p>
<p dir="auto"><strong>Actual behavior:</strong><br>
On the other hand there is a problem with tsserver.<br>
In Webstorm tsserver will no longer consume definitions defined in redux node package. Instead it will try to find all definitions in this overriden declaration.</p> | <p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.9.0-dev.20160518-1.0</p>
<p dir="auto"><strong>Code</strong></p>
<p dir="auto"><code class="notranslate">bar/index.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export interface Bar {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto"><code class="notranslate">foo/index.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Bar} from '../bar';
namespace Bar {
export const foo = 3;
}
export const foo = Bar.foo;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-smi">Bar</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'../bar'</span><span class="pl-kos">;</span>
<span class="pl-k">namespace</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span>
<span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-smi">Bar</span><span class="pl-kos">.</span><span class="pl-c1">foo</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong></p>
<p dir="auto"><code class="notranslate">foo/index.js</code>:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""use strict";
var bar_1 = require('../bar');
var Bar;
(function (Bar) {
Bar.foo = 3;
})(Bar || (Bar = {}));
exports.foo = Bar.foo;"><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">bar_1</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'../bar'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-v">Bar</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-v">Bar</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-v">Bar</span><span class="pl-kos">.</span><span class="pl-c1">foo</span> <span class="pl-c1">=</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-kos">(</span><span class="pl-v">Bar</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Bar</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">foo</span> <span class="pl-c1">=</span> <span class="pl-v">Bar</span><span class="pl-kos">.</span><span class="pl-c1">foo</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Actual behavior:</strong></p>
<p dir="auto"><code class="notranslate">foo/index.js</code>:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""use strict";
var bar_1 = require('../bar');
var Bar;
(function (Bar) {
Bar.foo = 3;
})(Bar || (Bar = {}));
exports.foo = bar_1.Bar.foo;"><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">bar_1</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'../bar'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-v">Bar</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-v">Bar</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-v">Bar</span><span class="pl-kos">.</span><span class="pl-c1">foo</span> <span class="pl-c1">=</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-kos">(</span><span class="pl-v">Bar</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Bar</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">foo</span> <span class="pl-c1">=</span> <span class="pl-s1">bar_1</span><span class="pl-kos">.</span><span class="pl-c1">Bar</span><span class="pl-kos">.</span><span class="pl-c1">foo</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Notes:</strong><br>
This currently fails silently. At runtime <code class="notranslate">foo/index.js</code> will export <code class="notranslate">{foo: undefined}</code>. If merging a namespace declaration into a type name imported from another module is not allowed, then this should result in a compilation error. The issue I could find closest to this was <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="150956752" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/8288" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/8288/hovercard" href="https://github.com/microsoft/TypeScript/issues/8288">#8288</a>.</p>
<p dir="auto">This issue does not occur if <code class="notranslate">bar/index.ts</code> additionally exports a namespace named <code class="notranslate">Bar</code>; <code class="notranslate">tsc</code> reports <code class="notranslate">error TS2440: Import declaration conflicts with local declaration of 'Bar'</code> in such a scenario.</p> | 0 |
<p dir="auto">When I run an HTTPS server, somehow a request will trigger a panic error.</p>
<p dir="auto">ConnectionReset: Connection reset by peer (os error 104)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: Uncaught ConnectionReset: Connection reset by peer (os error 104)
at unwrapResponse (rt/10_dispatch_json.js:24:13)
at sendAsync (rt/10_dispatch_json.js:75:12)
at async TLSListener.accept (rt/40_tls.js:42:19)
at async Server.acceptConnAndIterateHttpRequests (file:///server/dist.server.js:1714:32)
at async MuxAsyncIterator.callIteratorNext (file:///server/dist.server.js:797:49)"><pre class="notranslate"><code class="notranslate">error: Uncaught ConnectionReset: Connection reset by peer (os error 104)
at unwrapResponse (rt/10_dispatch_json.js:24:13)
at sendAsync (rt/10_dispatch_json.js:75:12)
at async TLSListener.accept (rt/40_tls.js:42:19)
at async Server.acceptConnAndIterateHttpRequests (file:///server/dist.server.js:1714:32)
at async MuxAsyncIterator.callIteratorNext (file:///server/dist.server.js:797:49)
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/499364/92377143-42d4ed00-f136-11ea-91a1-75d006393c16.png"><img width="595" alt="Screen Shot 2020-09-07 at 18 16 30" src="https://user-images.githubusercontent.com/499364/92377143-42d4ed00-f136-11ea-91a1-75d006393c16.png" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/499364/92377189-58e2ad80-f136-11ea-959b-449fbd880ba9.png"><img width="671" alt="Screen Shot 2020-09-07 at 18 17 07" src="https://user-images.githubusercontent.com/499364/92377189-58e2ad80-f136-11ea-959b-449fbd880ba9.png" style="max-width: 100%;"></a></p> | <p dir="auto">I have a problem running an <code class="notranslate">https</code> server and I can't solve it on my own. I tried various things which include:</p>
<ul dir="auto">
<li>switching linux distros</li>
<li>using different ssl certificates</li>
<li>changing server configurations</li>
<li>different domains</li>
<li>comparing to http server</li>
<li>and more</li>
</ul>
<p dir="auto">The problem is that after an indeterminable time, but mostly about 20 hours, the server stops working in the sense that requests just seem to timeout: <code class="notranslate">curl: (28) Failed to connect to xyz.com port 443: Connection timed out</code>. Before this time period, everything works prefectly. But the deno process is still running and the port is still used:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/54777088/97083011-ccb91680-160d-11eb-91cc-1f05ebdfa7d0.png"><img src="https://user-images.githubusercontent.com/54777088/97083011-ccb91680-160d-11eb-91cc-1f05ebdfa7d0.png" alt="deno_ps_ax-2020-10-24" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/54777088/97083016-d04c9d80-160d-11eb-96f7-3bb990d67959.png"><img src="https://user-images.githubusercontent.com/54777088/97083016-d04c9d80-160d-11eb-96f7-3bb990d67959.png" alt="deno_lsof-2020-10-24" style="max-width: 100%;"></a></p>
<p dir="auto">I don't use an nginx proxy server; just deno directly on a linux distro.<br>
I execute deno with <code class="notranslate">sudo</code> and I also tried to start deno with <a href="https://pm2.keymetrics.io/" rel="nofollow">pm2</a>. In all cases it stops working after a couple of hours.</p>
<p dir="auto">The server runs on AWS Lightsail and I can rule out that a huge amount of requests is causing this (maybe 10 requests per hour).</p>
<p dir="auto">I can also say with certainty that this does not happen with a deno <code class="notranslate">http</code> server nor with a node <code class="notranslate">https</code> server, which I both tested at least once for two days.</p>
<p dir="auto">There was no big CPU or memory load which I could see in the monitoring tools. I only respond with <code class="notranslate">hello world</code> to requests at the moment.<br>
If necessary I would be happy to give ssh access to somebody who knows how to debug this issue.</p>
<p dir="auto">Thanks a lot!</p> | 1 |
<p dir="auto">I have developed a desktop app with electron.<br>
I have put setLoginItemSettings on windows startup windows , my app should start at start on windows. Some of my functionality is not working properly(Only login is working).</p> | <h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/main/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">14/15+</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">Other (specify below)</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">observed on latest Windows 10 & macOS 11</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">x64</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto">13.5.1</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Electron processes should not have a hard memory limit of ~8GB, but this limit was introduced with Electron 14.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">With Electron ≥14, loading operations fail (or process crashes with <code class="notranslate">oom</code>) when attempting to load data into RAM if memory use exceeds ~8GB. This limit did not exist (or was significantly higher) in versions 13 and earlier.</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><a href="https://github.com/marcelblum/electron-memory-tests">https://github.com/marcelblum/electron-memory-tests</a></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">Simple demo to reproduce:</p>
<ol dir="auto">
<li>clone repo at <a href="https://github.com/marcelblum/electron-memory-tests">https://github.com/marcelblum/electron-memory-tests</a></li>
<li><code class="notranslate">npm install</code> will install both latest electron and electron 13.5.1</li>
<li><code class="notranslate">npm run start-electron-13</code></li>
<li>repeatedly click the "fill renderer process RAM with 2GB" and/or "fill main process RAM with 2GB" buttons. For demo purposes this just creates a quick dummy buffer with <code class="notranslate">Buffer.alloc()</code>. In my tests in Electron 13 on several Windows & Mac machines with installed RAM varying from 8-16GB, I can do this with each process going up to at least 16GB until errors start to occur.</li>
<li><code class="notranslate">npm run start-electron-latest</code> and repeat as above. In Electron 14/15/16/17 there is a clear hard limit at around 8GB per-process when loading starts to fail.</li>
</ol>
<p dir="auto">I have tried experimenting with <code class="notranslate">max_old_space_size</code> e.g. <code class="notranslate">app.commandLine.appendSwitch('js-flags', '--max_old_space_size=16384')</code> or <code class="notranslate">require('v8').setFlagsFromString('--max-old-space-size=16384')</code> with no effect observed.</p>
<p dir="auto">It may be an edge case to need this much memory but it's not too difficult to run up against this new limit when loading lots of high res media files. In my own app using the web audio api, I noticed this limit pretty quickly after updating from Electron 13.</p>
<p dir="auto">Is this an intentional newly introduced limit? Is there any way to increase this limit? I assume this is not a Chromium issue since the limit also applies to the main process.</p>
<p dir="auto"><strong>Update</strong>: Looks like Electron 11 and earlier had no memory limits, but starting with Electron 12, a ~16GB limit was imposed, and then with Electron 14 that became a ~8GB limit. I've added Electron 11.5 to my demo for comparison via <code class="notranslate">npm run start-electron-11</code>.</p> | 0 |
<p dir="auto">Most of RESTFull API's just ignores extra data submitted to their actions because in some cases doesn't make any sense show an error, mainly when you are working with unnamed forms. When you don't have subforms, a terrible workaround with problematic performance is:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" $data = $request->request->all(); // ->get($form->getName());
$children = $form->all();
$data = array_intersect_key($data, $children);
$form->bind($data);"><pre class="notranslate"> <span class="pl-s1"><span class="pl-c1">$</span>data</span> = <span class="pl-s1"><span class="pl-c1">$</span>request</span>-><span class="pl-c1">request</span>-><span class="pl-en">all</span>(); <span class="pl-c">// ->get($form->getName());</span>
<span class="pl-s1"><span class="pl-c1">$</span>children</span> = <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">all</span>();
<span class="pl-s1"><span class="pl-c1">$</span>data</span> = array_intersect_key(<span class="pl-s1"><span class="pl-c1">$</span>data</span>, <span class="pl-s1"><span class="pl-c1">$</span>children</span>);
<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">bind</span>(<span class="pl-s1"><span class="pl-c1">$</span>data</span>);</pre></div>
<p dir="auto">So, I suggest introducing a new simple option in the form configuration:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$factory->create('acme.form', $model, array('ignore_extra_data' => true));"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">create</span>(<span class="pl-s">'acme.form'</span>, <span class="pl-s1"><span class="pl-c1">$</span>model</span>, <span class="pl-en">array</span>(<span class="pl-s">'ignore_extra_data'</span> => <span class="pl-c1">true</span>));</pre></div>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" // Mark the form with an error if it contains extra fields
if (false == $config->getOption('ignore_extra_data') && count($form->getExtraData()) > 0) {
$this->context->addViolation(
$config->getOption('extra_fields_message'),
array('{{ extra_fields }}' => implode('", "', array_keys($form->getExtraData()))),
$form->getExtraData()
);
}"><pre class="notranslate"> <span class="pl-c">// Mark the form with an error if it contains extra fields</span>
<span class="pl-k">if</span> (<span class="pl-c1">false</span> == <span class="pl-s1"><span class="pl-c1">$</span>config</span>-><span class="pl-en">getOption</span>(<span class="pl-s">'ignore_extra_data'</span>) && count(<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">getExtraData</span>()) > <span class="pl-c1">0</span>) {
<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">context</span>-><span class="pl-en">addViolation</span>(
<span class="pl-s1"><span class="pl-c1">$</span>config</span>-><span class="pl-en">getOption</span>(<span class="pl-s">'extra_fields_message'</span>),
<span class="pl-en">array</span>(<span class="pl-s">'{{ extra_fields }}'</span> => implode(<span class="pl-s">'", "'</span>, array_keys(<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">getExtraData</span>()))),
<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">getExtraData</span>()
);
}</pre></div>
<p dir="auto"><a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L108">https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L108</a></p>
<p dir="auto">Once the default value is <code class="notranslate">false</code>, it'll not cause BC breaks.</p>
<p dir="auto">If you agree, I'll be happy in submit a PR.</p> | <p dir="auto"><code class="notranslate">bind</code>ing partial parameters effectively clears all existing values from the model and only persists the new parameters that are passed in. See example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// Author.php
class Author
{
public $name;
public $email = 'bar';
}
// AuthorType
...
$builder->add('name', 'text')->author('text');
..."><pre class="notranslate"><code class="notranslate">// Author.php
class Author
{
public $name;
public $email = 'bar';
}
// AuthorType
...
$builder->add('name', 'text')->author('text');
...
</code></pre></div>
<p dir="auto">Passing <code class="notranslate">$form->bind(array('name' => 'foo'))</code> wipes out the existing <code class="notranslate">email</code> value.</p> | 1 |
<ol dir="auto">
<li>I want to know when will invoke "webhook" or "ABAC" in source code.</li>
<li>For mode "webhook", what resources(eg. pods) can users perform what operation(create, delete)?</li>
<li>I want to know it clearly in source code.</li>
</ol>
<p dir="auto">Thank you !</p> | <p dir="auto">1 Is webhook plugin stable?<br>
2 How webhook works?<br>
3 How can I use webhook and where can find detailed information.</p>
<p dir="auto">Thank you very much!</p> | 1 |
<p dir="auto">Managed timestamp. Always incremental.</p> | <p dir="auto">Apache Druid 0.19.0 contains around 200 new features, bug fixes, performance enhancements, documentation improvements, and additional test coverage from 51 contributors. Refer to the <a href="https://github.com/apache/druid/compare/0.18.1...0.19.0">complete list of changes</a> and <a href="https://github.com/apache/druid/milestone/38">everything tagged to the milestone</a> for further details.</p>
<h1 dir="auto"><a name="user-content-19-new-features" href="#19-new-features">#</a> New Features</h1>
<h2 dir="auto"><a name="user-content-19-vectorize-default" href="#19-vectorize-default">#</a> GroupBy and Timeseries vectorized query engines enabled by default</h2>
<p dir="auto"><a href="https://github.com/apache/druid/issues/7093" data-hovercard-type="issue" data-hovercard-url="/apache/druid/issues/7093/hovercard">Vectorized query engines</a> for GroupBy and Timeseries queries were introduced in Druid 0.16, as an opt in feature. Since then we have extensively tested these engines and feel that the time has come for these improvements to find a wider audience. Note that not all of the query engine is vectorized at this time, but this change makes it so that any query which is eligible to be vectorized will do so. This feature may still be disabled if you encounter any problems by setting <code class="notranslate">druid.query.vectorize</code> to <code class="notranslate">false</code>.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="644260144" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/10065" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/10065/hovercard" href="https://github.com/apache/druid/pull/10065">#10065</a></p>
<h2 dir="auto"><a name="user-content-19-avro" href="#19-avro">#</a> Druid native batch support for Apache Avro Object Container Files</h2>
<p dir="auto">New in Druid 0.19.0, native batch indexing now supports <a href="https://avro.apache.org/docs/current/spec.html#Object+Container+Files" rel="nofollow">Apache Avro Object Container Format</a> encoded files, allowing batch ingestion of Avro data without needing an external Hadoop cluster. Check out <a href="https://druid.apache.org/docs/0.19.0/ingestion/data-formats.html#avro-ocf" rel="nofollow">the docs</a> for more details</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="598012658" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9671" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9671/hovercard" href="https://github.com/apache/druid/pull/9671">#9671</a></p>
<h2 dir="auto"><a name="user-content-19-sql-input-source" href="#19-sql-input-source">#</a> Updated Druid native batch support for SQL databases</h2>
<p dir="auto">An 'SqlInputSource' has been added in Druid 0.19.0 to work with the new native batch ingestion specifications first introduced in Druid 0.17, deprecating the <a href="https://druid.apache.org/docs/0.19.0/ingestion/native-batch.html#sqlfirehose" rel="nofollow">SqlFirehose</a>. Like the 'SqlFirehose' it currently supports MySQL and PostgreSQL, using the driver from those extensions. This is a relatively low level ingestion task, and the operator must take care to manually ensure that the correct data is ingested, either by specially crafting queries to ensure no duplicate data is ingested for appends, or ensuring that the entire set of data is queried to be replaced when overwriting. See <a href="https://druid.apache.org/docs/0.19.0/ingestion/native-batch.md#sql-input-source" rel="nofollow">the docs</a> for more operational details.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="574261231" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9449" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9449/hovercard" href="https://github.com/apache/druid/pull/9449">#9449</a></p>
<h2 dir="auto"><a name="user-content-19-ranger" href="#19-ranger">#</a> Apache Ranger based authorization</h2>
<p dir="auto">A new extension in Druid 0.19.0 adds an Authorizer which implements access control for Druid, backed by <a href="https://ranger.apache.org/" rel="nofollow">Apache Ranger</a>. Please see [the extension documentation]((<a href="https://druid.apache.org/docs/0.19.0/development/extensions-core/druid-ranger-security.html" rel="nofollow">https://druid.apache.org/docs/0.19.0/development/extensions-core/druid-ranger-security.html</a>) and <a href="https://druid.apache.org/docs/0.19.0/design/auth.html" rel="nofollow">Authentication and Authorization</a> for more information on the basic facilities this extension provides.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="589569444" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9579" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9579/hovercard" href="https://github.com/apache/druid/pull/9579">#9579</a></p>
<h2 dir="auto"><a name="user-content-19-aliyun-oss" href="#19-aliyun-oss">#</a> Alibaba Object Storage Service support</h2>
<p dir="auto">A new 'contrib' extension has been added for <a href="https://www.alibabacloud.com/product/oss" rel="nofollow">Alibaba Cloud Object Storage Service (OSS)</a> to provide both deep storage and usage as a batch ingestion input source. Since this is a 'contrib' extension, it will not be packaged by default in the binary distribution, please see <a href="https://druid.apache.org/docs/0.19.0/development/extensions.html#community-extensions" rel="nofollow">community extensions</a> for more details on how to use in your cluster.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="621487252" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9898" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9898/hovercard" href="https://github.com/apache/druid/pull/9898">#9898</a></p>
<h2 dir="auto"><a name="user-content-19-gce-autoscale" href="#19-gce-autoscale">#</a> Ingestion worker autoscaling for Google Compute Engine</h2>
<p dir="auto">Another 'contrib' extension new in 0.19.0 has been added to support ingestion worker autoscaling, which allows a Druid Overlord to provision or terminate worker instances (MiddleManagers or Indexers) whenever there are pending tasks or idle workers, for Google Compute Engine. Unlike the Amazon Web Services ingestion autoscaling extension, which provisions and terminates instances directly without using an Auto Scaling Group, the GCE autoscaler uses <a href="https://cloud.google.com/compute/docs/instance-groups#managed_instance_groups" rel="nofollow">Managed Instance Groups</a> to more closely align with how operators are likely to provision their clusters in GCE. Like other 'contrib' extensions, it will not be packaged by default in the binary distribution, please see <a href="https://druid.apache.org/docs/0.19.0/development/extensions.html#community-extensions" rel="nofollow">community extensions</a> for more details on how to use in your cluster.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="532513571" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/8987" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/8987/hovercard" href="https://github.com/apache/druid/pull/8987">#8987</a></p>
<h2 dir="auto"><a name="user-content-19-regexp-like" href="#19-regexp-like">#</a> REGEXP_LIKE</h2>
<p dir="auto">A new <code class="notranslate">REGEXP_LIKE</code> function has been added to Druid SQL and native expressions, which behaves similar to <code class="notranslate">LIKE</code>, except using regular expressions for the pattern.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="620649963" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9893" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9893/hovercard" href="https://github.com/apache/druid/pull/9893">#9893</a></p>
<h2 dir="auto"><a name="user-content-19-web-lookup" href="#19-web-lookup">#</a> Web console lookup management improvements</h2>
<p dir="auto">Druid 0.19 also web console also includes some useful improvements to the lookup table management interface. Creating and editing lookups is now done with a form to accept user input, rather than a raw text editor to enter the JSON spec.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/37322608/78221645-fa2b5080-7480-11ea-9824-c74e121575f3.png"><img width="682" alt="Screen Shot 2020-04-02 at 1 14 38 AM" src="https://user-images.githubusercontent.com/37322608/78221645-fa2b5080-7480-11ea-9824-c74e121575f3.png" style="max-width: 100%;"></a></p>
<p dir="auto">Additionally, clicking the magnifying glass icon next to a lookup will now allow displaying the first 5000 values of that lookup.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/37322608/77206532-cd5c5e00-6abc-11ea-9ea0-0680fa5de8cb.png"><img width="1129" alt="Screen Shot 2020-03-20 at 3 09 24 PM" src="https://user-images.githubusercontent.com/37322608/77206532-cd5c5e00-6abc-11ea-9ea0-0680fa5de8cb.png" style="max-width: 100%;"></a></p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="585329014" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9549" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9549/hovercard" href="https://github.com/apache/druid/pull/9549">#9549</a><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="590585684" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9587" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9587/hovercard" href="https://github.com/apache/druid/pull/9587">#9587</a></p>
<h2 dir="auto"><a name="user-content-19-datasource-loadstatus" href="#19-datasource-loadstatus">#</a> New Coordinator per datasource 'loadstatus' API</h2>
<p dir="auto">A coordinator API can make it easier to determine if the latest published segments are available for querying. This is similar to the existing coordinator 'loadstatus' API, but is datasource specific, may specify an interval, and can optionally live refresh the metadata store snapshot to get the latest up to date information. Note that operators should still exercise caution when using this API to query large numbers of segments, especially if forcing a metadata refresh, as it can potentially be a 'heavy' call on large clusters.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="628886067" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9965" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9965/hovercard" href="https://github.com/apache/druid/pull/9965">#9965</a></p>
<h2 dir="auto"><a name="user-content-19-batch-append" href="#19-batch-append">#</a> Native batch append support for range and hash partitioning</h2>
<p dir="auto">Part bug fix, part new feature, Druid native batch (once again) supports appending new data to existing time chunks when those time chunks were partitioned with 'hash' or 'range' partitioning algorithms. Note that currently the appended segments only support 'dynamic' partitioning, and when rolling back to older versions that these appended segments will not be recognized by Druid after the downgrade. In order to roll back to a previous version, these appended segments should be compacted with the rest of the time chunk in order to have a homogenous partitioning scheme.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="638438576" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/10033" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/10033/hovercard" href="https://github.com/apache/druid/pull/10033">#10033</a></p>
<h1 dir="auto"><a name="user-content-19-bugs" href="#19-bugs">#</a> Bug fixes</h1>
<p dir="auto">Druid 0.19.0 contains 65 bug fixes, you can see <a href="https://github.com/apache/druid/pulls?q=is%3Apr+milestone%3A0.19.0+is%3Aclosed+label%3ABug">the complete list here</a>.</p>
<h2 dir="auto"><a name="user-content-19-partition-non-atomic" href="#19-partition-non-atomic">#</a> Fix for batch ingested 'dynamic' partitioned segments not becoming queryable atomically</h2>
<p dir="auto">Druid 0.19.0 fixes an important query correctness issue, where 'dynamic' partitioned segments produced by a batch ingestion task were not tracking the overall number of partitions. This had the implication that when these segments came online, they did not do so as a complete set, but rather as individual segments, meaning that there would be periods of swapping where results could be queried from an incomplete partition set within a time chunk.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="637359859" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/10025" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/10025/hovercard" href="https://github.com/apache/druid/pull/10025">#10025</a></p>
<h2 dir="auto"><a name="user-content-19-partition-empty-buckets" href="#19-partition-empty-buckets">#</a> Fix to allow 'hash' and 'range' partitioned segments with empty buckets to now be queryable</h2>
<p dir="auto">Prior to 0.19.0, Druid had a bug when using hash or ranged partitioning where if data skew was such that any of the buckets were 'empty' after ingesting, the partitions would never be recognized as 'complete' and so never become queryable. Druid 0.19.0 fixes this issue by adjusting the schema of the partitioning spec. These changes to the json format should be backwards compatible, however rolling back to a previous version will again make these segments no longer queryable.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="635840083" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/10012" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/10012/hovercard" href="https://github.com/apache/druid/pull/10012">#10012</a></p>
<h2 dir="auto"><a name="user-content-19-bad-balancer" href="#19-bad-balancer">#</a> Incorrect balancer behavior</h2>
<p dir="auto">A bug in Druid versions prior to 0.19.0 allowed for (incorrect) coordinator operation in the event <code class="notranslate">druid.server.maxSize</code> was not set. This bug would allow segments to load, and effectively randomly balance them in the cluster (regardless of what balancer strategy was actually configured) if all historicals did not have this value set. This bug has been fixed, but as a result <code class="notranslate">druid.server.maxSize</code> must be set to the sum of the segment cache location sizes for historicals, or else they will not load segments.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="644897051" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/10070" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/10070/hovercard" href="https://github.com/apache/druid/pull/10070">#10070</a></p>
<h1 dir="auto"><a name="user-content-19-upgrading-from-previous" href="#19-upgrading-from-previous">#</a> Upgrading to Druid 0.19.0</h1>
<p dir="auto">Please be aware of the following issues when upgrading from 0.18.1 to 0.19.0. If you're updating from an earlier version than 0.18.1, please see the release notes of the relevant intermediate versions.</p>
<h2 dir="auto"><a name="user-content-19-server-size" href="#19-server-size">#</a> 'druid.server.maxSize' must now be set for Historical servers</h2>
<p dir="auto"><a href="#19-bad-balancer">A Coordinator bug fix</a> as a side-effect now requires <code class="notranslate">druid.server.maxSize</code> to be set for segments to be loaded. While this value should have been set correctly for previous versions, please be sure this value is configured correctly before upgrading your clusters or else segments will not be loaded.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="644897051" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/10070" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/10070/hovercard" href="https://github.com/apache/druid/pull/10070">#10070</a></p>
<h2 dir="auto"><a name="user-content-19-sys-segments-payload" href="#19-sys-segments-payload">#</a> System tables 'sys.segments' column 'payload' has been removed and replaced with 'dimensions', 'metrics', and 'shardSpec'</h2>
<p dir="auto">The removal of the 'payload' column from the <code class="notranslate">sys.segments</code> table should make queries on this table much more efficient, and the most useful fields from this, the list of 'dimensions', 'metrics', and the 'shardSpec', have been split out, and so are still available to devote to processing queries.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="619592476" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9883" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9883/hovercard" href="https://github.com/apache/druid/pull/9883">#9883</a></p>
<h2 dir="auto"><a name="user-content-19-segment-load-threads" href="#19-segment-load-threads">#</a> Changed default number of segment loading threads</h2>
<p dir="auto">The <code class="notranslate">druid.segmentCache.numLoadingThreads</code> configuration has had the default value changed from 'number of cores' to 'number of cores' divided by 6. This should make historicals a bit more well behaved out of the box when loading a large number of segments, limiting the impact on query performance.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="616683158" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9856" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9856/hovercard" href="https://github.com/apache/druid/pull/9856">#9856</a></p>
<h2 dir="auto"><a name="user-content-19-broadcast-colocated" href="#19-broadcast-colocated">#</a> Broadcast load rules no longer have 'colocated datasources'</h2>
<p dir="auto">A number of incomplete changes to facilitate more efficient join queries, based on the idea of utilizing broadcast load rules to propagate smaller datasources among the cluster so that join operations can be pushed down to individual segment processing, have been added to 0.19.0. While not a finished feature yet, as part of the changes to make this happen, 'broadcast' load rules no longer have the concept of 'colocated datasources', which would attempt to only broadcast segments to servers that had segments of the configured datasource. This didn't work so well in practice, as it was non-atomic, meaning that the broadcast segments would lag behind loads and drops of the colocated datasource, so we decided to remove it.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="629602337" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9971" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9971/hovercard" href="https://github.com/apache/druid/pull/9971">#9971</a></p>
<h2 dir="auto"><a name="user-content-19-broadcast-broker-load" href="#19-broadcast-broker-load">#</a> Brokers and realtime tasks may now be configured to load segments from 'broadcast' datasources</h2>
<p dir="auto">Another effect of the afforementioned preliminary work to introduce efficient 'broadcast joins', Brokers and realtime indexing tasks will now load segments loaded by 'broadcast' rules, if a segment cache is configured. Since the feature is not complete there is little reason to do this in 0.19.0, and it will not happen unless explicitly configured.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="629602337" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9971" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9971/hovercard" href="https://github.com/apache/druid/pull/9971">#9971</a></p>
<h2 dir="auto"><a name="user-content-19-lpad-rpad" href="#19-lpad-rpad">#</a> lpad and rpad function behavior change</h2>
<p dir="auto">The lpad and rpad functions have gone through a slight behavior change in Druids default non-SQL compatible mode, in order to make them behave consistently with PostgreSQL. In the new behavior, if the pad expression is an empty string, then the result will be the (possibly trimmed) original characters, rather than the empty string being treated as a null and coercing the results to null.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="635024975" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/10006" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/10006/hovercard" href="https://github.com/apache/druid/pull/10006">#10006</a></p>
<h2 dir="auto"><a name="user-content-19-interfaces" href="#19-interfaces">#</a> Extensions providing custom Druid expressions are now expected to implement equals and hashCode methods</h2>
<p dir="auto">A change to the <code class="notranslate">Expr</code> interface in Druid 0.19.0 requires that any extension which provides custom expressions via <code class="notranslate">ExprMacroTable</code> must also implement <code class="notranslate">equals</code> and <code class="notranslate">hashCode</code> methods to function correctly, especially with JOIN queries, which rely on filter and expression analysis for determining how to optimally process a query.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="613106190" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/9830" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/9830/hovercard" href="https://github.com/apache/druid/pull/9830">#9830</a></p>
<h1 dir="auto"><a name="user-content-19-known-issues" href="#19-known-issues">#</a> Known Issues</h1>
<p dir="auto">For a full list of open issues, please see
<a id="label-c8951c" href="https://github.com/apache/druid/labels/Bug" data-name="Bug" style="--label-r:252;--label-g:41;--label-b:41;--label-h:0;--label-s:97;--label-l:57;" data-view-component="true" class="IssueLabel hx_IssueLabel Label--inline">
Bug</a>
.</p>
<h1 dir="auto"><a name="user-content-19-credits" href="#19-credits">#</a> Credits</h1>
<p dir="auto">Thanks to everyone who contributed to this release!</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/2bethere/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/2bethere">@2bethere</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/a-chumagin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/a-chumagin">@a-chumagin</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/a2l007/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/a2l007">@a2l007</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/abhishekrb19/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/abhishekrb19">@abhishekrb19</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/agricenko/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/agricenko">@agricenko</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ahuret/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ahuret">@ahuret</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alex-plekhanov/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alex-plekhanov">@alex-plekhanov</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/AlexanderSaydakov/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/AlexanderSaydakov">@AlexanderSaydakov</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/awelsh93/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/awelsh93">@awelsh93</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bolkedebruin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bolkedebruin">@bolkedebruin</a><br>
@calvinhkf<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/capistrant/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/capistrant">@capistrant</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ccaominh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ccaominh">@ccaominh</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/chenyuzhi459/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/chenyuzhi459">@chenyuzhi459</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/clintropolis/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/clintropolis">@clintropolis</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/damnMeddlingKid/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/damnMeddlingKid">@damnMeddlingKid</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/danc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/danc">@danc</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dylwylie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dylwylie">@dylwylie</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/egor-ryashin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/egor-ryashin">@egor-ryashin</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/FrankChen021/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/FrankChen021">@FrankChen021</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/frnidito/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/frnidito">@frnidito</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Fullstop000/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Fullstop000">@Fullstop000</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gianm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gianm">@gianm</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/harshpreet93/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/harshpreet93">@harshpreet93</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jihoonson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jihoonson">@jihoonson</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jon-wei/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jon-wei">@jon-wei</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/josephglanville/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/josephglanville">@josephglanville</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kamaci/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kamaci">@kamaci</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kanibs/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kanibs">@kanibs</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/leerho/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/leerho">@leerho</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/liujianhuanzz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/liujianhuanzz">@liujianhuanzz</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/maytasm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/maytasm">@maytasm</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mcbrewster/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mcbrewster">@mcbrewster</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mghosh4/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mghosh4">@mghosh4</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/morrifeldman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/morrifeldman">@morrifeldman</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pjain1/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pjain1">@pjain1</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/samarthjain/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/samarthjain">@samarthjain</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/stefanbirkner/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/stefanbirkner">@stefanbirkner</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sthetland/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sthetland">@sthetland</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/suneet-s/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/suneet-s">@suneet-s</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/surekhasaharan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/surekhasaharan">@surekhasaharan</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tarpdalton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tarpdalton">@tarpdalton</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/viongpanzi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/viongpanzi">@viongpanzi</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vogievetsky/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vogievetsky">@vogievetsky</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/willsalz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/willsalz">@willsalz</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wjhypo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wjhypo">@wjhypo</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/xhl0726/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/xhl0726">@xhl0726</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/xiangqiao123/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/xiangqiao123">@xiangqiao123</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/xvrl/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/xvrl">@xvrl</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yuanlihan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yuanlihan">@yuanlihan</a><br>
@zachjsh</p> | 0 |
<p dir="auto">On a Nexus 5, go landscape. Then, open Gallery. Tap into Text inputs. Tap into "re-type password". (Actually, this happens when I tap into any text field on this demo)</p>
<p dir="auto">Here's what I see:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5479/18817678/7d0981f8-831b-11e6-926e-076ee1463374.png"><img src="https://cloud.githubusercontent.com/assets/5479/18817678/7d0981f8-831b-11e6-926e-076ee1463374.png" alt="screenshot_20160925-121951" style="max-width: 100%;"></a></p> | <h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">Pubspec</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dependencies:
flutter:
sdk: flutter
video_player: ^0.6.5"><pre class="notranslate"><span class="pl-ent">dependencies</span>:
<span class="pl-ent">flutter</span>:
<span class="pl-ent">sdk</span>: <span class="pl-s">flutter</span>
<span class="pl-ent">video_player</span>: <span class="pl-s">^0.6.5</span></pre></div>
<h2 dir="auto">Logs</h2>
<p dir="auto">Warning in Logs while running the build</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\video_player-0.6.5\android\src\main\java\io\flutter\plugins\videoplayer\VideoPlayerPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details."><pre class="notranslate"><code class="notranslate">Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\video_player-0.6.5\android\src\main\java\io\flutter\plugins\videoplayer\VideoPlayerPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
</code></pre></div>
<h2 dir="auto">flutter doctor -v</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 10.0.17134.345], locale en-IN)
• Flutter version 0.9.4 at C:\flutter
• Framework revision f37c235c32 (2 weeks ago), 2018-09-25 17:45:40 -0400
• Engine revision 74625aed32
• Dart version 2.1.0-dev.5.0.flutter-a2eb050044
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at C:\Users\Rohit\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = C:\Users\Rohit\AppData\Local\Android\sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 26.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[√] Connected devices (1 available)
• ONEPLUS A5010 • f0f79579 • android-arm64 • Android 8.1.0 (API 27)
• No issues found!"><pre class="notranslate"><code class="notranslate">[√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 10.0.17134.345], locale en-IN)
• Flutter version 0.9.4 at C:\flutter
• Framework revision f37c235c32 (2 weeks ago), 2018-09-25 17:45:40 -0400
• Engine revision 74625aed32
• Dart version 2.1.0-dev.5.0.flutter-a2eb050044
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at C:\Users\Rohit\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = C:\Users\Rohit\AppData\Local\Android\sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 26.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[√] Connected devices (1 available)
• ONEPLUS A5010 • f0f79579 • android-arm64 • Android 8.1.0 (API 27)
• No issues found!
</code></pre></div> | 0 |
<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>6.0.0</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Windows 7 Professional 32 bit</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>5.0.8</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">The app must run without crash</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">App crashes</p>
<h3 dir="auto">To Reproducee</h3>
<p dir="auto">Build the application for Windows platform with arch type as ia32</p>
<h3 dir="auto">Sample repo based out of electron activity-monitor</h3>
<p dir="auto"><a href="https://github.com/giridharkannan/simple-samples">https://github.com/giridharkannan/simple-samples</a></p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="git clone https://github.com/giridharkannan/simple-samples.git
cd simple-samples/activity-monitor/
npm install
npm run deploy
cd dist"><pre class="notranslate">git clone https://github.com/giridharkannan/simple-samples.git
<span class="pl-c1">cd</span> simple-samples/activity-monitor/
npm install
npm run deploy
<span class="pl-c1">cd</span> dist</pre></div>
<p dir="auto">Use the generated activity-monitor_1.0.0.exe to reproduce the issue</p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">You need 32bit OS or VM to reporduce the issue as we would not face problem in creating the exe nor in installing it. The app would just have a blank black screen</p> | <h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li>**Electron Version: 6.0.0
<ul dir="auto">
<li>
</li>
</ul>
</li>
<li>**Operating System: Windows 7 32bit
<ul dir="auto">
<li>
</li>
</ul>
</li>
<li>**Last Known Working Electron version: 5.0.8
<ul dir="auto">
<li>
</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">can start on win7</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">can not start</p>
<h3 dir="auto">To Reproduce</h3>
<ul dir="auto">
<li><a href="https://github.com/electron/electron-quick-start">https://github.com/electron/electron-quick-start</a></li>
<li>edit package.json electron version to 6.0.0</li>
<li>npm start</li>
<li>can not start electron</li>
</ul>
<h3 dir="auto">Screenshots</h3>
<h3 dir="auto">Additional Information</h3> | 1 |
<p dir="auto">Hi,</p>
<p dir="auto">Whenever I try to import scipy I get this error regarding 'Type'.</p>
<p dir="auto">I am using Python 3.5.1</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import scipy"><pre class="notranslate"><code class="notranslate">import scipy
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "/Users/ashkij/Downloads/asd.py", line 1, in <module>
import scipy
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/__init__.py", line 156, in <module>
from . import fft
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/fft/__init__.py", line 76, in <module>
from ._basic import (
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/fft/_basic.py", line 1, in <module>
from scipy._lib.uarray import generate_multimethod, Dispatchable
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/_lib/uarray.py", line 27, in <module>
from ._uarray import *
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/_lib/_uarray/__init__.py", line 114, in <module>
from ._backend import *
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/_lib/_uarray/_backend.py", line 1, in <module>
from typing import (
ImportError: cannot import name 'Type'
[Finished in 0.4s with exit code 1]
[cmd: ['python3', '-u', '/Users/ashkij/Downloads/asd.py']]
[dir: /Users/ashkij/Downloads]
[path: /usr/bin:/bin:/usr/sbin:/sbin]"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "/Users/ashkij/Downloads/asd.py", line 1, in <module>
import scipy
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/__init__.py", line 156, in <module>
from . import fft
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/fft/__init__.py", line 76, in <module>
from ._basic import (
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/fft/_basic.py", line 1, in <module>
from scipy._lib.uarray import generate_multimethod, Dispatchable
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/_lib/uarray.py", line 27, in <module>
from ._uarray import *
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/_lib/_uarray/__init__.py", line 114, in <module>
from ._backend import *
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scipy/_lib/_uarray/_backend.py", line 1, in <module>
from typing import (
ImportError: cannot import name 'Type'
[Finished in 0.4s with exit code 1]
[cmd: ['python3', '-u', '/Users/ashkij/Downloads/asd.py']]
[dir: /Users/ashkij/Downloads]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
</code></pre></div> | <p dir="auto">Import of scipy fails with an import error:</p>
<p dir="auto">'>>> import scipy<br>
Traceback (most recent call last):<br>
File "<pyshell#1>", line 1, in <br>
import scipy<br>
File "C:\Users\user\pyvenvs\lmfit-test\lib\site-packages\scipy_<em>init</em>_.py", line 156, in <br>
from . import fft<br>
File "C:\Users\user\pyvenvs\lmfit-test\lib\site-packages\scipy\fft_<em>init</em>_.py", line 76, in <br>
from ._basic import (<br>
File "C:\Users\user\pyvenvs\lmfit-test\lib\site-packages\scipy\fft_basic.py", line 1, in <br>
from scipy._lib.uarray import generate_multimethod, Dispatchable<br>
File "C:\Users\user\pyvenvs\lmfit-test\lib\site-packages\scipy_lib\uarray.py", line 27, in <br>
from .<em>uarray import *<br>
File "C:\Users\user\pyvenvs\lmfit-test\lib\site-packages\scipy_lib_uarray_<em>init</em></em>.py", line 114, in <br>
from ._backend import *<br>
File "C:\Users\user\pyvenvs\lmfit-test\lib\site-packages\scipy_lib_uarray_backend.py", line 1, in <br>
from typing import (<br>
ImportError: cannot import name 'Type'</p>
<p dir="auto">This is (probably) caused by changes in the typing module in the early Python 3.5 development - some relevant parts were added after 3.5.1<br>
I saw that on master, declared compatibility is >= Python 3.6<br>
But on tag 1.4.1, it states >= 3.5, so it should still be working.<br>
From another issue, i think i understood uarray is a vendored dependency.</p> | 1 |
<h2 dir="auto">Exception:</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="...
File "inception/slim/variables.py", line 290, in variable
trainable=trainable, collections=collections)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 1024, in get_variable
custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 850, in get_variable
custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 346, in get_variable
validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 331, in _true_getter
caching_device=caching_device, validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 677, in _get_single_variable
expected_shape=shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 224, in __init__
expected_shape=expected_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 327, in _init_from_args
initial_value(), name="initial_value", dtype=dtype)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 665, in <lambda>
shape.as_list(), dtype=dtype, partition_info=partition_info)
TypeError: ones_initializer() got multiple values for keyword argument 'dtype'"><pre class="notranslate"><code class="notranslate">...
File "inception/slim/variables.py", line 290, in variable
trainable=trainable, collections=collections)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 1024, in get_variable
custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 850, in get_variable
custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 346, in get_variable
validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 331, in _true_getter
caching_device=caching_device, validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 677, in _get_single_variable
expected_shape=shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 224, in __init__
expected_shape=expected_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 327, in _init_from_args
initial_value(), name="initial_value", dtype=dtype)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 665, in <lambda>
shape.as_list(), dtype=dtype, partition_info=partition_info)
TypeError: ones_initializer() got multiple values for keyword argument 'dtype'
</code></pre></div>
<p dir="auto">I think recently changes of tensorflow.python.init_ops influence to this issue.</p>
<h2 dir="auto"><a href="https://github.com/tensorflow/tensorflow/commit/cfb2280d3f6ced298681bd1141479a59a06abde8">init_ops.py</a></h2>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="< def ones_initializer(dtype=dtypes.float32, partition_info=None):
---
> def ones_initializer(shape, dtype=dtypes.float32, partition_info=None):"><pre class="notranslate"><span class="pl-md"><span class="pl-md"><</span> def ones_initializer(dtype=dtypes.float32, partition_info=None):</span>
<span class="pl-ms">---</span>
<span class="pl-mi1"><span class="pl-mi1">></span> def ones_initializer(shape, dtype=dtypes.float32, partition_info=None):</span></pre></div>
<h2 dir="auto"><a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/ops/variable_scope.py#L665">variable_scope.py</a></h2>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" 655 # Create the tensor to initialize the variable.
656 if initializer is None:
657 initializer = init_ops.uniform_unit_scaling_initializer()
658 # Clear control dependencies while creating the initializer.
659 with ops.control_dependencies(None):
660 if initializing_from_value:
661 init_val = initializer
662 variable_dtype = None
663 else:
664 init_val = lambda: initializer(
665 shape.as_list(), dtype=dtype, partition_info=partition_info)
666 variable_dtype = dtype.base_dtype"><pre class="notranslate"> <span class="pl-c1">655</span> <span class="pl-c"># Create the tensor to initialize the variable.</span>
<span class="pl-c1">656</span> <span class="pl-k">if</span> <span class="pl-s1">initializer</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>:
<span class="pl-c1">657</span> <span class="pl-s1">initializer</span> <span class="pl-c1">=</span> <span class="pl-s1">init_ops</span>.<span class="pl-en">uniform_unit_scaling_initializer</span>()
<span class="pl-c1">658</span> <span class="pl-c"># Clear control dependencies while creating the initializer.</span>
<span class="pl-c1">659</span> <span class="pl-k">with</span> <span class="pl-s1">ops</span>.<span class="pl-en">control_dependencies</span>(<span class="pl-c1">None</span>):
<span class="pl-c1">660</span> <span class="pl-k">if</span> <span class="pl-s1">initializing_from_value</span>:
<span class="pl-c1">661</span> <span class="pl-s1">init_val</span> <span class="pl-c1">=</span> <span class="pl-s1">initializer</span>
<span class="pl-c1">662</span> <span class="pl-s1">variable_dtype</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span>
<span class="pl-c1">663</span> <span class="pl-k">else</span>:
<span class="pl-c1">664</span> <span class="pl-s1">init_val</span> <span class="pl-c1">=</span> <span class="pl-k">lambda</span>: <span class="pl-en">initializer</span>(
<span class="pl-c1">665</span> <span class="pl-s1">shape</span>.<span class="pl-en">as_list</span>(), <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">dtype</span>, <span class="pl-s1">partition_info</span><span class="pl-c1">=</span><span class="pl-s1">partition_info</span>)
<span class="pl-c1">666</span> <span class="pl-s1">variable_dtype</span> <span class="pl-c1">=</span> <span class="pl-s1">dtype</span>.<span class="pl-s1">base_dtype</span></pre></div>
<p dir="auto"><code class="notranslate">lambda:initiallizer</code> calls with three parameters. So, parameter missmatch occured.</p>
<p dir="auto">I think it needs to change <code class="notranslate">variable_scope.py</code> source code.</p> | <p dir="auto">I'm using TensorFlow on Windows Server 2012, TensorFlow version is 0.12.1<br>
I've install CUDA (CUDA Version 8.0.44), and install cuDnn (cuDNN v5.1 (August 10, 2016), for CUDA 8.0).</p>
<p dir="auto">that cuDnn is build for windows 10.</p>
<p dir="auto">But when I run my tensorflow code is get some error about:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="am_executor\cuda\cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_IN
TERNAL_ERROR
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stre
am_executor\cuda\cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_B
AD_PARAM
F c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core
\kernels\conv_ops.cc:532] Check failed: stream->parent()->GetConvolveAlgorithms(
&algorithms)"><pre class="notranslate"><code class="notranslate">am_executor\cuda\cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_IN
TERNAL_ERROR
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stre
am_executor\cuda\cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_B
AD_PARAM
F c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core
\kernels\conv_ops.cc:532] Check failed: stream->parent()->GetConvolveAlgorithms(
&algorithms)
</code></pre></div>
<p dir="auto">It seems the cuDNN version is not correct, but I tried cuDNN v5.0, also got this exception.</p>
<p dir="auto">does anyone know how to fix this issue?<br>
Thanks very much.</p> | 0 |
<p dir="auto">As pointed out on a <a href="https://github.com/denoland/deno_install/issues/181" data-hovercard-type="issue" data-hovercard-url="/denoland/deno_install/issues/181/hovercard">deno_install/#181</a> thread, there seems to have some issues on running Deno 1.8.0 on Windows 7, which is not a problem on Ubuntu 20.04 LTS, ElementaryOS 5.1 Hera or PopOS 20.10, which run fine. As pointed out earlier, there seems to be an issue with the WebGPU API on Win7, which seems to require some kind of Direct3D DLL on the 1.8.0 version, which was not an issue on 1.7.5. I know Windows 7 is end-of-life, and I don't know if there should be a fix for this issue or not, but as a Deno teacher, some of my students use Windows 7 or even Vista to this day, and knowing if the Deno runtime is supposed to run on their systems end up being an important issue because of that.</p>
<p dir="auto">Here is what happens when running Deno 1.8.0 on Windows 7:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/32345702/110214871-71354a00-7e85-11eb-84f7-bab3a3b3d57f.png"><img src="https://user-images.githubusercontent.com/32345702/110214871-71354a00-7e85-11eb-84f7-bab3a3b3d57f.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">And here is what happens when running Deno 1.7.5 on Windows 7 (works fine):</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/32345702/110214889-87dba100-7e85-11eb-98f0-bf6e95988e82.png"><img src="https://user-images.githubusercontent.com/32345702/110214889-87dba100-7e85-11eb-98f0-bf6e95988e82.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Thanks for reading and sorry for bringing an issue on an end-of-life, closed-source operating system.</p> | <p dir="auto">Hello today I tried to update deno from 1.7.0 to the latest version with the <code class="notranslate">deno update</code> command. However it was unable to update and threw an error of System.IO.Compression.FileSystem . The operating system I am using is Windows 7 SP1. Here is the complete log of the error</p>
<div class="highlight highlight-source-batchfile notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Looking up latest version
Found latest version 1.7.5
Checking https://github.com/denoland/deno/releases/download/v1.7.5/deno-x86_64-p
c-windows-msvc.zip
Download has been found
Deno is upgrading to version 1.7.5
Add-Type : Cannot add type. The assembly 'System.IO.Compression.FileSystem' cou
ld not be found.
At line:4 char:21
+ Add-Type <<<< -AssemblyName System.IO.Compression.FileSystem
+ CategoryInfo : ObjectNotFound: (System.IO.Compression.FileSyste
m:String) [Add-Type], Exception
+ FullyQualifiedErrorId : ASSEMBLY_NOT_FOUND,Microsoft.PowerShell.Commands
.AddTypeCommand
System.InvalidOperationException: Cannot add type. One or more required assembli
es are missing.
at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(Error
Record errorRecord)
thread 'main' panicked at 'assertion failed: unpack_status.success()', cli\tools
\upgrade.rs:230:3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
"><pre class="notranslate">Looking up latest version
Found latest version 1.7.5
Checking https://github.com/denoland/deno/releases/download/v1.7.5/deno-x86_64-p
c-windows-msvc.zip
Download has been found
Deno is upgrading to version 1.7.5
Add-Type : Cannot add type. The assembly 'System.IO.Compression.FileSystem' cou
ld <span class="pl-k">not</span> be found.
<span class="pl-k">At</span> line:4 char:21
+ Add-Type <span class="pl-k"><<<<</span> -AssemblyName System.IO.Compression.FileSystem
+ CategoryInfo : ObjectNotFound: (System.IO.Compression.FileSyste
m:String) [Add-Type], Exception
+ FullyQualifiedErrorId : ASSEMBLY_NOT_FOUND,Microsoft.PowerShell.Commands
.AddTypeCommand
System.InvalidOperationException: Cannot add type. One or <span class="pl-k">more</span> required assembli
es are missing.
<span class="pl-k">at</span> System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(Error
Record errorRecord)
thread 'main' panicked <span class="pl-k">at</span> 'assertion failed: unpack_status.success()', cli\tools
\upgrade.rs:230:3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
</pre></div> | 1 |
<ul dir="auto">
<li>Electron version: 1.6.1</li>
<li>Operating system: MacOS</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Show the page loaded by the webview;</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">the webview must reload the page to show its contents.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Setting CSS property visibility as hidden and then set visibility as visible on 'did stop loading' event does not show the webpage content. Just a blank page, although is possible to inspect the webview host contents. I'm setting this property adding and removing a class name in my webview tag. That was working on 1.4.15. Now it only does not work on Mac Os.</p>
<p dir="auto">Inspecting the webview I can see that the class was added and the property visibility is set as 'visible'.</p>
<p dir="auto">.webBrowser {<br>
position: relative;<br>
width: 100%;<br>
height: 100%;<br>
overflow: hidden;<br>
visibility: hidden;<br>
display: inline-flex;<br>
z-index: 1001;<br>
min-width: 450px;<br>
min-height: 420px;<br>
user-select: auto;<br>
}<br>
.webBrowser.loaded<br>
{<br>
visibility: visible;<br>
}</p> | <p dir="auto">In the repro case below, the webview is initially created with <code class="notranslate">visibility: hidden</code>. After a short delay, we switch to <code class="notranslate">visibility: visible</code>. The expected behaviour is that github.com is displayed in the webview regardless of the timeout duration.</p>
<p dir="auto">Due to some regression in Electron 1.5.0, this results in the webview being permanently empty. Weirdly enough it works fine when using a short timeout (<20) on my macOS system.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto"><strong>index.js</strong>:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="'use strict';
const {app, BrowserWindow} = require('electron');
const path = require('path');
app.on('ready', () => {
const win = new BrowserWindow({
width: 500,
height: 500,
webPreferences: {
nodeIntegration: true
},
});
win.loadURL('file://' + path.join(__dirname, 'test.html'))
});"><pre class="notranslate"><span class="pl-s">'use strict'</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span>app<span class="pl-kos">,</span> BrowserWindow<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">path</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'path'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'ready'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">win</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">width</span>: <span class="pl-c1">500</span><span class="pl-kos">,</span>
<span class="pl-c1">height</span>: <span class="pl-c1">500</span><span class="pl-kos">,</span>
<span class="pl-c1">webPreferences</span>: <span class="pl-kos">{</span>
<span class="pl-c1">nodeIntegration</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-s1">win</span><span class="pl-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span><span class="pl-s">'file://'</span> <span class="pl-c1">+</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-s1">__dirname</span><span class="pl-kos">,</span> <span class="pl-s">'test.html'</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.html</strong>:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<!DOCTYPE html>
<html>
<style>
html, body, webview {
position: fixed;
margin: 0;
width: 100%;
height: 100%;
}
.hidden {
visibility: hidden;
}
</style>
<body>
<webview id="webview" class="hidden" src="https://github.com"></webview>
</body>
<script>
setTimeout(() => {
const webview = document.getElementById('webview');
webview.style.visibility = 'visible';
}, 5000);
</script>
</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">style</span><span class="pl-kos">></span>
<span class="pl-ent">html</span><span class="pl-kos">,</span> <span class="pl-ent">body</span><span class="pl-kos">,</span> <span class="pl-ent">webview</span> {
<span class="pl-c1">position</span><span class="pl-kos">:</span> fixed;
<span class="pl-c1">margin</span><span class="pl-kos">:</span> <span class="pl-c1">0</span>;
<span class="pl-c1">width</span><span class="pl-kos">:</span> <span class="pl-c1">100<span class="pl-smi">%</span></span>;
<span class="pl-c1">height</span><span class="pl-kos">:</span> <span class="pl-c1">100<span class="pl-smi">%</span></span>;
}
.<span class="pl-c1">hidden</span> {
<span class="pl-c1">visibility</span><span class="pl-kos">:</span> hidden;
}
<span class="pl-kos"></</span><span class="pl-ent">style</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">webview</span> <span class="pl-c1">id</span>="<span class="pl-s">webview</span>" <span class="pl-c1">class</span>="<span class="pl-s">hidden</span>" <span class="pl-c1">src</span>="<span class="pl-s">https://github.com</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">webview</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-kos">></span>
<span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">webview</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">'webview'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">webview</span><span class="pl-kos">.</span><span class="pl-c1">style</span><span class="pl-kos">.</span><span class="pl-c1">visibility</span> <span class="pl-c1">=</span> <span class="pl-s">'visible'</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">5000</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">html</span><span class="pl-kos">></span></pre></div> | 1 |
<h3 dir="auto">Version</h3>
<p dir="auto">2.6.11</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://jsbin.com/zoniwudugo/edit?html,console,output" rel="nofollow">https://jsbin.com/zoniwudugo/edit?html,console,output</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Attempt to instantiate an instance of Vue with a template where one of the bound props has no value.</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">Given that the template fails to compile in any usable way whatsoever, I'd expect an error to be thrown so that it can be caught and sent to an error monitoring service.</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">Warnings are turned off in Vue production mode, so there is no warning logged anywhere. Also, an error/exception is not thrown. Any HTML wrapped in the div registered for Vue is not rendered.</p>
<hr>
<p dir="auto">Our product is a Django app with mostly server rendered views. We're currently adding in some Vue components as we slowly migrate over to a SPA. As such, we ran ran in to this issue when some of our Django template code was incorrectly building a Vue component. Then when Vue tried to instantiate on the frontend, it was erring trying to compile the component template.</p> | <h3 dir="auto">Version</h3>
<p dir="auto">2.6.11</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codesandbox.io/s/prod-http-o0x6q?file=/src/App.vue" rel="nofollow">https://codesandbox.io/s/prod-http-o0x6q?file=/src/App.vue</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">If I assign a value to a property that is not defined in advance before using the Vue.set, then this property is not responsive.<br>
f I delete the code of "assigning the value", then it works.</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">The value I set is not shown in the html.</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">The value I set is shown in the html.</p> | 0 |
<h1 dir="auto">Feature request</h1>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<p dir="auto">There are directories in "pages" whose contents should all have the same layout. For example, an "articles" directory might have articles written in .mdx, which compile to react elements. It would be very useful for all the .mdx files under "articles" to have the same layout and shared logic.</p>
<h2 dir="auto">Describe the solution you'd like</h2>
<p dir="auto">Ideally, one could create an _app.js file for each directory. All files in that directory would use that _app.js. Files in other directories with no custom app would use pages/_app.js if that file exists.</p>
<h2 dir="auto">Describe alternatives you've considered</h2>
<p dir="auto">All the alternatives I've thought of seem to have the same problem, that the routing information needs to be written in code somewhere, in addition to next inferring that from the filesystem, which is redundant. For example, you could just have a single pages/_app.js and some logic in there to figure out which layouts to add to what. This makes it required to write out your routes in the _app.js file. It's basically a router inside a router, so it's not the best solution.</p>
<p dir="auto">Another alternative is to keep the .mdx files (or react components) somewhere outside of "pages", and import them in pages/articles.jsx for example. Then, essentially implement a router that shows the proper component depending on the route. Again, you're basically implementing a router within a router.</p>
<h2 dir="auto">Additional context</h2>
<p dir="auto">I'm new to next, so if there's something obvious I'm missing, I apologize.</p> | <p dir="auto"><strong>Edit July 2021:</strong> The layouts example has been updated to persist state across page transitions: <a href="https://github.com/vercel/next.js/tree/canary/examples/layout-component">https://github.com/vercel/next.js/tree/canary/examples/layout-component</a></p> | 1 |
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">When creating a polygon with constructPathShape.toShapes the order of the constructpathshapes commands plays a role which shouldn't be the case. (I think so)<br>
I am adding a hole than the outer vertice then again a hole.<br>
The last hole is not recognized.<br>
<a href="https://jsfiddle.net/0g9bdar5/2/" rel="nofollow">https://jsfiddle.net/0g9bdar5/2/</a></p>
<p dir="auto">The only thing which was changed is the order of the constructpathshape commands.<br>
If I add the two holes at the beginning the polygon is rendered correctly.<br>
<a href="https://jsfiddle.net/0g9bdar5/3/" rel="nofollow">https://jsfiddle.net/0g9bdar5/3/</a></p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> latest</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>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> | <p dir="auto">Adding this to the WebGlRenderer seems to work. It means it is not duplicating a second Frustrum instance and projection matrix.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this.isVisible = function(target) {
console.log("visible", _frustum.intersectsObject( target ));
};"><pre class="notranslate"><code class="notranslate">this.isVisible = function(target) {
console.log("visible", _frustum.intersectsObject( target ));
};
</code></pre></div>
<p dir="auto">Is this possible ?</p>
<p dir="auto">There is an issue with Samsung Internet browser on android. it cannot detect visibility where Chrome works.</p> | 0 |
<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">Programmatic API (<code class="notranslate">babel.transform</code>, <code class="notranslate">babel.parse</code>)</p>
<h3 dir="auto">Input code</h3>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="maxHeight! < 1"><pre class="notranslate"><span class="pl-s1">maxHeight</span><span class="pl-c1">!</span> <span class="pl-c1"><</span> <span class="pl-c1">1</span></pre></div>
<h3 dir="auto">Configuration file name</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Configuration</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Current and expected behavior</h3>
<p dir="auto">Should transform to</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="maxHeight < 1;"><pre class="notranslate"><span class="pl-s1">maxHeight</span> <span class="pl-c1"><</span> <span class="pl-c1">1</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Omit typescript's <code class="notranslate">!</code></p>
<h3 dir="auto">Environment</h3>
<p dir="auto">Babel v7.14.5<br>
@babel/preset-typescript: 7.14.5 => 7.14.5<br>
@babel/preset-react: 7.14.5 => 7.14.5<br>
Node 14</p>
<h3 dir="auto">Possible solution</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><a href="https://babeljs.io/repl#?browsers=defaults%2C%20not%20ie%2011%2C%20not%20ie_mob%2011&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=LYQwHgEgpglg5gCwC4EIAEAeNBGIA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env%2Creact%2Ctypescript&prettier=false&targets=&version=7.14.5&externalPlugins=" rel="nofollow">https://babeljs.io/repl#?browsers=defaults%2C%20not%20ie%2011%2C%20not%20ie_mob%2011&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=LYQwHgEgpglg5gCwC4EIAEAeNBGIA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env%2Creact%2Ctypescript&prettier=false&targets=&version=7.14.5&externalPlugins=</a></p>
<p dir="auto">This bug reproduces only with <code class="notranslate">react</code> + <code class="notranslate">typescript</code> presets.</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">babel-loader (webpack)</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="some.value! < another.value!"><pre class="notranslate"><span class="pl-s1">some</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-c1">!</span> <span class="pl-c1"><</span> <span class="pl-s1">another</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-c1">!</span></pre></div>
<h3 dir="auto">Configuration file name</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Configuration</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Current and expected behavior</h3>
<p dir="auto">I'm getting "SyntaxError: Missing semicolon." in version 7.14.5, but it was working fine in 7.14.4.</p>
<h3 dir="auto">Environment</h3>
<p dir="auto">@babel/parser version 7.14.5</p>
<h3 dir="auto">Possible solution</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context</h3>
<p dir="auto">The typescript compiler is not complaining.</p> | 1 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/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.8-SNAPSHOT</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>Do not start zookeeper server, which is used as a metadata center</li>
<li>start a provider</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">The app exit normally</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">The app exit with a NPE</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread "DubboShutdownHook" java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.dubbo.common.function.ThrowableAction.execute(ThrowableAction.java:48)
at org.apache.dubbo.common.lang.ShutdownHookCallbacks.lambda$callback$0(ShutdownHookCallbacks.java:70)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.apache.dubbo.common.lang.ShutdownHookCallbacks.callback(ShutdownHookCallbacks.java:70)
at org.apache.dubbo.config.DubboShutdownHook.callback(DubboShutdownHook.java:85)
at org.apache.dubbo.config.DubboShutdownHook.run(DubboShutdownHook.java:73)
Caused by: java.lang.NullPointerException
at org.apache.dubbo.config.bootstrap.DubboBootstrap.unexportMetadataService(DubboBootstrap.java:1009)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.destroy(DubboBootstrap.java:1188)
at org.apache.dubbo.config.bootstrap.DubboBootstrap$1.callback(DubboBootstrap.java:198)
at org.apache.dubbo.common.function.ThrowableAction.execute(ThrowableAction.java:46)
... 5 more"><pre class="notranslate"><code class="notranslate">Exception in thread "DubboShutdownHook" java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.dubbo.common.function.ThrowableAction.execute(ThrowableAction.java:48)
at org.apache.dubbo.common.lang.ShutdownHookCallbacks.lambda$callback$0(ShutdownHookCallbacks.java:70)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.apache.dubbo.common.lang.ShutdownHookCallbacks.callback(ShutdownHookCallbacks.java:70)
at org.apache.dubbo.config.DubboShutdownHook.callback(DubboShutdownHook.java:85)
at org.apache.dubbo.config.DubboShutdownHook.run(DubboShutdownHook.java:73)
Caused by: java.lang.NullPointerException
at org.apache.dubbo.config.bootstrap.DubboBootstrap.unexportMetadataService(DubboBootstrap.java:1009)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.destroy(DubboBootstrap.java:1188)
at org.apache.dubbo.config.bootstrap.DubboBootstrap$1.callback(DubboBootstrap.java:198)
at org.apache.dubbo.common.function.ThrowableAction.execute(ThrowableAction.java:46)
... 5 more
</code></pre></div> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: v2.7.3</li>
<li>Operating System version: OSX</li>
<li>Java version: javac 1.8.0_202</li>
<li>Kotlin version: 1.3.40</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<div class="highlight highlight-source-kotlin notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="data class Data(var list: MutableList<CustomizeDateTime> = mutableListOf()) : Serializable {}
// Get the correct result when time has no default value or is null
// CustomizeDateTime(var time: LocalTime) or CustomizeDateTime(var time: LocalTime? = null)
data class CustomizeDateTime(var time: LocalTime = LocalTime.parse("12:00:00")) : Serializable {}
private var byteArrayOutputStream: ByteArrayOutputStream? = null
private var protostuffObjectOutput: ProtostuffObjectOutput? = null
private var protostuffObjectInput: ProtostuffObjectInput? = null
private var byteArrayInputStream: ByteArrayInputStream? = null
@Throws(IOException::class)
private fun flushToInput() {
this.protostuffObjectOutput?.flushBuffer()
this.byteArrayInputStream = ByteArrayInputStream(byteArrayOutputStream?.toByteArray())
this.protostuffObjectInput = ProtostuffObjectInput(byteArrayInputStream)
}
@Before
@Throws(Exception::class)
fun setUp() {
this.byteArrayOutputStream = ByteArrayOutputStream()
this.protostuffObjectOutput = ProtostuffObjectOutput(byteArrayOutputStream)
}
@Test
fun `Test List LocalTime`() {
val times = mutableListOf(
CustomizeDateTime(LocalTime.parse("08:00:00")),
CustomizeDateTime(LocalTime.parse("12:00:00")),
CustomizeDateTime(LocalTime.parse("19:01:10")))
val data = Data(times)
this.protostuffObjectOutput?.writeObject(data)
this.flushToInput()
val serializedTime = protostuffObjectInput?.readObject()
println(serializedTime)
}"><pre class="notranslate"><span class="pl-k">data class</span> <span class="pl-en">Data</span>(<span class="pl-k">var</span> <span class="pl-smi">list</span><span class="pl-k">:</span> <span class="pl-en">MutableList</span><<span class="pl-en">CustomizeDateTime</span>> = mutableListOf()) : Serializable {}
<span class="pl-c"><span class="pl-c">//</span> Get the correct result when time has no default value or is null</span>
<span class="pl-c"><span class="pl-c">//</span> CustomizeDateTime(var time: LocalTime) or CustomizeDateTime(var time: LocalTime? = null)</span>
<span class="pl-k">data class</span> <span class="pl-en">CustomizeDateTime</span>(<span class="pl-k">var</span> <span class="pl-smi">time</span><span class="pl-k">:</span> <span class="pl-en">LocalTime</span> = <span class="pl-en">LocalTime</span>.parse("12:00:00")) : Serializable {}
<span class="pl-k">private</span> <span class="pl-k">var</span> byteArrayOutputStream<span class="pl-k">:</span> <span class="pl-en">ByteArrayOutputStream</span><span class="pl-k">?</span> <span class="pl-k">=</span> <span class="pl-c1">null</span>
<span class="pl-k">private</span> <span class="pl-k">var</span> protostuffObjectOutput<span class="pl-k">:</span> <span class="pl-en">ProtostuffObjectOutput</span><span class="pl-k">?</span> <span class="pl-k">=</span> <span class="pl-c1">null</span>
<span class="pl-k">private</span> <span class="pl-k">var</span> protostuffObjectInput<span class="pl-k">:</span> <span class="pl-en">ProtostuffObjectInput</span><span class="pl-k">?</span> <span class="pl-k">=</span> <span class="pl-c1">null</span>
<span class="pl-k">private</span> <span class="pl-k">var</span> byteArrayInputStream<span class="pl-k">:</span> <span class="pl-en">ByteArrayInputStream</span><span class="pl-k">?</span> <span class="pl-k">=</span> <span class="pl-c1">null</span>
@Throws(<span class="pl-en">IOException</span>::<span class="pl-c1">class</span>)
<span class="pl-k">private</span> <span class="pl-k">fun</span> <span class="pl-en">flushToInput</span>() {
<span class="pl-c1">this</span>.protostuffObjectOutput?.flushBuffer()
<span class="pl-c1">this</span>.byteArrayInputStream <span class="pl-k">=</span> <span class="pl-en">ByteArrayInputStream</span>(byteArrayOutputStream?.toByteArray())
<span class="pl-c1">this</span>.protostuffObjectInput <span class="pl-k">=</span> <span class="pl-en">ProtostuffObjectInput</span>(byteArrayInputStream)
}
@Before
@Throws(<span class="pl-en">Exception</span>::<span class="pl-c1">class</span>)
<span class="pl-k">fun</span> <span class="pl-en">setUp</span>() {
<span class="pl-c1">this</span>.byteArrayOutputStream <span class="pl-k">=</span> <span class="pl-en">ByteArrayOutputStream</span>()
<span class="pl-c1">this</span>.protostuffObjectOutput <span class="pl-k">=</span> <span class="pl-en">ProtostuffObjectOutput</span>(byteArrayOutputStream)
}
@Test
<span class="pl-k">fun</span> <span class="pl-en"><span class="pl-s">`Test List LocalTime`</span></span>() {
<span class="pl-k">val</span> times <span class="pl-k">=</span> <span class="pl-c1">mutableListOf</span>(
<span class="pl-en">CustomizeDateTime</span>(<span class="pl-en">LocalTime</span>.parse(<span class="pl-s"><span class="pl-pds">"</span>08:00:00<span class="pl-pds">"</span></span>)),
<span class="pl-en">CustomizeDateTime</span>(<span class="pl-en">LocalTime</span>.parse(<span class="pl-s"><span class="pl-pds">"</span>12:00:00<span class="pl-pds">"</span></span>)),
<span class="pl-en">CustomizeDateTime</span>(<span class="pl-en">LocalTime</span>.parse(<span class="pl-s"><span class="pl-pds">"</span>19:01:10<span class="pl-pds">"</span></span>)))
<span class="pl-k">val</span> data <span class="pl-k">=</span> <span class="pl-en">Data</span>(times)
<span class="pl-c1">this</span>.protostuffObjectOutput?.writeObject(data)
<span class="pl-c1">this</span>.flushToInput()
<span class="pl-k">val</span> serializedTime <span class="pl-k">=</span> protostuffObjectInput?.readObject()
<span class="pl-c1">println</span>(serializedTime)
}</pre></div>
<h3 dir="auto">Expected Result</h3>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Data(list=[CustomizeDateTime(time=08:00), CustomizeDateTime(time=12:00), CustomizeDateTime(time=19:01:10)])"><pre class="notranslate"><span class="pl-en">Data</span>(<span class="pl-s1">list</span>=[<span class="pl-en">CustomizeDateTime</span>(<span class="pl-s1">time</span>=<span class="pl-c1">08</span>:<span class="pl-c1">00</span>), <span class="pl-en">CustomizeDateTime</span>(<span class="pl-s1">time</span>=<span class="pl-c1">12</span>:<span class="pl-c1">00</span>), <span class="pl-en">CustomizeDateTime</span>(<span class="pl-s1">time</span>=<span class="pl-c1">19</span>:<span class="pl-c1">01</span>:<span class="pl-c1">10</span>)])</pre></div>
<h3 dir="auto">Actual Result</h3>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Data(list=[CustomizeDateTime(time=19:01:10), CustomizeDateTime(time=19:01:10), CustomizeDateTime(time=19:01:10)])"><pre class="notranslate"><span class="pl-en">Data</span>(<span class="pl-s1">list</span>=[<span class="pl-en">CustomizeDateTime</span>(<span class="pl-s1">time</span>=<span class="pl-c1">19</span>:<span class="pl-c1">01</span>:<span class="pl-c1">10</span>), <span class="pl-en">CustomizeDateTime</span>(<span class="pl-s1">time</span>=<span class="pl-c1">19</span>:<span class="pl-c1">01</span>:<span class="pl-c1">10</span>), <span class="pl-en">CustomizeDateTime</span>(<span class="pl-s1">time</span>=<span class="pl-c1">19</span>:<span class="pl-c1">01</span>:<span class="pl-c1">10</span>)])</pre></div>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | 0 |
<p dir="auto">Hi @bschussek</p>
<p dir="auto">I'm having an issue since I've updated my code to Symfony v2.3.1, I have an embed form defined as virtual and neither <code class="notranslate">FormEvents::PRE_SET_DATA</code> event nor <code class="notranslate">setData</code> method are called anymore.</p>
<p dir="auto">I wrote a test to be more explicit on the problem I have: <a href="https://gist.github.com/jeremyb/5764427">https://gist.github.com/jeremyb/5764427</a>. I ran this test on the Symfony 2.2 and 2.3 branches and I think there's a regression on <code class="notranslate">testVirtualAndEvents</code>.</p>
<table role="table">
<thead>
<tr>
<th>Test</th>
<th>2.2</th>
<th>2.3</th>
</tr>
</thead>
<tbody>
<tr>
<td>testVirtual</td>
<td>success</td>
<td>success</td>
</tr>
<tr>
<td>testVirtualWithCountry</td>
<td>fails</td>
<td>fails</td>
</tr>
<tr>
<td>testVirtualAndEvents</td>
<td>success</td>
<td>fails</td>
</tr>
</tbody>
</table>
<p dir="auto">I'm trying to understand the differences made on Form component between 2.2 and 2.3 and I see some PR that can be related to this issue:</p>
<ul dir="auto">
<li>I would have thought that PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="9705925" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/6573" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/6573/hovercard" href="https://github.com/symfony/symfony/pull/6573">#6573</a> fixes the <code class="notranslate">setData</code> call for virtual forms but it seems that it's not the case and the latest comment of <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Strate/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Strate">@Strate</a> confirms that ;</li>
<li>the PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13765895" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/7878" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/7878/hovercard" href="https://github.com/symfony/symfony/pull/7878">#7878</a> introduces the <code class="notranslate">auto_initialize</code> option, so the <code class="notranslate">setData</code> isn't called anymore on children if I understand it correctly?</li>
</ul>
<p dir="auto">So I think my problem comes from the fact that <code class="notranslate">setData</code> isn't called for virtual forms and because <code class="notranslate">auto_initialize</code> prevents initialization of children (according to this the exception <code class="notranslate">Automatic initialization is only supported on root forms.</code>), so without initialization and data the <code class="notranslate">FormEvents::PRE_SET_DATA</code> event isn't called anymore. Is this correct?</p>
<p dir="auto">I'm not sure whether it's a bug or an evolution of the Form component but is there a new way to do this kind of code and adapt the behavior of a virtual form from the data?</p>
<p dir="auto">Let me know if you want me to commit my <code class="notranslate">FormVirtualTest.php</code> test somewhere, I can do a PR to your symfony fork if you want.</p> | <p dir="auto">Probably in Symfony 2.4 I'm going to make a few changes to the form architecture to enforce a proper form lifecycle. A BC layer will be provided until Symfony 3.0.</p>
<p dir="auto">I'm writing this mainly as instructions to my future me, but anyone interested in the topic is invited to chime in :)</p>
<h4 dir="auto">Summary</h4>
<ul dir="auto">
<li><code class="notranslate">Form::setData()</code> will be deprecated in favor of <code class="notranslate">Form::initialize()</code></li>
<li><code class="notranslate">Form::initialize()</code> can only ever be called once (usually automatically by the form system) guaranteeing the best possible performance</li>
<li><code class="notranslate">Form::initialize()</code> is guaranteed to be called on every element in the form tree (including those with "inherit_data" set), ensuring that all <code class="notranslate">*_SET_DATA</code> events are fired on time</li>
<li>side effects from <code class="notranslate">Form::submit()</code>, <code class="notranslate">getData()</code>, <code class="notranslate">getNormData()</code> and <code class="notranslate">getViewData()</code> will be removed</li>
<li><code class="notranslate">DataMapperInterface</code> will be deprecated in favor of <code class="notranslate">DataMapper2Interface</code> (everybody cheer now ;) )</li>
</ul>
<h4 dir="auto">Question</h4>
<p dir="auto">After you read the text ( ;) ) please help me by answering the following question:</p>
<p dir="auto">Are there use cases where calling <code class="notranslate">Form::setData()</code> is absolutely necessary and cannot be changed so that the default data is set in one of the other ways demonstrated below (last code sample)?</p>
<h4 dir="auto">Motivation</h4>
<h5 dir="auto">Motivation 1: Dynamic Forms</h5>
<p dir="auto">The motivation behind are dynamic forms (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7759605" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/5807" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/5807/hovercard" href="https://github.com/symfony/symfony/issues/5807">#5807</a>). Dynamic forms rely on <code class="notranslate">setData()</code> being called in order to manipulate the form tree dynamically. This must be done before <code class="notranslate">get*Data()</code>, <code class="notranslate">submit()</code> or <code class="notranslate">createView()</code> are called, because these methods rely on the form tree being readily initialized.</p>
<h5 dir="auto">Motivation 2: *_SET_DATA events and "inherit_data"</h5>
<p dir="auto">Currently, forms with the "inherit_data" option set cannot have *_SET_DATA event listeners, because <code class="notranslate">setData()</code> is never called on these forms (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="15447789" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/8253" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/8253/hovercard" href="https://github.com/symfony/symfony/issues/8253">#8253</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="17388843" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/8607" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/8607/hovercard" href="https://github.com/symfony/symfony/issues/8607">#8607</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="18043823" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/8748" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/8748/hovercard" href="https://github.com/symfony/symfony/issues/8748">#8748</a>).</p>
<h5 dir="auto">Motivation 3: Performance</h5>
<p dir="auto">Depending on the number of nested forms and the number of event listeners, <code class="notranslate">setData()</code> can be a very expensive operation. The number of <code class="notranslate">setData()</code> calls were already reduced once in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/d4f4038f6daf7cf88ca7c7ab089473cce5ebf7d8/hovercard" href="https://github.com/symfony/symfony/commit/d4f4038f6daf7cf88ca7c7ab089473cce5ebf7d8"><tt>d4f4038</tt></a> by introducing deferred data initialization. It is still possible to call <code class="notranslate">setData()</code> more than once though. Guaranteeing a single <code class="notranslate">setData()</code> call would also guarantee an optimal performance.</p>
<h5 dir="auto">Motivation 4: Remove side effects</h5>
<p dir="auto">The result of deferred data initialization is that <code class="notranslate">getData()</code>, <code class="notranslate">getNormData()</code>, <code class="notranslate">getViewData()</code> and <code class="notranslate">submit()</code> now have side effects. I would like to remove those.</p>
<h5 dir="auto">Motivation 5: Inline data mapping code</h5>
<p dir="auto">Currently, when writing a custom data mapper, most of the code from PropertyPathMapper has to be duplicated. In fact, the only implementation-dependent lines are</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$form->setData($this->propertyAccessor->getValue($data, $propertyPath));"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">setData</span>(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">propertyAccessor</span>-><span class="pl-en">getValue</span>(<span class="pl-s1"><span class="pl-c1">$</span>data</span>, <span class="pl-s1"><span class="pl-c1">$</span>propertyPath</span>));</pre></div>
<p dir="auto">and</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$this->propertyAccessor->setValue($data, $propertyPath, $form->getData());"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">propertyAccessor</span>-><span class="pl-en">setValue</span>(<span class="pl-s1"><span class="pl-c1">$</span>data</span>, <span class="pl-s1"><span class="pl-c1">$</span>propertyPath</span>, <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">getData</span>());</pre></div>
<p dir="auto">Even worse, the other code in the data mappers is responsible for maintaining the correct lifecycle of the form. I would like to inline this critical code into <code class="notranslate">Form</code> and provide a new, more minimal data mapper interface.</p>
<h4 dir="auto">Proposed Lifecycle</h4>
<p dir="auto">The proposed form lifecycle will consist of four phases, which partially overlap.</p>
<p dir="auto"><em>Note in advance:</em> I'm talking about the existing low-level API here. Don't confuse it with the high-level API that you typically use in your controllers (types, options, etc.)</p>
<h5 dir="auto">Phase 1: Configuration</h5>
<p dir="auto">In this phase, form builders are created and configured.</p>
<p dir="auto">The phase is complete when a form builder is turned into a form by calling <code class="notranslate">getForm()</code>. At this point, the default data and other configuration of the form are frozen.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$builder = $factory->createBuilder()
->setData('default')
->setDisabled(true)
->setCompound(false)
// ..."><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>builder</span> = <span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">createBuilder</span>()
-><span class="pl-en">setData</span>(<span class="pl-s">'default'</span>)
-><span class="pl-en">setDisabled</span>(<span class="pl-c1">true</span>)
-><span class="pl-en">setCompound</span>(<span class="pl-c1">false</span>)
<span class="pl-c">// ...</span></pre></div>
<h5 dir="auto">Phase 2: Assembling</h5>
<p dir="auto">In this phase, the form tree is assembled by connecting the <code class="notranslate">Form</code> instances. Typically, this is done during <code class="notranslate">FormBuilder::getForm()</code>, but in dynamic forms you often need to call <code class="notranslate">Form::add()</code> and <code class="notranslate">Form::remove()</code> manually.</p>
<p dir="auto">This phase is never really complete. The form tree can be changed in the later phases to allow a dynamic modification of the form tree.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Configuration
$builder = $factory->createBuilder()
->add('name', 'text')
->add('email', 'email');
// Assembling
// Form instances are created, Form::add() is called
$form = $builder->getForm();
// Manual modifications
$form->add('submit', 'submit');
$form->remove('email');"><pre class="notranslate"><span class="pl-c">// Configuration</span>
<span class="pl-s1"><span class="pl-c1">$</span>builder</span> = <span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">createBuilder</span>()
-><span class="pl-en">add</span>(<span class="pl-s">'name'</span>, <span class="pl-s">'text'</span>)
-><span class="pl-en">add</span>(<span class="pl-s">'email'</span>, <span class="pl-s">'email'</span>);
<span class="pl-c">// Assembling</span>
<span class="pl-c">// Form instances are created, Form::add() is called</span>
<span class="pl-s1"><span class="pl-c1">$</span>form</span> = <span class="pl-s1"><span class="pl-c1">$</span>builder</span>-><span class="pl-en">getForm</span>();
<span class="pl-c">// Manual modifications</span>
<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">add</span>(<span class="pl-s">'submit'</span>, <span class="pl-s">'submit'</span>);
<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">remove</span>(<span class="pl-s">'email'</span>);</pre></div>
<h5 dir="auto">Phase 3: Initialization</h5>
<p dir="auto">During initialization, the form tree is populated with default values. Initialization starts when <code class="notranslate">Form::initialize($defaultData = null)</code> is called on the root form. The call will cascade through the form tree.</p>
<p dir="auto">After the call is complete, <code class="notranslate">initialize()</code> is guaranteed to have been called on every element in the form tree. If elements are added later on, <code class="notranslate">initialize()</code> will be called on them during <code class="notranslate">Form::add()</code>.</p>
<p dir="auto"><code class="notranslate">initialize()</code> is very similar to the current <code class="notranslate">setData()</code>, i.e. the form's data is set and <code class="notranslate">*_SET_DATA</code> events are fired. Consequently, after the initialization of a form tree, all <code class="notranslate">*_SET_DATA</code> events are fired and their effects visible.</p>
<p dir="auto">There are three major differences between <code class="notranslate">initialize()</code> and the current <code class="notranslate">setData()</code>:</p>
<p dir="auto">First, <code class="notranslate">initialize()</code> must <strong>only be called once</strong>. Since <code class="notranslate">initialize()</code> cascades through the form tree, this implies that <code class="notranslate">initialize()</code> must only be called on the root form.</p>
<p dir="auto">Second, the data argument in can be omitted. This happens mostly for the root form and when "mapped" is set to <code class="notranslate">false</code>. In this case, the default data will be retrieved from the form's configuration, which has been created in Phase 1.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$form = $factory->createBuilder('form', null, array('auto_initialize' => false))
->add('name', 'text')
->add('email', 'email')
// passing the data as second argument to
// FormFactory::createBuilder() or through the option
// "data" is equivalent to the below statement
->setData(array('name' => 'foo', 'email' => 'bar'))
->getForm();
$form->initialize();
// sets the default data stored above
// implies $form->get('name')->initialize('foo')
// implies $form->get('email')->initialize('bar')"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>form</span> = <span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">createBuilder</span>(<span class="pl-s">'form'</span>, <span class="pl-c1">null</span>, <span class="pl-en">array</span>(<span class="pl-s">'auto_initialize'</span> => <span class="pl-c1">false</span>))
-><span class="pl-en">add</span>(<span class="pl-s">'name'</span>, <span class="pl-s">'text'</span>)
-><span class="pl-en">add</span>(<span class="pl-s">'email'</span>, <span class="pl-s">'email'</span>)
<span class="pl-c">// passing the data as second argument to</span>
<span class="pl-c">// FormFactory::createBuilder() or through the option</span>
<span class="pl-c">// "data" is equivalent to the below statement</span>
-><span class="pl-en">setData</span>(<span class="pl-en">array</span>(<span class="pl-s">'name'</span> => <span class="pl-s">'foo'</span>, <span class="pl-s">'email'</span> => <span class="pl-s">'bar'</span>))
-><span class="pl-en">getForm</span>();
<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">initialize</span>();
<span class="pl-c">// sets the default data stored above</span>
<span class="pl-c">// implies $form->get('name')->initialize('foo')</span>
<span class="pl-c">// implies $form->get('email')->initialize('bar')</span></pre></div>
<p dir="auto">If the "auto_initialize" option is not set to <code class="notranslate">false</code>, as in this example, <code class="notranslate">initialize()</code> will be called automatically (this is already happening right now for your Symfony 2.3 forms).</p>
<p dir="auto">Third and last, contrary to the current <code class="notranslate">setData()</code>, initialized forms cannot be added as children of other forms anymore.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$form = $factory->createForm('text', null, array('auto_initialize' => false));
$form->initialize('foo');
$otherForm->add($form); // boom
$form = $factory->createForm('text');
$otherForm->add($form); // boom, auto initialized"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>form</span> = <span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">createForm</span>(<span class="pl-s">'text'</span>, <span class="pl-c1">null</span>, <span class="pl-en">array</span>(<span class="pl-s">'auto_initialize'</span> => <span class="pl-c1">false</span>));
<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">initialize</span>(<span class="pl-s">'foo'</span>);
<span class="pl-s1"><span class="pl-c1">$</span>otherForm</span>-><span class="pl-en">add</span>(<span class="pl-s1"><span class="pl-c1">$</span>form</span>); <span class="pl-c">// boom</span>
<span class="pl-s1"><span class="pl-c1">$</span>form</span> = <span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">createForm</span>(<span class="pl-s">'text'</span>);
<span class="pl-s1"><span class="pl-c1">$</span>otherForm</span>-><span class="pl-en">add</span>(<span class="pl-s1"><span class="pl-c1">$</span>form</span>); <span class="pl-c">// boom, auto initialized</span></pre></div>
<h5 dir="auto">Phase 4: Submission</h5>
<p dir="auto">After a form tree is readily initialized and all <code class="notranslate">*_SET_DATA</code> events triggered, the form can be submitted. Forms must not be submitted before initialization is complete.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Phase 1 and 2 inside the form type
// Phase 3 due to automatic initialization
$form = $this->createForm('my_type');
// Phase 4
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
// ...
}"><pre class="notranslate"><span class="pl-c">// Phase 1 and 2 inside the form type</span>
<span class="pl-c">// Phase 3 due to automatic initialization</span>
<span class="pl-s1"><span class="pl-c1">$</span>form</span> = <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-en">createForm</span>(<span class="pl-s">'my_type'</span>);
<span class="pl-c">// Phase 4</span>
<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">handleRequest</span>(<span class="pl-s1"><span class="pl-c1">$</span>request</span>);
<span class="pl-k">if</span> (<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">isSubmitted</span>() && <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">isValid</span>()) {
<span class="pl-c">// ...</span>
}</pre></div>
<p dir="auto">The only difference will be that there will most likely be an "auto_submit" option with a default of <code class="notranslate">true</code>, sparing you of calling <code class="notranslate">handleRequest()</code> manually.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Phase 1 and 2 inside the form type
// Phase 3 due to automatic initialization
// Phase 4 due to automatic submission
$form = $this->createForm('my_type');
if ($form->isSubmitted() && $form->isValid()) {
// ...
}"><pre class="notranslate"><span class="pl-c">// Phase 1 and 2 inside the form type</span>
<span class="pl-c">// Phase 3 due to automatic initialization</span>
<span class="pl-c">// Phase 4 due to automatic submission</span>
<span class="pl-s1"><span class="pl-c1">$</span>form</span> = <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-en">createForm</span>(<span class="pl-s">'my_type'</span>);
<span class="pl-k">if</span> (<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">isSubmitted</span>() && <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">isValid</span>()) {
<span class="pl-c">// ...</span>
}</pre></div>
<h4 dir="auto">Implementation</h4>
<p dir="auto">A few details on what changes are necessary to make the above happen.</p>
<h5 dir="auto">Introduce new DataMapperInterface</h5>
<p dir="auto">A new data mapper interface will be introduced. Due to BC, it will have a very uninspring name:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface DataMapper2Interface
{
/**
* Returns true if the data is considered empty. The
* preconfigured default value will be used in this case.
*
* @param mixed $data
*
* @return Boolean
*/
public function isEmpty($data);
/**
* Returns whether the data can be read. For example,
* an ArrayAccessMapper will return true if and only if
* $data is an array.
*
* @param mixed $data
*
* @return Boolean
*/
public function isReadable($data);
/**
* Returns a textual representation of the types that
* this mapper can read, which will be included in the
* error message generated if isReadable() returns false.
*
* @return string
*/
public function getReadableTypes();
/**
* Returns the mapped value from $data by accessing $path.
* $path can be anything, depending on the implementation
* (e.g. property path, XPath, array index etc.)
*
* @param mixed $data
* @param mixed $path
*
* @return mixed The value read from $data
*/
public function readValue($data, $path);
/**
* Writes a value into $data.
*
* @param mixed $data
* @param mixed $path
* @param mixed $value
*/
public function writeValue($data, $path, $value)
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-v">DataMapper2Interface</span>
{
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns true if the data is considered empty. The</span>
<span class="pl-c"> * preconfigured default value will be used in this case.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * @param mixed $data</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * @return Boolean</span>
<span class="pl-c"> */</span>
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">isEmpty</span>(<span class="pl-s1"><span class="pl-c1">$</span>data</span>);
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns whether the data can be read. For example,</span>
<span class="pl-c"> * an ArrayAccessMapper will return true if and only if</span>
<span class="pl-c"> * $data is an array.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * @param mixed $data</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * @return Boolean</span>
<span class="pl-c"> */</span>
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">isReadable</span>(<span class="pl-s1"><span class="pl-c1">$</span>data</span>);
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a textual representation of the types that</span>
<span class="pl-c"> * this mapper can read, which will be included in the</span>
<span class="pl-c"> * error message generated if isReadable() returns false.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * @return string</span>
<span class="pl-c"> */</span>
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">getReadableTypes</span>();
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns the mapped value from $data by accessing $path.</span>
<span class="pl-c"> * $path can be anything, depending on the implementation</span>
<span class="pl-c"> * (e.g. property path, XPath, array index etc.)</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * @param mixed $data</span>
<span class="pl-c"> * @param mixed $path</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * @return mixed The value read from $data</span>
<span class="pl-c"> */</span>
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">readValue</span>(<span class="pl-s1"><span class="pl-c1">$</span>data</span>, <span class="pl-s1"><span class="pl-c1">$</span>path</span>);
<span class="pl-c">/**</span>
<span class="pl-c"> * Writes a value into $data.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * @param mixed $data</span>
<span class="pl-c"> * @param mixed $path</span>
<span class="pl-c"> * @param mixed $value</span>
<span class="pl-c"> */</span>
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">writeValue</span>(<span class="pl-s1"><span class="pl-c1">$</span>data</span>, <span class="pl-s1"><span class="pl-c1">$</span>path</span>, <span class="pl-s1"><span class="pl-c1">$</span>value</span>)
}</pre></div>
<p dir="auto">This mapper can be used <em>alternatively</em> to an implementation of the current <code class="notranslate">DataMapperInterface</code>. The other code contained in current <code class="notranslate">DataMapperInterface</code> implementation will be executed by <code class="notranslate">Form</code> directly (see Motivation 5).</p>
<h5 dir="auto">Call initialize() on forms with "inherit_data" true</h5>
<p dir="auto">Once the data mapping code is inlined into <code class="notranslate">Form</code>, <code class="notranslate">initialize()</code> can also be called on forms with the "inherit_data" option set (see Motivation 2). This is currently impossible, because the current data mappers only have access to the parent's view data, but need to pass the parent's model data instead.</p>
<h5 dir="auto">Remove side effects</h5>
<p dir="auto">The side effects from <code class="notranslate">getData()</code>, <code class="notranslate">getNormData()</code>,<br>
<code class="notranslate">getViewData()</code> and <code class="notranslate">submit()</code> should be removed. Instead, exceptions should be thrown.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// old
if (!$this->defaultDataSet) {
$this->setData($this->getConfig()->getData());
}
// new
if (!$this->defaultDataSet) {
throw new RuntimeException('getData() must be called after initializing the form. Make sure "auto_initialize" is not disabled on the root form.');
}"><pre class="notranslate"><span class="pl-c">// old</span>
<span class="pl-k">if</span> (!<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">defaultDataSet</span>) {
<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-en">setData</span>(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-en">getConfig</span>()-><span class="pl-en">getData</span>());
}
<span class="pl-c">// new</span>
<span class="pl-k">if</span> (!<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">defaultDataSet</span>) {
<span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">RuntimeException</span>(<span class="pl-s">'getData() must be called after initializing the form. Make sure "auto_initialize" is not disabled on the root form.'</span>);
}</pre></div>
<p dir="auto">This is possible, because <code class="notranslate">initialize()</code>, which is guaranteed to be called, also guarantees to fill the form with the appropriate default data.</p>
<h5 dir="auto">Deprecate setData()</h5>
<p dir="auto">As last step, <code class="notranslate">setData()</code> will be deprecated. Consequently, you should only set default data during the configuration phase by one of the already existing means:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// passed to the factory
$form = $factory->create('form', $default);
// set on the builder
$form = $factory->createBuilder('form')
->setData($default)
->getForm();
// passed as option
$form = $factory->create('form', null, array('data' => $default));
$form->add('field', 'text', array('data' => $default));
// deprecated
$form->setData($default);"><pre class="notranslate"><span class="pl-c">// passed to the factory</span>
<span class="pl-s1"><span class="pl-c1">$</span>form</span> = <span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">create</span>(<span class="pl-s">'form'</span>, <span class="pl-s1"><span class="pl-c1">$</span>default</span>);
<span class="pl-c">// set on the builder</span>
<span class="pl-s1"><span class="pl-c1">$</span>form</span> = <span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">createBuilder</span>(<span class="pl-s">'form'</span>)
-><span class="pl-en">setData</span>(<span class="pl-s1"><span class="pl-c1">$</span>default</span>)
-><span class="pl-en">getForm</span>();
<span class="pl-c">// passed as option</span>
<span class="pl-s1"><span class="pl-c1">$</span>form</span> = <span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">create</span>(<span class="pl-s">'form'</span>, <span class="pl-c1">null</span>, <span class="pl-en">array</span>(<span class="pl-s">'data'</span> => <span class="pl-s1"><span class="pl-c1">$</span>default</span>));
<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">add</span>(<span class="pl-s">'field'</span>, <span class="pl-s">'text'</span>, <span class="pl-en">array</span>(<span class="pl-s">'data'</span> => <span class="pl-s1"><span class="pl-c1">$</span>default</span>));
<span class="pl-c">// deprecated</span>
<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">setData</span>(<span class="pl-s1"><span class="pl-c1">$</span>default</span>);</pre></div>
<p dir="auto">If you made it up to here, you have my full respect :) Please don' forget to answer my question above.</p> | 1 |
<p dir="auto">Similar to how file explorers/tree views work on most platforms, it would be convenient to be able to navigate through the folder explorer using a-z. For example:</p>
<ul dir="auto">
<li><kbd>ctrl</kbd>+<kbd>0</kbd> or click to focus sidebar</li>
<li>Type "foo" in quick succession to go to the directory (in the current directory) starting with <code class="notranslate">/fo?o?/</code>, if it exists</li>
</ul> | <ul dir="auto">
<li>VSCode Version: Any</li>
<li>OS Version: Any</li>
</ul>
<p dir="auto"><strong>Feature Proposal</strong><br>
When opening a folder containing hundreds of items (for example: <code class="notranslate">node_modules</code>) There is no easy way to get to a child folder/file without scrolling around.</p>
<p dir="auto">Would it be possible to allow the file viewer to navigate down to let's say the first file of the next letter keypressed?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="node_modules (folder is highlighted)
( letter L is hit )
---- automatically scrolls down within node_modules to folders beginning with "L"
+++ Folders shown:
+ Lodash / etc"><pre class="notranslate"><code class="notranslate">node_modules (folder is highlighted)
( letter L is hit )
---- automatically scrolls down within node_modules to folders beginning with "L"
+++ Folders shown:
+ Lodash / etc
</code></pre></div>
<p dir="auto">Just an idea, would help navigating large filesystems a bit easier.</p> | 1 |
<p dir="auto">All doc links reference <code class="notranslate">window.parent.goTo</code> which has possibly never worked(?)</p>
<p dir="auto">First commit referencing <code class="notranslate">window.parent.goTo</code> by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mrdoob/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mrdoob">@mrdoob</a> on July 24th, 2012 <code class="notranslate">git show -p 9a1bd006143e7d949d4b21804d28ccf80db701c1 -- docs/page.js</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="commit 9a1bd006143e7d949d4b21804d28ccf80db701c1
Author: Mr.doob <[email protected]>
Date: Tue Jul 24 18:01:05 2012 +0200
Refactored documentation system. No more XMLHttpRequest.
Now you can browse the docs from the local system too."><pre class="notranslate"><code class="notranslate">commit 9a1bd006143e7d949d4b21804d28ccf80db701c1
Author: Mr.doob <[email protected]>
Date: Tue Jul 24 18:01:05 2012 +0200
Refactored documentation system. No more XMLHttpRequest.
Now you can browse the docs from the local system too.
</code></pre></div>
<p dir="auto">Altered by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alteredq/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alteredq">@alteredq</a> on Aug 8th 2012 <code class="notranslate">git show -p a650f50aa9ccb66e00d29d2efcbf31d6f13540fa</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="commit a650f50aa9ccb66e00d29d2efcbf31d6f13540fa
Author: alteredq <[email protected]>
Date: Wed Aug 8 17:49:40 2012 +0200
Fixed bug in docs regular expression.
This was creating mess when URL contained "html" also elsewhere than just at the end."><pre class="notranslate"><code class="notranslate">commit a650f50aa9ccb66e00d29d2efcbf31d6f13540fa
Author: alteredq <[email protected]>
Date: Wed Aug 8 17:49:40 2012 +0200
Fixed bug in docs regular expression.
This was creating mess when URL contained "html" also elsewhere than just at the end.
</code></pre></div>
<p dir="auto">Up next is <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/caseygrun/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/caseygrun">@caseygrun</a> <code class="notranslate">git log -p -- docs/page.js --author=Casey Grun</code> who made a bunch of commits to the docs file. This is a likely culprit because of multiple commits to address the same thing.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="commit 5ddb3b7427f293eae8dedd496b1318ea42ea41b7
Author: Casey Grun <[email protected]>
Date: Wed Oct 15 00:14:18 2014 -0400
AlImprove member cross-linking functions in docs
...etc"><pre class="notranslate"><code class="notranslate">commit 5ddb3b7427f293eae8dedd496b1318ea42ea41b7
Author: Casey Grun <[email protected]>
Date: Wed Oct 15 00:14:18 2014 -0400
AlImprove member cross-linking functions in docs
...etc
</code></pre></div>
<p dir="auto">Whodunit? :D</p>
<p dir="auto">I don't know what the problem is because on the docs pages, <code class="notranslate">window.parent.goTo</code> is defined.</p>
<p dir="auto">I actually don't know if the doc method linking <em>ever</em> worked? I'm also not sure why we don't just use <code class="notranslate"><a href="#anchor"></code> which is the standard way to link to anchors on a page.</p> | <p dir="auto">I've been looking at contributing documentation changes and noticed that there are some inconsistencies with the return value of methods.</p>
<p dir="auto">For example, <a href="http://threejs.org/docs/#Reference/Math/Vector3" rel="nofollow">Vector3's page</a> has a <code class="notranslate">this</code> after all methods that modify the <code class="notranslate">Vector3</code> in place and then return the same <code class="notranslate">Vector3</code>. But there are methods like <a href="http://threejs.org/docs/#Reference/Math/Vector3.distanceToSquared" rel="nofollow"><code class="notranslate">.distanceToSquared()</code></a> that have no return value after the method.</p>
<p dir="auto">So my questions are:</p>
<ol dir="auto">
<li>When should a return value follow a method definition?</li>
<li>When should that return value text be <code class="notranslate">this</code> or the type, eg. <code class="notranslate">Vector3</code>?</li>
</ol>
<p dir="auto"><em>Side Note:</em> There are methods that link to non-existent pages because their return type is a standard JS type ( eg. Boolean, Float, etc ). This is confusing if you are expecting to be redirected to the page on that type.</p> | 1 |
<p dir="auto">The current airflow scheduler architecture can scan the DAG, understand the cron schedule defined in the DAG and submit a task to a local/remote executor. This works best for most of use cases to automate any flavor of workflows. The cron schedule can fit most of workflow patterns but there are few complex business scheduling requirements as specified below.</p>
<ol dir="auto">
<li>Run the workflow on every alternative week ends and don't run on holidays</li>
<li>Run the workflow on every week and include few holidays except Christmas and New Year.</li>
</ol>
<p dir="auto">These 2 are sample examples.</p>
<p dir="auto"><strong>Use case / motivation</strong></p>
<p dir="auto">Most of licensed scheduler have calendar based scheduling feature where users can pick or customize schedule according to pre-defined calendar for each workflow.</p>
<p dir="auto">**Feature Request ** :</p>
<ol dir="auto">
<li>Have a configurable option to use customized calendar based schedule or cron based<br>
schedule for each DAG.</li>
<li>Scheduler can read the option at each DAG level schedule option and act according to calendar based schedule or cron based schedule</li>
<li>Webserver DAG Graph view can display the calendar based schedule or cron based schedule.</li>
</ol>
<p dir="auto"><strong>Note:</strong> This feature request is based on usage of airflow for more than 3 to 4 years and felt it would be a great feature to incorporate in the airflow architecture.</p> | <h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.1.3</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Linux</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</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">Community Helm chart 8.0.8</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">I have created 1000 dags like that</p>
<p dir="auto"><strong>test_AIR10001.py</strong><br>
...<br>
<strong>test_AIR11001.py</strong></p>
<p dir="auto">After wait period of 5 minutes try to open any dag and can't.<br>
Here is an exception details: <a href="https://sentry.io/share/issue/b97fca62ccec47709e814e70deb3e4ba/" rel="nofollow">https://sentry.io/share/issue/b97fca62ccec47709e814e70deb3e4ba/</a></p>
<p dir="auto">If I try do do 5 dags like that I do not have this issue.</p>
<h3 dir="auto">What you expected to happen</h3>
<p dir="auto">I expect dags would be loaded to Ariflow without any issue</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto"><strong>dag code</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
from airflow import DAG
from airflow.operators.python import PythonOperator
from datetime import datetime
from src.helpers import dag_helper
with DAG(
dag_id=dag_helper.get_dag_id_from_path(__file__),
schedule_interval=None,
start_date=datetime(2021, 1, 1),
catchup=False,
tags=["example"]
) as dag:
def print_array():
"""Print Numpy array."""
a = np.arange(15).reshape(3, 5)
print(a)
time_wait_cuy = dag_helper.get_time_wait_cuy()
print(time_wait_cuy)
return time_wait_cuy
run_this = PythonOperator(
task_id="print_the_context",
python_callable=print_array,
)"><pre class="notranslate"><code class="notranslate">import numpy as np
from airflow import DAG
from airflow.operators.python import PythonOperator
from datetime import datetime
from src.helpers import dag_helper
with DAG(
dag_id=dag_helper.get_dag_id_from_path(__file__),
schedule_interval=None,
start_date=datetime(2021, 1, 1),
catchup=False,
tags=["example"]
) as dag:
def print_array():
"""Print Numpy array."""
a = np.arange(15).reshape(3, 5)
print(a)
time_wait_cuy = dag_helper.get_time_wait_cuy()
print(time_wait_cuy)
return time_wait_cuy
run_this = PythonOperator(
task_id="print_the_context",
python_callable=print_array,
)
</code></pre></div>
<p dir="auto"><strong>Here is dag_helper</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import os
from pathlib import Path
def get_time_wait_cuy():
return os.environ['environment']
def get_dag_id_from_path(dag_file_path):
path = Path(dag_file_path)
stem = path.stem
trimmed_path = Path(*path.parts[5:len(path.parts) - 1])
prefix = str(trimmed_path).replace(os.path.sep, '_')
return '__'.join([prefix, stem])
"><pre class="notranslate"><code class="notranslate">import os
from pathlib import Path
def get_time_wait_cuy():
return os.environ['environment']
def get_dag_id_from_path(dag_file_path):
path = Path(dag_file_path)
stem = path.stem
trimmed_path = Path(*path.parts[5:len(path.parts) - 1])
prefix = str(trimmed_path).replace(os.path.sep, '_')
return '__'.join([prefix, stem])
</code></pre></div>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">vault</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">2.3</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Extend the --output flag to work with the encrypt_string action to update/add the variable defined with -n.</p>
<p dir="auto">So running: <strong>ansible-vault encrypt_string -n PASSWORD MySecret --output=group_vars/servers</strong></p>
<p dir="auto">Would update group_vars/servers file, adding PASSWORD: if it didn't exist, or updating if it did.</p> | <h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">ansible 1.5.2</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Ubuntu 12.04</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">SSL verification fails when attempting to use the hipchat module</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Use the hipchat module and attempt to send a message.</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">No errors, message gets sent.</p>
<h5 dir="auto">Actual Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="msg: failed to validate the SSL certificate for api.hipchat.com:443. You can use validate_certs=no, however this is unsafe and not recommended"><pre class="notranslate"><code class="notranslate">msg: failed to validate the SSL certificate for api.hipchat.com:443. You can use validate_certs=no, however this is unsafe and not recommended
</code></pre></div>
<hr>
<p dir="auto">Ansible v1.5.2 appears to have enabled SSL server certificate verification. If I attempt to use the HipChat module, it fails due to an unclear error message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="msg: failed to validate the SSL certificate for api.hipchat.com:443. You can use validate_certs=no, however this is unsafe and not recommended"><pre class="notranslate"><code class="notranslate">msg: failed to validate the SSL certificate for api.hipchat.com:443. You can use validate_certs=no, however this is unsafe and not recommended
</code></pre></div>
<p dir="auto">It appears that Ansible hard-codes the Certificate Authority bundle based on the current platform and distribution. For Ubuntu, the file is hard-coded to /usr/share/ca-certificates/cacert.org/cacert.org.crt.</p>
<p dir="auto">Running update-ca-certificates on Ubuntu does not fix the problem because this generates a bundle in /etc/ssl/certs/ca-certificates.crt.</p>
<p dir="auto">I see a few improvements:</p>
<ol dir="auto">
<li>Display the attempted filename in the error message--this would help clarify what went wrong.</li>
<li>Allow configuration of the bundle file in the Ansible configuration (similar to curl's --cacert parameter).</li>
<li>curl also allows a --capath directory to search for certificates within this directory. Support this functionality.</li>
</ol> | 0 |
<p dir="auto">This is a roundup issue for Kubernetes 1.4 and a tracker to orient folks on the ongoing work. It is focused on all components that touch the API, but not necessarily the total system. It also serves to identify areas where folks can get involved.</p>
<p dir="auto">Track issues using <a href="https://github.com/kubernetes/kubernetes/issues?utf8=%E2%9C%93&q=label%3Aarea%2Fperformance+label%3A%22team%2FCSI-API+Machinery+SIG%22+">labels performance and CSI-API-Machinery</a></p>
<h3 dir="auto">Ongoing efforts</h3>
<p dir="auto">Major focus: We want to get to our target cluster size metrics (5k nodes and 300k pods) in 1.4 or 1.5, and we are within an order of magnitude of that with 1.3 in many dimensions.</p>
<p dir="auto">Areas of attack: We are mostly CPU bound on the controllers and API servers today, and most of that is overhead due to garbage collection. We also have had a fair number of contention areas that were algorithmic or lock related in the core components. We've got a good feedback loop for identifying critical bottlenecks, but we could probably stand to get more profiles and metrics gathered from the high scale systems.</p>
<ul dir="auto">
<li>Reduce the CPU and garbage created by clients and the API server when handling API requests
<ul dir="auto">
<li>Introduce protobuf
<ul dir="auto">
<li>[complete <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="75730377" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/8132" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/8132/hovercard" href="https://github.com/kubernetes/kubernetes/issues/8132">#8132</a>] Used for most API objects when talking between client and server</li>
<li>[inprogress for 1.5] Use protobuf for storage format</li>
<li>Handle mixed content type storage (objects that embed other objects like Templates or third party resources)</li>
<li>[inprogress <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="159852334" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27258" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/27258/hovercard" href="https://github.com/kubernetes/kubernetes/pull/27258">#27258</a>] Handle optional slices and maps correctly in protobuf</li>
<li><a href="https://github.com/gogo/protobuf/issues/174" data-hovercard-type="issue" data-hovercard-url="/gogo/protobuf/issues/174/hovercard">inprogress</a> Investigate use of string arena unmarshalling in protobuf to avoid []byte -> string allocations in decode</li>
</ul>
</li>
<li>Optimize the conversion, defaulting, and decoding code paths
<ul dir="auto">
<li><a href="https://github.com/kubernetes/kubernetes/issues/25019" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/25019/hovercard">complete</a> Implement more efficient Quantity, using int64 and better serialization</li>
<li>[complete <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="151791703" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/24966" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/24966/hovercard" href="https://github.com/kubernetes/kubernetes/pull/24966">#24966</a>] Remove the use of reflection in conversion and defaulting
<ul dir="auto">
<li>Auto generate fast path conversion functions (AddGenericConversionFunc) for each API type</li>
</ul>
</li>
<li>[complete <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="150740424" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/24727" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/24727/hovercard" href="https://github.com/kubernetes/kubernetes/pull/24727">#24727</a>] Make conversions of identical types (builtins, maps, slices, pointers) an assignment, not a copy</li>
<li>[inprogress <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="161006493" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27659" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/27659/hovercard" href="https://github.com/kubernetes/kubernetes/pull/27659">#27659</a>] Further optimization of identical type conversion using unsafe.Pointer</li>
<li>[inprogress <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="178779790" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/33352" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/33352/hovercard" href="https://github.com/kubernetes/kubernetes/pull/33352">#33352</a>] Split defaulting from conversion into its own function, possibly by generating an entire "Default_Pod" function from component parts, which allows us to avoid having to walk deep objects</li>
</ul>
</li>
<li>Use the versioned client where possible to avoid conversion altogether. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="168964772" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/29934" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/29934/hovercard" href="https://github.com/kubernetes/kubernetes/issues/29934">#29934</a>
<ul dir="auto">
<li><a href="???">inprogress</a> Versioned client in controllers depends on the shared cache work (all controllers sharing a cache have to use the same object type). It's also blocked by the <a href="https://github.com/kubernetes/kubernetes/pull/29147" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/29147/hovercard">cutting a client library work</a>.</li>
</ul>
</li>
<li>Ensure that the Update and Create code paths are efficient (guaranteed update loop generates a lot of objects)</li>
<li>SelfLink and URL.String() are fairly expensive in the encode/decode path</li>
<li>For any JSON gaps (non-proto clients) we could look at easyjson, which appears to do more than ugorgji to reduce memory allocation during decode.</li>
</ul>
</li>
<li>Reduce the amount of duplicate objects being used by controller and admission caches and the amount of total memory used by caches
<ul dir="auto">
<li>[complete] Separate re-listing and re-syncing (former talks to api server, latter traverses cache) to reduce the amount of duplicate calls to the server and wasted conversion</li>
<li><a href="https://github.com/kubernetes/kubernetes/issues/14978" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/14978/hovercard">complete</a> Add a SharedInformer and use it for Pod caches (all 8 of them)</li>
<li>[inprogress] Use shared Namespace caches in admission controllers</li>
<li>Investigate and identify other opportunities for shared caches</li>
<li>[inprogress] Investigate size of objects kept in shared and unshared caches for duplication and waste
<ul dir="auto">
<li>Pods tend to have larger objects <a href="https://github.com/coreos/kscale/pull/37/files#diff-a423e914cbd27c95d2c0b950e2e4ee5bR14">https://github.com/coreos/kscale/pull/37/files#diff-a423e914cbd27c95d2c0b950e2e4ee5bR14</a> than necessary - maps and quantity too large</li>
<li>Investigate using slices instead of maps for our many small maps, or having an <code class="notranslate">ArrayMap</code> equivalent to Java <a href="https://github.com/kubernetes/kubernetes/issues/31440" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/31440/hovercard">#31440</a></li>
<li>Investigate flyweight cache patterns for certain controllers</li>
</ul>
</li>
</ul>
</li>
<li>Identify unnecessary blocking / stalls in clients, watches, caches, and controllers
<ul dir="auto">
<li>[complete] Several fixes to 1.3 scheduler and caches</li>
<li>[complete] Avoid flushing aggressively in watches to reduces syscalls</li>
<li><a href="@deads2k">inprogress</a> Shared caches currently have coarse locks, investigate striping and reducing the duration of the locks</li>
<li>Investigate whether we have any slow cache reader problems with our shared caches</li>
<li>Audit the watch cache for locking issues</li>
<li>Better tooling and documentation to allow people to perform this sort of debugging</li>
<li>???</li>
</ul>
</li>
<li>Profile and optimize specific components and workloads
<ul dir="auto">
<li>Collect profile traces from kubemark and high scale clusters automatically</li>
<li><a href="https://github.com/kubernetes/kubernetes/issues/18418" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/18418/hovercard">Scheduler</a> (lots of eyes on this, but also lots of algorithmic improvements possible)</li>
<li>Kubelet</li>
<li>[inprogress] Replication controller</li>
<li>Node controller (known issues with Timer, other garbage creation)</li>
<li>Quota
<ul dir="auto">
<li>[inprogress] Significant improvements including contention striping and batch assignment</li>
<li>Optimize and audit use of resource.Quantity in these codepaths</li>
</ul>
</li>
<li>Authentication / Authorization / RBAC (has been a significant source of perf bottlenecks in OpenShift in the more complex scenarios)</li>
<li>???</li>
</ul>
</li>
<li>Reduce traffic between components
<ul dir="auto">
<li>Investigation colocation of certain processes if necessary
<ul dir="auto">
<li>OpenShift offers all-in-one processes that bundle etcd, controller, apiserver, as does a few others, and there is some value in compact deployments having an efficient master (downsides are increased memory use and contention)</li>
<li><a href="https://github.com/openshift/origin/pull/8082" data-hovercard-type="pull_request" data-hovercard-url="/openshift/origin/pull/8082/hovercard">inprogress</a> Investigate loopback connections when in the same process (at the net.Chan level)</li>
<li>[mentioned by justinsb] Directly embed etcd and make calls to the Go API</li>
</ul>
</li>
<li>Reduce network bandwidth by sending less objects (not yet a blocker in any particular area)</li>
</ul>
</li>
</ul> | <p dir="auto">There is a lot of copied bash between the various providers. We should create a shared library that multiple providers can use that'll simplify the amount of code for each provider.</p> | 0 |
<p dir="auto">See<br>
<a href="https://groups.google.com/d/msg/elasticsearch/OZsc5ofNhag/9JfwSy-CEMwJ" rel="nofollow">https://groups.google.com/d/msg/elasticsearch/OZsc5ofNhag/9JfwSy-CEMwJ</a> where Shay says "...with the design of the facets, if shouldn't be hard to implement..."</p> | <p dir="auto">This might sound entirely trivial, but this would be a real boon for consistency in our aggregation parsing code. <code class="notranslate">doc_count</code> is currently a property of each bucket in a bucket agg, which makes it an exception when walking the aggregation tree.</p>
<p dir="auto">If we could get a dedicated <code class="notranslate">doc_count</code> metric agg we could handle it the same way we handle every other metric agg, even if its only purpose is to duplicate the <code class="notranslate">doc_count</code> property of the bucket.</p> | 0 |
<p dir="auto">electron-v0.30.4-linux-x64.zip<br>
Linux Mint 17.2</p>
<p dir="auto">Menus are twice (or larger?) the size they should be. This includes the context menu in dev tools which occupies a very large area but I wasn't able to capture a shot of it.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1071806/9347056/e7fd4d8c-45e1-11e5-92b3-d3f23d229140.png"><img src="https://cloud.githubusercontent.com/assets/1071806/9347056/e7fd4d8c-45e1-11e5-92b3-d3f23d229140.png" alt="2015-08-18-19-43-27-483930021" style="max-width: 100%;"></a></p>
<p dir="auto">I know there's been a ton of discussion about high DPI support. I apologize if this bug is a duplicate.</p> | <p dir="auto">I am trying to convert my webpage to PDF using webContents.printToPDF. Most of the times its working fine but for <strong>pages containing iframe</strong> which I am using for youtube videos this method doesn't end at all. To update the electron version is impossible for my application. I tried to use webview in the place of iframe which was also not helping. Is there any way to fix this in the same version of electron.</p>
<p dir="auto">Electron version : 5.0.13<br>
OS: mac OS, Windows</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="win.webContents.printToPDF({
printBackground: true,
landscape: false,
marginsType: 1,
pageSize
}, (error, data) => {
console.log('Inside printToPDF callback')
if(error) {
showMessage("Unable to export PDF")
return console.log(error.message);
}
fs.writeFile(filePath, data, (err) => {
if (error) {
showMessage("Unable to export PDF")
return console.log(error.message);
}
console.log('Write PDF successfully!');
showMessage(`PDF exported successfully !`);
});
});"><pre class="notranslate"><code class="notranslate">win.webContents.printToPDF({
printBackground: true,
landscape: false,
marginsType: 1,
pageSize
}, (error, data) => {
console.log('Inside printToPDF callback')
if(error) {
showMessage("Unable to export PDF")
return console.log(error.message);
}
fs.writeFile(filePath, data, (err) => {
if (error) {
showMessage("Unable to export PDF")
return console.log(error.message);
}
console.log('Write PDF successfully!');
showMessage(`PDF exported successfully !`);
});
});
</code></pre></div>
<p dir="auto">For pages containing iframe, the log "Inside printToPDF callback" is never printed.</p> | 0 |
<p dir="auto">This returns 0, and is not consistent with:<br>
length(“\0q”) -> 2<br>
length(utf16(“\0q”) -> 2<br>
length(utf32(“\0q”) -> 2<br>
length(utf16(“\0\uff) -> 2</p> | <p dir="auto">This <a href="http://stackoverflow.com/questions/43712385/converting-arrayarrayfloat64-1-1-to-arrayfloat64-2-in-julia" rel="nofollow">comes up periodically</a> and it's a bit embarrassing that our official answer right now involves a inefficient splatting. We should have a function – maybe call it <code class="notranslate">stack</code>? – that efficiently does what <code class="notranslate">vcat(vec_of_vecs...)</code> does without the splatting. It should also stack in slices in different dimensions so that you can either stack slices as rows or columns, etc.</p> | 0 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18362.175]
Windows Terminal version (if applicable):0.3.2171.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.175]
Windows Terminal version (if applicable):0.3.2171.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Forgive the title - I couldn't think of a good way of articulating it</p>
<ol dir="auto">
<li>Set the default profile to PowerShell</li>
<li>Create a cmd tab</li>
<li>Press enter until the text covers most of the screen</li>
<li>Split the view horizontally</li>
<li>Close the bottom pane</li>
</ol>
<p dir="auto">Does <strong>not</strong> repro if:</p>
<ul dir="auto">
<li>The primary tab's text does not fill the screen</li>
<li>The secondary/bottom pane is not PowerShell</li>
<li>The primary/top pane is Ubuntu/WSL, and exhibits a <a href="https://github.com/microsoft/terminal/issues/2432" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/2432/hovercard">different bug</a> if the primary/top pane is PowerShell</li>
<li>The bottom/PowerShell pane loses focus (either to an external window or to the top pane)</li>
</ul>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The pane closes</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The UI thread hangs. Screenshots:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/229467/63062746-4f8c0f00-bf3d-11e9-9db8-acc523e1b353.png"><img src="https://user-images.githubusercontent.com/229467/63062746-4f8c0f00-bf3d-11e9-9db8-acc523e1b353.png" alt="pane-crash-1" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/229467/63062748-5155d280-bf3d-11e9-9e59-e66e8ee6f7e4.png"><img src="https://user-images.githubusercontent.com/229467/63062748-5155d280-bf3d-11e9-9e59-e66e8ee6f7e4.png" alt="pane-crash-2" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/229467/63062753-531f9600-bf3d-11e9-98aa-4c498e40b2b6.png"><img src="https://user-images.githubusercontent.com/229467/63062753-531f9600-bf3d-11e9-98aa-4c498e40b2b6.png" alt="pane-crash-3" style="max-width: 100%;"></a></p> | <p dir="auto">NOTE: This is different from, but may be related to, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="476508524" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/2230" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/2230/hovercard" href="https://github.com/microsoft/terminal/issues/2230">#2230</a></p>
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18362.175]
Windows Terminal version: 0.3.2142.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.175]
Windows Terminal version: 0.3.2142.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Open a new Windows Terminal instance</li>
<li>Open a second tab using either the "+" button</li>
<li>Close the new tab using CTRL+W, middle clicking the tab, or clicking the tab's "x"</li>
</ol>
<p dir="auto">Repeat steps 2-3 as fast as possible.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Tabs continue to open and close.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto"><strong>PowerShell</strong> - Most of the time, WT stops responding and interacting with it shows the "WindowsTerminal.exe is not responding" modal</p>
<p dir="auto"><strong>CMD / WSL</strong> - WT stops responding for about 1 second and then exits (also happens for PowerShell sometimes)</p> | 1 |
<p dir="auto">Seen once:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="##### GOMAXPROCS=2 runtime -cpu=1,2,4
--- FAIL: TestGcSys (0.04s)
crash_test.go:92: building source: exit status 2
panic: runtime error: slice bounds out of range
fatal error: panic on system stack
runtime stack:
runtime.throw(0x98c770, 0x15)
/tmp/buildlet-scatch328051143/src/runtime/panic.go:527 +0x96
runtime.gopanic(0x897800, 0xc208010180)
/tmp/buildlet-scatch328051143/src/runtime/panic.go:354 +0xbc
runtime.panicslice()
/tmp/buildlet-scatch328051143/src/runtime/panic.go:18 +0x50
runtime.gcInstallStackBarrier(0xc2080d5e40, 0x7f4ec90bcb50)
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:510 +0xb1
runtime.scanstack.func1(0x7f4ec90bcb50, 0x0, 0x1)
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:365 +0xa2
runtime.gentraceback(0x62cd25, 0xc2080429b8, 0x0, 0xc2080d5e40, 0x0, 0x0, 0x7fffffff, 0x7f4ec90bcc68, 0x0, 0x0, ...)
/tmp/buildlet-scatch328051143/src/runtime/traceback.go:336 +0xa81
runtime.scanstack(0xc2080d5e40)
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:380 +0x351
runtime.gcphasework(0xc2080d5e40)
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:273 +0x70
runtime.stopg(0xc2080d5e40, 0x3)
/tmp/buildlet-scatch328051143/src/runtime/proc1.go:395 +0x91
runtime.markroot(0xc208018000, 0xe)
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:138 +0x1f2
runtime.parfordo(0xc208018000)
/tmp/buildlet-scatch328051143/src/runtime/parfor.go:95 +0x12d
runtime.gcscan_m()
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:37 +0xe1
runtime.gc.func1()
/tmp/buildlet-scatch328051143/src/runtime/mgc.go:843 +0x5f
runtime.systemstack(0xc20801a000)
/tmp/buildlet-scatch328051143/src/runtime/asm_amd64.s:262 +0x7c
runtime.mstart()
/tmp/buildlet-scatch328051143/src/runtime/proc1.go:656
goroutine 7 [garbage collection scan]:
runtime.systemstack_switch()
/tmp/buildlet-scatch328051143/src/runtime/asm_amd64.s:216 fp=0xc2080244e8 sp=0xc2080244e0
runtime.gc(0x0)
/tmp/buildlet-scatch328051143/src/runtime/mgc.go:855 +0x1dc fp=0xc208024790 sp=0xc2080244e8
runtime.backgroundgc()
/tmp/buildlet-scatch328051143/src/runtime/mgc.go:775 +0x40 fp=0xc2080247c0 sp=0xc208024790
runtime.goexit()
/tmp/buildlet-scatch328051143/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc2080247c8 sp=0xc2080247c0
created by runtime.startGC
/tmp/buildlet-scatch328051143/src/runtime/mgc.go:748 +0x14a
goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc2085de110)
/tmp/buildlet-scatch328051143/src/runtime/sema.go:43 +0x2d
sync.(*WaitGroup).Wait(0xc2086007c0)
/tmp/buildlet-scatch328051143/src/sync/waitgroup.go:132 +0x15d
main.(*builder).do(0xc20812fa40, 0xc208552270)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1153 +0x3c9
main.runBuild(0xb986e0, 0xc20800a230, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:441 +0x51f
main.main()
/tmp/buildlet-scatch328051143/src/cmd/go/main.go:177 +0x750
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/tmp/buildlet-scatch328051143/src/runtime/asm_amd64.s:1700 +0x1
goroutine 5 [syscall]:
os/signal.loop()
/tmp/buildlet-scatch328051143/src/os/signal/signal_unix.go:22 +0x1f
created by os/signal.init.1
/tmp/buildlet-scatch328051143/src/os/signal/signal_unix.go:28 +0x3e
goroutine 18 [select]:
main.(*builder).do.func2(0xc2086007c0, 0xc20812fa40, 0xc2086007a0)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1134 +0x1d1
created by main.(*builder).do
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1150 +0x3a1
goroutine 19 [syscall]:
syscall.Syscall(0x0, 0x6, 0xc208042a80, 0x8, 0x0, 0x8, 0x0)
/tmp/buildlet-scatch328051143/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.readlen(0x6, 0xc208042a80, 0x8, 0x11, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/syscall/zsyscall_linux_amd64.go:1085 +0x53
syscall.forkExec(0xc208604480, 0x3a, 0xc208528400, 0x10, 0x10, 0xc208042c50, 0x1b61, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/syscall/exec_unix.go:200 +0x56a
syscall.StartProcess(0xc208604480, 0x3a, 0xc208528400, 0x10, 0x10, 0xc208042c50, 0x1, 0x4, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/syscall/exec_unix.go:238 +0x6e
os.startProcess(0xc208604480, 0x3a, 0xc208528400, 0x10, 0x10, 0xc208042e88, 0x910360, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/os/exec_posix.go:45 +0x33f
os.StartProcess(0xc208604480, 0x3a, 0xc208528400, 0x10, 0x10, 0xc208042e88, 0x0, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/os/doc.go:24 +0x6c
os/exec.(*Cmd).Start(0xc208574140, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/os/exec/exec.go:319 +0x76a
os/exec.(*Cmd).Run(0xc208574140, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/os/exec/exec.go:246 +0x34
main.(*builder).runOut(0xc20812fa40, 0xc208121340, 0x16, 0xc2081212c0, 0x17, 0x0, 0x0, 0x0, 0xc20860a000, 0xd, ...)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1924 +0x334
main.gcToolchain.gc(0xc20812fa40, 0xc208136000, 0xc2085f7200, 0x30, 0xc208604300, 0x34, 0xc208184500, 0xc2086008c0, 0x2, 0x2, ...)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:2171 +0xfe2
main.(*gcToolchain).gc(0xbc5318, 0xc20812fa40, 0xc208136000, 0xc2085f7200, 0x30, 0xc208604300, 0x34, 0x0, 0xc2086008c0, 0x2, ...)
<autogenerated>:3 +0x191
main.(*builder).build(0xc20812fa40, 0xc208552270, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1320 +0x253e
main.(*builder).do.func1(0xc208552270)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1087 +0x3bc
main.(*builder).do.func2(0xc2086007c0, 0xc20812fa40, 0xc2086007a0)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1144 +0x158
created by main.(*builder).do
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1150 +0x3a1
FAIL
FAIL runtime 34.358s
2015/06/03 20:57:17 Failed: exit status 1
Error running run: exit status 1
*** FAILED ***
$"><pre class="notranslate"><code class="notranslate">##### GOMAXPROCS=2 runtime -cpu=1,2,4
--- FAIL: TestGcSys (0.04s)
crash_test.go:92: building source: exit status 2
panic: runtime error: slice bounds out of range
fatal error: panic on system stack
runtime stack:
runtime.throw(0x98c770, 0x15)
/tmp/buildlet-scatch328051143/src/runtime/panic.go:527 +0x96
runtime.gopanic(0x897800, 0xc208010180)
/tmp/buildlet-scatch328051143/src/runtime/panic.go:354 +0xbc
runtime.panicslice()
/tmp/buildlet-scatch328051143/src/runtime/panic.go:18 +0x50
runtime.gcInstallStackBarrier(0xc2080d5e40, 0x7f4ec90bcb50)
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:510 +0xb1
runtime.scanstack.func1(0x7f4ec90bcb50, 0x0, 0x1)
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:365 +0xa2
runtime.gentraceback(0x62cd25, 0xc2080429b8, 0x0, 0xc2080d5e40, 0x0, 0x0, 0x7fffffff, 0x7f4ec90bcc68, 0x0, 0x0, ...)
/tmp/buildlet-scatch328051143/src/runtime/traceback.go:336 +0xa81
runtime.scanstack(0xc2080d5e40)
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:380 +0x351
runtime.gcphasework(0xc2080d5e40)
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:273 +0x70
runtime.stopg(0xc2080d5e40, 0x3)
/tmp/buildlet-scatch328051143/src/runtime/proc1.go:395 +0x91
runtime.markroot(0xc208018000, 0xe)
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:138 +0x1f2
runtime.parfordo(0xc208018000)
/tmp/buildlet-scatch328051143/src/runtime/parfor.go:95 +0x12d
runtime.gcscan_m()
/tmp/buildlet-scatch328051143/src/runtime/mgcmark.go:37 +0xe1
runtime.gc.func1()
/tmp/buildlet-scatch328051143/src/runtime/mgc.go:843 +0x5f
runtime.systemstack(0xc20801a000)
/tmp/buildlet-scatch328051143/src/runtime/asm_amd64.s:262 +0x7c
runtime.mstart()
/tmp/buildlet-scatch328051143/src/runtime/proc1.go:656
goroutine 7 [garbage collection scan]:
runtime.systemstack_switch()
/tmp/buildlet-scatch328051143/src/runtime/asm_amd64.s:216 fp=0xc2080244e8 sp=0xc2080244e0
runtime.gc(0x0)
/tmp/buildlet-scatch328051143/src/runtime/mgc.go:855 +0x1dc fp=0xc208024790 sp=0xc2080244e8
runtime.backgroundgc()
/tmp/buildlet-scatch328051143/src/runtime/mgc.go:775 +0x40 fp=0xc2080247c0 sp=0xc208024790
runtime.goexit()
/tmp/buildlet-scatch328051143/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc2080247c8 sp=0xc2080247c0
created by runtime.startGC
/tmp/buildlet-scatch328051143/src/runtime/mgc.go:748 +0x14a
goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc2085de110)
/tmp/buildlet-scatch328051143/src/runtime/sema.go:43 +0x2d
sync.(*WaitGroup).Wait(0xc2086007c0)
/tmp/buildlet-scatch328051143/src/sync/waitgroup.go:132 +0x15d
main.(*builder).do(0xc20812fa40, 0xc208552270)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1153 +0x3c9
main.runBuild(0xb986e0, 0xc20800a230, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:441 +0x51f
main.main()
/tmp/buildlet-scatch328051143/src/cmd/go/main.go:177 +0x750
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/tmp/buildlet-scatch328051143/src/runtime/asm_amd64.s:1700 +0x1
goroutine 5 [syscall]:
os/signal.loop()
/tmp/buildlet-scatch328051143/src/os/signal/signal_unix.go:22 +0x1f
created by os/signal.init.1
/tmp/buildlet-scatch328051143/src/os/signal/signal_unix.go:28 +0x3e
goroutine 18 [select]:
main.(*builder).do.func2(0xc2086007c0, 0xc20812fa40, 0xc2086007a0)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1134 +0x1d1
created by main.(*builder).do
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1150 +0x3a1
goroutine 19 [syscall]:
syscall.Syscall(0x0, 0x6, 0xc208042a80, 0x8, 0x0, 0x8, 0x0)
/tmp/buildlet-scatch328051143/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.readlen(0x6, 0xc208042a80, 0x8, 0x11, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/syscall/zsyscall_linux_amd64.go:1085 +0x53
syscall.forkExec(0xc208604480, 0x3a, 0xc208528400, 0x10, 0x10, 0xc208042c50, 0x1b61, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/syscall/exec_unix.go:200 +0x56a
syscall.StartProcess(0xc208604480, 0x3a, 0xc208528400, 0x10, 0x10, 0xc208042c50, 0x1, 0x4, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/syscall/exec_unix.go:238 +0x6e
os.startProcess(0xc208604480, 0x3a, 0xc208528400, 0x10, 0x10, 0xc208042e88, 0x910360, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/os/exec_posix.go:45 +0x33f
os.StartProcess(0xc208604480, 0x3a, 0xc208528400, 0x10, 0x10, 0xc208042e88, 0x0, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/os/doc.go:24 +0x6c
os/exec.(*Cmd).Start(0xc208574140, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/os/exec/exec.go:319 +0x76a
os/exec.(*Cmd).Run(0xc208574140, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/os/exec/exec.go:246 +0x34
main.(*builder).runOut(0xc20812fa40, 0xc208121340, 0x16, 0xc2081212c0, 0x17, 0x0, 0x0, 0x0, 0xc20860a000, 0xd, ...)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1924 +0x334
main.gcToolchain.gc(0xc20812fa40, 0xc208136000, 0xc2085f7200, 0x30, 0xc208604300, 0x34, 0xc208184500, 0xc2086008c0, 0x2, 0x2, ...)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:2171 +0xfe2
main.(*gcToolchain).gc(0xbc5318, 0xc20812fa40, 0xc208136000, 0xc2085f7200, 0x30, 0xc208604300, 0x34, 0x0, 0xc2086008c0, 0x2, ...)
<autogenerated>:3 +0x191
main.(*builder).build(0xc20812fa40, 0xc208552270, 0x0, 0x0)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1320 +0x253e
main.(*builder).do.func1(0xc208552270)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1087 +0x3bc
main.(*builder).do.func2(0xc2086007c0, 0xc20812fa40, 0xc2086007a0)
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1144 +0x158
created by main.(*builder).do
/tmp/buildlet-scatch328051143/src/cmd/go/build.go:1150 +0x3a1
FAIL
FAIL runtime 34.358s
2015/06/03 20:57:17 Failed: exit status 1
Error running run: exit status 1
*** FAILED ***
$
</code></pre></div> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="##### GOMAXPROCS=2 runtime -cpu=1,2,4
--- FAIL: TestStackOverflow (0.04s)
crash_test.go:92: building source: exit status 2
panic: runtime error: slice bounds out of range
fatal error: panic on system stack
runtime stack:
runtime.throw(0x985d70, 0x15)
/tmp/buildlet-scatch465833892/go/src/runtime/panic.go:527 +0x96
runtime.gopanic(0x891b00, 0xc208010190)
/tmp/buildlet-scatch465833892/go/src/runtime/panic.go:354 +0xbc
runtime.panicslice()
/tmp/buildlet-scatch465833892/go/src/runtime/panic.go:18 +0x50
runtime.gcInstallStackBarrier(0xc20863c9a0, 0xc208033c78)
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:510 +0xb1
runtime.scanstack.func1(0xc208033c78, 0x0, 0x1)
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:365 +0xa2
runtime.gentraceback(0x6286a5, 0xc2080fca18, 0x0, 0xc20863c9a0, 0x0, 0x0, 0x7fffffff, 0xc208033d90, 0x0, 0x0, ...)
/tmp/buildlet-scatch465833892/go/src/runtime/traceback.go:336 +0xa81
runtime.scanstack(0xc20863c9a0)
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:380 +0x351
runtime.gcphasework(0xc20863c9a0)
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:273 +0x70
runtime.stopg(0xc20863c9a0, 0x3)
/tmp/buildlet-scatch465833892/go/src/runtime/proc1.go:395 +0x91
runtime.markroot(0xc208018000, 0xd)
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:138 +0x1f2
runtime.parfordo(0xc208018000)
/tmp/buildlet-scatch465833892/go/src/runtime/parfor.go:95 +0x12d
runtime.gcscan_m()
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:37 +0xe1
runtime.gc.func1()
/tmp/buildlet-scatch465833892/go/src/runtime/mgc.go:843 +0x5f
runtime.systemstack(0xc20801b500)
/tmp/buildlet-scatch465833892/go/src/runtime/asm_amd64.s:262 +0x7c
runtime.mstart()
/tmp/buildlet-scatch465833892/go/src/runtime/proc1.go:656
goroutine 21 [garbage collection scan]:
runtime.systemstack_switch()
/tmp/buildlet-scatch465833892/go/src/runtime/asm_amd64.s:216 fp=0xc2080204e8 sp=0xc2080204e0
runtime.gc(0x0)
/tmp/buildlet-scatch465833892/go/src/runtime/mgc.go:855 +0x1dc fp=0xc208020790 sp=0xc2080204e8
runtime.backgroundgc()
/tmp/buildlet-scatch465833892/go/src/runtime/mgc.go:775 +0x40 fp=0xc2080207c0 sp=0xc208020790
runtime.goexit()
/tmp/buildlet-scatch465833892/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc2080207c8 sp=0xc2080207c0
created by runtime.startGC
/tmp/buildlet-scatch465833892/go/src/runtime/mgc.go:748 +0x14a
goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc208617360)
/tmp/buildlet-scatch465833892/go/src/runtime/sema.go:43 +0x2d
sync.(*WaitGroup).Wait(0xc2086495a0)
/tmp/buildlet-scatch465833892/go/src/sync/waitgroup.go:132 +0x15d
main.(*builder).do(0xc2081399d0, 0xc208112d00)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1153 +0x3c9
main.runBuild(0xb90360, 0xc208056130, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:441 +0x51f
main.main()
/tmp/buildlet-scatch465833892/go/src/cmd/go/main.go:177 +0x750
goroutine 19 [syscall]:
os/signal.loop()
/tmp/buildlet-scatch465833892/go/src/os/signal/signal_unix.go:22 +0x1f
created by os/signal.init.1
/tmp/buildlet-scatch465833892/go/src/os/signal/signal_unix.go:28 +0x3e
goroutine 23 [syscall]:
syscall.Syscall(0x0, 0x6, 0xc2080fcae0, 0x8, 0x0, 0x8, 0x0)
/tmp/buildlet-scatch465833892/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.readlen(0x6, 0xc2080fcae0, 0x8, 0xf, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/syscall/zsyscall_linux_amd64.go:1085 +0x53
syscall.forkExec(0xc20800a880, 0x3d, 0xc20866e0e0, 0xe, 0xe, 0xc2080fccb0, 0x15d4, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/syscall/exec_unix.go:200 +0x56a
syscall.StartProcess(0xc20800a880, 0x3d, 0xc20866e0e0, 0xe, 0xe, 0xc2080fccb0, 0x1, 0x4, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/syscall/exec_unix.go:238 +0x6e
os.startProcess(0xc20800a880, 0x3d, 0xc20866e0e0, 0xe, 0xe, 0xc2080fcee8, 0x90a160, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/os/exec_posix.go:45 +0x33f
os.StartProcess(0xc20800a880, 0x3d, 0xc20866e0e0, 0xe, 0xe, 0xc2080fcee8, 0x0, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/os/doc.go:24 +0x6c
os/exec.(*Cmd).Start(0xc208670000, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/os/exec/exec.go:319 +0x76a
os/exec.(*Cmd).Run(0xc208670000, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/os/exec/exec.go:246 +0x34
main.(*builder).runOut(0xc2081399d0, 0xc208127100, 0x16, 0xc208127080, 0x17, 0x0, 0x0, 0x0, 0xc20866c000, 0xd, ...)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1902 +0x334
main.gcToolchain.gc(0xc2081399d0, 0xc208125400, 0xc208644b40, 0x30, 0xc20865e200, 0x34, 0xc208172600, 0xc20800e540, 0x2, 0x2, ...)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:2146 +0xf1e
main.(*gcToolchain).gc(0xbbcf70, 0xc2081399d0, 0xc208125400, 0xc208644b40, 0x30, 0xc20865e200, 0x34, 0x0, 0xc20800e540, 0x2, ...)
<autogenerated>:3 +0x191
main.(*builder).build(0xc2081399d0, 0xc208112d00, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1320 +0x2551
main.(*builder).do.func1(0xc208112d00)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1087 +0x3bc
main.(*builder).do.func2(0xc2086495a0, 0xc2081399d0, 0xc208649580)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1144 +0x158
created by main.(*builder).do
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1150 +0x3a1
goroutine 24 [select]:
main.(*builder).do.func2(0xc2086495a0, 0xc2081399d0, 0xc208649580)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1134 +0x1d1
created by main.(*builder).do
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1150 +0x3a1
FAIL
FAIL runtime 25.490s"><pre class="notranslate"><code class="notranslate">##### GOMAXPROCS=2 runtime -cpu=1,2,4
--- FAIL: TestStackOverflow (0.04s)
crash_test.go:92: building source: exit status 2
panic: runtime error: slice bounds out of range
fatal error: panic on system stack
runtime stack:
runtime.throw(0x985d70, 0x15)
/tmp/buildlet-scatch465833892/go/src/runtime/panic.go:527 +0x96
runtime.gopanic(0x891b00, 0xc208010190)
/tmp/buildlet-scatch465833892/go/src/runtime/panic.go:354 +0xbc
runtime.panicslice()
/tmp/buildlet-scatch465833892/go/src/runtime/panic.go:18 +0x50
runtime.gcInstallStackBarrier(0xc20863c9a0, 0xc208033c78)
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:510 +0xb1
runtime.scanstack.func1(0xc208033c78, 0x0, 0x1)
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:365 +0xa2
runtime.gentraceback(0x6286a5, 0xc2080fca18, 0x0, 0xc20863c9a0, 0x0, 0x0, 0x7fffffff, 0xc208033d90, 0x0, 0x0, ...)
/tmp/buildlet-scatch465833892/go/src/runtime/traceback.go:336 +0xa81
runtime.scanstack(0xc20863c9a0)
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:380 +0x351
runtime.gcphasework(0xc20863c9a0)
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:273 +0x70
runtime.stopg(0xc20863c9a0, 0x3)
/tmp/buildlet-scatch465833892/go/src/runtime/proc1.go:395 +0x91
runtime.markroot(0xc208018000, 0xd)
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:138 +0x1f2
runtime.parfordo(0xc208018000)
/tmp/buildlet-scatch465833892/go/src/runtime/parfor.go:95 +0x12d
runtime.gcscan_m()
/tmp/buildlet-scatch465833892/go/src/runtime/mgcmark.go:37 +0xe1
runtime.gc.func1()
/tmp/buildlet-scatch465833892/go/src/runtime/mgc.go:843 +0x5f
runtime.systemstack(0xc20801b500)
/tmp/buildlet-scatch465833892/go/src/runtime/asm_amd64.s:262 +0x7c
runtime.mstart()
/tmp/buildlet-scatch465833892/go/src/runtime/proc1.go:656
goroutine 21 [garbage collection scan]:
runtime.systemstack_switch()
/tmp/buildlet-scatch465833892/go/src/runtime/asm_amd64.s:216 fp=0xc2080204e8 sp=0xc2080204e0
runtime.gc(0x0)
/tmp/buildlet-scatch465833892/go/src/runtime/mgc.go:855 +0x1dc fp=0xc208020790 sp=0xc2080204e8
runtime.backgroundgc()
/tmp/buildlet-scatch465833892/go/src/runtime/mgc.go:775 +0x40 fp=0xc2080207c0 sp=0xc208020790
runtime.goexit()
/tmp/buildlet-scatch465833892/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc2080207c8 sp=0xc2080207c0
created by runtime.startGC
/tmp/buildlet-scatch465833892/go/src/runtime/mgc.go:748 +0x14a
goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc208617360)
/tmp/buildlet-scatch465833892/go/src/runtime/sema.go:43 +0x2d
sync.(*WaitGroup).Wait(0xc2086495a0)
/tmp/buildlet-scatch465833892/go/src/sync/waitgroup.go:132 +0x15d
main.(*builder).do(0xc2081399d0, 0xc208112d00)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1153 +0x3c9
main.runBuild(0xb90360, 0xc208056130, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:441 +0x51f
main.main()
/tmp/buildlet-scatch465833892/go/src/cmd/go/main.go:177 +0x750
goroutine 19 [syscall]:
os/signal.loop()
/tmp/buildlet-scatch465833892/go/src/os/signal/signal_unix.go:22 +0x1f
created by os/signal.init.1
/tmp/buildlet-scatch465833892/go/src/os/signal/signal_unix.go:28 +0x3e
goroutine 23 [syscall]:
syscall.Syscall(0x0, 0x6, 0xc2080fcae0, 0x8, 0x0, 0x8, 0x0)
/tmp/buildlet-scatch465833892/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.readlen(0x6, 0xc2080fcae0, 0x8, 0xf, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/syscall/zsyscall_linux_amd64.go:1085 +0x53
syscall.forkExec(0xc20800a880, 0x3d, 0xc20866e0e0, 0xe, 0xe, 0xc2080fccb0, 0x15d4, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/syscall/exec_unix.go:200 +0x56a
syscall.StartProcess(0xc20800a880, 0x3d, 0xc20866e0e0, 0xe, 0xe, 0xc2080fccb0, 0x1, 0x4, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/syscall/exec_unix.go:238 +0x6e
os.startProcess(0xc20800a880, 0x3d, 0xc20866e0e0, 0xe, 0xe, 0xc2080fcee8, 0x90a160, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/os/exec_posix.go:45 +0x33f
os.StartProcess(0xc20800a880, 0x3d, 0xc20866e0e0, 0xe, 0xe, 0xc2080fcee8, 0x0, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/os/doc.go:24 +0x6c
os/exec.(*Cmd).Start(0xc208670000, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/os/exec/exec.go:319 +0x76a
os/exec.(*Cmd).Run(0xc208670000, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/os/exec/exec.go:246 +0x34
main.(*builder).runOut(0xc2081399d0, 0xc208127100, 0x16, 0xc208127080, 0x17, 0x0, 0x0, 0x0, 0xc20866c000, 0xd, ...)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1902 +0x334
main.gcToolchain.gc(0xc2081399d0, 0xc208125400, 0xc208644b40, 0x30, 0xc20865e200, 0x34, 0xc208172600, 0xc20800e540, 0x2, 0x2, ...)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:2146 +0xf1e
main.(*gcToolchain).gc(0xbbcf70, 0xc2081399d0, 0xc208125400, 0xc208644b40, 0x30, 0xc20865e200, 0x34, 0x0, 0xc20800e540, 0x2, ...)
<autogenerated>:3 +0x191
main.(*builder).build(0xc2081399d0, 0xc208112d00, 0x0, 0x0)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1320 +0x2551
main.(*builder).do.func1(0xc208112d00)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1087 +0x3bc
main.(*builder).do.func2(0xc2086495a0, 0xc2081399d0, 0xc208649580)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1144 +0x158
created by main.(*builder).do
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1150 +0x3a1
goroutine 24 [select]:
main.(*builder).do.func2(0xc2086495a0, 0xc2081399d0, 0xc208649580)
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1134 +0x1d1
created by main.(*builder).do
/tmp/buildlet-scatch465833892/go/src/cmd/go/build.go:1150 +0x3a1
FAIL
FAIL runtime 25.490s
</code></pre></div>
<p dir="auto"><a href="http://build.golang.org/log/de2894c6b3b2b342cb66bd859be2c197e8e641ad" rel="nofollow">http://build.golang.org/log/de2894c6b3b2b342cb66bd859be2c197e8e641ad</a></p>
<p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/aclements/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/aclements">@aclements</a></p> | 1 |
<p dir="auto">We're due to release 0.13.1 in a few days (or as soon as we clear the queue),<br>
as a bugfix release stabilising 0.13.0, allowing us to start on the 3 month release cycle for 0.14.</p>
<p dir="auto">Anything that isn't in 0.13.1 will have to wait until then to hit pypi.</p>
<p dir="auto">Any objections, warnings or notes?</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jseabold/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jseabold">@jseabold</a> , <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yarikoptic/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yarikoptic">@yarikoptic</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/juliantaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/juliantaylor">@juliantaylor</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/takluyver/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/takluyver">@takluyver</a></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.read_csv('https://user-name:[email protected]:8080/get_content.csv')
# fails with urlopen error [Errno 11003] getaddrinfo failed Python2.7 as well as Python 3.x"><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">'https://user-name:[email protected]:8080/get_content.csv'</span>)
<span class="pl-c"># fails with urlopen error [Errno 11003] getaddrinfo failed Python2.7 as well as Python 3.x</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">HTTPS basic auth is very common. This URL format works in Excel, other text editors, etc. This url works in <code class="notranslate">requests </code> library. It seems like the scenario doesnt work because the underlying <code class="notranslate">urlopen</code> doesnt work</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# I think it fails because the underlying code here fails in pandas/io/common.py:
from urllib2 import urlopen as _urlopen
b = _urlopen('https://un-name:[email protected]:8080/get_content.csv')
# fails with urlopen error [Errno 11003] getaddrinfo failed"><pre class="notranslate"><span class="pl-c"># I think it fails because the underlying code here fails in pandas/io/common.py:</span>
<span class="pl-k">from</span> <span class="pl-s1">urllib2</span> <span class="pl-k">import</span> <span class="pl-s1">urlopen</span> <span class="pl-k">as</span> <span class="pl-s1">_urlopen</span>
<span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-en">_urlopen</span>(<span class="pl-s">'https://un-name:[email protected]:8080/get_content.csv'</span>)
<span class="pl-c"># fails with urlopen error [Errno 11003] getaddrinfo failed</span></pre></div>
<p dir="auto">see <a href="https://stackoverflow.com/questions/635113/python-urllib2-basic-http-authentication-and-tr-im" rel="nofollow">stackoverflow issue urllib basic auth</a><br>
Only way to overcome this is using <code class="notranslate">requests</code> + <code class="notranslate">StringIO</code> ?</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">be able to get a CSV loaded dataframe</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
python: 2.7.13.final.0
python-bits: 64
pandas: 0.20.1
</details> | 0 |
<p dir="auto">Example:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Component {
static all : Array<typeof Component>
static constructor() {
Component.all.push( this )
}
}
class MyButton extends {}
class MyCheckbox extends {}
class MyRadio extends {}
console.assert( Component.all[0] === MyButton , 'registration MyButton' )
console.assert( Component.all[1] === MyCheckbox , 'registration MyChackbox' )
console.assert( Component.all[2] === MyRadio , 'registration MyRadio' )"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Component</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-c1">all</span> : <span class="pl-smi">Array</span><span class="pl-kos"><</span><span class="pl-k">typeof</span> <span class="pl-smi">Component</span><span class="pl-kos">></span>
<span class="pl-k">static</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span> <span class="pl-smi">this</span> <span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">class</span> <span class="pl-smi">MyButton</span> <span class="pl-k">extends</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-k">class</span> <span class="pl-smi">MyCheckbox</span> <span class="pl-k">extends</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-k">class</span> <span class="pl-smi">MyRadio</span> <span class="pl-k">extends</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">assert</span><span class="pl-kos">(</span> <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span> <span class="pl-c1">===</span> <span class="pl-smi">MyButton</span> <span class="pl-kos">,</span> <span class="pl-s">'registration MyButton'</span> <span class="pl-kos">)</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">assert</span><span class="pl-kos">(</span> <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span> <span class="pl-c1">===</span> <span class="pl-smi">MyCheckbox</span> <span class="pl-kos">,</span> <span class="pl-s">'registration MyChackbox'</span> <span class="pl-kos">)</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">assert</span><span class="pl-kos">(</span> <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">]</span> <span class="pl-c1">===</span> <span class="pl-smi">MyRadio</span> <span class="pl-kos">,</span> <span class="pl-s">'registration MyRadio'</span> <span class="pl-kos">)</span></pre></div>
<p dir="auto">This not works. But we have workaround:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/// Support for static constructors
var __extends = ( Sub , Sup ) => {
for( var prop in Sup ) if( Sup.hasOwnProperty( prop ) ) Sub[ prop ] = Sup[ prop ]
Sub.prototype = Object.create( Sup.prototype )
Sub.prototype.constructor = Sub
if( Sub.initializer ) Sub.initializer()
};
class Component {
static all : Array<typeof Component> = []
static initializer() {
Component.all.push( this )
}
}
class MyButton extends Component {}
class MyCheckbox extends Component {}
class MyRadio extends Component {}
console.assert( Component.all[0] === MyButton , 'registration MyButton' )
console.assert( Component.all[1] === MyCheckbox , 'registration MyChackbox' )
console.assert( Component.all[2] === MyRadio , 'registration MyRadio' )"><pre class="notranslate"><span class="pl-c">/// Support for static constructors</span>
<span class="pl-k">var</span> <span class="pl-en">__extends</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span> <span class="pl-smi">Sub</span> <span class="pl-kos">,</span> <span class="pl-smi">Sup</span> <span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">for</span><span class="pl-kos">(</span> <span class="pl-k">var</span> <span class="pl-s1">prop</span> <span class="pl-k">in</span> <span class="pl-smi">Sup</span> <span class="pl-kos">)</span> <span class="pl-k">if</span><span class="pl-kos">(</span> <span class="pl-smi">Sup</span><span class="pl-kos">.</span><span class="pl-en">hasOwnProperty</span><span class="pl-kos">(</span> <span class="pl-s1">prop</span> <span class="pl-kos">)</span> <span class="pl-kos">)</span> <span class="pl-smi">Sub</span><span class="pl-kos">[</span> <span class="pl-s1">prop</span> <span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-smi">Sup</span><span class="pl-kos">[</span> <span class="pl-s1">prop</span> <span class="pl-kos">]</span>
<span class="pl-smi">Sub</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-c1">=</span> <span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span> <span class="pl-smi">Sup</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-kos">)</span>
<span class="pl-smi">Sub</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-c1">constructor</span> <span class="pl-c1">=</span> <span class="pl-smi">Sub</span>
<span class="pl-k">if</span><span class="pl-kos">(</span> <span class="pl-smi">Sub</span><span class="pl-kos">.</span><span class="pl-c1">initializer</span> <span class="pl-kos">)</span> <span class="pl-smi">Sub</span><span class="pl-kos">.</span><span class="pl-en">initializer</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">class</span> <span class="pl-smi">Component</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-c1">all</span> : <span class="pl-smi">Array</span><span class="pl-kos"><</span><span class="pl-k">typeof</span> <span class="pl-smi">Component</span><span class="pl-kos">></span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span>
<span class="pl-k">static</span> <span class="pl-en">initializer</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span> <span class="pl-smi">this</span> <span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">class</span> <span class="pl-smi">MyButton</span> <span class="pl-k">extends</span> <span class="pl-smi">Component</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-k">class</span> <span class="pl-smi">MyCheckbox</span> <span class="pl-k">extends</span> <span class="pl-smi">Component</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-k">class</span> <span class="pl-smi">MyRadio</span> <span class="pl-k">extends</span> <span class="pl-smi">Component</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">assert</span><span class="pl-kos">(</span> <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span> <span class="pl-c1">===</span> <span class="pl-smi">MyButton</span> <span class="pl-kos">,</span> <span class="pl-s">'registration MyButton'</span> <span class="pl-kos">)</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">assert</span><span class="pl-kos">(</span> <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span> <span class="pl-c1">===</span> <span class="pl-smi">MyCheckbox</span> <span class="pl-kos">,</span> <span class="pl-s">'registration MyChackbox'</span> <span class="pl-kos">)</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">assert</span><span class="pl-kos">(</span> <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">]</span> <span class="pl-c1">===</span> <span class="pl-smi">MyRadio</span> <span class="pl-kos">,</span> <span class="pl-s">'registration MyRadio'</span> <span class="pl-kos">)</span></pre></div>
<p dir="auto">But:</p>
<ul dir="auto">
<li>This is hack.</li>
<li><code class="notranslate">initializer</code> calls only on descendant classes.</li>
</ul>
<p dir="auto">We can use decorators:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Component {
static all : Array<typeof Component> = []
static register( comp : typeof Component ) {
Component.all.push( comp )
}
}
@ Component.register
class MyButton extends Component {}
@ Component.register
class MyCheckbox extends Component {}
@ Component.register
class MyRadio extends Component {}
console.assert( Component.all[0] === MyButton , 'registration MyButton' )
console.assert( Component.all[1] === MyCheckbox , 'registration MyChackbox' )
console.assert( Component.all[2] === MyRadio , 'registration MyRadio' )"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Component</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-c1">all</span> : <span class="pl-smi">Array</span><span class="pl-kos"><</span><span class="pl-k">typeof</span> <span class="pl-smi">Component</span><span class="pl-kos">></span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span>
<span class="pl-k">static</span> <span class="pl-en">register</span><span class="pl-kos">(</span> <span class="pl-s1">comp</span> : <span class="pl-k">typeof</span> <span class="pl-smi">Component</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span> <span class="pl-s1">comp</span> <span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
@ <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">register</span>
<span class="pl-k">class</span> <span class="pl-smi">MyButton</span> <span class="pl-k">extends</span> <span class="pl-smi">Component</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
@ <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">register</span>
<span class="pl-k">class</span> <span class="pl-smi">MyCheckbox</span> <span class="pl-k">extends</span> <span class="pl-smi">Component</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
@ <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">register</span>
<span class="pl-k">class</span> <span class="pl-smi">MyRadio</span> <span class="pl-k">extends</span> <span class="pl-smi">Component</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">assert</span><span class="pl-kos">(</span> <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span> <span class="pl-c1">===</span> <span class="pl-smi">MyButton</span> <span class="pl-kos">,</span> <span class="pl-s">'registration MyButton'</span> <span class="pl-kos">)</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">assert</span><span class="pl-kos">(</span> <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span> <span class="pl-c1">===</span> <span class="pl-smi">MyCheckbox</span> <span class="pl-kos">,</span> <span class="pl-s">'registration MyChackbox'</span> <span class="pl-kos">)</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">assert</span><span class="pl-kos">(</span> <span class="pl-smi">Component</span><span class="pl-kos">.</span><span class="pl-c1">all</span><span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">]</span> <span class="pl-c1">===</span> <span class="pl-smi">MyRadio</span> <span class="pl-kos">,</span> <span class="pl-s">'registration MyRadio'</span> <span class="pl-kos">)</span></pre></div>
<p dir="auto">But:</p>
<ul dir="auto">
<li>Too more code.</li>
<li>User may forget to register component and don't understand why his code not works.</li>
</ul> | <p dir="auto">A <strong>static constructor</strong> is a function that is run only once when the class is loaded. It can be used to initialize static class members and maybe as entry point to the application.</p>
<p dir="auto">Suggested syntax is:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyClass {
static initialized = false;
static constructor() {
MyClass.initialized = true;
}
}
alert(MyClass.initialized);"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">MyClass</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-c1">initialized</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span>
<span class="pl-k">static</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">MyClass</span><span class="pl-kos">.</span><span class="pl-c1">initialized</span> <span class="pl-c1">=</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-en">alert</span><span class="pl-kos">(</span><span class="pl-smi">MyClass</span><span class="pl-kos">.</span><span class="pl-c1">initialized</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">That would be same as the following:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyClass {
static initialized = false;
static __ctor = (() => {
MyClass.initialized = true;
})();
}
alert(MyClass.initialized);"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">MyClass</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-c1">initialized</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span>
<span class="pl-k">static</span> <span class="pl-c1">__ctor</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-smi">MyClass</span><span class="pl-kos">.</span><span class="pl-c1">initialized</span> <span class="pl-c1">=</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-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">alert</span><span class="pl-kos">(</span><span class="pl-smi">MyClass</span><span class="pl-kos">.</span><span class="pl-c1">initialized</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Except that <code class="notranslate">__ctor</code> does not need to be assigned to the class in the output code, and only needs to be invoked in an anonymous function. Also compiler can check that no more than one static constructor is defined in a class.</p>
<p dir="auto"><strong>Update:</strong> Since this generates an Immediately-Invoked Function Expression (IIFE), compiler should make sure to move it to the end of the class definition in the output JavaScript.</p>
<p dir="auto">TypeScript:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyClass {
static constructor() {
MyClass.initialized = true;
}
static initialized = false;
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">MyClass</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">MyClass</span><span class="pl-kos">.</span><span class="pl-c1">initialized</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">static</span> <span class="pl-c1">initialized</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">Expected JavaScript output:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var MyClass = (function () {
function MyClass() {
}
MyClass.initialized = false;
// run last
(function () {
MyClass.initialized = true;
})();
return MyClass;
})();"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-v">MyClass</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">function</span> <span class="pl-v">MyClass</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>
<span class="pl-v">MyClass</span><span class="pl-kos">.</span><span class="pl-c1">initialized</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span>
<span class="pl-c">// run last</span>
<span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-v">MyClass</span><span class="pl-kos">.</span><span class="pl-c1">initialized</span> <span class="pl-c1">=</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-kos">;</span>
<span class="pl-k">return</span> <span class="pl-v">MyClass</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">Note that body of the static constructor is moved to the bottom and invoked.</p>
<blockquote>
<p dir="auto">Related suggestion in codeplex: <a href="https://typescript.codeplex.com/workitem/862" rel="nofollow">Please add static constructors to classes</a></p>
</blockquote> | 1 |
<ul dir="auto">
<li>Electron Version: 2.0.1</li>
<li>Operating System (Platform and Version): MacOS 10.13.1</li>
<li>Last known working Electron version: 2.0.1</li>
</ul>
<p dir="auto"><strong>Expected Behavior</strong><br>
This error occurred when registered the shortcut in only meta key combination.<br>
For example, <kbd>CommandOrControl</kbd>+<kbd>Shift</kbd> or only <kbd>CommandOrControl</kbd></p>
<p dir="auto">The code is</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="globalShortcut.register('CommandOrControl+Shift', () => {
// …
})"><pre class="notranslate"><span class="pl-s1">globalShortcut</span><span class="pl-kos">.</span><span class="pl-en">register</span><span class="pl-kos">(</span><span class="pl-s">'CommandOrControl+Shift'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-c">// …</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">I expected it would work as other shortcut registration.</p>
<p dir="auto"><strong>Actual behavior</strong></p>
<p dir="auto">It occurs this error message.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Error processing argument at index 0, conversion failure from Shift+CommandOrControl
at registerFontShortcut (/repo-path/main.js:161:20)
at fonts.map.font (/repo-path/main.js:97:36)
at Array.map (<anonymous>)
at EventEmitter._electron.ipcMain.on (/repo-path/main.js:97:24)
at emitThree (events.js:136:13)
at EventEmitter.emit (events.js:217:7)
at WebContents.<anonymous> (/repo-path/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:286:13)
at emitTwo (events.js:126:13)
at WebContents.emit (events.js:214:7)"><pre class="notranslate"><code class="notranslate">TypeError: Error processing argument at index 0, conversion failure from Shift+CommandOrControl
at registerFontShortcut (/repo-path/main.js:161:20)
at fonts.map.font (/repo-path/main.js:97:36)
at Array.map (<anonymous>)
at EventEmitter._electron.ipcMain.on (/repo-path/main.js:97:24)
at emitThree (events.js:136:13)
at EventEmitter.emit (events.js:217:7)
at WebContents.<anonymous> (/repo-path/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:286:13)
at emitTwo (events.js:126:13)
at WebContents.emit (events.js:214:7)
</code></pre></div>
<p dir="auto"><strong>To Reproduce</strong></p>
<p dir="auto">Starting a electron app and using these accelerator combination can reproduce it.</p>
<p dir="auto"><strong>Additional Information</strong></p>
<p dir="auto">I think maybe it is the limitation of the OS. It’s weird to register only the meta key as shortcut.<br>
If it is not permitted by the OS, should add usage restrictions of this api?</p> | <ul dir="auto">
<li>Electron version: 1.6</li>
<li>Operating system: windows 10</li>
</ul>
<p dir="auto">I can't register a combination of modifiers as a global shortcut.</p>
<p dir="auto">When doing: <code class="notranslate">globalShortcut.register( "Shift+Super", someFunction );</code> I expect to have the function assigned to the Shift + Super key combination, but I get the following error:<br>
<code class="notranslate">TypeError: Error processing argument at index 0, conversion failure from Shift+Super</code></p>
<p dir="auto">From my experiments we get this error everytime the shortcut is a combination of modifier keys only.</p>
<p dir="auto">I don't think it's an OS limitation because I can assign the shortcut in another software.</p> | 1 |
<ul dir="auto">
<li>Electron version: 1.4.1</li>
<li>Operating system: macOS Sierra</li>
</ul>
<p dir="auto">Crash reporter do not send data. I got empty POST variable on server !</p> | <ul dir="auto">
<li>Electron version: 1.4.0</li>
<li>Operating system: Windows 7 64bit (using exe packaged by electron-builder for "win32 x64")</li>
</ul>
<p dir="auto">If the Crash reporter wants to send something it doesn't really send anything. In the Server logs nothing is there. And no crash report seems to be triggerd if I check last report.<br>
I call Crashreporter.start on following code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" autoUpdater.on("error", (err) => {
crashInit()
tray.displayBalloon({
title: 'Autoupdater',
content: 'Ein Fehler ist aufgetreten!'
})
})"><pre class="notranslate"><code class="notranslate"> autoUpdater.on("error", (err) => {
crashInit()
tray.displayBalloon({
title: 'Autoupdater',
content: 'Ein Fehler ist aufgetreten!'
})
})
</code></pre></div>
<p dir="auto">CrashInit is defined like that:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
function crashInit() {
crashReporter.start({
productName: 'Lornsenschule Vertretungsplan Desktop',
companyName: 'Nordgedanken.de',
submitURL: 'http://ls-crash-report-server.herokuapp.com',
autoSubmit: true
})
console.log(crashReporter.getLastCrashReport());
}"><pre class="notranslate"><code class="notranslate">
function crashInit() {
crashReporter.start({
productName: 'Lornsenschule Vertretungsplan Desktop',
companyName: 'Nordgedanken.de',
submitURL: 'http://ls-crash-report-server.herokuapp.com',
autoSubmit: true
})
console.log(crashReporter.getLastCrashReport());
}
</code></pre></div>
<p dir="auto">And yes I reuired all libaries (even I haven't included the imports in these code snippets).<br>
Also the tray notification shows up so It should be triggered.</p>
<p dir="auto">Any Ideas what goes wrong?</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 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 included all related issues and possible duplicate issues in this issue.</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 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 tried reproducing the issue on more than one message broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue with retries, ETA/Countdown & rate limits disabled.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: 4.2.1 (windowlicker) & 4.3.0rc1 (rhubarb)</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -> celery:4.2.1 (windowlicker) kombu:4.2.1 py:3.6.4
billiard:3.5.0.3 redis:2.10.6
platform -> system:Darwin arch:64bit imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:django-db"><pre class="notranslate"><code class="notranslate">software -> celery:4.2.1 (windowlicker) kombu:4.2.1 py:3.6.4
billiard:3.5.0.3 redis:2.10.6
platform -> system:Darwin arch:64bit imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:django-db
</code></pre></div>
<p dir="auto">and</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -> celery:4.3.0rc1 (rhubarb) kombu:4.3.0 py:3.6.4
billiard:3.6.0.0 py-amqp:2.4.1
platform -> system:Darwin arch:64bit
kernel version:18.2.0 imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:pyamqp results:disabled"><pre class="notranslate"><code class="notranslate">software -> celery:4.3.0rc1 (rhubarb) kombu:4.3.0 py:3.6.4
billiard:3.6.0.0 py-amqp:2.4.1
platform -> system:Darwin arch:64bit
kernel version:18.2.0 imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:pyamqp results:disabled
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<p dir="auto">Set up celery beat to run a task which has a custom queue configured (see example and the consequences below).</p>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.6.4</li>
<li><strong>Minimal Broker Version</strong>: redis 4.0.8 / rabbitmq 3.7.5</li>
<li><strong>Minimal Result Backend Version</strong>: Disabled / django 2.0.2</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: system:Darwin arch:64bit kernel version:18.2.0</li>
<li><strong>Minimal Broker Client Version</strong>: redis:2.10.6 / py-amqp:2.4.1</li>
<li><strong>Minimal Result Backend Client Version</strong>: Disabled / django-db</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp==2.4.1
billiard==3.5.0.5
celery==4.2.1
kombu==4.3.0
pytz==2018.9
vine==1.2.0"><pre class="notranslate"><code class="notranslate">amqp==2.4.1
billiard==3.5.0.5
celery==4.2.1
kombu==4.3.0
pytz==2018.9
vine==1.2.0
</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>
<p dir="auto">I couldn't figure a way to add the test to the integration tests; are there integration tests for celery beat?</p>
<p dir="auto">Repository for the source of the following example: <a href="https://github.com/asfaltboy/celery_reproduce_5355">https://github.com/asfaltboy/celery_reproduce_5355</a></p>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# tasks.py
from celery import Celery
from celery.signals import task_prerun
app = Celery('tasks', broker='pyamqp://guest@localhost//')
@app.task()
def add(x, y):
print(x + y)
return x + y
@app.task(queue='custom')
def multiply(x, y):
print(x * y)
return x * y
@task_prerun.connect()
def task_prerun(sender=None, task_id=None, task=None, **kwargs):
""" Log out some meta-info on the task being handled by worker """
print(
f"Handling {task.name} - {task_id} on queue: "
f"{sender.request.delivery_info['routing_key']}"
)
app.conf.beat_schedule = {
'add-every-2-seconds': {
'task': 'tasks.add',
'schedule': 2.0,
'args': (16, 16)
},
'multiple-every-2-seconds': {
'task': 'tasks.multiply',
'schedule': 2.0,
'args': (5, 5)
},
}
app.conf.timezone = 'UTC'"><pre class="notranslate"><span class="pl-c"># tasks.py</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-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">signals</span> <span class="pl-k">import</span> <span class="pl-s1">task_prerun</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">'tasks'</span>, <span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">'pyamqp://guest@localhost//'</span>)
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">task</span>()</span>
<span class="pl-k">def</span> <span class="pl-en">add</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>):
<span class="pl-en">print</span>(<span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-s1">y</span>)
<span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-s1">y</span>
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">task</span>(<span class="pl-s1">queue</span><span class="pl-c1">=</span><span class="pl-s">'custom'</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">multiply</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>):
<span class="pl-en">print</span>(<span class="pl-s1">x</span> <span class="pl-c1">*</span> <span class="pl-s1">y</span>)
<span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">*</span> <span class="pl-s1">y</span>
<span class="pl-en">@<span class="pl-s1">task_prerun</span>.<span class="pl-en">connect</span>()</span>
<span class="pl-k">def</span> <span class="pl-en">task_prerun</span>(<span class="pl-s1">sender</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">task</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>):
<span class="pl-s">""" Log out some meta-info on the task being handled by worker """</span>
<span class="pl-en">print</span>(
<span class="pl-s">f"Handling <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">task</span>.<span class="pl-s1">name</span><span class="pl-kos">}</span></span> - <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">task_id</span><span class="pl-kos">}</span></span> on queue: "</span>
<span class="pl-s">f"<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">sender</span>.<span class="pl-s1">request</span>.<span class="pl-s1">delivery_info</span>[<span class="pl-s">'routing_key'</span>]<span class="pl-kos">}</span></span>"</span>
)
<span class="pl-s1">app</span>.<span class="pl-s1">conf</span>.<span class="pl-s1">beat_schedule</span> <span class="pl-c1">=</span> {
<span class="pl-s">'add-every-2-seconds'</span>: {
<span class="pl-s">'task'</span>: <span class="pl-s">'tasks.add'</span>,
<span class="pl-s">'schedule'</span>: <span class="pl-c1">2.0</span>,
<span class="pl-s">'args'</span>: (<span class="pl-c1">16</span>, <span class="pl-c1">16</span>)
},
<span class="pl-s">'multiple-every-2-seconds'</span>: {
<span class="pl-s">'task'</span>: <span class="pl-s">'tasks.multiply'</span>,
<span class="pl-s">'schedule'</span>: <span class="pl-c1">2.0</span>,
<span class="pl-s">'args'</span>: (<span class="pl-c1">5</span>, <span class="pl-c1">5</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">'UTC'</span></pre></div>
<p dir="auto">We launch the worker and beat (in sepearate windows):</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ pythonloc -m celery -A tasks worker -Q celery,custom
$ pythonloc -m celery -A tasks beat"><pre class="notranslate">$ pythonloc -m celery -A tasks worker -Q celery,custom
$ pythonloc -m celery -A tasks beat</pre></div>
<p dir="auto">And we prepare a script to schedule the tasks:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# run_delay.py
from tasks import add, multiply
print(add.delay(4, 4))
print(multiply.delay(2, 2))"><pre class="notranslate"><span class="pl-c"># run_delay.py</span>
<span class="pl-k">from</span> <span class="pl-s1">tasks</span> <span class="pl-k">import</span> <span class="pl-s1">add</span>, <span class="pl-s1">multiply</span>
<span class="pl-en">print</span>(<span class="pl-s1">add</span>.<span class="pl-en">delay</span>(<span class="pl-c1">4</span>, <span class="pl-c1">4</span>))
<span class="pl-en">print</span>(<span class="pl-s1">multiply</span>.<span class="pl-en">delay</span>(<span class="pl-c1">2</span>, <span class="pl-c1">2</span>))</pre></div>
<p dir="auto">The result of running <code class="notranslate">add</code> and <code class="notranslate">multiply</code> tasks by first calling <code class="notranslate">delay()</code> and then from beat:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[2019-02-22 22:37:19,666: WARNING/ForkPoolWorker-2] Handling tasks.add - d159d2cf-6135-49ba-ab81-f51ef0a52c47 on queue: celery
[2019-02-22 22:37:19,667: WARNING/ForkPoolWorker-2] 8
[2019-02-22 22:37:19,668: WARNING/ForkPoolWorker-1] Handling tasks.multiply - a1f09a7b-0a4c-4792-a35e-de705ed632f7 on queue: custom
[2019-02-22 22:37:19,669: WARNING/ForkPoolWorker-1] 4
[2019-02-22 22:37:21,955: WARNING/ForkPoolWorker-2] Handling tasks.add - ad8adc92-d190-4edc-9679-64e079e0076d on queue: celery
[2019-02-22 22:37:21,955: WARNING/ForkPoolWorker-2] 32
[2019-02-22 22:37:21,958: WARNING/ForkPoolWorker-1] Handling tasks.multiply - 476691f5-fe61-47d7-a7d3-431a63c530b6 on queue: custom
[2019-02-22 22:37:21,958: WARNING/ForkPoolWorker-1] 25"><pre class="notranslate">[2019-02-22 22:37:19,666: WARNING/ForkPoolWorker-2] Handling tasks.add - d159d2cf-6135-49ba-ab81-f51ef0a52c47 on queue: celery
[2019-02-22 22:37:19,667: WARNING/ForkPoolWorker-2] 8
[2019-02-22 22:37:19,668: WARNING/ForkPoolWorker-1] Handling tasks.multiply - a1f09a7b-0a4c-4792-a35e-de705ed632f7 on queue: custom
[2019-02-22 22:37:19,669: WARNING/ForkPoolWorker-1] 4
[2019-02-22 22:37:21,955: WARNING/ForkPoolWorker-2] Handling tasks.add - ad8adc92-d190-4edc-9679-64e079e0076d on queue: celery
[2019-02-22 22:37:21,955: WARNING/ForkPoolWorker-2] 32
[2019-02-22 22:37:21,958: WARNING/ForkPoolWorker-1] Handling tasks.multiply - 476691f5-fe61-47d7-a7d3-431a63c530b6 on queue: custom
[2019-02-22 22:37:21,958: WARNING/ForkPoolWorker-1] 25</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">We expect both delay and beat to use the given task's queue option, as supplied to the task decorator (e.g <code class="notranslate">custom</code> for our multiply task).</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">Calling delay respects the given queue and runs the task in workers that consume from that queue. However, celery beat only scheduled the tasks on the default "celery" queue disregarding the <code class="notranslate">queue=</code> option of the task, thus not being consumed by workers consuming from the <code class="notranslate">custom</code> queue.</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 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>[X ] 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>[X ] 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>[X ] 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>: 4.3.0</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><p dir="auto">-------------- celery@Parths-MacBook-Pro v4.3.0 (rhubarb)<br>
---- **** -----<br>
--- * *** * -- Darwin-18.2.0-x86_64-i386-64bit 2019-07-02 21:57:47<br>
-- * - **** ---</p>
<ul dir="auto">
<li>** ---------- [config]</li>
<li>** ---------- .> app: default:0x10fe5bba8 (.default.Loader)</li>
<li>** ---------- .> transport: amqp://guest:**<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/localhost/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/localhost">@localhost</a>:5672//</li>
<li>** ---------- .> results: redis://localhost/</li>
<li>*** --- * --- .> concurrency: 8 (prefork)<br>
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)<br>
--- ***** -----<br>
-------------- [queues]<br>
.> celery exchange=celery(direct) key=celery</li>
</ul>
<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</li>
<li><strong>Minimal Celery Version</strong>: 4.3.0</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: rabbitmq 3.7</li>
<li><strong>Minimal Result Backend Version</strong>: Redis 3.2.1</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A</li>
<li><strong>Minimal Broker Client Version</strong>: N/A</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
from celery import current_app
</p><p dir="auto">import os<br>
import json</p>
<p dir="auto">RABBITMQ_URL = os.getenv('RABBITMQ_URL', 'amqp://localhost')<br>
REDIS_URL = os.getenv('REDIS_URL', 'redis://localhost')</p>
<p dir="auto">CELERY_GLOBAL_CONFIG = {<br>
'accept_content': ['json'],<br>
'enable_utc': True,<br>
}</p>
<p dir="auto">CELERY_BROKER_CONFIG = {<br>
'broker_url': RABBITMQ_URL,<br>
'task_queue_ha_policy': 'all', # replicate queue to all broker nodes<br>
}</p>
<p dir="auto">CELERY_RESULT_BACKEND_CONFIG = {<br>
'result_backend': REDIS_URL,<br>
'result_compression': 'gzip',<br>
'result_serializer': 'json',<br>
'result_chord_join_timeout': 60*120, # 2hrs<br>
}</p>
<p dir="auto">CELERY_TASK_CONFIG = {<br>
'task_serializer': 'json',<br>
'task_time_limit': 60*240, # 4hrs<br>
'task_routes': json.load(open('src/task_routes.json', 'rb')),<br>
}</p>
<p dir="auto">current_app.conf.update(CELERY_GLOBAL_CONFIG)<br>
current_app.conf.update(CELERY_BROKER_CONFIG)<br>
current_app.conf.update(CELERY_RESULT_BACKEND_CONFIG)<br>
current_app.conf.update(CELERY_TASK_CONFIG)</p>
<p dir="auto"></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="@app.task
def consumer(doc_list, **kwargs):
chord([process_document.s(doc) for doc in doc_list])(aggregate.s())
@app.task
def process_document(doc):
return output
@app.task
def aggregate(document_outputs):
request.post(url, document_outputs, timeout=120)"><pre class="notranslate"><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">consumer</span>(<span class="pl-s1">doc_list</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>):
<span class="pl-en">chord</span>([<span class="pl-s1">process_document</span>.<span class="pl-en">s</span>(<span class="pl-s1">doc</span>) <span class="pl-k">for</span> <span class="pl-s1">doc</span> <span class="pl-c1">in</span> <span class="pl-s1">doc_list</span>])(<span class="pl-s1">aggregate</span>.<span class="pl-en">s</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">process_document</span>(<span class="pl-s1">doc</span>):
<span class="pl-k">return</span> <span class="pl-s1">output</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">aggregate</span>(<span class="pl-s1">document_outputs</span>):
<span class="pl-s1">request</span>.<span class="pl-en">post</span>(<span class="pl-s1">url</span>, <span class="pl-s1">document_outputs</span>, <span class="pl-s1">timeout</span><span class="pl-c1">=</span><span class="pl-c1">120</span>)</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">I expect the aggregate callback to be called consistently after processing all the documents.</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">The aggregate callback is ONLY called when there are 1 or 2 documents, but not consistently called for any number of documents, even though headers are completing successfully.</p> | 0 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/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">When list is long in Dialog, it should have vertical scroll bar in dialog. This works well in Chrome and Firefox.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto"><a href="https://material-ui-1dab0.firebaseapp.com/demos/dialogs/" rel="nofollow">https://material-ui-1dab0.firebaseapp.com/demos/dialogs/</a> the Confirmation Dialogs demo.<br>
when open in ie 11, the vertical scroll bar doesn't work. it lists all items which push buttons out of page.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>open <a href="https://material-ui-1dab0.firebaseapp.com/demos/dialogs/" rel="nofollow">https://material-ui-1dab0.firebaseapp.com/demos/dialogs/</a> in IE 11</li>
<li>Click Confirmation dialogs demo. (Phone ringtone example)</li>
<li></li>
<li></li>
</ol>
<h2 dir="auto">Context</h2>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>current demo version</td>
</tr>
<tr>
<td>React</td>
<td>current demo version</td>
</tr>
<tr>
<td>browser</td>
<td>IE 11.0.9600</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Context</h2>
<p dir="auto">I think categorizing the components by use case, something like what <a href="https://ant.design/docs/react/introduce" rel="nofollow">Ant design</a> are doing with having navigation, data entry, data display categories etc. will be a nice improvement for having an easier time getting through the list of component demos/API.</p> | 0 |
<p dir="auto">This may be a result of being an early user (or something I did wrong), if so, feel free to #wontfix, but if I right click an MD file and select "open with" to open in Chrome on OS X, I get what I believe to be every version ever installed as an option. Verified in Applications that only one version exists, as far as I can tell:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/282759/3165928/da6abb92-eb5a-11e3-88ef-42c84c5386fe.png"><img src="https://cloud.githubusercontent.com/assets/282759/3165928/da6abb92-eb5a-11e3-88ef-42c84c5386fe.png" alt="screen shot 2014-06-03 at 4 07 31 pm" style="max-width: 100%;"></a></p> | <p dir="auto">support/6be6d1eaa44911e38bd5c0467822a465?page=1</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/083b5472896f2ccf565018dcb5fdeacf09ee817001e0d49eb7382c48c4ff401c/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313437362f323335323632332f39346132616131652d613538652d313165332d383933322d6632383562656465643662352e706e67"><img src="https://camo.githubusercontent.com/083b5472896f2ccf565018dcb5fdeacf09ee817001e0d49eb7382c48c4ff401c/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313437362f323335323632332f39346132616131652d613538652d313165332d383933322d6632383562656465643662352e706e67" alt="screen shot 2014-03-06 at 4 21 49 pm" data-canonical-src="https://f.cloud.github.com/assets/1476/2352623/94a2aa1e-a58e-11e3-8932-f285beded6b5.png" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">I'm encountering the same bug reported in <a href="https://issues.apache.org/jira/browse/AIRFLOW-3534" rel="nofollow">https://issues.apache.org/jira/browse/AIRFLOW-3534</a>, with airflow 1.10.12.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2020-11-06 13:03:29,672] {pod_launcher.py:173} INFO - Event: fetcher-56104d81c54946a88ce3cd1cf4273477 had an event of type Pending
[2020-11-06 13:03:29,673] {pod_launcher.py:139} WARNING - Pod not yet started: fetcher-56104d81c54946a88ce3cd1cf4273477
[2020-11-06 13:03:30,681] {pod_launcher.py:173} INFO - Event: fetcher-56104d81c54946a88ce3cd1cf4273477 had an event of type Pending
[2020-11-06 13:03:30,681] {pod_launcher.py:139} WARNING - Pod not yet started: fetcher-56104d81c54946a88ce3cd1cf4273477
[2020-11-06 13:03:31,692] {pod_launcher.py:173} INFO - Event: fetcher-56104d81c54946a88ce3cd1cf4273477 had an event of type Pending
[2020-11-06 13:03:31,692] {pod_launcher.py:139} WARNING - Pod not yet started: fetcher-56104d81c54946a88ce3cd1cf4273477
[2020-11-06 13:03:32,702] {pod_launcher.py:173} INFO - Event: fetcher-56104d81c54946a88ce3cd1cf4273477 had an event of type Running
[2020-11-06 13:04:32,740] {taskinstance.py:1150} ERROR - ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
Traceback (most recent call last):
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 696, in _update_chunk_length
self.chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 436, in _error_catcher
yield
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 763, in read_chunked
self._update_chunk_length()
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 700, in _update_chunk_length
raise httplib.IncompleteRead(line)
http.client.IncompleteRead: IncompleteRead(0 bytes read)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/airflow/models/taskinstance.py", line 979, in _run_raw_task
result = task_copy.execute(context=context)
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/airflow/contrib/operators/kubernetes_pod_operator.py", line 284, in execute
final_state, _, result = self.create_new_pod_for_operator(labels, launcher)
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/airflow/contrib/operators/kubernetes_pod_operator.py", line 403, in create_new_pod_for_operator
final_state, result = launcher.monitor_pod(pod=pod, get_logs=self.get_logs)
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/airflow/kubernetes/pod_launcher.py", line 155, in monitor_pod
for line in logs:
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 807, in __iter__
for chunk in self.stream(decode_content=True):
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 571, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 792, in read_chunked
self._original_response.close()
File "/opt/bitnami/python/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 454, in _error_catcher
raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
[2020-11-06 13:04:32,743] {taskinstance.py:1194} INFO - Marking task as UP_FOR_RETRY. dag_id=..., task_id=..., execution_date=20201106T120000, start_date=20201106T130329, end_date=20201106T130432
[2020-11-06 13:04:34,641] {local_task_job.py:102} INFO - Task exited with return code 1"><pre class="notranslate"><code class="notranslate">[2020-11-06 13:03:29,672] {pod_launcher.py:173} INFO - Event: fetcher-56104d81c54946a88ce3cd1cf4273477 had an event of type Pending
[2020-11-06 13:03:29,673] {pod_launcher.py:139} WARNING - Pod not yet started: fetcher-56104d81c54946a88ce3cd1cf4273477
[2020-11-06 13:03:30,681] {pod_launcher.py:173} INFO - Event: fetcher-56104d81c54946a88ce3cd1cf4273477 had an event of type Pending
[2020-11-06 13:03:30,681] {pod_launcher.py:139} WARNING - Pod not yet started: fetcher-56104d81c54946a88ce3cd1cf4273477
[2020-11-06 13:03:31,692] {pod_launcher.py:173} INFO - Event: fetcher-56104d81c54946a88ce3cd1cf4273477 had an event of type Pending
[2020-11-06 13:03:31,692] {pod_launcher.py:139} WARNING - Pod not yet started: fetcher-56104d81c54946a88ce3cd1cf4273477
[2020-11-06 13:03:32,702] {pod_launcher.py:173} INFO - Event: fetcher-56104d81c54946a88ce3cd1cf4273477 had an event of type Running
[2020-11-06 13:04:32,740] {taskinstance.py:1150} ERROR - ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
Traceback (most recent call last):
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 696, in _update_chunk_length
self.chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 436, in _error_catcher
yield
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 763, in read_chunked
self._update_chunk_length()
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 700, in _update_chunk_length
raise httplib.IncompleteRead(line)
http.client.IncompleteRead: IncompleteRead(0 bytes read)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/airflow/models/taskinstance.py", line 979, in _run_raw_task
result = task_copy.execute(context=context)
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/airflow/contrib/operators/kubernetes_pod_operator.py", line 284, in execute
final_state, _, result = self.create_new_pod_for_operator(labels, launcher)
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/airflow/contrib/operators/kubernetes_pod_operator.py", line 403, in create_new_pod_for_operator
final_state, result = launcher.monitor_pod(pod=pod, get_logs=self.get_logs)
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/airflow/kubernetes/pod_launcher.py", line 155, in monitor_pod
for line in logs:
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 807, in __iter__
for chunk in self.stream(decode_content=True):
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 571, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 792, in read_chunked
self._original_response.close()
File "/opt/bitnami/python/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/bitnami/airflow/venv/lib/python3.6/site-packages/urllib3/response.py", line 454, in _error_catcher
raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
[2020-11-06 13:04:32,743] {taskinstance.py:1194} INFO - Marking task as UP_FOR_RETRY. dag_id=..., task_id=..., execution_date=20201106T120000, start_date=20201106T130329, end_date=20201106T130432
[2020-11-06 13:04:34,641] {local_task_job.py:102} INFO - Task exited with return code 1
</code></pre></div>
<p dir="auto">The bug goes away by setting <code class="notranslate">get_logs=False</code> in the KubernetesPodOperator. Reproduced with multiple dags and tasks.</p> | <h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.2.3 (latest released)</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">In the configuration file, we specified a <code class="notranslate">sql_alchemy_conn_cmd</code> so that the main sql alchemy connection is loaded from a command. However, when using such a configuration and running any dag / task, we get the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet Traceback (most recent call last):
[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet File "/u/peep/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet self.dialect.do_execute(
[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet File "/u/peep/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet cursor.execute(statement, parameters)
[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet sqlite3.OperationalError: no such table: dag_run"><pre class="notranslate"><code class="notranslate">[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet Traceback (most recent call last):
[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet File "/u/peep/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet self.dialect.do_execute(
[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet File "/u/peep/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet cursor.execute(statement, parameters)
[2022-02-16, 06:14:09 UTC] {base_task_runner.py:117} INFO - Job 366: Subtask greet sqlite3.OperationalError: no such table: dag_run
</code></pre></div>
<h3 dir="auto">What you expected to happen</h3>
<p dir="auto">Tasks should run without error when using <code class="notranslate">sql_alchemy_conn_cmd</code></p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Use a sql_alchemy_conn_cmd file, and any task that you run will try to use sqlite instead of the configured database connection and cause all sorts of havoc.</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">focal 20.04.3</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apache-airflow-providers-celery==2.1.0
apache-airflow-providers-docker==2.3.0
apache-airflow-providers-ftp==2.0.1
apache-airflow-providers-http==2.0.1
apache-airflow-providers-imap==2.0.1
apache-airflow-providers-jdbc==2.0.1
apache-airflow-providers-mysql==2.1.1
apache-airflow-providers-odbc==2.0.1
apache-airflow-providers-oracle==2.0.1
apache-airflow-providers-redis==2.0.1
apache-airflow-providers-slack==4.1.0
apache-airflow-providers-sqlite==2.0.1
apache-airflow-providers-vertica==2.0.1```
### Deployment
Virtualenv installation
### Deployment details
apache installed on a four ec2 instances in aws (2 master, 2 worker).
### Anything else
This problem occurs because of commit a90878cf660ffe73973b4e4487c1e691cc212925 where the `include_cmds` flag is set to `False`.
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)"><pre lang="apache-airflow-providers-amazon==2.2.0" class="notranslate"><code class="notranslate">apache-airflow-providers-celery==2.1.0
apache-airflow-providers-docker==2.3.0
apache-airflow-providers-ftp==2.0.1
apache-airflow-providers-http==2.0.1
apache-airflow-providers-imap==2.0.1
apache-airflow-providers-jdbc==2.0.1
apache-airflow-providers-mysql==2.1.1
apache-airflow-providers-odbc==2.0.1
apache-airflow-providers-oracle==2.0.1
apache-airflow-providers-redis==2.0.1
apache-airflow-providers-slack==4.1.0
apache-airflow-providers-sqlite==2.0.1
apache-airflow-providers-vertica==2.0.1```
### Deployment
Virtualenv installation
### Deployment details
apache installed on a four ec2 instances in aws (2 master, 2 worker).
### Anything else
This problem occurs because of commit a90878cf660ffe73973b4e4487c1e691cc212925 where the `include_cmds` flag is set to `False`.
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
</code></pre></div> | 0 |
<p dir="auto">I have an indexed BufferGeometry and indexed set of uvs. I have been unsuccessfully trying to pass uv coordinates per face per vertex to the vertex shader as it seems that BufferGeometry expects exactly one uv vertex per geometry vertex.</p>
<p dir="auto">I resorted to using Geometry.fromBufferGeometry and then populating the faceVertexUvs array but there's a lot of overhead involved.</p>
<p dir="auto">Judging by <a href="http://stackoverflow.com/questions/25874926/buffergeometry-always-creates-flatshading-normals-i-need-smoothshading" rel="nofollow">http://stackoverflow.com/questions/25874926/buffergeometry-always-creates-flatshading-normals-i-need-smoothshading</a>, it seems this is not supported yet, is that right?</p>
<p dir="auto">A vertex is basically just a set of attributes, so it doesn't seem that easy to implement (you probably need to duplicate vertices where necessary), do you have ideas in this direction?</p> | <p dir="auto">Hi guys,</p>
<p dir="auto">I wanted to try and contribute to Three.js and this thread is for discussing about the stuff i wrote.</p>
<p dir="auto">The questions that are open:</p>
<ol dir="auto">
<li>Do you want to use this functionality or do you think three.js needs it?</li>
<li>What do you think of my algorithm. I was hoping for some guys to check the functions and maybe try to optimize the functionalty in case question 1) is "yes" ;)</li>
</ol>
<hr>
<p dir="auto">What i caught missing in THree.js is the functionality to smooth dynamically generated geometries based on an angle. (like in 3dsMax for example)<br>
If the angle between two face normals is smaller than 'angle' the faces get smothed and the vertex normal accounts for that smoothing.</p>
<p dir="auto">I forked the three.js repository and created a new branch.</p>
<p dir="auto">I provide an example in my github fork:<br>
<a href="https://github.com/GuyGood/three.js/blob/AngleBasedSmoothing/examples/webgl_geometry_smoothing.html">https://github.com/GuyGood/three.js/blob/AngleBasedSmoothing/examples/webgl_geometry_smoothing.html</a></p>
<p dir="auto">The example compares an extruded geometry with bevel applied.<br>
left: unsmoothed as is, middle: my angle based smoothing, 25°, right: computeVertexNormals(true)<br>
<a href="http://img109.imageshack.us/img109/3081/v0jc.png" rel="nofollow">http://img109.imageshack.us/img109/3081/v0jc.png</a></p>
<p dir="auto">As I put all my code into Three.GeometryUtils without rebuilding, my example directly uses GeometryUtils.js script.</p>
<h2 dir="auto">New stuff to GeometryUtils briefly explained:</h2>
<p dir="auto">So, i added the function "calculateVertexNormals" (should then be renamed to sth else).<br>
It firsts creates new vector3 objects for every vertexNormal for every face of the mesh. (just for having everything at zero).</p>
<p dir="auto">It then fills an array 'adjacentNormals' with objects so that it contains a face and the vertexNormal, and an empty array for the smoothingGroup stuffs for later on.</p>
<p dir="auto">then there is the helper method _sortAdjacentFaces. This is because what i am going to do is iterate over all vertices and check all faces connected to one vertex , so to say in a circular manner. And if i don't sort the array beforehand, i would compare faces, connected to the vertex that do NOT share one edge, which would be no good. As a side note, the last iteration compares the last and first face of the vertex in question.</p>
<p dir="auto">After sorting, the algorithm gets the angle between the faces and checks if it is <= the user defined angle. if it is, it will generate 'smoothing groups' . These groups are local to each vertex and do not work like in 3dsMax for example. They are just for knowing which facenormal from which face to take into account for the vertex normal calculation.</p>
<p dir="auto">After having calculated the groups and based on them, the vertexNormal is calculated using the helper function: '_calculateVectorSumsForSmoothingGroups'</p>
<p dir="auto">This function is much like the "computeVertexNormal" from geometries but is always area weighted, so normals are accumulated but not normalized within there.</p>
<p dir="auto">Finally, normalize the vertex normals and we are done.</p>
<hr>
<p dir="auto">I hope i could explain some of the stuff and maybe you like the general idea. I am just proposing some code for review because although it works, there are for sure 2-3 small issues and maybe it can be greatly optimized.<br>
p.s. i know the code is for sure not nice to read but i hope you like the feature anyway and want to have a discussion about it.</p>
<p dir="auto">Thanks in Advance</p> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="➜ matrix-rs git:(master) ✗ RUST_BACKTRACE=1 cargo build --verbose
Fresh rustc-serialize v0.2.4
Fresh num v0.1.5
Compiling matrix-rs v0.0.1 (file:///home/rvlander/CloudStation/WIP/matrix-rs)
Running `rustc /home/rvlander/CloudStation/WIP/matrix-rs/src/lib.rs --crate-name matrix-rs --crate-type lib -g -C metadata=911cbf09ca74d9fa -C extra-filename=-911cbf09ca74d9fa --out-dir /home/rvlander/CloudStation/WIP/matrix-rs/target --emit=dep-info,link -L /home/rvlander/CloudStation/WIP/matrix-rs/target -L /home/rvlander/CloudStation/WIP/matrix-rs/target/deps --extern num=/home/rvlander/CloudStation/WIP/matrix-rs/target/deps/libnum-99d6507e3aad728a.rlib`
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:54:1: 58:2 error: internal compiler error: impl `VtableImpl(impl_def_id=DefId { krate: 0, node: 1042 }:matrix::dense_matrix::DenseMatrix<T>.Add, substs=Substs[types=[[_];[];[]], regions=[[];[];[]]], nested=[[Obligation(predicate=Binder(TraitPredicate(TraitRef(T, core::kinds::Sized))),depth=1), Obligation(predicate=Binder(TraitPredicate(TraitRef(T, core::kinds::Copy))),depth=1), Obligation(predicate=Binder(TraitPredicate(TraitRef(T, core::ops::Add))),depth=1)];[];[]])` did not contain projection for `Obligation(predicate=<matrix::dense_matrix::DenseMatrix<T> as TraitRef(matrix::dense_matrix::DenseMatrix<T>, core::ops::Add)>::Output,depth=0)`
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:54 impl <T: Add<T> + Copy> Add for DenseMatrix<T> {
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:55 fn add(self, rhs: DenseMatrix<T>) -> DenseMatrix<T> {
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:56 self.__add(rhs)
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:57 }
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:58 }
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:123
stack backtrace:
1: 0x7f7c86e9b920 - sys::backtrace::write::h36422e877a8b3158yQs
2: 0x7f7c86ec1650 - failure::on_fail::hde5005d61795902da3y
3: 0x7f7c86e274a0 - rt::unwind::begin_unwind_inner::ha0668a3a9d73b9a7RHy
4: 0x7f7c81d00af0 - rt::unwind::begin_unwind::h9147230717703493418
5: 0x7f7c81d00a80 - diagnostic::SpanHandler::span_bug::hee7de6e88971705bDFF
6: 0x7f7c851fbc70 - middle::traits::project::project_type::ha3169b6d00cba236CYP
7: 0x7f7c851f8dd0 - middle::traits::project::opt_normalize_projection_type::h52e80e1c888609adFQP
8: 0x7f7c851e6890 - middle::traits::project::normalize_projection_type::had1d9d27edaeb68fgPP
9: 0x7f7c851fa270 - middle::traits::project::AssociatedTypeNormalizer<'a, 'b, 'tcx>.TypeFolder<'tcx>::fold_ty::h8977cf1010cf2ef8RNP
10: 0x7f7c864b7990 - middle::ty_fold::TypeFolder::fold_trait_ref::h15244371943192340039
11: 0x7f7c864b85c0 - middle::ty_fold::VecPerParamSpace<T>.TypeFoldable<'tcx>::fold_with::h3029018912722243389
12: 0x7f7c864d3b40 - check::FnCtxt<'a, 'tcx>::instantiate_bounds::haf69ce16fdf22227Nul
13: 0x7f7c864ec870 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::check_impl::closure.30018
14: 0x7f7c864e8ce0 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::with_fcx::h0df2a1129da2a633Hfi
15: 0x7f7c864ef760 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::hc72c9294b1b3f21ftoi
16: 0x7f7c864f15c0 - visit::walk_mod::h2450081392115226323
17: 0x7f7c864ef760 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::hc72c9294b1b3f21ftoi
18: 0x7f7c864f15c0 - visit::walk_mod::h2450081392115226323
19: 0x7f7c864ef760 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::hc72c9294b1b3f21ftoi
20: 0x7f7c866ddbd0 - check_crate::unboxed_closure.40283
21: 0x7f7c866d8820 - check_crate::h4ba306a17295b431iux
22: 0x7f7c873dc600 - driver::phase_3_run_analysis_passes::h56810662503f92d8Sva
23: 0x7f7c873caaa0 - driver::compile_input::h8d0abf631800220evba
24: 0x7f7c87496070 - thunk::F.Invoke<A, R>::invoke::h13263903969514368718
25: 0x7f7c87494e20 - rt::unwind::try::try_fn::h2272437873322108176
26: 0x7f7c86f258b0 - rust_try_inner
27: 0x7f7c86f258a0 - rust_try
28: 0x7f7c87495170 - thunk::F.Invoke<A, R>::invoke::h17236552692728063371
29: 0x7f7c86ead490 - sys::thread::thread_start::hd19c7749b7af23e8EGv
30: 0x7f7c81525250 - start_thread
31: 0x7f7c86ae2219 - clone
32: 0x0 - <unknown>
Could not compile `matrix-rs`.
Caused by:
Process didn't exit successfully: `rustc /home/rvlander/CloudStation/WIP/matrix-rs/src/lib.rs --crate-name matrix-rs --crate-type lib -g -C metadata=911cbf09ca74d9fa -C extra-filename=-911cbf09ca74d9fa --out-dir /home/rvlander/CloudStation/WIP/matrix-rs/target --emit=dep-info,link -L /home/rvlander/CloudStation/WIP/matrix-rs/target -L /home/rvlander/CloudStation/WIP/matrix-rs/target/deps --extern num=/home/rvlander/CloudStation/WIP/matrix-rs/target/deps/libnum-99d6507e3aad728a.rlib` (status=101)"><pre class="notranslate"><code class="notranslate">➜ matrix-rs git:(master) ✗ RUST_BACKTRACE=1 cargo build --verbose
Fresh rustc-serialize v0.2.4
Fresh num v0.1.5
Compiling matrix-rs v0.0.1 (file:///home/rvlander/CloudStation/WIP/matrix-rs)
Running `rustc /home/rvlander/CloudStation/WIP/matrix-rs/src/lib.rs --crate-name matrix-rs --crate-type lib -g -C metadata=911cbf09ca74d9fa -C extra-filename=-911cbf09ca74d9fa --out-dir /home/rvlander/CloudStation/WIP/matrix-rs/target --emit=dep-info,link -L /home/rvlander/CloudStation/WIP/matrix-rs/target -L /home/rvlander/CloudStation/WIP/matrix-rs/target/deps --extern num=/home/rvlander/CloudStation/WIP/matrix-rs/target/deps/libnum-99d6507e3aad728a.rlib`
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:54:1: 58:2 error: internal compiler error: impl `VtableImpl(impl_def_id=DefId { krate: 0, node: 1042 }:matrix::dense_matrix::DenseMatrix<T>.Add, substs=Substs[types=[[_];[];[]], regions=[[];[];[]]], nested=[[Obligation(predicate=Binder(TraitPredicate(TraitRef(T, core::kinds::Sized))),depth=1), Obligation(predicate=Binder(TraitPredicate(TraitRef(T, core::kinds::Copy))),depth=1), Obligation(predicate=Binder(TraitPredicate(TraitRef(T, core::ops::Add))),depth=1)];[];[]])` did not contain projection for `Obligation(predicate=<matrix::dense_matrix::DenseMatrix<T> as TraitRef(matrix::dense_matrix::DenseMatrix<T>, core::ops::Add)>::Output,depth=0)`
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:54 impl <T: Add<T> + Copy> Add for DenseMatrix<T> {
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:55 fn add(self, rhs: DenseMatrix<T>) -> DenseMatrix<T> {
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:56 self.__add(rhs)
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:57 }
/home/rvlander/CloudStation/WIP/matrix-rs/src/matrix/dense_matrix.rs:58 }
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:123
stack backtrace:
1: 0x7f7c86e9b920 - sys::backtrace::write::h36422e877a8b3158yQs
2: 0x7f7c86ec1650 - failure::on_fail::hde5005d61795902da3y
3: 0x7f7c86e274a0 - rt::unwind::begin_unwind_inner::ha0668a3a9d73b9a7RHy
4: 0x7f7c81d00af0 - rt::unwind::begin_unwind::h9147230717703493418
5: 0x7f7c81d00a80 - diagnostic::SpanHandler::span_bug::hee7de6e88971705bDFF
6: 0x7f7c851fbc70 - middle::traits::project::project_type::ha3169b6d00cba236CYP
7: 0x7f7c851f8dd0 - middle::traits::project::opt_normalize_projection_type::h52e80e1c888609adFQP
8: 0x7f7c851e6890 - middle::traits::project::normalize_projection_type::had1d9d27edaeb68fgPP
9: 0x7f7c851fa270 - middle::traits::project::AssociatedTypeNormalizer<'a, 'b, 'tcx>.TypeFolder<'tcx>::fold_ty::h8977cf1010cf2ef8RNP
10: 0x7f7c864b7990 - middle::ty_fold::TypeFolder::fold_trait_ref::h15244371943192340039
11: 0x7f7c864b85c0 - middle::ty_fold::VecPerParamSpace<T>.TypeFoldable<'tcx>::fold_with::h3029018912722243389
12: 0x7f7c864d3b40 - check::FnCtxt<'a, 'tcx>::instantiate_bounds::haf69ce16fdf22227Nul
13: 0x7f7c864ec870 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::check_impl::closure.30018
14: 0x7f7c864e8ce0 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::with_fcx::h0df2a1129da2a633Hfi
15: 0x7f7c864ef760 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::hc72c9294b1b3f21ftoi
16: 0x7f7c864f15c0 - visit::walk_mod::h2450081392115226323
17: 0x7f7c864ef760 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::hc72c9294b1b3f21ftoi
18: 0x7f7c864f15c0 - visit::walk_mod::h2450081392115226323
19: 0x7f7c864ef760 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::hc72c9294b1b3f21ftoi
20: 0x7f7c866ddbd0 - check_crate::unboxed_closure.40283
21: 0x7f7c866d8820 - check_crate::h4ba306a17295b431iux
22: 0x7f7c873dc600 - driver::phase_3_run_analysis_passes::h56810662503f92d8Sva
23: 0x7f7c873caaa0 - driver::compile_input::h8d0abf631800220evba
24: 0x7f7c87496070 - thunk::F.Invoke<A, R>::invoke::h13263903969514368718
25: 0x7f7c87494e20 - rt::unwind::try::try_fn::h2272437873322108176
26: 0x7f7c86f258b0 - rust_try_inner
27: 0x7f7c86f258a0 - rust_try
28: 0x7f7c87495170 - thunk::F.Invoke<A, R>::invoke::h17236552692728063371
29: 0x7f7c86ead490 - sys::thread::thread_start::hd19c7749b7af23e8EGv
30: 0x7f7c81525250 - start_thread
31: 0x7f7c86ae2219 - clone
32: 0x0 - <unknown>
Could not compile `matrix-rs`.
Caused by:
Process didn't exit successfully: `rustc /home/rvlander/CloudStation/WIP/matrix-rs/src/lib.rs --crate-name matrix-rs --crate-type lib -g -C metadata=911cbf09ca74d9fa -C extra-filename=-911cbf09ca74d9fa --out-dir /home/rvlander/CloudStation/WIP/matrix-rs/target --emit=dep-info,link -L /home/rvlander/CloudStation/WIP/matrix-rs/target -L /home/rvlander/CloudStation/WIP/matrix-rs/target/deps --extern num=/home/rvlander/CloudStation/WIP/matrix-rs/target/deps/libnum-99d6507e3aad728a.rlib` (status=101)
</code></pre></div> | <p dir="auto">This 3-liner crashes rustc:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct CrashIt;
impl Iterator for CrashIt { }
fn main() { }"><pre class="notranslate"><span class="pl-k">struct</span> <span class="pl-smi">CrashIt</span><span class="pl-kos">;</span>
<span class="pl-k">impl</span> <span class="pl-smi">Iterator</span> <span class="pl-k">for</span> <span class="pl-smi">CrashIt</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span></pre></div>
<p dir="auto">My original code did a lot more than that, but I tried to create the minimal repro case.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc --version --verbose
rustc 0.13.0-nightly (c6c786671 2015-01-04 00:50:59 +0000)
binary: rustc
commit-hash: c6c786671d692d7b13c2e5c68a53001327b4b125
commit-date: 2015-01-04 00:50:59 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-nightly
$ RUST_BACKTRACE=1 rustc src/main.rs
src/main.rs:2:1: 2:30 error: internal compiler error: impl `VtableImpl(impl_def_id=DefId { krate: 0, node: 7 }:CrashIt.Iterator, substs=Substs[types=[[];[];[]], regions=[[];[];[]]], nested=[[];[];[]])` did not contain projection for `Obligation(predicate=<CrashIt as TraitRef(CrashIt, core::iter::Iterator)>::Item,depth=0)`
src/main.rs:2 impl Iterator for CrashIt { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:123
stack backtrace:
1: 0x7fbff73562d0 - sys::backtrace::write::h8532e701ef86014f4it
2: 0x7fbff737bb00 - failure::on_fail::h7532e1f79d134d5dzvz
3: 0x7fbff72e11c0 - rt::unwind::begin_unwind_inner::h97b151606151d62deaz
4: 0x7fbff218ec60 - rt::unwind::begin_unwind::h15809447133099964284
5: 0x7fbff218ebf0 - diagnostic::SpanHandler::span_bug::he8142ababcc30c39DFF
6: 0x7fbff568de70 - middle::traits::project::project_type::h947eece142ef049d52P
7: 0x7fbff568afd0 - middle::traits::project::opt_normalize_projection_type::hb3defb9cc9365d1e8UP
8: 0x7fbff5678ba0 - middle::traits::project::normalize_projection_type::hdc293893275ee559JTP
9: 0x7fbff568c470 - middle::traits::project::AssociatedTypeNormalizer<'a, 'b, 'tcx>.TypeFolder<'tcx>::fold_ty::h801cbd2cdff2eff1kSP
10: 0x7fbff69492e0 - middle::ty_fold::Rc<T>.TypeFoldable<'tcx>::fold_with::h6325524173844043840
11: 0x7fbff6949e90 - middle::ty_fold::VecPerParamSpace<T>.TypeFoldable<'tcx>::fold_with::h13884369302522804796
12: 0x7fbff6965280 - check::FnCtxt<'a, 'tcx>::instantiate_bounds::hed550a9659b70335Oll
13: 0x7fbff697dfc0 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::check_impl::closure.29997
14: 0x7fbff697a430 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::with_fcx::hb1283961ed8977b7Gfi
15: 0x7fbff6980d70 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::h001ababd87597e37soi
16: 0x7fbff6b6dfe0 - check_crate::unboxed_closure.40162
17: 0x7fbff6b68c30 - check_crate::h19fb6dea5733566ajsx
18: 0x7fbff78a7640 - driver::phase_3_run_analysis_passes::h46b1604d9f9f5633Tva
19: 0x7fbff7895ae0 - driver::compile_input::h68b8602933aad8d7wba
20: 0x7fbff7960eb0 - thunk::F.Invoke<A, R>::invoke::h18029802347644288836
21: 0x7fbff795fc60 - rt::unwind::try::try_fn::h6518866316425934196
22: 0x7fbff73e2400 - rust_try_inner
23: 0x7fbff73e23f0 - rust_try
24: 0x7fbff795ffb0 - thunk::F.Invoke<A, R>::invoke::h15513809553472565307
25: 0x7fbff7367e40 - sys::thread::thread_start::h5ea7ba97235331d5a9v
26: 0x7fbff19b2c20 - start_thread
27: 0x7fbff6f83899 - clone
28: 0x0 - <unknown>"><pre class="notranslate"><code class="notranslate">$ rustc --version --verbose
rustc 0.13.0-nightly (c6c786671 2015-01-04 00:50:59 +0000)
binary: rustc
commit-hash: c6c786671d692d7b13c2e5c68a53001327b4b125
commit-date: 2015-01-04 00:50:59 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-nightly
$ RUST_BACKTRACE=1 rustc src/main.rs
src/main.rs:2:1: 2:30 error: internal compiler error: impl `VtableImpl(impl_def_id=DefId { krate: 0, node: 7 }:CrashIt.Iterator, substs=Substs[types=[[];[];[]], regions=[[];[];[]]], nested=[[];[];[]])` did not contain projection for `Obligation(predicate=<CrashIt as TraitRef(CrashIt, core::iter::Iterator)>::Item,depth=0)`
src/main.rs:2 impl Iterator for CrashIt { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:123
stack backtrace:
1: 0x7fbff73562d0 - sys::backtrace::write::h8532e701ef86014f4it
2: 0x7fbff737bb00 - failure::on_fail::h7532e1f79d134d5dzvz
3: 0x7fbff72e11c0 - rt::unwind::begin_unwind_inner::h97b151606151d62deaz
4: 0x7fbff218ec60 - rt::unwind::begin_unwind::h15809447133099964284
5: 0x7fbff218ebf0 - diagnostic::SpanHandler::span_bug::he8142ababcc30c39DFF
6: 0x7fbff568de70 - middle::traits::project::project_type::h947eece142ef049d52P
7: 0x7fbff568afd0 - middle::traits::project::opt_normalize_projection_type::hb3defb9cc9365d1e8UP
8: 0x7fbff5678ba0 - middle::traits::project::normalize_projection_type::hdc293893275ee559JTP
9: 0x7fbff568c470 - middle::traits::project::AssociatedTypeNormalizer<'a, 'b, 'tcx>.TypeFolder<'tcx>::fold_ty::h801cbd2cdff2eff1kSP
10: 0x7fbff69492e0 - middle::ty_fold::Rc<T>.TypeFoldable<'tcx>::fold_with::h6325524173844043840
11: 0x7fbff6949e90 - middle::ty_fold::VecPerParamSpace<T>.TypeFoldable<'tcx>::fold_with::h13884369302522804796
12: 0x7fbff6965280 - check::FnCtxt<'a, 'tcx>::instantiate_bounds::hed550a9659b70335Oll
13: 0x7fbff697dfc0 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::check_impl::closure.29997
14: 0x7fbff697a430 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::with_fcx::hb1283961ed8977b7Gfi
15: 0x7fbff6980d70 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::h001ababd87597e37soi
16: 0x7fbff6b6dfe0 - check_crate::unboxed_closure.40162
17: 0x7fbff6b68c30 - check_crate::h19fb6dea5733566ajsx
18: 0x7fbff78a7640 - driver::phase_3_run_analysis_passes::h46b1604d9f9f5633Tva
19: 0x7fbff7895ae0 - driver::compile_input::h68b8602933aad8d7wba
20: 0x7fbff7960eb0 - thunk::F.Invoke<A, R>::invoke::h18029802347644288836
21: 0x7fbff795fc60 - rt::unwind::try::try_fn::h6518866316425934196
22: 0x7fbff73e2400 - rust_try_inner
23: 0x7fbff73e23f0 - rust_try
24: 0x7fbff795ffb0 - thunk::F.Invoke<A, R>::invoke::h15513809553472565307
25: 0x7fbff7367e40 - sys::thread::thread_start::h5ea7ba97235331d5a9v
26: 0x7fbff19b2c20 - start_thread
27: 0x7fbff6f83899 - clone
28: 0x0 - <unknown>
</code></pre></div> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=david_syer" rel="nofollow">Dave Syer</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6525?redirect=false" rel="nofollow">SPR-6525</a></strong> and commented</p>
<p dir="auto">SpEL context is wrong in method parameter resolution. Instead of using the current context for the stack (which refers to the method target), parameters should have a current context equal to the context root. This test would fail in EvaluationTests():</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Test
public void testNestedMethod() {
evaluate("placeOfBirth.doubleIt(inventions.length)", 18, Integer.class);
}"><pre class="notranslate"><code class="notranslate">@Test
public void testNestedMethod() {
evaluate("placeOfBirth.doubleIt(inventions.length)", 18, Integer.class);
}
</code></pre></div>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 RC3</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/15983/SPR-6526.patch" rel="nofollow">SPR-6526.patch</a> (<em>1.51 kB</em>)</li>
</ul>
<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="398093849" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10255" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10255/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10255">#10255</a> Spel parser is not able to resolve bean id variable when it is passed as parameter to a static method. (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/33a7bbb4850e69a3b9ac812411bb12d81346f37a/hovercard" href="https://github.com/spring-projects/spring-framework/commit/33a7bbb4850e69a3b9ac812411bb12d81346f37a"><tt>33a7bbb</tt></a></p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jzaugg" rel="nofollow">Jason Zaugg</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4686?redirect=false" rel="nofollow">SPR-4686</a></strong> and commented</p>
<p dir="auto"><code class="notranslate">@Component</code><br>
public final class SimpleXslTransformerFactory {<br>
<code class="notranslate">@Autowired</code><br>
private StreamSourceFactory streamSourceFactory;<br>
<code class="notranslate">@Autowired</code><br>
private EfgLoggerFactory loggerFactory;</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public Transformer createXslTransformer(Resource xsl) {
Source xslSource = streamSourceFactory.create(xsl);
Transformer xslTransformer = createXslTransformer(xslSource, TransformerFactory.newInstance());
xslTransformer.setErrorListener(new LoggingErrorListener());
return xslTransformer;
}
private Transformer createXslTransformer(Source xslSource, TransformerFactory factory) {
try {
return factory.newTransformer(xslSource);
} catch (TransformerConfigurationException e) {
throw new RuntimeException(e);
}
}
private class LoggingErrorListener implements ErrorListener {
public void warning(TransformerException exception) throws TransformerException {
loggerFactory.create().warn(ExceptionUtils.getFullStackTrace(exception));
}
public void error(TransformerException exception) throws TransformerException {
loggerFactory.create().warn(ExceptionUtils.getFullStackTrace(exception));
}
public void fatalError(TransformerException exception) throws TransformerException {
loggerFactory.create().warn(ExceptionUtils.getFullStackTrace(exception));
}
}"><pre class="notranslate"><code class="notranslate">public Transformer createXslTransformer(Resource xsl) {
Source xslSource = streamSourceFactory.create(xsl);
Transformer xslTransformer = createXslTransformer(xslSource, TransformerFactory.newInstance());
xslTransformer.setErrorListener(new LoggingErrorListener());
return xslTransformer;
}
private Transformer createXslTransformer(Source xslSource, TransformerFactory factory) {
try {
return factory.newTransformer(xslSource);
} catch (TransformerConfigurationException e) {
throw new RuntimeException(e);
}
}
private class LoggingErrorListener implements ErrorListener {
public void warning(TransformerException exception) throws TransformerException {
loggerFactory.create().warn(ExceptionUtils.getFullStackTrace(exception));
}
public void error(TransformerException exception) throws TransformerException {
loggerFactory.create().warn(ExceptionUtils.getFullStackTrace(exception));
}
public void fatalError(TransformerException exception) throws TransformerException {
loggerFactory.create().warn(ExceptionUtils.getFullStackTrace(exception));
}
}
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">When evaluating ClassMetadataReadingVisitor.isIndependent(),<br>
this.enclosingClassName: com.efgfp.raptor.functional.SimpleXslTransformerFactory<br>
this.independentInnerClass: false</p>
<p dir="auto">therefore (this.enclosingClassName == null || this.independentInnerClass) => false</p>
<p dir="auto">The list of candidate resources contained, in this order:</p>
<p dir="auto">URL [jar:file:/D:/wyd/workspace/raptor/target/exploded/raptor-web-interfaceWeb/WEB-INF/lib/functional-test.jar!/com/efgfp/raptor/functional/SimpleXslTransformerFactory$LoggingErrorListener.class],<br>
URL [jar:file:/D:/wyd/workspace/raptor/target/exploded/raptor-web-interfaceWeb/WEB-INF/lib/functional-test.jar!/com/efgfp/raptor/functional/SimpleXslTransformerFactory.class],</p>
<p dir="auto">Debugging the calls to the ClassMetadataReadingVisitor showed that a call was made:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" visitInnerClass():72, ClassMetadataReadingVisitor.java
accept():-1
accept():-1
getAnnotationMetadata():52, SimpleMetadataReader.java"><pre class="notranslate"><code class="notranslate"> visitInnerClass():72, ClassMetadataReadingVisitor.java
accept():-1
accept():-1
getAnnotationMetadata():52, SimpleMetadataReader.java
</code></pre></div>
<p dir="auto">name = {java.lang.String@5861}"com/efgfp/raptor/functional/SimpleXslTransformerFactory$LoggingErrorListener"<br>
outerName = {java.lang.String@3079}"com/efgfp/raptor/functional/SimpleXslTransformerFactory"<br>
innerName = {java.lang.String@5862}"LoggingErrorListener"<br>
access = 4101</p>
<p dir="auto">and that during this call, independentInnerClass was set to null.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.1</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="398084522" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9003" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9003/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9003">#9003</a> component scanning incorrectly excludes classes (<em><strong>"duplicates"</strong></em>)</li>
</ul> | 0 |
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">i.e. the table with composite PK and a col==itself, like in test_relationships RelationTest2:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CREATE TABLE task (
"name" text NOT NULL,
asset text NOT NULL,
parent_asset text,
<more columns>
CONSTRAINT "task_PK" PRIMARY KEY (asset, name),
CONSTRAINT "task_parent_FK" FOREIGN KEY (parent_asset, "name")
REFERENCES task (asset, "name") MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE);"><pre class="notranslate"><code class="notranslate">CREATE TABLE task (
"name" text NOT NULL,
asset text NOT NULL,
parent_asset text,
<more columns>
CONSTRAINT "task_PK" PRIMARY KEY (asset, name),
CONSTRAINT "task_parent_FK" FOREIGN KEY (parent_asset, "name")
REFERENCES task (asset, "name") MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE);
</code></pre></div>
<p dir="auto">I think what has to happen is the condition is detected in the PJ, and a new annotation is added to one side of <code class="notranslate">name==name</code> that somehow does the right thing in clause adaption - likely a flag passed to clause adaption only during the eagerload phase.</p> | <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sqlalchemy.dialect.mysql import insert
from sqlalchemy import func
insert_stmt=insert(t).values(col1=1,col2=2)
upsert_stmt=insert_stmt.on_duplicate_key_update(col2=func.coalesce(insert_stmt.inserted.col2,t.c.col2))"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialect</span>.<span class="pl-s1">mysql</span> <span class="pl-k">import</span> <span class="pl-s1">insert</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-s1">func</span>
<span class="pl-s1">insert_stmt</span><span class="pl-c1">=</span><span class="pl-en">insert</span>(<span class="pl-s1">t</span>).<span class="pl-en">values</span>(<span class="pl-s1">col1</span><span class="pl-c1">=</span><span class="pl-c1">1</span>,<span class="pl-s1">col2</span><span class="pl-c1">=</span><span class="pl-c1">2</span>)
<span class="pl-s1">upsert_stmt</span><span class="pl-c1">=</span><span class="pl-s1">insert_stmt</span>.<span class="pl-en">on_duplicate_key_update</span>(<span class="pl-s1">col2</span><span class="pl-c1">=</span><span class="pl-s1">func</span>.<span class="pl-en">coalesce</span>(<span class="pl-s1">insert_stmt</span>.<span class="pl-s1">inserted</span>.<span class="pl-s1">col2</span>,<span class="pl-s1">t</span>.<span class="pl-s1">c</span>.<span class="pl-s1">col2</span>))</pre></div>
<p dir="auto">the upsert statement is rendered incorrectly as</p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="INSERT INTO t (col1,col2) VALUES (%s, %s) ON DUPLICATE KEY UPDATE col2=coalesce(inserted.col2, t.col2)"><pre class="notranslate"><span class="pl-k">INSERT INTO</span> t (col1,col2) <span class="pl-k">VALUES</span> (%s, %s) <span class="pl-k">ON</span> DUPLICATE KEY <span class="pl-k">UPDATE</span> col2<span class="pl-k">=</span>coalesce(<span class="pl-c1">inserted</span>.<span class="pl-c1">col2</span>, <span class="pl-c1">t</span>.<span class="pl-c1">col2</span>)</pre></div> | 0 |
<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">babel-loader (webpack)</p>
<h3 dir="auto">Input code</h3>
<p dir="auto">Minimal repository here <a href="https://github.com/Badestrand/webpack-error-stripping-preact-import/tree/main">https://github.com/Badestrand/webpack-error-stripping-preact-import/tree/main</a></p>
<h3 dir="auto">Configuration file name</h3>
<p dir="auto">.babelrc</p>
<h3 dir="auto">Configuration</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
[
"@babel/plugin-transform-runtime", {
"regenerator": true
}
],
["@babel/plugin-transform-react-jsx", {
"pragma": "preact.h",
"pragmaFrag": "preact.Fragment",
}]
]
}"><pre class="notranslate">{
<span class="pl-ent">"presets"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>@babel/preset-env<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>@babel/preset-react<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>@babel/preset-typescript<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"plugins"</span>: [
[
<span class="pl-s"><span class="pl-pds">"</span>@babel/plugin-transform-runtime<span class="pl-pds">"</span></span>, {
<span class="pl-ent">"regenerator"</span>: <span class="pl-c1">true</span>
}
],
[<span class="pl-s"><span class="pl-pds">"</span>@babel/plugin-transform-react-jsx<span class="pl-pds">"</span></span>, {
<span class="pl-ent">"pragma"</span>: <span class="pl-s"><span class="pl-pds">"</span>preact.h<span class="pl-pds">"</span></span>,
<span class="pl-ent">"pragmaFrag"</span>: <span class="pl-s"><span class="pl-pds">"</span>preact.Fragment<span class="pl-pds">"</span></span>,
}]
]
}</pre></div>
<h3 dir="auto">Current and expected behavior</h3>
<p dir="auto">I have a simple Typescript JSX preact (it's very similar to React) component:</p>
<div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as preact from 'preact'
export default function MyComponent() {
return (
<div></div>
)
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">preact</span> <span class="pl-k">from</span> <span class="pl-s">'preact'</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">function</span> <span class="pl-smi">MyComponent</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><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></pre></div>
<p dir="auto">This gets compiled to</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/***/ "./src/MyComponent.tsx":
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ MyComponent)
/* harmony export */ });
function MyComponent() {
return preact.h("div", null);
}
/***/ }),"><pre class="notranslate"><span class="pl-c">/***/</span> <span class="pl-s">"./src/MyComponent.tsx"</span>:
<span class="pl-c">/***/</span> <span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">__unused_webpack_module</span><span class="pl-kos">,</span> <span class="pl-s1">__webpack_exports__</span><span class="pl-kos">,</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">r</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_exports__</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* harmony export */</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">d</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_exports__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c">/* harmony export */</span> <span class="pl-s">"default"</span>: <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">(</span><span class="pl-c">/* binding */</span> <span class="pl-v">MyComponent</span><span class="pl-kos">)</span>
<span class="pl-c">/* harmony export */</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-v">MyComponent</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">preact</span><span class="pl-kos">.</span><span class="pl-en">h</span><span class="pl-kos">(</span><span class="pl-s">"div"</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-kos">}</span>
<span class="pl-c">/***/</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">,</span></pre></div>
<p dir="auto">So you can see that the preact import was removed even though preact is used by the JSX. This throws an error when executing the code.</p>
<p dir="auto">I found in <a href="https://github.com/babel/babel/issues/9723" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/9723/hovercard">this issue</a> that Typescript removes unused imports and I think that's what's happening here - it's just that this import shouldn't be removed.</p>
<p dir="auto">I guess the system determines first which imports are used/unused and only AFTER resolves the JSX.</p>
<p dir="auto">I first filed a bug for <a href="https://github.com/webpack/webpack/issues/15707" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack/issues/15707/hovercard">webpack</a> but the maintainer felt it could be better suited here.</p>
<h3 dir="auto">Environment</h3>
<p dir="auto">System:<br>
OS: macOS 12.2.1<br>
Binaries:<br>
Node: 14.15.0 - /usr/local/bin/node<br>
Yarn: 1.6.0 - /usr/local/bin/yarn<br>
npm: 6.14.8 - /usr/local/bin/npm<br>
npmPackages:<br>
@babel/core: ^7.17.9 => 7.17.9<br>
@babel/plugin-transform-runtime: ^7.17.0 => 7.17.0<br>
@babel/preset-env: ^7.16.11 => 7.16.11<br>
@babel/preset-react: ^7.16.7 => 7.16.7<br>
@babel/preset-typescript: ^7.16.7 => 7.16.7<br>
@babel/runtime: ^7.17.9 => 7.17.9<br>
babel-core: ^6.26.3 => 6.26.3<br>
babel-loader: ^8.2.5 => 8.2.5<br>
babel-preset-react: ^6.24.1 => 6.24.1<br>
webpack: ^5.72.0 => 5.72.0</p>
<h3 dir="auto">Possible solution</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></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>Input Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { h, render } from "preact";
const root = document.getElementById("root");
render(<div>hello</div>, root);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">h</span><span class="pl-kos">,</span> <span class="pl-s1">render</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"preact"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">root</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">"root"</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-c1"><</span><span class="pl-ent">div</span><span class="pl-c1">></span>hello<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-s1">root</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { render } from "preact"; // `h` import is gone
const root = document.getElementById("root");
render(h("div", null, "hello"), root);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">render</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"preact"</span><span class="pl-kos">;</span> <span class="pl-c">// `h` import is gone</span>
<span class="pl-k">const</span> <span class="pl-s1">root</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">"root"</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-en">h</span><span class="pl-kos">(</span><span class="pl-s">"div"</span><span class="pl-kos">,</span> <span class="pl-c1">null</span><span class="pl-kos">,</span> <span class="pl-s">"hello"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">root</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { h, render } from "preact";
const root = document.getElementById("root");
render(h("div", null, "hello"), root);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">h</span><span class="pl-kos">,</span> <span class="pl-s1">render</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"preact"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">root</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">"root"</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-en">h</span><span class="pl-kos">(</span><span class="pl-s">"div"</span><span class="pl-kos">,</span> <span class="pl-c1">null</span><span class="pl-kos">,</span> <span class="pl-s">"hello"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">root</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<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">.babelrc</code></li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"presets": [
"@babel/preset-typescript",
["@babel/preset-react", { "pragma": "h" }]
]
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"presets"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"@babel/preset-typescript"</span><span class="pl-kos">,</span>
<span class="pl-kos">[</span><span class="pl-s">"@babel/preset-react"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"pragma"</span>: <span class="pl-s">"h"</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>Environment</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" System:
OS: macOS 10.15.5
Binaries:
Node: 14.15.3 - /usr/local/opt/node@14/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.9 - /usr/local/opt/node@14/bin/npm
npmPackages:
@babel/cli: ^7.12.10 => 7.12.10
@babel/core: ^7.0.0 => 7.12.10
@babel/preset-react: ^7.12.10 => 7.12.10
@babel/preset-typescript: ^7.12.7 => 7.12.7
"><pre class="notranslate"><code class="notranslate"> System:
OS: macOS 10.15.5
Binaries:
Node: 14.15.3 - /usr/local/opt/node@14/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.9 - /usr/local/opt/node@14/bin/npm
npmPackages:
@babel/cli: ^7.12.10 => 7.12.10
@babel/core: ^7.0.0 => 7.12.10
@babel/preset-react: ^7.12.10 => 7.12.10
@babel/preset-typescript: ^7.12.7 => 7.12.7
</code></pre></div>
<p dir="auto"><strong>Additional context</strong><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="777460584" data-permission-text="Title is private" data-url="https://github.com/parcel-bundler/parcel/issues/5566" data-hovercard-type="issue" data-hovercard-url="/parcel-bundler/parcel/issues/5566/hovercard" href="https://github.com/parcel-bundler/parcel/issues/5566">parcel-bundler/parcel#5566</a></p> | 1 |
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-comment-your-javascript-code" rel="nofollow">http://freecodecamp.com/challenges/waypoint-comment-your-javascript-code</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">If you look in the code validations, I don't believe that the statement</p>
<p dir="auto">"assert(editor.getValue().match(/(//)...../g), 'Create a // style comment that contains at least five letters');"</p>
<p dir="auto">should be a visible element to users, it isn't meant to be there.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5931143/9666005/7cf96606-526b-11e5-8132-f48541c57711.png"><img src="https://cloud.githubusercontent.com/assets/5931143/9666005/7cf96606-526b-11e5-8132-f48541c57711.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">The zipline-build-a-simon-game shows as complete even though I have not completed or submitted a solution. May have some relation to the recent update.</p> | 0 |
<p dir="auto">Why not add a mechanism in tree view that can visit it's parent folder?<br>
like add a line .. on the top of tree view</p>
<p dir="auto">Now I must do "Show in Finder" —> find the file in parent folder -> drag it into Atom ->"Reveal in tree view" to show the parent folder content in the tree view.</p>
<p dir="auto">By the way, if you really do so, you will find you can not get the tree view of the parent folder. It only highlights the current folder. See more detail in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="51613555" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/4524" data-hovercard-type="issue" data-hovercard-url="/atom/atom/issues/4524/hovercard" href="https://github.com/atom/atom/issues/4524">#4524</a></p>
<p dir="auto">Thank you</p> | <p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/chovy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/chovy">@chovy</a> on December 18, 2014 5:10</em></p>
<p dir="auto">If I open the file in <code class="notranslate">./foo/bar/baz.js</code> there's no way for me to browse up to <code class="notranslate">./foo</code></p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="52326295" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/4679" data-hovercard-type="issue" data-hovercard-url="/atom/atom/issues/4679/hovercard" href="https://github.com/atom/atom/issues/4679">atom/atom#4679</a></em></p> | 1 |
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/add-a-submit-button-to-a-form#?solution=%0A%3Clink%20href%3D%22https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%0A%20%20.smaller-image%20%7B%0A%20%20%20%20width%3A%20100px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%3Cp%3EClick%20here%20for%20%3Ca%20href%3D%22%23%22%3Ecat%20photos%3C%2Fa%3E.%3C%2Fp%3E%0A%0A%3Ca%20href%3D%22%23%22%3E%3Cimg%20class%3D%22smaller-image%20thick-green-border%22%20alt%3D%22A%20cute%20orange%20cat%20lying%20on%20its%20back%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%3C%2Fa%3E%0A%0A%3Cp%3EThings%20cats%20love%3A%3C%2Fp%3E%0A%3Cul%3E%0A%20%20%3Cli%3Ecat%20nip%3C%2Fli%3E%0A%20%20%3Cli%3Elaser%20pointers%3C%2Fli%3E%0A%20%20%3Cli%3Elasagna%3C%2Fli%3E%0A%3C%2Ful%3E%0A%3Cp%3ETop%203%20things%20cats%20hate%3A%3C%2Fp%3E%0A%3Col%3E%0A%20%20%3Cli%3Eflea%20treatment%3C%2Fli%3E%0A%20%20%3Cli%3Ethunder%3C%2Fli%3E%0A%20%20%3Cli%3Eother%20cats%3C%2Fli%3E%0A%3C%2Fol%3E%0A%3Cform%20fccfaa%3D%22%2Fsubmit-cat-photo%22%3E%0A%20%20%3Cinput%20type%3D%22text%22%20placeholder%3D%22cat%20photo%20URL%22%3E%0A%3C%2Fform%3E%0A" rel="nofollow">Add a Submit Button to a Form</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, Monospace;
}
p {
font-size: 16px;
font-family: Monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
.smaller-image {
width: 100px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p>Click here for <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back" src="https://bit.ly/fcc-relaxing-cat"></a>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<input type="text" placeholder="cat photo URL">
</form>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">link</span> <span class="pl-c1">href</span>="<span class="pl-s">https://fonts.googleapis.com/css?family=Lobster</span>" <span class="pl-c1">rel</span>="<span class="pl-s">stylesheet</span>" <span class="pl-c1">type</span>="<span class="pl-s">text/css</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">style</span><span class="pl-kos">></span>
.<span class="pl-c1">red-text</span> {
<span class="pl-c1">color</span><span class="pl-kos">:</span> red;
}
<span class="pl-ent">h2</span> {
<span class="pl-c1">font-family</span><span class="pl-kos">:</span> Lobster<span class="pl-kos">,</span> Monospace;
}
<span class="pl-ent">p</span> {
<span class="pl-c1">font-size</span><span class="pl-kos">:</span> <span class="pl-c1">16<span class="pl-smi">px</span></span>;
<span class="pl-c1">font-family</span><span class="pl-kos">:</span> Monospace;
}
.<span class="pl-c1">thick-green-border</span> {
<span class="pl-c1">border-color</span><span class="pl-kos">:</span> green;
<span class="pl-c1">border-width</span><span class="pl-kos">:</span> <span class="pl-c1">10<span class="pl-smi">px</span></span>;
<span class="pl-c1">border-style</span><span class="pl-kos">:</span> solid;
<span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">50<span class="pl-smi">%</span></span>;
}
.<span class="pl-c1">smaller-image</span> {
<span class="pl-c1">width</span><span class="pl-kos">:</span> <span class="pl-c1">100<span class="pl-smi">px</span></span>;
}
<span class="pl-kos"></</span><span class="pl-ent">style</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h2</span> <span class="pl-c1">class</span>="<span class="pl-s">red-text</span>"<span class="pl-kos">></span>CatPhotoApp<span class="pl-kos"></</span><span class="pl-ent">h2</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Click here for <span class="pl-kos"><</span><span class="pl-ent">a</span> <span class="pl-c1">href</span>="<span class="pl-s">#</span>"<span class="pl-kos">></span>cat photos<span class="pl-kos"></</span><span class="pl-ent">a</span><span class="pl-kos">></span>.<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">a</span> <span class="pl-c1">href</span>="<span class="pl-s">#</span>"<span class="pl-kos">></span><span class="pl-kos"><</span><span class="pl-ent">img</span> <span class="pl-c1">class</span>="<span class="pl-s">smaller-image thick-green-border</span>" <span class="pl-c1">alt</span>="<span class="pl-s">A cute orange cat lying on its back</span>" <span class="pl-c1">src</span>="<span class="pl-s">https://bit.ly/fcc-relaxing-cat</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">a</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Things cats love:<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">ul</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>cat nip<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>laser pointers<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>lasagna<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">ul</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Top 3 things cats hate:<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">ol</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>flea treatment<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>thunder<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>other cats<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">ol</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">form</span> <span class="pl-c1">action</span>="<span class="pl-s">/submit-cat-photo</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">text</span>" <span class="pl-c1">placeholder</span>="<span class="pl-s">cat photo URL</span>"<span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">form</span><span class="pl-kos">></span></pre></div> | <p dir="auto">In all the exercises, we the users are forced to press the enter key before writing any code.</p>
<hr>
<h4 dir="auto">Update:</h4>
<p dir="auto">We have locked the conversation temporarily on this thread to collaborators only, this has been resolved in staging, and will be live soon.</p>
<p dir="auto">The fix can be confirmed on the beta website.</p>
<p dir="auto">The workaround currently on production website is:<br>
Press the <kbd>Enter</kbd> key on the challenge editor and then proceed with the challenge.</p>
<p dir="auto">Apologies for the inconvenience meanwhile.</p>
<p dir="auto">Reach us in the chat room if you need any assistance.</p> | 1 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 18875
Windows Terminal version (if applicable): 0.5.2681.0"><pre lang="Windows" class="notranslate"><code class="notranslate">Windows build number: 18875
Windows Terminal version (if applicable): 0.5.2681.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Open any console in Terminal.</li>
<li>Press <code class="notranslate">Windows+.</code>.</li>
<li>Try inputting characters from the selection panel by clicking on them.</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Clicked characters should be entered into the console window.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The characters are not entered into the console window.</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Microsoft Windows [版本 10.0.18362.267]
Windows Terminal version (if applicable):0.3.2142.0"><pre lang="none" class="notranslate"><code class="notranslate">Microsoft Windows [版本 10.0.18362.267]
Windows Terminal version (if applicable):0.3.2142.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Open the terminal.</li>
<li>Switching CJK input methods.(doesn't work)</li>
<li>Typing.</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Show phrase candidate boxes.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Directly entered English.</p> | 1 |
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="➜ deno install --allow-net --allow-read https://deno.land/[email protected]/http/file_server.ts
Download https://deno.land/[email protected]/http/file_server.ts
Download https://deno.land/[email protected]/path/mod.ts
Download https://deno.land/[email protected]/flags/mod.ts
Download https://deno.land/[email protected]/_util/assert.ts
Download https://deno.land/[email protected]/http/server.ts
Download https://deno.land/[email protected]/async/mod.ts
Download https://deno.land/[email protected]/http/_io.ts
Download https://deno.land/[email protected]/io/bufio.ts
Download https://deno.land/[email protected]/path/posix.ts
Download https://deno.land/[email protected]/path/common.ts
Download https://deno.land/[email protected]/path/glob.ts
Download https://deno.land/[email protected]/path/separator.ts
Download https://deno.land/[email protected]/path/win32.ts
Download https://deno.land/[email protected]/_util/os.ts
Download https://deno.land/[email protected]/path/_interface.ts
Download https://deno.land/[email protected]/path/_constants.ts
Download https://deno.land/[email protected]/path/_util.ts
Download https://deno.land/[email protected]/textproto/mod.ts
Download https://deno.land/[email protected]/http/http_status.ts
Download https://deno.land/[email protected]/async/deferred.ts
Download https://deno.land/[email protected]/async/delay.ts
Download https://deno.land/[email protected]/async/pool.ts
Download https://deno.land/[email protected]/async/mux_async_iterator.ts
Download https://deno.land/[email protected]/io/buffer.ts
Download https://deno.land/[email protected]/bytes/mod.ts
Download https://deno.land/[email protected]/io/util.ts
Check https://deno.land/[email protected]/http/file_server.ts
✅ Successfully installed file_server
C:\Users\felip\.deno\bin\file_server.cmd
C:\Users\felip\.deno\bin\file_server (shell)
ℹ️ Add C:\Users\felip\.deno\bin to PATH
set PATH=%PATH%;C:\Users\felip\.deno\bin
➜ C:\Users\felip\.deno\bin\file_server.cmd
HTTP server listening on http://0.0.0.0:4507/
^CTerminate batch job (Y/N)?"><pre class="notranslate">➜ <span class="pl-s1">deno install --allow-net --allow-read https://deno.land/[email protected]/http/file_server.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/http/file_server.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/path/mod.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/flags/mod.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/_util/assert.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/http/server.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/async/mod.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/http/_io.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/io/bufio.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/path/posix.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/path/common.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/path/glob.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/path/separator.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/path/win32.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/_util/os.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/path/_interface.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/path/_constants.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/path/_util.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/textproto/mod.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/http/http_status.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/async/deferred.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/async/delay.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/async/pool.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/async/mux_async_iterator.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/io/buffer.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/bytes/mod.ts</span>
<span class="pl-c1">Download https://deno.land/[email protected]/io/util.ts</span>
<span class="pl-c1">Check https://deno.land/[email protected]/http/file_server.ts</span>
<span class="pl-c1">✅ Successfully installed file_server</span>
<span class="pl-c1">C:\Users\felip\.deno\bin\file_server.cmd</span>
<span class="pl-c1">C:\Users\felip\.deno\bin\file_server (shell)</span>
<span class="pl-c1">ℹ️ Add C:\Users\felip\.deno\bin to PATH</span>
<span class="pl-c1"> set PATH=%PATH%;C:\Users\felip\.deno\bin</span>
➜ <span class="pl-s1">C:<span class="pl-cce">\U</span>sers<span class="pl-cce">\f</span>elip<span class="pl-cce">\.</span>deno<span class="pl-cce">\b</span>in<span class="pl-cce">\f</span>ile_server.cmd</span>
<span class="pl-c1">HTTP server listening on http://0.0.0.0:4507/</span>
<span class="pl-c1">^CTerminate batch job (Y/N)?</span></pre></div>
<p dir="auto">As can be seen, <code class="notranslate">cmd.exe</code> handles the <code class="notranslate">Ctrl</code>+<code class="notranslate">C</code> event instead of the deno process.</p> | <p dir="auto">Currently, all the available signal handling API throw "unimplemented" errors for Windows platforms.</p>
<p dir="auto">It would be great to have cross-platform signal handling along the lines of <a href="https://nodejs.org/api/process.html#process_signal_events" rel="nofollow">NodeJS Process Signal Events</a>...</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// ...works in NodeJS...
[`SIGBREAK`, `SIGINT`, `SIGUSR1`, `SIGUSR2`, `uncaughtException`, `SIGTERM`].forEach((eventType) => {
process.on(eventType, catchSignal.bind(null, eventType));
});
[`exit`].forEach((eventType) => {
process.on(eventType, catchExit.bind(null, eventType));
});
function catchSignal(eventType) {
console.log('Caught signal...', { eventType });
}
function catchExit(eventType) {
console.log('Now exiting...', { eventType });
}
setTimeout(() => {
console.log('The service is now finished.');
}, 2000);"><pre class="notranslate"><span class="pl-c">// ...works in NodeJS...</span>
<span class="pl-kos">[</span><span class="pl-s">`SIGBREAK`</span><span class="pl-kos">,</span> <span class="pl-s">`SIGINT`</span><span class="pl-kos">,</span> <span class="pl-s">`SIGUSR1`</span><span class="pl-kos">,</span> <span class="pl-s">`SIGUSR2`</span><span class="pl-kos">,</span> <span class="pl-s">`uncaughtException`</span><span class="pl-kos">,</span> <span class="pl-s">`SIGTERM`</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">forEach</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">eventType</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s1">eventType</span><span class="pl-kos">,</span> <span class="pl-s1">catchSignal</span><span class="pl-kos">.</span><span class="pl-en">bind</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">,</span> <span class="pl-s1">eventType</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-s">`exit`</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">forEach</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">eventType</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s1">eventType</span><span class="pl-kos">,</span> <span class="pl-s1">catchExit</span><span class="pl-kos">.</span><span class="pl-en">bind</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">,</span> <span class="pl-s1">eventType</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-k">function</span> <span class="pl-en">catchSignal</span><span class="pl-kos">(</span><span class="pl-s1">eventType</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">'Caught signal...'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> eventType <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">catchExit</span><span class="pl-kos">(</span><span class="pl-s1">eventType</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">'Now exiting...'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> eventType <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'The service is now finished.'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">2000</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | 1 |
<p dir="auto">My issue is about <code class="notranslate">scipy.sparse.linalg.eigsh</code></p>
<h4 dir="auto">Reproducing code example:</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
from scipy import sparse as sp
from scipy.sparse.linalg import eigsh
np.random.seed(0)
A = sp.csr_matrix(np.random.rand(100,100) > 0.5)
D = A.sum(-1).A1
D[D == 0] = 1
D = sp.diags(D ** (-1/2))
L = sp.eye(*A.shape) - D @ A @ D
eigsh(L, k=10, which='SM')[0]"><pre class="notranslate"><code class="notranslate">import numpy as np
from scipy import sparse as sp
from scipy.sparse.linalg import eigsh
np.random.seed(0)
A = sp.csr_matrix(np.random.rand(100,100) > 0.5)
D = A.sum(-1).A1
D[D == 0] = 1
D = sp.diags(D ** (-1/2))
L = sp.eye(*A.shape) - D @ A @ D
eigsh(L, k=10, which='SM')[0]
</code></pre></div>
<p dir="auto">On my Mac I get different results each execution. E.g.<br>
<code class="notranslate">([-0.0065401 , 0.80065443, 0.80663355, 0.81676304, 0.82418536, 0.82525194, 0.82584799, 0.82882288, 0.83281599, 0.8343768 ]</code><br>
The results also differ from my Linux machine:<br>
<code class="notranslate">[-0.01216965, 0.80576331, 0.81269594, 0.81530367, 0.82356752, 0.82470864, 0.82817419, 0.82923541, 0.82930345, 0.83027089]</code></p>
<p dir="auto">I assume this is caused by the use of a random starting vector via <code class="notranslate">ARPACK</code> (not via numpy). Setting <code class="notranslate">v0</code> manually, at least gives consistent results:<br>
e.g <code class="notranslate">eigsh(L, k=10, which='SM', v0=100*[0.1])[0]</code><br>
returns <code class="notranslate">[-0.00491898, 0.8024341 , 0.81182509, 0.82095066, 0.82200956, 0.82278322, 0.82411053, 0.83036532, 0.83053034, 0.83250892]</code> on my Mac and Linux machine.</p>
<p dir="auto">Should we rather use bumpy (e.g. <code class="notranslate">randn</code>) for generating <code class="notranslate">v0</code>? However, I don't know how many other methods might be affected. I am happy to submit a pull request, in case you agree and point me to further locations we should fix.</p> | <p dir="auto">There are numpy.linalg and scipy.linalg for good reasons (fortran and blas) but as a user including both is a pain. If scipy's version could include all numpy.linalg's function, then I could import scipy.linalg, being sure I don't have to read both manual to know if what I want to do can be done.</p>
<p dir="auto">To do that, if I am right, there are only 2 functions to include in scipy.linalg:</p>
<ul dir="auto">
<li>numpy.matrix_rank</li>
<li>numpy.cond</li>
</ul>
<p dir="auto">If you do that, you will help a lot a users and <a href="https://stackoverflow.com/questions/38168016/how-to-know-when-to-use-numpy-linalg-instead-of-scipy-linalg" rel="nofollow">such questions</a> will not happen anymore. In the same time the documentation could change <code class="notranslate">scipy.linalg imports most of them</code> by <code class="notranslate">all of them</code>!</p> | 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: xxx</li>
<li>Operating System version: centos 7</li>
<li>Java version: 1.8.0</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">Class.forName 使用的MetadataReportService 的classloader 来加载interface,<br>
但是这个interface 可能是另外的class loader 加载的,会报找不到class.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2019-08-01 12:15:26,110 ERROR org.apache.dubbo.metadata.integration.MetadataReportService[106] - [DUBBO] publishProvider getServiceDescriptor error. providerUrl: dubbo://192.168.0.9:20880/com.wdk.SpiTes?anyhost=true&application=wdk-plugin-engine&dubbo=2.0.2&generic=false&group=dubbo&interface=com.wdk.SpiTes&methods=speak&proxy=jdk&release=2.7.1-SNAPSHOT&revision=1.0.0-SNAPSHOT&side=provider&version=1.0.0.wdk-serverless-bundle.1.0.0, dubbo version: 2.7.1-SNAPSHOT, current host: 192.168.0.9
java.lang.ClassNotFoundException: com.wdk.SpiTes"><pre lang="log" class="notranslate"><code class="notranslate">2019-08-01 12:15:26,110 ERROR org.apache.dubbo.metadata.integration.MetadataReportService[106] - [DUBBO] publishProvider getServiceDescriptor error. providerUrl: dubbo://192.168.0.9:20880/com.wdk.SpiTes?anyhost=true&application=wdk-plugin-engine&dubbo=2.0.2&generic=false&group=dubbo&interface=com.wdk.SpiTes&methods=speak&proxy=jdk&release=2.7.1-SNAPSHOT&revision=1.0.0-SNAPSHOT&side=provider&version=1.0.0.wdk-serverless-bundle.1.0.0, dubbo version: 2.7.1-SNAPSHOT, current host: 192.168.0.9
java.lang.ClassNotFoundException: com.wdk.SpiTes
</code></pre></div>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps?</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/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>
<p dir="auto">At the moment we create the adaptive extension class by <code class="notranslate">org.apache.dubbo.common.extension.ExtensionLoader#createAdaptiveExtensionClass</code>, which generates a Java class source <code class="notranslate">String</code> and compiles it.</p>
<p dir="auto">So I'm wondering why is this strategy chosen and can we generate a proxy class directly (for example using cglib) of the adaptive extension class, it would save the time to compile and reduce the complexity when manipulating <code class="notranslate">String</code> to generate the source code, thus less errors may occur and more performant(I think).</p>
<p dir="auto">Thanks</p> | 0 |
<p dir="auto">by <strong>yeswah</strong>:</p>
<pre class="notranslate">Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull", "hg update default", rebuild, and
retry
what you did to
reproduce the problem. Thanks.
What steps will reproduce the problem?
1.
2.
3.
When I want to change code from
func main() {
i := 0
fmt.Println(i)
i, j := test()
fmt.Println(j)
fmt.Println(i)
}
to
func main() {
i := 0
fmt.Println(i)
if i == 0 {
i, j := test()
fmt.Println(j)
}
fmt.Println(i)
}
I always can't find the bug
var i has been redefined!!
func test() (int, int) {
return 1, 2
}
What is the expected output?
0
2
1
What do you see instead?
0
2
0
Which compiler are you using (5g, 6g, 8g, gccgo)?
8g
Which operating system are you using?
windows7
Which revision are you using? (hg identify)
r60
Please provide any additional information below.</pre> | <pre class="notranslate">The spec language is vague to non-existent regarding what happens when maps and channels
are assigned to variables (reference assignment only).</pre> | 0 |
<p dir="auto">I get this crash locally since we moved to LLVM 3.9.1. It doesn't appear if I switch back to 3.7.1.</p>
<p dir="auto">(Note that LLVM 3.9.1 incorrectly detects my CPU as <code class="notranslate">skylake-avx512</code>, while it only supports AVX2. Doesn't look like the cause of the crash, though, since fixing the CPU family and rebuilding LLVM and Julia doesn't fix it.)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> Base.runtests("linalg/bunchkaufman")
Test (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
signal (11): Segmentation fault
while loading /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl, in expression starting on line 22
unknown function (ip: 0x7f7350df8a8c)
unknown function (ip: 0x7f7350e0014a)
unknown function (ip: 0x7f7350d8e648)
unknown function (ip: 0x7f7350d9593f)
unknown function (ip: 0x7f7350d95c37)
_ZN4llvm12RegAllocBase16allocatePhysRegsEv at /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
unknown function (ip: 0x7f7350d96e4f)
_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE at /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
operator() at /home/milan/Dev/julia/src/jitlayers.cpp:436
_M_invoke at /usr/include/c++/6.2.1/functional:1726
operator() at /usr/include/c++/6.2.1/functional:2136
addModuleSet<llvm::SmallVector<std::unique_ptr<llvm::Module>, 1u>, llvm::RTDyldMemoryManager*, std::unique_ptr<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> >, std::default_delete<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> > > > > at /home/milan/Dev/julia/usr/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h:73
addModule at /home/milan/Dev/julia/src/jitlayers.cpp:559
jl_add_to_ee at /home/milan/Dev/julia/src/jitlayers.cpp:782
jl_finalize_function at /home/milan/Dev/julia/src/jitlayers.cpp:793
getAddressForFunction at /home/milan/Dev/julia/src/codegen.cpp:1070
jl_generate_fptr at /home/milan/Dev/julia/src/codegen.cpp:1193
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:240
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:62 [inlined]
macro expansion; at ./test.jl:775 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:60 [inlined]
macro expansion; at ./test.jl:714 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:49 [inlined]
macro expansion; at ./test.jl:775 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:40 [inlined]
macro expansion; at ./test.jl:775 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:37 [inlined]
macro expansion; at ./test.jl:775 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:24 [inlined]
macro expansion; at ./test.jl:775 [inlined]
anonymous at ./<missing> (unknown line)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_toplevel_eval_flex at /home/milan/Dev/julia/src/toplevel.c:648
jl_parse_eval_all at /home/milan/Dev/julia/src/ast.c:757
jl_load at /home/milan/Dev/julia/src/toplevel.c:675
jl_load_ at /home/milan/Dev/julia/src/toplevel.c:684
include_from_node1 at ./loading.jl:532
unknown function (ip: 0x7f73466793fb)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
include at ./sysimg.jl:14
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/testdefs.jl:13 [inlined]
macro expansion; at ./test.jl:714 [inlined]
macro expansion; at ./util.jl:288 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/testdefs.jl:0 [inlined]
anonymous at ./<missing> (unknown line)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_toplevel_eval_flex at /home/milan/Dev/julia/src/toplevel.c:648
jl_toplevel_eval at /home/milan/Dev/julia/src/toplevel.c:659
jl_toplevel_eval_in at /home/milan/Dev/julia/src/builtins.c:606
eval at ./boot.jl:236
unknown function (ip: 0x7f7346652c2f)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
runtests at /home/milan/Dev/julia/usr/share/julia/test/testdefs.jl:16
#529 at ./multi.jl:1053
run_work_thunk at ./multi.jl:1024
unknown function (ip: 0x7f7134ec10a9)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
#remotecall_fetch#534 at ./multi.jl:1078
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
jl_apply at /home/milan/Dev/julia/src/julia.h:1388
jl_f__apply at /home/milan/Dev/julia/src/builtins.c:548
remotecall_fetch at ./multi.jl:1078
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
jl_apply at /home/milan/Dev/julia/src/julia.h:1388
jl_f__apply at /home/milan/Dev/julia/src/builtins.c:548
#remotecall_fetch#538 at ./multi.jl:1106
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
jl_apply at /home/milan/Dev/julia/src/julia.h:1388
jl_f__apply at /home/milan/Dev/julia/src/builtins.c:548
remotecall_fetch at ./multi.jl:1106
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
macro expansion at /home/milan/Dev/julia/usr/share/julia/test/runtests.jl:65 [inlined]
#38 at ./task.jl:404
unknown function (ip: 0x7f7134ec0a8f)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
jl_apply at /home/milan/Dev/julia/src/julia.h:1388
start_task at /home/milan/Dev/julia/src/task.c:261
unknown function (ip: 0xffffffffffffffff)
Allocations: 10590801 (Pool: 10588840; Big: 1961); GC: 15
ERROR: A test has failed. Please submit a bug report (https://github.com/JuliaLang/julia/issues)
including error messages above and the output of versioninfo():
Julia Version 0.6.0-dev.1807
Commit 26c8d85* (2016-12-31 04:12 UTC)
DEBUG build
Platform Info:
OS: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, skylake-avx512)
Stacktrace:
[1] runtests(::String, ::Int64) at ./interactiveutil.jl:655
[2] runtests(::String) at ./interactiveutil.jl:644
"><pre class="notranslate"><code class="notranslate">julia> Base.runtests("linalg/bunchkaufman")
Test (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
signal (11): Segmentation fault
while loading /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl, in expression starting on line 22
unknown function (ip: 0x7f7350df8a8c)
unknown function (ip: 0x7f7350e0014a)
unknown function (ip: 0x7f7350d8e648)
unknown function (ip: 0x7f7350d9593f)
unknown function (ip: 0x7f7350d95c37)
_ZN4llvm12RegAllocBase16allocatePhysRegsEv at /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
unknown function (ip: 0x7f7350d96e4f)
_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE at /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
operator() at /home/milan/Dev/julia/src/jitlayers.cpp:436
_M_invoke at /usr/include/c++/6.2.1/functional:1726
operator() at /usr/include/c++/6.2.1/functional:2136
addModuleSet<llvm::SmallVector<std::unique_ptr<llvm::Module>, 1u>, llvm::RTDyldMemoryManager*, std::unique_ptr<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> >, std::default_delete<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> > > > > at /home/milan/Dev/julia/usr/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h:73
addModule at /home/milan/Dev/julia/src/jitlayers.cpp:559
jl_add_to_ee at /home/milan/Dev/julia/src/jitlayers.cpp:782
jl_finalize_function at /home/milan/Dev/julia/src/jitlayers.cpp:793
getAddressForFunction at /home/milan/Dev/julia/src/codegen.cpp:1070
jl_generate_fptr at /home/milan/Dev/julia/src/codegen.cpp:1193
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:240
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:62 [inlined]
macro expansion; at ./test.jl:775 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:60 [inlined]
macro expansion; at ./test.jl:714 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:49 [inlined]
macro expansion; at ./test.jl:775 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:40 [inlined]
macro expansion; at ./test.jl:775 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:37 [inlined]
macro expansion; at ./test.jl:775 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/linalg/bunchkaufman.jl:24 [inlined]
macro expansion; at ./test.jl:775 [inlined]
anonymous at ./<missing> (unknown line)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_toplevel_eval_flex at /home/milan/Dev/julia/src/toplevel.c:648
jl_parse_eval_all at /home/milan/Dev/julia/src/ast.c:757
jl_load at /home/milan/Dev/julia/src/toplevel.c:675
jl_load_ at /home/milan/Dev/julia/src/toplevel.c:684
include_from_node1 at ./loading.jl:532
unknown function (ip: 0x7f73466793fb)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
include at ./sysimg.jl:14
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/testdefs.jl:13 [inlined]
macro expansion; at ./test.jl:714 [inlined]
macro expansion; at ./util.jl:288 [inlined]
macro expansion; at /home/milan/Dev/julia/usr/share/julia/test/testdefs.jl:0 [inlined]
anonymous at ./<missing> (unknown line)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_toplevel_eval_flex at /home/milan/Dev/julia/src/toplevel.c:648
jl_toplevel_eval at /home/milan/Dev/julia/src/toplevel.c:659
jl_toplevel_eval_in at /home/milan/Dev/julia/src/builtins.c:606
eval at ./boot.jl:236
unknown function (ip: 0x7f7346652c2f)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
runtests at /home/milan/Dev/julia/usr/share/julia/test/testdefs.jl:16
#529 at ./multi.jl:1053
run_work_thunk at ./multi.jl:1024
unknown function (ip: 0x7f7134ec10a9)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
#remotecall_fetch#534 at ./multi.jl:1078
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
jl_apply at /home/milan/Dev/julia/src/julia.h:1388
jl_f__apply at /home/milan/Dev/julia/src/builtins.c:548
remotecall_fetch at ./multi.jl:1078
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
jl_apply at /home/milan/Dev/julia/src/julia.h:1388
jl_f__apply at /home/milan/Dev/julia/src/builtins.c:548
#remotecall_fetch#538 at ./multi.jl:1106
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
jl_apply at /home/milan/Dev/julia/src/julia.h:1388
jl_f__apply at /home/milan/Dev/julia/src/builtins.c:548
remotecall_fetch at ./multi.jl:1106
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
macro expansion at /home/milan/Dev/julia/usr/share/julia/test/runtests.jl:65 [inlined]
#38 at ./task.jl:404
unknown function (ip: 0x7f7134ec0a8f)
jl_call_method_internal at /home/milan/Dev/julia/src/julia_internal.h:246
jl_apply_generic at /home/milan/Dev/julia/src/gf.c:2196
jl_apply at /home/milan/Dev/julia/src/julia.h:1388
start_task at /home/milan/Dev/julia/src/task.c:261
unknown function (ip: 0xffffffffffffffff)
Allocations: 10590801 (Pool: 10588840; Big: 1961); GC: 15
ERROR: A test has failed. Please submit a bug report (https://github.com/JuliaLang/julia/issues)
including error messages above and the output of versioninfo():
Julia Version 0.6.0-dev.1807
Commit 26c8d85* (2016-12-31 04:12 UTC)
DEBUG build
Platform Info:
OS: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, skylake-avx512)
Stacktrace:
[1] runtests(::String, ::Int64) at ./interactiveutil.jl:655
[2] runtests(::String) at ./interactiveutil.jl:644
</code></pre></div>
<p dir="auto">gdb backtrace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> include("test/linalg/bunchkaufman.jl")
Thread 1 "julia-debug" received signal SIGSEGV, Segmentation fault.
0x00007ffff566da8d in llvm::SplitEditor::deleteRematVictims() ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
Missing separate debuginfos, use: dnf debuginfo-install http-parser-2.7.1-3.fc25.x86_64 libgcc-6.2.1-2.fc25.x86_64 libgfortran-6.2.1-2.fc25.x86_64 libquadmath-6.2.1-2.fc25.x86_64 libstdc++-6.2.1-2.fc25.x86_64 zlib-1.2.8-10.fc24.x86_64
(gdb) ba
#0 0x00007ffff566da8d in llvm::SplitEditor::deleteRematVictims() ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#1 0x00007ffff567514b in llvm::SplitEditor::finish(llvm::SmallVectorImpl<unsigned int>*) () from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#2 0x00007ffff5603649 in (anonymous namespace)::RAGreedy::doRegionSplit(llvm::LiveInterval&, unsigned int, bool, llvm::SmallVectorImpl<unsigned int>&) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#3 0x00007ffff560a940 in (anonymous namespace)::RAGreedy::selectOrSplitImpl(llvm::LiveInterval&, llvm::SmallVectorImpl<unsigned int>&, llvm::SmallSet<unsigned int, 16u, std::less<unsigned int> >&, unsigned int) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#4 0x00007ffff560ac38 in (anonymous namespace)::RAGreedy::selectOrSplit(llvm::LiveInterval&, llvm::SmallVectorImpl<unsigned int>&) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#5 0x00007ffff55f9d40 in llvm::RegAllocBase::allocatePhysRegs() ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#6 0x00007ffff560be50 in (anonymous namespace)::RAGreedy::runOnMachineFunction(llvm::MachineFunction&) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#7 0x00007ffff5575511 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) () from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#8 0x00007ffff5424442 in llvm::FPPassManager::runOnFunction(llvm::Function&)
() from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
---Type <return> to continue, or q <return> to quit---
#9 0x00007ffff542475b in llvm::FPPassManager::runOnModule(llvm::Module&) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#10 0x00007ffff5424a77 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#11 0x00007ffff77ebaf1 in JuliaOJIT::<lambda(llvm::Module&)>::operator()(llvm::Module &) const (__closure=0x6e9368, M=...)
at /home/milan/Dev/julia/src/jitlayers.cpp:436
#12 0x00007ffff77f8209 in std::_Function_handler<llvm::object::OwningBinary<llvm::object::ObjectFile>(llvm::Module&), JuliaOJIT::JuliaOJIT(llvm::TargetMachine&)::<lambda(llvm::Module&)> >::_M_invoke(const std::_Any_data &, llvm::Module &)
(__functor=..., __args#0=...) at /usr/include/c++/6.2.1/functional:1726
#13 0x00007ffff77f966c in std::function<llvm::object::OwningBinary<llvm::object::ObjectFile> (llvm::Module&)>::operator()(llvm::Module&) const (this=0x6e9368,
__args#0=...) at /usr/include/c++/6.2.1/functional:2136
#14 0x00007ffff77f331f in llvm::orc::IRCompileLayer<llvm::orc::ObjectLinkingLayer<JuliaOJIT::DebugObjectRegistrar> >::addModuleSet<llvm::SmallVector<std::unique_ptr<llvm::Module>, 1u>, llvm::RTDyldMemoryManager*, std::unique_ptr<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> >, std::default_delete<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> > > > >(llvm::SmallVector<std::unique_ptr<llvm::Module, std::default_delete<llvm::Module> >, 1u>, llvm::RT---Type <return> to continue, or q <return> to quit---
DyldMemoryManager *, std::unique_ptr<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> >, std::default_delete<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> > > >) (this=0x6e9360, Ms=..., MemMgr=0x6f5cd0,
Resolver=std::unique_ptr<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> >> containing 0x3807110)
at /home/milan/Dev/julia/usr/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h:73
#15 0x00007ffff77ec711 in JuliaOJIT::addModule (this=0x6e8100,
M=std::unique_ptr<llvm::Module> containing 0x0)
at /home/milan/Dev/julia/src/jitlayers.cpp:559
#16 0x00007ffff77ed267 in jl_add_to_ee (
m=std::unique_ptr<llvm::Module> containing 0x0)
at /home/milan/Dev/julia/src/jitlayers.cpp:782
#17 0x00007ffff77ed33f in jl_finalize_function (F=0x4137a58)
at /home/milan/Dev/julia/src/jitlayers.cpp:793
#18 0x00007ffff7773e93 in getAddressForFunction (llvmf=0x4137a58)
at /home/milan/Dev/julia/src/codegen.cpp:1070
#19 0x00007ffff77744b0 in jl_generate_fptr (li=0x7ffdef82cf90, _F=0x4137a58,
world=20528) at /home/milan/Dev/julia/src/codegen.cpp:1193
---Type <return> to continue, or q <return> to quit---
#20 0x00007ffff76eac92 in jl_call_method_internal (meth=0x7ffdef82cf90,
args=0x7fffffffb370, nargs=3)
at /home/milan/Dev/julia/src/julia_internal.h:240
#21 0x00007ffff76f2655 in jl_apply_generic (args=0x7fffffffb370, nargs=3)
at /home/milan/Dev/julia/src/gf.c:2196
#22 0x00007ffdd9729c47 in ?? ()
#23 0x00007fffffffc200 in ?? ()
#24 0x0000000000005030 in ?? ()
#25 0x00007ffdeff776d0 in ?? ()
#26 0x00007ffdeff77fa0 in ?? ()
#27 0x00007ffde91997b0 in ?? ()
#28 0x00007ffde8a075b0 in ?? ()
#29 0x00007ffde89fa890 in ?? ()
#30 0x00007ffde8a12170 in ?? ()
#31 0x00007ffde8a121d0 in ?? ()
#32 0x00007ffdefbe5530 in ?? ()
#33 0x00007ffde89d9870 in ?? ()
#34 0x0000000000000002 in ?? ()
#35 0x00007ffde8ab4940 in ?? ()
#36 0x00007ffde902db78 in ?? ()
#37 0x00007ffde9d16450 in ?? ()
#38 0x00007ffdecc2b4f8 in ?? ()
#39 0x00007ffdf110b940 in ?? ()
---Type <return> to continue, or q <return> to quit---
#40 0x00007ffdefcab2b0 in ?? ()
#41 0x0000000000000001 in ?? ()
#42 0x00007ffdf0239ef0 in ?? ()
#43 0x0000000000000001 in ?? ()
#44 0x00007ffdf0238fd0 in ?? ()
#45 0x00007ffde902f5d0 in ?? ()
#46 0x0000000000000002 in ?? ()
#47 0x00007ffde8989070 in ?? ()
#48 0x00007ffde8989080 in ?? ()
#49 0x0000000000000003 in ?? ()
#50 0x00007ffdec2e9b80 in ?? ()
#51 0x00007ffdecc29df0 in ?? ()
#52 0x00007ffde902cbd0 in ?? ()
#53 0x00007ffdeb527ec0 in ?? ()
#54 0x00007ffdeb559b80 in ?? ()
#55 0x0000000003943205 in ?? ()
#56 0x00007fffffff9d08 in ?? ()
#57 0x00007fffffff9fd0 in ?? ()
#58 0x00007ffff57dc0a2 in llvm::RegsForValue::getCopyFromRegs(llvm::SelectionDAG&, llvm::FunctionLoweringInfo&, llvm::SDLoc const&, llvm::SDValue&, llvm::SDValue*, llvm::Value const*) const ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#59 0x00007ffde8960df0 in ?? ()
---Type <return> to continue, or q <return> to quit---
#60 0x00007ffde89bbf70 in ?? ()
#61 0x00007ffdeb559cb8 in ?? ()
#62 0x0000000000000011 in ?? ()
#63 0x00007ffdeb5e30d0 in ?? ()
#64 0x00007ffde8960cd0 in ?? ()
#65 0x00007ffdee8e5c60 in ?? ()
#66 0x010100ffffff9e80 in ?? ()
#67 0x00007ffff7719009 in jl_unprotect_stack (F=0x7ffde8960cd0,
args=0x7ffdeb5e30d0, nargs=0) at /home/milan/Dev/julia/src/task.c:648
#68 0x0000000000737400 in ?? ()
#69 0x00007ffded778430 in ?? ()
#70 0x00007ffde88b8718 in ?? ()
#71 0x00007ffff7702441 in jl_eqtable_put (h=0x11, key=0x7ffdeb559cb8,
val=0x7ffde89bbf70) at /home/milan/Dev/julia/src/table.c:136
#72 0x00007ffde8980060 in ?? ()
#73 0x00007ffde902cb50 in ?? ()
#74 0x00007ffde8989070 in ?? ()
#75 0x00007ffde8965870 in ?? ()
#76 0x00007ffff7fcd1c8 in ?? ()
#77 0x01000100ffff9ec9 in ?? ()
#78 0x0000000000000594 in ?? ()
#79 0x00007fffffffc270 in ?? ()
#80 0x00007ffdf0c10d30 in ?? ()
---Type <return> to continue, or q <return> to quit---
#81 0x00007ffdeff77fa0 in ?? ()
#82 0x00007ffde8a075b0 in ?? ()
#83 0x00007ffde8a075b0 in ?? ()
#84 0x00007ffde8989080 in ?? ()
#85 0x00007ffde8989070 in ?? ()
#86 0x0000000000000000 in ?? ()"><pre class="notranslate"><code class="notranslate">julia> include("test/linalg/bunchkaufman.jl")
Thread 1 "julia-debug" received signal SIGSEGV, Segmentation fault.
0x00007ffff566da8d in llvm::SplitEditor::deleteRematVictims() ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
Missing separate debuginfos, use: dnf debuginfo-install http-parser-2.7.1-3.fc25.x86_64 libgcc-6.2.1-2.fc25.x86_64 libgfortran-6.2.1-2.fc25.x86_64 libquadmath-6.2.1-2.fc25.x86_64 libstdc++-6.2.1-2.fc25.x86_64 zlib-1.2.8-10.fc24.x86_64
(gdb) ba
#0 0x00007ffff566da8d in llvm::SplitEditor::deleteRematVictims() ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#1 0x00007ffff567514b in llvm::SplitEditor::finish(llvm::SmallVectorImpl<unsigned int>*) () from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#2 0x00007ffff5603649 in (anonymous namespace)::RAGreedy::doRegionSplit(llvm::LiveInterval&, unsigned int, bool, llvm::SmallVectorImpl<unsigned int>&) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#3 0x00007ffff560a940 in (anonymous namespace)::RAGreedy::selectOrSplitImpl(llvm::LiveInterval&, llvm::SmallVectorImpl<unsigned int>&, llvm::SmallSet<unsigned int, 16u, std::less<unsigned int> >&, unsigned int) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#4 0x00007ffff560ac38 in (anonymous namespace)::RAGreedy::selectOrSplit(llvm::LiveInterval&, llvm::SmallVectorImpl<unsigned int>&) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#5 0x00007ffff55f9d40 in llvm::RegAllocBase::allocatePhysRegs() ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#6 0x00007ffff560be50 in (anonymous namespace)::RAGreedy::runOnMachineFunction(llvm::MachineFunction&) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#7 0x00007ffff5575511 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) () from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#8 0x00007ffff5424442 in llvm::FPPassManager::runOnFunction(llvm::Function&)
() from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
---Type <return> to continue, or q <return> to quit---
#9 0x00007ffff542475b in llvm::FPPassManager::runOnModule(llvm::Module&) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#10 0x00007ffff5424a77 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#11 0x00007ffff77ebaf1 in JuliaOJIT::<lambda(llvm::Module&)>::operator()(llvm::Module &) const (__closure=0x6e9368, M=...)
at /home/milan/Dev/julia/src/jitlayers.cpp:436
#12 0x00007ffff77f8209 in std::_Function_handler<llvm::object::OwningBinary<llvm::object::ObjectFile>(llvm::Module&), JuliaOJIT::JuliaOJIT(llvm::TargetMachine&)::<lambda(llvm::Module&)> >::_M_invoke(const std::_Any_data &, llvm::Module &)
(__functor=..., __args#0=...) at /usr/include/c++/6.2.1/functional:1726
#13 0x00007ffff77f966c in std::function<llvm::object::OwningBinary<llvm::object::ObjectFile> (llvm::Module&)>::operator()(llvm::Module&) const (this=0x6e9368,
__args#0=...) at /usr/include/c++/6.2.1/functional:2136
#14 0x00007ffff77f331f in llvm::orc::IRCompileLayer<llvm::orc::ObjectLinkingLayer<JuliaOJIT::DebugObjectRegistrar> >::addModuleSet<llvm::SmallVector<std::unique_ptr<llvm::Module>, 1u>, llvm::RTDyldMemoryManager*, std::unique_ptr<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> >, std::default_delete<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> > > > >(llvm::SmallVector<std::unique_ptr<llvm::Module, std::default_delete<llvm::Module> >, 1u>, llvm::RT---Type <return> to continue, or q <return> to quit---
DyldMemoryManager *, std::unique_ptr<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> >, std::default_delete<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> > > >) (this=0x6e9360, Ms=..., MemMgr=0x6f5cd0,
Resolver=std::unique_ptr<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> >> containing 0x3807110)
at /home/milan/Dev/julia/usr/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h:73
#15 0x00007ffff77ec711 in JuliaOJIT::addModule (this=0x6e8100,
M=std::unique_ptr<llvm::Module> containing 0x0)
at /home/milan/Dev/julia/src/jitlayers.cpp:559
#16 0x00007ffff77ed267 in jl_add_to_ee (
m=std::unique_ptr<llvm::Module> containing 0x0)
at /home/milan/Dev/julia/src/jitlayers.cpp:782
#17 0x00007ffff77ed33f in jl_finalize_function (F=0x4137a58)
at /home/milan/Dev/julia/src/jitlayers.cpp:793
#18 0x00007ffff7773e93 in getAddressForFunction (llvmf=0x4137a58)
at /home/milan/Dev/julia/src/codegen.cpp:1070
#19 0x00007ffff77744b0 in jl_generate_fptr (li=0x7ffdef82cf90, _F=0x4137a58,
world=20528) at /home/milan/Dev/julia/src/codegen.cpp:1193
---Type <return> to continue, or q <return> to quit---
#20 0x00007ffff76eac92 in jl_call_method_internal (meth=0x7ffdef82cf90,
args=0x7fffffffb370, nargs=3)
at /home/milan/Dev/julia/src/julia_internal.h:240
#21 0x00007ffff76f2655 in jl_apply_generic (args=0x7fffffffb370, nargs=3)
at /home/milan/Dev/julia/src/gf.c:2196
#22 0x00007ffdd9729c47 in ?? ()
#23 0x00007fffffffc200 in ?? ()
#24 0x0000000000005030 in ?? ()
#25 0x00007ffdeff776d0 in ?? ()
#26 0x00007ffdeff77fa0 in ?? ()
#27 0x00007ffde91997b0 in ?? ()
#28 0x00007ffde8a075b0 in ?? ()
#29 0x00007ffde89fa890 in ?? ()
#30 0x00007ffde8a12170 in ?? ()
#31 0x00007ffde8a121d0 in ?? ()
#32 0x00007ffdefbe5530 in ?? ()
#33 0x00007ffde89d9870 in ?? ()
#34 0x0000000000000002 in ?? ()
#35 0x00007ffde8ab4940 in ?? ()
#36 0x00007ffde902db78 in ?? ()
#37 0x00007ffde9d16450 in ?? ()
#38 0x00007ffdecc2b4f8 in ?? ()
#39 0x00007ffdf110b940 in ?? ()
---Type <return> to continue, or q <return> to quit---
#40 0x00007ffdefcab2b0 in ?? ()
#41 0x0000000000000001 in ?? ()
#42 0x00007ffdf0239ef0 in ?? ()
#43 0x0000000000000001 in ?? ()
#44 0x00007ffdf0238fd0 in ?? ()
#45 0x00007ffde902f5d0 in ?? ()
#46 0x0000000000000002 in ?? ()
#47 0x00007ffde8989070 in ?? ()
#48 0x00007ffde8989080 in ?? ()
#49 0x0000000000000003 in ?? ()
#50 0x00007ffdec2e9b80 in ?? ()
#51 0x00007ffdecc29df0 in ?? ()
#52 0x00007ffde902cbd0 in ?? ()
#53 0x00007ffdeb527ec0 in ?? ()
#54 0x00007ffdeb559b80 in ?? ()
#55 0x0000000003943205 in ?? ()
#56 0x00007fffffff9d08 in ?? ()
#57 0x00007fffffff9fd0 in ?? ()
#58 0x00007ffff57dc0a2 in llvm::RegsForValue::getCopyFromRegs(llvm::SelectionDAG&, llvm::FunctionLoweringInfo&, llvm::SDLoc const&, llvm::SDValue&, llvm::SDValue*, llvm::Value const*) const ()
from /home/milan/Dev/julia/usr/bin/../lib/libLLVM-3.9.so
#59 0x00007ffde8960df0 in ?? ()
---Type <return> to continue, or q <return> to quit---
#60 0x00007ffde89bbf70 in ?? ()
#61 0x00007ffdeb559cb8 in ?? ()
#62 0x0000000000000011 in ?? ()
#63 0x00007ffdeb5e30d0 in ?? ()
#64 0x00007ffde8960cd0 in ?? ()
#65 0x00007ffdee8e5c60 in ?? ()
#66 0x010100ffffff9e80 in ?? ()
#67 0x00007ffff7719009 in jl_unprotect_stack (F=0x7ffde8960cd0,
args=0x7ffdeb5e30d0, nargs=0) at /home/milan/Dev/julia/src/task.c:648
#68 0x0000000000737400 in ?? ()
#69 0x00007ffded778430 in ?? ()
#70 0x00007ffde88b8718 in ?? ()
#71 0x00007ffff7702441 in jl_eqtable_put (h=0x11, key=0x7ffdeb559cb8,
val=0x7ffde89bbf70) at /home/milan/Dev/julia/src/table.c:136
#72 0x00007ffde8980060 in ?? ()
#73 0x00007ffde902cb50 in ?? ()
#74 0x00007ffde8989070 in ?? ()
#75 0x00007ffde8965870 in ?? ()
#76 0x00007ffff7fcd1c8 in ?? ()
#77 0x01000100ffff9ec9 in ?? ()
#78 0x0000000000000594 in ?? ()
#79 0x00007fffffffc270 in ?? ()
#80 0x00007ffdf0c10d30 in ?? ()
---Type <return> to continue, or q <return> to quit---
#81 0x00007ffdeff77fa0 in ?? ()
#82 0x00007ffde8a075b0 in ?? ()
#83 0x00007ffde8a075b0 in ?? ()
#84 0x00007ffde8989080 in ?? ()
#85 0x00007ffde8989070 in ?? ()
#86 0x0000000000000000 in ?? ()
</code></pre></div> | <p dir="auto">On</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> versioninfo()
Julia Version 0.6.0-dev.1807
Commit 26c8d85* (2016-12-31 04:12 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin15.6.0)
CPU: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-c1">versioninfo</span>()
Julia Version <span class="pl-c1">0.6</span>.<span class="pl-c1">0</span><span class="pl-k">-</span>dev.<span class="pl-c1">1807</span>
Commit <span class="pl-c1">26</span>c8d85<span class="pl-k">*</span> (<span class="pl-c1">2016</span><span class="pl-k">-</span><span class="pl-c1">12</span><span class="pl-k">-</span><span class="pl-c1">31</span> <span class="pl-c1">04</span><span class="pl-k">:</span><span class="pl-c1">12</span> UTC)
Platform Info<span class="pl-k">:</span>
OS<span class="pl-k">:</span> macOS (x86_64<span class="pl-k">-</span>apple<span class="pl-k">-</span>darwin15.<span class="pl-c1">6.0</span>)
CPU<span class="pl-k">:</span> <span class="pl-c1">Intel</span>(R) <span class="pl-c1">Core</span>(TM) i7<span class="pl-k">-</span><span class="pl-c1">3520</span>M CPU @ <span class="pl-c1">2.90</span>GHz
WORD_SIZE<span class="pl-k">:</span> <span class="pl-c1">64</span>
BLAS<span class="pl-k">:</span> libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK<span class="pl-k">:</span> libopenblas64_
LIBM<span class="pl-k">:</span> libopenlibm
LLVM<span class="pl-k">:</span> libLLVM<span class="pl-k">-</span><span class="pl-c1">3.9</span>.<span class="pl-c1">1</span> (ORCJIT, ivybridge)</pre></div>
<p dir="auto">The <code class="notranslate">linalg/qr</code> tests fail. The failure reduces to</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="n = 10;
srand(1234321);
a = randn(n,n)/2;
av = view(a, 1:n - 1, 1:n - 1);
qrav = qrfact(av);
q, r = qrav[:Q], qrav[:R];
q*r; # fine
av; # fine
(q*r, av); # fine
q*r ≈ av # segfaults
# q*r = av # also segfaults
# q*r - av # also segfaults"><pre class="notranslate">n <span class="pl-k">=</span> <span class="pl-c1">10</span>;
<span class="pl-c1">srand</span>(<span class="pl-c1">1234321</span>);
a <span class="pl-k">=</span> <span class="pl-c1">randn</span>(n,n)<span class="pl-k">/</span><span class="pl-c1">2</span>;
av <span class="pl-k">=</span> <span class="pl-c1">view</span>(a, <span class="pl-c1">1</span><span class="pl-k">:</span>n <span class="pl-k">-</span> <span class="pl-c1">1</span>, <span class="pl-c1">1</span><span class="pl-k">:</span>n <span class="pl-k">-</span> <span class="pl-c1">1</span>);
qrav <span class="pl-k">=</span> <span class="pl-c1">qrfact</span>(av);
q, r <span class="pl-k">=</span> qrav[<span class="pl-c1">:Q</span>], qrav[<span class="pl-c1">:R</span>];
q<span class="pl-k">*</span>r; <span class="pl-c"><span class="pl-c">#</span> fine</span>
av; <span class="pl-c"><span class="pl-c">#</span> fine</span>
(q<span class="pl-k">*</span>r, av); <span class="pl-c"><span class="pl-c">#</span> fine</span>
q<span class="pl-k">*</span>r <span class="pl-k">≈</span> av <span class="pl-c"><span class="pl-c">#</span> segfaults</span>
<span class="pl-c"><span class="pl-c">#</span> q*r = av # also segfaults</span>
<span class="pl-c"><span class="pl-c">#</span> q*r - av # also segfaults</span></pre></div>
<p dir="auto">e.g.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> n = 10;
julia> srand(1234321);
julia> a = randn(n,n)/2;
julia> av = view(a, 1:n - 1, 1:n - 1);
julia> qrav = qrfact(av);
julia> q, r = qrav[:Q], qrav[:R];
julia> q*r; # fine
julia> av; # fine
julia> (q*r, av); # fine
julia> q*r ≈ av # segfaults
signal (11): Segmentation fault: 11
while loading no file, in expression starting on line 0
_ZN12_GLOBAL__N_113InlineSpiller16postOptimizationEv at /Users/sacha/pkg/julia/usr/lib//libLLVM.dylib (unknown line)
_ZN4llvm12RegAllocBase16postOptimizationEv at /Users/sacha/pkg/julia/usr/lib//libLLVM.dylib (unknown line)
_ZN12_GLOBAL__N_18RAGreedy20runOnMachineFunctionERN4llvm15MachineFunctionE at /Users/sacha/pkg/julia/usr/lib//libLLVM.dylib (unknown line)
_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE at /Users/sacha/pkg/julia/usr/lib//libLLVM.dylib (unknown line)
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at /Users/sacha/pkg/julia/usr/lib//libLLVM.dylib (unknown line)
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at /Users/sacha/pkg/julia/usr/lib//libLLVM.dylib (unknown line)
_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at /Users/sacha/pkg/julia/usr/lib//libLLVM.dylib (unknown line)
operator() at /Users/sacha/pkg/julia/src/jitlayers.cpp:436 [inlined]
__invoke<(lambda at /Users/sacha/pkg/julia/src/jitlayers.cpp:434:13) &, llvm::Module &> at /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__functional_base:416 [inlined]
__call<(lambda at /Users/sacha/pkg/julia/src/jitlayers.cpp:434:13) &, llvm::Module &> at /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__functional_base:437 [inlined]
operator() at /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1437
operator() at /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1817 [inlined]
addModuleSet<llvm::SmallVector<std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module> >, 1>, llvm::RTDyldMemoryManager *, std::__1::unique_ptr<llvm::orc::LambdaResolver<(lambda at /Users/sacha/pkg/julia/src/jitlayers.cpp:530:23), (lambda at /Users/sacha/pkg/julia/src/jitlayers.cpp:554:23)>, std::__1::default_delete<llvm::orc::LambdaResolver<(lambda at /Users/sacha/pkg/julia/src/jitlayers.cpp:530:23), (lambda at /Users/sacha/pkg/julia/src/jitlayers.cpp:554:23)> > > > at /Users/sacha/pkg/julia/usr/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h:73 [inlined]
addModule at /Users/sacha/pkg/julia/src/jitlayers.cpp:558
jl_add_to_ee at /Users/sacha/pkg/julia/src/jitlayers.cpp:782 [inlined]
jl_finalize_function at /Users/sacha/pkg/julia/src/jitlayers.cpp:793
getAddressForFunction at /Users/sacha/pkg/julia/src/codegen.cpp:1070 [inlined]
jl_generate_fptr at /Users/sacha/pkg/julia/src/codegen.cpp:1193
jl_call_method_internal at /Users/sacha/pkg/julia/src/./julia_internal.h:240
jl_apply_generic at /Users/sacha/pkg/julia/src/gf.c:2196
isapprox at ./linalg/generic.jl:1190
unknown function (ip: 0x3198d4456)
jl_apply_generic at /Users/sacha/pkg/julia/src/gf.c:2196
do_call at /Users/sacha/pkg/julia/src/interpreter.c:75
eval at /Users/sacha/pkg/julia/src/interpreter.c:214
jl_interpret_toplevel_expr at /Users/sacha/pkg/julia/src/interpreter.c:34
jl_toplevel_eval_flex at /Users/sacha/pkg/julia/src/toplevel.c:636
jl_toplevel_eval_in at /Users/sacha/pkg/julia/src/builtins.c:606
eval at ./boot.jl:236
jlcall_eval_18559 at /Users/sacha/pkg/julia/usr/lib/julia/sys.dylib (unknown line)
jl_apply_generic at /Users/sacha/pkg/julia/src/gf.c:2196
eval_user_input at ./REPL.jl:66
unknown function (ip: 0x3198c9a76)
jl_apply_generic at /Users/sacha/pkg/julia/src/gf.c:2196
macro expansion at ./REPL.jl:97 [inlined]
#1 at ./event.jl:66
unknown function (ip: 0x3198c285f)
jl_apply_generic at /Users/sacha/pkg/julia/src/gf.c:2196
jl_apply at /Users/sacha/pkg/julia/src/./julia.h:1388 [inlined]
start_task at /Users/sacha/pkg/julia/src/task.c:261
Allocations: 7033163 (Pool: 7028643; Big: 4520); GC: 15
Segmentation fault: 11"><pre class="notranslate">julia<span class="pl-k">></span> n <span class="pl-k">=</span> <span class="pl-c1">10</span>;
julia<span class="pl-k">></span> <span class="pl-c1">srand</span>(<span class="pl-c1">1234321</span>);
julia<span class="pl-k">></span> a <span class="pl-k">=</span> <span class="pl-c1">randn</span>(n,n)<span class="pl-k">/</span><span class="pl-c1">2</span>;
julia<span class="pl-k">></span> av <span class="pl-k">=</span> <span class="pl-c1">view</span>(a, <span class="pl-c1">1</span><span class="pl-k">:</span>n <span class="pl-k">-</span> <span class="pl-c1">1</span>, <span class="pl-c1">1</span><span class="pl-k">:</span>n <span class="pl-k">-</span> <span class="pl-c1">1</span>);
julia<span class="pl-k">></span> qrav <span class="pl-k">=</span> <span class="pl-c1">qrfact</span>(av);
julia<span class="pl-k">></span> q, r <span class="pl-k">=</span> qrav[<span class="pl-c1">:Q</span>], qrav[<span class="pl-c1">:R</span>];
julia<span class="pl-k">></span> q<span class="pl-k">*</span>r; <span class="pl-c"><span class="pl-c">#</span> fine</span>
julia<span class="pl-k">></span> av; <span class="pl-c"><span class="pl-c">#</span> fine</span>
julia<span class="pl-k">></span> (q<span class="pl-k">*</span>r, av); <span class="pl-c"><span class="pl-c">#</span> fine</span>
julia<span class="pl-k">></span> q<span class="pl-k">*</span>r <span class="pl-k">≈</span> av <span class="pl-c"><span class="pl-c">#</span> segfaults</span>
signal (<span class="pl-c1">11</span>)<span class="pl-k">:</span> Segmentation fault<span class="pl-k">:</span> <span class="pl-c1">11</span>
<span class="pl-k">while</span> loading no file, <span class="pl-k">in</span> expression starting on line <span class="pl-c1">0</span>
_ZN12_GLOBAL__N_113InlineSpiller16postOptimizationEv at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">//</span>libLLVM<span class="pl-k">.</span>dylib (unknown line)
_ZN4llvm12RegAllocBase16postOptimizationEv at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">//</span>libLLVM<span class="pl-k">.</span>dylib (unknown line)
_ZN12_GLOBAL__N_18RAGreedy20runOnMachineFunctionERN4llvm15MachineFunctionE at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">//</span>libLLVM<span class="pl-k">.</span>dylib (unknown line)
_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">//</span>libLLVM<span class="pl-k">.</span>dylib (unknown line)
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">//</span>libLLVM<span class="pl-k">.</span>dylib (unknown line)
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">//</span>libLLVM<span class="pl-k">.</span>dylib (unknown line)
_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">//</span>libLLVM<span class="pl-k">.</span>dylib (unknown line)
<span class="pl-c1">operator</span>() at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>jitlayers<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">436</span> [inlined]
__invoke<span class="pl-k"><</span>(lambda at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>jitlayers<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">434</span><span class="pl-k">:</span><span class="pl-c1">13</span>) <span class="pl-k">&</span>, llvm<span class="pl-k">::</span><span class="pl-c1">Module</span> <span class="pl-k">&</span><span class="pl-k">></span> at <span class="pl-k">/</span>Library<span class="pl-k">/</span>Developer<span class="pl-k">/</span>CommandLineTools<span class="pl-k">/</span>usr<span class="pl-k">/</span>bin<span class="pl-k">/</span><span class="pl-k">..</span><span class="pl-k">/</span>include<span class="pl-k">/</span>c<span class="pl-k">++/</span>v1<span class="pl-k">/</span>__functional_base<span class="pl-k">:</span><span class="pl-c1">416</span> [inlined]
__call<span class="pl-k"><</span>(lambda at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>jitlayers<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">434</span><span class="pl-k">:</span><span class="pl-c1">13</span>) <span class="pl-k">&</span>, llvm<span class="pl-k">::</span><span class="pl-c1">Module</span> <span class="pl-k">&</span><span class="pl-k">></span> at <span class="pl-k">/</span>Library<span class="pl-k">/</span>Developer<span class="pl-k">/</span>CommandLineTools<span class="pl-k">/</span>usr<span class="pl-k">/</span>bin<span class="pl-k">/</span><span class="pl-k">..</span><span class="pl-k">/</span>include<span class="pl-k">/</span>c<span class="pl-k">++/</span>v1<span class="pl-k">/</span>__functional_base<span class="pl-k">:</span><span class="pl-c1">437</span> [inlined]
<span class="pl-c1">operator</span>() at <span class="pl-k">/</span>Library<span class="pl-k">/</span>Developer<span class="pl-k">/</span>CommandLineTools<span class="pl-k">/</span>usr<span class="pl-k">/</span>bin<span class="pl-k">/</span><span class="pl-k">..</span><span class="pl-k">/</span>include<span class="pl-k">/</span>c<span class="pl-k">++/</span>v1<span class="pl-k">/</span>functional<span class="pl-k">:</span><span class="pl-c1">1437</span>
<span class="pl-c1">operator</span>() at <span class="pl-k">/</span>Library<span class="pl-k">/</span>Developer<span class="pl-k">/</span>CommandLineTools<span class="pl-k">/</span>usr<span class="pl-k">/</span>bin<span class="pl-k">/</span><span class="pl-k">..</span><span class="pl-k">/</span>include<span class="pl-k">/</span>c<span class="pl-k">++/</span>v1<span class="pl-k">/</span>functional<span class="pl-k">:</span><span class="pl-c1">1817</span> [inlined]
addModuleSet<span class="pl-k"><</span>llvm<span class="pl-k">::</span><span class="pl-c1">SmallVector</span><span class="pl-k"><</span>std<span class="pl-k">::</span><span class="pl-c1">__1</span><span class="pl-k">::</span><span class="pl-c1">unique_ptr</span><span class="pl-k"><</span>llvm<span class="pl-k">::</span><span class="pl-c1">Module</span>, std<span class="pl-k">::</span><span class="pl-c1">__1</span><span class="pl-k">::</span><span class="pl-c1">default_delete</span><span class="pl-k"><</span>llvm<span class="pl-k">::</span><span class="pl-c1">Module</span><span class="pl-k">></span> <span class="pl-k">></span>, <span class="pl-c1">1</span><span class="pl-k">></span>, llvm<span class="pl-k">::</span><span class="pl-c1">RTDyldMemoryManager</span> <span class="pl-k">*</span>, std<span class="pl-k">::</span><span class="pl-c1">__1</span><span class="pl-k">::</span><span class="pl-c1">unique_ptr</span><span class="pl-k"><</span>llvm<span class="pl-k">::</span><span class="pl-c1">orc</span><span class="pl-k">::</span><span class="pl-c1">LambdaResolver</span><span class="pl-k"><</span>(lambda at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>jitlayers<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">530</span><span class="pl-k">:</span><span class="pl-c1">23</span>), (lambda at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>jitlayers<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">554</span><span class="pl-k">:</span><span class="pl-c1">23</span>)<span class="pl-k">></span>, std<span class="pl-k">::</span><span class="pl-c1">__1</span><span class="pl-k">::</span><span class="pl-c1">default_delete</span><span class="pl-k"><</span>llvm<span class="pl-k">::</span><span class="pl-c1">orc</span><span class="pl-k">::</span><span class="pl-c1">LambdaResolver</span><span class="pl-k"><</span>(lambda at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>jitlayers<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">530</span><span class="pl-k">:</span><span class="pl-c1">23</span>), (lambda at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>jitlayers<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">554</span><span class="pl-k">:</span><span class="pl-c1">23</span>)<span class="pl-k">></span> <span class="pl-k">></span> <span class="pl-k">></span> <span class="pl-k">></span> at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>include<span class="pl-k">/</span>llvm<span class="pl-k">/</span>ExecutionEngine<span class="pl-k">/</span>Orc<span class="pl-k">/</span>IRCompileLayer<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">73</span> [inlined]
addModule at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>jitlayers<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">558</span>
jl_add_to_ee at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>jitlayers<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">782</span> [inlined]
jl_finalize_function at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>jitlayers<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">793</span>
getAddressForFunction at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>codegen<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">1070</span> [inlined]
jl_generate_fptr at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>codegen<span class="pl-k">.</span>cpp<span class="pl-k">:</span><span class="pl-c1">1193</span>
jl_call_method_internal at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/./</span>julia_internal<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">240</span>
jl_apply_generic at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">2196</span>
isapprox at <span class="pl-k">./</span>linalg<span class="pl-k">/</span>generic<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">1190</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x3198d4456</span>)
jl_apply_generic at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">2196</span>
do_call at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>interpreter<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">75</span>
eval at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>interpreter<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">214</span>
jl_interpret_toplevel_expr at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>interpreter<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">34</span>
jl_toplevel_eval_flex at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>toplevel<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">636</span>
jl_toplevel_eval_in at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>builtins<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">606</span>
eval at <span class="pl-k">./</span>boot<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">236</span>
jlcall_eval_18559 at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">/</span>julia<span class="pl-k">/</span>sys<span class="pl-k">.</span>dylib (unknown line)
jl_apply_generic at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">2196</span>
eval_user_input at <span class="pl-k">./</span>REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">66</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x3198c9a76</span>)
jl_apply_generic at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">2196</span>
<span class="pl-k">macro</span> expansion at <span class="pl-k">./</span>REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">97</span> [inlined]
<span class="pl-c"><span class="pl-c">#</span>1 at ./event.jl:66</span>
unknown <span class="pl-k">function</span> (ip<span class="pl-k">:</span> <span class="pl-c1">0x3198c285f</span>)
jl_apply_generic at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>gf<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">2196</span>
jl_apply at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/./</span>julia<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">1388</span> [inlined]
start_task at <span class="pl-k">/</span>Users<span class="pl-k">/</span>sacha<span class="pl-k">/</span>pkg<span class="pl-k">/</span>julia<span class="pl-k">/</span>src<span class="pl-k">/</span>task<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">261</span>
Allocations<span class="pl-k">:</span> <span class="pl-c1">7033163</span> (Pool<span class="pl-k">:</span> <span class="pl-c1">7028643</span>; Big<span class="pl-k">:</span> <span class="pl-c1">4520</span>); GC<span class="pl-k">:</span> <span class="pl-c1">15</span>
Segmentation fault<span class="pl-k">:</span> <span class="pl-c1">11</span></pre></div>
<p dir="auto">Best!</p> | 1 |
<p dir="auto">Hi, I am a graduate student utilizing sklean for some data work.<br>
And when I handle the data using the Decision Trees library, I found there are some inconvenience:<br>
Neither the classificationTree nor the regressionTree supports categorical feature. <strong>That means the Decision trees model can only accept continuous feature</strong>.<br>
For example, the categorical feature like app name such as google, facebook can not be input into the model, because they can not be transformed to continuous value properly. And there don not exist a corresponding algorithm to divide discrete feature in the Decision Trees library.<br>
However, <strong>the CART algorithm itself has considered the use of categorical feature</strong>. So I have made some modification of Decision Trees library based on CART and apply the new model on my own work. And it proves that the support for categorical feature indeed improves the performance, which is very necessary for decision tree, I think.<br>
I am very willing to contribute this to sklearn community, but I`m new to this community, not so familiar about the procedure.<br>
Could u give some suggestions or comments on this new feature? Or has anyone already processed on this feature? Thank you so much.</p> | <h3 dir="auto">Describe the bug</h3>
<p dir="auto">When calling <code class="notranslate">cross_val_score</code> with a sparse data matrix <code class="notranslate">X</code> and a <code class="notranslate">RandomForestClassifier</code> with <code class="notranslate">n_jobs=-1</code>, there is a weird interaction with joblib and memmapping that makes the buffer from <code class="notranslate">X</code> read-only, breaking the cython code for the tree construction but it is weird as it only appears with the <code class="notranslate">cross_validate</code> function, and not when calling the classifier alone, while <code class="notranslate">n_jobs=1</code> for the cross val function so joblib should not enter the play here...</p>
<h3 dir="auto">Steps/Code to Reproduce</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from scipy.sparse import csr_matrix
from sklearn.datasets import make_classification
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import cross_val_score
X, y = make_classification(10000, n_features=200)
X = csr_matrix(X, copy=True)
clf = RandomForestClassifier(n_jobs=-1)
cross_val_score(clf, X, y)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">sparse</span> <span class="pl-k">import</span> <span class="pl-s1">csr_matrix</span>
<span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">datasets</span> <span class="pl-k">import</span> <span class="pl-s1">make_classification</span>
<span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">ensemble</span> <span class="pl-k">import</span> <span class="pl-v">RandomForestClassifier</span>
<span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">model_selection</span> <span class="pl-k">import</span> <span class="pl-s1">cross_val_score</span>
<span class="pl-v">X</span>, <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-en">make_classification</span>(<span class="pl-c1">10000</span>, <span class="pl-s1">n_features</span><span class="pl-c1">=</span><span class="pl-c1">200</span>)
<span class="pl-v">X</span> <span class="pl-c1">=</span> <span class="pl-en">csr_matrix</span>(<span class="pl-v">X</span>, <span class="pl-s1">copy</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">clf</span> <span class="pl-c1">=</span> <span class="pl-v">RandomForestClassifier</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-en">cross_val_score</span>(<span class="pl-s1">clf</span>, <span class="pl-v">X</span>, <span class="pl-s1">y</span>)</pre></div>
<h3 dir="auto">Expected Results</h3>
<p dir="auto">Working code</p>
<h3 dir="auto">Actual Results</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ValueError:
All the 5 fits failed.
It is very likely that your model is misconfigured.
You can try to debug the error by setting error_score='raise'.
Below are more details about the failures:
--------------------------------------------------------------------------------
5 fits failed with the following error:
joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/externals/loky/process_executor.py", line 428, in _process_worker
r = call_item()
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/externals/loky/process_executor.py", line 275, in __call__
return self.fn(*self.args, **self.kwargs)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/_parallel_backends.py", line 620, in __call__
return self.func(*args, **kwargs)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/parallel.py", line 288, in __call__
return [func(*args, **kwargs)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/parallel.py", line 288, in <listcomp>
return [func(*args, **kwargs)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/utils/fixes.py", line 117, in __call__
return self.function(*args, **kwargs)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/ensemble/_forest.py", line 185, in _parallel_build_trees
tree.fit(X, y, sample_weight=curr_sample_weight, check_input=False)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/tree/_classes.py", line 889, in fit
super().fit(
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/tree/_classes.py", line 379, in fit
builder.build(self.tree_, X, y, sample_weight)
File "sklearn/tree/_tree.pyx", line 147, in sklearn.tree._tree.DepthFirstTreeBuilder.build
File "sklearn/tree/_tree.pyx", line 173, in sklearn.tree._tree.DepthFirstTreeBuilder.build
File "sklearn/tree/_splitter.pyx", line 789, in sklearn.tree._splitter.BaseSparseSplitter.init
File "stringsource", line 660, in View.MemoryView.memoryview_cwrapper
File "stringsource", line 350, in View.MemoryView.memoryview.__cinit__
ValueError: buffer source array is read-only
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/model_selection/_validation.py", line 686, in _fit_and_score
estimator.fit(X_train, y_train, **fit_params)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/ensemble/_forest.py", line 474, in fit
trees = Parallel(
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/parallel.py", line 1098, in __call__
self.retrieve()
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/parallel.py", line 975, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/_parallel_backends.py", line 567, in wrap_future_result
return future.result(timeout=timeout)
File "/home/temp/.local/miniconda/lib/python3.10/concurrent/futures/_base.py", line 458, in result
return self.__get_result()
File "/home/temp/.local/miniconda/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
ValueError: buffer source array is read-only"><pre class="notranslate"><code class="notranslate">ValueError:
All the 5 fits failed.
It is very likely that your model is misconfigured.
You can try to debug the error by setting error_score='raise'.
Below are more details about the failures:
--------------------------------------------------------------------------------
5 fits failed with the following error:
joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/externals/loky/process_executor.py", line 428, in _process_worker
r = call_item()
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/externals/loky/process_executor.py", line 275, in __call__
return self.fn(*self.args, **self.kwargs)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/_parallel_backends.py", line 620, in __call__
return self.func(*args, **kwargs)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/parallel.py", line 288, in __call__
return [func(*args, **kwargs)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/parallel.py", line 288, in <listcomp>
return [func(*args, **kwargs)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/utils/fixes.py", line 117, in __call__
return self.function(*args, **kwargs)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/ensemble/_forest.py", line 185, in _parallel_build_trees
tree.fit(X, y, sample_weight=curr_sample_weight, check_input=False)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/tree/_classes.py", line 889, in fit
super().fit(
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/tree/_classes.py", line 379, in fit
builder.build(self.tree_, X, y, sample_weight)
File "sklearn/tree/_tree.pyx", line 147, in sklearn.tree._tree.DepthFirstTreeBuilder.build
File "sklearn/tree/_tree.pyx", line 173, in sklearn.tree._tree.DepthFirstTreeBuilder.build
File "sklearn/tree/_splitter.pyx", line 789, in sklearn.tree._splitter.BaseSparseSplitter.init
File "stringsource", line 660, in View.MemoryView.memoryview_cwrapper
File "stringsource", line 350, in View.MemoryView.memoryview.__cinit__
ValueError: buffer source array is read-only
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/model_selection/_validation.py", line 686, in _fit_and_score
estimator.fit(X_train, y_train, **fit_params)
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/sklearn/ensemble/_forest.py", line 474, in fit
trees = Parallel(
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/parallel.py", line 1098, in __call__
self.retrieve()
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/parallel.py", line 975, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File "/home/temp/.local/miniconda/lib/python3.10/site-packages/joblib/_parallel_backends.py", line 567, in wrap_future_result
return future.result(timeout=timeout)
File "/home/temp/.local/miniconda/lib/python3.10/concurrent/futures/_base.py", line 458, in result
return self.__get_result()
File "/home/temp/.local/miniconda/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
ValueError: buffer source array is read-only
</code></pre></div>
<h3 dir="auto">Versions</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="System:
python: 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:36:39) [GCC 10.4.0]
executable: /home/temp/.local/miniconda/bin/python3.10
machine: Linux-5.14.0-1054-oem-x86_64-with-glibc2.31
Python dependencies:
sklearn: 1.2.0
pip: 22.3
setuptools: 65.5.0
numpy: 1.23.5
scipy: 1.9.3
Cython: 0.29.32
pandas: 1.5.2
matplotlib: 3.6.2
joblib: 1.2.0
threadpoolctl: 3.1.0
Built with OpenMP: True
threadpoolctl info:
user_api: blas
internal_api: mkl
prefix: libmkl_rt
filepath: /home/temp/.local/miniconda/lib/libmkl_rt.so.2
version: 2022.1-Product
threading_layer: intel
num_threads: 4
user_api: openmp
internal_api: openmp
prefix: libomp
filepath: /home/temp/.local/miniconda/lib/libomp.so
version: None
num_threads: 8"><pre class="notranslate">System:
python: 3.10.6 <span class="pl-k">|</span> packaged by conda-forge <span class="pl-k">|</span> (main, Aug 22 2022, 20:36:39) [GCC 10.4.0]
executable: /home/temp/.local/miniconda/bin/python3.10
machine: Linux-5.14.0-1054-oem-x86_64-with-glibc2.31
Python dependencies:
sklearn: 1.2.0
pip: 22.3
setuptools: 65.5.0
numpy: 1.23.5
scipy: 1.9.3
Cython: 0.29.32
pandas: 1.5.2
matplotlib: 3.6.2
joblib: 1.2.0
threadpoolctl: 3.1.0
Built with OpenMP: True
threadpoolctl info:
user_api: blas
internal_api: mkl
prefix: libmkl_rt
filepath: /home/temp/.local/miniconda/lib/libmkl_rt.so.2
version: 2022.1-Product
threading_layer: intel
num_threads: 4
user_api: openmp
internal_api: openmp
prefix: libomp
filepath: /home/temp/.local/miniconda/lib/libomp.so
version: None
num_threads: 8</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> | 0 |
<p dir="auto"><code class="notranslate">.hidden-sm</code> does not work with <code class="notranslate">.nav-justified > li</code>, since the former sets <code class="notranslate">display: block !important</code> and the latter sets <code class="notranslate">display: table-cell</code>. Would be useful if these worked together.</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 |
<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">^11.2.0</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">Windows</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">Windows 10 20H2</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">x64</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">When clicking <a href="https://drive.google.com/drive/my-drive" rel="nofollow">https://drive.google.com/drive/my-drive</a> inside a webview through on board of google apps, the Google Drive home page should open</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">The webview is blank and reloading the webview does nothing.</p>
<p dir="auto">Use webview tag in react</p>
<p dir="auto"><br>
</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">I tried to test the:</p>
<ol dir="auto">
<li>behavior when loading <a href="https://drive.google.com/drive/my-drive" rel="nofollow">https://drive.google.com/drive/my-drive</a> from webview.loadURL(src) - normal</li>
<li>behavior when clicked link <a href="https://drive.google.com/drive/my-drive" rel="nofollow">https://drive.google.com/drive/my-drive</a> in google search inside webview - normal</li>
</ol> | <h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">12.0.6</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">macOS</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">11.2</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">x64</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">When loading <a href="https://drive.google.com" rel="nofollow">https://drive.google.com</a> inside a webview, the Google Drive home page should be visible</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">The webview is blank and reloading the webview does nothing</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><a href="https://gist.github.com/e474113b345cc6d8ae5cdf5bf1b536b7">https://gist.github.com/e474113b345cc6d8ae5cdf5bf1b536b7</a></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">In our app, reloading the webview actually crashes the whole app when drive.google.com is loaded in the webview. I could not reproduce the crashing behavior in the gist; but still, the bug that the URL doesn't load is reproducible</p> | 1 |
<p dir="auto">I've just updated to 2.3.5-DEV and now the forms containing checkboxes appear to be broken.</p>
<p dir="auto">In particular this commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/ed837522af4fd2050aec4fafa9dd3366b30b465d/hovercard" href="https://github.com/symfony/symfony/commit/ed837522af4fd2050aec4fafa9dd3366b30b465d"><tt>ed83752</tt></a> seems to be the cause.</p>
<p dir="auto">If I add back the if (null === $value) return null; in src/Symfony/Component/Form/Extension/Core/DataTransformer/BooleanToStringTransformer.php everything is fine again.</p>
<p dir="auto">Am I missing something?</p> | <p dir="auto">Commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/ed83752/hovercard" href="https://github.com/symfony/symfony/commit/ed83752"><tt>ed83752</tt></a> breaks form creations for new objects in some common circumstances:</p>
<p dir="auto">For example if Product has a boolean type property which is initially null, this form creation will instantly throw a TransformationFailedException.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$entity = new Product();
$form = $this->createForm(new ProductType(), $entity);"><pre class="notranslate"><code class="notranslate">$entity = new Product();
$form = $this->createForm(new ProductType(), $entity);
</code></pre></div>
<p dir="auto">Maybe the following part should not have been removed from BooleanToStringTransformer::transform:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if (null === $value) {
return null;
}"><pre class="notranslate"><code class="notranslate">if (null === $value) {
return null;
}
</code></pre></div>
<p dir="auto">Minimal failing example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$obj = new \stdClass();
$obj->boolProp = null;
$form = $this->createFormBuilder($obj)
->add('boolProp', 'checkbox')
->getForm();"><pre class="notranslate"><code class="notranslate">$obj = new \stdClass();
$obj->boolProp = null;
$form = $this->createFormBuilder($obj)
->add('boolProp', 'checkbox')
->getForm();
</code></pre></div> | 1 |
<h1 dir="auto">Bug report</h1>
<p dir="auto">When using experimental dynamic routes (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="448612428" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/7432" data-hovercard-type="pull_request" data-hovercard-url="/vercel/next.js/pull/7432/hovercard" href="https://github.com/vercel/next.js/pull/7432">#7432</a>) in a <a href="https://nextjs.org/docs#multi-zones" rel="nofollow">zoned</a> app. I get this error in the browser:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Your `<Link>`'s `as` value is incompatible with the `href` value. This is invalid"><pre class="notranslate"><code class="notranslate">Your `<Link>`'s `as` value is incompatible with the `href` value. This is invalid
</code></pre></div>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">In order to find the query parameters, <code class="notranslate">href</code> and <code class="notranslate">as</code> are matched against each other. But the current implementation seems to be too strict.</p>
<p dir="auto">see <a href="https://github.com/zeit/next.js/blob/21fae5262f2dada7a229e6dd2831639d330ff746/packages/next-server/lib/router/router.ts#L274-L281">https://github.com/zeit/next.js/blob/21fae5262f2dada7a229e6dd2831639d330ff746/packages/next-server/lib/router/router.ts#L274-L281</a></p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">See <a href="https://github.com/Xiphe/next-dynamic-route-in-zone">https://github.com/Xiphe/next-dynamic-route-in-zone</a></p>
<ol dir="auto">
<li>Create a next app</li>
<li>Add a proxy to have it mounted on a subpath (like <code class="notranslate">http://localhost:3000/foo</code>)</li>
<li>Add a index page and a dynamic page (like <code class="notranslate">pages/bar/$dyn.js</code>)</li>
<li>Try to link to the dynamic page from the index page
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<Link href="/bar/$dyn" as "/foo/bar/baz"><a>Baz</a></Link>"><pre class="notranslate"><span class="pl-c1"><</span><span class="pl-v">Link</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-s">"/bar/$dyn"</span> <span class="pl-c1">as</span> <span class="pl-s">"/foo/bar/baz"</span><span class="pl-c1">></span><span class="pl-c1"><</span><span class="pl-ent">a</span><span class="pl-c1">></span>Baz<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">a</span><span class="pl-c1">></span><span class="pl-c1"><</span><span class="pl-c1">/</span>Link></pre></div>
</li>
<li>Click the link in the browser</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">I want to use dynamic routes in a zoned app, so the above <code class="notranslate">Link</code>-code should not throw.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: macOS</li>
<li>Browser: chrome</li>
<li>Version of Next.js: 8.1.1-canary.43</li>
</ul> | <h1 dir="auto">Feature request</h1>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<p dir="auto"><a href="https://github.com/zeit/next.js#multi-zones">Multi zones</a> is a great feature which allows to run multiple next.js apps on the same domain, but it doesn't allow to define a basepath which will be accepted by all parts of next.js. Since we are not able to namespace apps right now it is not possible to have the same names for pages in various apps.</p>
<h2 dir="auto">Describe the solution you'd like</h2>
<p dir="auto">I want to be able to configure a <code class="notranslate">basepath</code> in the next.config.js file. Thanks to this configuration all parts of next.js (Router, Link, Static assets etc.) will be aware of the basepath and will automatically generate and match to the correct paths.</p>
<h2 dir="auto">Describe alternatives you've considered</h2>
<p dir="auto">One alternative is to nest all desired pages into a folder which matches the basepath. This solves just one small issue with routing and is quite ugly because most of the my basepaths are not one level paths.<br>
The second alterantive is to configure a proxy in a way where the basepath is automatically removed before the request arrives into a next.js app and also implement a custom Link component which automatically adds basepath to all links. I just don't want to maintain custom fork of next.js. It doesn't make sense in my opinion.</p>
<h2 dir="auto">Additional context</h2>
<p dir="auto">The <code class="notranslate">assetPrefix</code> solution allows us to define a different prefix for each app. But as fair as I know it works only with different hosts.</p>
<h3 dir="auto">with-zones example</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.exports = {
assetPrefix: NOW_URL ? `https://${alias}` : 'http://localhost:4000'
}"><pre class="notranslate"><code class="notranslate">module.exports = {
assetPrefix: NOW_URL ? `https://${alias}` : 'http://localhost:4000'
}
</code></pre></div>
<p dir="auto">If I add a basepath to it everything fails</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.exports = {
assetPrefix: NOW_URL ? `https://${alias}/account` : 'http://localhost:4000/account'
}"><pre class="notranslate"><code class="notranslate">module.exports = {
assetPrefix: NOW_URL ? `https://${alias}/account` : 'http://localhost:4000/account'
}
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/340649/44391236-949a8280-a52f-11e8-894b-5ea9e9e942c6.png"><img width="789" alt="screen shot 2018-08-21 at 10 47 08" src="https://user-images.githubusercontent.com/340649/44391236-949a8280-a52f-11e8-894b-5ea9e9e942c6.png" style="max-width: 100%;"></a></p>
<p dir="auto">In my opinion we should split it into 2 variables:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.exports = {
assetPrefix: NOW_URL ? `https://${alias}` : 'http://localhost:4000',
basepath: '/account'
}"><pre class="notranslate"><code class="notranslate">module.exports = {
assetPrefix: NOW_URL ? `https://${alias}` : 'http://localhost:4000',
basepath: '/account'
}
</code></pre></div>
<h2 dir="auto">Related issues</h2>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="231546851" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/2072" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/2072/hovercard" href="https://github.com/vercel/next.js/issues/2072">#2072</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="189274051" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/257" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/257/hovercard" href="https://github.com/vercel/next.js/issues/257">#257</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="236512549" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/2289" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/2289/hovercard" href="https://github.com/vercel/next.js/issues/2289">#2289</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="351281878" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/4969" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/4969/hovercard" href="https://github.com/vercel/next.js/issues/4969">#4969</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="313780461" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/4146" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/4146/hovercard" href="https://github.com/vercel/next.js/issues/4146">#4146</a></li>
</ul> | 1 |
<h1 dir="auto">What / Why</h1>
<p dir="auto">I'm trying to install a local package like <code class="notranslate">npm install ../package-name</code>. This fails when on an exFAT partition with the following stacktrace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1201 verbose stack Error: EISDIR: illegal operation on a directory, symlink 'E:\Repos\react-git-info' -> 'E:\Repos\abhyudayasharma.github.io\node_modules\react-git-info'
1202 verbose cwd E:\Repos\abhyudayasharma.github.io
1203 verbose Windows_NT 10.0.18363
1204 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Abhyudaya\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "..\\react-git-info\\"
1205 verbose node v12.13.1
1206 verbose npm v6.14.4
1207 error code EISDIR
1208 error syscall symlink
1209 error path E:\Repos\react-git-info
1210 error dest E:\Repos\abhyudayasharma.github.io\node_modules\react-git-info
1211 error errno -4068
1212 error EISDIR: illegal operation on a directory, symlink 'E:\Repos\react-git-info' -> 'E:\Repos\abhyudayasharma.github.io\node_modules\react-git-info'
1213 verbose exit [ -4068, true ]"><pre class="notranslate"><code class="notranslate">1201 verbose stack Error: EISDIR: illegal operation on a directory, symlink 'E:\Repos\react-git-info' -> 'E:\Repos\abhyudayasharma.github.io\node_modules\react-git-info'
1202 verbose cwd E:\Repos\abhyudayasharma.github.io
1203 verbose Windows_NT 10.0.18363
1204 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Abhyudaya\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "..\\react-git-info\\"
1205 verbose node v12.13.1
1206 verbose npm v6.14.4
1207 error code EISDIR
1208 error syscall symlink
1209 error path E:\Repos\react-git-info
1210 error dest E:\Repos\abhyudayasharma.github.io\node_modules\react-git-info
1211 error errno -4068
1212 error EISDIR: illegal operation on a directory, symlink 'E:\Repos\react-git-info' -> 'E:\Repos\abhyudayasharma.github.io\node_modules\react-git-info'
1213 verbose exit [ -4068, true ]
</code></pre></div>
<p dir="auto">exFAT does not support symlinks: <a href="https://docs.microsoft.com/en-us/windows/win32/fileio/filesystem-functionality-comparison#functionality" rel="nofollow">https://docs.microsoft.com/en-us/windows/win32/fileio/filesystem-functionality-comparison#functionality</a></p>
<p dir="auto">Since exFAT is not the only filesystem without support of symlinks, there should be a fallback. One I could think of is copying files to <code class="notranslate">node_modules</code> and watching the directory of the package to be installed for changes.</p>
<h2 dir="auto">When</h2>
<ul dir="auto">
<li>Installing a local package on an exFAT formatted drive.</li>
</ul>
<h2 dir="auto">Where</h2>
<ul dir="auto">
<li>Windows 10 1909, Version 10.0.18363.815</li>
<li>npm 6.14.4</li>
<li>Node v12.13.1</li>
</ul>
<p dir="auto">I have tested only on Windows, but this should be a problem in all other operating systems.</p>
<h2 dir="auto">How</h2>
<h3 dir="auto">Current Behavior</h3>
<ul dir="auto">
<li>Installation of the package fails due to the filesystem not supporting symlinks.</li>
</ul>
<h3 dir="auto">Steps to Reproduce</h3>
<ul dir="auto">
<li>On an exFAT partition, clone any npm package. In another npm project, install the cloned package with a relative path. The installation will fail because npm is unable to make a symlink.</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<ul dir="auto">
<li>Installation of local packages should work like it does with NTFS and ext4.</li>
</ul>
<h2 dir="auto">Who</h2>
<ul dir="auto">
<li>n/a</li>
</ul>
<h2 dir="auto">References</h2>
<ul dir="auto">
<li>n/a</li>
</ul> | <h3 dir="auto">Is there an existing issue for this?</h3>
<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 existing issues</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>In this environment...</li>
<li>With this config...</li>
<li>Run '...'</li>
<li>See error...</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS:</li>
<li>Node:</li>
<li>npm:<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/8/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/8">@8</a>.<a href="url">ggdgxyf6z6fx6fx<br>
Duplicate of #</a></li>
</ul> | 0 |
<p dir="auto">As well as specifying top, right, bottom and left, it would also be useful to be able to specify top-right, top-left, right-top, right-bottom, bottom-right, bottom-left, left-top and left-bottom. Without these options, tooltips/popovers added to elements in the corner of the window will overlap the window itself (in some way or another).</p>
<p dir="auto">Here's an example of bottom-right (which could be used to add a tooltip/popover to an element that is in the top left corner:</p>
<p dir="auto"><a href="http://jsfiddle.net/fZTm4/3/" rel="nofollow">http://jsfiddle.net/fZTm4/3/</a></p> | <p dir="auto">I think it would be great if we could position our popover more precisely.</p>
<p dir="auto">Adding corner support like :</p>
<p dir="auto"><a href="http://craigsworks.com/projects/qtip2/demos/tips" rel="nofollow">http://craigsworks.com/projects/qtip2/demos/tips</a></p>
<p dir="auto">Is there a way to achieve this today?</p> | 1 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.3</li>
<li>Operating System version: MAC OX 10.14.5</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>
<p dir="auto">Use GenericService by API, assign the version is 1.0.0.test.qa.st<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9245774/62794432-aab99e00-bb06-11e9-9422-8317c64374b1.png"><img src="https://user-images.githubusercontent.com/9245774/62794432-aab99e00-bb06-11e9-9422-8317c64374b1.png" alt="image" style="max-width: 100%;"></a></p>
</li>
<li>
<p dir="auto">breakpoint at DubboInvoker.doInvoke</p>
</li>
<li>
<p dir="auto">check the DubboInvoker.version = 0.0.0<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9245774/62794513-e2284a80-bb06-11e9-878a-ab54d420d57c.png"><img src="https://user-images.githubusercontent.com/9245774/62794513-e2284a80-bb06-11e9-878a-ab54d420d57c.png" alt="image" style="max-width: 100%;"></a></p>
</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">In the instance of DubboInvoker,the version should be 1.0.0.test.qa.st</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">In the instance of DubboInvoker,the version’s value actully is default value,0.0.0</p>
<h3 dir="auto">Cause</h3>
<p dir="auto">this method : "ClusterUtils.mergeUrl" at line 87 ,remove the version key, so lost the version's value</p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.6</li>
<li>Operating System version: any</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public class DubboTest {
public static void main(String[] args) {
RpcContext.getContext().getAttachments().put("a", "b");
System.out.println("before");
for (Map.Entry<String, String> entry : RpcContext.getContext().getAttachments().entrySet()) {
System.out.println(entry.getKey() + "==>" + entry.getValue());
}
System.out.println("after");
}
}"><pre class="notranslate"><span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">DubboTest</span> {
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">main</span>(<span class="pl-smi">String</span>[] <span class="pl-s1">args</span>) {
<span class="pl-smi">RpcContext</span>.<span class="pl-en">getContext</span>().<span class="pl-en">getAttachments</span>().<span class="pl-en">put</span>(<span class="pl-s">"a"</span>, <span class="pl-s">"b"</span>);
<span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">"before"</span>);
<span class="pl-k">for</span> (<span class="pl-smi">Map</span>.<span class="pl-smi">Entry</span><<span class="pl-smi">String</span>, <span class="pl-smi">String</span>> <span class="pl-s1">entry</span> : <span class="pl-smi">RpcContext</span>.<span class="pl-en">getContext</span>().<span class="pl-en">getAttachments</span>().<span class="pl-en">entrySet</span>()) {
<span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s1">entry</span>.<span class="pl-en">getKey</span>() + <span class="pl-s">"==>"</span> + <span class="pl-s1">entry</span>.<span class="pl-en">getValue</span>());
}
<span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">"after"</span>);
}
}</pre></div>
<p dir="auto">execute result:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11530760/82122989-855e6c80-97c9-11ea-8333-9437b469b0e0.png"><img src="https://user-images.githubusercontent.com/11530760/82122989-855e6c80-97c9-11ea-8333-9437b469b0e0.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">the reason is <code class="notranslate">ObjectToStringMap</code> implements has serious problem.</p>
<p dir="auto">I will make a PR to fix this</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps?</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | 0 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Documentation Report</li>
</ul>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">'Edit on GitHub' <a href="http://joxi.ru/l2Z6VxFwlbVL2J?d=1" rel="nofollow">http://joxi.ru/l2Z6VxFwlbVL2J?d=1</a> link leads to 404 error page <a href="http://joxi.ru/eAO14Wfxv1Gdmo?d=1" rel="nofollow">http://joxi.ru/eAO14Wfxv1Gdmo?d=1</a></p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">1 Go to <a href="http://docs.ansible.com/ansible/intro_adhoc.html" rel="nofollow">http://docs.ansible.com/ansible/intro_adhoc.html</a><br>
2 Press 'Edit on GitHub' at top right corner.<br>
3 See 404 error page.</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Some kind of valid git hub page for editing related page.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">404 error page</p> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Documentation Report</li>
</ul>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Go to <a href="http://docs.ansible.com/ansible/index.html" rel="nofollow">http://docs.ansible.com/ansible/index.html</a>, click the Edit on GitHub link in the upper right corner.</p> | 1 |
<p dir="auto">Since Deno 1.31 upgrade, on startup and at each tab completion an error message is logged.<br>
Platform: windows 11</p>
<p dir="auto">Full re-install, cleaning cache, ... not solving this issue<br>
Downgrading solve it<br>
Install on VM don't seems to have this issue</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Could not set npm package requirements. Error getting response at https://registry.npmjs.org/npm for package "npm": An npm specifier not found in cache: "npm", --cached-only is specified.
Deno 1.31.1
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> MCould not set npm package requirements. Error getting response at https://registry.npmjs.org/npm for package "npm": An npm specifier not found in cache: "npm", --cached-only is specified.
Map Math MessageChannel MessageEvent MessagePort"><pre class="notranslate">Could not <span class="pl-c1">set</span> npm package requirements. Error getting response at https://registry.npmjs.org/npm <span class="pl-k">for</span> <span class="pl-smi">package <span class="pl-s"><span class="pl-pds">"</span>npm<span class="pl-pds">"</span></span>: An npm specifier not found</span> <span class="pl-k">in</span> cache: <span class="pl-s"><span class="pl-pds">"</span>npm<span class="pl-pds">"</span></span>, --cached-only is specified.
Deno 1.31.1
<span class="pl-c1">exit</span> using ctrl+d, ctrl+c, or <span class="pl-en">close</span>()
REPL is running with all permissions allowed.
To specify permissions, run <span class="pl-s"><span class="pl-pds">`</span>deno repl<span class="pl-pds">`</span></span> with allow flags.
<span class="pl-k">></span> MCould not <span class="pl-c1">set</span> npm package requirements. Error getting response at https://registry.npmjs.org/npm <span class="pl-k">for</span> <span class="pl-smi">package <span class="pl-s"><span class="pl-pds">"</span>npm<span class="pl-pds">"</span></span>: An npm specifier not found</span> <span class="pl-k">in</span> cache: <span class="pl-s"><span class="pl-pds">"</span>npm<span class="pl-pds">"</span></span>, --cached-only is specified.
Map Math MessageChannel MessageEvent MessagePort</pre></div> | <p dir="auto">Hello. So, I was testing Deno 1.9.2 with a workload that involves <a href="https://github.com/tc39/proposal-temporal">Temporal</a> and a Postgres database. I noticed that after a few minutes, the 2GB VPS just ran out of memory after some batches of processing. I did the following:</p>
<ol dir="auto">
<li>Tried to profile using <code class="notranslate">--inspect</code>, but I noticed that it never went above 20MB, so it was probably not a "normal" JavaScript leak. I think Deno lacks GC information in the DevTools profiler, so that wasn't helpful.</li>
<li>I proceeded to compile Deno in debug mode, upload to VPS, run with the workload using <code class="notranslate">LD_PRELOAD=/usr/lib/libtcmalloc.so</code> and a <code class="notranslate">HEAPPROFILE</code>.</li>
<li>The results were in. And looks like it's Intl.DateTimeFormat that is at fault.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3057302/117035008-3e1f0380-acda-11eb-88f4-d32d252664d9.png"><img src="https://user-images.githubusercontent.com/3057302/117035008-3e1f0380-acda-11eb-88f4-d32d252664d9.png" alt="leak_result" style="max-width: 100%;"></a></li>
<li>Then I looked for similar issues. Found: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="569367635" data-permission-text="Title is private" data-url="https://github.com/nodejs/node/issues/31914" data-hovercard-type="issue" data-hovercard-url="/nodejs/node/issues/31914/hovercard" href="https://github.com/nodejs/node/issues/31914">nodejs/node#31914</a>, seems related, and listed as fixed for v8, but let's try the repro. Created a file leak.ts, ran with deno and watched the resident memory climb up to 5.4G. Ran with node, it also looks "leaky", but it only goes up to 1.3G.</li>
</ol>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="setInterval(() => {
var a;
for (let i = 0; i < 100; i++) {
a = new Intl.DateTimeFormat("en").format(Date.now());
}
}, 1);"><pre class="notranslate"><span class="pl-en">setInterval</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">a</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1"><</span> <span class="pl-c1">100</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Intl</span><span class="pl-kos">.</span><span class="pl-c1">DateTimeFormat</span><span class="pl-kos">(</span><span class="pl-s">"en"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">format</span><span class="pl-kos">(</span><span class="pl-v">Date</span><span class="pl-kos">.</span><span class="pl-en">now</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<ol start="5" dir="auto">
<li>The same code with a similar object, <code class="notranslate">Intl.NumberFormat</code>, peaks at 100M for node, and 258M for deno. I assume that is normal.</li>
</ol>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="setInterval(() => {
var a;
for (let i = 0; i < 100; i++) {
a = new Intl.NumberFormat("en").format(3);
}
}, 1);"><pre class="notranslate"><span class="pl-en">setInterval</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">a</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1"><</span> <span class="pl-c1">100</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Intl</span><span class="pl-kos">.</span><span class="pl-c1">NumberFormat</span><span class="pl-kos">(</span><span class="pl-s">"en"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">format</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-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<ol start="6" dir="auto">
<li>I couldn't change this memory ceiling by using <code class="notranslate">--v8-flags=--max-old-space-size</code>, so I guess it's completely external to that.</li>
</ol>
<hr>
<p dir="auto">I think it's probably an issue in V8 itself that has not been correctly resolved, and deno and node both handle it differently. I will try to change Temporal to reuse the same <code class="notranslate">Intl.DateTimeFormat</code> instance, for now, but it would be nice if this could be fixed.</p> | 0 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.31.2]</li>
<li>Operating System: [Ubuntu 22, NixOS 22.11]</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</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">or</p>
<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({
testDir: './tests',
timeout: 30 * 1000,
expect:
timeout: 5000
},
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
actionTimeout: 0,
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
],
});"><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">testDir</span>: <span class="pl-s">'./tests'</span><span class="pl-kos">,</span>
<span class="pl-c1">timeout</span>: <span class="pl-c1">30</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span>
<span class="pl-c1">expect</span>:
<span class="pl-s1">timeout</span>: <span class="pl-c1">5000</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-s1">fullyParallel</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-s1">forbidOnly</span>: <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span><span class="pl-kos">,</span>
<span class="pl-s1">retries</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">2</span> : <span class="pl-c1">0</span><span class="pl-kos">,</span>
<span class="pl-s1">workers</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">1</span> : <span class="pl-c1">undefined</span><span class="pl-kos">,</span>
<span class="pl-s1">reporter</span>: <span class="pl-s">'html'</span><span class="pl-kos">,</span>
<span class="pl-s1">use</span>: <span class="pl-kos">{</span>
<span class="pl-c1">actionTimeout</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span>
<span class="pl-c1">trace</span>: <span class="pl-s">'on-first-retry'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-s1">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-c1">name</span>: <span class="pl-s">'firefox'</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 Firefox'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'webkit'</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 Safari'</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><br>
basic test example provided by playwright (fresh project with fresh installation).</p>
<p dir="auto"><strong>Steps</strong><br>
create a fresh new project.</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"package.json":"👇",
"name": "pwtest",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@playwright/test": "^1.31.2"
}
}"><pre class="notranslate">{
<span class="pl-ent">"package.json"</span>:<span class="pl-s"><span class="pl-pds">"</span>👇<span class="pl-pds">"</span></span>,
<span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>pwtest<span class="pl-pds">"</span></span>,
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.0.0<span class="pl-pds">"</span></span>,
<span class="pl-ent">"description"</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>,
<span class="pl-ent">"main"</span>: <span class="pl-s"><span class="pl-pds">"</span>index.js<span class="pl-pds">"</span></span>,
<span class="pl-ent">"scripts"</span>: {},
<span class="pl-ent">"keywords"</span>: [],
<span class="pl-ent">"author"</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>,
<span class="pl-ent">"license"</span>: <span class="pl-s"><span class="pl-pds">"</span>ISC<span class="pl-pds">"</span></span>,
<span class="pl-ent">"devDependencies"</span>: {
<span class="pl-ent">"@playwright/test"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.31.2<span class="pl-pds">"</span></span>
}
}</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pnpm exec playwright codegen --browser ff"><pre class="notranslate"><code class="notranslate">pnpm exec playwright codegen --browser ff
</code></pre></div>
<p dir="auto"><strong>Expected</strong><br>
expecting the firefox browser to open.</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">[Describe actual behavior]<br>
it opens chromium.</p> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: <code class="notranslate">v1.32.0</code>
<ul dir="auto">
<li>Confirmed the issue <strong><em>does not exist</em></strong> in <code class="notranslate">v1.31.2</code></li>
<li>Confirmed the issue <strong><em>exists</em></strong> in <code class="notranslate">v1.32.0</code> thru <code class="notranslate">v1.32.3</code></li>
</ul>
</li>
<li>Operating System: Windows 10, 22H2</li>
<li>Browser: Tested with Chromium and Firefox</li>
<li>Other info:
<ul dir="auto">
<li>Node: v18.15.0</li>
<li>PowerShell: v7.3.3</li>
<li>Terminal: 1.16.10261.0</li>
</ul>
</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul dir="auto">
<li>[x ] 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 } from '@playwright/test';
export default defineConfig({
testDir: './tests',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
use: {
trace: 'on-first-retry',
},
});"><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-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">testDir</span>: <span class="pl-s">'./tests'</span><span class="pl-kos">,</span>
<span class="pl-c1">fullyParallel</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">forbidOnly</span>: <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span><span class="pl-kos">,</span>
<span class="pl-c1">retries</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">2</span> : <span class="pl-c1">0</span><span class="pl-kos">,</span>
<span class="pl-c1">workers</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">1</span> : <span class="pl-c1">undefined</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span>
<span class="pl-c1">trace</span>: <span class="pl-s">'on-first-retry'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Test file (self-contained)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// memory-leak-example.spec.ts
import { test, expect, Locator, TestInfo } from '@playwright/test';
test.afterAll(async ({ page }) => await page.pause());
test('Example test showing a probable memory leak after updating from Playwright v1.31.2 to v1.32.0', async ({ page }, testInfo: TestInfo) => {
const isPwDebug = !!process.env.PWDEBUG;
const pwVersion = testInfo.config.version;
const timerTotalTime = `\nTotal test time for PW v${pwVersion} (debug: ${isPwDebug})`;
console.log(`Playwright v${pwVersion}\ndebug: ${isPwDebug}\n`);
console.log('round #, link #, rssMB, heapTotalMB, heapUsedMB, externalKB, arrayBuffersKB');
const bytesToKB = (bytes: number): string => (bytes / 1024).toFixed(3);
const bytesToMB = (bytes: number): string => (bytes / 1024 / 1024).toFixed(3);
console.time(timerTotalTime);
const url = 'https://playwright.dev/docs/intro';
await page.goto(url, { waitUntil: 'networkidle' });
const links: Locator = page.getByRole('navigation', { name: 'Docs sidebar' })
.locator('li[class^="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2"]');
const linksCount = await links.count(); // 55 links
const maxRounds = 2;
for (let i = 1; (i <= maxRounds); i++) {
const maxLinksToClick = 99;
for (let j = 0; (j < linksCount && j <= maxLinksToClick); j++) {
const link = links.nth(j);
await link.click();
const linkText = await link.textContent() as string;
const heading: Locator = page.getByRole('heading', { name: linkText, exact: true });
await expect(heading).toHaveText(linkText);
const rssMB = bytesToMB(process.memoryUsage().rss);
const heapTotalMB = bytesToMB(process.memoryUsage().heapTotal);
const heapUsedMB = bytesToMB(process.memoryUsage().heapUsed);
const externalKB = bytesToKB(process.memoryUsage().external);
const arrayBuffersKB = bytesToKB(process.memoryUsage().arrayBuffers);
console.log(`${i}, ${j}, ${rssMB}, ${heapTotalMB}, ${heapUsedMB}, ${externalKB}, ${arrayBuffersKB}`);
}
}
console.timeEnd(timerTotalTime);
});"><pre class="notranslate"><span class="pl-c">// memory-leak-example.spec.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span><span class="pl-kos">,</span> <span class="pl-s1">expect</span><span class="pl-kos">,</span> <span class="pl-v">Locator</span><span class="pl-kos">,</span> <span class="pl-v">TestInfo</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-s1">test</span><span class="pl-kos">.</span><span class="pl-en">afterAll</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">pause</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-s">'Example test showing a probable memory leak after updating from Playwright v1.31.2 to v1.32.0'</span><span class="pl-kos">,</span> <span class="pl-en">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">testInfo</span>: <span class="pl-v">TestInfo</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span> <span class="pl-kos">{</span>
<span class="pl-s1">const</span> <span class="pl-s1">isPwDebug</span> <span class="pl-c1">=</span> <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">PWDEBUG</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">pwVersion</span> <span class="pl-c1">=</span> <span class="pl-s1">testInfo</span><span class="pl-kos">.</span><span class="pl-c1">config</span><span class="pl-kos">.</span><span class="pl-c1">version</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">timerTotalTime</span> <span class="pl-c1">=</span> <span class="pl-s">`\nTotal test time for PW v<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">pwVersion</span><span class="pl-kos">}</span></span> (debug: <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">isPwDebug</span><span class="pl-kos">}</span></span>)`</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">`Playwright v<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">pwVersion</span><span class="pl-kos">}</span></span>\ndebug: <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">isPwDebug</span><span class="pl-kos">}</span></span>\n`</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">'round #, link #, rssMB, heapTotalMB, heapUsedMB, externalKB, arrayBuffersKB'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">bytesToKB</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">bytes</span>: <span class="pl-s1">number</span><span class="pl-kos">)</span>: <span class="pl-s1">string</span> <span class="pl-c1">=></span> <span class="pl-kos">(</span><span class="pl-s1">bytes</span> <span class="pl-c1">/</span> <span class="pl-c1">1024</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toFixed</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">bytesToMB</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">bytes</span>: <span class="pl-s1">number</span><span class="pl-kos">)</span>: <span class="pl-s1">string</span> <span class="pl-c1">=></span> <span class="pl-kos">(</span><span class="pl-s1">bytes</span> <span class="pl-c1">/</span> <span class="pl-c1">1024</span> <span class="pl-c1">/</span> <span class="pl-c1">1024</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toFixed</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">time</span><span class="pl-kos">(</span><span class="pl-s1">timerTotalTime</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">url</span> <span class="pl-c1">=</span> <span class="pl-s">'https://playwright.dev/docs/intro'</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-s1">url</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">waitUntil</span>: <span class="pl-s">'networkidle'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">links</span>: <span class="pl-v">Locator</span> <span class="pl-c1">=</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByRole</span><span class="pl-kos">(</span><span class="pl-s">'navigation'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'Docs sidebar'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-en">locator</span><span class="pl-kos">(</span><span class="pl-s">'li[class^="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2"]'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">linksCount</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">links</span><span class="pl-kos">.</span><span class="pl-en">count</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// 55 links</span>
<span class="pl-k">const</span> <span class="pl-s1">maxRounds</span> <span class="pl-c1">=</span> <span class="pl-c1">2</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-s1">let</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-kos">(</span><span class="pl-s1">i</span> <span class="pl-c1"><=</span> <span class="pl-s1">maxRounds</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">const</span> <span class="pl-s1">maxLinksToClick</span> <span class="pl-c1">=</span> <span class="pl-c1">99</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-s1">let</span> <span class="pl-s1">j</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-kos">(</span><span class="pl-s1">j</span> <span class="pl-c1"><</span> <span class="pl-s1">linksCount</span> <span class="pl-c1">&&</span> <span class="pl-s1">j</span> <span class="pl-c1"><=</span> <span class="pl-s1">maxLinksToClick</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">j</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
const <span class="pl-s1">link</span> <span class="pl-c1">=</span> <span class="pl-s1">links</span><span class="pl-kos">.</span><span class="pl-en">nth</span><span class="pl-kos">(</span><span class="pl-s1">j</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">link</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">linkText</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">link</span><span class="pl-kos">.</span><span class="pl-en">textContent</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-s1">as</span> <span class="pl-s1">string</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">heading</span>: <span class="pl-v">Locator</span> <span class="pl-c1">=</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByRole</span><span class="pl-kos">(</span><span class="pl-s">'heading'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s1">linkText</span><span class="pl-kos">,</span> <span class="pl-c1">exact</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-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">heading</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveText</span><span class="pl-kos">(</span><span class="pl-s1">linkText</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">rssMB</span> <span class="pl-c1">=</span> <span class="pl-en">bytesToMB</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">memoryUsage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">rss</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">heapTotalMB</span> <span class="pl-c1">=</span> <span class="pl-en">bytesToMB</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">memoryUsage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">heapTotal</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">heapUsedMB</span> <span class="pl-c1">=</span> <span class="pl-en">bytesToMB</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">memoryUsage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">heapUsed</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">externalKB</span> <span class="pl-c1">=</span> <span class="pl-en">bytesToKB</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">memoryUsage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">external</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">arrayBuffersKB</span> <span class="pl-c1">=</span> <span class="pl-en">bytesToKB</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">memoryUsage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">arrayBuffers</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 class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">i</span><span class="pl-kos">}</span></span>, <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">j</span><span class="pl-kos">}</span></span>, <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">rssMB</span><span class="pl-kos">}</span></span>, <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">heapTotalMB</span><span class="pl-kos">}</span></span>, <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">heapUsedMB</span><span class="pl-kos">}</span></span>, <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">externalKB</span><span class="pl-kos">}</span></span>, <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">arrayBuffersKB</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-s1">timeEnd</span><span class="pl-kos">(</span><span class="pl-s1">timerTotalTime</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 sample test in PW <code class="notranslate">v1.32.3</code> in debug mode using the following command:<br>
<code class="notranslate">npx playwright test memory-leak-example --debug</code></li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<ul dir="auto">
<li>The sample test should take < 25 seconds to complete, as it does in PW <code class="notranslate">v1.31.2</code></li>
</ul>
<p dir="auto"><strong>Actual</strong></p>
<ul dir="auto">
<li>The sample test takes > 3m 30s to complete</li>
<li>In my private repo e2e tests, the test goes about 1/3 of the way, then the browser hangs and the test fails</li>
<li>I am unable to use PW <code class="notranslate">v1.32.0+</code> for my e2e tests due to performance and/or hung browser while in debug mode</li>
</ul> | 0 |
<p dir="auto">There are several functions for which I would like to see protocols constructed. I've raised issues for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="321912435" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/11074" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/11074/hovercard" href="https://github.com/numpy/numpy/issues/11074">#11074</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="324960360" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/11128" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/11128/hovercard" href="https://github.com/numpy/numpy/issues/11128">#11128</a> but these are just special cases of a much larger issue that includes many operations. The sense I've gotten is that the process to change numpy takes a while, so I'm inclined to find a catch-all solution that can serve as a catch-all while things evolve.</p>
<p dir="auto">To that end I propose that duck-arrays include a method that returns a module that mimics the numpy namespace</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class ndarray:
def __array_module__(self):
import numpy as np
return np
class DaskArray:
def __array_module__(self):
import dask.array as da
return da
class CuPyArray:
def __array_module__(self):
import cupy as cp
return cp
class SparseArray:
def __array_module__(self):
import sparse
return sparse
..."><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-s1">ndarray</span>:
<span class="pl-k">def</span> <span class="pl-en">__array_module__</span>(<span class="pl-s1">self</span>):
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">return</span> <span class="pl-s1">np</span>
<span class="pl-k">class</span> <span class="pl-v">DaskArray</span>:
<span class="pl-k">def</span> <span class="pl-en">__array_module__</span>(<span class="pl-s1">self</span>):
<span class="pl-k">import</span> <span class="pl-s1">dask</span>.<span class="pl-s1">array</span> <span class="pl-k">as</span> <span class="pl-s1">da</span>
<span class="pl-k">return</span> <span class="pl-s1">da</span>
<span class="pl-k">class</span> <span class="pl-v">CuPyArray</span>:
<span class="pl-k">def</span> <span class="pl-en">__array_module__</span>(<span class="pl-s1">self</span>):
<span class="pl-k">import</span> <span class="pl-s1">cupy</span> <span class="pl-k">as</span> <span class="pl-s1">cp</span>
<span class="pl-k">return</span> <span class="pl-s1">cp</span>
<span class="pl-k">class</span> <span class="pl-v">SparseArray</span>:
<span class="pl-k">def</span> <span class="pl-en">__array_module__</span>(<span class="pl-s1">self</span>):
<span class="pl-k">import</span> <span class="pl-s1">sparse</span>
<span class="pl-k">return</span> <span class="pl-s1">sparse</span>
...</pre></div>
<p dir="auto">Then, in various functions like stack or concatenate we check for these modules</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def stack(args, **kwargs):
modules = {arg.__array_module__() for arg in args}
if len(modules) == 1:
module = list(modules)[0]
if module != numpy:
return module.stack(args, **kwargs)
..."><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">stack</span>(<span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>):
<span class="pl-s1">modules</span> <span class="pl-c1">=</span> {<span class="pl-s1">arg</span>.<span class="pl-en">__array_module__</span>() <span class="pl-k">for</span> <span class="pl-s1">arg</span> <span class="pl-c1">in</span> <span class="pl-s1">args</span>}
<span class="pl-k">if</span> <span class="pl-en">len</span>(<span class="pl-s1">modules</span>) <span class="pl-c1">==</span> <span class="pl-c1">1</span>:
<span class="pl-s1">module</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s1">modules</span>)[<span class="pl-c1">0</span>]
<span class="pl-k">if</span> <span class="pl-s1">module</span> <span class="pl-c1">!=</span> <span class="pl-s1">numpy</span>:
<span class="pl-k">return</span> <span class="pl-s1">module</span>.<span class="pl-en">stack</span>(<span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
...</pre></div>
<p dir="auto">There are likely several things wrong the implementation above, but my hope is that it gets a general point across that we'll dispatch wholesale to the module of the provided duck arrays.</p>
<p dir="auto">cc <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> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hameerabbasi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hameerabbasi">@hameerabbasi</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/njsmith/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/njsmith">@njsmith</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ericmjl/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ericmjl">@ericmjl</a></p> | <h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
z = np.ones((2, 3, 4))
z.sum((0, 0, 0))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">z</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">ones</span>((<span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>))
<span class="pl-s1">z</span>.<span class="pl-en">sum</span>((<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>))</pre></div>
<h3 dir="auto">Error message:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ValueError: duplicate value in 'axis'"><pre class="notranslate"><code class="notranslate">ValueError: duplicate value in 'axis'
</code></pre></div>
<p dir="auto">Even though I could do:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="z.sum(0, keepdims=True).sum(0, keepdims=True).sum(0, keepdims=True)"><pre class="notranslate"><span class="pl-s1">z</span>.<span class="pl-en">sum</span>(<span class="pl-c1">0</span>, <span class="pl-s1">keepdims</span><span class="pl-c1">=</span><span class="pl-c1">True</span>).<span class="pl-en">sum</span>(<span class="pl-c1">0</span>, <span class="pl-s1">keepdims</span><span class="pl-c1">=</span><span class="pl-c1">True</span>).<span class="pl-en">sum</span>(<span class="pl-c1">0</span>, <span class="pl-s1">keepdims</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</pre></div>
<p dir="auto">This happens to be caused by <a href="https://github.com/numpy/numpy/blob/8db1b077736e8418c60f2b802dab461be13f189d/numpy/core/src/multiarray/conversion_utils.c#L265-L280">this snippet</a>.</p>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" PyObject *tmp = PyTuple_GET_ITEM(axis_in, i);
int axis = PyArray_PyIntAsInt_ErrMsg(tmp,
"integers are required for the axis tuple elements");
if (error_converting(axis)) {
return NPY_FAIL;
}
if (check_and_adjust_axis(&axis, ndim) < 0) {
return NPY_FAIL;
}
if (out_axis_flags[axis]) {
PyErr_SetString(PyExc_ValueError,
"duplicate value in 'axis'");
return NPY_FAIL;
}
out_axis_flags[axis] = 1;"><pre class="notranslate"> <span class="pl-smi">PyObject</span> <span class="pl-c1">*</span><span class="pl-s1">tmp</span> <span class="pl-c1">=</span> <span class="pl-en">PyTuple_GET_ITEM</span>(<span class="pl-s1">axis_in</span>, <span class="pl-s1">i</span>);
<span class="pl-smi">int</span> <span class="pl-s1">axis</span> <span class="pl-c1">=</span> <span class="pl-en">PyArray_PyIntAsInt_ErrMsg</span>(<span class="pl-s1">tmp</span>,
<span class="pl-s">"integers are required for the axis tuple elements"</span>);
<span class="pl-k">if</span> (<span class="pl-en">error_converting</span>(<span class="pl-s1">axis</span>)) {
<span class="pl-k">return</span> <span class="pl-c1">NPY_FAIL</span>;
}
<span class="pl-k">if</span> (<span class="pl-en">check_and_adjust_axis</span>(<span class="pl-c1">&</span><span class="pl-s1">axis</span>, <span class="pl-s1">ndim</span>) <span class="pl-c1"><</span> <span class="pl-c1">0</span>) {
<span class="pl-k">return</span> <span class="pl-c1">NPY_FAIL</span>;
}
<span class="pl-k">if</span> (<span class="pl-s1">out_axis_flags</span>[<span class="pl-s1">axis</span>]) {
<span class="pl-en">PyErr_SetString</span>(<span class="pl-s1">PyExc_ValueError</span>,
<span class="pl-s">"duplicate value in 'axis'"</span>);
<span class="pl-k">return</span> <span class="pl-c1">NPY_FAIL</span>;
}
<span class="pl-s1">out_axis_flags</span>[<span class="pl-s1">axis</span>] <span class="pl-c1">=</span> <span class="pl-c1">1</span>;</pre></div>
<p dir="auto">I'm not sure why do you prevent duplicate axis?</p>
<h3 dir="auto">Numpy/Python version information:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.16.2 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0]"><pre class="notranslate"><code class="notranslate">1.16.2 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0]
</code></pre></div> | 0 |
<p dir="auto">I recently tried to define special presets in <code class="notranslate">.babelrc</code> only for test environment in <a href="https://github.com/zeit/next.js/tree/v3-beta/examples/with-jest">with-jest example</a>.<br>
When importing a file for testing that uses React and/or StyledJSX and that does not manually <code class="notranslate">import</code> React and/or StyledJSX, the test will fail with following error message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SyntaxError: Unexpected token import"><pre class="notranslate"><code class="notranslate">SyntaxError: Unexpected token import
</code></pre></div>
<p dir="auto">This is because the automatically added imports of React/StyledJSX are always es2015 style module imports.</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">A simple <code class="notranslate">.babelrc</code> that only defines a special <code class="notranslate">test</code> env should be possible.<br>
In my opinion it should be possible to use the following <code class="notranslate">.babelrc</code>:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"presets": "next/babel",
"env": {
"test": {
"presets": [
"env",
"next/babel"
]
}
}
}
"><pre class="notranslate">{
<span class="pl-ent">"presets"</span>: <span class="pl-s"><span class="pl-pds">"</span>next/babel<span class="pl-pds">"</span></span>,
<span class="pl-ent">"env"</span>: {
<span class="pl-ent">"test"</span>: {
<span class="pl-ent">"presets"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>env<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>next/babel<span class="pl-pds">"</span></span>
]
}
}
}
</pre></div>
<p dir="auto">I played with this issue <a href="https://github.com/pex/next.js/tree/jest-babel-next-issue">on a separate branch</a>. Currently you could work around this issue by importing React & StyledJSX manually:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from 'react'
import _JSXStyle from 'styled-jsx/style'"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span>
<span class="pl-k">import</span> <span class="pl-s1">_JSXStyle</span> <span class="pl-k">from</span> <span class="pl-s">'styled-jsx/style'</span></pre></div>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Either you define <code class="notranslate">development</code>, <code class="notranslate">production</code> and <code class="notranslate">test</code> envs in <code class="notranslate">.babelrc</code> whereas <code class="notranslate">development</code> and <code class="notranslate">production</code> or you manually import React / StyledJSX. Otherwise tests with JEST will fail.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Goto <code class="notranslate">examples/with-jest</code></li>
<li>Simplify your <code class="notranslate">.babelrc</code> as proposed</li>
<li>Run <code class="notranslate">$ npm run test</code></li>
</ol> | <h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">It is not possible to navigate to a page after it has been disposed by the server.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto"><a href="https://github.com/alexanderte/next-dispose-issue">https://github.com/alexanderte/next-dispose-issue</a></p>
<p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p>
<ol dir="auto">
<li><code class="notranslate">npm run dev</code></li>
<li>Go to <a href="http://localhost:3000/a" rel="nofollow">http://localhost:3000/a</a></li>
<li>Navigate between pages A, B, and C – which does work</li>
<li>Go to another tab, do something else for about a minute</li>
<li>See server console message that one of the pages have been disposed</li>
<li>Navigate between pages A, B, and C – and one of the links doesn’t work anymore</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Even though a page has been disposed I would expect it to be re-created and to not break navigation.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Windows</li>
<li>Browser: Chrome, Firefox</li>
<li>Version of Next.js: 7.01</li>
</ul> | 0 |
<p dir="auto">Seems like a bug, such a comparison should definitely be allowed. Pandas Version 0.20.2, Ubuntu.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [2]: import pandas as pd
In [3]: df = pd.DataFrame({"a" : [1,2], "b" : [2,3]})
In [4]: import numpy as np
In [5]: np.all(df["a"] == "")
/home/alexander/anaconda3/lib/python3.5/site-packages/pandas/core/ops.py:798: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
result = getattr(x, name)(y)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-346e9f7bf435> in <module>()
----> 1 np.all(df["a"] == "")
/home/alexander/anaconda3/lib/python3.5/site-packages/pandas/core/ops.py in wrapper(self, other, axis)
859
860 with np.errstate(all='ignore'):
--> 861 res = na_op(values, other)
862 if is_scalar(res):
863 raise TypeError('Could not compare %s type with Series' %
/home/alexander/anaconda3/lib/python3.5/site-packages/pandas/core/ops.py in na_op(x, y)
798 result = getattr(x, name)(y)
799 if result is NotImplemented:
--> 800 raise TypeError("invalid type comparison")
801 except AttributeError:
802 result = op(x, y)
TypeError: invalid type comparison"><pre class="notranslate"><code class="notranslate">In [2]: import pandas as pd
In [3]: df = pd.DataFrame({"a" : [1,2], "b" : [2,3]})
In [4]: import numpy as np
In [5]: np.all(df["a"] == "")
/home/alexander/anaconda3/lib/python3.5/site-packages/pandas/core/ops.py:798: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
result = getattr(x, name)(y)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-346e9f7bf435> in <module>()
----> 1 np.all(df["a"] == "")
/home/alexander/anaconda3/lib/python3.5/site-packages/pandas/core/ops.py in wrapper(self, other, axis)
859
860 with np.errstate(all='ignore'):
--> 861 res = na_op(values, other)
862 if is_scalar(res):
863 raise TypeError('Could not compare %s type with Series' %
/home/alexander/anaconda3/lib/python3.5/site-packages/pandas/core/ops.py in na_op(x, y)
798 result = getattr(x, name)(y)
799 if result is NotImplemented:
--> 800 raise TypeError("invalid type comparison")
801 except AttributeError:
802 result = op(x, y)
TypeError: invalid type comparison
</code></pre></div> | <p dir="auto">Test case:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def test_datetimeindex__eq__():
"""Equality comparisons should never raise an exception"""
pd.DatetimeIndex(['01-Jan-2015']) == ()"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">test_datetimeindex__eq__</span>():
<span class="pl-s">"""Equality comparisons should never raise an exception"""</span>
<span class="pl-s1">pd</span>.<span class="pl-v">DatetimeIndex</span>([<span class="pl-s">'01-Jan-2015'</span>]) <span class="pl-c1">==</span> ()</pre></div>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [115]: test_datetimeindex__eq__()
Traceback (most recent call last):
File "<ipython-input-115-9b7967ca9de2>", line 1, in <module>
test_datetimeindex__eq__()
File "<ipython-input-114-7ae5783187b8>", line 3, in test_datetimeindex__eq__
pd.DatetimeIndex(['01-Jan-2015']) == ()
File "C:\dev\bin\Anaconda\lib\site-packages\pandas\tseries\index.py", line 90, in wrapper
other = _ensure_datetime64(other)
File "C:\dev\bin\Anaconda\lib\site-packages\pandas\tseries\index.py", line 112, in _ensure_datetime64
raise TypeError('%s type object %s' % (type(other), str(other)))
TypeError: <type 'tuple'> type object ()"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">115</span>]: <span class="pl-en">test_datetimeindex__eq__</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">"<ipython-input-115-9b7967ca9de2>"</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-en">test_datetimeindex__eq__</span>()
<span class="pl-v">File</span> <span class="pl-s">"<ipython-input-114-7ae5783187b8>"</span>, <span class="pl-s1">line</span> <span class="pl-c1">3</span>, <span class="pl-s1">in</span> <span class="pl-s1">test_datetimeindex__eq__</span>
<span class="pl-s1">pd</span>.<span class="pl-v">DatetimeIndex</span>([<span class="pl-s">'01-Jan-2015'</span>]) <span class="pl-c1">==</span> ()
<span class="pl-v">File</span> <span class="pl-s">"C:\dev<span class="pl-cce">\b</span>in\Anaconda\lib\site-packages\pandas<span class="pl-cce">\t</span>series\index.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">90</span>, <span class="pl-s1">in</span> <span class="pl-s1">wrapper</span>
<span class="pl-s1">other</span> <span class="pl-c1">=</span> <span class="pl-en">_ensure_datetime64</span>(<span class="pl-s1">other</span>)
<span class="pl-v">File</span> <span class="pl-s">"C:\dev<span class="pl-cce">\b</span>in\Anaconda\lib\site-packages\pandas<span class="pl-cce">\t</span>series\index.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">112</span>, <span class="pl-s1">in</span> <span class="pl-s1">_ensure_datetime64</span>
<span class="pl-k">raise</span> <span class="pl-v">TypeError</span>(<span class="pl-s">'%s type object %s'</span> <span class="pl-c1">%</span> (<span class="pl-en">type</span>(<span class="pl-s1">other</span>), <span class="pl-en">str</span>(<span class="pl-s1">other</span>)))
<span class="pl-v">TypeError</span>: <span class="pl-c1"><</span><span class="pl-s1">type</span> <span class="pl-s">'tuple'</span><span class="pl-c1">></span> <span class="pl-s1">type</span> <span class="pl-en">object</span> ()</pre></div> | 1 |
<p dir="auto">Consider the following script:</p>
<p dir="auto">import pandas as PD</p>
<p dir="auto">df = PD.read_csv('sample.csv',<br>
encoding='utf8')<br>
print(df.columns[:5])</p> | <p dir="auto">I am using Pandas version 0.12.0 on a Mac.</p>
<p dir="auto">I noticed that when there is a BOM utf-8 file, and if the header row is in the first line, the read_csv() method will leave a leading quotation mark in the first column's name. However, if the header row is further down the file and I use the "header=" option, then the whole header row gets parsed correctly.</p>
<p dir="auto">Here is an example code:</p>
<p dir="auto">bing_kw = pd.read_csv('../../data/sem/Bing-Keyword_daily.csv', header=9, thousands=',', encoding='utf-8')</p>
<p dir="auto">Parses the header correctly.</p>
<p dir="auto">bing_kw = pd.read_csv('../../data/sem/Bing-Keyword_daily.csv', thousands=',', encoding='utf-8')</p>
<p dir="auto">Parses the first header column name incorrectly by leaving the leading quotation mark.</p> | 1 |
<p dir="auto">System:<br>
Gentoo linux<br>
btrfs root filesystm<br>
4.1.15-r1 kernel<br>
docker version: 1.9.1<br>
docker backend: btrfs<br>
kubernetes version: 1.1.7 commit:e4e6878</p>
<p dir="auto">Whenever I try to start a container which includes and emptyDir volume is gives the error<br>
Unable to mount volumes for pod "watch-cwd1k_default": operation not supported</p>
<p dir="auto">I have been, as of yet, unable to trouble shoot why this is occuring.</p>
<p dir="auto">I have a different kubernetes install which spans two seperate machines running centos 7.<br>
They also have a btrfs filesystem and utilise the btrfs driver, but they don't have this error.</p>
<p dir="auto">one of the big changes is that on the development machine, I am running the hyperkube so kubernetes is running in a container. On the cluster it is running in the base os.</p> | <p dir="auto">I'm setting up a <a href="http://kubernetes.io/v1.0/docs/getting-started-guides/docker-multinode.html" rel="nofollow">docker-multinode</a> k8s. I'm trying to mount a volume (in this case, a secret). Originally, I was getting this issue:<br>
<code class="notranslate">Unable to mount volumes for pod "service-registry-eccye_default": exit status 32</code><br>
I was on Slack yesterday, and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cjcullen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cjcullen">@cjcullen</a> pointed out that I should be running the kubelet with the <code class="notranslate">--containerized</code> flag. I have added it and restarted the server and now I'm having this error:<br>
<code class="notranslate">Unable to mount volumes for pod "service-registry-4b682_default": fork/exec /nsenter: no such file or directory</code></p>
<p dir="auto">It looks like this issue was brought up in the past (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="79865554" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/8734" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/8734/hovercard" href="https://github.com/kubernetes/kubernetes/issues/8734">#8734</a>), but never resolved.</p> | 1 |
<p dir="auto">When you click a button of a toggle-able button group (using: data-toggle="buttons"), the radio button's parent label gets the 'active' class.</p>
<p dir="auto">But when you load a form that has a checked radio button, the respective label does NOT get that 'active' class. The button thus appears to be unclicked although its hidden radio button is checked.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active"> <=== This class is not added onload
<input type="radio" name="options" id="option1" checked="checked"> Option 1"><pre class="notranslate"><code class="notranslate"><div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active"> <=== This class is not added onload
<input type="radio" name="options" id="option1" checked="checked"> Option 1
</code></pre></div> | <p dir="auto">Example at: <a href="http://jsbin.com/UFoRIYex/244/edit?html,js,output" rel="nofollow">http://jsbin.com/UFoRIYex/244/edit?html,js,output</a></p> | 1 |
<p dir="auto">For instance elements with <code class="notranslate">class="visible-xs visible-sm"</code> are never visible (neither in <code class="notranslate">xs</code> or <code class="notranslate">sm</code> viewports). Attached is the screenshot from the official Bootstrap page in a small viewport; please note that boxes for xs/sm are not displayed either as visible or invisible.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/c79d4d732dc32ba0c98fd9c14668765345d199322b7357f6c8dd8c68c4e325ab/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3234333034382f323035393139322f65303635386630652d386239632d313165332d393538342d6434323465356531633665642e706e67"><img src="https://camo.githubusercontent.com/c79d4d732dc32ba0c98fd9c14668765345d199322b7357f6c8dd8c68c4e325ab/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3234333034382f323035393139322f65303635386630652d386239632d313165332d393538342d6434323465356531633665642e706e67" alt="css bootstrap clipular" data-canonical-src="https://f.cloud.github.com/assets/243048/2059192/e0658f0e-8b9c-11e3-9584-d424e5e1c6ed.png" style="max-width: 100%;"></a></p> | <p dir="auto"><a href="https://dl.dropboxusercontent.com/u/37682778/error/index.html" rel="nofollow">https://dl.dropboxusercontent.com/u/37682778/error/index.html</a></p> | 1 |
<p dir="auto">One of the <a href="https://numpy.org/devdocs/dev/releasing.html?highlight=how%20release#build-and-archive-documentation" rel="nofollow">last steps in the release</a> is to upload documentation to numpy.org/doc via the <a href="https://github.com/numpy/doc">https://github.com/numpy/doc</a> repo. This is new to 1.18.</p>
<p dir="auto">It would be nice if someone else would work through the steps to make sure the directions are clear, but I can do it if desired.</p> | <p dir="auto">Floating point result will appear if using numpy array of type uint64. This leads to numerically incorrect result when number is sufficiently large.<br>
Tested on Python 3.5.2, numpy 1.13.3, on Windows 10 Build 17046.1000 (Insider Preivew)</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
a = np.array([2], np.uint64)
print(31328281838316189 % a[0]) # which gives 0.0, not 1 as expected
print(31328281838316189 // a[0]) # which gives 1.56641409192e+16, not 15664140919158094 as expected"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">2</span>], <span class="pl-s1">np</span>.<span class="pl-s1">uint64</span>)
<span class="pl-en">print</span>(<span class="pl-c1">31328281838316189</span> <span class="pl-c1">%</span> <span class="pl-s1">a</span>[<span class="pl-c1">0</span>]) <span class="pl-c"># which gives 0.0, not 1 as expected</span>
<span class="pl-en">print</span>(<span class="pl-c1">31328281838316189</span> <span class="pl-c1">//</span> <span class="pl-s1">a</span>[<span class="pl-c1">0</span>]) <span class="pl-c"># which gives 1.56641409192e+16, not 15664140919158094 as expected</span></pre></div>
<p dir="auto">This problem will not occur if I replace uint64 with int64.</p> | 0 |
1 |
||
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait FTErrorMethods {
fn succeeded(self) -> bool;
}
impl FTErrorMethods for int {
fn succeeded(self) -> bool { self == 0 }
}
fn main() {
5.succeeded();
}"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">FTErrorMethods</span> <span class="pl-kos">{</span>
<span class="pl-k">fn</span> <span class="pl-en">succeeded</span><span class="pl-kos">(</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -> <span class="pl-smi">bool</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">impl</span> <span class="pl-smi">FTErrorMethods</span> <span class="pl-k">for</span> <span class="pl-smi">int</span> <span class="pl-kos">{</span>
<span class="pl-k">fn</span> <span class="pl-en">succeeded</span><span class="pl-kos">(</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -> <span class="pl-smi">bool</span> <span class="pl-kos">{</span> <span class="pl-smi">self</span> == <span class="pl-c1">0</span> <span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c1">5</span><span class="pl-kos">.</span><span class="pl-en">succeeded</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc: /run/media/jdm/ssd/rust/src/llvm/lib/VMCore/Instructions.cpp:2383: static llvm::CastInst* llvm::CastInst::CreatePointerCast(llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::Instruction*): Assertion `S->getType()->isPointerTy() && "Invalid cast"' failed."><pre class="notranslate"><code class="notranslate">rustc: /run/media/jdm/ssd/rust/src/llvm/lib/VMCore/Instructions.cpp:2383: static llvm::CastInst* llvm::CastInst::CreatePointerCast(llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::Instruction*): Assertion `S->getType()->isPointerTy() && "Invalid cast"' failed.
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#4 0x00007ffff62dc216 in llvm::CastInst::CreatePointerCast(llvm::Value*, llvm::Type*, llvm::Twine const&, llvm::Instruction*) () from /usr/local/bin/../lib/librustllvm.so
#5 0x00007ffff6268fe0 in llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >::CreatePointerCast(llvm::Value*, llvm::Type*, llvm::Twine const&) ()
from /usr/local/bin/../lib/librustllvm.so
#6 0x00007ffff6265f35 in LLVMBuildPointerCast () from /usr/local/bin/../lib/librustllvm.so
#7 0x00007ffff74191c2 in LLVMBuildPointerCast__c_stack_shim () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#8 0x00007ffff54e7649 in __morestack () from /usr/local/bin/../lib/librustrt.so
#9 0x00007ffff54d8104 in call_on_c_stack (fn_ptr=0x7ffff7419180, args=0x7fffe849a998, this=0x7ffff0108830) at /run/media/jdm/ssd/rust/src/rt/rust_task.h:478
#10 upcall_call_shim_on_c_stack (args=0x7fffe849a998, fn_ptr=0x7ffff7419180) at /run/media/jdm/ssd/rust/src/rt/rust_upcall.cpp:64
#11 0x00007ffff6d9c09a in middle::trans::build::PointerCast::_aee05de3d6b51f11::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#12 0x00007ffff6ddd6ce in middle::trans::callee::trans_call_inner::anon::expr_fn_27457 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#13 0x00007ffff6d991cc in middle::trans::base::with_scope::_518696e6502795b0::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#14 0x00007ffff6dcf435 in middle::trans::callee::trans_method_call::_12bb7b81ca47a09::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#15 0x00007ffff6de983c in middle::trans::expr::trans_rvalue_dps_unadjusted::_cbdc4c02519225::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#16 0x00007ffff6de4b64 in middle::trans::expr::trans_to_datum_unadjusted::_a2a3224b30364953::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#17 0x00007ffff6d50cc0 in middle::trans::expr::trans_to_datum::_a2a3224b30364953::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#18 0x00007ffff6de7d4e in middle::trans::expr::trans_rvalue_datum_unadjusted::_a2a3224b30364953::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#19 0x00007ffff6de47fa in middle::trans::expr::trans_to_datum_unadjusted::_a2a3224b30364953::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#20 0x00007ffff6d50cc0 in middle::trans::expr::trans_to_datum::_a2a3224b30364953::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#21 0x00007ffff6d4e7ca in middle::trans::controlflow::trans_if::_fcc7ad9922f2f49::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#22 0x00007ffff6de9c99 in middle::trans::expr::trans_rvalue_dps_unadjusted::_cbdc4c02519225::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#23 0x00007ffff6d4de34 in middle::trans::expr::trans_into::_cbdc4c02519225::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#24 0x00007ffff7434814 in __morestack () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#25 0x00007ffff6d4cf3d in middle::trans::base::trans_stmt::_d936d389a86c7a66::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#26 0x00007ffff6d4c426 in middle::trans::controlflow::trans_block::anon::expr_fn_21837 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#27 0x00007ffff6d4a66e in middle::trans::controlflow::trans_block::_84b7ff1756c49e1::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#28 0x00007ffff6e513b7 in middle::trans::base::trans_closure::_33dc6c6bc3c467::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#29 0x00007ffff6d03624 in middle::trans::base::trans_fn::_bbb928f648ebbdfa::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#30 0x00007ffff6cfb180 in middle::trans::base::trans_item::_e5c80d83455a852::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#31 0x00007ffff6e57e30 in middle::trans::base::trans_mod::_f6b5437a924015ec::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#32 0x00007ffff6e75e5b in middle::trans::base::trans_crate::_685731d1dcd33aec::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#33 0x00007ffff73f4993 in driver::driver::compile_rest::_3dc0cd32a85c34a0::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#34 0x00007ffff7434814 in __morestack () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#35 0x00007ffff73f6ef7 in driver::driver::compile_upto::_23bd5d90dda9e867::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#36 0x00007ffff7434814 in __morestack () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#37 0x00007ffff73f72f9 in driver::driver::compile_input::_594ffb6142f762a7::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#38 0x00007ffff742542f in run_compiler::_c936523e1243e7f::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#39 0x00007ffff7432151 in monitor::anon::expr_fn_82369 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#40 0x00007ffff742e57b in task::__extensions__::try_81880::anon::expr_fn_82143 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#41 0x00007ffff7434814 in __morestack () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#42 0x00007ffff7df363a in task::spawn::spawn_raw::make_child_wrapper::anon::expr_fn_11480 () from /usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so
#43 0x00007ffff7e5aa20 in __morestack () from /usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so
#44 0x00007ffff54d70a4 in task_start_wrapper (a=0x7ffff0109660) at /run/media/jdm/ssd/rust/src/rt/rust_task.cpp:162
#45 0x0000000000000000 in ?? ()"><pre class="notranslate"><code class="notranslate">#4 0x00007ffff62dc216 in llvm::CastInst::CreatePointerCast(llvm::Value*, llvm::Type*, llvm::Twine const&, llvm::Instruction*) () from /usr/local/bin/../lib/librustllvm.so
#5 0x00007ffff6268fe0 in llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >::CreatePointerCast(llvm::Value*, llvm::Type*, llvm::Twine const&) ()
from /usr/local/bin/../lib/librustllvm.so
#6 0x00007ffff6265f35 in LLVMBuildPointerCast () from /usr/local/bin/../lib/librustllvm.so
#7 0x00007ffff74191c2 in LLVMBuildPointerCast__c_stack_shim () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#8 0x00007ffff54e7649 in __morestack () from /usr/local/bin/../lib/librustrt.so
#9 0x00007ffff54d8104 in call_on_c_stack (fn_ptr=0x7ffff7419180, args=0x7fffe849a998, this=0x7ffff0108830) at /run/media/jdm/ssd/rust/src/rt/rust_task.h:478
#10 upcall_call_shim_on_c_stack (args=0x7fffe849a998, fn_ptr=0x7ffff7419180) at /run/media/jdm/ssd/rust/src/rt/rust_upcall.cpp:64
#11 0x00007ffff6d9c09a in middle::trans::build::PointerCast::_aee05de3d6b51f11::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#12 0x00007ffff6ddd6ce in middle::trans::callee::trans_call_inner::anon::expr_fn_27457 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#13 0x00007ffff6d991cc in middle::trans::base::with_scope::_518696e6502795b0::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#14 0x00007ffff6dcf435 in middle::trans::callee::trans_method_call::_12bb7b81ca47a09::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#15 0x00007ffff6de983c in middle::trans::expr::trans_rvalue_dps_unadjusted::_cbdc4c02519225::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#16 0x00007ffff6de4b64 in middle::trans::expr::trans_to_datum_unadjusted::_a2a3224b30364953::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#17 0x00007ffff6d50cc0 in middle::trans::expr::trans_to_datum::_a2a3224b30364953::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#18 0x00007ffff6de7d4e in middle::trans::expr::trans_rvalue_datum_unadjusted::_a2a3224b30364953::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#19 0x00007ffff6de47fa in middle::trans::expr::trans_to_datum_unadjusted::_a2a3224b30364953::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#20 0x00007ffff6d50cc0 in middle::trans::expr::trans_to_datum::_a2a3224b30364953::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#21 0x00007ffff6d4e7ca in middle::trans::controlflow::trans_if::_fcc7ad9922f2f49::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#22 0x00007ffff6de9c99 in middle::trans::expr::trans_rvalue_dps_unadjusted::_cbdc4c02519225::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#23 0x00007ffff6d4de34 in middle::trans::expr::trans_into::_cbdc4c02519225::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#24 0x00007ffff7434814 in __morestack () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#25 0x00007ffff6d4cf3d in middle::trans::base::trans_stmt::_d936d389a86c7a66::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#26 0x00007ffff6d4c426 in middle::trans::controlflow::trans_block::anon::expr_fn_21837 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#27 0x00007ffff6d4a66e in middle::trans::controlflow::trans_block::_84b7ff1756c49e1::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#28 0x00007ffff6e513b7 in middle::trans::base::trans_closure::_33dc6c6bc3c467::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#29 0x00007ffff6d03624 in middle::trans::base::trans_fn::_bbb928f648ebbdfa::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#30 0x00007ffff6cfb180 in middle::trans::base::trans_item::_e5c80d83455a852::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#31 0x00007ffff6e57e30 in middle::trans::base::trans_mod::_f6b5437a924015ec::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#32 0x00007ffff6e75e5b in middle::trans::base::trans_crate::_685731d1dcd33aec::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#33 0x00007ffff73f4993 in driver::driver::compile_rest::_3dc0cd32a85c34a0::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#34 0x00007ffff7434814 in __morestack () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#35 0x00007ffff73f6ef7 in driver::driver::compile_upto::_23bd5d90dda9e867::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#36 0x00007ffff7434814 in __morestack () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#37 0x00007ffff73f72f9 in driver::driver::compile_input::_594ffb6142f762a7::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#38 0x00007ffff742542f in run_compiler::_c936523e1243e7f::_06 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#39 0x00007ffff7432151 in monitor::anon::expr_fn_82369 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#40 0x00007ffff742e57b in task::__extensions__::try_81880::anon::expr_fn_82143 () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#41 0x00007ffff7434814 in __morestack () from /usr/local/bin/../lib/librustc-c84825241471686d-0.6.so
#42 0x00007ffff7df363a in task::spawn::spawn_raw::make_child_wrapper::anon::expr_fn_11480 () from /usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so
#43 0x00007ffff7e5aa20 in __morestack () from /usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so
#44 0x00007ffff54d70a4 in task_start_wrapper (a=0x7ffff0109660) at /run/media/jdm/ssd/rust/src/rt/rust_task.cpp:162
#45 0x0000000000000000 in ?? ()
</code></pre></div> | <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait Foo {} impl Foo {} fn main() {}"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">impl</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">Gives</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<anon>:1:14: 1:25 error: duplicate definition of module `Foo`
<anon>:1 trait Foo {} impl Foo {} fn main() {}
^~~~~~~~~~~
<anon>:1:1: 1:13 note: first definition of module `Foo` here
<anon>:1 trait Foo {} impl Foo {} fn main() {}
^~~~~~~~~~~~
error: aborting due to previous error"><pre class="notranslate"><code class="notranslate"><anon>:1:14: 1:25 error: duplicate definition of module `Foo`
<anon>:1 trait Foo {} impl Foo {} fn main() {}
^~~~~~~~~~~
<anon>:1:1: 1:13 note: first definition of module `Foo` here
<anon>:1 trait Foo {} impl Foo {} fn main() {}
^~~~~~~~~~~~
error: aborting due to previous error
</code></pre></div>
<p dir="auto">There's no mention of <code class="notranslate">mod</code>s in the code, so it would be nice if the error message didn't mention modules at all; and preferably if it just complained that the <code class="notranslate">Foo</code> in <code class="notranslate">impl Foo {}</code> wasn't a type. (Of course, the latter point may change with DST.)</p> | 0 |
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.6.0</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">After upgrading to 2.6.0 version, pipelines with SparkKubernetesOperator -> SparkKubernetesSensor stopped working correctly.</p>
<p dir="auto"><a href="https://github.com/apache/airflow/pull/29977" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/29977/hovercard">this PR</a> introduces some enhancement into Spark Kubernetes logic, now SparkKubernetesOperator receives the log from spark pods (which is great), but it doesn't monitor the status of a pod, which means if spark application fails - a task in Airflow finishes successfully.<br>
On the other hand, using previous pipelines (Operator + Sensor) is impossible now, cause SparkKubernetesSensor fails with <code class="notranslate">jinja2.exceptions.UndefinedError: 'None' has no attribute 'metadata'</code> as SparkKubernetesOperator is no longer pushing info to xcom.</p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">Old pipelines should be compatible with Airflow 2.6.0, even though the log would be retrieved in two places - operator and sensor.<br>
OR remove the sensor completely and implement all the functionality in the operator (log + status)</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Create a DAG with two operators</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="t1 = SparkKubernetesOperator(
kubernetes_conn_id='common/kubernetes_default',
task_id=f"task-submit",
namespace="namespace",
application_file="spark-applications/app.yaml",
do_xcom_push=True,
dag=dag,
)
t2 = SparkKubernetesSensor(
task_id=f"task-sensor",
namespace="namespace",
application_name=f"{{{{ task_instance.xcom_pull(task_ids='task-submit')['metadata']['name'] }}}}",
dag=dag,
attach_log=True,
)
"><pre class="notranslate"><code class="notranslate">t1 = SparkKubernetesOperator(
kubernetes_conn_id='common/kubernetes_default',
task_id=f"task-submit",
namespace="namespace",
application_file="spark-applications/app.yaml",
do_xcom_push=True,
dag=dag,
)
t2 = SparkKubernetesSensor(
task_id=f"task-sensor",
namespace="namespace",
application_name=f"{{{{ task_instance.xcom_pull(task_ids='task-submit')['metadata']['name'] }}}}",
dag=dag,
attach_log=True,
)
</code></pre></div>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Debian GNU/Linux 10 (buster)</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">apache-airflow-providers-amazon==8.0.0<br>
apache-airflow-providers-apache-spark==4.0.1<br>
apache-airflow-providers-celery==3.1.0<br>
apache-airflow-providers-cncf-kubernetes==6.1.0<br>
apache-airflow-providers-common-sql==1.4.0<br>
apache-airflow-providers-docker==3.6.0<br>
apache-airflow-providers-elasticsearch==4.4.0<br>
apache-airflow-providers-ftp==3.3.1<br>
apache-airflow-providers-google==10.0.0<br>
apache-airflow-providers-grpc==3.1.0<br>
apache-airflow-providers-hashicorp==3.3.1<br>
apache-airflow-providers-http==4.3.0<br>
apache-airflow-providers-imap==3.1.1<br>
apache-airflow-providers-microsoft-azure==6.0.0<br>
apache-airflow-providers-microsoft-mssql==3.3.2<br>
apache-airflow-providers-microsoft-psrp==2.2.0<br>
apache-airflow-providers-microsoft-winrm==3.1.1<br>
apache-airflow-providers-mysql==5.0.0<br>
apache-airflow-providers-odbc==3.2.1<br>
apache-airflow-providers-oracle==3.6.0<br>
apache-airflow-providers-postgres==5.4.0<br>
apache-airflow-providers-redis==3.1.0<br>
apache-airflow-providers-sendgrid==3.1.0<br>
apache-airflow-providers-sftp==4.2.4<br>
apache-airflow-providers-slack==7.2.0<br>
apache-airflow-providers-snowflake==4.0.5<br>
apache-airflow-providers-sqlite==3.3.2<br>
apache-airflow-providers-ssh==3.6.0<br>
apache-airflow-providers-telegram==4.0.0</p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Other 3rd-party Helm chart</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> | <h3 dir="auto">Body</h3>
<p dir="auto"><strong>TL;DR:</strong><br>
Multiple providers need to handle the logic of splitting SQL statements<br>
<a href="https://github.com/apache/airflow/blob/501a3c3fbefbcc0d6071a00eb101110fc4733e08/airflow/providers/snowflake/hooks/snowflake.py#L287-L347">Snowflake.run()</a> , <a href="https://github.com/apache/airflow/pull/22391/files">RedShift.run()</a> and it will be very similar should be eventually create <code class="notranslate">PrestoOperator</code> or <code class="notranslate">TrinoOperator</code>.</p>
<p dir="auto">I want to discuss the idea of extracting the split statement logic into <code class="notranslate">DbApiHook</code>.<br>
e.g create a <code class="notranslate">DbApiHook.run_many()</code> that will split the statements and use <code class="notranslate">DbApiHook.run()</code> under the hood.</p>
<p dir="auto">On one hand it will reduce duplicate code and allow to develop operators for these providers more easily<br>
On the other hand if we will make it in <code class="notranslate">dbapihook</code> it means to bump minimum supported Airflow version for these providers (once they will actually use the new function)</p>
<hr>
<p dir="auto"><strong>The long story:</strong><br>
Some DBs like MySQL, PostgreSql, MsSQL are able to run a batch of SQL statements:<br>
<code class="notranslate">SELECT 1; SELECT2;</code></p>
<p dir="auto">So you can do:<br>
<code class="notranslate">MySQLOperator(.., sql='SELECT 1; SELECT2;')</code><br>
it will invoke :<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/501a3c3fbefbcc0d6071a00eb101110fc4733e08/airflow/hooks/dbapi.py#L163">airflow/airflow/hooks/dbapi.py</a>
</p>
<p class="mb-0 color-fg-muted">
Line 163
in
<a data-pjax="true" class="commit-tease-sha" href="/apache/airflow/commit/501a3c3fbefbcc0d6071a00eb101110fc4733e08">501a3c3</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="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">def</span> <span class="pl-en">run</span>(<span class="pl-s1">self</span>, <span class="pl-s1">sql</span>, <span class="pl-s1">autocommit</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">parameters</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">handler</span><span class="pl-c1">=</span><span class="pl-c1">None</span>): </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto">which will execute the sql in a single query. (The run function will convert this sql to <code class="notranslate">['SELECT 1; SELECT2;']</code> - Note this is a list with <strong>1 cell</strong>)</p>
<p dir="auto">But in other DBs like: Snowflake, Redshift, Trino, Presto</p>
<p dir="auto">You can not run <code class="notranslate">SELECT 1; SELECT2;</code> as is. You must split the statement.<br>
This makes the <code class="notranslate">run()</code> irrelevant for these DBs.</p>
<p dir="auto">For example in Snowflake when users pass <code class="notranslate">SELECT 1; SELECT2;</code> what we actually do is create:<br>
<code class="notranslate">['SELECT 1;', 'SELECT2;']</code> - Note this is a list with <strong>2 cells</strong><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/501a3c3fbefbcc0d6071a00eb101110fc4733e08/airflow/providers/snowflake/hooks/snowflake.py#L314-L316">airflow/airflow/providers/snowflake/hooks/snowflake.py</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 314 to 316
in
<a data-pjax="true" class="commit-tease-sha" href="/apache/airflow/commit/501a3c3fbefbcc0d6071a00eb101110fc4733e08">501a3c3</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="L314" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="314"></td>
<td id="LC314" 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-en">isinstance</span>(<span class="pl-s1">sql</span>, <span class="pl-s1">str</span>): </td>
</tr>
<tr class="border-0">
<td id="L315" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="315"></td>
<td id="LC315" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">split_statements_tuple</span> <span class="pl-c1">=</span> <span class="pl-en">split_statements</span>(<span class="pl-v">StringIO</span>(<span class="pl-s1">sql</span>)) </td>
</tr>
<tr class="border-0">
<td id="L316" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="316"></td>
<td id="LC316" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">sql</span> <span class="pl-c1">=</span> [<span class="pl-s1">sql_string</span> <span class="pl-k">for</span> <span class="pl-s1">sql_string</span>, <span class="pl-s1">_</span> <span class="pl-c1">in</span> <span class="pl-s1">split_statements_tuple</span> <span class="pl-k">if</span> <span class="pl-s1">sql_string</span>] </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto"><strong>The problem?</strong><br>
These providers (Snowflake, Redshift, Trino, Presto) <strong>are forced to override dbapi.run()</strong> but they all actually need the exact same functionality.</p>
<p dir="auto">If you will take a look at <a href="https://github.com/apache/airflow/blob/501a3c3fbefbcc0d6071a00eb101110fc4733e08/airflow/providers/snowflake/hooks/snowflake.py#L287-L347">Snowflake.run()</a> you will see that it's almost identical to <a href="https://github.com/apache/airflow/pull/22391/files">RedShift.run()</a> and it will be very similar should be eventually create <code class="notranslate">PrestoOperator</code> or <code class="notranslate">TrinoOperator</code>.</p>
<p dir="auto">This is something already brought up earlier in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="867848913" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/15533" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/15533/hovercard?comment_id=620481685&comment_type=review_comment" href="https://github.com/apache/airflow/pull/15533#discussion_r620481685">#15533 (comment)</a></p>
<p dir="auto"><strong>So why not just set the sql param to accept list only?</strong><br>
Because we want to support using .sql file so we must handle the split of the statements.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SomeSqlOperator(
...,
sql=my_queries.sql
)"><pre class="notranslate"><code class="notranslate">SomeSqlOperator(
...,
sql=my_queries.sql
)
</code></pre></div>
<p dir="auto">We are reading the content of the file and loading it as a single statement.</p>
<hr>
<p dir="auto"><strong>What do others think?</strong><br>
Should we create <code class="notranslate">DbApiHook.run_many()</code> or leave it as it is today where every provider needs to handle the logic on it's own?</p>
<h3 dir="auto">Committer</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I acknowledge that I am a maintainer/committer of the Apache Airflow project.</li>
</ul> | 0 |
<p dir="auto">This is the master tracking item for launcher's incorrect search results issue -</p>
<table role="table">
<thead>
<tr>
<th>Bug#</th>
<th>Title</th>
<th>PR #</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="625054193" data-permission-text="Title is private" data-url="https://github.com/microsoft/PowerToys/issues/3746" data-hovercard-type="issue" data-hovercard-url="/microsoft/PowerToys/issues/3746/hovercard" href="https://github.com/microsoft/PowerToys/issues/3746">#3746</a></td>
<td>Shows description of the app</td>
<td></td>
</tr>
<tr>
<td><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="622679776" data-permission-text="Title is private" data-url="https://github.com/microsoft/PowerToys/issues/3459" data-hovercard-type="issue" data-hovercard-url="/microsoft/PowerToys/issues/3459/hovercard" href="https://github.com/microsoft/PowerToys/issues/3459">#3459</a></td>
<td>handle PWAs better in results.</td>
<td><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="630126285" data-permission-text="Title is private" data-url="https://github.com/microsoft/PowerToys/issues/4020" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/PowerToys/pull/4020/hovercard" href="https://github.com/microsoft/PowerToys/pull/4020">#4020</a></td>
</tr>
<tr>
<td><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="621133367" data-permission-text="Title is private" data-url="https://github.com/microsoft/PowerToys/issues/3150" data-hovercard-type="issue" data-hovercard-url="/microsoft/PowerToys/issues/3150/hovercard" href="https://github.com/microsoft/PowerToys/issues/3150">#3150</a></td>
<td>Launcher. Duplicate items on the list</td>
<td></td>
</tr>
<tr>
<td><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="628557166" data-permission-text="Title is private" data-url="https://github.com/microsoft/PowerToys/issues/3964" data-hovercard-type="issue" data-hovercard-url="/microsoft/PowerToys/issues/3964/hovercard" href="https://github.com/microsoft/PowerToys/issues/3964">#3964</a></td>
<td>Unable to search files on mapped network drives</td>
<td></td>
</tr>
</tbody>
</table> | <p dir="auto">I use a 43" 4k monitor and I'm excited with the prospect of managing my windows with FancyZones. I'm a developer and like to have my main windows large. These main windows vary depending upon what I'm doing, but include IDE's, browsers, office apps, etc. Other windows are typically floating and are fine.</p>
<p dir="auto">I created a 3 column layout with the middle column wider than the left and right ones - this gives the centre as my main focus. Unfortunately I had to be careful with the ORDER I created them as otherwise I couldn't select the edges of the columns obscured by the centre column.</p>
<p dir="auto">Creating them Left, Right, Centre meant I couldn't grab all edges. I had to create them Left, Centre, Right.</p>
<p dir="auto">The editor should allow me to pick any zone edge regardless of z-order.</p>
<p dir="auto">Versions</p>
<ol dir="auto">
<li>PowerToys: v0.18.1</li>
<li>Windows 10 Enterprise 1903, build: 18362.778</li>
</ol> | 0 |
<p dir="auto">I have a DenseNet-like model for speech recognition (<a href="https://arxiv.org/abs/1904.03288" rel="nofollow">https://arxiv.org/abs/1904.03288</a>). My code: <a href="https://github.com/vadimkantorov/convasr/blob/master/models.py#L94">https://github.com/vadimkantorov/convasr/blob/master/models.py#L94</a></p>
<p dir="auto">When I export it to ONNX as is, everything works okay. When I apply <code class="notranslate">model = apex.amp.initialize(model, opt_level = 'O3')</code> prior to export (basically to have model params converted to float16 and have input/output casts from float32), I get this:</p>
<p dir="auto"><code class="notranslate">RuntimeError: Cannot insert a Tensor that requires grad as a constant. Consider making it a parameter or input, or detaching the gradient</code></p>
<p dir="auto">The error is really strange.</p>
<p dir="auto">When I cast model parameters to float16 manually and have input cast to float16 manually, I have this bug instead: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="649880059" data-permission-text="Title is private" data-url="https://github.com/microsoft/onnxruntime/issues/4405" data-hovercard-type="issue" data-hovercard-url="/microsoft/onnxruntime/issues/4405/hovercard" href="https://github.com/microsoft/onnxruntime/issues/4405">microsoft/onnxruntime#4405</a></p>
<p dir="auto">Full stack trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "train.py", line 383, in <module>
main(parser.parse_args())
File "train.py", line 72, in main
torch.onnx.export(model, (waveform_input,), args.onnx, opset_version = args.onnx_opset, export_params = args.onnx_export_params, do_constant_folding = True, input_names = ['x'], output_names = ['logits'], dynamic_axes = dict(x = {0 : 'B', 1 : 'T'}, logits = {0 : 'B', 2: 't'}))
File "/miniconda/lib/python3.7/site-packages/torch/onnx/__init__.py", line 148, in export
strip_doc_string, dynamic_axes, keep_initializers_as_inputs)
File "/miniconda/lib/python3.7/site-packages/torch/onnx/utils.py", line 66, in export
dynamic_axes=dynamic_axes, keep_initializers_as_inputs=keep_initializers_as_inputs)
File "/miniconda/lib/python3.7/site-packages/torch/onnx/utils.py", line 416, in _export
fixed_batch_size=fixed_batch_size)
File "/miniconda/lib/python3.7/site-packages/torch/onnx/utils.py", line 279, in _model_to_graph
graph, torch_out = _trace_and_get_graph_from_model(model, args, training)
File "/miniconda/lib/python3.7/site-packages/torch/onnx/utils.py", line 236, in _trace_and_get_graph_from_model
trace_graph, torch_out, inputs_states = torch.jit._get_trace_graph(model, args, _force_outplace=True, _return_inputs_states=True)
File "/miniconda/lib/python3.7/site-packages/torch/jit/__init__.py", line 272, in _get_trace_graph
outs = ONNXTracedModule(f, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/jit/__init__.py", line 355, in forward
self._force_outplace,
File "/miniconda/lib/python3.7/site-packages/torch/jit/__init__.py", line 342, in wrapper
outs.append(self.inner(*trace_inputs))
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 530, in __call__
result = self._slow_forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 516, in _slow_forward
result = self.forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/apex/amp/_initialize.py", line 197, in new_fwd
**applier(kwargs, input_caster))
File "/root/convasr/models.py", line 146, in forward
x = subblock(x, residual = residual, lengths_fraction = xlen)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 530, in __call__
result = self._slow_forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 516, in _slow_forward
result = self.forward(*input, **kwargs)
File "/root/convasr/models.py", line 74, in forward
x = self.activation(bn(conv(x)), residual = residual_inputs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 530, in __call__
result = self._slow_forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 516, in _slow_forward
result = self.forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/container.py", line 100, in forward
input = module(input)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 530, in __call__
result = self._slow_forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 516, in _slow_forward
result = self.forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 202, in forward
self.padding, self.dilation, self.groups)
RuntimeError: Cannot insert a Tensor that requires grad as a constant. Consider making it a parameter or input, or detaching the gradient"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "train.py", line 383, in <module>
main(parser.parse_args())
File "train.py", line 72, in main
torch.onnx.export(model, (waveform_input,), args.onnx, opset_version = args.onnx_opset, export_params = args.onnx_export_params, do_constant_folding = True, input_names = ['x'], output_names = ['logits'], dynamic_axes = dict(x = {0 : 'B', 1 : 'T'}, logits = {0 : 'B', 2: 't'}))
File "/miniconda/lib/python3.7/site-packages/torch/onnx/__init__.py", line 148, in export
strip_doc_string, dynamic_axes, keep_initializers_as_inputs)
File "/miniconda/lib/python3.7/site-packages/torch/onnx/utils.py", line 66, in export
dynamic_axes=dynamic_axes, keep_initializers_as_inputs=keep_initializers_as_inputs)
File "/miniconda/lib/python3.7/site-packages/torch/onnx/utils.py", line 416, in _export
fixed_batch_size=fixed_batch_size)
File "/miniconda/lib/python3.7/site-packages/torch/onnx/utils.py", line 279, in _model_to_graph
graph, torch_out = _trace_and_get_graph_from_model(model, args, training)
File "/miniconda/lib/python3.7/site-packages/torch/onnx/utils.py", line 236, in _trace_and_get_graph_from_model
trace_graph, torch_out, inputs_states = torch.jit._get_trace_graph(model, args, _force_outplace=True, _return_inputs_states=True)
File "/miniconda/lib/python3.7/site-packages/torch/jit/__init__.py", line 272, in _get_trace_graph
outs = ONNXTracedModule(f, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/jit/__init__.py", line 355, in forward
self._force_outplace,
File "/miniconda/lib/python3.7/site-packages/torch/jit/__init__.py", line 342, in wrapper
outs.append(self.inner(*trace_inputs))
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 530, in __call__
result = self._slow_forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 516, in _slow_forward
result = self.forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/apex/amp/_initialize.py", line 197, in new_fwd
**applier(kwargs, input_caster))
File "/root/convasr/models.py", line 146, in forward
x = subblock(x, residual = residual, lengths_fraction = xlen)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 530, in __call__
result = self._slow_forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 516, in _slow_forward
result = self.forward(*input, **kwargs)
File "/root/convasr/models.py", line 74, in forward
x = self.activation(bn(conv(x)), residual = residual_inputs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 530, in __call__
result = self._slow_forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 516, in _slow_forward
result = self.forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/container.py", line 100, in forward
input = module(input)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 530, in __call__
result = self._slow_forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 516, in _slow_forward
result = self.forward(*input, **kwargs)
File "/miniconda/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 202, in forward
self.padding, self.dilation, self.groups)
RuntimeError: Cannot insert a Tensor that requires grad as a constant. Consider making it a parameter or input, or detaching the gradient
</code></pre></div>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mcarilli/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mcarilli">@mcarilli</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/houseroad/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/houseroad">@houseroad</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/spandantiwari/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/spandantiwari">@spandantiwari</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lara-hdr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lara-hdr">@lara-hdr</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/BowenBao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/BowenBao">@BowenBao</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/neginraoof/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/neginraoof">@neginraoof</a></p> | <h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "repro_autocast_trace.py", line 33, in <module>
model = torch.jit.trace(model, (x, y))
File "/home/bowbao/repos/pytorch/torch/jit/_trace.py", line 742, in trace
_module_class,
File "/home/bowbao/repos/pytorch/torch/jit/_trace.py", line 966, in trace_module
_module_class,
File "/home/bowbao/repos/pytorch/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/bowbao/repos/pytorch/torch/jit/_trace.py", line 335, in _check_trace
_compilation_unit=torch._C.CompilationUnit(),
File "/home/bowbao/repos/pytorch/torch/jit/_trace.py", line 940, in trace_module
_force_outplace,
File "/home/bowbao/repos/pytorch/torch/nn/modules/module.py", line 878, in _call_impl
result = self._slow_forward(*input, **kwargs)
File "/home/bowbao/repos/pytorch/torch/nn/modules/module.py", line 851, in _slow_forward
result = self.forward(*input, **kwargs)
File "repro_autocast_trace.py", line 14, in forward
out = self.fc1(x)
File "/home/bowbao/repos/pytorch/torch/nn/modules/module.py", line 878, in _call_impl
result = self._slow_forward(*input, **kwargs)
File "/home/bowbao/repos/pytorch/torch/nn/modules/module.py", line 851, in _slow_forward
result = self.forward(*input, **kwargs)
File "/home/bowbao/repos/pytorch/torch/nn/modules/linear.py", line 94, in forward
return F.linear(input, self.weight, self.bias)
File "/home/bowbao/repos/pytorch/torch/nn/functional.py", line 1665, in linear
ret = torch.addmm(bias, input, weight.t())
RuntimeError: Cannot insert a Tensor that requires grad as a constant. Consider making it a parameter or input, or detaching the gradient"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "repro_autocast_trace.py", line 33, in <module>
model = torch.jit.trace(model, (x, y))
File "/home/bowbao/repos/pytorch/torch/jit/_trace.py", line 742, in trace
_module_class,
File "/home/bowbao/repos/pytorch/torch/jit/_trace.py", line 966, in trace_module
_module_class,
File "/home/bowbao/repos/pytorch/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/bowbao/repos/pytorch/torch/jit/_trace.py", line 335, in _check_trace
_compilation_unit=torch._C.CompilationUnit(),
File "/home/bowbao/repos/pytorch/torch/jit/_trace.py", line 940, in trace_module
_force_outplace,
File "/home/bowbao/repos/pytorch/torch/nn/modules/module.py", line 878, in _call_impl
result = self._slow_forward(*input, **kwargs)
File "/home/bowbao/repos/pytorch/torch/nn/modules/module.py", line 851, in _slow_forward
result = self.forward(*input, **kwargs)
File "repro_autocast_trace.py", line 14, in forward
out = self.fc1(x)
File "/home/bowbao/repos/pytorch/torch/nn/modules/module.py", line 878, in _call_impl
result = self._slow_forward(*input, **kwargs)
File "/home/bowbao/repos/pytorch/torch/nn/modules/module.py", line 851, in _slow_forward
result = self.forward(*input, **kwargs)
File "/home/bowbao/repos/pytorch/torch/nn/modules/linear.py", line 94, in forward
return F.linear(input, self.weight, self.bias)
File "/home/bowbao/repos/pytorch/torch/nn/functional.py", line 1665, in linear
ret = torch.addmm(bias, input, weight.t())
RuntimeError: Cannot insert a Tensor that requires grad as a constant. Consider making it a parameter or input, or detaching the gradient
</code></pre></div>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Run the following script:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import torch
import torch.nn as nn
import torch.nn.functional as F
class NeuralNetWithLoss(nn.Module):
def __init__(self, input_size, hidden_size, num_classes):
super(NeuralNetWithLoss, self).__init__()
self.fc1 = nn.Linear(input_size, hidden_size)
self.relu = nn.ReLU()
self.fc2 = nn.Linear(hidden_size, num_classes)
def forward(self, x, target):
out = self.fc1(x)
out = self.relu(out)
out = self.fc2(out)
return F.nll_loss(F.log_softmax(out, dim=1), target), out
input_size = 784
hidden_size = 500
num_classes = 10
model = NeuralNetWithLoss(input_size, hidden_size, num_classes)
model.cuda()
model.eval()
with torch.cuda.amp.autocast():
x = torch.randn(32, input_size).cuda()
y = torch.randint(0, 10, (32,)).cuda()
model = torch.jit.trace(model, (x, y))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">torch</span>
<span class="pl-k">import</span> <span class="pl-s1">torch</span>.<span class="pl-s1">nn</span> <span class="pl-k">as</span> <span class="pl-s1">nn</span>
<span class="pl-k">import</span> <span class="pl-s1">torch</span>.<span class="pl-s1">nn</span>.<span class="pl-s1">functional</span> <span class="pl-k">as</span> <span class="pl-v">F</span>
<span class="pl-k">class</span> <span class="pl-v">NeuralNetWithLoss</span>(<span class="pl-s1">nn</span>.<span class="pl-v">Module</span>):
<span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">input_size</span>, <span class="pl-s1">hidden_size</span>, <span class="pl-s1">num_classes</span>):
<span class="pl-en">super</span>(<span class="pl-v">NeuralNetWithLoss</span>, <span class="pl-s1">self</span>).<span class="pl-en">__init__</span>()
<span class="pl-s1">self</span>.<span class="pl-s1">fc1</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">Linear</span>(<span class="pl-s1">input_size</span>, <span class="pl-s1">hidden_size</span>)
<span class="pl-s1">self</span>.<span class="pl-s1">relu</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">ReLU</span>()
<span class="pl-s1">self</span>.<span class="pl-s1">fc2</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">Linear</span>(<span class="pl-s1">hidden_size</span>, <span class="pl-s1">num_classes</span>)
<span class="pl-k">def</span> <span class="pl-en">forward</span>(<span class="pl-s1">self</span>, <span class="pl-s1">x</span>, <span class="pl-s1">target</span>):
<span class="pl-s1">out</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">fc1</span>(<span class="pl-s1">x</span>)
<span class="pl-s1">out</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">relu</span>(<span class="pl-s1">out</span>)
<span class="pl-s1">out</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">fc2</span>(<span class="pl-s1">out</span>)
<span class="pl-k">return</span> <span class="pl-v">F</span>.<span class="pl-en">nll_loss</span>(<span class="pl-v">F</span>.<span class="pl-en">log_softmax</span>(<span class="pl-s1">out</span>, <span class="pl-s1">dim</span><span class="pl-c1">=</span><span class="pl-c1">1</span>), <span class="pl-s1">target</span>), <span class="pl-s1">out</span>
<span class="pl-s1">input_size</span> <span class="pl-c1">=</span> <span class="pl-c1">784</span>
<span class="pl-s1">hidden_size</span> <span class="pl-c1">=</span> <span class="pl-c1">500</span>
<span class="pl-s1">num_classes</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span>
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">NeuralNetWithLoss</span>(<span class="pl-s1">input_size</span>, <span class="pl-s1">hidden_size</span>, <span class="pl-s1">num_classes</span>)
<span class="pl-s1">model</span>.<span class="pl-en">cuda</span>()
<span class="pl-s1">model</span>.<span class="pl-en">eval</span>()
<span class="pl-k">with</span> <span class="pl-s1">torch</span>.<span class="pl-s1">cuda</span>.<span class="pl-s1">amp</span>.<span class="pl-en">autocast</span>():
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">32</span>, <span class="pl-s1">input_size</span>).<span class="pl-en">cuda</span>()
<span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randint</span>(<span class="pl-c1">0</span>, <span class="pl-c1">10</span>, (<span class="pl-c1">32</span>,)).<span class="pl-en">cuda</span>()
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-s1">jit</span>.<span class="pl-en">trace</span>(<span class="pl-s1">model</span>, (<span class="pl-s1">x</span>, <span class="pl-s1">y</span>))</pre></div>
<p dir="auto">The issue looks similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="649861898" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/40910" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/40910/hovercard" href="https://github.com/pytorch/pytorch/issues/40910">#40910</a>, which was using tracing with apex amp.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mcarilli/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mcarilli">@mcarilli</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ptrblck/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ptrblck">@ptrblck</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gmagogsfm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gmagogsfm">@gmagogsfm</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mruberry/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mruberry">@mruberry</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ngimel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ngimel">@ngimel</a></p> | 1 |
<p dir="auto">Browser Info:<br>
Using IE9 on Windows 7 SP1.</p>
<p dir="auto">Bootstrap version:<br>
3.0.0</p>
<p dir="auto">Steps to reproduce:<br>
Visit <a href="http://getbootstrap.com/examples/theme/" rel="nofollow">http://getbootstrap.com/examples/theme/</a> using IE9 and click the dropdown link in either navbar example. The drop shadow should appear, but none of the content. All of the elements below are visible.</p>
<p dir="auto">Temp Fix:<br>
Commenting out the <code class="notranslate">#gradient > .vertical</code> line in theme.less for navbars solves the issue.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/f5d68e1fb94795b84653f682741ddd872f93595039f68aa6e5a52480b87942fe/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313237363136302f313335363139382f32383061336262322d333737332d313165332d393132322d6164616162653130393334312e706e67"><img src="https://camo.githubusercontent.com/f5d68e1fb94795b84653f682741ddd872f93595039f68aa6e5a52480b87942fe/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313237363136302f313335363139382f32383061336262322d333737332d313165332d393132322d6164616162653130393334312e706e67" alt="navbar issue" data-canonical-src="https://f.cloud.github.com/assets/1276160/1356198/280a3bb2-3773-11e3-9122-adaabe109341.png" style="max-width: 100%;"></a></p> | <p dir="auto">With bootstrap-theme.css included, navbar dropdowns fail to work in IE 8. (You can see a one-pixel line appear indicating they're attempting to work, however.)</p>
<p dir="auto">Test case:</p>
<p dir="auto"><a href="http://jodytate.github.io/bootstrap-dropdown-test/" rel="nofollow">http://jodytate.github.io/bootstrap-dropdown-test/</a></p>
<p dir="auto">(Neither jsfiddle or jsbin worked reliably in IE 8 so the best way to test was a standalone site.)</p> | 1 |
<p dir="auto"><strong>I'm submitting a ...</strong></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"><pre class="notranslate"><code class="notranslate">[x] bug report => search github for a similar issue or PR before submitting
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
When using ngModel and trackBy in <code class="notranslate"><select></code> the initial value is not selected when it is an object.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
Initial value should be selected.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
HTML:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<select [(ngModel)]="selectedItem">
<option *ngFor="let item of items; trackBy:itemIdentity" [value]="item">
{{item.name}}
</option>
</select>"><pre class="notranslate"><code class="notranslate"><select [(ngModel)]="selectedItem">
<option *ngFor="let item of items; trackBy:itemIdentity" [value]="item">
{{item.name}}
</option>
</select>
</code></pre></div>
<p dir="auto">TS:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="private items = [{id: 0, name: 'first'}, {id: 1, name: 'second'}];
private selectedItem = {id: 1, name: 'second'};
itemIdentity(index:number, item:any):any {
return item.id;
}"><pre class="notranslate"><code class="notranslate">private items = [{id: 0, name: 'first'}, {id: 1, name: 'second'}];
private selectedItem = {id: 1, name: 'second'};
itemIdentity(index:number, item:any):any {
return item.id;
}
</code></pre></div>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.4.1</li>
<li><strong>Browser:</strong> Chrome</li>
<li><strong>Language:</strong> TypeScript X.X</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="[ ] 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>
Currently NgModel does object reference comparison. This is not very flexible.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
See example with two multi selects - first one doesn't use workaround to enforce usage of same instances. The second one does.</p>
<p dir="auto"><a href="http://plnkr.co/edit/MND6j3Wa5ZDsIt9X9ZVQ?p=preview" rel="nofollow">http://plnkr.co/edit/MND6j3Wa5ZDsIt9X9ZVQ?p=preview</a></p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Objects do not always come from the same source. They typically come from some REST service. And they usually don't have the same instance.</p>
<p dir="auto">Current behavior requires workaround for something I believe to be very (if not the most) common use case. I think those should be supported by framework without requiring any workarounds.</p>
<p dir="auto"><strong>Suggested solution</strong><br>
I suggest creating comparator object (or callback) which would compare two objects and return true if they are equal. NgModel would then internally use this comparator to compare objects.</p>
<p dir="auto">Resulting code could look like this:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<select multiple class="form-control"
name="selectedCountries"
[ngComparator]="countryComparator"
[(ngModel)]="selectedCountries">
<option *ngFor="let country of countries" [ngValue]="country">
{{country.name}}
</option>
</select>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">select</span> <span class="pl-c1">multiple</span> <span class="pl-c1">class</span>="<span class="pl-s">form-control</span>"
<span class="pl-c1">name</span>="<span class="pl-s">selectedCountries</span>"
<span class="pl-c1">[ngComparator]</span>="<span class="pl-s">countryComparator</span>"
<span class="pl-c1">[(ngModel)]</span>="<span class="pl-s">selectedCountries</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">option</span> <span class="pl-c1">*ngFor</span>="<span class="pl-s">let country of countries</span>" <span class="pl-c1">[ngValue]</span>="<span class="pl-s">country</span>"<span class="pl-kos">></span>
{{country.name}}
<span class="pl-kos"></</span><span class="pl-ent">option</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">select</span><span class="pl-kos">></span></pre></div>
<p dir="auto">Framework could also provide some default comparators - for example one, which would compare object attributes. That one would be sufficient for quite a lot of use cases.</p>
<p dir="auto">If there already is some standard solution, please point me to it. I tried to search and I didn't find anything. I found just <a href="http://stackoverflow.com/questions/40325480/angular2-ngmodel-ngvalue-select-option-object-equality-across-different-instan" rel="nofollow">this stack overflow post</a> describing the same problem, but not providing any solution.</p> | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.