text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<p dir="auto"><strong>Migrated issue, originally created by Bertrand Croq (<a href="https://github.com/bcroq">@bcroq</a>)</strong></p>
<p dir="auto">Upgrading from SQLAlchemy 1.0.9 to 1.0.10 breaks the following code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import create_engine
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, sessionmaker
Base = declarative_base()
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
class UserRole(Base):
__tablename__ = 'user_roles'
id = Column(Integer, primary_key=True)
row_type = Column(String, nullable=False)
__mapper_args__ = {'polymorphic_on': row_type}
user_id = Column(Integer, ForeignKey('users.id'), nullable=False)
user = relationship('User', lazy=False)
class Admin(UserRole):
__tablename__ = 'admins'
__mapper_args__ = {'polymorphic_identity': 'admin'}
id = Column(Integer, ForeignKey('user_roles.id'), primary_key=True)
class Thing(Base):
__tablename__ = 'things'
id = Column(Integer, primary_key=True)
admin_id = Column(Integer, ForeignKey('admins.id'))
admin = relationship('Admin', lazy=False)
engine = create_engine('sqlite:///:memory:', echo=True)
Session = sessionmaker(bind=engine)
Base.metadata.create_all(engine)
session = Session()
print session.query(Thing).all()"><pre class="notranslate"><code class="notranslate">from sqlalchemy import create_engine
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, sessionmaker
Base = declarative_base()
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
class UserRole(Base):
__tablename__ = 'user_roles'
id = Column(Integer, primary_key=True)
row_type = Column(String, nullable=False)
__mapper_args__ = {'polymorphic_on': row_type}
user_id = Column(Integer, ForeignKey('users.id'), nullable=False)
user = relationship('User', lazy=False)
class Admin(UserRole):
__tablename__ = 'admins'
__mapper_args__ = {'polymorphic_identity': 'admin'}
id = Column(Integer, ForeignKey('user_roles.id'), primary_key=True)
class Thing(Base):
__tablename__ = 'things'
id = Column(Integer, primary_key=True)
admin_id = Column(Integer, ForeignKey('admins.id'))
admin = relationship('Admin', lazy=False)
engine = create_engine('sqlite:///:memory:', echo=True)
Session = sessionmaker(bind=engine)
Base.metadata.create_all(engine)
session = Session()
print session.query(Thing).all()
</code></pre></div> | <p dir="auto"><strong>Migrated issue, originally created by Bastien Chatelard (<a href="https://github.com/bchatelard">@bchatelard</a>)</strong></p>
<p dir="auto">I am facing a regression on joinedload on polymorphic entity in 1.0.10.</p>
<p dir="auto">I have reproduced a minimal test case that works fine in 1.0.9 and does not in 1.0.10:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sqlalchemy as sa
import sqlalchemy.orm
from sqlalchemy.orm import joinedload
import sqlalchemy.ext.declarative
import sqlalchemy.ext.orderinglist
Base = sqlalchemy.ext.declarative.declarative_base()
class Person(Base):
__tablename__ = 'person'
id = sa.Column(sa.Integer, nullable=False, primary_key=True)
person_type = sa.Column(sa.String(20), nullable=False)
__mapper_args__ = {
'polymorphic_on': person_type,
'with_polymorphic': '*',
}
class User(Person):
__mapper_args__ = {'polymorphic_identity': 'user'}
class Admin(Person):
__mapper_args__ = {'polymorphic_identity': 'admin'}
class Action(Base):
__tablename__ = 'action'
id = sa.Column(sa.Integer, nullable=False, primary_key=True)
author_id = sa.Column(sa.Integer, sa.ForeignKey(User.id))
author = sa.orm.relationship('User')
post_type = sa.Column(sa.String(20), nullable=False)
__mapper_args__ = {
'polymorphic_on': post_type,
'polymorphic_identity': 'post',
'with_polymorphic': '*',
}
class Like(Action):
__tablename__ = 'like'
__mapper_args__ = {'polymorphic_identity': 'like'}
id = sa.Column(sa.Integer, sa.ForeignKey('action.id'), primary_key=True)
class Comment(Action):
__tablename__ = 'comment'
__mapper_args__ = {'polymorphic_identity': 'comment'}
id = sa.Column(sa.Integer, sa.ForeignKey('action.id'), primary_key=True)
article_id = sa.Column(sa.Integer, sa.ForeignKey('article.id'))
article = sa.orm.relationship('Article', primaryjoin='Article.id==Comment.article_id', backref='comments')
class Article(Base):
__tablename__ = 'article'
id = sa.Column(sa.Integer, nullable=False, primary_key=True)
engine = sa.create_engine('sqlite:///:memory:', echo=True)
Base.metadata.drop_all(engine)
Base.metadata.create_all(engine)
Session = sa.orm.sessionmaker(bind=engine)
session = Session()
user1 = User(id=1)
admin1 = Admin(id=2)
user2 = User(id=3)
article1 = Article(id=1)
comment1 = Comment(id=2, author=user1, article_id=1)
comment2 = Comment(id=3, author=user2, article_id=1)
session.add_all([user1, user2, admin1, article1, comment1, comment2])
session.commit()
session.expunge_all()
# Works with 1.0.9
# Not working with 1.0.10: raise AssertionError
try:
new_n1 = session.query(Article).options(
joinedload(Article.comments).joinedload(Action.author),
).all()
print new_n1
print new_n1[0].comments
print new_n1[0].comments[0].author
except AssertionError as e:
print e
# Works with 1.0.9
# Not working with 1.0.10: 2 queries
try:
new_n1 = session.query(Article).options(
joinedload('comments'),
joinedload('comments.author')
).all()
print new_n1
print new_n1[0].comments
print new_n1[0].comments[0].author
except AssertionError as e:
print e
# Works with 1.0.9
# Not working with 1.0.10: raise AssertionError
try:
new_n1 = session.query(Article).options(
joinedload('comments').joinedload('author')
).all()
print new_n1
print new_n1[0].comments
print new_n1[0].comments[0].author
except AssertionError as e:
print e
# Works with 1.0.9
# Not working with 1.0.10: raise AssertionError
try:
new_n1 = session.query(Article).options(
joinedload('comments').load_only('id', 'author_id').joinedload('author').load_only('id')
).all()
print new_n1
print new_n1[0].comments
print new_n1[0].comments[0].author
except AssertionError as e:
print e"><pre class="notranslate"><code class="notranslate">import sqlalchemy as sa
import sqlalchemy.orm
from sqlalchemy.orm import joinedload
import sqlalchemy.ext.declarative
import sqlalchemy.ext.orderinglist
Base = sqlalchemy.ext.declarative.declarative_base()
class Person(Base):
__tablename__ = 'person'
id = sa.Column(sa.Integer, nullable=False, primary_key=True)
person_type = sa.Column(sa.String(20), nullable=False)
__mapper_args__ = {
'polymorphic_on': person_type,
'with_polymorphic': '*',
}
class User(Person):
__mapper_args__ = {'polymorphic_identity': 'user'}
class Admin(Person):
__mapper_args__ = {'polymorphic_identity': 'admin'}
class Action(Base):
__tablename__ = 'action'
id = sa.Column(sa.Integer, nullable=False, primary_key=True)
author_id = sa.Column(sa.Integer, sa.ForeignKey(User.id))
author = sa.orm.relationship('User')
post_type = sa.Column(sa.String(20), nullable=False)
__mapper_args__ = {
'polymorphic_on': post_type,
'polymorphic_identity': 'post',
'with_polymorphic': '*',
}
class Like(Action):
__tablename__ = 'like'
__mapper_args__ = {'polymorphic_identity': 'like'}
id = sa.Column(sa.Integer, sa.ForeignKey('action.id'), primary_key=True)
class Comment(Action):
__tablename__ = 'comment'
__mapper_args__ = {'polymorphic_identity': 'comment'}
id = sa.Column(sa.Integer, sa.ForeignKey('action.id'), primary_key=True)
article_id = sa.Column(sa.Integer, sa.ForeignKey('article.id'))
article = sa.orm.relationship('Article', primaryjoin='Article.id==Comment.article_id', backref='comments')
class Article(Base):
__tablename__ = 'article'
id = sa.Column(sa.Integer, nullable=False, primary_key=True)
engine = sa.create_engine('sqlite:///:memory:', echo=True)
Base.metadata.drop_all(engine)
Base.metadata.create_all(engine)
Session = sa.orm.sessionmaker(bind=engine)
session = Session()
user1 = User(id=1)
admin1 = Admin(id=2)
user2 = User(id=3)
article1 = Article(id=1)
comment1 = Comment(id=2, author=user1, article_id=1)
comment2 = Comment(id=3, author=user2, article_id=1)
session.add_all([user1, user2, admin1, article1, comment1, comment2])
session.commit()
session.expunge_all()
# Works with 1.0.9
# Not working with 1.0.10: raise AssertionError
try:
new_n1 = session.query(Article).options(
joinedload(Article.comments).joinedload(Action.author),
).all()
print new_n1
print new_n1[0].comments
print new_n1[0].comments[0].author
except AssertionError as e:
print e
# Works with 1.0.9
# Not working with 1.0.10: 2 queries
try:
new_n1 = session.query(Article).options(
joinedload('comments'),
joinedload('comments.author')
).all()
print new_n1
print new_n1[0].comments
print new_n1[0].comments[0].author
except AssertionError as e:
print e
# Works with 1.0.9
# Not working with 1.0.10: raise AssertionError
try:
new_n1 = session.query(Article).options(
joinedload('comments').joinedload('author')
).all()
print new_n1
print new_n1[0].comments
print new_n1[0].comments[0].author
except AssertionError as e:
print e
# Works with 1.0.9
# Not working with 1.0.10: raise AssertionError
try:
new_n1 = session.query(Article).options(
joinedload('comments').load_only('id', 'author_id').joinedload('author').load_only('id')
).all()
print new_n1
print new_n1[0].comments
print new_n1[0].comments[0].author
except AssertionError as e:
print e
</code></pre></div>
<p dir="auto">It might be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384627684" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/2714" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/2714/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/2714">#2714</a> or <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384635497" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/3593" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/3593/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/3593">#3593</a></p> | 1 |
<p dir="auto">I have a consistent segfault in <code class="notranslate">Nettle.jl</code> on <code class="notranslate">master</code>. This happens on all three platforms.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="in expression starting at /Users/travis/.julia/v0.7/Nettle/test/hash_tests.jl:4
jl_typemap_level_assoc_exact at /Users/osx/buildbot/slave/package_osx64/build/src/typemap.c:813
jl_typemap_assoc_exact at /Users/osx/buildbot/slave/package_osx64/build/src/./julia_internal.h:876 [inlined]
jl_lookup_generic_ at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:2112
jl_apply_generic at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:2164
Type at /Users/travis/.julia/v0.7/Nettle/src/hash.jl:23
digest at /Users/travis/.julia/v0.7/Nettle/src/hash.jl:44
jl_fptr_trampoline at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:1838
top-level scope at ./<missing>:40
jl_fptr_trampoline at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:1838
jl_toplevel_eval_flex at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:811
jl_parse_eval_all at /Users/osx/buildbot/slave/package_osx64/build/src/ast.c:847
jl_load at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:854 [inlined]
jl_load_ at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:861
include at ./boot.jl:306 [inlined]
include_relative at ./loading.jl:1067
include at ./sysimg.jl:29
include at ./sysimg.jl:68
jl_fptr_trampoline at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:1838
do_call at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:324
eval_body at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:661
jl_interpret_toplevel_thunk_callback at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:759
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x11578354f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:768
jl_toplevel_eval_flex at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:816
jl_parse_eval_all at /Users/osx/buildbot/slave/package_osx64/build/src/ast.c:847
jl_load at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:854 [inlined]
jl_load_ at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:861
include at ./boot.jl:306 [inlined]
include_relative at ./loading.jl:1067
include at ./sysimg.jl:29
exec_options at ./client.jl:327
_start at ./client.jl:455
true_main at /Users/travis/julia/bin/julia (unknown line)"><pre class="notranslate"><code class="notranslate">in expression starting at /Users/travis/.julia/v0.7/Nettle/test/hash_tests.jl:4
jl_typemap_level_assoc_exact at /Users/osx/buildbot/slave/package_osx64/build/src/typemap.c:813
jl_typemap_assoc_exact at /Users/osx/buildbot/slave/package_osx64/build/src/./julia_internal.h:876 [inlined]
jl_lookup_generic_ at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:2112
jl_apply_generic at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:2164
Type at /Users/travis/.julia/v0.7/Nettle/src/hash.jl:23
digest at /Users/travis/.julia/v0.7/Nettle/src/hash.jl:44
jl_fptr_trampoline at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:1838
top-level scope at ./<missing>:40
jl_fptr_trampoline at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:1838
jl_toplevel_eval_flex at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:811
jl_parse_eval_all at /Users/osx/buildbot/slave/package_osx64/build/src/ast.c:847
jl_load at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:854 [inlined]
jl_load_ at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:861
include at ./boot.jl:306 [inlined]
include_relative at ./loading.jl:1067
include at ./sysimg.jl:29
include at ./sysimg.jl:68
jl_fptr_trampoline at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:1838
do_call at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:324
eval_body at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:661
jl_interpret_toplevel_thunk_callback at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:759
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x11578354f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:768
jl_toplevel_eval_flex at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:816
jl_parse_eval_all at /Users/osx/buildbot/slave/package_osx64/build/src/ast.c:847
jl_load at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:854 [inlined]
jl_load_ at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:861
include at ./boot.jl:306 [inlined]
include_relative at ./loading.jl:1067
include at ./sysimg.jl:29
exec_options at ./client.jl:327
_start at ./client.jl:455
true_main at /Users/travis/julia/bin/julia (unknown line)
</code></pre></div>
<p dir="auto">The lowest "user code" stack frame seems to be <a href="https://github.com/staticfloat/Nettle.jl/blob/d4bac3dde14eaf05f0223f4c9c36e8a29035cad2/src/hash.jl#L23"><code class="notranslate">hash.jl:23</code></a>, which is:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ccall(hash_type.init, Void, (Ptr{Void},), state)"><pre class="notranslate"><span class="pl-c1">ccall</span>(hash_type<span class="pl-k">.</span>init, Void, (Ptr{Void},), state)</pre></div> | <p dir="auto">In the following example I get a segfault at the <code class="notranslate">ccall</code>, but only if this line is inside the <code class="notranslate">Container</code> constructor. If this call is done in an own function there is no segfault.</p>
<p dir="auto">[I used <code class="notranslate">malloc</code> in <code class="notranslate">libc</code> only as an example. This segfault happens for other C-functions, too.]</p>
<p dir="auto">Minimal example:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="lib = Libdl.dlopen("libc")
mutable struct Container
ptr :: Ptr{Cvoid}
method_ptr :: Ptr{Cvoid}
end
function call_with_func(container::Container)
container.ptr = ccall(container.method_ptr, Ptr{Cvoid}, (Csize_t,), 1024 )
return nothing
end
function Container()
container = Container(C_NULL, Libdl.dlsym(lib, :malloc))
# this works
# call_with_func(container)
# but the same code here (without own function) produces a segfault
container.ptr = ccall(container.method_ptr, Ptr{Cvoid}, (Csize_t,), 1024 )
return container
end
c = Container()
println("got pointer: ", c.ptr)"><pre class="notranslate">lib <span class="pl-k">=</span> Libdl<span class="pl-k">.</span><span class="pl-c1">dlopen</span>(<span class="pl-s"><span class="pl-pds">"</span>libc<span class="pl-pds">"</span></span>)
<span class="pl-k">mutable struct</span> Container
ptr <span class="pl-k">::</span> <span class="pl-c1">Ptr{Cvoid}</span>
method_ptr <span class="pl-k">::</span> <span class="pl-c1">Ptr{Cvoid}</span>
<span class="pl-k">end</span>
<span class="pl-k">function</span> <span class="pl-en">call_with_func</span>(container<span class="pl-k">::</span><span class="pl-c1">Container</span>)
container<span class="pl-k">.</span>ptr <span class="pl-k">=</span> <span class="pl-c1">ccall</span>(container<span class="pl-k">.</span>method_ptr, Ptr{Cvoid}, (Csize_t,), <span class="pl-c1">1024</span> )
<span class="pl-k">return</span> <span class="pl-c1">nothing</span>
<span class="pl-k">end</span>
<span class="pl-k">function</span> <span class="pl-en">Container</span>()
container <span class="pl-k">=</span> <span class="pl-c1">Container</span>(<span class="pl-c1">C_NULL</span>, Libdl<span class="pl-k">.</span><span class="pl-c1">dlsym</span>(lib, <span class="pl-c1">:malloc</span>))
<span class="pl-c"><span class="pl-c">#</span> this works</span>
<span class="pl-c"><span class="pl-c">#</span> call_with_func(container) </span>
<span class="pl-c"><span class="pl-c">#</span> but the same code here (without own function) produces a segfault</span>
container<span class="pl-k">.</span>ptr <span class="pl-k">=</span> <span class="pl-c1">ccall</span>(container<span class="pl-k">.</span>method_ptr, Ptr{Cvoid}, (Csize_t,), <span class="pl-c1">1024</span> )
<span class="pl-k">return</span> container
<span class="pl-k">end</span>
c <span class="pl-k">=</span> <span class="pl-c1">Container</span>()
<span class="pl-c1">println</span>(<span class="pl-s"><span class="pl-pds">"</span>got pointer: <span class="pl-pds">"</span></span>, c<span class="pl-k">.</span>ptr)</pre></div>
<p dir="auto">Julia-Version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 0.7.0-DEV.3183
Commit 4b74a74 (2017-12-25 07:17 UTC)
Platform Info:
OS: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)"><pre class="notranslate"><code class="notranslate">Julia Version 0.7.0-DEV.3183
Commit 4b74a74 (2017-12-25 07:17 UTC)
Platform Info:
OS: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
</code></pre></div>
<p dir="auto">Segfault information:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="signal (11): Segmentation fault
in expression starting at /TEST/Desktop/mytest.jl:22
jl_typemap_level_assoc_exact at /TEST/julia/julia_trunk/src/typemap.c:810
jl_typemap_assoc_exact at /TEST/julia/julia_trunk/src/julia_internal.h:940 [inlined]
jl_lookup_generic_ at /TEST/julia/julia_trunk/src/gf.c:2026 [inlined]
jl_apply_generic at /TEST/julia/julia_trunk/src/gf.c:2078
Type at /TEST/Desktop/mytest.jl:18
jl_call_fptr_internal at /TEST/julia/julia_trunk/src/julia_internal.h:380 [inlined]
jl_call_method_internal at /TEST/julia/julia_trunk/src/julia_internal.h:399 [inlined]
jl_apply_generic at /TEST/julia/julia_trunk/src/gf.c:2081
do_call at /TEST/julia/julia_trunk/src/interpreter.c:323
eval_value at /TEST/julia/julia_trunk/src/interpreter.c:395
eval_body at /TEST/julia/julia_trunk/src/interpreter.c:509
jl_interpret_toplevel_thunk_callback at /TEST/julia/julia_trunk/src/interpreter.c:720
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f9d6502ff8f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /TEST/julia/julia_trunk/src/interpreter.c:729
jl_toplevel_eval_flex at /TEST/julia/julia_trunk/src/toplevel.c:721
jl_parse_eval_all at /TEST/julia/julia_trunk/src/ast.c:803
jl_load at /TEST/julia/julia_trunk/src/toplevel.c:759
include at ./boot.jl:295 [inlined]
include_relative at ./loading.jl:503
jl_call_fptr_internal at /TEST/julia/julia_trunk/src/julia_internal.h:380 [inlined]
jl_call_method_internal at /TEST/julia/julia_trunk/src/julia_internal.h:399 [inlined]
jl_apply_generic at /TEST/julia/julia_trunk/src/gf.c:2081
include at ./sysimg.jl:26
jl_call_fptr_internal at /TEST/julia/julia_trunk/src/julia_internal.h:380 [inlined]
jl_call_method_internal at /TEST/julia/julia_trunk/src/julia_internal.h:399 [inlined]
jl_apply_generic at /TEST/julia/julia_trunk/src/gf.c:2081
process_options at ./client.jl:330
_start at ./client.jl:381
jl_call_fptr_internal at /TEST/julia/julia_trunk/src/julia_internal.h:380 [inlined]
jl_call_method_internal at /TEST/julia/julia_trunk/src/julia_internal.h:399 [inlined]
jl_apply_generic at /TEST/julia/julia_trunk/src/gf.c:2081
jl_apply at /TEST/julia/julia_trunk/ui/../src/julia.h:1474 [inlined]
true_main at /TEST/julia/julia_trunk/ui/repl.c:107
main at /TEST/julia/julia_trunk/ui/repl.c:237
__libc_start_main at /lib64/libc.so.6 (unknown line)
_start at ./julia (unknown line)
Allocations: 289698 (Pool: 289541; Big: 157); GC: 0"><pre class="notranslate"><code class="notranslate">signal (11): Segmentation fault
in expression starting at /TEST/Desktop/mytest.jl:22
jl_typemap_level_assoc_exact at /TEST/julia/julia_trunk/src/typemap.c:810
jl_typemap_assoc_exact at /TEST/julia/julia_trunk/src/julia_internal.h:940 [inlined]
jl_lookup_generic_ at /TEST/julia/julia_trunk/src/gf.c:2026 [inlined]
jl_apply_generic at /TEST/julia/julia_trunk/src/gf.c:2078
Type at /TEST/Desktop/mytest.jl:18
jl_call_fptr_internal at /TEST/julia/julia_trunk/src/julia_internal.h:380 [inlined]
jl_call_method_internal at /TEST/julia/julia_trunk/src/julia_internal.h:399 [inlined]
jl_apply_generic at /TEST/julia/julia_trunk/src/gf.c:2081
do_call at /TEST/julia/julia_trunk/src/interpreter.c:323
eval_value at /TEST/julia/julia_trunk/src/interpreter.c:395
eval_body at /TEST/julia/julia_trunk/src/interpreter.c:509
jl_interpret_toplevel_thunk_callback at /TEST/julia/julia_trunk/src/interpreter.c:720
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f9d6502ff8f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /TEST/julia/julia_trunk/src/interpreter.c:729
jl_toplevel_eval_flex at /TEST/julia/julia_trunk/src/toplevel.c:721
jl_parse_eval_all at /TEST/julia/julia_trunk/src/ast.c:803
jl_load at /TEST/julia/julia_trunk/src/toplevel.c:759
include at ./boot.jl:295 [inlined]
include_relative at ./loading.jl:503
jl_call_fptr_internal at /TEST/julia/julia_trunk/src/julia_internal.h:380 [inlined]
jl_call_method_internal at /TEST/julia/julia_trunk/src/julia_internal.h:399 [inlined]
jl_apply_generic at /TEST/julia/julia_trunk/src/gf.c:2081
include at ./sysimg.jl:26
jl_call_fptr_internal at /TEST/julia/julia_trunk/src/julia_internal.h:380 [inlined]
jl_call_method_internal at /TEST/julia/julia_trunk/src/julia_internal.h:399 [inlined]
jl_apply_generic at /TEST/julia/julia_trunk/src/gf.c:2081
process_options at ./client.jl:330
_start at ./client.jl:381
jl_call_fptr_internal at /TEST/julia/julia_trunk/src/julia_internal.h:380 [inlined]
jl_call_method_internal at /TEST/julia/julia_trunk/src/julia_internal.h:399 [inlined]
jl_apply_generic at /TEST/julia/julia_trunk/src/gf.c:2081
jl_apply at /TEST/julia/julia_trunk/ui/../src/julia.h:1474 [inlined]
true_main at /TEST/julia/julia_trunk/ui/repl.c:107
main at /TEST/julia/julia_trunk/ui/repl.c:237
__libc_start_main at /lib64/libc.so.6 (unknown line)
_start at ./julia (unknown line)
Allocations: 289698 (Pool: 289541; Big: 157); GC: 0
</code></pre></div> | 1 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible --version
1.4.4
$ ansible-playbook ec2_security.yml -i hosts
PLAY [127.0.0.1] **************************************************************
GATHERING FACTS ***************************************************************
ok: [127.0.0.1]
TASK: [Create EC2 web group] **************************************************
failed: [127.0.0.1] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
File "/Users/user/.ansible/tmp/ansible-1390492978.4-106406911676238/ec2_group", line 1313, in <module>
main()
File "/Users/user/.ansible/tmp/ansible-1390492978.4-106406911676238/ec2_group", line 192, in main
group = ec2.create_security_group(name, description, vpc_id=vpc_id)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/ec2/connection.py", line 2948, in create_security_group
SecurityGroup, verb='POST')
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/connection.py", line 1151, in get_object
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidGroup.Duplicate</Code><Message>The security group 'web' already exists for VPC 'vpc-[REDACTED]'</Message></Error></Errors><RequestID>[REDACTED]</RequestID></Response>
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/user/ec2_security.retry
127.0.0.1 : ok=1 changed=0 unreachable=0 failed=1"><pre class="notranslate"><code class="notranslate">$ ansible --version
1.4.4
$ ansible-playbook ec2_security.yml -i hosts
PLAY [127.0.0.1] **************************************************************
GATHERING FACTS ***************************************************************
ok: [127.0.0.1]
TASK: [Create EC2 web group] **************************************************
failed: [127.0.0.1] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
File "/Users/user/.ansible/tmp/ansible-1390492978.4-106406911676238/ec2_group", line 1313, in <module>
main()
File "/Users/user/.ansible/tmp/ansible-1390492978.4-106406911676238/ec2_group", line 192, in main
group = ec2.create_security_group(name, description, vpc_id=vpc_id)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/ec2/connection.py", line 2948, in create_security_group
SecurityGroup, verb='POST')
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/connection.py", line 1151, in get_object
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidGroup.Duplicate</Code><Message>The security group 'web' already exists for VPC 'vpc-[REDACTED]'</Message></Error></Errors><RequestID>[REDACTED]</RequestID></Response>
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/user/ec2_security.retry
127.0.0.1 : ok=1 changed=0 unreachable=0 failed=1
</code></pre></div>
<p dir="auto">Hosts file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[localhost]
127.0.0.1 ansible_python_interpreter=/usr/local/bin/python"><pre class="notranslate"><code class="notranslate">[localhost]
127.0.0.1 ansible_python_interpreter=/usr/local/bin/python
</code></pre></div>
<p dir="auto">ec2_security.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- hosts: 127.0.0.1
connection: local
tasks:
- name: Create EC2 web group
local_action:
module: ec2_group
name: web
description: HTTP and SSH ports
region: eu-west-1
rules:
- proto: tcp
from_port: 80
to_port: 80
cidr_ip: 0.0.0.0/0
- proto: tcp
from_port: 22
to_port: 22
cidr_ip: 0.0.0.0/0"><pre class="notranslate"><code class="notranslate">- hosts: 127.0.0.1
connection: local
tasks:
- name: Create EC2 web group
local_action:
module: ec2_group
name: web
description: HTTP and SSH ports
region: eu-west-1
rules:
- proto: tcp
from_port: 80
to_port: 80
cidr_ip: 0.0.0.0/0
- proto: tcp
from_port: 22
to_port: 22
cidr_ip: 0.0.0.0/0
</code></pre></div> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ssh</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible --version
ansible 2.4.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/jenkins/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]"><pre class="notranslate"><code class="notranslate">ansible --version
ansible 2.4.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/jenkins/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
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>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ALLOW_WORLD_READABLE_TMPFILES(/etc/ansible/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/etc/ansible/ansible.cfg) = -C -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes
ANSIBLE_SSH_CONTROL_PATH(/etc/ansible/ansible.cfg) = %(directory)s/%%h-%%r
ANSIBLE_SSH_PIPELINING(/etc/ansible/ansible.cfg) = True
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 50
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 30"><pre class="notranslate"><code class="notranslate">ALLOW_WORLD_READABLE_TMPFILES(/etc/ansible/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/etc/ansible/ansible.cfg) = -C -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes
ANSIBLE_SSH_CONTROL_PATH(/etc/ansible/ansible.cfg) = %(directory)s/%%h-%%r
ANSIBLE_SSH_PIPELINING(/etc/ansible/ansible.cfg) = True
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 50
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 30
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Ubuntu 16.04 -> Ubuntu 16.04</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">I used to use <code class="notranslate">ansible $target -m setup --ssh-common-args="-O exit" </code> to terminate a ControlPersist connection. This stops working in ansible 2.4</p>
<p dir="auto">I'm doing this so I can switch ssh agents in a deployment script.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">This has very different behaviour between 2.3 & 2.4:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ssh-agent bash -c "ssh-add ~/.ssh/id_ed25519 && ansible myhost -m shell -a 'ssh-add -l'"
ansible myhost -m setup --ssh-common-args="-O exit"
ssh-agent bash -c "ssh-add ~/.ssh/id_rsa && ansible myhost -m shell -a 'ssh-add -l'""><pre class="notranslate"><code class="notranslate">ssh-agent bash -c "ssh-add ~/.ssh/id_ed25519 && ansible myhost -m shell -a 'ssh-add -l'"
ansible myhost -m setup --ssh-common-args="-O exit"
ssh-agent bash -c "ssh-add ~/.ssh/id_rsa && ansible myhost -m shell -a 'ssh-add -l'"
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">In 2.3, the second command fails with UNREACHABLE, which is expected because we asked it to close the connection. The first line and the third line report signatures of different keys.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">In ansible 2.4, the second command succeeds, surprisingly, and then the third command fails with "error fetching identities" because the <code class="notranslate">ssh-add -l</code> is trying to connect to the ssh-agent in the first line, which has exited.</p> | 0 |
<p dir="auto">Hello,</p>
<p dir="auto">I'm trying to run the CNTK tutorial notebook: CNTK_101_LogisticRegression.<br>
I cannot import matplotlib.pyplot</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="(base) C:\CNTK-Samples-2-3-1\Tutorials>python
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 32, in <module>
import matplotlib.colorbar
File "C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\colorbar.py", line 36, in <module>
import matplotlib.contour as contour
File "C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\contour.py", line 21, in <module>
import matplotlib.font_manager as font_manager
File "C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 58, in <module>
from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
ImportError: DLL load failed: The specified procedure could not be found.
>>> quit()
(base) C:\CNTK-Samples-2-3-1\Tutorials>conda install matplotlib
Solving environment: done
# All requested packages already installed.
(base) C:\CNTK-Samples-2-3-1\Tutorials>python
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 32, in <module>
import matplotlib.colorbar
File "C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\colorbar.py", line 36, in <module>
import matplotlib.contour as contour
File "C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\contour.py", line 21, in <module>
import matplotlib.font_manager as font_manager
File "C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 58, in <module>
from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
ImportError: DLL load failed: The specified procedure could not be found.
>>> import matplotlib
>>> matplotlib.__file__
'C:\\Users\\Charles\\Anaconda3\\lib\\site-packages\\matplotlib\\__init__.py'
>>> print(matplotlib.__version__)
2.1.1
"><pre class="notranslate">(<span class="pl-s1">base</span>) <span class="pl-v">C</span>:\C<span class="pl-v">NTK</span><span class="pl-c1">-</span><span class="pl-v">Samples</span><span class="pl-c1">-</span><span class="pl-c1">2</span><span class="pl-c1">-</span><span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-c1">1</span>\T<span class="pl-s1">utorials</span><span class="pl-c1">></span><span class="pl-s1">python</span>
<span class="pl-v">Python</span> <span class="pl-c1">3.6</span><span class="pl-c1">.3</span> <span class="pl-c1">|</span><span class="pl-v">Anaconda</span> <span class="pl-s1">custom</span> (<span class="pl-c1">64</span><span class="pl-c1">-</span><span class="pl-s1">bit</span>)<span class="pl-c1">|</span> (<span class="pl-s1">default</span>, <span class="pl-v">Oct</span> <span class="pl-c1">15</span> <span class="pl-c1">2017</span>, <span class="pl-c1">03</span>:<span class="pl-c1">27</span>:<span class="pl-c1">45</span>) [<span class="pl-v">MSC</span> <span class="pl-s1">v</span><span class="pl-c1">.1900</span> <span class="pl-c1">64</span> <span class="pl-en">bit</span> (<span class="pl-v">AMD64</span>)] <span class="pl-s1">on</span> <span class="pl-s1">win32</span>
<span class="pl-v">Type</span> <span class="pl-s">"help"</span>, <span class="pl-s">"copyright"</span>, <span class="pl-s">"credits"</span> <span class="pl-c1">or</span> <span class="pl-s">"license"</span> <span class="pl-k">for</span> <span class="pl-s1">more</span> <span class="pl-s1">information</span>.
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>):
<span class="pl-v">File</span> <span class="pl-s">"<stdin>"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</span>, <span class="pl-c1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\pyplot.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">32</span>, <span class="pl-c1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">colorbar</span>
<span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\colorbar.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">36</span>, <span class="pl-c1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">contour</span> <span class="pl-k">as</span> <span class="pl-s1">contour</span>
<span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\contour.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">21</span>, <span class="pl-c1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">font_manager</span> <span class="pl-k">as</span> <span class="pl-s1">font_manager</span>
<span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib<span class="pl-cce">\f</span>ont_manager.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">58</span>, <span class="pl-c1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-s1">import</span> <span class="pl-s1">afm</span>, <span class="pl-s1">cbook</span>, <span class="pl-s1">ft2font</span>, <span class="pl-s1">rcParams</span>, <span class="pl-s1">get_cachedir</span>
<span class="pl-v">ImportError</span>: <span class="pl-v">DLL</span> <span class="pl-s1">load</span> <span class="pl-s1">failed</span>: <span class="pl-v">The</span> <span class="pl-s1">specified</span> <span class="pl-s1">procedure</span> <span class="pl-s1">could</span> <span class="pl-c1">not</span> <span class="pl-s1">be</span> <span class="pl-s1">found</span>.
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-en">quit</span>()
(<span class="pl-s1">base</span>) <span class="pl-v">C</span>:\C<span class="pl-v">NTK</span><span class="pl-c1">-</span><span class="pl-v">Samples</span><span class="pl-c1">-</span><span class="pl-c1">2</span><span class="pl-c1">-</span><span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-c1">1</span>\T<span class="pl-s1">utorials</span><span class="pl-c1">></span><span class="pl-s1">conda</span> <span class="pl-s1">install</span> <span class="pl-s1">matplotlib</span>
<span class="pl-v">Solving</span> <span class="pl-s1">environment</span>: <span class="pl-en">done</span>
<span class="pl-c"># All requested packages already installed.</span>
(<span class="pl-s1">base</span>) <span class="pl-v">C</span>:\C<span class="pl-v">NTK</span><span class="pl-c1">-</span><span class="pl-v">Samples</span><span class="pl-c1">-</span><span class="pl-c1">2</span><span class="pl-c1">-</span><span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-c1">1</span>\T<span class="pl-s1">utorials</span><span class="pl-c1">></span><span class="pl-s1">python</span>
<span class="pl-v">Python</span> <span class="pl-c1">3.6</span>.<span class="pl-c1">3</span> <span class="pl-c1">|</span><span class="pl-v">Anaconda</span> <span class="pl-s1">custom</span> (<span class="pl-c1">64</span><span class="pl-c1">-</span><span class="pl-s1">bit</span>)<span class="pl-c1">|</span> (<span class="pl-s1">default</span>, <span class="pl-v">Oct</span> <span class="pl-c1">15</span> <span class="pl-c1">2017</span>, <span class="pl-c1">03</span>:<span class="pl-c1">27</span>:<span class="pl-c1">45</span>) [<span class="pl-v">MSC</span> <span class="pl-s1">v</span><span class="pl-c1">.1900</span> <span class="pl-c1">64</span> <span class="pl-en">bit</span> (<span class="pl-v">AMD64</span>)] <span class="pl-s1">on</span> <span class="pl-s1">win32</span>
<span class="pl-v">Type</span> <span class="pl-s">"help"</span>, <span class="pl-s">"copyright"</span>, <span class="pl-s">"credits"</span> <span class="pl-c1">or</span> <span class="pl-s">"license"</span> <span class="pl-k">for</span> <span class="pl-s1">more</span> <span class="pl-s1">information</span>.
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>):
<span class="pl-v">File</span> <span class="pl-s">"<stdin>"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</span>, <span class="pl-c1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\pyplot.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">32</span>, <span class="pl-c1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">colorbar</span>
<span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\colorbar.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">36</span>, <span class="pl-c1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">contour</span> <span class="pl-k">as</span> <span class="pl-s1">contour</span>
<span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\contour.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">21</span>, <span class="pl-c1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">font_manager</span> <span class="pl-k">as</span> <span class="pl-s1">font_manager</span>
<span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib<span class="pl-cce">\f</span>ont_manager.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">58</span>, <span class="pl-c1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-s1">import</span> <span class="pl-s1">afm</span>, <span class="pl-s1">cbook</span>, <span class="pl-s1">ft2font</span>, <span class="pl-s1">rcParams</span>, <span class="pl-s1">get_cachedir</span>
<span class="pl-v">ImportError</span>: <span class="pl-v">DLL</span> <span class="pl-s1">load</span> <span class="pl-s1">failed</span>: <span class="pl-v">The</span> <span class="pl-s1">specified</span> <span class="pl-s1">procedure</span> <span class="pl-s1">could</span> <span class="pl-c1">not</span> <span class="pl-s1">be</span> <span class="pl-s1">found</span>.
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">__file__</span>
'<span class="pl-v">C</span>:\\<span class="pl-v">Users</span>\\<span class="pl-v">Charles</span>\\<span class="pl-v">Anaconda3</span>\\<span class="pl-s1">lib</span>\\<span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\\<span class="pl-s1">matplotlib</span>\\<span class="pl-s1">__init__</span>.<span class="pl-s1">py</span>'
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-en">print</span>(<span class="pl-s1">matplotlib</span>.<span class="pl-s1">__version__</span>)
<span class="pl-c1">2.1</span><span class="pl-c1">.1</span></pre></div>
<p dir="auto">Any help will be greatly appreciated.</p>
<p dir="auto">Charles</p> | <h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Can't import matplotlib.pyplot</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span></pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# If applicable, paste the console output here
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-f09a4c6b4388> in <module>()
1 import numpy as np
----> 2 import matplotlib.pyplot as plt
3 import scipy.ndimage.imread as imread
4
5 path = 'C:/data/cifar_10/train/15.png'
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\pyplot.py in <module>()
30 from cycler import cycler
31 import matplotlib
---> 32 import matplotlib.colorbar
33 from matplotlib import style
34 from matplotlib import _pylab_helpers, interactive
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\colorbar.py in <module>()
34 import matplotlib.collections as collections
35 import matplotlib.colors as colors
---> 36 import matplotlib.contour as contour
37 import matplotlib.cm as cm
38 import matplotlib.gridspec as gridspec
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\contour.py in <module>()
19 import matplotlib.colors as colors
20 import matplotlib.collections as mcoll
---> 21 import matplotlib.font_manager as font_manager
22 import matplotlib.text as text
23 import matplotlib.cbook as cbook
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\font_manager.py in <module>()
56
57 import matplotlib
---> 58 from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
59 from matplotlib.compat import subprocess
60 from matplotlib.fontconfig_pattern import (
ImportError: DLL load failed: The specified procedure could not be found."><pre class="notranslate"><code class="notranslate"># If applicable, paste the console output here
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-f09a4c6b4388> in <module>()
1 import numpy as np
----> 2 import matplotlib.pyplot as plt
3 import scipy.ndimage.imread as imread
4
5 path = 'C:/data/cifar_10/train/15.png'
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\pyplot.py in <module>()
30 from cycler import cycler
31 import matplotlib
---> 32 import matplotlib.colorbar
33 from matplotlib import style
34 from matplotlib import _pylab_helpers, interactive
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\colorbar.py in <module>()
34 import matplotlib.collections as collections
35 import matplotlib.colors as colors
---> 36 import matplotlib.contour as contour
37 import matplotlib.cm as cm
38 import matplotlib.gridspec as gridspec
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\contour.py in <module>()
19 import matplotlib.colors as colors
20 import matplotlib.collections as mcoll
---> 21 import matplotlib.font_manager as font_manager
22 import matplotlib.text as text
23 import matplotlib.cbook as cbook
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\font_manager.py in <module>()
56
57 import matplotlib
---> 58 from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
59 from matplotlib.compat import subprocess
60 from matplotlib.fontconfig_pattern import (
ImportError: DLL load failed: The specified procedure could not be found.
</code></pre></div>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system:</li>
<li>Matplotlib version:</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>):</li>
<li>Python version:</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries:</li>
</ul>
<p dir="auto">Everything was installed via anaconda.</p> | 1 |
<p dir="auto">The following HTML is not working for this challenge:</p>
<style>
.smaller-image {
width: 100px;
}
.thick-green-border{
border-width: 10px;
border-color: green;
border-style: solid;
}
</style>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/f1ba009cb2b5e79d9cba610fbc92f8aead0c3e4f49d07d666f81d2557c1b1f16/68747470733a2f2f6269742e6c792f6663632d6b697474656e73"><img src="https://camo.githubusercontent.com/f1ba009cb2b5e79d9cba610fbc92f8aead0c3e4f49d07d666f81d2557c1b1f16/68747470733a2f2f6269742e6c792f6663632d6b697474656e73" data-canonical-src="https://bit.ly/fcc-kittens" style="max-width: 100%;"></a></p>
<p dir="auto">I'm not sure what I'm doing wrong?</p> | <p dir="auto">Is there information on the meaning for the various labels used for the issues. I have been searching and haven't found anything. Some of the labels are not clear (to me):</p>
<p dir="auto">Does <em>test iimprovement</em> mean that the person who submitted the issue should test the change or anyone can test it or...? Should members wait for a <em>help wanted</em> label before attempting a fix for an issue?</p>
<p dir="auto">Maybe something info about the labels could be added to the wiki?</p>
<p dir="auto">Thanks.</p> | 0 |
<p dir="auto">The windows binary julia cannot open!!!</p> | <p dir="auto">I got julia 0.3.0-64 from <a href="http://julialang.org/downloads/" rel="nofollow">http://julialang.org/downloads/</a></p>
<p dir="auto">When I open the julia shortcut it turns out a cmd shell and then to be turned off quickly.</p>
<p dir="auto">When I use the cmd</p>
<p dir="auto">D:\Program Files\Julia-0.3.0\bin>julia.exe<br>
System image file "D:\Program Files\Julia-0.3.0../lib/julia/sys.ji" not found</p>
<p dir="auto">D:\Program Files\Julia-0.3.0\bin></p> | 1 |
<h4 dir="auto">Issue Description</h4>
<p dir="auto">For the past couple of weeks I haven’t been able to access the site. While I can access the offline cloud flare version of the homepage I receive the message error “522 connection timed out” and “Host Error”; I haven’t been having a problem on other sites. The site works on my phone when it’s disconnected to the home wifi but for some reason the home wifi produces a “host error”. Does anyone know how I could fix this?</p>
<p dir="auto">This is my 2nd time submitting this problem.</p>
<h4 dir="auto">Browser Information</h4>
<p dir="auto">Mac (Safari, Chrome)<br>
Android(Chrome)</p>
<h4 dir="auto">Screenshot</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/14838949/16060432/aa36b55e-3255-11e6-87c2-3d9b44b03112.png"><img src="https://cloud.githubusercontent.com/assets/14838949/16060432/aa36b55e-3255-11e6-87c2-3d9b44b03112.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/14838949/16060463/d6a7e5ae-3255-11e6-9f69-575b2c91baee.png"><img src="https://cloud.githubusercontent.com/assets/14838949/16060463/d6a7e5ae-3255-11e6-9f69-575b2c91baee.png" alt="image" style="max-width: 100%;"></a></p> | <h4 dir="auto">Challenge Name</h4>
<h4 dir="auto">Issue Description</h4>
<h4 dir="auto">Browser Information</h4>
<ul dir="auto">
<li>Browser Name, Version:</li>
<li>Operating System:</li>
<li>Mobile, Desktop, or Tablet:</li>
</ul>
<h4 dir="auto">Your Code</h4>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// If relevant, paste all of your challenge code in here
"><pre class="notranslate"><span class="pl-c">// If relevant, paste all of your challenge code in here</span></pre></div>
<h4 dir="auto">Screenshot</h4> | 1 |
<h3 dir="auto">Problem description</h3>
<p dir="auto">After I have converted my ReactJS Application to server-side rendering, many of my material UI components have broken styles. The most notable example is the GridTile in the GridList. For example, I am loading some images, and the GridTile cellHeight property doesn't work as expected. It doesn't affect the Height of the GridTiles, as result the Image height is huge.</p>
<p dir="auto">Also, I am getting this warning almost on every component when I refreshing the page :</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12649980/29446863-37db9200-83f7-11e7-821e-7a19776b57ed.png"><img src="https://user-images.githubusercontent.com/12649980/29446863-37db9200-83f7-11e7-821e-7a19776b57ed.png" alt="screenshot_20170818_092449" style="max-width: 100%;"></a></p>
<p dir="auto">I have Warped my Component with MuiTheheProvider Like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" <Provider {...store}>
<MuiThemeProvider >
<BrowserRouter forceRefresh={!supportsHistory}>
<TheApp />
</BrowserRouter>
</MuiThemeProvider>
</Provider>"><pre class="notranslate"><code class="notranslate"> <Provider {...store}>
<MuiThemeProvider >
<BrowserRouter forceRefresh={!supportsHistory}>
<TheApp />
</BrowserRouter>
</MuiThemeProvider>
</Provider>
</code></pre></div>
<p dir="auto">Both on the server and on the client, also I have set these globals on my express server index.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="global.navigator = global.navigator || {};
global.navigator.userAgent = global.navigator.userAgent || 'all';"><pre class="notranslate"><code class="notranslate">global.navigator = global.navigator || {};
global.navigator.userAgent = global.navigator.userAgent || 'all';
</code></pre></div>
<p dir="auto">Any Suggestions?</p>
<h3 dir="auto">Steps to reproduce</h3>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>Material-UI: ^0.18.7</li>
<li>React: 15.5.4</li>
<li>Browser: Google Chrome</li>
</ul> | <p dir="auto">Having an issue integrating material into an isomorphic react application. I believe it may be associated to the theme not being rendered on the server side, I have it included in both renders with matching user agents. An image and code is referenced below...</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/488909/24217887/eadb848e-0f06-11e7-83b5-2fbfad4b64cb.png"><img width="841" alt="screen shot 2017-03-22 at 1 52 47 pm" src="https://cloud.githubusercontent.com/assets/488909/24217887/eadb848e-0f06-11e7-83b5-2fbfad4b64cb.png" style="max-width: 100%;"></a></p>
<p dir="auto">SERVER RENDER</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// React route matching, server side rendering
match(routerParams, (err, redirectLocation, renderProps) => {
if (err) {
const msg = 'Internal server error';
if (env.NODE_ENV === 'development') {
throw new Error(msg);
}
req[env.NAMESPACE].log.server(msg, 'error');
return res.status(500).end('Internal server error');
}
if (!renderProps) return res.status(404).end('Not found');
function renderView() {
const materialStyle = React.createElement(MuiThemeProvider);
const rootView = React.createElement(RouterContext, renderProps, materialStyle);
const rootStyle = React.createElement(IsoStyle, {
onInsertCss: (styles) => { css.push(styles._getCss()); },
}, rootView);
const rootRedux = React.createElement(Provider, { store }, rootStyle);
const rootComponent = renderToString(rootRedux);
const rootState = JSON.stringify(store.getState());
const template = `
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Astral | Demo</title>
<script>
window.__ROOT_STATE__ = ${rootState};
</script>
<style>${css.join('')}</style>
</head>
<body>
<div id="app-entry">${rootComponent}</div>
<script src="http://localhost:3001/render.bundle.js"></script>
</body>
</html>
`;
return template;
}
req[env.NAMESPACE].log.server('Render success', 'info');
res.send(renderView());"><pre class="notranslate"><span class="pl-c">// React route matching, server side rendering</span>
<span class="pl-s1">match</span><span class="pl-kos">(</span><span class="pl-s1">routerParams</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">,</span> <span class="pl-s1">redirectLocation</span><span class="pl-kos">,</span> <span class="pl-s1">renderProps</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">msg</span> <span class="pl-c1">=</span> <span class="pl-s">'Internal server error'</span><span class="pl-kos">;</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">env</span><span class="pl-kos">.</span><span class="pl-c1">NODE_ENV</span> <span class="pl-c1">===</span> <span class="pl-s">'development'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s1">msg</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-s1">req</span><span class="pl-kos">[</span><span class="pl-s1">env</span><span class="pl-kos">.</span><span class="pl-c1">NAMESPACE</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">log</span><span class="pl-kos">.</span><span class="pl-en">server</span><span class="pl-kos">(</span><span class="pl-s1">msg</span><span class="pl-kos">,</span> <span class="pl-s">'error'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">return</span> <span class="pl-s1">res</span><span class="pl-kos">.</span><span class="pl-en">status</span><span class="pl-kos">(</span><span class="pl-c1">500</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">end</span><span class="pl-kos">(</span><span class="pl-s">'Internal server error'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">renderProps</span><span class="pl-kos">)</span> <span class="pl-k">return</span> <span class="pl-s1">res</span><span class="pl-kos">.</span><span class="pl-en">status</span><span class="pl-kos">(</span><span class="pl-c1">404</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">end</span><span class="pl-kos">(</span><span class="pl-s">'Not found'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-en">renderView</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">materialStyle</span> <span class="pl-c1">=</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-v">MuiThemeProvider</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">rootView</span> <span class="pl-c1">=</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-v">RouterContext</span><span class="pl-kos">,</span> <span class="pl-s1">renderProps</span><span class="pl-kos">,</span> <span class="pl-s1">materialStyle</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">rootStyle</span> <span class="pl-c1">=</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-v">IsoStyle</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-en">onInsertCss</span>: <span class="pl-kos">(</span><span class="pl-s1">styles</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> <span class="pl-s1">css</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">styles</span><span class="pl-kos">.</span><span class="pl-en">_getCss</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-s1">rootView</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">rootRedux</span> <span class="pl-c1">=</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-v">Provider</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> store <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">rootStyle</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">rootComponent</span> <span class="pl-c1">=</span> <span class="pl-en">renderToString</span><span class="pl-kos">(</span><span class="pl-s1">rootRedux</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">rootState</span> <span class="pl-c1">=</span> <span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">store</span><span class="pl-kos">.</span><span class="pl-en">getState</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">template</span> <span class="pl-c1">=</span> <span class="pl-s">`</span>
<span class="pl-s"> <!DOCTYPE html></span>
<span class="pl-s"> <html></span>
<span class="pl-s"> <head></span>
<span class="pl-s"> <meta charset="utf-8"></span>
<span class="pl-s"> <title>Astral | Demo</title></span>
<span class="pl-s"> <script></span>
<span class="pl-s"> window.__ROOT_STATE__ = <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">rootState</span><span class="pl-kos">}</span></span>;</span>
<span class="pl-s"> </script></span>
<span class="pl-s"> <style><span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">css</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s">''</span><span class="pl-kos">)</span><span class="pl-kos">}</span></span></style></span>
<span class="pl-s"> </head></span>
<span class="pl-s"> <body></span>
<span class="pl-s"> <div id="app-entry"><span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">rootComponent</span><span class="pl-kos">}</span></span></div></span>
<span class="pl-s"> <script src="http://localhost:3001/render.bundle.js"></script></span>
<span class="pl-s"> </body></span>
<span class="pl-s"> </html></span>
<span class="pl-s"> `</span><span class="pl-kos">;</span>
<span class="pl-k">return</span> <span class="pl-s1">template</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-s1">req</span><span class="pl-kos">[</span><span class="pl-s1">env</span><span class="pl-kos">.</span><span class="pl-c1">NAMESPACE</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">log</span><span class="pl-kos">.</span><span class="pl-en">server</span><span class="pl-kos">(</span><span class="pl-s">'Render success'</span><span class="pl-kos">,</span> <span class="pl-s">'info'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">res</span><span class="pl-kos">.</span><span class="pl-en">send</span><span class="pl-kos">(</span><span class="pl-en">renderView</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">CLIENT RENDER</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="render() {
return (
<div id="base-view">
<MuiThemeProvider>
{this.props.children}
</MuiThemeProvider>
</div>
);
}"><pre class="notranslate"><code class="notranslate">render() {
return (
<div id="base-view">
<MuiThemeProvider>
{this.props.children}
</MuiThemeProvider>
</div>
);
}
</code></pre></div>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>Material-UI: 0.17.1</li>
<li>React: 15.4.2</li>
<li>Browser: Chrome</li>
</ul> | 1 |
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>:</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -> celery:5.1.2 (sun-harmonics) kombu:5.1.0 py:3.8.7
billiard:3.6.4.0 py-amqp:5.0.6
platform -> system:Darwin arch:64bit
kernel version:19.6.0 imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:amqp results:rpc:///
deprecated_settings: None
broker_url: 'amqp://****:********@localhost:5672//'
result_backend: 'rpc:///'"><pre class="notranslate"><code class="notranslate">software -> celery:5.1.2 (sun-harmonics) kombu:5.1.0 py:3.8.7
billiard:3.6.4.0 py-amqp:5.0.6
platform -> system:Darwin arch:64bit
kernel version:19.6.0 imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:amqp results:rpc:///
deprecated_settings: None
broker_url: 'amqp://****:********@localhost:5672//'
result_backend: 'rpc:///'
</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>: 5.1.0</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==5.0.6
billiard==3.6.4.0
celery==5.1.2
click==7.1.2
click-didyoumean==0.0.3
click-plugins==1.1.1
click-repl==0.2.0
kombu==5.1.0
prompt-toolkit==3.0.19
pytz==2021.1
six==1.16.0
vine==5.0.0
wcwidth==0.2.5"><pre class="notranslate"><code class="notranslate">amqp==5.0.6
billiard==3.6.4.0
celery==5.1.2
click==7.1.2
click-didyoumean==0.0.3
click-plugins==1.1.1
click-repl==0.2.0
kombu==5.1.0
prompt-toolkit==3.0.19
pytz==2021.1
six==1.16.0
vine==5.0.0
wcwidth==0.2.5
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<p dir="auto">We are chaining tasks together and then adding an errback to the chain.<br>
The expectation is that if a task in the chain fails, then the errback will be called,<br>
and the rest of the chain skipped. Our broker is <code class="notranslate">amqp</code> (RabbitMQ), and we are using the <code class="notranslate">rpc</code> backend.</p>
<p dir="auto">This feature worked for 4.4.x and works in 5.0.5. Starting in 5.1.0, the Celery<br>
worker will throw an internal exception and the errback is not called. Below is a simple test case:</p>
<details>
<p dir="auto">
</p><p dir="auto"><em>tasks.py</em></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from celery import Celery
from celery.utils.log import get_task_logger
app = Celery()
app.conf.broker_url = "amqp://****:****@localhost:5672/"
app.conf.result_backend = "rpc://"
logger = get_task_logger(__name__)
@app.task
def task1():
logger.info("TASK1")
raise ValueError('foo')
@app.task
def task2():
logger.info("TASK2")
@app.task
def error_handler(request, exc, traceback):
logger.error("ERROR HANDLER")
logger.error('Task {0} raised exception: {1!r}'.format(
request.id, exc))
"><pre class="notranslate"><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">utils</span>.<span class="pl-s1">log</span> <span class="pl-k">import</span> <span class="pl-s1">get_task_logger</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>()
<span class="pl-s1">app</span>.<span class="pl-s1">conf</span>.<span class="pl-s1">broker_url</span> <span class="pl-c1">=</span> <span class="pl-s">"amqp://****:****@localhost:5672/"</span>
<span class="pl-s1">app</span>.<span class="pl-s1">conf</span>.<span class="pl-s1">result_backend</span> <span class="pl-c1">=</span> <span class="pl-s">"rpc://"</span>
<span class="pl-s1">logger</span> <span class="pl-c1">=</span> <span class="pl-en">get_task_logger</span>(<span class="pl-s1">__name__</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">task1</span>():
<span class="pl-s1">logger</span>.<span class="pl-en">info</span>(<span class="pl-s">"TASK1"</span>)
<span class="pl-k">raise</span> <span class="pl-v">ValueError</span>(<span class="pl-s">'foo'</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">task2</span>():
<span class="pl-s1">logger</span>.<span class="pl-en">info</span>(<span class="pl-s">"TASK2"</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">error_handler</span>(<span class="pl-s1">request</span>, <span class="pl-s1">exc</span>, <span class="pl-s1">traceback</span>):
<span class="pl-s1">logger</span>.<span class="pl-en">error</span>(<span class="pl-s">"ERROR HANDLER"</span>)
<span class="pl-s1">logger</span>.<span class="pl-en">error</span>(<span class="pl-s">'Task {0} raised exception: {1!r}'</span>.<span class="pl-en">format</span>(
<span class="pl-s1">request</span>.<span class="pl-s1">id</span>, <span class="pl-s1">exc</span>))</pre></div>
<p dir="auto">Then run <code class="notranslate">task1</code> and <code class="notranslate">task2</code> in a chain using <code class="notranslate">error_handler</code> as the errback:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from tasks import error_handler, task1, task2
chain = (task1.s() | task2.s())
x = chain.apply_async(link_error=error_handler.s())"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">tasks</span> <span class="pl-k">import</span> <span class="pl-s1">error_handler</span>, <span class="pl-s1">task1</span>, <span class="pl-s1">task2</span>
<span class="pl-s1">chain</span> <span class="pl-c1">=</span> (<span class="pl-s1">task1</span>.<span class="pl-en">s</span>() <span class="pl-c1">|</span> <span class="pl-s1">task2</span>.<span class="pl-en">s</span>())
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">chain</span>.<span class="pl-en">apply_async</span>(<span class="pl-s1">link_error</span><span class="pl-c1">=</span><span class="pl-s1">error_handler</span>.<span class="pl-en">s</span>())</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto"><code class="notranslate">task1</code> will fail and <code class="notranslate">error_handler</code> should be called:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[INFO/MainProcess] Task tasks.task1[35e2f20e-fc5b-4889-8ae0-9c1a593a15ec] received
[INFO/ForkPoolWorker-7] tasks.task1[35e2f20e-fc5b-4889-8ae0-9c1a593a15ec]: TASK1
[ERROR/ForkPoolWorker-7] tasks.error_handler[None]: ERROR HANDLER
[ERROR/ForkPoolWorker-7] tasks.error_handler[None]: Task 35e2f20e-fc5b-4889-8ae0-9c1a593a15ec raised exception: ValueError('foo')
[ERROR/ForkPoolWorker-7] Task tasks.task1[35e2f20e-fc5b-4889-8ae0-9c1a593a15ec] raised unexpected: ValueError('foo')"><pre class="notranslate"><code class="notranslate">[INFO/MainProcess] Task tasks.task1[35e2f20e-fc5b-4889-8ae0-9c1a593a15ec] received
[INFO/ForkPoolWorker-7] tasks.task1[35e2f20e-fc5b-4889-8ae0-9c1a593a15ec]: TASK1
[ERROR/ForkPoolWorker-7] tasks.error_handler[None]: ERROR HANDLER
[ERROR/ForkPoolWorker-7] tasks.error_handler[None]: Task 35e2f20e-fc5b-4889-8ae0-9c1a593a15ec raised exception: ValueError('foo')
[ERROR/ForkPoolWorker-7] Task tasks.task1[35e2f20e-fc5b-4889-8ae0-9c1a593a15ec] raised unexpected: ValueError('foo')
</code></pre></div>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">The Celery worker logs the following stack trace and <code class="notranslate">error_handler</code> is never called:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ERROR/MainProcess] Pool callback raised exception: AttributeError("'dict' object has no attribute 'reply_to'")
Traceback (most recent call last):
File "/****/share/virtualenvs/celery5-reply-to-reL48Jin/lib/python3.8/site-packages/billiard/pool.py", line 1796, in safe_apply_callback
fun(*args, **kwargs)
File "/****/share/virtualenvs/celery5-reply-to-reL48Jin/lib/python3.8/site-packages/celery/worker/request.py", line 571, in on_failure
self.task.backend.mark_as_failure(
File "/****/share/virtualenvs/celery5-reply-to-reL48Jin/lib/python3.8/site-packages/celery/backends/base.py", line 199, in mark_as_failure
self.store_result(
File "/****/share/virtualenvs/celery5-reply-to-reL48Jin/lib/python3.8/site-packages/celery/backends/rpc.py", line 198, in store_result
routing_key, correlation_id = self.destination_for(task_id, request)
File "/****/share/virtualenvs/celery5-reply-to-reL48Jin/lib/python3.8/site-packages/celery/backends/rpc.py", line 179, in destination_for
return request.reply_to, request.correlation_id or task_id
AttributeError: 'dict' object has no attribute 'reply_to'"><pre class="notranslate"><code class="notranslate">[ERROR/MainProcess] Pool callback raised exception: AttributeError("'dict' object has no attribute 'reply_to'")
Traceback (most recent call last):
File "/****/share/virtualenvs/celery5-reply-to-reL48Jin/lib/python3.8/site-packages/billiard/pool.py", line 1796, in safe_apply_callback
fun(*args, **kwargs)
File "/****/share/virtualenvs/celery5-reply-to-reL48Jin/lib/python3.8/site-packages/celery/worker/request.py", line 571, in on_failure
self.task.backend.mark_as_failure(
File "/****/share/virtualenvs/celery5-reply-to-reL48Jin/lib/python3.8/site-packages/celery/backends/base.py", line 199, in mark_as_failure
self.store_result(
File "/****/share/virtualenvs/celery5-reply-to-reL48Jin/lib/python3.8/site-packages/celery/backends/rpc.py", line 198, in store_result
routing_key, correlation_id = self.destination_for(task_id, request)
File "/****/share/virtualenvs/celery5-reply-to-reL48Jin/lib/python3.8/site-packages/celery/backends/rpc.py", line 179, in destination_for
return request.reply_to, request.correlation_id or task_id
AttributeError: 'dict' object has no attribute 'reply_to'
</code></pre></div> | <p dir="auto">PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="428030532" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5423" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/5423/hovercard" href="https://github.com/celery/celery/pull/5423">#5423</a> (to address issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="93878725" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/2700" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/2700/hovercard" href="https://github.com/celery/celery/issues/2700">#2700</a>) made a change which installs a <code class="notranslate">SIGTERM</code> handler within <code class="notranslate">Task.__call__()</code>, which effectively ignores <code class="notranslate">SIGTERM</code>. This is...er...wrong, and leads to the following problems:</p>
<ul dir="auto">
<li>Tasks cannot be called inline within a thread (eg common configurations of <code class="notranslate">uwsgi</code>, or even Django's <code class="notranslate">runserver</code>)</li>
<li>The warm/cold shutdown distinction is erased</li>
<li>The <code class="notranslate">REMAP_SIGTERM</code> configuration value is ignored (used in eg Heroku deployments)</li>
<li>Signal handling by non-worker calling processes is forcibly overridden</li>
<li>Conflicts with Celery's own worker signal handling (see <a href="https://github.com/celery/celery/blob/master/celery/apps/worker.py">worker.py</a> and <a href="https://github.com/celery/celery/blob/master/celery/platforms.py">platforms.py</a>)</li>
</ul>
<p dir="auto">The PR in question was reverted in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="454089143" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5577" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/5577/hovercard" href="https://github.com/celery/celery/pull/5577">#5577</a>, then un-reverted in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="455551137" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5586" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/5586/hovercard" href="https://github.com/celery/celery/pull/5586">#5586</a>.</p>
<p dir="auto">We've had to add a custom task class and override <code class="notranslate">__call__()</code> for production use to avoid this issue. Please re-revert <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="428030532" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5423" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/5423/hovercard" href="https://github.com/celery/celery/pull/5423">#5423</a>; if <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="93878725" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/2700" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/2700/hovercard" href="https://github.com/celery/celery/issues/2700">#2700</a> is still an issue inherent to Celery (as opposed to simply warm/cold shutdown differences), then a different fix should be considered.</p>
<p dir="auto">Edit: after some deeper looks at the code, it seems as though this only applies for inline tasks under the base <code class="notranslate">Task</code> class, as <code class="notranslate">__call__()</code> is optimized away (see <a href="https://github.com/celery/celery/blob/master/celery/app/trace.py#L292">trace.py</a>) for async/dispatched tasks if it hasn't been overridden. AFAICT it <em>would</em> still be a problem if using a custom task class which overrides <code class="notranslate">__call__()</code> and calls <code class="notranslate">super()</code>, however.</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 class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="93878725" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/2700" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/2700/hovercard" href="https://github.com/celery/celery/issues/2700">#2700</a></li>
<li>PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="428030532" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5423" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/5423/hovercard" href="https://github.com/celery/celery/pull/5423">#5423</a></li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</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.0rc3 (cliffs) kombu:4.6.4 py:3.7.4
billiard:3.6.1.0 redis:3.3.7
platform -> system:Linux arch:64bit
kernel version:4.9.184-linuxkit imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:redis://mps-redis:6379/0"><pre class="notranslate"><code class="notranslate">software -> celery:4.4.0rc3 (cliffs) kombu:4.6.4 py:3.7.4
billiard:3.6.1.0 redis:3.3.7
platform -> system:Linux arch:64bit
kernel version:4.9.184-linuxkit imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:redis://mps-redis:6379/0
</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>: 4.4.0rc2</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>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<p dir="auto">See <a href="https://github.com/celery/celery/blob/master/celery/app/task.py#L396">https://github.com/celery/celery/blob/master/celery/app/task.py#L396</a></p>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Should be able to call a task inline in a thread.</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">When calling task inline under Django <code class="notranslate">runserver</code> (which uses threads):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "/app/pipelines/serializers.py", line 184, in create
remote_worker=validated_data['with_remote'],
File "/usr/local/lib/python3.7/site-packages/celery/local.py", line 191, in __call__
return self._get_current_object()(*a, **kw)
File "/usr/local/lib/python3.7/site-packages/celery/app/task.py", line 396, in __call__
signal.signal(signal.SIGTERM, handle_sigterm)
File "/usr/local/lib/python3.7/signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "/app/pipelines/serializers.py", line 184, in create
remote_worker=validated_data['with_remote'],
File "/usr/local/lib/python3.7/site-packages/celery/local.py", line 191, in __call__
return self._get_current_object()(*a, **kw)
File "/usr/local/lib/python3.7/site-packages/celery/app/task.py", line 396, in __call__
signal.signal(signal.SIGTERM, handle_sigterm)
File "/usr/local/lib/python3.7/signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
</code></pre></div> | 0 |
<ul dir="auto">
<li>VSCode Version: 1.1.1</li>
<li>OS Version: OSX 10.11.4</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Insert the following TypeScript code into the editor:</li>
</ol>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var a = true ? true : `;`;
var i;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span> ? <span class="pl-c1">true</span> : <span class="pl-s">`;`</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">i</span><span class="pl-kos">;</span></pre></div>
<ol dir="auto">
<li>Observe that <code class="notranslate">var i;</code> is colored as if it were part of the template string (in VSCode, and on GitHub!).</li>
</ol>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1141042/15455483/747275dc-2023-11e6-9f54-9558ebef7bbc.png"><img width="290" alt="tsbug" src="https://cloud.githubusercontent.com/assets/1141042/15455483/747275dc-2023-11e6-9f54-9558ebef7bbc.png" style="max-width: 100%;"></a></p>
<p dir="auto">Removing any part of the first line prevents the bug. It only appears to occur when combining variable assignment, the ternary operator, and a template string containing a semicolon (<code class="notranslate">;</code>).</p>
<p dir="auto">Further Info:</p>
<p dir="auto">A single occurrence of this bug can derail syntax highlighting for the rest of the file, since template strings are multi-line. Template strings with semicolons can be a common occurrence for projects that generate JavaScript as output, and ternaries are a common case when wanting to handle a slight variation in output.</p> | <ul dir="auto">
<li>VSCode Version: latest</li>
<li>OS Version:OS X El Capitan</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>create a file "ball.ts" that has a class "Ball"</li>
<li>create a new file in the file explorer pane</li>
<li>paste the whole code of ball.ts into the new file</li>
<li>now type your new class name in the new file, for example "Paddle"</li>
</ol>
<p dir="auto">result:</p>
<ul dir="auto">
<li>the file name of your new file in the explorer keeps changing to "ball-1.ts".</li>
<li>every time you rename that file to "paddle.ts", VS Code creates a new "ball-2.ts" and so forth.</li>
<li>even if you manage to get rid of all the redundant files and you end up with one paddle.ts that has a "Paddle" class, VS Code still keeps complaining that you have two Ball classes.</li>
<li>the only way to fix this is quit VS Code and restart.</li>
</ul> | 0 |
<ul dir="auto">
<li><strong>Electron Version</strong>
<ul dir="auto">
<li>4.0.5 ( run as node: 10.11.0 )</li>
</ul>
</li>
<li><strong>Operating System</strong> (Platform and Version):
<ul dir="auto">
<li>Windows 10 (1809)</li>
</ul>
</li>
<li><strong>Last known working Electron version</strong> (if applicable):
<ul dir="auto">
<li>N/A</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">node --experimental-worker app.js
hello from electron as node
hello from main thread
hello from electron as node
hello from worker thread
hello from worker
0
>node -v
v10.11.0"><pre class="notranslate"><span class="pl-k">></span>node --experimental-worker app.js
hello from electron as node
hello from main thread
hello from electron as node
hello from worker thread
hello from worker
0
<span class="pl-k">></span>node -v
v10.11.0</pre></div>
<h3 dir="auto">Actual behavior</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">electron --experimental-worker app.js
hello from electron as node
hello from main thread
>electron -v
v10.11.0"><pre class="notranslate"><span class="pl-k">></span>electron --experimental-worker app.js
hello from electron as node
hello from main thread
<span class="pl-k">></span>electron -v
v10.11.0</pre></div>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">[app.js]</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="console.log("hello from electron as node")
const {
Worker,
isMainThread,
parentPort
} = require('worker_threads');
if (isMainThread) {
console.log("hello from main thread")
function createWorker() {
let worker = new Worker(__filename);
worker.on('message', (msg) => {
console.log(msg);
});
worker.on('error', (err) => {
console.log(err);
});
worker.on('exit', (code) => {
console.log(code);
});
}
createWorker();
} else {
console.log("hello from worker thread")
parentPort.postMessage("hello from worker");
}"><pre class="notranslate"><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">"hello from electron as node"</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span>
Worker<span class="pl-kos">,</span>
isMainThread<span class="pl-kos">,</span>
parentPort
<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">'worker_threads'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">isMainThread</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">"hello from main thread"</span><span class="pl-kos">)</span>
<span class="pl-k">function</span> <span class="pl-en">createWorker</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> <span class="pl-s1">worker</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Worker</span><span class="pl-kos">(</span><span class="pl-s1">__filename</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">worker</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'message'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">msg</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-s1">msg</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">worker</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'error'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">err</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-s1">err</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">worker</span><span class="pl-kos">.</span><span class="pl-en">on</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-s1">code</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-s1">code</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">createWorker</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">else</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">"hello from worker thread"</span><span class="pl-kos">)</span>
<span class="pl-s1">parentPort</span><span class="pl-kos">.</span><span class="pl-en">postMessage</span><span class="pl-kos">(</span><span class="pl-s">"hello from worker"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div> | <h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong><br>
v5.0.2</li>
<li><strong>Operating System:</strong><br>
Windows 10</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">On app ready start nodejs worker which consoles string.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">App crash immediately after run</p>
<h3 dir="auto">To Reproduce</h3>
<ul dir="auto">
<li>git clone <a href="https://github.com/BorysTyminski/electron-issue.git">https://github.com/BorysTyminski/electron-issue.git</a></li>
<li>cd electron-issue</li>
<li>npm install</li>
<li>npm run start</li>
</ul>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">I used electron-forge to quick build app.</p> | 1 |
<p dir="auto">The following script fails with an "Unsupported namedCurve" error. It works fine if the P-384 is changed to P-256.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function generate_keypair() {
return crypto.subtle.generateKey(
{name: "ECDH", namedCurve: "P-384"},
true,
["deriveBits"]
);
}
Promise.all([
generate_keypair(),
generate_keypair()
]).then(function ([alice, bob]) {
return crypto.subtle.deriveBits(
{name: "ECDH", public: bob.publicKey},
alice.privateKey,
256
);
}).then(
console.log
);"><pre class="notranslate"><code class="notranslate">function generate_keypair() {
return crypto.subtle.generateKey(
{name: "ECDH", namedCurve: "P-384"},
true,
["deriveBits"]
);
}
Promise.all([
generate_keypair(),
generate_keypair()
]).then(function ([alice, bob]) {
return crypto.subtle.deriveBits(
{name: "ECDH", public: bob.publicKey},
alice.privateKey,
256
);
}).then(
console.log
);
</code></pre></div>
<p dir="auto">It appears that the upstream fix mentioned in <a href="https://github.com/denoland/deno/blob/7eee521199e9735ab7c347d99e9d90ba3046be1a/ext/crypto/lib.rs#L561">this TODO comment</a> has just landed, meaning that it should be possible to make SubtleCrypto.deriveBits work with P-384 keys.</p> | <p dir="auto"><a href="https://docs.rs/elliptic-curve/0.11.5/src/elliptic_curve/ecdh.rs.html#58-68" rel="nofollow">Diffie-Hellman function</a> requires <code class="notranslate">p384::NistP384</code> to implement <code class="notranslate">ProjectiveArithmetic</code> trait. Blocked on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="754581168" data-permission-text="Title is private" data-url="https://github.com/RustCrypto/elliptic-curves/issues/240" data-hovercard-type="issue" data-hovercard-url="/RustCrypto/elliptic-curves/issues/240/hovercard" href="https://github.com/RustCrypto/elliptic-curves/issues/240">RustCrypto/elliptic-curves#240</a></p> | 1 |
<p dir="auto">We use CentOS in our Jenkins CI environment. We see a lot of challenges using Playwright from version 1.15.0 since it needs <code class="notranslate">GLIBC_2.18</code> which is not available in CentOS.</p>
<p dir="auto">Related thread for this feature request > <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1009831017" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/9194" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/9194/hovercard?comment_id=929480889&comment_type=issue_comment" href="https://github.com/microsoft/playwright/issues/9194#issuecomment-929480889">#9194 (comment)</a></p>
<p dir="auto">This is blocking us to upgrade the Playwright, and having support for CentOS7 would be great!</p> | <p dir="auto">We have our CI machines setup on centos7.<br>
I am trying to integrate in our integration tests which runs on jenkins on centos machines.<br>
Able to run tests using chrome but facing issues with following browsers:</p>
<h2 dir="auto">Chromium :</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<launching> /home/centos/.cache/ms-playwright/chromium-920619/chrome-linux/chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --user-data-dir=/tmp/playwright_chromiumdev_profile-GyWOJw --remote-debugging-pipe --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-startup-window
[2021-09-28T13:04:55.123Z] <launched> pid=20094
[2021-09-28T13:04:55.123Z] [pid=20094][err] /home/centos/.cache/ms-playwright/chromium-920619/chrome-linux/chrome: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /home/centos/.cache/ms-playwright/chromium-920619/chrome-linux/chrome)
[2021-09-28T13:04:55.123Z] [pid=20094] <process did exit: exitCode=1, signal=null>
[2021-09-28T13:04:55.123Z] [pid=20094] starting temporary directories cleanup"><pre class="notranslate"><code class="notranslate"><launching> /home/centos/.cache/ms-playwright/chromium-920619/chrome-linux/chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --user-data-dir=/tmp/playwright_chromiumdev_profile-GyWOJw --remote-debugging-pipe --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-startup-window
[2021-09-28T13:04:55.123Z] <launched> pid=20094
[2021-09-28T13:04:55.123Z] [pid=20094][err] /home/centos/.cache/ms-playwright/chromium-920619/chrome-linux/chrome: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /home/centos/.cache/ms-playwright/chromium-920619/chrome-linux/chrome)
[2021-09-28T13:04:55.123Z] [pid=20094] <process did exit: exitCode=1, signal=null>
[2021-09-28T13:04:55.123Z] [pid=20094] starting temporary directories cleanup
</code></pre></div>
<p dir="auto">This issue was earlier reported on <a href="https://github.com/microsoft/playwright/issues/9194" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/9194/hovercard">1</a>.</p>
<h2 dir="auto">Edge :</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="browserType.launch: Chromium distribution 'msedge' is not supported on linux
[2021-09-28T13:04:55.120Z]
[2021-09-28T13:04:55.120Z] at Object._baseTest.extend.browser.scope [as fn] (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/index.js:127:40)
[2021-09-28T13:04:55.120Z] at Fixture.setup (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:73:73)
[2021-09-28T13:04:55.121Z] at FixtureRunner.setupFixtureForRegistration (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:312:5)
[2021-09-28T13:04:55.121Z] at FixtureRunner.resolveParametersAndRunHookOrTest (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:297:23)
[2021-09-28T13:04:55.121Z] at WorkerRunner._runTestWithBeforeHooks (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/workerRunner.js:449:7)"><pre class="notranslate"><code class="notranslate">browserType.launch: Chromium distribution 'msedge' is not supported on linux
[2021-09-28T13:04:55.120Z]
[2021-09-28T13:04:55.120Z] at Object._baseTest.extend.browser.scope [as fn] (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/index.js:127:40)
[2021-09-28T13:04:55.120Z] at Fixture.setup (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:73:73)
[2021-09-28T13:04:55.121Z] at FixtureRunner.setupFixtureForRegistration (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:312:5)
[2021-09-28T13:04:55.121Z] at FixtureRunner.resolveParametersAndRunHookOrTest (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:297:23)
[2021-09-28T13:04:55.121Z] at WorkerRunner._runTestWithBeforeHooks (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/workerRunner.js:449:7)
</code></pre></div>
<p dir="auto">Issue reported earlier on <a href="https://github.com/microsoft/playwright/issues/9197" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/9197/hovercard">2</a></p>
<h2 dir="auto">Webkit:</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="browserType.launch: Host system is missing dependencies!
[2021-09-28T13:04:55.121Z]
[2021-09-28T13:04:55.121Z] Install missing packages with:
[2021-09-28T13:04:55.121Z] sudo apt-get install gstreamer1.0-libav
[2021-09-28T13:04:55.121Z]
[2021-09-28T13:04:55.121Z] Missing libraries we didn't find packages for:
[2021-09-28T13:04:55.121Z] libnotify.so.4
[2021-09-28T13:04:55.121Z] libopus.so.0
[2021-09-28T13:04:55.121Z] libwoff2dec.so.1.0.2
[2021-09-28T13:04:55.121Z] libharfbuzz-icu.so.0
[2021-09-28T13:04:55.121Z] libgcrypt.so.20
[2021-09-28T13:04:55.121Z] libgstapp-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstbase-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstreamer-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstpbutils-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstaudio-1.0.so.0
[2021-09-28T13:04:55.121Z] libgsttag-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstvideo-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstgl-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstcodecparsers-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstfft-1.0.so.0
[2021-09-28T13:04:55.121Z] libjpeg.so.8
[2021-09-28T13:04:55.121Z] libpng16.so.16
[2021-09-28T13:04:55.121Z] libopenjp2.so.7
[2021-09-28T13:04:55.121Z] libwebpdemux.so.2
[2021-09-28T13:04:55.121Z] libwebp.so.6
[2021-09-28T13:04:55.121Z] libenchant.so.1
[2021-09-28T13:04:55.121Z] libsecret-1.so.0
[2021-09-28T13:04:55.121Z] libhyphen.so.0
[2021-09-28T13:04:55.121Z] libicui18n.so.66
[2021-09-28T13:04:55.121Z] libicuuc.so.66
[2021-09-28T13:04:55.121Z] libevdev.so.2
[2021-09-28T13:04:55.121Z] libGLESv2.so.2
[2021-09-28T13:04:55.121Z]
[2021-09-28T13:04:55.121Z]
[2021-09-28T13:04:55.121Z] at Object._baseTest.extend.browser.scope [as fn] (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/index.js:127:40)
[2021-09-28T13:04:55.121Z] at Fixture.setup (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:73:73)
[2021-09-28T13:04:55.121Z] at FixtureRunner.setupFixtureForRegistration (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:312:5)
[2021-09-28T13:04:55.121Z] at FixtureRunner.resolveParametersAndRunHookOrTest (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:297:23)
[2021-09-28T13:04:55.121Z] at WorkerRunner._runTestWithBeforeHooks (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/workerRunner.js:449:7)"><pre class="notranslate"><code class="notranslate">browserType.launch: Host system is missing dependencies!
[2021-09-28T13:04:55.121Z]
[2021-09-28T13:04:55.121Z] Install missing packages with:
[2021-09-28T13:04:55.121Z] sudo apt-get install gstreamer1.0-libav
[2021-09-28T13:04:55.121Z]
[2021-09-28T13:04:55.121Z] Missing libraries we didn't find packages for:
[2021-09-28T13:04:55.121Z] libnotify.so.4
[2021-09-28T13:04:55.121Z] libopus.so.0
[2021-09-28T13:04:55.121Z] libwoff2dec.so.1.0.2
[2021-09-28T13:04:55.121Z] libharfbuzz-icu.so.0
[2021-09-28T13:04:55.121Z] libgcrypt.so.20
[2021-09-28T13:04:55.121Z] libgstapp-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstbase-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstreamer-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstpbutils-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstaudio-1.0.so.0
[2021-09-28T13:04:55.121Z] libgsttag-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstvideo-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstgl-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstcodecparsers-1.0.so.0
[2021-09-28T13:04:55.121Z] libgstfft-1.0.so.0
[2021-09-28T13:04:55.121Z] libjpeg.so.8
[2021-09-28T13:04:55.121Z] libpng16.so.16
[2021-09-28T13:04:55.121Z] libopenjp2.so.7
[2021-09-28T13:04:55.121Z] libwebpdemux.so.2
[2021-09-28T13:04:55.121Z] libwebp.so.6
[2021-09-28T13:04:55.121Z] libenchant.so.1
[2021-09-28T13:04:55.121Z] libsecret-1.so.0
[2021-09-28T13:04:55.121Z] libhyphen.so.0
[2021-09-28T13:04:55.121Z] libicui18n.so.66
[2021-09-28T13:04:55.121Z] libicuuc.so.66
[2021-09-28T13:04:55.121Z] libevdev.so.2
[2021-09-28T13:04:55.121Z] libGLESv2.so.2
[2021-09-28T13:04:55.121Z]
[2021-09-28T13:04:55.121Z]
[2021-09-28T13:04:55.121Z] at Object._baseTest.extend.browser.scope [as fn] (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/index.js:127:40)
[2021-09-28T13:04:55.121Z] at Fixture.setup (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:73:73)
[2021-09-28T13:04:55.121Z] at FixtureRunner.setupFixtureForRegistration (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:312:5)
[2021-09-28T13:04:55.121Z] at FixtureRunner.resolveParametersAndRunHookOrTest (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:297:23)
[2021-09-28T13:04:55.121Z] at WorkerRunner._runTestWithBeforeHooks (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/workerRunner.js:449:7)
</code></pre></div>
<p dir="auto">Issue reported earlier on <a href="https://github.com/microsoft/playwright/issues/9198" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/9198/hovercard">3</a></p>
<p dir="auto">As many organizations like ours uses centos machines as their infrastructure, this feature will have a wider impact and will help many developers.<br>
Request playwright team to have a look at this request.</p>
<p dir="auto">Thanks!!</p> | 1 |
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>yes/no</td>
</tr>
<tr>
<td>RFC?</td>
<td>yes/no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.3.2</td>
</tr>
</tbody>
</table>
<p dir="auto">We ran into a bug in the handling of periods in an API end point URL.</p>
<p dir="auto">This query wouldn't work due to the period in faculty.position. This is the expected behavior since this is how it works in production.<br>
<code class="notranslate">$response = $this->get('/sample?faculty.position=Teacher');</code></p>
<p dir="auto">This one should act similarly to the above but it actually handles it. I was thinking that both lines should be consistent on Symfony whether it handles periods or not.<br>
<code class="notranslate">$response = $this->get('/sample', ['faculty.position' => 'Teacher']);</code></p>
<p dir="auto">We fixed this by using camelCase instead of using periods but I wanted to bring it up in case someone else encounters this.</p>
<p dir="auto">The actual call to Symfony is:<br>
<code class="notranslate">$this->client()->request($method, $uri, $parameters);</code><br>
which is within Client.php in the framework.</p> | <p dir="auto"><strong>Symfony version(s) affected</strong>: 4.1.9, 4.2.1</p>
<p dir="auto"><strong>Description</strong></p>
<p dir="auto">Having defined a route without trailing slash in the path,<br>
accessing the URL with a trailing slash automatically redirects to the URL without the trailing slash, but also replaces dots with underscores in the query string parameters names (if any).</p>
<p dir="auto"><strong>How to reproduce</strong></p>
<h5 dir="auto">TL;DR:</h5>
<p dir="auto">Given my <code class="notranslate">localhost</code> app defines a route for method GET for path <code class="notranslate">/foos</code> (not <code class="notranslate">/foos/</code>)<br>
When a client requests (GET) the URL <code class="notranslate">http://localhost/foos/?nested.prop=bar</code><br>
Then I expect the client is redirected to <code class="notranslate">http://localhost/foos?nested.prop=bar</code><br>
but actually the client is redirected to <code class="notranslate">http://localhost/foos?nested_prop=bar</code></p>
<h5 dir="auto">More details:</h5>
<p dir="auto">Given the following controller (note: no trailing slash after "foos"):</p>
<details>
<summary>src/Controller/FooController.php</summary>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class FooController
{
/**
* @Route("/foos", methods={"GET"})
*/
public function getFoos(Request $request)
{
/* Disclaimer: this is quick-and-dirty code. */
$html = '<!DOCTYPE html><html><head><meta charset="UTF-8"></head><body>';
$html .= '<table border="1">';
$html .= '<tr><th>expression</th><th>value</th></tr>';
foreach ([
'$request->getUri()',
'$request->getSchemeAndHttpHost().$request->getRequestUri()',
'$request->getQueryString()',
'$request->server->get("QUERY_STRING")',
] as $expression) {
$value = eval("return $expression;");
[$expression, $value] = array_map('htmlspecialchars', [$expression, $value]);
$html .= "<tr><td><code>$expression</code></td><td><code>$value</code></td></tr>";
}
$html .= '</table>';
$html .= '</body></html>';
return new Response($html);
}
}"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-k">namespace</span> <span class="pl-v">App</span>\<span class="pl-v">Controller</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">HttpFoundation</span>\<span class="pl-v">Request</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">HttpFoundation</span>\<span class="pl-v">Response</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Routing</span>\<span class="pl-v">Annotation</span>\<span class="pl-v">Route</span>;
<span class="pl-k">class</span> <span class="pl-v">FooController</span>
{
<span class="pl-c">/**</span>
<span class="pl-c"> * @Route("/foos", methods={"GET"})</span>
<span class="pl-c"> */</span>
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">getFoos</span>(<span class="pl-smi"><span class="pl-smi">Request</span></span> <span class="pl-s1"><span class="pl-c1">$</span>request</span>)
{
<span class="pl-c">/* Disclaimer: this is quick-and-dirty code. */</span>
<span class="pl-s1"><span class="pl-c1">$</span>html</span> = <span class="pl-s">'<!DOCTYPE html><html><head><meta charset="UTF-8"></head><body>'</span>;
<span class="pl-s1"><span class="pl-c1">$</span>html</span> .= <span class="pl-s">'<table border="1">'</span>;
<span class="pl-s1"><span class="pl-c1">$</span>html</span> .= <span class="pl-s">'<tr><th>expression</th><th>value</th></tr>'</span>;
<span class="pl-k">foreach</span> ([
<span class="pl-s">'$request->getUri()'</span>,
<span class="pl-s">'$request->getSchemeAndHttpHost().$request->getRequestUri()'</span>,
<span class="pl-s">'$request->getQueryString()'</span>,
<span class="pl-s">'$request->server->get("QUERY_STRING")'</span>,
] <span class="pl-k">as</span> <span class="pl-s1"><span class="pl-c1">$</span>expression</span>) {
<span class="pl-s1"><span class="pl-c1">$</span>value</span> = eval("<span class="pl-s">return </span><span class="pl-s1"><span class="pl-c1">$</span>expression</span><span class="pl-s">;</span>");
[<span class="pl-s1"><span class="pl-c1">$</span>expression</span>, <span class="pl-s1"><span class="pl-c1">$</span>value</span>] = array_map(<span class="pl-s">'htmlspecialchars'</span>, [<span class="pl-s1"><span class="pl-c1">$</span>expression</span>, <span class="pl-s1"><span class="pl-c1">$</span>value</span>]);
<span class="pl-s1"><span class="pl-c1">$</span>html</span> .= "<span class="pl-s"><tr><td><code></span><span class="pl-s1"><span class="pl-c1">$</span>expression</span><span class="pl-s"></code></td><td><code></span><span class="pl-s1"><span class="pl-c1">$</span>value</span><span class="pl-s"></code></td></tr></span>";
}
<span class="pl-s1"><span class="pl-c1">$</span>html</span> .= <span class="pl-s">'</table>'</span>;
<span class="pl-s1"><span class="pl-c1">$</span>html</span> .= <span class="pl-s">'</body></html>'</span>;
<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-v">Response</span>(<span class="pl-s1"><span class="pl-c1">$</span>html</span>);
}
}</pre></div>
</details>
<p dir="auto">Then</p>
<ul dir="auto">
<li>
<p dir="auto"><a href="http://localhost/foos?nested.prop=bar" rel="nofollow">http://localhost/foos?nested.prop=bar</a> displays:</p>
<table role="table">
<thead>
<tr>
<th>expression</th>
<th>value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="notranslate">$request->getUri()</code></td>
<td><code class="notranslate">http://localhost/foos?nested_prop=bar</code></td>
</tr>
<tr>
<td><code class="notranslate">$request->getSchemeAndHttpHost().$request->getRequestUri()</code></td>
<td><code class="notranslate">http://localhost/foos?nested.prop=bar</code></td>
</tr>
<tr>
<td><code class="notranslate">$request->getQueryString()</code></td>
<td><code class="notranslate">nested_prop=bar</code></td>
</tr>
<tr>
<td><code class="notranslate">$request->server->get("QUERY_STRING")</code></td>
<td><code class="notranslate">nested.prop=bar</code></td>
</tr>
</tbody>
</table>
<p dir="auto">(i.e. <code class="notranslate">nested.prop</code> is transformed to <code class="notranslate">nested_prop</code> but there are ways to get the original query string).</p>
</li>
<li>
<p dir="auto"><a href="http://localhost/foos/?nested.prop=bar" rel="nofollow">http://localhost/foos/?nested.prop=bar</a> (note: trailing slash after "foos") redirects (301) to <a href="http://localhost/foos?nested_prop=bar" rel="nofollow">http://localhost/foos?nested_prop=bar</a> with trailing slash removed <em>but also dot replaced with underscore</em>, which thus displays:</p>
<table role="table">
<thead>
<tr>
<th>expression</th>
<th>value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="notranslate">$request->getUri()</code></td>
<td><code class="notranslate">http://localhost/foos?nested_prop=bar</code></td>
</tr>
<tr>
<td><code class="notranslate">$request->getSchemeAndHttpHost().$request->getRequestUri()</code></td>
<td><code class="notranslate">http://localhost/foos?nested_prop=bar</code></td>
</tr>
<tr>
<td><code class="notranslate">$request->getQueryString()</code></td>
<td><code class="notranslate">nested_prop=bar</code></td>
</tr>
<tr>
<td><code class="notranslate">$request->server->get("QUERY_STRING")</code></td>
<td><code class="notranslate">nested_prop=bar</code></td>
</tr>
</tbody>
</table>
<p dir="auto">i.e. we only have <code class="notranslate">nested_prop</code>, the original query string has been lost.</p>
</li>
</ul>
<p dir="auto"><strong>Additional context</strong></p>
<p dir="auto">With 3.4.20,</p>
<ul dir="auto">
<li>
<p dir="auto"><a href="http://localhost/foos?nested.prop=bar" rel="nofollow">http://localhost/foos?nested.prop=bar</a> displays:</p>
<table role="table">
<thead>
<tr>
<th>expression</th>
<th>value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="notranslate">$request->getUri()</code></td>
<td><code class="notranslate">http://localhost/foos?nested.prop=bar</code></td>
</tr>
<tr>
<td><code class="notranslate">$request->getSchemeAndHttpHost().$request->getRequestUri()</code></td>
<td><code class="notranslate">http://localhost/foos?nested.prop=bar</code></td>
</tr>
<tr>
<td><code class="notranslate">$request->getQueryString()</code></td>
<td><code class="notranslate">nested.prop=bar</code></td>
</tr>
<tr>
<td><code class="notranslate">$request->server->get("QUERY_STRING")</code></td>
<td><code class="notranslate">nested.prop=bar</code></td>
</tr>
</tbody>
</table>
<p dir="auto">(i.e. <code class="notranslate">nested.prop</code> was preserved).</p>
</li>
<li>
<p dir="auto"><a href="http://localhost/foos/?nested.prop=bar" rel="nofollow">http://localhost/foos/?nested.prop=bar</a> (note: trailing slash after "foos") gives a 404 error <code class="notranslate">No route found for "GET /foos/"</code> (no automatic redirect).</p>
</li>
</ul>
<p dir="auto">In all cases, <code class="notranslate">$request->query->get("nested.prop")</code> is <code class="notranslate">null</code> (not defined) (with 4.1, 4.2 and even 3.4), and we have to use <code class="notranslate">$request->query->get("nested_prop")</code> (or parse the original query string) to get <code class="notranslate">"bar"</code>.</p>
<p dir="auto">The real project uses API Platform, which auto-generates resource routes (without trailing slash) and parses the original query string to get nested filters (with dots). The calls with trailing slash are from automated REST clients.</p> | 1 |
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/samaursa/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/samaursa">@samaursa</a> on May 28, 2017 18:58</em></p>
<p dir="auto">Windows build number: 10.0.15063<br>
What's wrong: I see underscores in the bash console</p>
<p dir="auto">I am not sure what or how this happened, but I see underscores throughout the console window. I tried relaunching, removing my custom settings, changing font, reverting to legacy console and back, but nothing has worked.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/817849/26531388/18eb4fba-43b6-11e7-8e8f-ac45a15a9d0e.png"><img src="https://cloud.githubusercontent.com/assets/817849/26531388/18eb4fba-43b6-11e7-8e8f-ac45a15a9d0e.png" alt="image" style="max-width: 100%;"></a></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="231887220" data-permission-text="Title is private" data-url="https://github.com/microsoft/WSL/issues/2168" data-hovercard-type="issue" data-hovercard-url="/microsoft/WSL/issues/2168/hovercard" href="https://github.com/microsoft/WSL/issues/2168">microsoft/WSL#2168</a></em></p> | <h1 dir="auto">Description of the new feature/enhancement</h1>
<h1 dir="auto">Proposed technical implementation details (optional)</h1> | 0 |
<p dir="auto"><em>Please make sure that this is a feature request. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>TensorFlow version (you are using): 1.12.0</li>
<li>Are you willing to contribute it (Yes/No): Yes</li>
</ul>
<p dir="auto"><strong>Describe the feature and the current behavior/state.</strong></p>
<p dir="auto">The STFT Tensorflow function takes into consideration the Hermitian symmetry of the generated output i.e. it only considers the positive frequency elements. Is there a way to recover the entire pre-processed tensor that contains all the calculated elements?</p>
<p dir="auto">In other words, is there a way to calculate the STFT of an input tensor and generate a spectrogram that has dimensions <code class="notranslate">fft_length * frame_length</code>?</p>
<p dir="auto"><strong>Will this change the current api? How?</strong></p>
<p dir="auto">This will just add an additional feature to the existing function.</p>
<p dir="auto"><strong>Who will benefit with this feature?</strong></p>
<p dir="auto">Anyone who is doing audio processing using Tensorflow.</p>
<p dir="auto"><strong>Any Other info.</strong></p> | <h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: No, running tf_cnn_benchmarks.py from benchmarks repo</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Ubuntu 16.04.2 LTS</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: Unmodified source with RDMA Verbs enabled</li>
<li><strong>TensorFlow version (use command below)</strong>: 1.3.0-rc0</li>
<li><strong>Python version</strong>: 2.7.12</li>
<li><strong>Bazel version (if compiling from source)</strong>: 0.5.1</li>
<li><strong>CUDA/cuDNN version</strong>: 8.0/6</li>
<li><strong>GPU model and memory</strong>: NVIDIA Tesla P100 PCIe 16GB (8 per node)</li>
<li><strong>Exact command to reproduce</strong>:</li>
</ul>
<p dir="auto">PS: CUDA_VISIBLE_DEVICES='' python tf_cnn_benchmarks.py --ps_hosts 12.12.12.43:20000 --worker_hosts 12.12.12.44:20000,12.12.12.41:20000 --batch_size=64 --model=inception3 --variable_update=parameter_server --local_parameter_device=cpu --job_name=ps --task_index=0 --server_protocol grpc+verbs</p>
<p dir="auto">Worker0: CUDA_VISIBLE_DEVICES='0,1,2,3,4,5,6,7' python tf_cnn_benchmarks.py --ps_hosts 12.12.12.43:20000 --worker_hosts 12.12.12.44:20000,12.12.12.41:20000 --batch_size=64 --model=inception3 --variable_update=parameter_server --local_parameter_device=cpu --job_name=worker --task_index=0 --num_gpus=8 --data_dir=/data/imagenet_data/ --train_dir=/data/imagenet_train/ --server_protocol grpc+verbs</p>
<p dir="auto">Worker1: CUDA_VISIBLE_DEVICES='0,1,2,3,4,5,6,7' python tf_cnn_benchmarks.py --ps_hosts 12.12.12.43:20000 --worker_hosts 12.12.12.44:20000,12.12.12.41:20000 --batch_size=64 --model=inception3 --variable_update=parameter_server --local_parameter_device=cpu --job_name=worker --task_index=1 --num_gpus=8 --data_dir=/data/imagenet_data/ --train_dir=/data/imagenet_train/ --server_protocol grpc+verbs</p>
<ul dir="auto">
<li><strong>RDMA driver version</strong>: MLNX_OFED_LINUX-4.1-1.0.2.0</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">When running the above commands (Inception V3 synchronized data parallelism training with 2 workers and 1 external ps), the tf_cnn_benchmarks application hangs forever after some iterations (usually in warm up).</p>
<p dir="auto">It happens only when real data is involved (ImageNet), and with >4 GPUs. (More GPUs, less iterations before it hangs). Doesn't happen with grpc protocol, or when running with "synthetic" data.</p>
<p dir="auto">The master_service in the workers is stuck <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/distributed_runtime/master_session.cc#L608">here</a>, which I guess means some operations in the computation have not been completed.</p>
<p dir="auto">The RDMA protocol looks valid and clean, all messages corresponds to the protocol (see below logs).<br>
There some tensors requested by the workers which they don't receive, but they are passed by the RDMA Verbs transport to the BaseRendezvoudMgr with RecvLocalAsync in a valid way, and for some reason the higher level worker service doesn't trigger the Send kernel on those tensors.</p>
<p dir="auto">Any help is much appreciated!<br>
If there are some debug mechanisms I can use to understand which tensors/operations have not been completed it can greatly help. I was mostly debugging this from the RDMA Verbs layer till now, without much success, and I feel I don't have enough information there to understand what's missing.<br>
Also I feel we don't have enough knowledge on how the step_id acts (diving into this in the code now, but there's some higher level documentation it can greatly help).</p>
<p dir="auto">My initial guess was an occurrence of a racy condition when loading the data, since it creates a gap in execution time (worker0 starts the first training step 30-60 seconds after worker1, since it does the preprocessing of the data twice for a reason I couldn't understand yet), but after the first iteration (which usually passes successfully) the time is synchronized between workers.</p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto">Those are the logs of the runtime after moving the logging in <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/verbs/rdma.cc">rdma.cc</a> to VLOG(0) (also adding Tensor name and step id for all cases, in some cases the step_id doesn't mean anything like BUFFER_REQUEST/RESPONSE for example), and also some VLOG in <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/distributed_runtime/master_session.cc">master_session.cc</a></p>
<p dir="auto"><a href="https://gist.github.com/shamoya/15a42f421e088473b8f02bf00c16d0fc">worker0</a><br>
<a href="https://gist.github.com/shamoya/dd3126c02c73990a6e28b534d9a9ddf6">worker1</a><br>
<a href="https://gist.github.com/shamoya/0c856365802ae4d42b38baf988149574">ps</a></p>
<p dir="auto">Unfortunately they are fairly large, but it's better then to cut the log files IMO.<br>
Example for analysis I did in the verbs layer, comparing the Sent Tensor requests to the actual received tensors writes in both workers:</p>
<p dir="auto">worker 0:</p>
<ul dir="auto">
<li>/job:ps/replica:0/task:0/cpu:0;f3c10d28b54074c0;/job:worker/replica:0/task:0/gpu:0;edge_116943_group_deps_2/NoOp_1;0:0 80661058974090965</li>
<li>/job:worker/replica:0/task:1/cpu:0;1a50d5c51cd9c5d1;/job:worker/replica:0/task:0/gpu:0;edge_116947_group_deps_3/NoOp_1;0:0 80661058974090965</li>
<li>/job:worker/replica:0/task:1/gpu:2;7f00fadabfe781f5;/job:worker/replica:0/task:0/gpu:0;edge_111078_group_deps_1/NoOp_2;0:0 80661058974090965</li>
<li>/job:worker/replica:0/task:1/gpu:4;b07185dd19f62088;/job:worker/replica:0/task:0/gpu:0;edge_111080_group_deps_1/NoOp_4;0:0 80661058974090965</li>
</ul>
<p dir="auto">worker 1:</p>
<ul dir="auto">
<li>/job:ps/replica:0/task:0/cpu:0;f3c10d28b54074c0;/job:worker/replica:0/task:1/cpu:0;edge_155113_AssignAdd;0:0 80661058974090965</li>
<li>/job:worker/replica:0/task:0/gpu:0;f3df8abf03739fe8;/job:worker/replica:0/task:1/cpu:0;edge_116948_group_deps_3;0:0 80661058974090965</li>
</ul>
<p dir="auto">The tensors requests received well by the other side and passed to RecvLocalAsync, but are not called later.</p>
<p dir="auto">Thanks a lot.</p> | 0 |
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax
import jax.numpy as jnp
def f(x):
return x + 0.0
def _print_type(x):
print(x)
print(x.dtype)
print(x.dtype is jax.dtypes.float0)
def print_type(x):
_print_type(x)
jax.jit(_print_type)(x)
print("")
x = jax.grad(f, allow_int=True)(jnp.array(1))
y = jnp.array(False)
print_type(x)
print_type(y)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>
<span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">jnp</span>
<span class="pl-k">def</span> <span class="pl-en">f</span>(<span class="pl-s1">x</span>):
<span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-c1">0.0</span>
<span class="pl-k">def</span> <span class="pl-en">_print_type</span>(<span class="pl-s1">x</span>):
<span class="pl-en">print</span>(<span class="pl-s1">x</span>)
<span class="pl-en">print</span>(<span class="pl-s1">x</span>.<span class="pl-s1">dtype</span>)
<span class="pl-en">print</span>(<span class="pl-s1">x</span>.<span class="pl-s1">dtype</span> <span class="pl-c1">is</span> <span class="pl-s1">jax</span>.<span class="pl-s1">dtypes</span>.<span class="pl-s1">float0</span>)
<span class="pl-k">def</span> <span class="pl-en">print_type</span>(<span class="pl-s1">x</span>):
<span class="pl-en">_print_type</span>(<span class="pl-s1">x</span>)
<span class="pl-s1">jax</span>.<span class="pl-en">jit</span>(<span class="pl-s1">_print_type</span>)(<span class="pl-s1">x</span>)
<span class="pl-en">print</span>(<span class="pl-s">""</span>)
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-en">grad</span>(<span class="pl-s1">f</span>, <span class="pl-s1">allow_int</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)(<span class="pl-s1">jnp</span>.<span class="pl-en">array</span>(<span class="pl-c1">1</span>))
<span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">jnp</span>.<span class="pl-en">array</span>(<span class="pl-c1">False</span>)
<span class="pl-en">print_type</span>(<span class="pl-s1">x</span>)
<span class="pl-en">print_type</span>(<span class="pl-s1">y</span>)</pre></div>
<p dir="auto">With numpy v1.23.0:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="False
bool
False
Traced<ShapedArray(void[])>with<DynamicJaxprTrace(level=0/1)>
[('float0', 'V')]
False
False
bool
False
Traced<ShapedArray(bool[])>with<DynamicJaxprTrace(level=0/1)>
bool
False"><pre class="notranslate"><code class="notranslate">False
bool
False
Traced<ShapedArray(void[])>with<DynamicJaxprTrace(level=0/1)>
[('float0', 'V')]
False
False
bool
False
Traced<ShapedArray(bool[])>with<DynamicJaxprTrace(level=0/1)>
bool
False
</code></pre></div>
<p dir="auto">Which has the following problems:</p>
<ul dir="auto">
<li>The "outside jit" dtype of <code class="notranslate">x</code> is <code class="notranslate">bool</code> instead of <code class="notranslate">float0</code>.</li>
<li>The "inside jit" dtype of <code class="notranslate">x</code> and <code class="notranslate">y</code> are different, despite having the same "outside jit" dtype.</li>
<li>The "inside jit" comparison of <code class="notranslate">x.dtype is jax.dtypes.float0</code> returns <code class="notranslate">False</code> despite the "inside jit" dtype of <code class="notranslate">x</code> being <code class="notranslate">float0</code>. (Probably something to do with it secretly being a <code class="notranslate">bool</code> instead.)</li>
</ul>
<p dir="auto">This plays merry havoc will all kinds of other things. I spotted this because it was sneaking past the <code class="notranslate">_check_no_float0s</code> checker when calling <code class="notranslate">jnp.allclose</code>. It also means that attempting to do <code class="notranslate">x == y</code> in the above code will result in an exception being thrown.</p>
<p dir="auto">For reference I've found that numpy v1.21.2 works fine.</p>
<p dir="auto">Possibly this is a numpy bug? (I did check to see that there weren't any <code class="notranslate">float0</code>-related numpy bugs reported.)</p> | <p dir="auto">Something in the numpy 1.23 release broke autodiff; in particular, float0 arrays are being converted to bool:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax
import numpy
print(numpy.__version__)
print(jax.grad(lambda x: x+0., allow_int=True)(1).dtype)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span>
<span class="pl-en">print</span>(<span class="pl-s1">numpy</span>.<span class="pl-s1">__version__</span>)
<span class="pl-en">print</span>(<span class="pl-s1">jax</span>.<span class="pl-en">grad</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>: <span class="pl-s1">x</span><span class="pl-c1">+</span><span class="pl-c1">0.</span>, <span class="pl-s1">allow_int</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)(<span class="pl-c1">1</span>).<span class="pl-s1">dtype</span>)</pre></div>
<p dir="auto">Newest numpy:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.23.0
bool"><pre class="notranslate"><code class="notranslate">1.23.0
bool
</code></pre></div>
<p dir="auto">previous version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.22.4
[('float0', 'V')]"><pre class="notranslate"><code class="notranslate">1.22.4
[('float0', 'V')]
</code></pre></div> | 1 |
<p dir="auto"><strong>Problem</strong>:</p>
<p dir="auto">At the moment in the documentation page of Flutter, we do not have a button to navigate to the related dart file in Flutter project. e.g. with <a href="https://docs.flutter.io/flutter/material/FloatingActionButton-class.html" rel="nofollow">FloatingActionButton</a>, if we want to see the related dart file, we are not able to navigate easily. We need to go to GitHub and find the related file.</p>
<p dir="auto"><em>I know we can see class related data easily but sometimes seeing the overview of the file is more helpful than usual documentation.</em></p>
<p dir="auto"><strong>Solution</strong>:</p>
<p dir="auto">Adding a GitHub button to navigate to related dart file would be useful.</p> | <p dir="auto">If <code class="notranslate">flutter doctor</code> is run in a directory containing a project, it should run checks for that project. Things like verifying the engine version, that some dirs exist (android/AndroidManifest.xml, android/res/, ios/), that pub has been run, ...</p> | 0 |
<p dir="auto">Given is the following graph for Neo4j 2.1.7:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CREATE
(:Application {Name: "Test Application", Aliases: ["Test", "App", "TestProject"]}),
(:Application {Name: "Another Application", Aliases: ["A-App", "XYZ", "XYProject"]}),
(:Application {Name: "Database X", Aliases: ["DB-App", "DB", "DB-Project"]}),
(:System {Name: "Server1", Application: "TestProject"}),
(:System {Name: "Server2", Application: "Test Application"}),
(:System {Name: "Server3", Application: "another App"}),
(:System {Name: "Server4", Application: "Some Database"}),
(:System {Name: "Server5", Application: "App"}),
(:System {Name: "Server6", Application: "App XY"}),
(:System {Name: "Server7", Application: "App DB"}),
(:System {Name: "Server8", Application: "Test"}),
(:System {Name: "Server9", Application: "TestProject"}),
(:System {Name: "Server10", Application: "test"}),
(:System {Name: "Server11", Application: "App XY"});
CREATE INDEX ON :Application(Name);
CREATE INDEX ON :Application(Aliases);
CREATE INDEX ON :System(Application);"><pre class="notranslate"><code class="notranslate">CREATE
(:Application {Name: "Test Application", Aliases: ["Test", "App", "TestProject"]}),
(:Application {Name: "Another Application", Aliases: ["A-App", "XYZ", "XYProject"]}),
(:Application {Name: "Database X", Aliases: ["DB-App", "DB", "DB-Project"]}),
(:System {Name: "Server1", Application: "TestProject"}),
(:System {Name: "Server2", Application: "Test Application"}),
(:System {Name: "Server3", Application: "another App"}),
(:System {Name: "Server4", Application: "Some Database"}),
(:System {Name: "Server5", Application: "App"}),
(:System {Name: "Server6", Application: "App XY"}),
(:System {Name: "Server7", Application: "App DB"}),
(:System {Name: "Server8", Application: "Test"}),
(:System {Name: "Server9", Application: "TestProject"}),
(:System {Name: "Server10", Application: "test"}),
(:System {Name: "Server11", Application: "App XY"});
CREATE INDEX ON :Application(Name);
CREATE INDEX ON :Application(Aliases);
CREATE INDEX ON :System(Application);
</code></pre></div>
<p dir="auto"><strong>Following queries are using the schema index:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PROFILE
MATCH (a:Application { Name: "Test Application" })
MATCH (s:System)
WHERE s.Application = a.Name
RETURN a,s;
neo4j-sh (?)$ PROFILE MATCH (a:Application { Name: "Test Application" }) MATCH (s:System) WHERE s.Application = a.Name RETURN a,s;
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | a | s |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[4]{Name:"Server2",Application:"Test Application"} |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> 1 row
==>
==> SchemaIndex(0)
==> |
==> +SchemaIndex(1)
==>
==> +----------------+------+--------+-------------+-------------------------------------------+
==> | Operator | Rows | DbHits | Identifiers | Other |
==> +----------------+------+--------+-------------+-------------------------------------------+
==> | SchemaIndex(0) | 1 | 4 | s, s | Property(a,Name(0)); :System(Application) |
==> | SchemaIndex(1) | 1 | 2 | a, a | { AUTOSTRING0}; :Application(Name) |
==> +----------------+------+--------+-------------+-------------------------------------------+
==>
==> Total database accesses: 6"><pre class="notranslate"><code class="notranslate">PROFILE
MATCH (a:Application { Name: "Test Application" })
MATCH (s:System)
WHERE s.Application = a.Name
RETURN a,s;
neo4j-sh (?)$ PROFILE MATCH (a:Application { Name: "Test Application" }) MATCH (s:System) WHERE s.Application = a.Name RETURN a,s;
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | a | s |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[4]{Name:"Server2",Application:"Test Application"} |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> 1 row
==>
==> SchemaIndex(0)
==> |
==> +SchemaIndex(1)
==>
==> +----------------+------+--------+-------------+-------------------------------------------+
==> | Operator | Rows | DbHits | Identifiers | Other |
==> +----------------+------+--------+-------------+-------------------------------------------+
==> | SchemaIndex(0) | 1 | 4 | s, s | Property(a,Name(0)); :System(Application) |
==> | SchemaIndex(1) | 1 | 2 | a, a | { AUTOSTRING0}; :Application(Name) |
==> +----------------+------+--------+-------------+-------------------------------------------+
==>
==> Total database accesses: 6
</code></pre></div>
<h2 dir="auto"></h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PROFILE
MATCH (a:Application { Name: "Test Application" })
MATCH (s:System)
WHERE s.Application IN a.Aliases
RETURN a,s;
neo4j-sh (?)$ PROFILE MATCH (a:Application { Name: "Test Application" }) MATCH (s:System) WHERE s.Application IN a.Aliases RETURN a,s;
==> +----------------------------------------------------------------------------------------------------------------------------+
==> | a | s |
==> +----------------------------------------------------------------------------------------------------------------------------+
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[10]{Name:"Server8",Application:"Test"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[7]{Name:"Server5",Application:"App"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[3]{Name:"Server1",Application:"TestProject"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[11]{Name:"Server9",Application:"TestProject"} |
==> +----------------------------------------------------------------------------------------------------------------------------+
==> 4 rows
==>
==> SchemaIndex(0)
==> |
==> +SchemaIndex(1)
==>
==> +----------------+------+--------+-------------+----------------------------------------------+
==> | Operator | Rows | DbHits | Identifiers | Other |
==> +----------------+------+--------+-------------+----------------------------------------------+
==> | SchemaIndex(0) | 4 | 9 | s, s | Property(a,Aliases(1)); :System(Application) |
==> | SchemaIndex(1) | 1 | 2 | a, a | { AUTOSTRING0}; :Application(Name) |
==> +----------------+------+--------+-------------+----------------------------------------------+
==>
==> Total database accesses: 11"><pre class="notranslate"><code class="notranslate">PROFILE
MATCH (a:Application { Name: "Test Application" })
MATCH (s:System)
WHERE s.Application IN a.Aliases
RETURN a,s;
neo4j-sh (?)$ PROFILE MATCH (a:Application { Name: "Test Application" }) MATCH (s:System) WHERE s.Application IN a.Aliases RETURN a,s;
==> +----------------------------------------------------------------------------------------------------------------------------+
==> | a | s |
==> +----------------------------------------------------------------------------------------------------------------------------+
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[10]{Name:"Server8",Application:"Test"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[7]{Name:"Server5",Application:"App"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[3]{Name:"Server1",Application:"TestProject"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[11]{Name:"Server9",Application:"TestProject"} |
==> +----------------------------------------------------------------------------------------------------------------------------+
==> 4 rows
==>
==> SchemaIndex(0)
==> |
==> +SchemaIndex(1)
==>
==> +----------------+------+--------+-------------+----------------------------------------------+
==> | Operator | Rows | DbHits | Identifiers | Other |
==> +----------------+------+--------+-------------+----------------------------------------------+
==> | SchemaIndex(0) | 4 | 9 | s, s | Property(a,Aliases(1)); :System(Application) |
==> | SchemaIndex(1) | 1 | 2 | a, a | { AUTOSTRING0}; :Application(Name) |
==> +----------------+------+--------+-------------+----------------------------------------------+
==>
==> Total database accesses: 11
</code></pre></div>
<p dir="auto"><strong>While combined with OR operator are not:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PROFILE
MATCH (a:Application { Name: "Test Application"})
MATCH (s:System)
WHERE s.Application = a.Name OR s.Application IN a.Aliases
RETURN a,s;
neo4j-sh (?)$ PROFILE MATCH (a:Application { Name: "Test Application"}) MATCH (s:System) WHERE s.Application = a.Name OR s.Application IN a.Aliases RETURN a,s;
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | a | s |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[3]{Name:"Server1",Application:"TestProject"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[4]{Name:"Server2",Application:"Test Application"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[7]{Name:"Server5",Application:"App"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[10]{Name:"Server8",Application:"Test"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[11]{Name:"Server9",Application:"TestProject"} |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> 5 rows
==>
==> Filter
==> |
==> +NodeByLabel
==> |
==> +SchemaIndex
==>
==> +-------------+------+--------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
==> | Operator | Rows | DbHits | Identifiers | Other |
==> +-------------+------+--------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
==> | Filter | 5 | 126 | | (Property(s,Application(2)) == Property(a,Name(0)) OR any(-_-INNER-_- in Property(a,Aliases(1)) where Property(s,Application(2)) == -_-INNER-_-)) |
==> | NodeByLabel | 11 | 12 | s, s | :System |
==> | SchemaIndex | 1 | 2 | a, a | { AUTOSTRING0}; :Application(Name) |
==> +-------------+------+--------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
==>
==> Total database accesses: 140"><pre class="notranslate"><code class="notranslate">PROFILE
MATCH (a:Application { Name: "Test Application"})
MATCH (s:System)
WHERE s.Application = a.Name OR s.Application IN a.Aliases
RETURN a,s;
neo4j-sh (?)$ PROFILE MATCH (a:Application { Name: "Test Application"}) MATCH (s:System) WHERE s.Application = a.Name OR s.Application IN a.Aliases RETURN a,s;
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | a | s |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[3]{Name:"Server1",Application:"TestProject"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[4]{Name:"Server2",Application:"Test Application"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[7]{Name:"Server5",Application:"App"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[10]{Name:"Server8",Application:"Test"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[11]{Name:"Server9",Application:"TestProject"} |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> 5 rows
==>
==> Filter
==> |
==> +NodeByLabel
==> |
==> +SchemaIndex
==>
==> +-------------+------+--------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
==> | Operator | Rows | DbHits | Identifiers | Other |
==> +-------------+------+--------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
==> | Filter | 5 | 126 | | (Property(s,Application(2)) == Property(a,Name(0)) OR any(-_-INNER-_- in Property(a,Aliases(1)) where Property(s,Application(2)) == -_-INNER-_-)) |
==> | NodeByLabel | 11 | 12 | s, s | :System |
==> | SchemaIndex | 1 | 2 | a, a | { AUTOSTRING0}; :Application(Name) |
==> +-------------+------+--------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
==>
==> Total database accesses: 140
</code></pre></div>
<p dir="auto"><strong>But this one works??</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PROFILE
MATCH (a:Application { Name: "Test Application"})
MATCH (s:System)
WHERE s.Application IN (a.Aliases + a.Name)
RETURN a,s;
neo4j-sh (?)$ PROFILE MATCH (a:Application { Name: "Test Application"}) MATCH (s:System) WHERE s.Application IN (a.Aliases + a.Name) RETURN a,s;
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | a | s |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[10]{Name:"Server8",Application:"Test"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[7]{Name:"Server5",Application:"App"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[3]{Name:"Server1",Application:"TestProject"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[11]{Name:"Server9",Application:"TestProject"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[4]{Name:"Server2",Application:"Test Application"} |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> 5 rows
==>
==> SchemaIndex(0)
==> |
==> +SchemaIndex(1)
==>
==> +----------------+------+--------+-------------+-----------------------------------------------------------------------+
==> | Operator | Rows | DbHits | Identifiers | Other |
==> +----------------+------+--------+-------------+-----------------------------------------------------------------------+
==> | SchemaIndex(0) | 5 | 13 | s, s | Add(Property(a,Aliases(1)),Property(a,Name(0))); :System(Application) |
==> | SchemaIndex(1) | 1 | 2 | a, a | { AUTOSTRING0}; :Application(Name) |
==> +----------------+------+--------+-------------+-----------------------------------------------------------------------+
==>
==> Total database accesses: 15"><pre class="notranslate"><code class="notranslate">PROFILE
MATCH (a:Application { Name: "Test Application"})
MATCH (s:System)
WHERE s.Application IN (a.Aliases + a.Name)
RETURN a,s;
neo4j-sh (?)$ PROFILE MATCH (a:Application { Name: "Test Application"}) MATCH (s:System) WHERE s.Application IN (a.Aliases + a.Name) RETURN a,s;
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | a | s |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[10]{Name:"Server8",Application:"Test"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[7]{Name:"Server5",Application:"App"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[3]{Name:"Server1",Application:"TestProject"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[11]{Name:"Server9",Application:"TestProject"} |
==> | Node[0]{Name:"Test Application",Aliases:["Test","App","TestProject"]} | Node[4]{Name:"Server2",Application:"Test Application"} |
==> +--------------------------------------------------------------------------------------------------------------------------------+
==> 5 rows
==>
==> SchemaIndex(0)
==> |
==> +SchemaIndex(1)
==>
==> +----------------+------+--------+-------------+-----------------------------------------------------------------------+
==> | Operator | Rows | DbHits | Identifiers | Other |
==> +----------------+------+--------+-------------+-----------------------------------------------------------------------+
==> | SchemaIndex(0) | 5 | 13 | s, s | Add(Property(a,Aliases(1)),Property(a,Name(0))); :System(Application) |
==> | SchemaIndex(1) | 1 | 2 | a, a | { AUTOSTRING0}; :Application(Name) |
==> +----------------+------+--------+-------------+-----------------------------------------------------------------------+
==>
==> Total database accesses: 15
</code></pre></div>
<p dir="auto">Ported from <a href="http://stackoverflow.com/questions/28746293/cypher-2-not-using-schema-index-with-or-operator" rel="nofollow">StackOverflow</a></p> | <p dir="auto">You guys might already be working on this, but this is a somewhat common use case that was easy with the old index syntax, and entirely too inefficient with the new indexes. Index hinting on this type of query returns an error, and the query without an index hint does a label scan for horrid performance.</p>
<p dir="auto">Query:<br>
match a:Crew using index a:Crew(name)<br>
where a.name="Neo" or a.name="Cypher"<br>
return a;<br>
Error: org.neo4j.cypher.IndexHintException: Can't use an index hint without an equality comparison on the correct node property label combo.<br>
Label: <code class="notranslate">Crew</code><br>
Property name: <code class="notranslate">name</code></p> | 1 |
<p dir="auto">Please add support for searching and opening .msc files like <code class="notranslate">gpedit.msc</code>.<br>
I want to open the gpedit.msc by typing <code class="notranslate">gpedit.msc</code> or <code class="notranslate">Group Policy Editor</code>.</p>
<p dir="auto"><strong>crutkas note:</strong><br>
This would add in items like device manager and other MMC items</p>
<h3 dir="auto">Additional hint</h3>
<p dir="auto">In start menu this command is marked as type "control panel" (de: "Systemsteuerung").</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/61519853/83948414-675eb780-a81d-11ea-8350-47aefcdcdc8f.png"><img src="https://user-images.githubusercontent.com/61519853/83948414-675eb780-a81d-11ea-8350-47aefcdcdc8f.png" alt="image" style="max-width: 100%;"></a></p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18363.836
PowerToys version: 0.18.1
PowerToy module for which you are reporting the bug (if applicable): Launcher"><pre class="notranslate"><code class="notranslate">Windows build number: 10.0.18363.836
PowerToys version: 0.18.1
PowerToy module for which you are reporting the bug (if applicable): Launcher
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Launch Launcher</li>
<li>Search any Windows Administrative Tools programs, such as Disk Management, Device Manager, Services, Defragment and Optimize Drives, etc.</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">You can't find those programs.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">You should be able to find them (unless it's a desired behaviour).</p>
<h1 dir="auto">Screenshots</h1>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12575216/82633448-501ca900-9c25-11ea-84ee-88335224e690.png"><img src="https://user-images.githubusercontent.com/12575216/82633448-501ca900-9c25-11ea-84ee-88335224e690.png" alt="Annotation 2020-05-22 121013" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12575216/82633477-60cd1f00-9c25-11ea-8915-6cc729234e96.png"><img src="https://user-images.githubusercontent.com/12575216/82633477-60cd1f00-9c25-11ea-8915-6cc729234e96.png" alt="Annotation 2020-05-22 121124" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12575216/82633502-6fb3d180-9c25-11ea-86eb-a68c9d5ce35f.png"><img src="https://user-images.githubusercontent.com/12575216/82633502-6fb3d180-9c25-11ea-86eb-a68c9d5ce35f.png" alt="Annotation 2020-05-22 121149" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-add-borders-around-your-elements" rel="nofollow">Waypoint: Add Borders Around your Elements</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">problem url: <a href="http://www.freecodecamp.com/challenges/waypoint-add-borders-around-your-elements" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-add-borders-around-your-elements</a></p>
<p dir="auto">passes every test except:<br>
Give your image a border width of 10px.</p>
<p dir="auto">Tried hard refresh, opening in new browser etc.</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="http://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;
}
.smaller-image {
width: 100px;
}
.thick-green-border{
border-color: green;
border-style: solid;
border-width: 10px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">link</span> <span class="pl-c1">href</span>="<span class="pl-s">http://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">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-c1">thick-green-border</span>{
<span class="pl-c1">border-color</span><span class="pl-kos">:</span> green;
<span class="pl-c1">border-style</span><span class="pl-kos">:</span> solid;
<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-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">img</span> <span class="pl-c1">class</span>="<span class="pl-s">smaller-image thick-green-border</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">p</span> <span class="pl-c1">class</span>="<span class="pl-s">red-text</span>"<span class="pl-kos">></span>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.<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">p</span> <span class="pl-c1">class</span>="<span class="pl-s">red-text</span>"<span class="pl-kos">></span>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span></pre></div> | <p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-add-borders-around-your-elements" rel="nofollow">http://freecodecamp.com/challenges/waypoint-add-borders-around-your-elements</a> has an issue. "Give your image a border width of 10px doesn't work.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/589755355db80b2b5bf6cdc491c5d610e532d09c7608d3af7affbc40aee974ca/687474703a2f2f692e696d6775722e636f6d2f54635a366776372e706e67"><img src="https://camo.githubusercontent.com/589755355db80b2b5bf6cdc491c5d610e532d09c7608d3af7affbc40aee974ca/687474703a2f2f692e696d6775722e636f6d2f54635a366776372e706e67" data-canonical-src="http://i.imgur.com/TcZ6gv7.png" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto"><em>Please make sure that this is a build/installation issue. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): CentOs 6.10 Linux: 2.6.32-754.2.1.el6.x86_64</li>
<li>TensorFlow installed from (source or binary): Conda install</li>
<li>TensorFlow version: 1.14.0</li>
<li>Python version: 3.7.5</li>
<li>Installed using virtualenv? pip? conda?: Conda</li>
<li>GCC/Compiler version (if compiling from source): c++ 4.9.2</li>
<li>CUDA/cuDNN version:</li>
<li>GPU model and memory:</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong><br>
Import error ImportError: /opt/gnu/gcc/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so). Indicated file is there at the path.</p>
<p dir="auto"><strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong><br>
Import tensorflow</p>
<p dir="auto"><strong>Any other info / logs</strong></p>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">import tensorflow<br>
Traceback (most recent call last):<br>
File "/home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <br>
from tensorflow.python.pywrap_tensorflow_internal import *<br>
File "/home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <br>
_pywrap_tensorflow_internal = swig_import_helper()<br>
File "/home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper<br>
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)<br>
File "/home/atanteck/anaconda3/lib/python3.7/imp.py", line 242, in load_module<br>
return load_dynamic(name, filename, file)<br>
File "/home/atanteck/anaconda3/lib/python3.7/imp.py", line 342, in load_dynamic<br>
return _load(spec)<br>
ImportError: /opt/gnu/gcc/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)</p>
</blockquote>
</blockquote>
</blockquote>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "", line 1, in <br>
File "/home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/<strong>init</strong>.py", line 34, in <br>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import<br>
File "/home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/python/<strong>init</strong>.py", line 49, in <br>
from tensorflow.python import pywrap_tensorflow<br>
File "/home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <br>
raise ImportError(msg)<br>
ImportError: Traceback (most recent call last):<br>
File "/home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <br>
from tensorflow.python.pywrap_tensorflow_internal import *<br>
File "/home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <br>
_pywrap_tensorflow_internal = swig_import_helper()<br>
File "/home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper<br>
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)<br>
File "/home/atanteck/anaconda3/lib/python3.7/imp.py", line 242, in load_module<br>
return load_dynamic(name, filename, file)<br>
File "/home/atanteck/anaconda3/lib/python3.7/imp.py", line 342, in load_dynamic<br>
return _load(spec)<br>
ImportError: /opt/gnu/gcc/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/atanteck/anaconda3/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)</p>
<p dir="auto">Failed to load the native TensorFlow runtime.</p>
<p dir="auto">See <a href="https://www.tensorflow.org/install/errors" rel="nofollow">https://www.tensorflow.org/install/errors</a></p>
<p dir="auto">for some common reasons and solutions. Include the entire stack trace<br>
above this error message when asking for help.</p> | <p dir="auto"><em>Please make sure that this is a build/installation issue. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): RedHat Enterprise Linux 7.6</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): binary</li>
<li>TensorFlow version: 1.13.1</li>
<li>Python version: 2.7.2</li>
<li>Installed using virtualenv? pip? conda?: virtualenv+pip</li>
<li>Bazel version (if compiling from source): n/a</li>
<li>GCC/Compiler version (if compiling from source): n/a</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">We noticed that TensorFlow 1.13.1 now comes with wheels for Python 3.7 as well:</p>
<p dir="auto">tensorflow-1.13.1-cp37-cp37m-manylinux1_x86_64.whl</p>
<p dir="auto">We first upgraded to 1.13.1 on our existing Python 3.6, which worked<br>
fine. Then we tried upgrading to Python 3.7, but even importing<br>
tensorflow fails there, because the shared libraries need a newer<br>
libstdc++:</p>
<p dir="auto">E ImportError: Traceback (most recent call last):<br>
E File "/home/anon/git/sensors/venv3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <br>
E from tensorflow.python.pywrap_tensorflow_internal import *<br>
E File "/home/anon/git/sensors/venv3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <br>
E _pywrap_tensorflow_internal = swig_import_helper()<br>
E File "/home/anon/git/sensors/venv3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper<br>
E _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)<br>
E File "/opt/anon/python-3.7.2-master-201903180831/lib/python3.7/imp.py", line 242, in load_module<br>
E return load_dynamic(name, filename, file)<br>
E File "/opt/anon/python-3.7.2-master-201903180831/lib/python3.7/imp.py", line 342, in load_dynamic<br>
E return _load(spec)<br>
E ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/anon/git/sensors/venv3/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)<br>
E<br>
E<br>
E Failed to load the native TensorFlow runtime.<br>
E<br>
E See <a href="https://www.tensorflow.org/install/errors" rel="nofollow">https://www.tensorflow.org/install/errors</a><br>
E<br>
E for some common reasons and solutions. Include the entire stack trace<br>
E above this error message when asking for help.</p>
<p dir="auto">This is error is logical, because RHEL/CentOS 7 only has support for 1.3.7 and earlier:</p>
<p dir="auto">(venv3) [anon@vdesk sensors]$ uname -a<br>
Linux vdesk.localdomain 3.10.0-957.5.1.el7.x86_64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115886302" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/1" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/1/hovercard" href="https://github.com/tensorflow/tensorflow/issues/1">#1</a> SMP Wed Dec 19 10:46:58 EST 2018 x86_64 x86_64 x86_64 GNU/Linux<br>
(venv3) [anon@vdesk sensors]$ cat /etc/redhat-release<br>
Red Hat Enterprise Linux Server release 7.6 (Maipo)<br>
(venv3) [anon@vdesk sensors]$ strings /lib64/libstdc++.so.6 | grep CXXABI<br>
CXXABI_1.3<br>
CXXABI_1.3.1<br>
CXXABI_1.3.2<br>
CXXABI_1.3.3<br>
CXXABI_1.3.4<br>
CXXABI_1.3.5<br>
CXXABI_1.3.6<br>
CXXABI_1.3.7<br>
CXXABI_TM_1<br>
(venv3) [anon@vdesk sensors]$ gcc --version<br>
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)<br>
Copyright (C) 2015 Free Software Foundation, Inc.<br>
This is free software; see the source for copying conditions. There is NO<br>
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
<p dir="auto">If you unzip the 3.6 and 3.7 wheels for TF 1.13.1, you can see that the 3.6 wheel is compiled on Ubuntu 14.04 with GCC 4.8:</p>
<p dir="auto">[anon@vdesk python]$ strings python36/tensorflow-1.13.1.data/purelib/tensorflow/libtensorflow_framework.so | grep -i ubuntu<br>
GCC: (Ubuntu 4.8.5-4ubuntu8~14.04.2) 4.8.5</p>
<p dir="auto">and the 3.7 wheel is compiled on Ubuntu 16.04 with GCC 5.4:</p>
<p dir="auto">[anon@vdesk python]$ strings python37/tensorflow-1.13.1.data/purelib/tensorflow/libtensorflow_framework.so | grep -i ubuntu<br>
GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609</p>
<p dir="auto">RHEL/CentOS 7 also has GCC 4.8.x, so that's why the Python 3.6 wheels work.</p>
<p dir="auto">Is there any chance you could build the Python 3.7 wheels on Ubuntu 14.04 as well?</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">Just importing tensorflow; works fine with the Python3.6 wheels.</p>
<p dir="auto"><strong>Any other info / logs</strong><br>
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.</p> | 1 |
<h3 dir="auto">Describe the issue:</h3>
<p dir="auto">Implicit type casting for binary operators seems to ignore types of scalar values, see code example below where the left operand is passed a 0D scalar and 1D array respectively.</p>
<p dir="auto">This behaviour provokes unexpected overflow errors in corner cases of empty shape tuples that can be easily overseen.</p>
<h3 dir="auto">Reproduce the 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
type_w_scalar = (np.ones((), dtype=np.int32) + np.ones(5, dtype=np.int16)).dtype
type_wo_scalar = (np.ones(1, dtype=np.int32) + np.ones(5, dtype=np.int16)).dtype
promoted_type = np.promote_types(np.int32, np.int16)
# Note that promoted_type == type_wo_scalar != type_w_scalar
# promoted_type == np.int32
# type_wo_scalar == np.int32
# type_w_scalar == np.int16
print(type_w_scalar, type_wo_scalar, promoted_type)"><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">type_w_scalar</span> <span class="pl-c1">=</span> (<span class="pl-s1">np</span>.<span class="pl-en">ones</span>((), <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">int32</span>) <span class="pl-c1">+</span> <span class="pl-s1">np</span>.<span class="pl-en">ones</span>(<span class="pl-c1">5</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">int16</span>)).<span class="pl-s1">dtype</span>
<span class="pl-s1">type_wo_scalar</span> <span class="pl-c1">=</span> (<span class="pl-s1">np</span>.<span class="pl-en">ones</span>(<span class="pl-c1">1</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">int32</span>) <span class="pl-c1">+</span> <span class="pl-s1">np</span>.<span class="pl-en">ones</span>(<span class="pl-c1">5</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">int16</span>)).<span class="pl-s1">dtype</span>
<span class="pl-s1">promoted_type</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">promote_types</span>(<span class="pl-s1">np</span>.<span class="pl-s1">int32</span>, <span class="pl-s1">np</span>.<span class="pl-s1">int16</span>)
<span class="pl-c"># Note that promoted_type == type_wo_scalar != type_w_scalar</span>
<span class="pl-c"># promoted_type == np.int32</span>
<span class="pl-c"># type_wo_scalar == np.int32</span>
<span class="pl-c"># type_w_scalar == np.int16</span>
<span class="pl-en">print</span>(<span class="pl-s1">type_w_scalar</span>, <span class="pl-s1">type_wo_scalar</span>, <span class="pl-s1">promoted_type</span>)</pre></div>
<h3 dir="auto">Error message:</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">NumPy/Python version information:</h3>
<p dir="auto">1.20.3 3.8.8 (default, Feb 24 2021, 21:46:12)<br>
[GCC 7.3.0]</p> | <p dir="auto">Using direct ufunc calls below to eliminate operator overloading from the test case:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> one_eps = 1.00000001
>>> np.greater_equal(np.array(1.0, np.float32), np.array(one_eps, np.float64))
False
>>> np.greater_equal(np.array([1.0], np.float32), np.array(one_eps, np.float64))
array([ True]) # wrong!
>>> np.greater_equal(np.array([1.0], np.float32), np.array([one_eps], np.float64))
array([False])
>>> np.greater_equal(np.array(1.0, np.float32), np.array([one_eps], np.float64))
array([False])"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">one_eps</span> <span class="pl-c1">=</span> <span class="pl-c1">1.00000001</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">np</span>.<span class="pl-en">greater_equal</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-c1">1.0</span>, <span class="pl-s1">np</span>.<span class="pl-s1">float32</span>), <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-s1">one_eps</span>, <span class="pl-s1">np</span>.<span class="pl-s1">float64</span>))
<span class="pl-c1">False</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">np</span>.<span class="pl-en">greater_equal</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1.0</span>], <span class="pl-s1">np</span>.<span class="pl-s1">float32</span>), <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-s1">one_eps</span>, <span class="pl-s1">np</span>.<span class="pl-s1">float64</span>))
<span class="pl-en">array</span>([ <span class="pl-c1">True</span>]) <span class="pl-c"># wrong!</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">np</span>.<span class="pl-en">greater_equal</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1.0</span>], <span class="pl-s1">np</span>.<span class="pl-s1">float32</span>), <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-s1">one_eps</span>], <span class="pl-s1">np</span>.<span class="pl-s1">float64</span>))
<span class="pl-en">array</span>([<span class="pl-c1">False</span>])
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">np</span>.<span class="pl-en">greater_equal</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-c1">1.0</span>, <span class="pl-s1">np</span>.<span class="pl-s1">float32</span>), <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-s1">one_eps</span>], <span class="pl-s1">np</span>.<span class="pl-s1">float64</span>))
<span class="pl-en">array</span>([<span class="pl-c1">False</span>])</pre></div>
<p dir="auto">Caused by <code class="notranslate">result_type</code> having some unusual rules:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> np.result_type(np.float32, np.float64)
dtype('float64') # ok
>>> np.result_type(np.float32, np.float64([1]))
dtype('float64') # ok
>>> np.result_type(np.float32, np.float64(1))
dtype('float32') # what"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">np</span>.<span class="pl-en">result_type</span>(<span class="pl-s1">np</span>.<span class="pl-s1">float32</span>, <span class="pl-s1">np</span>.<span class="pl-s1">float64</span>)
<span class="pl-en">dtype</span>(<span class="pl-s">'float64'</span>) <span class="pl-c"># ok</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">np</span>.<span class="pl-en">result_type</span>(<span class="pl-s1">np</span>.<span class="pl-s1">float32</span>, <span class="pl-s1">np</span>.<span class="pl-en">float64</span>([<span class="pl-c1">1</span>]))
<span class="pl-en">dtype</span>(<span class="pl-s">'float64'</span>) <span class="pl-c"># ok</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">np</span>.<span class="pl-en">result_type</span>(<span class="pl-s1">np</span>.<span class="pl-s1">float32</span>, <span class="pl-s1">np</span>.<span class="pl-en">float64</span>(<span class="pl-c1">1</span>))
<span class="pl-en">dtype</span>(<span class="pl-s">'float32'</span>) <span class="pl-c"># what</span></pre></div>
<p dir="auto">This seems wrong to me, but appears to be deliberate.</p>
<p dir="auto">It seems the goal here is to interpret python scalars as loosely-typed (in the presence of arrays). This handles thing like:</p>
<ul dir="auto">
<li>letting integer literals choose between signed and unsigned</li>
<li>letting number literals have smaller representations than <code class="notranslate">float64</code> and <code class="notranslate">int_</code> if they'd fit</li>
</ul>
<p dir="auto">However, the method is too greedy, and also (in the presence of arrays) discards type information from:</p>
<ol dir="auto">
<li><code class="notranslate">np.number</code> instances with an explicit type, like <code class="notranslate">np.int64(1)</code> and <code class="notranslate">np.float32(1)</code></li>
<li>0d <code class="notranslate">ndarray</code> instances, by decaying them to their scalars</li>
</ol>
<p dir="auto">The problem is that <code class="notranslate">PyArray_ResultType</code> (and the ufunc type resolver) has lost the information about where it's array arguments came from, and whether their types are explicit or implicit.</p> | 1 |
<p dir="auto">Steps to reproduce:</p>
<p dir="auto">Click on the currently open file in the sidebar so its tab becomes active.<br>
Press Ctrl+A to select all text.</p>
<p dir="auto">Expected result: all text selected<br>
Actual result: nothing selected, the focus is not set on the active tab.</p> | <p dir="auto">when i select a file in the folder view (left side)... why this do not change the focus to the content of the file??</p>
<p dir="auto">because my workflow is:</p>
<ol dir="auto">
<li>select a file</li>
<li>press Ctrl+f to search something (but nothing happens because the focus is still on the folder view)</li>
</ol>
<p dir="auto">everytime i have to click on the content of the file to get the focus... this is a bit disadvantageous</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: Microsoft Windows NT 10.0.18362.0
Windows Terminal version (if applicable): 0.6.2951.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows NT 10.0.18362.0
Windows Terminal version (if applicable): 0.6.2951.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Open Terminal and look at the window title bar.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">I would expect the title bar to use the same color/theme as the other apps in the system.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The title bar is of a different color (a light gray).</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18362.0
Windows Terminal version: 0.5.2681.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.0
Windows Terminal version: 0.5.2681.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Set that profiles in settings:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"backgroundImage": "ms-appdata:///roaming/arthas.jpg", //any Image
"backgroundImageOpacity": 0.25,
"backgroundImageStretchMode": "uniformToFill"
},
{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"name": "PowerShell Core",
"source": "Windows.Terminal.PowershellCore",
"backgroundImage": "ms-appdata:///roaming/arthas.jpg", //any Image
"backgroundImageOpacity": 0.25,
"backgroundImageStretchMode": "uniformToFill"
}"><pre class="notranslate"><code class="notranslate">{
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"backgroundImage": "ms-appdata:///roaming/arthas.jpg", //any Image
"backgroundImageOpacity": 0.25,
"backgroundImageStretchMode": "uniformToFill"
},
{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"name": "PowerShell Core",
"source": "Windows.Terminal.PowershellCore",
"backgroundImage": "ms-appdata:///roaming/arthas.jpg", //any Image
"backgroundImageOpacity": 0.25,
"backgroundImageStretchMode": "uniformToFill"
}
</code></pre></div>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Both profiles should look the same</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">In the Windows Powershell profile the image is more whitish than in the Powershell Core profile</p>
<p dir="auto">Powershell Core Profile<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3045903/65799503-a7c44c80-e14a-11e9-8743-8fcc64bc04e1.png"><img src="https://user-images.githubusercontent.com/3045903/65799503-a7c44c80-e14a-11e9-8743-8fcc64bc04e1.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Windows Powershell profile<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3045903/65799542-bd397680-e14a-11e9-9c4e-614fafad127d.png"><img src="https://user-images.githubusercontent.com/3045903/65799542-bd397680-e14a-11e9-9c4e-614fafad127d.png" alt="image" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">Hello,</p>
<p dir="auto">I'm a CG artist and I'm working in 3d studio max (among other software) and the program has a lot of separate windows that need to be in view all the time. Therefore I bought a new big 45" monitor so I can view all the windows and settings at once. Unfortunately Fance zones doesn't work with programs that have multiple windows within the same program so snapping the main window to a zone works but snapping the other ones to other zones doesn't work.</p>
<p dir="auto">When I saw PowerToys for the first time and noticed that Fancy Zones feature it actually had me come up with the idea to buy such a big monitor. I would very much like to be able to snap those windows to their zones and improve my workflow this way.</p>
<p dir="auto">Thanks in advance.</p>
<p dir="auto">Regarsd,<br>
Joep Swagemakers</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.17763.1039]
PowerToys version: 0.14 - 0.15
PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.17763.1039]
PowerToys version: 0.14 - 0.15
PowerToy module for which you are reporting the bug (if applicable): FancyZones
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Create FancyZone layout, use mouse to drag-and-drop "Solution Explorer" or any other window from Visual Studio (except main window) into a zone.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The window resizes to the zone accordingly, works in v0.13 of PowerToys.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The window does not resize to the zone.</p>
<p dir="auto">In version 0.14 it is still possible to arrange the window by activating the "Override Windows snap hotkeys..."-option and using hotkeys to arrange it into place. Drag-and-drop does not work.</p>
<p dir="auto">In version 0.15+ there is no option to arrange these windows into a zone.</p> | 1 |
<p dir="auto">After few seconds working on a PHP file, the editor panel hangs and the whole program needs to be killed.<br>
Only the editor panel stops responding, while the menu bar can be clicked (but clicking on "Exit" doesn't produce any effect).</p>
<p dir="auto">Task manager shows a stable 40% CPU load coming from code.exe process.</p>
<p dir="auto">Windows 10 Pro x64 build 1511<br>
VSCode 0.10.1</p> | <p dir="auto">Sometimes editor just freeze. Kill task helps only. Have this problem at work and home.<br>
I noticed that this started after latest update (0.10.1).</p>
<p dir="auto">Working in PHP files.</p>
<p dir="auto">Windows 10 64.</p> | 1 |
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide a description of the new feature</h2>
<p dir="auto"><em>What is the expected behavior of the proposed feature? What is the scenario this would be used?</em></p>
<p dir="auto">---Now PowerToys can only run after installing the installer. Could we have a portable version? A folder contains all the essential components would do the job. A single file executable would be the best. Thus we could throw it in OneDrive and keep the configuration consistent across multiple machines.</p>
<p dir="auto">If you'd like to see this feature implemented, add a 👍 reaction to this post.</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.18363.836]
PowerToys version: 0.18.0
PowerToy module for which you are reporting the bug (if applicable): PowerToysRun"><pre class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [version 10.0.18363.836]
PowerToys version: 0.18.0
PowerToy module for which you are reporting the bug (if applicable): PowerToysRun
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>start powertoys</li>
<li>once the quicklaunch icon is there, attempt to press <code class="notranslate">alt + space</code></li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The run dialog should appear.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The window menu appears instead (which usually gets triggered by pressing <code class="notranslate">alt + space</code>:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/199648/82418479-56702100-9a7d-11ea-9108-fb8f5d1d13a9.png"><img src="https://user-images.githubusercontent.com/199648/82418479-56702100-9a7d-11ea-9108-fb8f5d1d13a9.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Only after a rather long (5-10 seconds) delay PowerToysRun appears to work.</p>
<h1 dir="auto">Screenshots</h1> | 0 |
<h4 dir="auto">Describe the issue</h4>
<p dir="auto">Just upgrading a project from quasar 1 to 2. Have a simple Axios integration but have isolated the problem to an even smaller example. I get double base urls on my requests.</p>
<h4 dir="auto">Example Code</h4>
<p dir="auto">I have a boot.ts file exports a boot function like this:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default boot(() => {
axios.defaults.baseURL = process.env.REMOTE;
void axios.get('/user/renewToken')
.then((response) => {
console.log('got response');
console.log(response);
});
});"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">boot</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-s1">axios</span><span class="pl-kos">.</span><span class="pl-c1">defaults</span><span class="pl-kos">.</span><span class="pl-c1">baseURL</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">REMOTE</span><span class="pl-kos">;</span>
<span class="pl-k">void</span> <span class="pl-s1">axios</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'/user/renewToken'</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">response</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">'got response'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">response</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>
<h4 dir="auto">Expected behavior, if applicable</h4>
<p dir="auto">I expect to get a simple request to <a href="http://localhost:8081/user/renewToken" rel="nofollow">http://localhost:8081/user/renewToken</a></p>
<h4 dir="auto">Environment</h4>
<ul dir="auto">
<li>Axios Version [e.g. 0.21.1]</li>
<li>Adapter [e.g. XHR/HTTP]</li>
<li>Browser [Safari]</li>
<li>Browser Version [e.g. 14.1.1]</li>
<li>Node.js Version [e.g. 14.17.3]</li>
<li>OS: [MacOS 14.4]</li>
<li>Quasar v2</li>
</ul>
<h4 dir="auto">Additional context/Screenshots</h4>
<p dir="auto">Add any other context about the problem here. If applicable, add screenshots to help explain.</p> | <h4 dir="auto">Describe the bug</h4>
<p dir="auto">In version 1.1.0 (via unpkg cdn <a href="https://unpkg.com/axios/dist/axios.min.js" rel="nofollow">https://unpkg.com/axios/dist/axios.min.js</a>)<br>
<code class="notranslate">axios.create</code> is undefined.</p>
<h4 dir="auto">To Reproduce</h4>
<p dir="auto">Create an html document with<br>
<code class="notranslate"><script src="https://unpkg.com/axios/dist/axios.min.js"></script></code></p>
<p dir="auto">From JS, attempt to access <code class="notranslate">axios.create</code></p>
<p dir="auto">Result: undefined.</p>
<h4 dir="auto">Expected behavior</h4>
<p dir="auto"><code class="notranslate">axios.create</code> To be defined and point to where it should.</p>
<h4 dir="auto">Environment</h4>
<ul dir="auto">
<li>Axios Version 1.1.0</li>
<li>Electron/10.2.0 Chrome/85.0.4183.121</li>
<li>Node/12.16.3</li>
<li>OS: Win10 2004 19041.985</li>
</ul> | 0 |
<p dir="auto">Object Spread Initializers is a proposed feature of ES2016 and is very useful when writing Redux reducers. The syntax is supported in babel, but when using the feature in Visual Studio Code it will mark the spread operator as a syntax error.</p>
<p dir="auto">See: <a href="https://github.com/sebmarkbage/ecmascript-rest-spread/blob/master/Spread.md">https://github.com/sebmarkbage/ecmascript-rest-spread/blob/master/Spread.md</a><br>
for more information of the feature.</p>
<p dir="auto">It would be very nice if Visual Studio Code did not mark the use of this feature as an error with a red squiggly.</p>
<p dir="auto">The current behavior in Visual Studio Code is also described in Issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="123821951" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/1640" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/1640/hovercard" href="https://github.com/microsoft/vscode/issues/1640">#1640</a></p> | <p dir="auto">es7 proposal : <a href="https://github.com/sebmarkbage/ecmascript-rest-spread">https://github.com/sebmarkbage/ecmascript-rest-spread</a></p>
<h2 dir="auto">Spread properties</h2>
<h3 dir="auto">Typing</h3>
<p dir="auto">In my opinion the goal of this method is to be able to duplicate an object and changing some props, so I think it's particularly important in this case to not check duplicate property declaration :</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var obj = { x: 1, y: 2};
var obj1 = {...obj, z: 3, y: 4}; // not an error"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">x</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">y</span>: <span class="pl-c1">2</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">obj1</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>...<span class="pl-s1">obj</span><span class="pl-kos">,</span> <span class="pl-c1">z</span>: <span class="pl-c1">3</span><span class="pl-kos">,</span> <span class="pl-c1">y</span>: <span class="pl-c1">4</span><span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c">// not an error</span></pre></div>
<p dir="auto">I have a very naive <a href="https://github.com/fdecampredon/jsx-typescript/blob/3c692cbb80622b74d1b308b3c5dcab6b993b4111/src/compiler/checker.ts#L5665-L5671">type check algorithm</a> for a similar feature (<code class="notranslate">JSXSpreadAttribute</code>) in my little <code class="notranslate">jsx-typescript</code> fork: I just copy the properties of the <em>spread object</em> in the properties table when I encounter a spread object, and override those property if I encounter a declaration with a similar name.</p>
<h3 dir="auto">Emitting</h3>
<p dir="auto"><a href="https://github.com/facebook/jstransform/">jstransform</a> use <code class="notranslate">Object.assign</code>, <a href="https://babeljs.io/" rel="nofollow">babel</a> introduce a shim:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">_extends</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">assign</span> <span class="pl-c1">||</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1"><</span> <span class="pl-smi">arguments</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">source</span> <span class="pl-c1">=</span> <span class="pl-smi">arguments</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">key</span> <span class="pl-k">in</span> <span class="pl-s1">source</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-c1">hasOwnProperty</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">source</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">target</span><span class="pl-kos">[</span><span class="pl-s1">key</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">source</span><span class="pl-kos">[</span><span class="pl-s1">key</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-s1">target</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">We could either force the presence of <code class="notranslate">assign</code> function on <code class="notranslate">ObjectConstructor</code> interface, or provide a similar function (with a different name).</p>
<p dir="auto">I think that the optimal solution would be to not emit any helper in <code class="notranslate">es6</code> target (or if <code class="notranslate">Object.assign</code> is defined), and to emit an helper function for <code class="notranslate">es5</code>, <code class="notranslate">es3</code>.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var obj = { x: 1, y: 2};
var obj1 = {...obj, z: 3};
/// ES6 emit
var obj = {x: 1, y: 2};
var obj1= Object.assign({}, obj, { z: 3 });
//ES3 emit
var __assign = function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var obj = {x: 1, y: 2};
var obj1= __assign({}, obj, { z: 3 });"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">x</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">y</span>: <span class="pl-c1">2</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">obj1</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>...<span class="pl-s1">obj</span><span class="pl-kos">,</span> <span class="pl-c1">z</span>: <span class="pl-c1">3</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-c">/// ES6 emit</span>
<span class="pl-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-c1">x</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">y</span>: <span class="pl-c1">2</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">obj1</span><span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">assign</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">obj</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">z</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-c">//ES3 emit</span>
<span class="pl-k">var</span> <span class="pl-en">__assign</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1"><</span> <span class="pl-smi">arguments</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">source</span> <span class="pl-c1">=</span> <span class="pl-smi">arguments</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">key</span> <span class="pl-k">in</span> <span class="pl-s1">source</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-c1">hasOwnProperty</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">source</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">target</span><span class="pl-kos">[</span><span class="pl-s1">key</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">source</span><span class="pl-kos">[</span><span class="pl-s1">key</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">return</span> <span class="pl-s1">target</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-c1">x</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">y</span>: <span class="pl-c1">2</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">obj1</span><span class="pl-c1">=</span> <span class="pl-en">__assign</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">obj</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">z</span>: <span class="pl-c1">3</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h2 dir="auto">Rest properties</h2>
<h3 dir="auto">Typing</h3>
<p dir="auto">For simple object the new type is a subtype of the assignation that does not contains properties that has been captured before the rest properties :</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var obj = {x:1, y: 1, z: 1};
var {z, ...obj1} = obj;
obj1// {x: number; y:number};"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-c1">x</span>:<span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">y</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">z</span>: <span class="pl-c1">1</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-kos">{</span>z<span class="pl-kos">,</span> ...<span class="pl-s1">obj1</span><span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">obj</span><span class="pl-kos">;</span>
<span class="pl-s1">obj1</span><span class="pl-c">// {x: number; y:number};</span></pre></div>
<p dir="auto">If the destructuring assignment has an index declaration, the result has also a similar index declaration:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var obj: { [string: string]: string };
var {[excludedId], ...obj1} = obj;
obj1// { [string: string]: string };"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">obj</span>: <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">string</span>: <span class="pl-smi">string</span><span class="pl-kos">]</span>: <span class="pl-smi">string</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-kos">{</span><span class="pl-kos">[</span><span class="pl-s1">excludedId</span><span class="pl-kos">]</span><span class="pl-kos">,</span> ...<span class="pl-s1">obj1</span><span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">obj</span><span class="pl-kos">;</span>
<span class="pl-s1">obj1</span><span class="pl-c">// { [string: string]: string };</span></pre></div>
<p dir="auto">new/call declarations are obviously not captured:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var obj: { (): void; property: string};
var { ...obj1} = obj;
obj1// { property: string };"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">obj</span>: <span class="pl-kos">{</span> <span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span> <span class="pl-c1">property</span>: <span class="pl-smi">string</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-kos">{</span> ...<span class="pl-s1">obj1</span><span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">obj</span><span class="pl-kos">;</span>
<span class="pl-s1">obj1</span><span class="pl-c">// { property: string };</span></pre></div>
<h3 dir="auto">Emitting</h3>
<p dir="auto">It is not possible to emit <em>rest properties</em> without an helper function, this one is from babel:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var obj = {x:1, y: 1, z: 1};
var {z, ...obj1} = obj;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-c1">x</span>:<span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">y</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">z</span>: <span class="pl-c1">1</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-kos">{</span>z<span class="pl-kos">,</span> ...<span class="pl-s1">obj1</span><span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">obj</span><span class="pl-kos">;</span></pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var __objectWithoutProperties = function(obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
};
var obj = {x:1, y: 1, z: 1};
var z = obj.z;
var obj1 = __objectWithoutProperties(obj, ["z"]);"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-en">__objectWithoutProperties</span> <span class="pl-c1">=</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">obj</span><span class="pl-kos">,</span> <span class="pl-s1">keys</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">target</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">i</span> <span class="pl-k">in</span> <span class="pl-s1">obj</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">keys</span><span class="pl-kos">.</span><span class="pl-en">indexOf</span><span class="pl-kos">(</span><span class="pl-s1">i</span><span class="pl-kos">)</span> <span class="pl-c1">>=</span> <span class="pl-c1">0</span><span class="pl-kos">)</span> <span class="pl-k">continue</span><span class="pl-kos">;</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-c1">hasOwnProperty</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">obj</span><span class="pl-kos">,</span> <span class="pl-s1">i</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-k">continue</span><span class="pl-kos">;</span>
<span class="pl-s1">target</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">obj</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">return</span> <span class="pl-s1">target</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-c1">x</span>:<span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">y</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">z</span>: <span class="pl-c1">1</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">z</span> <span class="pl-c1">=</span> <span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">z</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">obj1</span> <span class="pl-c1">=</span> <span class="pl-en">__objectWithoutProperties</span><span class="pl-kos">(</span><span class="pl-s1">obj</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"z"</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><em>Edit: added some little typing/emitting example</em></p> | 1 |
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 4.5.0, 4.5.2, 4.5.4</li>
<li>Operating System / Platform => Linux x86_64 Ubuntu 18.04, 20.04</li>
<li>Compiler => C++/GCC 7.5.0, running OpenCV through python 3.8</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Hello!<br>
I'm aware that if CUDA is initialized in the main process, but accessed via a forked child process, then CUDA is not expected to work (see <a href="https://forums.developer.nvidia.com/t/python-opencv-multiprocessing-doesnt-work-with-cuda/180195" rel="nofollow">here</a>). This is an issue with CUDA and occurs with multiple CUDA-based packages including OpenCV, numba, pytorch, etc.</p>
<p dir="auto">However, I'm experiencing an issue with OpenCV DNN DetectionModels when:</p>
<ul dir="auto">
<li>CUDA is initialized in the main process</li>
<li>a trivial child process is forked</li>
<li>the model is used within the main process</li>
</ul>
<p dir="auto">Specifically, instead of throwing any errors, the model returns whatever the last results were, forever.</p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">I've tested this with multiple OpenCV versions compiled with CUDA using the following python script:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import cv2
import time
from multiprocessing import Process
def func():
for i in range(5):
print(i)
time.sleep(1)
if __name__ == '__main__':
print('Using opencv version', cv2.__version__)
print('loading yolo dnn model')
net = cv2.dnn.readNet('/path/to/yolov4.weights', '/path/to/yolov4.cfg')
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA_FP16)
model = cv2.dnn_DetectionModel(net)
model.setInputParams(size=(512, 512), scale=1 / 255)
print('loading images')
img_with_human = cv2.resize(cv2.imread('/path/to/lena.jpg'), (512, 512))
linux_logo_image = cv2.resize(cv2.imread('/path/to/LinuxLogo.jpg'), (512, 512))
print('Running yolo on the linux logo image:', model.detect(linux_logo_image))
print('Running yolo on image with a human:', model.detect(img_with_human))
print('starting child process')
p1 = Process(target=func)
p1.start()
time.sleep(2)
print('Running yolo on the linux logo image:', model.detect(linux_logo_image))
p1.join()
print('child process completed')
print('Running yolo on the linux logo image:', model.detect(linux_logo_image))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">cv2</span>
<span class="pl-k">import</span> <span class="pl-s1">time</span>
<span class="pl-k">from</span> <span class="pl-s1">multiprocessing</span> <span class="pl-k">import</span> <span class="pl-v">Process</span>
<span class="pl-k">def</span> <span class="pl-en">func</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">5</span>):
<span class="pl-en">print</span>(<span class="pl-s1">i</span>)
<span class="pl-s1">time</span>.<span class="pl-en">sleep</span>(<span class="pl-c1">1</span>)
<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>:
<span class="pl-en">print</span>(<span class="pl-s">'Using opencv version'</span>, <span class="pl-s1">cv2</span>.<span class="pl-s1">__version__</span>)
<span class="pl-en">print</span>(<span class="pl-s">'loading yolo dnn model'</span>)
<span class="pl-s1">net</span> <span class="pl-c1">=</span> <span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-en">readNet</span>(<span class="pl-s">'/path/to/yolov4.weights'</span>, <span class="pl-s">'/path/to/yolov4.cfg'</span>)
<span class="pl-s1">net</span>.<span class="pl-en">setPreferableBackend</span>(<span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-v">DNN_BACKEND_CUDA</span>)
<span class="pl-s1">net</span>.<span class="pl-en">setPreferableTarget</span>(<span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-v">DNN_TARGET_CUDA_FP16</span>)
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-s1">cv2</span>.<span class="pl-en">dnn_DetectionModel</span>(<span class="pl-s1">net</span>)
<span class="pl-s1">model</span>.<span class="pl-en">setInputParams</span>(<span class="pl-s1">size</span><span class="pl-c1">=</span>(<span class="pl-c1">512</span>, <span class="pl-c1">512</span>), <span class="pl-s1">scale</span><span class="pl-c1">=</span><span class="pl-c1">1</span> <span class="pl-c1">/</span> <span class="pl-c1">255</span>)
<span class="pl-en">print</span>(<span class="pl-s">'loading images'</span>)
<span class="pl-s1">img_with_human</span> <span class="pl-c1">=</span> <span class="pl-s1">cv2</span>.<span class="pl-en">resize</span>(<span class="pl-s1">cv2</span>.<span class="pl-en">imread</span>(<span class="pl-s">'/path/to/lena.jpg'</span>), (<span class="pl-c1">512</span>, <span class="pl-c1">512</span>))
<span class="pl-s1">linux_logo_image</span> <span class="pl-c1">=</span> <span class="pl-s1">cv2</span>.<span class="pl-en">resize</span>(<span class="pl-s1">cv2</span>.<span class="pl-en">imread</span>(<span class="pl-s">'/path/to/LinuxLogo.jpg'</span>), (<span class="pl-c1">512</span>, <span class="pl-c1">512</span>))
<span class="pl-en">print</span>(<span class="pl-s">'Running yolo on the linux logo image:'</span>, <span class="pl-s1">model</span>.<span class="pl-en">detect</span>(<span class="pl-s1">linux_logo_image</span>))
<span class="pl-en">print</span>(<span class="pl-s">'Running yolo on image with a human:'</span>, <span class="pl-s1">model</span>.<span class="pl-en">detect</span>(<span class="pl-s1">img_with_human</span>))
<span class="pl-en">print</span>(<span class="pl-s">'starting child process'</span>)
<span class="pl-s1">p1</span> <span class="pl-c1">=</span> <span class="pl-v">Process</span>(<span class="pl-s1">target</span><span class="pl-c1">=</span><span class="pl-s1">func</span>)
<span class="pl-s1">p1</span>.<span class="pl-en">start</span>()
<span class="pl-s1">time</span>.<span class="pl-en">sleep</span>(<span class="pl-c1">2</span>)
<span class="pl-en">print</span>(<span class="pl-s">'Running yolo on the linux logo image:'</span>, <span class="pl-s1">model</span>.<span class="pl-en">detect</span>(<span class="pl-s1">linux_logo_image</span>))
<span class="pl-s1">p1</span>.<span class="pl-en">join</span>()
<span class="pl-en">print</span>(<span class="pl-s">'child process completed'</span>)
<span class="pl-en">print</span>(<span class="pl-s">'Running yolo on the linux logo image:'</span>, <span class="pl-s1">model</span>.<span class="pl-en">detect</span>(<span class="pl-s1">linux_logo_image</span>))</pre></div>
<p dir="auto">which prints the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using opencv version 4.5.0
loading yolo dnn model
loading images
Running yolo on the linux logo image: ((), (), ())
Running yolo on image with a human: (array([[0],
[0],
[0],
[0],
[0],
[0]], dtype=int32), array([[0.62353516],
[0.6425781 ],
[0.87402344],
[0.89208984],
[0.5029297 ],
[0.5678711 ]], dtype=float32), array([[ 41, 48, 354, 459],
[ 39, 46, 360, 463],
[ 41, 46, 388, 464],
[ 40, 43, 391, 469],
[ 43, 81, 384, 429],
[ 43, 79, 384, 431]], dtype=int32))
starting child process
0
1
2
Running yolo on the linux logo image: (array([[0],
[0],
[0],
[0],
[0],
[0]], dtype=int32), array([[0.62353516],
[0.6425781 ],
[0.87402344],
[0.89208984],
[0.5029297 ],
[0.5678711 ]], dtype=float32), array([[ 41, 48, 354, 459],
[ 39, 46, 360, 463],
[ 41, 46, 388, 464],
[ 40, 43, 391, 469],
[ 43, 81, 384, 429],
[ 43, 79, 384, 431]], dtype=int32))
3
4
child process completed
Running yolo on the linux logo image: (array([[0],
[0],
[0],
[0],
[0],
[0]], dtype=int32), array([[0.62353516],
[0.6425781 ],
[0.87402344],
[0.89208984],
[0.5029297 ],
[0.5678711 ]], dtype=float32), array([[ 41, 48, 354, 459],
[ 39, 46, 360, 463],
[ 41, 46, 388, 464],
[ 40, 43, 391, 469],
[ 43, 81, 384, 429],
[ 43, 79, 384, 431]], dtype=int32))"><pre class="notranslate"><code class="notranslate">Using opencv version 4.5.0
loading yolo dnn model
loading images
Running yolo on the linux logo image: ((), (), ())
Running yolo on image with a human: (array([[0],
[0],
[0],
[0],
[0],
[0]], dtype=int32), array([[0.62353516],
[0.6425781 ],
[0.87402344],
[0.89208984],
[0.5029297 ],
[0.5678711 ]], dtype=float32), array([[ 41, 48, 354, 459],
[ 39, 46, 360, 463],
[ 41, 46, 388, 464],
[ 40, 43, 391, 469],
[ 43, 81, 384, 429],
[ 43, 79, 384, 431]], dtype=int32))
starting child process
0
1
2
Running yolo on the linux logo image: (array([[0],
[0],
[0],
[0],
[0],
[0]], dtype=int32), array([[0.62353516],
[0.6425781 ],
[0.87402344],
[0.89208984],
[0.5029297 ],
[0.5678711 ]], dtype=float32), array([[ 41, 48, 354, 459],
[ 39, 46, 360, 463],
[ 41, 46, 388, 464],
[ 40, 43, 391, 469],
[ 43, 81, 384, 429],
[ 43, 79, 384, 431]], dtype=int32))
3
4
child process completed
Running yolo on the linux logo image: (array([[0],
[0],
[0],
[0],
[0],
[0]], dtype=int32), array([[0.62353516],
[0.6425781 ],
[0.87402344],
[0.89208984],
[0.5029297 ],
[0.5678711 ]], dtype=float32), array([[ 41, 48, 354, 459],
[ 39, 46, 360, 463],
[ 41, 46, 388, 464],
[ 40, 43, 391, 469],
[ 43, 81, 384, 429],
[ 43, 79, 384, 431]], dtype=int32))
</code></pre></div>
<p dir="auto">As we can see, when the model runs in the main process on the LinuxLogo image, it returns no detections. Then when it runs on the image of Lena, it returns some detections. A fairly basic child process is forked, and then in the main process the model runs again on the LinuxLogo image but now returns detections. Even after the child process is joined, the model is still returning detections on the LinuxLogo image.</p>
<p dir="auto">I don't really understand what's happening under the hood, but somehow the DNN model is being corrupted. I've done similar tests with PyTorch and haven't experienced the same issue, so I'm hoping it's fixable! OpenCV is really fast and I would prefer to use it.</p>
<p dir="auto">Appreciate your help!</p>
<p dir="auto">The images I'm using are <a href="https://github.com/opencv/opencv/blob/master/samples/data/lena.jpg">lena.jpg</a>, <a href="https://github.com/opencv/opencv/blob/master/samples/data/LinuxLogo.jpg">LinuxLogo.jpg</a>. And here are the <a href="https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4.cfg">yolo cfg</a> and <a href="https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights">weights</a> files.</p>
<h5 dir="auto">Issue submission checklist</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I report the issue, it's not a question</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I checked the problem with documentation, FAQ, open issues,<br>
forum.opencv.org, Stack Overflow, etc and have not found any solution</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I updated to the latest OpenCV version and the issue is still there</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> There is reproducer code and related data files: videos, images, onnx, etc</li>
</ul> | <h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 2.4.13.6</li>
<li>Operating System / Platform => Windows 10 64 Bit</li>
<li>Compiler => Visual Studio 2017</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">When compiling my project using x86 config, there were no errors.<br>
When compiling using <strong>x64</strong> config, errors were all about <em>type_c.h</em> in opencv.<br>
It seems an issue about <strong><emmintrin.h></strong>, but I don't know what's wrong.<br>
Error message:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11918823/51451244-5e2b9280-1d6f-11e9-9e13-c394786453f7.png"><img src="https://user-images.githubusercontent.com/11918823/51451244-5e2b9280-1d6f-11e9-9e13-c394786453f7.png" alt="default" style="max-width: 100%;"></a></p>
<h5 dir="auto">Steps to reproduce</h5> | 0 |
<p dir="auto">The code in <a href="https://gist.github.com/jiahao/d58c0647354fbd0f1e6d">this gist</a> triggers a strange error on OSX.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Array(Float64,(6,6)) 6x6 Array{Float64,2}:
ERROR: LoadError: ArgumentError: can't repeat a string -1 times
in repeat at ./strings/types.jl:176
in print_matrix_row at show.jl:1017
in print_matrix at show.jl:1061
in showarray at show.jl:1229
in xdump at show.jl:908
in anonymous at show.jl:913
in with_output_limit at ./show.jl:1246
in xdump at show.jl:913
in truncate! at 12899.jl:176
in thickrestartbidiag at 12899.jl:52
in thickrestartbidiag at 12899.jl:44
in include at ./boot.jl:259
in include_from_node1 at ./loading.jl:271
in process_options at ./client.jl:308
in _start at ./client.jl:411
while loading 12899.jl, in expression starting on line 235"><pre class="notranslate"><span class="pl-c1">Array</span>(Float64,(<span class="pl-c1">6</span>,<span class="pl-c1">6</span>)) <span class="pl-c1">6</span>x6 Array{Float64,<span class="pl-c1">2</span>}<span class="pl-k">:</span>
ERROR<span class="pl-k">:</span> LoadError<span class="pl-k">:</span> ArgumentError<span class="pl-k">:</span> can<span class="pl-k">'</span>t repeat a string <span class="pl-k">-</span><span class="pl-c1">1</span> times
<span class="pl-k">in</span> repeat at <span class="pl-k">./</span>strings<span class="pl-k">/</span>types<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">176</span>
<span class="pl-k">in</span> print_matrix_row at show<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">1017</span>
<span class="pl-k">in</span> print_matrix at show<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">1061</span>
<span class="pl-k">in</span> showarray at show<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">1229</span>
<span class="pl-k">in</span> xdump at show<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">908</span>
<span class="pl-k">in</span> anonymous at show<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">913</span>
<span class="pl-k">in</span> with_output_limit at <span class="pl-k">./</span>show<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">1246</span>
<span class="pl-k">in</span> xdump at show<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">913</span>
<span class="pl-k">in</span> truncate! at <span class="pl-c1">12899.</span>jl<span class="pl-k">:</span><span class="pl-c1">176</span>
<span class="pl-k">in</span> thickrestartbidiag at <span class="pl-c1">12899.</span>jl<span class="pl-k">:</span><span class="pl-c1">52</span>
<span class="pl-k">in</span> thickrestartbidiag at <span class="pl-c1">12899.</span>jl<span class="pl-k">:</span><span class="pl-c1">44</span>
<span class="pl-k">in</span> include at <span class="pl-k">./</span>boot<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">259</span>
<span class="pl-k">in</span> include_from_node1 at <span class="pl-k">./</span>loading<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">271</span>
<span class="pl-k">in</span> process_options at <span class="pl-k">./</span>client<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">308</span>
<span class="pl-k">in</span> _start at <span class="pl-k">./</span>client<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">411</span>
<span class="pl-k">while</span> loading <span class="pl-c1">12899.</span>jl, <span class="pl-k">in</span> expression starting on line <span class="pl-c1">235</span></pre></div>
<p dir="auto">I can reliably reproduce this error on OSX (but not Linux). It always happens on Iteration 143 of this algorithm, and removing any of the printing statements in this code makes this error go away.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> versioninfo()
Julia Version 0.4.0-pre+7122
Commit 62d570f (2015-08-31 23:19 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin14.5.0)
CPU: Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-c1">versioninfo</span>()
Julia Version <span class="pl-c1">0.4</span>.<span class="pl-c1">0</span><span class="pl-k">-</span>pre<span class="pl-k">+</span><span class="pl-c1">7122</span>
Commit <span class="pl-c1">62</span>d570f (<span class="pl-c1">2015</span><span class="pl-k">-</span><span class="pl-c1">08</span><span class="pl-k">-</span><span class="pl-c1">31</span> <span class="pl-c1">23</span><span class="pl-k">:</span><span class="pl-c1">19</span> UTC)
Platform Info<span class="pl-k">:</span>
System<span class="pl-k">:</span> Darwin (x86_64<span class="pl-k">-</span>apple<span class="pl-k">-</span>darwin14.<span class="pl-c1">5.0</span>)
CPU<span class="pl-k">:</span> <span class="pl-c1">Intel</span>(R) <span class="pl-c1">Core</span>(TM) i5<span class="pl-k">-</span><span class="pl-c1">4258</span>U CPU @ <span class="pl-c1">2.40</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 Haswell)
LAPACK<span class="pl-k">:</span> libopenblas
LIBM<span class="pl-k">:</span> libopenlibm
LLVM<span class="pl-k">:</span> libLLVM<span class="pl-k">-</span><span class="pl-c1">3.3</span></pre></div> | <p dir="auto">Something is amiss with the formula used to calculate the number of digits in the entries of an array used in the repl.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> [2.,3.]
2-element Array{Float64,1}:
02.0
03.0"><pre class="notranslate"><code class="notranslate">julia> [2.,3.]
2-element Array{Float64,1}:
02.0
03.0
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> [2.0,2.3]
2-element Array{Float64,1}:
02.0
2.3"><pre class="notranslate"><code class="notranslate">julia> [2.0,2.3]
2-element Array{Float64,1}:
02.0
2.3
</code></pre></div>
<p dir="auto">Edit:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 0.4.0-dev+3967
Commit b8a510d* (2015-03-23 13:19 UTC)
Platform Info:
System: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3"><pre class="notranslate"><code class="notranslate">Julia Version 0.4.0-dev+3967
Commit b8a510d* (2015-03-23 13:19 UTC)
Platform Info:
System: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
</code></pre></div> | 1 |
<h3 dir="auto">Vue.js version</h3>
<p dir="auto">1.0.19</p>
<h3 dir="auto">Reproduction Link</h3>
<p dir="auto">Example using v1.0.19 (not working as expected)<br>
<a href="https://jsfiddle.net/ps6vrun1/1/" rel="nofollow">https://jsfiddle.net/ps6vrun1/1/</a></p>
<p dir="auto">Example using v1.0.18 (working as expected)<br>
<a href="https://jsfiddle.net/jhapcwy1/1/" rel="nofollow">https://jsfiddle.net/jhapcwy1/1/</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Add a class to an element, and also a binding which will toggle the class<br>
<code class="notranslate"><div class="loader" :class="{'loader': hasClass}"></code></p>
<h3 dir="auto">What is Expected?</h3>
<p dir="auto">class <code class="notranslate">loader</code> should be removed when <code class="notranslate">hasClass</code> is <code class="notranslate">false</code></p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">class <code class="notranslate">loader</code> remains on the div when <code class="notranslate">hasClass</code> is <code class="notranslate">false</code></p> | <p dir="auto">When using an object in a v-bind:class ,classes are not removed from the element :</p>
<p dir="auto"><a href="https://jsfiddle.net/arasharg/tLef7wfh/" rel="nofollow">https://jsfiddle.net/arasharg/tLef7wfh/</a></p> | 1 |
<p dir="auto">Running 0.176.0 on Mac OS X 10.10.1</p>
<p dir="auto">The following is highlighted incorrectly:</p>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const char* f(const char *s)
{
switch((s[0] << 8) + s[1]) {
case 'B': case 'C': case 'D': case 'E': case 'F': case 'G':
return "XX";
case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
return "XX";
case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[':case '\\': case ']': case '^': case '_': case '`': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
return "XX";
case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u':
return "XX";
case 'v':
return "XX";
case 'w': case 'x':
return "XX";
case 'y':
return "XX";
default:
case 0:
return s;
}
}"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-smi">char</span><span class="pl-c1">*</span> <span class="pl-en">f</span>(<span class="pl-k">const</span> <span class="pl-smi">char</span> <span class="pl-c1">*</span><span class="pl-s1">s</span>)
{
<span class="pl-k">switch</span>((<span class="pl-s1">s</span>[<span class="pl-c1">0</span>] << <span class="pl-c1">8</span>) <span class="pl-c1">+</span> <span class="pl-s1">s</span>[<span class="pl-c1">1</span>]) {
<span class="pl-k">case</span> <span class="pl-c1">'B'</span>: <span class="pl-k">case</span> <span class="pl-c1">'C'</span>: <span class="pl-k">case</span> <span class="pl-c1">'D'</span>: <span class="pl-k">case</span> <span class="pl-c1">'E'</span>: <span class="pl-k">case</span> <span class="pl-c1">'F'</span>: <span class="pl-k">case</span> <span class="pl-c1">'G'</span>:
<span class="pl-k">return</span> <span class="pl-s">"XX"</span>;
<span class="pl-k">case</span> <span class="pl-c1">'H'</span>: <span class="pl-k">case</span> <span class="pl-c1">'I'</span>: <span class="pl-k">case</span> <span class="pl-c1">'J'</span>: <span class="pl-k">case</span> <span class="pl-c1">'K'</span>: <span class="pl-k">case</span> <span class="pl-c1">'L'</span>: <span class="pl-k">case</span> <span class="pl-c1">'M'</span>: <span class="pl-k">case</span> <span class="pl-c1">'N'</span>: <span class="pl-k">case</span> <span class="pl-c1">'O'</span>: <span class="pl-k">case</span> <span class="pl-c1">'P'</span>: <span class="pl-k">case</span> <span class="pl-c1">'Q'</span>: <span class="pl-k">case</span> <span class="pl-c1">'R'</span>:
<span class="pl-k">return</span> <span class="pl-s">"XX"</span>;
<span class="pl-k">case</span> <span class="pl-c1">'S'</span>: <span class="pl-k">case</span> <span class="pl-c1">'T'</span>: <span class="pl-k">case</span> <span class="pl-c1">'U'</span>: <span class="pl-k">case</span> <span class="pl-c1">'V'</span>: <span class="pl-k">case</span> <span class="pl-c1">'W'</span>: <span class="pl-k">case</span> <span class="pl-c1">'X'</span>: <span class="pl-k">case</span> <span class="pl-c1">'Y'</span>: <span class="pl-k">case</span> <span class="pl-c1">'Z'</span>: <span class="pl-k">case</span> <span class="pl-c1">'['</span>:<span class="pl-k">case</span> <span class="pl-c1">'\\'</span>: <span class="pl-k">case</span> <span class="pl-c1">']'</span>: <span class="pl-k">case</span> <span class="pl-c1">'^'</span>: <span class="pl-k">case</span> <span class="pl-c1">'_'</span>: <span class="pl-k">case</span> <span class="pl-c1">'`'</span>: <span class="pl-k">case</span> <span class="pl-c1">'a'</span>: <span class="pl-k">case</span> <span class="pl-c1">'b'</span>: <span class="pl-k">case</span> <span class="pl-c1">'c'</span>: <span class="pl-k">case</span> <span class="pl-c1">'d'</span>: <span class="pl-k">case</span> <span class="pl-c1">'e'</span>: <span class="pl-k">case</span> <span class="pl-c1">'f'</span>:
<span class="pl-k">return</span> <span class="pl-s">"XX"</span>;
<span class="pl-k">case</span> <span class="pl-c1">'g'</span>: <span class="pl-k">case</span> <span class="pl-c1">'h'</span>: <span class="pl-k">case</span> <span class="pl-c1">'i'</span>: <span class="pl-k">case</span> <span class="pl-c1">'j'</span>: <span class="pl-k">case</span> <span class="pl-c1">'k'</span>: <span class="pl-k">case</span> <span class="pl-c1">'l'</span>: <span class="pl-k">case</span> <span class="pl-c1">'m'</span>: <span class="pl-k">case</span> <span class="pl-c1">'n'</span>: <span class="pl-k">case</span> <span class="pl-c1">'o'</span>: <span class="pl-k">case</span> <span class="pl-c1">'p'</span>: <span class="pl-k">case</span> <span class="pl-c1">'q'</span>: <span class="pl-k">case</span> <span class="pl-c1">'r'</span>: <span class="pl-k">case</span> <span class="pl-c1">'s'</span>: <span class="pl-k">case</span> <span class="pl-c1">'t'</span>: <span class="pl-k">case</span> <span class="pl-c1">'u'</span>:
<span class="pl-k">return</span> <span class="pl-s">"XX"</span>;
<span class="pl-k">case</span> <span class="pl-c1">'v'</span>:
<span class="pl-k">return</span> <span class="pl-s">"XX"</span>;
<span class="pl-k">case</span> <span class="pl-c1">'w'</span>: <span class="pl-k">case</span> <span class="pl-c1">'x'</span>:
<span class="pl-k">return</span> <span class="pl-s">"XX"</span>;
<span class="pl-k">case</span> <span class="pl-c1">'y'</span>:
<span class="pl-k">return</span> <span class="pl-s">"XX"</span>;
<span class="pl-k">default</span>:
<span class="pl-k">case</span> <span class="pl-c1">0</span>:
<span class="pl-k">return</span> <span class="pl-s1">s</span>;
}
}</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1505330/5911279/636b3a8e-a578-11e4-8e64-da81a6dee843.png"><img src="https://cloud.githubusercontent.com/assets/1505330/5911279/636b3a8e-a578-11e4-8e64-da81a6dee843.png" alt="screen shot 2015-01-26 at 4 28 27 pm" style="max-width: 100%;"></a></p> | <p dir="auto">I opened a Python file with the following line (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="20976125" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/963" data-hovercard-type="pull_request" data-hovercard-url="/atom/atom/pull/963/hovercard" href="https://github.com/atom/atom/pull/963">#963</a>):</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" PrintAndLog(u"SSID: " + RememberedNetwork["SSIDString"].decode("utf-8") + u" - BSSID: " + RememberedNetwork["CachedScanRecord"]["BSSID"] + u" - RSSI: " + str(RememberedNetwork["CachedScanRecord"]["RSSI"]) + u" - Last connected: " + str(RememberedNetwork["LastConnected"]) + u" - Security type: " + RememberedNetwork["SecurityType"] + u" - Geolocation: " + Geolocation, "INFO")"><pre class="notranslate"> <span class="pl-v">PrintAndLog</span>(<span class="pl-s">u"SSID: "</span> <span class="pl-c1">+</span> <span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"SSIDString"</span>].<span class="pl-en">decode</span>(<span class="pl-s">"utf-8"</span>) <span class="pl-c1">+</span> <span class="pl-s">u" - BSSID: "</span> <span class="pl-c1">+</span> <span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"CachedScanRecord"</span>][<span class="pl-s">"BSSID"</span>] <span class="pl-c1">+</span> <span class="pl-s">u" - RSSI: "</span> <span class="pl-c1">+</span> <span class="pl-en">str</span>(<span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"CachedScanRecord"</span>][<span class="pl-s">"RSSI"</span>]) <span class="pl-c1">+</span> <span class="pl-s">u" - Last connected: "</span> <span class="pl-c1">+</span> <span class="pl-en">str</span>(<span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"LastConnected"</span>]) <span class="pl-c1">+</span> <span class="pl-s">u" - Security type: "</span> <span class="pl-c1">+</span> <span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"SecurityType"</span>] <span class="pl-c1">+</span> <span class="pl-s">u" - Geolocation: "</span> <span class="pl-c1">+</span> <span class="pl-v">Geolocation</span>, <span class="pl-s">"INFO"</span>)</pre></div>
<p dir="auto">Which led to the following bug:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/e06069206d526a16adf21e84cd179f1185d3fb5e0f05fea4d4b4a08a978092f4/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f34343737342f323331333737382f37366262346262612d613330642d313165332d396136342d3831663666393163323563342e706e67"><img src="https://camo.githubusercontent.com/e06069206d526a16adf21e84cd179f1185d3fb5e0f05fea4d4b4a08a978092f4/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f34343737342f323331333737382f37366262346262612d613330642d313165332d396136342d3831663666393163323563342e706e67" alt="screen shot 2014-03-03 at 2 52 40 pm" data-canonical-src="https://f.cloud.github.com/assets/44774/2313778/76bb4bba-a30d-11e3-9a64-81f6f91c25c4.png" style="max-width: 100%;"></a></p>
<p dir="auto">You can find this as the main file in <a href="https://github.com/jipegit/OSXAuditor/blob/master/osxauditor.py"><code class="notranslate">osxauditor.py</code></a>.</p> | 1 |
<p dir="auto">Support for <a href="https://github.com/necolas/react-native-web">react-native-web</a> <em>worked in Next.js 4</em>, but now throws an error when upgrading to Next.js 5. From my research, this would appear to be related to an issue that has been closed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="208229415" data-permission-text="Title is private" data-url="https://github.com/necolas/react-native-web/issues/364" data-hovercard-type="issue" data-hovercard-url="/necolas/react-native-web/issues/364/hovercard" href="https://github.com/necolas/react-native-web/issues/364">necolas/react-native-web#364</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">The Next.js server should successfully compile and load the application without errors.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The Next.js server throws an error and failed to compile.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR Failed to compile with 1 errors
This dependency was not found:
* react-dom/unstable-native-dependencies in ./node_modules/react-native-web/dist/modules/injectResponderEventPlugin/index.js
To install it, you can run: npm install --save react-dom/unstable-native-dependencies"><pre class="notranslate"><code class="notranslate">ERROR Failed to compile with 1 errors
This dependency was not found:
* react-dom/unstable-native-dependencies in ./node_modules/react-native-web/dist/modules/injectResponderEventPlugin/index.js
To install it, you can run: npm install --save react-dom/unstable-native-dependencies
</code></pre></div>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Spin up Next.js 5 project</li>
<li><code class="notranslate">yarn add react-native-web</code></li>
<li><code class="notranslate">yarn add -D babel-plugin-react-native-web</code></li>
<li>Add <code class="notranslate">.babelrc</code> configured for the plugin installed in previous step</li>
<li><a href="https://github.com/necolas/react-native-web/issues/462#issuecomment-298721158" data-hovercard-type="issue" data-hovercard-url="/necolas/react-native-web/issues/462/hovercard">Setup Next.js with <code class="notranslate">react-native-web</code></a> (see slightly different example below to match latest version of <code class="notranslate">react-native-web</code>)</li>
<li><code class="notranslate">yarn start</code></li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">The Next.js application is unable to compile.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>5.0.0</td>
</tr>
<tr>
<td>node</td>
<td>8.9.4</td>
</tr>
<tr>
<td>OS</td>
<td>macOS 10.13.3</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 64.0.3282.140</td>
</tr>
<tr>
<td>react-native-web</td>
<td>0.4.0</td>
</tr>
</tbody>
</table>
<h2 dir="auto">Custom Document</h2>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Document, { Head, Main, NextScript } from 'next/document';
import React from 'react';
import { AppRegistry } from 'react-native-web';
import { renderToStaticMarkup } from 'react-dom/server';
export default class MyDocument extends Document {
static async getInitialProps({ renderPage }) {
AppRegistry.registerComponent('Main', () => Main);
const { getStyleElement } = AppRegistry.getApplication('Main');
const page = renderPage();
const styles = [getStyleElement()];
return { ...page, styles };
}
render() {
return (
<html style={{ height: '100%', width: '100%' }}>
<Head />
<body style={{ height: '100%', width: '100%', overflowY: 'scroll' }}>
<Main />
<NextScript />
</body>
</html>
);
}
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">Document</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-v">Head</span><span class="pl-kos">,</span> <span class="pl-v">Main</span><span class="pl-kos">,</span> <span class="pl-v">NextScript</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'next/document'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">AppRegistry</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-native-web'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">renderToStaticMarkup</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-dom/server'</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">MyDocument</span> <span class="pl-k">extends</span> <span class="pl-v">Document</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-k">async</span> <span class="pl-en">getInitialProps</span><span class="pl-kos">(</span><span class="pl-kos">{</span> renderPage <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-v">AppRegistry</span><span class="pl-kos">.</span><span class="pl-en">registerComponent</span><span class="pl-kos">(</span><span class="pl-s">'Main'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-v">Main</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span> getStyleElement <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-v">AppRegistry</span><span class="pl-kos">.</span><span class="pl-en">getApplication</span><span class="pl-kos">(</span><span class="pl-s">'Main'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-en">renderPage</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">styles</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-en">getStyleElement</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-kos">{</span> ...<span class="pl-s1">page</span><span class="pl-kos">,</span> styles <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-kos">(</span>
<span class="pl-c1"><</span><span class="pl-ent">html</span> <span class="pl-c1">style</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">{</span> <span class="pl-c1">height</span>: <span class="pl-s">'100%'</span><span class="pl-kos">,</span> <span class="pl-c1">width</span>: <span class="pl-s">'100%'</span> <span class="pl-kos">}</span><span class="pl-kos">}</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">Head</span> <span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">body</span> <span class="pl-c1">style</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">{</span> <span class="pl-c1">height</span>: <span class="pl-s">'100%'</span><span class="pl-kos">,</span> <span class="pl-c1">width</span>: <span class="pl-s">'100%'</span><span class="pl-kos">,</span> <span class="pl-c1">overflowY</span>: <span class="pl-s">'scroll'</span> <span class="pl-kos">}</span><span class="pl-kos">}</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">Main</span> <span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">NextScript</span> <span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">body</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">html</span><span class="pl-c1">></span>
<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div> | <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>
<p dir="auto">Hi Everyone,</p>
<p dir="auto">I have this minimalistic example</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const myFunction = (x) => (x * 2)
export default class Page extends React.Component {
static async getInitialProps(props) {
return {
foo: 'Hello World',
bar: x => myFunction(x),
}
}
render() {
return (
<div>
{this.props.foo}
{this.props.bar(21)}
</div>
)
}
}"><pre class="notranslate"><code class="notranslate">const myFunction = (x) => (x * 2)
export default class Page extends React.Component {
static async getInitialProps(props) {
return {
foo: 'Hello World',
bar: x => myFunction(x),
}
}
render() {
return (
<div>
{this.props.foo}
{this.props.bar(21)}
</div>
)
}
}
</code></pre></div>
<p dir="auto">Of course I'm expecting "Hello World 42" but the <code class="notranslate">bar</code> prop doesn't get passed. I am assuming next doesn't support passing functions in getInitialProps, but I couldn't find it in the documentation.</p>
<h2 dir="auto">Expected Behavior</h2>
<ul dir="auto">
<li>If we don't support this, can we have better error messages? My actual example was more complicated, so it took me a while to figure out what was causing it.</li>
</ul>
<h2 dir="auto">Current Behavior</h2>
<ul dir="auto">
<li>Currently I'm getting:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: this.props.bar is not a function
at Page.render (page.js?8081a23:131)
at Page.render (createPrototypeProxy.js?b9f4a89:44)
at finishClassComponent (react-dom.development.js?3fc7954:7873)
at updateClassComponent (react-dom.development.js?3fc7954:7850)
at beginWork (react-dom.development.js?3fc7954:8225)
at performUnitOfWork (react-dom.development.js?3fc7954:10224)
at workLoop (react-dom.development.js?3fc7954:10288)
at HTMLUnknownElement.callCallback (react-dom.development.js?3fc7954:542)
at Object.invokeGuardedCallbackDev (react-dom.development.js?3fc7954:581)
at invokeGuardedCallback (react-dom.development.js?3fc7954:438)"><pre class="notranslate"><code class="notranslate">TypeError: this.props.bar is not a function
at Page.render (page.js?8081a23:131)
at Page.render (createPrototypeProxy.js?b9f4a89:44)
at finishClassComponent (react-dom.development.js?3fc7954:7873)
at updateClassComponent (react-dom.development.js?3fc7954:7850)
at beginWork (react-dom.development.js?3fc7954:8225)
at performUnitOfWork (react-dom.development.js?3fc7954:10224)
at workLoop (react-dom.development.js?3fc7954:10288)
at HTMLUnknownElement.callCallback (react-dom.development.js?3fc7954:542)
at Object.invokeGuardedCallbackDev (react-dom.development.js?3fc7954:581)
at invokeGuardedCallback (react-dom.development.js?3fc7954:438)
</code></pre></div>
<p dir="auto">However only when it is rendering on the client side. On the server the <code class="notranslate">bar</code> prop gets passed without any problems.</p>
<ul dir="auto">
<li>This is a mismatch between rendering on the server and the client.</li>
</ul>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">See snippet</p>
<h2 dir="auto">Context</h2>
<p dir="auto">I don't know if we are able to support this at all, but it would be really helpful if a solution is available. I'm working on a headless CMS and I need to be able to render my react components on the server and on the client.</p>
<p dir="auto">Is there a workaround?</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>4.2.1</td>
</tr>
<tr>
<td>react</td>
<td>16.0.0</td>
</tr>
<tr>
<td>node</td>
<td>v8.9.1</td>
</tr>
<tr>
<td>OS</td>
<td>osX</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">The code is extremely simple:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
<meta charset="UTF-8">
</head>
<body ng-controller="TestController">
<input type="text" ng-model="state.addr" ng-click="openDialog()">
<script src="angular.js" charset="utf-8"></script>
<script src="app.js" charset="utf-8"></script>
</body>
</html>"><pre class="notranslate"><span class="pl-c1"><!DOCTYPE html<span class="pl-kos">></span></span>
<span class="pl-kos"><</span><span class="pl-ent">html</span> <span class="pl-c1">lang</span>="<span class="pl-s">en</span>" <span class="pl-c1">ng-app</span>="<span class="pl-s">app</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">head</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">meta</span> <span class="pl-c1">charset</span>="<span class="pl-s">UTF-8</span>"<span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">head</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">body</span> <span class="pl-c1">ng-controller</span>="<span class="pl-s">TestController</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">ng-model</span>="<span class="pl-s">state.addr</span>" <span class="pl-c1">ng-click</span>="<span class="pl-s">openDialog()</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">script</span> <span class="pl-c1">src</span>="<span class="pl-s">angular.js</span>" <span class="pl-c1">charset</span>="<span class="pl-s">utf-8</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">script</span> <span class="pl-c1">src</span>="<span class="pl-s">app.js</span>" <span class="pl-c1">charset</span>="<span class="pl-s">utf-8</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">body</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">html</span><span class="pl-kos">></span></pre></div>
<p dir="auto"><em>app.js</em></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var mainWindow = require('electron').remote.getCurrentWindow();
var dialog = require('electron').remote.require('dialog');
var app = angular.module('app', []);
app.controller('TestController', function($scope) {
$scope.state = {};
$scope.openDialog = function() {
dialog.showOpenDialog(mainWindow, {
title: 'open file',
properties: [
'openDirectory'
]
}, function(files) {
if (files && files.length) {
$scope.state.addr = files[0];
$scope.$apply();
}
});
};
});"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">mainWindow</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-c1">remote</span><span class="pl-kos">.</span><span class="pl-en">getCurrentWindow</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">dialog</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-c1">remote</span><span class="pl-kos">.</span><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'dialog'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">angular</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">'app'</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">app</span><span class="pl-kos">.</span><span class="pl-en">controller</span><span class="pl-kos">(</span><span class="pl-s">'TestController'</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">$scope</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">$scope</span><span class="pl-kos">.</span><span class="pl-c1">state</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-s1">$scope</span><span class="pl-kos">.</span><span class="pl-en">openDialog</span> <span class="pl-c1">=</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">dialog</span><span class="pl-kos">.</span><span class="pl-en">showOpenDialog</span><span class="pl-kos">(</span><span class="pl-s1">mainWindow</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">title</span>: <span class="pl-s">'open file'</span><span class="pl-kos">,</span>
<span class="pl-c1">properties</span>: <span class="pl-kos">[</span>
<span class="pl-s">'openDirectory'</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-kos">(</span><span class="pl-s1">files</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">files</span> <span class="pl-c1">&&</span> <span class="pl-s1">files</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">$scope</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">addr</span> <span class="pl-c1">=</span> <span class="pl-s1">files</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-s1">$scope</span><span class="pl-kos">.</span><span class="pl-en">$apply</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><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">My expectation:</p>
<ol dir="auto">
<li>User can click in the <code class="notranslate">input</code> element, a <code class="notranslate">dialog</code> would be shown.</li>
<li>User can select a directory or just cancel the <code class="notranslate">dialog</code></li>
<li>The selected directory path will be placed in the <code class="notranslate">input</code> element.</li>
</ol>
<p dir="auto">But actually:</p>
<p dir="auto">Once i click the <code class="notranslate">input</code>, no matter i select a directory or cancel the <code class="notranslate">dialog</code>, following error occurs:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1059956/11417866/6606f630-9455-11e5-856d-ca6b9014f781.png"><img src="https://cloud.githubusercontent.com/assets/1059956/11417866/6606f630-9455-11e5-856d-ca6b9014f781.png" alt="snip20151126_2" style="max-width: 100%;"></a></p>
<p dir="auto">But the code works just perfect in <code class="notranslate">0.35.0</code>. This error gets hurt me while i upgraded to <code class="notranslate">0.35.1</code></p> | <p dir="auto">Hey folks—in Electron <code class="notranslate">0.34.3</code>, it was possible to do this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" showOpenDialog: (options, callback) ->
dialog = remote.require('dialog')
dialog.showOpenDialog(@getCurrentWindow(), options, callback)"><pre class="notranslate"><code class="notranslate"> showOpenDialog: (options, callback) ->
dialog = remote.require('dialog')
dialog.showOpenDialog(@getCurrentWindow(), options, callback)
</code></pre></div>
<p dir="auto">However, in <code class="notranslate">0.35.1</code>, the open dialog appears and the <code class="notranslate">callback</code> is run, but user interaction with the BrowserWindow fails in really strange way after you're finished selecting files. You can type into the selected text input and scroll, but you can't click anything on the page. As far as I can tell, it's permanently borked.</p>
<p dir="auto">On the other hand, using the synchronous version of showOpenDialog works just fine. This code does not exhibit the problem:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" showOpenDialog: (options, callback) ->
dialog = remote.require('dialog')
callback(dialog.showOpenDialog(@getCurrentWindow(), options))"><pre class="notranslate"><code class="notranslate"> showOpenDialog: (options, callback) ->
dialog = remote.require('dialog')
callback(dialog.showOpenDialog(@getCurrentWindow(), options))
</code></pre></div>
<p dir="auto">I know that passing callbacks through <code class="notranslate">remote</code> is "bad", but I feel like something else may be the issue here?</p> | 1 |
<p dir="auto">I have a specific use case where I animate an <code class="notranslate">ImageView</code> it does a flip animation and I see the next image. The issue is that while the next image is loading there is a bunch of white space.</p>
<p dir="auto">I tried <a href="https://github.com/bumptech/glide/issues/527#issuecomment-148840717" data-hovercard-type="issue" data-hovercard-url="/bumptech/glide/issues/527/hovercard">this implementation here</a>:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide
.with(context)
.load(imageUrl)
.thumbnail(Glide // this thumbnail request has to have the same RESULT cache key
.with(context) // as the outer request, which usually simply means
.load(oldImage) // same size/transformation(e.g. centerCrop)/format(e.g. asBitmap)
.fitCenter() // have to be explicit here to match outer load exactly
)
.listener(new RequestListener<String, GlideDrawable>() {
@Override public boolean onResourceReady(GlideDrawable resource, String model, Target<GlideDrawable> target, boolean isFromMemoryCache, boolean isFirstResource) {
if (isFirstResource) {
return false; // thumbnail was not shown, do as usual
}
return new DrawableCrossFadeFactory<Drawable>(/* customize animation here */)
.build(false, false) // force crossFade() even if coming from memory cache
.animate(resource, (ViewAdapter)target);
}
})
//.fitCenter() // this is implicitly added when .into() is called if there's no scaleType in xml or the value is fitCenter there
.into(imageView);
oldImage = imageUrl;"><pre class="notranslate"><span class="pl-smi">Glide</span>
.<span class="pl-en">with</span>(<span class="pl-s1">context</span>)
.<span class="pl-en">load</span>(<span class="pl-s1">imageUrl</span>)
.<span class="pl-en">thumbnail</span>(<span class="pl-smi">Glide</span> <span class="pl-c">// this thumbnail request has to have the same RESULT cache key</span>
.<span class="pl-en">with</span>(<span class="pl-s1">context</span>) <span class="pl-c">// as the outer request, which usually simply means</span>
.<span class="pl-en">load</span>(<span class="pl-s1">oldImage</span>) <span class="pl-c">// same size/transformation(e.g. centerCrop)/format(e.g. asBitmap)</span>
.<span class="pl-en">fitCenter</span>() <span class="pl-c">// have to be explicit here to match outer load exactly</span>
)
.<span class="pl-en">listener</span>(<span class="pl-k">new</span> <span class="pl-smi">RequestListener</span><<span class="pl-smi">String</span>, <span class="pl-smi">GlideDrawable</span>>() {
<span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">boolean</span> <span class="pl-en">onResourceReady</span>(<span class="pl-smi">GlideDrawable</span> <span class="pl-s1">resource</span>, <span class="pl-smi">String</span> <span class="pl-s1">model</span>, <span class="pl-smi">Target</span><<span class="pl-smi">GlideDrawable</span>> <span class="pl-s1">target</span>, <span class="pl-smi">boolean</span> <span class="pl-s1">isFromMemoryCache</span>, <span class="pl-smi">boolean</span> <span class="pl-s1">isFirstResource</span>) {
<span class="pl-k">if</span> (<span class="pl-s1">isFirstResource</span>) {
<span class="pl-k">return</span> <span class="pl-c1">false</span>; <span class="pl-c">// thumbnail was not shown, do as usual</span>
}
<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">DrawableCrossFadeFactory</span><<span class="pl-smi">Drawable</span>>(<span class="pl-c">/* customize animation here */</span>)
.<span class="pl-en">build</span>(<span class="pl-c1">false</span>, <span class="pl-c1">false</span>) <span class="pl-c">// force crossFade() even if coming from memory cache</span>
.<span class="pl-en">animate</span>(<span class="pl-s1">resource</span>, (<span class="pl-smi">ViewAdapter</span>)<span class="pl-s1">target</span>);
}
})
<span class="pl-c">//.fitCenter() // this is implicitly added when .into() is called if there's no scaleType in xml or the value is fitCenter there</span>
.<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);
<span class="pl-s1">oldImage</span> = <span class="pl-s1">imageUrl</span>;</pre></div>
<p dir="auto">But while this makes the previous image stick around and not disappear when the animation occurs and the next image loads, the previous image sticks around and the user is kind of stuck waiting looking at the previous image AFTER the animation is complete which is somewhat awkward.</p>
<p dir="auto">I was wondering if there is a way to <code class="notranslate">preload</code> the next image and save it in memory and upon animation start just set the next image in <code class="notranslate">Glide.with(...).load(mNextImageRequest)....</code></p>
<p dir="auto">Is this possible?</p> | <p dir="auto"><strong>Glide Version</strong>:4.4.0</p>
<p dir="auto"><strong>Device/Android Version</strong>: Xiomi mi A1/ 7.1.2</p>
<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>: I am serving local phone images for casting but in some phones captured images have wrong orientation, so need to save file with correct orientation as, displaying same images with glide in ImageView produced correct orientation.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="FutureTarget<Bitmap> target = null;
RequestManager requestManager = Glide.with(context);
target = requestManager.asBitmap().load(metadataCompat.getString(MediaMetadataCompat.METADATA_KEY_MEDIA_URI)).submit();
try {
serve = new File(Util.getAppDir(), "temp.jpg");
FileOutputStream fOut = new FileOutputStream(serve);
Bitmap bitmap = target.get();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fOut);
fOut.close();
fOut.flush();
} catch (Exception e) {
e.printStackTrace();
serve = new File(metadataCompat.getString(MediaMetadataCompat.METADATA_KEY_MEDIA_URI));
} finally {
if(target != null) {
target.cancel(true);
}
}"><pre class="notranslate"><code class="notranslate">FutureTarget<Bitmap> target = null;
RequestManager requestManager = Glide.with(context);
target = requestManager.asBitmap().load(metadataCompat.getString(MediaMetadataCompat.METADATA_KEY_MEDIA_URI)).submit();
try {
serve = new File(Util.getAppDir(), "temp.jpg");
FileOutputStream fOut = new FileOutputStream(serve);
Bitmap bitmap = target.get();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fOut);
fOut.close();
fOut.flush();
} catch (Exception e) {
e.printStackTrace();
serve = new File(metadataCompat.getString(MediaMetadataCompat.METADATA_KEY_MEDIA_URI));
} finally {
if(target != null) {
target.cancel(true);
}
}
</code></pre></div>
<p dir="auto">I am asking is there any better way to achieve above functionality?</p> | 0 |
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 4.1.1</li>
<li>Operating System / Platform => Windows 64 Bit</li>
<li>Compiler => MinGW-w64 10.1.0</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Building fails</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="...
[482/1644] Building CXX object modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj
FAILED: modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj
C:\msys64\mingw64\bin\c++.exe -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:/dev/repos/opencv/modules/core/src -IC:/dev/repos/opencv/modules/core/include -Imodules/core -IC:/dev/repos/opencv/3rdparty/zlib -I3rdparty/zlib -IC:/dev/repos/opencv/3rdparty/include/opencl/1.2 -isystem . -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -std=c++11 -MD -MT modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj -MF modules\core\CMakeFiles\opencv_core_pch_dephelp.dir\opencv_core_pch_dephelp.cxx.obj.d -o modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj -c modules/core/opencv_core_pch_dephelp.cxx
cc1plus.exe: warning: command-line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++
cc1plus.exe: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from C:/dev/repos/opencv/modules/core/src/precomp.hpp:55,
from modules/core/opencv_core_pch_dephelp.cxx:1:
C:/dev/repos/opencv/modules/core/include/opencv2/core/private.hpp:66:12: fatal error: Eigen/Core: No such file or directory
66 | # include <Eigen/Core>
| ^~~~~~~~~~~~
compilation terminated.
[483/1644] Building CXX object modules/CMakeFiles/ade.dir/__/3rdparty/ade/ade-0.1.1d/sources/ade/source/memory_descriptor_view.cpp.obj
cc1plus.exe: warning: command-line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++
cc1plus.exe: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
[484/1644] Building CXX object modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj
FAILED: modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj
C:\msys64\mingw64\bin\c++.exe -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:/dev/repos/opencv/modules/ts/include -IC:/dev/repos/opencv/modules/core/include -IC:/dev/repos/opencv/modules/imgcodecs/include -IC:/dev/repos/opencv/modules/videoio/include -IC:/dev/repos/opencv/modules/imgproc/include -IC:/dev/repos/opencv/modules/highgui/include -Imodules/core/test -isystem . -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -std=c++11 -MD -MT modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj -MF modules\core\CMakeFiles\opencv_test_core_pch_dephelp.dir\opencv_test_core_pch_dephelp.cxx.obj.d -o modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj -c modules/core/opencv_test_core_pch_dephelp.cxx
cc1plus.exe: warning: command-line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++
cc1plus.exe: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from C:/dev/repos/opencv/modules/core/test/test_precomp.hpp:12,
from modules/core/opencv_test_core_pch_dephelp.cxx:1:
C:/dev/repos/opencv/modules/core/include/opencv2/core/private.hpp:66:12: fatal error: Eigen/Core: No such file or directory
66 | # include <Eigen/Core>
| ^~~~~~~~~~~~
compilation terminated.
"><pre class="notranslate"><code class="notranslate">...
[482/1644] Building CXX object modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj
FAILED: modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj
C:\msys64\mingw64\bin\c++.exe -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:/dev/repos/opencv/modules/core/src -IC:/dev/repos/opencv/modules/core/include -Imodules/core -IC:/dev/repos/opencv/3rdparty/zlib -I3rdparty/zlib -IC:/dev/repos/opencv/3rdparty/include/opencl/1.2 -isystem . -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -std=c++11 -MD -MT modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj -MF modules\core\CMakeFiles\opencv_core_pch_dephelp.dir\opencv_core_pch_dephelp.cxx.obj.d -o modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj -c modules/core/opencv_core_pch_dephelp.cxx
cc1plus.exe: warning: command-line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++
cc1plus.exe: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from C:/dev/repos/opencv/modules/core/src/precomp.hpp:55,
from modules/core/opencv_core_pch_dephelp.cxx:1:
C:/dev/repos/opencv/modules/core/include/opencv2/core/private.hpp:66:12: fatal error: Eigen/Core: No such file or directory
66 | # include <Eigen/Core>
| ^~~~~~~~~~~~
compilation terminated.
[483/1644] Building CXX object modules/CMakeFiles/ade.dir/__/3rdparty/ade/ade-0.1.1d/sources/ade/source/memory_descriptor_view.cpp.obj
cc1plus.exe: warning: command-line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++
cc1plus.exe: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
[484/1644] Building CXX object modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj
FAILED: modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj
C:\msys64\mingw64\bin\c++.exe -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:/dev/repos/opencv/modules/ts/include -IC:/dev/repos/opencv/modules/core/include -IC:/dev/repos/opencv/modules/imgcodecs/include -IC:/dev/repos/opencv/modules/videoio/include -IC:/dev/repos/opencv/modules/imgproc/include -IC:/dev/repos/opencv/modules/highgui/include -Imodules/core/test -isystem . -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -std=c++11 -MD -MT modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj -MF modules\core\CMakeFiles\opencv_test_core_pch_dephelp.dir\opencv_test_core_pch_dephelp.cxx.obj.d -o modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj -c modules/core/opencv_test_core_pch_dephelp.cxx
cc1plus.exe: warning: command-line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++
cc1plus.exe: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from C:/dev/repos/opencv/modules/core/test/test_precomp.hpp:12,
from modules/core/opencv_test_core_pch_dephelp.cxx:1:
C:/dev/repos/opencv/modules/core/include/opencv2/core/private.hpp:66:12: fatal error: Eigen/Core: No such file or directory
66 | # include <Eigen/Core>
| ^~~~~~~~~~~~
compilation terminated.
</code></pre></div>
<p dir="auto"><a href="https://github.com/opencv/opencv/files/5134333/opencv_log.txt">full log</a></p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">Generate and build project with cmake (MSYS2 MINGW64 shell launcher)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cmake -G Ninja $opencv_source
cmake --build .."><pre class="notranslate"><code class="notranslate">cmake -G Ninja $opencv_source
cmake --build ..
</code></pre></div>
<p dir="auto"><code class="notranslate">$opencv_source</code> - path to opencv source</p> | <h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 3.4.7 / 4.1.1</li>
<li>Operating System / Platform => Ubuntu 18.04 x86_64</li>
<li>Compiler => gcc 8.3 / gcc 9.1</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">OpenCV fails to build when Eigen is imported as a CMake target and precompiled header are ON.</p>
<p dir="auto">When Eigen is imported as a CMake target (here <a href="https://github.com/opencv/opencv/blob/3.4.7/cmake/OpenCVFindLibsPerf.cmake#L47-L50">https://github.com/opencv/opencv/blob/3.4.7/cmake/OpenCVFindLibsPerf.cmake#L47-L50</a>) I got the following error when compiling :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[321/1436] Building CXX object modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o
FAILED: modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o
/usr/bin/c++ -DOPENCV_WITH_ITT=1 -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I. -I../modules/core/src -I../modules/core/include -Imodules/core -I../3rdparty/include/opencl/1.2 -I../3rdparty/ittnotify/include -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -fPIC -std=c++11 -MD -MT modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o -MF modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o.d -o modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o -c modules/core/opencv_core_pch_dephelp.cxx
In file included from /tmp/Genie/External/source/opencv/modules/core/src/precomp.hpp:55,
from modules/core/opencv_core_pch_dephelp.cxx:1:
../modules/core/include/opencv2/core/private.hpp:66:12: fatal error: Eigen/Core: No such file or directory
# include <Eigen/Core>
^~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">[321/1436] Building CXX object modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o
FAILED: modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o
/usr/bin/c++ -DOPENCV_WITH_ITT=1 -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I. -I../modules/core/src -I../modules/core/include -Imodules/core -I../3rdparty/include/opencl/1.2 -I../3rdparty/ittnotify/include -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -fPIC -std=c++11 -MD -MT modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o -MF modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o.d -o modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o -c modules/core/opencv_core_pch_dephelp.cxx
In file included from /tmp/Genie/External/source/opencv/modules/core/src/precomp.hpp:55,
from modules/core/opencv_core_pch_dephelp.cxx:1:
../modules/core/include/opencv2/core/private.hpp:66:12: fatal error: Eigen/Core: No such file or directory
# include <Eigen/Core>
^~~~~~~~~~~~
</code></pre></div>
<p dir="auto">Disabling precompiled header with <code class="notranslate">ENABLE_PRECOMPILED_HEADER=OFF</code> when configuring is workaround.</p> | 1 |
<p dir="auto">We should use <a href="https://www.npmjs.com/package/detect-port" rel="nofollow">detect-port</a>, which would basically make it much easier to develop because the app will stop throwing an error if the port is in use and just go with a random one instead.</p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<p dir="auto">I'm trying to see if I can wrap the Document inside Redux, using withRedux HOC.</p>
<p dir="auto">But when I do, I get <code class="notranslate">Error: _document.js is not exporting a React element</code></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from 'react';
import classnames from 'classnames';
import _Document, { Head, Main, NextScript } from 'next/document'
import withRedux from 'next-redux-wrapper';
import configureStore from '../store/configureStore';
class Document extends _Document {
render() {
console.log('----------- document props', this.props);
return (
<html>
<body className={classnames('loan-advisor')}>
<Main/>
<NextScript/>
</body>
</html>
)
}
}
// export default Document;
const EnhancedDocument = withRedux(
configureStore
)(Document);
console.log(EnhancedDocument)
export default EnhancedDocument; // I tried rendering a <EnhancedDocument /> too but doesn't work either"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-s1">classnames</span> <span class="pl-k">from</span> <span class="pl-s">'classnames'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-s1">_Document</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-v">Head</span><span class="pl-kos">,</span> <span class="pl-v">Main</span><span class="pl-kos">,</span> <span class="pl-v">NextScript</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'next/document'</span>
<span class="pl-k">import</span> <span class="pl-s1">withRedux</span> <span class="pl-k">from</span> <span class="pl-s">'next-redux-wrapper'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-s1">configureStore</span> <span class="pl-k">from</span> <span class="pl-s">'../store/configureStore'</span><span class="pl-kos">;</span>
<span class="pl-k">class</span> <span class="pl-v">Document</span> <span class="pl-k">extends</span> <span class="pl-s1">_Document</span> <span class="pl-kos">{</span>
<span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'----------- document props'</span><span class="pl-kos">,</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">return</span> <span class="pl-kos">(</span>
<span class="pl-c1"><</span><span class="pl-ent">html</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">body</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-en">classnames</span><span class="pl-kos">(</span><span class="pl-s">'loan-advisor'</span><span class="pl-kos">)</span><span class="pl-kos">}</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">Main</span><span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">NextScript</span><span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">body</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">html</span><span class="pl-c1">></span>
<span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-c">// export default Document;</span>
<span class="pl-k">const</span> <span class="pl-v">EnhancedDocument</span> <span class="pl-c1">=</span> <span class="pl-en">withRedux</span><span class="pl-kos">(</span>
<span class="pl-s1">configureStore</span>
<span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">Document</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-v">EnhancedDocument</span><span class="pl-kos">)</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-v">EnhancedDocument</span><span class="pl-kos">;</span> <span class="pl-c">// I tried rendering a <EnhancedDocument /> too but doesn't work either</span></pre></div>
<p dir="auto">I get the following server output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ [Function: WrappedCmp] getInitialProps: [Function] }
next Error: _document.js is not exporting a React element
next at _callee3$ (/Users/vadorequest/dev/student-loan-simulator-serverless/aws/loan-advisor/node_modules/next/dist/server/render.js:209:19)
next at tryCatch (/Users/vadorequest/dev/student-loan-simulator-serverless/aws/loan-advisor/node_modules/regenerator-runtime/runtime.js:62:40)
"><pre class="notranslate"><code class="notranslate">{ [Function: WrappedCmp] getInitialProps: [Function] }
next Error: _document.js is not exporting a React element
next at _callee3$ (/Users/vadorequest/dev/student-loan-simulator-serverless/aws/loan-advisor/node_modules/next/dist/server/render.js:209:19)
next at tryCatch (/Users/vadorequest/dev/student-loan-simulator-serverless/aws/loan-advisor/node_modules/regenerator-runtime/runtime.js:62:40)
</code></pre></div>
<p dir="auto">Is what I try to do possible? And is it a good idea?</p>
<p dir="auto">My goal is to do the following:</p>
<ul dir="auto">
<li>Load redux automatically for all pages (which fetch some data in <code class="notranslate">getInitialProps</code></li>
<li>Load react-jss automatically for all pages (depends on redux)</li>
<li>Make react-jss work with SSR (I currently have a blank effect because server doesn't inject styles)</li>
</ul>
<p dir="auto">I've achieved this behaviour already, but with boilerplate in every page that I don't like much, hence the fact I'm trying to simplify all this stuff using the _document.js</p> | 0 |
<p dir="auto">The idea is to have a Gantt graph for the DAGs in the UI, so that you can see at what hours there are more overlaps, when you have a gap without any dag running, which ones are the most time consuming etc.</p>
<p dir="auto">I think it could be done by taking the average execution time of the dag in the last X days from the metadata database or something like that. Also, for further precision, an outlier processing could be done as well.</p>
<p dir="auto">From my point of view, is a very nice feature to be added to the new UI</p> | <h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.2.5 (latest released)</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">Customer has a dag that generates around 2500 tasks dynamically using a task group. While running the dag, a subset of the tasks (~1000) run successfully with no issue and (~1500) of the tasks are getting "skipped", and the dag fails. The same DAG runs successfully in Airflow v2.1.3 with same Airflow configuration.</p>
<p dir="auto">While investigating the Airflow processes, We found that both the scheduler got restarted with below error during the DAG execution.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2022-04-27 20:42:44,347] {scheduler_job.py:742} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1256, in _execute_context
self.dialect.do_executemany(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 912, in do_executemany
cursor.executemany(statement, parameters)
psycopg2.errors.DeadlockDetected: deadlock detected
DETAIL: Process 1646244 waits for ShareLock on transaction 3915993452; blocked by process 1640692.
Process 1640692 waits for ShareLock on transaction 3915992745; blocked by process 1646244.
HINT: See server log for query details.
CONTEXT: while updating tuple (189873,4) in relation "task_instance""><pre class="notranslate"><code class="notranslate">[2022-04-27 20:42:44,347] {scheduler_job.py:742} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1256, in _execute_context
self.dialect.do_executemany(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 912, in do_executemany
cursor.executemany(statement, parameters)
psycopg2.errors.DeadlockDetected: deadlock detected
DETAIL: Process 1646244 waits for ShareLock on transaction 3915993452; blocked by process 1640692.
Process 1640692 waits for ShareLock on transaction 3915992745; blocked by process 1646244.
HINT: See server log for query details.
CONTEXT: while updating tuple (189873,4) in relation "task_instance"
</code></pre></div>
<p dir="auto">This issue seems to be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1069154380" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/19957" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/19957/hovercard" href="https://github.com/apache/airflow/issues/19957">#19957</a></p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">This issue was observed while running huge number of concurrent task created dynamically by a DAG. Some of the tasks are getting skipped due to restart of scheduler with Deadlock exception.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">DAG file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from propmix_listings_details import BUCKET, ZIPS_FOLDER, CITIES_ZIP_COL_NAME, DETAILS_DEV_LIMIT, DETAILS_RETRY, DETAILS_CONCURRENCY, get_api_token, get_values, process_listing_ids_based_zip
from airflow.utils.task_group import TaskGroup
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
from datetime import datetime, timedelta
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'email_on_failure': False,
'email_on_retry': False,
'retries': 0,
}
date = '{{ execution_date }}'
email_to = ['[email protected]']
# Using a DAG context manager, you don't have to specify the dag property of each task
state = 'Maha'
with DAG('listings_details_generator_{0}'.format(state),
start_date=datetime(2021, 11, 18),
schedule_interval=None,
max_active_runs=1,
concurrency=DETAILS_CONCURRENCY,
dagrun_timeout=timedelta(minutes=10),
catchup=False # enable if you don't want historical dag runs to run
) as dag:
t0 = DummyOperator(task_id='start')
with TaskGroup(group_id='group_1') as tg1:
token = get_api_token()
zip_list = get_values(BUCKET, ZIPS_FOLDER+state, CITIES_ZIP_COL_NAME)
for zip in zip_list[0:DETAILS_DEV_LIMIT]:
details_operator = PythonOperator(
task_id='details_{0}_{1}'.format(state, zip), # task id is generated dynamically
pool='pm_details_pool',
python_callable=process_listing_ids_based_zip,
task_concurrency=40,
retries=3,
retry_delay=timedelta(seconds=10),
op_kwargs={'zip': zip, 'date': date, 'token':token, 'state':state}
)
t0 >> tg1"><pre class="notranslate"><code class="notranslate">from propmix_listings_details import BUCKET, ZIPS_FOLDER, CITIES_ZIP_COL_NAME, DETAILS_DEV_LIMIT, DETAILS_RETRY, DETAILS_CONCURRENCY, get_api_token, get_values, process_listing_ids_based_zip
from airflow.utils.task_group import TaskGroup
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
from datetime import datetime, timedelta
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'email_on_failure': False,
'email_on_retry': False,
'retries': 0,
}
date = '{{ execution_date }}'
email_to = ['[email protected]']
# Using a DAG context manager, you don't have to specify the dag property of each task
state = 'Maha'
with DAG('listings_details_generator_{0}'.format(state),
start_date=datetime(2021, 11, 18),
schedule_interval=None,
max_active_runs=1,
concurrency=DETAILS_CONCURRENCY,
dagrun_timeout=timedelta(minutes=10),
catchup=False # enable if you don't want historical dag runs to run
) as dag:
t0 = DummyOperator(task_id='start')
with TaskGroup(group_id='group_1') as tg1:
token = get_api_token()
zip_list = get_values(BUCKET, ZIPS_FOLDER+state, CITIES_ZIP_COL_NAME)
for zip in zip_list[0:DETAILS_DEV_LIMIT]:
details_operator = PythonOperator(
task_id='details_{0}_{1}'.format(state, zip), # task id is generated dynamically
pool='pm_details_pool',
python_callable=process_listing_ids_based_zip,
task_concurrency=40,
retries=3,
retry_delay=timedelta(seconds=10),
op_kwargs={'zip': zip, 'date': date, 'token':token, 'state':state}
)
t0 >> tg1
</code></pre></div>
<h3 dir="auto">Operating System</h3>
<p dir="auto">kubernetes cluster running on GCP linux (amd64)</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">pip freeze | grep apache-airflow-providers</p>
<p dir="auto">apache-airflow-providers-amazon==1!3.2.0<br>
apache-airflow-providers-cncf-kubernetes==1!3.0.0<br>
apache-airflow-providers-elasticsearch==1!2.2.0<br>
apache-airflow-providers-ftp==1!2.1.2<br>
apache-airflow-providers-google==1!6.7.0<br>
apache-airflow-providers-http==1!2.1.2<br>
apache-airflow-providers-imap==1!2.2.3<br>
apache-airflow-providers-microsoft-azure==1!3.7.2<br>
apache-airflow-providers-mysql==1!2.2.3<br>
apache-airflow-providers-postgres==1!4.1.0<br>
apache-airflow-providers-redis==1!2.0.4<br>
apache-airflow-providers-slack==1!4.2.3<br>
apache-airflow-providers-snowflake==2.6.0<br>
apache-airflow-providers-sqlite==1!2.1.3<br>
apache-airflow-providers-ssh==1!2.4.3</p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Astronomer</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">Airflow v2.2.5-2<br>
Scheduler count: 2<br>
Scheduler resources: 20AU (2CPU and 7.5GB)<br>
Executor used: Celery<br>
Worker count : 2<br>
Worker resources: 24AU (2.4 CPU and 9GB)<br>
Termination grace period : 2mins</p>
<h3 dir="auto">Anything else</h3>
<p dir="auto">This issue happens in all the dag runs. Some of the tasks are getting skipped and some are getting succeeded and the scheduler fails with the Deadlock exception error.</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 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[X] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[X] bug report
[ ] 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>
In Hybrid mode (when using upgradeAdapter.bootstrap()), <code class="notranslate"><ng-content></code> doesn't work if placed inside an <code class="notranslate">*ngIF</code></p>
<p dir="auto"><strong>Expected/desired behavior</strong><br>
it should be possible to include the light DOM children conditionally using *ngIF</p>
<p dir="auto"><strong>Reproduction of the problem</strong><br>
Here is the plunk : <a href="https://plnkr.co/edit/LaNrcc?p=preview" rel="nofollow">https://plnkr.co/edit/LaNrcc?p=preview</a></p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
it should be possible to include the light DOM children conditionally using *ngIF</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Due to this bug, it's not possible to include the light DOM children conditionally.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.0-rc.1</li>
<li><strong>Browser:</strong> [Chrome XX ]<br>
Tested in Chrome Version 51.0.2704.103 m</li>
<li><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5 | Dart]<br>
<a href="https://code.angularjs.org/tools/typescript.js" rel="nofollow">https://code.angularjs.org/tools/typescript.js</a></li>
</ul> | <p dir="auto">When there is <code class="notranslate"><ng-content></code> tag in <code class="notranslate"><template></code>, the component could not been correctly downgraded.</p>
<p dir="auto">During initialization, the <code class="notranslate"><ng-content></code> inside a <code class="notranslate"><template></code> may corresponds to no element in DOM. <code class="notranslate">DowngradeNg2ComponentAdapter.contentInsertionPoint.parentNode</code> is <code class="notranslate">null</code>. After has been rendered into DOM, DowngradeNg2ComponentAdapter.prototype.projectContent won't been triggered again. So Angular 1 contents won't get projected after initialization.
</p><p dir="auto">For example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" @Component({
selector: 'cannot-be-downgraded',
template: `
<div *ngIf="show">
<ng-content></ng-content>
</div>`
})
export class CannotBeDowngraded {
@Input() show: boolean = false;
}"><pre class="notranslate"><code class="notranslate"> @Component({
selector: 'cannot-be-downgraded',
template: `
<div *ngIf="show">
<ng-content></ng-content>
</div>`
})
export class CannotBeDowngraded {
@Input() show: boolean = false;
}
</code></pre></div><p></p> | 1 |
<p dir="auto">When I try to use children of a component with forwardRef has the next error:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="TS2322: Type '{ children: ReactNode; error: boolean; full: boolean; secondary: boolean; type: "submit" | "reset" | "button"; white: boolean; }' is not assignable to type 'IntrinsicAttributes & BaseButtonInnerProps & RefAttributes<HTMLButtonElement>'. Property 'children' does not exist on type 'IntrinsicAttributes & BaseButtonInnerProps & RefAttributes<HTMLButtonElement>'."><pre class="notranslate">TS2322: <span class="pl-smi">Type</span> '<span class="pl-kos">{</span> children: <span class="pl-smi">ReactNode</span><span class="pl-kos">;</span> error: <span class="pl-s1">boolean</span><span class="pl-kos">;</span> full: <span class="pl-s1">boolean</span><span class="pl-kos">;</span> secondary: <span class="pl-s1">boolean</span><span class="pl-kos">;</span> type: <span class="pl-s">"submit"</span> <span class="pl-c1">|</span> <span class="pl-s">"reset"</span> <span class="pl-c1">|</span> <span class="pl-s">"button"</span><span class="pl-kos">;</span> white: <span class="pl-s1">boolean</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-s">' is not assignable to type '</span><span class="pl-kos"></span><span class="pl-smi">IntrinsicAttributes</span> <span class="pl-c1">&</span> <span class="pl-smi">BaseButtonInnerProps</span> <span class="pl-c1">&</span> <span class="pl-smi">RefAttributes</span><span class="pl-c1"><</span><span class="pl-smi">HTMLButtonElement</span><span class="pl-c1">></span><span class="pl-s">'. Property '</span><span class="pl-s1">children</span><span class="pl-s">' does not exist on type '</span><span class="pl-smi">IntrinsicAttributes</span> <span class="pl-c1">&</span> <span class="pl-smi">BaseButtonInnerProps</span> <span class="pl-c1">&</span> <span class="pl-smi">RefAttributes</span><span class="pl-c1"><</span><span class="pl-smi">HTMLButtonElement</span><span class="pl-c1">></span>'.</pre></div>
<p dir="auto">The error is in the types:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface ForwardRefRenderFunction<T, P = {}> {
(props: PropsWithChildren<P>, ref: ((instance: T | null) => void) | MutableRefObject<T | null> | null): ReactElement | null;
displayName?: string;
// explicit rejected with `never` required due to
// https://github.com/microsoft/TypeScript/issues/36826
/**
* defaultProps are not supported on render functions
*/
defaultProps?: never;
/**
* propTypes are not supported on render functions
*/
propTypes?: never;
}
function forwardRef<T, P = {}>(render: ForwardRefRenderFunction<T, P>): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">ForwardRefRenderFunction</span><span class="pl-c1"><</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">P</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-c1">></span> <span class="pl-kos">{</span>
<span class="pl-kos">(</span><span class="pl-s1">props</span>: <span class="pl-smi">PropsWithChildren</span><span class="pl-kos"><</span><span class="pl-smi">P</span><span class="pl-kos">></span><span class="pl-kos">,</span> <span class="pl-s1">ref</span>: <span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">instance</span>: <span class="pl-smi">T</span> <span class="pl-c1">|</span> <span class="pl-c1">null</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">)</span> <span class="pl-c1">|</span> <span class="pl-smi">MutableRefObject</span><span class="pl-kos"><</span><span class="pl-smi">T</span> <span class="pl-c1">|</span> <span class="pl-c1">null</span><span class="pl-kos">></span> <span class="pl-c1">|</span> <span class="pl-c1">null</span><span class="pl-kos">)</span>: <span class="pl-smi">ReactElement</span> <span class="pl-c1">|</span> <span class="pl-c1">null</span><span class="pl-kos">;</span>
<span class="pl-c1">displayName</span>?: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">// explicit rejected with `never` required due to</span>
<span class="pl-c">// https://github.com/microsoft/TypeScript/issues/36826</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * defaultProps are not supported on render functions</span>
<span class="pl-c"> */</span>
<span class="pl-c1">defaultProps</span>?: <span class="pl-smi">never</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * propTypes are not supported on render functions</span>
<span class="pl-c"> */</span>
<span class="pl-c1">propTypes</span>?: <span class="pl-smi">never</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">function</span> <span class="pl-s1">forwardRef</span><span class="pl-c1"><</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">P</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-c1">></span><span class="pl-kos">(</span><span class="pl-s1">render</span>: <span class="pl-smi">ForwardRefRenderFunction</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">P</span><span class="pl-kos">></span><span class="pl-kos">)</span>: <span class="pl-smi">ForwardRefExoticComponent</span><span class="pl-kos"><</span><span class="pl-smi">PropsWithoutRef</span><span class="pl-kos"><</span><span class="pl-smi">P</span><span class="pl-kos">></span> <span class="pl-c1">&</span> <span class="pl-smi">RefAttributes</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span><span class="pl-kos">></span><span class="pl-kos">;</span></pre></div>
<p dir="auto">That return a type of a component without children, but is you add the children in your props with <code class="notranslate">PropsWithChildren</code> , exists another problem.</p>
<p dir="auto">The <code class="notranslate">ForwardRefRenderFunction</code> has a duplicate <code class="notranslate">PropsWithChildren</code></p>
<p dir="auto"><strong>Solution:</strong></p>
<p dir="auto">Exists 2 ways to solve this:</p>
<ol dir="auto">
<li>Wrap <code class="notranslate">PropsWithChildren</code> to <code class="notranslate">PropsWithoutRef<P></code></li>
<li>Remove <code class="notranslate">PropsWithChildren</code> of <code class="notranslate">ForwardRefRenderFunction</code> (the user need declare manually the <code class="notranslate">PropsWithChildren</code> in their components)</li>
</ol>
<p dir="auto">Autors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/johnnyreilly/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/johnnyreilly">@johnnyreilly</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bbenezech/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bbenezech">@bbenezech</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pzavolinsky/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pzavolinsky">@pzavolinsky</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/digiguru/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/digiguru">@digiguru</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ericanderson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ericanderson">@ericanderson</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/DovydasNavickas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DovydasNavickas">@DovydasNavickas</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/theruther4d/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/theruther4d">@theruther4d</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/guilhermehubner/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/guilhermehubner">@guilhermehubner</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ferdaber/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ferdaber">@ferdaber</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jrakotoharisoa/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jrakotoharisoa">@jrakotoharisoa</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pascaloliv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pascaloliv">@pascaloliv</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Hotell/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Hotell">@Hotell</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/franklixuefei/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/franklixuefei">@franklixuefei</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Jessidhia/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Jessidhia">@Jessidhia</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/saranshkataria/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/saranshkataria">@saranshkataria</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lukyth/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lukyth">@lukyth</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/eps1lon/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eps1lon">@eps1lon</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zieka/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zieka">@zieka</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dancerphil/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dancerphil">@dancerphil</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dimitropoulos/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dimitropoulos">@dimitropoulos</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/disjukr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/disjukr">@disjukr</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vhfmag/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vhfmag">@vhfmag</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hellatan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hellatan">@hellatan</a></p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/arcgis-js-api</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.
<ul dir="auto">
<li>Authors: <a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/Esri/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Esri">@Esri</a></li>
</ul>
</li>
</ul>
<p dir="auto">This is in relation to the <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/arcgis-js-api/v3">arcgis-js-api v3</a> definitions.</p>
<h2 dir="auto">Overview</h2>
<p dir="auto">I have created namespace-style type definitions for v3 of the arcgis-js-api for people who don't use AMD for their whole project. The definitions can be found here: <a href="https://github.com/TwitchBronBron/esri-javascript-api-typings">https://github.com/TwitchBronBron/esri-javascript-api-typings</a>. Where in DefinitelyTyped should I put them, and what should I name them since they are just in a different format from the original?</p>
<h2 dir="auto">Details</h2>
<p dir="auto">The arcgis-js-api definitions are written assuming that all users will be using the AMD module format. However, we do not write our projects in AMD. Instead, we use standard typescript namespaces, and sprinkle in AMD whenever we need to use the arcgis-js-api pieces. Here's an example:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="namespace app {
class MapManager {
private map: any;
createMap(): Promise<any> {
return new Promise((resolve) => {
require(['esri/map'], function (Map) {
this.map = new Map('map-id');
resolve(this.map);
});
});
}
}
} "><pre class="notranslate"><span class="pl-k">namespace</span> <span class="pl-s1">app</span> <span class="pl-kos">{</span>
<span class="pl-k">class</span> <span class="pl-smi">MapManager</span> <span class="pl-kos">{</span>
<span class="pl-k">private</span> <span class="pl-c1">map</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-en">createMap</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">any</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">Promise</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">resolve</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-s">'esri/map'</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-smi">Map</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">map</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Map</span><span class="pl-kos">(</span><span class="pl-s">'map-id'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">map</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>
<span class="pl-kos">}</span> </pre></div>
<p dir="auto">This prevents us from using the arcgis-js-api TypeScript definitions found in DefinitelyTyped because we are not all-in with AMD.</p>
<p dir="auto">For everyone who uses the ESRI JavaScript API in this way, it would be valuable to have the types in a standard namespace-style format. We would need to manually assign all of those types to our objects, but there is still a TON of value in having type information about these once they are wired up. Here is how we would consume those definitions:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/// <reference path="path/to/arcgis-js-api-namespaced.d.ts" />
namespace app {
class MapManager {
//Now every consumer of MapManager#map will get type information about the esri map
public map: esri.Map;
createMap(): Promise<esri.Map> {
return new Promise((resolve) => {
require(['esri/map'], function (Map) {
this.map = new Map('map-id');
resolve(this.map);
});
});
}
}
}"><pre class="notranslate"><span class="pl-c">/// <reference path="path/to/arcgis-js-api-namespaced.d.ts" /></span>
<span class="pl-k">namespace</span> <span class="pl-s1">app</span> <span class="pl-kos">{</span>
<span class="pl-k">class</span> <span class="pl-smi">MapManager</span> <span class="pl-kos">{</span>
<span class="pl-c">//Now every consumer of MapManager#map will get type information about the esri map</span>
<span class="pl-k">public</span> <span class="pl-c1">map</span>: <span class="pl-s1">esri</span><span class="pl-kos">.</span><span class="pl-smi">Map</span><span class="pl-kos">;</span>
<span class="pl-en">createMap</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-s1">esri</span><span class="pl-kos">.</span><span class="pl-smi">Map</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">Promise</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">resolve</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-s">'esri/map'</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-smi">Map</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">map</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Map</span><span class="pl-kos">(</span><span class="pl-s">'map-id'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">map</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>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">I have already created the namespace-style versions of the arcgis-js-api type definitions. You can find them here: <a href="https://github.com/TwitchBronBron/esri-javascript-api-typings">https://github.com/TwitchBronBron/esri-javascript-api-typings</a>. I think these belong in DefinitelyTyped, but <strong>where in DefinitelyTyped should I put them</strong>, and <strong>what should I name it</strong> since there is already a project with arcgis-js-api in this repository?</p>
<p dir="auto">Thanks!</p> | 0 |
<p dir="auto">Hello, I'm not sure if it is an intended behavior or not, and I did not find any mention about this in the documentation or in the github issue tracker. I'm filing it - just in case it was not planned to work this way.</p>
<h4 dir="auto">Problem description</h4>
<p dir="auto">On save to HDF5 file <code class="notranslate">RangeIndex</code> of pandas.DataFrame is converted to <code class="notranslate">Int64Index</code> (which could add quite some to the stored space for the long tables).</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df = pd.DataFrame(np.random.randn(1000,2))
df.index"><pre class="notranslate"><span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randn</span>(<span class="pl-c1">1000</span>,<span class="pl-c1">2</span>))
<span class="pl-s1">df</span>.<span class="pl-s1">index</span></pre></div>
<p dir="auto">results in <code class="notranslate">RangeIndex(start=0, stop=1000, step=1)</code></p>
<p dir="auto">Then</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df.to_hdf('tmp.h5', 'df')
df = pd.read_hdf('tmp.h5', 'df')
df.index"><pre class="notranslate"><span class="pl-s1">df</span>.<span class="pl-en">to_hdf</span>(<span class="pl-s">'tmp.h5'</span>, <span class="pl-s">'df'</span>)
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_hdf</span>(<span class="pl-s">'tmp.h5'</span>, <span class="pl-s">'df'</span>)
<span class="pl-s1">df</span>.<span class="pl-s1">index</span></pre></div>
<p dir="auto">results in <code class="notranslate">Int64Index([ 0, 1, ..., 999], dtype='int64', length=1000) </code></p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.6.4.final.0<br>
python-bits: 64<br>
OS: Windows<br>
OS-release: 7<br>
machine: AMD64<br>
processor: Intel64 Family 6 Model 63 Stepping 2, GenuineIntel<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: None<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.22.0<br>
pytest: 3.3.2<br>
pip: 9.0.1<br>
setuptools: 38.4.0<br>
Cython: 0.27.3<br>
numpy: 1.14.1<br>
scipy: 1.0.0<br>
pyarrow: None<br>
xarray: None<br>
IPython: 6.2.1<br>
sphinx: 1.6.6<br>
patsy: 0.5.0<br>
dateutil: 2.6.1<br>
pytz: 2018.3<br>
blosc: None<br>
bottleneck: 1.2.1<br>
tables: 3.4.2<br>
numexpr: 2.6.4<br>
feather: None<br>
matplotlib: 2.1.2<br>
openpyxl: 2.4.10<br>
xlrd: 1.1.0<br>
xlwt: 1.3.0<br>
xlsxwriter: 1.0.2<br>
lxml: 4.1.1<br>
bs4: 4.6.0<br>
html5lib: 1.0.1<br>
sqlalchemy: 1.2.1<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.10<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="store.append(df,'df',write_index=True)"><pre class="notranslate"><code class="notranslate">store.append(df,'df',write_index=True)
</code></pre></div>
<p dir="auto">makes sense (<code class="notranslate">index</code> is already taken as its passed thru to determine whether to create an actual on in the table)</p> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=mdeinum" rel="nofollow">Marten Deinum</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4293?redirect=false" rel="nofollow">SPR-4293</a></strong> and commented</p>
<p dir="auto">java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;<br>
at org.springframework.jdbc.core.JdbcTemplate.extract ReturnedResults(JdbcTemplate.java:1018)<br>
at org.springframework.jdbc.core.JdbcTemplate$5.doInC allableStatement(JdbcTemplate.java:970)<br>
at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:911)<br>
at org.springframework.jdbc.core.JdbcTemplate.call(Jd bcTemplate.java:960)<br>
at org.springframework.jdbc.object.StoredProcedure.ex ecute(StoredProcedure.java:113)<br>
at com.lehman.ftg.reg.basel.database.ProcessUIJobRequ estImpl.processJob(ProcessUIJobRequestImpl.java:64 )<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:324)<br>
at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:301)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)<br>
at org.springframework.aop.framework.adapter.AfterRet urningAdviceInterceptor.invoke(AfterReturningAdvic eInterceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.adapter.MethodBe foreAdviceInterceptor.invoke(MethodBeforeAdviceInt erceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)<br>
at $Proxy380.processJob(Unknown Source)<br>
at com.lehman.ftg.reg.basel.database.FeedUploadDaoImp l.requestFeedFileProcessing(FeedUploadDaoImpl.java :28)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:324)<br>
at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:301)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)<br>
at org.springframework.aop.framework.adapter.AfterRet urningAdviceInterceptor.invoke(AfterReturningAdvic eInterceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.adapter.MethodBe foreAdviceInterceptor.invoke(MethodBeforeAdviceInt erceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)<br>
at $Proxy381.requestFeedFileProcessing(Unknown Source)<br>
at com.lehman.ftg.reg.basel.bizlogic.FeedsUploadManag erImpl.requestFeedFileProcessing(FeedsUploadManage rImpl.java:141)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:324)<br>
at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:301)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)<br>
at org.springframework.aop.framework.adapter.AfterRet urningAdviceInterceptor.invoke(AfterReturningAdvic eInterceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.adapter.MethodBe foreAdviceInterceptor.invoke(MethodBeforeAdviceInt erceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)<br>
at $Proxy383.requestFeedFileProcessing(Unknown Source)</p>
<p dir="auto">JdbcTemplate usejava.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;<br>
at org.springframework.jdbc.core.JdbcTemplate.extract ReturnedResults(JdbcTemplate.java:1018)<br>
at org.springframework.jdbc.core.JdbcTemplate$5.doInC allableStatement(JdbcTemplate.java:970)<br>
at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:911)<br>
at org.springframework.jdbc.core.JdbcTemplate.call(Jd bcTemplate.java:960)<br>
at org.springframework.jdbc.object.StoredProcedure.ex ecute(StoredProcedure.java:113)<br>
at com.lehman.ftg.reg.basel.database.ProcessUIJobRequ estImpl.processJob(ProcessUIJobRequestImpl.java:64 )<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:324)<br>
at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:301)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)<br>
at org.springframework.aop.framework.adapter.AfterRet urningAdviceInterceptor.invoke(AfterReturningAdvic eInterceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.adapter.MethodBe foreAdviceInterceptor.invoke(MethodBeforeAdviceInt erceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)<br>
at $Proxy380.processJob(Unknown Source)<br>
at com.lehman.ftg.reg.basel.database.FeedUploadDaoImp l.requestFeedFileProcessing(FeedUploadDaoImpl.java :28)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:324)<br>
at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:301)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)<br>
at org.springframework.aop.framework.adapter.AfterRet urningAdviceInterceptor.invoke(AfterReturningAdvic eInterceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.adapter.MethodBe foreAdviceInterceptor.invoke(MethodBeforeAdviceInt erceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)<br>
at $Proxy381.requestFeedFileProcessing(Unknown Source)<br>
at com.lehman.ftg.reg.basel.bizlogic.FeedsUploadManag erImpl.requestFeedFileProcessing(FeedsUploadManage rImpl.java:141)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:324)<br>
at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:301)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)<br>
at org.springframework.aop.framework.adapter.AfterRet urningAdviceInterceptor.invoke(AfterReturningAdvic eInterceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.adapter.MethodBe foreAdviceInterceptor.invoke(MethodBeforeAdviceInt erceptor.java:50)<br>
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)<br>
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)<br>
at $Proxy383.requestFeedFileProcessing(Unknown Source)</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5 final</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="398083512" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8893" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8893/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8893">#8893</a> JdbcTemplate extractReturnedResults uses Java 5 method of Integer class (<em><strong>"duplicates"</strong></em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=eugenparaschiv" rel="nofollow">Eugen Paraschiv</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9791?redirect=false" rel="nofollow">SPR-9791</a></strong> and commented</p>
<p dir="auto">For the following (non-standard but not prohibited) usage of parameters in an URI:<br>
<code class="notranslate">http://localhost:8080/rest-sec/api/privilege?q=name=value</code><br>
Where the parameter should be (and indeed, both the browser as well as other libraries to parse it correctly like this):<br>
name = <code class="notranslate">q</code><br>
value = <code class="notranslate">name=jDiedXRD</code></p>
<p dir="auto">Instead of identifying the one parameter, <code class="notranslate">RestTemplate</code> incorrectly identifies two:<br>
<code class="notranslate">q=name</code><br>
<code class="notranslate">value=null</code><br>
This happens regardless of the fact that there isn't even a <code class="notranslate">&</code> delimiter in the entire URI.</p>
<p dir="auto">This is because HttpUrlTemplate is used to parse the URI into <code class="notranslate">UriComponents</code>:<br>
<code class="notranslate">UriComponentsBuilder.fromUriString(uriTemplate).build();</code><br>
This essentially fails to properly break out the parameter the regex.</p>
<p dir="auto">Note: escaping the <code class="notranslate">=</code> character before using the template doesn't work either - the template escapes the entire URI again - which results in an invalid URI)</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1.2</p>
<p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?129138-Possible-bug-in-RestTemplate-double-checking-before-opening-a-JIRA&p=421494" rel="nofollow">http://forum.springsource.org/showthread.php?129138-Possible-bug-in-RestTemplate-double-checking-before-opening-a-JIRA&p=421494</a></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="398153675" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14465" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14465/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14465">#14465</a> Erroneous "0" returned where empty string expected in call through the RestTemplate (<em><strong>"duplicates"</strong></em>)</li>
</ul> | 0 |
<p dir="auto"><code class="notranslate">&mut</code> can alias with <code class="notranslate">&const</code>, <code class="notranslate">@mut</code>, other types like <code class="notranslate">@mut</code> that allow a <code class="notranslate">&mut</code> borrow while still allowing reads and closures containing captured aliases.</p> | <p dir="auto">This is blocked on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="28011414" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/12429" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/12429/hovercard" href="https://github.com/rust-lang/rust/issues/12429">#12429</a>, at least when it comes to function signatures. Since <code class="notranslate">@mut T</code> and <code class="notranslate">&const T</code> are gone, there are currently never aliases of an <code class="notranslate">&mut T</code> <em>parameter</em> in sound code.</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">Do not allow exporting an entry in <code class="notranslate">exportPathMap</code> that does not start with a backslash<br>
-or-<br>
Ensure that the page template defined in an <code class="notranslate">exportPathMap</code> entry either starts with <em>or is preprended with</em> a backslash to ensure operability.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Using a <code class="notranslate">page</code> value in a path exported from <code class="notranslate">exportPathMap</code> that does not start with a backslash <code class="notranslate">/</code> results in an error on the client when it attempts to retrieve <code class="notranslate">/_next/:buildID/pagemytemplate</code> instead of <code class="notranslate">/_next/:buildID/page/mytemplate</code>. Because of this functionality, a brief 404 will displayed, then replaced with the actual page request.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Export a path in <code class="notranslate">exportPathMap</code> with a <code class="notranslate">page</code> value that does not start with a backslash.</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">This resulted in unexpected 404's, and was a very silent error.</p> | <p dir="auto">In example code about external stylesheet <a href="https://github.com/zeit/next.js/tree/master/examples/with-global-stylesheet">https://github.com/zeit/next.js/tree/master/examples/with-global-stylesheet</a> , it still has <code class="notranslate">dangerouslySetInnerHTML</code>. According to this <code class="notranslate">styled-jsx</code> improvement` <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="213640408" data-permission-text="Title is private" data-url="https://github.com/vercel/styled-jsx/issues/148" data-hovercard-type="pull_request" data-hovercard-url="/vercel/styled-jsx/pull/148/hovercard" href="https://github.com/vercel/styled-jsx/pull/148">vercel/styled-jsx#148</a>, we can reference imported stylesheet now.</p>
<p dir="auto">I tried to change code and it works.</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" export default () =>
<div>
- <style dangerouslySetInnerHTML={{ __html: stylesheet }} />
+ <style jsx global>{stylesheet}</style>
<p>ciao</p>
</div>"><pre class="notranslate"> export default () =>
<div>
<span class="pl-md"><span class="pl-md">-</span> <style dangerouslySetInnerHTML={{ __html: stylesheet }} /></span>
<span class="pl-mi1"><span class="pl-mi1">+</span> <style jsx global>{stylesheet}</style></span>
<p>ciao</p>
</div></pre></div>
<p dir="auto">The <code class="notranslate">dangerouslySetInnerHTML</code> does not look right and might trigger eslint error. If my understanding is right, I'll submit a PR for this.</p> | 0 |
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">Ability to support multiple meta tags with same name. I see that there was an effort to support multiple meta tags with same property in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="386814507" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/5800" data-hovercard-type="pull_request" data-hovercard-url="/vercel/next.js/pull/5800/hovercard" href="https://github.com/vercel/next.js/pull/5800">#5800</a> but this still doesn't allow multiple meta tags with same name.<br>
This is useful to supporting <em>"citation_author"</em> for SEO indexing in Google Scholar <a href="https://scholar.google.com/intl/en-us/scholar/inclusion.html#indexing" rel="nofollow">https://scholar.google.com/intl/en-us/scholar/inclusion.html#indexing</a></p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p>
<ol dir="auto">
<li>Provide multiple meta tags with the same name in </li>
<li>Check the output</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto"><code class="notranslate"><meta name="citation_author" content="Rannels, Stephen R."> <meta name="citation_author" content="Falconieri, Mary"></code></p>
<p dir="auto">should give markup as such but, currently it produces</p>
<p dir="auto"><code class="notranslate"><meta name="citation_author" content="Falconieri, Mary"></code></p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>Version of Next.js: 9.1.6</li>
</ul> | <p dir="auto">As far as I can tell, a custom <code class="notranslate"><Document /></code> is only ever run in Node.js / SSR. If that's the case, why wouldn't importing native node modules be allowed?</p>
<p dir="auto"><em>edit:</em> Is this because of the way javascript is compiled through webpack with <code class="notranslate">emit-file-loader</code>?</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>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import fs from 'fs';"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">fs</span> <span class="pl-k">from</span> <span class="pl-s">'fs'</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">in _document.js should compile</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Build fails, suggesting installing fs</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li><code class="notranslate">import fs from 'fs'</code> in a custom document.</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">I'm working on flushing styled-components SSR output to a link tag, to enable potentially putting cloudfront in front of it and serve <code class="notranslate"><link></code> tags rather than inline styles.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>3beta</td>
</tr>
</tbody>
</table> | 0 |
<h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">2 Fancy Zone configs, first triggered by LeftWin Key and second triggered by RightWin key</p>
<p dir="auto">By default, my Fancy Zones is configured to roughly:<br>
5 -> 25 -> 25 -> 25 -> 20.<br>
Icon Gap -> Email -> Code -> Reference/Browser -> Notes App</p>
<p dir="auto">It would be great if I could trigger a second set of Fancy Zones:<br>
40-40-20<br>
Code/Text -> Reference/Browser -> Pomodoro timer</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">Left Windows Key + Arrow Key = Triggers first set of fancy zones<br>
Right Windows Key + Arrow Key = Triggers second set of fancy zones</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.17763.1217]
PowerToys version: v0.18.1
PowerToy module for which you are reporting the bug (if applicable): Power Launcher"><pre class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.17763.1217]
PowerToys version: v0.18.1
PowerToy module for which you are reporting the bug (if applicable): Power Launcher
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Make sure the Power Launcher is no longer running in the task bar then start PowerToys. This also occurs when PowerToys starts when computer boots up from shutdown and PowerToys is set to launch with Windows.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">No application error should occur.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">An application error is displayed as soon as PowerToys starts.</p>
<h1 dir="auto">Screenshots</h1>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6856556/83136238-247e4080-a0b5-11ea-8e24-890ede2ed29d.png"><img src="https://user-images.githubusercontent.com/6856556/83136238-247e4080-a0b5-11ea-8e24-890ede2ed29d.png" alt="image" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">Testcase:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(slice_patterns)]
fn main() { let x: &[String] = &[]; match x { [[b..]..] => { println!("Fun{}", b.len()); } } }"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>slice_patterns<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> x<span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-kos">[</span><span class="pl-smi">String</span><span class="pl-kos">]</span> = <span class="pl-c1">&</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">match</span> x <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-kos">[</span>b..<span class="pl-kos">]</span>..<span class="pl-kos">]</span> => <span class="pl-kos">{</span> <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"Fun{}"</span>, b.len<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">Running this gives <code class="notranslate">playpen: application terminated abnormally with signal 4 (Illegal instruction)</code>. A quick look at the IR shows that b somehow ends up uninitialized.</p> | <p dir="auto">Testcase:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(slice_patterns)]
fn main() { let x: &[String] = &[]; let [[ref _a, _b..]..] = x; }"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>slice_patterns<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> x<span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-kos">[</span><span class="pl-smi">String</span><span class="pl-kos">]</span> = <span class="pl-c1">&</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">let</span> <span class="pl-kos">[</span><span class="pl-kos">[</span><span class="pl-k">ref</span> _a<span class="pl-kos">,</span> _b..<span class="pl-kos">]</span>..<span class="pl-kos">]</span> = x<span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div>
<p dir="auto">This clearly shouldn't type-check, but currently compiles without any error.</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: 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>run main method of Application of dubbo-demo-xml-consumer.</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">The application will exit without thrown exception</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="java.lang.IllegalStateException: There's no ApplicationConfig specified.
at org.apache.dubbo.config.context.ConfigManager.lambda$getApplicationOrElseThrow$0(ConfigManager.java:88)
at java.base/java.util.Optional.orElseThrow(Optional.java:401)
at org.apache.dubbo.config.context.ConfigManager.getApplicationOrElseThrow(ConfigManager.java:88)
at org.apache.dubbo.rpc.model.ApplicationModel.getApplicationConfig(ApplicationModel.java:100)
at org.apache.dubbo.rpc.model.ApplicationModel.getName(ApplicationModel.java:104)
at org.apache.dubbo.rpc.model.ApplicationModel.getApplication(ApplicationModel.java:112)
at org.apache.dubbo.registry.integration.RegistryProtocol.destroy(RegistryProtocol.java:500)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.destroy(ProtocolFilterWrapper.java:166)
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.destroy(ProtocolListenerWrapper.java:80)
at org.apache.dubbo.config.DubboShutdownHook.destroyProtocols(DubboShutdownHook.java:140)
at org.apache.dubbo.config.DubboShutdownHook.destroyAll(DubboShutdownHook.java:124)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.destroy(DubboBootstrap.java:1037)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.stop(DubboBootstrap.java:817)
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextClosedEvent(DubboBootstrapApplicationListener.java:63)
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:54)
at org.apache.dubbo.config.spring.context.OneTimeExecutionApplicationContextEventListener.onApplicationEvent(OneTimeExecutionApplicationContextEventListener.java:40)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:991)
at org.springframework.context.support.AbstractApplicationContext$2.run(AbstractApplicationContext.java:929)"><pre lang="log" class="notranslate"><code class="notranslate">java.lang.IllegalStateException: There's no ApplicationConfig specified.
at org.apache.dubbo.config.context.ConfigManager.lambda$getApplicationOrElseThrow$0(ConfigManager.java:88)
at java.base/java.util.Optional.orElseThrow(Optional.java:401)
at org.apache.dubbo.config.context.ConfigManager.getApplicationOrElseThrow(ConfigManager.java:88)
at org.apache.dubbo.rpc.model.ApplicationModel.getApplicationConfig(ApplicationModel.java:100)
at org.apache.dubbo.rpc.model.ApplicationModel.getName(ApplicationModel.java:104)
at org.apache.dubbo.rpc.model.ApplicationModel.getApplication(ApplicationModel.java:112)
at org.apache.dubbo.registry.integration.RegistryProtocol.destroy(RegistryProtocol.java:500)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.destroy(ProtocolFilterWrapper.java:166)
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.destroy(ProtocolListenerWrapper.java:80)
at org.apache.dubbo.config.DubboShutdownHook.destroyProtocols(DubboShutdownHook.java:140)
at org.apache.dubbo.config.DubboShutdownHook.destroyAll(DubboShutdownHook.java:124)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.destroy(DubboBootstrap.java:1037)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.stop(DubboBootstrap.java:817)
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextClosedEvent(DubboBootstrapApplicationListener.java:63)
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:54)
at org.apache.dubbo.config.spring.context.OneTimeExecutionApplicationContextEventListener.onApplicationEvent(OneTimeExecutionApplicationContextEventListener.java:40)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:991)
at org.springframework.context.support.AbstractApplicationContext$2.run(AbstractApplicationContext.java:929)
</code></pre></div>
<p dir="auto">It's because the destroy method of DubboBootstrap is invoked twice when the application is closing.<br>
(1.When the DubboBootstrapApplicationListener accept the ContextClosedEvent, running once.)<br>
(2.The ShutdownHookCallback register when new the DubboBootstrap, running another time.)</p> | 0 |
|
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">i created 2 blueprint <strong>main</strong> and <strong>mobile</strong>. i expect mobile blueprint to render its own template.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="blueprint = Blueprint(
name='mobile',
import_name=__name__,
static_folder='assets',
static_url_path='/mobile_assets',
# app_cfg.APPPATH is a constant of absolute path to app root directory
template_folder=path.join(app_cfg.APPPATH,'blueprint/mobile/template'),
)
@blueprint.route('/', methods=['GET'])
def index_mobile():
data = {
'title': 'wow mobile',
'message': 'message from mobile blueprint'
}
# to test if i set the corrent absolute path to the blueprint template
print(path.join(app_cfg.APPPATH,'blueprint/mobile/template'))
return render_template('index.html',**data)"><pre class="notranslate"><span class="pl-s1">blueprint</span> <span class="pl-c1">=</span> <span class="pl-v">Blueprint</span>(
<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'mobile'</span>,
<span class="pl-s1">import_name</span><span class="pl-c1">=</span><span class="pl-s1">__name__</span>,
<span class="pl-s1">static_folder</span><span class="pl-c1">=</span><span class="pl-s">'assets'</span>,
<span class="pl-s1">static_url_path</span><span class="pl-c1">=</span><span class="pl-s">'/mobile_assets'</span>,
<span class="pl-c"># app_cfg.APPPATH is a constant of absolute path to app root directory</span>
<span class="pl-s1">template_folder</span><span class="pl-c1">=</span><span class="pl-s1">path</span>.<span class="pl-en">join</span>(<span class="pl-s1">app_cfg</span>.<span class="pl-v">APPPATH</span>,<span class="pl-s">'blueprint/mobile/template'</span>),
)
<span class="pl-en">@<span class="pl-s1">blueprint</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>
<span class="pl-k">def</span> <span class="pl-en">index_mobile</span>():
<span class="pl-s1">data</span> <span class="pl-c1">=</span> {
<span class="pl-s">'title'</span>: <span class="pl-s">'wow mobile'</span>,
<span class="pl-s">'message'</span>: <span class="pl-s">'message from mobile blueprint'</span>
}
<span class="pl-c"># to test if i set the corrent absolute path to the blueprint template</span>
<span class="pl-en">print</span>(<span class="pl-s1">path</span>.<span class="pl-en">join</span>(<span class="pl-s1">app_cfg</span>.<span class="pl-v">APPPATH</span>,<span class="pl-s">'blueprint/mobile/template'</span>))
<span class="pl-k">return</span> <span class="pl-en">render_template</span>(<span class="pl-s">'index.html'</span>,<span class="pl-c1">**</span><span class="pl-s1">data</span>)</pre></div>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">mobile blueprint render the template from <strong>main</strong></p>
<p dir="auto">there is already an issue about this since 2015. but for some unknown reason its closed without mentioning any solution for this problem.</p>
<p dir="auto">flask documention :<br>
<code class="notranslate">template_folder – A folder with templates that should be added to the app’s template search path. The path is relative to the blueprint’s root path. Blueprint templates are disabled by default. Blueprint templates have a lower precedence than those in the app’s templates folder.</code></p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Python version: Python 3.8.5</li>
<li>Flask version: Flask 1.1.2</li>
<li>Werkzeug version: Werkzeug 1.0.1</li>
</ul> | <ol dir="auto">
<li>File structure:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="project -
- templates \
- a \
search.html
- b \
search.html
- start.py
- myapplication \
- test.py "><pre class="notranslate"><code class="notranslate">project -
- templates \
- a \
search.html
- b \
search.html
- start.py
- myapplication \
- test.py
</code></pre></div>
<ol dir="auto">
<li>Start file:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# start.py
from flask import Flask
from myapplication.test import test_blueprint
app = Flask(__name__)
app.register_blueprint(test_blueprint)"><pre class="notranslate"><code class="notranslate"># start.py
from flask import Flask
from myapplication.test import test_blueprint
app = Flask(__name__)
app.register_blueprint(test_blueprint)
</code></pre></div>
<ol dir="auto">
<li>my application</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# test.py
from flask import Blueprint, render_template, abort
from jinja2 import TemplateNotFound
test_blueprint = Blueprint('test_blueprint', __name__,
template_folder='absolute_path_to_project/templates/a')
# YES, I specified the absolute path to the template a
@test_blueprint.route('/test')
def show():
try:
return render_template(''search.html") # HERE is the problem
except TemplateNotFound:
abort(404)"><pre class="notranslate"><code class="notranslate"># test.py
from flask import Blueprint, render_template, abort
from jinja2 import TemplateNotFound
test_blueprint = Blueprint('test_blueprint', __name__,
template_folder='absolute_path_to_project/templates/a')
# YES, I specified the absolute path to the template a
@test_blueprint.route('/test')
def show():
try:
return render_template(''search.html") # HERE is the problem
except TemplateNotFound:
abort(404)
</code></pre></div>
<p dir="auto">Is this a problem?<br>
# Actually, I want to render <strong>a/search.html</strong><br>
# But, <code class="notranslate">render_template()</code> does not use <strong>test_blueprint's template_folder</strong><br>
# <code class="notranslate">render_template()</code> search the <strong>template list</strong>, find the first <strong>search.html</strong>, then render<br>
# So, maybe render <strong>a/search.html</strong> or <strong>b/search.html</strong><br>
# This depend on the sequence of the <strong>template list</strong></p> | 1 |
<p dir="auto">Sometimes it is needed to parse several variants of item from single page, where only a couple of fields differ. Obvious way to do this is to create base item with all common fields collected and then create new items (for example in a loop) using new ItemLoader instance with base item passed to it.</p>
<p dir="auto">The problem I'm facing now is that ItemLoader.load_item() modifies base item - which is counterintuitive and can result in weird behavior (for example if variant items can have different fields - after those field were added to base item - they would appear in all loaded items).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [5]: item = Item()
In [7]: item['url'] = 'foo'
In [8]: item
Out[8]: {'url': 'foo'}
In [9]: l = ItemLoader(item)
In [12]: l.add_value('category', 'bar')
In [13]: item
Out[13]: {'url': 'foo'}
In [14]: item_copy = l.load_item()
In [15]: item_copy
Out[15]: {'category': 'bar', 'url': 'foo'}
In [16]: item
Out[16]: {'category': 'bar', 'url': 'foo'}
In [17]: id(item)
Out[17]: 49468304
In [18]: id(item_copy)
Out[18]: 49468304"><pre class="notranslate"><code class="notranslate">In [5]: item = Item()
In [7]: item['url'] = 'foo'
In [8]: item
Out[8]: {'url': 'foo'}
In [9]: l = ItemLoader(item)
In [12]: l.add_value('category', 'bar')
In [13]: item
Out[13]: {'url': 'foo'}
In [14]: item_copy = l.load_item()
In [15]: item_copy
Out[15]: {'category': 'bar', 'url': 'foo'}
In [16]: item
Out[16]: {'category': 'bar', 'url': 'foo'}
In [17]: id(item)
Out[17]: 49468304
In [18]: id(item_copy)
Out[18]: 49468304
</code></pre></div>
<p dir="auto">Now I'm using workaround like this to suppress such behavior:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="loader = ItemLoader(selector=sel)
...
item = loader.load_item()
for variant in variants:
item_copy = item.copy()
loader = ItemLoader(item_copy)
...
yield loader.load_item()"><pre class="notranslate"><code class="notranslate">loader = ItemLoader(selector=sel)
...
item = loader.load_item()
for variant in variants:
item_copy = item.copy()
loader = ItemLoader(item_copy)
...
yield loader.load_item()
</code></pre></div>
<p dir="auto">What do you think about using item copy inside ItemLoader by default?</p> | <p dir="auto">Seen with Scrapy 14.0, Twisted 11.1.0, Python 2.6/2.7. After downgrade to twisted 11.0.0 the error does not show up.</p>
<p dir="auto">In my case, happened in a long running spider which doesn't perform anything unusual, and after the error the crawler hangs up.</p>
<p dir="auto">See the log below:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2011-11-23 09:32:40-0600 [projects] DEBUG: Crawled (200) <GET http://www.example.net/p/foo> (referer: http://www.example.net/p?page=51903&sort=users)
2011-11-23 09:32:40-0600 [projects] DEBUG: Crawled (200) <GET http://www.example.net/p/bar> (referer: http://www.example.net/p?page=51903&sort=users)
2011-11-23 09:38:10-0600 [projects] INFO: Crawled 89600 pages (at 42 pages/min), scraped 31075 items (at 16 items/min)
2011-11-23 09:38:11-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:13-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:13-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:13-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:13-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:13-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:58-0600 [projects] INFO: Crawled 89600 pages (at 0 pages/min), scraped 31075 items (at 0 items/min)
2011-11-23 09:39:58-0600 [projects] INFO: Crawled 89600 pages (at 0 pages/min), scraped 31075 items (at 0 items/min)
2011-11-23 09:40:58-0600 [projects] INFO: Crawled 89600 pages (at 0 pages/min), scraped 31075 items (at 0 items/min)"><pre class="notranslate"><code class="notranslate">2011-11-23 09:32:40-0600 [projects] DEBUG: Crawled (200) <GET http://www.example.net/p/foo> (referer: http://www.example.net/p?page=51903&sort=users)
2011-11-23 09:32:40-0600 [projects] DEBUG: Crawled (200) <GET http://www.example.net/p/bar> (referer: http://www.example.net/p?page=51903&sort=users)
2011-11-23 09:38:10-0600 [projects] INFO: Crawled 89600 pages (at 42 pages/min), scraped 31075 items (at 16 items/min)
2011-11-23 09:38:11-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:13-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:13-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:13-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:13-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:13-0600 [-] Unhandled Error
Traceback (most recent call last):
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 45, in run
self.crawler.start()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/scrapy/crawler.py", line 76, in start
reactor.run(installSignalHandlers=False) # blocking call
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/tcp.py", line 337, in failIfNotConnected
self.connector.connectionFailed(failure.Failure(err))
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/internet/base.py", line 1055, in connectionFailed
self.factory.clientConnectionFailed(self, reason)
File "/home/josemanuel/envs/global/lib/python2.7/site-packages/twisted/web/client.py", line 413, in clientConnectionFailed
self._disconnectedDeferred.callback(None)
exceptions.AttributeError: ScrapyHTTPClientFactory instance has no attribute '_disconnectedDeferred'
2011-11-23 09:38:58-0600 [projects] INFO: Crawled 89600 pages (at 0 pages/min), scraped 31075 items (at 0 items/min)
2011-11-23 09:39:58-0600 [projects] INFO: Crawled 89600 pages (at 0 pages/min), scraped 31075 items (at 0 items/min)
2011-11-23 09:40:58-0600 [projects] INFO: Crawled 89600 pages (at 0 pages/min), scraped 31075 items (at 0 items/min)
</code></pre></div> | 0 |
<p dir="auto">In PowerToys Run searching for files and folders works fine if launched without admin privileges, but if you launch as admin all files and folders queries show no results (calculator, app search, ... work fine).</p>
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.19624.1000
PowerToys version: v0.18.1
PowerToy module for which you are reporting the bug (if applicable): Run"><pre class="notranslate"><code class="notranslate">Windows build number: 10.0.19624.1000
PowerToys version: v0.18.1
PowerToy module for which you are reporting the bug (if applicable): Run
</code></pre></div> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Version 10.0.18363.836
PowerToys version: v.0.18.1
PowerToy module for which you are reporting the bug: PowerToys Run"><pre class="notranslate"><code class="notranslate">Windows build number: Version 10.0.18363.836
PowerToys version: v.0.18.1
PowerToy module for which you are reporting the bug: PowerToys Run
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Install PowerToys via GetWin<br>
Run PowerToys in always admin mode<br>
Run PowerToys Run via Alt + Space<br>
Search for any give file / folder name</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Showing the file / folder which I searched for</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">No files / folders showing up what so ever,<br>
unless I type something like "D:\Documents..."</p>
<h1 dir="auto">Screenshots</h1>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/65788233/82751577-70c93800-9db8-11ea-929d-738eb5e63525.png"><img src="https://user-images.githubusercontent.com/65788233/82751577-70c93800-9db8-11ea-929d-738eb5e63525.png" alt="image" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/65788233/82761606-13ef7100-9dfc-11ea-8ebf-960528fbd493.png"><img src="https://user-images.githubusercontent.com/65788233/82761606-13ef7100-9dfc-11ea-8ebf-960528fbd493.png" alt="image" style="max-width: 100%;"></a><br>
It is a normal folder, I just changed the icon.</p> | 1 |
<p dir="auto">My Glide version is 3.6.1 and here I got a IllegalStateException.<br>
Should Glide handle this problem internally?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.RuntimeException: Unable to destroy activity {MY PACKAGE NAME}: java.lang.IllegalStateException: Activity has been destroyed
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4097)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4115)
at android.app.ActivityThread.access$1400(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1620)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5771)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:799)
Caused by: java.lang.IllegalStateException: Activity has been destroyed
at android.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1383)
at android.app.BackStackRecord.commitInternal(BackStackRecord.java:745)
at android.app.BackStackRecord.commitAllowingStateLoss(BackStackRecord.java:725)
at com.bumptech.glide.manager.RequestManagerRetriever.getRequestManagerFragment(SourceFile:159)
at com.bumptech.glide.manager.RequestManagerFragment.onAttach(SourceFile:117)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:865)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1079)
at android.app.BackStackRecord.run(BackStackRecord.java:852)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1485)
at android.app.FragmentManagerImpl.dispatchDestroy(FragmentManager.java:1929)
at android.app.Fragment.performDestroy(Fragment.java:2279)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1029)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1079)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1061)
at android.app.FragmentManagerImpl.dispatchDestroy(FragmentManager.java:1930)
at android.app.Activity.performDestroy(Activity.java:6297)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1151)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4084)
... 10 more"><pre class="notranslate"><code class="notranslate">java.lang.RuntimeException: Unable to destroy activity {MY PACKAGE NAME}: java.lang.IllegalStateException: Activity has been destroyed
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4097)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4115)
at android.app.ActivityThread.access$1400(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1620)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5771)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:799)
Caused by: java.lang.IllegalStateException: Activity has been destroyed
at android.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1383)
at android.app.BackStackRecord.commitInternal(BackStackRecord.java:745)
at android.app.BackStackRecord.commitAllowingStateLoss(BackStackRecord.java:725)
at com.bumptech.glide.manager.RequestManagerRetriever.getRequestManagerFragment(SourceFile:159)
at com.bumptech.glide.manager.RequestManagerFragment.onAttach(SourceFile:117)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:865)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1079)
at android.app.BackStackRecord.run(BackStackRecord.java:852)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1485)
at android.app.FragmentManagerImpl.dispatchDestroy(FragmentManager.java:1929)
at android.app.Fragment.performDestroy(Fragment.java:2279)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1029)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1079)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1061)
at android.app.FragmentManagerImpl.dispatchDestroy(FragmentManager.java:1930)
at android.app.Activity.performDestroy(Activity.java:6297)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1151)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4084)
... 10 more
</code></pre></div> | <p dir="auto">Hello,<br>
We are currently using Glide in one of our application. Actually we need a confirmation from your side. According to the Google Play Policy, all apps have to provide support for at least API level 26. We are targeting API level 28. So just for a safer side, do we need to do anything for supporting API level 28?</p> | 0 |
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-add-different-padding-to-each-side-of-an-element?solution=%3Cstyle%3E%0A%20%20.injected-text%20%7B%0A%20%20%20%20margin-bottom%3A%20-25px%3B%0A%20%20%20%20text-align%3A%20center%3B%0A%20%20%7D%0A%0A%20%20.box%20%7B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-color%3A%20black%3B%0A%20%20%20%20border-width%3A%205px%3B%0A%20%20%20%20text-align%3A%20center%3B%0A%20%20%7D%0A%0A%20%20.yellow-box%20%7B%0A%20%20%20%20background-color%3A%20yellow%3B%0A%20%20%20%20padding%3A10px%3B%0A%20%20%7D%0A%20%20%0A%20%20.red-box%20%7B%0A%20%20%20%20background-color%3Ared%3B%0A%20%20%20%20padding-top%3A%2040px%3B%0A%20%20%20%20padding-right%3A%2020px%3B%0A%20%20%20%20padding-bottom%3A%2020px%3B%0A%20%20%20%20padding-left%3A%2040px%3B%0A%20%20%7D%0A%0A%20%20.green-box%20%7B%0A%20%20%20%20background-color%3A%20green%3B%0A%20%20%20%20padding-top%3A%2040px%3B%0A%20%20%20%20padding-right%3A%2020px%3B%0A%20%20%20%20padding-bottom%3A%2020px%3B%0A%20%20%20%20padding-left%3A%2040px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%3Ch5%20class%3D%22injected-text%22%3Emargin%3C%2Fh5%3E%0A%0A%3Cdiv%20class%3D%22box%20yellow-box%22%3E%0A%20%20%3Ch5%20class%3D%22box%20red-box%22%3Epadding%3C%2Fh5%3E%0A%20%20%3Ch5%20class%3D%22box%20green-box%22%3Epadding%3C%2Fh5%3E%0A%3C%2Fdiv%3E%0A" rel="nofollow">Waypoint: Add Different Padding to Each Side of an Element</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:37.0) Gecko/20100101 Firefox/37.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="<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding:10px;
}
.red-box {
background-color:red;
padding-top: 40px;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 40px;
}
.green-box {
background-color: green;
padding-top: 40px;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 40px;
}
</style>
<h5 class="injected-text">margin</h5>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box green-box">padding</h5>
</div>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">style</span><span class="pl-kos">></span>
.<span class="pl-c1">injected-text</span> {
<span class="pl-c1">margin-bottom</span><span class="pl-kos">:</span> <span class="pl-c1">-25<span class="pl-smi">px</span></span>;
<span class="pl-c1">text-align</span><span class="pl-kos">:</span> center;
}
.<span class="pl-c1">box</span> {
<span class="pl-c1">border-style</span><span class="pl-kos">:</span> solid;
<span class="pl-c1">border-color</span><span class="pl-kos">:</span> black;
<span class="pl-c1">border-width</span><span class="pl-kos">:</span> <span class="pl-c1">5<span class="pl-smi">px</span></span>;
<span class="pl-c1">text-align</span><span class="pl-kos">:</span> center;
}
.<span class="pl-c1">yellow-box</span> {
<span class="pl-c1">background-color</span><span class="pl-kos">:</span> yellow;
<span class="pl-c1">padding</span><span class="pl-kos">:</span><span class="pl-c1">10<span class="pl-smi">px</span></span>;
}
.<span class="pl-c1">red-box</span> {
<span class="pl-c1">background-color</span><span class="pl-kos">:</span>red;
<span class="pl-c1">padding-top</span><span class="pl-kos">:</span> <span class="pl-c1">40<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-right</span><span class="pl-kos">:</span> <span class="pl-c1">20<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-bottom</span><span class="pl-kos">:</span> <span class="pl-c1">20<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-left</span><span class="pl-kos">:</span> <span class="pl-c1">40<span class="pl-smi">px</span></span>;
}
.<span class="pl-c1">green-box</span> {
<span class="pl-c1">background-color</span><span class="pl-kos">:</span> green;
<span class="pl-c1">padding-top</span><span class="pl-kos">:</span> <span class="pl-c1">40<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-right</span><span class="pl-kos">:</span> <span class="pl-c1">20<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-bottom</span><span class="pl-kos">:</span> <span class="pl-c1">20<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-left</span><span class="pl-kos">:</span> <span class="pl-c1">40<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">h5</span> <span class="pl-c1">class</span>="<span class="pl-s">injected-text</span>"<span class="pl-kos">></span>margin<span class="pl-kos"></</span><span class="pl-ent">h5</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">box yellow-box</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h5</span> <span class="pl-c1">class</span>="<span class="pl-s">box red-box</span>"<span class="pl-kos">></span>padding<span class="pl-kos"></</span><span class="pl-ent">h5</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h5</span> <span class="pl-c1">class</span>="<span class="pl-s">box green-box</span>"<span class="pl-kos">></span>padding<span class="pl-kos"></</span><span class="pl-ent">h5</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-add-different-padding-to-each-side-of-an-element?solution=%3Cstyle%3E%0A%20%20.injected-text%20%7B%0A%20%20%20%20margin-bottom%3A%20-25px%3B%0A%20%20%20%20text-align%3A%20center%3B%0A%20%20%7D%0A%0A%20%20.box%20%7B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-color%3A%20black%3B%0A%20%20%20%20border-width%3A%205px%3B%0A%20%20%20%20text-align%3A%20center%3B%0A%20%20%7D%0A%0A%20%20.yellow-box%20%7B%0A%20%20%20%20background-color%3A%20yellow%3B%0A%20%20%20%20padding%3A10px%3B%0A%20%20%7D%0A%20%20%0A%20%20.red-box%20%7B%0A%20%20%20%20background-color%3Ared%3B%0A%20%20%20%20padding-top%3A%2040px%3B%0A%20%20%20%20padding-right%3A%2020px%3B%0A%20%20%20%20padding-bottom%3A%2020px%3B%0A%20%20%20%20padding-left%3A%2040px%3B%0A%20%20%7D%0A%0A%20%20.green-box%20%7B%0A%20%20%20%20background-color%3A%20green%3B%0A%20%20%20%20padding-left%3A%2040px%3B%0A%20%20%20%20padding-top%3A%2040px%3B%0A%20%20%20%20padding-right%3A20px%3B%0A%20%20%20%20padding-bottom%3A20px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%3Ch5%20class%3D%22injected-text%22%3Emargin%3C%2Fh5%3E%0A%0A%3Cdiv%20class%3D%22box%20yellow-box%22%3E%0A%20%20%3Ch5%20class%3D%22box%20red-box%22%3Epadding%3C%2Fh5%3E%0A%20%20%3Ch5%20class%3D%22box%20green-box%22%3Epadding%3C%2Fh5%3E%0A%3C%2Fdiv%3E%0A" rel="nofollow">Waypoint: Add Different Padding to Each Side of an Element</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.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="<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding:10px;
}
.red-box {
background-color:red;
padding-top: 40px;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 40px;
}
.green-box {
background-color: green;
padding-top: 40px;
padding-right:20px;
padding-bottom:20px;
padding-left: 40px;
}
</style>
<h5 class="injected-text">margin</h5>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box green-box">padding</h5>
</div>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">style</span><span class="pl-kos">></span>
.<span class="pl-c1">injected-text</span> {
<span class="pl-c1">margin-bottom</span><span class="pl-kos">:</span> <span class="pl-c1">-25<span class="pl-smi">px</span></span>;
<span class="pl-c1">text-align</span><span class="pl-kos">:</span> center;
}
.<span class="pl-c1">box</span> {
<span class="pl-c1">border-style</span><span class="pl-kos">:</span> solid;
<span class="pl-c1">border-color</span><span class="pl-kos">:</span> black;
<span class="pl-c1">border-width</span><span class="pl-kos">:</span> <span class="pl-c1">5<span class="pl-smi">px</span></span>;
<span class="pl-c1">text-align</span><span class="pl-kos">:</span> center;
}
.<span class="pl-c1">yellow-box</span> {
<span class="pl-c1">background-color</span><span class="pl-kos">:</span> yellow;
<span class="pl-c1">padding</span><span class="pl-kos">:</span><span class="pl-c1">10<span class="pl-smi">px</span></span>;
}
.<span class="pl-c1">red-box</span> {
<span class="pl-c1">background-color</span><span class="pl-kos">:</span>red;
<span class="pl-c1">padding-top</span><span class="pl-kos">:</span> <span class="pl-c1">40<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-right</span><span class="pl-kos">:</span> <span class="pl-c1">20<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-bottom</span><span class="pl-kos">:</span> <span class="pl-c1">20<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-left</span><span class="pl-kos">:</span> <span class="pl-c1">40<span class="pl-smi">px</span></span>;
}
.<span class="pl-c1">green-box</span> {
<span class="pl-c1">background-color</span><span class="pl-kos">:</span> green;
<span class="pl-c1">padding-top</span><span class="pl-kos">:</span> <span class="pl-c1">40<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-right</span><span class="pl-kos">:</span><span class="pl-c1">20<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-bottom</span><span class="pl-kos">:</span><span class="pl-c1">20<span class="pl-smi">px</span></span>;
<span class="pl-c1">padding-left</span><span class="pl-kos">:</span> <span class="pl-c1">40<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">h5</span> <span class="pl-c1">class</span>="<span class="pl-s">injected-text</span>"<span class="pl-kos">></span>margin<span class="pl-kos"></</span><span class="pl-ent">h5</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">box yellow-box</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h5</span> <span class="pl-c1">class</span>="<span class="pl-s">box red-box</span>"<span class="pl-kos">></span>padding<span class="pl-kos"></</span><span class="pl-ent">h5</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h5</span> <span class="pl-c1">class</span>="<span class="pl-s">box green-box</span>"<span class="pl-kos">></span>padding<span class="pl-kos"></</span><span class="pl-ent">h5</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div> | 1 |
<p dir="auto">Windows build number: 10.0.19041.264<br>
PowerToys version: 0.18.2<br>
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run</p>
<p dir="auto">It sometimes uses up to 30% of my CPU power and about 600MB of RAM, affecting my performance</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/66783462/84386525-b2147100-ac1b-11ea-8b02-c97d52fd3b37.png"><img src="https://user-images.githubusercontent.com/66783462/84386525-b2147100-ac1b-11ea-8b02-c97d52fd3b37.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">改键功能与win10的历史剪贴板功能冲突</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="information_source" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png">ℹ</g-emoji> Computer information</h2>
<ul dir="auto">
<li>PowerToys version: V0.21.1</li>
<li>PowerToy Utility:</li>
<li>Running PowerToys as Admin: ✔️</li>
<li>Windows build number: 19041.508</li>
</ul>
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide detailed reproduction steps (if any)</h2>
<ol dir="auto">
<li>使用power toys互相修改Ctrl(left)<===>CapsLock</li>
<li>复制文本</li>
<li>使用win+v黏贴历史文本</li>
</ol>
<h3 dir="auto"><g-emoji class="g-emoji" alias="heavy_check_mark" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2714.png">✔️</g-emoji> Expected result</h3>
<p dir="auto">能够正常黏贴文字</p>
<h3 dir="auto"><g-emoji class="g-emoji" alias="x" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/274c.png">❌</g-emoji> Actual result</h3>
<p dir="auto">输出了字符"v"<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/29363456/93964849-3e920c00-fd93-11ea-9fdc-68f1437628a4.gif"><img src="https://user-images.githubusercontent.com/29363456/93964849-3e920c00-fd93-11ea-9fdc-68f1437628a4.gif" alt="myTest3" data-animated-image="" style="max-width: 100%;"></a></p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="camera" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4f7.png">📷</g-emoji> Screenshots</h2>
<p dir="auto"><em>Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form</em></p> | 0 |
<p dir="auto">If you run this code with only one go routine:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package main
import "fmt"
import "runtime"
import "time"
func cpuIntensive(p *int) {
for i := 1; i <= 100000000000; i++ {
*p = i
}
}
func main() {
runtime.GOMAXPROCS(1)
x := 0
go cpuIntensive(&x)
time.Sleep(100 * time.Millisecond)
// printed only after cpuIntensive is completely finished
fmt.Printf("x = %d.\n", x)
}"><pre class="notranslate"><code class="notranslate">package main
import "fmt"
import "runtime"
import "time"
func cpuIntensive(p *int) {
for i := 1; i <= 100000000000; i++ {
*p = i
}
}
func main() {
runtime.GOMAXPROCS(1)
x := 0
go cpuIntensive(&x)
time.Sleep(100 * time.Millisecond)
// printed only after cpuIntensive is completely finished
fmt.Printf("x = %d.\n", x)
}
</code></pre></div>
<p dir="auto">Scheduler is paralized, and Printf is NOT printed after 100ms as expected, but after all job is done in cpuintensive() go routine.</p>
<p dir="auto">But if programmer insert <code class="notranslate">runtime.Gosched()</code> in intensive for loop of routine, cooperative scheduler works fine.</p>
<p dir="auto">Is this by design or are there plans to make Golang scheduler preemptive?</p> | <p dir="auto">Currently goroutines are only preemptible at function call points. Hence, it's possible to write a tight loop (e.g., a numerical kernel or a spin on an atomic) with no calls or allocation that arbitrarily delays preemption. This can result in arbitrarily long pause times as the GC waits for all goroutines to stop.</p>
<p dir="auto">In unusual situations, this can even lead to deadlock when trying to stop the world. For example, the runtime's TestGoroutineParallelism tries to prevent GC during the test to avoid deadlock. It runs several goroutines in tight loops that communicate through a shared atomic variable. If the coordinator that starts these is paused part way through, it will deadlock.</p>
<p dir="auto">One possible fix is to insert preemption points on control flow loops that otherwise have no preemption points. Depending on the cost of this check, it may also require unrolling such loops to amortize the overhead of the check.</p>
<p dir="auto">This has been a longstanding issue, so I don't think it's necessary to fix it for 1.5. It can cause the 1.5 GC to miss its 10ms STW goal, but code like numerical kernels is probably not latency-sensitive. And as far as I can tell, causing a deadlock like the runtime test can do requires looking for trouble.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/RLH/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/RLH">@RLH</a></p> | 1 |
<p dir="auto">While scrolling through a page with many navigation items only the top shown are usable, shouldn't it be better to scroll the menubar too?<br>
ex: <a href="http://bootply.com/101076" rel="nofollow">http://bootply.com/101076</a></p> | <p dir="auto">Hi,</p>
<p dir="auto">Links on the bottom of the menu on the left are not easy reachable. I have to manually scroll to the end of the page.<br>
Maybe add a scrollbar ?:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/407a90f242922e3682da5a5076f1e568b1fa6a490ce300cd24b0e67909ebe54e/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353138313431392f313237383733332f33376133333262322d326632322d313165332d383033312d3632663330326366656235632e706e67"><img src="https://camo.githubusercontent.com/407a90f242922e3682da5a5076f1e568b1fa6a490ce300cd24b0e67909ebe54e/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353138313431392f313237383733332f33376133333262322d326632322d313165332d383033312d3632663330326366656235632e706e67" alt="2013-10-06_195759" data-canonical-src="https://f.cloud.github.com/assets/5181419/1278733/37a332b2-2f22-11e3-8031-62f302cfeb5c.png" style="max-width: 100%;"></a></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.4.1</li>
<li>Operating System version:Linux version 4.15.0-88-generic 16.04.1-Ubuntu</li>
<li>Java version: java version "1.8.0_201"</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>invoke the remote method in consumer side.</li>
<li>always throw a exception in the method implementation of server side.</li>
<li>catch the exception in consumer side, and print stacktrace of the exception.</li>
</ol>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">stacktrace of consumer side can not be obtained.</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">only stacktrace of server side was printed, we can not find where we invoked the remote method.</p>
<p dir="auto">I have read related the code, it's in <code class="notranslate">org.apache.dubbo.rpc.AppResponse#recreate</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Override
public Object recreate() throws Throwable {
if (exception != null) {
// fix issue#619
try {
// get Throwable class
Class clazz = exception.getClass();
while (!clazz.getName().equals(Throwable.class.getName())) {
clazz = clazz.getSuperclass();
}
// get stackTrace value
Field stackTraceField = clazz.getDeclaredField("stackTrace");
stackTraceField.setAccessible(true);
Object stackTrace = stackTraceField.get(exception);
if (stackTrace == null) {
exception.setStackTrace(new StackTraceElement[0]);
}
} catch (Exception e) {
// ignore
}
throw exception;
}
return result;
}"><pre class="notranslate"><code class="notranslate">@Override
public Object recreate() throws Throwable {
if (exception != null) {
// fix issue#619
try {
// get Throwable class
Class clazz = exception.getClass();
while (!clazz.getName().equals(Throwable.class.getName())) {
clazz = clazz.getSuperclass();
}
// get stackTrace value
Field stackTraceField = clazz.getDeclaredField("stackTrace");
stackTraceField.setAccessible(true);
Object stackTrace = stackTraceField.get(exception);
if (stackTrace == null) {
exception.setStackTrace(new StackTraceElement[0]);
}
} catch (Exception e) {
// ignore
}
throw exception;
}
return result;
}
</code></pre></div>
<p dir="auto">while recreating the result, <code class="notranslate">AppResponse</code> only deserialize the exception of server side, so stacktrace of consumer side is ignored.<br>
maybe we can modify <code class="notranslate">throw exception</code> to <code class="notranslate">new RpcException(exception)</code>.</p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.6.0</li>
<li>Operating System version: centos 6</li>
<li>Java version: jdk 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>服务端dubbo 2.7 客户端使用2.6.0 由于集群原因升级到2.7之后zk的curator客户端会造成任务卡住,所以无法升级</li>
<li>ause: java.lang.NumberFormatException: For input string: ""<br>
java.lang.NumberFormatException: For input string: ""<br>
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)<br>
at java.lang.Integer.parseInt(Integer.java:592)<br>
at java.lang.Integer.parseInt(Integer.java:615)<br>
at org.apache.dubbo.common.Version.parseInt(Version.java:128)<br>
at org.apache.dubbo.common.Version.getIntVersion(Version.java:113)<br>
at org.apache.dubbo.common.Version.isSupportResponseAttachment(Version.java:102)</li>
</ol> | 0 |
<p dir="auto">It seems that <code class="notranslate">np.vectorize</code> casts / unboxes <code class="notranslate">timedelta64</code> values and does so kind of inconsistently depending on the unit. I am not sure that this was intentional, but makes it difficult to work with such arrays; in particular, it is not possible to vectorize a function which takes <code class="notranslate">timedelta64</code> value;</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> np.__version__
'1.9.0'
>>> f = lambda x: print(type(x), x)
>>> xs = np.arange(1, 3).astype('timedelta64[h]')
>>> xs
array([1, 2], dtype='timedelta64[h]')"><pre class="notranslate"><code class="notranslate">>>> np.__version__
'1.9.0'
>>> f = lambda x: print(type(x), x)
>>> xs = np.arange(1, 3).astype('timedelta64[h]')
>>> xs
array([1, 2], dtype='timedelta64[h]')
</code></pre></div>
<p dir="auto">with <code class="notranslate">[h]</code> and <code class="notranslate">[s]</code> unit:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> _ = np.vectorize(f)(xs)
<class 'numpy.timedelta64'> 1 hours
<class 'datetime.timedelta'> 1:00:00
<class 'datetime.timedelta'> 2:00:00
>>> _ = np.vectorize(f)(xs.astype('timedelta64[s]'))
<class 'numpy.timedelta64'> 3600 seconds
<class 'datetime.timedelta'> 1:00:00
<class 'datetime.timedelta'> 2:00:00
>>> _ = np.vectorize(f, otypes='O')(xs.astype('timedelta64[s]'))
<class 'datetime.timedelta'> 1:00:00
<class 'datetime.timedelta'> 2:00:00"><pre class="notranslate"><code class="notranslate">>>> _ = np.vectorize(f)(xs)
<class 'numpy.timedelta64'> 1 hours
<class 'datetime.timedelta'> 1:00:00
<class 'datetime.timedelta'> 2:00:00
>>> _ = np.vectorize(f)(xs.astype('timedelta64[s]'))
<class 'numpy.timedelta64'> 3600 seconds
<class 'datetime.timedelta'> 1:00:00
<class 'datetime.timedelta'> 2:00:00
>>> _ = np.vectorize(f, otypes='O')(xs.astype('timedelta64[s]'))
<class 'datetime.timedelta'> 1:00:00
<class 'datetime.timedelta'> 2:00:00
</code></pre></div>
<p dir="auto">with <code class="notranslate">[ns]</code> unit:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> _ = np.vectorize(f)(xs.astype('timedelta64[ns]'))
<class 'numpy.timedelta64'> 3600000000000 nanoseconds
<class 'int'> 3600000000000
<class 'int'> 7200000000000
>>> _ = np.vectorize(f, otypes='O')(xs.astype('timedelta64[ns]'))
<class 'int'> 3600000000000
<class 'int'> 7200000000000"><pre class="notranslate"><code class="notranslate">>>> _ = np.vectorize(f)(xs.astype('timedelta64[ns]'))
<class 'numpy.timedelta64'> 3600000000000 nanoseconds
<class 'int'> 3600000000000
<class 'int'> 7200000000000
>>> _ = np.vectorize(f, otypes='O')(xs.astype('timedelta64[ns]'))
<class 'int'> 3600000000000
<class 'int'> 7200000000000
</code></pre></div> | <p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1173" rel="nofollow">http://projects.scipy.org/numpy/ticket/1173</a> on 2009-07-15 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/stsci-sienkiew/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/stsci-sienkiew">@stsci-sienkiew</a>, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pierregm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pierregm">@pierregm</a>.</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="======================================================================
FAIL: Tests new ufuncs on MaskedArrays.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/ra/pyssg/2.5.1/numpy/ma/tests/test_core.py", line 1403, in test_testUfuncRegression
assert_mask_equal(ur.mask, mr.mask)
File "/usr/stsci/pyssgdev/2.5.1/numpy/ma/testutils.py", line 237, in assert_mask_equal
assert_array_equal(m1, m2)
File "/usr/stsci/pyssgdev/2.5.1/numpy/ma/testutils.py", line 193, in assert_array_equal
header='Arrays are not equal')
File "/usr/stsci/pyssgdev/2.5.1/numpy/ma/testutils.py", line 186, in assert_array_compare
verbose=verbose, header=header)
File "/usr/stsci/pyssgdev/2.5.1/numpy/testing/utils.py", line 395, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not equal
(mismatch 25.0%)
x: array([False, True, False, True, False, False, False, True], dtype=bool)
y: array([False, True, False, False, False, False, False, False], dtype=bool)"><pre class="notranslate"><code class="notranslate">======================================================================
FAIL: Tests new ufuncs on MaskedArrays.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/ra/pyssg/2.5.1/numpy/ma/tests/test_core.py", line 1403, in test_testUfuncRegression
assert_mask_equal(ur.mask, mr.mask)
File "/usr/stsci/pyssgdev/2.5.1/numpy/ma/testutils.py", line 237, in assert_mask_equal
assert_array_equal(m1, m2)
File "/usr/stsci/pyssgdev/2.5.1/numpy/ma/testutils.py", line 193, in assert_array_equal
header='Arrays are not equal')
File "/usr/stsci/pyssgdev/2.5.1/numpy/ma/testutils.py", line 186, in assert_array_compare
verbose=verbose, header=header)
File "/usr/stsci/pyssgdev/2.5.1/numpy/testing/utils.py", line 395, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not equal
(mismatch 25.0%)
x: array([False, True, False, True, False, False, False, True], dtype=bool)
y: array([False, True, False, False, False, False, False, False], dtype=bool)
</code></pre></div>
<p dir="auto">numpy 1.4.0.dev7132</p>
<p dir="auto">solaris 8</p>
<p dir="auto">python 2.5.1</p> | 0 |
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>:<br>
Yes</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>:<br>
Mac OS X 10.13.6</li>
<li><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>:<br>
N/A</li>
<li><strong>TensorFlow installed from (source or binary)</strong>:<br>
binary</li>
<li><strong>TensorFlow version (use command below)</strong>:<br>
v1.10.0-rc1-19-g656e7a2b34 1.10.0</li>
<li><strong>Python version</strong>:<br>
Python 3.6.5</li>
<li><strong>Bazel version (if compiling from source)</strong>:<br>
N/A</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>:<br>
N/A</li>
<li><strong>CUDA/cuDNN version</strong>:<br>
N/A</li>
<li><strong>GPU model and memory</strong>:<br>
N/A</li>
<li><strong>Exact command to reproduce</strong>:<br>
N/A</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">Placeholders with shape <code class="notranslate">()</code> gets shape <code class="notranslate"><unknown></code> after <code class="notranslate">tf.graph_util.convert_variables_to_constants</code> has been run on a graph def.</p>
<p dir="auto">The expected result is that the shape is kept, as it is for tensors with higher rank.</p>
<h3 dir="auto">Source code / logs</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import tensorflow as tf
with tf.Graph().as_default(), tf.Session() as sess:
placeholder = tf.placeholder(tf.float32, shape=(), name='placeholder')
output = tf.identity(placeholder)
graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, [output.op.name])
print('Before:', placeholder.shape)
with tf.Graph().as_default() as g, tf.Session() as sess:
tf.import_graph_def(graph_def, name='')
placeholder = g.get_tensor_by_name('placeholder:0')
print('After:', placeholder.shape)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span>
<span class="pl-k">with</span> <span class="pl-s1">tf</span>.<span class="pl-v">Graph</span>().<span class="pl-en">as_default</span>(), <span class="pl-s1">tf</span>.<span class="pl-v">Session</span>() <span class="pl-k">as</span> <span class="pl-s1">sess</span>:
<span class="pl-s1">placeholder</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">placeholder</span>(<span class="pl-s1">tf</span>.<span class="pl-s1">float32</span>, <span class="pl-s1">shape</span><span class="pl-c1">=</span>(), <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'placeholder'</span>)
<span class="pl-s1">output</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">identity</span>(<span class="pl-s1">placeholder</span>)
<span class="pl-s1">graph_def</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">graph_util</span>.<span class="pl-en">convert_variables_to_constants</span>(<span class="pl-s1">sess</span>, <span class="pl-s1">sess</span>.<span class="pl-s1">graph_def</span>, [<span class="pl-s1">output</span>.<span class="pl-s1">op</span>.<span class="pl-s1">name</span>])
<span class="pl-en">print</span>(<span class="pl-s">'Before:'</span>, <span class="pl-s1">placeholder</span>.<span class="pl-s1">shape</span>)
<span class="pl-k">with</span> <span class="pl-s1">tf</span>.<span class="pl-v">Graph</span>().<span class="pl-en">as_default</span>() <span class="pl-k">as</span> <span class="pl-s1">g</span>, <span class="pl-s1">tf</span>.<span class="pl-v">Session</span>() <span class="pl-k">as</span> <span class="pl-s1">sess</span>:
<span class="pl-s1">tf</span>.<span class="pl-en">import_graph_def</span>(<span class="pl-s1">graph_def</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">''</span>)
<span class="pl-s1">placeholder</span> <span class="pl-c1">=</span> <span class="pl-s1">g</span>.<span class="pl-en">get_tensor_by_name</span>(<span class="pl-s">'placeholder:0'</span>)
<span class="pl-en">print</span>(<span class="pl-s">'After:'</span>, <span class="pl-s1">placeholder</span>.<span class="pl-s1">shape</span>)</pre></div>
<p dir="auto">Output</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Before: ()
After: <unknown>"><pre class="notranslate"><code class="notranslate">Before: ()
After: <unknown>
</code></pre></div> | <h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: yes</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Ubuntu 16.04</li>
<li><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>: no</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: <code class="notranslate">pip install tensorflow</code></li>
<li><strong>TensorFlow version (use command below)</strong>: v1.10.0-0-g656e7a2b34 1.10.0</li>
<li><strong>Python version</strong>: <code class="notranslate">Python 3.6.6 :: Anaconda, Inc.</code></li>
<li><strong>Bazel version (if compiling from source)</strong>: N/A</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>: N/A</li>
<li><strong>CUDA/cuDNN version</strong>: N/A</li>
<li><strong>GPU model and memory</strong>: N/A</li>
<li><strong>Exact command to reproduce</strong>: Run the program below</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">Usually, <code class="notranslate">tf.placeholder(tf.float32, shape=[]).get_shape()</code> is an empty shape, <code class="notranslate">()</code>. However, if you import a specific frozen graph first, the result of <code class="notranslate">get_shape()</code> will be <code class="notranslate">unknown</code>.</p>
<p dir="auto">Here is an example of a script that reproduces the issue and prints <code class="notranslate">unknown</code>:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import tensorflow as tf
IN_OUT = ['images_ph:0', 'inception_v3/logits/flatten/Reshape:0']
with open('inception-v3.pb', 'rb') as in_file:
graph_def = tf.GraphDef()
graph_def.ParseFromString(in_file.read())
tf.import_graph_def(graph_def, name='', return_elements=IN_OUT)
print('shape result', tf.placeholder(tf.float32, shape=[]).get_shape())"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span>
<span class="pl-v">IN_OUT</span> <span class="pl-c1">=</span> [<span class="pl-s">'images_ph:0'</span>, <span class="pl-s">'inception_v3/logits/flatten/Reshape:0'</span>]
<span class="pl-k">with</span> <span class="pl-en">open</span>(<span class="pl-s">'inception-v3.pb'</span>, <span class="pl-s">'rb'</span>) <span class="pl-k">as</span> <span class="pl-s1">in_file</span>:
<span class="pl-s1">graph_def</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-v">GraphDef</span>()
<span class="pl-s1">graph_def</span>.<span class="pl-v">ParseFromString</span>(<span class="pl-s1">in_file</span>.<span class="pl-en">read</span>())
<span class="pl-s1">tf</span>.<span class="pl-en">import_graph_def</span>(<span class="pl-s1">graph_def</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">''</span>, <span class="pl-s1">return_elements</span><span class="pl-c1">=</span><span class="pl-v">IN_OUT</span>)
<span class="pl-en">print</span>(<span class="pl-s">'shape result'</span>, <span class="pl-s1">tf</span>.<span class="pl-en">placeholder</span>(<span class="pl-s1">tf</span>.<span class="pl-s1">float32</span>, <span class="pl-s1">shape</span><span class="pl-c1">=</span>[]).<span class="pl-en">get_shape</span>())</pre></div>
<p dir="auto">Where <code class="notranslate">inception-v3.pb</code> can be downloaded at: <a href="https://storage.googleapis.com/agi-data/models/inception-v3.pb" rel="nofollow">https://storage.googleapis.com/agi-data/models/inception-v3.pb</a></p> | 1 |
<h3 dir="auto">Preflight Checklist</h3>
<p dir="auto">I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.<br>
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.<br>
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.</p>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">11.2.3</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">macOs Big Sur 11.2.1</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">arm64 (including Apple Silicon)</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto">N/A</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">The app is not crashing.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">The app crashing sporadically.</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><a href="https://gist.github.com/Glebka/b7c6b202d89ea25e3b64d6c504dfd194">https://gist.github.com/Glebka/b7c6b202d89ea25e3b64d6c504dfd194</a></p>
<p dir="auto">I attached a crash report as gist.<br>
Please have a look.</p>
<p dir="auto">Our app is a corporate messenger with telephony and video meeting capabilities.<br>
The version that is crashing was built for x64 arch and was running using Rosetta on Apple M1 hardware.</p>
<p dir="auto">The crash occurs sporadically. Users report that may happen suddenly when they navigate thru the UI or start a telephony / video call. We use WebRTC features and WebAssembly, fyi.</p>
<p dir="auto">The crash I published were caught by Mac OS, despite we have a Sentry crash reporter configured.</p>
<p dir="auto">I see the stack trace from com.github.Electron.framework is not symbolicated, so, probably not useful.<br>
Could you please suggest how to symbolicate it?</p>
<p dir="auto">Will appreciate any help on this. Thanks.</p> | <h3 dir="auto">Preflight Checklist</h3>
<p dir="auto">I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.<br>
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.<br>
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.</p>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">11.4.1</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">macOs Big Sur 11.2.1</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">arm64 (including Apple Silicon)</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto">N/A</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">App is not crashing.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">App crashes sporadically.</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><a href="https://gist.github.com/Glebka/b4b50c4b4eeec40bcb32fac94d2d154c">https://gist.github.com/Glebka/b4b50c4b4eeec40bcb32fac94d2d154c</a></p>
<p dir="auto">I attached a crash report as gist.<br>
Please have a look.</p>
<p dir="auto">Our app is a corporate messenger with telephony and video meeting capabilities.<br>
The version that is crashing was built for x64 arch and was running using Rosetta on Apple M1 hardware.</p>
<p dir="auto">The crash I published were caught by Mac OS, despite we have a Sentry crash reporter configured.</p>
<p dir="auto">Will appreciate any help on this. Thanks.</p> | 1 |
<p dir="auto"><code class="notranslate">sklearn.metrics</code> introduces <code class="notranslate">isclose()</code> in <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/metrics/ranking.py">https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/metrics/ranking.py</a> which can leave the unaware data practitioner with hours of debugging.</p>
<p dir="auto">In very unbalanced classification, probabilities/scores can be very small and yet meaningful. This however will cause unexpected missing precision_recall points due to <code class="notranslate">isclose</code> treating values within 10e-6 as equal.</p>
<p dir="auto">I'd suggest to place a warning about <code class="notranslate">isclose</code> in the documentation and also replace the absolute epsilon by a relative closeness comparison in order to avoid the problems with small probabilities in unbalanced classification.</p> | <p dir="auto">pred=[1e-10, 0, 0]<br>
sol=[1, 0, 0]<br>
metrics.roc_auc_score(sol, pred) # 0.5, wrong, 1 is correct</p>
<p dir="auto">pred=[1, 0, 0]<br>
sol=[1, 0, 0]<br>
metrics.roc_auc_score(sol, pred) # 1 correct</p> | 1 |
<p dir="auto">When using the Image Bitmap Loader to load in images for sprites the images render upside down. It should be noted that if the image downloaded is not the correct power of 2 and the resizer is fired the images appear the right way up but if they images are the correct power of 2 and the resizer is not called they appear upside down;</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let material = new THREE.SpriteMaterial();
let sprite = new THREE.Sprite( material );
sprite.scale.set(5, 5, 5);
sprite.position.copy(props.position);
sprite.userData = props.userData;
scene.add(sprite);
new THREE.ImageBitmapLoader().load( props.imageUrl, (imageBitmap) => {
let texture = new THREE.CanvasTexture( imageBitmap );
material = new THREE.SpriteMaterial( { map: texture } );
sprite.material = material;
sprite.scale.set(5, 5, 5);
}, undefined, function (err) {
console.error("Error loading image", err)
} );"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">material</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">SpriteMaterial</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> <span class="pl-s1">sprite</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">Sprite</span><span class="pl-kos">(</span> <span class="pl-s1">material</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">sprite</span><span class="pl-kos">.</span><span class="pl-c1">scale</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-c1">5</span><span class="pl-kos">,</span> <span class="pl-c1">5</span><span class="pl-kos">,</span> <span class="pl-c1">5</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">sprite</span><span class="pl-kos">.</span><span class="pl-c1">position</span><span class="pl-kos">.</span><span class="pl-en">copy</span><span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">.</span><span class="pl-c1">position</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">sprite</span><span class="pl-kos">.</span><span class="pl-c1">userData</span> <span class="pl-c1">=</span> <span class="pl-s1">props</span><span class="pl-kos">.</span><span class="pl-c1">userData</span><span class="pl-kos">;</span>
<span class="pl-s1">scene</span><span class="pl-kos">.</span><span class="pl-en">add</span><span class="pl-kos">(</span><span class="pl-s1">sprite</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">ImageBitmapLoader</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">(</span> <span class="pl-s1">props</span><span class="pl-kos">.</span><span class="pl-c1">imageUrl</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">imageBitmap</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> <span class="pl-s1">texture</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">CanvasTexture</span><span class="pl-kos">(</span> <span class="pl-s1">imageBitmap</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">material</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">SpriteMaterial</span><span class="pl-kos">(</span> <span class="pl-kos">{</span> <span class="pl-c1">map</span>: <span class="pl-s1">texture</span> <span class="pl-kos">}</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">sprite</span><span class="pl-kos">.</span><span class="pl-c1">material</span> <span class="pl-c1">=</span> <span class="pl-s1">material</span><span class="pl-kos">;</span>
<span class="pl-s1">sprite</span><span class="pl-kos">.</span><span class="pl-c1">scale</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-c1">5</span><span class="pl-kos">,</span> <span class="pl-c1">5</span><span class="pl-kos">,</span> <span class="pl-c1">5</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">undefined</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">err</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">error</span><span class="pl-kos">(</span><span class="pl-s">"Error loading image"</span><span class="pl-kos">,</span> <span class="pl-s1">err</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span> <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h5 dir="auto">Three.js version</h5>
<ul dir="auto">
<li>[x ] r107</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li>[] All of them</li>
<li>[x ] 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"> Windows</li>
<li>[ x] macOS</li>
<li>[ x] 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<br>
Havent tested on the others</li>
</ul> | <h5 dir="auto">Description of the problem</h5>
<p dir="auto">Non POT <code class="notranslate">ImageBitmap</code> texture can be upside down.</p>
<p dir="auto">Demo: <a href="https://jsfiddle.net/7do6um2f/" rel="nofollow">https://jsfiddle.net/7do6um2f/</a> (Use Chrome)</p>
<p dir="auto">Non POT image can be resized to POT <code class="notranslate">canvas</code> in <code class="notranslate">WebGLRenderer(WebGLTexture)</code>. If original image is <code class="notranslate">ImageBitmap</code> and <code class="notranslate">texture.flipY</code> is <code class="notranslate">true</code>, <code class="notranslate">texture</code> will be upside down.</p>
<p dir="auto">This is from the difference of <code class="notranslate">ImageBitmap</code> API from others. <code class="notranslate">ImageBitmap</code> requires <code class="notranslate">flipY</code> on bitmap creation while others requires on uploading data to GPU (= <code class="notranslate">texture.flipY</code>).</p>
<p dir="auto"><code class="notranslate">texture.flipY</code> used on uploading data to GPU is ignored for <code class="notranslate">ImageBItmap</code>. But if non POT <code class="notranslate">ImageBitmap</code> is converted to <code class="notranslate">canvas</code>, <code class="notranslate">texture.flipY</code> will have an effect. So texture will be upside down.</p>
<p dir="auto"><code class="notranslate">texture.flipY</code> has no effect for <code class="notranslate">ImageBitmap</code> so we should force it to <code class="notranslate">false</code> if texture's image is <code class="notranslate">ImageBitmap</code>?</p>
<p dir="auto">API difference has another issue. (May be it isn't so serious tho.) <code class="notranslate">FlipY</code> and <code class="notranslate">premultiplyAlpha</code> is required on bitmap creation. <code class="notranslate">texture.flipY/premultiplyAlpha</code> used on uploading data to GPU are ignored for <code class="notranslate">ImageBitmap</code>.</p>
<p dir="auto">So the following code has no effect for <code class="notranslate">ImageBitmap</code>, but the code has effect if <code class="notranslate">ImageBitmap</code> is resized and converted to <code class="notranslate">canvas</code>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="texture.premultiplyAlpha = ! texture.premultiplyAlpha;
texture.flipY = ! texture.flipY;
texture.needsUpdate = true;"><pre class="notranslate"><code class="notranslate">texture.premultiplyAlpha = ! texture.premultiplyAlpha;
texture.flipY = ! texture.flipY;
texture.needsUpdate = true;
</code></pre></div>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> r103</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> | 1 |
<p dir="auto">E.g. install an extension and open readme and then return:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/900690/13930168/0a8e7b58-ef9e-11e5-94ed-5ea5f86f9b74.png"><img src="https://cloud.githubusercontent.com/assets/900690/13930168/0a8e7b58-ef9e-11e5-94ed-5ea5f86f9b74.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">We need to explore improving the way that we display warnings, errors and notifications to users. Currently we have a variety of mechanisms (info in status bar, details in quick open, error/warning dialog).</p>
<p dir="auto">We need a consistent way that prompts the user when there are notifications/errors/warnings for them to pay attention to and a consistent affordance for the user to get a holistic view of all of the notitications/errors/warnings.</p> | 1 |
<p dir="auto">I am now using Electron 0.33.6 for some hours in VS Code and run into an issue that I cannot really reproduce or explain but it happens always after some time of usage (30 minutes). It might be just memory related when memory consumption reaches a certain limit.</p>
<p dir="auto">What I know is that a process (forked with child_process) is crashing with a SIGABRT signal, which seems to indicate an issue deep down in node or at least in a C++ layer above with memory allocation. We do have a crash dump when this happens: <a href="https://gist.github.com/bpasero/bbe9001163baca220057">https://gist.github.com/bpasero/bbe9001163baca220057</a></p>
<p dir="auto">I will try to reproduce this on Windows tomorrow.</p>
<p dir="auto">I wonder if this is related or duplicate to: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="108113576" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/2889" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/2889/hovercard" href="https://github.com/electron/electron/issues/2889">#2889</a></p> | <p dir="auto">When downloading large files inside child process, it crashes with the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Electron Helper(65819,0x7fff72367300) malloc: *** error for object 0x7f8063e86ab0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug"><pre class="notranslate"><code class="notranslate">Electron Helper(65819,0x7fff72367300) malloc: *** error for object 0x7f8063e86ab0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
</code></pre></div>
<p dir="auto">Here is the <a href="https://gist.github.com/pulkit110/3c3d8d1d7a168f50dddf">crash dump</a><br>
Sample code to reproduce the issue can be <a href="https://gist.github.com/pulkit110/a16513dba6140b16c366">found here</a>.</p>
<p dir="auto">It works fine when downloading from the main process (i.e. from <code class="notranslate">index.js</code>). Downloading from child process used to work fine too until electron v0.30.6</p> | 1 |
<pre class="notranslate">53116ca07207+ tip
This is a bit of a silly example, but the behavior is different on Linux and Windows
nonetheless, and I'm wondering if it might be part of a bigger issue:
package main
import "fmt"
func main() {
n := uint8(0) // or uint16, uint32, uint64...
f := float64(-1) // or float32, but not int32/int64
on := uint8(f) // does not underflow on Windows
// on := uint8(int32(f)) // this works on both platforms
fmt.Printf("on is %d\n", on)
n += on
if n != 255 {
fmt.Printf("n is not 255: %d\n", n)
}
}
On Linux (x64):
# uintunderflow
on is 255
On Windows (x64):
# uintunderflow.exe
on is 0
n is not 255: 0</pre> | <p dir="auto">This idea originated in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="124418875" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/13785" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/13785/hovercard" href="https://github.com/golang/go/issues/13785">#13785</a> when using OpenBSD's precedent with <a href="http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/arc4random.3" rel="nofollow"><code class="notranslate">arc4random(3)</code></a>.</p>
<p dir="auto">The Go crypto code includes a <a href="https://en.wikipedia.org/wiki/CSPRNG" rel="nofollow">CSPRNG</a> by default (see <code class="notranslate">src/crypto/rand/rand_unix.go:85</code>). However, it is only used on operating systems that Go doesn't determine to have a reliable, non-blocking randomness sources. Examples of reliable non-blocking randomness sources include a modern <code class="notranslate">/dev/urandom</code>, Linux's <code class="notranslate">getrandom(2)</code>, and OpenBSD's <code class="notranslate">getentropy(2)</code>.</p>
<p dir="auto">Many cryptography guides suggest userland CSPRNGs. The possible benefits include:</p>
<ul dir="auto">
<li>improving performance by avoiding the vast majority of randomness-related syscalls
<ul dir="auto">
<li>Go's CSPRNG fetches 16 bytes of seed entropy for every 1 MB of generated randomness</li>
</ul>
</li>
<li>easing up on the kernel, which may expend considerable effort when serving a Go process's randomness-related syscalls
<ul dir="auto">
<li>I remember seeing Poul-Henning Kamp quoted that FreeBSD kernel spends 15% of its time on random number generation</li>
</ul>
</li>
<li>adding some additional mixing to potentially weak OS-supplied randomness
<ul dir="auto">
<li>This would be a minimal stopgap. However, the Go currently uses <a href="http://csrc.nist.gov/groups/STM/cavp/documents/rng/931rngext.pdf" rel="nofollow">ANSI X9.31</a> which mixes via AES and kneads in the current nanosecond time, which is better than nothing.</li>
</ul>
</li>
<li>potentially being able to replace math/rand with crypto/rand, which would simplify the codebase and prevent misuse of math/rand
<ul dir="auto">
<li>code for deterministic pseudo-randomness could be condensed, and the ability to seed it could be removed</li>
</ul>
</li>
</ul>
<p dir="auto">Network applications that use forward secret encryption make the peformance concerns more relevant.</p>
<p dir="auto">The primary risk is that we would then rely on the soundness and safety of Go's CSPRNG logic. I don't know whether timing attacks are a risk, but that's one issue that came to mind. The CSPRNG backs up to Go's AES implementation, though, so any risks unique to the CSPRNG would have to be outside of that. The fact that uses a standard algorithm (<a href="http://csrc.nist.gov/groups/STM/cavp/documents/rng/931rngext.pdf" rel="nofollow">ANSI X9.31</a>) and a strong crypto primitive (AES) gives me confidence. I'm definitely not qualified to rigorously review something like this, though.</p>
<p dir="auto">This ticket could also entail a review of the existing CSPRNG and whether it could be stronger.</p>
<p dir="auto">Thoughts? Also, if anyone knows of relevant profiling techniques and targets, please share. I plan on investigating what kind of performance impact this switch would have.</p> | 0 |
<p dir="auto">This issue has been around for quite a while, and I just reproduced it in 0.14.4 and 0.15.1-alpha.1. I looked through all "button" and "ripple" related issues and found no mention of this, so apologies if this is a duplicate.</p>
<p dir="auto"><a href="https://dl.dropboxusercontent.com/u/19969663/ripple_issue.mov" rel="nofollow">https://dl.dropboxusercontent.com/u/19969663/ripple_issue.mov</a><br>
As you can see, this is the latest version of the demos on material-ui.com. Video was taken in chrome on a mac.</p>
<p dir="auto">Basically, through some sequence of clicks the ripple effect doesn't go away. I've been playing around with it for quite a while and couldn't find consistent repro steps. It also seems to happen much more often on chrome in android as well as safari in iOS. I've noticed this issue in all browsers.</p> | <p dir="auto">As our team checked, <a href="https://webaim.org/techniques/tables/data" rel="nofollow">WebAIM recommends</a> to always specify the <code class="notranslate">scope</code> attribute, so suggesting to make it out-of-the-box for the <code class="notranslate">TableCell</code> for the "head" type.</p>
<p dir="auto">Mainly, without this attribute screen readers fail to read the table as expected (even if it sounds weird to me personally for special semantic <code class="notranslate"><th></code> inside <code class="notranslate"><thead></code> usage).</p>
<blockquote>
<p dir="auto">The scope attribute tells the browser and screen reader that everything within a column that is associated to the header with <code class="notranslate">scope="col"</code> in that column, and that a cell with <code class="notranslate">scope="row"</code> is a header for all cells in that row.<br>
All <code class="notranslate"><th></code> elements should generally always have a scope attribute. While screen readers may correctly guess whether a header is a column header or a row header based on the table layout, assigning a scope makes this unambiguous.</p>
</blockquote>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">The <code class="notranslate">scope</code> attribute is set to <code class="notranslate">"col"</code> for type "head" by default (if not specified manually).</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The <code class="notranslate">scope</code> attribute is not used.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>1.0.0-beta.31</td>
</tr>
</tbody>
</table> | 0 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.19041.264
PowerToys version: 18.2"><pre class="notranslate"><code class="notranslate">Windows build number: 10.0.19041.264
PowerToys version: 18.2
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Cannot bind any combination of Windows Key + anything. To reproduce the bug, go to powertoys run, and click inside the box. Press the windows key, and nothing will be bound. I am attempting to bind Windows+Space to powertoys run, and cannot get it to do so.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">I expect the Windows key to be able to be used inside of shortcuts</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Windows key is not able to be used in keyboard shortcuts</p> | <p dir="auto">Example commands below. When typing these today into the windows search bar, or Run command, they will open specific control panel items.</p>
<p dir="auto">ncpa.cpl<br>
inetcpl.cpl<br>
appwiz.cpl</p> | 0 |
<p dir="auto">Hi,</p>
<p dir="auto">Tried to build latest archive, this is what I get (Fedora 20/rawhide 64-bit)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="exception on 2: ERROR: BoundsError()
in setindex! at ./array.jl:309
in colval at ./datafmt.jl:317
in store_cell at ./datafmt.jl:195
in dlm_fill at ./datafmt.jl:296
in dlm_fill at ./datafmt.jl:309
in readdlm_string at ./datafmt.jl:271
in __readdlm_auto#85__ at ./datafmt.jl:59
in __readdlm#83__ at ./datafmt.jl:49
in __readdlm#82__ at ./datafmt.jl:47
in anonymous at ./no file
in runtests at /builddir/build/BUILD/julia-master/test/testdefs.jl:6
in anonymous at ./multi.jl:847
in run_work_thunk at ./multi.jl:613
in anonymous at ./task.jl:847
while loading readdlm.jl, in expression starting on line 4
ERROR: BoundsError()
in anonymous at ./task.jl:1350
while loading readdlm.jl, in expression starting on line 4
while loading /builddir/build/BUILD/julia-master/test/runtests.jl, in expression starting on line 46
make: *** [all] Error 1"><pre class="notranslate"><code class="notranslate">exception on 2: ERROR: BoundsError()
in setindex! at ./array.jl:309
in colval at ./datafmt.jl:317
in store_cell at ./datafmt.jl:195
in dlm_fill at ./datafmt.jl:296
in dlm_fill at ./datafmt.jl:309
in readdlm_string at ./datafmt.jl:271
in __readdlm_auto#85__ at ./datafmt.jl:59
in __readdlm#83__ at ./datafmt.jl:49
in __readdlm#82__ at ./datafmt.jl:47
in anonymous at ./no file
in runtests at /builddir/build/BUILD/julia-master/test/testdefs.jl:6
in anonymous at ./multi.jl:847
in run_work_thunk at ./multi.jl:613
in anonymous at ./task.jl:847
while loading readdlm.jl, in expression starting on line 4
ERROR: BoundsError()
in anonymous at ./task.jl:1350
while loading readdlm.jl, in expression starting on line 4
while loading /builddir/build/BUILD/julia-master/test/runtests.jl, in expression starting on line 46
make: *** [all] Error 1
</code></pre></div> | <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pao">@pao</a> asked my to file an issue about the url pulled into METADATA while discussing my pull request for the <code class="notranslate">Roots</code> package here <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13082474" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/METADATA.jl/issues/202" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/METADATA.jl/pull/202/hovercard" href="https://github.com/JuliaLang/METADATA.jl/pull/202">JuliaLang/METADATA.jl#202</a></p>
<p dir="auto">When I ran <code class="notranslate">Pkg.pkg_origin("Roots")</code>, apparently the wrong github URL was being pulled in. It should have been: <code class="notranslate">git://github.com/jtravs/Roots.jl.git</code> rather than <code class="notranslate">[email protected]:jtravs/Roots.jl.git</code>.</p>
<p dir="auto">The output of <code class="notranslate">git remote -v</code> run in my packages repository is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="origin [email protected]:jtravs/Roots.jl.git (fetch)
origin [email protected]:jtravs/Roots.jl.git (push)"><pre class="notranslate"><code class="notranslate">origin [email protected]:jtravs/Roots.jl.git (fetch)
origin [email protected]:jtravs/Roots.jl.git (push)
</code></pre></div> | 0 |
<ul dir="auto">
<li>Neo4j version: 3.3.3-1 installed through yum</li>
<li>Operating system: centos 7</li>
<li>API/Driver: neo4j-admin import</li>
</ul>
<p dir="auto">I'm loading a large (1M+ records with 40 fields) csv file with the following (simplified) command:<br>
neo4j-admin import <br>
--nodes:Organization /path/to/organizations.csv <br>
--multiline-fields=true <br>
--ignore-duplicate-nodes=true <br>
--ignore-missing-nodes=true <br>
--array-delimiter ";"</p>
<p dir="auto">And since a couple of weeks it regularly fails with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="WARNING Import failed. The store files in /path/to/graph.db are left as they are, although they are likely in an unusable state. Starting a database on these store files will likely fail or observe inconsistent records so start at your own risk or delete the store manually
unexpected error: ERROR in input
data source: BufferedCharSeeker[source:/path/to/organizations.csv, position:301989889, line:1100684]
in field: abbreviationFr:string:6
for header: [vat:ID(Organization), ... , abbreviationFr:string, ...]
raw field value: ??
original error: String index out of range: -1"><pre class="notranslate"><code class="notranslate">WARNING Import failed. The store files in /path/to/graph.db are left as they are, although they are likely in an unusable state. Starting a database on these store files will likely fail or observe inconsistent records so start at your own risk or delete the store manually
unexpected error: ERROR in input
data source: BufferedCharSeeker[source:/path/to/organizations.csv, position:301989889, line:1100684]
in field: abbreviationFr:string:6
for header: [vat:ID(Organization), ... , abbreviationFr:string, ...]
raw field value: ??
original error: String index out of range: -1
</code></pre></div>
<p dir="auto">This error occurs deterministically in the sense that once it happens it will consistently happen with the same input. However, it may just go away after simply reordering the fields, removing a line or sometimes even a cell. I have tried to isolate the issue by only taking the lines around the line number mentioned in the error as the input but I havent been able to reproduce the error in this way.</p>
<p dir="auto">The csv file itself should be valid csv since it was generated from Spark.</p>
<p dir="auto">Any idea what could be wrong? Did you make any changes to the import in the recent versions? Anything I can do to pinpoint the issue?</p>
<p dir="auto">Thanks in advance,</p>
<p dir="auto">Niek.</p> | <h2 dir="auto">Issue</h2>
<p dir="auto">I am importing CSV files to the empty database via <code class="notranslate">neo4j-admin</code>. It works. Created the DB I need to incrementally update it with data. I create new CSV files and do the <code class="notranslate">incremental</code> import via <code class="notranslate">neo4j-admin</code> and receive the error no matter which run options I try:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Import error: No batch importers found
Caused by:No batch importers found
java.util.NoSuchElementException: No batch importers found
at org.neo4j.internal.batchimport.IncrementalBatchImporterFactory.lambda$withHighestPriority$1(IncrementalBatchImporterFactory.java:75)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at org.neo4j.internal.batchimport.IncrementalBatchImporterFactory.withHighestPriority(IncrementalBatchImporterFactory.java:75)
at org.neo4j.internal.recordstorage.RecordStorageEngineFactory.incrementalBatchImporter(RecordStorageEngineFactory.java:708)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:215)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:182)
at org.neo4j.importer.ImportCommand$Base.doExecute(ImportCommand.java:391)
at org.neo4j.importer.ImportCommand$Incremental.execute(ImportCommand.java:548)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:92)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.neo4j.cli.AdminTool.execute(AdminTool.java:94)
at org.neo4j.cli.AdminTool.main(AdminTool.java:82)
WARNING Import failed. The store files in /data/databases/neo4j are left as they are, although they are likely in an unusable state. Starting a database on these store files will likely fail or observe inconsistent records so start at your own risk or delete the store manually
java.util.NoSuchElementException: No batch importers found
at org.neo4j.internal.batchimport.IncrementalBatchImporterFactory.lambda$withHighestPriority$1(IncrementalBatchImporterFactory.java:75)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at org.neo4j.internal.batchimport.IncrementalBatchImporterFactory.withHighestPriority(IncrementalBatchImporterFactory.java:75)
at org.neo4j.internal.recordstorage.RecordStorageEngineFactory.incrementalBatchImporter(RecordStorageEngineFactory.java:708)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:215)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:182)
at org.neo4j.importer.ImportCommand$Base.doExecute(ImportCommand.java:391)
at org.neo4j.importer.ImportCommand$Incremental.execute(ImportCommand.java:548)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:92)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.neo4j.cli.AdminTool.execute(AdminTool.java:94)
at org.neo4j.cli.AdminTool.main(AdminTool.java:82)"><pre class="notranslate"><code class="notranslate">Import error: No batch importers found
Caused by:No batch importers found
java.util.NoSuchElementException: No batch importers found
at org.neo4j.internal.batchimport.IncrementalBatchImporterFactory.lambda$withHighestPriority$1(IncrementalBatchImporterFactory.java:75)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at org.neo4j.internal.batchimport.IncrementalBatchImporterFactory.withHighestPriority(IncrementalBatchImporterFactory.java:75)
at org.neo4j.internal.recordstorage.RecordStorageEngineFactory.incrementalBatchImporter(RecordStorageEngineFactory.java:708)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:215)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:182)
at org.neo4j.importer.ImportCommand$Base.doExecute(ImportCommand.java:391)
at org.neo4j.importer.ImportCommand$Incremental.execute(ImportCommand.java:548)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:92)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.neo4j.cli.AdminTool.execute(AdminTool.java:94)
at org.neo4j.cli.AdminTool.main(AdminTool.java:82)
WARNING Import failed. The store files in /data/databases/neo4j are left as they are, although they are likely in an unusable state. Starting a database on these store files will likely fail or observe inconsistent records so start at your own risk or delete the store manually
java.util.NoSuchElementException: No batch importers found
at org.neo4j.internal.batchimport.IncrementalBatchImporterFactory.lambda$withHighestPriority$1(IncrementalBatchImporterFactory.java:75)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at org.neo4j.internal.batchimport.IncrementalBatchImporterFactory.withHighestPriority(IncrementalBatchImporterFactory.java:75)
at org.neo4j.internal.recordstorage.RecordStorageEngineFactory.incrementalBatchImporter(RecordStorageEngineFactory.java:708)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:215)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:182)
at org.neo4j.importer.ImportCommand$Base.doExecute(ImportCommand.java:391)
at org.neo4j.importer.ImportCommand$Incremental.execute(ImportCommand.java:548)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:92)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.neo4j.cli.AdminTool.execute(AdminTool.java:94)
at org.neo4j.cli.AdminTool.main(AdminTool.java:82)
</code></pre></div>
<p dir="auto">The simplest command that imports one single node to an already existing DB to get an error on my setup is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="neo4j-admin database import \
incremental --force \
--verbose \
--skip-duplicate-nodes \
--skip-bad-relationships \
--report-file /tmp/import-report.txt \
--nodes=Address="/path/to/addresses_headers.csv,/path_to/addresses.txt"
neo4j"><pre class="notranslate"><code class="notranslate">neo4j-admin database import \
incremental --force \
--verbose \
--skip-duplicate-nodes \
--skip-bad-relationships \
--report-file /tmp/import-report.txt \
--nodes=Address="/path/to/addresses_headers.csv,/path_to/addresses.txt"
neo4j
</code></pre></div>
<p dir="auto">addresses_headers.csv:<br>
<code class="notranslate">hash:ID(Address)</code></p>
<p dir="auto">addresses.txt:<br>
<code class="notranslate">0x0000000000000000000000000000000000000000</code></p>
<p dir="auto">I tried to stop DB (<code class="notranslate">neo4j-admin server stop</code>) and use flags <code class="notranslate">--stage=all|prepare|build|merge</code>: no effect.</p>
<h3 dir="auto">My setup:</h3>
<ul dir="auto">
<li>Neo4j version: 5.7.0, community edition</li>
<li>Operating system: official docker images of versions 5.7.0 (latest) and 5.6.0</li>
<li>API/Driver: neo4j-admin</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Import address node into an existing database</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Import command fails with error: <code class="notranslate">java.util.NoSuchElementException: No batch importers found</code></p>
<p dir="auto">PS: Desktop version (installed in the OS, not within the container) behavior is the same.</p> | 0 |
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-override-class-declarations-with-inline-styles" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-override-class-declarations-with-inline-styles</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">Twice click <code class="notranslate">Run Code</code> button to submit the code. Is it friendly to users?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1608741/9565804/7a75dc5c-4f19-11e5-8352-8f6088f64f1c.png"><img src="https://cloud.githubusercontent.com/assets/1608741/9565804/7a75dc5c-4f19-11e5-8352-8f6088f64f1c.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-iterate-over-arrays-with-map" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-iterate-over-arrays-with-map</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">Even though the assertions are right, you need to hit the run code button twice to advance in the waypoints in the "Object Oriented and Functional Programming" section. It isn't really a major issue, just a mild annoyance.</p> | 1 |
<p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="141241969" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/4303" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/4303/hovercard?comment_id=197361978&comment_type=issue_comment" href="https://github.com/microsoft/vscode/issues/4303#issuecomment-197361978">#4303 (comment)</a> for details.</p> | <p dir="auto">We'd like VS Code and the Node Debugger to support Live Reloading Scenarios. The current behavior is preventing React-Native users from having a good experience: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135824828" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode-react-native/issues/74" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode-react-native/issues/74/hovercard" href="https://github.com/microsoft/vscode-react-native/issues/74">microsoft/vscode-react-native#74</a></p>
<p dir="auto">Currently it's not supported so modifying breakpoints while the program is running can have weird results (Breakpoints set in one line, appear in another line, or get deleted completely).</p>
<p dir="auto">Things that we'd like to be supported are:</p>
<ul dir="auto">
<li>Be able to edit a file in memory, and set a brekpoint before saving the file, so if there is any source map associated at all with this file at all, it'll map to the wrong thing, so VS Code would need to Remember the line where the breakpoint was set, and wait until the proper source map was loaded before actually setting the breakpoint.</li>
<li>Be able to edit a file, save it, and set breakpoints before the recompilation process is finished, so initially it'll be associated with the wrong source map.</li>
<li>The red and greyed out stop signs for the breakpoints should correctly indicate if the breakpoints were successfully installed.</li>
<li>Editing a source file with breakpoints should result in intuitive results when adding lines before, or after the breakpoints, or even on the same line.</li>
</ul> | 0 |
<p dir="auto">We had a quite serious case today which caused all our pods to terminate because AWS had trouble with their EC2 service in Ireland (6:00 AM PDT)</p>
<p dir="auto">Basically after 40s (corresponding to <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/admin/kube-controller-manager.md"><code class="notranslate">node-monitor-grace-period</code></a>) of API downtime during which kubelet couldn't list EC2 instances, it hit the maximum node status retry count and killed everything:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="12:44:22 kubelet.go:1933] Error updating node status, will retry: failed to get node address from cloud provider: error listing AWS instances: Unavailable: The service is unavailable. Please try again shortly.
status code: 503, request id: []
...
12:45:04 kubelet.go:839] Unable to update node status: update node status exceeds retry count
12:45:10 kubelet.go:1518] Killing unwanted pod "swagger-extcs"
12:45:10 manager.go:1123] Killing container with id "aa4a55984..."
12:45:10 manager.go:1123] Killing container with id "9bdb1788e..."
12:45:10 kubelet.go:1343] Orphaned volume "5796b5eb..." found, tearing down volume
..."><pre class="notranslate"><code class="notranslate">12:44:22 kubelet.go:1933] Error updating node status, will retry: failed to get node address from cloud provider: error listing AWS instances: Unavailable: The service is unavailable. Please try again shortly.
status code: 503, request id: []
...
12:45:04 kubelet.go:839] Unable to update node status: update node status exceeds retry count
12:45:10 kubelet.go:1518] Killing unwanted pod "swagger-extcs"
12:45:10 manager.go:1123] Killing container with id "aa4a55984..."
12:45:10 manager.go:1123] Killing container with id "9bdb1788e..."
12:45:10 kubelet.go:1343] Orphaned volume "5796b5eb..." found, tearing down volume
...
</code></pre></div>
<p dir="auto">I could certainly assume that downtimes at AWS may never last more than <code class="notranslate">t</code> minutes and increase the <code class="notranslate">node-monitor-grace-period</code> and <code class="notranslate">pod-eviction-timeout</code> in my kube-controller-manager accordingly, but there is something dangerous in making such assumptions and relying <em>only</em> on the cloud provider to define nodes' health, since a not responding cloud provider doesn't mean a completely unhealthy platform.</p>
<p dir="auto">We paid that price today and saw our whole prod cluster going down while everything was fine on the instances themselves 🙈</p> | <p dir="auto">The way we access the kubernetes service is inconsistent; in all other namespaces it is <code class="notranslate">https://kubernetes</code>, but in kube-system I don't have a <code class="notranslate">kubernetes</code> service (should I?).</p>
<p dir="auto">When I try to use <code class="notranslate">kubernetes</code> from go I get this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Get https://kubernetes/api: dial tcp: lookup kubernetes on 100.64.0.10:53: server misbehaving"><pre class="notranslate"><code class="notranslate">Get https://kubernetes/api: dial tcp: lookup kubernetes on 100.64.0.10:53: server misbehaving
</code></pre></div>
<p dir="auto">bboreham pointed out that I can use <code class="notranslate">KUBERNETES_SERVICE_HOST</code>, but I feel this inconsistently is likely to continue to surprise people.</p>
<p dir="auto">It may be something wrong in my configuration (i.e. perhaps the kubernetes service should already be registered in kube-system), but is there some reason <em>not</em> to register it?</p> | 0 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">retries loop</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.4.2.0
python version = 2.7.12 (default, Nov 20 2017, 18:23:56) [GCC 5.4.0 20160609]"><pre class="notranslate"><code class="notranslate">ansible 2.4.2.0
python version = 2.7.12 (default, Nov 20 2017, 18:23:56) [GCC 5.4.0 20160609]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">default</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Debian 9</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">While using <code class="notranslate">retries</code> loop in a task, <code class="notranslate">attempts</code> key from registered variable is not defined during first iteration. On Ansible 1.9.6, it was.<br>
In <a href="https://github.com/sereinity/ansible/blob/1e08e9a55f3207515e32299c99fd8cd22dc6a833/lib/ansible/executor/task_executor.py#L555">task_executor.py</a>, <code class="notranslate">attempts</code> key is defined only if <code class="notranslate">retries > 1: </code>.</p>
<p dir="auto">This is a problem with my use case:<br>
I need to check that a host successfully went down after ordering reboot. This task can take some time, and the modules (ping) and or shell commands (nc, ...) raise an error when the host enters the expected state. So I use the retries loop with failed_when to override the fail behaviour.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Run the following task with Ansible >= 2.0. Destination host is up.</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: Wait for instance to shutdown
shell: 'nc -w 1 -zv {{ ansible_ssh_host }} 22'
register: connection_shutdown
failed_when: connection_shutdown.attempts >= 5
until: connection_shutdown.stderr.find("succeeded") == -1
delegate_to: 127.0.0.1
retries: 5"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">Wait for instance to shutdown</span>
<span class="pl-ent">shell</span>: <span class="pl-s"><span class="pl-pds">'</span>nc -w 1 -zv {{ ansible_ssh_host }} 22<span class="pl-pds">'</span></span>
<span class="pl-ent">register</span>: <span class="pl-s">connection_shutdown</span>
<span class="pl-ent">failed_when</span>: <span class="pl-s">connection_shutdown.attempts >= 5</span>
<span class="pl-ent">until</span>: <span class="pl-s">connection_shutdown.stderr.find("succeeded") == -1</span>
<span class="pl-ent">delegate_to</span>: <span class="pl-s">127.0.0.1 </span>
<span class="pl-ent">retries</span>: <span class="pl-c1">5</span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Rebooting host between 1st and 2nd iteration of "Wait for instance to shutdown".</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [Issue] ***********************************************************************************************
TASK [Gathering Facts] *********************************************************************************************
ok: [host1]
TASK [Wait for instance to shutdown] *******************************************************************************
FAILED - RETRYING: Wait for instance to shutdown (5 retries left).
##### Rebooting host1 #####
changed: [host1 -> 127.0.0.1]
PLAY RECAP *********************************************************************************************************
host1 : ok=2 changed=1 unreachable=0 failed=0
"><pre class="notranslate"><code class="notranslate">PLAY [Issue] ***********************************************************************************************
TASK [Gathering Facts] *********************************************************************************************
ok: [host1]
TASK [Wait for instance to shutdown] *******************************************************************************
FAILED - RETRYING: Wait for instance to shutdown (5 retries left).
##### Rebooting host1 #####
changed: [host1 -> 127.0.0.1]
PLAY RECAP *********************************************************************************************************
host1 : ok=2 changed=1 unreachable=0 failed=0
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [Issue] ***********************************************************************************************
TASK [Gathering Facts] *********************************************************************************************
ok: [host1]
TASK [Wait for instance to shutdown] *******************************************************************************
fatal: [host1]: FAILED! => {"msg": "The conditional check 'connection_shutdown.attempts >= 5' failed. The error was: error while evaluating conditional (connection_shutdown.attempts >= 5): 'dict object' has no attribute 'attempts'"}
to retry, use: --limit @/home/gmathon/ansible/test.retry
PLAY RECAP *********************************************************************************************************
host1 : ok=1 changed=0 unreachable=0 failed=1
"><pre class="notranslate"><code class="notranslate">PLAY [Issue] ***********************************************************************************************
TASK [Gathering Facts] *********************************************************************************************
ok: [host1]
TASK [Wait for instance to shutdown] *******************************************************************************
fatal: [host1]: FAILED! => {"msg": "The conditional check 'connection_shutdown.attempts >= 5' failed. The error was: error while evaluating conditional (connection_shutdown.attempts >= 5): 'dict object' has no attribute 'attempts'"}
to retry, use: --limit @/home/gmathon/ansible/test.retry
PLAY RECAP *********************************************************************************************************
host1 : ok=1 changed=0 unreachable=0 failed=1
</code></pre></div> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">default output plugin? I'm not sure exactly what this is called.</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">all versions are affected. that's part of the problem.</p>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">I'm complaining about an inane default. no configuration problems required</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">all</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">ansible error output is impossible to read. Why oh why can the JSON output not at least by pretty by default?</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">run any playbook that gives an error</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">could we have pretty formatting like this:</p>
<p dir="auto">{<br>
'changed': true,<br>
"cmd": ["rpmbuild", "-ba", "SPECS/thing.spec"],<br>
"delta": "0:00:00.361828",<br>
"stderr":"""<br>
Lots of output<br>
from the program in question<br>
And newlines are interpreted properly!<br>
"""<br>
}</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">An unreadable JSON dump. I don't think I really need to put an example.</p>
<p dir="auto">My efforts to push for adoption of ansible in my organization have been thoroughly hindered by this problem - people can't read the error messages they get and so do not use the tool.</p>
<p dir="auto">You cannot hope to see all the people who are being turned off by this. Most of them simply stop using and go away.</p>
<p dir="auto">Others (e.g. <a href="http://blog.cliffano.com/2014/04/06/human-readable-ansible-playbook-log-output-using-callback-plugin/" rel="nofollow">http://blog.cliffano.com/2014/04/06/human-readable-ansible-playbook-log-output-using-callback-plugin/</a>) have provided acceptable fixes for this with callback plugins (but it absolutely must be the default, or any solution is moot). It is time for this ridiculous problem to be solved. Please please please.</p> | 0 |
<p dir="auto">I'm trying my luck here.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="entry: {
home: '/......../home.js'
},
output: {
publicPath: '/dist/',
filename: "js/[name]-[hash].js",
chunkFilename: "js/[name]-chunk-[chunkhash].js"
},"><pre class="notranslate"><code class="notranslate">entry: {
home: '/......../home.js'
},
output: {
publicPath: '/dist/',
filename: "js/[name]-[hash].js",
chunkFilename: "js/[name]-chunk-[chunkhash].js"
},
</code></pre></div>
<p dir="auto">Expect:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="js/home-70aa09e8630fee6b4bb2.js"><pre class="notranslate"><code class="notranslate">js/home-70aa09e8630fee6b4bb2.js
</code></pre></div>
<p dir="auto">Actually:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="js/home-chunk-70aa09e8630fee6b4bb2.js"><pre class="notranslate"><code class="notranslate">js/home-chunk-70aa09e8630fee6b4bb2.js
</code></pre></div>
<p dir="auto"><a href="https://github.com/humorHan/webpack4.x">repository url</a></p>
<p dir="auto">webpack version: 4.14.0<br>
Node.js version: 9.6.1<br>
Operating System: mac os</p> | <h1 dir="auto">Bug report</h1>
<p dir="auto">For example I do not have any duplicates of classes named <code class="notranslate">BaseMeshBehavior</code>, but in the output I see</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class BaseMeshBehavior_BaseMeshBehavior extends Behavior_Behavior {"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">BaseMeshBehavior_BaseMeshBehavior</span> <span class="pl-k">extends</span> <span class="pl-v">Behavior_Behavior</span> <span class="pl-kos">{</span><span class="pl-kos"></span></pre></div>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">renaming of identifiers although there are not more than one definition.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//@ts-check
const CWD = process.cwd();
const camelcase = require("camelcase");
const path = require("path");
const fs = require("fs");
const webpack = require("webpack");
const r = require("regexr").default;
const pkg = require(path.join(CWD, "package.json"));
const builderConfigPath = path.join(CWD, "builder.config.js");
const builderConfig = fs.existsSync(builderConfigPath)
? require(builderConfigPath)
: {};
const pkgNameParts = pkg.name.split("/");
const lastPkgNamePart = pkgNameParts[pkgNameParts.length - 1];
const globalName = builderConfig.globalName;
const NAME =
globalName === false || globalName === ""
? ""
: globalName || camelcase(lastPkgNamePart);
const alsoResolveRelativeToArchetype = () => [
path.relative(
CWD,
path.join(
path.dirname(require.resolve("builder-js-package")),
"node_modules"
)
),
"node_modules"
];
module.exports = {
entry: `.${path.sep}dist${path.sep}index`,
output: {
path: path.join(CWD, "dist"),
filename: "global.js",
library: NAME,
libraryTarget: "var" // alternative: "window"
},
resolve: {
modules: alsoResolveRelativeToArchetype(),
extensions: [".js"]
},
resolveLoader: {
modules: alsoResolveRelativeToArchetype()
},
module: {
rules: [
{
test: /\.js$/,
use: ["source-map-loader"],
enforce: "pre"
}
]
},
plugins: [new webpack.optimize.ModuleConcatenationPlugin()],
devtool: "source-map",
mode: "production",
optimization: { minimize: true },
stats: { assets: false }
};"><pre class="notranslate"><span class="pl-c">//<span class="pl-k">@ts</span>-check</span>
<span class="pl-k">const</span> <span class="pl-c1">CWD</span> <span class="pl-c1">=</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">cwd</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">camelcase</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"camelcase"</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-k">const</span> <span class="pl-s1">fs</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"fs"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">webpack</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"webpack"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">r</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"regexr"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">default</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">pkg</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-c1">CWD</span><span class="pl-kos">,</span> <span class="pl-s">"package.json"</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">builderConfigPath</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-c1">CWD</span><span class="pl-kos">,</span> <span class="pl-s">"builder.config.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">builderConfig</span> <span class="pl-c1">=</span> <span class="pl-s1">fs</span><span class="pl-kos">.</span><span class="pl-en">existsSync</span><span class="pl-kos">(</span><span class="pl-s1">builderConfigPath</span><span class="pl-kos">)</span>
? <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s1">builderConfigPath</span><span class="pl-kos">)</span>
: <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">pkgNameParts</span> <span class="pl-c1">=</span> <span class="pl-s1">pkg</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">.</span><span class="pl-en">split</span><span class="pl-kos">(</span><span class="pl-s">"/"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">lastPkgNamePart</span> <span class="pl-c1">=</span> <span class="pl-s1">pkgNameParts</span><span class="pl-kos">[</span><span class="pl-s1">pkgNameParts</span><span class="pl-kos">.</span><span class="pl-c1">length</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-k">const</span> <span class="pl-s1">globalName</span> <span class="pl-c1">=</span> <span class="pl-s1">builderConfig</span><span class="pl-kos">.</span><span class="pl-c1">globalName</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-c1">NAME</span> <span class="pl-c1">=</span>
<span class="pl-s1">globalName</span> <span class="pl-c1">===</span> <span class="pl-c1">false</span> <span class="pl-c1">||</span> <span class="pl-s1">globalName</span> <span class="pl-c1">===</span> <span class="pl-s">""</span>
? <span class="pl-s">""</span>
: <span class="pl-s1">globalName</span> <span class="pl-c1">||</span> <span class="pl-s1">camelcase</span><span class="pl-kos">(</span><span class="pl-s1">lastPkgNamePart</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-en">alsoResolveRelativeToArchetype</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">[</span>
<span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">relative</span><span class="pl-kos">(</span>
<span class="pl-c1">CWD</span><span class="pl-kos">,</span>
<span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span>
<span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">dirname</span><span class="pl-kos">(</span><span class="pl-en">require</span><span class="pl-kos">.</span><span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s">"builder-js-package"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-s">"node_modules"</span>
<span class="pl-kos">)</span>
<span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-s">"node_modules"</span>
<span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c1">entry</span>: <span class="pl-s">`.<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-c1">sep</span><span class="pl-kos">}</span></span>dist<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-c1">sep</span><span class="pl-kos">}</span></span>index`</span><span class="pl-kos">,</span>
<span class="pl-c1">output</span>: <span class="pl-kos">{</span>
<span class="pl-c1">path</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-c1">CWD</span><span class="pl-kos">,</span> <span class="pl-s">"dist"</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-c1">filename</span>: <span class="pl-s">"global.js"</span><span class="pl-kos">,</span>
<span class="pl-c1">library</span>: <span class="pl-c1">NAME</span><span class="pl-kos">,</span>
<span class="pl-c1">libraryTarget</span>: <span class="pl-s">"var"</span> <span class="pl-c">// alternative: "window"</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">resolve</span>: <span class="pl-kos">{</span>
<span class="pl-c1">modules</span>: <span class="pl-en">alsoResolveRelativeToArchetype</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-c1">extensions</span>: <span class="pl-kos">[</span><span class="pl-s">".js"</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">resolveLoader</span>: <span class="pl-kos">{</span>
<span class="pl-c1">modules</span>: <span class="pl-en">alsoResolveRelativeToArchetype</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">module</span>: <span class="pl-kos">{</span>
<span class="pl-c1">rules</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">test</span>: <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">\.</span>js<span class="pl-cce">$</span><span class="pl-c1">/</span></span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">[</span><span class="pl-s">"source-map-loader"</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">enforce</span>: <span class="pl-s">"pre"</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">plugins</span>: <span class="pl-kos">[</span><span class="pl-k">new</span> <span class="pl-s1">webpack</span><span class="pl-kos">.</span><span class="pl-c1">optimize</span><span class="pl-kos">.</span><span class="pl-c1">ModuleConcatenationPlugin</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">devtool</span>: <span class="pl-s">"source-map"</span><span class="pl-kos">,</span>
<span class="pl-c1">mode</span>: <span class="pl-s">"production"</span><span class="pl-kos">,</span>
<span class="pl-c1">optimization</span>: <span class="pl-kos">{</span> <span class="pl-c1">minimize</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">stats</span>: <span class="pl-kos">{</span> <span class="pl-c1">assets</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"><strong>What is the expected behavior?</strong></p>
<p dir="auto">It should not rename anything if it is not necessary. At the moment, it seems to rename many of my classes, but there are no definitions of anything else with the same name so there's no reason to rename them (as far as I know).</p>
<p dir="auto">For reference, Rollup doesn't rename them.</p>
<p dir="auto">This is what I see in the output:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/* concated harmony reexport DeclarativeBase */__webpack_require__.d(__webpack_exports__, "DeclarativeBase", function() { return DeclarativeBase_DeclarativeBase; });
/* concated harmony reexport HTMLNode */__webpack_require__.d(__webpack_exports__, "HTMLNode", function() { return HTMLNode_HTMLNode; });
/* concated harmony reexport HTMLScene */__webpack_require__.d(__webpack_exports__, "HTMLScene", function() { return HTMLScene_HTMLScene; });
/* concated harmony reexport WebComponent */__webpack_require__.d(__webpack_exports__, "WebComponent", function() { return WebComponent_WebComponent; });
/* concated harmony reexport BaseGeometryBehavior */__webpack_require__.d(__webpack_exports__, "BaseGeometryBehavior", function() { return BaseGeometryBehavior_BaseGeometryBehavior; });
/* concated harmony reexport BaseMaterialBehavior */__webpack_require__.d(__webpack_exports__, "BaseMaterialBehavior", function() { return BaseMaterialBehavior_BaseMaterialBehavior; });
/* concated harmony reexport BaseMeshBehavior */__webpack_require__.d(__webpack_exports__, "BaseMeshBehavior", function() { return BaseMeshBehavior_BaseMeshBehavior; });
/* concated harmony reexport BasicMaterialBehavior */__webpack_require__.d(__webpack_exports__, "BasicMaterialBehavior", function() { return BasicMaterialBehavior_BasicMaterialBehavior; });
/* concated harmony reexport BoxGeometryBehavior */__webpack_require__.d(__webpack_exports__, "BoxGeometryBehavior", function() { return BoxGeometryBehavior_BoxGeometryBehavior; });
/* concated harmony reexport DefaultBehaviors */__webpack_require__.d(__webpack_exports__, "DefaultBehaviors", function() { return DefaultBehaviors_DefaultBehaviors; });
/* concated harmony reexport DOMNodeGeometryBehavior */__webpack_require__.d(__webpack_exports__, "DOMNodeGeometryBehavior", function() { return DOMNodeGeometryBehavior_DOMNodeGeometryBehavior; });
/* concated harmony reexport DOMNodeMaterialBehavior */__webpack_require__.d(__webpack_exports__, "DOMNodeMaterialBehavior", function() { return DOMNodeMaterialBehavior_DOMNodeMaterialBehavior; });
/* concated harmony reexport ObjModelBehavior */__webpack_require__.d(__webpack_exports__, "ObjModelBehavior", function() { return ObjModelBehavior_ObjModelBehavior; });
/* concated harmony reexport PhongMaterialBehavior */__webpack_require__.d(__webpack_exports__, "PhongMaterialBehavior", function() { return PhongMaterialBehavior_PhongMaterialBehavior; });
/* concated harmony reexport PlaneGeometryBehavior */__webpack_require__.d(__webpack_exports__, "PlaneGeometryBehavior", function() { return PlaneGeometryBehavior_PlaneGeometryBehavior; });
/* concated harmony reexport SphereGeometryBehavior */__webpack_require__.d(__webpack_exports__, "SphereGeometryBehavior", function() { return SphereGeometryBehavior_SphereGeometryBehavior; });
/* concated harmony reexport Cube */__webpack_require__.d(__webpack_exports__, "Cube", function() { return Cube_Cube; });
/* concated harmony reexport PushPaneLayout */__webpack_require__.d(__webpack_exports__, "PushPaneLayout", function() { return PushPaneLayout_PushPaneLayout; });"><pre class="notranslate"><span class="pl-c">/* concated harmony reexport DeclarativeBase */</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-s">"DeclarativeBase"</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">return</span> <span class="pl-v">DeclarativeBase_DeclarativeBase</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport HTMLNode */</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-s">"HTMLNode"</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">return</span> <span class="pl-v">HTMLNode_HTMLNode</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport HTMLScene */</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-s">"HTMLScene"</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">return</span> <span class="pl-v">HTMLScene_HTMLScene</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport WebComponent */</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-s">"WebComponent"</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">return</span> <span class="pl-v">WebComponent_WebComponent</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport BaseGeometryBehavior */</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-s">"BaseGeometryBehavior"</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">return</span> <span class="pl-v">BaseGeometryBehavior_BaseGeometryBehavior</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport BaseMaterialBehavior */</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-s">"BaseMaterialBehavior"</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">return</span> <span class="pl-v">BaseMaterialBehavior_BaseMaterialBehavior</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport BaseMeshBehavior */</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-s">"BaseMeshBehavior"</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">return</span> <span class="pl-v">BaseMeshBehavior_BaseMeshBehavior</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport BasicMaterialBehavior */</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-s">"BasicMaterialBehavior"</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">return</span> <span class="pl-v">BasicMaterialBehavior_BasicMaterialBehavior</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport BoxGeometryBehavior */</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-s">"BoxGeometryBehavior"</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">return</span> <span class="pl-v">BoxGeometryBehavior_BoxGeometryBehavior</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport DefaultBehaviors */</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-s">"DefaultBehaviors"</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">return</span> <span class="pl-v">DefaultBehaviors_DefaultBehaviors</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport DOMNodeGeometryBehavior */</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-s">"DOMNodeGeometryBehavior"</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">return</span> <span class="pl-v">DOMNodeGeometryBehavior_DOMNodeGeometryBehavior</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport DOMNodeMaterialBehavior */</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-s">"DOMNodeMaterialBehavior"</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">return</span> <span class="pl-v">DOMNodeMaterialBehavior_DOMNodeMaterialBehavior</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport ObjModelBehavior */</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-s">"ObjModelBehavior"</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">return</span> <span class="pl-v">ObjModelBehavior_ObjModelBehavior</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport PhongMaterialBehavior */</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-s">"PhongMaterialBehavior"</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">return</span> <span class="pl-v">PhongMaterialBehavior_PhongMaterialBehavior</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport PlaneGeometryBehavior */</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-s">"PlaneGeometryBehavior"</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">return</span> <span class="pl-v">PlaneGeometryBehavior_PlaneGeometryBehavior</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport SphereGeometryBehavior */</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-s">"SphereGeometryBehavior"</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">return</span> <span class="pl-v">SphereGeometryBehavior_SphereGeometryBehavior</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport Cube */</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-s">"Cube"</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">return</span> <span class="pl-v">Cube_Cube</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/* concated harmony reexport PushPaneLayout */</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-s">"PushPaneLayout"</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">return</span> <span class="pl-v">PushPaneLayout_PushPaneLayout</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">For each of those identifiers, there's only one of them anywhere in my project.</p>
<p dir="auto">Related: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="248782494" data-permission-text="Title is private" data-url="https://github.com/webpack/webpack/issues/5463" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack/issues/5463/hovercard" href="https://github.com/webpack/webpack/issues/5463">#5463</a> (by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Michael-Tajmajer-Emrsn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Michael-Tajmajer-Emrsn">@Michael-Tajmajer-Emrsn</a>)</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 4.27.1<br>
Node.js version: v13.5.0<br>
Operating System: macOS<br>
Additional tools:</p> | 0 |
<p dir="auto">document usage of 'namespace' attribute - which entities is it relevant to, when different namespaces should be used, can all namespaces be extracted to check what exists on the environment, etc.</p> | <p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p> | 0 |
<p dir="auto">Hi there,</p>
<p dir="auto">I installed 1.3 yesterday and my application no longer compiles correctly. Here's an example:</p>
<p dir="auto"><strong>TS Input</strong><br>
import a = require("../dir1/file1");<br>
import MongoClient = require('mongodb');<br>
import b = require('../dir1/file2');<br>
import c = require("../dir2/file1");</p>
<p dir="auto"><strong>JS Output</strong><br>
var c = require("../dir2/file1");</p>
<p dir="auto">For some reason three of the four lines did not make it into the JS file. All worked fine before I installed the new TypeScript.</p>
<p dir="auto">Any thoughts?</p> | <p dir="auto">I've just come across a problem with <code class="notranslate">tsc</code> (version 1.1.0.0) which I've reduced to the following repro code. Suppose we have the following in <code class="notranslate">main.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import a = require('./main'); // doesn't matter what is required as long as tsc can find it
var b = a; // or any expression referring to 'a'
var c: typeof a;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> require<span class="pl-kos">(</span><span class="pl-s">'./main'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// doesn't matter what is required as long as tsc can find it</span>
<span class="pl-k">var</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span><span class="pl-kos">;</span> <span class="pl-c">// or any expression referring to 'a'</span>
<span class="pl-k">var</span> <span class="pl-s1">c</span>: <span class="pl-k">typeof</span> <span class="pl-s1">a</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Compiling this with <code class="notranslate">tsc main --module commonjs</code> gives me the following output:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var b = a;
var c;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">c</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Note that no <code class="notranslate">var a = ...</code> has been emitted, and running the code results in <code class="notranslate">ReferenceError: a is not defined</code>.</p>
<p dir="auto">If the third line (<code class="notranslate">var c: typeof a</code>) is commented out or doesn't refer to <code class="notranslate">a</code>, then the <code class="notranslate">var a = ...</code> line <em>is</em> emitted as expected.</p> | 1 |
<p dir="auto">This is the best minimal example I've come up with so far. It happens reliably.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> using JSON, NamedTupleTools
julia> JSON.lower(x) = (type=string(typeof(x)), ntfromstruct(x)...)
julia> struct Foo end
julia> JSON.json(Foo())"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-k">using</span> JSON, NamedTupleTools
julia<span class="pl-k">></span> JSON<span class="pl-k">.</span><span class="pl-en">lower</span>(x) <span class="pl-k">=</span> (type<span class="pl-k">=</span><span class="pl-c1">string</span>(<span class="pl-c1">typeof</span>(x)), <span class="pl-c1">ntfromstruct</span>(x)<span class="pl-k">...</span>)
julia<span class="pl-k">></span> <span class="pl-k">struct</span> Foo <span class="pl-k">end</span>
julia<span class="pl-k">></span> JSON<span class="pl-k">.</span><span class="pl-c1">json</span>(<span class="pl-c1">Foo</span>())</pre></div>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="(v1.3) pkg> status
Status `~/.julia/environments/v1.3/Project.toml`
...
[682c06a0] JSON v0.21.0
[d9ec5142] NamedTupleTools v0.12.1
...
julia> versioninfo()
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin18.6.0)
CPU: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)"><pre class="notranslate">(v1.<span class="pl-c1">3</span>) pkg<span class="pl-k">></span> status
Status <span class="pl-s"><span class="pl-pds">`</span>~/.julia/environments/v1.3/Project.toml<span class="pl-pds">`</span></span>
<span class="pl-k">...</span>
[<span class="pl-c1">682</span>c06a0] JSON v0.<span class="pl-c1">21.0</span>
[d9ec5142] NamedTupleTools v0.<span class="pl-c1">12.1</span>
<span class="pl-k">...</span>
julia<span class="pl-k">></span> <span class="pl-c1">versioninfo</span>()
Julia Version <span class="pl-c1">1.3</span>.<span class="pl-c1">1</span>
Commit <span class="pl-c1">2</span>d5741174c (<span class="pl-c1">2019</span><span class="pl-k">-</span><span class="pl-c1">12</span><span class="pl-k">-</span><span class="pl-c1">30</span> <span class="pl-c1">21</span><span class="pl-k">:</span><span class="pl-c1">36</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>darwin18.<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) i9<span class="pl-k">-</span><span class="pl-c1">9980</span>HK CPU @ <span class="pl-c1">2.40</span>GHz
WORD_SIZE<span class="pl-k">:</span> <span class="pl-c1">64</span>
LIBM<span class="pl-k">:</span> libopenlibm
LLVM<span class="pl-k">:</span> libLLVM<span class="pl-k">-</span><span class="pl-c1">6.0</span>.<span class="pl-c1">1</span> (ORCJIT, skylake)</pre></div>
<p dir="auto">If you change the <code class="notranslate">JSON.lower</code> definition to the below then it no longer crashes but correctly runs forever due to the recursion (this is supposed to run forever since <code class="notranslate">lower</code> returns a NamedTuple, which itself needs to be lowered):</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> JSON.lower(x) = (type=string(typeof(x)), fields=ntfromstruct(x))
^CERROR: InterruptException:
Stacktrace:
[1] lower(::NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields), ..."><pre class="notranslate">julia<span class="pl-k">></span> JSON<span class="pl-k">.</span><span class="pl-en">lower</span>(x) <span class="pl-k">=</span> (type<span class="pl-k">=</span><span class="pl-c1">string</span>(<span class="pl-c1">typeof</span>(x)), fields<span class="pl-k">=</span><span class="pl-c1">ntfromstruct</span>(x))
<span class="pl-k">^</span>CERROR<span class="pl-k">:</span> InterruptException<span class="pl-k">:</span>
Stacktrace<span class="pl-k">:</span>
[1] lower(::NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields),Tuple{String,NamedTuple{(:type, :fields), ...</pre></div> | <p dir="auto">This one is a bit tricky... (occurs on recent v0.5 builds from master, but not v0.4.6)</p>
<p dir="auto">If you have a specific sort of function containing a recursive call (like the one below), and <code class="notranslate">n</code> recursive calls leads to a Stack Overflow, then <em>sometimes</em> making <code class="notranslate">n-1</code> recursive calls leads to a Segmentation Fault.</p>
<p dir="auto">An example of such a function:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function f(x)
if x > 0
unshift!(f(x-1), 1)
else
[1]
end
end"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">f</span>(x)
<span class="pl-k">if</span> x <span class="pl-k">></span> <span class="pl-c1">0</span>
<span class="pl-c1">unshift!</span>(<span class="pl-c1">f</span>(x<span class="pl-k">-</span><span class="pl-c1">1</span>), <span class="pl-c1">1</span>)
<span class="pl-k">else</span>
[<span class="pl-c1">1</span>]
<span class="pl-k">end</span>
<span class="pl-k">end</span></pre></div>
<p dir="auto">I've also created a little test file that does a simple binary search of the number of iterations to trigger the bug: <a href="https://gist.github.com/jballanc/1734f3a735b62c89908b51bb375d6c3e">https://gist.github.com/jballanc/1734f3a735b62c89908b51bb375d6c3e</a></p>
<p dir="auto">There seems to be a dependance on how the above script is run that affects whether or not the crash is triggered. On my machine running in the Emacs terminal crashes, running in a normal terminal doesn't crash, but running it as <code class="notranslate">julia -e 'versioninfo(); include("crash.jl")'</code> does crash. Manually searching for the correct <code class="notranslate">n</code> in the REPL also crashes reliably.</p>
<p dir="auto">The stack trace at the point of the segfault is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(lldb) bt
* thread #3: tid = 0xa312d, 0x0000000100139c10 libjulia.0.5.0.dylib`libunwind::LocalAddressSpace::get64(this=0x00000001002f2958, addr=140734791204856) + 16 at AddressSpace.hpp:92, stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff5f3cbff8)
* frame #0: 0x0000000100139c10 libjulia.0.5.0.dylib`libunwind::LocalAddressSpace::get64(this=0x00000001002f2958, addr=140734791204856) + 16 at AddressSpace.hpp:92
frame #1: 0x000000010013e0fc libjulia.0.5.0.dylib`libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncodingRBPFrame(compactEncoding=16974177, functionStart=4295582032, addressSpace=0x00000001002f2958, registers=0x0000700000103768) + 812 at CompactUnwinder.hpp:618
frame #2: 0x000000010013dd58 libjulia.0.5.0.dylib`libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncoding(compactEncoding=16974177, functionStart=4295582032, addressSpace=0x00000001002f2958, registers=0x0000700000103768) + 120 at CompactUnwinder.hpp:545
frame #3: 0x000000010013dcd6 libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::stepWithCompactEncoding(this=0x0000700000103710, (null)=0x00007000001034e0) + 54 at UnwindCursor.hpp:339
frame #4: 0x000000010013b0ac libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::stepWithCompactEncoding(this=0x0000700000103710) + 60 at UnwindCursor.hpp:337
frame #5: 0x000000010013a4ea libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step(this=0x0000700000103710) + 90 at UnwindCursor.hpp:876
frame #6: 0x00000001001397fe libjulia.0.5.0.dylib`::unw_step(cursor=0x0000700000103710) + 30 at libuwind.cxx:288
frame #7: 0x0000000100090e19 libjulia.0.5.0.dylib`jl_unw_stepn [inlined] jl_unw_step(cursor=0x0000700000103710) + 441 at stackwalk.c:306 [opt]
frame #8: 0x0000000100090dd7 libjulia.0.5.0.dylib`jl_unw_stepn(cursor=0x0000700000103710, ip=0x0000000103cb9000, sp=<unavailable>, maxsize=80000) + 375 at stackwalk.c:46 [opt]
frame #9: 0x0000000100090ecf libjulia.0.5.0.dylib`rec_backtrace_ctx(data=0x0000000103cb9000, maxsize=80000, context=<unavailable>) + 63 at stackwalk.c:75 [opt]
frame #10: 0x00000001000815fd libjulia.0.5.0.dylib`jl_throw_in_thread(tid=<unavailable>, thread=1295, exception=0x0000000105c49b38) + 109 at signals-mach.c:131 [opt]
frame #11: 0x00000001000819b6 libjulia.0.5.0.dylib`catch_exception_raise(exception_port=<unavailable>, thread=1295, task=<unavailable>, exception=<unavailable>, code=<unavailable>, code_count=<unavailable>) + 822 at signals-mach.c:227 [opt]
frame #12: 0x00007fff8bfac440 libsystem_kernel.dylib`_Xexception_raise + 130
frame #13: 0x00007fff8bfac6fe libsystem_kernel.dylib`exc_server + 78
frame #14: 0x00007fff8bfbbce0 libsystem_kernel.dylib`mach_msg_server + 504
frame #15: 0x000000010008155d libjulia.0.5.0.dylib`mach_segv_listener(arg=<unavailable>) + 29 at signals-mach.c:73 [opt]
frame #16: 0x00007fff8d37199d libsystem_pthread.dylib`_pthread_body + 131
frame #17: 0x00007fff8d37191a libsystem_pthread.dylib`_pthread_start + 168
frame #18: 0x00007fff8d36f351 libsystem_pthread.dylib`thread_start + 13"><pre class="notranslate"><code class="notranslate">(lldb) bt
* thread #3: tid = 0xa312d, 0x0000000100139c10 libjulia.0.5.0.dylib`libunwind::LocalAddressSpace::get64(this=0x00000001002f2958, addr=140734791204856) + 16 at AddressSpace.hpp:92, stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff5f3cbff8)
* frame #0: 0x0000000100139c10 libjulia.0.5.0.dylib`libunwind::LocalAddressSpace::get64(this=0x00000001002f2958, addr=140734791204856) + 16 at AddressSpace.hpp:92
frame #1: 0x000000010013e0fc libjulia.0.5.0.dylib`libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncodingRBPFrame(compactEncoding=16974177, functionStart=4295582032, addressSpace=0x00000001002f2958, registers=0x0000700000103768) + 812 at CompactUnwinder.hpp:618
frame #2: 0x000000010013dd58 libjulia.0.5.0.dylib`libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncoding(compactEncoding=16974177, functionStart=4295582032, addressSpace=0x00000001002f2958, registers=0x0000700000103768) + 120 at CompactUnwinder.hpp:545
frame #3: 0x000000010013dcd6 libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::stepWithCompactEncoding(this=0x0000700000103710, (null)=0x00007000001034e0) + 54 at UnwindCursor.hpp:339
frame #4: 0x000000010013b0ac libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::stepWithCompactEncoding(this=0x0000700000103710) + 60 at UnwindCursor.hpp:337
frame #5: 0x000000010013a4ea libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step(this=0x0000700000103710) + 90 at UnwindCursor.hpp:876
frame #6: 0x00000001001397fe libjulia.0.5.0.dylib`::unw_step(cursor=0x0000700000103710) + 30 at libuwind.cxx:288
frame #7: 0x0000000100090e19 libjulia.0.5.0.dylib`jl_unw_stepn [inlined] jl_unw_step(cursor=0x0000700000103710) + 441 at stackwalk.c:306 [opt]
frame #8: 0x0000000100090dd7 libjulia.0.5.0.dylib`jl_unw_stepn(cursor=0x0000700000103710, ip=0x0000000103cb9000, sp=<unavailable>, maxsize=80000) + 375 at stackwalk.c:46 [opt]
frame #9: 0x0000000100090ecf libjulia.0.5.0.dylib`rec_backtrace_ctx(data=0x0000000103cb9000, maxsize=80000, context=<unavailable>) + 63 at stackwalk.c:75 [opt]
frame #10: 0x00000001000815fd libjulia.0.5.0.dylib`jl_throw_in_thread(tid=<unavailable>, thread=1295, exception=0x0000000105c49b38) + 109 at signals-mach.c:131 [opt]
frame #11: 0x00000001000819b6 libjulia.0.5.0.dylib`catch_exception_raise(exception_port=<unavailable>, thread=1295, task=<unavailable>, exception=<unavailable>, code=<unavailable>, code_count=<unavailable>) + 822 at signals-mach.c:227 [opt]
frame #12: 0x00007fff8bfac440 libsystem_kernel.dylib`_Xexception_raise + 130
frame #13: 0x00007fff8bfac6fe libsystem_kernel.dylib`exc_server + 78
frame #14: 0x00007fff8bfbbce0 libsystem_kernel.dylib`mach_msg_server + 504
frame #15: 0x000000010008155d libjulia.0.5.0.dylib`mach_segv_listener(arg=<unavailable>) + 29 at signals-mach.c:73 [opt]
frame #16: 0x00007fff8d37199d libsystem_pthread.dylib`_pthread_body + 131
frame #17: 0x00007fff8d37191a libsystem_pthread.dylib`_pthread_start + 168
frame #18: 0x00007fff8d36f351 libsystem_pthread.dylib`thread_start + 13
</code></pre></div> | 1 |
<h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">PowerToys Run does not function well as a focus switcher. Run lists running processes in the dropdown, but not the first result and prefers to create a new process instead of focusing on open processes. There should be an option to prioritize running processes in the dropdown.</p>
<h2 dir="auto">Description of use</h2>
<p dir="auto">A new option appears under the PowerTools Run settings to enable running process prioritization.</p>
<p dir="auto">Opening PowerTools Run should bring up the usual menu, and when a query is searched, any results matching the query that are running processes should be prioritized in the results.</p> | <h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">It would be more useful if already running programs are shown first in the results list in the quick launcher (like the old WindowWalker). <strong><em>Or maybe an option to change the priority.</em></strong></p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">In the results list, the running programs should be first in the list.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/49621788/82359297-b4e1c480-99d5-11ea-9f35-8cdf32108868.png"><img src="https://user-images.githubusercontent.com/49621788/82359297-b4e1c480-99d5-11ea-9f35-8cdf32108868.png" alt="1" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/49621788/82359300-b57a5b00-99d5-11ea-964c-1b39bb99600d.png"><img src="https://user-images.githubusercontent.com/49621788/82359300-b57a5b00-99d5-11ea-964c-1b39bb99600d.png" alt="2" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">I think there may be a bug with some of the LR schedulers eg StepLR. essentially if the epoch is a multiple of the step size, the LR will keep multiplying by gamma, even if the epoch never increases:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sched = torch.optim.lr_scheduler.StepLR(opt, 2, 2.) # step size = 2, gamma = 2
for i in range(5):
opt.step()
opt.step()
sched.step(epoch=2) # fix the epoch
print(opt.state_dict()['param_groups'][0]['lr'])
2.0
4.0
8.0
16.0
32.0"><pre class="notranslate"><span class="pl-s1">sched</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-s1">optim</span>.<span class="pl-s1">lr_scheduler</span>.<span class="pl-v">StepLR</span>(<span class="pl-s1">opt</span>, <span class="pl-c1">2</span>, <span class="pl-c1">2.</span>) <span class="pl-c"># step size = 2, gamma = 2</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">5</span>):
<span class="pl-s1">opt</span>.<span class="pl-en">step</span>()
<span class="pl-s1">opt</span>.<span class="pl-en">step</span>()
<span class="pl-s1">sched</span>.<span class="pl-en">step</span>(<span class="pl-s1">epoch</span><span class="pl-c1">=</span><span class="pl-c1">2</span>) <span class="pl-c"># fix the epoch</span>
<span class="pl-en">print</span>(<span class="pl-s1">opt</span>.<span class="pl-en">state_dict</span>()[<span class="pl-s">'param_groups'</span>][<span class="pl-c1">0</span>][<span class="pl-s">'lr'</span>])
<span class="pl-c1">2.0</span>
<span class="pl-c1">4.0</span>
<span class="pl-c1">8.0</span>
<span class="pl-c1">16.0</span>
<span class="pl-c1">32.0</span></pre></div>
<p dir="auto">versus if epoch % step_size != 0:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sched = torch.optim.lr_scheduler.StepLR(opt, 2, 2.) # step size = 2, gamma = 2
for i in range(5):
opt.step()
opt.step()
sched.step(epoch=3) # fix the epoch
print(opt.state_dict()['param_groups'][0]['lr'])
1.0
1.0
1.0
1.0
1.0"><pre class="notranslate"><span class="pl-s1">sched</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-s1">optim</span>.<span class="pl-s1">lr_scheduler</span>.<span class="pl-v">StepLR</span>(<span class="pl-s1">opt</span>, <span class="pl-c1">2</span>, <span class="pl-c1">2.</span>) <span class="pl-c"># step size = 2, gamma = 2</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">5</span>):
<span class="pl-s1">opt</span>.<span class="pl-en">step</span>()
<span class="pl-s1">opt</span>.<span class="pl-en">step</span>()
<span class="pl-s1">sched</span>.<span class="pl-en">step</span>(<span class="pl-s1">epoch</span><span class="pl-c1">=</span><span class="pl-c1">3</span>) <span class="pl-c"># fix the epoch</span>
<span class="pl-en">print</span>(<span class="pl-s1">opt</span>.<span class="pl-en">state_dict</span>()[<span class="pl-s">'param_groups'</span>][<span class="pl-c1">0</span>][<span class="pl-s">'lr'</span>])
<span class="pl-c1">1.0</span>
<span class="pl-c1">1.0</span>
<span class="pl-c1">1.0</span>
<span class="pl-c1">1.0</span>
<span class="pl-c1">1.0</span></pre></div>
<p dir="auto">IIUC, calling <code class="notranslate">sched.step(epoch=i)</code> multiple times should be idempotent. Note that this seems to have been introduced in 1.1; 1.0 works as intended.</p>
<p dir="auto">Pytorch 1.1.0<br>
Python 3.6.5</p> | <p dir="auto">When the StepLR, MultiStepLR, ExponentialLR or CosineAnnealingLR scheduler is called with the same epoch parameter the optimizer value is further reduced even though it's the same epoch</p>
<p dir="auto">a sample code</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import torch.optim as optim
from torch import nn
conv = nn.Conv2d(3,3,3)
optimizer = optim.Adam(conv.parameters())
lr_scheduler = optim.lr_scheduler.StepLR(optimizer, 2)"><pre class="notranslate"><code class="notranslate">import torch.optim as optim
from torch import nn
conv = nn.Conv2d(3,3,3)
optimizer = optim.Adam(conv.parameters())
lr_scheduler = optim.lr_scheduler.StepLR(optimizer, 2)
</code></pre></div>
<p dir="auto">now if we call <code class="notranslate">lr_scheduler.step(epoch=2)</code> multiple times</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="for _ in range(10):
lr_scheduler.step(2)
print(optimizer.param_groups[0]['lr'])"><pre class="notranslate"><code class="notranslate">for _ in range(10):
lr_scheduler.step(2)
print(optimizer.param_groups[0]['lr'])
</code></pre></div>
<p dir="auto">output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> 0.0001
>>> 1e-05
>>> 1.0000000000000002e-06
>>> 1.0000000000000002e-07
>>> 1.0000000000000004e-08
>>> 1.0000000000000005e-09
>>> 1.0000000000000006e-10
>>> 1.0000000000000006e-11
>>> 1.0000000000000006e-12
>>> 1.0000000000000007e-13"><pre class="notranslate"><code class="notranslate">>>> 0.0001
>>> 1e-05
>>> 1.0000000000000002e-06
>>> 1.0000000000000002e-07
>>> 1.0000000000000004e-08
>>> 1.0000000000000005e-09
>>> 1.0000000000000006e-10
>>> 1.0000000000000006e-11
>>> 1.0000000000000006e-12
>>> 1.0000000000000007e-13
</code></pre></div>
<p dir="auto">Even if such use-case is bizarre, this is extremely unexpected.<br>
This is happens using PyTorch version 1.1.0 but not 1.0.1. Because pull(<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="380976590" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/14010" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/14010/hovercard" href="https://github.com/pytorch/pytorch/pull/14010">#14010</a>) redefined StepLR, MultiStepLR, ExponentialLR and CosineAnnealingLR to directly use the learning rate variable of the optimizer rather than using <code class="notranslate">base_lr</code> defined by <code class="notranslate">_LRScheduler</code>. This was in order to support multiple simultaneous schedulers (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="373244157" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/13022" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/13022/hovercard" href="https://github.com/pytorch/pytorch/issues/13022">#13022</a>)!</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">All styled-components with their CSS attributes applied</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">All styled-components have their CSS class name, but, for any reason, some styled-components don't have their CSS attributes, then their styles will not be applied</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Enter to <a href="http://qa.approp.cl:3001" rel="nofollow">Testing site</a></li>
<li>In this first page, the styled-components is ok, but in the second page exist the problem</li>
<li>In the search input type: "Las Condes"</li>
<li>Internally I redirect with:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Router.push({
pathname: '/results',
{ page: 1, lat: -33.3989812, lng: -70.5573124, operation: 'arriendo' },
});"><pre class="notranslate"><code class="notranslate"> Router.push({
pathname: '/results',
{ page: 1, lat: -33.3989812, lng: -70.5573124, operation: 'arriendo' },
});
</code></pre></div>
<ol start="5" dir="auto">
<li>In the Results page, the rigth component style is wrong:</li>
</ol>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3875593/36064636-c0efa6da-0e6c-11e8-985c-cdafdaf879e4.png"><img width="903" alt="screen shot 2018-02-10 at 2 13 05 pm" src="https://user-images.githubusercontent.com/3875593/36064636-c0efa6da-0e6c-11e8-985c-cdafdaf879e4.png" style="max-width: 100%;"></a></p>
<p dir="auto">And the login modal buttons is ok:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3875593/36064697-632b3ae0-0e6d-11e8-98fe-68661b2a79ab.png"><img width="394" alt="screen shot 2018-02-10 at 2 19 37 pm" src="https://user-images.githubusercontent.com/3875593/36064697-632b3ae0-0e6d-11e8-98fe-68661b2a79ab.png" style="max-width: 100%;"></a></p>
<ol start="6" dir="auto">
<li>If reload the results page, (for a unkwnow reason) the right component is ok, but modal login button is wrong.</li>
</ol>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3875593/36064716-8ebcef28-0e6d-11e8-9f31-cfed3a917a07.png"><img width="579" alt="screen shot 2018-02-10 at 2 21 04 pm" src="https://user-images.githubusercontent.com/3875593/36064716-8ebcef28-0e6d-11e8-9f31-cfed3a917a07.png" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3875593/36064717-8edb8654-0e6d-11e8-9776-d2d8de7d3d6c.png"><img width="381" alt="screen shot 2018-02-10 at 2 21 15 pm" src="https://user-images.githubusercontent.com/3875593/36064717-8edb8654-0e6d-11e8-9776-d2d8de7d3d6c.png" style="max-width: 100%;"></a></p>
<h2 dir="auto">Context</h2>
<p dir="auto">In my development environment all works. But after of the build the code <em>(next build)</em> the problem happens</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>^4.1.4</td>
</tr>
<tr>
<td>node</td>
<td>7</td>
</tr>
<tr>
<td>OS</td>
<td>Linux</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
<tr>
<td>styled-components</td>
<td>^2.2.4</td>
</tr>
</tbody>
</table> | <p dir="auto">Moving forward, it will be possible to substitute <code class="notranslate">next start</code> in your programs with your own script, initialized without any wrappers. For example, <code class="notranslate">node index.js</code>.</p>
<p dir="auto">An example of such a script in its most basic form would be as follows:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const next = require('next')
const { createServer } = require('http')
// init next
const app = next(/* __dirname */)
const handle = app.getRequestHandler()
// init normal http server
createServer(handle).listen(3000)"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">next</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'next'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span> createServer <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">'http'</span><span class="pl-kos">)</span>
<span class="pl-c">// init next</span>
<span class="pl-k">const</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">next</span><span class="pl-kos">(</span><span class="pl-c">/* __dirname */</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">handle</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">getRequestHandler</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-c">// init normal http server</span>
<span class="pl-en">createServer</span><span class="pl-kos">(</span><span class="pl-s1">handle</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">listen</span><span class="pl-kos">(</span><span class="pl-c1">3000</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">This basically does nothing interesting, it's the equivalent of <code class="notranslate">next -p 3000</code>.</p>
<p dir="auto">An important observation: notice that the parameter passed to <code class="notranslate">next()</code> to initialize the app is not a config object, but a path. This is because the configuration will be conventionally located in a <code class="notranslate">next.config.js</code> file where a next project lives. Credit goes to @Compulves (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="187731663" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/222" data-hovercard-type="pull_request" data-hovercard-url="/vercel/next.js/pull/222/hovercard" href="https://github.com/vercel/next.js/pull/222">#222</a>) for this great contribution.</p>
<p dir="auto">This is crucial because even though we get to substitute the server code, we <em>don't break</em> existing and future useful next sub-commands. Especially <code class="notranslate">next build</code>, which makes deployment to production of your next apps so convenient, continues to work well even with both <code class="notranslate">node server.js</code> and <code class="notranslate">next start</code>.</p>
<h3 dir="auto">Custom routing</h3>
<p dir="auto">Next.js's <code class="notranslate">pages/</code> serves two purposes: to give you a super easy-to-use API for defining routes, but more importantly, to define different entry points for code splitting!</p>
<p dir="auto">I say more importantly because it should be (and will be) possible to completely override the default route mapping, by invoking <code class="notranslate">next/render</code> manually.</p>
<p dir="auto">The following example shows how you could point <code class="notranslate">/a</code> to <code class="notranslate">pages/b.js</code> and <code class="notranslate">/b</code> to <code class="notranslate">pages/a.js</code>, effectively changing the default routing behavior</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const next = require('next')
const render = require('next/render')
const { createServer } = require('http')
const { parse } = require('url')
// init next
const app = next(/* __dirname */)
const handle = app.getRequestHandler()
// init normal http server
createServer((req, res) => {
const { query, pathname } = parse(req.url, true)
if ('/a' === pathname) {
render(app, res, 'b', qry)
} else if ('/b' === pathname) {
render(app, req, res, 'a', query)
} else {
handle(req, res)
}
}).listen(3000)"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">next</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'next'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">render</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'next/render'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span> createServer <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">'http'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span> parse <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">'url'</span><span class="pl-kos">)</span>
<span class="pl-c">// init next</span>
<span class="pl-k">const</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">next</span><span class="pl-kos">(</span><span class="pl-c">/* __dirname */</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">handle</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">getRequestHandler</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-c">// init normal http server</span>
<span class="pl-en">createServer</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</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-kos">{</span> query<span class="pl-kos">,</span> pathname <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">parse</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">url</span><span class="pl-kos">,</span> <span class="pl-c1">true</span><span class="pl-kos">)</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s">'/a'</span> <span class="pl-c1">===</span> <span class="pl-s1">pathname</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">render</span><span class="pl-kos">(</span><span class="pl-s1">app</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">,</span> <span class="pl-s">'b'</span><span class="pl-kos">,</span> <span class="pl-s1">qry</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s">'/b'</span> <span class="pl-c1">===</span> <span class="pl-s1">pathname</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">render</span><span class="pl-kos">(</span><span class="pl-s1">app</span><span class="pl-kos">,</span> <span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">,</span> <span class="pl-s">'a'</span><span class="pl-kos">,</span> <span class="pl-s1">query</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>
<span class="pl-s1">handle</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</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">listen</span><span class="pl-kos">(</span><span class="pl-c1">3000</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">In addition to the <code class="notranslate">render</code> method, we'll expose lower level render APIs, like <code class="notranslate">renderToHTML</code> and <code class="notranslate">renderError</code>, which work like <code class="notranslate">render</code> but don't do the automatic response handling. Those APIs are useful for building a caching layer, for example, which is really handy if you know that a certain component will <em>always</em> return the same HTML with given props.</p>
<p dir="auto">More complicated routes like <code class="notranslate">/posts/:id/tags</code> or even <code class="notranslate">/:anything</code> can be handled by just parsing the URL and passing the appropriate props as the last parameter of <code class="notranslate">render</code> (as seen in the example), by using something like <a href="https://www.npmjs.com/package/path-match" rel="nofollow">path-match</a></p>
<p dir="auto">This is an example of how you do a catch all route, so that every request to <code class="notranslate">/catch/*</code> goes to a page <code class="notranslate">pages/my/page.js</code>:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const next = require('next')
const render = require('next/render')
const { createServer } = require('http')
const { parse } = require('url')
// init next
const app = next(/* __dirname */)
const handle = app.getRequestHandler()
// set up routes
const match = require('path-match')()
const route = match('/catch/:all')
// init normal http server
createServer((req, res) => {
const { query, pathname } = parse(req.url, true)
const params = match(pathname);
if (false === params) {
// handle it with default next behavior
handle(req, res)
} else {
// renders `pages/my/page.js`
render(app, req, res, 'my/page', query)
}
}).listen(3000)"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">next</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'next'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">render</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'next/render'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span> createServer <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">'http'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span> parse <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">'url'</span><span class="pl-kos">)</span>
<span class="pl-c">// init next</span>
<span class="pl-k">const</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">next</span><span class="pl-kos">(</span><span class="pl-c">/* __dirname */</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">handle</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">getRequestHandler</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-c">// set up routes</span>
<span class="pl-k">const</span> <span class="pl-s1">match</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'path-match'</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">route</span> <span class="pl-c1">=</span> <span class="pl-s1">match</span><span class="pl-kos">(</span><span class="pl-s">'/catch/:all'</span><span class="pl-kos">)</span>
<span class="pl-c">// init normal http server</span>
<span class="pl-en">createServer</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</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-kos">{</span> query<span class="pl-kos">,</span> pathname <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">parse</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">url</span><span class="pl-kos">,</span> <span class="pl-c1">true</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">params</span> <span class="pl-c1">=</span> <span class="pl-s1">match</span><span class="pl-kos">(</span><span class="pl-s1">pathname</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">false</span> <span class="pl-c1">===</span> <span class="pl-s1">params</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// handle it with default next behavior</span>
<span class="pl-s1">handle</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>
<span class="pl-c">// renders `pages/my/page.js`</span>
<span class="pl-s1">render</span><span class="pl-kos">(</span><span class="pl-s1">app</span><span class="pl-kos">,</span> <span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">,</span> <span class="pl-s">'my/page'</span><span class="pl-kos">,</span> <span class="pl-s1">query</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">listen</span><span class="pl-kos">(</span><span class="pl-c1">3000</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">The idea here is that we retain the smallest possible API surface, minimize the number of dependencies you have to install and code to evaluate.</p>
<p dir="auto">Fancy routing approaches vary widely, and we don't want to lock you in to a particular one. It should be entirely possible to implement <code class="notranslate">express</code> instead of <code class="notranslate">http.createServer</code>, for example.</p> | 0 |
<p dir="auto">Challenge <a href="http://beta.freecodecamp.com/challenges/waypoint-target-the-same-element-with-multiple-jquery-selectors" rel="nofollow">http://beta.freecodecamp.com/challenges/waypoint-target-the-same-element-with-multiple-jquery-selectors</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">In the description "button-primary" should be replaced with "btn-primary".</p>
<blockquote>Use the addClass() jQuery function to give the element one new class for each selector: "animated", "shake", and "button-primary".</blockquote>
<p dir="auto">The first three validation also have some text issues (see screenshot):</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/13466453/9085201/0d8ea45e-3b7b-11e5-9bb7-0f1b1743211c.PNG"><img width="1280" alt="screen shot 2015-08-05 at 14 04 28" src="https://cloud.githubusercontent.com/assets/13466453/9085201/0d8ea45e-3b7b-11e5-9bb7-0f1b1743211c.PNG" style="max-width: 100%;"></a></p> | <p dir="auto">Challenge <a href="http://beta.freecodecamp.com/challenges/waypoint-target-the-same-element-with-multiple-jquery-selectors" rel="nofollow">http://beta.freecodecamp.com/challenges/waypoint-target-the-same-element-with-multiple-jquery-selectors</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">instructions say to add class 'button-primary' but tests against 'btn-primary'</p> | 1 |
<p dir="auto"><strong>Migrated issue, originally created by Adrian (<a href="https://github.com/thiefmaster">@thiefmaster</a>)</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import *
Base = declarative_base()
class Item(Base):
__tablename__ = 'items'
id = Column(Integer, primary_key=True)
creator_id = Column(
Integer,
ForeignKey('users.id'),
index=True,
nullable=True
)
creator = relationship(
'User',
lazy=True,
backref=backref(
'created_items',
lazy=True
)
)
acl_entries = relationship(
'ACL',
lazy=True,
backref=backref(
'item',
lazy=True
)
)
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
extra_id = Column(
Integer,
ForeignKey('extra.id'),
index=True,
nullable=False
)
extra = relationship(
'Extra',
lazy=True,
backref=backref(
'user',
lazy=True,
uselist=False
)
)
class Extra(Base):
__tablename__ = 'extra'
id = Column(Integer, primary_key=True)
class ACL(Base):
__tablename__ = 'acl_entries'
id = Column(Integer, primary_key=True)
item_id = Column(
Integer,
ForeignKey('items.id'),
index=True,
nullable=True
)
user_id = Column(
Integer,
ForeignKey('users.id'),
index=True,
nullable=True
)
user = relationship(
'User',
lazy=True,
backref=backref(
'acl_entries',
lazy=True
)
)
e = create_engine('sqlite:///:memory:', echo=True)
# e = create_engine('postgresql:///test', echo=True)
Base.metadata.create_all(e)
s = Session(e)
item = Item()
user = User(extra=Extra())
item.creator = user
item.acl_entries = [ACL(user=user)]
s.add(item)
s.flush()
s.expire_all()
print
query = (s.query(Item)
.options(joinedload('acl_entries').joinedload('user').noload('extra'),
joinedload('creator').joinedload('extra')))
for item in query:
print 'Item', item
print 'Item.creator', item.creator
print 'Item.creator.extra', item.creator.extra
print 'Item.acl_entries'
for ae in item.acl_entries:
print ae, ae.user, ae.user.extra
"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-c1">*</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">ext</span>.<span class="pl-s1">declarative</span> <span class="pl-k">import</span> <span class="pl-s1">declarative_base</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">orm</span> <span class="pl-k">import</span> <span class="pl-c1">*</span>
<span class="pl-v">Base</span> <span class="pl-c1">=</span> <span class="pl-en">declarative_base</span>()
<span class="pl-k">class</span> <span class="pl-v">Item</span>(<span class="pl-v">Base</span>):
<span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">'items'</span>
<span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">creator_id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(
<span class="pl-v">Integer</span>,
<span class="pl-v">ForeignKey</span>(<span class="pl-s">'users.id'</span>),
<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">True</span>
)
<span class="pl-s1">creator</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(
<span class="pl-s">'User'</span>,
<span class="pl-s1">lazy</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">backref</span><span class="pl-c1">=</span><span class="pl-en">backref</span>(
<span class="pl-s">'created_items'</span>,
<span class="pl-s1">lazy</span><span class="pl-c1">=</span><span class="pl-c1">True</span>
)
)
<span class="pl-s1">acl_entries</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(
<span class="pl-s">'ACL'</span>,
<span class="pl-s1">lazy</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">backref</span><span class="pl-c1">=</span><span class="pl-en">backref</span>(
<span class="pl-s">'item'</span>,
<span class="pl-s1">lazy</span><span class="pl-c1">=</span><span class="pl-c1">True</span>
)
)
<span class="pl-k">class</span> <span class="pl-v">User</span>(<span class="pl-v">Base</span>):
<span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">'users'</span>
<span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">extra_id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(
<span class="pl-v">Integer</span>,
<span class="pl-v">ForeignKey</span>(<span class="pl-s">'extra.id'</span>),
<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">False</span>
)
<span class="pl-s1">extra</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(
<span class="pl-s">'Extra'</span>,
<span class="pl-s1">lazy</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">backref</span><span class="pl-c1">=</span><span class="pl-en">backref</span>(
<span class="pl-s">'user'</span>,
<span class="pl-s1">lazy</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">uselist</span><span class="pl-c1">=</span><span class="pl-c1">False</span>
)
)
<span class="pl-k">class</span> <span class="pl-v">Extra</span>(<span class="pl-v">Base</span>):
<span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">'extra'</span>
<span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-k">class</span> <span class="pl-v">ACL</span>(<span class="pl-v">Base</span>):
<span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">'acl_entries'</span>
<span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">item_id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(
<span class="pl-v">Integer</span>,
<span class="pl-v">ForeignKey</span>(<span class="pl-s">'items.id'</span>),
<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">True</span>
)
<span class="pl-s1">user_id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(
<span class="pl-v">Integer</span>,
<span class="pl-v">ForeignKey</span>(<span class="pl-s">'users.id'</span>),
<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">True</span>
)
<span class="pl-s1">user</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(
<span class="pl-s">'User'</span>,
<span class="pl-s1">lazy</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">backref</span><span class="pl-c1">=</span><span class="pl-en">backref</span>(
<span class="pl-s">'acl_entries'</span>,
<span class="pl-s1">lazy</span><span class="pl-c1">=</span><span class="pl-c1">True</span>
)
)
<span class="pl-s1">e</span> <span class="pl-c1">=</span> <span class="pl-en">create_engine</span>(<span class="pl-s">'sqlite:///:memory:'</span>, <span class="pl-s1">echo</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-c"># e = create_engine('postgresql:///test', echo=True)</span>
<span class="pl-v">Base</span>.<span class="pl-s1">metadata</span>.<span class="pl-en">create_all</span>(<span class="pl-s1">e</span>)
<span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-v">Session</span>(<span class="pl-s1">e</span>)
<span class="pl-s1">item</span> <span class="pl-c1">=</span> <span class="pl-v">Item</span>()
<span class="pl-s1">user</span> <span class="pl-c1">=</span> <span class="pl-v">User</span>(<span class="pl-s1">extra</span><span class="pl-c1">=</span><span class="pl-v">Extra</span>())
<span class="pl-s1">item</span>.<span class="pl-s1">creator</span> <span class="pl-c1">=</span> <span class="pl-s1">user</span>
<span class="pl-s1">item</span>.<span class="pl-s1">acl_entries</span> <span class="pl-c1">=</span> [<span class="pl-v">ACL</span>(<span class="pl-s1">user</span><span class="pl-c1">=</span><span class="pl-s1">user</span>)]
<span class="pl-s1">s</span>.<span class="pl-en">add</span>(<span class="pl-s1">item</span>)
<span class="pl-s1">s</span>.<span class="pl-en">flush</span>()
<span class="pl-s1">s</span>.<span class="pl-en">expire_all</span>()
<span class="pl-s1">print</span>
<span class="pl-s1">query</span> <span class="pl-c1">=</span> (<span class="pl-s1">s</span>.<span class="pl-en">query</span>(<span class="pl-v">Item</span>)
.<span class="pl-en">options</span>(<span class="pl-en">joinedload</span>(<span class="pl-s">'acl_entries'</span>).<span class="pl-en">joinedload</span>(<span class="pl-s">'user'</span>).<span class="pl-en">noload</span>(<span class="pl-s">'extra'</span>),
<span class="pl-en">joinedload</span>(<span class="pl-s">'creator'</span>).<span class="pl-en">joinedload</span>(<span class="pl-s">'extra'</span>)))
<span class="pl-k">for</span> <span class="pl-s1">item</span> <span class="pl-c1">in</span> <span class="pl-s1">query</span>:
<span class="pl-k">print</span> <span class="pl-s">'Item'</span>, <span class="pl-s1">item</span>
<span class="pl-k">print</span> <span class="pl-s">'Item.creator'</span>, <span class="pl-s1">item</span>.<span class="pl-s1">creator</span>
<span class="pl-k">print</span> <span class="pl-s">'Item.creator.extra'</span>, <span class="pl-s1">item</span>.<span class="pl-s1">creator</span>.<span class="pl-s1">extra</span>
<span class="pl-k">print</span> <span class="pl-s">'Item.acl_entries'</span>
<span class="pl-k">for</span> <span class="pl-s1">ae</span> <span class="pl-c1">in</span> <span class="pl-s1">item</span>.<span class="pl-s1">acl_entries</span>:
<span class="pl-k">print</span> <span class="pl-s1">ae</span>, <span class="pl-s1">ae</span>.<span class="pl-s1">user</span>, <span class="pl-s1">ae</span>.<span class="pl-s1">user</span>.<span class="pl-s1">extra</span></pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Item <__main__.Item object at 0x7f2df31d5450>
Item.creator <__main__.User object at 0x7f2df31f9050>
Item.creator.extra None
Item.acl_entries
<__main__.ACL object at 0x7f2df316ecd0> <__main__.User object at 0x7f2df31f9050> None"><pre class="notranslate"><code class="notranslate">Item <__main__.Item object at 0x7f2df31d5450>
Item.creator <__main__.User object at 0x7f2df31f9050>
Item.creator.extra None
Item.acl_entries
<__main__.ACL object at 0x7f2df316ecd0> <__main__.User object at 0x7f2df31f9050> None
</code></pre></div>
<p dir="auto">I would expect <code class="notranslate">Item.creator.extra</code> to be available. This example is based on a real application where I don't care about certain User relationships when loading the ACL for an object (so i <code class="notranslate">noload</code> them), but at the same time I do need the data from the relationship for the "creator" of the object (which is a relationship between Item and User).</p>
<p dir="auto">The data is actually queried, but apparently discarded somewhere within SQLAlchemy:</p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="SELECT items.id AS items_id,
items.creator_id AS items_creator_id,
extra_1.id AS extra_1_id,
users_1.id AS users_1_id,
users_1.extra_id AS users_1_extra_id,
users_2.id AS users_2_id,
users_2.extra_id AS users_2_extra_id,
acl_entries_1.id AS acl_entries_1_id,
acl_entries_1.item_id AS acl_entries_1_item_id,
acl_entries_1.user_id AS acl_entries_1_user_id
FROM items
LEFT OUTER JOIN users AS users_1 ON users_1.id = items.creator_id
LEFT OUTER JOIN extra AS extra_1 ON extra_1.id = users_1.extra_id
LEFT OUTER JOIN acl_entries AS acl_entries_1 ON items.id = acl_entries_1.item_id
LEFT OUTER JOIN users AS users_2 ON users_2.id = acl_entries_1.user_id"><pre class="notranslate"><span class="pl-k">SELECT</span> <span class="pl-c1">items</span>.<span class="pl-c1">id</span> <span class="pl-k">AS</span> items_id,
<span class="pl-c1">items</span>.<span class="pl-c1">creator_id</span> <span class="pl-k">AS</span> items_creator_id,
<span class="pl-c1">extra_1</span>.<span class="pl-c1">id</span> <span class="pl-k">AS</span> extra_1_id,
<span class="pl-c1">users_1</span>.<span class="pl-c1">id</span> <span class="pl-k">AS</span> users_1_id,
<span class="pl-c1">users_1</span>.<span class="pl-c1">extra_id</span> <span class="pl-k">AS</span> users_1_extra_id,
<span class="pl-c1">users_2</span>.<span class="pl-c1">id</span> <span class="pl-k">AS</span> users_2_id,
<span class="pl-c1">users_2</span>.<span class="pl-c1">extra_id</span> <span class="pl-k">AS</span> users_2_extra_id,
<span class="pl-c1">acl_entries_1</span>.<span class="pl-c1">id</span> <span class="pl-k">AS</span> acl_entries_1_id,
<span class="pl-c1">acl_entries_1</span>.<span class="pl-c1">item_id</span> <span class="pl-k">AS</span> acl_entries_1_item_id,
<span class="pl-c1">acl_entries_1</span>.<span class="pl-c1">user_id</span> <span class="pl-k">AS</span> acl_entries_1_user_id
<span class="pl-k">FROM</span> items
<span class="pl-k">LEFT OUTER JOIN</span> users <span class="pl-k">AS</span> users_1 <span class="pl-k">ON</span> <span class="pl-c1">users_1</span>.<span class="pl-c1">id</span> <span class="pl-k">=</span> <span class="pl-c1">items</span>.<span class="pl-c1">creator_id</span>
<span class="pl-k">LEFT OUTER JOIN</span> extra <span class="pl-k">AS</span> extra_1 <span class="pl-k">ON</span> <span class="pl-c1">extra_1</span>.<span class="pl-c1">id</span> <span class="pl-k">=</span> <span class="pl-c1">users_1</span>.<span class="pl-c1">extra_id</span>
<span class="pl-k">LEFT OUTER JOIN</span> acl_entries <span class="pl-k">AS</span> acl_entries_1 <span class="pl-k">ON</span> <span class="pl-c1">items</span>.<span class="pl-c1">id</span> <span class="pl-k">=</span> <span class="pl-c1">acl_entries_1</span>.<span class="pl-c1">item_id</span>
<span class="pl-k">LEFT OUTER JOIN</span> users <span class="pl-k">AS</span> users_2 <span class="pl-k">ON</span> <span class="pl-c1">users_2</span>.<span class="pl-c1">id</span> <span class="pl-k">=</span> <span class="pl-c1">acl_entries_1</span>.<span class="pl-c1">user_id</span></pre></div> | <p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">test:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class A(Base):
__tablename__ = 'a'
id = Column(Integer, primary_key=True)
b_id = Column(ForeignKey('b.id'))
c_id = Column(ForeignKey('c.id'))
b = relationship("B")
c = relationship("C")
class B(Base):
__tablename__ = 'b'
id = Column(Integer, primary_key=True)
c_id = Column(ForeignKey('c.id'))
c = relationship("C")
class C(Base):
__tablename__ = 'c'
id = Column(Integer, primary_key=True)
d_id = Column(ForeignKey('d.id'))
d = relationship("D")
class D(Base):
__tablename__ = 'd'
id = Column(Integer, primary_key=True)
e = create_engine("sqlite://", echo=True)
Base.metadata.create_all(e)
s = Session(e)
c = C(d=D())
s.add(
A(b=B(c=c), c=c)
)
s.commit()
c_alias_1 = aliased(C)
c_alias_2 = aliased(C)
q = s.query(A)
q = q.join(A.b).join(c_alias_1, B.c).join(c_alias_1.d)
q = q.options(contains_eager(A.b).contains_eager(B.c, alias=c_alias_1).contains_eager(C.d))
q = q.join(c_alias_2, A.c)
q = q.options(contains_eager(A.c, alias=c_alias_2))
a1 = q.all()[0]
assert 'd' in a1.c.__dict__
"><pre class="notranslate"><code class="notranslate">from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class A(Base):
__tablename__ = 'a'
id = Column(Integer, primary_key=True)
b_id = Column(ForeignKey('b.id'))
c_id = Column(ForeignKey('c.id'))
b = relationship("B")
c = relationship("C")
class B(Base):
__tablename__ = 'b'
id = Column(Integer, primary_key=True)
c_id = Column(ForeignKey('c.id'))
c = relationship("C")
class C(Base):
__tablename__ = 'c'
id = Column(Integer, primary_key=True)
d_id = Column(ForeignKey('d.id'))
d = relationship("D")
class D(Base):
__tablename__ = 'd'
id = Column(Integer, primary_key=True)
e = create_engine("sqlite://", echo=True)
Base.metadata.create_all(e)
s = Session(e)
c = C(d=D())
s.add(
A(b=B(c=c), c=c)
)
s.commit()
c_alias_1 = aliased(C)
c_alias_2 = aliased(C)
q = s.query(A)
q = q.join(A.b).join(c_alias_1, B.c).join(c_alias_1.d)
q = q.options(contains_eager(A.b).contains_eager(B.c, alias=c_alias_1).contains_eager(C.d))
q = q.join(c_alias_2, A.c)
q = q.options(contains_eager(A.c, alias=c_alias_2))
a1 = q.all()[0]
assert 'd' in a1.c.__dict__
</code></pre></div>
<p dir="auto">this test relies on the order in which we load attributes, and for some reason PYTHONHASHSEED isn't doing the job in all cases, so test with this patch:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="diff --git a/lib/sqlalchemy/orm/loading.py b/lib/sqlalchemy/orm/loading.py
index 50afaf6..8de66de 100644
--- a/lib/sqlalchemy/orm/loading.py
+++ b/lib/sqlalchemy/orm/loading.py
@@ -295,6 +295,13 @@ def _instance_processor(
quick_populators = path.get(
context.attributes, "memoized_setups", _none_set)
+ import random
+ props = list(props)
+ random.shuffle(props)
+
+ print(
+ "PROPS!!!!",[p.key for p in props]
+ )
for prop in props:
if prop in quick_populators:"><pre class="notranslate"><code class="notranslate">diff --git a/lib/sqlalchemy/orm/loading.py b/lib/sqlalchemy/orm/loading.py
index 50afaf6..8de66de 100644
--- a/lib/sqlalchemy/orm/loading.py
+++ b/lib/sqlalchemy/orm/loading.py
@@ -295,6 +295,13 @@ def _instance_processor(
quick_populators = path.get(
context.attributes, "memoized_setups", _none_set)
+ import random
+ props = list(props)
+ random.shuffle(props)
+
+ print(
+ "PROPS!!!!",[p.key for p in props]
+ )
for prop in props:
if prop in quick_populators:
</code></pre></div>
<p dir="auto">there's no way to force this loader to happen in all cases because ultimately when the C object is already there, the "isnew" flag is not set and we naturally hit the "existing" loader. However, the "existing" loader <em>can</em> do a check here and populate the key, and we are checking anyway:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py
index 78e9293..dff51b9 100644
--- a/lib/sqlalchemy/orm/strategies.py
+++ b/lib/sqlalchemy/orm/strategies.py
@@ -1559,13 +1559,15 @@ class JoinedLoader(AbstractRelationshipLoader):
# call _instance on the row, even though the object has
# been created, so that we further descend into properties
existing = _instance(row)
- if existing is not None \
- and key in dict_ \
- and existing is not dict_[key]:
- util.warn(
- "Multiple rows returned with "
- "uselist=False for eagerly-loaded attribute '%s' "
- % self)
+ if existing is not None:
+ if key in dict_:
+ if existing is not dict_[key]:
+ util.warn(
+ "Multiple rows returned with "
+ "uselist=False for eagerly-loaded attribute '%s' "
+ % self)
+ else:
+ dict_[key] = existing
def load_scalar_from_joined_exec(state, dict_, row):
_instance(row)
# this is an inlined path just for column-based attributes."><pre class="notranslate"><code class="notranslate">diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py
index 78e9293..dff51b9 100644
--- a/lib/sqlalchemy/orm/strategies.py
+++ b/lib/sqlalchemy/orm/strategies.py
@@ -1559,13 +1559,15 @@ class JoinedLoader(AbstractRelationshipLoader):
# call _instance on the row, even though the object has
# been created, so that we further descend into properties
existing = _instance(row)
- if existing is not None \
- and key in dict_ \
- and existing is not dict_[key]:
- util.warn(
- "Multiple rows returned with "
- "uselist=False for eagerly-loaded attribute '%s' "
- % self)
+ if existing is not None:
+ if key in dict_:
+ if existing is not dict_[key]:
+ util.warn(
+ "Multiple rows returned with "
+ "uselist=False for eagerly-loaded attribute '%s' "
+ % self)
+ else:
+ dict_[key] = existing
def load_scalar_from_joined_exec(state, dict_, row):
_instance(row)
# this is an inlined path just for column-based attributes.
</code></pre></div>
<p dir="auto">would need to do the deep thinking here to see if this is right.</p> | 1 |
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/juju4/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/juju4">@juju4</a> on November 11, 2016 23:34</em></p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">hostname module</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# ansible --version
ansible 2.2.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate"># ansible --version
ansible 2.2.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">local run on ubuntu xenial (inside lxc containers with kitchen-test+kitchen-ansible)</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">hostname module fails to set with above error</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- debug: var=hostname_hostname
- name: set hostname
hostname: "name={{ hostname_hostname }}""><pre class="notranslate"><code class="notranslate">- debug: var=hostname_hostname
- name: set hostname
hostname: "name={{ hostname_hostname }}"
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">set hostname without error.<br>
was working with ansible 2.1</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">task is failing</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [hostname : debug] ********************************************************
task path: /tmp/kitchen/hostname/tasks/main.yml:3
ok: [localhost] => {
"hostname_hostname": "example"
}
TASK [hostname : set hostname] *************************************************
task path: /tmp/kitchen/hostname/tasks/main.yml:4
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/core/system/hostname.py
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250 `" && echo ansible-tmp-1478906878.17-90221180289250="` echo $HOME/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250 `" ) && sleep 0'
<localhost> PUT /tmp/tmpDdbhyS TO /root/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250/hostname.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250/ /root/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250/hostname.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250/hostname.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250/" > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"name": "example"
},
"module_name": "hostname"
},
"msg": "Command failed rc=1, out=, err=Could not set property: Failed to activate service 'org.freedesktop.hostname1': timed out\n"
}
to retry, use: --limit @/tmp/kitchen/default.retry
PLAY RECAP *********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1 "><pre class="notranslate"><code class="notranslate">TASK [hostname : debug] ********************************************************
task path: /tmp/kitchen/hostname/tasks/main.yml:3
ok: [localhost] => {
"hostname_hostname": "example"
}
TASK [hostname : set hostname] *************************************************
task path: /tmp/kitchen/hostname/tasks/main.yml:4
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/core/system/hostname.py
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250 `" && echo ansible-tmp-1478906878.17-90221180289250="` echo $HOME/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250 `" ) && sleep 0'
<localhost> PUT /tmp/tmpDdbhyS TO /root/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250/hostname.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250/ /root/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250/hostname.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250/hostname.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1478906878.17-90221180289250/" > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"name": "example"
},
"module_name": "hostname"
},
"msg": "Command failed rc=1, out=, err=Could not set property: Failed to activate service 'org.freedesktop.hostname1': timed out\n"
}
to retry, use: --limit @/tmp/kitchen/default.retry
PLAY RECAP *********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1
</code></pre></div>
<p dir="auto">trying</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="systemctl restart systemd-logind"><pre class="notranslate"><code class="notranslate">systemctl restart systemd-logind
</code></pre></div>
<p dir="auto">and restarting playbook doesn't help</p>
<p dir="auto">using hostname command directly is working.</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="188873668" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/5582" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/5582/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/5582">ansible/ansible-modules-core#5582</a></em></p> | <p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/xrow/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/xrow">@xrow</a> on October 22, 2015 8:12</em></p>
<p dir="auto">Hi,</p>
<p dir="auto">I prepared a usecase that will fail with ansible <a href="https://github.com/xrow/docker.ansible.bug1">https://github.com/xrow/docker.ansible.bug1</a>. The output will be like this.</p>
<p dir="auto">I believe the reason why hostnamectl doesn't exists is that the systemd package was replaced by systemd-container. Maybe the solution would be to skip that task if the binary doesn't exist.</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">hostname</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">any</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-bash-4.2# docker build -f Dockerfile -t bash .
Sending build context to Docker daemon 7.68 kB
Sending build context to Docker daemon
Step 0 : FROM centos:7
---> ce20c473cd8a
Step 1 : MAINTAINER "Björn Dieding" <[email protected]>
---> Using cache
---> d3eec8a3bf48
Step 2 : VOLUME /run /tmp /sys/fs/cgroup
---> Using cache
---> bb410b68dadb
Step 3 : ADD RPM-GPG-KEY-EPEL-7 /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
---> Using cache
---> ac7e3e116967
Step 4 : ADD epel.repo /etc/yum.repos.d/epel.repo
---> Using cache
---> de7ff6cb9763
Step 5 : RUN yum install -y ansible
---> Using cache
---> 32686ff89319
Step 6 : RUN yum -y install python-pip redis
---> Using cache
---> 4bbd888b3814
Step 7 : RUN pip install redis
---> Using cache
---> b1b1aad0c28e
Step 8 : ADD test.yml test.yml
---> Using cache
---> 76747563e5da
Step 9 : RUN echo "[ezcluster]" > /etc/ansible/hosts
---> Using cache
---> b5c1c7fa2430
Step 10 : RUN echo "localhost" >> /etc/ansible/hosts
---> Using cache
---> a0916c3c8ee2
Step 11 : RUN ansible-playbook -c local test.yml -vvvv
---> Running in 338a9e2b6ec4
PLAY [ezcluster] **************************************************************
GATHERING FACTS ***************************************************************
<localhost> REMOTE_MODULE setup
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1445501553.12-214209363520399 && echo $HOME/.ansible/tmp/ansible-tmp-1445501553.12-214209363520399']
<localhost> PUT /tmp/tmpoBWhBT TO /root/.ansible/tmp/ansible-tmp-1445501553.12-214209363520399/setup
<localhost> EXEC ['/bin/sh', '-c', u'LANG=C LC_CTYPE=C /usr/bin/python /root/.ansible/tmp/ansible-tmp-1445501553.12-214209363520399/setup; rm -rf /root/.ansible/tmp/ansible-tmp-1445501553.12-214209363520399/ >/dev/null 2>&1']
ok: [localhost]
TASK: [hostname name=myhostname] **********************************************
<localhost> REMOTE_MODULE hostname name=myhostname
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1445501554.51-46884008533714 && echo $HOME/.ansible/tmp/ansible-tmp-1445501554.51-46884008533714']
<localhost> PUT /tmp/tmpNbuHLK TO /root/.ansible/tmp/ansible-tmp-1445501554.51-46884008533714/hostname
<localhost> EXEC ['/bin/sh', '-c', u'LANG=C LC_CTYPE=C /usr/bin/python /root/.ansible/tmp/ansible-tmp-1445501554.51-46884008533714/hostname; rm -rf /root/.ansible/tmp/ansible-tmp-1445501554.51-46884008533714/ >/dev/null 2>&1']
failed: [localhost] => {"cmd": "hostnamectl --transient set-hostname myhostname", "failed": true, "rc": 2}
msg: [Errno 2] No such file or directory
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/root/test.retry
localhost : ok=1 changed=0 unreachable=0 failed=1
The command '/bin/sh -c ansible-playbook -c local test.yml -vvvv' returned a non-zero code: 2"><pre class="notranslate"><code class="notranslate">-bash-4.2# docker build -f Dockerfile -t bash .
Sending build context to Docker daemon 7.68 kB
Sending build context to Docker daemon
Step 0 : FROM centos:7
---> ce20c473cd8a
Step 1 : MAINTAINER "Björn Dieding" <[email protected]>
---> Using cache
---> d3eec8a3bf48
Step 2 : VOLUME /run /tmp /sys/fs/cgroup
---> Using cache
---> bb410b68dadb
Step 3 : ADD RPM-GPG-KEY-EPEL-7 /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
---> Using cache
---> ac7e3e116967
Step 4 : ADD epel.repo /etc/yum.repos.d/epel.repo
---> Using cache
---> de7ff6cb9763
Step 5 : RUN yum install -y ansible
---> Using cache
---> 32686ff89319
Step 6 : RUN yum -y install python-pip redis
---> Using cache
---> 4bbd888b3814
Step 7 : RUN pip install redis
---> Using cache
---> b1b1aad0c28e
Step 8 : ADD test.yml test.yml
---> Using cache
---> 76747563e5da
Step 9 : RUN echo "[ezcluster]" > /etc/ansible/hosts
---> Using cache
---> b5c1c7fa2430
Step 10 : RUN echo "localhost" >> /etc/ansible/hosts
---> Using cache
---> a0916c3c8ee2
Step 11 : RUN ansible-playbook -c local test.yml -vvvv
---> Running in 338a9e2b6ec4
PLAY [ezcluster] **************************************************************
GATHERING FACTS ***************************************************************
<localhost> REMOTE_MODULE setup
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1445501553.12-214209363520399 && echo $HOME/.ansible/tmp/ansible-tmp-1445501553.12-214209363520399']
<localhost> PUT /tmp/tmpoBWhBT TO /root/.ansible/tmp/ansible-tmp-1445501553.12-214209363520399/setup
<localhost> EXEC ['/bin/sh', '-c', u'LANG=C LC_CTYPE=C /usr/bin/python /root/.ansible/tmp/ansible-tmp-1445501553.12-214209363520399/setup; rm -rf /root/.ansible/tmp/ansible-tmp-1445501553.12-214209363520399/ >/dev/null 2>&1']
ok: [localhost]
TASK: [hostname name=myhostname] **********************************************
<localhost> REMOTE_MODULE hostname name=myhostname
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1445501554.51-46884008533714 && echo $HOME/.ansible/tmp/ansible-tmp-1445501554.51-46884008533714']
<localhost> PUT /tmp/tmpNbuHLK TO /root/.ansible/tmp/ansible-tmp-1445501554.51-46884008533714/hostname
<localhost> EXEC ['/bin/sh', '-c', u'LANG=C LC_CTYPE=C /usr/bin/python /root/.ansible/tmp/ansible-tmp-1445501554.51-46884008533714/hostname; rm -rf /root/.ansible/tmp/ansible-tmp-1445501554.51-46884008533714/ >/dev/null 2>&1']
failed: [localhost] => {"cmd": "hostnamectl --transient set-hostname myhostname", "failed": true, "rc": 2}
msg: [Errno 2] No such file or directory
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/root/test.retry
localhost : ok=1 changed=0 unreachable=0 failed=1
The command '/bin/sh -c ansible-playbook -c local test.yml -vvvv' returned a non-zero code: 2
</code></pre></div>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="112751612" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/2331" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/2331/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/2331">ansible/ansible-modules-core#2331</a></em></p> | 1 |
<p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gce-serial/1446/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gce-serial/1446/</a></p>
<p dir="auto">Failed: [k8s.io] [HPA] Horizontal pod autoscaling (scale resource: CPU) [k8s.io] [Serial] [Slow] Deployment Should scale from 1 pod to 3 pods and from 3 to 5 and verify decision stability {Kubernetes e2e suite}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:50
Expected error:
<*errors.errorString | 0xc820c91020>: {
s: "Only 0 pods started out of 1",
}
Only 0 pods started out of 1
not to have occurred"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:50
Expected error:
<*errors.errorString | 0xc820c91020>: {
s: "Only 0 pods started out of 1",
}
Only 0 pods started out of 1
not to have occurred
</code></pre></div> | <p dir="auto">Jenkins build kubernetes-e2e-gke-subnet/2545/ failed:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Horizontal pod autoscaling (scale resource: CPU) [Serial] [Slow] Deployment Should scale from 1 pod to 3 pods and from 3 to 5 and verify decision stability
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:50 Mar 28 02:53:23.996: Number of replicas has changed: expected 3, got 4
Horizontal pod autoscaling (scale resource: CPU) [Serial] [Slow] ReplicaSet Should scale from 1 pod to 3 pods and from 3 to 5 and verify decision stability
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:61 Mar 28 03:28:13.740: Number of replicas has changed: expected 3, got 4"><pre class="notranslate"><code class="notranslate">Horizontal pod autoscaling (scale resource: CPU) [Serial] [Slow] Deployment Should scale from 1 pod to 3 pods and from 3 to 5 and verify decision stability
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:50 Mar 28 02:53:23.996: Number of replicas has changed: expected 3, got 4
Horizontal pod autoscaling (scale resource: CPU) [Serial] [Slow] ReplicaSet Should scale from 1 pod to 3 pods and from 3 to 5 and verify decision stability
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:61 Mar 28 03:28:13.740: Number of replicas has changed: expected 3, got 4
</code></pre></div>
<p dir="auto">Related logs can be accessed at: <a href="https://pantheon.corp.google.com/storage/browser/kubernetes-jenkins/logs/kubernetes-e2e-gke-subnet/2545/" rel="nofollow">https://pantheon.corp.google.com/storage/browser/kubernetes-jenkins/logs/kubernetes-e2e-gke-subnet/2545/</a></p> | 1 |
<p dir="auto">In <code class="notranslate">test_transformers</code> CCA's <code class="notranslate">fit_transform</code> fails for me on 32bit ubuntu. Anyone else?</p> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="nosetests sklearn --exe
.............................................................../usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/manifold/spectral_embedding.py:225: UserWarning: Graph is not fully connected, spectral embedding may not works as expected.
warnings.warn("Graph is not fully connected, spectral embedding"
...........SS....../usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/datasets/tests/test_base.py:124: UserWarning: Could not load sample images, PIL is not available.
warnings.warn("Could not load sample images, PIL is not available.")
.../usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/datasets/tests/test_base.py:145: UserWarning: Could not load sample images, PIL is not available.
warnings.warn("Could not load sample images, PIL is not available.")
./usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/datasets/tests/test_base.py:161: UserWarning: Could not load sample images, PIL is not available.
warnings.warn("Could not load sample images, PIL is not available.")
.....SS................................................S.........................................................S.........................................SSS....................../usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/externals/joblib/test/test_func_inspect.py:122: UserWarning: Cannot inspect object <functools.partial object at 0x6e36f18>, ignore list will not work.
nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F............................................................................SSS....S....S...................................................................................................................................
======================================================================
FAIL: sklearn.tests.test_common.test_regressors_train
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/nose-1.2.1-py2.7.egg/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/tests/test_common.py", line 655, in test_regressors_train
assert_true(succeeded)
AssertionError: False is not true
-------------------- >> begin captured stdout << ---------------------
CCA(copy=True, max_iter=500, n_components=2, scale=True, tol=1e-06)
singular matrix
--------------------- >> end captured stdout << ----------------------
----------------------------------------------------------------------
Ran 1598 tests in 81.829s
FAILED (SKIP=15, failures=1)"><pre class="notranslate"><code class="notranslate">nosetests sklearn --exe
.............................................................../usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/manifold/spectral_embedding.py:225: UserWarning: Graph is not fully connected, spectral embedding may not works as expected.
warnings.warn("Graph is not fully connected, spectral embedding"
...........SS....../usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/datasets/tests/test_base.py:124: UserWarning: Could not load sample images, PIL is not available.
warnings.warn("Could not load sample images, PIL is not available.")
.../usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/datasets/tests/test_base.py:145: UserWarning: Could not load sample images, PIL is not available.
warnings.warn("Could not load sample images, PIL is not available.")
./usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/datasets/tests/test_base.py:161: UserWarning: Could not load sample images, PIL is not available.
warnings.warn("Could not load sample images, PIL is not available.")
.....SS................................................S.........................................................S.........................................SSS....................../usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/externals/joblib/test/test_func_inspect.py:122: UserWarning: Cannot inspect object <functools.partial object at 0x6e36f18>, ignore list will not work.
nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F............................................................................SSS....S....S...................................................................................................................................
======================================================================
FAIL: sklearn.tests.test_common.test_regressors_train
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/nose-1.2.1-py2.7.egg/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/usr/local/lib/python2.7/site-packages/scikit_learn-0.13.1-py2.7-linux-x86_64.egg/sklearn/tests/test_common.py", line 655, in test_regressors_train
assert_true(succeeded)
AssertionError: False is not true
-------------------- >> begin captured stdout << ---------------------
CCA(copy=True, max_iter=500, n_components=2, scale=True, tol=1e-06)
singular matrix
--------------------- >> end captured stdout << ----------------------
----------------------------------------------------------------------
Ran 1598 tests in 81.829s
FAILED (SKIP=15, failures=1)
</code></pre></div>
<p dir="auto">Is the failures a big deal ? Can I use it anyway ? I want to use sklearn to do logistic regression . Thanks.</p> | 1 |
<p dir="auto">The typescript definition file for the Popover component is missing both the anchorPosition and anchorReference props added in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="271375200" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/9004" data-hovercard-type="pull_request" data-hovercard-url="/mui/material-ui/pull/9004/hovercard" href="https://github.com/mui/material-ui/pull/9004">#9004</a> . I believe (though I'm not familiar with Flow) the Flow types are there in the .js component file.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Popover in Typescript projects should be able to have anchorPosition and anchorReference set.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Typescript throws the following errors:</p>
<blockquote>
<p dir="auto">TS2339: Property 'anchorPosition' does not exist on type 'IntrinsicAttributes & PopoverProps & { children?: ReactNode; }'.<br>
TS2339: Property 'anchorReference' does not exist on type 'IntrinsicAttributes & PopoverProps & { children?: ReactNode; }'.</p>
</blockquote>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Add anchorPosition and anchorReference to Popover</li>
<li>Compile code with Typescript</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>1.0.0-beta.22</td>
</tr>
<tr>
<td>React</td>
<td>16.1.1</td>
</tr>
<tr>
<td>browser</td>
<td>N/A</td>
</tr>
<tr>
<td>typescript</td>
<td>2.6.1</td>
</tr>
</tbody>
</table> | <p dir="auto"><a href="https://material-ui-1dab0.firebaseapp.com/demos/selects/" rel="nofollow">https://material-ui-1dab0.firebaseapp.com/demos/selects/</a><br>
as this demo show, when I click a selected menu item and move out, the background not changed</p> | 0 |
<h3 dir="auto">STR</h3>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#[deriving(Clone)]
//~^ error: trait `Clone` already appears in the list of bounds [E0127]
struct Foo<'a, T: 'a + Clone> {
foo: &'a [T],
}
fn main() {}"><pre class="notranslate"><span class="pl-c1">#<span class="pl-kos">[</span>deriving<span class="pl-kos">(</span><span class="pl-v">Clone</span><span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-c">//~^ error: trait `Clone` already appears in the list of bounds [E0127]</span>
<span class="pl-k">struct</span> <span class="pl-smi">Foo</span><span class="pl-kos"><</span><span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-c1">'</span><span class="pl-ent">a</span> + <span class="pl-smi">Clone</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-c1">foo</span><span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-c1">'</span><span class="pl-ent">a</span> <span class="pl-kos">[</span><span class="pl-smi">T</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span>
<span class="pl-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>
<h3 dir="auto">Output</h3>
<p dir="auto">If you look at the <code class="notranslate">--pretty=expanded</code> version, you'll see <code class="notranslate">T</code> is bounded twice by the <code class="notranslate">Clone</code> trait</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(phase)]
#![no_std]
#![feature(globs)]
#[phase(plugin, link)]
extern crate "std" as std;
#[prelude_import]
use std::prelude::*;
//~^ error: trait `Clone` already appears in the list of bounds [E0127]
struct Foo<'a, T: 'a + Clone> {
foo: &'a [T],
}
#[automatically_derived]
impl <'a, T: ::std::clone::Clone + 'a + Clone> ::std::clone::Clone for
Foo<'a, T> {
#[inline]
fn clone(&self) -> Foo<'a, T> {
match *self {
Foo { foo: ref __self_0_0 } =>
Foo{foo: ::std::clone::Clone::clone(&(*__self_0_0)),},
}
}
}"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>phase<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-c1">#!<span class="pl-kos">[</span>no_std<span class="pl-kos">]</span></span>
<span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>globs<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-c1">#<span class="pl-kos">[</span>phase<span class="pl-kos">(</span>plugin, link<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">extern</span> <span class="pl-k">crate</span> <span class="pl-s">"std"</span> as std<span class="pl-kos">;</span>
<span class="pl-c1">#<span class="pl-kos">[</span>prelude_import<span class="pl-kos">]</span></span>
<span class="pl-k">use</span> std<span class="pl-kos">::</span>prelude<span class="pl-kos">::</span><span class="pl-c1">*</span><span class="pl-kos">;</span>
<span class="pl-c">//~^ error: trait `Clone` already appears in the list of bounds [E0127]</span>
<span class="pl-k">struct</span> <span class="pl-smi">Foo</span><span class="pl-kos"><</span><span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-c1">'</span><span class="pl-ent">a</span> + <span class="pl-smi">Clone</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-c1">foo</span><span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-c1">'</span><span class="pl-ent">a</span> <span class="pl-kos">[</span><span class="pl-smi">T</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span>
<span class="pl-c1">#<span class="pl-kos">[</span>automatically_derived<span class="pl-kos">]</span></span>
<span class="pl-k">impl</span> <span class="pl-kos"><</span><span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-kos">::</span>std<span class="pl-kos">::</span>clone<span class="pl-kos">::</span><span class="pl-smi">Clone</span> + <span class="pl-c1">'</span><span class="pl-ent">a</span> + <span class="pl-smi">Clone</span><span class="pl-kos">></span> <span class="pl-kos">::</span>std<span class="pl-kos">::</span>clone<span class="pl-kos">::</span><span class="pl-smi">Clone</span> <span class="pl-k">for</span>
<span class="pl-smi">Foo</span><span class="pl-kos"><</span><span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-c1">#<span class="pl-kos">[</span>inline<span class="pl-kos">]</span></span>
<span class="pl-k">fn</span> <span class="pl-en">clone</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -> <span class="pl-smi">Foo</span><span class="pl-kos"><</span><span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">match</span> <span class="pl-c1">*</span><span class="pl-smi">self</span> <span class="pl-kos">{</span>
<span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-c1">foo</span><span class="pl-kos">:</span> <span class="pl-k">ref</span> __self_0_0 <span class="pl-kos">}</span> =>
<span class="pl-smi">Foo</span><span class="pl-kos">{</span><span class="pl-c1">foo</span><span class="pl-kos">:</span> <span class="pl-kos">::</span>std<span class="pl-kos">::</span>clone<span class="pl-kos">::</span><span class="pl-smi">Clone</span><span class="pl-kos">::</span><span class="pl-en">clone</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-kos">(</span><span class="pl-c1">*</span>__self_0_0<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>
<h3 dir="auto">Version</h3>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="rustc 0.13.0-dev (82fc1aa87 2014-11-27 10:11:19 +0000)"><pre class="notranslate">rustc <span class="pl-c1">0.13</span><span class="pl-kos">.</span><span class="pl-c1">0</span>-<span class="pl-en">dev</span> <span class="pl-kos">(</span><span class="pl-c1">82</span>fc1aa87 <span class="pl-c1">2014</span>-<span class="pl-c1">11</span>-<span class="pl-c1">27</span> <span class="pl-c1">10</span><span class="pl-kos">:</span><span class="pl-c1">11</span><span class="pl-kos">:</span><span class="pl-c1">19</span> +<span class="pl-c1">0000</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">The obvious fix seems to make the <code class="notranslate">deriving</code> syntax extension filter out the duplicated <code class="notranslate">Clone</code> just by looking at the trait name. The problem is that <code class="notranslate">::std::clone::Clone</code> may not be the same trait as <code class="notranslate">Clone</code>, but AFAIK the syntax extension can't know that, since that (path) information is collected <em>after</em> macro expansion.</p>
<h3 dir="auto">Work-around</h3>
<p dir="auto">One workaround to this issue is using the fact that the <code class="notranslate">deriving</code> syntax extension doesn't look at <code class="notranslate">where</code> bounds (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="50292921" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/19358" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/19358/hovercard" href="https://github.com/rust-lang/rust/issues/19358">#19358</a>), the following code compiles:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#[deriving(Clone)]
struct Foo<'a, T: 'a> where T: Clone {
foo: &'a [T],
}
fn main() {}"><pre class="notranslate"><span class="pl-c1">#<span class="pl-kos">[</span>deriving<span class="pl-kos">(</span><span class="pl-v">Clone</span><span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">struct</span> <span class="pl-smi">Foo</span><span class="pl-kos"><</span><span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">></span> <span class="pl-k">where</span> <span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">Clone</span> <span class="pl-kos">{</span>
<span class="pl-c1">foo</span><span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-c1">'</span><span class="pl-ent">a</span> <span class="pl-kos">[</span><span class="pl-smi">T</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span>
<span class="pl-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">(Should this be an RFC?)</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">When refactoring, one may have dozens or hundreds of build errors which need to be fixed one by one. Sometimes, a build error is only a consequence of an earlier error rather than something that need to be fixed itself:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let foo = bar.method_that_was_renamed(); // First error
// ...
bar.other_method() // Second error because the type of `bar` is unknown"><pre class="notranslate"><span class="pl-k">let</span> foo = bar<span class="pl-kos">.</span><span class="pl-en">method_that_was_renamed</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// First error</span>
<span class="pl-c">// ...</span>
bar<span class="pl-kos">.</span><span class="pl-en">other_method</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c">// Second error because the type of `bar` is unknown</span><span class="pl-kos"></span></pre></div>
<p dir="auto">In such cases, it is a better strategy to start by looking at and fixing earlier errors (in the compiler output) first. The second error might just go away when the first is fixed.</p>
<p dir="auto">In a large enough crate, it’s easy to get well over one screenful of compiler output. So the workflow is something like:</p>
<ul dir="auto">
<li>Build. See lots of output be generated too fast to read.</li>
<li>Scroll back to the beginning of the output for this build. Don’t miss it! It looks a lot like the output of the previous build.</li>
<li>Find the first error.</li>
<li>Try to fix the first error.</li>
<li>Repeat.</li>
</ul>
<h2 dir="auto">Proposal</h2>
<p dir="auto">Add a command-line argument to rustc, called something like <code class="notranslate">--fatal</code>. When it is given and the compile finds a build error (the kind that would cause the compilation to fail eventually, so not warnings), exit immediately after printing diagnostics for this error. This is the opposite of the usual strategy of finding as many errors as possible at once.</p>
<p dir="auto">The new workflow is:</p>
<ul dir="auto">
<li>Build.</li>
<li>The first error is right there at the bottom of the terminal. A single error likely fits entirely on the screen.</li>
<li>Try to fix it.</li>
<li>Repeat.</li>
</ul>
<p dir="auto">(With some <a href="https://exyr.org/2011/inotify-run/" rel="nofollow">inotify-based tricks</a>, it’s not even necessary to switch focus from the terminal.)</p> | 0 |
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => OpenCV for Android 3.1</li>
<li>Operating System / Platform => Windows 7 or Windows 10</li>
<li>Compiler => using Android Studio as environment</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I'm not sure if this is a bug or simply not supported, but I'm trying to get the 2nd OpenCV Android sample:</p>
<p dir="auto"><a href="https://github.com/opencv/opencv/tree/master/samples/android/tutorial-2-mixedprocessing">https://github.com/opencv/opencv/tree/master/samples/android/tutorial-2-mixedprocessing</a></p>
<p dir="auto">working within Android Studio, rather than Eclipse which it seems to have been done in originally. I made a Stack Overflow post that explains where I'm stuck currently:</p>
<p dir="auto"><a href="http://stackoverflow.com/questions/38416566/android-studio-opencv-c-jni-ndk-unable-to-configure" rel="nofollow">http://stackoverflow.com/questions/38416566/android-studio-opencv-c-jni-ndk-unable-to-configure</a></p>
<p dir="auto">Is this something that is recommended or supported? Has anybody within the OpenCV organization gotten the native C++ Android samples running within Android Studio? Please advise</p> | <h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 4.5.1 release version</li>
<li>Operating System / Platform => Windows10 64 Bit</li>
<li>installed through exe; I didn't compiled<br>
--></li>
</ul>
<h5 dir="auto">Detailed description</h5>
<h5 dir="auto">Steps to reproduce</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// java code example
VideoCapture capture = new VideoCapture();
capture.open(0);
if (this.capture.isOpened())
{
System.out.println("get backend name: " + capture.getBackendName());
System.out.println("Camera Auto White Balance = " + capture.get(Videoio.CAP_PROP_AUTO_WB));
boolean b = capture.set(Videoio.CAP_PROP_AUTO_WB, 1);
if (b)
System.out.println("Successfully turn Auto White Balance ON");
else
System.out.println("Failed to turn Auto White Balance ON");
System.out.println("Camera Auto White Balance = " + capture.get(Videoio.CAP_PROP_AUTO_WB));
b = capture.set(Videoio.CAP_PROP_AUTO_WB, 0);
if (b)
System.out.println("Successfully turn Auto White Balance OFF");
else
System.out.println("Failed to turn Auto White Balance OFF");
System.out.println("Camera Auto White Balance = " + capture.get(Videoio.CAP_PROP_AUTO_WB));
}"><pre class="notranslate"><code class="notranslate">// java code example
VideoCapture capture = new VideoCapture();
capture.open(0);
if (this.capture.isOpened())
{
System.out.println("get backend name: " + capture.getBackendName());
System.out.println("Camera Auto White Balance = " + capture.get(Videoio.CAP_PROP_AUTO_WB));
boolean b = capture.set(Videoio.CAP_PROP_AUTO_WB, 1);
if (b)
System.out.println("Successfully turn Auto White Balance ON");
else
System.out.println("Failed to turn Auto White Balance ON");
System.out.println("Camera Auto White Balance = " + capture.get(Videoio.CAP_PROP_AUTO_WB));
b = capture.set(Videoio.CAP_PROP_AUTO_WB, 0);
if (b)
System.out.println("Successfully turn Auto White Balance OFF");
else
System.out.println("Failed to turn Auto White Balance OFF");
System.out.println("Camera Auto White Balance = " + capture.get(Videoio.CAP_PROP_AUTO_WB));
}
</code></pre></div>
<h5 dir="auto">Issue submission checklist</h5>
<p dir="auto">Output of above java code would be as below:</p>
<p dir="auto">get backend name: MSMF<br>
Camera Auto White Balance = -1.0<br>
Failed to turn Auto White Balance ON<br>
Camera Auto White Balance = -1.0<br>
Failed to turn Auto White Balance OFF<br>
Camera Auto White Balance = -1.0</p>
<ul dir="auto">
<li>
<p dir="auto">I posted the question at <a href="https://forum.opencv.org/t/class-videocapture-set-method-on-property-videoio-cap-auto-wb/1742/8" rel="nofollow">https://forum.opencv.org/t/class-videocapture-set-method-on-property-videoio-cap-auto-wb/1742/8</a></p>
</li>
<li>
<p dir="auto">With suggestion, I checked code on below two files<br>
opencv/cap_dshow.cpp at master · opencv/opencv · GitHub<br>
opencv/cap_msmf.cpp at master · opencv/opencv · GitHub<br>
And realized that neither cpp file implemented get/setProperty for CAP_PROP_AUTO_WB</p>
<ul dir="auto">
<li>OpenCV documentation: <a href="https://docs.opencv.org" rel="nofollow">https://docs.opencv.org</a> (<a href="https://docs.opencv.org/4.5.1/d4/d15/group__videoio__flags__base.html#ggaeb8dd9c89c10a5c63c139bf7c4f5704da762391cbaa101c4015e6a935aa0cfc95)-" rel="nofollow">https://docs.opencv.org/4.5.1/d4/d15/group__videoio__flags__base.html#ggaeb8dd9c89c10a5c63c139bf7c4f5704da762391cbaa101c4015e6a935aa0cfc95)-</a><br>
Videoio only stated that CAP_PROP_WHITE_BALANCE_BLUE_U - Currently unsupported.<br>
and stated that CAP_PROP_AUTO_WB - enable/ disable auto white-balance</li>
</ul>
</li>
</ul>
<p dir="auto">I searched below pages and didn't find much regarding to this issue.</p>
<ul dir="auto">
<li>FAQ page: <a href="https://github.com/opencv/opencv/wiki/FAQ">https://github.com/opencv/opencv/wiki/FAQ</a></li>
<li>OpenCV forum: <a href="https://forum.opencv.org" rel="nofollow">https://forum.opencv.org</a></li>
<li>OpenCV issue tracker: <a href="https://github.com/opencv/opencv/issues?q=is%3Aissue">https://github.com/opencv/opencv/issues?q=is%3Aissue</a></li>
<li>Stack Overflow branch: <a href="https://stackoverflow.com/questions/tagged/opencv" rel="nofollow">https://stackoverflow.com/questions/tagged/opencv</a></li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[heavy_check_mark ] I report the issue, it's not a question
[ heavy_check_mark ] I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found solution
[ heavy_check_mark ] I updated to latest OpenCV version and the issue is still there
[ heavy_check_mark ] There is reproducer code and related data files: videos, images, onnx, etc"><pre class="notranslate"><code class="notranslate">[heavy_check_mark ] I report the issue, it's not a question
[ heavy_check_mark ] I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found solution
[ heavy_check_mark ] I updated to latest OpenCV version and the issue is still there
[ heavy_check_mark ] There is reproducer code and related data files: videos, images, onnx, etc
</code></pre></div> | 0 |
<p dir="auto">I'm having problems when using child forms that have radio or expanded date (select) fields. This problem is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="842091" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/743" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/743/hovercard" href="https://github.com/symfony/symfony/pull/743">#743</a>.</p>
<p dir="auto">When using the last DelegatingValidator file (I'm using 2.0.1, just updated), the errors keep bubbling to the parent due to unmatching property (I commented about it in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1360385" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/1917" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/1917/hovercard" href="https://github.com/symfony/symfony/issues/1917">#1917</a>)</p>
<p dir="auto">If I switch that file for the one having this commit @90fa363 (submitted in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="842091" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/743" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/743/hovercard" href="https://github.com/symfony/symfony/pull/743">#743</a>), radio errors are rendered ok, being placed next to the field. However, the problem with the expanded date remains and the errors are bubbled up.</p> | <p dir="auto">When using expanded choice list (input[type=radio] tags), error is bubbling in top of the form and not next to the errornous field, when expanded is set to false (select tag), everything workds as expected...</p> | 1 |
<p dir="auto">I have moved my playwright config and tests folder to a sub-folder <code class="notranslate">web</code> in my repo. Upon doing this, running playwright fails:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="> playwright test --config=./web/playwright.config.ts
Using config at /Users/sarink/Projects/test-proj/web/playwright.config.ts
Error: web/tests/example.spec.ts:5:16: test() can only be called in a test file
at errorWithLocation (/Users/kabirsarin/sarink/Projects/basil/web/node_modules/@playwright/test/lib/util.js:161:10)
at TestTypeImpl._createTest (/Users/kabirsarin/sarink/Projects/basil/web/node_modules/@playwright/test/lib/testType.js:76:51)
at /Users/kabirsarin/sarink/Projects/basil/web/node_modules/@playwright/test/lib/transform.js:168:12
at Object.<anonymous> (/Users/kabirsarin/sarink/Projects/basil/web/tests/example.spec.ts:5:16)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Module._compile (/Users/kabirsarin/sarink/Projects/basil/node_modules/pirates/lib/index.js:136:24)
at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Object.newLoader (/Users/kabirsarin/sarink/Projects/basil/node_modules/pirates/lib/index.js:141:7)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Loader._requireOrImport (/Users/kabirsarin/sarink/Projects/basil/node_modules/@playwright/test/lib/loader.js:261:14)
at Loader.loadTestFile (/Users/kabirsarin/sarink/Projects/basil/node_modules/@playwright/test/lib/loader.js:142:18)
at Runner._run (/Users/kabirsarin/sarink/Projects/basil/node_modules/@playwright/test/lib/runner.js:272:84)"><pre class="notranslate"><code class="notranslate">> playwright test --config=./web/playwright.config.ts
Using config at /Users/sarink/Projects/test-proj/web/playwright.config.ts
Error: web/tests/example.spec.ts:5:16: test() can only be called in a test file
at errorWithLocation (/Users/kabirsarin/sarink/Projects/basil/web/node_modules/@playwright/test/lib/util.js:161:10)
at TestTypeImpl._createTest (/Users/kabirsarin/sarink/Projects/basil/web/node_modules/@playwright/test/lib/testType.js:76:51)
at /Users/kabirsarin/sarink/Projects/basil/web/node_modules/@playwright/test/lib/transform.js:168:12
at Object.<anonymous> (/Users/kabirsarin/sarink/Projects/basil/web/tests/example.spec.ts:5:16)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Module._compile (/Users/kabirsarin/sarink/Projects/basil/node_modules/pirates/lib/index.js:136:24)
at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Object.newLoader (/Users/kabirsarin/sarink/Projects/basil/node_modules/pirates/lib/index.js:141:7)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Loader._requireOrImport (/Users/kabirsarin/sarink/Projects/basil/node_modules/@playwright/test/lib/loader.js:261:14)
at Loader.loadTestFile (/Users/kabirsarin/sarink/Projects/basil/node_modules/@playwright/test/lib/loader.js:142:18)
at Runner._run (/Users/kabirsarin/sarink/Projects/basil/node_modules/@playwright/test/lib/runner.js:272:84)
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// web/playwright.config.ts
import { devices, PlaywrightTestConfig } from '@playwright/test';
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testDir: './tests',
/* Maximum time one test can run for. */
timeout: 30 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 5000,
},
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: process.env.CI ? 'github' : 'list',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:3000',
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
/* Project-specific settings. */
use: {
...devices['Desktop Chrome'],
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
},
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'],
},
},
/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: {
// ...devices['Pixel 5'],
// },
// },
// {
// name: 'Mobile Safari',
// use: {
// ...devices['iPhone 12'],
// },
// },
/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: {
// channel: 'msedge',
// },
// },
// {
// name: 'Google Chrome',
// use: {
// channel: 'chrome',
// },
// },
],
/* Folder for test artifacts such as screenshots, videos, traces, etc. */
// outputDir: 'test-results/',
/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// port: 3000,
// },
};
export default config;"><pre class="notranslate"><code class="notranslate">// web/playwright.config.ts
import { devices, PlaywrightTestConfig } from '@playwright/test';
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testDir: './tests',
/* Maximum time one test can run for. */
timeout: 30 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 5000,
},
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: process.env.CI ? 'github' : 'list',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:3000',
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
/* Project-specific settings. */
use: {
...devices['Desktop Chrome'],
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
},
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'],
},
},
/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: {
// ...devices['Pixel 5'],
// },
// },
// {
// name: 'Mobile Safari',
// use: {
// ...devices['iPhone 12'],
// },
// },
/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: {
// channel: 'msedge',
// },
// },
// {
// name: 'Google Chrome',
// use: {
// channel: 'chrome',
// },
// },
],
/* Folder for test artifacts such as screenshots, videos, traces, etc. */
// outputDir: 'test-results/',
/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// port: 3000,
// },
};
export default config;
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// web/tests/example.spec.ts
import { expect, test } from '@playwright/test';
test('basic test', async ({ page }) => {
await page.goto('https://playwright.dev/');
await page.locator('text=Get started').click();
await expect(page).toHaveTitle(/Getting started/);
});"><pre class="notranslate"><code class="notranslate">// web/tests/example.spec.ts
import { expect, test } from '@playwright/test';
test('basic test', async ({ page }) => {
await page.goto('https://playwright.dev/');
await page.locator('text=Get started').click();
await expect(page).toHaveTitle(/Getting started/);
});
</code></pre></div>
<p dir="auto">If I move the config and the tests folder back to the root, and drop the <code class="notranslate">--config</code> cli flag, everything works as expected.</p> | <p dir="auto">Currently if <code class="notranslate">soft assertion</code> fails inside of <code class="notranslate">test.step()</code> test step remains with passed checkmark icon near of it.</p>
<p dir="auto">It would be helpful if user could mark <code class="notranslate">test.step()</code> as failed programmatically, so it would be more clear in report that assertions inside of the step are failed.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/22345107/191755993-21f73050-ae0b-45f0-b3b8-4659572e51d1.png"><img src="https://user-images.githubusercontent.com/22345107/191755993-21f73050-ae0b-45f0-b3b8-4659572e51d1.png" alt="2022-09-22_16-10" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">I tried using the <code class="notranslate">@types/styled-components</code> package and had problems.</p>
<p dir="auto">How to correctly define a reference for styled-components?</p>
<p dir="auto">I wrote the following test code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import React, {Component, RefObject, ReactNode} from 'react';
import styled, {StyledComponentClass} from 'styled-components';
type TModalShadowContainer = StyledComponentClass<{}, any>;
const ModalShadowContainer: TModalShadowContainer = styled.div`
background-color: black;
`;
export default class Modal extends Component {
private readonly modalRef: RefObject<TModalShadowContainer>;
constructor(props: {}) {
super(props);
this.modalRef = React.createRef<TModalShadowContainer>();
}
public render(): ReactNode {
return (
<ModalShadowContainer ref={this.modalRef}>
{this.props.children}
</ModalShadowContainer>
);
}
}"><pre class="notranslate"><code class="notranslate">import React, {Component, RefObject, ReactNode} from 'react';
import styled, {StyledComponentClass} from 'styled-components';
type TModalShadowContainer = StyledComponentClass<{}, any>;
const ModalShadowContainer: TModalShadowContainer = styled.div`
background-color: black;
`;
export default class Modal extends Component {
private readonly modalRef: RefObject<TModalShadowContainer>;
constructor(props: {}) {
super(props);
this.modalRef = React.createRef<TModalShadowContainer>();
}
public render(): ReactNode {
return (
<ModalShadowContainer ref={this.modalRef}>
{this.props.children}
</ModalShadowContainer>
);
}
}
</code></pre></div>
<p dir="auto">The error appears on the line:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<ModalShadowContainer ref={this.modalRef}>"><pre class="notranslate"><code class="notranslate"><ModalShadowContainer ref={this.modalRef}>
</code></pre></div>
<p dir="auto">Error text:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Type 'RefObject<StyledComponentClass<{}, {}, {}>>' is not assignable to type 'string | ((instance: Component<{ as?: string | ComponentClass<any, any> | StatelessComponent<any> | undefined; theme?: {} | undefined; }, any, any> | null) => any) | RefObject<Component<{ ...; }, any, any>> | undefined'.
Type 'RefObject<StyledComponentClass<{}, {}, {}>>' is not assignable to type 'RefObject<Component<{ as?: string | ComponentClass<any, any> | StatelessComponent<any> | undefined; theme?: {} | undefined; }, any, any>>'.
Type 'StyledComponentClass<{}, {}, {}>' is not assignable to type 'Component<{ as?: string | ComponentClass<any, any> | StatelessComponent<any> | undefined; theme?: {} | undefined; }, any, any>'.
Property 'setState' is missing in type 'StyledComponentClass<{}, {}, {}>'."><pre class="notranslate"><code class="notranslate">Type 'RefObject<StyledComponentClass<{}, {}, {}>>' is not assignable to type 'string | ((instance: Component<{ as?: string | ComponentClass<any, any> | StatelessComponent<any> | undefined; theme?: {} | undefined; }, any, any> | null) => any) | RefObject<Component<{ ...; }, any, any>> | undefined'.
Type 'RefObject<StyledComponentClass<{}, {}, {}>>' is not assignable to type 'RefObject<Component<{ as?: string | ComponentClass<any, any> | StatelessComponent<any> | undefined; theme?: {} | undefined; }, any, any>>'.
Type 'StyledComponentClass<{}, {}, {}>' is not assignable to type 'Component<{ as?: string | ComponentClass<any, any> | StatelessComponent<any> | undefined; theme?: {} | undefined; }, any, any>'.
Property 'setState' is missing in type 'StyledComponentClass<{}, {}, {}>'.
</code></pre></div>
<p dir="auto">How to describe (define) a ref in TypeScript lang?</p>
<p dir="auto">Since everyone is trying to convince me not to do it, I have to refer to the original sources, namely:</p>
<p dir="auto"><a href="https://www.styled-components.com/docs/advanced#refs" rel="nofollow">https://www.styled-components.com/docs/advanced#refs</a><br>
<a href="https://reactjs.org/docs/refs-and-the-dom.html#creating-refs" rel="nofollow">https://reactjs.org/docs/refs-and-the-dom.html#creating-refs</a></p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/styled-components</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.
<ul dir="auto">
<li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Igorbek/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Igorbek">@Igorbek</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Igmat/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Igmat">@Igmat</a></li>
</ul>
</li>
</ul>
<hr>
<p dir="auto">Here is a simple repro. I can use forwarded ref on regular input, but not with styled one, it gives weird Typescript error, I am not sure what it means really.</p>
<p dir="auto"><a href="https://codesandbox.io/s/o5ompq26j6" rel="nofollow">https://codesandbox.io/s/o5ompq26j6</a></p>
<div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as React from 'react'
import styled from 'styled-components'
const StyledInput = styled.input`
background-color: yellow;
`
export const WithInput = React.forwardRef<HTMLInputElement>((props, ref) => (
<React.Fragment>
<input ref={ref} />
<StyledInput ref={ref} />
</React.Fragment>
))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-smi">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span>
<span class="pl-k">import</span> <span class="pl-s1">styled</span> <span class="pl-k">from</span> <span class="pl-s">'styled-components'</span>
<span class="pl-k">const</span> <span class="pl-smi">StyledInput</span> <span class="pl-c1">=</span> <span class="pl-s1">styled</span><span class="pl-kos">.</span><span class="pl-en">input</span><span class="pl-s">`</span>
<span class="pl-s"> background-color: yellow;</span>
<span class="pl-s">`</span>
<span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-smi">WithInput</span> <span class="pl-c1">=</span> <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-en">forwardRef</span><span class="pl-kos"><</span><span class="pl-smi">HTMLInputElement</span><span class="pl-kos">></span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">,</span> <span class="pl-s1">ref</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">(</span>
<span class="pl-c1"><</span><span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-smi">Fragment</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">input</span> <span class="pl-c1">ref</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">ref</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-smi">StyledInput</span> <span class="pl-c1">ref</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">ref</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-smi">Fragment</span><span class="pl-c1">></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="Type 'string | ((instance: HTMLInputElement | null) => any) | RefObject<HTMLInputElement> | undefined' is not assignable to type 'string | (string & ((instance: HTMLInputElement | null) => any)) | (string & RefObject<HTMLInputElement>) | (((instance: Component<ThemedOuterStyledProps<ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement> & { ...; }, any>, any, any> | null) => any) & string) | ... 5 more ... | undefined'.
Type '(instance: HTMLInputElement | null) => any' is not assignable to type 'string | (string & ((instance: HTMLInputElement | null) => any)) | (string & RefObject<HTMLInputElement>) | (((instance: Component<ThemedOuterStyledProps<ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement> & { ...; }, any>, any, any> | null) => any) & string) | ... 5 more ... | undefined'.
Type '(instance: HTMLInputElement | null) => any' is not assignable to type 'RefObject<Component<ThemedOuterStyledProps<ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement> & { invalid?: boolean | undefined; }, any>, any, any>> & RefObject<...>'.
Type '(instance: HTMLInputElement | null) => any' is not assignable to type 'RefObject<Component<ThemedOuterStyledProps<ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement> & { invalid?: boolean | undefined; }, any>, any, any>>'.
Property 'current' is missing in type '(instance: HTMLInputElement | null) => any'."><pre class="notranslate"><code class="notranslate">Type 'string | ((instance: HTMLInputElement | null) => any) | RefObject<HTMLInputElement> | undefined' is not assignable to type 'string | (string & ((instance: HTMLInputElement | null) => any)) | (string & RefObject<HTMLInputElement>) | (((instance: Component<ThemedOuterStyledProps<ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement> & { ...; }, any>, any, any> | null) => any) & string) | ... 5 more ... | undefined'.
Type '(instance: HTMLInputElement | null) => any' is not assignable to type 'string | (string & ((instance: HTMLInputElement | null) => any)) | (string & RefObject<HTMLInputElement>) | (((instance: Component<ThemedOuterStyledProps<ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement> & { ...; }, any>, any, any> | null) => any) & string) | ... 5 more ... | undefined'.
Type '(instance: HTMLInputElement | null) => any' is not assignable to type 'RefObject<Component<ThemedOuterStyledProps<ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement> & { invalid?: boolean | undefined; }, any>, any, any>> & RefObject<...>'.
Type '(instance: HTMLInputElement | null) => any' is not assignable to type 'RefObject<Component<ThemedOuterStyledProps<ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement> & { invalid?: boolean | undefined; }, any>, any, any>>'.
Property 'current' is missing in type '(instance: HTMLInputElement | null) => any'.
</code></pre></div> | 1 |
<p dir="auto">go version 1.5.3</p>
<p dir="auto">Suppose a directory Documents/ has sub-directories A/, B/, C/, and files a, b, c</p>
<p dir="auto">URL in address bar: <strong><a href="http://localhost/Documents/" rel="nofollow">http://localhost/Documents/</a></strong></p>
<p dir="auto">Everything is okay</p>
<p dir="auto">URL in address bar: <strong><a href="http://localhost/Documents" rel="nofollow">http://localhost/Documents</a></strong></p>
<p dir="auto">Sub-directory's href is "<strong><a href="http://localhost/A/" rel="nofollow">http://localhost/A/</a></strong>", NOT "<strong><a href="http://localhost/Documents/A/" rel="nofollow">http://localhost/Documents/A/</a></strong>".</p>
<p dir="auto">So do other sub-directories and files.</p>
<h2 dir="auto"></h2>
<p dir="auto"><a href="https://github.com/golang/go/blob/master/src/net/http/fs.go#L458-L461">https://github.com/golang/go/blob/master/src/net/http/fs.go#L458-L461</a></p>
<p dir="auto">Why is the <strong>redirect</strong> flag in <strong>serveFile(w, r, Dir(dir), file, false)</strong> set to be false?</p>
<p dir="auto">What's the difference between ServeFile and FileServer except that FileServer will add "/" for directories and remove "/" for files?</p>
<p dir="auto">As suggestion, I hope that ServeFile won't show directory structure. It only serves files.</p>
<h2 dir="auto">Edited</h2>
<p dir="auto">Code: <a href="http://130.211.241.67:3000/test.go" rel="nofollow">http://130.211.241.67:3000/test.go</a></p>
<p dir="auto">The following 2 URLs has the same html output. But as two URLs have different endings, broswer generates different links.<br>
<a href="http://130.211.241.67:3000/test" rel="nofollow">http://130.211.241.67:3000/test</a></p>
<p dir="auto"><a href="http://130.211.241.67:3000/test/" rel="nofollow">http://130.211.241.67:3000/test/</a></p>
<p dir="auto">Just click "testFile"</p>
<p dir="auto">The ServeFile function doesn't redirect directory URLs ends without "/" to right place.</p>
<p dir="auto">If ServeFile redirects, there are no difference between ServeFile and FileServer.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bradfitz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bradfitz">@bradfitz</a> tested</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="127206401" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/13996" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/13996/hovercard?comment_id=172754548&comment_type=issue_comment" href="https://github.com/golang/go/issues/13996#issuecomment-172754548">#13996 (comment)</a></p>
<p dir="auto">So I wonder how to modify it.</p>
<h2 dir="auto">Edited Jan 20, 2016, 13:40:00 UTC+8</h2>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bradfitz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bradfitz">@bradfitz</a> 's test</p>
<blockquote>
<p dir="auto">If I change ServeFile's false to true and re-run the net/http tests, there are failures</p>
</blockquote>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="127206401" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/13996" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/13996/hovercard?comment_id=172754548&comment_type=issue_comment" href="https://github.com/golang/go/issues/13996#issuecomment-172754548">#13996 (comment)</a></p> | <pre class="notranslate">Weak imports are currently not treated correctly. Most likely, ld does not have the
knowledge to handle weak imports, and simply ignores them.
Weak imports are important for cross-version API compatibility on OS X, allowing you to
check for the availability of APIs at runtime, without embedding a hard dependency on
that symbol into the binary.
See <a href="https://golang.org/issue/3131" rel="nofollow">https://golang.org/issue/3131</a> for a example of where this is an
issue.</pre> | 0 |
<p dir="auto">When using _document.js, a style tag will render <code class="notranslate">></code> as <code class="notranslate">&gt;</code>. This prevents selectors like <code class="notranslate">.foo > .bar { ... }</code> from working.</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">when defining a style tag in _document such as</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<style>{' body > div { background-color: red }'}</style>"><pre class="notranslate"><code class="notranslate"><style>{' body > div { background-color: red }'}</style>
</code></pre></div>
<p dir="auto">it should preserve the <code class="notranslate">></code></p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The <code class="notranslate">></code> gets encoded as <code class="notranslate">&gt;</code></p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Using the hello-world example in examples/ as a basis</p>
<ol dir="auto">
<li>add a _document.js in pages that looks like</li>
</ol>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Document, { Head, Main, NextScript } from 'next/document'
import flush from 'styled-jsx/server'
export default class MyDocument extends Document {
static getInitialProps({ renderPage }) {
const { html, head, errorHtml, chunks } = renderPage()
const styles = flush()
return { html, head, errorHtml, chunks, styles }
}
render() {
return (
<html>
<Head>
<style>{`body > div { background-color: red }`}</style>
</Head>
<body className="custom_class">
{this.props.customValue}
<Main />
<NextScript />
</body>
</html>
)
}
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">Document</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-v">Head</span><span class="pl-kos">,</span> <span class="pl-v">Main</span><span class="pl-kos">,</span> <span class="pl-v">NextScript</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'next/document'</span>
<span class="pl-k">import</span> <span class="pl-s1">flush</span> <span class="pl-k">from</span> <span class="pl-s">'styled-jsx/server'</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">MyDocument</span> <span class="pl-k">extends</span> <span class="pl-v">Document</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-en">getInitialProps</span><span class="pl-kos">(</span><span class="pl-kos">{</span> renderPage <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span> html<span class="pl-kos">,</span> head<span class="pl-kos">,</span> errorHtml<span class="pl-kos">,</span> chunks <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">renderPage</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">styles</span> <span class="pl-c1">=</span> <span class="pl-en">flush</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">return</span> <span class="pl-kos">{</span> html<span class="pl-kos">,</span> head<span class="pl-kos">,</span> errorHtml<span class="pl-kos">,</span> chunks<span class="pl-kos">,</span> styles <span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-kos">(</span>
<span class="pl-c1"><</span><span class="pl-ent">html</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">Head</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">style</span><span class="pl-c1">></span><span class="pl-kos">{</span><span class="pl-s">`body > div { background-color: red }`</span><span class="pl-kos">}</span><span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">style</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">Head</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">body</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-s">"custom_class"</span><span class="pl-c1">></span>
<span class="pl-kos">{</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">customValue</span><span class="pl-kos">}</span>
<span class="pl-c1"><</span><span class="pl-ent">Main</span> <span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">NextScript</span> <span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">body</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">html</span><span class="pl-c1">></span>
<span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<ol start="2" dir="auto">
<li><code class="notranslate">next build && npm start</code></li>
<li>view the page source in the browser, <code class="notranslate"><style>body &gt; div { background-color: red }</style></code> is rendered.</li>
</ol>
<h2 dir="auto">workaround</h2>
<p dir="auto">Using <code class="notranslate">dangerouslySetInnerHTML</code> fixes the issue</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<script dangerouslySetInnerHTML={{__html: 'body > div { background-color: red }' }} />"><pre class="notranslate"><code class="notranslate"><script dangerouslySetInnerHTML={{__html: 'body > div { background-color: red }' }} />
</code></pre></div>
<h2 dir="auto">Context</h2>
<p dir="auto">I am attempting to change the css of divs that are outside of what a normal nextjs page can access.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>4.2.1</td>
</tr>
<tr>
<td>node</td>
<td>6.9.4</td>
</tr>
<tr>
<td>OS</td>
<td>Ubuntu 16.04</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 63.0.3239.108 and Firefox 57.0.3</td>
</tr>
</tbody>
</table>
<h2 dir="auto">Note</h2>
<p dir="auto">When using styled-jsx inside a nextjs page, <code class="notranslate">></code> works as expected</p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 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">We should have documented as an example how to use the new <a href="https://github.com/zeit/next-plugins/tree/master/packages/next-less">next-less</a> plugin</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">We have a few examples to import <code class="notranslate">.less</code> files which are mostly hacks to make it work.</p>
<h2 dir="auto">Context</h2>
<p dir="auto">With the release of Next.js v5 the current examples of importing LESS are outdated and can be simplified with the new <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-css">next-css</a> plugin.</p> | 0 |
<p dir="auto">Same issue like in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="81365966" data-permission-text="Title is private" data-url="https://github.com/freeCodeCamp/freeCodeCamp/issues/625" data-hovercard-type="issue" data-hovercard-url="/freeCodeCamp/freeCodeCamp/issues/625/hovercard" href="https://github.com/freeCodeCamp/freeCodeCamp/issues/625">#625</a><br>
Same settings. Attached a screenshot to even better show you guy!</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/11710334/7833153/d749b11a-0464-11e5-9700-811f8962c397.png"><img src="https://cloud.githubusercontent.com/assets/11710334/7833153/d749b11a-0464-11e5-9700-811f8962c397.png" alt="waypoint_mobile_responsive_images_free_code_camp" style="max-width: 100%;"></a></p> | <p dir="auto">Windows 7 PRO SP1 64 bit<br>
Firefox 38.0.1</p>
<p dir="auto">When the page is loaded, only the following text shows up but not the whole text. When clicking on the text, all text shows.</p>
<p dir="auto">Showed text:</p>
<style>
.red-text {
color: red;
}
<p dir="auto">h2 {<br>
font-family: Lobster, Monospace;<br>
}</p>
<p dir="auto">p {</p>
<p dir="auto">--> Screenshot is from issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="81370396" data-permission-text="Title is private" data-url="https://github.com/freeCodeCamp/freeCodeCamp/issues/626" data-hovercard-type="issue" data-hovercard-url="/freeCodeCamp/freeCodeCamp/issues/626/hovercard" href="https://github.com/freeCodeCamp/freeCodeCamp/issues/626">#626</a> but it's the same issue so that shouldn't matter<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/11710334/7833162/e6d16e02-0464-11e5-92c2-e19288b13e8d.png"><img src="https://cloud.githubusercontent.com/assets/11710334/7833162/e6d16e02-0464-11e5-92c2-e19288b13e8d.png" alt="waypoint_mobile_responsive_images_free_code_camp" style="max-width: 100%;"></a></p> | 1 |
<h4 dir="auto">Challenge Name</h4>
<h4 dir="auto">Issue Description</h4>
<p dir="auto">When ever i click on the ide within all challenges for the first time it will show the blinking " | " however when i start to type for click tab ora nything it will move the the next line.</p>
<h4 dir="auto">Browser Information</h4>
<ul dir="auto">
<li>Browser Name, Version: Chrome</li>
<li>Operating System: Mac El Capitan v10.11.3</li>
<li>Mobile, Desktop, or Tablet: Mac Book Pro</li>
</ul>
<h4 dir="auto">Your Code</h4>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// If relevant, paste all of your challenge code in here
"><pre class="notranslate"><span class="pl-c">// If relevant, paste all of your challenge code in here</span></pre></div>
<h4 dir="auto">Screenshot</h4> | <p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-remove-classes-from-an-element-with-jquery" rel="nofollow">http://freecodecamp.com/challenges/waypoint-remove-classes-from-an-element-with-jquery</a> has an issue.</p>
<p dir="auto">The instructions were:</p>
<p dir="auto">"Let's remove the btn-default class from all of our button elements.<br>
Here's how you would do this for a specific button, add $("#target2").removeClass("btn-default");"</p>
<p dir="auto">But even before I typed in "btn-default", it said my answer was already correct:<br>
<a href="http://postimg.org/image/4sts8kj5f/" rel="nofollow">http://postimg.org/image/4sts8kj5f/</a></p> | 0 |
<p dir="auto">This is with Julia 0.6</p>
<p dir="auto">I tagged one or two packages, and then tried to published them. This failed, likely because PkgDev couldn't properly authorize with Github. I then tagged and published the same package from Julia 0.4, where everything went fine. Now I see this in Julia 0.6:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> Pkg.update()
INFO: Updating METADATA...
WARNING: Cannot perform fast-forward merge."><pre class="notranslate"><code class="notranslate">julia> Pkg.update()
INFO: Updating METADATA...
WARNING: Cannot perform fast-forward merge.
</code></pre></div>
<p dir="auto">This warning has been there for a few days. How do I avoid it? Is there a way to do this automatically, or do I need to low-level git repo management? Would a hard git reset to the upstream master branch be appropriate, or can this lose data? (I would reset only the metadata repo, leaving my packages alone.)</p>
<p dir="auto">I am making this an issue instead of a question on the mailing list because I think that tagging and publishing should be mainstream (not expert) actions, and Pkg and PkgDev should handle common error conditions automatically, or if not, should at least detect them and point to respective documentation.</p> | <p dir="auto">This is admittedly likely to affect only a small number of people, but I wonder about whether it's reasonable to support <code class="notranslate">publish</code>ing branches that are not <code class="notranslate">metadata-v2</code>. Now that I'm back working on packages, I often have 3 or more simultaneous PRs in to METADATA, and to avoid duplication I create separate branches. Even if we get to the point where Travis isn't the bottleneck in METADATA PRs, it's been demonstrated repeatedly that these PRs are still worth reviewing, so it seems likely that many PRs will be out there for at least several hours.</p> | 1 |
<p dir="auto">If you know how to fix the issue, make a pull request instead.</p>
<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 tried using the <code class="notranslate">@types/styled-components</code> package and had problems because since of v.4.1.9 another <a href="https://user-images.githubusercontent.com/8643060/53185025-d6070a00-3606-11e9-9fc9-1e61afc1f2cf.png" rel="nofollow">conflicted dependency</a> was added (@types/react-native) and conflicts with @types/node . See <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/commit/5dd798b9aa417f01db598fbded1a83a8a857eb39">commit</a></p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version(3.3.3333) of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.</p>
<ul dir="auto">
<li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jkillian/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jkillian">@jkillian</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Igorbek/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Igorbek">@Igorbek</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Igmat/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Igmat">@Igmat</a> @lavoaster <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Jessidhia/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Jessidhia">@Jessidhia</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/eps1lon/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eps1lon">@eps1lon</a> @flavordaaave</li>
</ul>
</li>
</ul>
<h3 dir="auto">how to reproduce:</h3>
<ul dir="auto">
<li>Fresh install react app by command<br>
<code class="notranslate">yarn create react-app my-app-ts --scripts-version=react-scripts-ts</code></li>
<li>add styled components<br>
<code class="notranslate">yarn add styled-components</code><br>
<code class="notranslate">yarn add -D @types/styled-components</code></li>
<li>import ThemeProvider to src/index.tsx and wrap to</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import * as React from 'react';
import * as ReactDOM from 'react-dom';
import {ThemeProvider} from "styled-components";
import App from './App';
import './index.css';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(
<ThemeProvider theme={{}}>
<App />
</ThemeProvider>,
document.getElementById('root') as HTMLElement
);
registerServiceWorker();"><pre class="notranslate"><code class="notranslate">import * as React from 'react';
import * as ReactDOM from 'react-dom';
import {ThemeProvider} from "styled-components";
import App from './App';
import './index.css';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(
<ThemeProvider theme={{}}>
<App />
</ThemeProvider>,
document.getElementById('root') as HTMLElement
);
registerServiceWorker();
</code></pre></div>
<ul dir="auto">
<li>run build command:<br>
<code class="notranslate">yarn start</code></li>
<li>Expected result:<br>
See the react app</li>
<li>Current result:</li>
</ul>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8643060/53246650-f348e080-36b9-11e9-870b-9a5b0a2cb024.png"><img src="https://user-images.githubusercontent.com/8643060/53246650-f348e080-36b9-11e9-870b-9a5b0a2cb024.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">There is a lot of fails according to many definitions conflicts with lib.dom<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8643060/53246958-bc26ff00-36ba-11e9-9ef7-94e591d7a00e.png"><img src="https://user-images.githubusercontent.com/8643060/53246958-bc26ff00-36ba-11e9-9ef7-94e591d7a00e.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">the current underscore definitions in <code class="notranslate">/underscore</code> folder are targeting browsers (i.e. they have <code class="notranslate">declare var _</code> ambient declarations) which make it hard to use them with node which would require a <code class="notranslate">declare module</code> definition. There is a project hat provides this (<a href="https://github.com/alvivi/typescript-underscore">https://github.com/alvivi/typescript-underscore</a>), so it would be great to include it as <code class="notranslate">node_underscore</code></p>
<p dir="auto">(Note: I did not want to submit a PR for this since it's not my work)</p> | 0 |
<p dir="auto">In bootstrap.css:</p>
<pre class="notranslate">.container {
margin-right: auto;
margin-left: auto;
}
.container:before,
.container:after {
display: table;
content: " ";
}
.container:after {
clear: both;
}
.container:before,
.container:after {
display: table;
content: " ";
}
.container:after {
clear: both;
}
.row:before,
.row:after {
display: table;
content: " ";
}
.row:after {
clear: both;
}
.row:before,
.row:after {
display: table;
content: " ";
}
.row:after {
clear: both;
}
</pre>
<p dir="auto">Is this a bug or a feature? :)</p> | <p dir="auto">show on bootstrap.css</p>
<p dir="auto"><a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L581">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L581</a><br>
<a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L723">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L723</a><br>
<a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L743">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L743</a><br>
<a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2023">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2023</a><br>
<a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2433">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2433</a><br>
<a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2617">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2617</a><br>
<a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2637">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2637</a><br>
<a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3032">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3032</a><br>
<a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3296">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3296</a><br>
<a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3453">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3453</a></p> | 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.